@zeniai/web-cockpit-ui 1.13.96-dev → 1.13.97-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 (248) hide show
  1. package/dist/assets/{ACHDetailsPage-C_NL9J0X-DQ3wv9Rt.js → ACHDetailsPage-Cwc2nmvY-CBrfq4gI.js} +1 -1
  2. package/dist/assets/{AIPerformancePage-DyiOQxOC-Deykua_G.js → AIPerformancePage-CK4ZdUEb-BnOLhCP_.js} +21 -21
  3. package/dist/assets/{AccountInfoPage-xglon85A-yRVQMsLQ.js → AccountInfoPage-LiZYkJMA-DAD4cJi7.js} +5 -5
  4. package/dist/assets/AccountInfoPageContent-BTk2gRyM-_lQwCngs.js +149 -0
  5. package/dist/assets/{AccountReconDetailsDrawerPage-DJ9x8tbi-LYKktAAO.js → AccountReconDetailsDrawerPage-CBOR2m1X-DHoJQIYl.js} +17 -17
  6. package/dist/assets/{AccountRow-CP7Tu1pO-VLQJgkE6.js → AccountRow--5DnpNqk-CZEL3hfP.js} +23 -23
  7. package/dist/assets/{AccountsPromoCardStack-1elvD1M0-GOX35w9m.js → AccountsPromoCardStack-DCI8_ihc-CBYLqvzT.js} +22 -22
  8. package/dist/assets/{AddAddressForCardDrawer-C8-wy-3B-di9k1XXJ.js → AddAddressForCardDrawer-C_RALUZ7-CbxMebAE.js} +2 -2
  9. package/dist/assets/{AddToWalletPage-DsqplF5y-BOnzBTtb.js → AddToWalletPage-7sC3Q2Pb-BKqtOWBj.js} +19 -19
  10. package/dist/assets/{AgingReportsPage-DClcRhxg-CS8rEKD_.js → AgingReportsPage-PrvYryW8-D41Ajbek.js} +6 -6
  11. package/dist/assets/{AllUserItems-BOwAIYTQ-ikKyJOZ6.js → AllUserItems-DlTukPhY-Dt5EiXuN.js} +7 -7
  12. package/dist/assets/{ApAgingDetailPage-CcU6Hz-o-C9CP7TBd.js → ApAgingDetailPage-BVciGQma-3cn8m00W.js} +4 -4
  13. package/dist/assets/{AppBasePage-C7kCz0qg-gwqzuxWV.js → AppBasePage-uJGLWCbr-D64mYn-E.js} +2 -2
  14. package/dist/assets/{AppDrawerContent-B63CbHT7-CTgXtY-R.js → AppDrawerContent-SD57OqHe-B8SR_oN_.js} +7 -7
  15. package/dist/assets/ApprovalRulesSettingsPage-CXh9tY6X-C-lG0QIf.js +47 -0
  16. package/dist/assets/ArAgingChart-GL4vkypx-Dbm9VICC.js +24 -0
  17. package/dist/assets/{ArAgingDetailPage-AiwyJUwp-CLdUA32y.js → ArAgingDetailPage-CoFL0N3--CrJAJnYy.js} +1 -1
  18. package/dist/assets/{AttachmentView-wIV1i6gf-__2UovKF.js → AttachmentView-C3xQE0te-GHi93uGT.js} +5 -5
  19. package/dist/assets/{BankAccountSection-cVBEl5IN-DpEdLEP3.js → BankAccountSection-Bi3uoDPa-Dwk4Gyix.js} +2 -2
  20. package/dist/assets/{BankAccountWarningSection-Ce5s962S-Dy-_2VlU.js → BankAccountWarningSection-DKdgmMHQ-KMb42RR1.js} +8 -8
  21. package/dist/assets/{BankConnectionsSettingsPage-Cgp8M98A-D84-x80q.js → BankConnectionsSettingsPage-1zM9RKRI-Nh6SLt6_.js} +33 -33
  22. package/dist/assets/{BillDetailPage-C9NC9kTK-BYRIHiN2.js → BillDetailPage-BoxJCC9n-Ba4FzuhK.js} +11 -11
  23. package/dist/assets/{BillPayApprovalRuleDetailPage-yKPMorLd-DWM3MQMK.js → BillPayApprovalRuleDetailPage-BW3sj5ug-1IsB7Eat.js} +2 -2
  24. package/dist/assets/{BillPayApprovalRulesPage-DmMqDFmk-B8Cg6Nn6.js → BillPayApprovalRulesPage-DLA6R7dC-RNBSWaWd.js} +6 -6
  25. package/dist/assets/{BillPayPromoPage-CWGX6uCi--607mHc3.js → BillPayPromoPage--BGTNJhm-CdKwFnau.js} +4 -4
  26. package/dist/assets/BillPaySetUpPage-_s4R537_-CX8mxqXI.js +42 -0
  27. package/dist/assets/{BillingSettingsPage-Bx7lHgIy-CyArwb3F.js → BillingSettingsPage-DgbRhg-m-Bq9qLD4C.js} +5 -5
  28. package/dist/assets/{BillsBulkReviewDrawerPage-Bf5MKQ-f-5iZSFdzE.js → BillsBulkReviewDrawerPage-CKspyZz7-DTsemI8i.js} +1 -1
  29. package/dist/assets/{BoxItem-DX1sag1G-C0OcCbod.js → BoxItem-BHtgE0KL-NzNpvF1b.js} +1 -1
  30. package/dist/assets/{BusinessVerificationPage-DXh-11f9-BWywYgcT.js → BusinessVerificationPage-CpfsllRZ-DNYUoMRQ.js} +14 -14
  31. package/dist/assets/{CardNumberSubText-iYF6MLsf-BnbFJt1d.js → CardNumberSubText-BHe1nqr7-BOPjNd8o.js} +1 -1
  32. package/dist/assets/{CashbackDetailPage-DVsCU69u-iWc1QiKl.js → CashbackDetailPage-C9RhIR0R-BipiQJ8m.js} +24 -24
  33. package/dist/assets/ChargeCardDetailPage-Kygr13jR-Bjl6Z9f1.js +1447 -0
  34. package/dist/assets/ChargeCardListPage-BnzdzSXW-nI0OYzh1.js +355 -0
  35. package/dist/assets/{ChargeCardListTable-PTRaj9T6-GxUnY44G.js → ChargeCardListTable-C2nnAxo5-B2B4JtDk.js} +18 -18
  36. package/dist/assets/ChargeCardPromoPage-CSNn9X5i-BOkfBhCe.js +175 -0
  37. package/dist/assets/ChargeCardSetupPage-DE1pK_7F-Bt-e2YuY.js +36 -0
  38. package/dist/assets/{ChargeCardStatementsPage-uRlTsfDI-DztC0UAp.js → ChargeCardStatementsPage-DK-pEljz-6eoWIwr-.js} +3 -3
  39. package/dist/assets/{ChargeCardUtils-BvVm2SMq-B6pl3c2F.js → ChargeCardUtils-BxyMuU6--Bmupo3qZ.js} +1 -1
  40. package/dist/assets/{ChaseOverlay-CI8lEzod-DNTlxx9v.js → ChaseOverlay-CRiYxWuZ-BVVt_vtO.js} +5 -5
  41. package/dist/assets/{CheckDepositDrawerPage-Czpxz6Mz-gcS4-F7d.js → CheckDepositDrawerPage-WYiirlL8-B4nSgiLA.js} +16 -16
  42. package/dist/assets/CollapsableReportTable-BGT77T9W-C2GRNmrk.js +2860 -0
  43. package/dist/assets/{CompanyOfficerDetailsSection-BrsHy7MO-Cl-BM3f0.js → CompanyOfficerDetailsSection-BPZU90Im-B9mkgd-O.js} +35 -35
  44. package/dist/assets/{CompanyPassportCard-P0g_DRwA-XRQTRVQK.js → CompanyPassportCard-PXdmJC_B-DzV8p2uA.js} +2 -2
  45. package/dist/assets/{CompanyPassportPage-CH8El0Nl-CrZI1ceZ.js → CompanyPassportPage-MxIwsh3W-C8rdGZWZ.js} +37 -37
  46. package/dist/assets/{CompleteProfile-DTSAIKgF-WX_HRfP5.js → CompleteProfile-Bd9xEPVl-FA5xRrEh.js} +4 -4
  47. package/dist/assets/{ConfettiBurst-CjONFCxD-BbasMJ1h.js → ConfettiBurst-CMpZ2feY-D_Hm0eZk.js} +1 -1
  48. package/dist/assets/{CreateOrEditVendorPage-CDVjGotR-BX0RU8Lc.js → CreateOrEditVendorPage-DgHvZfWv-BeviSVbI.js} +13 -13
  49. package/dist/assets/{CreditCardPaymentDrawerPage-CsyNRmxp-J9Q1Nire.js → CreditCardPaymentDrawerPage-C2ikLG7P-Bxh5aiVl.js} +15 -15
  50. package/dist/assets/{CreditCardPaymentPlgSection-BhHsjqZA-DtxErSDc.js → CreditCardPaymentPlgSection-M69ECpN9-DSnTfkj_.js} +8 -8
  51. package/dist/assets/{CurrencySelectField-BRkdK9Tx-DZlSSgUd.js → CurrencySelectField-B3AvTbkp-B96ZkEh4.js} +5 -5
  52. package/dist/assets/{CustomerOnboardingActivationPage-DnVXw5Ok-CF7wqV2h.js → CustomerOnboardingActivationPage-C7eddGoB-zo55D8hK.js} +1 -1
  53. package/dist/assets/CustomerOnboardingContainerPage-9UTLABZ0-BN3o6fR0.js +1 -0
  54. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-C95eWcqa-DW8DNI2i.js → CustomerOnboardingDetailPageSkeleton-BIAeoXCV-FTscuev6.js} +11 -11
  55. package/dist/assets/{CustomerOnboardingNoStepsPage-OKbEl9Bp-Dy87ha3L.js → CustomerOnboardingNoStepsPage-BzO6XZ0H-lf-bevRO.js} +9 -9
  56. package/dist/assets/{CustomerOnboardingPage-D9jqUudS-BpBvjqe9.js → CustomerOnboardingPage-7yWIaJvU-8V6UKhlh.js} +6 -6
  57. package/dist/assets/{CustomerOnboardingProductSuitePage-DK_FKVS2-Dz81TViz.js → CustomerOnboardingProductSuitePage-Tvyrs9Cm-De_nWRUb.js} +5 -5
  58. package/dist/assets/Dashboard-CA9685lJ-DpHlV4-C.js +778 -0
  59. package/dist/assets/DashboardReportPage-DQoFWd5C-pKAB7-wx.js +349 -0
  60. package/dist/assets/{DepositAccTransactionItem-B55LUfPM-Bsnh-Dnt.js → DepositAccTransactionItem-CiRcbfmm-BtrufbNC.js} +2 -2
  61. package/dist/assets/{DepositAccTransactionListPage-CKBZEDvI-CFszcDp5.js → DepositAccTransactionListPage-DsNLDlHv-WmpDQp-W.js} +7 -7
  62. package/dist/assets/{DocumentSecurityBanner-B5e6-zfE-B8VQ-eGv.js → DocumentSecurityBanner-CIWoR_yI-CLvomSrK.js} +1 -1
  63. package/dist/assets/{DomesticWireDetailsPage--MU9IKKz-CI-n4FxD.js → DomesticWireDetailsPage-C6x8Gz4g-BspxgH-d.js} +1 -1
  64. package/dist/assets/{DownloadOverlay-CVay7PEO-C-BIaHoh.js → DownloadOverlay-D1kGkMFo-DoqMhO9h.js} +12 -12
  65. package/dist/assets/{DrawerPage-BtsjUVWT-DKZ4-9Rc.js → DrawerPage-CQkJW5hg-CGoGQKXm.js} +3 -3
  66. package/dist/assets/{EditPeoplePage-q8Se6bGZ-Cx2X58jF.js → EditPeoplePage-m2qls8hv-DIqi_cWW.js} +17 -17
  67. package/dist/assets/{EditReimbursementDetailPage-DJxpU-hz-dhF_OPbV.js → EditReimbursementDetailPage-IlSyu79B-DoScOYgQ.js} +72 -72
  68. package/dist/assets/{EntityDetailPage-Bux6DlIw-CDR-iDms.js → EntityDetailPage-CcJJwGo7-DdfC9C8P.js} +1 -1
  69. package/dist/assets/{EntitySummarySection-D8dz1hFt-Bakc19a1.js → EntitySummarySection-JxKHehL1-CSskvKc8.js} +13 -13
  70. package/dist/assets/{ExpenseAutomationOverviewPage-CdJQtc-4-WoBW313I.js → ExpenseAutomationOverviewPage-iAUtjSnw-DRbadYwX.js} +26 -26
  71. package/dist/assets/{ExpenseAutomationPage-aNc126hN-DZa4KtXO.js → ExpenseAutomationPage-B0f86olm-C_aNA9t4.js} +74 -74
  72. package/dist/assets/{ExpressPayPage-CWVGXvfN-Bzdld5fx.js → ExpressPayPage-B-at6uDS-CSzm_3lE.js} +7 -7
  73. package/dist/assets/{FeaturePreviewPage-C0nvVXP--BF6s18r5.js → FeaturePreviewPage-gSb_rct_-DkcBwtcW.js} +2 -2
  74. package/dist/assets/{FollowStepsSection-Cf0s1DGX-BFVvc78r.js → FollowStepsSection-eedORgku-DnQuyjmJ.js} +12 -12
  75. package/dist/assets/{GlobalReviewListPage-aY4rHJVr-DzNSgRAM.js → GlobalReviewListPage-BfPwveCc--y8DCfXs.js} +10 -10
  76. package/dist/assets/HelpButton-DvD6UJq--BRQPdGD9.js +28 -0
  77. package/dist/assets/{InformationCardStack-BALkGk48-BWmXScs3.js → InformationCardStack-DPaZz4XW-X4kcO2J5.js} +5 -5
  78. package/dist/assets/{InsightsCardStack-D52CCSVO-CezeuABJ.js → InsightsCardStack-sKUFRR0H-BoBw_DR7.js} +10 -10
  79. package/dist/assets/{InsightsSection-D_wtVtVg-5rPDOiJT.js → InsightsSection-Corx5iDh-BfrgopNR.js} +3 -3
  80. package/dist/assets/{IntegrationsSettingsPage-DxjbW311-BrvXi8hE.js → IntegrationsSettingsPage-DTWoUi2e-Dbd60W3o.js} +7 -7
  81. package/dist/assets/{InternationalWireSwiftDetailsPage-24NSHzu1-CRaVhxIk.js → InternationalWireSwiftDetailsPage-B441GUkh-DTa4rnLB.js} +14 -14
  82. package/dist/assets/{InternationalWireVerificationPage-B1jvCUkw-Ld5IAzwh.js → InternationalWireVerificationPage-DjpWjFSe-DZfbKiAU.js} +18 -18
  83. package/dist/assets/{InviteFormPage-C9fNxGsi-CRksfDku.js → InviteFormPage-BRb4jyp_-CG9bf0G3.js} +19 -19
  84. package/dist/assets/{InvitePageListView-DSWZ2SPi-B4SFh7Xp.js → InvitePageListView-Bb_Q_xqJ-BR_HlUlN.js} +49 -49
  85. package/dist/assets/InvitePeoplePage-BKEDAnQ4-BncBQflJ.js +12 -0
  86. package/dist/assets/{InvoiceUploadSection-D0CgJxyu-9_MCn8Y6.js → InvoiceUploadSection-BE4ZqriT-vLaWLqKI.js} +7 -7
  87. package/dist/assets/{IssueChargeCardPage-dYu9VLy4-YHkYWF3X.js → IssueChargeCardPage-BIFpAcrl-D3RFLApI.js} +22 -22
  88. package/dist/assets/{LabeledAddressValue-DtmZ5htg-OjX3rrF7.js → LabeledAddressValue-D2vDF5sP-DQbH1g5O.js} +1 -1
  89. package/dist/assets/{LabeledAddressValueField-C2LEKAwf-BQxD3J4c.js → LabeledAddressValueField-BMdJsw3x-CaLfz9Ol.js} +4 -4
  90. package/dist/assets/{LabeledControlledCheckBoxField-Ds3mSsWy-DNoefl6y.js → LabeledControlledCheckBoxField-CHRGFyHl-CNPGUCoT.js} +1 -1
  91. package/dist/assets/{LabeledCreatableSingleSelectField-DW8jVgaN-BEmOmz9t.js → LabeledCreatableSingleSelectField-qwQPyqDC-Cq7f9yWO.js} +8 -8
  92. package/dist/assets/{LabeledDocumentField-Ce2A0qNH-CSvl2QNP.js → LabeledDocumentField-Cdd8oj5z-BUIficZv.js} +5 -5
  93. package/dist/assets/{LabeledDropDownFormattedTextField-DWlfmICB-Diz5afTR.js → LabeledDropDownFormattedTextField-CSEioH8A-pTgOjjZi.js} +5 -5
  94. package/dist/assets/{LabeledText-bruKdeAH-E98_Q-Ht.js → LabeledText-CqZ-udSP-pLTRiq1L.js} +2 -2
  95. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-CfzUlgs3-BKnteQzK.js → LabeledUserSingleSelectWithSubtitlesField-DTmijO10-DKWPncl-.js} +5 -5
  96. package/dist/assets/{LabeledZeniRolesDropDownField-CGSgg1Zl-M-Z5Kz_3.js → LabeledZeniRolesDropDownField-DSIWuFix-CRT6HEhL.js} +22 -22
  97. package/dist/assets/{LinkJETransactionPage-DjNutEvf-sKN4Are7.js → LinkJETransactionPage-C5V1HfGb-CIMuY7IX.js} +10 -10
  98. package/dist/assets/{LowBalancePopup-CwcYMtuk-B-vSGd6a.js → LowBalancePopup-BLfeh0xm-Cx_IhGZO.js} +7 -7
  99. package/dist/assets/{MagicLinkACHDetailsPage-Ddhg3i45-DAcpfJH2.js → MagicLinkACHDetailsPage-DGR7VcHs-Cv3UhVOp.js} +1 -1
  100. package/dist/assets/{MagicLinkDomesticWireDetailsPage-QzsSuMOz-D-Sj2Twf.js → MagicLinkDomesticWireDetailsPage-BOu5verB-C216t_ZN.js} +1 -1
  101. package/dist/assets/{MagicLinkInternationalWireDetailsPage-BsLlhkuO-cmHC5izc.js → MagicLinkInternationalWireDetailsPage-elijVpdq-CQ_97vzd.js} +1 -1
  102. package/dist/assets/{MagicLinkSuccessPage-COpDxIAb-BaiQCbjC.js → MagicLinkSuccessPage-C6-JVGAQ-BQmAkFrb.js} +4 -4
  103. package/dist/assets/{MagicLinkTitleSection-Oa8Szvl2-DvY3D69u.js → MagicLinkTitleSection-CCjLimcL-D5Get_gS.js} +3 -3
  104. package/dist/assets/{MailingDetailsSection-BycONjR9-Dhu_6L_d.js → MailingDetailsSection-CJhcwaGu-DgdtnVpz.js} +1 -1
  105. package/dist/assets/{MeetingCalenderPopup-D_WPTVKr-DYqVpuuh.js → MeetingCalenderPopup-DKBH6wSs-BI8-Q4hn.js} +3 -3
  106. package/dist/assets/{Menu-B6Fh2Mf9-B_ofMkAs.js → Menu-D-Gk-Xfo-D2aBa-uL.js} +2 -2
  107. package/dist/assets/{MyBankConnectionsSettingsPage-jWuBarzg-DszKEiXJ.js → MyBankConnectionsSettingsPage-CBxa9AUT-FwglrEt0.js} +18 -18
  108. package/dist/assets/{MyPendingActivationChargeCardListPage-_wuCCZ2J-Cbj97sd-.js → MyPendingActivationChargeCardListPage-DBr5htlO-Dvj38gdb.js} +1 -1
  109. package/dist/assets/{MyProfileSettingsPage-ChyYrCir-Dq1dhgqM.js → MyProfileSettingsPage-DKUX_nTz-D_7L2i-C.js} +8 -8
  110. package/dist/assets/{NavBarWithPicker-D4jJGXZB-BJWr2BT1.js → NavBarWithPicker-CXyMHDUO-CLsGi3M3.js} +4 -4
  111. package/dist/assets/{NavigationArrow-DlUdvmV7-iugv9ZVE.js → NavigationArrow-Bv-PvnhZ-BCqZOufx.js} +7 -10
  112. package/dist/assets/{NavigationDots-CFJt-T5J-B9PAzC5S.js → NavigationDots-DJkiFidH-EWS9_PIe.js} +1 -1
  113. package/dist/assets/{NewGlobalMerchantPage-DhYni-in-Diwu92Go.js → NewGlobalMerchantPage-CmJjl9S1-DFoCghTb.js} +8 -8
  114. package/dist/assets/{NoDataChart-CvGbQO4j-B5z4vqWb.js → NoDataChart-Bsj1HEPq-BuASr5nD.js} +1 -1
  115. package/dist/assets/{NoDataTable-EKtYZwcL-XyHu2gAL.js → NoDataTable-6vR2vOMI-CRH2wpQ3.js} +1 -1
  116. package/dist/assets/{NotFoundPage-D5SHSQLS-0U7pTJ8G.js → NotFoundPage-SRxATfaW-BdYkexg6.js} +4 -4
  117. package/dist/assets/{NotificationSettingsPage-CjJw9Atb-BmSbhipZ.js → NotificationSettingsPage-Bko3CBmW-B23VZLnT.js} +33 -33
  118. package/dist/assets/NotificationsListConfig-ChVd_Bek-OcoLbH0n.js +1 -0
  119. package/dist/assets/{NotificationsPage-bGvx2yV6-C4p8pfzZ.js → NotificationsPage-DMfBgh2w-Dxmai7ss.js} +12 -12
  120. package/dist/assets/{OpExByVendorPage-BE_NnQzd-DQnxoqWx.js → OpExByVendorPage-DOkwCGkr-Dr-bU76_.js} +7 -7
  121. package/dist/assets/{OverlayContainerPage-GWXnlbZH-D2VSw_RI.js → OverlayContainerPage-C0rUb6-5-B09r4rdB.js} +1 -1
  122. package/dist/assets/{PandLWithForecastPage-D-000kuR-BW5fUkac.js → PandLWithForecastPage-DCJ3QTuj-7Vldqx8T.js} +11 -11
  123. package/dist/assets/{PaymentAccountSetupBillingAddressSection-CwbX_znq-C6WVSYgS.js → PaymentAccountSetupBillingAddressSection-CaZETrGz-BhXLnlcL.js} +8 -8
  124. package/dist/assets/{PeoplePage-MwM0lFB9-B0wgHwI1.js → PeoplePage-PvOhX-gy-CkehxRRv.js} +14 -14
  125. package/dist/assets/PortfolioAllocationFormPage-DsCeagnu-6-GqBYNr.js +207 -0
  126. package/dist/assets/PortfolioDetails-BEa4kwk8-CLWb3MOf.js +218 -0
  127. package/dist/assets/{ProductsCarousel-D2wC3sC--BKh2AE5P.js → ProductsCarousel-qzlVuyK5-C7_wrvUe.js} +9 -9
  128. package/dist/assets/{PromoBaseCards-Ddumul2a-BrEDd739.js → PromoBaseCards-26GOEn3a-DGu7k9yr.js} +23 -23
  129. package/dist/assets/{QBOConnectionDialog-DszSpNdI-DwqHmKSk.js → QBOConnectionDialog-CZQE3Tjs-BJ-xZ1uL.js} +7 -7
  130. package/dist/assets/{QBOSetupSection-BNF-BUu5-B_yCc7Df.js → QBOSetupSection-u1sJhV67-3IaLFWCq.js} +13 -13
  131. package/dist/assets/{ReimbursementApprovalRuleDetailPage-Myone4-k-B9H3tR1_.js → ReimbursementApprovalRuleDetailPage-vRiO7G_7-BNpO-W1a.js} +1 -1
  132. package/dist/assets/{ReimbursementApprovalRulesPage-DFhp0GGU-p0zWXuJ6.js → ReimbursementApprovalRulesPage-kEmFNXtg-B8ugfZMC.js} +35 -35
  133. package/dist/assets/{ReimbursementDetailPage-BAEddssC-DcJfByf4.js → ReimbursementDetailPage-ChyRg0eX-DWtyRMkY.js} +10 -10
  134. package/dist/assets/{ReimbursementPromoPage-D4u3SX8R-ByzJ_1Sx.js → ReimbursementPromoPage-BWsOD49o-Dd_wQE7-.js} +7 -7
  135. package/dist/assets/ReimbursementSetUpPage-DO_dBP9N-Dy9d9et5.js +140 -0
  136. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-CAo_NjTX-O9TR0kFt.js → ReimbursementsBulkReviewDrawerPage-CgRo7VeI-Bt0c1YwP.js} +1 -1
  137. package/dist/assets/{ReloadCard-BA_JCHcV-DL7NGQyj.js → ReloadCard-CpauR6-c-D0tZ9Fyb.js} +5 -5
  138. package/dist/assets/ReportTableViewSelector-D6DHFt_R-CaLxLhCV.js +150 -0
  139. package/dist/assets/ReportsPage-D4mI3T0w-Do8bVyWV.js +120 -0
  140. package/dist/assets/{RevenueChart-D33p-PFq-CGRJwc_N.js → RevenueChart-JdtvK4L6-Ngpoc51c.js} +1 -1
  141. package/dist/assets/{ReviewDetailsPage-D35NcQnx-Cbn86Yy5.js → ReviewDetailsPage-BwQoOV2Q-BnMNYLWI.js} +15 -15
  142. package/dist/assets/{ReviewOverlay-BYJdokfW-C97jtxei.js → ReviewOverlay-BLxhto7d-C71dqQqP.js} +10 -10
  143. package/dist/assets/{RoleWithToolTip-B3hm-1rz-OZzvKPZJ.js → RoleWithToolTip-BRSx6yqP-BUZQlrca.js} +7 -7
  144. package/dist/assets/{ScheduleDetailsFixedAssetsPage-BVnISMKW-BILZO4Rn.js → ScheduleDetailsFixedAssetsPage-CH84DI7F-Pp7ryVvn.js} +8 -8
  145. package/dist/assets/{ScheduleDetailsPage-BibWPOxC-DZMtTy3C.js → ScheduleDetailsPage-CMunoow5-BkaTYagU.js} +4 -4
  146. package/dist/assets/{ScheduleSequenceTable-DcQmeKyc-JMxQ5IZq.js → ScheduleSequenceTable-CQVHkQ0e-f2QXv--M.js} +49 -49
  147. package/dist/assets/{ScreenRoutes-iE9-v0dJ.js → ScreenRoutes-DXvnX-LV.js} +35 -35
  148. package/dist/assets/{SetUpAccountSection-BEJy78G6-Do1X3vVo.js → SetUpAccountSection-CyyxtFvK-Cj5cRA0y.js} +24 -24
  149. package/dist/assets/{SetUpDefaultSection-ul-q6U3w-CKVV_QFK.js → SetUpDefaultSection-Bdw_aWMY-Cmz2s5mU.js} +16 -16
  150. package/dist/assets/{SignIn-BC8yop4g-CznicFTu.js → SignIn-Gw75P03k-CwFuzpqD.js} +17 -17
  151. package/dist/assets/{SignInScreen-k0dvslKE.js → SignInScreen-tRJyAVn0.js} +1 -1
  152. package/dist/assets/{SpendManagementListViewPage-aZljA388--EEskYb2.js → SpendManagementListViewPage-BccaMtyd-DhsnmCTR.js} +10 -10
  153. package/dist/assets/{SpendManagementPerTabPage-BU1ai2M8-DkMZQMfc.js → SpendManagementPerTabPage-D-YqqUsz-CMqa5ICA.js} +33 -33
  154. package/dist/assets/{SpendManagementSection-DMw8NFvN-Cpy4Blf3.js → SpendManagementSection-CdH1r1Vw-BnFiiVz5.js} +8 -8
  155. package/dist/assets/SpendMgmtSetupAccountSection-nryeZQ0T-r6fy71VQ.js +206 -0
  156. package/dist/assets/{StatementItem-CKTGWEW_-d6SqxmfH.js → StatementItem-BW9HKaf9-By5T4EbF.js} +3 -3
  157. package/dist/assets/{StatementsPage-CjR4AlPy-BQRlcz37.js → StatementsPage-CXawS1th-CEfY_8qI.js} +6 -6
  158. package/dist/assets/{StatusSwitcher-5CZzUYJE-qZVSFmES.js → StatusSwitcher-oC-AP25Z-CEWD2b8L.js} +5 -5
  159. package/dist/assets/{SubTabSwitcher-a38_U4dN-BfyQ4BdY.js → SubTabSwitcher-DXWQMf7B-B3Pt5uAY.js} +1 -1
  160. package/dist/assets/{SummaryCard-XbFHvHx9-CTqdwSSS.js → SummaryCard-C3zjN-kT-BEGBL6Jl.js} +1 -1
  161. package/dist/assets/{TaskManagementPage-Oct77yO--igT2quo0.js → TaskManagementPage-BGDJNpe_-rd55LI6o.js} +31 -31
  162. package/dist/assets/{TimeRangeSwitcher-C4mpBnQl-CaG6dXuN.js → TimeRangeSwitcher-BJfy3akS-OfTTOizn.js} +3 -3
  163. package/dist/assets/{TimeframeSwitcher-CnLEHYWD-BW9vKcLS.js → TimeframeSwitcher-M9tK6u0Y-Bxtbdng5.js} +5 -5
  164. package/dist/assets/TimeframeSwitcherWithToggle-L1nNDGOE-WAQaP0VD.js +31 -0
  165. package/dist/assets/{TopExCard-CaR8tsug-DnQ2eFWB.js → TopExCard-BD9Ehuw_-BXC8E3qf.js} +5 -5
  166. package/dist/assets/{TopExDetailPage-C4QeWe92-vjJ7ZG8N.js → TopExDetailPage-3HoXp_6D-CtO2rBhy.js} +10 -10
  167. package/dist/assets/{TransactionDetailPage-BoxnNYXX-2QwooFWS.js → TransactionDetailPage-CbnGQ8bn-BsL7JPEZ.js} +26 -26
  168. package/dist/assets/TransactionList-BBjiP2Nf-DUNjy3TT.js +147 -0
  169. package/dist/assets/{TransactionListBig-B0FG0-BM-Br0wUjP3.js → TransactionListBig-5aenxEn4-IdhDPOuV.js} +18 -18
  170. package/dist/assets/TransactionListPage-BeVkiwkg-CDFwd5bS.js +35 -0
  171. package/dist/assets/{TransactionVendorDetailPage-gBr8kX0F-BE5xJ4Iy.js → TransactionVendorDetailPage-Yi7SmsyK-RZzw2CZy.js} +5 -5
  172. package/dist/assets/{TransferDrawerPage-BJVanLzC-BZZsX7dv.js → TransferDrawerPage-2P1mhp1M-B4VYzOoO.js} +11 -11
  173. package/dist/assets/{TreasuryOverviewPage-DGJnHyrO-BPZDM1DN.js → TreasuryOverviewPage-CkCBcBQK-gQtJbKm4.js} +34 -34
  174. package/dist/assets/{TreasuryPromoPage-CblUabA3-CO5CaCN_.js → TreasuryPromoPage-v-g4ZAdk-BrcSopM1.js} +14 -14
  175. package/dist/assets/{TreasurySetupPage-CuROk6il-7kJUNajN.js → TreasurySetupPage-B7va2-fJ-DjxpMJWN.js} +2 -2
  176. package/dist/assets/{TreasuryStatementsPage-DfB0yrzC-osurk-aq.js → TreasuryStatementsPage-BEJsQ-Oz-BTSyqWeA.js} +10 -10
  177. package/dist/assets/{TreasuryTaxLetterPage-CRoLpeXm-g70lefJl.js → TreasuryTaxLetterPage-CpTpM1mx-BiYSLuAV.js} +4 -4
  178. package/dist/assets/{TreasuryTransferOrReviewPage-QMDAFbkh-CUXJN-eh.js → TreasuryTransferOrReviewPage-BRPFympA-BvZHT5Zx.js} +77 -77
  179. package/dist/assets/{TrendChart-D3_4i3qH-wYUerKRk.js → TrendChart-DRNocU0p-DH8MSEgo.js} +3 -3
  180. package/dist/assets/{TrendWithTransactions-KkV2_0Uh-D0lwZdhf.js → TrendWithTransactions-CldwGpXX-DKmrunTF.js} +5 -5
  181. package/dist/assets/{UncategorizedAccountsMappingPage-kKq-jvPY-CF6bAw3X.js → UncategorizedAccountsMappingPage-2C5qEhte-Dh6x_P3v.js} +1 -1
  182. package/dist/assets/{UnitIntegrationPage-CZS0yjHf-2PLtjCjv.js → UnitIntegrationPage--cDHqgXs-DtCf2vZQ.js} +3 -3
  183. package/dist/assets/{UploadAdditionalDocumentOverlay-KkO_TLUT-n0LOLnpS.js → UploadAdditionalDocumentOverlay-D85ML8-_-B-QpxAiO.js} +1 -1
  184. package/dist/assets/{Vendor2FAPopup-wnVnkHOg-DABVEKDS.js → Vendor2FAPopup-vdFWf98b-B7o0Z5rr.js} +1 -1
  185. package/dist/assets/{VendorACHDetailsPage-nuzdr69i-pgOa8d0q.js → VendorACHDetailsPage-D7ImMabh-CSvkLquw.js} +1 -1
  186. package/dist/assets/{VendorDetailPage-ClmL_1FB-Cz0Favu8.js → VendorDetailPage-BOeEd9pX-gUrBoOK0.js} +14 -14
  187. package/dist/assets/{VendorDomesticWireDetailsPage-DEK3jdYu-StHUbnc9.js → VendorDomesticWireDetailsPage-CXFrYPn8-CB7lnVxg.js} +1 -1
  188. package/dist/assets/{VendorFiling1099EditablePage-KMOY10Xr-C-_0rtWP.js → VendorFiling1099EditablePage-CZFErJ91-Xm9IJ-1g.js} +9 -9
  189. package/dist/assets/{VendorFirstReviewPage-CLF3qT17-D1oHFEVR.js → VendorFirstReviewPage-BHzDUMKu-y6QbEQFP.js} +75 -75
  190. package/dist/assets/{VendorInternationalWireDetailsPage-C5JXqVVq-DdhMyWB0.js → VendorInternationalWireDetailsPage-j4j5irzH-CXfMsio3.js} +8 -8
  191. package/dist/assets/{VendorInternationalWireSwiftDetailsPage-7KrBqEWb-D_WpQwvk.js → VendorInternationalWireSwiftDetailsPage-DM4jC7wD-u0u1sFOX.js} +1 -1
  192. package/dist/assets/{VendorsAccountsSection-fcURK7tv-BOScGj67.js → VendorsAccountsSection-BTRiZlIa-BZealh27.js} +13 -13
  193. package/dist/assets/{WarningsDrawerPage-Bnd_CdR9-B2JqHi6z.js → WarningsDrawerPage-ZgfQEBme-Co_2thoU.js} +10 -10
  194. package/dist/assets/{ZeniAccountDetailPage-DRDCdFW7-D8o4Z2Hy.js → ZeniAccountDetailPage-xrq0Ez6S-wsGmzJtr.js} +40 -40
  195. package/dist/assets/{ZeniAccountListViewPage-ZPWww_Go-HRp0ORwg.js → ZeniAccountListViewPage-BwXfELGd-DN8EGYyI.js} +5 -5
  196. package/dist/assets/{ZeniAccountNavBarPieces-DFivFXxa-rHFaK51E.js → ZeniAccountNavBarPieces-xpHuuPSD-Djz7djM6.js} +1 -1
  197. package/dist/assets/{ZeniAccountPromoPage-D1oJNoqy-C6ZFb72_.js → ZeniAccountPromoPage-BvSwPEk7-BDnAl2G8.js} +18 -18
  198. package/dist/assets/{ZeniAccountSetupPage-DITu6ztK-Fgis_UYm.js → ZeniAccountSetupPage-yCkiopeU-BliT7Pvn.js} +3 -3
  199. package/dist/assets/{ZeniCopyright-DoA2I5zj-CPBH_zf-.js → ZeniCopyright-BAbOOFg9-BBG8qKfW.js} +1 -1
  200. package/dist/assets/{ZeniTransferAmountSlider-amszUh1p-Wx5VV7C8.js → ZeniTransferAmountSlider-C1sl8ZNj-DpQGiDCK.js} +1 -1
  201. package/dist/assets/{analyticsHelper-BbcCIpO1.js → analyticsHelper-CIoNdHiA.js} +1 -1
  202. package/dist/assets/{analyticsHelper-DPbbQVAO-ChPUlKK7.js → analyticsHelper-CkzpobMi-BfnXXtCD.js} +1 -1
  203. package/dist/assets/{chartTypes-qpvW4LwC-4Ag0mdD1.js → chartTypes-JD2mR9iq-D7wZaUzd.js} +1 -1
  204. package/dist/assets/{commonDimensions-DAvj4Il1-Chc9ZQai.js → commonDimensions-DRfDJ_wQ-BO2rVKKM.js} +1 -1
  205. package/dist/assets/{detailCommon-jP1ggD3g-CQiTz4E7.js → detailCommon-BbKkY_46-CAbvAN8D.js} +5 -5
  206. package/dist/assets/{downloadPdf-LAHtgcHF-B9uNpNRf.js → downloadPdf-D7ANJLK4-DY2Y05LM.js} +1 -1
  207. package/dist/assets/{index-DyBH5SZv.js → index-CEwYV-nF.js} +3520 -3543
  208. package/dist/assets/mapLoadingInProgressToTreeNode-e8JhfflK-BF2nQ7sS.js +1 -0
  209. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-Dr43nOGj-FSgubQ7E.js → mapSectionWithAcOnlyToTreeNode-caUW45t5-Bg9OIhnk.js} +1 -1
  210. package/dist/assets/mapSpacerToTreeNode-C692pbYW-C4jUHB0O.js +1 -0
  211. package/dist/assets/mapTimeframeBalancesToTreeNode-DKrYq4x5-fbf9_UTv.js +1 -0
  212. package/dist/assets/{play-icon-D3OSczih-8eMagn70.js → play-icon-BbWpG2oG-hh6oQ481.js} +3 -3
  213. package/dist/assets/{toCOABalancesWithID-DeWKaovX-C_3xC96w.js → toCOABalancesWithID-DOgHiMwn-g7DirtT0.js} +1 -1
  214. package/dist/assets/{toChartData-Dkp488IJ-Cg1gF7al.js → toChartData-CNfdaXyM-BIB6n4VL.js} +1 -1
  215. package/dist/assets/{treasuryColorHelper-BibNNRS5-DCmyWsB-.js → treasuryColorHelper-JBMxqa9X-YTcVeII5.js} +1 -1
  216. package/dist/assets/{uploadAttachment-BjJ8_wDA-22p019X4.js → uploadAttachment-BGZjtYkJ-KlPFkrcJ.js} +25 -25
  217. package/dist/assets/{uploadReceipts-D80JLNY4-sjevKwVl.js → uploadReceipts-Buvz7DfG-B7o_gJnm.js} +1 -1
  218. package/dist/index.html +1 -1
  219. package/package.json +4 -4
  220. package/dist/assets/AccountInfoPageContent-BtMF3gSM-CwB-GVxY.js +0 -149
  221. package/dist/assets/ApprovalRulesSettingsPage-D6XZafBq-BQyA8PhX.js +0 -47
  222. package/dist/assets/ArAgingChart-D-Z3jfGt-DS-oqmcQ.js +0 -24
  223. package/dist/assets/BillPaySetUpPage-B-DHUIqu-DsqPk0zS.js +0 -42
  224. package/dist/assets/ChargeCardDetailPage-D5bwvNOM-CT3hMXCY.js +0 -1447
  225. package/dist/assets/ChargeCardListPage-rY7_MoJ5-CzPbszY2.js +0 -355
  226. package/dist/assets/ChargeCardPromoPage-BUtD2JQ4-Bh59RQEl.js +0 -219
  227. package/dist/assets/ChargeCardSetupPage-CIRcLLnB-Cefuwkkm.js +0 -36
  228. package/dist/assets/CollapsableReportTable-BBGdC6Ii-N5Ehkf8R.js +0 -2932
  229. package/dist/assets/CustomerOnboardingContainerPage-wmVbYxdI-BLfm1bGE.js +0 -1
  230. package/dist/assets/Dashboard-CsuzQbH0-B5Hgiilv.js +0 -1254
  231. package/dist/assets/DashboardReportPage-BCkrfj3P-CIFdRg6l.js +0 -370
  232. package/dist/assets/HelpButton-Dv3nbc1Z-CHaoZd0g.js +0 -28
  233. package/dist/assets/InvitePeoplePage-DaN4NSHW-CydccedW.js +0 -12
  234. package/dist/assets/NotificationsListConfig-BL_MxKXF-CvqrsVs-.js +0 -1
  235. package/dist/assets/PortfolioAllocationFormPage-C3a4MQzW-CQIA3SiA.js +0 -207
  236. package/dist/assets/PortfolioDetails-BMJ6PGMP-DtrA52bw.js +0 -218
  237. package/dist/assets/ReimbursementSetUpPage-B9ByGW3n-Bt2Z4PCD.js +0 -140
  238. package/dist/assets/ReportTableViewSelector-D7B88kS6-BrGIUsj4.js +0 -150
  239. package/dist/assets/ReportsPage-BzMzH-I3-BKZoRCt6.js +0 -121
  240. package/dist/assets/SpendMgmtSetupAccountSection-BtcwTlJT-Bsya0Qr3.js +0 -206
  241. package/dist/assets/TimeframeSwitcherWithToggle-Bc-Y5Hwv-0uMnBILy.js +0 -31
  242. package/dist/assets/TransactionList-IjM4ABdF-DZ9PEfgX.js +0 -147
  243. package/dist/assets/TransactionListPage-1dwu-ZT2-vlIbHO3m.js +0 -35
  244. package/dist/assets/mapLoadingInProgressToTreeNode-CjvJKOzk-DeuVFxVw.js +0 -1
  245. package/dist/assets/mapSpacerToTreeNode-COsnfFtf-DI0OXEqQ.js +0 -1
  246. package/dist/assets/mapTimeframeBalancesToTreeNode-BnpqSOA6-DAD3sG8g.js +0 -1
  247. package/dist/assets/mapTimeframeBalancesToTreeNode-DFanhVY8-Cl8Oktyg.js +0 -1
  248. package/dist/assets/mapTimeframeHeaderLoadingInProgressToTreeNode-D2xlqc6w-BjPO7Xb1.js +0 -1
