@zeniai/web-cockpit-ui 1.14.49-qa → 1.14.50-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 (251) hide show
  1. package/dist/assets/{ACHDetailsPage-Sg7hdGqd-CCXprbhT.js → ACHDetailsPage-Bk-T9zeA-CfJ6MKab.js} +3 -3
  2. package/dist/assets/{AIPerformancePage-ChnBEIPH-4_euKIvp.js → AIPerformancePage-DlVvPiye--DdUUWgj.js} +33 -33
  3. package/dist/assets/{AccountInfoPage-BxnQEiJ7-B6EmYPv_.js → AccountInfoPage-4a5_z9Mj-DMFU6f23.js} +4 -4
  4. package/dist/assets/{AccountInfoPageContent-DNUp3TON-qdMNKklV.js → AccountInfoPageContent-DevYKy6p-CMullRtM.js} +19 -19
  5. package/dist/assets/{AccountLockedInfoModal-CA152nkz-DzCD-JUi.js → AccountLockedInfoModal-BvtyA_xO-CmYw1Jj0.js} +3 -3
  6. package/dist/assets/{AccountReconDetailsDrawerPage-C2rkkVPs-CQwYzCjP.js → AccountReconDetailsDrawerPage-BXEQ6cqS-j66Ucrn-.js} +12 -12
  7. package/dist/assets/{AccountRow-36Vtwpnr-4z2Yans3.js → AccountRow---y_a4hQ-CjUH_owU.js} +11 -11
  8. package/dist/assets/{AccountsPromoCardStack-C2HYR94b-CpKQoFz3.js → AccountsPromoCardStack-o9Og7QNk-DK3bk-1Y.js} +17 -17
  9. package/dist/assets/AddAddressForCardDrawer-Blh9zJ9k-Qnts0jiB.js +6 -0
  10. package/dist/assets/{AddToWalletPage-C_3jcdka-F-DW-oAI.js → AddToWalletPage-F_5GSEK1-DfJbrH2K.js} +19 -19
  11. package/dist/assets/{AgingReportsPage-BPxROntM-BkwxFBqZ.js → AgingReportsPage-gY6j3hD1-CYYgQtbs.js} +6 -6
  12. package/dist/assets/{AllUserItems-D4ZSsopG-CbtLJ7dq.js → AllUserItems-DuqNI8Rn-C7-Ck6tc.js} +4 -4
  13. package/dist/assets/{ApAgingDetailPage-Cg_V8f7G-Dtv7vAxt.js → ApAgingDetailPage-BCIZ807--CCB1bmdU.js} +5 -5
  14. package/dist/assets/{AppBasePage-6i0Pu1mT-CI0gWqTJ.js → AppBasePage-Cju4WpBd-B7EKJOCZ.js} +7 -7
  15. package/dist/assets/{AppDrawerContent-B6_iNfLZ-BBNlUFgb.js → AppDrawerContent-CJZlwte8-BLgFIh1I.js} +4 -4
  16. package/dist/assets/{ApprovalRulesSettingsPage-BnsXfKAE-BddQmAcM.js → ApprovalRulesSettingsPage-DcFFdV1D-DwwBhpx6.js} +3 -3
  17. package/dist/assets/{ArAgingChart-DSDIg2mS-BzouD7uA.js → ArAgingChart-B_ybJjur-DHM_zS9S.js} +1 -1
  18. package/dist/assets/{ArAgingDetailPage-BYb9qi8c-3T0IpoxH.js → ArAgingDetailPage-CXBgcuJx-BSdM7AD1.js} +4 -4
  19. package/dist/assets/AttachmentView-D9MocUS9-BtgOsoHb.js +101 -0
  20. package/dist/assets/{BankAccountSection-CwYIBEbQ-S9Np9Ygv.js → BankAccountSection-CFnXlTaa-wnOEAJae.js} +4 -4
  21. package/dist/assets/{BankAccountWarningSection-DPIyvB6i-pfBOIjCV.js → BankAccountWarningSection-Dl7DA-Xf-Bk2O3H_M.js} +4 -4
  22. package/dist/assets/{BankConnectionsSettingsPage-O03gMCgp-DASDTUYQ.js → BankConnectionsSettingsPage-p7NTe5UU-CDYUeY8o.js} +29 -29
  23. package/dist/assets/{BillDetailPage-D-fa_jc1-BleJmAH0.js → BillDetailPage-Dy7FjtFP-DCGKKisv.js} +6 -6
  24. package/dist/assets/{BillPayApprovalRuleDetailPage-D_A4wH0g-B-75pSuf.js → BillPayApprovalRuleDetailPage-BkROIItP-FF3IQxfd.js} +2 -2
  25. package/dist/assets/{BillPayApprovalRulesPage-gdOVuTqR-BszEmrA8.js → BillPayApprovalRulesPage-wnxmErWK-CnIadX77.js} +7 -7
  26. package/dist/assets/{BillPayPromoPage-SFpIScHQ-FG20wQ1f.js → BillPayPromoPage-B09wLq8f-CG5fEZdp.js} +7 -7
  27. package/dist/assets/BillPaySetUpPage-bK5uUxWL-CxvMnvOZ.js +42 -0
  28. package/dist/assets/{BillingSettingsPage-CdaNgKMv-gAn_GvVH.js → BillingSettingsPage-yqdPoo5n-C-yi5L8L.js} +6 -6
  29. package/dist/assets/{BillsBulkReviewDrawerPage-DPgrXGy0-CQlJtKA-.js → BillsBulkReviewDrawerPage-BPoUzM5h-BT57ZA9A.js} +1 -1
  30. package/dist/assets/{BoxItem-Bla_vZe9-D4jxptTn.js → BoxItem-BwOmI0eo-Bg_oDJrZ.js} +1 -1
  31. package/dist/assets/BusinessVerificationPage-DliZ1mtV-DeT5LWZH.js +140 -0
  32. package/dist/assets/{CardNumberSubText-B-HsVbRQ-BLIziZ0V.js → CardNumberSubText-CAQ8mWuF-vKMkb_aM.js} +1 -1
  33. package/dist/assets/{CashbackDetailPage-gIJ-1lJF-BO5TRo9Z.js → CashbackDetailPage-B1XEtXzZ-1-2pfDRY.js} +17 -17
  34. package/dist/assets/{ChargeCardDetailPage-Dgyl5IJV-DazPQgg3.js → ChargeCardDetailPage-C35g3tyS-Cr_XhDe3.js} +21 -21
  35. package/dist/assets/{ChargeCardListPage-CgN69uh_-DKDrh90W.js → ChargeCardListPage-DpJ2ukG9-Chnlo_Ls.js} +9 -9
  36. package/dist/assets/{ChargeCardListTable-Bq3FUrUG-FyrnND8b.js → ChargeCardListTable-0mvBVaVR-DezuEV69.js} +26 -26
  37. package/dist/assets/{ChargeCardPromoPage-DqDd3QeF-BbqMx9NQ.js → ChargeCardPromoPage-xcfRobP3-CBiQn6_2.js} +7 -7
  38. package/dist/assets/{ChargeCardSetupPage-CBP4-JyP-NCDgse98.js → ChargeCardSetupPage-CHK4_mR3-uQ6PE_iN.js} +2 -2
  39. package/dist/assets/{ChargeCardStatementsPage-CVJyNhXt-Di4REK7T.js → ChargeCardStatementsPage-B746tyaI-BpHM8ktT.js} +8 -8
  40. package/dist/assets/{ChargeCardUtils-DaDe1sIq-NwQ1CJ2W.js → ChargeCardUtils-Bel9RKog-BYoByp7T.js} +1 -1
  41. package/dist/assets/{ChaseOverlay-C1SVk4v1-DW3UeCAS.js → ChaseOverlay-Cni-YJBq-ki7qKNfn.js} +2 -2
  42. package/dist/assets/CheckDepositDrawerPage-h5dYs8n1-xM7OVVph.js +206 -0
  43. package/dist/assets/{CollapsableReportTable-QtToztmP-DQt1k1-B.js → CollapsableReportTable-Bm4Knvjp-CyuCgDm7.js} +48 -48
  44. package/dist/assets/{CompanyOfficerDetailsSection-Ctoe2QDP-CQSKCmrp.js → CompanyOfficerDetailsSection-BFrN2zbs-E0-ko42y.js} +19 -19
  45. package/dist/assets/CompanyPassportCard-CFfVmwtT-DyrnlDth.js +42 -0
  46. package/dist/assets/{CompanyPassportPage-Dd53DZFe-BmsuarOf.js → CompanyPassportPage-BwuQEpR6-BzltPqSl.js} +21 -21
  47. package/dist/assets/{CompleteProfile-DlFmFq5M-ZT3wEZlQ.js → CompleteProfile-DFgQXxaw-eh46GqaL.js} +1 -1
  48. package/dist/assets/{ConfettiBurst-b3SEoaSY-CEVptNiu.js → ConfettiBurst-CNGVGH7R-OhWdZxEw.js} +1 -1
  49. package/dist/assets/{CreateOrEditVendorPage-DwvlzEci-DUaCnl0C.js → CreateOrEditVendorPage-BEOugGdV-BkOi2-LS.js} +12 -12
  50. package/dist/assets/{CreditCardPaymentDrawerPage-y5jJQGS5-BN-YeTDF.js → CreditCardPaymentDrawerPage-DL99-asT-IVw3ZmF0.js} +9 -9
  51. package/dist/assets/{CreditCardPaymentPlgSection-BbVnrMer-Db7C8egU.js → CreditCardPaymentPlgSection-Bo8bjkSd-Cj2DAE6L.js} +5 -5
  52. package/dist/assets/{CurrencySelectField-B1rl6vQ0-tIQbPb2V.js → CurrencySelectField-Cy3069QS-B4qJii4j.js} +4 -4
  53. package/dist/assets/{CustomerOnboardingActivationPage-DlFjo3Sv-DlDk6MjE.js → CustomerOnboardingActivationPage-DYHxB1DV-DG10uG78.js} +1 -1
  54. package/dist/assets/CustomerOnboardingContainerPage-DGNxouoJ-cK8xEcln.js +1 -0
  55. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-BxsQBBs2-1N-A35fF.js → CustomerOnboardingDetailPageSkeleton-C-eQB--l-D3xzBHMg.js} +10 -10
  56. package/dist/assets/CustomerOnboardingNoStepsPage-CdXpLzmq-BKo9Mc6w.js +66 -0
  57. package/dist/assets/{CustomerOnboardingPage-Cw66PfQC-pU5lcmch.js → CustomerOnboardingPage-BScJEPx_-eyx5FypG.js} +2 -2
  58. package/dist/assets/CustomerOnboardingProductSuitePage-D8hA3Lv_-DiFPqcjv.js +202 -0
  59. package/dist/assets/{Dashboard-I5fepHMP-CXiBwzdI.js → Dashboard-D5_YXdct-EKQOlNbW.js} +1 -1
  60. package/dist/assets/{DashboardReportPage-GkuxGc3t-BKXCa7xb.js → DashboardReportPage-Gq4XjHm5-CgkxriU9.js} +19 -19
  61. package/dist/assets/{DashboardSidebarBackgroundAnimation-Ba6mjrpq-CP_63791.js → DashboardSidebarBackgroundAnimation-CfSTodXy-DUwH9YlE.js} +1 -1
  62. package/dist/assets/{DepositAccTransactionItem-8pfQMKs3-DA5Rp_k5.js → DepositAccTransactionItem-CfjfIBsm-DifB7Rhh.js} +1 -1
  63. package/dist/assets/{DepositAccTransactionListPage-BiTWRxfT-BGViZ9xq.js → DepositAccTransactionListPage-BxtgMsQs-1C9yKKse.js} +8 -8
  64. package/dist/assets/{DomesticWireDetailsPage-4Dh_YZ8--DtHM1pr6.js → DomesticWireDetailsPage-BdmpuYqv-CI5W3KSh.js} +2 -2
  65. package/dist/assets/{DownloadOverlay-D6S9Obtr-D2mA2KNN.js → DownloadOverlay-B-TeCIiN-cLZkE7c6.js} +18 -18
  66. package/dist/assets/{DrawerPage-D13P_uWJ-CsKiwoDS.js → DrawerPage-BayK5Cvt-DenqrNxQ.js} +7 -7
  67. package/dist/assets/EditPeoplePage-moCKwxdw-kdnDyFe4.js +55 -0
  68. package/dist/assets/{EditReimbursementDetailPage-COg9-yb6-CILN_gSs.js → EditReimbursementDetailPage-DiRxcH2i-CqEhpelp.js} +1 -1
  69. package/dist/assets/{EntityDetailPage-BbITG8i5-CprGjm72.js → EntityDetailPage-B0_iMMXi-BFK6-vDg.js} +4 -4
  70. package/dist/assets/{EntitySummarySection-BIawu9Ww-Ceo0UhdT.js → EntitySummarySection-Bzw9paM5-CCulefX0.js} +1 -1
  71. package/dist/assets/ExpenseAutomationOverviewPage-CN8oHejg-BCXoKv-G.js +222 -0
  72. package/dist/assets/{ExpenseAutomationPage-BzqJFgyb-Czy39NPG.js → ExpenseAutomationPage-nQw-48Jn-1DFXEYwM.js} +29 -29
  73. package/dist/assets/{ExpressPayPage-ciCYdxZj-BXc9NDyl.js → ExpressPayPage-BbxW-YuU-D_hIdCft.js} +8 -8
  74. package/dist/assets/{FeaturePreviewPage-Bbbcp0Yy-Czyj_mEC.js → FeaturePreviewPage-CMFiodSD-BBGWeje6.js} +2 -2
  75. package/dist/assets/{FollowStepsSection-B6uVl1dT-B1dWDhOp.js → FollowStepsSection-s4utHS95--Y07h10n.js} +1 -1
  76. package/dist/assets/{GlobalReviewListPage-BOTtaikB-agDlR_ZV.js → GlobalReviewListPage-Ci8wGpO6-BRGgqus8.js} +5 -5
  77. package/dist/assets/HelpButton-CdHOhYwZ-vfgKqvvf.js +28 -0
  78. package/dist/assets/{InformationCardStack-Bm0Oh5VL-DjrgDLen.js → InformationCardStack-C3Q674Be-BHdplWUC.js} +2 -2
  79. package/dist/assets/InsightsCardStack-CA-O6aZn-DaypKy1-.js +79 -0
  80. package/dist/assets/{InsightsSection-wZpjHdxh-DXdKVgAu.js → InsightsSection-MD_7iYyd-CoTr4evA.js} +5 -5
  81. package/dist/assets/{IntegrationsSettingsPage-Cl-Y86Nj-D4NX5YT1.js → IntegrationsSettingsPage-Gpq_ujC4-Cz49FC1Q.js} +5 -5
  82. package/dist/assets/{InternationalWireSwiftDetailsPage-DkEpnlVz-DWJE6x6p.js → InternationalWireSwiftDetailsPage-DXQCRbA4-jvd32UXh.js} +18 -18
  83. package/dist/assets/{InternationalWireVerificationPage-Ra78kWjZ-C7XfpdHS.js → InternationalWireVerificationPage-Z9MeS_FE-CvHI3GW5.js} +13 -13
  84. package/dist/assets/{InviteFormPage-Be3Tqvh8-boDpca8x.js → InviteFormPage-CRBxUW8F-ByLwGMQx.js} +20 -20
  85. package/dist/assets/{InvitePageListView-BuooPBpK-B-O-E11Q.js → InvitePageListView-BLcD6yhf-BHIBTtPc.js} +14 -14
  86. package/dist/assets/InvitePeoplePage-B6vbKnl8-3Fr2JjFu.js +12 -0
  87. package/dist/assets/InvoiceUploadSection-C84g6m-u-CTBUGTYr.js +140 -0
  88. package/dist/assets/{IssueChargeCardPage-C_4bD6HQ-B4neH-6d.js → IssueChargeCardPage-CtwG1FQW-CIw40zi7.js} +20 -20
  89. package/dist/assets/{LabeledAddressValue-Ctk46FKq-KR-uiT2u.js → LabeledAddressValue-BbmveEDp-misv-kNS.js} +1 -1
  90. package/dist/assets/LabeledAddressValueField-BplBue9M-DBaZ2tp6.js +45 -0
  91. package/dist/assets/LabeledControlledCheckBoxField-CATsgVfE-C27gMaQw.js +16 -0
  92. package/dist/assets/{LabeledCreatableSingleSelectField-Bjh5B-q0-Co5wnrJk.js → LabeledCreatableSingleSelectField-B-m-gINB-DKWDwbZB.js} +2 -2
  93. package/dist/assets/LabeledDocumentField-pmF98M72-DhaPqfnm.js +41 -0
  94. package/dist/assets/{LabeledDropDownFormattedTextField-BX06HLc2-CSTX9KoC.js → LabeledDropDownFormattedTextField-DQRvDrH1-nhXIGcQS.js} +1 -1
  95. package/dist/assets/{LabeledText-DZVRFAkG-rHxfEtQQ.js → LabeledText-Dr7b3HNT-JqfYF6TM.js} +2 -2
  96. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-QoYZvvyE-DgWhyFpB.js → LabeledUserSingleSelectWithSubtitlesField-DucxxQKW-DpGIkkDj.js} +10 -10
  97. package/dist/assets/{LabeledZeniRolesDropDownField-D9I9Lxk2-CEybF1_R.js → LabeledZeniRolesDropDownField-Fg_p41gp-BLJgU8CM.js} +17 -17
  98. package/dist/assets/{LinkJETransactionPage-C8K00-1a-CRsvQ_9P.js → LinkJETransactionPage-CbtDoohS-BYYpt-Eb.js} +4 -4
  99. package/dist/assets/LockCardPage-CfupCyYS-DqBQdk1I.js +558 -0
  100. package/dist/assets/{LowBalancePopup-CQQrhufv-ooiA9ZXC.js → LowBalancePopup-DPfkvSKp-CZ231Z71.js} +6 -6
  101. package/dist/assets/{MagicLinkACHDetailsPage-BUGK2W6m-iQ0u98AT.js → MagicLinkACHDetailsPage-TJ1c4k1c-e1ecoiPU.js} +1 -1
  102. package/dist/assets/{MagicLinkDomesticWireDetailsPage-CdGw-8SL-BZNxp9-P.js → MagicLinkDomesticWireDetailsPage-Dp4F_O6C-BLuK26i4.js} +1 -1
  103. package/dist/assets/{MagicLinkInternationalWireDetailsPage-ioBaDPw3-BRjF2y7B.js → MagicLinkInternationalWireDetailsPage-B5TMFBsw-DE5eebOC.js} +1 -1
  104. package/dist/assets/{MagicLinkSuccessPage-BBnZ5N8r-3AvY4DIN.js → MagicLinkSuccessPage-XmGUk2UP-t-ML7fFm.js} +3 -3
  105. package/dist/assets/{MagicLinkTitleSection-C0nl5UrB-fbBcM0M6.js → MagicLinkTitleSection-B3CVACcv-CraOpOkK.js} +3 -3
  106. package/dist/assets/{MailingDetailsSection-DeaanyVd-has6jQC4.js → MailingDetailsSection-CFBmvYV_-DKWh8ntV.js} +1 -1
  107. package/dist/assets/{MeetingCalenderPopup-CGGit3Ny-CiZ-1m4B.js → MeetingCalenderPopup-Dd1Z-rK3-BN7CJUqh.js} +5 -5
  108. package/dist/assets/{Menu-BWGaQpko-C-bIfACK.js → Menu-AlNg4aZb-ezBRMKxQ.js} +1 -1
  109. package/dist/assets/{MyBankConnectionsSettingsPage-Bg_ULoVa-BjIIqVWR.js → MyBankConnectionsSettingsPage-De_mXouS-CFWPRCdV.js} +9 -9
  110. package/dist/assets/{MyPendingActivationChargeCardListPage-DulXydFx-CNXPW9Gb.js → MyPendingActivationChargeCardListPage-CdDF0PA3-CqrUarF6.js} +1 -1
  111. package/dist/assets/{MyProfileSettingsPage-C2p1O3ct-BgyD_hf0.js → MyProfileSettingsPage-BE6GsTMH-CiY2hNHx.js} +6 -6
  112. package/dist/assets/{NavBarWithPicker-BCLF3DOO-CA9gmzsQ.js → NavBarWithPicker-CTxQ7r97-Dg-pVfaM.js} +4 -4
  113. package/dist/assets/{NavigationArrow-BPrl00va-D8RNnAeo.js → NavigationArrow-DCZBdY6w-DXzWpT0y.js} +1 -1
  114. package/dist/assets/{NavigationDots-O0W_nmju-D_O1-ums.js → NavigationDots-D6hsvkMX-Dc9TKWSO.js} +3 -3
  115. package/dist/assets/{NewGlobalMerchantPage-D6e-akD5-Bzs9Ucjn.js → NewGlobalMerchantPage-D5Mo9EMy-C_x_UB26.js} +7 -7
  116. package/dist/assets/{NoDataChart-C9yfpsin-CDRDTUOe.js → NoDataChart-CI5rKAJf-IpywfvaI.js} +1 -1
  117. package/dist/assets/{NoDataTable-DKv0uhi4-Cpc7fkkE.js → NoDataTable-C4YVpnKy-bA2EH_fQ.js} +1 -1
  118. package/dist/assets/{NotFoundPage-B5ou4w73-NuKoBPie.js → NotFoundPage-Dx56yYo3-CJc22lOw.js} +4 -4
  119. package/dist/assets/{NotificationSettingsPage-BmrtRoZK-DZ_ZG3D7.js → NotificationSettingsPage-hOwPscnS-CcQKVe46.js} +8 -8
  120. package/dist/assets/{NotificationsListConfig-DQ4Ho61v-BnotEG6V.js → NotificationsListConfig-DV_yEagM-CKLpxpSM.js} +1 -1
  121. package/dist/assets/{NotificationsPage-UraNN_iD-BUGQxEcG.js → NotificationsPage-B83do0my-DGcJO7Z-.js} +25 -25
  122. package/dist/assets/{OpExByVendorPage-BRPHj5T9-DYtyW38v.js → OpExByVendorPage-WMTGx5ZH-CmZADN9R.js} +5 -5
  123. package/dist/assets/{OverlayContainerPage-B8Rk53Fe-CfTKp3Gf.js → OverlayContainerPage-CZaWUQTs-taUnIcxu.js} +1 -1
  124. package/dist/assets/{PandLWithForecastPage-BMjOYb2a-Dcnt7HVK.js → PandLWithForecastPage-DyROxN6C-DH_Ynpil.js} +9 -9
  125. package/dist/assets/{PaymentAccountSetupBillingAddressSection-B38HgGEM-DgE8Vczk.js → PaymentAccountSetupBillingAddressSection-CHwhW69s-PBAsz7VT.js} +7 -7
  126. package/dist/assets/{PeoplePage-BpMkRqCs-CsT9OFKk.js → PeoplePage-DzRLyM45-C2knIeVL.js} +11 -11
  127. package/dist/assets/{PortfolioAllocationFormPage-tnv4t4QU-CrHZ8aTl.js → PortfolioAllocationFormPage-CIvcJ9hx-C0L8itY1.js} +9 -9
  128. package/dist/assets/{PortfolioDetails-BQCQctOT-BcjcqURs.js → PortfolioDetails-8UvaROaS-BV0kfCx8.js} +15 -15
  129. package/dist/assets/{ProductsCarousel-BUJiJFiX-BzDzGkeP.js → ProductsCarousel-Di0lW14P-gv6t1pzJ.js} +3 -3
  130. package/dist/assets/{PromoBaseCards-DwBIZ04X-BjLiNb-B.js → PromoBaseCards-zfJOT86M-Cxis92cB.js} +1 -1
  131. package/dist/assets/{QBOConnectionDialog-MjldLygA-F5XVDM0C.js → QBOConnectionDialog-DYCNzDCW-XbK2K7lq.js} +4 -4
  132. package/dist/assets/{QBOSetupSection-BknE7gT4-DY5jHtnb.js → QBOSetupSection-DtzlFUKs-CMurUb08.js} +6 -6
  133. package/dist/assets/ReimbursementApprovalRuleDetailPage-DoWiv_tN-DEovISqR.js +26 -0
  134. package/dist/assets/{ReimbursementApprovalRulesPage-C0Plqj93-CfcH1Xln.js → ReimbursementApprovalRulesPage-Drav6sw6-CwgLZUAr.js} +40 -40
  135. package/dist/assets/ReimbursementDetailPage-ByCpOGLu-Dsc_sGAc.js +314 -0
  136. package/dist/assets/{ReimbursementPromoPage-X_lNy9W2-C1pHC8eu.js → ReimbursementPromoPage-DOhnXgWW-DuNdw2WY.js} +8 -8
  137. package/dist/assets/{ReimbursementSetUpPage-DJrOp98g-BrQav5BP.js → ReimbursementSetUpPage-B6m_3OjH-BpWl6ujY.js} +4 -4
  138. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-BZL9RVfR-CP3PDh7c.js → ReimbursementsBulkReviewDrawerPage-DSbjVLzo-CVRSkvAX.js} +1 -1
  139. package/dist/assets/{ReloadCard-aqfmXbU5-CNPn4sKt.js → ReloadCard-C7TwZcxr-vlQuHsih.js} +5 -5
  140. package/dist/assets/{ReportTableViewSelector-D93qno__-2IAEqt0G.js → ReportTableViewSelector-Dw5N3kLR-QNx8XxoO.js} +7 -7
  141. package/dist/assets/{ReportsPage-B0G-7pwv-CrA7-rtj.js → ReportsPage-Cn38qn0l-B-nkuuwa.js} +9 -9
  142. package/dist/assets/{RevenueChart-BRlahWs9-BWAL9tc3.js → RevenueChart-Cl6AG_A1-Da4QIV8W.js} +16 -16
  143. package/dist/assets/ReviewDetailsPage-DOU42eYb-DP8hDUqG.js +290 -0
  144. package/dist/assets/{ReviewOverlay-yCaY1z8K-DkuN1BhY.js → ReviewOverlay-Cekl52Tp-C4ta_oQT.js} +13 -13
  145. package/dist/assets/{RoleWithToolTip-C--9WRHn-02oWnK_S.js → RoleWithToolTip-Cxn0Q3kG-C5ZkEEHf.js} +4 -4
  146. package/dist/assets/{ScheduleDetailsFixedAssetsPage-hn74AoeS-NWP9KPHn.js → ScheduleDetailsFixedAssetsPage-By4ikZQn-BUboWldf.js} +4 -4
  147. package/dist/assets/{ScheduleDetailsPage-DxdxAx1S-B1IjQUUT.js → ScheduleDetailsPage-CMCqsjrb-DIQmIy8n.js} +4 -4
  148. package/dist/assets/{ScheduleSequenceTable-Dq0ZRi2H-8XOSgJiv.js → ScheduleSequenceTable-DNVQ2kVn-kr2CXE0a.js} +49 -49
  149. package/dist/assets/{ScreenRoutes-DDAOQ4Jo.js → ScreenRoutes-CngnFJ28.js} +1 -1
  150. package/dist/assets/{SetUpAccountSection-NP9u54_o-Db7whHUF.js → SetUpAccountSection-nZ68xEMF-CKqnZuo_.js} +8 -8
  151. package/dist/assets/{SetUpDefaultSection-BdVOXSh8-M71dwMGe.js → SetUpDefaultSection-e5I_whKg-CWXMi4yS.js} +2 -2
  152. package/dist/assets/SignIn-e-7z9G0X-C1YFpsfM.js +448 -0
  153. package/dist/assets/{SignInScreen-BzmXpPCl.js → SignInScreen-C77r6V5a.js} +1 -1
  154. package/dist/assets/{SpendManagementListViewPage-CfzCjazp-DIvePMuJ.js → SpendManagementListViewPage-BPfU_Lec-BnogwbnW.js} +6 -6
  155. package/dist/assets/{SpendManagementPerTabPage-CBOlK1hg-CNGRPHtG.js → SpendManagementPerTabPage-CIVfUAF0-7NlzZC3p.js} +48 -48
  156. package/dist/assets/{SpendManagementSection-DFVWVBv8-BaXurz43.js → SpendManagementSection-DilGVAEg-UyhbLf0x.js} +5 -5
  157. package/dist/assets/{SpendMgmtSetupAccountSection-ZPHoUnnr-BJcUWi60.js → SpendMgmtSetupAccountSection-BW8Ip5wi-CkkTNUfg.js} +4 -4
  158. package/dist/assets/{StatementItem-CwkYfX3v-BfxIXxV9.js → StatementItem-li8rxfjF-DE4xpTDg.js} +2 -2
  159. package/dist/assets/{StatementsPage-DpjcrDLZ-BOUbVppT.js → StatementsPage-D0VgSNCy-Bi9vK3HK.js} +1 -1
  160. package/dist/assets/{StatusSwitcher-6n_dRY-n-CInUBfU5.js → StatusSwitcher-Dhw4Hsko-VYfBZyYc.js} +2 -2
  161. package/dist/assets/{SubTabSwitcher-DEXr9JG8-BesAFLAS.js → SubTabSwitcher-CaDODjQq-zPof6WQa.js} +1 -1
  162. package/dist/assets/{SummaryCard-DY8o3K8p-Br_aBvet.js → SummaryCard-BZp6ZbhG-D2hcdAY2.js} +1 -1
  163. package/dist/assets/{TaskManagementPage-V-99_2Xz-DDUfSx7p.js → TaskManagementPage-CdzxcwSR-FTY6PAR3.js} +14 -14
  164. package/dist/assets/{TimeRangeSwitcher-5vzTnmwD-CRsZg2b0.js → TimeRangeSwitcher-BsecxqSf-68LRPk1P.js} +6 -6
  165. package/dist/assets/{TimeframeSwitcher-B1ZBKWlB-7HKYiomL.js → TimeframeSwitcher-CXQS6_Dj-pJvRjYVF.js} +1 -1
  166. package/dist/assets/{TimeframeSwitcherWithToggle-C8w7NoSs-DeUtdJdm.js → TimeframeSwitcherWithToggle-xUcT4SAn-Dxw3KxOM.js} +1 -1
  167. package/dist/assets/{TopExCard-CflRvGFb-BSDi9hbk.js → TopExCard-DpBmbBOH-rqB_17zU.js} +5 -5
  168. package/dist/assets/{TopExDetailPage-BNouRPM_-V8w0Nl4l.js → TopExDetailPage-CXYcu4vC-BudfE4e2.js} +21 -21
  169. package/dist/assets/{TransactionDetailPage-uJRfI4fh-YYHpyB0Q.js → TransactionDetailPage-C-oGYPM2-XIgrFLJc.js} +23 -23
  170. package/dist/assets/{TransactionList-C--m4NRu-I84SwAT3.js → TransactionList-d0Qe-D7V-BamSxQ9h.js} +9 -9
  171. package/dist/assets/{TransactionListBig-Cbf9p6a1-BQi6pxNr.js → TransactionListBig-By3GVBgG-Jvz7Xg_z.js} +11 -11
  172. package/dist/assets/{TransactionListPage-BXQ4Ig8E-1eaOmgJN.js → TransactionListPage-ChIGfg3A-ZqEGHvAv.js} +6 -6
  173. package/dist/assets/{TransactionVendorDetailPage-CKdVogwj-BU8bZBJz.js → TransactionVendorDetailPage-D3stMRFF-C_IPHvl6.js} +3 -3
  174. package/dist/assets/{TransferDrawerPage-BS3lnMMA-BhGqf_F6.js → TransferDrawerPage-QVYSxd-3-BFQ5htQm.js} +22 -22
  175. package/dist/assets/{TreasuryOverviewPage-U1p6PrnG-CTfDqCgy.js → TreasuryOverviewPage-CumKNGbQ-CAGR3hz2.js} +12 -12
  176. package/dist/assets/{TreasuryPromoPage-C2wmo0Ex-CAsi6MAz.js → TreasuryPromoPage-H2Zbw_Yg-DMBJJl3b.js} +8 -8
  177. package/dist/assets/{TreasurySetupPage-CMl-qGhi-DDyv6zPQ.js → TreasurySetupPage-BtUIYjn_-BvLlmakc.js} +4 -4
  178. package/dist/assets/{TreasuryStatementsPage-BdmLrhA5-Cwzb6Y-J.js → TreasuryStatementsPage-B04Ze6pO-DBs8NMkW.js} +1 -1
  179. package/dist/assets/{TreasuryTaxLetterPage-Q7prcczk-BMJV6RV_.js → TreasuryTaxLetterPage-D95U9592-A4FKzQli.js} +1 -1
  180. package/dist/assets/{TreasuryTransferOrReviewPage-CwvijEQN-CyNc0EBz.js → TreasuryTransferOrReviewPage-BhHf8lnF-DBq27s-a.js} +91 -91
  181. package/dist/assets/{TrendChart-SEWDcga_-b1UZHoM_.js → TrendChart-BkdPYoj4-D9rpAM75.js} +4 -4
  182. package/dist/assets/{TrendWithTransactions-CgSaPEFh-CJCmbHDv.js → TrendWithTransactions-CWgoVTcb-CGbGhBS1.js} +4 -4
  183. package/dist/assets/{UncategorizedAccountsMappingPage-7LqO7hHL-Qf22hqtP.js → UncategorizedAccountsMappingPage-LdRZIYp5-BtaeEGaz.js} +10 -10
  184. package/dist/assets/{UnitIntegrationPage--jgHD8q1-DGXvKzdF.js → UnitIntegrationPage-Ms9BFSjK-PPYprz9i.js} +4 -4
  185. package/dist/assets/UploadAdditionalDocumentOverlay-D6x4OGXl-CxKK3Ose.js +38 -0
  186. package/dist/assets/{Vendor2FAPopup-B0fwm9Q3-BYhSuvCf.js → Vendor2FAPopup-UmgHYXvP-pOrgh_fD.js} +1 -1
  187. package/dist/assets/{VendorACHDetailsPage-BzgsncOJ-DOkcQ5fM.js → VendorACHDetailsPage-B3mdoPp8-DRr-74cL.js} +1 -1
  188. package/dist/assets/{VendorDetailPage-CA3LTIGq-jf7ffnJX.js → VendorDetailPage-Cj6U1nII-BSRlPQ6y.js} +12 -12
  189. package/dist/assets/{VendorDomesticWireDetailsPage-Ch42jvVt-CyANzPJP.js → VendorDomesticWireDetailsPage-BrZCPlAd-BL-hjFrP.js} +1 -1
  190. package/dist/assets/{VendorFiling1099EditablePage-QjRWxn7V-BJSMNVS0.js → VendorFiling1099EditablePage-TUixssYI-v6dW0vMN.js} +12 -12
  191. package/dist/assets/{VendorFirstReviewPage-C-ONdLcA-Bipz9xJO.js → VendorFirstReviewPage-BlUNcGLE-B0NOpsas.js} +44 -44
  192. package/dist/assets/{VendorInternationalWireDetailsPage-qDx2aiDq-CLtnsjyf.js → VendorInternationalWireDetailsPage-DhHWsAne-VClJg3R1.js} +10 -10
  193. package/dist/assets/{VendorInternationalWireSwiftDetailsPage-DICOFwMp-BJ2iH1IS.js → VendorInternationalWireSwiftDetailsPage-CIvevemJ-Cnw2il7s.js} +1 -1
  194. package/dist/assets/{VendorsAccountsSection-D0f3TRGG-DGo_EPvw.js → VendorsAccountsSection-viRwhErR-BEJjt5C_.js} +4 -4
  195. package/dist/assets/{VerifyDevice-BMtMcC41-C2Aep0vv.js → VerifyDevice-l7opea4l-BtT1vRFj.js} +2 -2
  196. package/dist/assets/{VideoPlayer-DKMO88LY-CihcSZAF.js → VideoPlayer-BBVi4SOz-9SgJ3yaM.js} +1 -1
  197. package/dist/assets/{VideoPopup-2z3T5Lnh-CHZgVcWy.js → VideoPopup-CmXRuhQp-5r314mYD.js} +1 -1
  198. package/dist/assets/{WarningsDrawerPage-yRdYuhLZ-Bq-OqNLw.js → WarningsDrawerPage-Ckg9AVsj-B9emohJx.js} +2 -2
  199. package/dist/assets/{ZeniAccountDetailPage-ISiEkizf-BZ56FvfW.js → ZeniAccountDetailPage-B-jNA-tI-ms245E2y.js} +25 -25
  200. package/dist/assets/{ZeniAccountListViewPage-BTrvu_w1-Mm1U5sCA.js → ZeniAccountListViewPage-oBGTDIBN-C9aSAN9Z.js} +8 -8
  201. package/dist/assets/ZeniAccountNavBarPieces-JScxmkmi-BP103W6l.js +14 -0
  202. package/dist/assets/{ZeniAccountPromoPage-Dac1THyO-DBLjXw3q.js → ZeniAccountPromoPage-BHzfVbtI-P2leDJcs.js} +20 -20
  203. package/dist/assets/{ZeniAccountSetupPage-ZSfjnq4--2G4QtNy6.js → ZeniAccountSetupPage-DD_QA8h8-DpmP7jf1.js} +4 -4
  204. package/dist/assets/{ZeniCopyright-C4Hdl7V0-DCl3xitc.js → ZeniCopyright-BPSL51G5-DcEAxBC-.js} +1 -1
  205. package/dist/assets/ZeniTransferAmountSlider-CAiR-tiF-D35xHKkQ.js +63 -0
  206. package/dist/assets/{analyticsHelper-CpeZY9M2.js → analyticsHelper-CnRA1Gcw.js} +1 -1
  207. package/dist/assets/{analyticsHelper-CaxfROfX-BZwqcE9n.js → analyticsHelper-kwNg2DUZ-Bg-BVsZB.js} +1 -1
  208. package/dist/assets/{chartTypes-CQLwj1wn-BRADgKQf.js → chartTypes-CCFDB3ft-gWEy54C4.js} +1 -1
  209. package/dist/assets/{commonDimensions-BqqLiZ_H-X7QteB7-.js → commonDimensions-FafZVRxo-CSxm8Nzu.js} +1 -1
  210. package/dist/assets/{detailCommon-_wteS7vQ-BlDnvf72.js → detailCommon-Bk08SAcF-CmJo8a2_.js} +7 -7
  211. package/dist/assets/{downloadPdf-DqURwcIt-cyNLfpwv.js → downloadPdf-Bj4Y4BB4-D1l-PLqG.js} +1 -1
  212. package/dist/assets/{index-RcMUg6rr.js → index-dX8TSOm6.js} +72 -72
  213. package/dist/assets/{mapLoadingInProgressToTreeNode-kidLNkmQ-Dbws8prW.js → mapLoadingInProgressToTreeNode-Cx24jJa--D8U4jxjz.js} +1 -1
  214. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-BSUhjNT5-BKwhf6qT.js → mapSectionWithAcOnlyToTreeNode-BRxefLX_-DoZmzx4J.js} +1 -1
  215. package/dist/assets/{mapSpacerToTreeNode-m5nGTY8W-CzCeMk6H.js → mapSpacerToTreeNode-VUbus-r3-pBb-m1M8.js} +1 -1
  216. package/dist/assets/{mapTimeframeBalancesToTreeNode-D5QkbXkx-CsbvFuim.js → mapTimeframeBalancesToTreeNode-B6aAv6pB-C6UbW4bf.js} +1 -1
  217. package/dist/assets/{mapTimeframeBalancesToTreeNode-CHHGNXiT-Dl3JMEe8.js → mapTimeframeBalancesToTreeNode-CSScIc2H-CNAuSnEW.js} +1 -1
  218. package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-o4l_IoBF-BBotayyZ.js → mapTimeframeHeaderLoadingInProgressToTreeNode-DBDE1nuS-CTldXama.js} +1 -1
  219. package/dist/assets/{toCOABalancesWithID-bhm-pCR2-CtRyWh7a.js → toCOABalancesWithID-M4gPqViI-CcaXT71y.js} +1 -1
  220. package/dist/assets/{toChartData-3h9AvMdw-CxwHop5O.js → toChartData-CrsGFSA1-DRCqW50O.js} +1 -1
  221. package/dist/assets/{treasuryColorHelper-CJ61L8mT-DS0868j3.js → treasuryColorHelper-B8Evc_xJ-C2M6xUma.js} +1 -1
  222. package/dist/assets/{uploadAttachment-Bf61v1Xo-B7uvvQf2.js → uploadAttachment-PM-_GgYg-CTQQfxMY.js} +3 -3
  223. package/dist/assets/{uploadReceipts-CPeNTSex-DsNuxnXH.js → uploadReceipts-B3-z3hJ9-DECDgzHp.js} +1 -1
  224. package/dist/index.html +1 -1
  225. package/package.json +3 -3
  226. package/dist/assets/AddAddressForCardDrawer-BZ0RCcja-nZX6PoRd.js +0 -6
  227. package/dist/assets/AttachmentView-CdNQ2xWp-BPsXC6R_.js +0 -101
  228. package/dist/assets/BillPaySetUpPage-mD_IeiJx-DxluR9l0.js +0 -42
  229. package/dist/assets/BusinessVerificationPage-CXxO69rJ-ZjHWLeJo.js +0 -140
  230. package/dist/assets/CheckDepositDrawerPage-DSR4fX1u-ndwRTjAi.js +0 -206
  231. package/dist/assets/CompanyPassportCard-D1Qw3xp1-CzjX_y3L.js +0 -42
  232. package/dist/assets/CustomerOnboardingContainerPage-gA22hWiI-DHO0Bx78.js +0 -1
  233. package/dist/assets/CustomerOnboardingNoStepsPage-r85EAGP9-BWacMhdz.js +0 -66
  234. package/dist/assets/CustomerOnboardingProductSuitePage-DjNvBda4-6fpGm6Io.js +0 -202
  235. package/dist/assets/EditPeoplePage-DF_58Z4U-DfKImWbi.js +0 -55
  236. package/dist/assets/ExpenseAutomationOverviewPage-DleEJVpj-u_9BpHnf.js +0 -222
  237. package/dist/assets/HelpButton-CzyBnp0B-B4qln9tA.js +0 -28
  238. package/dist/assets/InsightsCardStack-DJQ_W9fy-DK1IXhJg.js +0 -79
  239. package/dist/assets/InvitePeoplePage-BN0ktc82-CX-yWmlh.js +0 -12
  240. package/dist/assets/InvoiceUploadSection-BQgfwgdt-Bu3SJ_dU.js +0 -140
  241. package/dist/assets/LabeledAddressValueField-Dg0TLzPn-CRUbVJT9.js +0 -45
  242. package/dist/assets/LabeledControlledCheckBoxField-DJSFmpIX-DXOJq1C3.js +0 -16
  243. package/dist/assets/LabeledDocumentField-BT7CRAVI-Bu18IeBT.js +0 -41
  244. package/dist/assets/LockCardPage-Cv7cc2yv-Bgylw99f.js +0 -558
  245. package/dist/assets/ReimbursementApprovalRuleDetailPage-DH75g3pT-CXqiP4jT.js +0 -26
  246. package/dist/assets/ReimbursementDetailPage-DNaaqXYR-Bh3Xalhl.js +0 -314
  247. package/dist/assets/ReviewDetailsPage-DaLjRiFW-DJFP67SX.js +0 -290
  248. package/dist/assets/SignIn-nUeTTVKC-CQFjsNXv.js +0 -329
  249. package/dist/assets/UploadAdditionalDocumentOverlay-D2Tin1CX-7rKlqc-o.js +0 -38
  250. package/dist/assets/ZeniAccountNavBarPieces-C3IR1FEp-Jc31zuuu.js +0 -14
  251. package/dist/assets/ZeniTransferAmountSlider-Co5sY7gl-DtKUG0sE.js +0 -63
