@zeniai/web-cockpit-ui 1.14.33-qa → 1.14.34-dev

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 (239) hide show
  1. package/dist/assets/{ACHDetailsPage-BeF1WMnC-BWTFW_6p.js → ACHDetailsPage-MP6kdpXK-Cin5vYxN.js} +1 -1
  2. package/dist/assets/{AIPerformancePage-CxD_UAbI-fpnYflEr.js → AIPerformancePage-BhOaFmfv-DCRtVIyb.js} +26 -26
  3. package/dist/assets/{AccountInfoPage-DcY-ZzlZ-FJ-oHq0G.js → AccountInfoPage-D9Ft_CT9-CUD4qbPd.js} +1 -1
  4. package/dist/assets/{AccountInfoPageContent-CaoKCM-U-OO81J74X.js → AccountInfoPageContent-DvWx52e0-D9gXo091.js} +30 -30
  5. package/dist/assets/{AccountLockedInfoModal-CJmhyeRY--53RI3ma.js → AccountLockedInfoModal-B1_3C1ER-DGCTA7OW.js} +4 -4
  6. package/dist/assets/{AccountReconDetailsDrawerPage-sSMPfl5H-Cm3BYdgG.js → AccountReconDetailsDrawerPage-D9e7qhm0-B1t_x7P2.js} +13 -13
  7. package/dist/assets/{AccountRow-Buzf5t6f-etnrcHrJ.js → AccountRow-CiIWoLq3-F6m6e5Xn.js} +14 -14
  8. package/dist/assets/{AccountsPromoCardStack-Dlcbuic0-DRWRcJqq.js → AccountsPromoCardStack-CC72plKm-DV-DNWnY.js} +30 -30
  9. package/dist/assets/{AddAddressForCardDrawer-BLTkxUcq-B7vSwKJ4.js → AddAddressForCardDrawer-CIj76DoU-BugVt0Ax.js} +1 -1
  10. package/dist/assets/{AddToWalletPage-B5LKICXr-DfBDWY3N.js → AddToWalletPage-B3vdkyWl-C3sTnRDu.js} +17 -17
  11. package/dist/assets/{AgingReportsPage-_hwnvPm7-D_aTfDR9.js → AgingReportsPage-CbkMxxO_-bDdYzvvz.js} +15 -15
  12. package/dist/assets/{AllUserItems-DohW-333-CUu4xgSa.js → AllUserItems-DJo9kLSI-aOrBm21L.js} +11 -11
  13. package/dist/assets/{ApAgingDetailPage-CfzCrv7O-RqAF3Vu6.js → ApAgingDetailPage-DcAh6DLg-YRnOeaE1.js} +3 -3
  14. package/dist/assets/{AppBasePage-Nz4YL7cO-BsmPZ1Al.js → AppBasePage-DztnPkfs-_Sh0VXAS.js} +16 -16
  15. package/dist/assets/{AppDrawerContent-DipGyZ1n-CCl34G60.js → AppDrawerContent-DDmKn21i-C68rKgNZ.js} +8 -8
  16. package/dist/assets/{ApprovalRulesSettingsPage-CDJ2Pb6i-CcP0ubc3.js → ApprovalRulesSettingsPage-Di8tAJ8K-CDv_E-0W.js} +1 -1
  17. package/dist/assets/ArAgingChart-tm5ZiNuY-C229BTlQ.js +24 -0
  18. package/dist/assets/{ArAgingDetailPage-hLTSTpD2-Dg69wqux.js → ArAgingDetailPage-B3JQ08nH-C3xUIMRe.js} +1 -1
  19. package/dist/assets/{AttachmentView-BMvudk_o-BvnNjIGX.js → AttachmentView-p8mBqYjm-BaF-qc0k.js} +6 -6
  20. package/dist/assets/{BankAccountSection-BKK0TqfR-iktNn3d0.js → BankAccountSection-AuQLRvdb-Bwa0DuGQ.js} +6 -6
  21. package/dist/assets/{BankAccountWarningSection-DvJdsXOf-DX0Kkmja.js → BankAccountWarningSection-HvUMABu0-DrqrNnez.js} +19 -19
  22. package/dist/assets/{BankConnectionsSettingsPage-jdyMMWYg-7sjYy26b.js → BankConnectionsSettingsPage-D61w90F9-DCAF3Rvl.js} +8 -8
  23. package/dist/assets/{BillDetailPage-BAc9ZaEX-DiuazQaS.js → BillDetailPage-nqHoph6T-BaIucFqg.js} +7 -7
  24. package/dist/assets/BillPayApprovalRuleDetailPage-fZnmOmyN-BE94bEje.js +27 -0
  25. package/dist/assets/{BillPayApprovalRulesPage-ycrs-KJM-CJpx4ouQ.js → BillPayApprovalRulesPage-Bd87v4ca-D8uVymLg.js} +7 -7
  26. package/dist/assets/{BillPayPromoPage-B3cmYoMb-DSMVy0gV.js → BillPayPromoPage-CNiTD_mM-Dj_ToxT_.js} +6 -6
  27. package/dist/assets/{BillPaySetUpPage-Fs62VXvw-D8p1-eX3.js → BillPaySetUpPage-BUSwkzqv-0u4Y1nRn.js} +2 -2
  28. package/dist/assets/{BillingSettingsPage-Dt9jBMTF-C295NK9o.js → BillingSettingsPage-aPRvtlqA-D2cPcuYt.js} +4 -4
  29. package/dist/assets/{BillsBulkReviewDrawerPage-Qcl9aUuk-_YOWCRG0.js → BillsBulkReviewDrawerPage-BU3VuxEm-ByErXz92.js} +1 -1
  30. package/dist/assets/{BoxItem-BYcXwroy-DxqwCE3J.js → BoxItem-CZKWkdxd-BeOlY6b0.js} +1 -1
  31. package/dist/assets/{BusinessVerificationPage-il8wYjJ_-CT3C0oTK.js → BusinessVerificationPage-CeDGi-RH-DBq4N4qO.js} +5 -5
  32. package/dist/assets/CardNumberSubText-1BRQQyfd-DTVfoanD.js +21 -0
  33. package/dist/assets/{CashbackDetailPage-Dv5Z7Tvy-Bfso-Y3l.js → CashbackDetailPage-V-W_U5k1-BFabFlQi.js} +17 -17
  34. package/dist/assets/{ChargeCardDetailPage-CGTduWWN-BkYrdXDY.js → ChargeCardDetailPage-BP-zAMYI-CpMkI6_j.js} +1 -1
  35. package/dist/assets/{ChargeCardListPage-DNLZxp9I-hEX4MRS2.js → ChargeCardListPage-DORW9YE4-C9A5hHUd.js} +16 -16
  36. package/dist/assets/{ChargeCardListTable-BnHOs06b-Bept2oom.js → ChargeCardListTable-C32mZrwY-C-_ZN5EL.js} +14 -14
  37. package/dist/assets/{ChargeCardPromoPage-C9ByS2z5-ZBsmIOzb.js → ChargeCardPromoPage-CE4kH4Js-C0K_9IRw.js} +13 -13
  38. package/dist/assets/{ChargeCardSetupPage-Baw4VtU6-whYjNQ5s.js → ChargeCardSetupPage-CumpB2GQ-D9_LS2bE.js} +1 -1
  39. package/dist/assets/{ChargeCardStatementsPage-D0nZbDIZ-CqoukG-c.js → ChargeCardStatementsPage-DPIAjww0-qtfYIF5i.js} +6 -6
  40. package/dist/assets/ChargeCardUtils-Wp4Ko18L-zmLd-lJK.js +1 -0
  41. package/dist/assets/{ChaseOverlay-2qpcZYP8-DZC2amkp.js → ChaseOverlay-BGZfbx0H-Cy6SXtpe.js} +8 -8
  42. package/dist/assets/CheckDepositDrawerPage-Bl52b4SW-D474gpb4.js +206 -0
  43. package/dist/assets/{CollapsableReportTable-CPOIqiL0-CeOTbT0I.js → CollapsableReportTable-B0wI9SM1-DLN2kcqg.js} +1 -1
  44. package/dist/assets/{CompanyOfficerDetailsSection-D1BmCIsK-Cg7hHlgd.js → CompanyOfficerDetailsSection-DyOVRvtQ-D3TSBaYy.js} +33 -33
  45. package/dist/assets/{CompanyPassportCard-B9fOwnpa-DsuUYKGw.js → CompanyPassportCard-C_YUK3R3-Tw3Mhb57.js} +5 -5
  46. package/dist/assets/{CompanyPassportPage-BzDOHw_n-BFDOwRWJ.js → CompanyPassportPage-QFJ0G7X7-9FRZMTlm.js} +29 -29
  47. package/dist/assets/{CompleteProfile-BTqueNNu-C0IgFiTo.js → CompleteProfile-DVE16v3y-JdgrMYZk.js} +1 -1
  48. package/dist/assets/{ConfettiBurst-BlFjJIUj-D3PzCoP-.js → ConfettiBurst-BA8BvtO--ChjQJAxk.js} +1 -1
  49. package/dist/assets/{CreateOrEditVendorPage-DAGCdI1c-mmdPlAVt.js → CreateOrEditVendorPage-ncBGwfXK-DYgCQOxT.js} +8 -8
  50. package/dist/assets/{CreditCardPaymentDrawerPage-KsuS7yuN-DA_e7yg1.js → CreditCardPaymentDrawerPage-DqEVQgMx-DmTsuXGo.js} +16 -16
  51. package/dist/assets/{CreditCardPaymentPlgSection-BfhV7QBL-GxG2RoKF.js → CreditCardPaymentPlgSection-vmErttTD-BxhyQLa5.js} +8 -8
  52. package/dist/assets/{CurrencySelectField-oVIC5R45-DO0BaMPk.js → CurrencySelectField-BEb19UaA-ayd8ypxk.js} +1 -1
  53. package/dist/assets/{CustomerOnboardingActivationPage-6I-6xoA6-BvOS7YcY.js → CustomerOnboardingActivationPage-L4l1ybmh-CjOAphEc.js} +2 -2
  54. package/dist/assets/CustomerOnboardingContainerPage-BB4D77z8-22xRu68e.js +1 -0
  55. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-DYXcx90D-Cjqv90OE.js → CustomerOnboardingDetailPageSkeleton-D3Zm658F-BjyCIV27.js} +11 -11
  56. package/dist/assets/{CustomerOnboardingNoStepsPage-DEUNNIB_-xCnv_1xo.js → CustomerOnboardingNoStepsPage-BXsJFpEX-BO1c66C-.js} +2 -2
  57. package/dist/assets/{CustomerOnboardingPage-kAcxVmRC-Dng6IoBs.js → CustomerOnboardingPage-D3zpI1df-BpsmxlbR.js} +2 -2
  58. package/dist/assets/{CustomerOnboardingProductSuitePage-BbRqtmnL-BumjYc1t.js → CustomerOnboardingProductSuitePage-DjVZfC2C-rASo3ZM3.js} +1 -1
  59. package/dist/assets/{Dashboard-usLyPMhz-T83f6_ic.js → Dashboard-wY0FneRs-K0H1LO4c.js} +114 -114
  60. package/dist/assets/{DashboardReportPage-CoozPVLS-CfCi-7lF.js → DashboardReportPage-CMgr0CSc-CTqQy7Z3.js} +19 -19
  61. package/dist/assets/{DashboardSidebarBackgroundAnimation-BNQW5HZE-B5t6wuDS.js → DashboardSidebarBackgroundAnimation-B73UBY5T-DxfAcbVQ.js} +1 -1
  62. package/dist/assets/{DepositAccTransactionItem-CsLHfDqr-CC_1ybiy.js → DepositAccTransactionItem-DrqBG940-U_s0mHE8.js} +3 -3
  63. package/dist/assets/DepositAccTransactionListPage-2xDjOUwm-CmHU0p_6.js +66 -0
  64. package/dist/assets/{DomesticWireDetailsPage-CwYc-sKw-XNW-idse.js → DomesticWireDetailsPage-vRHD5DmW-v4Oe5SWK.js} +1 -1
  65. package/dist/assets/{DownloadOverlay-ttUEv-XY-vEcCF5hB.js → DownloadOverlay-D_UoB4Xy-DPm0LxIQ.js} +1 -1
  66. package/dist/assets/{DrawerPage-5dnYzzvI-C-zfRz8P.js → DrawerPage-ijHe0bCp-CyRbPalv.js} +5 -5
  67. package/dist/assets/{EditPeoplePage-DUr2MZOG-CWSHHw-m.js → EditPeoplePage-BehcmP1s-CtCgWObL.js} +5 -5
  68. package/dist/assets/{EditReimbursementDetailPage-Byuxh0RG-CIXuQ0er.js → EditReimbursementDetailPage-Cz82Vz26-BkH-yQZq.js} +51 -51
  69. package/dist/assets/{EntityDetailPage-DBjBJovr-GAvyHnKI.js → EntityDetailPage-CN-ewzjy-D8rWv-Yn.js} +2 -2
  70. package/dist/assets/{EntitySummarySection-NvNokzqb-atl44xa1.js → EntitySummarySection-B4ozhtlU-BbJmZsFm.js} +5 -5
  71. package/dist/assets/{ExpenseAutomationOverviewPage-Cc7NPgFU-DDwBfHGE.js → ExpenseAutomationOverviewPage-BmNuSoUs-B4ZMF43g.js} +12 -12
  72. package/dist/assets/{ExpenseAutomationPage-zQeR27lq-rCLHkoiU.js → ExpenseAutomationPage-Cz3JsW-E-Cz15ZpzI.js} +30 -30
  73. package/dist/assets/{ExpressPayPage-P0p3Ao-R-i9gfNImU.js → ExpressPayPage-CgrGtZ4F-BicqIV-J.js} +9 -9
  74. package/dist/assets/{FeaturePreviewPage-CbR7b5uO-0LIj_UpA.js → FeaturePreviewPage-Dk_c37Rm-CXHB1WFu.js} +2 -2
  75. package/dist/assets/{FollowStepsSection-9Kfkt8Hp-CoGOQM-s.js → FollowStepsSection-BVi7m38_-C99RMZ_B.js} +22 -22
  76. package/dist/assets/{GlobalReviewListPage-B3b-DcRO-DmpyBeU0.js → GlobalReviewListPage-DiZGC9B1-DIzsLBmo.js} +14 -14
  77. package/dist/assets/{HelpButton-3gV_f3S3-BNW7ywMF.js → HelpButton-DiIoYeXn-FbkReN34.js} +4 -4
  78. package/dist/assets/{InformationCardStack-B67nQ7o3-Cl5LgXZR.js → InformationCardStack-C8-4dhWR-Bdte_JFA.js} +4 -4
  79. package/dist/assets/{InsightsCardStack-BLuzgFq1-ChqYsKwx.js → InsightsCardStack-BKm0dSeJ-YxbfeRpK.js} +9 -9
  80. package/dist/assets/{InsightsSection-B95Utg4C-D7fPPHgQ.js → InsightsSection-C9MHOCQd-B3v5Vy0i.js} +4 -4
  81. package/dist/assets/{IntegrationsSettingsPage-Cj9RN4lm-CSLCHkMN.js → IntegrationsSettingsPage-4qlL5Dsx-NL-7Vuhq.js} +3 -3
  82. package/dist/assets/{InternationalWireSwiftDetailsPage-CnvGCMx6--PeOQhJI.js → InternationalWireSwiftDetailsPage-DqCtPykV-BUWM-1ua.js} +9 -9
  83. package/dist/assets/{InternationalWireVerificationPage-BO-9Inma-BWHslahx.js → InternationalWireVerificationPage-Cl-p0inO-BPrmH8Q-.js} +10 -10
  84. package/dist/assets/{InviteFormPage-BcKX87YR-DV5_crlj.js → InviteFormPage-L6j0rOBW-DZzXMjr6.js} +20 -20
  85. package/dist/assets/{InvitePageListView-pwXs_uWn-Z97ORdSb.js → InvitePageListView-KYjMIc4q-LkWl7l25.js} +34 -34
  86. package/dist/assets/{InvitePeoplePage-DyqidszV-nOc3GIdz.js → InvitePeoplePage-CbZqVsTp-CPZYz4n0.js} +4 -4
  87. package/dist/assets/{InvoiceUploadSection-Bwx4jgsp-D9TPwHrf.js → InvoiceUploadSection-DZC4oscG-DoaD8XBg.js} +6 -6
  88. package/dist/assets/{IssueChargeCardPage-B4uzwROv-Bk2Fezky.js → IssueChargeCardPage-DMdZCfqA-2_AAwzJw.js} +16 -16
  89. package/dist/assets/{LabeledAddressValue-_1wNunap-nTViFxi6.js → LabeledAddressValue-CBOrzSsG-zl4Cn7F6.js} +1 -1
  90. package/dist/assets/LabeledAddressValueField-YuLcra47-D1rCVkct.js +45 -0
  91. package/dist/assets/{LabeledControlledCheckBoxField-DUmCd9rT-BMEF7Bdb.js → LabeledControlledCheckBoxField-BoXsUqpR-BDprT0oc.js} +1 -1
  92. package/dist/assets/{LabeledCreatableSingleSelectField-Ca24Ziei-CBC6Lsco.js → LabeledCreatableSingleSelectField-CQPkrdRe-BP0IH1kb.js} +2 -2
  93. package/dist/assets/{LabeledDocumentField-DtGNCNrD-BmU3HUR-.js → LabeledDocumentField-DEeeTuVw-DjAbPGjO.js} +3 -3
  94. package/dist/assets/{LabeledDropDownFormattedTextField-CEhwMb_t-DelBUgv4.js → LabeledDropDownFormattedTextField-DYRkxlY--C9ZM89bQ.js} +1 -1
  95. package/dist/assets/{LabeledText-DR7J2Gsy-BXmYVhAs.js → LabeledText-DQiR_FIX-Co4J3TbF.js} +1 -1
  96. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-DdWbwo9k-B_izL22O.js → LabeledUserSingleSelectWithSubtitlesField-dgPgTmNg-CjWMU4DS.js} +7 -7
  97. package/dist/assets/{LabeledZeniRolesDropDownField-CmUbFFow-C71nvk8D.js → LabeledZeniRolesDropDownField-azPB8idg-BmyhVq5l.js} +1 -1
  98. package/dist/assets/{LinkJETransactionPage-oW3lDkXa-pDAZrnuw.js → LinkJETransactionPage-Ct0HcxvN-C9ALJkXZ.js} +5 -5
  99. package/dist/assets/{LowBalancePopup-C5KvkK3M-BJ53QfOd.js → LowBalancePopup-Zvy2iURT-BHU6RUxm.js} +4 -4
  100. package/dist/assets/{MagicLinkACHDetailsPage-BVWg6hrX-Dqp8qscs.js → MagicLinkACHDetailsPage-BY6pEieF-BnE5qaIA.js} +1 -1
  101. package/dist/assets/{MagicLinkDomesticWireDetailsPage-S1k7ze9H-BD9CxLYS.js → MagicLinkDomesticWireDetailsPage-BK5RZSiS-DZf3dWg8.js} +1 -1
  102. package/dist/assets/{MagicLinkInternationalWireDetailsPage-DpzfQbRD-Czk6cq3a.js → MagicLinkInternationalWireDetailsPage-hK5cNiNB-B4J-Gaxj.js} +1 -1
  103. package/dist/assets/{MagicLinkSuccessPage-m9Kweywk-BK-TFI1J.js → MagicLinkSuccessPage-Drn_p982-z_mnlocR.js} +1 -1
  104. package/dist/assets/{MagicLinkTitleSection-BPRyg1HR-D82FSUKq.js → MagicLinkTitleSection-DRMHVOzF-vSOOyfRm.js} +9 -9
  105. package/dist/assets/{MailingDetailsSection-BX5rIuJZ-8h9F_QfJ.js → MailingDetailsSection-DgdAYgpS-CzYOsfT_.js} +6 -6
  106. package/dist/assets/{MeetingCalenderPopup-CCW2D5Ua-AdsUfqxp.js → MeetingCalenderPopup-CAh7iae0-BpiINuek.js} +1 -1
  107. package/dist/assets/{Menu-CD6YLYW5-xYOZpEb0.js → Menu-bleLgSLu-Ccrr2YDB.js} +1 -1
  108. package/dist/assets/{MyBankConnectionsSettingsPage-DBU4_Dkv-CJUGJFn3.js → MyBankConnectionsSettingsPage-DRxmQCbq-7MgmeMyL.js} +11 -11
  109. package/dist/assets/{MyPendingActivationChargeCardListPage-0eqXgmvH-CHdZhWCy.js → MyPendingActivationChargeCardListPage-BYLhb47G-DdwAZhiS.js} +2 -2
  110. package/dist/assets/{MyProfileSettingsPage-D1sATCot-BFxBz8wl.js → MyProfileSettingsPage-eVfCRTfx-BNmP0sTQ.js} +11 -11
  111. package/dist/assets/{NavBarWithPicker-BcrWHAVt-Bp97Wb_6.js → NavBarWithPicker-BE2MW7hB-DXAufzd3.js} +5 -5
  112. package/dist/assets/{NavigationArrow-DTaeLGbL-Rg77_mEU.js → NavigationArrow-eEaMttBX-B_OAAp0o.js} +1 -1
  113. package/dist/assets/{NavigationDots-D5YXMwOb-DwbgBSQV.js → NavigationDots-CNwL0a7I-CifVGTqc.js} +1 -1
  114. package/dist/assets/{NewGlobalMerchantPage-CN03ui3Y-C7Wnlo8N.js → NewGlobalMerchantPage-CSWqCqAC-CM5vKN1K.js} +9 -9
  115. package/dist/assets/{NoDataChart-DUJ9H-CB-CJSw-339.js → NoDataChart-DNmdY5gQ-I17nHhNI.js} +3 -3
  116. package/dist/assets/{NoDataTable-D5EYJl2y-Bt6-luGg.js → NoDataTable-DW2wAX3o-CmvIHNA2.js} +1 -1
  117. package/dist/assets/{NotFoundPage-C2-zYoie-Dqz-wiMB.js → NotFoundPage-BMJTG-tj-KX8Yl0C8.js} +4 -4
  118. package/dist/assets/{NotificationSettingsPage-Cb4Zozvx-D0BMc4CK.js → NotificationSettingsPage-Vd3UvdLu-CYwoglab.js} +11 -11
  119. package/dist/assets/NotificationsListConfig-DbHYPEWZ-CWezw8M_.js +1 -0
  120. package/dist/assets/{NotificationsPage-AZg3QlbQ-BHdpJes9.js → NotificationsPage-BaekDEw7-DM6qz84i.js} +7 -7
  121. package/dist/assets/{OpExByVendorPage-BdIQF_eO-omQlG_Ls.js → OpExByVendorPage-DNyTA9nx-AqH3jm4s.js} +6 -6
  122. package/dist/assets/{OverlayContainerPage-Bmu909Fo-eL-vIEjp.js → OverlayContainerPage-Bmu909Fo-D0brL_nl.js} +1 -1
  123. package/dist/assets/{PandLWithForecastPage-Cmvdl5M2-BhFSUFSZ.js → PandLWithForecastPage-DbP4ybN4-CjX2B57O.js} +6 -6
  124. package/dist/assets/{PaymentAccountSetupBillingAddressSection-B8u08pzI-DmEmzort.js → PaymentAccountSetupBillingAddressSection-Dd4Aen8j-DhFeVMmy.js} +7 -7
  125. package/dist/assets/{PeoplePage-DUgY9uhQ-Cr96soIc.js → PeoplePage-B3n7ek2h-Bozbjh3K.js} +18 -18
  126. package/dist/assets/{PortfolioAllocationFormPage-8W6M--6J-DR9Ndj0M.js → PortfolioAllocationFormPage-CzA_c7hR-CWaP7kP_.js} +7 -7
  127. package/dist/assets/{PortfolioDetails-Cgsx9aCA-DeeNxIS6.js → PortfolioDetails-Drgv4Osg-n5MRYPkF.js} +23 -23
  128. package/dist/assets/{ProductsCarousel-Bm2Y2y3o-BXHDZ7Bz.js → ProductsCarousel-BnnfJR0o-69mJVwF1.js} +5 -5
  129. package/dist/assets/{PromoBaseCards-B8vPeDYr-DKbnXhuy.js → PromoBaseCards-BGHJivI8-iKisrOi3.js} +3 -3
  130. package/dist/assets/{QBOConnectionDialog-i-PJJPa4-B0SC4TfV.js → QBOConnectionDialog-uiW9eeZu-BUSCcjkj.js} +6 -6
  131. package/dist/assets/{QBOSetupSection-CRrnYKUh-BbRn7wM8.js → QBOSetupSection-DPb0VAii-CawJiqRt.js} +9 -9
  132. package/dist/assets/ReimbursementApprovalRuleDetailPage-Cvok7KBA-CNtIL-aY.js +26 -0
  133. package/dist/assets/{ReimbursementApprovalRulesPage-Chrc3t9S-DT2ivR9l.js → ReimbursementApprovalRulesPage-C1AFF_DM-JcrRx1zz.js} +32 -32
  134. package/dist/assets/{ReimbursementDetailPage-DGNdthlv-LfuXXHFQ.js → ReimbursementDetailPage-Du6R1zje-DFFAPJro.js} +7 -7
  135. package/dist/assets/{ReimbursementPromoPage-BvFwudpI-Cv-4tXUE.js → ReimbursementPromoPage-CW9eyjp9-D3Pfks5-.js} +9 -9
  136. package/dist/assets/{ReimbursementSetUpPage-Cbax1ApT-E7Ui2lvq.js → ReimbursementSetUpPage-CbPwgIqt-DD9o1r2m.js} +3 -3
  137. package/dist/assets/ReimbursementsBulkReviewDrawerPage-DmRIywf6-CkqM4nh9.js +1 -0
  138. package/dist/assets/{ReloadCard-7jt7MZTY-lIyJZnnS.js → ReloadCard-Dvn17Oxl-CBzKop0_.js} +5 -5
  139. package/dist/assets/{ReportTableViewSelector-BiBxQPuW-CLgWnlTn.js → ReportTableViewSelector-C5_qr5qe-lIXMBIXQ.js} +10 -10
  140. package/dist/assets/{ReportsPage-DFob2c55-D23AFFaM.js → ReportsPage-BNcymVwf-ClQkz7Qq.js} +9 -9
  141. package/dist/assets/{RevenueChart-ClhUfdMh-DYskvLwM.js → RevenueChart-DILkui6c-Bn7jhZor.js} +14 -14
  142. package/dist/assets/{ReviewDetailsPage-FQiCTlke-Q5authsi.js → ReviewDetailsPage-ZYzvK95X-CostS9P2.js} +5 -5
  143. package/dist/assets/{ReviewOverlay-CfF_qd7Q-qDrq1AtB.js → ReviewOverlay-DhUFI1ES-LUmDitH1.js} +4 -4
  144. package/dist/assets/{RoleWithToolTip-BF8jX30M-C92wOLzi.js → RoleWithToolTip-_W95JBwt-D4GQ0PLV.js} +1 -1
  145. package/dist/assets/{ScheduleDetailsFixedAssetsPage-C_eajy25-B_Z0JCSO.js → ScheduleDetailsFixedAssetsPage-iQXV-V_H-BVQFXrep.js} +4 -4
  146. package/dist/assets/{ScheduleDetailsPage-CEyK426x-nrWcby4m.js → ScheduleDetailsPage-KgHwQGrw-DNkLJeLN.js} +3 -3
  147. package/dist/assets/{ScheduleSequenceTable-CzCC1xOo-D8B0ej3Q.js → ScheduleSequenceTable-Bixq8Q7W-DZJIVO-x.js} +12 -12
  148. package/dist/assets/{ScreenRoutes-Dikl0nac.js → ScreenRoutes-Ce8X3bBt.js} +1 -1
  149. package/dist/assets/SetUpAccountSection-D8FMVhkL-0Pe99EFt.js +378 -0
  150. package/dist/assets/{SetUpDefaultSection-BbQ_Qx2--C5lXu4vU.js → SetUpDefaultSection-CI0mxu3H-DcvSJDVc.js} +4 -4
  151. package/dist/assets/{SignIn-DTytMyjr-BxhE66O7.js → SignIn-DslenepV-CPPxlLcj.js} +11 -11
  152. package/dist/assets/{SignInScreen-DKV5tLc9.js → SignInScreen-B1GYtWiH.js} +1 -1
  153. package/dist/assets/{SpendManagementListViewPage-CD0Beu1e-DaoCCXM5.js → SpendManagementListViewPage-D7SzmCmM-BJf-og4i.js} +3 -3
  154. package/dist/assets/{SpendManagementPerTabPage-ILwwf3e3-CE45DDqu.js → SpendManagementPerTabPage-DKaDr4mu-DxptYFft.js} +20 -20
  155. package/dist/assets/{SpendManagementSection-o0Xvlal3-C0zjrllO.js → SpendManagementSection-Ddfq2u6H-DmMZ9eyK.js} +5 -5
  156. package/dist/assets/{SpendMgmtSetupAccountSection-DkUfJ6ei-oFxBfg7R.js → SpendMgmtSetupAccountSection-CPnNzjr--B78i6hxA.js} +6 -6
  157. package/dist/assets/StatementItem-B2uPIFUk-BwrPLJ8M.js +31 -0
  158. package/dist/assets/StatementsPage-o7MvNKvd-C1dFevGn.js +58 -0
  159. package/dist/assets/{StatusSwitcher-u6thj-sM-8T1PWXo9.js → StatusSwitcher-kWLQCCwS-BcuNtj6J.js} +4 -4
  160. package/dist/assets/{SubTabSwitcher-B9ILKi1e-DAbNMl3T.js → SubTabSwitcher-BKm9FxhL-euRzTmRU.js} +1 -1
  161. package/dist/assets/{SummaryCard-Drap3bb1-nVRx_VJE.js → SummaryCard-DBMfNfN2-plAS3Det.js} +1 -1
  162. package/dist/assets/{TaskManagementPage-DoT0Xz7g-DMFrchv7.js → TaskManagementPage-D_wjK-S2-ckyJVLkK.js} +1 -1
  163. package/dist/assets/{TimeRangeSwitcher-DbGrn4DP-BT1wbdLA.js → TimeRangeSwitcher-2vDR_AEV-D-I6mwQS.js} +3 -3
  164. package/dist/assets/{TimeframeSwitcher-sbgG6A6l-gjTqG61O.js → TimeframeSwitcher-BB3_i5V0-DSWHJLc3.js} +1 -1
  165. package/dist/assets/{TimeframeSwitcherWithToggle-arAZfZIA-BY46uNld.js → TimeframeSwitcherWithToggle-CdP0ViK8-CSTf2noq.js} +1 -1
  166. package/dist/assets/{TopExCard-97hb0R08-DsF24-mR.js → TopExCard-BGgGFzmK-Bh9OLnE6.js} +6 -6
  167. package/dist/assets/{TopExDetailPage-CoLyDCB7-D8kHhqmk.js → TopExDetailPage-CbzYG54M-DO9gCz75.js} +14 -14
  168. package/dist/assets/{TransactionDetailPage-q5aE5bnJ-jYWbJJ_Z.js → TransactionDetailPage-C-CfEtCO-BGrY5UL4.js} +36 -36
  169. package/dist/assets/{TransactionList-C8S87idW-CkmfZ-_y.js → TransactionList-C0xK6_zI-BWkO5U-i.js} +5 -5
  170. package/dist/assets/{TransactionListBig-B0GroSXv-Bt_lEoX-.js → TransactionListBig-CIX6CdX--LTkFgM7t.js} +13 -13
  171. package/dist/assets/{TransactionListPage-CP6h2Q1r-CJzCvI7Q.js → TransactionListPage-B7ppBJig-uGcfhXLt.js} +4 -4
  172. package/dist/assets/{TransactionVendorDetailPage-Cgsraa0T-Bvuj8pKB.js → TransactionVendorDetailPage---HGdQiZ-CZOQ9lvG.js} +5 -5
  173. package/dist/assets/{TransferDrawerPage-0MWoLTHi-BGT-JW0Z.js → TransferDrawerPage-DerGmul8-62lI-YY8.js} +19 -19
  174. package/dist/assets/{TreasuryOverviewPage-CaP2pdVj-CEEbDthH.js → TreasuryOverviewPage-DW2gZwip-DVFW4hhW.js} +26 -26
  175. package/dist/assets/{TreasuryPromoPage-CjCAsIAs-DVDda824.js → TreasuryPromoPage-DzqdEmPJ-CoyHUnTy.js} +13 -13
  176. package/dist/assets/{TreasurySetupPage-zxxClgmz-B49PuUcQ.js → TreasurySetupPage-Bo0HQeeU-A0y2k-4p.js} +2 -2
  177. package/dist/assets/{TreasuryStatementsPage-BCDakhB_-BFM4MV11.js → TreasuryStatementsPage-DS_VK4WN-DmTwCwC0.js} +3 -3
  178. package/dist/assets/{TreasuryTaxLetterPage-Bq3Zcz28-CaeCwr68.js → TreasuryTaxLetterPage-DgwqyL6v-B7MPhwnZ.js} +3 -3
  179. package/dist/assets/{TreasuryTransferOrReviewPage-C8OGAEPm-MHGVeol0.js → TreasuryTransferOrReviewPage-ZrSACgLJ-CShzQj1Z.js} +41 -41
  180. package/dist/assets/{TrendChart-BVaBWGSG-Bsmd11nW.js → TrendChart-D07k3uRr-DkExi6rv.js} +4 -4
  181. package/dist/assets/{TrendWithTransactions-wA_XpWa7-CiZEQQ3v.js → TrendWithTransactions-ibwuOssC-C0qp9MFm.js} +5 -5
  182. package/dist/assets/{UncategorizedAccountsMappingPage-CZyZ7HgM-Cfcp8jrs.js → UncategorizedAccountsMappingPage-D1m2Ok2e-DbU6jOlH.js} +12 -12
  183. package/dist/assets/{UnitIntegrationPage-ahzf74jD-BhU3F_FY.js → UnitIntegrationPage-BJxRjjfK-DtvhQiip.js} +2 -2
  184. package/dist/assets/{UploadAdditionalDocumentOverlay-DT_NocG4-Bq1bl1aO.js → UploadAdditionalDocumentOverlay-DI_GZA8A-DOiCRzdE.js} +2 -2
  185. package/dist/assets/{Vendor2FAPopup-_SmOnjiJ-Bzcvad4z.js → Vendor2FAPopup-80vvc7gE-CZyjqzsA.js} +1 -1
  186. package/dist/assets/{VendorACHDetailsPage-qP4fOIER-DjK69kdl.js → VendorACHDetailsPage-CQcuiNPr-ZTYmcvJP.js} +1 -1
  187. package/dist/assets/{VendorDetailPage-BKztI9LK-BWXxargk.js → VendorDetailPage-Dx_yfZDH-Dm378Xm3.js} +8 -8
  188. package/dist/assets/{VendorDomesticWireDetailsPage-CcIVgYDR-AxQuezcA.js → VendorDomesticWireDetailsPage-DN5x3F_Z-XOWyPxP1.js} +1 -1
  189. package/dist/assets/{VendorFiling1099EditablePage-j3wx_7VO-DhWyFbHa.js → VendorFiling1099EditablePage-8Jz187lD-0m7mNuWb.js} +10 -10
  190. package/dist/assets/{VendorFirstReviewPage-Tael17gH-DhgjGUhL.js → VendorFirstReviewPage-CokvYaRq-Cb9NI798.js} +10 -10
  191. package/dist/assets/{VendorInternationalWireDetailsPage-CQU1yW6x-D9yyy6s6.js → VendorInternationalWireDetailsPage-lo9l2Q88-DFczs5XD.js} +7 -7
  192. package/dist/assets/{VendorInternationalWireSwiftDetailsPage-YdTFG4UK-BmTkjHNI.js → VendorInternationalWireSwiftDetailsPage-CPj3zrDk-DRMFLwZ9.js} +1 -1
  193. package/dist/assets/{VendorsAccountsSection-DA43fzxN-C-aSfcSH.js → VendorsAccountsSection-BqoW4DlP-K9mGVuVh.js} +2 -2
  194. package/dist/assets/{VerifyDevice-qwJe3UlY-C8JhMBq8.js → VerifyDevice-D8iPRJ3k-Didr6pca.js} +1 -1
  195. package/dist/assets/{VideoPopup-DjHyf6Dq-Caoe-41_.js → VideoPopup-SdlRHLkM-0X18VPqO.js} +5 -5
  196. package/dist/assets/{WarningsDrawerPage-B3y_Dk0z-BDJbRvuV.js → WarningsDrawerPage-qYWFsE3s-PgntUxKS.js} +3 -3
  197. package/dist/assets/{ZeniAccountDetailPage-3Rwc-ka_-CZGU5GGZ.js → ZeniAccountDetailPage-BL2a5Dmz-iag3jdsk.js} +9 -9
  198. package/dist/assets/{ZeniAccountListViewPage-Dz4Ts37w-C7bBnvjh.js → ZeniAccountListViewPage-CWqzDWcO-BoCUgkRw.js} +14 -14
  199. package/dist/assets/ZeniAccountNavBarPieces-C0MyICK2-D9pY_iW0.js +14 -0
  200. package/dist/assets/{ZeniAccountPromoPage-BdOMtMQi-eO57NyVA.js → ZeniAccountPromoPage-CBm3w0kN-ZGm0kki_.js} +7 -7
  201. package/dist/assets/{ZeniAccountSetupPage-BaAbcpDN-Dz74SoJa.js → ZeniAccountSetupPage-C5VzT9lH-CmNUeSAP.js} +3 -3
  202. package/dist/assets/{ZeniCopyright-CDUB4TcP-GE4oQ9V1.js → ZeniCopyright-BUctH39C-DplfFfSP.js} +1 -1
  203. package/dist/assets/ZeniTransferAmountSlider-q37z6XvR-Baob6Y6l.js +63 -0
  204. package/dist/assets/{analyticsHelper-BvNZGrlc-BJa5RIFt.js → analyticsHelper-B3uAu0es-QTXf1Ev3.js} +1 -1
  205. package/dist/assets/{analyticsHelper-Dx5oOGyQ.js → analyticsHelper-CXIp8rdA.js} +1 -1
  206. package/dist/assets/{chartTypes-eIJ-SPRj-DNmHJom3.js → chartTypes-CJmQ6FtI-XyTHIuvE.js} +1 -1
  207. package/dist/assets/{commonDimensions-BhQMg8M1-BL_2J79f.js → commonDimensions-WRL2ZVK_-BkSU0Zqq.js} +1 -1
  208. package/dist/assets/{detailCommon--19QlDMD-CzDyWg-5.js → detailCommon-Dfxas1Kf-Cs5j6wK3.js} +6 -6
  209. package/dist/assets/{downloadPdf-CdQzDva3-8WZMObW_.js → downloadPdf-B1f0mDl2-DR3N1swU.js} +1 -1
  210. package/dist/assets/{index-tsOp9BQk.js → index-C3eIsUEB.js} +3415 -3415
  211. package/dist/assets/{mapLoadingInProgressToTreeNode-5V5katgj-CVFQIMUP.js → mapLoadingInProgressToTreeNode-BG784RuM-D-SsN93J.js} +1 -1
  212. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-BJxygmqD-h90lXkUP.js → mapSectionWithAcOnlyToTreeNode-CtIgxsPZ-DFzyPyCl.js} +1 -1
  213. package/dist/assets/{mapSpacerToTreeNode-D64394wQ-pSHkWnxf.js → mapSpacerToTreeNode-CcgVbOH5-C822drj0.js} +1 -1
  214. package/dist/assets/{mapTimeframeBalancesToTreeNode-n7enawjr-B0jvlyrF.js → mapTimeframeBalancesToTreeNode-CU583ICK-BsI9dw9j.js} +1 -1
  215. package/dist/assets/{mapTimeframeBalancesToTreeNode-DCKSi6a2-DS9WQRVo.js → mapTimeframeBalancesToTreeNode-DTlwFauL-BnT0AYvx.js} +1 -1
  216. package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-B_QU_sNV-BAbZgSg9.js → mapTimeframeHeaderLoadingInProgressToTreeNode-B_n9jWVz-CxzLxNpV.js} +1 -1
  217. package/dist/assets/{toCOABalancesWithID-BzuCDtG--VHioxKWJ.js → toCOABalancesWithID-DTfegixr-INQY6aSS.js} +1 -1
  218. package/dist/assets/{toChartData-CYJPtvhS-C0w2egjH.js → toChartData-CH5DcWUY-CUE_ejao.js} +1 -1
  219. package/dist/assets/{treasuryColorHelper-BKdnWQWY-D8OCa9aZ.js → treasuryColorHelper-BdPkQoh7-DNZcPnEX.js} +1 -1
  220. package/dist/assets/{uploadAttachment-joBVPGv5-gtEaySAh.js → uploadAttachment-COwu5Mqo-5xUhTy_F.js} +13 -13
  221. package/dist/assets/{uploadReceipts-dxsKhm9I-Cn41OXkr.js → uploadReceipts-dxsKhm9I-BfDIlt9K.js} +1 -1
  222. package/dist/index.html +1 -1
  223. package/package.json +2 -2
  224. package/dist/assets/ArAgingChart-C2EOYS7A-HVEaEPzA.js +0 -24
  225. package/dist/assets/BillPayApprovalRuleDetailPage-C8VknJRe-DRpgLYbu.js +0 -27
  226. package/dist/assets/CardNumberSubText-Cz8Y1Z97-LpaJD4_Y.js +0 -21
  227. package/dist/assets/ChargeCardUtils-CTnXnilO-DMAAzxCn.js +0 -1
  228. package/dist/assets/CheckDepositDrawerPage-C78K4Qka-BgHYkZOt.js +0 -206
  229. package/dist/assets/CustomerOnboardingContainerPage-BXvzWHpN-CpyPZ7nS.js +0 -1
  230. package/dist/assets/DepositAccTransactionListPage-CgNs2M1G-Jw4rbr_L.js +0 -66
  231. package/dist/assets/LabeledAddressValueField-CLeHoJsD-lkNMl3uF.js +0 -45
  232. package/dist/assets/NotificationsListConfig-BjKpPm-b-CViXYy_9.js +0 -1
  233. package/dist/assets/ReimbursementApprovalRuleDetailPage-DfsK1S1y-wuwm32sm.js +0 -26
  234. package/dist/assets/ReimbursementsBulkReviewDrawerPage-vhtiYbWq-D8igsH6s.js +0 -1
  235. package/dist/assets/SetUpAccountSection-nOqMRPh8-DaY9rNyz.js +0 -378
  236. package/dist/assets/StatementItem-GyeTS2vu-C7aG3yI8.js +0 -31
  237. package/dist/assets/StatementsPage-DU5Dhq7q-11U-8ioz.js +0 -58
  238. package/dist/assets/ZeniAccountNavBarPieces-DOWoY-ph-CzwV0Amu.js +0 -14
  239. package/dist/assets/ZeniTransferAmountSlider-BvyfsZDl-BfSyc7LO.js +0 -63