@@ -1,4 +1,4 @@
1
- import{u as ve,X as je,a as Ke,c3 as Xe,j as t,aV as Ze,M as re,o as i,c as se,bL as Qe,F as et,bs as tt,C as I,f as nt,q as W,an as it,v as We,Q as ot,d2 as ze,cg as at,a1 as J,a7 as fe,eX as Te,l as G,co as ct,aQ as Ne,f3 as qe,f4 as lt,f5 as st,bB as Oe,n as k,eY as ge,eZ as we,_ as Se,bD as xe,Y as rt,b4 as dt,dH as He,g as ie,w as F,f2 as ut,fg as pt,fh as ht,aA as mt,fi as ft}from"./index-DyBH5SZv.js";import{b as r,n}from"./vendor-CnQcJ2Lu.js";import{r as _e}from"./mui-C5LQ0bMa.js";import{M as Pe}from"./ChaseOverlay-CI8lEzod-DNTlxx9v.js";import{a as gt}from"./SetUpAccountSection-BEJy78G6-Do1X3vVo.js";import{z as wt,B as Ie}from"./SpendMgmtSetupAccountSection-BtcwTlJT-Bsya0Qr3.js";import"./analytics-CBL_L82S.js";import"./routing-Cpaypegg.js";import"./sentry-HDxG13yk.js";import"./redux-ByjIRbhZ.js";import"./liveblocks-sSQ9JElv.js";import"./crypto-BURQLTgV.js";import"./SetUpDefaultSection-ul-q6U3w-CKVV_QFK.js";import"./ChargeCardUtils-BvVm2SMq-B6pl3c2F.js";import"./CreditCardPaymentPlgSection-BhHsjqZA-DtxErSDc.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:Ee,strings:{hyphen:ke}},commonSetUp:{setUp:Be}}=re.getLocalizedStrings(),T={containerPadding:new I(k[3],k[4]),containerRightPadding:new I(k[3],k[8]),iconContainerMaxWidthHeight:new I(k[6],k[7]),iconWidthHeight:new I(20,k[4]),iconPadding:new I(k[1],12),productTypeContainerMarginBottom:new I(k[3],k[0]),linkAccountContainerMarginTop:new I(k[3],k[0]),productTypeIconSize:new I(k[3],k[4])},bt="bankConnectionsSettingsPage",$t=({productType:e,windowSize:h})=>{switch(e){case"bill_pay":return t.jsx(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: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,O,s,j=!1;o!=null&&(o.accType==="depositAccount"?p={code:"verified",name:"Verified"}:(p=o.providerVerificationStatus,O=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),E=C.mode==="light"?new fe(C.colors.brandColorJadeLight):new fe(C.colors.brandColorJadeDark),Y=r.useCallback((x,K)=>{f.trackConnectBankSuccess(l,"Settings");const Le=K.accounts.find(Ye=>Ye.id===o?.providerAccountId)??K.accounts[0];o?.id!=null&&u==="update_account"&&Le?.verification_status!=null&&!j?_(Le?.verification_status,o.id,"update_account",y(l),l):P(x,y(l),l),A(void 0),z(!1)},[f,l,o?.id,o?.providerAccountId,u,j,_,P]),te=r.useCallback((x,K)=>{x!=null&&(f.trackConnectBankFailure(l,x.error_code+" "+x.error_message,"Settings"),x.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&o?.id!=null&&_("verification_failed",o.id,"update_account",y(l),l),console.log("Plaid Connection Error",x,K)),A(void 0),z(!1)},[f,l,o?.id,_]),{open:Q,ready:ue}=Te({token:S,onSuccess:Y,onExit:te});r.useEffect(()=>{(X==="In-Progress"&&m.updateStatus.fetchState==="Completed"||Z==="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,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"),B=ct(V,oe);r.useEffect(()=>{d.fetchStatus.fetchState==="Completed"&&d.linkToken!=null&&d.linkToken!==S&&L(d.linkToken)},[d.fetchStatus.fetchState,d.linkToken,S]),r.useEffect(()=>{$&&Q()},[$,Q]),r.useEffect(()=>{!o?.zeniAccountId&&!B&&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=O?.zeniInstitutionId.toLowerCase()==="chase",Ge=a.findIndex(x=>x.id===o?.id),Je={element:t.jsx(Ne,{width:T.iconWidthHeight.valuePx(c)}),color:E};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:Ee.productNameByType[l]})]}),t.jsx(_t,{windowSize:c,wrapperWidth:N[1].width,children:t.jsxs(Bt,{windowSize:c,children:[o!=null&&c!=="small"?t.jsx(Et,{isDisabled:j,children:wt(Je,c,C.mode==="dark",o,Ge,!1)}):null,t.jsxs(Ft,{windowSize:c,className:"fundingAccount",children:[t.jsx(qe,{style:{display:c==="small"?"block":"inherit",width:"-webkit-fill-available",color:C.colors.hero},customStyleConfig:{menu:()=>({width:c==="small"?"auto":510})},controlProperty:{controlHeight:k[4],fontWeight:Oe.medium,highlightOnHover:!1,leftRightMargin:!1,fieldWidth:c==="small"?240:300},customPlaceholder:{color:C.colors.hero,weight:Oe.medium},name:$e(l,"primaryAccountSection"),placeholder:Be.selectAccountPlaceholder,capitalizeOptions:!0,appendSublabel:!1,showLogoInSingleValue:!1,isClearable:!1,maxMenuHeight:220,valueToLogo:(x,K)=>st(a,x,K),valueToSubLabels:(x,K)=>lt(a,x,K,!1),defaultValue:{selectedOption:o?.id,allOptions:a.map(x=>({label:x.label,value:x.id,isRecommended:x.accType==="depositAccount"}))},textAlignment:"left",showDownChevronIcon:!0,showTickIcon:!1,isOptionRemovable:!1,registerOptions:{required:!1},showCreateOption:!0,showEmptyState:!1,isDisabled:g?"disabled":void 0,showLoadingIcon:g,onClickCreateOption:()=>{f.trackConnectBank(l,"Settings"),A("link_account"),m.linkToken==null||G.zeniDate(new Date().toISOString()).isAfter(m.expiration)?R("link_account",y(l)):S!==m.linkToken?L(m.linkToken):$?Q():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(Ot,{}):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(Mt,{children:[o?.accountBalance?.available?t.jsx(Fe,{className:"balanceLabel",children:Se("0,0[.]00",o?.accountBalance?.available)}):t.jsx(be,{children:ke}),o?.accountBalance?.lastRefreshTime?t.jsx(Re,{className:"balanceLabel",children:xe(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null]}):null]})}),t.jsxs(Ut,{windowSize:c,isDisabled:j,wrapperWidth:N[2].width,onClick:x=>x.stopPropagation(),"data-testid":rt("bank-account-section",l),className:"qboLinkAcc",children:[c==="small"?t.jsx(Lt,{children:Ee.bankConnectionHeader.linkAccount}):null,t.jsx(Dt,{isDisabled:j?"disabled":void 0,name:$e(l,"bankAccountSection"),placeholder:Be.zeniCashAccountPlaceholder,defaultValue:{selectedOption:o?.zeniAccountId??"",allOptions:e.map(x=>({label:x.accountName,value:x.accountId}))},controlProperty:{highlightOnHover:!0},isOptionRemovable:!1,textAlignment:"left",registerOptions:{required:!1},style:{width:c==="small"?"calc(100% - 135px)":"100%",marginLeft:c==="small"?i.sp0:`-${i.sp3}`}})]}),c!=="small"?t.jsx(Vt,{windowSize:c,wrapperWidth:N[3].width,children:p!=null?t.jsx(ge,{style:{width:"max-content",padding:0},tagTitle:p.name,textColor:we(p.code)}):t.jsx(be,{children:ke})}):null,c!=="small"?t.jsxs(Rt,{windowSize:c,wrapperWidth:N[4].width,children:[o?.accountBalance?.available?t.jsx(Fe,{className:"balanceLabel",children:Se("0,0[.]00",o?.accountBalance?.available)}):t.jsx(be,{children:ke}),o?.accountBalance?.lastRefreshTime?t.jsx(Re,{className:"balanceLabel",children:xe(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null]}):null]})},At=n.div`
1
+ import{u as ve,X as je,a as Ye,c3 as Ze,j as t,aW as Xe,M as re,o as i,e as se,bL as Ke,F as et,bt as tt,C as P,m as nt,t as W,as as it,r as We,Q as ot,d3 as ze,cg as at,a5 as G,ab as fe,eZ as Te,l as Y,co as ct,aQ as Ne,f5 as qe,f6 as lt,f7 as st,bC as Oe,q as k,e_ as ge,e$ as we,_ as Se,bD as xe,Y as rt,b5 as dt,dI as He,g as ie,v as B,f4 as ut,fi as pt,fj as ht,cZ as mt,fk as ft}from"./index-CEwYV-nF.js";import{b as r,n}from"./vendor-CnQcJ2Lu.js";import{r as _e}from"./mui-C5LQ0bMa.js";import{M as Ie}from"./ChaseOverlay-CRiYxWuZ-BVVt_vtO.js";import{a as gt}from"./SetUpAccountSection-CyyxtFvK-Cj5cRA0y.js";import{R as wt,z as Pe}from"./SpendMgmtSetupAccountSection-nryeZQ0T-r6fy71VQ.js";import"./analytics-CBL_L82S.js";import"./routing-Cpaypegg.js";import"./sentry-HDxG13yk.js";import"./redux-ByjIRbhZ.js";import"./liveblocks-sSQ9JElv.js";import"./crypto-BURQLTgV.js";import"./SetUpDefaultSection-Bdw_aWMY-Cmz2s5mU.js";import"./ChargeCardUtils-BxyMuU6--Bmupo3qZ.js";import"./CreditCardPaymentPlgSection-M69ECpN9-DSnTfkj_.js";const{settings:{bankConnectionHeader:de}}=re.getLocalizedStrings().common,St={value:de.productType,width:new P(100,19)},xt={value:de.primaryAccount,width:new P(100,36)},yt={value:de.linkAccount,width:new P(100,22)},vt={value:de.status,width:new P(12,12)},kt={value:de.balance,width:new P(12,13)},N=[St,xt,yt,vt,kt],{common:{settings:Ee,strings:{hyphen:ke}},commonSetUp:{setUp:Fe}}=re.getLocalizedStrings(),T={containerPadding:new P(k[3],k[4]),containerRightPadding:new P(k[3],k[8]),iconContainerMaxWidthHeight:new P(k[6],k[7]),iconWidthHeight:new P(20,k[4]),iconPadding:new P(k[1],12),productTypeContainerMarginBottom:new P(k[3],k[0]),linkAccountContainerMarginTop:new P(k[3],k[0]),productTypeIconSize:new P(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:R,onUpdatePaymentAccountStatus:_,onEstablishConnectionClick:I,onEstablishConnectionSuccess:M})=>{const C=ve(),c=je(),f=ze().analytics,{trigger:w,formState:{errors:V}}=at(),{plaidConnectionDetails:D,allFundingAccounts:a,primaryFundingAccount:o,productType:s}=h,m=D.link_account,b=D.update_account,[u,A]=r.useState(void 0),[H,v]=r.useState(!1),U=()=>{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,O,l,j=!1;o!=null&&(o.accType==="depositAccount"?p={code:"verified",name:"Verified"}:(p=o.providerVerificationStatus,O=o?.institutionDetails,l=p?.code,j=o?.isLoginRequired??!1));const Z=G(m.updateStatus.fetchState),X=G(b.updateStatus.fetchState),ee=G(b.fetchStatus.fetchState),E=C.mode==="light"?new fe(C.colors.brandColorJadeLight):new fe(C.colors.brandColorJadeDark),J=r.useCallback((x,Q)=>{f.trackConnectBankSuccess(s,"Settings");const Le=Q.accounts.find(Qe=>Qe.id===o?.providerAccountId)??Q.accounts[0];o?.id!=null&&u==="update_account"&&Le?.verification_status!=null&&!j?_(Le?.verification_status,o.id,"update_account",y(s),s):I(x,y(s),s),A(void 0),z(!1)},[f,s,o?.id,o?.providerAccountId,u,j,_,I]),te=r.useCallback((x,Q)=>{x!=null&&(f.trackConnectBankFailure(s,x.error_code+" "+x.error_message,"Settings"),x.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&o?.id!=null&&_("verification_failed",o.id,"update_account",y(s),s),console.log("Plaid Connection Error",x,Q)),A(void 0),z(!1)},[f,s,o?.id,_]),{open:K,ready:ue}=Te({token:S,onSuccess:J,onExit:te});r.useEffect(()=>{(Z==="In-Progress"&&m.updateStatus.fetchState==="Completed"||X==="In-Progress"&&b.updateStatus.fetchState==="Completed")&&l!=="verified"&&l!=="manually_verified"&&l!=="automatically_verified"&&l!=="database_matched"&&(R("link_account",y(s)),M(y(s),s))},[m.updateStatus.fetchState,M,R,o?.providerVerificationStatus?.code,o?.id,Z,X,b.updateStatus.fetchState,l,s]),r.useEffect(()=>{(Y.isVerifiedStatusCode(l??"")||l==="verification_failed")&&!$&&u!=null&&d.linkToken===S&&d.fetchStatus.fetchState==="Completed"&&ue&&z(!0)},[ue,S,d.fetchStatus.fetchState,d.linkToken,l,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(()=>{(l==null||l==="verification_failed"||l==="verification_expired"||Y.isVerifiedStatusCode(l))&&(Y.zeniDate(new Date().toISOString()).isAfter(m.expiration)||m.linkToken==null)&&R("link_account",y(s))},[]);const ne=()=>{f.trackConnectBankGetBalance(s,"Settings"),A("update_account"),R("update_account",y(s),o?.id)},ae=`${o?.accountSubType?.name!=null?o?.accountSubType?.name.substring(0,1).toUpperCase().concat(o?.accountSubType?.name.substring(1)):""} ${o?.maskedAccountNumber??""}`.trim(),pe=O?.zeniInstitutionId.toLowerCase()==="chase",Ge=a.findIndex(x=>x.id===o?.id),Je={element:t.jsx(Ne,{width:T.iconWidthHeight.valuePx(c)}),color:E};return t.jsxs(At,{windowSize:c,children:[H===!0?_e.createPortal(t.jsx(Ie,{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:s,windowSize:c})}),t.jsx(zt,{children:Ee.productNameByType[s]})]}),t.jsx(_t,{windowSize:c,wrapperWidth:N[1].width,children:t.jsxs(Ft,{windowSize:c,children:[o!=null&&c!=="small"?t.jsx(Et,{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:Oe.medium,highlightOnHover:!1,leftRightMargin:!1,fieldWidth:c==="small"?240:300},customPlaceholder:{color:C.colors.hero,weight:Oe.medium},name:$e(s,"primaryAccountSection"),placeholder:Fe.selectAccountPlaceholder,capitalizeOptions:!0,appendSublabel:!1,showLogoInSingleValue:!1,isClearable:!1,maxMenuHeight:220,valueToLogo:(x,Q)=>st(a,x,Q),valueToSubLabels:(x,Q)=>lt(a,x,Q,!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(s,"Settings"),A("link_account"),m.linkToken==null||Y.zeniDate(new Date().toISOString()).isAfter(m.expiration)?R("link_account",y(s)):S!==m.linkToken?L(m.linkToken):$?K():z(!0)}}),t.jsxs(It,{isDisabled:j,children:[ae?t.jsxs(t.Fragment,{children:[t.jsx(Pt,{children:ae}),c!=="small"&&(l!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||j||pe)?t.jsx(Ot,{}):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,l!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||j||pe?t.jsx(Pe,{productType:s,isUpdateLinkClicked:u==="update_account",isLoginRequired:j,isPendingVerification:l!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification",fetchAndUpdateStatues:{fetchStatus:b.fetchStatus,updateStatus:b.updateStatus,linkFetchStatus:m.fetchStatus,linkUpdateStatus:m.updateStatus,prevFetchState:ee,prevUpdateState:X},onUpdateLinkTokenClick:ne,onChaseInfoClick:U}):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(Dt,{windowSize:c,isDisabled:j,wrapperWidth:N[2].width,onClick:x=>x.stopPropagation(),"data-testid":rt("bank-account-section",s),className:"qboLinkAcc",children:[c==="small"?t.jsx(Lt,{children:Ee.bankConnectionHeader.linkAccount}):null,t.jsx(Ut,{isDisabled:j?"disabled":void 0,name:$e(s,"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(Rt,{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(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"};
@@ -38,19 +38,19 @@ import{u as ve,X as je,a as Ke,c3 as Xe,j as t,aV as Ze,M as re,o as i,c as se,b
38
38
  display: flex;
39
39
  flex-direction: column;
40
40
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
41
- `,Pt=n(F)`
41
+ `,It=n(B)`
42
42
  display: flex;
43
43
  align-items: center;
44
44
  color: ${e=>e.isDisabled?e.theme.colors.grey1:"inherit"};
45
45
  flex-wrap: wrap;
46
- `,It=n.div`
46
+ `,Pt=n.div`
47
47
  display: flex;
48
- `,Fe=n(W)`
48
+ `,Be=n(W)`
49
49
  display: flex;
50
50
  justify-content: flex-end;
51
- `,Re=n(F)`
51
+ `,Re=n(B)`
52
52
  color: ${e=>e.theme.colors.hero};
53
- `,Lt=n(F)`
53
+ `,Lt=n(B)`
54
54
  color: ${e=>e.theme.colors.grey1};
55
55
  width: 135px;
56
56
  `,Ot=n.div`
@@ -64,10 +64,10 @@ import{u as ve,X as je,a as Ke,c3 as Xe,j as t,aV as Ze,M as re,o as i,c as se,b
64
64
  `,Et=n.div`
65
65
  display: flex;
66
66
  opacity: ${e=>e.isDisabled?.8:1};
67
- `,Bt=n.div`
67
+ `,Ft=n.div`
68
68
  display: flex;
69
69
  justify-content: flex-start;
70
- `,Ft=n.div`
70
+ `,Bt=n.div`
71
71
  display: flex;
72
72
  flex-direction: column;
73
73
  width: ${e=>e.windowSize==="small"?"64%":"100%"};
@@ -85,13 +85,13 @@ import{u as ve,X as je,a as Ke,c3 as Xe,j as t,aV as Ze,M as re,o as i,c as se,b
85
85
  width: 36%;
86
86
  `,Vt=n.div`
87
87
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
88
- `,Ut=n.div`
88
+ `,Dt=n.div`
89
89
  display: flex;
90
90
  align-items: center;
91
91
  opacity: ${e=>e.isDisabled?.4:1};
92
92
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
93
93
  margin-top: ${e=>T.linkAccountContainerMarginTop.valuePx(e.windowSize)};
94
- `,Dt=n(qe)`
94
+ `,Ut=n(qe)`
95
95
  border-radius: ${i.sp2};
96
96
  border: 1px solid ${e=>e.theme.colors.grey3};
97
97
  color: ${e=>e.theme.colors.hero};
@@ -146,12 +146,12 @@ import{u as ve,X as je,a as Ke,c3 as Xe,j as t,aV as Ze,M as re,o as i,c 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:Yt}}}=re.getLocalizedStrings(),he={paymentAccountIconSize:new I(k[6],k[7])},Kt=()=>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,O=e?.isLoginRequired??!1,s="other_connection",j=p?.code,X=r.useCallback((B,ne)=>{V.trackConnectBankSuccess(s,"Settings");const ae=ne.accounts.find(pe=>pe.id===e.providerAccountId)??ne.accounts[0];e.paymentAccountId!=null&&A==="update_account"&&ae?.verification_status!=null&&!O?c(ae?.verification_status,e.paymentAccountId,"update_account",y(s),s):M(B,y(s),s),H(void 0),L(!1)},[V,s,e.paymentAccountId,e.providerAccountId,A,O,c,M]),Z=r.useCallback((B,ne)=>{B!=null&&(V.trackConnectBankFailure(s,B.error_code+" "+B.error_message,"Settings"),B.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&e.paymentAccountId!=null&&c("verification_failed",e.paymentAccountId,"update_account",y(s),s),console.log("Plaid Connection Error",B,ne)),H(void 0),L(!1)},[V,s,e.paymentAccountId,c]),{open:ee,ready:E}=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"&&E&&L(!0)},[E,D,v.fetchStatus.fetchState,v.linkToken,j,A,S]);const Y=()=>{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),Q={element:t.jsx(dn,{windowSize:w,children:t.jsx(ft,{})}),color:te},ue=h.find(B=>B.accountId===e.zeniAccountId),oe=()=>{a(B=>!B)};return t.jsxs(Zt,{onMouseEnter:oe,onMouseLeave:oe,children:[o===!0?_e.createPortal(t.jsx(Pe,{connectedAccountProvider:R,action:{onBackClick:()=>l(!1)}}),document.body):null,t.jsxs(Qt,{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(Q,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}),O&&t.jsx(Sn,{})]}),O&&t.jsx(Ie,{productType:"other_connection",isUpdateLinkClicked:A==="update_account",isLoginRequired:O,isPendingVerification:!1,fetchAndUpdateStatues:{fetchStatus:u.fetchStatus,updateStatus:u.updateStatus,linkFetchStatus:b.fetchStatus,linkUpdateStatus:b.updateStatus,prevFetchState:g,prevUpdateState:z},onUpdateLinkTokenClick:Y,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)}):Yt}),t.jsxs(cn,{windowSize:w,wrapperWidth:N[4].width,children:[t.jsx(ln,{className:"balanceLabel",isRemoveHovered:U,children:Se("0,0.[00]",e.balances?.available)}),e.balances?.lastRefreshTime?t.jsx(sn,{className:"balanceLabel",isRemoveHovered:U,children:xe(e.balances?.lastRefreshTime)}):q?.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null,U&&t.jsx(rn,{children:t.jsx(He,{moreIconType:"plain",options:[{label:Ce.otherAccount.remove,value:"remove"}],customStyleConfig:{valueContainer:()=>({height:i.sp3,".more-icon":{width:i.sp3,height:i.sp3,color:f.colors.primary}}),container:()=>({marginLeft:i.sp0,position:"relative"}),control:()=>({background:"transparent"}),menu:()=>({position:"absolute",right:0,borderRadius:i.sp1,marginTop:i.sp2,background:f.colors.grey5,width:"162px",border:`1px solid ${f.colors.grey3}`,boxShadow:`${i.sp0} 1px 2px ${i.sp0} ${ie.boxShadowElevation}`}),option:()=>({height:i.sp6,paddingLeft:i.sp3,paddingRight:i.sp3,display:"flex",alignItems:"center",color:ie.important,":hover":{color:ie.important,backgroundColor:f.colors.background}})},menuPlacement:"bottom",onOptionSelection:B=>{B==="remove"&&_(e.paymentAccountId)},valueToIcon:Kt})})]})]})},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:Qt}}}=re.getLocalizedStrings(),he={paymentAccountIconSize:new P(k[6],k[7])},Yt=()=>null,Zt=({paymentAccount:e,bankAccountList:h,balanceFetchStatus:q,connectedAccountProvider:R,onRemoveConnection:_,onFetchLinkTokenClick:I,onEstablishConnectionClick:M,onEstablishConnectionSuccess:C,onUpdatePaymentAccountStatus:c})=>{const f=ve(),w=je(),V=ze().analytics,[D,a]=r.useState(!1),[o,s]=r.useState(!1),m=()=>{s(!0)},b=e.plaidConnectionDetails.link_account,u=e.plaidConnectionDetails.update_account,[A,H]=r.useState(void 0),v=A==="update_account"?u:b,[U,d]=r.useState(v.linkToken??null),[S,L]=r.useState(!1),$=G(b.updateStatus.fetchState),z=G(u.updateStatus.fetchState),g=G(u.fetchStatus.fetchState),p=e?.providerVerificationStatus,O=e?.isLoginRequired??!1,l="other_connection",j=p?.code,Z=r.useCallback((F,ne)=>{V.trackConnectBankSuccess(l,"Settings");const ae=ne.accounts.find(pe=>pe.id===e.providerAccountId)??ne.accounts[0];e.paymentAccountId!=null&&A==="update_account"&&ae?.verification_status!=null&&!O?c(ae?.verification_status,e.paymentAccountId,"update_account",y(l),l):M(F,y(l),l),H(void 0),L(!1)},[V,l,e.paymentAccountId,e.providerAccountId,A,O,c,M]),X=r.useCallback((F,ne)=>{F!=null&&(V.trackConnectBankFailure(l,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(l),l),console.log("Plaid Connection Error",F,ne)),H(void 0),L(!1)},[V,l,e.paymentAccountId,c]),{open:ee,ready:E}=Te({token:U,onSuccess:Z,onExit:X});r.useEffect(()=>{v.fetchStatus.fetchState==="Completed"&&v.linkToken!=null&&v.linkToken!==U&&d(v.linkToken)},[v.fetchStatus.fetchState,v.linkToken,U]),r.useEffect(()=>{S&&ee()},[S,ee]),r.useEffect(()=>{($==="In-Progress"&&b.updateStatus.fetchState==="Completed"||z==="In-Progress"&&u.updateStatus.fetchState==="Completed")&&(Y.isVerifiedStatusCode(j??"")||(I("link_account",y(l)),C(y(l),l)))},[b.updateStatus.fetchState,C,I,e?.providerVerificationStatus?.code,e?.paymentAccountId,$,z,u.updateStatus.fetchState,j,l]),r.useEffect(()=>{(Y.isVerifiedStatusCode(j??"")||j==="verification_failed")&&!S&&A!=null&&v.linkToken===U&&v.fetchStatus.fetchState==="Completed"&&E&&L(!0)},[E,U,v.fetchStatus.fetchState,v.linkToken,j,A,S]);const J=()=>{V.trackConnectBankGetBalance(l,"Settings"),H("update_account"),I("update_account",y(l),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(Xt,{onMouseEnter:oe,onMouseLeave:oe,children:[o===!0?_e.createPortal(t.jsx(Ie,{connectedAccountProvider:R,action:{onBackClick:()=>s(!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}),O&&t.jsx(Sn,{})]}),O&&t.jsx(Pe,{productType:"other_connection",isUpdateLinkClicked:A==="update_account",isLoginRequired:O,isPendingVerification:!1,fetchAndUpdateStatues:{fetchStatus:u.fetchStatus,updateStatus:u.updateStatus,linkFetchStatus:b.fetchStatus,linkUpdateStatus:b.updateStatus,prevFetchState:g,prevUpdateState:z},onUpdateLinkTokenClick:J,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:D,children:Se("0,0.[00]",e.balances?.available)}),e.balances?.lastRefreshTime?t.jsx(sn,{className:"balanceLabel",isRemoveHovered:D,children:xe(e.balances?.lastRefreshTime)}):q?.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null,D&&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})})]})]})},Xt=n.div`
150
150
  display: flex;
151
151
  padding: ${i.sp4};
152
152
  padding-right: ${i.sp8};
153
153
  position: relative;
154
- `,Qt=n.div`
154
+ `,Kt=n.div`
155
155
  display: flex;
156
156
  align-items: center;
157
157
  flex-direction: column;
@@ -161,7 +161,7 @@ import{u as ve,X as je,a as Ke,c3 as Xe,j as t,aV as Ze,M as re,o as i,c as se,b
161
161
  color: ${e=>e.theme.colors.grey1};
162
162
  display: flex;
163
163
  align-items: center;
164
- `,tn=n(F)`
164
+ `,tn=n(B)`
165
165
  color: ${e=>e.theme.colors.grey1};
166
166
  display: flex;
167
167
  align-items: center;
@@ -185,7 +185,7 @@ import{u as ve,X as je,a as Ke,c3 as Xe,j as t,aV as Ze,M as re,o as i,c as se,b
185
185
  align-items: flex-end;
186
186
  `,ln=n(W)`
187
187
  color: ${e=>e.theme.colors.hero};
188
- `,sn=n(F)`
188
+ `,sn=n(B)`
189
189
  color: ${e=>e.theme.colors.hero};
190
190
  `,rn=n.div`
191
191
  position: absolute;
@@ -210,10 +210,10 @@ import{u as ve,X as je,a as Ke,c3 as Xe,j as t,aV as Ze,M as re,o as i,c as se,b
210
210
  display: flex;
211
211
  flex-direction: ${e=>e.windowSize==="large"||e.windowSize==="extra-large"?"row":"column"};
212
212
  align-items: ${e=>e.windowSize==="large"||e.windowSize==="extra-large"?"center":"start"};
213
- `,mn=n(F)`
213
+ `,mn=n(B)`
214
214
  text-transform: capitalize;
215
215
  color: inherit;
216
- `,fn=n(F)`
216
+ `,fn=n(B)`
217
217
  margin-left: ${i.sp1};
218
218
  `,gn=n(W)`
219
219
  max-width: ${`calc(100% - ${i.sp3})`};
@@ -230,7 +230,7 @@ import{u as ve,X as je,a as Ke,c3 as Xe,j as t,aV as Ze,M as re,o as i,c as se,b
230
230
  height: ${i.sp1};
231
231
  cursor: inherit;
232
232
  background-color: ${e=>e.theme.colors.grey1};
233
- `,{common:{settings:me,strings:{empty:xn}}}=re.getLocalizedStrings(),yn=()=>null,vn=({paymentAccount:e,bankAccountList:h,balanceFetchStatus:q,connectedAccountProvider:R,onRemoveConnection:_,onFetchLinkTokenClick:P,onEstablishConnectionClick:M,onEstablishConnectionSuccess:C,onUpdatePaymentAccountStatus:c})=>{const f=ve(),w=ze().analytics,[V,U]=r.useState(!1),a=()=>{U(!0)},o=e.plaidConnectionDetails.link_account,l=e.plaidConnectionDetails.update_account,[m,b]=r.useState(void 0),u=m==="update_account"?l:o,[A,H]=r.useState(u.linkToken??null),[v,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,O=r.useCallback((E,Y)=>{w.trackConnectBankSuccess(g,"Settings");const te=Y.accounts.find(Q=>Q.id===e.providerAccountId)??Y.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(E,y(g),g),b(void 0),D(!1)},[w,g,e.paymentAccountId,e.providerAccountId,m,z,c,M]),s=r.useCallback((E,Y)=>{E!=null&&(w.trackConnectBankFailure(g,E.error_code+" "+E.error_message,"Settings"),E.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&e.paymentAccountId!=null&&c("verification_failed",e.paymentAccountId,"update_account",y(g),g),console.log("Plaid Connection Error",E,Y)),b(void 0),D(!1)},[w,g,e.paymentAccountId,c]),{open:j,ready:X}=Te({token:A,onSuccess:O,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(E=>E.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:E=>{E==="remove"&&_(e.paymentAccountId)},valueToIcon:yn})]}),t.jsxs(Cn,{children:[t.jsxs(Ln,{children:[t.jsx(On,{children:t.jsx(Fn,{children:e.institutionDetails.institutionName})}),t.jsxs(Rn,{children:[t.jsx(En,{children:e.accountSubType?.name}),t.jsx(Bn,{children:e.maskedAccountNumber}),t.jsx(Tn,{children:$!=null?t.jsx(ge,{style:{width:"max-content",padding:0},tagTitle:$.name,textColor:we($.code)}):null}),z&&t.jsx(Ie,{productType:"other_connection",isUpdateLinkClicked:m==="update_account",isLoginRequired:z,isPendingVerification:!1,fetchAndUpdateStatues:{fetchStatus:l.fetchStatus,updateStatus:l.updateStatus,linkFetchStatus:o.fetchStatus,linkUpdateStatus:o.updateStatus,prevFetchState:L,prevUpdateState:S},onUpdateLinkTokenClick: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:I,onEstablishConnectionClick:M,onEstablishConnectionSuccess:C,onUpdatePaymentAccountStatus:c})=>{const f=ve(),w=ze().analytics,[V,D]=r.useState(!1),a=()=>{D(!0)},o=e.plaidConnectionDetails.link_account,s=e.plaidConnectionDetails.update_account,[m,b]=r.useState(void 0),u=m==="update_account"?s:o,[A,H]=r.useState(u.linkToken??null),[v,U]=r.useState(!1),d=G(o.updateStatus.fetchState),S=G(s.updateStatus.fetchState),L=G(s.fetchStatus.fetchState),$=e?.providerVerificationStatus,z=e?.isLoginRequired??!1,g="other_connection",p=$?.code,O=r.useCallback((E,J)=>{w.trackConnectBankSuccess(g,"Settings");const te=J.accounts.find(K=>K.id===e.providerAccountId)??J.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(E,y(g),g),b(void 0),U(!1)},[w,g,e.paymentAccountId,e.providerAccountId,m,z,c,M]),l=r.useCallback((E,J)=>{E!=null&&(w.trackConnectBankFailure(g,E.error_code+" "+E.error_message,"Settings"),E.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&e.paymentAccountId!=null&&c("verification_failed",e.paymentAccountId,"update_account",y(g),g),console.log("Plaid Connection Error",E,J)),b(void 0),U(!1)},[w,g,e.paymentAccountId,c]),{open:j,ready:Z}=Te({token:A,onSuccess:O,onExit:l});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"&&s.updateStatus.fetchState==="Completed")&&(Y.isVerifiedStatusCode(p??"")||(I("link_account",y(g)),C(y(g),g)))},[o.updateStatus.fetchState,C,I,e?.providerVerificationStatus?.code,e?.paymentAccountId,d,S,s.updateStatus.fetchState,p,g]),r.useEffect(()=>{(Y.isVerifiedStatusCode(p??"")||p==="verification_failed")&&!v&&m!=null&&u.linkToken===A&&u.fetchStatus.fetchState==="Completed"&&Z&&U(!0)},[Z,A,u.fetchStatus.fetchState,u.linkToken,p,m,v]);const X=()=>{w.trackConnectBankGetBalance(g,"Settings"),b("update_account"),I("update_account",y(g),e.paymentAccountId)},ee=h.find(E=>E.accountId===e.zeniAccountId);return t.jsxs(kn,{children:[V===!0?_e.createPortal(t.jsx(Ie,{connectedAccountProvider:R,action:{onBackClick:()=>D(!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:E=>{E==="remove"&&_(e.paymentAccountId)},valueToIcon:yn})]}),t.jsxs(Cn,{children:[t.jsxs(Ln,{children:[t.jsx(On,{children:t.jsx(Bn,{children:e.institutionDetails.institutionName})}),t.jsxs(Rn,{children:[t.jsx(En,{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(Pe,{productType:"other_connection",isUpdateLinkClicked:m==="update_account",isLoginRequired:z,isPendingVerification:!1,fetchAndUpdateStatues:{fetchStatus:s.fetchStatus,updateStatus:s.updateStatus,linkFetchStatus:o.fetchStatus,linkUpdateStatus:o.updateStatus,prevFetchState:L,prevUpdateState:S},onUpdateLinkTokenClick:X,onChaseInfoClick:a})]})]}),t.jsxs(_n,{children:[t.jsx(In,{className:"balanceLabel",children:Se("0,0.[00]",e.balances?.available)}),e.balances?.lastRefreshTime?t.jsx(Pn,{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};
@@ -254,10 +254,10 @@ import{u as ve,X as je,a as Ke,c3 as Xe,j as t,aV as Ze,M as re,o as i,c as se,b
254
254
  `,An=n.div`
255
255
  display: flex;
256
256
  align-items: center;
257
- `,jn=n(F)`
257
+ `,jn=n(B)`
258
258
  color: ${e=>e.theme.colors.grey1};
259
259
  margin-right: ${i.sp2};
260
- `,zn=n(F)`
260
+ `,zn=n(B)`
261
261
  color: ${e=>e.theme.colors.hero};
262
262
  `,Tn=n(W)`
263
263
  display: flex;
@@ -267,9 +267,9 @@ import{u as ve,X as je,a as Ke,c3 as Xe,j as t,aV as Ze,M as re,o as i,c as se,b
267
267
  display: flex;
268
268
  align-items: flex-end;
269
269
  flex-direction: column;
270
- `,Pn=n(W)`
270
+ `,In=n(W)`
271
271
  color: ${e=>e.theme.colors.hero};
272
- `,In=n(F)`
272
+ `,Pn=n(B)`
273
273
  color: ${e=>e.theme.colors.hero};
274
274
  `,Ln=n.div``,On=n.div`
275
275
  display: flex;
@@ -277,11 +277,11 @@ import{u as ve,X as je,a as Ke,c3 as Xe,j as t,aV as Ze,M as re,o as i,c as se,b
277
277
  align-items: center;
278
278
  white-space: nowrap;
279
279
  overflow: hidden;
280
- `,En=n(F)`
280
+ `,En=n(B)`
281
281
  text-transform: capitalize;
282
- `,Bn=n(F)`
282
+ `,Fn=n(B)`
283
283
  margin-left: ${i.sp1};
284
- `,Fn=n(W)`
284
+ `,Bn=n(W)`
285
285
  max-width: ${`calc(100% - ${i.sp3})`};
286
286
  text-transform: capitalize;
287
287
  overflow: hidden;
@@ -291,20 +291,20 @@ import{u as ve,X as je,a as Ke,c3 as Xe,j as t,aV as Ze,M as re,o as i,c as se,b
291
291
  align-items: center;
292
292
  flex-wrap: wrap;
293
293
  gap: ${i.sp2};
294
- `,{settings:{bankConnectionListHeader:Ae,title:Mn,infoText:Vn}}=re.getLocalizedStrings().common,ye={pageContentPadding:new I(k[4],k[8]),subtitleSectionWidth:new I(343,580,1200),subTitleBottomMargin:new I(k[0],k[5])},Un={qboLinkAcc:new ot("smallRegular","standardRegular")},Dn="bankConnectionsSettingsPage",ce="bankAccountSection",le="primaryAccountSection",Wn="bill_pay",Nn="reimbursement",qn="zeni_accounts",Hn="charge_cards",Gn="zeni_treasury",Me=e=>t.jsx(Kn,{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:R,onFetchLinkTokenClick:_,onUpdatePaymentAccountStatus:P,onUpdatePaymentAccountLoginStatus:M,onEstablishConnectionClick:C,onEstablishConnectionSuccess:c,onClickMenuIcon:f,onUpdatePrimaryFundingAccount:w,onRemoveConnection:V})=>{const U=ve(),a=je(),{allFundingAccounts:o,primaryConnection:l}=e,m=Ke({mode:"all",reValidateMode:"onChange",defaultValues: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 O=o.find(s=>s.id===p.selectedOption)?.accType;p.selectedOption!=null&&O!=null&&w(p.selectedOption,y($),O)}else if(z==="bankAccountSection"&&g!=null&&g.primaryFundingAccount!=null&&p.selectedOption!=null){const O=g.primaryFundingAccount?.id,s=g.primaryFundingAccount?.accType;O!=null&&s!=null&&R(p.selectedOption,O,$,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(Qe,{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(Qn,{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(Yn,{children:[t.jsx(Ze,{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`
294
+ `,{settings:{bankConnectionListHeader:Ae,title:Mn,infoText:Vn}}=re.getLocalizedStrings().common,ye={pageContentPadding:new P(k[4],k[8]),subtitleSectionWidth:new P(343,580,1200),subTitleBottomMargin:new P(k[0],k[5])},Dn={qboLinkAcc:new ot("smallRegular","standardRegular")},Un="bankConnectionsSettingsPage",ce="bankAccountSection",le="primaryAccountSection",Wn="bill_pay",Nn="reimbursement",qn="zeni_accounts",Hn="charge_cards",Gn="zeni_treasury",Me=e=>t.jsx(Yn,{children:N.map(h=>t.jsx(Zn,{actualDataValue:h.value,wrapperWidth:h.width,windowSize:e,children:t.jsx(Xn,{children:h.value})},h.value))}),bi=({bankSetupView:e,connectedAccountProvider:h,onBackClick:q,onUpdateAccountClick:R,onFetchLinkTokenClick:_,onUpdatePaymentAccountStatus:I,onUpdatePaymentAccountLoginStatus:M,onEstablishConnectionClick:C,onEstablishConnectionSuccess:c,onClickMenuIcon:f,onUpdatePrimaryFundingAccount:w,onRemoveConnection:V})=>{const D=ve(),a=je(),{allFundingAccounts:o,primaryConnection:s}=e,m=Ye({mode:"all",reValidateMode:"onChange",defaultValues:Ue(e),values:Ue(e)}),b=m.handleSubmit(d=>{}),u=async(d,S)=>{const L=d.split("."),$=L[0],z=L[1],g=s.find(p=>p.productType===$);if($!=null&&z!=null){const p=S[$][z];if(z==="primaryAccountSection"){const O=o.find(l=>l.id===p.selectedOption)?.accType;p.selectedOption!=null&&O!=null&&w(p.selectedOption,y($),O)}else if(z==="bankAccountSection"&&g!=null&&g.primaryFundingAccount!=null&&p.selectedOption!=null){const O=g.primaryFundingAccount?.id,l=g.primaryFundingAccount?.accType;O!=null&&l!=null&&R(p.selectedOption,O,$,y($),l)}}};r.useEffect(()=>{const d=m.watch((S,{name:L})=>{L!=null&&S!=null&&Ze(()=>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:Zt,U=()=>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(De,{children:Ae.primary}),a!=="small"?Me(a):null,t.jsx(et,{...m,children:t.jsx("form",{id:li(Un),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:I,onUpdatePaymentAccountLoginStatus:M,onEstablishConnectionClick:C,onEstablishConnectionSuccess:c})},d.productType):null)})})}),e.otherPaymentAccounts.length>0?t.jsxs(Kn,{children:[t.jsx(De,{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:I,onEstablishConnectionSuccess:c})},d.paymentAccountId)})]});return t.jsxs(Qn,{children:[t.jsx(Xe,{source:"BankConnectionsSettingsPage",title:Mn.bankConnections,backgroundColor:D.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})}),U()]})]})},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
- `,Yn=n.div`
300
+ `,Qn=n.div`
301
301
  display: flex;
302
302
  min-height: 100%;
303
303
  flex-direction: column;
304
304
  row-gap: ${i.sp3};
305
305
  width: 100%;
306
306
  background-color: ${e=>e.theme.colors.grey4};
307
- `,Kn=n(F)`
307
+ `,Yn=n(B)`
308
308
  top: ${i.sp0};
309
309
  left: ${i.sp0};
310
310
  min-height: ${i.sp8};
@@ -317,7 +317,7 @@ import{u as ve,X as je,a as Ke,c3 as Xe,j as t,aV as Ze,M as re,o as i,c as se,b
317
317
  background-color: ${e=>e.theme.colors.grey4};
318
318
  justify-content: space-between;
319
319
  position: sticky;
320
- `,Xn=n.div`
320
+ `,Zn=n.div`
321
321
  color: ${e=>e.theme.colors.grey1};
322
322
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
323
323
  max-width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
@@ -331,10 +331,10 @@ import{u as ve,X as je,a as Ke,c3 as Xe,j as t,aV as Ze,M as re,o as i,c as se,b
331
331
  padding-left: ${i.sp0};
332
332
  box-sizing: border-box;
333
333
  overflow: hidden;
334
- `,Zn=n(F)`
334
+ `,Xn=n(B)`
335
335
  display: flex;
336
336
  gap: 5px;
337
- `,Qn=n.div`
337
+ `,Kn=n.div`
338
338
  display: flex;
339
339
  align-items: center;
340
340
  `,Ve=n.div`
@@ -363,7 +363,7 @@ import{u as ve,X as je,a as Ke,c3 as Xe,j as t,aV as Ze,M as re,o as i,c as se,b
363
363
  .select-value-container
364
364
  .single-select-field__single-value {
365
365
  color: ${e=>e.theme.colors.hero};
366
- ${e=>`${Un.qboLinkAcc.style(e.windowSize)}`};
366
+ ${e=>`${Dn.qboLinkAcc.style(e.windowSize)}`};
367
367
  }
368
368
  &:hover {
369
369
  border: ${e=>`1px solid ${e.theme.colors.primary}`};
@@ -395,7 +395,7 @@ import{u as ve,X as je,a as Ke,c3 as Xe,j as t,aV as Ze,M as re,o as i,c as se,b
395
395
  `,ni=n.div`
396
396
  display: flex;
397
397
  flex-direction: column;
398
- `,Ue=n(it)`
398
+ `,De=n(it)`
399
399
  color: ${e=>e.theme.colors.primary};
400
400
  margin-right: ${i.sp1};
401
401
  padding: ${i.sp3} ${i.sp0} ${i.sp3} ${i.sp2};
@@ -422,4 +422,4 @@ import{u as ve,X as je,a as Ke,c3 as Xe,j as t,aV as Ze,M as re,o as i,c 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: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{[Wn]:{[ce]:{selectedOption:M?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:M?.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
+ `,Ue=e=>{const{primaryConnection:h,allBankAccounts:q,allFundingAccounts:R}=e,_=q.map(a=>({label:a.accountName,value:a.accountId})),I=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"}))??[],D=w?.allFundingAccounts.map(a=>({label:a.label,value:a.id,isRecommended:a.accType==="paymentAccount"}))??[];return{[Wn]:{[ce]:{selectedOption:M?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:M?.primaryFundingAccount?.id,allOptions:I}},[Nn]:{[ce]:{selectedOption:C?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:C?.primaryFundingAccount?.id,allOptions:I}},[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:D}},[Hn]:{[ce]:{selectedOption:f?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:f?.primaryFundingAccount?.id,allOptions:I}}}},li=e=>`${e}_form`;export{bi as default,li as formUniqueName};
@@ -1,8 +1,8 @@
1
- import{X as Nn,t as On,u as Fn,fI as En,fJ as Ln,fK as Wn,fL as _n,bC as Zn,a1 as Kn,M as Vn,C as u,j as t,l as L,cF as it,cG as Un,o as a,cH as Gn,cI as Yn,Y as b,cJ as Hn,_ as Ae,cK as qn,aV as lt,aI as ot,dq as rt,bO as st,bQ as dt,bR as ct,fM as Qn,fN as Xn,fO as Jn,fP as ea,cP as j,cQ as I,cR as $,fQ as A,cO as ta,v as pt,g as ie,cS as Rt,cT as na,cU as aa,cV as ia,fR as la,fS as oa,a3 as ra,m as mt,bs as Te,fT as sa,fU as O,n as r,r as da,bo as ca,fV as pa,a2 as ma,fW as ua,fX as ut,cZ as yt,Q as ya,cu as ha,bH as ba,al as xa,an as ga,k as fa,eW as zt,fY as wa,w as Mt,ab as Ta,aj as va,aN as Da,eG as ja,q as Ia}from"./index-DyBH5SZv.js";import{b as p,n as i}from"./vendor-CnQcJ2Lu.js";import{_ as $a}from"./liveblocks-sSQ9JElv.js";import{o as Aa,t as ka}from"./LowBalancePopup-CwcYMtuk-B-vSGd6a.js";import"./mui-C5LQ0bMa.js";import"./analytics-CBL_L82S.js";import"./routing-Cpaypegg.js";import"./sentry-HDxG13yk.js";import"./redux-ByjIRbhZ.js";import"./crypto-BURQLTgV.js";const Sa=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",...e},p.createElement("g",{id:"Layer_1"},p.createElement("path",{fill:"none",stroke:"#757d7e",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",d:"M4.4,30.6l6-5.9c1,.6,2.1.9,3.3,1,1.1.1,2.3,0,3.4-.4,1.1-.4,2.1-.9,2.9-1.7.9-.8,1.5-1.7,2-2.7,0-.1,0-.2,0-.4,0-.1,0-.2-.1-.3,0-.1-.2-.2-.3-.2-.1,0-.2,0-.4,0h-4.6c-.8,0-1.6-.3-2.1-.9-.6-.6-.9-1.3-.9-2.1s.3-1.5.9-2.1c.6-.6,1.3-.9,2.1-.9h3.8c.1,0,.3,0,.4-.1s.2-.2.3-.3c0-.1,0-.3,0-.4,0-.1,0-.3-.1-.4-1.3-1.6-3.1-2.7-5.2-3.1-2.1-.4-4.2,0-5.9,1.2-1.8,1.1-3,2.8-3.5,4.8s-.2,4.1.8,5.9l-6.1,5.7,3.3,3.3Z"})),p.createElement("g",{id:"Layer_2"},p.createElement("g",null,p.createElement("path",{fill:"#c27419",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M31,8c0,1.9-.7,3.8-2.1,5.1-1.3,1.4-3.2,2.2-5.1,2.2-.9,0-1.9-.2-2.7-.5-.9-.3-1.7-.9-2.3-1.5-.7-.7-1.2-1.4-1.6-2.3-.4-.9-.6-1.8-.6-2.7,0-1.9.7-3.8,2.1-5.1,1.3-1.4,3.2-2.2,5.1-2.2.9,0,1.9.2,2.7.5.9.3,1.7.9,2.3,1.5.7.7,1.2,1.4,1.6,2.3.4.9.6,1.8.6,2.7Z"}),p.createElement("path",{fill:"none",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M23.8,9.4v-4.6"}),p.createElement("path",{fill:"none",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M23.8,11.4s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.1,0,0,0,0,.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0-.1,0,0,0,0-.1,0h0"})))),Ca={formTitle:new ya("h6Medium","h5Medium")},m={containerPaddingLeft:new u(r[3],r[6],r[6]),containerPaddingRight:new u(r[3],r[6],r[8]),marginBottom:new u(r[3],r[3]),labelWidth:new u(120,160,160),formTitlePaddingLeftRight:new u(30,0),marginTop:new u(r[1],0),rightIconsGap:new u(r[4],r[5]),closeContainerMarginTop:new u(r[1],0),formTitleMarginTopBottom:new u(0,0),footerButtonWidth:new u(120,120,120,165,165),right:new u(r[3],r[0]),actionsContainerRight:new u(r[0],r[3],r[3],r[6],r[6]),otherActionsIconContainerMarginLeft:new u(r[5],r[4],r[4],r[5]),otherActionsContainerBottom:new u(58,44),iconContainerMarginTop:new u(2,r[1]),recurringSchedulePaddingLeft:new u(r[2],0),paddingRight:new u(r[2],r[3]),labelMarginRight:new u(r[0],r[3]),textPadding:new u(r[0],r[3]),additionalTextMarginTop:new u(-4,0),refundPopupWidth:new u(300,420,420),drawerSectionPaddingLeftRight:new u(r[4],r[5]),infoLabelPaddingRight:new u(r[3],r[3]),infoLabelMarginTop:new u(r[1],r[0]),navBarHeight:new u(0,0,r[8]),navBarContainerWidth:new u(100,58)},{dateFormat:Pa,common:{noText:C,strings:{empty:d},currency:ht,via:Ba,more:Ra,edit:za},spendManagement:{billPay:{billDetails:n,billsByTabs:ke,bulkActions:bt,vendorCreation:xt,insufficientFunds:Nt}},collaboration:{threads:{placeholder:gt,tooltip:ft,title:{comments:Ma}}}}=Vn.getLocalizedStrings(),ve=Pa.visual.MMMDCommaYYYYformat,ji=({billDetails:e,currentTenant:g,showApproveRejectBtns:x,isShowDeletedBillsEnabled:Z,signedInUser:le,isAdmin:Ot,isRealTimeApprovalEnabled:Ft,isInternationalPaymentShaVsOurEnabled:Et,hasZeniAssistAccess:Lt,analytics:z,showMarkAsPaidButtonToCreator:K,showMarkAsPaidButtonToApprover:Wt,isBillPayCommentingEnabled:Se,isZeniUser:_t,showBackButton:Ce=!0,isDetectInsufficientFundsEnabled:Zt,redirectToEditableBillScreen:Kt,redirectToBillsScreen:H,discardBillDetailsFromLocalStore:Pe,deleteBill:Vt,cancelAndDeleteBill:Be,approveOrRejectBill:Re,onAddNewRule:Ut,onAttachmentClick:ze,saveBillDetails:Gt,discardOutsideZeniPaymentData:Yt,onBackClick:Me,updateEditRealTimeApproverClicked:Ht,onSaveRealTimeApprovals:qt,onRetryPaymentClick:Qt,onRefundPaymentClick:Xt})=>{const l=Nn(),o=On(),Ne=Fn(),[Jt,V]=p.useState(!1),[Oe,oe]=p.useState(!1),[re,se]=p.useState(!1),[Fe,de]=p.useState(!1),[en,ce]=p.useState(!1),[Ee,q]=p.useState(!1),y=e.transactionDetails?.id,tn=_t?En:Ln,{requestToOpenThread:pe,setRequestToOpenThread:Le,setOpenThread:Q}=p.useContext(tn),[nn,U]=p.useState(!1),w={application:"dashboard",companyId:o.currentTenant?.companyId,tab:"bill",entityId:y,isGlobalComment:!1},{threads:G,isLoading:P}=Wn(w,"both",!1),f=Se&&y!=null,We=p.useMemo(()=>y==null?[]:G.filter(c=>c.resolved===!1&&!c.id.includes(_n)),[G,y]).length,T=`dashboard_${o.currentTenant?.companyId}`,an=p.useCallback((c,h)=>{Q(h),U(!1)},[Q,U]);p.useEffect(()=>{pe?.threadId!=null&&G.length>0&&!P&&(Q(pe.threadId),Le(null))},[pe,G,P,Q,Le]),Zn({componentName:"bill.details"});const[N,X]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[_e,Ze]=p.useState("approved"),[ln,Ke]=p.useState(!1),[on,Ve]=p.useState(!1),[Ue,Ge]=p.useState(!1),Ye=()=>Ke(!1),rn=()=>Ke(!0),He=Kn(e.zeniAssist?.refundStatus.fetchState),J=p.useCallback(()=>{H()},[H]);p.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed"||e.billSaveStatus==="Completed")&&(Pe(),H())},[e,H,Pe]),p.useEffect(()=>{He==="In-Progress"&&(e.zeniAssist?.refundStatus.fetchState==="Completed"||e.zeniAssist?.refundStatus.fetchState==="Error")&&(se(!1),J())},[He,e.zeniAssist?.refundStatus,J]);const k=e.transactionDetails?.billPayInfo.stage,ee=e.transactionDetails?.billPayInfo.billStatus,Y=e.transactionDetails?.billPayInfo.billPaymentStatus,sn=e.transactionDetails?.billPayInfo.billPaymentRefundStatus,me=k?.code==="paid",v=me?k:ee?.code=="approved"&&Y?.code?Y:ee,S=Na(v,e.transactionDetails),F=e.transactionDetails?.billPayInfo.isRefundInitiated===!0?sn:Y?.code!=null&&(ee?.code=="approved"||Y.code==="mark_as_paid")?Y:ee,ue=e.transactionDetails?.vendor?.name,M=e.isRecurring,qe=()=>{e.transactionDetails?.id!=null&&Kt(e.transactionDetails?.id??"")},dn=()=>{X({title:M?n.recurringBill.deleteRecurringTitle:n.deleteBillTitle,description:M?n.recurringBill.deleteRecurringAlertText:n.deleteAlertDescription,primaryButtonText:n.delete,secondaryButtonText:n.cancel}),V(!0)},cn=()=>{X({title:n.cancelBillTitle,description:n.cancelAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),V(!0)},pn=()=>{X({title:M?n.recurringBill.cancelAndDeleteRecurringTitle:n.cancelAndDeleteBillTitle,description:M?n.recurringBill.cancelAndDeleteRecurringAlertText:n.cancelAndDeleteAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),V(!0)},mn=()=>{z.trackRefundClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),X({title:n.zeniAssist.refundTitle,description:n.zeniAssist.refundDescription,primaryButtonText:n.zeniAssist.proceed,secondaryButtonText:n.cancel}),se(!0)},un={onOkClick:()=>{V(!1),N.primaryButtonText===n.delete?Vt?.(e.isRecurring):N.title===n.cancelBillTitle?Be?.(e.isRecurring):N.title===n.cancelAndDeleteBillTitle||N.title===n.recurringBill.cancelAndDeleteRecurringTitle?Be?.(e.isRecurring,!0):N.primaryButtonText===n.zeniAssist.proceed&&(z.trackRefundConfirmClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),Xt())},onCancelClick:()=>{V(!1),se(!1)}},yn={onOkClick:c=>{ce(!1),Re({billId:e.transactionDetails?.id??"",type:"rejected",description:c})},onCancelClick:()=>{ce(!1)}},hn=()=>{const[c]=Ta("ZeniAssist");return c!=null?t.jsx(va,{"data-testid":b("bill-details-zeni-assist-icon",y),onClick:()=>{de(!Fe),z.trackZeniAssistClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"")},style:{width:`${a.sp5}`,height:`${a.sp5}`,marginBottom:`${a.sp2}`},animationData:c,loop:!0,play:!0,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}):null},te={invoiceNumber:e.transactionDetails?.documentId??"",invoiceDate:e.transactionDetails?.date,billDueDate:e.transactionDetails?.dueDate,memo:e.transactionDetails?.memo,currencyCode:e.vendorCurrency??ht.currencyCode},ye=e.transactionDetails?.lines?.map((c,h)=>{const B=c;return{lineIndex:h,lineId:B.id,account:B.account,class:B.class,amount:B.amount.amount,billable:B.billable,customer:B.customer,lineDescription:B.lineDescription,recipientAmount:B.recipientAmount?.amount}})??[],bn=e.transactionDetails?.recipientTotalAmount.amount??0,he=e.transactionDetails?.recipientTotalAmount,s={paymentType:e.paymentMethodType,paymentDate:e.transactionDetails?.billPayInfo.paymentDate,internationalTransferFeeBearerPaymentMethod:e.transactionDetails?.billPayInfo.internationalTransferFeeBearerPaymentMethod,paymentToBankAccount:e.bankAccount,paymentToPI:e.paymentInstrument},D=m.labelWidth.value(l),xn=c=>c==="billable"||c==="has_been_billed"?n.yes:n.no,gn=s.paymentToBankAccount?.bankAccountNumber?s.paymentToBankAccount?.bankAccountNumber?.slice(s.paymentToBankAccount?.bankAccountNumber?.length-4):s.paymentType?.method?.includes("international")&&s.paymentToBankAccount?.bankAccountIban?s.paymentToBankAccount?.bankAccountIban?.slice(s.paymentToBankAccount?.bankAccountIban.length-4):"",fn=s.paymentToBankAccount?.bankAccountName!=null&&s.paymentToBankAccount?.bankAccountName!=""?s.paymentToBankAccount?.bankAccountName:`${e.transactionDetails?.vendor?.name} - ${s.paymentToBankAccount?.bankName} XXXX${gn}`,wn=e.transactionDetails?.billPayInfo?.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${n.magicLink.collectFrom} ${e.transactionDetails?.billPayInfo?.toAccountVendorEmail}`,t.jsx(ci,{windowSize:l,children:t.jsx(di,{})})]}):void 0,Qe=e.transactionDetails?.date!=null&&e.transactionDetails.bookCloseDate!=null&&e.transactionDetails.date.isBefore(e.transactionDetails.bookCloseDate),Tn=()=>`${xt.achDetails.bankRoutingNumber} ${s?.paymentToBankAccount?.bankRoutingNumberAch}, ${s?.paymentToBankAccount?.bankName}
2
- ${xt.achDetails.bankAccountNumber} ${s?.paymentToBankAccount?.bankAccountNumber}`,ne=e.transactionDetails?.billPayInfo!=null?L.getActualPaymentDate(e.transactionDetails?.billPayInfo):void 0,vn=ne!=null&&e.paymentMethodType?.maxPeriod?.value!=null?L.zeniDate(L.getNextNthWorkingDay(ne?.toDate(),[0,6],e.paymentMethodType?.maxPeriod.value).toDateString()):void 0,Xe=e.transactionDetails?.billPayInfo.expectedDepositDate??vn,Je=it(s?.paymentType?.method??"").replace("Same Day",""),Dn=(s?.paymentToBankAccount!=null||s?.paymentToPI)!=null?n.addedByZeni:e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact?t.jsx(Un,{paymentTypeLabel:Je,onClick:rn,style:{marginTop:`${l==="small"?a.sp2:a.sp0}`}}):void 0,jn=()=>s?.paymentToBankAccount==null&&s?.paymentToPI==null&&s?.paymentType?.method!=null&&e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact&&e.transactionDetails?.billPayInfo.paymentDate!=null?t.jsx(wa,{paymentType:s?.paymentType?.method,paymentDate:e.transactionDetails?.billPayInfo.paymentDate}):null,be=!(v?.code==="processing"||e.transactionDetails?.billPayInfo.isRefundInitiated===!0||e.transactionDetails?.billPayInfo.isRefundComplete===!0),xe=e.zeniAssist?.isEligibleForRetryIBT===!0||e.zeniAssist?.isEligibleForRetryOBP===!0,ge=e.zeniAssist?.isEligibleForRefund===!0,In=e?.transactionDetails?.billPayInfo.billPaymentMethodType.code==="wire"&&e?.transactionDetails?.billPayInfo.billPaymentMethodType.subCode==="international",$n=Lt&&e.transactionDetails?.billPayInfo.billPaymentStatus.code!=null&&["failed","cancelled","returned"].includes(e.transactionDetails.billPayInfo.billPaymentStatus.code)&&(xe||ge)&&In===!1,fe=xe||ge,An=e.transactionDetails?.billPayInfo.isRefundInitiated===!0&&e.transactionDetails?.billPayInfo.isRefundComplete===!1,we=v?.code,kn=!An&&(!Qe||v?.code==="processing"&&!M),Sn=!Qe,et=["small","medium-compact","medium-regular"].includes(l),ae=L.isBulkProcessing(e.transactionDetails?.bulkProcessingDetail?.type),E=L.isPaymentMethodOutsideZeni(e.paymentMethodType?.method),Cn=c=>{z.trackBillPayMarkAsPaidSubmit(c.paymentMode??"other",k?.code??"",v?.code??""),Gt(!0,Ue,c)},tt=()=>{Ve(!0),z.trackBillPayMarkAsPaid(k?.code??"",v?.code??"")},Pn=()=>{Ge(!0),tt()},Bn=()=>{Yt(),Ve(!1),Ue&&Ge(!1)},Rn=p.useMemo(()=>({companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,entityType:"bill.details",entityId:y??d,isGlobalComment:!1,application:"dashboard",tab:"bill",url:window.location.href}),[o.currentTenant,y]),W=Zt&&e.transactionDetails?.totalAmountWithFeesInUSD!=null&&k?.code!=="paid"&&v?.code!=="failed"&&v?.code!=="processing"&&v?.code!=="cancelled"&&v?.code!=="returned"&&v?.code!=="rejected"?Gn(e.transactionDetails?.totalAmountWithFeesInUSD,e.withdrawFrom,s.paymentDate):void 0,nt=()=>{Ze("approved"),Ee===!0&&q(!1),W!=null&&z.trackLowBalanceAccountApprove(k?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",yt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),Re({billId:e.transactionDetails?.id??"",type:"approved"})},zn=()=>{Ze("rejected"),W!=null&&z.trackLowBalanceAccountReject(k?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",yt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),ce(!0)},at=p.useRef(null);return t.jsxs(qa,{windowSize:l,ref:at,children:[t.jsx(Yn,{anchor:"right",open:ln,onClose:Ye,transitionDuration:250,"data-testid":b("vendor-email-preview-drawer"),children:t.jsx(Hn,{companyName:qn(g.company?.companyInfo),vendor:e.transactionDetails?.vendor?.name,paymentDate:s.paymentDate?.format(ve)??"",paymentType:Je,amount:Ae("0,0.[00]",he),isInvoiceAttached:!!e.transactionDetails?.attachments?.length,onClose:Ye})}),t.jsxs(ei,{windowSize:l,children:[t.jsx(ui,{windowSize:l,children:l==="small"?t.jsx(lt,{"data-testid":b("bill-detail-nav-bar-mobile"),title:t.jsxs(t.Fragment,{children:[ue,e.isRecurring?t.jsx($e,{width:a.sp4,height:a.sp4}):null]}),backgroundColor:Ne.colors.grey4,rightSideComponent:t.jsxs(It,{windowSize:l,children:[f?t.jsxs(Pt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),U(!0),z.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(h=>rt(h)),void 0,void 0,"page icon")},children:[t.jsx(ot,{count:P?void 0:We,isLoading:P,style:{left:"12px"}}),t.jsx(Bt,{})]}):null,t.jsx($t,{onClick:()=>J(),"data-testid":b("bill-detail-nav-bar-small-close-button"),children:t.jsx(jt,{})})]}),leftSideComponent:t.jsx(Dt,{windowSize:l,onClick:Me,"data-testid":b("bill-detail-nav-bar-small-back-button"),style:{visibility:`${Ce?"visible":"hidden"}`},children:t.jsx(vt,{})}),source:"BillDetailPage"}):t.jsx(lt,{"data-testid":b("bill-detail-nav-bar"),title:t.jsxs(t.Fragment,{children:[ue,e.isRecurring?t.jsx($e,{width:a.sp4,height:a.sp4}):null]}),rightSideComponent:t.jsxs(It,{windowSize:l,children:[f?t.jsxs(Pt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),U(!0),z.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(h=>rt(h)),void 0,void 0,"page icon")},children:[t.jsx(ot,{count:P?void 0:We,isLoading:P,style:{left:"12px"}}),t.jsx(Bt,{})]}):null,t.jsx($t,{onClick:()=>J(),"data-testid":b("bill-detail-nav-bar-close-button"),children:t.jsx(jt,{})})]}),leftSideComponent:t.jsx(Dt,{windowSize:l,onClick:Me,"data-testid":b("bill-detail-nav-bar-back-button"),style:{visibility:`${Ce?"visible":"hidden"}`},children:t.jsx(vt,{})}),enableTitleOnScroll:!0,scrollableContent:at,source:"BillDetailPage"})}),t.jsxs(ti,{windowSize:l,children:[Ee?t.jsx(Aa,{withdrawFrom:e.withdrawFrom,paymentDate:e?.transactionDetails?.billPayInfo.paymentDate,onOkClick:nt,onCancelClick:()=>{q(!1),qe()},onClickAway:()=>{q(!1)}}):null,on?t.jsx(ka,{onCancel:Bn,onProceedForMarkAsPaid:Cn,saveDetailsFetchState:e.billSaveStatus,paymentData:e.outsideZeniPaymentInfo}):null,Jt||re?t.jsx(st,{titleComponent:t.jsx(ct,{children:N.title}),descriptionComponent:t.jsx(dt,{children:N.description}),primaryButtonText:N.primaryButtonText,proceedButtonVariant:re?"primary":"danger",secondaryButtonText:N.secondaryButtonText,action:un,isEditPopup:!0,isLoading:e.zeniAssist?.refundStatus.fetchState==="In-Progress",children:re?Oa(l,e):null}):null,en?t.jsx(st,{titleComponent:t.jsx(ct,{children:n.rejectBillTitlePrefix+" "+(e.transactionDetails?.vendor?.name!=null?e.transactionDetails.vendor.name:"")}),descriptionComponent:t.jsx(dt,{children:n.rejectBillDescription}),primaryButtonText:n.send,secondaryButtonText:n.cancel,action:yn,isEditPopup:!0,isNotesIncluded:!0,notesPlaceholder:n.rejectBillReasonPlaceholder}):null,l!=="small"||S?t.jsxs(ai,{windowSize:l,children:[l!=="small"?t.jsxs(ii,{windowSize:l,children:[ue,e.isRecurring?t.jsx($e,{height:a.sp5,width:a.sp5}):null]}):null,Z&&S!=null&&S.code==="deleted"?t.jsx(At,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):S?.value===ke.tabsById.overdue?t.jsx(At,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):null]}):null,F!=null&&F.code?l==="small"?t.jsx(Qn,{progressSectionObj:F,createDate:e.transactionDetails?.createTime,paymentDate:Xe,scheduleDate:ne,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):t.jsx(Xn,{progressSectionObj:F,createDate:e.transactionDetails?.createTime,paymentDate:Xe,scheduleDate:ne,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):null,La(ae,e,W),t.jsx(Jn,{sectionId:ea,currentVendorOption:{defaultOptions:[]},billId:y,isBillPayCommentingEnabled:Se,isBillPaid:me,disableVendorActions:!0,vendor:e.transactionDetails?.vendor,prevBills:e.previousBills,onAttachmentClick:ze,isVendorRecommendationEnabled:!1,showVendorGptRecommendationText:!1}),s.paymentType?.method?.includes("ach"),t.jsxs(je,{children:[t.jsx(Ie,{children:n.whatForTitle}),t.jsxs(De,{children:[t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"invoiceNumber"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("invoiceNumber")}`},children:t.jsx(A,{label:{label:n.invoiceNumber,width:D},text:te.invoiceNumber??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"invoiceDate"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("invoiceDate")}`},children:t.jsx(A,{label:{label:n.invoiceDate,width:D},text:te.invoiceDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"billDueDate"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("billDueDate")}`},children:t.jsx(A,{label:{label:n.billDueDate,width:D},text:te.billDueDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"memo"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("memo")}`},children:t.jsx(A,{label:{label:n.memo,width:D},text:te.memo??C,style:{width:"auto"}})})]})]}),t.jsxs(je,{children:[t.jsx(ni,{windowSize:l,children:t.jsx(Ie,{children:n.lineItemsTitle})}),ye.length>0?ye.map((c,h)=>{const B=e?.transactionDetails?.lines?.find(Mn=>Mn.id===c.lineId)?.recipientAmount;return t.jsxs(Qa,{children:[ye.length>1?t.jsx(Xa,{windowSize:l,children:t.jsx(Ja,{windowSize:l,children:`${n.line} # ${h+1}`})}):null,t.jsxs(De,{children:[t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.recipientAmount`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("recipientAmount",h)}`},children:t.jsx(A,{label:{label:n.amount,width:D},text:B!=null?Ae("0,0[.]00",B):C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.lineDescription`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("lineDescription",h)}`},children:t.jsx(A,{label:{label:n.description,width:D},text:c.lineDescription??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.account`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("account",h)}`},children:t.jsx(A,{label:{label:n.category,width:D},text:c.account?.accountName??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.class`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("class",h)}`},children:t.jsx(A,{label:{label:n.class,width:D},text:c.class?.className??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.billable`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("billable",h)}`},children:t.jsx(A,{label:{label:n.billable,width:D},text:c.billable!=null?xn(c.billable):C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.customer`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("customer",h)}`},children:t.jsx(A,{label:{label:n.customer,width:D},text:c.customer?.name??C,style:{width:"auto"}})})]})]},h)}):null]}),t.jsxs(li,{windowSize:l,children:[t.jsx(oi,{children:n.total}),t.jsx(ri,{children:he!=null?t.jsx(ta,{amount:he,integerStyles:pt.h6Medium.cssObject,decimalStyles:pt.standardMedium.cssObject}):C})]}),t.jsxs(je,{children:[t.jsx(Ie,{children:n.paymentDetailsTitle}),t.jsxs(De,{children:[E?null:t.jsxs(t.Fragment,{children:[t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"withdrawFrom"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("withdrawFrom")}`},children:t.jsx(A,{label:{label:n.withdrawFrom,width:D},text:e.withdrawFrom!=null?Rt(e.withdrawFrom,l):d,style:{width:"auto"},additionalInfoLabelStyles:{textAlign:"right",paddingRight:m.infoLabelPaddingRight.valuePx(l),marginTop:m.infoLabelMarginTop.valuePx(l),color:ie.brandColorGoldDark},additionalInfoLabel:W!=null&&k?.code==="pending_approval"?Nt.addMoney:W})}),t.jsx(R,{})]}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"paymentType"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("paymentType")}`},children:t.jsx(A,{additionalInfoLabel:s.paymentType?.method!=null&&s.paymentType.method.includes(L.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&Et&&s.internationalTransferFeeBearerPaymentMethod!=null?t.jsx(_a,{children:na(s.internationalTransferFeeBearerPaymentMethod)}):void 0,label:{label:n.paymentMethod,width:D},text:E&&e.outsideZeniPaymentInfo!=null?Ea(e.outsideZeniPaymentInfo):it(s.paymentType?.method??""),style:{width:"auto"}})}),E?null:t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"paymentTo"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("paymentTo")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(A,{label:{label:n.paymentTo,width:D},text:s.paymentToBankAccount!=null?fn:s.paymentToPI!=null?s.paymentToPI.displayText:wn,style:{width:"auto"},showEyeIcon:s.paymentToBankAccount!=null&&!!s.paymentType?.method?.includes("ach"),showAdditionalInfoLabel:!!e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact||s.paymentType?.method?.includes("ach"),tooltipText:Tn(),additionalInfoLabel:t.jsx(Wa,{children:Dn})}),jn()]})})]}),E||e.isRecurring?t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"recurringPaymentType"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("recurringPaymentType")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(A,{label:{label:n.paymentType,width:D},labelStyles:{marginRight:m.labelMarginRight.valuePx(l)},style:{width:"auto"},text:ia(e.isRecurring,E,e.transactionDetails?.recurringBillInstance??1,e.recurringBillConfigDetail?.totalPaymentCycles??0),textStyles:{paddingLeft:m.textPadding.valuePx(l),paddingRight:m.textPadding.valuePx(l)},additionalInfoLabel:aa(l,e.isRecurring,E,e.recurringBillConfigDetail),additionalInfoLabelStyles:{paddingRight:m.paddingRight.valuePx(l),marginTop:m.additionalTextMarginTop.valuePx(l)}}),e.recurringBillInstances!=null&&e.recurringBillInstances.length>0?t.jsx(pi,{style:{paddingLeft:m.recurringSchedulePaddingLeft.valuePx(l)},children:t.jsx(la,{onAttachmentClick:ze,currencySymbol:e.transactionDetails?.recipientTotalAmount.currencySymbol??ht.currencySymbol,recurringBillInstances:e.recurringBillInstances})}):null]})})]}):null]})]}),e.transactionDetails&&e.transactionDetails.id&&t.jsx(oa,{amount:bn,activities:e.billActivities,stage:k?.code??"draft",onAddNewRule:Ut,entity:"bill_pay",realTimeApproval:{allApprovers:e.filteredApprovers,filteredAttributes:e.filteredAttributes,isRealTimeApproverEditMode:e.realTimeApproval.isEditMode,realTimeApprovalSaveStatus:{fetchState:e.realTimeApproval.fetchState,error:e.realTimeApproval.error},approvalListFetchState:e.approverListFetchState.fetchState,allAccountingClass:e.allAccountingClasses,vendorOwnerId:e.vendorOwnerId??"",isAdmin:Ot,signedInUserId:le?.userId,showRealTimeApproval:Ft,entityApprovalId:e.billActivities[0]?.entityApprovalId??e.transactionDetails.entityApprovalId,updateEditMode:Ht,onSaveRealTimeApprovals:qt},historicActivities:e.billHistory.activities}),t.jsx(si,{})]}),e.transactionDetails?.vendor!=null&&!me&&!e.transactionDetails.isDeleted?t.jsx(ra,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:K||x,showCancel:!K&&x,cancelBtn:{label:et?n.buttons.reject:n.buttons.rejectBill,isLoading:_e==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:zn,style:{width:m.footerButtonWidth.value(l)},reverseSpinnerColor:!1},primaryBtn:{label:Fa(K,et),isLoading:_e==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:K?tt:()=>{W!=null?q(!0):nt()},isDisabled:e.billSaveStatus==="In-Progress"||e.approvalUpdateStatus.fetchState==="In-Progress"||e.realTimeApproval.isEditMode===!0,style:{width:K?"auto":m.footerButtonWidth.value(l)}},rightSideComponent:t.jsx(Za,{children:t.jsxs(Ha,{windowSize:l,children:[!ae&&Oe?t.jsx(mt,{onClickAway:()=>{oe(!1),de(!1)},children:t.jsxs(Tt,{windowSize:l,"data-testid":b("bill-actions-container"),children:[we!=="processing"?t.jsx(_,{onClick:dn,"data-testid":b("delete-bill-action-item"),children:n.buttons.deleteBill}):null,we==="processing"&&!M?t.jsx(_,{onClick:cn,"data-testid":b("cancel-bill-action-item"),children:n.buttons.cancel}):null,we==="processing"&&Sn?t.jsx(_,{onClick:pn,"data-testid":b("cancel-and-delete-bill-action-item"),children:n.buttons.cancelAndDelete}):null,x&&E&&Wt?t.jsx(_,{onClick:Pn,"data-testid":b("mark-as-paid-action-item"),children:n.paymentOutsideZeni.markAsPaid}):null]})}):null,Fe?t.jsx(mt,{onClickAway:()=>{oe(!1),de(!1)},children:t.jsxs(Tt,{windowSize:l,"data-testid":b("bill-actions-with-zeni-assist-container"),children:[xe?t.jsx(_,{onClick:()=>{z.trackRetryClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),Qt()},"data-testid":b("retry-bill-action-item"),children:n.buttons.retry}):null,ge?t.jsx(_,{onClick:mn,"data-testid":b("refund-bill-action-item"),children:n.buttons.refund}):null]})}):null,t.jsxs(Ya,{windowSize:l,children:[$n===!0?t.jsx(Te,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:fe?n.zeniAssist.tooltip:n.zeniAssist.connectToTeamTooltip,placement:"top",maxWidth:"267px",children:t.jsx(wt,{windowSize:l,showEditIcon:be,isIconClickable:fe,"data-testid":b("other-actions-icon-container"),children:fe?t.jsx(hn,{}):t.jsx(Va,{})})}):null,!ae&&be===!0?t.jsx(Te,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:za,placement:"top",children:t.jsx(Ga,{onClick:qe,"data-testid":b("edit-bill-icon-container"),children:t.jsx(Ua,{})})}):null,!ae&&kn===!0?t.jsx(Te,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:Ra,placement:"top",children:t.jsx(wt,{windowSize:l,showEditIcon:be,isIconClickable:!0,"data-testid":b("more-details-icon-container"),children:t.jsx(Ka,{onClick:()=>oe(!Oe)})})}):null]})]})}),style:{minHeight:62}}):null]}),f?t.jsx($a,{id:T,children:t.jsx(sa,{isDrawerOpen:nn,allowComposer:!0,drawerTitle:Ma,threads:G,filter:w,autoExpand:!0,autoFocus:!1,isLoading:P,textOverrides:{composerPlaceholder:gt.addANewComment,replyComposerPlaceholder:gt.replyAComment,threadResolve:ft.resolveComment,threadUnResolve:ft.unResolveComment},threadMetadata:Rn,onThreadClick:an,onCloseAllThreadsDrawer:()=>U(!1),drawerSectionStyle:{width:l==="small"?"100%":"400px",boxSizing:l==="small"?"border-box":"content-box",padding:`${a.sp0} ${m.drawerSectionPaddingLeftRight.valuePx(l)}`,backgroundColor:Ne.colors.background},collapsibleThreadStyle:{width:l==="small"?"100%":"360px"}})}):null]})},Na=(e,g)=>{const x=e?.code;if(e!=null&&x!=null)return g?.isDeleted===!0?{value:ke.tabsById.deleted,color:O.deleted.color,bgColor:O.deleted.bgColor,borderColor:O.deleted.borderColor,code:"deleted"}:x==="pending_approval"&&g?.dueDate?.isBefore(L.dateNow(),"date")===!0?{value:ke.tabsById.overdue,color:O.overdue.color,bgColor:O.overdue.bgColor,borderColor:O.overdue.borderColor}:{value:e.name,color:O[x].color,bgColor:O[x].bgColor,borderColor:O[x].borderColor}},Oa=(e,g)=>{const x=g.transactionDetails?.recipientTotalAmount;return t.jsxs(mi,{windowSize:e,children:[t.jsxs(kt,{windowSize:e,children:[t.jsx(St,{children:n.zeniAssist.accountNumber}),t.jsx(Ct,{children:g.withdrawFrom!=null?Rt(g.withdrawFrom,e):d})]}),t.jsxs(kt,{windowSize:e,children:[t.jsx(St,{children:n.zeniAssist.amount}),t.jsx(Ct,{children:x!=null?Ae("0,0[.]00",x):C})]})]})},Fa=(e,g)=>e?n.paymentOutsideZeni.markAsPaid:g?n.buttons.approve:n.buttons.approveBill,Ea=e=>{const g=e.paymentMode,x=n.paymentOutsideZeni.offline;if(g==null||g==="other")return x;const Z=n.paymentOutsideZeni.paymentModeOptions.find(le=>le.value===g)?.label;return`${x} ${Ba} ${Z}`},La=(e,g,x)=>{if(e)return t.jsx(ut,{variant:"warning",style:{marginTop:a.sp5,marginBottom:a.sp3},title:bt.duplicateWarning.title,description:bt.duplicateWarning.description});if(x!=null){const Z=`${g.withdrawFrom?.label??""} ${g.withdrawFrom?.maskedAccountNumber??""}`;return t.jsx(ut,{variant:"low-balance",style:{marginTop:a.sp2,marginBottom:a.sp3},title:`${Nt.lowBalanceIn.replace("__account__",Z)}`,description:x.replace("Low balance! ","")})}else return null},Wa=i.div``,_a=i.div``,Za=i.div`
1
+ import{X as Nn,V as On,u as Fn,fK as Ln,fL as En,fM as _n,fN as Wn,aV as Zn,a5 as Vn,M as Kn,C as u,j as t,l as E,cF as it,cG as Un,o as a,cH as Yn,cI as Hn,Y as b,cJ as qn,_ as Ae,cK as Gn,aW as lt,aH as ot,dr as rt,bO as st,bQ as dt,bR as ct,fO as Qn,fP as Jn,fQ as Xn,fR as ea,cP as j,cQ as I,cR as $,fS as A,cO as ta,r as pt,g as ie,cS as Rt,cT as na,cU as aa,cV as ia,fT as la,fU as oa,a7 as ra,p as mt,bt as Te,fV as sa,fW as O,q as r,c as da,bp as ca,fX as pa,a6 as ma,fY as ua,fZ as ut,c_ as yt,Q as ya,cu as ha,ah as ba,aq as xa,as as ga,k as fa,eY as zt,f_ as wa,v as Mt,at as Ta,au as va,aN as Da,eI as ja,t as Ia}from"./index-CEwYV-nF.js";import{b as p,n as i}from"./vendor-CnQcJ2Lu.js";import{_ as $a}from"./liveblocks-sSQ9JElv.js";import{o as Aa,t as ka}from"./LowBalancePopup-BLfeh0xm-Cx_IhGZO.js";import"./mui-C5LQ0bMa.js";import"./analytics-CBL_L82S.js";import"./routing-Cpaypegg.js";import"./sentry-HDxG13yk.js";import"./redux-ByjIRbhZ.js";import"./crypto-BURQLTgV.js";const Sa=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",...e},p.createElement("g",{id:"Layer_1"},p.createElement("path",{fill:"none",stroke:"#757d7e",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",d:"M4.4,30.6l6-5.9c1,.6,2.1.9,3.3,1,1.1.1,2.3,0,3.4-.4,1.1-.4,2.1-.9,2.9-1.7.9-.8,1.5-1.7,2-2.7,0-.1,0-.2,0-.4,0-.1,0-.2-.1-.3,0-.1-.2-.2-.3-.2-.1,0-.2,0-.4,0h-4.6c-.8,0-1.6-.3-2.1-.9-.6-.6-.9-1.3-.9-2.1s.3-1.5.9-2.1c.6-.6,1.3-.9,2.1-.9h3.8c.1,0,.3,0,.4-.1s.2-.2.3-.3c0-.1,0-.3,0-.4,0-.1,0-.3-.1-.4-1.3-1.6-3.1-2.7-5.2-3.1-2.1-.4-4.2,0-5.9,1.2-1.8,1.1-3,2.8-3.5,4.8s-.2,4.1.8,5.9l-6.1,5.7,3.3,3.3Z"})),p.createElement("g",{id:"Layer_2"},p.createElement("g",null,p.createElement("path",{fill:"#c27419",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M31,8c0,1.9-.7,3.8-2.1,5.1-1.3,1.4-3.2,2.2-5.1,2.2-.9,0-1.9-.2-2.7-.5-.9-.3-1.7-.9-2.3-1.5-.7-.7-1.2-1.4-1.6-2.3-.4-.9-.6-1.8-.6-2.7,0-1.9.7-3.8,2.1-5.1,1.3-1.4,3.2-2.2,5.1-2.2.9,0,1.9.2,2.7.5.9.3,1.7.9,2.3,1.5.7.7,1.2,1.4,1.6,2.3.4.9.6,1.8.6,2.7Z"}),p.createElement("path",{fill:"none",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M23.8,9.4v-4.6"}),p.createElement("path",{fill:"none",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M23.8,11.4s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.1,0,0,0,0,.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0-.1,0,0,0,0-.1,0h0"})))),Ca={formTitle:new ya("h6Medium","h5Medium")},m={containerPaddingLeft:new u(r[3],r[6],r[6]),containerPaddingRight:new u(r[3],r[6],r[8]),marginBottom:new u(r[3],r[3]),labelWidth:new u(120,160,160),formTitlePaddingLeftRight:new u(30,0),marginTop:new u(r[1],0),rightIconsGap:new u(r[4],r[5]),closeContainerMarginTop:new u(r[1],0),formTitleMarginTopBottom:new u(0,0),footerButtonWidth:new u(120,120,120,165,165),right:new u(r[3],r[0]),actionsContainerRight:new u(r[0],r[3],r[3],r[6],r[6]),otherActionsIconContainerMarginLeft:new u(r[5],r[4],r[4],r[5]),otherActionsContainerBottom:new u(58,44),iconContainerMarginTop:new u(2,r[1]),recurringSchedulePaddingLeft:new u(r[2],0),paddingRight:new u(r[2],r[3]),labelMarginRight:new u(r[0],r[3]),textPadding:new u(r[0],r[3]),additionalTextMarginTop:new u(-4,0),refundPopupWidth:new u(300,420,420),drawerSectionPaddingLeftRight:new u(r[4],r[5]),infoLabelPaddingRight:new u(r[3],r[3]),infoLabelMarginTop:new u(r[1],r[0]),navBarHeight:new u(0,0,r[8]),navBarContainerWidth:new u(100,58)},{dateFormat:Pa,common:{noText:C,strings:{empty:d},currency:ht,via:Ba,more:Ra,edit:za},spendManagement:{billPay:{billDetails:n,billsByTabs:ke,bulkActions:bt,vendorCreation:xt,insufficientFunds:Nt}},collaboration:{threads:{placeholder:gt,tooltip:ft,title:{comments:Ma}}}}=Kn.getLocalizedStrings(),ve=Pa.visual.MMMDCommaYYYYformat,ji=({billDetails:e,currentTenant:g,showApproveRejectBtns:x,isShowDeletedBillsEnabled:Z,signedInUser:le,isAdmin:Ot,isRealTimeApprovalEnabled:Ft,isInternationalPaymentShaVsOurEnabled:Lt,hasZeniAssistAccess:Et,analytics:z,showMarkAsPaidButtonToCreator:V,showMarkAsPaidButtonToApprover:_t,isBillPayCommentingEnabled:Se,isZeniUser:Wt,showBackButton:Ce=!0,isDetectInsufficientFundsEnabled:Zt,redirectToEditableBillScreen:Vt,redirectToBillsScreen:q,discardBillDetailsFromLocalStore:Pe,deleteBill:Kt,cancelAndDeleteBill:Be,approveOrRejectBill:Re,onAddNewRule:Ut,onAttachmentClick:ze,saveBillDetails:Yt,discardOutsideZeniPaymentData:Ht,onBackClick:Me,updateEditRealTimeApproverClicked:qt,onSaveRealTimeApprovals:Gt,onRetryPaymentClick:Qt,onRefundPaymentClick:Jt})=>{const l=Nn(),o=On(),Ne=Fn(),[Xt,K]=p.useState(!1),[Oe,oe]=p.useState(!1),[re,se]=p.useState(!1),[Fe,de]=p.useState(!1),[en,ce]=p.useState(!1),[Le,G]=p.useState(!1),y=e.transactionDetails?.id,tn=Wt?Ln:En,{requestToOpenThread:pe,setRequestToOpenThread:Ee,setOpenThread:Q}=p.useContext(tn),[nn,U]=p.useState(!1),w={application:"dashboard",companyId:o.currentTenant?.companyId,tab:"bill",entityId:y,isGlobalComment:!1},{threads:Y,isLoading:P}=_n(w,"both",!1),f=Se&&y!=null,_e=p.useMemo(()=>y==null?[]:Y.filter(c=>c.resolved===!1&&!c.id.includes(Wn)),[Y,y]).length,T=`dashboard_${o.currentTenant?.companyId}`,an=p.useCallback((c,h)=>{Q(h),U(!1)},[Q,U]);p.useEffect(()=>{pe?.threadId!=null&&Y.length>0&&!P&&(Q(pe.threadId),Ee(null))},[pe,Y,P,Q,Ee]),Zn({componentName:"bill.details"});const[N,J]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[We,Ze]=p.useState("approved"),[ln,Ve]=p.useState(!1),[on,Ke]=p.useState(!1),[Ue,Ye]=p.useState(!1),He=()=>Ve(!1),rn=()=>Ve(!0),qe=Vn(e.zeniAssist?.refundStatus.fetchState),X=p.useCallback(()=>{q()},[q]);p.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed"||e.billSaveStatus==="Completed")&&(Pe(),q())},[e,q,Pe]),p.useEffect(()=>{qe==="In-Progress"&&(e.zeniAssist?.refundStatus.fetchState==="Completed"||e.zeniAssist?.refundStatus.fetchState==="Error")&&(se(!1),X())},[qe,e.zeniAssist?.refundStatus,X]);const k=e.transactionDetails?.billPayInfo.stage,ee=e.transactionDetails?.billPayInfo.billStatus,H=e.transactionDetails?.billPayInfo.billPaymentStatus,sn=e.transactionDetails?.billPayInfo.billPaymentRefundStatus,me=k?.code==="paid",v=me?k:ee?.code=="approved"&&H?.code?H:ee,S=Na(v,e.transactionDetails),F=e.transactionDetails?.billPayInfo.isRefundInitiated===!0?sn:H?.code!=null&&(ee?.code=="approved"||H.code==="mark_as_paid")?H:ee,ue=e.transactionDetails?.vendor?.name,M=e.isRecurring,Ge=()=>{e.transactionDetails?.id!=null&&Vt(e.transactionDetails?.id??"")},dn=()=>{J({title:M?n.recurringBill.deleteRecurringTitle:n.deleteBillTitle,description:M?n.recurringBill.deleteRecurringAlertText:n.deleteAlertDescription,primaryButtonText:n.delete,secondaryButtonText:n.cancel}),K(!0)},cn=()=>{J({title:n.cancelBillTitle,description:n.cancelAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),K(!0)},pn=()=>{J({title:M?n.recurringBill.cancelAndDeleteRecurringTitle:n.cancelAndDeleteBillTitle,description:M?n.recurringBill.cancelAndDeleteRecurringAlertText:n.cancelAndDeleteAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),K(!0)},mn=()=>{z.trackRefundClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),J({title:n.zeniAssist.refundTitle,description:n.zeniAssist.refundDescription,primaryButtonText:n.zeniAssist.proceed,secondaryButtonText:n.cancel}),se(!0)},un={onOkClick:()=>{K(!1),N.primaryButtonText===n.delete?Kt?.(e.isRecurring):N.title===n.cancelBillTitle?Be?.(e.isRecurring):N.title===n.cancelAndDeleteBillTitle||N.title===n.recurringBill.cancelAndDeleteRecurringTitle?Be?.(e.isRecurring,!0):N.primaryButtonText===n.zeniAssist.proceed&&(z.trackRefundConfirmClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),Jt())},onCancelClick:()=>{K(!1),se(!1)}},yn={onOkClick:c=>{ce(!1),Re({billId:e.transactionDetails?.id??"",type:"rejected",description:c})},onCancelClick:()=>{ce(!1)}},hn=()=>{const[c]=Ta("ZeniAssist");return c!=null?t.jsx(va,{"data-testid":b("bill-details-zeni-assist-icon",y),onClick:()=>{de(!Fe),z.trackZeniAssistClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"")},style:{width:`${a.sp5}`,height:`${a.sp5}`,marginBottom:`${a.sp2}`},animationData:c,loop:!0,play:!0,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}):null},te={invoiceNumber:e.transactionDetails?.documentId??"",invoiceDate:e.transactionDetails?.date,billDueDate:e.transactionDetails?.dueDate,memo:e.transactionDetails?.memo,currencyCode:e.vendorCurrency??ht.currencyCode},ye=e.transactionDetails?.lines?.map((c,h)=>{const B=c;return{lineIndex:h,lineId:B.id,account:B.account,class:B.class,amount:B.amount.amount,billable:B.billable,customer:B.customer,lineDescription:B.lineDescription,recipientAmount:B.recipientAmount?.amount}})??[],bn=e.transactionDetails?.recipientTotalAmount.amount??0,he=e.transactionDetails?.recipientTotalAmount,s={paymentType:e.paymentMethodType,paymentDate:e.transactionDetails?.billPayInfo.paymentDate,internationalTransferFeeBearerPaymentMethod:e.transactionDetails?.billPayInfo.internationalTransferFeeBearerPaymentMethod,paymentToBankAccount:e.bankAccount,paymentToPI:e.paymentInstrument},D=m.labelWidth.value(l),xn=c=>c==="billable"||c==="has_been_billed"?n.yes:n.no,gn=s.paymentToBankAccount?.bankAccountNumber?s.paymentToBankAccount?.bankAccountNumber?.slice(s.paymentToBankAccount?.bankAccountNumber?.length-4):s.paymentType?.method?.includes("international")&&s.paymentToBankAccount?.bankAccountIban?s.paymentToBankAccount?.bankAccountIban?.slice(s.paymentToBankAccount?.bankAccountIban.length-4):"",fn=s.paymentToBankAccount?.bankAccountName!=null&&s.paymentToBankAccount?.bankAccountName!=""?s.paymentToBankAccount?.bankAccountName:`${e.transactionDetails?.vendor?.name} - ${s.paymentToBankAccount?.bankName} XXXX${gn}`,wn=e.transactionDetails?.billPayInfo?.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${n.magicLink.collectFrom} ${e.transactionDetails?.billPayInfo?.toAccountVendorEmail}`,t.jsx(ci,{windowSize:l,children:t.jsx(di,{})})]}):void 0,Qe=e.transactionDetails?.date!=null&&e.transactionDetails.bookCloseDate!=null&&e.transactionDetails.date.isBefore(e.transactionDetails.bookCloseDate),Tn=()=>`${xt.achDetails.bankRoutingNumber} ${s?.paymentToBankAccount?.bankRoutingNumberAch}, ${s?.paymentToBankAccount?.bankName}
2
+ ${xt.achDetails.bankAccountNumber} ${s?.paymentToBankAccount?.bankAccountNumber}`,ne=e.transactionDetails?.billPayInfo!=null?E.getActualPaymentDate(e.transactionDetails?.billPayInfo):void 0,vn=ne!=null&&e.paymentMethodType?.maxPeriod?.value!=null?E.zeniDate(E.getNextNthWorkingDay(ne?.toDate(),[0,6],e.paymentMethodType?.maxPeriod.value).toDateString()):void 0,Je=e.transactionDetails?.billPayInfo.expectedDepositDate??vn,Xe=it(s?.paymentType?.method??"").replace("Same Day",""),Dn=(s?.paymentToBankAccount!=null||s?.paymentToPI)!=null?n.addedByZeni:e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact?t.jsx(Un,{paymentTypeLabel:Xe,onClick:rn,style:{marginTop:`${l==="small"?a.sp2:a.sp0}`}}):void 0,jn=()=>s?.paymentToBankAccount==null&&s?.paymentToPI==null&&s?.paymentType?.method!=null&&e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact&&e.transactionDetails?.billPayInfo.paymentDate!=null?t.jsx(wa,{paymentType:s?.paymentType?.method,paymentDate:e.transactionDetails?.billPayInfo.paymentDate}):null,be=!(v?.code==="processing"||e.transactionDetails?.billPayInfo.isRefundInitiated===!0||e.transactionDetails?.billPayInfo.isRefundComplete===!0),xe=e.zeniAssist?.isEligibleForRetryIBT===!0||e.zeniAssist?.isEligibleForRetryOBP===!0,ge=e.zeniAssist?.isEligibleForRefund===!0,In=e?.transactionDetails?.billPayInfo.billPaymentMethodType.code==="wire"&&e?.transactionDetails?.billPayInfo.billPaymentMethodType.subCode==="international",$n=Et&&e.transactionDetails?.billPayInfo.billPaymentStatus.code!=null&&["failed","cancelled","returned"].includes(e.transactionDetails.billPayInfo.billPaymentStatus.code)&&(xe||ge)&&In===!1,fe=xe||ge,An=e.transactionDetails?.billPayInfo.isRefundInitiated===!0&&e.transactionDetails?.billPayInfo.isRefundComplete===!1,we=v?.code,kn=!An&&(!Qe||v?.code==="processing"&&!M),Sn=!Qe,et=["small","medium-compact","medium-regular"].includes(l),ae=E.isBulkProcessing(e.transactionDetails?.bulkProcessingDetail?.type),L=E.isPaymentMethodOutsideZeni(e.paymentMethodType?.method),Cn=c=>{z.trackBillPayMarkAsPaidSubmit(c.paymentMode??"other",k?.code??"",v?.code??""),Yt(!0,Ue,c)},tt=()=>{Ke(!0),z.trackBillPayMarkAsPaid(k?.code??"",v?.code??"")},Pn=()=>{Ye(!0),tt()},Bn=()=>{Ht(),Ke(!1),Ue&&Ye(!1)},Rn=p.useMemo(()=>({companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,entityType:"bill.details",entityId:y??d,isGlobalComment:!1,application:"dashboard",tab:"bill",url:window.location.href}),[o.currentTenant,y]),_=Zt&&e.transactionDetails?.totalAmountWithFeesInUSD!=null&&k?.code!=="paid"&&v?.code!=="failed"&&v?.code!=="processing"&&v?.code!=="cancelled"&&v?.code!=="returned"&&v?.code!=="rejected"?Yn(e.transactionDetails?.totalAmountWithFeesInUSD,e.withdrawFrom,s.paymentDate):void 0,nt=()=>{Ze("approved"),Le===!0&&G(!1),_!=null&&z.trackLowBalanceAccountApprove(k?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",yt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),Re({billId:e.transactionDetails?.id??"",type:"approved"})},zn=()=>{Ze("rejected"),_!=null&&z.trackLowBalanceAccountReject(k?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",yt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),ce(!0)},at=p.useRef(null);return t.jsxs(Ga,{windowSize:l,ref:at,children:[t.jsx(Hn,{anchor:"right",open:ln,onClose:He,transitionDuration:250,"data-testid":b("vendor-email-preview-drawer"),children:t.jsx(qn,{companyName:Gn(g.company?.companyInfo),vendor:e.transactionDetails?.vendor?.name,paymentDate:s.paymentDate?.format(ve)??"",paymentType:Xe,amount:Ae("0,0.[00]",he),isInvoiceAttached:!!e.transactionDetails?.attachments?.length,onClose:He})}),t.jsxs(ei,{windowSize:l,children:[t.jsx(ui,{windowSize:l,children:l==="small"?t.jsx(lt,{"data-testid":b("bill-detail-nav-bar-mobile"),title:t.jsxs(t.Fragment,{children:[ue,e.isRecurring?t.jsx($e,{width:a.sp4,height:a.sp4}):null]}),backgroundColor:Ne.colors.grey4,rightSideComponent:t.jsxs(It,{windowSize:l,children:[f?t.jsxs(Pt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),U(!0),z.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(h=>rt(h)),void 0,void 0,"page icon")},children:[t.jsx(ot,{count:P?void 0:_e,isLoading:P,style:{left:"12px"}}),t.jsx(Bt,{})]}):null,t.jsx($t,{onClick:()=>X(),"data-testid":b("bill-detail-nav-bar-small-close-button"),children:t.jsx(jt,{})})]}),leftSideComponent:t.jsx(Dt,{windowSize:l,onClick:Me,"data-testid":b("bill-detail-nav-bar-small-back-button"),style:{visibility:`${Ce?"visible":"hidden"}`},children:t.jsx(vt,{})}),source:"BillDetailPage"}):t.jsx(lt,{"data-testid":b("bill-detail-nav-bar"),title:t.jsxs(t.Fragment,{children:[ue,e.isRecurring?t.jsx($e,{width:a.sp4,height:a.sp4}):null]}),rightSideComponent:t.jsxs(It,{windowSize:l,children:[f?t.jsxs(Pt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),U(!0),z.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(h=>rt(h)),void 0,void 0,"page icon")},children:[t.jsx(ot,{count:P?void 0:_e,isLoading:P,style:{left:"12px"}}),t.jsx(Bt,{})]}):null,t.jsx($t,{onClick:()=>X(),"data-testid":b("bill-detail-nav-bar-close-button"),children:t.jsx(jt,{})})]}),leftSideComponent:t.jsx(Dt,{windowSize:l,onClick:Me,"data-testid":b("bill-detail-nav-bar-back-button"),style:{visibility:`${Ce?"visible":"hidden"}`},children:t.jsx(vt,{})}),enableTitleOnScroll:!0,scrollableContent:at,source:"BillDetailPage"})}),t.jsxs(ti,{windowSize:l,children:[Le?t.jsx(Aa,{withdrawFrom:e.withdrawFrom,paymentDate:e?.transactionDetails?.billPayInfo.paymentDate,onOkClick:nt,onCancelClick:()=>{G(!1),Ge()},onClickAway:()=>{G(!1)}}):null,on?t.jsx(ka,{onCancel:Bn,onProceedForMarkAsPaid:Cn,saveDetailsFetchState:e.billSaveStatus,paymentData:e.outsideZeniPaymentInfo}):null,Xt||re?t.jsx(st,{titleComponent:t.jsx(ct,{children:N.title}),descriptionComponent:t.jsx(dt,{children:N.description}),primaryButtonText:N.primaryButtonText,proceedButtonVariant:re?"primary":"danger",secondaryButtonText:N.secondaryButtonText,action:un,isEditPopup:!0,isLoading:e.zeniAssist?.refundStatus.fetchState==="In-Progress",children:re?Oa(l,e):null}):null,en?t.jsx(st,{titleComponent:t.jsx(ct,{children:n.rejectBillTitlePrefix+" "+(e.transactionDetails?.vendor?.name!=null?e.transactionDetails.vendor.name:"")}),descriptionComponent:t.jsx(dt,{children:n.rejectBillDescription}),primaryButtonText:n.send,secondaryButtonText:n.cancel,action:yn,isEditPopup:!0,isNotesIncluded:!0,notesPlaceholder:n.rejectBillReasonPlaceholder}):null,l!=="small"||S?t.jsxs(ai,{windowSize:l,children:[l!=="small"?t.jsxs(ii,{windowSize:l,children:[ue,e.isRecurring?t.jsx($e,{height:a.sp5,width:a.sp5}):null]}):null,Z&&S!=null&&S.code==="deleted"?t.jsx(At,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):S?.value===ke.tabsById.overdue?t.jsx(At,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):null]}):null,F!=null&&F.code?l==="small"?t.jsx(Qn,{progressSectionObj:F,createDate:e.transactionDetails?.createTime,paymentDate:Je,scheduleDate:ne,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):t.jsx(Jn,{progressSectionObj:F,createDate:e.transactionDetails?.createTime,paymentDate:Je,scheduleDate:ne,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):null,Ea(ae,e,_),t.jsx(Xn,{sectionId:ea,currentVendorOption:{defaultOptions:[]},billId:y,isBillPayCommentingEnabled:Se,isBillPaid:me,disableVendorActions:!0,vendor:e.transactionDetails?.vendor,prevBills:e.previousBills,onAttachmentClick:ze,isVendorRecommendationEnabled:!1,showVendorGptRecommendationText:!1}),s.paymentType?.method?.includes("ach"),t.jsxs(je,{children:[t.jsx(Ie,{children:n.whatForTitle}),t.jsxs(De,{children:[t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"invoiceNumber"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("invoiceNumber")}`},children:t.jsx(A,{label:{label:n.invoiceNumber,width:D},text:te.invoiceNumber??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"invoiceDate"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("invoiceDate")}`},children:t.jsx(A,{label:{label:n.invoiceDate,width:D},text:te.invoiceDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"billDueDate"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("billDueDate")}`},children:t.jsx(A,{label:{label:n.billDueDate,width:D},text:te.billDueDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"memo"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("memo")}`},children:t.jsx(A,{label:{label:n.memo,width:D},text:te.memo??C,style:{width:"auto"}})})]})]}),t.jsxs(je,{children:[t.jsx(ni,{windowSize:l,children:t.jsx(Ie,{children:n.lineItemsTitle})}),ye.length>0?ye.map((c,h)=>{const B=e?.transactionDetails?.lines?.find(Mn=>Mn.id===c.lineId)?.recipientAmount;return t.jsxs(Qa,{children:[ye.length>1?t.jsx(Ja,{windowSize:l,children:t.jsx(Xa,{windowSize:l,children:`${n.line} # ${h+1}`})}):null,t.jsxs(De,{children:[t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.recipientAmount`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("recipientAmount",h)}`},children:t.jsx(A,{label:{label:n.amount,width:D},text:B!=null?Ae("0,0[.]00",B):C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.lineDescription`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("lineDescription",h)}`},children:t.jsx(A,{label:{label:n.description,width:D},text:c.lineDescription??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.account`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("account",h)}`},children:t.jsx(A,{label:{label:n.category,width:D},text:c.account?.accountName??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.class`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("class",h)}`},children:t.jsx(A,{label:{label:n.class,width:D},text:c.class?.className??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.billable`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("billable",h)}`},children:t.jsx(A,{label:{label:n.billable,width:D},text:c.billable!=null?xn(c.billable):C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.customer`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("customer",h)}`},children:t.jsx(A,{label:{label:n.customer,width:D},text:c.customer?.name??C,style:{width:"auto"}})})]})]},h)}):null]}),t.jsxs(li,{windowSize:l,children:[t.jsx(oi,{children:n.total}),t.jsx(ri,{children:he!=null?t.jsx(ta,{amount:he,integerStyles:pt.h6Medium.cssObject,decimalStyles:pt.standardMedium.cssObject}):C})]}),t.jsxs(je,{children:[t.jsx(Ie,{children:n.paymentDetailsTitle}),t.jsxs(De,{children:[L?null:t.jsxs(t.Fragment,{children:[t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"withdrawFrom"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("withdrawFrom")}`},children:t.jsx(A,{label:{label:n.withdrawFrom,width:D},text:e.withdrawFrom!=null?Rt(e.withdrawFrom,l):d,style:{width:"auto"},additionalInfoLabelStyles:{textAlign:"right",paddingRight:m.infoLabelPaddingRight.valuePx(l),marginTop:m.infoLabelMarginTop.valuePx(l),color:ie.brandColorGoldDark},additionalInfoLabel:_!=null&&k?.code==="pending_approval"?Nt.addMoney:_})}),t.jsx(R,{})]}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"paymentType"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("paymentType")}`},children:t.jsx(A,{additionalInfoLabel:s.paymentType?.method!=null&&s.paymentType.method.includes(E.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&Lt&&s.internationalTransferFeeBearerPaymentMethod!=null?t.jsx(Wa,{children:na(s.internationalTransferFeeBearerPaymentMethod)}):void 0,label:{label:n.paymentMethod,width:D},text:L&&e.outsideZeniPaymentInfo!=null?La(e.outsideZeniPaymentInfo):it(s.paymentType?.method??""),style:{width:"auto"}})}),L?null:t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"paymentTo"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("paymentTo")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(A,{label:{label:n.paymentTo,width:D},text:s.paymentToBankAccount!=null?fn:s.paymentToPI!=null?s.paymentToPI.displayText:wn,style:{width:"auto"},showEyeIcon:s.paymentToBankAccount!=null&&!!s.paymentType?.method?.includes("ach"),showAdditionalInfoLabel:!!e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact||s.paymentType?.method?.includes("ach"),tooltipText:Tn(),additionalInfoLabel:t.jsx(_a,{children:Dn})}),jn()]})})]}),L||e.isRecurring?t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"recurringPaymentType"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("recurringPaymentType")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(A,{label:{label:n.paymentType,width:D},labelStyles:{marginRight:m.labelMarginRight.valuePx(l)},style:{width:"auto"},text:ia(e.isRecurring,L,e.transactionDetails?.recurringBillInstance??1,e.recurringBillConfigDetail?.totalPaymentCycles??0),textStyles:{paddingLeft:m.textPadding.valuePx(l),paddingRight:m.textPadding.valuePx(l)},additionalInfoLabel:aa(l,e.isRecurring,L,e.recurringBillConfigDetail),additionalInfoLabelStyles:{paddingRight:m.paddingRight.valuePx(l),marginTop:m.additionalTextMarginTop.valuePx(l)}}),e.recurringBillInstances!=null&&e.recurringBillInstances.length>0?t.jsx(pi,{style:{paddingLeft:m.recurringSchedulePaddingLeft.valuePx(l)},children:t.jsx(la,{onAttachmentClick:ze,currencySymbol:e.transactionDetails?.recipientTotalAmount.currencySymbol??ht.currencySymbol,recurringBillInstances:e.recurringBillInstances})}):null]})})]}):null]})]}),e.transactionDetails&&e.transactionDetails.id&&t.jsx(oa,{amount:bn,activities:e.billActivities,stage:k?.code??"draft",onAddNewRule:Ut,entity:"bill_pay",realTimeApproval:{allApprovers:e.filteredApprovers,filteredAttributes:e.filteredAttributes,isRealTimeApproverEditMode:e.realTimeApproval.isEditMode,realTimeApprovalSaveStatus:{fetchState:e.realTimeApproval.fetchState,error:e.realTimeApproval.error},approvalListFetchState:e.approverListFetchState.fetchState,allAccountingClass:e.allAccountingClasses,vendorOwnerId:e.vendorOwnerId??"",isAdmin:Ot,signedInUserId:le?.userId,showRealTimeApproval:Ft,entityApprovalId:e.billActivities[0]?.entityApprovalId??e.transactionDetails.entityApprovalId,updateEditMode:qt,onSaveRealTimeApprovals:Gt},historicActivities:e.billHistory.activities}),t.jsx(si,{})]}),e.transactionDetails?.vendor!=null&&!me&&!e.transactionDetails.isDeleted?t.jsx(ra,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:V||x,showCancel:!V&&x,cancelBtn:{label:et?n.buttons.reject:n.buttons.rejectBill,isLoading:We==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:zn,style:{width:m.footerButtonWidth.value(l)},reverseSpinnerColor:!1},primaryBtn:{label:Fa(V,et),isLoading:We==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:V?tt:()=>{_!=null?G(!0):nt()},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(Za,{children:t.jsxs(qa,{windowSize:l,children:[!ae&&Oe?t.jsx(mt,{onClickAway:()=>{oe(!1),de(!1)},children:t.jsxs(Tt,{windowSize:l,"data-testid":b("bill-actions-container"),children:[we!=="processing"?t.jsx(W,{onClick:dn,"data-testid":b("delete-bill-action-item"),children:n.buttons.deleteBill}):null,we==="processing"&&!M?t.jsx(W,{onClick:cn,"data-testid":b("cancel-bill-action-item"),children:n.buttons.cancel}):null,we==="processing"&&Sn?t.jsx(W,{onClick:pn,"data-testid":b("cancel-and-delete-bill-action-item"),children:n.buttons.cancelAndDelete}):null,x&&L&&_t?t.jsx(W,{onClick:Pn,"data-testid":b("mark-as-paid-action-item"),children:n.paymentOutsideZeni.markAsPaid}):null]})}):null,Fe?t.jsx(mt,{onClickAway:()=>{oe(!1),de(!1)},children:t.jsxs(Tt,{windowSize:l,"data-testid":b("bill-actions-with-zeni-assist-container"),children:[xe?t.jsx(W,{onClick:()=>{z.trackRetryClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),Qt()},"data-testid":b("retry-bill-action-item"),children:n.buttons.retry}):null,ge?t.jsx(W,{onClick:mn,"data-testid":b("refund-bill-action-item"),children:n.buttons.refund}):null]})}):null,t.jsxs(Ha,{windowSize:l,children:[$n===!0?t.jsx(Te,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:fe?n.zeniAssist.tooltip:n.zeniAssist.connectToTeamTooltip,placement:"top",maxWidth:"267px",children:t.jsx(wt,{windowSize:l,showEditIcon:be,isIconClickable:fe,"data-testid":b("other-actions-icon-container"),children:fe?t.jsx(hn,{}):t.jsx(Ka,{})})}):null,!ae&&be===!0?t.jsx(Te,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:za,placement:"top",children:t.jsx(Ya,{onClick:Ge,"data-testid":b("edit-bill-icon-container"),children:t.jsx(Ua,{})})}):null,!ae&&kn===!0?t.jsx(Te,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:Ra,placement:"top",children:t.jsx(wt,{windowSize:l,showEditIcon:be,isIconClickable:!0,"data-testid":b("more-details-icon-container"),children:t.jsx(Va,{onClick:()=>oe(!Oe)})})}):null]})]})}),style:{minHeight:62}}):null]}),f?t.jsx($a,{id:T,children:t.jsx(sa,{isDrawerOpen:nn,allowComposer:!0,drawerTitle:Ma,threads:Y,filter:w,autoExpand:!0,autoFocus:!1,isLoading:P,textOverrides:{composerPlaceholder:gt.addANewComment,replyComposerPlaceholder:gt.replyAComment,threadResolve:ft.resolveComment,threadUnResolve:ft.unResolveComment},threadMetadata:Rn,onThreadClick:an,onCloseAllThreadsDrawer:()=>U(!1),drawerSectionStyle:{width:l==="small"?"100%":"400px",boxSizing:l==="small"?"border-box":"content-box",padding:`${a.sp0} ${m.drawerSectionPaddingLeftRight.valuePx(l)}`,backgroundColor:Ne.colors.background},collapsibleThreadStyle:{width:l==="small"?"100%":"360px"}})}):null]})},Na=(e,g)=>{const x=e?.code;if(e!=null&&x!=null)return g?.isDeleted===!0?{value:ke.tabsById.deleted,color:O.deleted.color,bgColor:O.deleted.bgColor,borderColor:O.deleted.borderColor,code:"deleted"}:x==="pending_approval"&&g?.dueDate?.isBefore(E.dateNow(),"date")===!0?{value:ke.tabsById.overdue,color:O.overdue.color,bgColor:O.overdue.bgColor,borderColor:O.overdue.borderColor}:{value:e.name,color:O[x].color,bgColor:O[x].bgColor,borderColor:O[x].borderColor}},Oa=(e,g)=>{const x=g.transactionDetails?.recipientTotalAmount;return t.jsxs(mi,{windowSize:e,children:[t.jsxs(kt,{windowSize:e,children:[t.jsx(St,{children:n.zeniAssist.accountNumber}),t.jsx(Ct,{children:g.withdrawFrom!=null?Rt(g.withdrawFrom,e):d})]}),t.jsxs(kt,{windowSize:e,children:[t.jsx(St,{children:n.zeniAssist.amount}),t.jsx(Ct,{children:x!=null?Ae("0,0[.]00",x):C})]})]})},Fa=(e,g)=>e?n.paymentOutsideZeni.markAsPaid:g?n.buttons.approve:n.buttons.approveBill,La=e=>{const g=e.paymentMode,x=n.paymentOutsideZeni.offline;if(g==null||g==="other")return x;const Z=n.paymentOutsideZeni.paymentModeOptions.find(le=>le.value===g)?.label;return`${x} ${Ba} ${Z}`},Ea=(e,g,x)=>{if(e)return t.jsx(ut,{variant:"warning",style:{marginTop:a.sp5,marginBottom:a.sp3},title:bt.duplicateWarning.title,description:bt.duplicateWarning.description});if(x!=null){const Z=`${g.withdrawFrom?.label??""} ${g.withdrawFrom?.maskedAccountNumber??""}`;return t.jsx(ut,{variant:"low-balance",style:{marginTop:a.sp2,marginBottom:a.sp3},title:`${Nt.lowBalanceIn.replace("__account__",Z)}`,description:x.replace("Low balance! ","")})}else return null},_a=i.div``,Wa=i.div``,Za=i.div`
3
3
  display: flex;
4
4
  justify-content: flex-end;
5
- `,Ka=i(ja)`
5
+ `,Va=i(ja)`
6
6
  cursor: pointer;
7
7
  color: ${e=>e.theme.colors.hero};
8
8
  width: ${a.sp4};
@@ -18,7 +18,7 @@ import{X as Nn,t as On,u as Fn,fI as En,fJ as Ln,fK as Wn,fL as _n,bC as Zn,a1 a
18
18
  &:hover {
19
19
  color: ${e=>e.theme.colors.primary};
20
20
  }
21
- `,Va=i(Sa)`
21
+ `,Ka=i(Sa)`
22
22
  color: ${e=>e.theme.colors.hero};
23
23
  width: ${a.sp5};
24
24
  height: ${a.sp5};
@@ -34,7 +34,7 @@ import{X as Nn,t as On,u as Fn,fI as En,fJ as Ln,fK as Wn,fL as _n,bC as Zn,a1 a
34
34
  &:hover {
35
35
  color: ${e=>e.theme.colors.primary};
36
36
  }
37
- `,Ga=i.div`
37
+ `,Ya=i.div`
38
38
  display: flex;
39
39
  cursor: pointer;
40
40
  color: ${e=>e.theme.colors.grey1};
@@ -42,7 +42,7 @@ import{X as Nn,t as On,u as Fn,fI as En,fJ as Ln,fK as Wn,fL as _n,bC as Zn,a1 a
42
42
  &:hover {
43
43
  color: ${e=>e.theme.colors.primary};
44
44
  }
45
- `,Ya=i.div`
45
+ `,Ha=i.div`
46
46
  display: flex;
47
47
  justify-content: center;
48
48
  align-items: center;
@@ -64,14 +64,14 @@ import{X as Nn,t as On,u as Fn,fI as En,fJ as Ln,fK as Wn,fL as _n,bC as Zn,a1 a
64
64
  border-radius: ${a.sp1};
65
65
  right: ${e=>m.right.valuePx(e.windowSize)};
66
66
  box-shadow: ${e=>`${a.sp0} 2px ${a.sp1} ${e.theme.colors.grey1}3D`};
67
- `,Ha=i.div`
67
+ `,qa=i.div`
68
68
  width: auto;
69
69
  justify-content: flex-end;
70
70
  position: ${e=>e.windowSize==="small"?"static":"relative"};
71
71
  right: ${e=>m.actionsContainerRight.valuePx(e.windowSize)};
72
72
  height: 100%;
73
73
  display: flex;
74
- `,_=i(Mt)`
74
+ `,W=i(Mt)`
75
75
  display: flex;
76
76
  align-items: center;
77
77
  width: 100%;
@@ -113,7 +113,7 @@ import{X as Nn,t as On,u as Fn,fI as En,fJ as Ln,fK as Wn,fL as _n,bC as Zn,a1 a
113
113
  width: ${a.sp4};
114
114
  height: ${a.sp4};
115
115
  display: flex;
116
- `,qa=i.div`
116
+ `,Ga=i.div`
117
117
  height: 100%;
118
118
  overflow: scroll;
119
119
  `,De=i.div`
@@ -136,14 +136,14 @@ import{X as Nn,t as On,u as Fn,fI as En,fJ as Ln,fK as Wn,fL as _n,bC as Zn,a1 a
136
136
  background-color: ${e=>e.theme.colors.grey3};
137
137
  min-height: 1px;
138
138
  max-height: 1px;
139
- `,Xa=i(ga)`
139
+ `,Ja=i(ga)`
140
140
  display: flex;
141
141
  align-items: center;
142
142
  justify-content: space-between;
143
143
  color: ${e=>e.theme.colors.champion};
144
144
  margin-top: ${a.sp2};
145
145
  height: 31px;
146
- `,Ja=i(fa)`
146
+ `,Xa=i(fa)`
147
147
  color: ${e=>e.theme.colors.champion};
148
148
  `,ei=i.div`
149
149
  display: flex;