@@ -1,4 +1,4 @@
1
- import{u as ve,e as je,a as Ye,cc as Xe,j as t,aY as Ze,M as re,o as i,h as se,bU as Ke,F as et,bq as tt,C as I,n as nt,s as W,ao as it,$ as We,b as ot,k as ze,cp as at,a2 as J,a8 as fe,f4 as Te,l as G,cx as ct,aT as Ne,fc as qe,fd as lt,fe as st,bx as Ee,r as k,f5 as ge,f6 as we,a0 as Se,bM as xe,Z as rt,b7 as dt,dN as He,g as ie,w as B,fb as ut,fp as pt,fq as ht,aC as mt,fr as ft}from"./index-RcMUg6rr.js";import{b as r,n}from"./vendor-rkTZJa59.js";import{r as _e}from"./mui-C42whWwM.js";import{M as Pe}from"./ChaseOverlay-C1SVk4v1-DW3UeCAS.js";import{a as gt}from"./SetUpAccountSection-NP9u54_o-Db7whHUF.js";import{z as wt,B as Ie}from"./SpendMgmtSetupAccountSection-ZPHoUnnr-BJcUWi60.js";import"./analytics-CcevxdRy.js";import"./routing-CH3KJxCW.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";import"./SetUpDefaultSection-BdVOXSh8-M71dwMGe.js";import"./ChargeCardUtils-DaDe1sIq-NwQ1CJ2W.js";import"./CreditCardPaymentPlgSection-BbVnrMer-Db7C8egU.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:Fe}}=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(Wt,{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(Gt,{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:M,onUpdatePaymentAccountStatus:_,onEstablishConnectionClick:P,onEstablishConnectionSuccess:R})=>{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),D=()=>{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 X=J(m.updateStatus.fetchState),Z=J(b.updateStatus.fetchState),ee=J(b.fetchStatus.fetchState),O=C.mode==="light"?new fe(C.colors.brandColorJadeLight):new fe(C.colors.brandColorJadeDark),Q=r.useCallback((x,Y)=>{f.trackConnectBankSuccess(l,"Settings");const Le=Y.accounts.find(Qe=>Qe.id===o?.providerAccountId)??Y.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,Y)=>{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,Y)),A(void 0),z(!1)},[f,l,o?.id,_]),{open:K,ready:ue}=Te({token:S,onSuccess:Q,onExit:te});r.useEffect(()=>{(X==="In-Progress"&&m.updateStatus.fetchState==="Completed"||Z==="In-Progress"&&b.updateStatus.fetchState==="Completed")&&(G.isVerifiedPaymentAccountProviderStatusCode(s??"")||(M("link_account",y(l)),R(y(l),l)))},[m.updateStatus.fetchState,R,M,o?.providerVerificationStatus?.code,o?.id,X,Z,b.updateStatus.fetchState,s,l]),r.useEffect(()=>{(G.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"),F=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(()=>{$&&K()},[$,K]),r.useEffect(()=>{!o?.zeniAccountId&&!F&&w(oe)},[o?.id]),r.useEffect(()=>{(s==null||s==="verification_failed"||s==="verification_expired"||G.isVerifiedStatusCode(s))&&(G.zeniDate(new Date().toISOString()).isAfter(m.expiration)||m.linkToken==null)&&M("link_account",y(l))},[]);const ne=()=>{f.trackConnectBankGetBalance(l,"Settings"),A("update_account"),M("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",Ge=a.findIndex(x=>x.id===o?.id),Je={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(Ft,{windowSize:c,children:[o!=null&&c!=="small"?t.jsx(Ot,{isDisabled:j,children:wt(Je,c,C.mode==="dark",o,Ge,!1)}):null,t.jsxs(Bt,{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:Fe.selectAccountPlaceholder,capitalizeOptions:!0,appendSublabel:!1,showLogoInSingleValue:!1,isClearable:!1,maxMenuHeight:220,valueToLogo:(x,Y)=>st(a,x,Y),valueToSubLabels:(x,Y)=>lt(a,x,Y,!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||G.zeniDate(new Date().toISOString()).isAfter(m.expiration)?M("link_account",y(l)):S!==m.linkToken?L(m.linkToken):$?K():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:Z},onUpdateLinkTokenClick:ne,onChaseInfoClick:D}):null]})]}),c==="small"?t.jsxs(Rt,{children:[o?.accountBalance?.available?t.jsx(Be,{className:"balanceLabel",children:Se("0,0[.]00",o?.accountBalance?.available)}):t.jsx(be,{children:ke}),o?.accountBalance?.lastRefreshTime?t.jsx(Me,{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(Dt,{isDisabled:j?"disabled":void 0,name:$e(l,"bankAccountSection"),placeholder:Fe.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(Mt,{windowSize:c,wrapperWidth:N[4].width,children:[o?.accountBalance?.available?t.jsx(Be,{className:"balanceLabel",children:Se("0,0[.]00",o?.accountBalance?.available)}):t.jsx(be,{children:ke}),o?.accountBalance?.lastRefreshTime?t.jsx(Me,{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 Ye,cc as Xe,j as t,a_ as Qe,M as re,o as i,h as se,bV as Ze,F as et,br as tt,C as I,m as nt,s as N,ar as it,$ as Ne,b as ot,k as ze,cp as at,a5 as J,ab as fe,f4 as Te,l as G,cx as ct,aV as We,fc as qe,fd as lt,fe as st,by as Ee,r as k,f5 as ge,f6 as we,a3 as Se,bN as xe,a2 as rt,b8 as dt,dN as He,g as ie,w as B,fb as ut,fp as pt,fq as ht,aF as mt,fr as ft}from"./index-dX8TSOm6.js";import{b as r,n}from"./vendor-rkTZJa59.js";import{r as _e}from"./mui-C42whWwM.js";import{M as Pe}from"./ChaseOverlay-Cni-YJBq-ki7qKNfn.js";import{a as gt}from"./SetUpAccountSection-nZ68xEMF-CKqnZuo_.js";import{z as wt,B as Ie}from"./SpendMgmtSetupAccountSection-BW8Ip5wi-CkkTNUfg.js";import"./analytics-CcevxdRy.js";import"./routing-CH3KJxCW.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";import"./SetUpDefaultSection-e5I_whKg-CWXMi4yS.js";import"./ChargeCardUtils-Bel9RKog-BYoByp7T.js";import"./CreditCardPaymentPlgSection-Bo8bjkSd-Cj2DAE6L.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)},W=[St,xt,yt,vt,kt],{common:{settings:Oe,strings:{hyphen:ke}},commonSetUp:{setUp:Fe}}=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(Nt,{windowSize:h,children:t.jsx(mt,{})});case"reimbursement":return t.jsx(Wt,{windowSize:h,children:t.jsx(ht,{})});case"zeni_accounts":return t.jsx(qt,{windowSize:h,children:t.jsx(We,{})});case"zeni_treasury":return t.jsx(Gt,{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),D=()=>{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 X=J(m.updateStatus.fetchState),Q=J(b.updateStatus.fetchState),ee=J(b.fetchStatus.fetchState),O=C.mode==="light"?new fe(C.colors.brandColorJadeLight):new fe(C.colors.brandColorJadeDark),K=r.useCallback((x,Y)=>{f.trackConnectBankSuccess(l,"Settings");const Le=Y.accounts.find(Ke=>Ke.id===o?.providerAccountId)??Y.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,Y)=>{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,Y)),A(void 0),z(!1)},[f,l,o?.id,_]),{open:Z,ready:ue}=Te({token:S,onSuccess:K,onExit:te});r.useEffect(()=>{(X==="In-Progress"&&m.updateStatus.fetchState==="Completed"||Q==="In-Progress"&&b.updateStatus.fetchState==="Completed")&&(G.isVerifiedPaymentAccountProviderStatusCode(s??"")||(R("link_account",y(l)),M(y(l),l)))},[m.updateStatus.fetchState,M,R,o?.providerVerificationStatus?.code,o?.id,X,Q,b.updateStatus.fetchState,s,l]),r.useEffect(()=>{(G.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"),F=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(()=>{$&&Z()},[$,Z]),r.useEffect(()=>{!o?.zeniAccountId&&!F&&w(oe)},[o?.id]),r.useEffect(()=>{(s==null||s==="verification_failed"||s==="verification_expired"||G.isVerifiedStatusCode(s))&&(G.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",Ge=a.findIndex(x=>x.id===o?.id),Je={element:t.jsx(We,{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:W[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:W[1].width,children:t.jsxs(Ft,{windowSize:c,children:[o!=null&&c!=="small"?t.jsx(Ot,{isDisabled:j,children:wt(Je,c,C.mode==="dark",o,Ge,!1)}):null,t.jsxs(Bt,{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:Fe.selectAccountPlaceholder,capitalizeOptions:!0,appendSublabel:!1,showLogoInSingleValue:!1,isClearable:!1,maxMenuHeight:220,valueToLogo:(x,Y)=>st(a,x,Y),valueToSubLabels:(x,Y)=>lt(a,x,Y,!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||G.zeniDate(new Date().toISOString()).isAfter(m.expiration)?R("link_account",y(l)):S!==m.linkToken?L(m.linkToken):$?Z():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:D}):null]})]}),c==="small"?t.jsxs(Mt,{children:[o?.accountBalance?.available?t.jsx(Be,{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:W[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(Dt,{isDisabled:j?"disabled":void 0,name:$e(l,"bankAccountSection"),placeholder:Fe.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:W[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:W[4].width,children:[o?.accountBalance?.available?t.jsx(Be,{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"};
@@ -15,7 +15,7 @@ import{u as ve,e as je,a as Ye,cc as Xe,j as t,aY as Ze,M as re,o as i,h as se,b
15
15
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
16
16
  margin-bottom: ${e=>T.productTypeContainerMarginBottom.valuePx(e.windowSize)};
17
17
  padding-right: ${i.sp3};
18
- `,zt=n(W)`
18
+ `,zt=n(N)`
19
19
  white-space: nowrap;
20
20
  overflow: hidden;
21
21
  text-overflow: ellipsis;
@@ -45,10 +45,10 @@ import{u as ve,e as je,a as Ye,cc as Xe,j as t,aY as Ze,M as re,o as i,h as se,b
45
45
  flex-wrap: wrap;
46
46
  `,It=n.div`
47
47
  display: flex;
48
- `,Be=n(W)`
48
+ `,Be=n(N)`
49
49
  display: flex;
50
50
  justify-content: flex-end;
51
- `,Me=n(B)`
51
+ `,Re=n(B)`
52
52
  color: ${e=>e.theme.colors.hero};
53
53
  `,Lt=n(B)`
54
54
  color: ${e=>e.theme.colors.grey1};
@@ -71,13 +71,13 @@ import{u as ve,e as je,a as Ye,cc as Xe,j as t,aY as Ze,M as re,o as i,h as se,b
71
71
  display: flex;
72
72
  flex-direction: column;
73
73
  width: ${e=>e.windowSize==="small"?"64%":"100%"};
74
- `,Mt=n.div`
74
+ `,Rt=n.div`
75
75
  display: flex;
76
76
  flex-direction: column;
77
77
  justify-content: center;
78
78
  align-items: flex-end;
79
79
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
80
- `,Rt=n.div`
80
+ `,Mt=n.div`
81
81
  display: flex;
82
82
  flex-direction: column;
83
83
  align-items: flex-end;
@@ -95,8 +95,8 @@ import{u as ve,e as je,a as Ye,cc as Xe,j as t,aY as Ze,M as re,o as i,h as se,b
95
95
  border-radius: ${i.sp2};
96
96
  border: 1px solid ${e=>e.theme.colors.grey3};
97
97
  color: ${e=>e.theme.colors.hero};
98
- ${We.smallRegular.css};
99
- `,Wt=n.div`
98
+ ${Ne.smallRegular.css};
99
+ `,Nt=n.div`
100
100
  width: ${e=>T.productTypeIconSize.valuePx(e.windowSize)};
101
101
  height: ${e=>T.productTypeIconSize.valuePx(e.windowSize)};
102
102
  display: flex;
@@ -106,7 +106,7 @@ import{u as ve,e as je,a as Ye,cc as Xe,j as t,aY as Ze,M as re,o as i,h as se,b
106
106
  width: 100%;
107
107
  height: 100%;
108
108
  }
109
- `,Nt=n.div`
109
+ `,Wt=n.div`
110
110
  width: ${e=>T.productTypeIconSize.valuePx(e.windowSize)};
111
111
  height: ${e=>T.productTypeIconSize.valuePx(e.windowSize)};
112
112
  display: flex;
@@ -146,18 +146,18 @@ import{u as ve,e as je,a as Ye,cc as Xe,j as t,aY as Ze,M as re,o as i,h 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:Jt,hyphen:Qt}}}=re.getLocalizedStrings(),he={paymentAccountIconSize:new I(k[6],k[7])},Yt=()=>null,Xt=({paymentAccount:e,bankAccountList:h,balanceFetchStatus:q,connectedAccountProvider:M,onRemoveConnection:_,onFetchLinkTokenClick:P,onEstablishConnectionClick:R,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,[D,d]=r.useState(v.linkToken??null),[S,L]=r.useState(!1),$=J(b.updateStatus.fetchState),z=J(u.updateStatus.fetchState),g=J(u.fetchStatus.fetchState),p=e?.providerVerificationStatus,E=e?.isLoginRequired??!1,s="other_connection",j=p?.code,X=r.useCallback((F,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):R(F,y(s),s),H(void 0),L(!1)},[V,s,e.paymentAccountId,e.providerAccountId,A,E,c,R]),Z=r.useCallback((F,ne)=>{F!=null&&(V.trackConnectBankFailure(s,F.error_code+" "+F.error_message,"Settings"),F.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&e.paymentAccountId!=null&&c("verification_failed",e.paymentAccountId,"update_account",y(s),s),console.log("Plaid Connection Error",F,ne)),H(void 0),L(!1)},[V,s,e.paymentAccountId,c]),{open:ee,ready:O}=Te({token:D,onSuccess:X,onExit:Z});r.useEffect(()=>{v.fetchStatus.fetchState==="Completed"&&v.linkToken!=null&&v.linkToken!==D&&d(v.linkToken)},[v.fetchStatus.fetchState,v.linkToken,D]),r.useEffect(()=>{S&&ee()},[S,ee]),r.useEffect(()=>{($==="In-Progress"&&b.updateStatus.fetchState==="Completed"||z==="In-Progress"&&u.updateStatus.fetchState==="Completed")&&(G.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(()=>{(G.isVerifiedStatusCode(j??"")||j==="verification_failed")&&!S&&A!=null&&v.linkToken===D&&v.fetchStatus.fetchState==="Completed"&&O&&L(!0)},[O,D,v.fetchStatus.fetchState,v.linkToken,j,A,S]);const Q=()=>{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),K={element:t.jsx(dn,{windowSize:w,children:t.jsx(ft,{})}),color:te},ue=h.find(F=>F.accountId===e.zeniAccountId),oe=()=>{a(F=>!F)};return t.jsxs(Zt,{onMouseEnter:oe,onMouseLeave:oe,children:[o===!0?_e.createPortal(t.jsx(Pe,{connectedAccountProvider:M,action:{onBackClick:()=>l(!1)}}),document.body):null,t.jsxs(Kt,{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(K,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:Q,onChaseInfoClick:m})]})]})]}),t.jsx(on,{windowSize:w,wrapperWidth:N[2].width,children:ue?.accountName??Jt}),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)}):Qt}),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:F=>{F==="remove"&&_(e.paymentAccountId)},valueToIcon:Yt})})]})]})},Zt=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:Jt,hyphen:Kt}}}=re.getLocalizedStrings(),he={paymentAccountIconSize:new I(k[6],k[7])},Yt=()=>null,Xt=({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,[D,d]=r.useState(v.linkToken??null),[S,L]=r.useState(!1),$=J(b.updateStatus.fetchState),z=J(u.updateStatus.fetchState),g=J(u.fetchStatus.fetchState),p=e?.providerVerificationStatus,E=e?.isLoginRequired??!1,s="other_connection",j=p?.code,X=r.useCallback((F,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(F,y(s),s),H(void 0),L(!1)},[V,s,e.paymentAccountId,e.providerAccountId,A,E,c,M]),Q=r.useCallback((F,ne)=>{F!=null&&(V.trackConnectBankFailure(s,F.error_code+" "+F.error_message,"Settings"),F.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&e.paymentAccountId!=null&&c("verification_failed",e.paymentAccountId,"update_account",y(s),s),console.log("Plaid Connection Error",F,ne)),H(void 0),L(!1)},[V,s,e.paymentAccountId,c]),{open:ee,ready:O}=Te({token:D,onSuccess:X,onExit:Q});r.useEffect(()=>{v.fetchStatus.fetchState==="Completed"&&v.linkToken!=null&&v.linkToken!==D&&d(v.linkToken)},[v.fetchStatus.fetchState,v.linkToken,D]),r.useEffect(()=>{S&&ee()},[S,ee]),r.useEffect(()=>{($==="In-Progress"&&b.updateStatus.fetchState==="Completed"||z==="In-Progress"&&u.updateStatus.fetchState==="Completed")&&(G.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(()=>{(G.isVerifiedStatusCode(j??"")||j==="verification_failed")&&!S&&A!=null&&v.linkToken===D&&v.fetchStatus.fetchState==="Completed"&&O&&L(!0)},[O,D,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),Z={element:t.jsx(dn,{windowSize:w,children:t.jsx(ft,{})}),color:te},ue=h.find(F=>F.accountId===e.zeniAccountId),oe=()=>{a(F=>!F)};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(Zt,{windowSize:w,wrapperWidth:W[0].width,children:[t.jsx(en,{children:Ce.otherAccount.title}),t.jsx(tn,{children:Ce.otherAccount.subTitle})]}),t.jsxs(nn,{windowSize:w,wrapperWidth:W[1].width,children:[gt(Z,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:W[2].width,children:ue?.accountName??Jt}),t.jsx(an,{windowSize:w,wrapperWidth:W[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:W[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:F=>{F==="remove"&&_(e.paymentAccountId)},valueToIcon:Yt})})]})]})},Qt=n.div`
150
150
  display: flex;
151
151
  padding: ${i.sp4};
152
152
  padding-right: ${i.sp8};
153
153
  position: relative;
154
- `,Kt=n.div`
154
+ `,Zt=n.div`
155
155
  display: flex;
156
156
  align-items: center;
157
157
  flex-direction: column;
158
158
  align-items: flex-start;
159
159
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
160
- `,en=n(W)`
160
+ `,en=n(N)`
161
161
  color: ${e=>e.theme.colors.grey1};
162
162
  display: flex;
163
163
  align-items: center;
@@ -169,11 +169,11 @@ import{u as ve,e as je,a as Ye,cc as Xe,j as t,aY as Ze,M as re,o as i,h as se,b
169
169
  display: flex;
170
170
  align-items: center;
171
171
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
172
- `,on=n(W)`
172
+ `,on=n(N)`
173
173
  display: flex;
174
174
  align-items: center;
175
175
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
176
- `,an=n(W)`
176
+ `,an=n(N)`
177
177
  display: flex;
178
178
  align-items: center;
179
179
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
@@ -183,7 +183,7 @@ import{u as ve,e as je,a as Ye,cc as Xe,j as t,aY as Ze,M as re,o as i,h as se,b
183
183
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
184
184
  justify-content: flex-end;
185
185
  align-items: flex-end;
186
- `,ln=n(W)`
186
+ `,ln=n(N)`
187
187
  color: ${e=>e.theme.colors.hero};
188
188
  `,sn=n(B)`
189
189
  color: ${e=>e.theme.colors.hero};
@@ -215,7 +215,7 @@ import{u as ve,e as je,a as Ye,cc as Xe,j as t,aY as Ze,M as re,o as i,h as se,b
215
215
  color: inherit;
216
216
  `,fn=n(B)`
217
217
  margin-left: ${i.sp1};
218
- `,gn=n(W)`
218
+ `,gn=n(N)`
219
219
  max-width: ${`calc(100% - ${i.sp3})`};
220
220
  text-transform: capitalize;
221
221
  overflow: hidden;
@@ -230,7 +230,7 @@ import{u as ve,e as je,a as Ye,cc as Xe,j as t,aY as Ze,M as re,o as i,h 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:M,onRemoveConnection:_,onFetchLinkTokenClick:P,onEstablishConnectionClick:R,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,D]=r.useState(!1),d=J(o.updateStatus.fetchState),S=J(l.updateStatus.fetchState),L=J(l.fetchStatus.fetchState),$=e?.providerVerificationStatus,z=e?.isLoginRequired??!1,g="other_connection",p=$?.code,E=r.useCallback((O,Q)=>{w.trackConnectBankSuccess(g,"Settings");const te=Q.accounts.find(K=>K.id===e.providerAccountId)??Q.accounts[0];e.paymentAccountId!=null&&m==="update_account"&&te?.verification_status!=null&&!z?c(te?.verification_status,e.paymentAccountId,"update_account",y(g),g):R(O,y(g),g),b(void 0),D(!1)},[w,g,e.paymentAccountId,e.providerAccountId,m,z,c,R]),s=r.useCallback((O,Q)=>{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,Q)),b(void 0),D(!1)},[w,g,e.paymentAccountId,c]),{open:j,ready:X}=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")&&(G.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(()=>{(G.isVerifiedStatusCode(p??"")||p==="verification_failed")&&!v&&m!=null&&u.linkToken===A&&u.fetchStatus.fetchState==="Completed"&&X&&D(!0)},[X,A,u.fetchStatus.fetchState,u.linkToken,p,m,v]);const Z=()=>{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:M,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(Bn,{children:e.institutionDetails.institutionName})}),t.jsxs(Mn,{children:[t.jsx(On,{children:e.accountSubType?.name}),t.jsx(Fn,{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:Z,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,D]=r.useState(!1),d=J(o.updateStatus.fetchState),S=J(l.updateStatus.fetchState),L=J(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(Z=>Z.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),D(!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),D(!1)},[w,g,e.paymentAccountId,c]),{open:j,ready:X}=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")&&(G.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(()=>{(G.isVerifiedStatusCode(p??"")||p==="verification_failed")&&!v&&m!=null&&u.linkToken===A&&u.fetchStatus.fetchState==="Completed"&&X&&D(!0)},[X,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(Bn,{children:e.institutionDetails.institutionName})}),t.jsxs(Rn,{children:[t.jsx(On,{children:e.accountSubType?.name}),t.jsx(Fn,{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};
@@ -242,7 +242,7 @@ import{u as ve,e as je,a as Ye,cc as Xe,j as t,aY as Ze,M as re,o as i,h as se,b
242
242
  width: 100%;
243
243
  margin-bottom: ${i.sp3};
244
244
  justify-content: space-between;
245
- `,$n=n(W)`
245
+ `,$n=n(N)`
246
246
  color: ${e=>e.theme.colors.grey1};
247
247
  display: flex;
248
248
  align-items: center;
@@ -259,7 +259,7 @@ import{u as ve,e as je,a as Ye,cc as Xe,j as t,aY as Ze,M as re,o as i,h as se,b
259
259
  margin-right: ${i.sp2};
260
260
  `,zn=n(B)`
261
261
  color: ${e=>e.theme.colors.hero};
262
- `,Tn=n(W)`
262
+ `,Tn=n(N)`
263
263
  display: flex;
264
264
  align-items: center;
265
265
  margin-left: ${i.sp2};
@@ -267,7 +267,7 @@ import{u as ve,e as je,a as Ye,cc as Xe,j as t,aY as Ze,M as re,o as i,h as se,b
267
267
  display: flex;
268
268
  align-items: flex-end;
269
269
  flex-direction: column;
270
- `,Pn=n(W)`
270
+ `,Pn=n(N)`
271
271
  color: ${e=>e.theme.colors.hero};
272
272
  `,In=n(B)`
273
273
  color: ${e=>e.theme.colors.hero};
@@ -281,23 +281,23 @@ import{u as ve,e as je,a as Ye,cc as Xe,j as t,aY as Ze,M as re,o as i,h as se,b
281
281
  text-transform: capitalize;
282
282
  `,Fn=n(B)`
283
283
  margin-left: ${i.sp1};
284
- `,Bn=n(W)`
284
+ `,Bn=n(N)`
285
285
  max-width: ${`calc(100% - ${i.sp3})`};
286
286
  text-transform: capitalize;
287
287
  overflow: hidden;
288
- `,Mn=n.div`
288
+ `,Rn=n.div`
289
289
  color: ${e=>e.theme.colors.hero};
290
290
  display: flex;
291
291
  align-items: center;
292
292
  flex-wrap: wrap;
293
293
  gap: ${i.sp2};
294
- `,{settings:{bankConnectionListHeader:Ae,title:Rn,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")},Dn="bankConnectionsSettingsPage",ce="bankAccountSection",le="primaryAccountSection",Wn="bill_pay",Nn="reimbursement",qn="zeni_accounts",Hn="charge_cards",Gn="zeni_treasury",Re=e=>t.jsx(Yn,{children:N.map(h=>t.jsx(Xn,{actualDataValue:h.value,wrapperWidth:h.width,windowSize:e,children:t.jsx(Zn,{children:h.value})},h.value))}),bi=({bankSetupView:e,connectedAccountProvider:h,onBackClick:q,onUpdateAccountClick:M,onFetchLinkTokenClick:_,onUpdatePaymentAccountStatus:P,onUpdatePaymentAccountLoginStatus:R,onEstablishConnectionClick:C,onEstablishConnectionSuccess:c,onClickMenuIcon:f,onUpdatePrimaryFundingAccount:w,onRemoveConnection:V})=>{const U=ve(),a=je(),{allFundingAccounts:o,primaryConnection:l}=e,m=Ye({mode:"all",reValidateMode:"onChange",defaultValues:De(e),values:De(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&&M(p.selectedOption,E,$,y($),s)}}};r.useEffect(()=>{const d=m.watch((S,{name:L})=>{L!=null&&S!=null&&Xe(()=>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:Xt,D=()=>A?t.jsx(ti,{children:t.jsx(se,{size:"ExtraLarge",start:!0})}):H?t.jsx(Ke,{message:"No bank connections added."}):t.jsxs(Jn,{windowSize:a,children:[t.jsx(Ue,{children:Ae.primary}),a!=="small"?Re(a):null,t.jsx(et,{...m,children:t.jsx("form",{id:li(Dn),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:R,onEstablishConnectionClick:C,onEstablishConnectionSuccess:c})},d.productType):null)})})}),e.otherPaymentAccounts.length>0?t.jsxs(Kn,{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?Re(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(Qn,{children:[t.jsx(Ze,{source:"BankConnectionsSettingsPage",title:Rn.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})}),D()]})]})},Jn=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")},Dn="bankConnectionsSettingsPage",ce="bankAccountSection",le="primaryAccountSection",Nn="bill_pay",Wn="reimbursement",qn="zeni_accounts",Hn="charge_cards",Gn="zeni_treasury",Me=e=>t.jsx(Yn,{children:W.map(h=>t.jsx(Xn,{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=Ye({mode:"all",reValidateMode:"onChange",defaultValues:De(e),values:De(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&&Xe(()=>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:Xt,D=()=>A?t.jsx(ti,{children:t.jsx(se,{size:"ExtraLarge",start:!0})}):H?t.jsx(Ze,{message:"No bank connections added."}):t.jsxs(Jn,{windowSize:a,children:[t.jsx(Ue,{children:Ae.primary}),a!=="small"?Me(a):null,t.jsx(et,{...m,children:t.jsx("form",{id:li(Dn),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(Zn,{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})}),D()]})]})},Jn=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
- `,Qn=n.div`
300
+ `,Kn=n.div`
301
301
  display: flex;
302
302
  min-height: 100%;
303
303
  flex-direction: column;
@@ -331,10 +331,10 @@ import{u as ve,e as je,a as Ye,cc as Xe,j as t,aY as Ze,M as re,o as i,h as se,b
331
331
  padding-left: ${i.sp0};
332
332
  box-sizing: border-box;
333
333
  overflow: hidden;
334
- `,Zn=n(B)`
334
+ `,Qn=n(B)`
335
335
  display: flex;
336
336
  gap: 5px;
337
- `,Kn=n.div`
337
+ `,Zn=n.div`
338
338
  display: flex;
339
339
  align-items: center;
340
340
  `,Ve=n.div`
@@ -356,7 +356,7 @@ import{u as ve,e as je,a as Ye,cc as Xe,j as t,aY as Ze,M as re,o as i,h as se,b
356
356
  .select-value-container
357
357
  .single-select-field__single-value {
358
358
  color: ${e=>e.theme.colors.hero};
359
- ${We.standardRegular.css};
359
+ ${Ne.standardRegular.css};
360
360
  }
361
361
  .qboLinkAcc
362
362
  .single-select-field__control
@@ -405,7 +405,7 @@ import{u as ve,e as je,a as Ye,cc as Xe,j as t,aY as Ze,M as re,o as i,h as se,b
405
405
  align-items: center;
406
406
  width: ${e=>ye.subtitleSectionWidth.valuePx(e.windowSize)};
407
407
  margin-bottom: ${e=>ye.subTitleBottomMargin.valuePx(e.windowSize)};
408
- `,oi=n(W)`
408
+ `,oi=n(N)`
409
409
  display: flex;
410
410
  align-items: center;
411
411
  color: ${e=>e.theme.colors.hero};
@@ -422,4 +422,4 @@ import{u as ve,e as je,a as Ye,cc as Xe,j as t,aY as Ze,M as re,o as i,h as se,b
422
422
  width: ${i.sp3};
423
423
  height: ${i.sp3};
424
424
  color: ${e=>e.theme.colors.hero};
425
- `,De=e=>{const{primaryConnection:h,allBankAccounts:q,allFundingAccounts:M}=e,_=q.map(a=>({label:a.accountName,value:a.accountId})),P=M.map(a=>({label:a.label,value:a.id,isRecommended:a.accType==="depositAccount"})),R=h.find(a=>a.productType==="bill_pay"),C=h.find(a=>a.productType==="reimbursement"),c=h.find(a=>a.productType==="zeni_accounts"),f=h.find(a=>a.productType==="charge_cards"),w=h.find(a=>a.productType==="zeni_treasury"),V=c?.allFundingAccounts.map(a=>({label:a.label,value:a.id,isRecommended:a.accType==="depositAccount"}))??[],U=w?.allFundingAccounts.map(a=>({label:a.label,value:a.id,isRecommended:a.accType==="paymentAccount"}))??[];return{[Wn]:{[ce]:{selectedOption:R?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:R?.primaryFundingAccount?.id,allOptions:P}},[Nn]:{[ce]:{selectedOption:C?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:C?.primaryFundingAccount?.id,allOptions:P}},[qn]:{[ce]:{selectedOption:c?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:c?.primaryFundingAccount?.id,allOptions:V}},[Gn]:{[ce]:{selectedOption:w?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:w?.primaryFundingAccount?.id,allOptions:U}},[Hn]:{[ce]:{selectedOption:f?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:f?.primaryFundingAccount?.id,allOptions:P}}}},li=e=>`${e}_form`;export{bi as default,li as formUniqueName};
425
+ `,De=e=>{const{primaryConnection:h,allBankAccounts:q,allFundingAccounts:R}=e,_=q.map(a=>({label:a.accountName,value:a.accountId})),P=R.map(a=>({label:a.label,value:a.id,isRecommended:a.accType==="depositAccount"})),M=h.find(a=>a.productType==="bill_pay"),C=h.find(a=>a.productType==="reimbursement"),c=h.find(a=>a.productType==="zeni_accounts"),f=h.find(a=>a.productType==="charge_cards"),w=h.find(a=>a.productType==="zeni_treasury"),V=c?.allFundingAccounts.map(a=>({label:a.label,value:a.id,isRecommended:a.accType==="depositAccount"}))??[],U=w?.allFundingAccounts.map(a=>({label:a.label,value:a.id,isRecommended:a.accType==="paymentAccount"}))??[];return{[Nn]:{[ce]:{selectedOption:M?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:M?.primaryFundingAccount?.id,allOptions:P}},[Wn]:{[ce]:{selectedOption:C?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:C?.primaryFundingAccount?.id,allOptions:P}},[qn]:{[ce]:{selectedOption:c?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:c?.primaryFundingAccount?.id,allOptions:V}},[Gn]:{[ce]:{selectedOption:w?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:w?.primaryFundingAccount?.id,allOptions:U}},[Hn]:{[ce]:{selectedOption:f?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:f?.primaryFundingAccount?.id,allOptions:P}}}},li=e=>`${e}_form`;export{bi as default,li as formUniqueName};
@@ -1,8 +1,8 @@
1
- import{e as Fn,Q as En,u as _n,fR as Wn,fS as Zn,fT as Un,fU as Vn,bL as Xn,a2 as Kn,M as Yn,C as u,j as t,l as E,cO as st,cP as Qn,o as a,cQ as Gn,cR as Hn,Z as b,cS as qn,a0 as Ae,cT as Jn,aY as dt,aL as ct,dv as pt,bX as mt,bZ as ut,b_ as yt,fV as ea,fW as ta,fX as na,fY as aa,cY as j,cZ as I,c_ as A,fZ as k,cX as ia,$ as ht,g as le,c$ as Lt,d0 as la,d1 as oa,d2 as ra,f_ as sa,f$ as da,a4 as ca,q as bt,bq as Te,g0 as pa,g1 as L,r,f as ma,bA as ua,g2 as ya,a3 as ha,g3 as ba,g4 as xt,d6 as gt,b as xa,cD as ga,bQ as fa,am as wa,ao as Ta,_ as va,bs as Ot,g5 as Da,w as Ft,ac as $a,ak as ja,aQ as Ia,eO as Aa,s as ka}from"./index-RcMUg6rr.js";import{b as p,n as i}from"./vendor-rkTZJa59.js";import{_ as Sa}from"./liveblocks-CP09Cz-7.js";import{o as Ca,t as Pa}from"./LowBalancePopup-CQQrhufv-ooiA9ZXC.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-CH3KJxCW.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./crypto-CK3r1iTV.js";const Ba=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"})))),Ra={formTitle:new xa("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:za,common:{noText:C,strings:{empty:d},currency:ft,via:Ma,more:Na,edit:La},spendManagement:{billPay:{billDetails:n,billsByTabs:ke,bulkActions:wt,vendorCreation:Tt,insufficientFunds:Et}},collaboration:{threads:{placeholder:vt,tooltip:Dt,title:{comments:Oa}}}}=Yn.getLocalizedStrings(),ve=za.visual.MMMDCommaYYYYformat,Ai=({billDetails:e,currentTenant:g,showApproveRejectBtns:x,isShowDeletedBillsEnabled:U,signedInUser:oe,isAdmin:_t,isRealTimeApprovalEnabled:Wt,isInternationalPaymentShaVsOurEnabled:Zt,hasZeniAssistAccess:Ut,analytics:M,showMarkAsPaidButtonToCreator:V,showMarkAsPaidButtonToApprover:Se,isBillPayCommentingEnabled:Ce,isZeniUser:Vt,showBackButton:Pe=!0,isDetectInsufficientFundsEnabled:Xt,redirectToEditableBillScreen:Kt,redirectToBillsScreen:H,discardBillDetailsFromLocalStore:Be,deleteBill:Yt,cancelAndDeleteBill:Re,approveOrRejectBill:ze,onAddNewRule:Qt,onAttachmentClick:Me,saveBillDetails:Gt,discardOutsideZeniPaymentData:Ht,onBackClick:Ne,updateEditRealTimeApproverClicked:qt,onSaveRealTimeApprovals:Jt,onRetryPaymentClick:en,onRefundPaymentClick:tn})=>{const l=Fn(),o=En(),Le=_n(),[nn,X]=p.useState(!1),[Oe,re]=p.useState(!1),[se,de]=p.useState(!1),[Fe,ce]=p.useState(!1),[an,pe]=p.useState(!1),[Ee,q]=p.useState(!1),h=e.transactionDetails?.id,ln=Vt?Wn:Zn,{requestToOpenThread:me,setRequestToOpenThread:_e,setOpenThread:J}=p.useContext(ln),[on,K]=p.useState(!1),T={application:"dashboard",companyId:o.currentTenant?.companyId,tab:"bill",entityId:h,isGlobalComment:!1},{threads:Y,isLoading:P}=Un(T,"both",!1),f=Ce&&h!=null,We=p.useMemo(()=>h==null?[]:Y.filter(c=>c.resolved===!1&&!c.id.includes(Vn)),[Y,h]).length,v=`dashboard_${o.currentTenant?.companyId}`,rn=p.useCallback((c,y)=>{J(y),K(!1)},[J,K]);p.useEffect(()=>{me?.threadId!=null&&Y.length>0&&!P&&(J(me.threadId),_e(null))},[me,Y,P,J,_e]),Xn({componentName:"bill.details"});const[N,ee]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[Ze,Ue]=p.useState("approved"),[sn,Ve]=p.useState(!1),[dn,Xe]=p.useState(!1),[Ke,Ye]=p.useState(!1),Qe=()=>Ve(!1),cn=()=>Ve(!0),Ge=Kn(e.zeniAssist?.refundStatus.fetchState),te=p.useCallback(()=>{H()},[H]);p.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed"||e.billSaveStatus==="Completed")&&(Be(),H())},[e,H,Be]),p.useEffect(()=>{Ge==="In-Progress"&&(e.zeniAssist?.refundStatus.fetchState==="Completed"||e.zeniAssist?.refundStatus.fetchState==="Error")&&(de(!1),te())},[Ge,e.zeniAssist?.refundStatus,te]);const w=e.transactionDetails?.billPayInfo.stage,ne=e.transactionDetails?.billPayInfo.billStatus,Q=e.transactionDetails?.billPayInfo.billPaymentStatus,pn=e.transactionDetails?.billPayInfo.billPaymentRefundStatus,ue=w?.code==="paid",D=ue?w:ne?.code=="approved"&&Q?.code?Q:ne,S=Fa(D,e.transactionDetails),O=e.transactionDetails?.billPayInfo.isRefundInitiated===!0?pn:Q?.code!=null&&(ne?.code=="approved"||Q.code==="mark_as_paid")?Q:ne,ye=e.transactionDetails?.vendor?.name,B=e.isRecurring,He=()=>{e.transactionDetails?.id!=null&&Kt(e.transactionDetails?.id??"")},mn=()=>{ee({title:B?n.recurringBill.deleteRecurringTitle:n.deleteBillTitle,description:B?n.recurringBill.deleteRecurringAlertText:n.deleteAlertDescription,primaryButtonText:n.delete,secondaryButtonText:n.cancel}),X(!0)},un=()=>{ee({title:n.cancelBillTitle,description:n.cancelAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),X(!0)},yn=()=>{ee({title:B?n.recurringBill.cancelAndDeleteRecurringTitle:n.cancelAndDeleteBillTitle,description:B?n.recurringBill.cancelAndDeleteRecurringAlertText:n.cancelAndDeleteAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),X(!0)},hn=()=>{M.trackRefundClick(D?.code??"",w?.code??"",O?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),ee({title:n.zeniAssist.refundTitle,description:n.zeniAssist.refundDescription,primaryButtonText:n.zeniAssist.proceed,secondaryButtonText:n.cancel}),de(!0)},bn={onOkClick:()=>{X(!1),N.primaryButtonText===n.delete?Yt?.(e.isRecurring):N.title===n.cancelBillTitle?Re?.(e.isRecurring):N.title===n.cancelAndDeleteBillTitle||N.title===n.recurringBill.cancelAndDeleteRecurringTitle?Re?.(e.isRecurring,!0):N.primaryButtonText===n.zeniAssist.proceed&&(M.trackRefundConfirmClick(D?.code??"",w?.code??"",O?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),tn())},onCancelClick:()=>{X(!1),de(!1)}},xn={onOkClick:c=>{pe(!1),ze({billId:e.transactionDetails?.id??"",type:"rejected",description:c})},onCancelClick:()=>{pe(!1)}},gn=()=>{const[c]=$a("ZeniAssist");return c!=null?t.jsx(ja,{"data-testid":b("bill-details-zeni-assist-icon",h),onClick:()=>{ce(!Fe),M.trackZeniAssistClick(D?.code??"",w?.code??"",O?.description??"",B?["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},ae={invoiceNumber:e.transactionDetails?.documentId??"",invoiceDate:e.transactionDetails?.date,billDueDate:e.transactionDetails?.dueDate,memo:e.transactionDetails?.memo,currencyCode:e.vendorCurrency??ft.currencyCode},he=e.transactionDetails?.lines?.map((c,y)=>{const R=c;return{lineIndex:y,lineId:R.id,account:R.account,class:R.class,amount:R.amount.amount,billable:R.billable,customer:R.customer,lineDescription:R.lineDescription,recipientAmount:R.recipientAmount?.amount}})??[],fn=e.transactionDetails?.recipientTotalAmount.amount??0,be=e.transactionDetails?.recipientTotalAmount,s={paymentType:e.paymentMethodType,paymentDate:e.transactionDetails?.billPayInfo.paymentDate,internationalTransferFeeBearerPaymentMethod:e.transactionDetails?.billPayInfo.internationalTransferFeeBearerPaymentMethod,paymentToBankAccount:e.bankAccount,paymentToPI:e.paymentInstrument},$=m.labelWidth.value(l),wn=c=>c==="billable"||c==="has_been_billed"?n.yes:n.no,Tn=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):"",vn=s.paymentToBankAccount?.bankAccountName!=null&&s.paymentToBankAccount?.bankAccountName!=""?s.paymentToBankAccount?.bankAccountName:`${e.transactionDetails?.vendor?.name} - ${s.paymentToBankAccount?.bankName} XXXX${Tn}`,Dn=e.transactionDetails?.billPayInfo?.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${n.magicLink.collectFrom} ${e.transactionDetails?.billPayInfo?.toAccountVendorEmail}`,t.jsx(ui,{windowSize:l,children:t.jsx(mi,{})})]}):void 0,qe=e.transactionDetails?.date!=null&&e.transactionDetails.bookCloseDate!=null&&e.transactionDetails.date.isBefore(e.transactionDetails.bookCloseDate),$n=()=>`${Tt.achDetails.bankRoutingNumber} ${s?.paymentToBankAccount?.bankRoutingNumberAch}, ${s?.paymentToBankAccount?.bankName}
2
- ${Tt.achDetails.bankAccountNumber} ${s?.paymentToBankAccount?.bankAccountNumber}`,ie=e.transactionDetails?.billPayInfo!=null?E.getActualPaymentDate(e.transactionDetails?.billPayInfo):void 0,jn=ie!=null&&e.paymentMethodType?.maxPeriod?.value!=null?E.zeniDate(E.getNextNthWorkingDay(ie?.toDate(),[0,6],e.paymentMethodType?.maxPeriod.value).toDateString()):void 0,Je=e.transactionDetails?.billPayInfo.expectedDepositDate??jn,et=st(s?.paymentType?.method??"").replace("Same Day",""),In=(s?.paymentToBankAccount!=null||s?.paymentToPI)!=null?n.addedByZeni:e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact?t.jsx(Qn,{paymentTypeLabel:et,onClick:cn,style:{marginTop:`${l==="small"?a.sp2:a.sp0}`}}):void 0,An=()=>s?.paymentToBankAccount==null&&s?.paymentToPI==null&&s?.paymentType?.method!=null&&e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact&&e.transactionDetails?.billPayInfo.paymentDate!=null?t.jsx(Da,{paymentType:s?.paymentType?.method,paymentDate:e.transactionDetails?.billPayInfo.paymentDate}):null,tt=e.transactionDetails?.lines?.some(c=>{const y=c.account;return y?.isDeleted===!0&&y?.isBillEditableCoaAccountType===!1})??!1,xe=!(D?.code==="processing"||e.transactionDetails?.billPayInfo.isRefundInitiated===!0||e.transactionDetails?.billPayInfo.isRefundComplete===!0||(w?.code==="scheduled"||w?.code==="pending_approval")&&tt),nt=!((w?.code==="scheduled"||w?.code==="pending_approval")&&tt),ge=e.zeniAssist?.isEligibleForRetryIBT===!0||e.zeniAssist?.isEligibleForRetryOBP===!0,fe=e.zeniAssist?.isEligibleForRefund===!0,kn=e?.transactionDetails?.billPayInfo.billPaymentMethodType.code==="wire"&&e?.transactionDetails?.billPayInfo.billPaymentMethodType.subCode==="international",Sn=Ut&&e.transactionDetails?.billPayInfo.billPaymentStatus.code!=null&&["failed","cancelled","returned"].includes(e.transactionDetails.billPayInfo.billPaymentStatus.code)&&(ge||fe)&&kn===!1,we=ge||fe,Cn=e.transactionDetails?.billPayInfo.isRefundInitiated===!0&&e.transactionDetails?.billPayInfo.isRefundComplete===!1,_=D?.code,Pn=!Cn&&(!qe||D?.code==="processing"&&!B),at=!qe,it=["small","medium-compact","medium-regular"].includes(l),G=E.isBulkProcessing(e.transactionDetails?.bulkProcessingDetail?.type),F=E.isPaymentMethodOutsideZeni(e.paymentMethodType?.method),Bn=!G&&(_!=="processing"&&nt||_==="processing"&&!B||_==="processing"&&at||x&&F&&Se),Rn=c=>{M.trackBillPayMarkAsPaidSubmit(c.paymentMode??"other",w?.code??"",D?.code??""),Gt(!0,Ke,c)},lt=()=>{Xe(!0),M.trackBillPayMarkAsPaid(w?.code??"",D?.code??"")},zn=()=>{Ye(!0),lt()},Mn=()=>{Ht(),Xe(!1),Ke&&Ye(!1)},Nn=p.useMemo(()=>({companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,entityType:"bill.details",entityId:h??d,isGlobalComment:!1,application:"dashboard",tab:"bill",url:window.location.href}),[o.currentTenant,h]),W=Xt&&e.transactionDetails?.totalAmountWithFeesInUSD!=null&&w?.code!=="paid"&&D?.code!=="failed"&&D?.code!=="processing"&&D?.code!=="cancelled"&&D?.code!=="returned"&&D?.code!=="rejected"?Gn(e.transactionDetails?.totalAmountWithFeesInUSD,e.withdrawFrom,s.paymentDate):void 0,ot=()=>{Ue("approved"),Ee===!0&&q(!1),W!=null&&M.trackLowBalanceAccountApprove(w?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",gt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),ze({billId:e.transactionDetails?.id??"",type:"approved"})},Ln=()=>{Ue("rejected"),W!=null&&M.trackLowBalanceAccountReject(w?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",gt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),pe(!0)},rt=p.useRef(null);return t.jsxs(Ja,{windowSize:l,ref:rt,children:[t.jsx(Hn,{anchor:"right",open:sn,onClose:Qe,transitionDuration:250,"data-testid":b("vendor-email-preview-drawer"),children:t.jsx(qn,{companyName:Jn(g.company?.companyInfo),vendor:e.transactionDetails?.vendor?.name,paymentDate:s.paymentDate?.format(ve)??"",paymentType:et,amount:Ae("0,0.[00]",be),isInvoiceAttached:!!e.transactionDetails?.attachments?.length,onClose:Qe})}),t.jsxs(ai,{windowSize:l,children:[t.jsx(bi,{windowSize:l,children:l==="small"?t.jsx(dt,{"data-testid":b("bill-detail-nav-bar-mobile"),title:t.jsxs(t.Fragment,{children:[ye,e.isRecurring?t.jsx(Ie,{width:a.sp4,height:a.sp4}):null]}),backgroundColor:Le.colors.grey4,rightSideComponent:t.jsxs(St,{windowSize:l,children:[f?t.jsxs(Mt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),K(!0),M.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(y=>pt(y)),void 0,void 0,"page icon")},children:[t.jsx(ct,{count:P?void 0:We,isLoading:P,style:{left:"12px"}}),t.jsx(Nt,{})]}):null,t.jsx(Ct,{onClick:()=>te(),"data-testid":b("bill-detail-nav-bar-small-close-button"),children:t.jsx(kt,{})})]}),leftSideComponent:t.jsx(At,{windowSize:l,onClick:Ne,"data-testid":b("bill-detail-nav-bar-small-back-button"),style:{visibility:`${Pe?"visible":"hidden"}`},children:t.jsx(It,{})}),source:"BillDetailPage"}):t.jsx(dt,{"data-testid":b("bill-detail-nav-bar"),title:t.jsxs(t.Fragment,{children:[ye,e.isRecurring?t.jsx(Ie,{width:a.sp4,height:a.sp4}):null]}),rightSideComponent:t.jsxs(St,{windowSize:l,children:[f?t.jsxs(Mt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),K(!0),M.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(y=>pt(y)),void 0,void 0,"page icon")},children:[t.jsx(ct,{count:P?void 0:We,isLoading:P,style:{left:"12px"}}),t.jsx(Nt,{})]}):null,t.jsx(Ct,{onClick:()=>te(),"data-testid":b("bill-detail-nav-bar-close-button"),children:t.jsx(kt,{})})]}),leftSideComponent:t.jsx(At,{windowSize:l,onClick:Ne,"data-testid":b("bill-detail-nav-bar-back-button"),style:{visibility:`${Pe?"visible":"hidden"}`},children:t.jsx(It,{})}),enableTitleOnScroll:!0,scrollableContent:rt,source:"BillDetailPage"})}),t.jsxs(ii,{windowSize:l,children:[Ee?t.jsx(Ca,{withdrawFrom:e.withdrawFrom,paymentDate:e?.transactionDetails?.billPayInfo.paymentDate,onOkClick:ot,onCancelClick:()=>{q(!1),He()},onClickAway:()=>{q(!1)}}):null,dn?t.jsx(Pa,{onCancel:Mn,onProceedForMarkAsPaid:Rn,saveDetailsFetchState:e.billSaveStatus,paymentData:e.outsideZeniPaymentInfo}):null,nn||se?t.jsx(mt,{titleComponent:t.jsx(yt,{children:N.title}),descriptionComponent:t.jsx(ut,{children:N.description}),primaryButtonText:N.primaryButtonText,proceedButtonVariant:se?"primary":"danger",secondaryButtonText:N.secondaryButtonText,action:bn,isEditPopup:!0,isLoading:e.zeniAssist?.refundStatus.fetchState==="In-Progress",children:se?Ea(l,e):null}):null,an?t.jsx(mt,{titleComponent:t.jsx(yt,{children:n.rejectBillTitlePrefix+" "+(e.transactionDetails?.vendor?.name!=null?e.transactionDetails.vendor.name:"")}),descriptionComponent:t.jsx(ut,{children:n.rejectBillDescription}),primaryButtonText:n.send,secondaryButtonText:n.cancel,action:xn,isEditPopup:!0,isNotesIncluded:!0,notesPlaceholder:n.rejectBillReasonPlaceholder}):null,l!=="small"||S?t.jsxs(oi,{windowSize:l,children:[l!=="small"?t.jsxs(ri,{windowSize:l,children:[ye,e.isRecurring?t.jsx(Ie,{height:a.sp5,width:a.sp5}):null]}):null,U&&S!=null&&S.code==="deleted"?t.jsx(Pt,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):S?.value===ke.tabsById.overdue?t.jsx(Pt,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):null]}):null,O!=null&&O.code?l==="small"?t.jsx(ea,{progressSectionObj:O,createDate:e.transactionDetails?.createTime,paymentDate:Je,scheduleDate:ie,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):t.jsx(ta,{progressSectionObj:O,createDate:e.transactionDetails?.createTime,paymentDate:Je,scheduleDate:ie,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):null,Za(G,e,W),t.jsx(na,{sectionId:aa,currentVendorOption:{defaultOptions:[]},billId:h,isBillPayCommentingEnabled:Ce,isBillPaid:ue,disableVendorActions:!0,vendor:e.transactionDetails?.vendor,prevBills:e.previousBills,onAttachmentClick:Me,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(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"invoiceNumber"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("invoiceNumber")}`},children:t.jsx(k,{label:{label:n.invoiceNumber,width:$},text:ae.invoiceNumber??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"invoiceDate"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("invoiceDate")}`},children:t.jsx(k,{label:{label:n.invoiceDate,width:$},text:ae.invoiceDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"billDueDate"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("billDueDate")}`},children:t.jsx(k,{label:{label:n.billDueDate,width:$},text:ae.billDueDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"memo"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("memo")}`},children:t.jsx(k,{label:{label:n.memo,width:$},text:ae.memo??C,style:{width:"auto"}})})]})]}),t.jsxs($e,{children:[t.jsx(li,{windowSize:l,children:t.jsx(je,{children:n.lineItemsTitle})}),he.length>0?he.map((c,y)=>{const R=e?.transactionDetails?.lines?.find(On=>On.id===c.lineId)?.recipientAmount;return t.jsxs(ei,{children:[he.length>1?t.jsx(ti,{windowSize:l,children:t.jsx(ni,{windowSize:l,children:`${n.line} # ${y+1}`})}):null,t.jsxs(De,{children:[t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.recipientAmount`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("recipientAmount",y)}`},children:t.jsx(k,{label:{label:n.amount,width:$},text:R!=null?Ae("0,0[.]00",R):C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.lineDescription`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("lineDescription",y)}`},children:t.jsx(k,{label:{label:n.description,width:$},text:c.lineDescription??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.account`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("account",y)}`},children:t.jsx(k,{label:{label:n.category,width:$},text:c.account?.accountName??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.class`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("class",y)}`},children:t.jsx(k,{label:{label:n.class,width:$},text:c.class?.className??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.billable`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("billable",y)}`},children:t.jsx(k,{label:{label:n.billable,width:$},text:c.billable!=null?wn(c.billable):C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.customer`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("customer",y)}`},children:t.jsx(k,{label:{label:n.customer,width:$},text:c.customer?.name??C,style:{width:"auto"}})})]})]},y)}):null]}),t.jsxs(si,{windowSize:l,children:[t.jsx(di,{children:n.total}),t.jsx(ci,{children:be!=null?t.jsx(ia,{amount:be,integerStyles:ht.h6Medium.cssObject,decimalStyles:ht.standardMedium.cssObject}):C})]}),t.jsxs($e,{children:[t.jsx(je,{children:n.paymentDetailsTitle}),t.jsxs(De,{children:[F?null:t.jsxs(t.Fragment,{children:[t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"withdrawFrom"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("withdrawFrom")}`},children:t.jsx(k,{label:{label:n.withdrawFrom,width:$},text:e.withdrawFrom!=null?Lt(e.withdrawFrom,l):d,style:{width:"auto"},additionalInfoLabelStyles:{textAlign:"right",paddingRight:m.infoLabelPaddingRight.valuePx(l),marginTop:m.infoLabelMarginTop.valuePx(l),color:le.brandColorGoldDark},additionalInfoLabel:W!=null&&w?.code==="pending_approval"?Et.addMoney:W})}),t.jsx(z,{})]}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"paymentType"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("paymentType")}`},children:t.jsx(k,{additionalInfoLabel:s.paymentType?.method!=null&&s.paymentType.method.includes(E.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&Zt&&s.internationalTransferFeeBearerPaymentMethod!=null?t.jsx(Va,{children:la(s.internationalTransferFeeBearerPaymentMethod)}):void 0,label:{label:n.paymentMethod,width:$},text:F&&e.outsideZeniPaymentInfo!=null?Wa(e.outsideZeniPaymentInfo):st(s.paymentType?.method??""),style:{width:"auto"}})}),F?null:t.jsxs(t.Fragment,{children:[t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"paymentTo"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("paymentTo")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(k,{label:{label:n.paymentTo,width:$},text:s.paymentToBankAccount!=null?vn:s.paymentToPI!=null?s.paymentToPI.displayText:Dn,style:{width:"auto"},showEyeIcon:s.paymentToBankAccount!=null&&!!s.paymentType?.method?.includes("ach"),showAdditionalInfoLabel:!!e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact||s.paymentType?.method?.includes("ach"),tooltipText:$n(),additionalInfoLabel:t.jsx(Ua,{children:In})}),An()]})})]}),F||e.isRecurring?t.jsxs(t.Fragment,{children:[t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"recurringPaymentType"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("recurringPaymentType")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(k,{label:{label:n.paymentType,width:$},labelStyles:{marginRight:m.labelMarginRight.valuePx(l)},style:{width:"auto"},text:ra(e.isRecurring,F,e.transactionDetails?.recurringBillInstance??1,e.recurringBillConfigDetail?.totalPaymentCycles??0),textStyles:{paddingLeft:m.textPadding.valuePx(l),paddingRight:m.textPadding.valuePx(l)},additionalInfoLabel:oa(l,e.isRecurring,F,e.recurringBillConfigDetail),additionalInfoLabelStyles:{paddingRight:m.paddingRight.valuePx(l),marginTop:m.additionalTextMarginTop.valuePx(l)}}),e.recurringBillInstances!=null&&e.recurringBillInstances.length>0?t.jsx(yi,{style:{paddingLeft:m.recurringSchedulePaddingLeft.valuePx(l)},children:t.jsx(sa,{onAttachmentClick:Me,currencySymbol:e.transactionDetails?.recipientTotalAmount.currencySymbol??ft.currencySymbol,recurringBillInstances:e.recurringBillInstances})}):null]})})]}):null]})]}),e.transactionDetails&&e.transactionDetails.id&&t.jsx(da,{amount:fn,activities:e.billActivities,stage:w?.code??"draft",onAddNewRule:Qt,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:_t,signedInUserId:oe?.userId,showRealTimeApproval:Wt,entityApprovalId:e.billActivities[0]?.entityApprovalId??e.transactionDetails.entityApprovalId,updateEditMode:qt,onSaveRealTimeApprovals:Jt},historicActivities:e.billHistory.activities}),t.jsx(pi,{})]}),e.transactionDetails?.vendor!=null&&!ue&&!e.transactionDetails.isDeleted?t.jsx(ca,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:V||x,showCancel:!V&&x,cancelBtn:{label:it?n.buttons.reject:n.buttons.rejectBill,isLoading:Ze==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:Ln,style:{width:m.footerButtonWidth.value(l)},reverseSpinnerColor:!1},primaryBtn:{label:_a(V,it),isLoading:Ze==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:V?lt:()=>{W!=null?q(!0):ot()},isDisabled:e.billSaveStatus==="In-Progress"||e.approvalUpdateStatus.fetchState==="In-Progress"||e.realTimeApproval.isEditMode===!0,style:{width:V?"auto":m.footerButtonWidth.value(l)}},rightSideComponent:t.jsx(Xa,{children:t.jsxs(qa,{windowSize:l,children:[!G&&Oe?t.jsx(bt,{onClickAway:()=>{re(!1),ce(!1)},children:t.jsxs(jt,{windowSize:l,"data-testid":b("bill-actions-container"),children:[_!=="processing"&&nt?t.jsx(Z,{onClick:mn,"data-testid":b("delete-bill-action-item"),children:n.buttons.deleteBill}):null,_==="processing"&&!B?t.jsx(Z,{onClick:un,"data-testid":b("cancel-bill-action-item"),children:n.buttons.cancel}):null,_==="processing"&&at?t.jsx(Z,{onClick:yn,"data-testid":b("cancel-and-delete-bill-action-item"),children:n.buttons.cancelAndDelete}):null,x&&F&&Se?t.jsx(Z,{onClick:zn,"data-testid":b("mark-as-paid-action-item"),children:n.paymentOutsideZeni.markAsPaid}):null]})}):null,Fe?t.jsx(bt,{onClickAway:()=>{re(!1),ce(!1)},children:t.jsxs(jt,{windowSize:l,"data-testid":b("bill-actions-with-zeni-assist-container"),children:[ge?t.jsx(Z,{onClick:()=>{M.trackRetryClick(D?.code??"",w?.code??"",O?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),en()},"data-testid":b("retry-bill-action-item"),children:n.buttons.retry}):null,fe?t.jsx(Z,{onClick:hn,"data-testid":b("refund-bill-action-item"),children:n.buttons.refund}):null]})}):null,t.jsxs(Ha,{windowSize:l,children:[Sn===!0?t.jsx(Te,{enterDelay:600,style:{color:le.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:we?n.zeniAssist.tooltip:n.zeniAssist.connectToTeamTooltip,placement:"top",maxWidth:"267px",children:t.jsx($t,{windowSize:l,showEditIcon:xe,isIconClickable:we,"data-testid":b("other-actions-icon-container"),children:we?t.jsx(gn,{}):t.jsx(Ya,{})})}):null,!G&&xe===!0?t.jsx(Te,{enterDelay:600,style:{color:le.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:La,placement:"top",children:t.jsx(Ga,{onClick:He,"data-testid":b("edit-bill-icon-container"),children:t.jsx(Qa,{})})}):null,!G&&Pn===!0&&Bn?t.jsx(Te,{enterDelay:600,style:{color:le.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:Na,placement:"top",children:t.jsx($t,{windowSize:l,showEditIcon:xe,isIconClickable:!0,"data-testid":b("more-details-icon-container"),children:t.jsx(Ka,{onClick:()=>re(!Oe)})})}):null]})]})}),style:{minHeight:62}}):null]}),f?t.jsx(Sa,{id:v,children:t.jsx(pa,{isDrawerOpen:on,allowComposer:!0,drawerTitle:Oa,threads:Y,filter:T,autoExpand:!0,autoFocus:!1,isLoading:P,textOverrides:{composerPlaceholder:vt.addANewComment,replyComposerPlaceholder:vt.replyAComment,threadResolve:Dt.resolveComment,threadUnResolve:Dt.unResolveComment},threadMetadata:Nn,onThreadClick:rn,onCloseAllThreadsDrawer:()=>K(!1),drawerSectionStyle:{width:l==="small"?"100%":"400px",boxSizing:l==="small"?"border-box":"content-box",padding:`${a.sp0} ${m.drawerSectionPaddingLeftRight.valuePx(l)}`,backgroundColor:Le.colors.background},collapsibleThreadStyle:{width:l==="small"?"100%":"360px"}})}):null]})},Fa=(e,g)=>{const x=e?.code;if(e!=null&&x!=null)return g?.isDeleted===!0?{value:ke.tabsById.deleted,color:L.deleted.color,bgColor:L.deleted.bgColor,borderColor:L.deleted.borderColor,code:"deleted"}:x==="pending_approval"&&g?.dueDate?.isBefore(E.dateNow(),"date")===!0?{value:ke.tabsById.overdue,color:L.overdue.color,bgColor:L.overdue.bgColor,borderColor:L.overdue.borderColor}:{value:e.name,color:L[x].color,bgColor:L[x].bgColor,borderColor:L[x].borderColor}},Ea=(e,g)=>{const x=g.transactionDetails?.recipientTotalAmount;return t.jsxs(hi,{windowSize:e,children:[t.jsxs(Bt,{windowSize:e,children:[t.jsx(Rt,{children:n.zeniAssist.accountNumber}),t.jsx(zt,{children:g.withdrawFrom!=null?Lt(g.withdrawFrom,e):d})]}),t.jsxs(Bt,{windowSize:e,children:[t.jsx(Rt,{children:n.zeniAssist.amount}),t.jsx(zt,{children:x!=null?Ae("0,0[.]00",x):C})]})]})},_a=(e,g)=>e?n.paymentOutsideZeni.markAsPaid:g?n.buttons.approve:n.buttons.approveBill,Wa=e=>{const g=e.paymentMode,x=n.paymentOutsideZeni.offline;if(g==null||g==="other")return x;const U=n.paymentOutsideZeni.paymentModeOptions.find(oe=>oe.value===g)?.label;return`${x} ${Ma} ${U}`},Za=(e,g,x)=>{if(e)return t.jsx(xt,{variant:"warning",style:{marginTop:a.sp5,marginBottom:a.sp3},title:wt.duplicateWarning.title,description:wt.duplicateWarning.description});if(x!=null){const U=`${g.withdrawFrom?.label??""} ${g.withdrawFrom?.maskedAccountNumber??""}`;return t.jsx(xt,{variant:"low-balance",style:{marginTop:a.sp2,marginBottom:a.sp3},title:`${Et.lowBalanceIn.replace("__account__",U)}`,description:x.replace("Low balance! ","")})}else return null},Ua=i.div``,Va=i.div``,Xa=i.div`
1
+ import{e as Fn,Q as En,u as _n,fR as Wn,fS as Zn,fT as Kn,fU as Vn,bM as Un,a5 as Xn,M as Yn,C as u,j as t,l as E,cO as st,cP as Gn,o as a,cQ as Hn,cR as Qn,a2 as b,cS as qn,a3 as Ae,cT as Jn,a_ as dt,aN as ct,dv as pt,bY as mt,bZ as ut,b_ as yt,fV as ea,fW as ta,fX as na,fY as aa,cY as j,cZ as I,c_ as A,fZ as k,cX as ia,$ as ht,g as le,c$ as Lt,d0 as la,d1 as oa,d2 as ra,f_ as sa,f$ as da,a7 as ca,q as bt,br as Te,g0 as pa,g1 as L,r,f as ma,bB as ua,g2 as ya,a6 as ha,g3 as ba,g4 as xt,d6 as gt,b as xa,cD as ga,bR as fa,ap as wa,ar as Ta,_ as va,bt as Ot,g5 as Da,w as Ft,af as $a,an as ja,aS as Ia,eO as Aa,s as ka}from"./index-dX8TSOm6.js";import{b as p,n as i}from"./vendor-rkTZJa59.js";import{_ as Sa}from"./liveblocks-CP09Cz-7.js";import{o as Ca,t as Pa}from"./LowBalancePopup-DPfkvSKp-CZ231Z71.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-CH3KJxCW.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./crypto-CK3r1iTV.js";const Ba=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"})))),Ra={formTitle:new xa("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:za,common:{noText:C,strings:{empty:d},currency:ft,via:Ma,more:Na,edit:La},spendManagement:{billPay:{billDetails:n,billsByTabs:ke,bulkActions:wt,vendorCreation:Tt,insufficientFunds:Et}},collaboration:{threads:{placeholder:vt,tooltip:Dt,title:{comments:Oa}}}}=Yn.getLocalizedStrings(),ve=za.visual.MMMDCommaYYYYformat,Ai=({billDetails:e,currentTenant:g,showApproveRejectBtns:x,isShowDeletedBillsEnabled:K,signedInUser:oe,isAdmin:_t,isRealTimeApprovalEnabled:Wt,isInternationalPaymentShaVsOurEnabled:Zt,hasZeniAssistAccess:Kt,analytics:M,showMarkAsPaidButtonToCreator:V,showMarkAsPaidButtonToApprover:Se,isBillPayCommentingEnabled:Ce,isZeniUser:Vt,showBackButton:Pe=!0,isDetectInsufficientFundsEnabled:Ut,redirectToEditableBillScreen:Xt,redirectToBillsScreen:Q,discardBillDetailsFromLocalStore:Be,deleteBill:Yt,cancelAndDeleteBill:Re,approveOrRejectBill:ze,onAddNewRule:Gt,onAttachmentClick:Me,saveBillDetails:Ht,discardOutsideZeniPaymentData:Qt,onBackClick:Ne,updateEditRealTimeApproverClicked:qt,onSaveRealTimeApprovals:Jt,onRetryPaymentClick:en,onRefundPaymentClick:tn})=>{const l=Fn(),o=En(),Le=_n(),[nn,U]=p.useState(!1),[Oe,re]=p.useState(!1),[se,de]=p.useState(!1),[Fe,ce]=p.useState(!1),[an,pe]=p.useState(!1),[Ee,q]=p.useState(!1),h=e.transactionDetails?.id,ln=Vt?Wn:Zn,{requestToOpenThread:me,setRequestToOpenThread:_e,setOpenThread:J}=p.useContext(ln),[on,X]=p.useState(!1),T={application:"dashboard",companyId:o.currentTenant?.companyId,tab:"bill",entityId:h,isGlobalComment:!1},{threads:Y,isLoading:P}=Kn(T,"both",!1),f=Ce&&h!=null,We=p.useMemo(()=>h==null?[]:Y.filter(c=>c.resolved===!1&&!c.id.includes(Vn)),[Y,h]).length,v=`dashboard_${o.currentTenant?.companyId}`,rn=p.useCallback((c,y)=>{J(y),X(!1)},[J,X]);p.useEffect(()=>{me?.threadId!=null&&Y.length>0&&!P&&(J(me.threadId),_e(null))},[me,Y,P,J,_e]),Un({componentName:"bill.details"});const[N,ee]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[Ze,Ke]=p.useState("approved"),[sn,Ve]=p.useState(!1),[dn,Ue]=p.useState(!1),[Xe,Ye]=p.useState(!1),Ge=()=>Ve(!1),cn=()=>Ve(!0),He=Xn(e.zeniAssist?.refundStatus.fetchState),te=p.useCallback(()=>{Q()},[Q]);p.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed"||e.billSaveStatus==="Completed")&&(Be(),Q())},[e,Q,Be]),p.useEffect(()=>{He==="In-Progress"&&(e.zeniAssist?.refundStatus.fetchState==="Completed"||e.zeniAssist?.refundStatus.fetchState==="Error")&&(de(!1),te())},[He,e.zeniAssist?.refundStatus,te]);const w=e.transactionDetails?.billPayInfo.stage,ne=e.transactionDetails?.billPayInfo.billStatus,G=e.transactionDetails?.billPayInfo.billPaymentStatus,pn=e.transactionDetails?.billPayInfo.billPaymentRefundStatus,ue=w?.code==="paid",D=ue?w:ne?.code=="approved"&&G?.code?G:ne,S=Fa(D,e.transactionDetails),O=e.transactionDetails?.billPayInfo.isRefundInitiated===!0?pn:G?.code!=null&&(ne?.code=="approved"||G.code==="mark_as_paid")?G:ne,ye=e.transactionDetails?.vendor?.name,B=e.isRecurring,Qe=()=>{e.transactionDetails?.id!=null&&Xt(e.transactionDetails?.id??"")},mn=()=>{ee({title:B?n.recurringBill.deleteRecurringTitle:n.deleteBillTitle,description:B?n.recurringBill.deleteRecurringAlertText:n.deleteAlertDescription,primaryButtonText:n.delete,secondaryButtonText:n.cancel}),U(!0)},un=()=>{ee({title:n.cancelBillTitle,description:n.cancelAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),U(!0)},yn=()=>{ee({title:B?n.recurringBill.cancelAndDeleteRecurringTitle:n.cancelAndDeleteBillTitle,description:B?n.recurringBill.cancelAndDeleteRecurringAlertText:n.cancelAndDeleteAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),U(!0)},hn=()=>{M.trackRefundClick(D?.code??"",w?.code??"",O?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),ee({title:n.zeniAssist.refundTitle,description:n.zeniAssist.refundDescription,primaryButtonText:n.zeniAssist.proceed,secondaryButtonText:n.cancel}),de(!0)},bn={onOkClick:()=>{U(!1),N.primaryButtonText===n.delete?Yt?.(e.isRecurring):N.title===n.cancelBillTitle?Re?.(e.isRecurring):N.title===n.cancelAndDeleteBillTitle||N.title===n.recurringBill.cancelAndDeleteRecurringTitle?Re?.(e.isRecurring,!0):N.primaryButtonText===n.zeniAssist.proceed&&(M.trackRefundConfirmClick(D?.code??"",w?.code??"",O?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),tn())},onCancelClick:()=>{U(!1),de(!1)}},xn={onOkClick:c=>{pe(!1),ze({billId:e.transactionDetails?.id??"",type:"rejected",description:c})},onCancelClick:()=>{pe(!1)}},gn=()=>{const[c]=$a("ZeniAssist");return c!=null?t.jsx(ja,{"data-testid":b("bill-details-zeni-assist-icon",h),onClick:()=>{ce(!Fe),M.trackZeniAssistClick(D?.code??"",w?.code??"",O?.description??"",B?["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},ae={invoiceNumber:e.transactionDetails?.documentId??"",invoiceDate:e.transactionDetails?.date,billDueDate:e.transactionDetails?.dueDate,memo:e.transactionDetails?.memo,currencyCode:e.vendorCurrency??ft.currencyCode},he=e.transactionDetails?.lines?.map((c,y)=>{const R=c;return{lineIndex:y,lineId:R.id,account:R.account,class:R.class,amount:R.amount.amount,billable:R.billable,customer:R.customer,lineDescription:R.lineDescription,recipientAmount:R.recipientAmount?.amount}})??[],fn=e.transactionDetails?.recipientTotalAmount.amount??0,be=e.transactionDetails?.recipientTotalAmount,s={paymentType:e.paymentMethodType,paymentDate:e.transactionDetails?.billPayInfo.paymentDate,internationalTransferFeeBearerPaymentMethod:e.transactionDetails?.billPayInfo.internationalTransferFeeBearerPaymentMethod,paymentToBankAccount:e.bankAccount,paymentToPI:e.paymentInstrument},$=m.labelWidth.value(l),wn=c=>c==="billable"||c==="has_been_billed"?n.yes:n.no,Tn=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):"",vn=s.paymentToBankAccount?.bankAccountName!=null&&s.paymentToBankAccount?.bankAccountName!=""?s.paymentToBankAccount?.bankAccountName:`${e.transactionDetails?.vendor?.name} - ${s.paymentToBankAccount?.bankName} XXXX${Tn}`,Dn=e.transactionDetails?.billPayInfo?.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${n.magicLink.collectFrom} ${e.transactionDetails?.billPayInfo?.toAccountVendorEmail}`,t.jsx(ui,{windowSize:l,children:t.jsx(mi,{})})]}):void 0,qe=e.transactionDetails?.date!=null&&e.transactionDetails.bookCloseDate!=null&&e.transactionDetails.date.isBefore(e.transactionDetails.bookCloseDate),$n=()=>`${Tt.achDetails.bankRoutingNumber} ${s?.paymentToBankAccount?.bankRoutingNumberAch}, ${s?.paymentToBankAccount?.bankName}
2
+ ${Tt.achDetails.bankAccountNumber} ${s?.paymentToBankAccount?.bankAccountNumber}`,ie=e.transactionDetails?.billPayInfo!=null?E.getActualPaymentDate(e.transactionDetails?.billPayInfo):void 0,jn=ie!=null&&e.paymentMethodType?.maxPeriod?.value!=null?E.zeniDate(E.getNextNthWorkingDay(ie?.toDate(),[0,6],e.paymentMethodType?.maxPeriod.value).toDateString()):void 0,Je=e.transactionDetails?.billPayInfo.expectedDepositDate??jn,et=st(s?.paymentType?.method??"").replace("Same Day",""),In=(s?.paymentToBankAccount!=null||s?.paymentToPI)!=null?n.addedByZeni:e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact?t.jsx(Gn,{paymentTypeLabel:et,onClick:cn,style:{marginTop:`${l==="small"?a.sp2:a.sp0}`}}):void 0,An=()=>s?.paymentToBankAccount==null&&s?.paymentToPI==null&&s?.paymentType?.method!=null&&e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact&&e.transactionDetails?.billPayInfo.paymentDate!=null?t.jsx(Da,{paymentType:s?.paymentType?.method,paymentDate:e.transactionDetails?.billPayInfo.paymentDate}):null,tt=e.transactionDetails?.lines?.some(c=>{const y=c.account;return y?.isDeleted===!0&&y?.isBillEditableCoaAccountType===!1})??!1,xe=!(D?.code==="processing"||e.transactionDetails?.billPayInfo.isRefundInitiated===!0||e.transactionDetails?.billPayInfo.isRefundComplete===!0||(w?.code==="scheduled"||w?.code==="pending_approval")&&tt),nt=!((w?.code==="scheduled"||w?.code==="pending_approval")&&tt),ge=e.zeniAssist?.isEligibleForRetryIBT===!0||e.zeniAssist?.isEligibleForRetryOBP===!0,fe=e.zeniAssist?.isEligibleForRefund===!0,kn=e?.transactionDetails?.billPayInfo.billPaymentMethodType.code==="wire"&&e?.transactionDetails?.billPayInfo.billPaymentMethodType.subCode==="international",Sn=Kt&&e.transactionDetails?.billPayInfo.billPaymentStatus.code!=null&&["failed","cancelled","returned"].includes(e.transactionDetails.billPayInfo.billPaymentStatus.code)&&(ge||fe)&&kn===!1,we=ge||fe,Cn=e.transactionDetails?.billPayInfo.isRefundInitiated===!0&&e.transactionDetails?.billPayInfo.isRefundComplete===!1,_=D?.code,Pn=!Cn&&(!qe||D?.code==="processing"&&!B),at=!qe,it=["small","medium-compact","medium-regular"].includes(l),H=E.isBulkProcessing(e.transactionDetails?.bulkProcessingDetail?.type),F=E.isPaymentMethodOutsideZeni(e.paymentMethodType?.method),Bn=!H&&(_!=="processing"&&nt||_==="processing"&&!B||_==="processing"&&at||x&&F&&Se),Rn=c=>{M.trackBillPayMarkAsPaidSubmit(c.paymentMode??"other",w?.code??"",D?.code??""),Ht(!0,Xe,c)},lt=()=>{Ue(!0),M.trackBillPayMarkAsPaid(w?.code??"",D?.code??"")},zn=()=>{Ye(!0),lt()},Mn=()=>{Qt(),Ue(!1),Xe&&Ye(!1)},Nn=p.useMemo(()=>({companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,entityType:"bill.details",entityId:h??d,isGlobalComment:!1,application:"dashboard",tab:"bill",url:window.location.href}),[o.currentTenant,h]),W=Ut&&e.transactionDetails?.totalAmountWithFeesInUSD!=null&&w?.code!=="paid"&&D?.code!=="failed"&&D?.code!=="processing"&&D?.code!=="cancelled"&&D?.code!=="returned"&&D?.code!=="rejected"?Hn(e.transactionDetails?.totalAmountWithFeesInUSD,e.withdrawFrom,s.paymentDate):void 0,ot=()=>{Ke("approved"),Ee===!0&&q(!1),W!=null&&M.trackLowBalanceAccountApprove(w?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",gt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),ze({billId:e.transactionDetails?.id??"",type:"approved"})},Ln=()=>{Ke("rejected"),W!=null&&M.trackLowBalanceAccountReject(w?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",gt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),pe(!0)},rt=p.useRef(null);return t.jsxs(Ja,{windowSize:l,ref:rt,children:[t.jsx(Qn,{anchor:"right",open:sn,onClose:Ge,transitionDuration:250,"data-testid":b("vendor-email-preview-drawer"),children:t.jsx(qn,{companyName:Jn(g.company?.companyInfo),vendor:e.transactionDetails?.vendor?.name,paymentDate:s.paymentDate?.format(ve)??"",paymentType:et,amount:Ae("0,0.[00]",be),isInvoiceAttached:!!e.transactionDetails?.attachments?.length,onClose:Ge})}),t.jsxs(ai,{windowSize:l,children:[t.jsx(bi,{windowSize:l,children:l==="small"?t.jsx(dt,{"data-testid":b("bill-detail-nav-bar-mobile"),title:t.jsxs(t.Fragment,{children:[ye,e.isRecurring?t.jsx(Ie,{width:a.sp4,height:a.sp4}):null]}),backgroundColor:Le.colors.grey4,rightSideComponent:t.jsxs(St,{windowSize:l,children:[f?t.jsxs(Mt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),X(!0),M.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(y=>pt(y)),void 0,void 0,"page icon")},children:[t.jsx(ct,{count:P?void 0:We,isLoading:P,style:{left:"12px"}}),t.jsx(Nt,{})]}):null,t.jsx(Ct,{onClick:()=>te(),"data-testid":b("bill-detail-nav-bar-small-close-button"),children:t.jsx(kt,{})})]}),leftSideComponent:t.jsx(At,{windowSize:l,onClick:Ne,"data-testid":b("bill-detail-nav-bar-small-back-button"),style:{visibility:`${Pe?"visible":"hidden"}`},children:t.jsx(It,{})}),source:"BillDetailPage"}):t.jsx(dt,{"data-testid":b("bill-detail-nav-bar"),title:t.jsxs(t.Fragment,{children:[ye,e.isRecurring?t.jsx(Ie,{width:a.sp4,height:a.sp4}):null]}),rightSideComponent:t.jsxs(St,{windowSize:l,children:[f?t.jsxs(Mt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),X(!0),M.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(y=>pt(y)),void 0,void 0,"page icon")},children:[t.jsx(ct,{count:P?void 0:We,isLoading:P,style:{left:"12px"}}),t.jsx(Nt,{})]}):null,t.jsx(Ct,{onClick:()=>te(),"data-testid":b("bill-detail-nav-bar-close-button"),children:t.jsx(kt,{})})]}),leftSideComponent:t.jsx(At,{windowSize:l,onClick:Ne,"data-testid":b("bill-detail-nav-bar-back-button"),style:{visibility:`${Pe?"visible":"hidden"}`},children:t.jsx(It,{})}),enableTitleOnScroll:!0,scrollableContent:rt,source:"BillDetailPage"})}),t.jsxs(ii,{windowSize:l,children:[Ee?t.jsx(Ca,{withdrawFrom:e.withdrawFrom,paymentDate:e?.transactionDetails?.billPayInfo.paymentDate,onOkClick:ot,onCancelClick:()=>{q(!1),Qe()},onClickAway:()=>{q(!1)}}):null,dn?t.jsx(Pa,{onCancel:Mn,onProceedForMarkAsPaid:Rn,saveDetailsFetchState:e.billSaveStatus,paymentData:e.outsideZeniPaymentInfo}):null,nn||se?t.jsx(mt,{titleComponent:t.jsx(yt,{children:N.title}),descriptionComponent:t.jsx(ut,{children:N.description}),primaryButtonText:N.primaryButtonText,proceedButtonVariant:se?"primary":"danger",secondaryButtonText:N.secondaryButtonText,action:bn,isEditPopup:!0,isLoading:e.zeniAssist?.refundStatus.fetchState==="In-Progress",children:se?Ea(l,e):null}):null,an?t.jsx(mt,{titleComponent:t.jsx(yt,{children:n.rejectBillTitlePrefix+" "+(e.transactionDetails?.vendor?.name!=null?e.transactionDetails.vendor.name:"")}),descriptionComponent:t.jsx(ut,{children:n.rejectBillDescription}),primaryButtonText:n.send,secondaryButtonText:n.cancel,action:xn,isEditPopup:!0,isNotesIncluded:!0,notesPlaceholder:n.rejectBillReasonPlaceholder}):null,l!=="small"||S?t.jsxs(oi,{windowSize:l,children:[l!=="small"?t.jsxs(ri,{windowSize:l,children:[ye,e.isRecurring?t.jsx(Ie,{height:a.sp5,width:a.sp5}):null]}):null,K&&S!=null&&S.code==="deleted"?t.jsx(Pt,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):S?.value===ke.tabsById.overdue?t.jsx(Pt,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):null]}):null,O!=null&&O.code?l==="small"?t.jsx(ea,{progressSectionObj:O,createDate:e.transactionDetails?.createTime,paymentDate:Je,scheduleDate:ie,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):t.jsx(ta,{progressSectionObj:O,createDate:e.transactionDetails?.createTime,paymentDate:Je,scheduleDate:ie,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):null,Za(H,e,W),t.jsx(na,{sectionId:aa,currentVendorOption:{defaultOptions:[]},billId:h,isBillPayCommentingEnabled:Ce,isBillPaid:ue,disableVendorActions:!0,vendor:e.transactionDetails?.vendor,prevBills:e.previousBills,onAttachmentClick:Me,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(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"invoiceNumber"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("invoiceNumber")}`},children:t.jsx(k,{label:{label:n.invoiceNumber,width:$},text:ae.invoiceNumber??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"invoiceDate"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("invoiceDate")}`},children:t.jsx(k,{label:{label:n.invoiceDate,width:$},text:ae.invoiceDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"billDueDate"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("billDueDate")}`},children:t.jsx(k,{label:{label:n.billDueDate,width:$},text:ae.billDueDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"memo"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("memo")}`},children:t.jsx(k,{label:{label:n.memo,width:$},text:ae.memo??C,style:{width:"auto"}})})]})]}),t.jsxs($e,{children:[t.jsx(li,{windowSize:l,children:t.jsx(je,{children:n.lineItemsTitle})}),he.length>0?he.map((c,y)=>{const R=e?.transactionDetails?.lines?.find(On=>On.id===c.lineId)?.recipientAmount;return t.jsxs(ei,{children:[he.length>1?t.jsx(ti,{windowSize:l,children:t.jsx(ni,{windowSize:l,children:`${n.line} # ${y+1}`})}):null,t.jsxs(De,{children:[t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.recipientAmount`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("recipientAmount",y)}`},children:t.jsx(k,{label:{label:n.amount,width:$},text:R!=null?Ae("0,0[.]00",R):C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.lineDescription`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("lineDescription",y)}`},children:t.jsx(k,{label:{label:n.description,width:$},text:c.lineDescription??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.account`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("account",y)}`},children:t.jsx(k,{label:{label:n.category,width:$},text:c.account?.accountName??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.class`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("class",y)}`},children:t.jsx(k,{label:{label:n.class,width:$},text:c.class?.className??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.billable`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("billable",y)}`},children:t.jsx(k,{label:{label:n.billable,width:$},text:c.billable!=null?wn(c.billable):C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.customer`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("customer",y)}`},children:t.jsx(k,{label:{label:n.customer,width:$},text:c.customer?.name??C,style:{width:"auto"}})})]})]},y)}):null]}),t.jsxs(si,{windowSize:l,children:[t.jsx(di,{children:n.total}),t.jsx(ci,{children:be!=null?t.jsx(ia,{amount:be,integerStyles:ht.h6Medium.cssObject,decimalStyles:ht.standardMedium.cssObject}):C})]}),t.jsxs($e,{children:[t.jsx(je,{children:n.paymentDetailsTitle}),t.jsxs(De,{children:[F?null:t.jsxs(t.Fragment,{children:[t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"withdrawFrom"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("withdrawFrom")}`},children:t.jsx(k,{label:{label:n.withdrawFrom,width:$},text:e.withdrawFrom!=null?Lt(e.withdrawFrom,l):d,style:{width:"auto"},additionalInfoLabelStyles:{textAlign:"right",paddingRight:m.infoLabelPaddingRight.valuePx(l),marginTop:m.infoLabelMarginTop.valuePx(l),color:le.brandColorGoldDark},additionalInfoLabel:W!=null&&w?.code==="pending_approval"?Et.addMoney:W})}),t.jsx(z,{})]}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"paymentType"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("paymentType")}`},children:t.jsx(k,{additionalInfoLabel:s.paymentType?.method!=null&&s.paymentType.method.includes(E.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&Zt&&s.internationalTransferFeeBearerPaymentMethod!=null?t.jsx(Va,{children:la(s.internationalTransferFeeBearerPaymentMethod)}):void 0,label:{label:n.paymentMethod,width:$},text:F&&e.outsideZeniPaymentInfo!=null?Wa(e.outsideZeniPaymentInfo):st(s.paymentType?.method??""),style:{width:"auto"}})}),F?null:t.jsxs(t.Fragment,{children:[t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"paymentTo"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("paymentTo")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(k,{label:{label:n.paymentTo,width:$},text:s.paymentToBankAccount!=null?vn:s.paymentToPI!=null?s.paymentToPI.displayText:Dn,style:{width:"auto"},showEyeIcon:s.paymentToBankAccount!=null&&!!s.paymentType?.method?.includes("ach"),showAdditionalInfoLabel:!!e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact||s.paymentType?.method?.includes("ach"),tooltipText:$n(),additionalInfoLabel:t.jsx(Ka,{children:In})}),An()]})})]}),F||e.isRecurring?t.jsxs(t.Fragment,{children:[t.jsx(z,{}),t.jsx(j,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"recurringPaymentType"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("recurringPaymentType")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(k,{label:{label:n.paymentType,width:$},labelStyles:{marginRight:m.labelMarginRight.valuePx(l)},style:{width:"auto"},text:ra(e.isRecurring,F,e.transactionDetails?.recurringBillInstance??1,e.recurringBillConfigDetail?.totalPaymentCycles??0),textStyles:{paddingLeft:m.textPadding.valuePx(l),paddingRight:m.textPadding.valuePx(l)},additionalInfoLabel:oa(l,e.isRecurring,F,e.recurringBillConfigDetail),additionalInfoLabelStyles:{paddingRight:m.paddingRight.valuePx(l),marginTop:m.additionalTextMarginTop.valuePx(l)}}),e.recurringBillInstances!=null&&e.recurringBillInstances.length>0?t.jsx(yi,{style:{paddingLeft:m.recurringSchedulePaddingLeft.valuePx(l)},children:t.jsx(sa,{onAttachmentClick:Me,currencySymbol:e.transactionDetails?.recipientTotalAmount.currencySymbol??ft.currencySymbol,recurringBillInstances:e.recurringBillInstances})}):null]})})]}):null]})]}),e.transactionDetails&&e.transactionDetails.id&&t.jsx(da,{amount:fn,activities:e.billActivities,stage:w?.code??"draft",onAddNewRule:Gt,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:_t,signedInUserId:oe?.userId,showRealTimeApproval:Wt,entityApprovalId:e.billActivities[0]?.entityApprovalId??e.transactionDetails.entityApprovalId,updateEditMode:qt,onSaveRealTimeApprovals:Jt},historicActivities:e.billHistory.activities}),t.jsx(pi,{})]}),e.transactionDetails?.vendor!=null&&!ue&&!e.transactionDetails.isDeleted?t.jsx(ca,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:V||x,showCancel:!V&&x,cancelBtn:{label:it?n.buttons.reject:n.buttons.rejectBill,isLoading:Ze==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:Ln,style:{width:m.footerButtonWidth.value(l)},reverseSpinnerColor:!1},primaryBtn:{label:_a(V,it),isLoading:Ze==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:V?lt:()=>{W!=null?q(!0):ot()},isDisabled:e.billSaveStatus==="In-Progress"||e.approvalUpdateStatus.fetchState==="In-Progress"||e.realTimeApproval.isEditMode===!0,style:{width:V?"auto":m.footerButtonWidth.value(l)}},rightSideComponent:t.jsx(Ua,{children:t.jsxs(qa,{windowSize:l,children:[!H&&Oe?t.jsx(bt,{onClickAway:()=>{re(!1),ce(!1)},children:t.jsxs(jt,{windowSize:l,"data-testid":b("bill-actions-container"),children:[_!=="processing"&&nt?t.jsx(Z,{onClick:mn,"data-testid":b("delete-bill-action-item"),children:n.buttons.deleteBill}):null,_==="processing"&&!B?t.jsx(Z,{onClick:un,"data-testid":b("cancel-bill-action-item"),children:n.buttons.cancel}):null,_==="processing"&&at?t.jsx(Z,{onClick:yn,"data-testid":b("cancel-and-delete-bill-action-item"),children:n.buttons.cancelAndDelete}):null,x&&F&&Se?t.jsx(Z,{onClick:zn,"data-testid":b("mark-as-paid-action-item"),children:n.paymentOutsideZeni.markAsPaid}):null]})}):null,Fe?t.jsx(bt,{onClickAway:()=>{re(!1),ce(!1)},children:t.jsxs(jt,{windowSize:l,"data-testid":b("bill-actions-with-zeni-assist-container"),children:[ge?t.jsx(Z,{onClick:()=>{M.trackRetryClick(D?.code??"",w?.code??"",O?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),en()},"data-testid":b("retry-bill-action-item"),children:n.buttons.retry}):null,fe?t.jsx(Z,{onClick:hn,"data-testid":b("refund-bill-action-item"),children:n.buttons.refund}):null]})}):null,t.jsxs(Qa,{windowSize:l,children:[Sn===!0?t.jsx(Te,{enterDelay:600,style:{color:le.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:we?n.zeniAssist.tooltip:n.zeniAssist.connectToTeamTooltip,placement:"top",maxWidth:"267px",children:t.jsx($t,{windowSize:l,showEditIcon:xe,isIconClickable:we,"data-testid":b("other-actions-icon-container"),children:we?t.jsx(gn,{}):t.jsx(Ya,{})})}):null,!H&&xe===!0?t.jsx(Te,{enterDelay:600,style:{color:le.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:La,placement:"top",children:t.jsx(Ha,{onClick:Qe,"data-testid":b("edit-bill-icon-container"),children:t.jsx(Ga,{})})}):null,!H&&Pn===!0&&Bn?t.jsx(Te,{enterDelay:600,style:{color:le.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:Na,placement:"top",children:t.jsx($t,{windowSize:l,showEditIcon:xe,isIconClickable:!0,"data-testid":b("more-details-icon-container"),children:t.jsx(Xa,{onClick:()=>re(!Oe)})})}):null]})]})}),style:{minHeight:62}}):null]}),f?t.jsx(Sa,{id:v,children:t.jsx(pa,{isDrawerOpen:on,allowComposer:!0,drawerTitle:Oa,threads:Y,filter:T,autoExpand:!0,autoFocus:!1,isLoading:P,textOverrides:{composerPlaceholder:vt.addANewComment,replyComposerPlaceholder:vt.replyAComment,threadResolve:Dt.resolveComment,threadUnResolve:Dt.unResolveComment},threadMetadata:Nn,onThreadClick:rn,onCloseAllThreadsDrawer:()=>X(!1),drawerSectionStyle:{width:l==="small"?"100%":"400px",boxSizing:l==="small"?"border-box":"content-box",padding:`${a.sp0} ${m.drawerSectionPaddingLeftRight.valuePx(l)}`,backgroundColor:Le.colors.background},collapsibleThreadStyle:{width:l==="small"?"100%":"360px"}})}):null]})},Fa=(e,g)=>{const x=e?.code;if(e!=null&&x!=null)return g?.isDeleted===!0?{value:ke.tabsById.deleted,color:L.deleted.color,bgColor:L.deleted.bgColor,borderColor:L.deleted.borderColor,code:"deleted"}:x==="pending_approval"&&g?.dueDate?.isBefore(E.dateNow(),"date")===!0?{value:ke.tabsById.overdue,color:L.overdue.color,bgColor:L.overdue.bgColor,borderColor:L.overdue.borderColor}:{value:e.name,color:L[x].color,bgColor:L[x].bgColor,borderColor:L[x].borderColor}},Ea=(e,g)=>{const x=g.transactionDetails?.recipientTotalAmount;return t.jsxs(hi,{windowSize:e,children:[t.jsxs(Bt,{windowSize:e,children:[t.jsx(Rt,{children:n.zeniAssist.accountNumber}),t.jsx(zt,{children:g.withdrawFrom!=null?Lt(g.withdrawFrom,e):d})]}),t.jsxs(Bt,{windowSize:e,children:[t.jsx(Rt,{children:n.zeniAssist.amount}),t.jsx(zt,{children:x!=null?Ae("0,0[.]00",x):C})]})]})},_a=(e,g)=>e?n.paymentOutsideZeni.markAsPaid:g?n.buttons.approve:n.buttons.approveBill,Wa=e=>{const g=e.paymentMode,x=n.paymentOutsideZeni.offline;if(g==null||g==="other")return x;const K=n.paymentOutsideZeni.paymentModeOptions.find(oe=>oe.value===g)?.label;return`${x} ${Ma} ${K}`},Za=(e,g,x)=>{if(e)return t.jsx(xt,{variant:"warning",style:{marginTop:a.sp5,marginBottom:a.sp3},title:wt.duplicateWarning.title,description:wt.duplicateWarning.description});if(x!=null){const K=`${g.withdrawFrom?.label??""} ${g.withdrawFrom?.maskedAccountNumber??""}`;return t.jsx(xt,{variant:"low-balance",style:{marginTop:a.sp2,marginBottom:a.sp3},title:`${Et.lowBalanceIn.replace("__account__",K)}`,description:x.replace("Low balance! ","")})}else return null},Ka=i.div``,Va=i.div``,Ua=i.div`
3
3
  display: flex;
4
4
  justify-content: flex-end;
5
- `,Ka=i(Aa)`
5
+ `,Xa=i(Aa)`
6
6
  cursor: pointer;
7
7
  color: ${e=>e.theme.colors.hero};
8
8
  width: ${a.sp4};
@@ -26,7 +26,7 @@ import{e as Fn,Q as En,u as _n,fR as Wn,fS as Zn,fT as Un,fU as Vn,bL as Xn,a2 a
26
26
  &:hover {
27
27
  color: ${e=>e.theme.colors.primary};
28
28
  }
29
- `,Qa=i(Ia)`
29
+ `,Ga=i(Ia)`
30
30
  cursor: pointer;
31
31
  color: ${e=>e.theme.colors.hero};
32
32
  width: ${a.sp4};
@@ -34,7 +34,7 @@ import{e as Fn,Q as En,u as _n,fR as Wn,fS as Zn,fT as Un,fU as Vn,bL as Xn,a2 a
34
34
  &:hover {
35
35
  color: ${e=>e.theme.colors.primary};
36
36
  }
37
- `,Ga=i.div`
37
+ `,Ha=i.div`
38
38
  display: flex;
39
39
  cursor: pointer;
40
40
  color: ${e=>e.theme.colors.grey1};
@@ -42,7 +42,7 @@ import{e as Fn,Q as En,u as _n,fR as Wn,fS as Zn,fT as Un,fU as Vn,bL as Xn,a2 a
42
42
  &:hover {
43
43
  color: ${e=>e.theme.colors.primary};
44
44
  }
45
- `,Ha=i.div`
45
+ `,Qa=i.div`
46
46
  display: flex;
47
47
  justify-content: center;
48
48
  align-items: center;
@@ -1,4 +1,4 @@
1
- import{C as O,r as B,e as q,M as D,a as M,a2 as W,j as o,V as G,cc as X,aY as Y,F as Z,a4 as H,o as c}from"./index-RcMUg6rr.js";import{b as L,n as h}from"./vendor-rkTZJa59.js";import{b as J,f as K,l as R,o as j}from"./FollowStepsSection-B6uVl1dT-B1dWDhOp.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-CH3KJxCW.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";const C="billPayApprovalRuleDetailPage",T="lowerBound",k="upperBound",y="steps",Q={footerPadding:new O(B[2],B[3])};function ve({localData:e,approvalUpdateActionType:t,onBackClick:l,onApprovalRuleDataUpdated:r,onResetClick:s,isLowerBoundDisabled:n=!1,isUpperBoundDisabled:b=!0,hideUpperBoundField:A=!1,onSaveRuleClick:E,onSaveRuleSuccess:S}){const I=q(),a=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:_,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 V=v.handleSubmit(()=>{E()}),F=async(i,d)=>{r(d)};return L.useEffect(()=>{const i=v.watch((d,{name:U})=>{if(U!=null&&d!=null){const z=G(d);X(()=>F(U,z))}});return()=>{i.unsubscribe()}}),L.useEffect(()=>{w==="In-Progress"&&u?.fetchState==="Completed"&&S()},[w,u?.fetchState,S]),o.jsxs(re,{children:[o.jsx(Y,{title:t==="approval_create"?a.newApproval:a.editApproval,style:{zIndex:4},onBackClick:()=>{l()},source:"BillPayApprovalRuleDetailPage"}),o.jsx(se,{children:o.jsx(Z,{...v,children:o.jsx("form",{id:N(C),onSubmit:V,children:o.jsxs(oe,{children:[o.jsx(J,{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:a.firstRuleLowerBoundInfoLabel,additionalErrorLabel:a.firstRuleErrorInfoLabel},secondText:{type:"number",name:k,placeholder:"Infinity",isDisabled:b,hideField:A,additionalInfoLabel:a.upperBoundInfoLabel}}),o.jsx(ie,{}),o.jsx(K,{sectionId:y,label:{label:a.followStepsLabel},approversPlaceholder:a.approversPlaceholder,notifiersPlaceholder:a.notifiersPlaceholder,allUserWithRoles:e.allApprovers,filteredApprovers:e.filteredApprovers.map(i=>i.user),allAttributes:e.allAttributes,filteredAttributes:e.filteredAttributes,allAccountingClasses:_,stepsInfo:x[y],userSelectPlaceholder:a.userSelectPlaceholder,approveNotifyPlaceholder:a.approveNotifyPlaceholder,productType:"zeni_bill_pay"})]})})})}),o.jsx(H,{formId:N(C),primaryBtn:{label:a.saveBtnText,isLoading:u?.fetchState==="In-Progress",isDisabled:u?.fetchState==="In-Progress",style:{width:"85px",minWidth:"auto"}},showCancel:!0,cancelBtn:{label:a.cancelBtnText,isLoading:!1,style:{width:"85px",minWidth:"auto"},onClick:s},containerStyle:{justifyContent:I==="small"?"space-between":"center"},style:{padding:Q.footerPadding.valuePx(I)},separatorStyle:{marginRight:c.sp4}})]})}const ee=(e,t)=>{const{criteria:l,steps:r}=e.billPaySetupApproverViewUpdateData?.data??{};return{[y]:le(e.allApprovers.map(s=>s.user),e.filteredApprovers.map(s=>s.user),j(e.allAttributes),j(e.filteredAttributes),r??[])??[],[T]:t?void 0:l!=null?l.range.min.amount??0:0,[k]:l!=null?l.range.max==null?1/0:l.range.max.amount:1/0}},le=(e,t,l,r,s)=>s&&s.length>0?s.map((n,b)=>({stepIndex:b,stepType:{selectedOption:n.action,allOptions:R},actors:{allUsers:t,selectedUsers:ae(e,n.actors),allNonUsers:r,selectedNonUsers:te(l,n.actors)}})):[{stepIndex:0,stepType:{selectedOption:"require_approval",allOptions:R},actors:{allUsers:t,selectedUsers:[],allNonUsers:r,selectedNonUsers:[]}}],ae=(e,t)=>e.filter(l=>l.userId!=null&&t.findIndex(r=>r.userId===l.userId)>-1),te=(e,t)=>e.filter(l=>t.findIndex(r=>r.subType===l.value)>-1),N=e=>`${e}_form`,ge=e=>`${e}`,re=h.div`
1
+ import{C as O,r as B,e as q,M as D,a as M,a5 as W,j as o,Z as G,cc as Z,a_ as X,F as H,a7 as J,o as c}from"./index-dX8TSOm6.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-s4utHS95--Y07h10n.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-CH3KJxCW.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";const C="billPayApprovalRuleDetailPage",_="lowerBound",k="upperBound",y="steps",Y={footerPadding:new O(B[2],B[3])};function ve({localData:e,approvalUpdateActionType:t,onBackClick:l,onApprovalRuleDataUpdated:r,onResetClick:s,isLowerBoundDisabled:n=!1,isUpperBoundDisabled:b=!0,hideUpperBoundField:A=!1,onSaveRuleClick:E,onSaveRuleSuccess:S}){const I=q(),a=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:T,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(()=>{E()}),V=async(i,d)=>{r(d)};return L.useEffect(()=>{const i=v.watch((d,{name:U})=>{if(U!=null&&d!=null){const z=G(d);Z(()=>V(U,z))}});return()=>{i.unsubscribe()}}),L.useEffect(()=>{w==="In-Progress"&&u?.fetchState==="Completed"&&S()},[w,u?.fetchState,S]),o.jsxs(re,{children:[o.jsx(X,{title:t==="approval_create"?a.newApproval:a.editApproval,style:{zIndex:4},onBackClick:()=>{l()},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:_,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:a.firstRuleLowerBoundInfoLabel,additionalErrorLabel:a.firstRuleErrorInfoLabel},secondText:{type:"number",name:k,placeholder:"Infinity",isDisabled:b,hideField:A,additionalInfoLabel:a.upperBoundInfoLabel}}),o.jsx(ie,{}),o.jsx(Q,{sectionId:y,label:{label:a.followStepsLabel},approversPlaceholder:a.approversPlaceholder,notifiersPlaceholder:a.notifiersPlaceholder,allUserWithRoles:e.allApprovers,filteredApprovers:e.filteredApprovers.map(i=>i.user),allAttributes:e.allAttributes,filteredAttributes:e.filteredAttributes,allAccountingClasses:T,stepsInfo:x[y],userSelectPlaceholder:a.userSelectPlaceholder,approveNotifyPlaceholder:a.approveNotifyPlaceholder,productType:"zeni_bill_pay"})]})})})}),o.jsx(J,{formId:N(C),primaryBtn:{label:a.saveBtnText,isLoading:u?.fetchState==="In-Progress",isDisabled:u?.fetchState==="In-Progress",style:{width:"85px",minWidth:"auto"}},showCancel:!0,cancelBtn:{label:a.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:l,steps:r}=e.billPaySetupApproverViewUpdateData?.data??{};return{[y]:le(e.allApprovers.map(s=>s.user),e.filteredApprovers.map(s=>s.user),j(e.allAttributes),j(e.filteredAttributes),r??[])??[],[_]:t?void 0:l!=null?l.range.min.amount??0:0,[k]:l!=null?l.range.max==null?1/0:l.range.max.amount:1/0}},le=(e,t,l,r,s)=>s&&s.length>0?s.map((n,b)=>({stepIndex:b,stepType:{selectedOption:n.action,allOptions:R},actors:{allUsers:t,selectedUsers:ae(e,n.actors),allNonUsers:r,selectedNonUsers:te(l,n.actors)}})):[{stepIndex:0,stepType:{selectedOption:"require_approval",allOptions:R},actors:{allUsers:t,selectedUsers:[],allNonUsers:r,selectedNonUsers:[]}}],ae=(e,t)=>e.filter(l=>l.userId!=null&&t.findIndex(r=>r.userId===l.userId)>-1),te=(e,t)=>e.filter(l=>t.findIndex(r=>r.subType===l.value)>-1),N=e=>`${e}_form`,ge=e=>`${e}`,re=h.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  flex-direction: column;
@@ -24,4 +24,4 @@ import{C as O,r as B,e as q,M as D,a as M,a2 as W,j as o,V as G,cc as X,aY as Y,
24
24
  background-color: ${e=>e.theme.colors.grey3};
25
25
  min-height: 1px;
26
26
  max-height: 1px;
27
- `;export{Q as D,ve as default,N as uniqueFormName,ge as uniqueName};
27
+ `;export{Y as D,ve as default,N as uniqueFormName,ge as uniqueName};