@@ -1,4 +1,4 @@
1
- import{u as ve,e as je,a as Ke,ca as Qe,j as t,aX as Ye,M as re,o as i,m as se,bS as Xe,F as et,bp as tt,C as I,B as nt,y as D,ao as it,v as De,J as ot,x as ze,cn as at,a2 as G,a8 as fe,f1 as Te,l as J,cv as ct,aS as Ne,f9 as qe,fa as lt,fb as st,bv as Ee,r as k,f2 as ge,f3 as we,a0 as Se,bK as xe,_ as rt,b6 as dt,dL as He,f as ie,w as F,f8 as ut,fm as pt,fn as ht,aC as mt,fo as ft}from"./index-tsOp9BQk.js";import{b as r,n}from"./vendor-rkTZJa59.js";import{r as _e}from"./mui-C42whWwM.js";import{M as Pe}from"./ChaseOverlay-2qpcZYP8-DZC2amkp.js";import{a as gt}from"./SetUpAccountSection-nOqMRPh8-DaY9rNyz.js";import{z as wt,B as Ie}from"./SpendMgmtSetupAccountSection-DkUfJ6ei-oFxBfg7R.js";import"./analytics-B3n5JGPc.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-BDNqpTKX.js";import"./SetUpDefaultSection-BbQ_Qx2--C5lXu4vU.js";import"./ChargeCardUtils-CTnXnilO-DMAAzxCn.js";import"./CreditCardPaymentPlgSection-BfhV7QBL-GxG2RoKF.js";const{settings:{bankConnectionHeader:de}}=re.getLocalizedStrings().common,St={value:de.productType,width:new I(100,19)},xt={value:de.primaryAccount,width:new I(100,36)},yt={value:de.linkAccount,width:new I(100,22)},vt={value:de.status,width:new I(12,12)},kt={value:de.balance,width:new I(12,13)},N=[St,xt,yt,vt,kt],{common:{settings:Oe,strings:{hyphen:ke}},commonSetUp:{setUp:Be}}=re.getLocalizedStrings(),T={containerPadding:new I(k[3],k[4]),containerRightPadding:new I(k[3],k[8]),iconContainerMaxWidthHeight:new I(k[6],k[7]),iconWidthHeight:new I(20,k[4]),iconPadding:new I(k[1],12),productTypeContainerMarginBottom:new I(k[3],k[0]),linkAccountContainerMarginTop:new I(k[3],k[0]),productTypeIconSize:new I(k[3],k[4])},bt="bankConnectionsSettingsPage",$t=({productType:e,windowSize:h})=>{switch(e){case"bill_pay":return t.jsx(Dt,{windowSize:h,children:t.jsx(mt,{})});case"reimbursement":return t.jsx(Nt,{windowSize:h,children:t.jsx(ht,{})});case"zeni_accounts":return t.jsx(qt,{windowSize:h,children:t.jsx(Ne,{})});case"zeni_treasury":return t.jsx(Jt,{windowSize:h,children:t.jsx(pt,{})});case"charge_cards":default:return t.jsx(Ht,{windowSize:h,children:t.jsx(ut,{})})}},Ct=({allBankAccounts:e,setupView:h,connectedAccountProvider:q,onFetchLinkTokenClick:R,onUpdatePaymentAccountStatus:_,onEstablishConnectionClick:P,onEstablishConnectionSuccess:M})=>{const C=ve(),c=je(),f=ze().analytics,{trigger:w,formState:{errors:V}}=at(),{plaidConnectionDetails:U,allFundingAccounts:a,primaryFundingAccount:o,productType:l}=h,m=U.link_account,b=U.update_account,[u,A]=r.useState(void 0),[H,v]=r.useState(!1),W=()=>{v(!0)},d=u==="update_account"?b:m,[S,L]=r.useState(d.linkToken??null),[$,z]=r.useState(!1),g=m.fetchStatus.fetchState==="In-Progress"||m.updateStatus.fetchState==="In-Progress";let p,E,s,j=!1;o!=null&&(o.accType==="depositAccount"?p={code:"verified",name:"Verified"}:(p=o.providerVerificationStatus,E=o?.institutionDetails,s=p?.code,j=o?.isLoginRequired??!1));const Q=G(m.updateStatus.fetchState),Y=G(b.updateStatus.fetchState),ee=G(b.fetchStatus.fetchState),O=C.mode==="light"?new fe(C.colors.brandColorJadeLight):new fe(C.colors.brandColorJadeDark),Z=r.useCallback((x,K)=>{f.trackConnectBankSuccess(l,"Settings");const Le=K.accounts.find(Ze=>Ze.id===o?.providerAccountId)??K.accounts[0];o?.id!=null&&u==="update_account"&&Le?.verification_status!=null&&!j?_(Le?.verification_status,o.id,"update_account",y(l),l):P(x,y(l),l),A(void 0),z(!1)},[f,l,o?.id,o?.providerAccountId,u,j,_,P]),te=r.useCallback((x,K)=>{x!=null&&(f.trackConnectBankFailure(l,x.error_code+" "+x.error_message,"Settings"),x.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&o?.id!=null&&_("verification_failed",o.id,"update_account",y(l),l),console.log("Plaid Connection Error",x,K)),A(void 0),z(!1)},[f,l,o?.id,_]),{open:X,ready:ue}=Te({token:S,onSuccess:Z,onExit:te});r.useEffect(()=>{(Q==="In-Progress"&&m.updateStatus.fetchState==="Completed"||Y==="In-Progress"&&b.updateStatus.fetchState==="Completed")&&(J.isVerifiedPaymentAccountProviderStatusCode(s??"")||(R("link_account",y(l)),M(y(l),l)))},[m.updateStatus.fetchState,M,R,o?.providerVerificationStatus?.code,o?.id,Q,Y,b.updateStatus.fetchState,s,l]),r.useEffect(()=>{(J.isVerifiedStatusCode(s??"")||s==="verification_failed")&&!$&&u!=null&&d.linkToken===S&&d.fetchStatus.fetchState==="Completed"&&ue&&z(!0)},[ue,S,d.fetchStatus.fetchState,d.linkToken,s,u,$]);const oe=$e(bt,"primaryAccountSection"),B=ct(V,oe);r.useEffect(()=>{d.fetchStatus.fetchState==="Completed"&&d.linkToken!=null&&d.linkToken!==S&&L(d.linkToken)},[d.fetchStatus.fetchState,d.linkToken,S]),r.useEffect(()=>{$&&X()},[$,X]),r.useEffect(()=>{!o?.zeniAccountId&&!B&&w(oe)},[o?.id]),r.useEffect(()=>{(s==null||s==="verification_failed"||s==="verification_expired"||J.isVerifiedStatusCode(s))&&(J.zeniDate(new Date().toISOString()).isAfter(m.expiration)||m.linkToken==null)&&R("link_account",y(l))},[]);const ne=()=>{f.trackConnectBankGetBalance(l,"Settings"),A("update_account"),R("update_account",y(l),o?.id)},ae=`${o?.accountSubType?.name!=null?o?.accountSubType?.name.substring(0,1).toUpperCase().concat(o?.accountSubType?.name.substring(1)):""} ${o?.maskedAccountNumber??""}`.trim(),pe=E?.zeniInstitutionId.toLowerCase()==="chase",Je=a.findIndex(x=>x.id===o?.id),Ge={element:t.jsx(Ne,{width:T.iconWidthHeight.valuePx(c)}),color:O};return t.jsxs(At,{windowSize:c,children:[H===!0?_e.createPortal(t.jsx(Pe,{connectedAccountProvider:q,action:{onBackClick:()=>v(!1)}}),document.body):null,t.jsxs(jt,{windowSize:c,wrapperWidth:N[0].width,children:[t.jsx(Tt,{windowSize:c,isDarkMode:C.mode==="dark",children:t.jsx($t,{productType:l,windowSize:c})}),t.jsx(zt,{children:Oe.productNameByType[l]})]}),t.jsx(_t,{windowSize:c,wrapperWidth:N[1].width,children:t.jsxs(Bt,{windowSize:c,children:[o!=null&&c!=="small"?t.jsx(Ot,{isDisabled:j,children:wt(Ge,c,C.mode==="dark",o,Je,!1)}):null,t.jsxs(Ft,{windowSize:c,className:"fundingAccount",children:[t.jsx(qe,{style:{display:c==="small"?"block":"inherit",width:"-webkit-fill-available",color:C.colors.hero},customStyleConfig:{menu:()=>({width:c==="small"?"auto":510})},controlProperty:{controlHeight:k[4],fontWeight:Ee.medium,highlightOnHover:!1,leftRightMargin:!1,fieldWidth:c==="small"?240:300},customPlaceholder:{color:C.colors.hero,weight:Ee.medium},name:$e(l,"primaryAccountSection"),placeholder:Be.selectAccountPlaceholder,capitalizeOptions:!0,appendSublabel:!1,showLogoInSingleValue:!1,isClearable:!1,maxMenuHeight:220,valueToLogo:(x,K)=>st(a,x,K),valueToSubLabels:(x,K)=>lt(a,x,K,!1),defaultValue:{selectedOption:o?.id,allOptions:a.map(x=>({label:x.label,value:x.id,isRecommended:x.accType==="depositAccount"}))},textAlignment:"left",showDownChevronIcon:!0,showTickIcon:!1,isOptionRemovable:!1,registerOptions:{required:!1},showCreateOption:!0,showEmptyState:!1,isDisabled:g?"disabled":void 0,showLoadingIcon:g,onClickCreateOption:()=>{f.trackConnectBank(l,"Settings"),A("link_account"),m.linkToken==null||J.zeniDate(new Date().toISOString()).isAfter(m.expiration)?R("link_account",y(l)):S!==m.linkToken?L(m.linkToken):$?X():z(!0)}}),t.jsxs(Pt,{isDisabled:j,children:[ae?t.jsxs(t.Fragment,{children:[t.jsx(It,{children:ae}),c!=="small"&&(s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||j||pe)?t.jsx(Et,{}):null]}):null,c==="small"&&p!=null?t.jsx(ge,{style:{width:"max-content",padding:i.sp0,marginLeft:i.sp2},tagTitle:p.name,textColor:we(p.code)}):null,s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||j||pe?t.jsx(Ie,{productType:l,isUpdateLinkClicked:u==="update_account",isLoginRequired:j,isPendingVerification:s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification",fetchAndUpdateStatues:{fetchStatus:b.fetchStatus,updateStatus:b.updateStatus,linkFetchStatus:m.fetchStatus,linkUpdateStatus:m.updateStatus,prevFetchState:ee,prevUpdateState:Y},onUpdateLinkTokenClick:ne,onChaseInfoClick:W}):null]})]}),c==="small"?t.jsxs(Mt,{children:[o?.accountBalance?.available?t.jsx(Fe,{className:"balanceLabel",children:Se("0,0[.]00",o?.accountBalance?.available)}):t.jsx(be,{children:ke}),o?.accountBalance?.lastRefreshTime?t.jsx(Re,{className:"balanceLabel",children:xe(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null]}):null]})}),t.jsxs(Ut,{windowSize:c,isDisabled:j,wrapperWidth:N[2].width,onClick:x=>x.stopPropagation(),"data-testid":rt("bank-account-section",l),className:"qboLinkAcc",children:[c==="small"?t.jsx(Lt,{children:Oe.bankConnectionHeader.linkAccount}):null,t.jsx(Wt,{isDisabled:j?"disabled":void 0,name:$e(l,"bankAccountSection"),placeholder:Be.zeniCashAccountPlaceholder,defaultValue:{selectedOption:o?.zeniAccountId??"",allOptions:e.map(x=>({label:x.accountName,value:x.accountId}))},controlProperty:{highlightOnHover:!0},isOptionRemovable:!1,textAlignment:"left",registerOptions:{required:!1},style:{width:c==="small"?"calc(100% - 135px)":"100%",marginLeft:c==="small"?i.sp0:`-${i.sp3}`}})]}),c!=="small"?t.jsx(Vt,{windowSize:c,wrapperWidth:N[3].width,children:p!=null?t.jsx(ge,{style:{width:"max-content",padding:0},tagTitle:p.name,textColor:we(p.code)}):t.jsx(be,{children:ke})}):null,c!=="small"?t.jsxs(Rt,{windowSize:c,wrapperWidth:N[4].width,children:[o?.accountBalance?.available?t.jsx(Fe,{className:"balanceLabel",children:Se("0,0[.]00",o?.accountBalance?.available)}):t.jsx(be,{children:ke}),o?.accountBalance?.lastRefreshTime?t.jsx(Re,{className:"balanceLabel",children:xe(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null]}):null]})},At=n.div`
1
+ import{u as ve,e as je,a as Ze,ca as Ye,j as t,aX as Qe,B as re,o as i,m as se,bS as Xe,F as et,bp as tt,C as I,n as nt,t as D,ao as it,v as De,J as ot,x as ze,cn as at,a2 as G,a8 as fe,f1 as Te,l as J,cv as ct,aS as Ne,f9 as qe,fa as lt,fb as st,bv as Ee,q as k,f2 as ge,f3 as we,a0 as Se,bK as xe,$ as rt,b6 as dt,dL as He,g as ie,w as F,f8 as ut,fm as pt,fn as ht,aC as mt,fo as ft}from"./index-C3eIsUEB.js";import{b as r,n}from"./vendor-rkTZJa59.js";import{r as _e}from"./mui-C42whWwM.js";import{M as Pe}from"./ChaseOverlay-BGZfbx0H-Cy6SXtpe.js";import{a as gt}from"./SetUpAccountSection-D8FMVhkL-0Pe99EFt.js";import{z as wt,B as Ie}from"./SpendMgmtSetupAccountSection-CPnNzjr--B78i6hxA.js";import"./analytics-B3n5JGPc.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-BDNqpTKX.js";import"./SetUpDefaultSection-CI0mxu3H-DcvSJDVc.js";import"./ChargeCardUtils-Wp4Ko18L-zmLd-lJK.js";import"./CreditCardPaymentPlgSection-vmErttTD-BxhyQLa5.js";const{settings:{bankConnectionHeader:de}}=re.getLocalizedStrings().common,St={value:de.productType,width:new I(100,19)},xt={value:de.primaryAccount,width:new I(100,36)},yt={value:de.linkAccount,width:new I(100,22)},vt={value:de.status,width:new I(12,12)},kt={value:de.balance,width:new I(12,13)},N=[St,xt,yt,vt,kt],{common:{settings:Oe,strings:{hyphen:ke}},commonSetUp:{setUp:Be}}=re.getLocalizedStrings(),T={containerPadding:new I(k[3],k[4]),containerRightPadding:new I(k[3],k[8]),iconContainerMaxWidthHeight:new I(k[6],k[7]),iconWidthHeight:new I(20,k[4]),iconPadding:new I(k[1],12),productTypeContainerMarginBottom:new I(k[3],k[0]),linkAccountContainerMarginTop:new I(k[3],k[0]),productTypeIconSize:new I(k[3],k[4])},bt="bankConnectionsSettingsPage",$t=({productType:e,windowSize:h})=>{switch(e){case"bill_pay":return t.jsx(Dt,{windowSize:h,children:t.jsx(mt,{})});case"reimbursement":return t.jsx(Nt,{windowSize:h,children:t.jsx(ht,{})});case"zeni_accounts":return t.jsx(qt,{windowSize:h,children:t.jsx(Ne,{})});case"zeni_treasury":return t.jsx(Jt,{windowSize:h,children:t.jsx(pt,{})});case"charge_cards":default:return t.jsx(Ht,{windowSize:h,children:t.jsx(ut,{})})}},Ct=({allBankAccounts:e,setupView:h,connectedAccountProvider:q,onFetchLinkTokenClick:R,onUpdatePaymentAccountStatus:_,onEstablishConnectionClick:P,onEstablishConnectionSuccess:M})=>{const C=ve(),c=je(),f=ze().analytics,{trigger:w,formState:{errors:V}}=at(),{plaidConnectionDetails:U,allFundingAccounts:a,primaryFundingAccount:o,productType:l}=h,m=U.link_account,b=U.update_account,[u,A]=r.useState(void 0),[H,v]=r.useState(!1),W=()=>{v(!0)},d=u==="update_account"?b:m,[S,L]=r.useState(d.linkToken??null),[$,z]=r.useState(!1),g=m.fetchStatus.fetchState==="In-Progress"||m.updateStatus.fetchState==="In-Progress";let p,E,s,j=!1;o!=null&&(o.accType==="depositAccount"?p={code:"verified",name:"Verified"}:(p=o.providerVerificationStatus,E=o?.institutionDetails,s=p?.code,j=o?.isLoginRequired??!1));const Y=G(m.updateStatus.fetchState),Q=G(b.updateStatus.fetchState),ee=G(b.fetchStatus.fetchState),O=C.mode==="light"?new fe(C.colors.brandColorJadeLight):new fe(C.colors.brandColorJadeDark),K=r.useCallback((x,Z)=>{f.trackConnectBankSuccess(l,"Settings");const Le=Z.accounts.find(Ke=>Ke.id===o?.providerAccountId)??Z.accounts[0];o?.id!=null&&u==="update_account"&&Le?.verification_status!=null&&!j?_(Le?.verification_status,o.id,"update_account",y(l),l):P(x,y(l),l),A(void 0),z(!1)},[f,l,o?.id,o?.providerAccountId,u,j,_,P]),te=r.useCallback((x,Z)=>{x!=null&&(f.trackConnectBankFailure(l,x.error_code+" "+x.error_message,"Settings"),x.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&o?.id!=null&&_("verification_failed",o.id,"update_account",y(l),l),console.log("Plaid Connection Error",x,Z)),A(void 0),z(!1)},[f,l,o?.id,_]),{open:X,ready:ue}=Te({token:S,onSuccess:K,onExit:te});r.useEffect(()=>{(Y==="In-Progress"&&m.updateStatus.fetchState==="Completed"||Q==="In-Progress"&&b.updateStatus.fetchState==="Completed")&&(J.isVerifiedPaymentAccountProviderStatusCode(s??"")||(R("link_account",y(l)),M(y(l),l)))},[m.updateStatus.fetchState,M,R,o?.providerVerificationStatus?.code,o?.id,Y,Q,b.updateStatus.fetchState,s,l]),r.useEffect(()=>{(J.isVerifiedStatusCode(s??"")||s==="verification_failed")&&!$&&u!=null&&d.linkToken===S&&d.fetchStatus.fetchState==="Completed"&&ue&&z(!0)},[ue,S,d.fetchStatus.fetchState,d.linkToken,s,u,$]);const oe=$e(bt,"primaryAccountSection"),B=ct(V,oe);r.useEffect(()=>{d.fetchStatus.fetchState==="Completed"&&d.linkToken!=null&&d.linkToken!==S&&L(d.linkToken)},[d.fetchStatus.fetchState,d.linkToken,S]),r.useEffect(()=>{$&&X()},[$,X]),r.useEffect(()=>{!o?.zeniAccountId&&!B&&w(oe)},[o?.id]),r.useEffect(()=>{(s==null||s==="verification_failed"||s==="verification_expired"||J.isVerifiedStatusCode(s))&&(J.zeniDate(new Date().toISOString()).isAfter(m.expiration)||m.linkToken==null)&&R("link_account",y(l))},[]);const ne=()=>{f.trackConnectBankGetBalance(l,"Settings"),A("update_account"),R("update_account",y(l),o?.id)},ae=`${o?.accountSubType?.name!=null?o?.accountSubType?.name.substring(0,1).toUpperCase().concat(o?.accountSubType?.name.substring(1)):""} ${o?.maskedAccountNumber??""}`.trim(),pe=E?.zeniInstitutionId.toLowerCase()==="chase",Je=a.findIndex(x=>x.id===o?.id),Ge={element:t.jsx(Ne,{width:T.iconWidthHeight.valuePx(c)}),color:O};return t.jsxs(At,{windowSize:c,children:[H===!0?_e.createPortal(t.jsx(Pe,{connectedAccountProvider:q,action:{onBackClick:()=>v(!1)}}),document.body):null,t.jsxs(jt,{windowSize:c,wrapperWidth:N[0].width,children:[t.jsx(Tt,{windowSize:c,isDarkMode:C.mode==="dark",children:t.jsx($t,{productType:l,windowSize:c})}),t.jsx(zt,{children:Oe.productNameByType[l]})]}),t.jsx(_t,{windowSize:c,wrapperWidth:N[1].width,children:t.jsxs(Bt,{windowSize:c,children:[o!=null&&c!=="small"?t.jsx(Ot,{isDisabled:j,children:wt(Ge,c,C.mode==="dark",o,Je,!1)}):null,t.jsxs(Ft,{windowSize:c,className:"fundingAccount",children:[t.jsx(qe,{style:{display:c==="small"?"block":"inherit",width:"-webkit-fill-available",color:C.colors.hero},customStyleConfig:{menu:()=>({width:c==="small"?"auto":510})},controlProperty:{controlHeight:k[4],fontWeight:Ee.medium,highlightOnHover:!1,leftRightMargin:!1,fieldWidth:c==="small"?240:300},customPlaceholder:{color:C.colors.hero,weight:Ee.medium},name:$e(l,"primaryAccountSection"),placeholder:Be.selectAccountPlaceholder,capitalizeOptions:!0,appendSublabel:!1,showLogoInSingleValue:!1,isClearable:!1,maxMenuHeight:220,valueToLogo:(x,Z)=>st(a,x,Z),valueToSubLabels:(x,Z)=>lt(a,x,Z,!1),defaultValue:{selectedOption:o?.id,allOptions:a.map(x=>({label:x.label,value:x.id,isRecommended:x.accType==="depositAccount"}))},textAlignment:"left",showDownChevronIcon:!0,showTickIcon:!1,isOptionRemovable:!1,registerOptions:{required:!1},showCreateOption:!0,showEmptyState:!1,isDisabled:g?"disabled":void 0,showLoadingIcon:g,onClickCreateOption:()=>{f.trackConnectBank(l,"Settings"),A("link_account"),m.linkToken==null||J.zeniDate(new Date().toISOString()).isAfter(m.expiration)?R("link_account",y(l)):S!==m.linkToken?L(m.linkToken):$?X():z(!0)}}),t.jsxs(Pt,{isDisabled:j,children:[ae?t.jsxs(t.Fragment,{children:[t.jsx(It,{children:ae}),c!=="small"&&(s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||j||pe)?t.jsx(Et,{}):null]}):null,c==="small"&&p!=null?t.jsx(ge,{style:{width:"max-content",padding:i.sp0,marginLeft:i.sp2},tagTitle:p.name,textColor:we(p.code)}):null,s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||j||pe?t.jsx(Ie,{productType:l,isUpdateLinkClicked:u==="update_account",isLoginRequired:j,isPendingVerification:s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification",fetchAndUpdateStatues:{fetchStatus:b.fetchStatus,updateStatus:b.updateStatus,linkFetchStatus:m.fetchStatus,linkUpdateStatus:m.updateStatus,prevFetchState:ee,prevUpdateState:Q},onUpdateLinkTokenClick:ne,onChaseInfoClick:W}):null]})]}),c==="small"?t.jsxs(Mt,{children:[o?.accountBalance?.available?t.jsx(Fe,{className:"balanceLabel",children:Se("0,0[.]00",o?.accountBalance?.available)}):t.jsx(be,{children:ke}),o?.accountBalance?.lastRefreshTime?t.jsx(Re,{className:"balanceLabel",children:xe(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null]}):null]})}),t.jsxs(Ut,{windowSize:c,isDisabled:j,wrapperWidth:N[2].width,onClick:x=>x.stopPropagation(),"data-testid":rt("bank-account-section",l),className:"qboLinkAcc",children:[c==="small"?t.jsx(Lt,{children:Oe.bankConnectionHeader.linkAccount}):null,t.jsx(Wt,{isDisabled:j?"disabled":void 0,name:$e(l,"bankAccountSection"),placeholder:Be.zeniCashAccountPlaceholder,defaultValue:{selectedOption:o?.zeniAccountId??"",allOptions:e.map(x=>({label:x.accountName,value:x.accountId}))},controlProperty:{highlightOnHover:!0},isOptionRemovable:!1,textAlignment:"left",registerOptions:{required:!1},style:{width:c==="small"?"calc(100% - 135px)":"100%",marginLeft:c==="small"?i.sp0:`-${i.sp3}`}})]}),c!=="small"?t.jsx(Vt,{windowSize:c,wrapperWidth:N[3].width,children:p!=null?t.jsx(ge,{style:{width:"max-content",padding:0},tagTitle:p.name,textColor:we(p.code)}):t.jsx(be,{children:ke})}):null,c!=="small"?t.jsxs(Rt,{windowSize:c,wrapperWidth:N[4].width,children:[o?.accountBalance?.available?t.jsx(Fe,{className:"balanceLabel",children:Se("0,0[.]00",o?.accountBalance?.available)}):t.jsx(be,{children:ke}),o?.accountBalance?.lastRefreshTime?t.jsx(Re,{className:"balanceLabel",children:xe(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null]}):null]})},At=n.div`
2
2
  display: flex;
3
3
  flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
4
4
  align-items: ${e=>e.windowSize==="small"?"flex-start":"center"};
@@ -146,7 +146,7 @@ import{u as ve,e as je,a as Ke,ca as Qe,j as t,aX as Ye,M as re,o as i,m as se,b
146
146
  width: 100%;
147
147
  height: 100%;
148
148
  }
149
- `,$e=(e,h)=>`${e}.${h}`,y=e=>{switch(e){case"zeni_accounts":return"account_setup";case"bill_pay":return"bill_pay_setup";case"charge_cards":return"charge_card_setup";case"reimbursement":return"reimbursement_setup";case"zeni_treasury":return"treasury_setup";case"other_connection":return"other_connection_setup"}},{common:{settings:Ce,strings:{empty:Gt,hyphen:Zt}}}=re.getLocalizedStrings(),he={paymentAccountIconSize:new I(k[6],k[7])},Kt=()=>null,Qt=({paymentAccount:e,bankAccountList:h,balanceFetchStatus:q,connectedAccountProvider:R,onRemoveConnection:_,onFetchLinkTokenClick:P,onEstablishConnectionClick:M,onEstablishConnectionSuccess:C,onUpdatePaymentAccountStatus:c})=>{const f=ve(),w=je(),V=ze().analytics,[U,a]=r.useState(!1),[o,l]=r.useState(!1),m=()=>{l(!0)},b=e.plaidConnectionDetails.link_account,u=e.plaidConnectionDetails.update_account,[A,H]=r.useState(void 0),v=A==="update_account"?u:b,[W,d]=r.useState(v.linkToken??null),[S,L]=r.useState(!1),$=G(b.updateStatus.fetchState),z=G(u.updateStatus.fetchState),g=G(u.fetchStatus.fetchState),p=e?.providerVerificationStatus,E=e?.isLoginRequired??!1,s="other_connection",j=p?.code,Q=r.useCallback((B,ne)=>{V.trackConnectBankSuccess(s,"Settings");const ae=ne.accounts.find(pe=>pe.id===e.providerAccountId)??ne.accounts[0];e.paymentAccountId!=null&&A==="update_account"&&ae?.verification_status!=null&&!E?c(ae?.verification_status,e.paymentAccountId,"update_account",y(s),s):M(B,y(s),s),H(void 0),L(!1)},[V,s,e.paymentAccountId,e.providerAccountId,A,E,c,M]),Y=r.useCallback((B,ne)=>{B!=null&&(V.trackConnectBankFailure(s,B.error_code+" "+B.error_message,"Settings"),B.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&e.paymentAccountId!=null&&c("verification_failed",e.paymentAccountId,"update_account",y(s),s),console.log("Plaid Connection Error",B,ne)),H(void 0),L(!1)},[V,s,e.paymentAccountId,c]),{open:ee,ready:O}=Te({token:W,onSuccess:Q,onExit:Y});r.useEffect(()=>{v.fetchStatus.fetchState==="Completed"&&v.linkToken!=null&&v.linkToken!==W&&d(v.linkToken)},[v.fetchStatus.fetchState,v.linkToken,W]),r.useEffect(()=>{S&&ee()},[S,ee]),r.useEffect(()=>{($==="In-Progress"&&b.updateStatus.fetchState==="Completed"||z==="In-Progress"&&u.updateStatus.fetchState==="Completed")&&(J.isVerifiedStatusCode(j??"")||(P("link_account",y(s)),C(y(s),s)))},[b.updateStatus.fetchState,C,P,e?.providerVerificationStatus?.code,e?.paymentAccountId,$,z,u.updateStatus.fetchState,j,s]),r.useEffect(()=>{(J.isVerifiedStatusCode(j??"")||j==="verification_failed")&&!S&&A!=null&&v.linkToken===W&&v.fetchStatus.fetchState==="Completed"&&O&&L(!0)},[O,W,v.fetchStatus.fetchState,v.linkToken,j,A,S]);const Z=()=>{V.trackConnectBankGetBalance(s,"Settings"),H("update_account"),P("update_account",y(s),e.paymentAccountId)},te=f.mode==="light"?new fe(f.colors.brandColorJadeLight):new fe(f.colors.brandColorJadeDark),X={element:t.jsx(dn,{windowSize:w,children:t.jsx(ft,{})}),color:te},ue=h.find(B=>B.accountId===e.zeniAccountId),oe=()=>{a(B=>!B)};return t.jsxs(Yt,{onMouseEnter:oe,onMouseLeave:oe,children:[o===!0?_e.createPortal(t.jsx(Pe,{connectedAccountProvider:R,action:{onBackClick:()=>l(!1)}}),document.body):null,t.jsxs(Xt,{windowSize:w,wrapperWidth:N[0].width,children:[t.jsx(en,{children:Ce.otherAccount.title}),t.jsx(tn,{children:Ce.otherAccount.subTitle})]}),t.jsxs(nn,{windowSize:w,wrapperWidth:N[1].width,children:[gt(X,w,f.mode==="dark",e,!0),t.jsxs(un,{children:[t.jsx(pn,{children:t.jsx(gn,{windowSize:w,children:e.institutionDetails.institutionName})}),t.jsxs(hn,{windowSize:w,children:[t.jsxs(wn,{children:[t.jsx(mn,{children:e.accountSubType?.name}),t.jsx(fn,{children:e.maskedAccountNumber}),E&&t.jsx(Sn,{})]}),E&&t.jsx(Ie,{productType:"other_connection",isUpdateLinkClicked:A==="update_account",isLoginRequired:E,isPendingVerification:!1,fetchAndUpdateStatues:{fetchStatus:u.fetchStatus,updateStatus:u.updateStatus,linkFetchStatus:b.fetchStatus,linkUpdateStatus:b.updateStatus,prevFetchState:g,prevUpdateState:z},onUpdateLinkTokenClick:Z,onChaseInfoClick:m})]})]})]}),t.jsx(on,{windowSize:w,wrapperWidth:N[2].width,children:ue?.accountName??Gt}),t.jsx(an,{windowSize:w,wrapperWidth:N[3].width,children:p!=null?t.jsx(ge,{style:{width:"max-content",padding:0,marginTop:i.sp2},tagTitle:p.name,textColor:we(p.code)}):Zt}),t.jsxs(cn,{windowSize:w,wrapperWidth:N[4].width,children:[t.jsx(ln,{className:"balanceLabel",isRemoveHovered:U,children:Se("0,0.[00]",e.balances?.available)}),e.balances?.lastRefreshTime?t.jsx(sn,{className:"balanceLabel",isRemoveHovered:U,children:xe(e.balances?.lastRefreshTime)}):q?.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null,U&&t.jsx(rn,{children:t.jsx(He,{moreIconType:"plain",options:[{label:Ce.otherAccount.remove,value:"remove"}],customStyleConfig:{valueContainer:()=>({height:i.sp3,".more-icon":{width:i.sp3,height:i.sp3,color:f.colors.primary}}),container:()=>({marginLeft:i.sp0,position:"relative"}),control:()=>({background:"transparent"}),menu:()=>({position:"absolute",right:0,borderRadius:i.sp1,marginTop:i.sp2,background:f.colors.grey5,width:"162px",border:`1px solid ${f.colors.grey3}`,boxShadow:`${i.sp0} 1px 2px ${i.sp0} ${ie.boxShadowElevation}`}),option:()=>({height:i.sp6,paddingLeft:i.sp3,paddingRight:i.sp3,display:"flex",alignItems:"center",color:ie.important,":hover":{color:ie.important,backgroundColor:f.colors.background}})},menuPlacement:"bottom",onOptionSelection:B=>{B==="remove"&&_(e.paymentAccountId)},valueToIcon:Kt})})]})]})},Yt=n.div`
149
+ `,$e=(e,h)=>`${e}.${h}`,y=e=>{switch(e){case"zeni_accounts":return"account_setup";case"bill_pay":return"bill_pay_setup";case"charge_cards":return"charge_card_setup";case"reimbursement":return"reimbursement_setup";case"zeni_treasury":return"treasury_setup";case"other_connection":return"other_connection_setup"}},{common:{settings:Ce,strings:{empty:Gt,hyphen:Kt}}}=re.getLocalizedStrings(),he={paymentAccountIconSize:new I(k[6],k[7])},Zt=()=>null,Yt=({paymentAccount:e,bankAccountList:h,balanceFetchStatus:q,connectedAccountProvider:R,onRemoveConnection:_,onFetchLinkTokenClick:P,onEstablishConnectionClick:M,onEstablishConnectionSuccess:C,onUpdatePaymentAccountStatus:c})=>{const f=ve(),w=je(),V=ze().analytics,[U,a]=r.useState(!1),[o,l]=r.useState(!1),m=()=>{l(!0)},b=e.plaidConnectionDetails.link_account,u=e.plaidConnectionDetails.update_account,[A,H]=r.useState(void 0),v=A==="update_account"?u:b,[W,d]=r.useState(v.linkToken??null),[S,L]=r.useState(!1),$=G(b.updateStatus.fetchState),z=G(u.updateStatus.fetchState),g=G(u.fetchStatus.fetchState),p=e?.providerVerificationStatus,E=e?.isLoginRequired??!1,s="other_connection",j=p?.code,Y=r.useCallback((B,ne)=>{V.trackConnectBankSuccess(s,"Settings");const ae=ne.accounts.find(pe=>pe.id===e.providerAccountId)??ne.accounts[0];e.paymentAccountId!=null&&A==="update_account"&&ae?.verification_status!=null&&!E?c(ae?.verification_status,e.paymentAccountId,"update_account",y(s),s):M(B,y(s),s),H(void 0),L(!1)},[V,s,e.paymentAccountId,e.providerAccountId,A,E,c,M]),Q=r.useCallback((B,ne)=>{B!=null&&(V.trackConnectBankFailure(s,B.error_code+" "+B.error_message,"Settings"),B.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&e.paymentAccountId!=null&&c("verification_failed",e.paymentAccountId,"update_account",y(s),s),console.log("Plaid Connection Error",B,ne)),H(void 0),L(!1)},[V,s,e.paymentAccountId,c]),{open:ee,ready:O}=Te({token:W,onSuccess:Y,onExit:Q});r.useEffect(()=>{v.fetchStatus.fetchState==="Completed"&&v.linkToken!=null&&v.linkToken!==W&&d(v.linkToken)},[v.fetchStatus.fetchState,v.linkToken,W]),r.useEffect(()=>{S&&ee()},[S,ee]),r.useEffect(()=>{($==="In-Progress"&&b.updateStatus.fetchState==="Completed"||z==="In-Progress"&&u.updateStatus.fetchState==="Completed")&&(J.isVerifiedStatusCode(j??"")||(P("link_account",y(s)),C(y(s),s)))},[b.updateStatus.fetchState,C,P,e?.providerVerificationStatus?.code,e?.paymentAccountId,$,z,u.updateStatus.fetchState,j,s]),r.useEffect(()=>{(J.isVerifiedStatusCode(j??"")||j==="verification_failed")&&!S&&A!=null&&v.linkToken===W&&v.fetchStatus.fetchState==="Completed"&&O&&L(!0)},[O,W,v.fetchStatus.fetchState,v.linkToken,j,A,S]);const K=()=>{V.trackConnectBankGetBalance(s,"Settings"),H("update_account"),P("update_account",y(s),e.paymentAccountId)},te=f.mode==="light"?new fe(f.colors.brandColorJadeLight):new fe(f.colors.brandColorJadeDark),X={element:t.jsx(dn,{windowSize:w,children:t.jsx(ft,{})}),color:te},ue=h.find(B=>B.accountId===e.zeniAccountId),oe=()=>{a(B=>!B)};return t.jsxs(Qt,{onMouseEnter:oe,onMouseLeave:oe,children:[o===!0?_e.createPortal(t.jsx(Pe,{connectedAccountProvider:R,action:{onBackClick:()=>l(!1)}}),document.body):null,t.jsxs(Xt,{windowSize:w,wrapperWidth:N[0].width,children:[t.jsx(en,{children:Ce.otherAccount.title}),t.jsx(tn,{children:Ce.otherAccount.subTitle})]}),t.jsxs(nn,{windowSize:w,wrapperWidth:N[1].width,children:[gt(X,w,f.mode==="dark",e,!0),t.jsxs(un,{children:[t.jsx(pn,{children:t.jsx(gn,{windowSize:w,children:e.institutionDetails.institutionName})}),t.jsxs(hn,{windowSize:w,children:[t.jsxs(wn,{children:[t.jsx(mn,{children:e.accountSubType?.name}),t.jsx(fn,{children:e.maskedAccountNumber}),E&&t.jsx(Sn,{})]}),E&&t.jsx(Ie,{productType:"other_connection",isUpdateLinkClicked:A==="update_account",isLoginRequired:E,isPendingVerification:!1,fetchAndUpdateStatues:{fetchStatus:u.fetchStatus,updateStatus:u.updateStatus,linkFetchStatus:b.fetchStatus,linkUpdateStatus:b.updateStatus,prevFetchState:g,prevUpdateState:z},onUpdateLinkTokenClick:K,onChaseInfoClick:m})]})]})]}),t.jsx(on,{windowSize:w,wrapperWidth:N[2].width,children:ue?.accountName??Gt}),t.jsx(an,{windowSize:w,wrapperWidth:N[3].width,children:p!=null?t.jsx(ge,{style:{width:"max-content",padding:0,marginTop:i.sp2},tagTitle:p.name,textColor:we(p.code)}):Kt}),t.jsxs(cn,{windowSize:w,wrapperWidth:N[4].width,children:[t.jsx(ln,{className:"balanceLabel",isRemoveHovered:U,children:Se("0,0.[00]",e.balances?.available)}),e.balances?.lastRefreshTime?t.jsx(sn,{className:"balanceLabel",isRemoveHovered:U,children:xe(e.balances?.lastRefreshTime)}):q?.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null,U&&t.jsx(rn,{children:t.jsx(He,{moreIconType:"plain",options:[{label:Ce.otherAccount.remove,value:"remove"}],customStyleConfig:{valueContainer:()=>({height:i.sp3,".more-icon":{width:i.sp3,height:i.sp3,color:f.colors.primary}}),container:()=>({marginLeft:i.sp0,position:"relative"}),control:()=>({background:"transparent"}),menu:()=>({position:"absolute",right:0,borderRadius:i.sp1,marginTop:i.sp2,background:f.colors.grey5,width:"162px",border:`1px solid ${f.colors.grey3}`,boxShadow:`${i.sp0} 1px 2px ${i.sp0} ${ie.boxShadowElevation}`}),option:()=>({height:i.sp6,paddingLeft:i.sp3,paddingRight:i.sp3,display:"flex",alignItems:"center",color:ie.important,":hover":{color:ie.important,backgroundColor:f.colors.background}})},menuPlacement:"bottom",onOptionSelection:B=>{B==="remove"&&_(e.paymentAccountId)},valueToIcon:Zt})})]})]})},Qt=n.div`
150
150
  display: flex;
151
151
  padding: ${i.sp4};
152
152
  padding-right: ${i.sp8};
@@ -230,7 +230,7 @@ import{u as ve,e as je,a as Ke,ca as Qe,j as t,aX as Ye,M as re,o as i,m as se,b
230
230
  height: ${i.sp1};
231
231
  cursor: inherit;
232
232
  background-color: ${e=>e.theme.colors.grey1};
233
- `,{common:{settings:me,strings:{empty:xn}}}=re.getLocalizedStrings(),yn=()=>null,vn=({paymentAccount:e,bankAccountList:h,balanceFetchStatus:q,connectedAccountProvider:R,onRemoveConnection:_,onFetchLinkTokenClick:P,onEstablishConnectionClick:M,onEstablishConnectionSuccess:C,onUpdatePaymentAccountStatus:c})=>{const f=ve(),w=ze().analytics,[V,U]=r.useState(!1),a=()=>{U(!0)},o=e.plaidConnectionDetails.link_account,l=e.plaidConnectionDetails.update_account,[m,b]=r.useState(void 0),u=m==="update_account"?l:o,[A,H]=r.useState(u.linkToken??null),[v,W]=r.useState(!1),d=G(o.updateStatus.fetchState),S=G(l.updateStatus.fetchState),L=G(l.fetchStatus.fetchState),$=e?.providerVerificationStatus,z=e?.isLoginRequired??!1,g="other_connection",p=$?.code,E=r.useCallback((O,Z)=>{w.trackConnectBankSuccess(g,"Settings");const te=Z.accounts.find(X=>X.id===e.providerAccountId)??Z.accounts[0];e.paymentAccountId!=null&&m==="update_account"&&te?.verification_status!=null&&!z?c(te?.verification_status,e.paymentAccountId,"update_account",y(g),g):M(O,y(g),g),b(void 0),W(!1)},[w,g,e.paymentAccountId,e.providerAccountId,m,z,c,M]),s=r.useCallback((O,Z)=>{O!=null&&(w.trackConnectBankFailure(g,O.error_code+" "+O.error_message,"Settings"),O.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&e.paymentAccountId!=null&&c("verification_failed",e.paymentAccountId,"update_account",y(g),g),console.log("Plaid Connection Error",O,Z)),b(void 0),W(!1)},[w,g,e.paymentAccountId,c]),{open:j,ready:Q}=Te({token:A,onSuccess:E,onExit:s});r.useEffect(()=>{u.fetchStatus.fetchState==="Completed"&&u.linkToken!=null&&u.linkToken!==A&&H(u.linkToken)},[u.fetchStatus.fetchState,u.linkToken,A]),r.useEffect(()=>{v&&j()},[v,j]),r.useEffect(()=>{(d==="In-Progress"&&o.updateStatus.fetchState==="Completed"||S==="In-Progress"&&l.updateStatus.fetchState==="Completed")&&(J.isVerifiedStatusCode(p??"")||(P("link_account",y(g)),C(y(g),g)))},[o.updateStatus.fetchState,C,P,e?.providerVerificationStatus?.code,e?.paymentAccountId,d,S,l.updateStatus.fetchState,p,g]),r.useEffect(()=>{(J.isVerifiedStatusCode(p??"")||p==="verification_failed")&&!v&&m!=null&&u.linkToken===A&&u.fetchStatus.fetchState==="Completed"&&Q&&W(!0)},[Q,A,u.fetchStatus.fetchState,u.linkToken,p,m,v]);const Y=()=>{w.trackConnectBankGetBalance(g,"Settings"),b("update_account"),P("update_account",y(g),e.paymentAccountId)},ee=h.find(O=>O.accountId===e.zeniAccountId);return t.jsxs(kn,{children:[V===!0?_e.createPortal(t.jsx(Pe,{connectedAccountProvider:R,action:{onBackClick:()=>U(!1)}}),document.body):null,t.jsxs(bn,{children:[t.jsx($n,{children:`${me.otherAccount.title} ${me.otherAccount.subTitleSmall}`}),t.jsx(He,{moreIconType:"plain",options:[{label:me.otherAccount.remove,value:"remove"}],customStyleConfig:{valueContainer:()=>({height:i.sp3,".more-icon":{width:i.sp3,height:i.sp3,color:f.colors.primary}}),container:()=>({marginLeft:i.sp0,position:"relative"}),control:()=>({background:"transparent"}),menu:()=>({position:"absolute",right:0,width:"158px",border:`1px solid ${f.colors.grey3}`,boxShadow:`${i.sp0} 1px 2px ${i.sp0} ${ie.boxShadowElevation}`}),option:()=>({color:f.colors.important,":hover":{color:f.colors.important,backgroundColor:f.colors.background}})},menuPlacement:"bottom",onOptionSelection:O=>{O==="remove"&&_(e.paymentAccountId)},valueToIcon:yn})]}),t.jsxs(Cn,{children:[t.jsxs(Ln,{children:[t.jsx(En,{children:t.jsx(Fn,{children:e.institutionDetails.institutionName})}),t.jsxs(Rn,{children:[t.jsx(On,{children:e.accountSubType?.name}),t.jsx(Bn,{children:e.maskedAccountNumber}),t.jsx(Tn,{children:$!=null?t.jsx(ge,{style:{width:"max-content",padding:0},tagTitle:$.name,textColor:we($.code)}):null}),z&&t.jsx(Ie,{productType:"other_connection",isUpdateLinkClicked:m==="update_account",isLoginRequired:z,isPendingVerification:!1,fetchAndUpdateStatues:{fetchStatus:l.fetchStatus,updateStatus:l.updateStatus,linkFetchStatus:o.fetchStatus,linkUpdateStatus:o.updateStatus,prevFetchState:L,prevUpdateState:S},onUpdateLinkTokenClick:Y,onChaseInfoClick:a})]})]}),t.jsxs(_n,{children:[t.jsx(Pn,{className:"balanceLabel",children:Se("0,0.[00]",e.balances?.available)}),e.balances?.lastRefreshTime?t.jsx(In,{className:"balanceLabel",children:xe(e.balances?.lastRefreshTime)}):q?.fetchState==="In-Progress"?t.jsx(se,{size:"ExtraSmall",start:!0}):null]})]}),t.jsxs(An,{children:[t.jsx(jn,{children:me.bankConnectionHeader.linkAccount}),t.jsx(zn,{children:ee?.accountName??xn})]})]})},kn=n.div`
233
+ `,{common:{settings:me,strings:{empty:xn}}}=re.getLocalizedStrings(),yn=()=>null,vn=({paymentAccount:e,bankAccountList:h,balanceFetchStatus:q,connectedAccountProvider:R,onRemoveConnection:_,onFetchLinkTokenClick:P,onEstablishConnectionClick:M,onEstablishConnectionSuccess:C,onUpdatePaymentAccountStatus:c})=>{const f=ve(),w=ze().analytics,[V,U]=r.useState(!1),a=()=>{U(!0)},o=e.plaidConnectionDetails.link_account,l=e.plaidConnectionDetails.update_account,[m,b]=r.useState(void 0),u=m==="update_account"?l:o,[A,H]=r.useState(u.linkToken??null),[v,W]=r.useState(!1),d=G(o.updateStatus.fetchState),S=G(l.updateStatus.fetchState),L=G(l.fetchStatus.fetchState),$=e?.providerVerificationStatus,z=e?.isLoginRequired??!1,g="other_connection",p=$?.code,E=r.useCallback((O,K)=>{w.trackConnectBankSuccess(g,"Settings");const te=K.accounts.find(X=>X.id===e.providerAccountId)??K.accounts[0];e.paymentAccountId!=null&&m==="update_account"&&te?.verification_status!=null&&!z?c(te?.verification_status,e.paymentAccountId,"update_account",y(g),g):M(O,y(g),g),b(void 0),W(!1)},[w,g,e.paymentAccountId,e.providerAccountId,m,z,c,M]),s=r.useCallback((O,K)=>{O!=null&&(w.trackConnectBankFailure(g,O.error_code+" "+O.error_message,"Settings"),O.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&e.paymentAccountId!=null&&c("verification_failed",e.paymentAccountId,"update_account",y(g),g),console.log("Plaid Connection Error",O,K)),b(void 0),W(!1)},[w,g,e.paymentAccountId,c]),{open:j,ready:Y}=Te({token:A,onSuccess:E,onExit:s});r.useEffect(()=>{u.fetchStatus.fetchState==="Completed"&&u.linkToken!=null&&u.linkToken!==A&&H(u.linkToken)},[u.fetchStatus.fetchState,u.linkToken,A]),r.useEffect(()=>{v&&j()},[v,j]),r.useEffect(()=>{(d==="In-Progress"&&o.updateStatus.fetchState==="Completed"||S==="In-Progress"&&l.updateStatus.fetchState==="Completed")&&(J.isVerifiedStatusCode(p??"")||(P("link_account",y(g)),C(y(g),g)))},[o.updateStatus.fetchState,C,P,e?.providerVerificationStatus?.code,e?.paymentAccountId,d,S,l.updateStatus.fetchState,p,g]),r.useEffect(()=>{(J.isVerifiedStatusCode(p??"")||p==="verification_failed")&&!v&&m!=null&&u.linkToken===A&&u.fetchStatus.fetchState==="Completed"&&Y&&W(!0)},[Y,A,u.fetchStatus.fetchState,u.linkToken,p,m,v]);const Q=()=>{w.trackConnectBankGetBalance(g,"Settings"),b("update_account"),P("update_account",y(g),e.paymentAccountId)},ee=h.find(O=>O.accountId===e.zeniAccountId);return t.jsxs(kn,{children:[V===!0?_e.createPortal(t.jsx(Pe,{connectedAccountProvider:R,action:{onBackClick:()=>U(!1)}}),document.body):null,t.jsxs(bn,{children:[t.jsx($n,{children:`${me.otherAccount.title} ${me.otherAccount.subTitleSmall}`}),t.jsx(He,{moreIconType:"plain",options:[{label:me.otherAccount.remove,value:"remove"}],customStyleConfig:{valueContainer:()=>({height:i.sp3,".more-icon":{width:i.sp3,height:i.sp3,color:f.colors.primary}}),container:()=>({marginLeft:i.sp0,position:"relative"}),control:()=>({background:"transparent"}),menu:()=>({position:"absolute",right:0,width:"158px",border:`1px solid ${f.colors.grey3}`,boxShadow:`${i.sp0} 1px 2px ${i.sp0} ${ie.boxShadowElevation}`}),option:()=>({color:f.colors.important,":hover":{color:f.colors.important,backgroundColor:f.colors.background}})},menuPlacement:"bottom",onOptionSelection:O=>{O==="remove"&&_(e.paymentAccountId)},valueToIcon:yn})]}),t.jsxs(Cn,{children:[t.jsxs(Ln,{children:[t.jsx(En,{children:t.jsx(Fn,{children:e.institutionDetails.institutionName})}),t.jsxs(Rn,{children:[t.jsx(On,{children:e.accountSubType?.name}),t.jsx(Bn,{children:e.maskedAccountNumber}),t.jsx(Tn,{children:$!=null?t.jsx(ge,{style:{width:"max-content",padding:0},tagTitle:$.name,textColor:we($.code)}):null}),z&&t.jsx(Ie,{productType:"other_connection",isUpdateLinkClicked:m==="update_account",isLoginRequired:z,isPendingVerification:!1,fetchAndUpdateStatues:{fetchStatus:l.fetchStatus,updateStatus:l.updateStatus,linkFetchStatus:o.fetchStatus,linkUpdateStatus:o.updateStatus,prevFetchState:L,prevUpdateState:S},onUpdateLinkTokenClick:Q,onChaseInfoClick:a})]})]}),t.jsxs(_n,{children:[t.jsx(Pn,{className:"balanceLabel",children:Se("0,0.[00]",e.balances?.available)}),e.balances?.lastRefreshTime?t.jsx(In,{className:"balanceLabel",children:xe(e.balances?.lastRefreshTime)}):q?.fetchState==="In-Progress"?t.jsx(se,{size:"ExtraSmall",start:!0}):null]})]}),t.jsxs(An,{children:[t.jsx(jn,{children:me.bankConnectionHeader.linkAccount}),t.jsx(zn,{children:ee?.accountName??xn})]})]})},kn=n.div`
234
234
  display: flex;
235
235
  flex-direction: column;
236
236
  padding: ${i.sp3};
@@ -291,20 +291,20 @@ import{u as ve,e as je,a as Ke,ca as Qe,j as t,aX as Ye,M as re,o as i,m as se,b
291
291
  align-items: center;
292
292
  flex-wrap: wrap;
293
293
  gap: ${i.sp2};
294
- `,{settings:{bankConnectionListHeader:Ae,title:Mn,infoText:Vn}}=re.getLocalizedStrings().common,ye={pageContentPadding:new I(k[4],k[8]),subtitleSectionWidth:new I(343,580,1200),subTitleBottomMargin:new I(k[0],k[5])},Un={qboLinkAcc:new ot("smallRegular","standardRegular")},Wn="bankConnectionsSettingsPage",ce="bankAccountSection",le="primaryAccountSection",Dn="bill_pay",Nn="reimbursement",qn="zeni_accounts",Hn="charge_cards",Jn="zeni_treasury",Me=e=>t.jsx(Kn,{children:N.map(h=>t.jsx(Qn,{actualDataValue:h.value,wrapperWidth:h.width,windowSize:e,children:t.jsx(Yn,{children:h.value})},h.value))}),bi=({bankSetupView:e,connectedAccountProvider:h,onBackClick:q,onUpdateAccountClick:R,onFetchLinkTokenClick:_,onUpdatePaymentAccountStatus:P,onUpdatePaymentAccountLoginStatus:M,onEstablishConnectionClick:C,onEstablishConnectionSuccess:c,onClickMenuIcon:f,onUpdatePrimaryFundingAccount:w,onRemoveConnection:V})=>{const U=ve(),a=je(),{allFundingAccounts:o,primaryConnection:l}=e,m=Ke({mode:"all",reValidateMode:"onChange",defaultValues:We(e),values:We(e)}),b=m.handleSubmit(d=>{}),u=async(d,S)=>{const L=d.split("."),$=L[0],z=L[1],g=l.find(p=>p.productType===$);if($!=null&&z!=null){const p=S[$][z];if(z==="primaryAccountSection"){const E=o.find(s=>s.id===p.selectedOption)?.accType;p.selectedOption!=null&&E!=null&&w(p.selectedOption,y($),E)}else if(z==="bankAccountSection"&&g!=null&&g.primaryFundingAccount!=null&&p.selectedOption!=null){const E=g.primaryFundingAccount?.id,s=g.primaryFundingAccount?.accType;E!=null&&s!=null&&R(p.selectedOption,E,$,y($),s)}}};r.useEffect(()=>{const d=m.watch((S,{name:L})=>{L!=null&&S!=null&&Qe(()=>u(L,S))});return()=>{d.unsubscribe()}});const A=e.fetchState==="In-Progress"||e.fetchState==="Not-Started",H=e.fetchState==="Completed"&&e.allFundingAccounts.length===0,v=a==="small"?vn:Qt,W=()=>A?t.jsx(ti,{children:t.jsx(se,{size:"ExtraLarge",start:!0})}):H?t.jsx(Xe,{message:"No bank connections added."}):t.jsxs(Gn,{windowSize:a,children:[t.jsx(Ue,{children:Ae.primary}),a!=="small"?Me(a):null,t.jsx(et,{...m,children:t.jsx("form",{id:li(Wn),onSubmit:b,children:t.jsx(ni,{windowSize:a,children:e.primaryConnection.map(d=>d!=null?t.jsx(Ve,{windowSize:a,children:t.jsx(Ct,{allBankAccounts:e.allBankAccounts,setupView:d,connectedAccountProvider:h,onFetchLinkTokenClick:_,onUpdatePaymentAccountStatus:P,onUpdatePaymentAccountLoginStatus:M,onEstablishConnectionClick:C,onEstablishConnectionSuccess:c})},d.productType):null)})})}),e.otherPaymentAccounts.length>0?t.jsxs(Xn,{children:[t.jsx(Ue,{children:Ae.other}),t.jsx(ai,{children:t.jsx(tt,{display:"flex",placement:"right",maxWidth:"340px",title:Ae.otherToolTip,style:{padding:`12px ${i.sp3}`},children:t.jsx(ci,{})})})]}):null,a!=="small"&&e.otherPaymentAccounts.length>0?Me(a):null,e.otherPaymentAccounts.map(d=>{const S=o.find(L=>L.id===d.paymentAccountId)?.balanceFetchStatus;return t.jsx(Ve,{windowSize:a,children:t.jsx(v,{paymentAccount:d,bankAccountList:e.allBankAccounts,balanceFetchStatus:S,connectedAccountProvider:h,onRemoveConnection:V,onFetchLinkTokenClick:_,onEstablishConnectionClick:C,onUpdatePaymentAccountStatus:P,onEstablishConnectionSuccess:c})},d.paymentAccountId)})]});return t.jsxs(Zn,{children:[t.jsx(Ye,{source:"BankConnectionsSettingsPage",title:Mn.bankConnections,backgroundColor:U.colors.grey4,style:{zIndex:3},onBackClick:q,showBackButton:!1,showMenuIcon:a==="medium-compact"||a==="small",onClickMenuIcon:f}),t.jsxs(ei,{windowSize:a,children:[t.jsx(ii,{windowSize:a,children:t.jsx(oi,{windowSize:a,children:Vn.bankConnections})}),W()]})]})},Gn=n.div`
294
+ `,{settings:{bankConnectionListHeader:Ae,title:Mn,infoText:Vn}}=re.getLocalizedStrings().common,ye={pageContentPadding:new I(k[4],k[8]),subtitleSectionWidth:new I(343,580,1200),subTitleBottomMargin:new I(k[0],k[5])},Un={qboLinkAcc:new ot("smallRegular","standardRegular")},Wn="bankConnectionsSettingsPage",ce="bankAccountSection",le="primaryAccountSection",Dn="bill_pay",Nn="reimbursement",qn="zeni_accounts",Hn="charge_cards",Jn="zeni_treasury",Me=e=>t.jsx(Zn,{children:N.map(h=>t.jsx(Yn,{actualDataValue:h.value,wrapperWidth:h.width,windowSize:e,children:t.jsx(Qn,{children:h.value})},h.value))}),bi=({bankSetupView:e,connectedAccountProvider:h,onBackClick:q,onUpdateAccountClick:R,onFetchLinkTokenClick:_,onUpdatePaymentAccountStatus:P,onUpdatePaymentAccountLoginStatus:M,onEstablishConnectionClick:C,onEstablishConnectionSuccess:c,onClickMenuIcon:f,onUpdatePrimaryFundingAccount:w,onRemoveConnection:V})=>{const U=ve(),a=je(),{allFundingAccounts:o,primaryConnection:l}=e,m=Ze({mode:"all",reValidateMode:"onChange",defaultValues:We(e),values:We(e)}),b=m.handleSubmit(d=>{}),u=async(d,S)=>{const L=d.split("."),$=L[0],z=L[1],g=l.find(p=>p.productType===$);if($!=null&&z!=null){const p=S[$][z];if(z==="primaryAccountSection"){const E=o.find(s=>s.id===p.selectedOption)?.accType;p.selectedOption!=null&&E!=null&&w(p.selectedOption,y($),E)}else if(z==="bankAccountSection"&&g!=null&&g.primaryFundingAccount!=null&&p.selectedOption!=null){const E=g.primaryFundingAccount?.id,s=g.primaryFundingAccount?.accType;E!=null&&s!=null&&R(p.selectedOption,E,$,y($),s)}}};r.useEffect(()=>{const d=m.watch((S,{name:L})=>{L!=null&&S!=null&&Ye(()=>u(L,S))});return()=>{d.unsubscribe()}});const A=e.fetchState==="In-Progress"||e.fetchState==="Not-Started",H=e.fetchState==="Completed"&&e.allFundingAccounts.length===0,v=a==="small"?vn:Yt,W=()=>A?t.jsx(ti,{children:t.jsx(se,{size:"ExtraLarge",start:!0})}):H?t.jsx(Xe,{message:"No bank connections added."}):t.jsxs(Gn,{windowSize:a,children:[t.jsx(Ue,{children:Ae.primary}),a!=="small"?Me(a):null,t.jsx(et,{...m,children:t.jsx("form",{id:li(Wn),onSubmit:b,children:t.jsx(ni,{windowSize:a,children:e.primaryConnection.map(d=>d!=null?t.jsx(Ve,{windowSize:a,children:t.jsx(Ct,{allBankAccounts:e.allBankAccounts,setupView:d,connectedAccountProvider:h,onFetchLinkTokenClick:_,onUpdatePaymentAccountStatus:P,onUpdatePaymentAccountLoginStatus:M,onEstablishConnectionClick:C,onEstablishConnectionSuccess:c})},d.productType):null)})})}),e.otherPaymentAccounts.length>0?t.jsxs(Xn,{children:[t.jsx(Ue,{children:Ae.other}),t.jsx(ai,{children:t.jsx(tt,{display:"flex",placement:"right",maxWidth:"340px",title:Ae.otherToolTip,style:{padding:`12px ${i.sp3}`},children:t.jsx(ci,{})})})]}):null,a!=="small"&&e.otherPaymentAccounts.length>0?Me(a):null,e.otherPaymentAccounts.map(d=>{const S=o.find(L=>L.id===d.paymentAccountId)?.balanceFetchStatus;return t.jsx(Ve,{windowSize:a,children:t.jsx(v,{paymentAccount:d,bankAccountList:e.allBankAccounts,balanceFetchStatus:S,connectedAccountProvider:h,onRemoveConnection:V,onFetchLinkTokenClick:_,onEstablishConnectionClick:C,onUpdatePaymentAccountStatus:P,onEstablishConnectionSuccess:c})},d.paymentAccountId)})]});return t.jsxs(Kn,{children:[t.jsx(Qe,{source:"BankConnectionsSettingsPage",title:Mn.bankConnections,backgroundColor:U.colors.grey4,style:{zIndex:3},onBackClick:q,showBackButton:!1,showMenuIcon:a==="medium-compact"||a==="small",onClickMenuIcon:f}),t.jsxs(ei,{windowSize:a,children:[t.jsx(ii,{windowSize:a,children:t.jsx(oi,{windowSize:a,children:Vn.bankConnections})}),W()]})]})},Gn=n.div`
295
295
  display: flex;
296
296
  flex-direction: column;
297
297
  width: 100%;
298
298
  padding-left: ${e=>ye.pageContentPadding.valuePx(e.windowSize)};
299
299
  padding-right: ${e=>ye.pageContentPadding.valuePx(e.windowSize)};
300
- `,Zn=n.div`
300
+ `,Kn=n.div`
301
301
  display: flex;
302
302
  min-height: 100%;
303
303
  flex-direction: column;
304
304
  row-gap: ${i.sp3};
305
305
  width: 100%;
306
306
  background-color: ${e=>e.theme.colors.grey4};
307
- `,Kn=n(F)`
307
+ `,Zn=n(F)`
308
308
  top: ${i.sp0};
309
309
  left: ${i.sp0};
310
310
  min-height: ${i.sp8};
@@ -317,7 +317,7 @@ import{u as ve,e as je,a as Ke,ca as Qe,j as t,aX as Ye,M as re,o as i,m as se,b
317
317
  background-color: ${e=>e.theme.colors.grey4};
318
318
  justify-content: space-between;
319
319
  position: sticky;
320
- `,Qn=n.div`
320
+ `,Yn=n.div`
321
321
  color: ${e=>e.theme.colors.grey1};
322
322
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
323
323
  max-width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
@@ -331,7 +331,7 @@ import{u as ve,e as je,a as Ke,ca as Qe,j as t,aX as Ye,M as re,o as i,m as se,b
331
331
  padding-left: ${i.sp0};
332
332
  box-sizing: border-box;
333
333
  overflow: hidden;
334
- `,Yn=n(F)`
334
+ `,Qn=n(F)`
335
335
  display: flex;
336
336
  gap: 5px;
337
337
  `,Xn=n.div`
@@ -1,5 +1,5 @@
1
- import{e as Nn,Y as On,u as Fn,fO as Ln,fP as En,fQ as Wn,fR as Zn,bJ as _n,a2 as Kn,M as Vn,C as u,j as t,l as E,cM as it,cN as Un,o as a,cO as Yn,cP as Gn,_ as b,cQ as Xn,a0 as Ae,cR as Hn,aX as lt,aK as ot,dt as rt,bV as st,bX as dt,bY as ct,fS as Qn,fT as qn,fU as Jn,fV as ea,cW as $,cX as j,cY as I,fW as A,cV as ta,v as pt,f as ie,cZ as Rt,c_ as na,c$ as aa,d0 as ia,fX as la,fY as oa,a4 as ra,q as mt,bp as Te,fZ as sa,f_ as O,r,h as da,by as ca,f$ as pa,a3 as ma,g0 as ua,g1 as ut,d4 as yt,J as ya,cB as ha,bO as ba,am as xa,ao as ga,T as fa,br as zt,g2 as wa,w as Mt,ac as Ta,ak as va,aP as Da,eL as $a,y as ja}from"./index-tsOp9BQk.js";import{b as p,n as i}from"./vendor-rkTZJa59.js";import{_ as Ia}from"./liveblocks-CP09Cz-7.js";import{o as Aa,t as ka}from"./LowBalancePopup-C5KvkK3M-BJ53QfOd.js";import"./mui-C42whWwM.js";import"./analytics-B3n5JGPc.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./crypto-BDNqpTKX.js";const Sa=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",...e},p.createElement("g",{id:"Layer_1"},p.createElement("path",{fill:"none",stroke:"#757d7e",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",d:"M4.4,30.6l6-5.9c1,.6,2.1.9,3.3,1,1.1.1,2.3,0,3.4-.4,1.1-.4,2.1-.9,2.9-1.7.9-.8,1.5-1.7,2-2.7,0-.1,0-.2,0-.4,0-.1,0-.2-.1-.3,0-.1-.2-.2-.3-.2-.1,0-.2,0-.4,0h-4.6c-.8,0-1.6-.3-2.1-.9-.6-.6-.9-1.3-.9-2.1s.3-1.5.9-2.1c.6-.6,1.3-.9,2.1-.9h3.8c.1,0,.3,0,.4-.1s.2-.2.3-.3c0-.1,0-.3,0-.4,0-.1,0-.3-.1-.4-1.3-1.6-3.1-2.7-5.2-3.1-2.1-.4-4.2,0-5.9,1.2-1.8,1.1-3,2.8-3.5,4.8s-.2,4.1.8,5.9l-6.1,5.7,3.3,3.3Z"})),p.createElement("g",{id:"Layer_2"},p.createElement("g",null,p.createElement("path",{fill:"#c27419",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M31,8c0,1.9-.7,3.8-2.1,5.1-1.3,1.4-3.2,2.2-5.1,2.2-.9,0-1.9-.2-2.7-.5-.9-.3-1.7-.9-2.3-1.5-.7-.7-1.2-1.4-1.6-2.3-.4-.9-.6-1.8-.6-2.7,0-1.9.7-3.8,2.1-5.1,1.3-1.4,3.2-2.2,5.1-2.2.9,0,1.9.2,2.7.5.9.3,1.7.9,2.3,1.5.7.7,1.2,1.4,1.6,2.3.4.9.6,1.8.6,2.7Z"}),p.createElement("path",{fill:"none",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M23.8,9.4v-4.6"}),p.createElement("path",{fill:"none",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M23.8,11.4s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.1,0,0,0,0,.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0-.1,0,0,0,0-.1,0h0"})))),Ca={formTitle:new ya("h6Medium","h5Medium")},m={containerPaddingLeft:new u(r[3],r[6],r[6]),containerPaddingRight:new u(r[3],r[6],r[8]),marginBottom:new u(r[3],r[3]),labelWidth:new u(120,160,160),formTitlePaddingLeftRight:new u(30,0),marginTop:new u(r[1],0),rightIconsGap:new u(r[4],r[5]),closeContainerMarginTop:new u(r[1],0),formTitleMarginTopBottom:new u(0,0),footerButtonWidth:new u(120,120,120,165,165),right:new u(r[3],r[0]),actionsContainerRight:new u(r[0],r[3],r[3],r[6],r[6]),otherActionsIconContainerMarginLeft:new u(r[5],r[4],r[4],r[5]),otherActionsContainerBottom:new u(58,44),iconContainerMarginTop:new u(2,r[1]),recurringSchedulePaddingLeft:new u(r[2],0),paddingRight:new u(r[2],r[3]),labelMarginRight:new u(r[0],r[3]),textPadding:new u(r[0],r[3]),additionalTextMarginTop:new u(-4,0),refundPopupWidth:new u(300,420,420),drawerSectionPaddingLeftRight:new u(r[4],r[5]),infoLabelPaddingRight:new u(r[3],r[3]),infoLabelMarginTop:new u(r[1],r[0]),navBarHeight:new u(0,0,r[8]),navBarContainerWidth:new u(100,58)},{dateFormat:Pa,common:{noText:C,strings:{empty:d},currency:ht,via:Ba,more:Ra,edit:za},spendManagement:{billPay:{billDetails:n,billsByTabs:ke,bulkActions:bt,vendorCreation:xt,insufficientFunds:Nt}},collaboration:{threads:{placeholder:gt,tooltip:ft,title:{comments:Ma}}}}=Vn.getLocalizedStrings(),ve=Pa.visual.MMMDCommaYYYYformat,$i=({billDetails:e,currentTenant:g,showApproveRejectBtns:x,isShowDeletedBillsEnabled:_,signedInUser:le,isAdmin:Ot,isRealTimeApprovalEnabled:Ft,isInternationalPaymentShaVsOurEnabled:Lt,hasZeniAssistAccess:Et,analytics:z,showMarkAsPaidButtonToCreator:K,showMarkAsPaidButtonToApprover:Wt,isBillPayCommentingEnabled:Se,isZeniUser:Zt,showBackButton:Ce=!0,isDetectInsufficientFundsEnabled:_t,redirectToEditableBillScreen:Kt,redirectToBillsScreen:X,discardBillDetailsFromLocalStore:Pe,deleteBill:Vt,cancelAndDeleteBill:Be,approveOrRejectBill:Re,onAddNewRule:Ut,onAttachmentClick:ze,saveBillDetails:Yt,discardOutsideZeniPaymentData:Gt,onBackClick:Me,updateEditRealTimeApproverClicked:Xt,onSaveRealTimeApprovals:Ht,onRetryPaymentClick:Qt,onRefundPaymentClick:qt})=>{const l=Nn(),o=On(),Ne=Fn(),[Jt,V]=p.useState(!1),[Oe,oe]=p.useState(!1),[re,se]=p.useState(!1),[Fe,de]=p.useState(!1),[en,ce]=p.useState(!1),[Le,H]=p.useState(!1),y=e.transactionDetails?.id,tn=Zt?Ln:En,{requestToOpenThread:pe,setRequestToOpenThread:Ee,setOpenThread:Q}=p.useContext(tn),[nn,U]=p.useState(!1),w={application:"dashboard",companyId:o.currentTenant?.companyId,tab:"bill",entityId:y,isGlobalComment:!1},{threads:Y,isLoading:P}=Wn(w,"both",!1),f=Se&&y!=null,We=p.useMemo(()=>y==null?[]:Y.filter(c=>c.resolved===!1&&!c.id.includes(Zn)),[Y,y]).length,T=`dashboard_${o.currentTenant?.companyId}`,an=p.useCallback((c,h)=>{Q(h),U(!1)},[Q,U]);p.useEffect(()=>{pe?.threadId!=null&&Y.length>0&&!P&&(Q(pe.threadId),Ee(null))},[pe,Y,P,Q,Ee]),_n({componentName:"bill.details"});const[N,q]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[Ze,_e]=p.useState("approved"),[ln,Ke]=p.useState(!1),[on,Ve]=p.useState(!1),[Ue,Ye]=p.useState(!1),Ge=()=>Ke(!1),rn=()=>Ke(!0),Xe=Kn(e.zeniAssist?.refundStatus.fetchState),J=p.useCallback(()=>{X()},[X]);p.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed"||e.billSaveStatus==="Completed")&&(Pe(),X())},[e,X,Pe]),p.useEffect(()=>{Xe==="In-Progress"&&(e.zeniAssist?.refundStatus.fetchState==="Completed"||e.zeniAssist?.refundStatus.fetchState==="Error")&&(se(!1),J())},[Xe,e.zeniAssist?.refundStatus,J]);const k=e.transactionDetails?.billPayInfo.stage,ee=e.transactionDetails?.billPayInfo.billStatus,G=e.transactionDetails?.billPayInfo.billPaymentStatus,sn=e.transactionDetails?.billPayInfo.billPaymentRefundStatus,me=k?.code==="paid",v=me?k:ee?.code=="approved"&&G?.code?G:ee,S=Na(v,e.transactionDetails),F=e.transactionDetails?.billPayInfo.isRefundInitiated===!0?sn:G?.code!=null&&(ee?.code=="approved"||G.code==="mark_as_paid")?G:ee,ue=e.transactionDetails?.vendor?.name,M=e.isRecurring,He=()=>{e.transactionDetails?.id!=null&&Kt(e.transactionDetails?.id??"")},dn=()=>{q({title:M?n.recurringBill.deleteRecurringTitle:n.deleteBillTitle,description:M?n.recurringBill.deleteRecurringAlertText:n.deleteAlertDescription,primaryButtonText:n.delete,secondaryButtonText:n.cancel}),V(!0)},cn=()=>{q({title:n.cancelBillTitle,description:n.cancelAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),V(!0)},pn=()=>{q({title:M?n.recurringBill.cancelAndDeleteRecurringTitle:n.cancelAndDeleteBillTitle,description:M?n.recurringBill.cancelAndDeleteRecurringAlertText:n.cancelAndDeleteAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),V(!0)},mn=()=>{z.trackRefundClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),q({title:n.zeniAssist.refundTitle,description:n.zeniAssist.refundDescription,primaryButtonText:n.zeniAssist.proceed,secondaryButtonText:n.cancel}),se(!0)},un={onOkClick:()=>{V(!1),N.primaryButtonText===n.delete?Vt?.(e.isRecurring):N.title===n.cancelBillTitle?Be?.(e.isRecurring):N.title===n.cancelAndDeleteBillTitle||N.title===n.recurringBill.cancelAndDeleteRecurringTitle?Be?.(e.isRecurring,!0):N.primaryButtonText===n.zeniAssist.proceed&&(z.trackRefundConfirmClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),qt())},onCancelClick:()=>{V(!1),se(!1)}},yn={onOkClick:c=>{ce(!1),Re({billId:e.transactionDetails?.id??"",type:"rejected",description:c})},onCancelClick:()=>{ce(!1)}},hn=()=>{const[c]=Ta("ZeniAssist");return c!=null?t.jsx(va,{"data-testid":b("bill-details-zeni-assist-icon",y),onClick:()=>{de(!Fe),z.trackZeniAssistClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"")},style:{width:`${a.sp5}`,height:`${a.sp5}`,marginBottom:`${a.sp2}`},animationData:c,loop:!0,play:!0,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}):null},te={invoiceNumber:e.transactionDetails?.documentId??"",invoiceDate:e.transactionDetails?.date,billDueDate:e.transactionDetails?.dueDate,memo:e.transactionDetails?.memo,currencyCode:e.vendorCurrency??ht.currencyCode},ye=e.transactionDetails?.lines?.map((c,h)=>{const B=c;return{lineIndex:h,lineId:B.id,account:B.account,class:B.class,amount:B.amount.amount,billable:B.billable,customer:B.customer,lineDescription:B.lineDescription,recipientAmount:B.recipientAmount?.amount}})??[],bn=e.transactionDetails?.recipientTotalAmount.amount??0,he=e.transactionDetails?.recipientTotalAmount,s={paymentType:e.paymentMethodType,paymentDate:e.transactionDetails?.billPayInfo.paymentDate,internationalTransferFeeBearerPaymentMethod:e.transactionDetails?.billPayInfo.internationalTransferFeeBearerPaymentMethod,paymentToBankAccount:e.bankAccount,paymentToPI:e.paymentInstrument},D=m.labelWidth.value(l),xn=c=>c==="billable"||c==="has_been_billed"?n.yes:n.no,gn=s.paymentToBankAccount?.bankAccountNumber?s.paymentToBankAccount?.bankAccountNumber?.slice(s.paymentToBankAccount?.bankAccountNumber?.length-4):s.paymentType?.method?.includes("international")&&s.paymentToBankAccount?.bankAccountIban?s.paymentToBankAccount?.bankAccountIban?.slice(s.paymentToBankAccount?.bankAccountIban.length-4):"",fn=s.paymentToBankAccount?.bankAccountName!=null&&s.paymentToBankAccount?.bankAccountName!=""?s.paymentToBankAccount?.bankAccountName:`${e.transactionDetails?.vendor?.name} - ${s.paymentToBankAccount?.bankName} XXXX${gn}`,wn=e.transactionDetails?.billPayInfo?.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${n.magicLink.collectFrom} ${e.transactionDetails?.billPayInfo?.toAccountVendorEmail}`,t.jsx(ci,{windowSize:l,children:t.jsx(di,{})})]}):void 0,Qe=e.transactionDetails?.date!=null&&e.transactionDetails.bookCloseDate!=null&&e.transactionDetails.date.isBefore(e.transactionDetails.bookCloseDate),Tn=()=>`${xt.achDetails.bankRoutingNumber} ${s?.paymentToBankAccount?.bankRoutingNumberAch}, ${s?.paymentToBankAccount?.bankName}
2
- ${xt.achDetails.bankAccountNumber} ${s?.paymentToBankAccount?.bankAccountNumber}`,ne=e.transactionDetails?.billPayInfo!=null?E.getActualPaymentDate(e.transactionDetails?.billPayInfo):void 0,vn=ne!=null&&e.paymentMethodType?.maxPeriod?.value!=null?E.zeniDate(E.getNextNthWorkingDay(ne?.toDate(),[0,6],e.paymentMethodType?.maxPeriod.value).toDateString()):void 0,qe=e.transactionDetails?.billPayInfo.expectedDepositDate??vn,Je=it(s?.paymentType?.method??"").replace("Same Day",""),Dn=(s?.paymentToBankAccount!=null||s?.paymentToPI)!=null?n.addedByZeni:e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact?t.jsx(Un,{paymentTypeLabel:Je,onClick:rn,style:{marginTop:`${l==="small"?a.sp2:a.sp0}`}}):void 0,$n=()=>s?.paymentToBankAccount==null&&s?.paymentToPI==null&&s?.paymentType?.method!=null&&e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact&&e.transactionDetails?.billPayInfo.paymentDate!=null?t.jsx(wa,{paymentType:s?.paymentType?.method,paymentDate:e.transactionDetails?.billPayInfo.paymentDate}):null,be=!(v?.code==="processing"||e.transactionDetails?.billPayInfo.isRefundInitiated===!0||e.transactionDetails?.billPayInfo.isRefundComplete===!0),xe=e.zeniAssist?.isEligibleForRetryIBT===!0||e.zeniAssist?.isEligibleForRetryOBP===!0,ge=e.zeniAssist?.isEligibleForRefund===!0,jn=e?.transactionDetails?.billPayInfo.billPaymentMethodType.code==="wire"&&e?.transactionDetails?.billPayInfo.billPaymentMethodType.subCode==="international",In=Et&&e.transactionDetails?.billPayInfo.billPaymentStatus.code!=null&&["failed","cancelled","returned"].includes(e.transactionDetails.billPayInfo.billPaymentStatus.code)&&(xe||ge)&&jn===!1,fe=xe||ge,An=e.transactionDetails?.billPayInfo.isRefundInitiated===!0&&e.transactionDetails?.billPayInfo.isRefundComplete===!1,we=v?.code,kn=!An&&(!Qe||v?.code==="processing"&&!M),Sn=!Qe,et=["small","medium-compact","medium-regular"].includes(l),ae=E.isBulkProcessing(e.transactionDetails?.bulkProcessingDetail?.type),L=E.isPaymentMethodOutsideZeni(e.paymentMethodType?.method),Cn=c=>{z.trackBillPayMarkAsPaidSubmit(c.paymentMode??"other",k?.code??"",v?.code??""),Yt(!0,Ue,c)},tt=()=>{Ve(!0),z.trackBillPayMarkAsPaid(k?.code??"",v?.code??"")},Pn=()=>{Ye(!0),tt()},Bn=()=>{Gt(),Ve(!1),Ue&&Ye(!1)},Rn=p.useMemo(()=>({companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,entityType:"bill.details",entityId:y??d,isGlobalComment:!1,application:"dashboard",tab:"bill",url:window.location.href}),[o.currentTenant,y]),W=_t&&e.transactionDetails?.totalAmountWithFeesInUSD!=null&&k?.code!=="paid"&&v?.code!=="failed"&&v?.code!=="processing"&&v?.code!=="cancelled"&&v?.code!=="returned"&&v?.code!=="rejected"?Yn(e.transactionDetails?.totalAmountWithFeesInUSD,e.withdrawFrom,s.paymentDate):void 0,nt=()=>{_e("approved"),Le===!0&&H(!1),W!=null&&z.trackLowBalanceAccountApprove(k?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",yt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),Re({billId:e.transactionDetails?.id??"",type:"approved"})},zn=()=>{_e("rejected"),W!=null&&z.trackLowBalanceAccountReject(k?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",yt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),ce(!0)},at=p.useRef(null);return t.jsxs(Ha,{windowSize:l,ref:at,children:[t.jsx(Gn,{anchor:"right",open:ln,onClose:Ge,transitionDuration:250,"data-testid":b("vendor-email-preview-drawer"),children:t.jsx(Xn,{companyName:Hn(g.company?.companyInfo),vendor:e.transactionDetails?.vendor?.name,paymentDate:s.paymentDate?.format(ve)??"",paymentType:Je,amount:Ae("0,0.[00]",he),isInvoiceAttached:!!e.transactionDetails?.attachments?.length,onClose:Ge})}),t.jsxs(ei,{windowSize:l,children:[t.jsx(ui,{windowSize:l,children:l==="small"?t.jsx(lt,{"data-testid":b("bill-detail-nav-bar-mobile"),title:t.jsxs(t.Fragment,{children:[ue,e.isRecurring?t.jsx(Ie,{width:a.sp4,height:a.sp4}):null]}),backgroundColor:Ne.colors.grey4,rightSideComponent:t.jsxs(jt,{windowSize:l,children:[f?t.jsxs(Pt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),U(!0),z.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(h=>rt(h)),void 0,void 0,"page icon")},children:[t.jsx(ot,{count:P?void 0:We,isLoading:P,style:{left:"12px"}}),t.jsx(Bt,{})]}):null,t.jsx(It,{onClick:()=>J(),"data-testid":b("bill-detail-nav-bar-small-close-button"),children:t.jsx($t,{})})]}),leftSideComponent:t.jsx(Dt,{windowSize:l,onClick:Me,"data-testid":b("bill-detail-nav-bar-small-back-button"),style:{visibility:`${Ce?"visible":"hidden"}`},children:t.jsx(vt,{})}),source:"BillDetailPage"}):t.jsx(lt,{"data-testid":b("bill-detail-nav-bar"),title:t.jsxs(t.Fragment,{children:[ue,e.isRecurring?t.jsx(Ie,{width:a.sp4,height:a.sp4}):null]}),rightSideComponent:t.jsxs(jt,{windowSize:l,children:[f?t.jsxs(Pt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),U(!0),z.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(h=>rt(h)),void 0,void 0,"page icon")},children:[t.jsx(ot,{count:P?void 0:We,isLoading:P,style:{left:"12px"}}),t.jsx(Bt,{})]}):null,t.jsx(It,{onClick:()=>J(),"data-testid":b("bill-detail-nav-bar-close-button"),children:t.jsx($t,{})})]}),leftSideComponent:t.jsx(Dt,{windowSize:l,onClick:Me,"data-testid":b("bill-detail-nav-bar-back-button"),style:{visibility:`${Ce?"visible":"hidden"}`},children:t.jsx(vt,{})}),enableTitleOnScroll:!0,scrollableContent:at,source:"BillDetailPage"})}),t.jsxs(ti,{windowSize:l,children:[Le?t.jsx(Aa,{withdrawFrom:e.withdrawFrom,paymentDate:e?.transactionDetails?.billPayInfo.paymentDate,onOkClick:nt,onCancelClick:()=>{H(!1),He()},onClickAway:()=>{H(!1)}}):null,on?t.jsx(ka,{onCancel:Bn,onProceedForMarkAsPaid:Cn,saveDetailsFetchState:e.billSaveStatus,paymentData:e.outsideZeniPaymentInfo}):null,Jt||re?t.jsx(st,{titleComponent:t.jsx(ct,{children:N.title}),descriptionComponent:t.jsx(dt,{children:N.description}),primaryButtonText:N.primaryButtonText,proceedButtonVariant:re?"primary":"danger",secondaryButtonText:N.secondaryButtonText,action:un,isEditPopup:!0,isLoading:e.zeniAssist?.refundStatus.fetchState==="In-Progress",children:re?Oa(l,e):null}):null,en?t.jsx(st,{titleComponent:t.jsx(ct,{children:n.rejectBillTitlePrefix+" "+(e.transactionDetails?.vendor?.name!=null?e.transactionDetails.vendor.name:"")}),descriptionComponent:t.jsx(dt,{children:n.rejectBillDescription}),primaryButtonText:n.send,secondaryButtonText:n.cancel,action:yn,isEditPopup:!0,isNotesIncluded:!0,notesPlaceholder:n.rejectBillReasonPlaceholder}):null,l!=="small"||S?t.jsxs(ai,{windowSize:l,children:[l!=="small"?t.jsxs(ii,{windowSize:l,children:[ue,e.isRecurring?t.jsx(Ie,{height:a.sp5,width:a.sp5}):null]}):null,_&&S!=null&&S.code==="deleted"?t.jsx(At,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):S?.value===ke.tabsById.overdue?t.jsx(At,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):null]}):null,F!=null&&F.code?l==="small"?t.jsx(Qn,{progressSectionObj:F,createDate:e.transactionDetails?.createTime,paymentDate:qe,scheduleDate:ne,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):t.jsx(qn,{progressSectionObj:F,createDate:e.transactionDetails?.createTime,paymentDate:qe,scheduleDate:ne,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):null,Ea(ae,e,W),t.jsx(Jn,{sectionId:ea,currentVendorOption:{defaultOptions:[]},billId:y,isBillPayCommentingEnabled:Se,isBillPaid:me,disableVendorActions:!0,vendor:e.transactionDetails?.vendor,prevBills:e.previousBills,onAttachmentClick:ze,isVendorRecommendationEnabled:!1,showVendorGptRecommendationText:!1}),s.paymentType?.method?.includes("ach"),t.jsxs($e,{children:[t.jsx(je,{children:n.whatForTitle}),t.jsxs(De,{children:[t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"invoiceNumber"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("invoiceNumber")}`},children:t.jsx(A,{label:{label:n.invoiceNumber,width:D},text:te.invoiceNumber??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"invoiceDate"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("invoiceDate")}`},children:t.jsx(A,{label:{label:n.invoiceDate,width:D},text:te.invoiceDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"billDueDate"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("billDueDate")}`},children:t.jsx(A,{label:{label:n.billDueDate,width:D},text:te.billDueDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"memo"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("memo")}`},children:t.jsx(A,{label:{label:n.memo,width:D},text:te.memo??C,style:{width:"auto"}})})]})]}),t.jsxs($e,{children:[t.jsx(ni,{windowSize:l,children:t.jsx(je,{children:n.lineItemsTitle})}),ye.length>0?ye.map((c,h)=>{const B=e?.transactionDetails?.lines?.find(Mn=>Mn.id===c.lineId)?.recipientAmount;return t.jsxs(Qa,{children:[ye.length>1?t.jsx(qa,{windowSize:l,children:t.jsx(Ja,{windowSize:l,children:`${n.line} # ${h+1}`})}):null,t.jsxs(De,{children:[t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.recipientAmount`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("recipientAmount",h)}`},children:t.jsx(A,{label:{label:n.amount,width:D},text:B!=null?Ae("0,0[.]00",B):C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.lineDescription`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("lineDescription",h)}`},children:t.jsx(A,{label:{label:n.description,width:D},text:c.lineDescription??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.account`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("account",h)}`},children:t.jsx(A,{label:{label:n.category,width:D},text:c.account?.accountName??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.class`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("class",h)}`},children:t.jsx(A,{label:{label:n.class,width:D},text:c.class?.className??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.billable`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("billable",h)}`},children:t.jsx(A,{label:{label:n.billable,width:D},text:c.billable!=null?xn(c.billable):C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.customer`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("customer",h)}`},children:t.jsx(A,{label:{label:n.customer,width:D},text:c.customer?.name??C,style:{width:"auto"}})})]})]},h)}):null]}),t.jsxs(li,{windowSize:l,children:[t.jsx(oi,{children:n.total}),t.jsx(ri,{children:he!=null?t.jsx(ta,{amount:he,integerStyles:pt.h6Medium.cssObject,decimalStyles:pt.standardMedium.cssObject}):C})]}),t.jsxs($e,{children:[t.jsx(je,{children:n.paymentDetailsTitle}),t.jsxs(De,{children:[L?null:t.jsxs(t.Fragment,{children:[t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"withdrawFrom"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("withdrawFrom")}`},children:t.jsx(A,{label:{label:n.withdrawFrom,width:D},text:e.withdrawFrom!=null?Rt(e.withdrawFrom,l):d,style:{width:"auto"},additionalInfoLabelStyles:{textAlign:"right",paddingRight:m.infoLabelPaddingRight.valuePx(l),marginTop:m.infoLabelMarginTop.valuePx(l),color:ie.brandColorGoldDark},additionalInfoLabel:W!=null&&k?.code==="pending_approval"?Nt.addMoney:W})}),t.jsx(R,{})]}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"paymentType"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("paymentType")}`},children:t.jsx(A,{additionalInfoLabel:s.paymentType?.method!=null&&s.paymentType.method.includes(E.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&Lt&&s.internationalTransferFeeBearerPaymentMethod!=null?t.jsx(Za,{children:na(s.internationalTransferFeeBearerPaymentMethod)}):void 0,label:{label:n.paymentMethod,width:D},text:L&&e.outsideZeniPaymentInfo!=null?La(e.outsideZeniPaymentInfo):it(s.paymentType?.method??""),style:{width:"auto"}})}),L?null:t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"paymentTo"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("paymentTo")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(A,{label:{label:n.paymentTo,width:D},text:s.paymentToBankAccount!=null?fn:s.paymentToPI!=null?s.paymentToPI.displayText:wn,style:{width:"auto"},showEyeIcon:s.paymentToBankAccount!=null&&!!s.paymentType?.method?.includes("ach"),showAdditionalInfoLabel:!!e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact||s.paymentType?.method?.includes("ach"),tooltipText:Tn(),additionalInfoLabel:t.jsx(Wa,{children:Dn})}),$n()]})})]}),L||e.isRecurring?t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"recurringPaymentType"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("recurringPaymentType")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(A,{label:{label:n.paymentType,width:D},labelStyles:{marginRight:m.labelMarginRight.valuePx(l)},style:{width:"auto"},text:ia(e.isRecurring,L,e.transactionDetails?.recurringBillInstance??1,e.recurringBillConfigDetail?.totalPaymentCycles??0),textStyles:{paddingLeft:m.textPadding.valuePx(l),paddingRight:m.textPadding.valuePx(l)},additionalInfoLabel:aa(l,e.isRecurring,L,e.recurringBillConfigDetail),additionalInfoLabelStyles:{paddingRight:m.paddingRight.valuePx(l),marginTop:m.additionalTextMarginTop.valuePx(l)}}),e.recurringBillInstances!=null&&e.recurringBillInstances.length>0?t.jsx(pi,{style:{paddingLeft:m.recurringSchedulePaddingLeft.valuePx(l)},children:t.jsx(la,{onAttachmentClick:ze,currencySymbol:e.transactionDetails?.recipientTotalAmount.currencySymbol??ht.currencySymbol,recurringBillInstances:e.recurringBillInstances})}):null]})})]}):null]})]}),e.transactionDetails&&e.transactionDetails.id&&t.jsx(oa,{amount:bn,activities:e.billActivities,stage:k?.code??"draft",onAddNewRule:Ut,entity:"bill_pay",realTimeApproval:{allApprovers:e.filteredApprovers,filteredAttributes:e.filteredAttributes,isRealTimeApproverEditMode:e.realTimeApproval.isEditMode,realTimeApprovalSaveStatus:{fetchState:e.realTimeApproval.fetchState,error:e.realTimeApproval.error},approvalListFetchState:e.approverListFetchState.fetchState,allAccountingClass:e.allAccountingClasses,vendorOwnerId:e.vendorOwnerId??"",isAdmin:Ot,signedInUserId:le?.userId,showRealTimeApproval:Ft,entityApprovalId:e.billActivities[0]?.entityApprovalId??e.transactionDetails.entityApprovalId,updateEditMode:Xt,onSaveRealTimeApprovals:Ht},historicActivities:e.billHistory.activities}),t.jsx(si,{})]}),e.transactionDetails?.vendor!=null&&!me&&!e.transactionDetails.isDeleted?t.jsx(ra,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:K||x,showCancel:!K&&x,cancelBtn:{label:et?n.buttons.reject:n.buttons.rejectBill,isLoading:Ze==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:zn,style:{width:m.footerButtonWidth.value(l)},reverseSpinnerColor:!1},primaryBtn:{label:Fa(K,et),isLoading:Ze==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:K?tt:()=>{W!=null?H(!0):nt()},isDisabled:e.billSaveStatus==="In-Progress"||e.approvalUpdateStatus.fetchState==="In-Progress"||e.realTimeApproval.isEditMode===!0,style:{width:K?"auto":m.footerButtonWidth.value(l)}},rightSideComponent:t.jsx(_a,{children:t.jsxs(Xa,{windowSize:l,children:[!ae&&Oe?t.jsx(mt,{onClickAway:()=>{oe(!1),de(!1)},children:t.jsxs(Tt,{windowSize:l,"data-testid":b("bill-actions-container"),children:[we!=="processing"?t.jsx(Z,{onClick:dn,"data-testid":b("delete-bill-action-item"),children:n.buttons.deleteBill}):null,we==="processing"&&!M?t.jsx(Z,{onClick:cn,"data-testid":b("cancel-bill-action-item"),children:n.buttons.cancel}):null,we==="processing"&&Sn?t.jsx(Z,{onClick:pn,"data-testid":b("cancel-and-delete-bill-action-item"),children:n.buttons.cancelAndDelete}):null,x&&L&&Wt?t.jsx(Z,{onClick:Pn,"data-testid":b("mark-as-paid-action-item"),children:n.paymentOutsideZeni.markAsPaid}):null]})}):null,Fe?t.jsx(mt,{onClickAway:()=>{oe(!1),de(!1)},children:t.jsxs(Tt,{windowSize:l,"data-testid":b("bill-actions-with-zeni-assist-container"),children:[xe?t.jsx(Z,{onClick:()=>{z.trackRetryClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),Qt()},"data-testid":b("retry-bill-action-item"),children:n.buttons.retry}):null,ge?t.jsx(Z,{onClick:mn,"data-testid":b("refund-bill-action-item"),children:n.buttons.refund}):null]})}):null,t.jsxs(Ga,{windowSize:l,children:[In===!0?t.jsx(Te,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:fe?n.zeniAssist.tooltip:n.zeniAssist.connectToTeamTooltip,placement:"top",maxWidth:"267px",children:t.jsx(wt,{windowSize:l,showEditIcon:be,isIconClickable:fe,"data-testid":b("other-actions-icon-container"),children:fe?t.jsx(hn,{}):t.jsx(Va,{})})}):null,!ae&&be===!0?t.jsx(Te,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:za,placement:"top",children:t.jsx(Ya,{onClick:He,"data-testid":b("edit-bill-icon-container"),children:t.jsx(Ua,{})})}):null,!ae&&kn===!0?t.jsx(Te,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:Ra,placement:"top",children:t.jsx(wt,{windowSize:l,showEditIcon:be,isIconClickable:!0,"data-testid":b("more-details-icon-container"),children:t.jsx(Ka,{onClick:()=>oe(!Oe)})})}):null]})]})}),style:{minHeight:62}}):null]}),f?t.jsx(Ia,{id:T,children:t.jsx(sa,{isDrawerOpen:nn,allowComposer:!0,drawerTitle:Ma,threads:Y,filter:w,autoExpand:!0,autoFocus:!1,isLoading:P,textOverrides:{composerPlaceholder:gt.addANewComment,replyComposerPlaceholder:gt.replyAComment,threadResolve:ft.resolveComment,threadUnResolve:ft.unResolveComment},threadMetadata:Rn,onThreadClick:an,onCloseAllThreadsDrawer:()=>U(!1),drawerSectionStyle:{width:l==="small"?"100%":"400px",boxSizing:l==="small"?"border-box":"content-box",padding:`${a.sp0} ${m.drawerSectionPaddingLeftRight.valuePx(l)}`,backgroundColor:Ne.colors.background},collapsibleThreadStyle:{width:l==="small"?"100%":"360px"}})}):null]})},Na=(e,g)=>{const x=e?.code;if(e!=null&&x!=null)return g?.isDeleted===!0?{value:ke.tabsById.deleted,color:O.deleted.color,bgColor:O.deleted.bgColor,borderColor:O.deleted.borderColor,code:"deleted"}:x==="pending_approval"&&g?.dueDate?.isBefore(E.dateNow(),"date")===!0?{value:ke.tabsById.overdue,color:O.overdue.color,bgColor:O.overdue.bgColor,borderColor:O.overdue.borderColor}:{value:e.name,color:O[x].color,bgColor:O[x].bgColor,borderColor:O[x].borderColor}},Oa=(e,g)=>{const x=g.transactionDetails?.recipientTotalAmount;return t.jsxs(mi,{windowSize:e,children:[t.jsxs(kt,{windowSize:e,children:[t.jsx(St,{children:n.zeniAssist.accountNumber}),t.jsx(Ct,{children:g.withdrawFrom!=null?Rt(g.withdrawFrom,e):d})]}),t.jsxs(kt,{windowSize:e,children:[t.jsx(St,{children:n.zeniAssist.amount}),t.jsx(Ct,{children:x!=null?Ae("0,0[.]00",x):C})]})]})},Fa=(e,g)=>e?n.paymentOutsideZeni.markAsPaid:g?n.buttons.approve:n.buttons.approveBill,La=e=>{const g=e.paymentMode,x=n.paymentOutsideZeni.offline;if(g==null||g==="other")return x;const _=n.paymentOutsideZeni.paymentModeOptions.find(le=>le.value===g)?.label;return`${x} ${Ba} ${_}`},Ea=(e,g,x)=>{if(e)return t.jsx(ut,{variant:"warning",style:{marginTop:a.sp5,marginBottom:a.sp3},title:bt.duplicateWarning.title,description:bt.duplicateWarning.description});if(x!=null){const _=`${g.withdrawFrom?.label??""} ${g.withdrawFrom?.maskedAccountNumber??""}`;return t.jsx(ut,{variant:"low-balance",style:{marginTop:a.sp2,marginBottom:a.sp3},title:`${Nt.lowBalanceIn.replace("__account__",_)}`,description:x.replace("Low balance! ","")})}else return null},Wa=i.div``,Za=i.div``,_a=i.div`
1
+ import{e as Nn,Y as On,u as Fn,fO as Ln,fP as En,fQ as Wn,fR as Zn,bJ as _n,a2 as Kn,B as Un,C as u,j as t,l as E,cM as it,cN as Vn,o as a,cO as Yn,cP as Gn,$ as b,cQ as Xn,a0 as Ae,cR as Hn,aX as lt,aK as ot,dt as rt,bV as st,bX as dt,bY as ct,fS as qn,fT as Jn,fU as Qn,fV as ea,cW as $,cX as j,cY as I,fW as A,cV as ta,v as pt,g as ie,cZ as Rt,c_ as na,c$ as aa,d0 as ia,fX as la,fY as oa,a4 as ra,p as mt,bp as Te,fZ as sa,f_ as O,q as r,f as da,by as ca,f$ as pa,a3 as ma,g0 as ua,g1 as ut,d4 as yt,J as ya,cB as ha,bO as ba,am as xa,ao as ga,T as fa,br as zt,g2 as wa,w as Mt,ac as Ta,ak as va,aP as Da,eL as $a,t as ja}from"./index-C3eIsUEB.js";import{b as p,n as i}from"./vendor-rkTZJa59.js";import{_ as Ia}from"./liveblocks-CP09Cz-7.js";import{o as Aa,t as ka}from"./LowBalancePopup-Zvy2iURT-BHU6RUxm.js";import"./mui-C42whWwM.js";import"./analytics-B3n5JGPc.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./crypto-BDNqpTKX.js";const Sa=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",...e},p.createElement("g",{id:"Layer_1"},p.createElement("path",{fill:"none",stroke:"#757d7e",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",d:"M4.4,30.6l6-5.9c1,.6,2.1.9,3.3,1,1.1.1,2.3,0,3.4-.4,1.1-.4,2.1-.9,2.9-1.7.9-.8,1.5-1.7,2-2.7,0-.1,0-.2,0-.4,0-.1,0-.2-.1-.3,0-.1-.2-.2-.3-.2-.1,0-.2,0-.4,0h-4.6c-.8,0-1.6-.3-2.1-.9-.6-.6-.9-1.3-.9-2.1s.3-1.5.9-2.1c.6-.6,1.3-.9,2.1-.9h3.8c.1,0,.3,0,.4-.1s.2-.2.3-.3c0-.1,0-.3,0-.4,0-.1,0-.3-.1-.4-1.3-1.6-3.1-2.7-5.2-3.1-2.1-.4-4.2,0-5.9,1.2-1.8,1.1-3,2.8-3.5,4.8s-.2,4.1.8,5.9l-6.1,5.7,3.3,3.3Z"})),p.createElement("g",{id:"Layer_2"},p.createElement("g",null,p.createElement("path",{fill:"#c27419",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M31,8c0,1.9-.7,3.8-2.1,5.1-1.3,1.4-3.2,2.2-5.1,2.2-.9,0-1.9-.2-2.7-.5-.9-.3-1.7-.9-2.3-1.5-.7-.7-1.2-1.4-1.6-2.3-.4-.9-.6-1.8-.6-2.7,0-1.9.7-3.8,2.1-5.1,1.3-1.4,3.2-2.2,5.1-2.2.9,0,1.9.2,2.7.5.9.3,1.7.9,2.3,1.5.7.7,1.2,1.4,1.6,2.3.4.9.6,1.8.6,2.7Z"}),p.createElement("path",{fill:"none",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M23.8,9.4v-4.6"}),p.createElement("path",{fill:"none",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M23.8,11.4s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.1,0,0,0,0,.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0-.1,0,0,0,0-.1,0h0"})))),Ca={formTitle:new ya("h6Medium","h5Medium")},m={containerPaddingLeft:new u(r[3],r[6],r[6]),containerPaddingRight:new u(r[3],r[6],r[8]),marginBottom:new u(r[3],r[3]),labelWidth:new u(120,160,160),formTitlePaddingLeftRight:new u(30,0),marginTop:new u(r[1],0),rightIconsGap:new u(r[4],r[5]),closeContainerMarginTop:new u(r[1],0),formTitleMarginTopBottom:new u(0,0),footerButtonWidth:new u(120,120,120,165,165),right:new u(r[3],r[0]),actionsContainerRight:new u(r[0],r[3],r[3],r[6],r[6]),otherActionsIconContainerMarginLeft:new u(r[5],r[4],r[4],r[5]),otherActionsContainerBottom:new u(58,44),iconContainerMarginTop:new u(2,r[1]),recurringSchedulePaddingLeft:new u(r[2],0),paddingRight:new u(r[2],r[3]),labelMarginRight:new u(r[0],r[3]),textPadding:new u(r[0],r[3]),additionalTextMarginTop:new u(-4,0),refundPopupWidth:new u(300,420,420),drawerSectionPaddingLeftRight:new u(r[4],r[5]),infoLabelPaddingRight:new u(r[3],r[3]),infoLabelMarginTop:new u(r[1],r[0]),navBarHeight:new u(0,0,r[8]),navBarContainerWidth:new u(100,58)},{dateFormat:Pa,common:{noText:C,strings:{empty:d},currency:ht,via:Ba,more:Ra,edit:za},spendManagement:{billPay:{billDetails:n,billsByTabs:ke,bulkActions:bt,vendorCreation:xt,insufficientFunds:Nt}},collaboration:{threads:{placeholder:gt,tooltip:ft,title:{comments:Ma}}}}=Un.getLocalizedStrings(),ve=Pa.visual.MMMDCommaYYYYformat,$i=({billDetails:e,currentTenant:g,showApproveRejectBtns:x,isShowDeletedBillsEnabled:_,signedInUser:le,isAdmin:Ot,isRealTimeApprovalEnabled:Ft,isInternationalPaymentShaVsOurEnabled:Lt,hasZeniAssistAccess:Et,analytics:z,showMarkAsPaidButtonToCreator:K,showMarkAsPaidButtonToApprover:Wt,isBillPayCommentingEnabled:Se,isZeniUser:Zt,showBackButton:Ce=!0,isDetectInsufficientFundsEnabled:_t,redirectToEditableBillScreen:Kt,redirectToBillsScreen:X,discardBillDetailsFromLocalStore:Pe,deleteBill:Ut,cancelAndDeleteBill:Be,approveOrRejectBill:Re,onAddNewRule:Vt,onAttachmentClick:ze,saveBillDetails:Yt,discardOutsideZeniPaymentData:Gt,onBackClick:Me,updateEditRealTimeApproverClicked:Xt,onSaveRealTimeApprovals:Ht,onRetryPaymentClick:qt,onRefundPaymentClick:Jt})=>{const l=Nn(),o=On(),Ne=Fn(),[Qt,U]=p.useState(!1),[Oe,oe]=p.useState(!1),[re,se]=p.useState(!1),[Fe,de]=p.useState(!1),[en,ce]=p.useState(!1),[Le,H]=p.useState(!1),y=e.transactionDetails?.id,tn=Zt?Ln:En,{requestToOpenThread:pe,setRequestToOpenThread:Ee,setOpenThread:q}=p.useContext(tn),[nn,V]=p.useState(!1),w={application:"dashboard",companyId:o.currentTenant?.companyId,tab:"bill",entityId:y,isGlobalComment:!1},{threads:Y,isLoading:P}=Wn(w,"both",!1),f=Se&&y!=null,We=p.useMemo(()=>y==null?[]:Y.filter(c=>c.resolved===!1&&!c.id.includes(Zn)),[Y,y]).length,T=`dashboard_${o.currentTenant?.companyId}`,an=p.useCallback((c,h)=>{q(h),V(!1)},[q,V]);p.useEffect(()=>{pe?.threadId!=null&&Y.length>0&&!P&&(q(pe.threadId),Ee(null))},[pe,Y,P,q,Ee]),_n({componentName:"bill.details"});const[N,J]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[Ze,_e]=p.useState("approved"),[ln,Ke]=p.useState(!1),[on,Ue]=p.useState(!1),[Ve,Ye]=p.useState(!1),Ge=()=>Ke(!1),rn=()=>Ke(!0),Xe=Kn(e.zeniAssist?.refundStatus.fetchState),Q=p.useCallback(()=>{X()},[X]);p.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed"||e.billSaveStatus==="Completed")&&(Pe(),X())},[e,X,Pe]),p.useEffect(()=>{Xe==="In-Progress"&&(e.zeniAssist?.refundStatus.fetchState==="Completed"||e.zeniAssist?.refundStatus.fetchState==="Error")&&(se(!1),Q())},[Xe,e.zeniAssist?.refundStatus,Q]);const k=e.transactionDetails?.billPayInfo.stage,ee=e.transactionDetails?.billPayInfo.billStatus,G=e.transactionDetails?.billPayInfo.billPaymentStatus,sn=e.transactionDetails?.billPayInfo.billPaymentRefundStatus,me=k?.code==="paid",v=me?k:ee?.code=="approved"&&G?.code?G:ee,S=Na(v,e.transactionDetails),F=e.transactionDetails?.billPayInfo.isRefundInitiated===!0?sn:G?.code!=null&&(ee?.code=="approved"||G.code==="mark_as_paid")?G:ee,ue=e.transactionDetails?.vendor?.name,M=e.isRecurring,He=()=>{e.transactionDetails?.id!=null&&Kt(e.transactionDetails?.id??"")},dn=()=>{J({title:M?n.recurringBill.deleteRecurringTitle:n.deleteBillTitle,description:M?n.recurringBill.deleteRecurringAlertText:n.deleteAlertDescription,primaryButtonText:n.delete,secondaryButtonText:n.cancel}),U(!0)},cn=()=>{J({title:n.cancelBillTitle,description:n.cancelAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),U(!0)},pn=()=>{J({title:M?n.recurringBill.cancelAndDeleteRecurringTitle:n.cancelAndDeleteBillTitle,description:M?n.recurringBill.cancelAndDeleteRecurringAlertText:n.cancelAndDeleteAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),U(!0)},mn=()=>{z.trackRefundClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),J({title:n.zeniAssist.refundTitle,description:n.zeniAssist.refundDescription,primaryButtonText:n.zeniAssist.proceed,secondaryButtonText:n.cancel}),se(!0)},un={onOkClick:()=>{U(!1),N.primaryButtonText===n.delete?Ut?.(e.isRecurring):N.title===n.cancelBillTitle?Be?.(e.isRecurring):N.title===n.cancelAndDeleteBillTitle||N.title===n.recurringBill.cancelAndDeleteRecurringTitle?Be?.(e.isRecurring,!0):N.primaryButtonText===n.zeniAssist.proceed&&(z.trackRefundConfirmClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),Jt())},onCancelClick:()=>{U(!1),se(!1)}},yn={onOkClick:c=>{ce(!1),Re({billId:e.transactionDetails?.id??"",type:"rejected",description:c})},onCancelClick:()=>{ce(!1)}},hn=()=>{const[c]=Ta("ZeniAssist");return c!=null?t.jsx(va,{"data-testid":b("bill-details-zeni-assist-icon",y),onClick:()=>{de(!Fe),z.trackZeniAssistClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"")},style:{width:`${a.sp5}`,height:`${a.sp5}`,marginBottom:`${a.sp2}`},animationData:c,loop:!0,play:!0,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}):null},te={invoiceNumber:e.transactionDetails?.documentId??"",invoiceDate:e.transactionDetails?.date,billDueDate:e.transactionDetails?.dueDate,memo:e.transactionDetails?.memo,currencyCode:e.vendorCurrency??ht.currencyCode},ye=e.transactionDetails?.lines?.map((c,h)=>{const B=c;return{lineIndex:h,lineId:B.id,account:B.account,class:B.class,amount:B.amount.amount,billable:B.billable,customer:B.customer,lineDescription:B.lineDescription,recipientAmount:B.recipientAmount?.amount}})??[],bn=e.transactionDetails?.recipientTotalAmount.amount??0,he=e.transactionDetails?.recipientTotalAmount,s={paymentType:e.paymentMethodType,paymentDate:e.transactionDetails?.billPayInfo.paymentDate,internationalTransferFeeBearerPaymentMethod:e.transactionDetails?.billPayInfo.internationalTransferFeeBearerPaymentMethod,paymentToBankAccount:e.bankAccount,paymentToPI:e.paymentInstrument},D=m.labelWidth.value(l),xn=c=>c==="billable"||c==="has_been_billed"?n.yes:n.no,gn=s.paymentToBankAccount?.bankAccountNumber?s.paymentToBankAccount?.bankAccountNumber?.slice(s.paymentToBankAccount?.bankAccountNumber?.length-4):s.paymentType?.method?.includes("international")&&s.paymentToBankAccount?.bankAccountIban?s.paymentToBankAccount?.bankAccountIban?.slice(s.paymentToBankAccount?.bankAccountIban.length-4):"",fn=s.paymentToBankAccount?.bankAccountName!=null&&s.paymentToBankAccount?.bankAccountName!=""?s.paymentToBankAccount?.bankAccountName:`${e.transactionDetails?.vendor?.name} - ${s.paymentToBankAccount?.bankName} XXXX${gn}`,wn=e.transactionDetails?.billPayInfo?.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${n.magicLink.collectFrom} ${e.transactionDetails?.billPayInfo?.toAccountVendorEmail}`,t.jsx(ci,{windowSize:l,children:t.jsx(di,{})})]}):void 0,qe=e.transactionDetails?.date!=null&&e.transactionDetails.bookCloseDate!=null&&e.transactionDetails.date.isBefore(e.transactionDetails.bookCloseDate),Tn=()=>`${xt.achDetails.bankRoutingNumber} ${s?.paymentToBankAccount?.bankRoutingNumberAch}, ${s?.paymentToBankAccount?.bankName}
2
+ ${xt.achDetails.bankAccountNumber} ${s?.paymentToBankAccount?.bankAccountNumber}`,ne=e.transactionDetails?.billPayInfo!=null?E.getActualPaymentDate(e.transactionDetails?.billPayInfo):void 0,vn=ne!=null&&e.paymentMethodType?.maxPeriod?.value!=null?E.zeniDate(E.getNextNthWorkingDay(ne?.toDate(),[0,6],e.paymentMethodType?.maxPeriod.value).toDateString()):void 0,Je=e.transactionDetails?.billPayInfo.expectedDepositDate??vn,Qe=it(s?.paymentType?.method??"").replace("Same Day",""),Dn=(s?.paymentToBankAccount!=null||s?.paymentToPI)!=null?n.addedByZeni:e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact?t.jsx(Vn,{paymentTypeLabel:Qe,onClick:rn,style:{marginTop:`${l==="small"?a.sp2:a.sp0}`}}):void 0,$n=()=>s?.paymentToBankAccount==null&&s?.paymentToPI==null&&s?.paymentType?.method!=null&&e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact&&e.transactionDetails?.billPayInfo.paymentDate!=null?t.jsx(wa,{paymentType:s?.paymentType?.method,paymentDate:e.transactionDetails?.billPayInfo.paymentDate}):null,be=!(v?.code==="processing"||e.transactionDetails?.billPayInfo.isRefundInitiated===!0||e.transactionDetails?.billPayInfo.isRefundComplete===!0),xe=e.zeniAssist?.isEligibleForRetryIBT===!0||e.zeniAssist?.isEligibleForRetryOBP===!0,ge=e.zeniAssist?.isEligibleForRefund===!0,jn=e?.transactionDetails?.billPayInfo.billPaymentMethodType.code==="wire"&&e?.transactionDetails?.billPayInfo.billPaymentMethodType.subCode==="international",In=Et&&e.transactionDetails?.billPayInfo.billPaymentStatus.code!=null&&["failed","cancelled","returned"].includes(e.transactionDetails.billPayInfo.billPaymentStatus.code)&&(xe||ge)&&jn===!1,fe=xe||ge,An=e.transactionDetails?.billPayInfo.isRefundInitiated===!0&&e.transactionDetails?.billPayInfo.isRefundComplete===!1,we=v?.code,kn=!An&&(!qe||v?.code==="processing"&&!M),Sn=!qe,et=["small","medium-compact","medium-regular"].includes(l),ae=E.isBulkProcessing(e.transactionDetails?.bulkProcessingDetail?.type),L=E.isPaymentMethodOutsideZeni(e.paymentMethodType?.method),Cn=c=>{z.trackBillPayMarkAsPaidSubmit(c.paymentMode??"other",k?.code??"",v?.code??""),Yt(!0,Ve,c)},tt=()=>{Ue(!0),z.trackBillPayMarkAsPaid(k?.code??"",v?.code??"")},Pn=()=>{Ye(!0),tt()},Bn=()=>{Gt(),Ue(!1),Ve&&Ye(!1)},Rn=p.useMemo(()=>({companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,entityType:"bill.details",entityId:y??d,isGlobalComment:!1,application:"dashboard",tab:"bill",url:window.location.href}),[o.currentTenant,y]),W=_t&&e.transactionDetails?.totalAmountWithFeesInUSD!=null&&k?.code!=="paid"&&v?.code!=="failed"&&v?.code!=="processing"&&v?.code!=="cancelled"&&v?.code!=="returned"&&v?.code!=="rejected"?Yn(e.transactionDetails?.totalAmountWithFeesInUSD,e.withdrawFrom,s.paymentDate):void 0,nt=()=>{_e("approved"),Le===!0&&H(!1),W!=null&&z.trackLowBalanceAccountApprove(k?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",yt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),Re({billId:e.transactionDetails?.id??"",type:"approved"})},zn=()=>{_e("rejected"),W!=null&&z.trackLowBalanceAccountReject(k?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",yt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),ce(!0)},at=p.useRef(null);return t.jsxs(Ha,{windowSize:l,ref:at,children:[t.jsx(Gn,{anchor:"right",open:ln,onClose:Ge,transitionDuration:250,"data-testid":b("vendor-email-preview-drawer"),children:t.jsx(Xn,{companyName:Hn(g.company?.companyInfo),vendor:e.transactionDetails?.vendor?.name,paymentDate:s.paymentDate?.format(ve)??"",paymentType:Qe,amount:Ae("0,0.[00]",he),isInvoiceAttached:!!e.transactionDetails?.attachments?.length,onClose:Ge})}),t.jsxs(ei,{windowSize:l,children:[t.jsx(ui,{windowSize:l,children:l==="small"?t.jsx(lt,{"data-testid":b("bill-detail-nav-bar-mobile"),title:t.jsxs(t.Fragment,{children:[ue,e.isRecurring?t.jsx(Ie,{width:a.sp4,height:a.sp4}):null]}),backgroundColor:Ne.colors.grey4,rightSideComponent:t.jsxs(jt,{windowSize:l,children:[f?t.jsxs(Pt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),V(!0),z.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(h=>rt(h)),void 0,void 0,"page icon")},children:[t.jsx(ot,{count:P?void 0:We,isLoading:P,style:{left:"12px"}}),t.jsx(Bt,{})]}):null,t.jsx(It,{onClick:()=>Q(),"data-testid":b("bill-detail-nav-bar-small-close-button"),children:t.jsx($t,{})})]}),leftSideComponent:t.jsx(Dt,{windowSize:l,onClick:Me,"data-testid":b("bill-detail-nav-bar-small-back-button"),style:{visibility:`${Ce?"visible":"hidden"}`},children:t.jsx(vt,{})}),source:"BillDetailPage"}):t.jsx(lt,{"data-testid":b("bill-detail-nav-bar"),title:t.jsxs(t.Fragment,{children:[ue,e.isRecurring?t.jsx(Ie,{width:a.sp4,height:a.sp4}):null]}),rightSideComponent:t.jsxs(jt,{windowSize:l,children:[f?t.jsxs(Pt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),V(!0),z.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(h=>rt(h)),void 0,void 0,"page icon")},children:[t.jsx(ot,{count:P?void 0:We,isLoading:P,style:{left:"12px"}}),t.jsx(Bt,{})]}):null,t.jsx(It,{onClick:()=>Q(),"data-testid":b("bill-detail-nav-bar-close-button"),children:t.jsx($t,{})})]}),leftSideComponent:t.jsx(Dt,{windowSize:l,onClick:Me,"data-testid":b("bill-detail-nav-bar-back-button"),style:{visibility:`${Ce?"visible":"hidden"}`},children:t.jsx(vt,{})}),enableTitleOnScroll:!0,scrollableContent:at,source:"BillDetailPage"})}),t.jsxs(ti,{windowSize:l,children:[Le?t.jsx(Aa,{withdrawFrom:e.withdrawFrom,paymentDate:e?.transactionDetails?.billPayInfo.paymentDate,onOkClick:nt,onCancelClick:()=>{H(!1),He()},onClickAway:()=>{H(!1)}}):null,on?t.jsx(ka,{onCancel:Bn,onProceedForMarkAsPaid:Cn,saveDetailsFetchState:e.billSaveStatus,paymentData:e.outsideZeniPaymentInfo}):null,Qt||re?t.jsx(st,{titleComponent:t.jsx(ct,{children:N.title}),descriptionComponent:t.jsx(dt,{children:N.description}),primaryButtonText:N.primaryButtonText,proceedButtonVariant:re?"primary":"danger",secondaryButtonText:N.secondaryButtonText,action:un,isEditPopup:!0,isLoading:e.zeniAssist?.refundStatus.fetchState==="In-Progress",children:re?Oa(l,e):null}):null,en?t.jsx(st,{titleComponent:t.jsx(ct,{children:n.rejectBillTitlePrefix+" "+(e.transactionDetails?.vendor?.name!=null?e.transactionDetails.vendor.name:"")}),descriptionComponent:t.jsx(dt,{children:n.rejectBillDescription}),primaryButtonText:n.send,secondaryButtonText:n.cancel,action:yn,isEditPopup:!0,isNotesIncluded:!0,notesPlaceholder:n.rejectBillReasonPlaceholder}):null,l!=="small"||S?t.jsxs(ai,{windowSize:l,children:[l!=="small"?t.jsxs(ii,{windowSize:l,children:[ue,e.isRecurring?t.jsx(Ie,{height:a.sp5,width:a.sp5}):null]}):null,_&&S!=null&&S.code==="deleted"?t.jsx(At,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):S?.value===ke.tabsById.overdue?t.jsx(At,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):null]}):null,F!=null&&F.code?l==="small"?t.jsx(qn,{progressSectionObj:F,createDate:e.transactionDetails?.createTime,paymentDate:Je,scheduleDate:ne,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):t.jsx(Jn,{progressSectionObj:F,createDate:e.transactionDetails?.createTime,paymentDate:Je,scheduleDate:ne,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):null,Ea(ae,e,W),t.jsx(Qn,{sectionId:ea,currentVendorOption:{defaultOptions:[]},billId:y,isBillPayCommentingEnabled:Se,isBillPaid:me,disableVendorActions:!0,vendor:e.transactionDetails?.vendor,prevBills:e.previousBills,onAttachmentClick:ze,isVendorRecommendationEnabled:!1,showVendorGptRecommendationText:!1}),s.paymentType?.method?.includes("ach"),t.jsxs($e,{children:[t.jsx(je,{children:n.whatForTitle}),t.jsxs(De,{children:[t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"invoiceNumber"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("invoiceNumber")}`},children:t.jsx(A,{label:{label:n.invoiceNumber,width:D},text:te.invoiceNumber??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"invoiceDate"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("invoiceDate")}`},children:t.jsx(A,{label:{label:n.invoiceDate,width:D},text:te.invoiceDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"billDueDate"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("billDueDate")}`},children:t.jsx(A,{label:{label:n.billDueDate,width:D},text:te.billDueDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"memo"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("memo")}`},children:t.jsx(A,{label:{label:n.memo,width:D},text:te.memo??C,style:{width:"auto"}})})]})]}),t.jsxs($e,{children:[t.jsx(ni,{windowSize:l,children:t.jsx(je,{children:n.lineItemsTitle})}),ye.length>0?ye.map((c,h)=>{const B=e?.transactionDetails?.lines?.find(Mn=>Mn.id===c.lineId)?.recipientAmount;return t.jsxs(qa,{children:[ye.length>1?t.jsx(Ja,{windowSize:l,children:t.jsx(Qa,{windowSize:l,children:`${n.line} # ${h+1}`})}):null,t.jsxs(De,{children:[t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.recipientAmount`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("recipientAmount",h)}`},children:t.jsx(A,{label:{label:n.amount,width:D},text:B!=null?Ae("0,0[.]00",B):C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.lineDescription`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("lineDescription",h)}`},children:t.jsx(A,{label:{label:n.description,width:D},text:c.lineDescription??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.account`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("account",h)}`},children:t.jsx(A,{label:{label:n.category,width:D},text:c.account?.accountName??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.class`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("class",h)}`},children:t.jsx(A,{label:{label:n.class,width:D},text:c.class?.className??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.billable`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("billable",h)}`},children:t.jsx(A,{label:{label:n.billable,width:D},text:c.billable!=null?xn(c.billable):C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.customer`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("customer",h)}`},children:t.jsx(A,{label:{label:n.customer,width:D},text:c.customer?.name??C,style:{width:"auto"}})})]})]},h)}):null]}),t.jsxs(li,{windowSize:l,children:[t.jsx(oi,{children:n.total}),t.jsx(ri,{children:he!=null?t.jsx(ta,{amount:he,integerStyles:pt.h6Medium.cssObject,decimalStyles:pt.standardMedium.cssObject}):C})]}),t.jsxs($e,{children:[t.jsx(je,{children:n.paymentDetailsTitle}),t.jsxs(De,{children:[L?null:t.jsxs(t.Fragment,{children:[t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"withdrawFrom"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("withdrawFrom")}`},children:t.jsx(A,{label:{label:n.withdrawFrom,width:D},text:e.withdrawFrom!=null?Rt(e.withdrawFrom,l):d,style:{width:"auto"},additionalInfoLabelStyles:{textAlign:"right",paddingRight:m.infoLabelPaddingRight.valuePx(l),marginTop:m.infoLabelMarginTop.valuePx(l),color:ie.brandColorGoldDark},additionalInfoLabel:W!=null&&k?.code==="pending_approval"?Nt.addMoney:W})}),t.jsx(R,{})]}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"paymentType"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("paymentType")}`},children:t.jsx(A,{additionalInfoLabel:s.paymentType?.method!=null&&s.paymentType.method.includes(E.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&Lt&&s.internationalTransferFeeBearerPaymentMethod!=null?t.jsx(Za,{children:na(s.internationalTransferFeeBearerPaymentMethod)}):void 0,label:{label:n.paymentMethod,width:D},text:L&&e.outsideZeniPaymentInfo!=null?La(e.outsideZeniPaymentInfo):it(s.paymentType?.method??""),style:{width:"auto"}})}),L?null:t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"paymentTo"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("paymentTo")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(A,{label:{label:n.paymentTo,width:D},text:s.paymentToBankAccount!=null?fn:s.paymentToPI!=null?s.paymentToPI.displayText:wn,style:{width:"auto"},showEyeIcon:s.paymentToBankAccount!=null&&!!s.paymentType?.method?.includes("ach"),showAdditionalInfoLabel:!!e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact||s.paymentType?.method?.includes("ach"),tooltipText:Tn(),additionalInfoLabel:t.jsx(Wa,{children:Dn})}),$n()]})})]}),L||e.isRecurring?t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"recurringPaymentType"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("recurringPaymentType")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(A,{label:{label:n.paymentType,width:D},labelStyles:{marginRight:m.labelMarginRight.valuePx(l)},style:{width:"auto"},text:ia(e.isRecurring,L,e.transactionDetails?.recurringBillInstance??1,e.recurringBillConfigDetail?.totalPaymentCycles??0),textStyles:{paddingLeft:m.textPadding.valuePx(l),paddingRight:m.textPadding.valuePx(l)},additionalInfoLabel:aa(l,e.isRecurring,L,e.recurringBillConfigDetail),additionalInfoLabelStyles:{paddingRight:m.paddingRight.valuePx(l),marginTop:m.additionalTextMarginTop.valuePx(l)}}),e.recurringBillInstances!=null&&e.recurringBillInstances.length>0?t.jsx(pi,{style:{paddingLeft:m.recurringSchedulePaddingLeft.valuePx(l)},children:t.jsx(la,{onAttachmentClick:ze,currencySymbol:e.transactionDetails?.recipientTotalAmount.currencySymbol??ht.currencySymbol,recurringBillInstances:e.recurringBillInstances})}):null]})})]}):null]})]}),e.transactionDetails&&e.transactionDetails.id&&t.jsx(oa,{amount:bn,activities:e.billActivities,stage:k?.code??"draft",onAddNewRule:Vt,entity:"bill_pay",realTimeApproval:{allApprovers:e.filteredApprovers,filteredAttributes:e.filteredAttributes,isRealTimeApproverEditMode:e.realTimeApproval.isEditMode,realTimeApprovalSaveStatus:{fetchState:e.realTimeApproval.fetchState,error:e.realTimeApproval.error},approvalListFetchState:e.approverListFetchState.fetchState,allAccountingClass:e.allAccountingClasses,vendorOwnerId:e.vendorOwnerId??"",isAdmin:Ot,signedInUserId:le?.userId,showRealTimeApproval:Ft,entityApprovalId:e.billActivities[0]?.entityApprovalId??e.transactionDetails.entityApprovalId,updateEditMode:Xt,onSaveRealTimeApprovals:Ht},historicActivities:e.billHistory.activities}),t.jsx(si,{})]}),e.transactionDetails?.vendor!=null&&!me&&!e.transactionDetails.isDeleted?t.jsx(ra,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:K||x,showCancel:!K&&x,cancelBtn:{label:et?n.buttons.reject:n.buttons.rejectBill,isLoading:Ze==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:zn,style:{width:m.footerButtonWidth.value(l)},reverseSpinnerColor:!1},primaryBtn:{label:Fa(K,et),isLoading:Ze==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:K?tt:()=>{W!=null?H(!0):nt()},isDisabled:e.billSaveStatus==="In-Progress"||e.approvalUpdateStatus.fetchState==="In-Progress"||e.realTimeApproval.isEditMode===!0,style:{width:K?"auto":m.footerButtonWidth.value(l)}},rightSideComponent:t.jsx(_a,{children:t.jsxs(Xa,{windowSize:l,children:[!ae&&Oe?t.jsx(mt,{onClickAway:()=>{oe(!1),de(!1)},children:t.jsxs(Tt,{windowSize:l,"data-testid":b("bill-actions-container"),children:[we!=="processing"?t.jsx(Z,{onClick:dn,"data-testid":b("delete-bill-action-item"),children:n.buttons.deleteBill}):null,we==="processing"&&!M?t.jsx(Z,{onClick:cn,"data-testid":b("cancel-bill-action-item"),children:n.buttons.cancel}):null,we==="processing"&&Sn?t.jsx(Z,{onClick:pn,"data-testid":b("cancel-and-delete-bill-action-item"),children:n.buttons.cancelAndDelete}):null,x&&L&&Wt?t.jsx(Z,{onClick:Pn,"data-testid":b("mark-as-paid-action-item"),children:n.paymentOutsideZeni.markAsPaid}):null]})}):null,Fe?t.jsx(mt,{onClickAway:()=>{oe(!1),de(!1)},children:t.jsxs(Tt,{windowSize:l,"data-testid":b("bill-actions-with-zeni-assist-container"),children:[xe?t.jsx(Z,{onClick:()=>{z.trackRetryClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),qt()},"data-testid":b("retry-bill-action-item"),children:n.buttons.retry}):null,ge?t.jsx(Z,{onClick:mn,"data-testid":b("refund-bill-action-item"),children:n.buttons.refund}):null]})}):null,t.jsxs(Ga,{windowSize:l,children:[In===!0?t.jsx(Te,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:fe?n.zeniAssist.tooltip:n.zeniAssist.connectToTeamTooltip,placement:"top",maxWidth:"267px",children:t.jsx(wt,{windowSize:l,showEditIcon:be,isIconClickable:fe,"data-testid":b("other-actions-icon-container"),children:fe?t.jsx(hn,{}):t.jsx(Ua,{})})}):null,!ae&&be===!0?t.jsx(Te,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:za,placement:"top",children:t.jsx(Ya,{onClick:He,"data-testid":b("edit-bill-icon-container"),children:t.jsx(Va,{})})}):null,!ae&&kn===!0?t.jsx(Te,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:Ra,placement:"top",children:t.jsx(wt,{windowSize:l,showEditIcon:be,isIconClickable:!0,"data-testid":b("more-details-icon-container"),children:t.jsx(Ka,{onClick:()=>oe(!Oe)})})}):null]})]})}),style:{minHeight:62}}):null]}),f?t.jsx(Ia,{id:T,children:t.jsx(sa,{isDrawerOpen:nn,allowComposer:!0,drawerTitle:Ma,threads:Y,filter:w,autoExpand:!0,autoFocus:!1,isLoading:P,textOverrides:{composerPlaceholder:gt.addANewComment,replyComposerPlaceholder:gt.replyAComment,threadResolve:ft.resolveComment,threadUnResolve:ft.unResolveComment},threadMetadata:Rn,onThreadClick:an,onCloseAllThreadsDrawer:()=>V(!1),drawerSectionStyle:{width:l==="small"?"100%":"400px",boxSizing:l==="small"?"border-box":"content-box",padding:`${a.sp0} ${m.drawerSectionPaddingLeftRight.valuePx(l)}`,backgroundColor:Ne.colors.background},collapsibleThreadStyle:{width:l==="small"?"100%":"360px"}})}):null]})},Na=(e,g)=>{const x=e?.code;if(e!=null&&x!=null)return g?.isDeleted===!0?{value:ke.tabsById.deleted,color:O.deleted.color,bgColor:O.deleted.bgColor,borderColor:O.deleted.borderColor,code:"deleted"}:x==="pending_approval"&&g?.dueDate?.isBefore(E.dateNow(),"date")===!0?{value:ke.tabsById.overdue,color:O.overdue.color,bgColor:O.overdue.bgColor,borderColor:O.overdue.borderColor}:{value:e.name,color:O[x].color,bgColor:O[x].bgColor,borderColor:O[x].borderColor}},Oa=(e,g)=>{const x=g.transactionDetails?.recipientTotalAmount;return t.jsxs(mi,{windowSize:e,children:[t.jsxs(kt,{windowSize:e,children:[t.jsx(St,{children:n.zeniAssist.accountNumber}),t.jsx(Ct,{children:g.withdrawFrom!=null?Rt(g.withdrawFrom,e):d})]}),t.jsxs(kt,{windowSize:e,children:[t.jsx(St,{children:n.zeniAssist.amount}),t.jsx(Ct,{children:x!=null?Ae("0,0[.]00",x):C})]})]})},Fa=(e,g)=>e?n.paymentOutsideZeni.markAsPaid:g?n.buttons.approve:n.buttons.approveBill,La=e=>{const g=e.paymentMode,x=n.paymentOutsideZeni.offline;if(g==null||g==="other")return x;const _=n.paymentOutsideZeni.paymentModeOptions.find(le=>le.value===g)?.label;return`${x} ${Ba} ${_}`},Ea=(e,g,x)=>{if(e)return t.jsx(ut,{variant:"warning",style:{marginTop:a.sp5,marginBottom:a.sp3},title:bt.duplicateWarning.title,description:bt.duplicateWarning.description});if(x!=null){const _=`${g.withdrawFrom?.label??""} ${g.withdrawFrom?.maskedAccountNumber??""}`;return t.jsx(ut,{variant:"low-balance",style:{marginTop:a.sp2,marginBottom:a.sp3},title:`${Nt.lowBalanceIn.replace("__account__",_)}`,description:x.replace("Low balance! ","")})}else return null},Wa=i.div``,Za=i.div``,_a=i.div`
3
3
  display: flex;
4
4
  justify-content: flex-end;
5
5
  `,Ka=i($a)`
@@ -18,7 +18,7 @@ import{e as Nn,Y as On,u as Fn,fO as Ln,fP as En,fQ as Wn,fR as Zn,bJ as _n,a2 a
18
18
  &:hover {
19
19
  color: ${e=>e.theme.colors.primary};
20
20
  }
21
- `,Va=i(Sa)`
21
+ `,Ua=i(Sa)`
22
22
  color: ${e=>e.theme.colors.hero};
23
23
  width: ${a.sp5};
24
24
  height: ${a.sp5};
@@ -26,7 +26,7 @@ import{e as Nn,Y as On,u as Fn,fO as Ln,fP as En,fQ as Wn,fR as Zn,bJ as _n,a2 a
26
26
  &:hover {
27
27
  color: ${e=>e.theme.colors.primary};
28
28
  }
29
- `,Ua=i(Da)`
29
+ `,Va=i(Da)`
30
30
  cursor: pointer;
31
31
  color: ${e=>e.theme.colors.hero};
32
32
  width: ${a.sp4};
@@ -128,7 +128,7 @@ import{e as Nn,Y as On,u as Fn,fO as Ln,fP as En,fQ as Wn,fR as Zn,bJ as _n,a2 a
128
128
  display: flex;
129
129
  flex-direction: column;
130
130
  padding-top: ${a.sp3};
131
- `,Qa=i.div``,je=i(xa)`
131
+ `,qa=i.div``,je=i(xa)`
132
132
  color: ${e=>e.theme.colors.primary};
133
133
  `,R=i.div`
134
134
  display: flex;
@@ -136,14 +136,14 @@ import{e as Nn,Y as On,u as Fn,fO as Ln,fP as En,fQ as Wn,fR as Zn,bJ as _n,a2 a
136
136
  background-color: ${e=>e.theme.colors.grey3};
137
137
  min-height: 1px;
138
138
  max-height: 1px;
139
- `,qa=i(ga)`
139
+ `,Ja=i(ga)`
140
140
  display: flex;
141
141
  align-items: center;
142
142
  justify-content: space-between;
143
143
  color: ${e=>e.theme.colors.champion};
144
144
  margin-top: ${a.sp2};
145
145
  height: 31px;
146
- `,Ja=i(fa)`
146
+ `,Qa=i(fa)`
147
147
  color: ${e=>e.theme.colors.champion};
148
148
  `,ei=i.div`
149
149
  display: flex;
@@ -0,0 +1,27 @@
1
+ import{C as z,q as U,e as O,B as D,a as M,a2 as W,j as o,X,ca as G,aX as Z,F as H,a4 as J,o as c}from"./index-C3eIsUEB.js";import{b as L,n as h}from"./vendor-rkTZJa59.js";import{b as K,f as Q,l as R,o as j}from"./FollowStepsSection-BVi7m38_-C99RMZ_B.js";import"./mui-C42whWwM.js";import"./analytics-B3n5JGPc.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-BDNqpTKX.js";const C="billPayApprovalRuleDetailPage",T="lowerBound",E="upperBound",y="steps",Y={footerPadding:new z(U[2],U[3])};function ve({localData:e,approvalUpdateActionType:t,onBackClick:a,onApprovalRuleDataUpdated:r,onResetClick:s,isLowerBoundDisabled:n=!1,isUpperBoundDisabled:b=!0,hideUpperBoundField:A=!1,onSaveRuleClick:_,onSaveRuleSuccess:S}){const I=O(),l=D.getLocalizedStrings().commonSetUp.approval,P=D.getLocalizedStrings().spendManagement.billPay.billPayApproval,x=ee(e,t==="approval_create"&&!n),v=M({mode:"all",reValidateMode:"onChange",defaultValues:x}),u=e.billPaySetupApproverViewUpdateData?.updateStatus,w=W(u?.fetchState),{upperBound:$}=x,{allApprovalRules:p,allAccountingClasses:k,billPaySetupApproverViewUpdateData:m}=e;let f=p.length>1?p.length-1:0,g=p.length>0?p[f].criteria[0].range.min.amount:0;if(m!=null&&m.type==="approval_update"&&m.data!=null){const{approvalRuleId:i}=m.data;f=p.findIndex(d=>d.approvalRuleId===i),g=f>0?p[f-1].criteria[0].range.min.amount:0}const F=v.handleSubmit(()=>{_()}),V=async(i,d)=>{r(d)};return L.useEffect(()=>{const i=v.watch((d,{name:B})=>{if(B!=null&&d!=null){const q=X(d);G(()=>V(B,q))}});return()=>{i.unsubscribe()}}),L.useEffect(()=>{w==="In-Progress"&&u?.fetchState==="Completed"&&S()},[w,u?.fetchState,S]),o.jsxs(re,{children:[o.jsx(Z,{title:t==="approval_create"?l.newApproval:l.editApproval,style:{zIndex:4},onBackClick:()=>{a()},source:"BillPayApprovalRuleDetailPage"}),o.jsx(se,{children:o.jsx(H,{...v,children:o.jsx("form",{id:N(C),onSubmit:F,children:o.jsxs(oe,{children:[o.jsx(K,{label:{label:A?P.amountPerBillGreaterLabel:P.amountPerBillLabel},firstText:{type:"number",name:T,placeholder:"$0",options:{required:!0,max:$===1/0?Number.MAX_SAFE_INTEGER-1:$-1,min:g,validate:i=>n?!0:i!=null&&i>g},isDisabled:n,additionalInfoLabel:l.firstRuleLowerBoundInfoLabel,additionalErrorLabel:l.firstRuleErrorInfoLabel},secondText:{type:"number",name:E,placeholder:"Infinity",isDisabled:b,hideField:A,additionalInfoLabel:l.upperBoundInfoLabel}}),o.jsx(ie,{}),o.jsx(Q,{sectionId:y,label:{label:l.followStepsLabel},approversPlaceholder:l.approversPlaceholder,notifiersPlaceholder:l.notifiersPlaceholder,allUserWithRoles:e.allApprovers,filteredApprovers:e.filteredApprovers.map(i=>i.user),allAttributes:e.allAttributes,filteredAttributes:e.filteredAttributes,allAccountingClasses:k,stepsInfo:x[y],userSelectPlaceholder:l.userSelectPlaceholder,approveNotifyPlaceholder:l.approveNotifyPlaceholder,productType:"zeni_bill_pay"})]})})})}),o.jsx(J,{formId:N(C),primaryBtn:{label:l.saveBtnText,isLoading:u?.fetchState==="In-Progress",isDisabled:u?.fetchState==="In-Progress",style:{width:"85px",minWidth:"auto"}},showCancel:!0,cancelBtn:{label:l.cancelBtnText,isLoading:!1,style:{width:"85px",minWidth:"auto"},onClick:s},containerStyle:{justifyContent:I==="small"?"space-between":"center"},style:{padding:Y.footerPadding.valuePx(I)},separatorStyle:{marginRight:c.sp4}})]})}const ee=(e,t)=>{const{criteria:a,steps:r}=e.billPaySetupApproverViewUpdateData?.data??{};return{[y]:ae(e.allApprovers.map(s=>s.user),e.filteredApprovers.map(s=>s.user),j(e.allAttributes),j(e.filteredAttributes),r??[])??[],[T]:t?void 0:a!=null?a.range.min.amount??0:0,[E]:a!=null?a.range.max==null?1/0:a.range.max.amount:1/0}},ae=(e,t,a,r,s)=>s&&s.length>0?s.map((n,b)=>({stepIndex:b,stepType:{selectedOption:n.action,allOptions:R},actors:{allUsers:t,selectedUsers:le(e,n.actors),allNonUsers:r,selectedNonUsers:te(a,n.actors)}})):[{stepIndex:0,stepType:{selectedOption:"require_approval",allOptions:R},actors:{allUsers:t,selectedUsers:[],allNonUsers:r,selectedNonUsers:[]}}],le=(e,t)=>e.filter(a=>a.userId!=null&&t.findIndex(r=>r.userId===a.userId)>-1),te=(e,t)=>e.filter(a=>t.findIndex(r=>r.subType===a.value)>-1),N=e=>`${e}_form`,ge=e=>`${e}`,re=h.div`
2
+ display: flex;
3
+ height: 100%;
4
+ flex-direction: column;
5
+ width: 100%;
6
+ background-color: ${e=>e.theme.colors.grey4};
7
+ box-shadow: ${e=>`${c.sp0} 2px ${c.sp1} ${e.theme.colors.dropShadowNormal}`};
8
+ `,oe=h.div`
9
+ display: flex;
10
+ flex-direction: column;
11
+ border: 1px solid ${e=>e.theme.colors.grey3};
12
+ box-shadow: ${e=>`${c.sp0} 2px ${c.sp1} ${e.theme.colors.dropShadowNormal}`};
13
+ border-radius: ${c.sp2};
14
+ `,se=h.div`
15
+ display: flex;
16
+ justify-content: flex-start;
17
+ height: 100%;
18
+ overflow-y: auto;
19
+ flex-direction: column;
20
+ align-items: center;
21
+ `,ie=h.div`
22
+ display: flex;
23
+ flex: 1;
24
+ background-color: ${e=>e.theme.colors.grey3};
25
+ min-height: 1px;
26
+ max-height: 1px;
27
+ `;export{Y as D,ve as default,N as uniqueFormName,ge as uniqueName};
@@ -1,4 +1,4 @@
1
- import{e as I,M as y,j as t,aX as D,m as H,_ as b,C as r,y as B,a0 as j,bV as E,bX as G,bY as U,o as i,cx as V,r as l,ao as F,J as z,an as _,f as S,cu as q,aP as J,v as Q}from"./index-tsOp9BQk.js";import{n as o,b as X}from"./vendor-rkTZJa59.js";import"./mui-C42whWwM.js";import"./analytics-B3n5JGPc.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-BDNqpTKX.js";const s={sectionWidth:new r(343,580,726),ruleWrapperPadding:new r(l[3],l[4]),wrapperGap:new r(l[4],l[3]),wrapperMarginBottom:new r(l[6],l[8]),lastWrapperMarginBottom:new r(l[5],l[9]),stepperWidthHeight:new r(20,l[5]),stepperItemLeft:new r(-29,-23),stepperItemTop:new r(2,l[0]),stepperItemPaddingLeft:new r(l[0],10),stepperItemMinHeight:new r(22,28),stepperLeft:new r(11,17),stepperTop:new r(2,l[0]),stepperContentTop:new r(-1,-4)},L={stepper:new z("smallRegular","standardRegular"),amount:new z("standardRegular","largeMedium")},Y=({showDeleteBtn:e=!1,isLastSection:f=!1,approvalRule:c,onEditRuleClick:v,onDeleteRuleClick:$})=>{const[m,x]=X.useState(!1),n=I(),{range:h}=c.criteria[0],{steps:u,approvalRuleId:w}=c,a=y.getLocalizedStrings().commonSetUp.approval,W=()=>{x(!0)},A={onOkClick:()=>{x(!1),$?.(w)},onCancelClick:()=>{x(!1)}};return t.jsxs(K,{windowSize:n,isLastSection:f,children:[t.jsxs(O,{windowSize:n,children:[t.jsxs(se,{children:[t.jsxs(C,{windowSize:n,children:[a.from," ",j("0,0",h.min)]}),t.jsxs(Z,{children:[t.jsx(P,{}),t.jsx(ee,{}),t.jsx(P,{})]}),h.max==null?t.jsx(de,{}):t.jsx(C,{windowSize:n,children:j("0,0",{...h.min,amount:h.max.amount})})]}),t.jsxs(ae,{className:"icons",children:[e&&t.jsx(ne,{onClick:W,"data-testid":b("delete-approval-rule-bill-pay",c.approvalRuleId)}),t.jsx(pe,{onClick:()=>{v(w)},"data-testid":b("edit-approval-rule-bill-pay",c.approvalRuleId)})]})]}),t.jsx(te,{windowSize:n,children:t.jsx(oe,{isSingleStep:u.length===1,windowSize:n,children:u.map((d,M)=>t.jsxs(ie,{isSingleStep:u.length===1,className:"stepperItem",windowSize:n,children:[d.action==="require_approval"?t.jsx(re,{children:a.requireText}):t.jsx(le,{children:a.notifyText}),d.nonUserActors!=null&&d.nonUserActors.filter(p=>p.subType!=null).map((p,N)=>t.jsxs(R,{children:[t.jsx(k,{children:p.subType!=null?a.nonUsers[p.subType].label:null}),d.operator!="is"?t.jsx(T,{className:"operator",children:d.operator}):null]},`${p.subType}_${N}`)),d.actors.map(p=>t.jsxs(R,{children:[t.jsxs(k,{children:[p.firstName," ",p.lastName]}),d.operator!="is"?t.jsx(T,{className:"operator",children:d.operator}):null]},p.userId))]},M))})}),m?t.jsx(E,{titleComponent:t.jsx(U,{children:a.deleteApprovalRuleTitle}),descriptionComponent:t.jsx(G,{children:a.deleteApprovalRuleDesc}),primaryButtonText:a.deleteTxt,proceedButtonVariant:"danger",secondaryButtonText:a.cancelBtnText,action:A}):null]})},K=o.div`
1
+ import{e as I,B as y,j as t,aX as D,m as H,$ as b,C as r,t as B,a0 as j,bV as E,bX as G,bY as U,o as i,cx as q,q as l,ao as V,J as z,an as F,g as S,cu as J,aP as O,v as Q}from"./index-C3eIsUEB.js";import{n as o,b as X}from"./vendor-rkTZJa59.js";import"./mui-C42whWwM.js";import"./analytics-B3n5JGPc.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-BDNqpTKX.js";const s={sectionWidth:new r(343,580,726),ruleWrapperPadding:new r(l[3],l[4]),wrapperGap:new r(l[4],l[3]),wrapperMarginBottom:new r(l[6],l[8]),lastWrapperMarginBottom:new r(l[5],l[9]),stepperWidthHeight:new r(20,l[5]),stepperItemLeft:new r(-29,-23),stepperItemTop:new r(2,l[0]),stepperItemPaddingLeft:new r(l[0],10),stepperItemMinHeight:new r(22,28),stepperLeft:new r(11,17),stepperTop:new r(2,l[0]),stepperContentTop:new r(-1,-4)},L={stepper:new z("smallRegular","standardRegular"),amount:new z("standardRegular","largeMedium")},Y=({showDeleteBtn:e=!1,isLastSection:f=!1,approvalRule:c,onEditRuleClick:v,onDeleteRuleClick:$})=>{const[m,x]=X.useState(!1),n=I(),{range:h}=c.criteria[0],{steps:u,approvalRuleId:w}=c,a=y.getLocalizedStrings().commonSetUp.approval,W=()=>{x(!0)},A={onOkClick:()=>{x(!1),$?.(w)},onCancelClick:()=>{x(!1)}};return t.jsxs(_,{windowSize:n,isLastSection:f,children:[t.jsxs(Z,{windowSize:n,children:[t.jsxs(se,{children:[t.jsxs(C,{windowSize:n,children:[a.from," ",j("0,0",h.min)]}),t.jsxs(K,{children:[t.jsx(P,{}),t.jsx(ee,{}),t.jsx(P,{})]}),h.max==null?t.jsx(de,{}):t.jsx(C,{windowSize:n,children:j("0,0",{...h.min,amount:h.max.amount})})]}),t.jsxs(ae,{className:"icons",children:[e&&t.jsx(ne,{onClick:W,"data-testid":b("delete-approval-rule-bill-pay",c.approvalRuleId)}),t.jsx(pe,{onClick:()=>{v(w)},"data-testid":b("edit-approval-rule-bill-pay",c.approvalRuleId)})]})]}),t.jsx(te,{windowSize:n,children:t.jsx(oe,{isSingleStep:u.length===1,windowSize:n,children:u.map((d,N)=>t.jsxs(ie,{isSingleStep:u.length===1,className:"stepperItem",windowSize:n,children:[d.action==="require_approval"?t.jsx(re,{children:a.requireText}):t.jsx(le,{children:a.notifyText}),d.nonUserActors!=null&&d.nonUserActors.filter(p=>p.subType!=null).map((p,M)=>t.jsxs(R,{children:[t.jsx(k,{children:p.subType!=null?a.nonUsers[p.subType].label:null}),d.operator!="is"?t.jsx(T,{className:"operator",children:d.operator}):null]},`${p.subType}_${M}`)),d.actors.map(p=>t.jsxs(R,{children:[t.jsxs(k,{children:[p.firstName," ",p.lastName]}),d.operator!="is"?t.jsx(T,{className:"operator",children:d.operator}):null]},p.userId))]},N))})}),m?t.jsx(E,{titleComponent:t.jsx(U,{children:a.deleteApprovalRuleTitle}),descriptionComponent:t.jsx(G,{children:a.deleteApprovalRuleDesc}),primaryButtonText:a.deleteTxt,proceedButtonVariant:"danger",secondaryButtonText:a.cancelBtnText,action:A}):null]})},_=o.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: ${e=>s.wrapperGap.valuePx(e.windowSize)};
@@ -14,7 +14,7 @@ import{e as I,M as y,j as t,aX as D,m as H,_ as b,C as r,y as B,a0 as j,bV as E,
14
14
  border-color: ${e=>e.theme.colors.primary};
15
15
  }
16
16
  }
17
- `,O=o(F)`
17
+ `,Z=o(V)`
18
18
  display: flex;
19
19
  position: relative;
20
20
  align-items: center;
@@ -22,7 +22,7 @@ import{e as I,M as y,j as t,aX as D,m as H,_ as b,C as r,y as B,a0 as j,bV as E,
22
22
  text-align: center;
23
23
  width: ${e=>s.sectionWidth.valuePx(e.windowSize)};
24
24
  gap: ${i.sp2};
25
- `,Z=o.div`
25
+ `,K=o.div`
26
26
  align-items: center;
27
27
  display: flex;
28
28
  justify-content: center;
@@ -141,7 +141,7 @@ import{e as I,M as y,j as t,aX as D,m as H,_ as b,C as r,y as B,a0 as j,bV as E,
141
141
  `,ae=o.div`
142
142
  display: flex;
143
143
  gap: ${i.sp5};
144
- `,ne=o(q)`
144
+ `,ne=o(J)`
145
145
  width: ${i.sp3};
146
146
  height: ${i.sp3};
147
147
  cursor: pointer;
@@ -149,7 +149,7 @@ import{e as I,M as y,j as t,aX as D,m as H,_ as b,C as r,y as B,a0 as j,bV as E,
149
149
  &:hover {
150
150
  color: ${S.important};
151
151
  }
152
- `,pe=o(J)`
152
+ `,pe=o(O)`
153
153
  width: ${i.sp3};
154
154
  height: ${i.sp3};
155
155
  cursor: pointer;
@@ -157,7 +157,7 @@ import{e as I,M as y,j as t,aX as D,m as H,_ as b,C as r,y as B,a0 as j,bV as E,
157
157
  &:hover {
158
158
  color: ${e=>e.theme.colors.primary};
159
159
  }
160
- `,de=o(_)`
160
+ `,de=o(F)`
161
161
  width: ${i.sp4};
162
162
  height: ${i.sp4};
163
163
  color: ${e=>e.theme.colors.hero};
@@ -227,7 +227,7 @@ import{e as I,M as y,j as t,aX as D,m as H,_ as b,C as r,y as B,a0 as j,bV as E,
227
227
  border-color: ${e=>e.theme.colors.primary};
228
228
  }
229
229
  margin-bottom: ${i.sp6};
230
- `,we=o(V)`
230
+ `,we=o(q)`
231
231
  width: ${i.sp3};
232
232
  height: ${i.sp3};
233
233
  `,ge=o.div`
@@ -1,4 +1,4 @@
1
- import{Y as W,e as f,a2 as ee,l as g,M,j as e,aX as ie,K as B,_ as C,c as x,o as l,s as le,c7 as se,u as U,a6 as L,B as oe,C as re,f as S,c9 as te,a7 as ae,ap as ne,r as de}from"./index-tsOp9BQk.js";import{b as u,n as s}from"./vendor-rkTZJa59.js";import{x as ce}from"./MeetingCalenderPopup-CCW2D5Ua-AdsUfqxp.js";import{m as pe}from"./VideoPopup-DjHyf6Dq-Caoe-41_.js";import{M as z}from"./usp-line-BBd1wKwW-u-VMxix8.js";import"./mui-C42whWwM.js";import"./analytics-B3n5JGPc.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-BDNqpTKX.js";const A="https://storage.googleapis.com/zeni-apis.appspot.com/images/Billpay-Light.png",D="https://storage.googleapis.com/zeni-apis.appspot.com/images/Billpay-Dark.png",xe={midContainerMarginBottom:new re(de[5],44)},me=s.div`
1
+ import{Y as _,e as f,a2 as ee,l as g,B as M,j as e,aX as ie,K as B,$ as C,c as x,o as l,r as le,c7 as se,u as U,a6 as L,n as oe,C as re,g as S,c9 as te,a7 as ae,ap as ne,q as de}from"./index-C3eIsUEB.js";import{b as u,n as s}from"./vendor-rkTZJa59.js";import{x as ce}from"./MeetingCalenderPopup-CAh7iae0-BpiINuek.js";import{m as pe}from"./VideoPopup-SdlRHLkM-0X18VPqO.js";import{M as z}from"./usp-line-BBd1wKwW-u-VMxix8.js";import"./mui-C42whWwM.js";import"./analytics-B3n5JGPc.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-BDNqpTKX.js";const A="https://storage.googleapis.com/zeni-apis.appspot.com/images/Billpay-Light.png",D="https://storage.googleapis.com/zeni-apis.appspot.com/images/Billpay-Dark.png",xe={midContainerMarginBottom:new re(de[5],44)},me=s.div`
2
2
  display: flex;
3
3
  flex: 1 1 auto;
4
4
  min-height: 100%;
@@ -35,7 +35,7 @@ import{Y as W,e as f,a2 as ee,l as g,M,j as e,aX as ie,K as B,_ as C,c as x,o as
35
35
  align-content: center;
36
36
  justify-content: center;
37
37
  align-items: center;
38
- `,K=s.div`
38
+ `,q=s.div`
39
39
  margin-left: ${i=>i.windowSize==="small"?l.sp0:l.sp6};
40
40
  margin-bottom: ${i=>i.windowSize==="small"?l.sp4:l.sp0};
41
41
  background: ${i=>i.theme.colors.grey3};
@@ -63,11 +63,11 @@ import{Y as W,e as f,a2 as ee,l as g,M,j as e,aX as ie,K as B,_ as C,c as x,o as
63
63
  color: ${i=>i.theme.colors.champion};
64
64
  `,d=s.div``,c=s.div`
65
65
  padding-left: ${l.sp3};
66
- `,V=s(z)`
66
+ `,K=s(z)`
67
67
  color: ${S.graphColor16Dark};
68
- `,Z=s(z)`
68
+ `,V=s(z)`
69
69
  color: ${S.graphColor09Dark};
70
- `,q=s(z)`
70
+ `,Z=s(z)`
71
71
  color: ${S.graphColor28Dark};
72
72
  `,je=s(oe)`
73
73
  margin: ${l.sp3} auto;
@@ -81,4 +81,4 @@ import{Y as W,e as f,a2 as ee,l as g,M,j as e,aX as ie,K as B,_ as C,c as x,o as
81
81
  `,$e=s(L)`
82
82
  margin: ${i=>i.windowSize==="small"?l.sp1:`auto ${l.sp5}`};
83
83
  color: ${i=>i.theme.colors.grey1};
84
- `,o=M.getLocalizedStrings().spendManagement.billPay.billPayPromo,t=M.getLocalizedStrings().commonSetUp.businessVerification.terms,De=({billPaySetupView:i,analytics:r,meetingUrl:O,videoUrl:Q,onButtonClick:X,onBackClick:Y,onSetupBillPaySuccess:b,onClickMenuIcon:F})=>{const h=W(),a=f(),{billPayTermsDetails:p}=i,[H,J]=u.useState(!1),[N,v]=u.useState(!1),k=ee(p?.fetchStatus.fetchState);u.useEffect(()=>{k==="In-Progress"&&p?.fetchStatus.fetchState==="Completed"&&b?.()},[k,b,p?.fetchStatus]);const _=()=>{r?.trackBillPayPromoScheduleDemo(),v(!0)},G=g.hasBillPayAdminLevelAccess(h.loggedInUserRoleMap),P=g.hasBillPayAccess(h.loggedInUserRoleMap)&&!G,T=P?o.setupNonAccessableUsersPromoText:o.promoText;return e.jsxs(me,{children:[H===!0?e.jsx(pe,{onCancelClick:()=>{J(!1)},videoUrl:Q}):null,N===!0?e.jsx(ce,{onCancelClick:()=>{v(!1)},meetingUrl:O}):null,e.jsx(ie,{title:o.title,onBackClick:Y,showBackButton:!g.hasOnlyBillPayAccess(h.loggedInUserRoleMap),showMenuIcon:a==="small"||a==="medium-compact",onClickMenuIcon:F,source:"BillPayPromoPage"}),e.jsxs(he,{windowSize:a,children:[a==="small"?e.jsx(ue,{children:T}):e.jsx(ge,{children:T}),a==="small"?e.jsx(fe,{}):e.jsx(Se,{}),P===!1?e.jsxs(we,{children:[e.jsxs(ye,{windowSize:a,children:[e.jsx(B,{variant:"secondary",label:o.scheduleDemoButton,onClick:_,"data-testid":C("billpay-schedule-demo-button")}),e.jsx($e,{windowSize:a,children:o.orText}),e.jsx(B,{variant:"primary",label:o.setupBillPayButton,loading:p?.fetchStatus.fetchState==="In-Progress",onClick:X,"data-testid":C("billpay-setup-button")})]}),e.jsxs(je,{children:[o.terms.terms1,e.jsx(x,{href:t.consentUrl,linkText:t.consent}),t.term2,e.jsx(x,{href:t.depositUrl,linkText:t.depositTerms}),t.term3,e.jsx(x,{href:t.privacyPolicyUrl,onZeniLinkClick:()=>(r?.trackBillPayPrivacyPolicy(),!0),linkText:t.privacy}),t.term4,e.jsx(x,{href:t.tosUrl,onZeniLinkClick:()=>(r?.trackBillPayAgreement(),!0),linkText:t.tos}),t.term5,o.terms.terms3]})]}):null]})]})},fe=()=>{const i=U(),r=f();return e.jsxs(I,{windowSize:r,children:[e.jsx(E,{windowSize:r,children:e.jsx(K,{windowSize:r,children:i.mode==="dark"?e.jsx(m,{src:D,alt:"forecast-promo",style:{width:"100%",height:"auto"},loading:"lazy"}):e.jsx(m,{src:A,alt:"forecast-promo",style:{width:"100%",height:"auto"},loading:"lazy"})})}),e.jsxs(R,{windowSize:r,children:[e.jsxs(n,{windowSize:r,children:[e.jsx(d,{children:e.jsx(q,{})}),e.jsxs(c,{children:[e.jsx($,{children:o.fullyManagedText.bold}),e.jsx(y,{children:o.fullyManagedText.regular})]})]}),e.jsxs(n,{windowSize:r,children:[e.jsx(d,{children:e.jsx(Z,{})}),e.jsxs(c,{children:[e.jsx($,{children:o.multiLevelApprovalText.bold}),e.jsx(y,{children:o.multiLevelApprovalText.regular})]})]}),e.jsxs(n,{windowSize:r,children:[e.jsx(d,{children:e.jsx(V,{})}),e.jsxs(c,{children:[e.jsx($,{children:o.aiPoweredText.bold}),e.jsx(y,{children:o.aiPoweredText.regular})]})]})]})]})},Se=()=>{const i=U(),r=f();return e.jsxs(I,{windowSize:r,children:[e.jsxs(R,{windowSize:r,children:[e.jsxs(n,{windowSize:r,style:{width:"376px"},children:[e.jsx(d,{children:e.jsx(q,{})}),e.jsxs(c,{children:[e.jsx(j,{children:o.fullyManagedText.bold}),e.jsx(w,{children:o.fullyManagedText.regular})]})]}),e.jsxs(n,{windowSize:r,style:{width:"376px"},children:[e.jsx(d,{children:e.jsx(Z,{})}),e.jsxs(c,{children:[e.jsx(j,{children:o.multiLevelApprovalText.bold}),e.jsx(w,{children:o.multiLevelApprovalText.regular})]})]}),e.jsxs(n,{windowSize:r,style:{width:"376px"},children:[e.jsx(d,{children:e.jsx(V,{})}),e.jsxs(c,{children:[e.jsx(j,{children:o.aiPoweredText.bold}),e.jsx(w,{children:o.aiPoweredText.regular})]})]})]}),e.jsx(E,{windowSize:r,children:e.jsx(K,{windowSize:r,children:i.mode==="dark"?e.jsx(m,{src:D,alt:"forecast-promo",style:{width:"615px",height:"402px"},loading:"lazy"}):e.jsx(m,{src:A,alt:"forecast-promo",style:{width:"615px",height:"402px"},loading:"lazy"})})})]})};export{De as default};
84
+ `,o=M.getLocalizedStrings().spendManagement.billPay.billPayPromo,t=M.getLocalizedStrings().commonSetUp.businessVerification.terms,De=({billPaySetupView:i,analytics:r,meetingUrl:O,videoUrl:Q,onButtonClick:X,onBackClick:Y,onSetupBillPaySuccess:b,onClickMenuIcon:F})=>{const h=_(),a=f(),{billPayTermsDetails:p}=i,[H,J]=u.useState(!1),[N,v]=u.useState(!1),k=ee(p?.fetchStatus.fetchState);u.useEffect(()=>{k==="In-Progress"&&p?.fetchStatus.fetchState==="Completed"&&b?.()},[k,b,p?.fetchStatus]);const G=()=>{r?.trackBillPayPromoScheduleDemo(),v(!0)},W=g.hasBillPayAdminLevelAccess(h.loggedInUserRoleMap),P=g.hasBillPayAccess(h.loggedInUserRoleMap)&&!W,T=P?o.setupNonAccessableUsersPromoText:o.promoText;return e.jsxs(me,{children:[H===!0?e.jsx(pe,{onCancelClick:()=>{J(!1)},videoUrl:Q}):null,N===!0?e.jsx(ce,{onCancelClick:()=>{v(!1)},meetingUrl:O}):null,e.jsx(ie,{title:o.title,onBackClick:Y,showBackButton:!g.hasOnlyBillPayAccess(h.loggedInUserRoleMap),showMenuIcon:a==="small"||a==="medium-compact",onClickMenuIcon:F,source:"BillPayPromoPage"}),e.jsxs(he,{windowSize:a,children:[a==="small"?e.jsx(ue,{children:T}):e.jsx(ge,{children:T}),a==="small"?e.jsx(fe,{}):e.jsx(Se,{}),P===!1?e.jsxs(we,{children:[e.jsxs(ye,{windowSize:a,children:[e.jsx(B,{variant:"secondary",label:o.scheduleDemoButton,onClick:G,"data-testid":C("billpay-schedule-demo-button")}),e.jsx($e,{windowSize:a,children:o.orText}),e.jsx(B,{variant:"primary",label:o.setupBillPayButton,loading:p?.fetchStatus.fetchState==="In-Progress",onClick:X,"data-testid":C("billpay-setup-button")})]}),e.jsxs(je,{children:[o.terms.terms1,e.jsx(x,{href:t.consentUrl,linkText:t.consent}),t.term2,e.jsx(x,{href:t.depositUrl,linkText:t.depositTerms}),t.term3,e.jsx(x,{href:t.privacyPolicyUrl,onZeniLinkClick:()=>(r?.trackBillPayPrivacyPolicy(),!0),linkText:t.privacy}),t.term4,e.jsx(x,{href:t.tosUrl,onZeniLinkClick:()=>(r?.trackBillPayAgreement(),!0),linkText:t.tos}),t.term5,o.terms.terms3]})]}):null]})]})},fe=()=>{const i=U(),r=f();return e.jsxs(I,{windowSize:r,children:[e.jsx(E,{windowSize:r,children:e.jsx(q,{windowSize:r,children:i.mode==="dark"?e.jsx(m,{src:D,alt:"forecast-promo",style:{width:"100%",height:"auto"},loading:"lazy"}):e.jsx(m,{src:A,alt:"forecast-promo",style:{width:"100%",height:"auto"},loading:"lazy"})})}),e.jsxs(R,{windowSize:r,children:[e.jsxs(n,{windowSize:r,children:[e.jsx(d,{children:e.jsx(Z,{})}),e.jsxs(c,{children:[e.jsx($,{children:o.fullyManagedText.bold}),e.jsx(y,{children:o.fullyManagedText.regular})]})]}),e.jsxs(n,{windowSize:r,children:[e.jsx(d,{children:e.jsx(V,{})}),e.jsxs(c,{children:[e.jsx($,{children:o.multiLevelApprovalText.bold}),e.jsx(y,{children:o.multiLevelApprovalText.regular})]})]}),e.jsxs(n,{windowSize:r,children:[e.jsx(d,{children:e.jsx(K,{})}),e.jsxs(c,{children:[e.jsx($,{children:o.aiPoweredText.bold}),e.jsx(y,{children:o.aiPoweredText.regular})]})]})]})]})},Se=()=>{const i=U(),r=f();return e.jsxs(I,{windowSize:r,children:[e.jsxs(R,{windowSize:r,children:[e.jsxs(n,{windowSize:r,style:{width:"376px"},children:[e.jsx(d,{children:e.jsx(Z,{})}),e.jsxs(c,{children:[e.jsx(j,{children:o.fullyManagedText.bold}),e.jsx(w,{children:o.fullyManagedText.regular})]})]}),e.jsxs(n,{windowSize:r,style:{width:"376px"},children:[e.jsx(d,{children:e.jsx(V,{})}),e.jsxs(c,{children:[e.jsx(j,{children:o.multiLevelApprovalText.bold}),e.jsx(w,{children:o.multiLevelApprovalText.regular})]})]}),e.jsxs(n,{windowSize:r,style:{width:"376px"},children:[e.jsx(d,{children:e.jsx(K,{})}),e.jsxs(c,{children:[e.jsx(j,{children:o.aiPoweredText.bold}),e.jsx(w,{children:o.aiPoweredText.regular})]})]})]}),e.jsx(E,{windowSize:r,children:e.jsx(q,{windowSize:r,children:i.mode==="dark"?e.jsx(m,{src:D,alt:"forecast-promo",style:{width:"615px",height:"402px"},loading:"lazy"}):e.jsx(m,{src:A,alt:"forecast-promo",style:{width:"615px",height:"402px"},loading:"lazy"})})})]})};export{De as default};