@zeniai/web-cockpit-ui 1.15.41-qa → 1.15.42-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 (315) hide show
  1. package/dist/assets/ACHDetailsPage-DF16gWgj-Hpn_gqDU.js +21 -0
  2. package/dist/assets/{AIPerformancePage-PNdYt7zU-CCfuxILG.js → AIPerformancePage-C4vz8N43-CRGg0PbR.js} +41 -41
  3. package/dist/assets/AccountInfoPage-BEfWt7FF-DKS41VFv.js +18 -0
  4. package/dist/assets/{AccountInfoPageContent-ByDC4GDX-Dqc4SPDG.js → AccountInfoPageContent-ChU5cJoQ-D9IyZyne.js} +20 -20
  5. package/dist/assets/AccountLockedInfoModal-nR2S2Zp3-D-cVlgUn.js +59 -0
  6. package/dist/assets/{AccountReconDetailsDrawerPage-C3eByWLq-C6RBkRVB.js → AccountReconDetailsDrawerPage-CX_r0vhF-C1q9rEkK.js} +49 -49
  7. package/dist/assets/{AccountRow-H8lG1wjG-BENCFocK.js → AccountRow-sz0SNySJ-PMcRks2g.js} +20 -20
  8. package/dist/assets/{AccountsPromoCardStack-DACW0OlS-D7dbT3SC.js → AccountsPromoCardStack-B7XZ57f9-CVIKbG9H.js} +26 -26
  9. package/dist/assets/AddAddressForCardDrawer-BJ-fZGjY-BgqrlNw3.js +6 -0
  10. package/dist/assets/{AddToWalletPage-CXsdXmY4-DqUKB32H.js → AddToWalletPage-DGRSRVWe-CKFgsCEX.js} +22 -22
  11. package/dist/assets/{AgingReportsPage-G-3_Pd0O-DSzSGoMU.js → AgingReportsPage-DMExghvs-CycrXnxr.js} +4 -4
  12. package/dist/assets/{AllUserItems-C87o610O-C4ngO1W2.js → AllUserItems-DryGxINS-Dfji-7g8.js} +9 -9
  13. package/dist/assets/ApAgingDetailPage-DGx58n1N-BTsjh3-_.js +46 -0
  14. package/dist/assets/{AppBasePage-CVtUuOcc-D8Jp442P.js → AppBasePage-CNTgjZKQ-wPJItjxh.js} +7 -7
  15. package/dist/assets/{AppDrawerContent-f9CovWwx-CRmwucEK.js → AppDrawerContent-BWPrhBXi-xs-4ykwH.js} +5 -5
  16. package/dist/assets/{ApprovalRulesSettingsPage-MV9MWn1n-B_Gy9F2m.js → ApprovalRulesSettingsPage-d_j1Of5B-Drv5uoVo.js} +3 -3
  17. package/dist/assets/{ArAgingChart-Bn1ne5TY-gOLToFjY.js → ArAgingChart-OG8ATXHG-BPTtTowJ.js} +4 -4
  18. package/dist/assets/{ArAgingDetailPage-LrJ7ab5--DpGQFGj1.js → ArAgingDetailPage-BPgtjmm2-3KI_6Cxg.js} +1 -1
  19. package/dist/assets/{AttachmentView-40S92NKz-O72HtTZp.js → AttachmentView-DTHxVIEf-OlbTumHp.js} +8 -8
  20. package/dist/assets/{BankAccountSection-BqHvCCIV-cPbSA8Xj.js → BankAccountSection-CJlVvGHg-BpmPk2BK.js} +3 -3
  21. package/dist/assets/{BankAccountWarningSection-BhYGVsUP-Bgxn65RB.js → BankAccountWarningSection-DVVX_lU2-YGd3zWAN.js} +4 -4
  22. package/dist/assets/{BankConnectionsSettingsPage-DXdPI9zA-DT9EhfPP.js → BankConnectionsSettingsPage-tN8-HD1P-CjUFfCmd.js} +25 -25
  23. package/dist/assets/BillDetailPage-Bm_TJJ2g-zy6sbh4h.js +266 -0
  24. package/dist/assets/{BillPayApprovalRuleDetailPage-CfqhwDf0-DCyv7vx2.js → BillPayApprovalRuleDetailPage-DtdRRgcR-CI7_XiGE.js} +2 -2
  25. package/dist/assets/{BillPayApprovalRulesPage-BYFmAM12-pZa4t15e.js → BillPayApprovalRulesPage-D7pP_-16-BPbHVQJF.js} +13 -13
  26. package/dist/assets/BillPayPromoPage-BEUu8_p_-CdxN39Ja.js +84 -0
  27. package/dist/assets/{BillPaySetUpPage-DWl8Zqs1-uZakaQ8Q.js → BillPaySetUpPage-BhUjqdEO-D4O_Ti0B.js} +4 -4
  28. package/dist/assets/BillingSettingsPage-BPRhivDv-C05om7fp.js +44 -0
  29. package/dist/assets/BillsBulkReviewDrawerPage-CKS2cRrv-BkJLG09t.js +1 -0
  30. package/dist/assets/{BoxItem-Ce8JhxRe-M9xWkSbH.js → BoxItem-BeIteKFb-Ib8SQzK0.js} +1 -1
  31. package/dist/assets/{BusinessVerificationPage-DBUiYheW-CjRSQJ04.js → BusinessVerificationPage-Djw-kSvA-C_VqSsA_.js} +6 -6
  32. package/dist/assets/{CardNumberSubText-1VICaGZC-D3RqCdk-.js → CardNumberSubText-D7w7pNlf-px0UUmwV.js} +1 -1
  33. package/dist/assets/{CashbackDetailPage-D9MFQhkK-DId8X-0z.js → CashbackDetailPage-DiEz5YX_-8CUn3oj8.js} +18 -18
  34. package/dist/assets/{ChargeCardDetailPage-DPLktTU0-D-hVAQ2P.js → ChargeCardDetailPage-46d4rGgi-C8VEOYGw.js} +53 -53
  35. package/dist/assets/{ChargeCardListPage-PJbJVy9B-C7swXn1_.js → ChargeCardListPage-DQgEFDxx-CRF2CXoG.js} +16 -16
  36. package/dist/assets/{ChargeCardListTable-B7Jltqnn-lu4L-KiX.js → ChargeCardListTable-CAdFvZrg-ZDs6pP1D.js} +30 -30
  37. package/dist/assets/{ChargeCardPaymentHistoryPage-CY9nng7V-DMOUwpBt.js → ChargeCardPaymentHistoryPage-BVFfqwea-BY1rljaa.js} +36 -36
  38. package/dist/assets/{ChargeCardPromoPage-CQJ-q6d9-CAZVMp3A.js → ChargeCardPromoPage-N1x7DoZ4-C2G2NFcL.js} +25 -25
  39. package/dist/assets/{ChargeCardSetupPage-BjYXhI41-1PD6oZTx.js → ChargeCardSetupPage-DjoSNPoV-B95V0M5O.js} +1 -1
  40. package/dist/assets/{ChargeCardStatementsPage-BJhMyv01-C4iLvalo.js → ChargeCardStatementsPage-CKWgdycu-Bzkf2xU2.js} +5 -5
  41. package/dist/assets/{CheckDepositDrawerPage-BDUc5zew-CPIt8X_J.js → CheckDepositDrawerPage-C6eutpsP-BJgM-nd0.js} +8 -8
  42. package/dist/assets/{CollapsableReportTable-CRZijlLw-DrP1MH6t.js → CollapsableReportTable-DQitA-HH-D-ytul6z.js} +86 -86
  43. package/dist/assets/{CompanyOfficerDetailsSection-DBN5fsfV-BQ3P2-gb.js → CompanyOfficerDetailsSection-BusB8QML-ByGBO89M.js} +15 -15
  44. package/dist/assets/{CompanyPassportCard-DY-UpT4X-C4b0dPrE.js → CompanyPassportCard-Dwq6U23E-Dff0N9f5.js} +2 -2
  45. package/dist/assets/{CompanyPassportPage-B0lEp15Z-1i_bghIC.js → CompanyPassportPage-a7p7-Yf7-BH2Ltdk_.js} +23 -23
  46. package/dist/assets/{CompleteProfile-DkXUTjrQ-Db_nzBJO.js → CompleteProfile-Be83xc7S-DF09SnKJ.js} +1 -1
  47. package/dist/assets/ConfettiBurst-BGpaNgtO-BA4--k5u.js +1 -0
  48. package/dist/assets/{ConstrainedInnerElement-BeIpAPjB-CfTvgjDM.js → ConstrainedInnerElement-BeIpAPjB-B_QUqBfd.js} +1 -1
  49. package/dist/assets/{CreateOrEditVendorPage-hAG6iJks-lkeljyMv.js → CreateOrEditVendorPage-CNOoNMGf-xbewlduj.js} +19 -19
  50. package/dist/assets/{CreditCardPaymentDrawerPage-CLche8ye-C_34ZvNa.js → CreditCardPaymentDrawerPage-BJFiaA8N-y9d5BoI2.js} +14 -14
  51. package/dist/assets/{CurrencySelectField-Cps-E4RZ-d5qF8fSQ.js → CurrencySelectField-QL-EZiuT-_bjNCxiF.js} +4 -4
  52. package/dist/assets/{CustomerOnboardingActivationPage-B8EI1b3X-Dj6Y4Uh4.js → CustomerOnboardingActivationPage-ChFLc-Bh-CMWmLAhY.js} +6 -6
  53. package/dist/assets/CustomerOnboardingContainerPage-CiWilmvy-BSdTk0pn.js +1 -0
  54. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-Cjdz022F-BQzlWrkT.js → CustomerOnboardingDetailPageSkeleton-ByAYHyM5-BTUKD21M.js} +11 -11
  55. package/dist/assets/{CustomerOnboardingNoStepsPage-BM3Ty0A--DIbMLpTU.js → CustomerOnboardingNoStepsPage-CJlf2BxW-CHRKjivu.js} +4 -4
  56. package/dist/assets/{CustomerOnboardingPage-D4cNTYTi-C42KbQXa.js → CustomerOnboardingPage-CZpYM2Um-DmldBx57.js} +14 -14
  57. package/dist/assets/{CustomerOnboardingProductSuitePage-BRg-6X__-DdNSpQ-6.js → CustomerOnboardingProductSuitePage-Bua-efZZ-DTLtNPox.js} +3 -3
  58. package/dist/assets/{Dashboard-hAvH2Ujo-B6IP_j2j.js → Dashboard-Bo3YLWim-DCvqfujn.js} +66 -66
  59. package/dist/assets/{DashboardReportPage-BnsfrJs5-BPhqM0F_.js → DashboardReportPage-DxLBSScH-DzuVjp6S.js} +10 -10
  60. package/dist/assets/{DashboardSidebarBackgroundAnimation-CD-912fm-Dh1jPxOd.js → DashboardSidebarBackgroundAnimation-D9jy0E3J-CnJYb7sN.js} +1 -1
  61. package/dist/assets/{DepositAccTransactionItem-BSjRIT76-BTmXhvMG.js → DepositAccTransactionItem-BUSuSCOR-65UinRer.js} +4 -4
  62. package/dist/assets/{DepositAccTransactionListPage-CMHZmCaF-BFddyBE8.js → DepositAccTransactionListPage-CIDmP_Ig-B_Y_F7VT.js} +9 -9
  63. package/dist/assets/{DomesticWireDetailsPage-B7IcmJ5S-CtbOrFFy.js → DomesticWireDetailsPage-1JafGpxq-uSG1nT_5.js} +1 -1
  64. package/dist/assets/{DownloadOverlay-DLdu2VQ3-KjQqw4XR.js → DownloadOverlay-DUYftI-h-D71rp7yz.js} +11 -11
  65. package/dist/assets/{DrawerPage-CVKJUV0d-1VrLf85V.js → DrawerPage-Br7Spm_D-pQ8sZx88.js} +7 -7
  66. package/dist/assets/EditPeoplePage-CGYR3lrg-DoWF8etD.js +55 -0
  67. package/dist/assets/{EditReimbursementDetailPage--Sw7PT5v-ByroxrFy.js → EditReimbursementDetailPage-DMMdfkh8-Bucax6Ut.js} +156 -156
  68. package/dist/assets/EntityDetailPage-DYtL_p8R-GD_XakVz.js +18 -0
  69. package/dist/assets/{EntitySummarySection-BwfqmMJf-Ck--pC9e.js → EntitySummarySection-BqbaP86G-DpA6l5fM.js} +30 -30
  70. package/dist/assets/{ExpenseAutomationOverviewPage-EuWSUhAA-S_zuNRXY.js → ExpenseAutomationOverviewPage-CrXiwOR2-YbYbnS7Q.js} +17 -17
  71. package/dist/assets/{ExpenseAutomationPage-CNl1S9Aa-mhJaMF4M.js → ExpenseAutomationPage-Nf_8Kyie-CTvPgCHn.js} +47 -47
  72. package/dist/assets/{ExpressPayPage-CbWuzpCW-DS_V3c-F.js → ExpressPayPage-UQwsM48P-D7O-_G73.js} +17 -17
  73. package/dist/assets/{FeaturePreviewPage-HWLnhB9a-DXJxcpnb.js → FeaturePreviewPage-BRPcuukW-BStEym9y.js} +2 -2
  74. package/dist/assets/{FollowStepsSection-CVX6zX9Q-0JaUuRFv.js → FollowStepsSection-zLVY0Bxj-CS04bdSf.js} +1 -1
  75. package/dist/assets/{GlobalReviewListPage-HEPGnrBi-D4pu4wAE.js → GlobalReviewListPage-Dm_qc_Yw-DaZA8sHm.js} +13 -13
  76. package/dist/assets/{InformationCardStack-BC-wYnqn-CDHpu8rR.js → InformationCardStack-C7jQmHes-CWd2nkLz.js} +4 -4
  77. package/dist/assets/{InsightsCardStack-Buh7Rj7W-B-XFnTbj.js → InsightsCardStack-CBrXK6na-CLYhX1B-.js} +9 -9
  78. package/dist/assets/{InsightsSection-uT4QX3iw-B1Mb62vw.js → InsightsSection-D_hTz1-h-EcLzFnt2.js} +4 -4
  79. package/dist/assets/{IntegrationsSettingsPage-np4iMqIF-BOXlm3x-.js → IntegrationsSettingsPage-B3BcOzu1-DFtNOGVa.js} +10 -10
  80. package/dist/assets/{InternationalWireSwiftDetailsPage-CRFIo4Oj-CKmgCCwr.js → InternationalWireSwiftDetailsPage-CMrSLhcq-xqjqhVUP.js} +17 -17
  81. package/dist/assets/InternationalWireVerificationPage-D8lqdsVG-CS33qqLD.js +65 -0
  82. package/dist/assets/{InviteFormPage-CVVm61Xb-DTfuiXCS.js → InviteFormPage-Cb6yA36Y-j5-QPPFw.js} +30 -30
  83. package/dist/assets/{InvitePageListView-Bhv5fpSY-BrVz8pRa.js → InvitePageListView-CvAYZn3w-BGjtLryq.js} +52 -52
  84. package/dist/assets/InvitePeoplePage-B3HP9bgz-C0119Ywd.js +12 -0
  85. package/dist/assets/{InvoiceUploadSection-DBvyatKK-CJBMM0Za.js → InvoiceUploadSection-BV69g_45-C0jQPqw-.js} +10 -10
  86. package/dist/assets/{IssueChargeCardPage-DzAyBn8c-mXHywZLA.js → IssueChargeCardPage-DC8gfsh9-C09x3l5G.js} +32 -32
  87. package/dist/assets/{LabeledAddressValue-BHuN9hmS-xGzDkCtS.js → LabeledAddressValue-DcHYCO3r-yN6DyHDi.js} +2 -2
  88. package/dist/assets/LabeledAddressValueField-COLiEu2C-u-zbSv3w.js +45 -0
  89. package/dist/assets/{LabeledControlledCheckBoxField-CRR6Iscv-DujcJdM4.js → LabeledControlledCheckBoxField-B258oHta-DFq5Q_Wk.js} +2 -2
  90. package/dist/assets/{LabeledCountryMultiSelectField-BWfPhvMM-pDpHMyTS.js → LabeledCountryMultiSelectField-CDN3Cboj-DwWKggpi.js} +12 -12
  91. package/dist/assets/{LabeledCreatableSingleSelectField-CbmnDlQX-Bud0UcHP.js → LabeledCreatableSingleSelectField-5NsKlfNx-BEfEdG1_.js} +4 -4
  92. package/dist/assets/LabeledDocumentField-DNh366no-DrAn5iL2.js +41 -0
  93. package/dist/assets/{LabeledDropDownFormattedTextField-CLHaeBmo-Dbz-uAbc.js → LabeledDropDownFormattedTextField-BEox9eFP-Cs6wSzGo.js} +7 -7
  94. package/dist/assets/LabeledText-BNEHh2ZI-BfrNdALD.js +42 -0
  95. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-DYAtBZjB-BW2S_3jE.js → LabeledUserSingleSelectWithSubtitlesField-BoYac4nN-CnfvrnWB.js} +18 -18
  96. package/dist/assets/{LabeledZeniRolesDropDownField-B7Z3Kefm-D8ICt4Pk.js → LabeledZeniRolesDropDownField-BL1wek8m-DLuVqXVU.js} +20 -20
  97. package/dist/assets/LinkJETransactionPage-KkB2mCGz-DD79uSY5.js +98 -0
  98. package/dist/assets/{LockCardPage-DG1icW3l-BrBrLoqr.js → LockCardPage-BBPoahE6-DjuGLIgr.js} +219 -219
  99. package/dist/assets/LowBalancePopup-BFU-BVK9-DWsdSBOg.js +34 -0
  100. package/dist/assets/MagicLinkACHDetailsPage-voSZCbPS-Bu01L_aV.js +1 -0
  101. package/dist/assets/MagicLinkDomesticWireDetailsPage-evB-Fia6-Ddjk2plz.js +1 -0
  102. package/dist/assets/MagicLinkInternationalWireDetailsPage-ChjLt6BQ-C6H3R4f0.js +1 -0
  103. package/dist/assets/{MagicLinkSuccessPage-DH2RMNDM-2yEu43__.js → MagicLinkSuccessPage-BL0Twa3Z-yp-cCoVI.js} +6 -6
  104. package/dist/assets/{MagicLinkTitleSection-B_lsWLaB-6l0Q2ZDr.js → MagicLinkTitleSection-C8EEgV19-CiX4xfZT.js} +4 -4
  105. package/dist/assets/MailingDetailsSection-DT2vh6CT-CCScgjq2.js +21 -0
  106. package/dist/assets/{MyBankConnectionsSettingsPage-D4QR9tUf-AE5_I3cP.js → MyBankConnectionsSettingsPage-BvZhVteo-C2c-74lS.js} +12 -12
  107. package/dist/assets/MyPendingActivationChargeCardListPage-D2EL0Jp--BWDRXrvv.js +6 -0
  108. package/dist/assets/{MyProfileSettingsPage-CSaNSpuq-H-vs8ioV.js → MyProfileSettingsPage-3QGlUKp1-z7Bwqz5C.js} +7 -7
  109. package/dist/assets/{NavBarWithPicker-Zs67Xuo1-Bwvf2TqD.js → NavBarWithPicker-BXubFmkR-D51S0MSd.js} +3 -3
  110. package/dist/assets/{NavigationArrow-gJivTrEy-CJYJcp3Q.js → NavigationArrow-DvI-yhxJ-DlVsGta8.js} +1 -1
  111. package/dist/assets/{NavigationDots-DTQZxPoW-LNb-u25P.js → NavigationDots-CPlwYOx--BPMPlnpv.js} +1 -1
  112. package/dist/assets/{NewGlobalMerchantPage-BI5z7cVi-Drg8AloH.js → NewGlobalMerchantPage-CXC3nRf0-Bx5yZmxN.js} +12 -12
  113. package/dist/assets/{NoDataChart-CKYUeTCs-DvkQx1V0.js → NoDataChart-DTVuSEdu-BkUYV-TV.js} +1 -1
  114. package/dist/assets/{NoDataTable-CwJmhtK3-CCNoQlOZ.js → NoDataTable-Bgt6dZEF-B3972AwQ.js} +1 -1
  115. package/dist/assets/{NotFoundPage-Bxs-YzV4-CpCxTN11.js → NotFoundPage-B2B4aoo2-BW-s5AV5.js} +8 -8
  116. package/dist/assets/{NotificationSettingsPage-DMYs6gdm-BlfmU3ul.js → NotificationSettingsPage-B5kEZN6p-CIJZlZ4H.js} +33 -33
  117. package/dist/assets/{NotificationsListConfig-BHt9OVz6-BKDTXb1o.js → NotificationsListConfig-lOoxcslt-BhnQjQWG.js} +1 -1
  118. package/dist/assets/NotificationsPage-CTHg82VM-CwBM4vUS.js +685 -0
  119. package/dist/assets/{OpExByVendorPage-D-0--y-d-DMlLcW9P.js → OpExByVendorPage-CXmqL8sH-BK8_o8ls.js} +5 -5
  120. package/dist/assets/{OverlayContainerPage-D4QU0p4o-E92SHML4.js → OverlayContainerPage-D4QU0p4o-CSiWE48U.js} +1 -1
  121. package/dist/assets/{PandLWithForecastPage-BgBplnz_-ChEt9BF6.js → PandLWithForecastPage-DbZpKElK-Dy4zdedl.js} +11 -11
  122. package/dist/assets/{PaymentAccountSetupBillingAddressSection-C6JM3mQz-CgsGFkzx.js → PaymentAccountSetupBillingAddressSection-CJRhGAtG-D2ukn4NZ.js} +6 -6
  123. package/dist/assets/{PeoplePage-1Aa0j1Br-D63RAfrN.js → PeoplePage-CJri4xlX-CEfPFRxE.js} +15 -15
  124. package/dist/assets/{Preview-CfPlLM4U.js → Preview-0sAWcABs.js} +1 -1
  125. package/dist/assets/{ProductsCarousel-BR9igDN--4qcjyVm7.js → ProductsCarousel-DtmKoNz3-BSbpVJVt.js} +2 -2
  126. package/dist/assets/{PromoBaseCards-B-dCLfsi-omMrAFa4.js → PromoBaseCards-g6j_z80f-C2Bai70y.js} +3 -3
  127. package/dist/assets/{QBOConnectionDialog-Dc2r7Qhk-9XcCUrWN.js → QBOConnectionDialog-BwKmOICb-D3Jo-Vlf.js} +4 -4
  128. package/dist/assets/{QBOSetupSection-Bhvg13n4-BS4MZWmI.js → QBOSetupSection-BN8o3dwu-DHQTxOlT.js} +12 -12
  129. package/dist/assets/ReimbursementApprovalRuleDetailPage-C5s_8IJ8-CPJIVNh1.js +32 -0
  130. package/dist/assets/{ReimbursementApprovalRulesPage-BtaFR_-R-DT_IS0Mc.js → ReimbursementApprovalRulesPage-BvvOob8U-DEiVU8X7.js} +2 -2
  131. package/dist/assets/ReimbursementDetailPage-BVFGrEhN-B7_bgdSj.js +314 -0
  132. package/dist/assets/ReimbursementPromoPage-dsgbajZ6-CWCF7N7b.js +84 -0
  133. package/dist/assets/{ReimbursementSetUpPage-CesV38Tv-CAsx1rGC.js → ReimbursementSetUpPage-0AMBarqS-CiwiIoY4.js} +9 -9
  134. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-BuK15ipi-jsvxMTC-.js → ReimbursementsBulkReviewDrawerPage-L0YmO2qY-DQjnniUJ.js} +1 -1
  135. package/dist/assets/{ReloadCard-DCA58Z6d-lxJyT6Aq.js → ReloadCard-Dketoj2r-tAJXPFMi.js} +2 -2
  136. package/dist/assets/{ReportTableViewSelector-Bcxl71KP-GS5y6Ng3.js → ReportTableViewSelector-DmDzw4yW-D1HeX13c.js} +5 -5
  137. package/dist/assets/{ReportsPage-DrxIUX8S-BX-Ugn1O.js → ReportsPage-DPrhnmvb-D0g4apvT.js} +6 -6
  138. package/dist/assets/{RevenueChart-BIWVGs6F-HTYxOFNe.js → RevenueChart-CDrGsGOU-CIlC5CYF.js} +8 -8
  139. package/dist/assets/{ReviewDetailsPage-C3dqUSg--Cpk2HBlF.js → ReviewDetailsPage-DjbAwLAN-B0q2mTzL.js} +18 -18
  140. package/dist/assets/{ReviewOverlay-Cag-4B4Y-D1ezdBpL.js → ReviewOverlay-Ws6-5o0Z-DJX77Zrm.js} +9 -9
  141. package/dist/assets/RoleWithToolTip-vxNCa6FT-LxVETf1F.js +22 -0
  142. package/dist/assets/{ScheduleDetailsFixedAssetsPage-ikCFA0w0-2eZV-mSh.js → ScheduleDetailsFixedAssetsPage-B2Y0ri0_-D9zabCxc.js} +4 -4
  143. package/dist/assets/{ScheduleDetailsPage-DzYUkz8B-BASiQOiG.js → ScheduleDetailsPage-D4fdm16B-KuG3aRA0.js} +3 -3
  144. package/dist/assets/{ScheduleSequenceTable-Cg5WKyIj-CgT_tp3-.js → ScheduleSequenceTable-BuOwBQPa-idhR1Z_Q.js} +16 -16
  145. package/dist/assets/{ScreenRoutes-BA3Mh7pl.js → ScreenRoutes-BIVA2nRG.js} +1 -1
  146. package/dist/assets/{SetUpAccountSection-CczJQz98-BSMGTELr.js → SetUpAccountSection-DJz8iGRu-BIE7oU3u.js} +9 -9
  147. package/dist/assets/{SignIn-IIuCvpoR-11uX7W5f.js → SignIn-BltllFmN-lRCl2w8R.js} +15 -15
  148. package/dist/assets/{SignInScreen-2miLFysH.js → SignInScreen-CvDooCt5.js} +1 -1
  149. package/dist/assets/SpendManagementListViewPage-BQwyNWPt-CFFiSy1U.js +134 -0
  150. package/dist/assets/{SpendManagementPerTabPage-D3DxhXvr-B6sZ7QiP.js → SpendManagementPerTabPage-CkH_5fl0-DiDtAytK.js} +39 -39
  151. package/dist/assets/{SpendManagementSection-DSN3bvLE-BkMacKAC.js → SpendManagementSection-BhbK0q1x-DEzibqGa.js} +15 -15
  152. package/dist/assets/StatementItem-D8E_FAe4-BYv882Fo.js +31 -0
  153. package/dist/assets/StatementsPage-Wiw8T04d-DTKPWrtc.js +58 -0
  154. package/dist/assets/{StatusSwitcher-C35eTt_u-VQn5S24k.js → StatusSwitcher-DPs1Vq5X-D6dENE_K.js} +2 -2
  155. package/dist/assets/{SubTabSwitcher-B8hXbnSB-cmYgrs9Q.js → SubTabSwitcher-BvqpLoBx-n7blk4-b.js} +2 -2
  156. package/dist/assets/{SummaryCard-dhNbqi0b-YwOnQ2xO.js → SummaryCard-CYZZ0q6A-Bue0ya2z.js} +1 -1
  157. package/dist/assets/{TaskManagementPage-QHzSJ5AM-Dhc53xoT.js → TaskManagementPage-lc9Mw2Sm-CSBSTCNw.js} +34 -34
  158. package/dist/assets/{TimeRangeSwitcher-By1NizbD-D56RmIGq.js → TimeRangeSwitcher-Dm0lFXOD-CN2hUUX6.js} +11 -11
  159. package/dist/assets/{TimeframeSwitcher-CnIziozQ-1cQ19qL3.js → TimeframeSwitcher-CFrCNOFC-CCLnJVYT.js} +6 -6
  160. package/dist/assets/{TimeframeSwitcherWithToggle-BxwsH8cn-DW9lfWz3.js → TimeframeSwitcherWithToggle-Cu0mWh8Z-Dnw607ZH.js} +1 -1
  161. package/dist/assets/{TopExCard-BXYnSJ_3-BrLh6FBV.js → TopExCard-IMbcUkNt-D4ymrCrP.js} +6 -6
  162. package/dist/assets/{TopExDetailPage-C9pGvGMt-BM8au-2T.js → TopExDetailPage-IEJSc_e7-BtOs5ZNd.js} +8 -8
  163. package/dist/assets/TransactionActivityLogPage-CztxkZSm-8f7Qpuaa.js +195 -0
  164. package/dist/assets/{TransactionDetailPage-CZQnRzsm-DgcUcv00.js → TransactionDetailPage-C5khWZWO-BeDT0w8u.js} +20 -20
  165. package/dist/assets/{TransactionList-Bdf5Bgsu-BJckNy4D.js → TransactionList-BH11aGhG-4R_e7lBY.js} +15 -15
  166. package/dist/assets/{TransactionListBig-DcbkwmaY-lPbTtFsv.js → TransactionListBig-CdJV8TeD-DMYaee9L.js} +11 -11
  167. package/dist/assets/TransactionListPage-CjzTPYr7-BDdk1Iba.js +35 -0
  168. package/dist/assets/{TransactionVendorDetailPage-B-FwW8my-CWEbgotx.js → TransactionVendorDetailPage-Dv7hRa0N-BwsLBxd1.js} +4 -4
  169. package/dist/assets/{TransferDrawerPage-DqxZzNHb-JyC0LuW4.js → TransferDrawerPage-r48o2lxO-CN66Pp8k.js} +40 -40
  170. package/dist/assets/{TreasuryOverviewPage-BFDU5aeU-CkjRA3dQ.js → TreasuryOverviewPage-DKCxYrPQ-HyhZNbuE.js} +32 -32
  171. package/dist/assets/{TreasuryPromoPage-HD1G38a1-ZbC8VXaw.js → TreasuryPromoPage-CNpZ_SIL-DNBqegZ8.js} +21 -21
  172. package/dist/assets/TreasuryStatementsPage-DKRIOtY3-DpdYXRvQ.js +58 -0
  173. package/dist/assets/TreasuryTaxLetterPage-Bwg7y3DU-CPkWwrCH.js +58 -0
  174. package/dist/assets/{TrendChart-DVlTUYry-BQhZ0XSE.js → TrendChart-C1hhS0ef-CM_jfK9c.js} +3 -3
  175. package/dist/assets/{TrendWithTransactions-DXYNZfvE-CEOC8UFU.js → TrendWithTransactions-CbJdyyGK-8bD7HA0C.js} +4 -4
  176. package/dist/assets/{UncategorizedAccountsMappingPage-BgQsB5_3-COI438r2.js → UncategorizedAccountsMappingPage-BTAJNCzF-IB-Tcf9I.js} +30 -30
  177. package/dist/assets/{UnitIntegrationPage-Dm62VB7y-B0M_A7fc.js → UnitIntegrationPage-B7xYyx0u-Dfb-qM03.js} +10 -10
  178. package/dist/assets/{UploadAdditionalDocumentOverlay-DG7NwQOq-PHFjEw3H.js → UploadAdditionalDocumentOverlay-BxSUijP--B8mSbR2d.js} +1 -1
  179. package/dist/assets/Vendor2FAPopup-Ctn_yjc8-D0FF2AtH.js +1 -0
  180. package/dist/assets/VendorACHDetailsPage-Bvj35jGs-H5j6K7x_.js +1 -0
  181. package/dist/assets/{VendorDetailPage-B8qtHlez-CDeCcma-.js → VendorDetailPage-CTbWD0xL-DOodc43o.js} +87 -87
  182. package/dist/assets/VendorDomesticWireDetailsPage-YMt9zC7E-4y578jYA.js +1 -0
  183. package/dist/assets/{VendorFiling1099EditablePage-B5GzsaIt-CrkaSKWH.js → VendorFiling1099EditablePage-CC17aZpp-CUEXtxxF.js} +32 -32
  184. package/dist/assets/{VendorFirstReviewPage-B1c74yx7-XWeMR4A4.js → VendorFirstReviewPage-C2Rj4ujS-D3XLk6SM.js} +30 -30
  185. package/dist/assets/{VendorInternationalWireDetailsPage-DPucgS6n-BUwm5cf5.js → VendorInternationalWireDetailsPage-CXgBfF0b-AFVguI8X.js} +7 -7
  186. package/dist/assets/VendorInternationalWireSwiftDetailsPage-CPdA16m4-BUiNKc-B.js +1 -0
  187. package/dist/assets/{VendorsAccountsSection-BBnG4jo9-CE1HsZr7.js → VendorsAccountsSection-CKKsK4iR-Brg3gtnO.js} +4 -4
  188. package/dist/assets/{VerifyDevice-CFPLWsQ9-CqtmGFWn.js → VerifyDevice-Ds1Nxr5P-Blm9OKwi.js} +1 -1
  189. package/dist/assets/{VideoPlayer-C0Oxc4vz-Eo76fnas.js → VideoPlayer-Ba8AW1R7-i9G7JJm5.js} +2 -2
  190. package/dist/assets/VideoPopup-CXIa9PAJ-BZihnaAR.js +31 -0
  191. package/dist/assets/{WarningsDrawerPage-D1_kAgnS-wVv9eNUW.js → WarningsDrawerPage-h7qsrtcB-CE6gyvKk.js} +7 -7
  192. package/dist/assets/{ZeniAccountDetailPage-CvuREnNX-Daaz-pOC.js → ZeniAccountDetailPage-aNllmjZp-DFLxBj0c.js} +32 -32
  193. package/dist/assets/{ZeniAccountListViewPage-Cl0LGnEs-BnEYM2Fk.js → ZeniAccountListViewPage-DrKQ2DXb-CJJJ25qT.js} +8 -8
  194. package/dist/assets/ZeniAccountNavBarPieces-BTP0V662-nTGXbCtY.js +14 -0
  195. package/dist/assets/{ZeniAccountPromoPage-CfqyTao--CSmJBLGG.js → ZeniAccountPromoPage-CPL4y-FS-Bjur8xmF.js} +13 -13
  196. package/dist/assets/{ZeniAccountSetupPage-DjhaRuBW-C5pmnKvn.js → ZeniAccountSetupPage-DvlPktUp-B-E9YzwR.js} +2 -2
  197. package/dist/assets/ZeniCopyright-D37-X5FF-Ak7n7OYz.js +1 -0
  198. package/dist/assets/{ZeniTransferAmountSlider-DFm-2Ivu-CQbjc7rM.js → ZeniTransferAmountSlider-CeTiIm-1-DS6r50pT.js} +4 -4
  199. package/dist/assets/{add-to-wallet-DgdBD8_G-BuLXwUxS.js → add-to-wallet-DgdBD8_G-D62DvooK.js} +1 -1
  200. package/dist/assets/{analytics-EOspDoDF.js → analytics-BFqwqBQR.js} +1 -1
  201. package/dist/assets/{analyticsHelper-CkgaDWOW-BtJI0iQX.js → analyticsHelper-Cp5G9I3a-BIC4toJ-.js} +1 -1
  202. package/dist/assets/analyticsHelper-H7OiEB4T.js +1 -0
  203. package/dist/assets/{arrow-south-east-round-PEovUgvH-7wUMcNgq.js → arrow-south-east-round-PEovUgvH-eGvQIcmx.js} +1 -1
  204. package/dist/assets/{auto-transfer-rule-mbafm5D3-B7tSfwo7.js → auto-transfer-rule-mbafm5D3-CeHKVWmh.js} +1 -1
  205. package/dist/assets/{chartTypes-nF8PeaWk-DylRW2Nq.js → chartTypes-_pdOsLu--D8_z5gfz.js} +1 -1
  206. package/dist/assets/{commonDimensions-bWLlVfVq-DDxX-akL.js → commonDimensions-IxmmCJgv-CC5c3dON.js} +1 -1
  207. package/dist/assets/{commonTypes-BKD3o785-ClwG0TM4.js → commonTypes-uWTOHqLG-CINOYJ5U.js} +1 -1
  208. package/dist/assets/{constants-3kjNigIZ.js → constants-DMGg36fI.js} +1 -1
  209. package/dist/assets/{core-CslRcwFE.js → core-BFf3IFj6.js} +1 -1
  210. package/dist/assets/{dash.all.min-Dkp1U18T.js → dash.all.min-BxMd-9-a.js} +1 -1
  211. package/dist/assets/{detailCommon-l7_k1kQ_-CFeAwn6Q.js → detailCommon-1sO_byJf-CD-uyZzV.js} +4 -4
  212. package/dist/assets/downloadPdf-CjXuMwyY-Bk0Q_jtO.js +1 -0
  213. package/dist/assets/{empty-Du-vmzTn.js → empty-CTFehcxZ.js} +1 -1
  214. package/dist/assets/{empty-BhaTlh_E.js → empty-DQRlSI-P.js} +1 -1
  215. package/dist/assets/{epic-CZdj8-B-.js → epic-DvQ68MZ-.js} +1 -1
  216. package/dist/assets/{gift-box-Cmt9OgIZ-Dv3d3rOw.js → gift-box-Cmt9OgIZ-CjL00gTh.js} +1 -1
  217. package/dist/assets/{graphic-no-data-l-DU4J8fDt-CLHrfBy6.js → graphic-no-data-l-DU4J8fDt-CeLdXVsI.js} +1 -1
  218. package/dist/assets/{graphic-no-data-net-burn-l-CzmycA0m-CMlLtriY.js → graphic-no-data-net-burn-l-CzmycA0m-CxW_HqWH.js} +1 -1
  219. package/dist/assets/{handshake-BPg58FML-COd6iQaS.js → handshake-BPg58FML-DLoQUg7m.js} +1 -1
  220. package/dist/assets/{helper-qck89ZgJ-CZUGaHU3.js → helper-4lObJrt8-BUT-pULe.js} +3 -3
  221. package/dist/assets/{index-CwPcEaIJ.js → index-BuGq2Xwa.js} +1 -1
  222. package/dist/assets/{index-Dc5vYs7y.js → index-Cx7SEn1j.js} +1 -1
  223. package/dist/assets/{index-B7eWgQzZ.js → index-DGGt5RDJ.js} +4300 -4300
  224. package/dist/assets/{index-Cn_IOdHd.js → index-DdP-wJle.js} +1 -1
  225. package/dist/assets/{index-3P-FToEr.js → index-Dl4R1vcE.js} +1 -1
  226. package/dist/assets/{index-Dk4hNwSR.js → index-IoURZoOk.js} +1 -1
  227. package/dist/assets/{index-Dde-TLpy.js → index-NMwrUQfi.js} +1 -1
  228. package/dist/assets/{lexical-DEAOqFKR.js → lexical-BeXs36Y0.js} +1 -1
  229. package/dist/assets/{liveblocks-DyVXfa5b.js → liveblocks-Dda0tF-O.js} +1 -1
  230. package/dist/assets/{lottie-DR7Z1uj_.js → lottie-mwve--vc.js} +1 -1
  231. package/dist/assets/{mapLoadingInProgressToTreeNode-hU4SXSz1-Celvdjmv.js → mapLoadingInProgressToTreeNode-CwSavpEU-Cl_FZFwU.js} +1 -1
  232. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-Mybge2KM-DnyF2DOT.js → mapSectionWithAcOnlyToTreeNode-DfN5c3SA-D4hGCNmF.js} +1 -1
  233. package/dist/assets/mapSpacerToTreeNode-D8gbhEl5-D4qIggfl.js +1 -0
  234. package/dist/assets/mapTimeframeBalancesToTreeNode-DSlFj-Ph-Btw1CFJ1.js +1 -0
  235. package/dist/assets/mapTimeframeBalancesToTreeNode-Dj4jp8jG-B4t0Wux0.js +1 -0
  236. package/dist/assets/mapTimeframeHeaderLoadingInProgressToTreeNode-DpTpTHX9-DdHAM1Kp.js +1 -0
  237. package/dist/assets/{mui-Ba0_ROTv.js → mui-BXc79n0P.js} +1 -1
  238. package/dist/assets/{page-detail-CWX5S47F-DcKx2ySJ.js → page-detail-CWX5S47F-j_J3TTSv.js} +1 -1
  239. package/dist/assets/{panelSelectedMixin-Cddsb26L-Cg3Z-QbC.js → panelSelectedMixin-Cddsb26L-D4G_zfkD.js} +1 -1
  240. package/dist/assets/{radio-default-CiSgisfh-CGqLZKGc.js → radio-default-CiSgisfh-BDH4uibz.js} +1 -1
  241. package/dist/assets/{react-CBKzjJ-k.js → react--w8eXOQH.js} +1 -1
  242. package/dist/assets/{react-Doh-xpgh.js → react-0aRrmHfg.js} +2 -2
  243. package/dist/assets/{react-BQMyjhDt.js → react-BkfBvvdQ.js} +1 -1
  244. package/dist/assets/{react-XEytoW-G.js → react-CQhG37C_.js} +1 -1
  245. package/dist/assets/{react-2aHb0_lL.js → react-CQvtbK9z.js} +1 -1
  246. package/dist/assets/{react-DqjXj4cD.js → react-CpogsNWB.js} +1 -1
  247. package/dist/assets/{react-DuH1J8DT.js → react-DNVJuix6.js} +1 -1
  248. package/dist/assets/{react-biMmKurS.js → react-x9AsEyp-.js} +1 -1
  249. package/dist/assets/{recharts-Dpk71F6G.js → recharts-vbuE4Jum.js} +1 -1
  250. package/dist/assets/{sentry-BUYEiWD8.js → sentry-C7LQiKF9.js} +1 -1
  251. package/dist/assets/{shield-DOlUxcFf-C7zSLUUK.js → shield-DOlUxcFf-B-RZDoQM.js} +1 -1
  252. package/dist/assets/toCOABalancesWithID-DuwOfE1o-DwSLIzEK.js +1 -0
  253. package/dist/assets/{toChartData-CMvkvks2-CeV5Sw8J.js → toChartData-Cqj00uWV-Bpiruaq9.js} +1 -1
  254. package/dist/assets/{upload-reimbursement-receipt-O2N8vcO7-BCgskbSS.js → upload-reimbursement-receipt-O2N8vcO7-C4eeJM6-.js} +1 -1
  255. package/dist/assets/{uploadAttachment-XRvvKLjd-8kORPRMD.js → uploadAttachment-CpuXaDZF-Bu3r96Oj.js} +25 -25
  256. package/dist/assets/{uploadReceipts-Dge0cNF1-B4zZrtGY.js → uploadReceipts-Dge0cNF1-BighYweo.js} +1 -1
  257. package/dist/assets/{url-4GiLad5k.js → url-CvO2wIrp.js} +1 -1
  258. package/dist/assets/{url-_mFxzRvZ.js → url-SWb9fmsI.js} +1 -1
  259. package/dist/assets/{useLongPress-GCK2COYQ--IIT5mp7.js → useLongPress-GCK2COYQ-BHUpmaFu.js} +1 -1
  260. package/dist/assets/{usp-line-BBd1wKwW-wx2xXzy4.js → usp-line-BBd1wKwW-BBQ-QruK.js} +1 -1
  261. package/dist/assets/{utils-van4hLXd.js → utils-CW6UW7VZ.js} +1 -1
  262. package/dist/assets/{zeni-epic-state-DsDV18R1.js → zeni-epic-state-Cvu6NpVe.js} +3 -3
  263. package/dist/index.html +1 -1
  264. package/package.json +2 -2
  265. package/dist/assets/ACHDetailsPage-C0EF1bfJ-CF4B57fP.js +0 -21
  266. package/dist/assets/AccountInfoPage-1bkRMUmz-Cuxh0N0w.js +0 -18
  267. package/dist/assets/AccountLockedInfoModal-iHHAglx1-Db8qIiY0.js +0 -59
  268. package/dist/assets/AddAddressForCardDrawer-DQButqpE-4KIKQO78.js +0 -6
  269. package/dist/assets/ApAgingDetailPage-DFMl8Pg4-C_Is_Pfz.js +0 -46
  270. package/dist/assets/BillDetailPage-Cv84AWBP-D-5X1cLh.js +0 -266
  271. package/dist/assets/BillPayPromoPage-BJNiSeAB-dddJyTrd.js +0 -84
  272. package/dist/assets/BillingSettingsPage-B5p8_TqZ-D-ll1i0A.js +0 -44
  273. package/dist/assets/BillsBulkReviewDrawerPage-CLUs3-Ci-DFJkbhvF.js +0 -1
  274. package/dist/assets/ConfettiBurst-BfLV2hbY-D9OCgSrI.js +0 -1
  275. package/dist/assets/CustomerOnboardingContainerPage-BR0RXw9o-YOK_yGHP.js +0 -1
  276. package/dist/assets/EditPeoplePage-CZUXKv1r-BxGbjp33.js +0 -55
  277. package/dist/assets/EntityDetailPage-ZAt7wUEc-CU2oKDLU.js +0 -18
  278. package/dist/assets/InternationalWireVerificationPage-BLvplUfw-KKAbBfix.js +0 -65
  279. package/dist/assets/InvitePeoplePage-Chxh0Lmw-BWF47a5q.js +0 -12
  280. package/dist/assets/LabeledAddressValueField-C5tlrpM8-CZs-qPnX.js +0 -45
  281. package/dist/assets/LabeledDocumentField-BowgfWLJ-Dfvs4pho.js +0 -41
  282. package/dist/assets/LabeledText-DglukuaI-CmIe9nSK.js +0 -42
  283. package/dist/assets/LinkJETransactionPage-Cnu97MMF-4_5-q4C9.js +0 -98
  284. package/dist/assets/LowBalancePopup-Drqtx1Yk-9ef3MPri.js +0 -34
  285. package/dist/assets/MagicLinkACHDetailsPage-B-H4pN-W-BJk44VGL.js +0 -1
  286. package/dist/assets/MagicLinkDomesticWireDetailsPage-DBhFe2sn-ByO14CoO.js +0 -1
  287. package/dist/assets/MagicLinkInternationalWireDetailsPage-De3w5uAd-DWgjVULc.js +0 -1
  288. package/dist/assets/MailingDetailsSection-CU0Ur-9k-CV18nP7Y.js +0 -21
  289. package/dist/assets/MyPendingActivationChargeCardListPage-8fIM-AgM-DG0F21hf.js +0 -6
  290. package/dist/assets/NotificationsPage-BL6QkhxJ-Bq__lIXi.js +0 -685
  291. package/dist/assets/ReimbursementApprovalRuleDetailPage-DeGZp7he-DwflEFkV.js +0 -32
  292. package/dist/assets/ReimbursementDetailPage-ChDG7NAL-BwV9bPZE.js +0 -314
  293. package/dist/assets/ReimbursementPromoPage-Dgx0IYTF-BfINKSQz.js +0 -84
  294. package/dist/assets/RoleWithToolTip-C8aesF3T-apurffxZ.js +0 -22
  295. package/dist/assets/SpendManagementListViewPage-DQ9FW-pv-8sW-YX2v.js +0 -134
  296. package/dist/assets/StatementItem-CfLQ3EiB-BhKoq1Lu.js +0 -31
  297. package/dist/assets/StatementsPage-DdVszHkC-UTOiPZ-s.js +0 -58
  298. package/dist/assets/TransactionActivityLogPage-C4Zf-YKV-CyrgE9Vm.js +0 -195
  299. package/dist/assets/TransactionListPage-CS_TY41O-BS7_HocG.js +0 -35
  300. package/dist/assets/TreasuryStatementsPage-DVN2bxrt-Csr4Fp1P.js +0 -58
  301. package/dist/assets/TreasuryTaxLetterPage-O5HN57r7-Crb8QwQ9.js +0 -58
  302. package/dist/assets/Vendor2FAPopup-CxJFovCF-BTqgr2_z.js +0 -1
  303. package/dist/assets/VendorACHDetailsPage-IvgUMfd9-Dm3RoaNk.js +0 -1
  304. package/dist/assets/VendorDomesticWireDetailsPage-BbLz5_FD--3MjmjN3.js +0 -1
  305. package/dist/assets/VendorInternationalWireSwiftDetailsPage-CmeSQAri-TKMDFSzF.js +0 -1
  306. package/dist/assets/VideoPopup-BmdpW83j-DczpaZjD.js +0 -31
  307. package/dist/assets/ZeniAccountNavBarPieces-MEaXWOb7-DLC0tAjr.js +0 -14
  308. package/dist/assets/ZeniCopyright-nggh1t2z-BlAlTJNf.js +0 -1
  309. package/dist/assets/analyticsHelper-BQyqY8AC.js +0 -1
  310. package/dist/assets/downloadPdf-DaZCmoYn-D7YxsQSi.js +0 -1
  311. package/dist/assets/mapSpacerToTreeNode-DlewsTfs-Uz_UzZbZ.js +0 -1
  312. package/dist/assets/mapTimeframeBalancesToTreeNode-9dkd_G4A-xyFi9Xru.js +0 -1
  313. package/dist/assets/mapTimeframeBalancesToTreeNode-DE8rPH2X-BbYTtpG2.js +0 -1
  314. package/dist/assets/mapTimeframeHeaderLoadingInProgressToTreeNode-BLkTfnct-DgmTQXuW.js +0 -1
  315. package/dist/assets/toCOABalancesWithID-BfQTo56G-BvXiHVaB.js +0 -1
@@ -1,4 +1,4 @@
1
- import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as Ge,aT as nr,u as f,F as me,ak as ot,an as Re,ct as Bl,ac as B,x as Q,y as Tt,bE as Vl,ia as Nl,aQ as nt,bV as xe,dl as zi,es as Ul,bx as Hl,p as he,au as Wl,eJ as Qt,T as Kn,dT as Ze,b5 as Jn,dr as ir,bt as ql,gb as Kl,i8 as Jl,h2 as Ql,gW as or,by as Gl,bR as it,b9 as Qn,bM as sr,kn as Yl,ao as Ye,c6 as Zl,d as ar,bb as rr,as as Vo,aa as xn,bQ as No,ae as fn,ko as Xl,kp as ec,kq as tc,kr as Vn,ks as lr,kt as cr,ku as nc,kv as hs,kw as ic,gp as dr,dp as ur,kx as oc,ky as sc,kz as ac,kA as rc,kB as lc,kC as cc,kD as dc,kE as uc,kF as hc,kG as pc,kH as hr,kI as mc,kJ as gc,kK as xc,kL as fc,gE as Uo,cf as Gn,cw as Pi,D as pr,I as mr,cI as Yn,dX as Ho,a as Wo,go as yc,bq as wc,cm as Cc,c4 as bc,c1 as Zn,gH as ps,iQ as ms,aq as $t,dm as Xn,d4 as Jt,iD as qe,cp as ei,cC as ti,cF as ni,kM as vc,w as yt,ik as gr,fF as Sc,aG as xr,kN as kc,aX as qo,aS as gs,gY as fr,kO as jc,kP as $c,kQ as Ic,bH as yr,aV as Tc,gM as Kt,h_ as Hi,eG as $i,cM as Ko,aA as Lc,eH as wr,gz as Ac,fU as Rc,h5 as Cr,m as Ec,kR as Dc,a_ as Jo,jP as Mc,jQ as Oc,dS as br,kS as vr,iW as zc,hN as Pc,gF as Ii,jl as xs,kT as Fc,a$ as _c,dv as Sr,r as Wn,iu as kr,iE as Ro,kU as Tn,ei as jr,ek as $r,iZ as Eo,i_ as Ir,d1 as Tr,kV as Bc,d2 as Fi,iv as Lr,ft as Ar,kW as Vc,ex as Wi,aM as Do,kX as Nc,cR as Uc,iL as Hc,dV as Wc,kY as qc,kZ as Kc,b3 as qi,et as Jc,fO as Qc,k_ as Gc,dR as Yc,hC as Zc,a9 as Xc,eu as ed,ev as td,ew as nd,ez as fs,eA as ys,eB as id,k$ as od,b1 as sd,eL as ad,eM as rd,eN as ld}from"./index-B7eWgQzZ.js";import{a as s,P as cd}from"./sentry-BUYEiWD8.js";import{n as o,c as le,k as _i}from"./mui-Ba0_ROTv.js";import{bh as Ki,kM as dd,H9 as ws,Ha as qn,Hb as ud,Hc as hd,cx as pd,bL as Di,cy as md,c4 as Qo,Hd as gd,Fy as Cs,cz as xd,cA as fd,lR as Nn,bE as ln,He as bs,Hf as yd,bY as Rr,bo as cn,Hg as wd,Hh as Er,Hi as Dr,Hj as Mr,Hk as Or,Hl as zr,Hm as Go,lj as Cd}from"./zeni-epic-state-DsDV18R1.js";import{t as Yo}from"./panelSelectedMixin-Cddsb26L-Cg3Z-QbC.js";import{h as Pr,I as Fr,n as Ln,R as Ot}from"./CollapsableReportTable-CRZijlLw-DrP1MH6t.js";import{D as Ji}from"./AccountRow-H8lG1wjG-BENCFocK.js";import{o as _r}from"./mapTimeframeBalancesToTreeNode-DE8rPH2X-BbYTtpG2.js";import{d as vs}from"./mapLoadingInProgressToTreeNode-hU4SXSz1-Celvdjmv.js";import{h as bd}from"./VendorsAccountsSection-BBnG4jo9-CE1HsZr7.js";import{u as vd,c as Ss,d as Sd,m as kd}from"./uploadAttachment-XRvvKLjd-8kORPRMD.js";import{r as Mi}from"./core-CslRcwFE.js";import{t as jd}from"./upload-reimbursement-receipt-O2N8vcO7-BCgskbSS.js";import"./liveblocks-DyVXfa5b.js";import"./recharts-Dpk71F6G.js";import"./lottie-DR7Z1uj_.js";import"./analytics-EOspDoDF.js";import"./lexical-DEAOqFKR.js";import"./utils-van4hLXd.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="2b1ad6dd-3fec-40e5-9ce4-d0208489d9f3",e._sentryDebugIdIdentifier="sentry-dbid-2b1ad6dd-3fec-40e5-9ce4-d0208489d9f3")}catch{}})();const{common:{navBar:{back:$d},texts:{refresh:Id,close:Td,copy:Ld,copied:Ad,open:Rd}},expenseAutomation:{common:{numbers:{maximumCount:Ed}}}}=me.getLocalizedStrings(),Dd=o(Ac)`
1
+ import{o as n,bX as Pl,J as be,gn as er,go as tr,V as t,cs as Fl,bD as _l,ab as Ge,aT as nr,u as f,b as me,ak as ot,an as Re,ct as Bl,ac as B,x as Q,y as Tt,bE as Vl,ic as Nl,aQ as nt,bV as xe,dl as zi,es as Ul,bx as Wl,p as he,au as Hl,eJ as Qt,L as Kn,dT as Ze,b5 as Jn,dr as ir,bt as ql,gb as Kl,ia as Jl,h3 as Ql,gX as or,by as Gl,bR as it,b9 as Qn,bM as sr,kp as Yl,ao as Ye,c6 as Zl,h as ar,bb as rr,as as Vo,aa as xn,bQ as No,ae as fn,kq as Xl,kr as ec,ks as tc,kt as Vn,ku as lr,kv as cr,kw as nc,kx as hs,ky as ic,gq as dr,dp as ur,kz as oc,kA as sc,kB as ac,kC as rc,kD as lc,kE as cc,kF as dc,kG as uc,kH as hc,kI as pc,kJ as hr,kK as mc,kL as gc,kM as xc,kN as fc,gF as Uo,cf as Gn,cw as Pi,P as pr,r as mr,cI as Yn,dX as Wo,d as Ho,kO as yc,bq as wc,cm as Cc,c4 as bc,c1 as Zn,gI as ps,iS as ms,aq as $t,dm as Xn,d4 as Jt,iF as qe,cp as ei,cC as ti,cF as ni,kP as vc,w as yt,im as gr,fF as Sc,aG as xr,kQ as kc,aX as qo,aS as gs,gZ as fr,kR as jc,kS as $c,kT as Ic,bH as yr,aV as Tc,gN as Kt,i0 as Wi,eG as $i,cM as Ko,aA as Lc,eH as wr,gA as Ac,fU as Rc,h7 as Cr,g as Ec,kU as Dc,a_ as Jo,jR as Mc,jS as Oc,dS as br,kV as vr,iY as zc,hP as Pc,gG as Ii,jn as xs,kW as Fc,a$ as _c,dv as Sr,a as Hn,iw as kr,iG as Ro,kX as Tn,ei as jr,ek as $r,i$ as Eo,j0 as Ir,d1 as Tr,kY as Bc,d2 as Fi,ix as Lr,ft as Ar,kZ as Vc,ex as Hi,aM as Do,k_ as Nc,cR as Uc,iN as Wc,dV as Hc,k$ as qc,l0 as Kc,b3 as qi,et as Jc,fO as Qc,l1 as Gc,dR as Yc,hE as Zc,a9 as Xc,eu as ed,ev as td,ew as nd,ez as fs,eA as ys,eB as id,l2 as od,b1 as sd,eL as ad,eM as rd,eN as ld}from"./index-DGGt5RDJ.js";import{a as s,P as cd}from"./sentry-C7LQiKF9.js";import{n as o,c as le,k as _i}from"./mui-BXc79n0P.js";import{bh as Ki,kM as dd,H9 as ws,Ha as qn,Hb as ud,Hc as hd,cx as pd,bL as Di,cy as md,c4 as Qo,Hd as gd,Fy as Cs,cz as xd,cA as fd,lR as Nn,bE as ln,He as bs,Hf as yd,bV as Rr,bo as cn,Hg as wd,Hh as Er,Hi as Dr,Hj as Mr,Hk as Or,Hl as zr,Hm as Go,lj as Cd}from"./zeni-epic-state-Cvu6NpVe.js";import{t as Yo}from"./panelSelectedMixin-Cddsb26L-D4G_zfkD.js";import{h as Pr,I as Fr,n as Ln,R as Ot}from"./CollapsableReportTable-DQitA-HH-D-ytul6z.js";import{D as Ji}from"./AccountRow-sz0SNySJ-PMcRks2g.js";import{o as _r}from"./mapTimeframeBalancesToTreeNode-Dj4jp8jG-B4t0Wux0.js";import{d as vs}from"./mapLoadingInProgressToTreeNode-CwSavpEU-Cl_FZFwU.js";import{h as bd}from"./VendorsAccountsSection-CKKsK4iR-Brg3gtnO.js";import{u as vd,c as Ss,d as Sd,m as kd}from"./uploadAttachment-CpuXaDZF-Bu3r96Oj.js";import{r as Mi}from"./core-BFf3IFj6.js";import{t as jd}from"./upload-reimbursement-receipt-O2N8vcO7-C4eeJM6-.js";import"./liveblocks-Dda0tF-O.js";import"./recharts-vbuE4Jum.js";import"./lottie-mwve--vc.js";import"./analytics-BFqwqBQR.js";import"./lexical-BeXs36Y0.js";import"./utils-CW6UW7VZ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new e.Error().stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="c051b3ec-5ee8-4905-95f7-7584f8f74043",e._sentryDebugIdIdentifier="sentry-dbid-c051b3ec-5ee8-4905-95f7-7584f8f74043")}catch{}})();const{common:{navBar:{back:$d},texts:{refresh:Id,close:Td,copy:Ld,copied:Ad,open:Rd}},expenseAutomation:{common:{numbers:{maximumCount:Ed}}}}=me.getLocalizedStrings(),Dd=o(Ac)`
2
2
  display: flex;
3
3
  width: ${n.sp4};
4
4
  height: ${n.sp4};
@@ -53,7 +53,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
53
53
  height: ${n.sp3};
54
54
  margin-left: ${n.sp1};
55
55
  color: ${he.success};
56
- `,Bd=o(Wo)`
56
+ `,Bd=o(Ho)`
57
57
  cursor: pointer;
58
58
  width: ${n.sp4};
59
59
  height: ${n.sp4};
@@ -87,9 +87,9 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
87
87
  100% {
88
88
  transform: rotate(360deg);
89
89
  }
90
- `,Hd=o.div`
91
- width: 100%;
92
90
  `,Wd=o.div`
91
+ width: 100%;
92
+ `,Hd=o.div`
93
93
  padding-top: ${n.sp0};
94
94
  padding-bottom: ${n.sp0};
95
95
  `,js=o(Re)`
@@ -153,7 +153,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
153
153
  }
154
154
  text-decoration-color: ${e=>e.theme.colors.primary};
155
155
  }
156
- `,$s={subSectionContainerLeftRightPadding:new Q(f[3],f[6],f[8])},eu=({onAllThreadsClick:e,companyId:i,companyName:l})=>{const r={application:"cockpit",companyId:i,entityId:i,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:l,url:window.location.href},{url:u,...d}=r,a={...d},{threads:c,isLoading:h}=yc(a,!1,!1),m=c.filter(p=>p.id.includes(dr)===!1);return t.jsxs(Md,{isDisabled:h,onClick:e,"data-testid":B("comment-icon"),children:[t.jsx(wc,{count:m.length,isLoading:h}),t.jsx(Dd,{})]})},tu=({headerData:e,refreshStatus:i,searchText:l,companyName:r,companyId:u,isZeniUser:d,onAllThreadsClick:a,onClose:c,onRefresh:h,onSearchTextChanged:m})=>{const p=()=>{i!=="In-Progress"&&h()};return t.jsx(zd,{children:e.rightSection.map((g,x)=>{switch(g){case"search":return t.jsx(Jl,{isSearchOpen:(l.length??0)>0,searchPlaceHolder:e.searchPlaceholder,searchText:l,searchTextBoxStyle:{position:"initial",height:"fit-content"},styledSearchIconContainerStyle:{height:n.sp4},searchIconMarginRight:n.sp0,onSearchTextChanged:y=>{m(y)},downloadPresent:!1},x+g);case"refresh":return t.jsx(xe,{display:"block",placement:"bottom",title:Id,style:{marginTop:"2px"},enterDelay:600,children:t.jsx(Nd,{onClick:p,$spinning:i==="In-Progress","data-testid":B("refresh-icon")})},x+g);case"comment":return d===!1?null:t.jsx(eu,{companyId:u,companyName:r,onAllThreadsClick:a});case"close":default:return t.jsx(xe,{display:"block",placement:"bottom",title:Td,enterDelay:600,style:{marginTop:"2px"},children:t.jsx(Bd,{onClick:c,"data-testid":B("close-icon")})},x+g)}})})},nu=({headerData:e,onBack:i})=>t.jsx(Pd,{children:e.leftSection.map((l,r)=>{switch(l){case"back":default:return t.jsx(xe,{display:"block",placement:"bottom",title:$d,enterDelay:600,style:{marginTop:"-14px"},children:t.jsx(Vd,{onClick:i,"data-testid":B("back-button")})},r+l)}})}),Is=({text:e,linkText:i,windowSize:l,isCopied:r,onLinkClick:u})=>{if(i==null||!i)return t.jsxs(ui,{windowSize:l,children:[e," "]});const d=e.indexOf(i);if(d===-1)return t.jsxs(ui,{windowSize:l,children:[e," "]});const a=e.substring(0,d),c=e.substring(d+i.length);return t.jsxs(t.Fragment,{children:[a?t.jsxs(ui,{windowSize:l,children:[a.trim()," "]}):null,t.jsx(xe,{display:"flex",placement:"right",title:or.test(i)?r?Ad:Ld:Rd,enterTouchDelay:600,children:t.jsxs(Xd,{onClick:()=>u?.(i),"data-testid":B("pre-link"),children:[i,r?t.jsx(_d,{className:"success-icon"}):t.jsx(Fd,{className:"copy-icon"})]})}),c?t.jsxs(ui,{windowSize:l,children:[c," "]}):null]})},Ts=({subTitles:e})=>{const i=be(),[,l]=Ql(),[r,u]=s.useState(!1),d=s.useRef(null),a=s.useCallback(c=>{or.test(c)?(l(c),u(!0),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{u(!1)},2e3)):window.open(c,"_blank","noopener,noreferrer")},[l]);return s.useEffect(()=>()=>{d.current&&clearTimeout(d.current)},[]),t.jsx(Gd,{children:e.map((c,h)=>t.jsxs(Qd,{children:[c.pre?t.jsx(Is,{text:c.pre,linkText:c.preLink,windowSize:i,isCopied:r,onLinkClick:a}):null,c.prefixIconName?t.jsx(t.Fragment,{children:c.prefixIconName==="zeniAIIcon"?t.jsx(Yd,{}):t.jsx(t.Fragment,{})}):null,c.bold?t.jsx(t.Fragment,{children:t.jsxs(Zd,{windowSize:i,children:[c.bold," "]})}):null,c.post?t.jsx(Is,{text:c.post,linkText:c.postLink,windowSize:i,isCopied:r,onLinkClick:a}):null]},h+c.bold+c.pre+c.post))})};function iu(e){const{headerData:i,currentTab:l,completionStatus:r,onUpdateTab:u,selectedReconAccountId:d,getTabCountAndFetchState:a,reconcileDetailPageFetchState:c,forceShowSubtitle:h,currentSelectedView:m,currentMissingReceiptsTab:p,onMissingReceiptsTabUpdate:g,onReconTabUpdate:x,currentRecontab:y,navBarCustomElement:b,titleStyle:S={},hideEmptyDivBelowTabs:$=!1,belowTabsSlot:v}=e,T=a("autoCategorized")?.count??0,I=a("review")?.count??0,w=a("reconcile")?.count??0,k=i.tabs.length>0||i.subTitle.length>0,j=m==="transaction_categorization"&&l==="autoCategorized",C=m==="reconciliation"&&y==="review"&&d!=null,z=m==="reconciliation"&&y==="reconcile"&&d!=null,A=j?T>0:C?c==="In-Progress"?!0:I>0:z?c==="In-Progress"?!0:w>0:r!=="complete",R=Tt(),P=be();let V=[];i.tabs.length>0&&(V=i.tabs.map(D=>({label:D.label,id:D.id,countDetails:a(D.id)})));const q=i.tabs.some(D=>(m==="reconciliation"?D.id===y:m==="missing_receipts"?D.id===p:D.id===l)&&D.subTitle.length>0);return t.jsxs(Od,{children:[t.jsx(Vl,{title:i.title,subTitle:i.subText,titleTextStyles:{flex:"1 1 0px"},backgroundColor:R.colors.grey4,onBackClick:()=>null,titleStyle:S,ignoreScrollAction:m!=="month_end_insights",keepBackgroundOnScroll:m!=="month_end_insights",leftSideComponent:t.jsx(nu,{...e}),rightSideComponent:t.jsx(tu,{...e}),source:"NavBarWithHeader"}),b??null,t.jsx(Ge,{controller:k===!0,children:t.jsx(ks,{windowSize:P,children:i.tabs.length>0?t.jsxs(t.Fragment,{children:[t.jsx(Wd,{windowSize:P,children:t.jsx(Nl,{allTabs:V,selectedTab:m==="transaction_categorization"?l??V[0].id:m==="missing_receipts"?p??V[0].id:y??V[0].id,onTabChange:D=>{if(m==="transaction_categorization"){const M=ud(D.id);M!=null&&u(M)}else if(m==="reconciliation"){const M=hd(D.id);M!=null&&x(M)}else m==="missing_receipts"&&g?.(D.id)},maximumCountLimit:Ed})}),t.jsx(Kd,{windowSize:P}),$!==!0?t.jsx(Jd,{}):null,t.jsx(Ge,{controller:(A===!0||h===!0)&&q,children:t.jsx(js,{windowSize:P,children:i.tabs.map((D,M)=>(m==="reconciliation"?D.id===y:m==="missing_receipts"?D.id===p:D.id===l)?t.jsx(qd,{children:t.jsx(Ts,{subTitles:D.subTitle})},M+D.id):null)})})]}):t.jsx(Ge,{controller:A===!0||h===!0,children:t.jsx(js,{windowSize:P,children:t.jsx(Ts,{subTitles:i.subTitle})})})})}),v!=null?t.jsx(ks,{windowSize:P,children:t.jsx(Hd,{children:v})}):null]})}const ou=1;function su({name:e,checkBoxes:i,mode:l,isDisabled:r,style:u,labelStyle:d,labelCheckBoxStyle:a,checkBoxStyle:c,width:h,registerOptions:m,checkedIconColor:p,checkBoxIconStyle:g,checkBoxContainerStyle:x,draggable:y=!1,selectionLimit:b,infoIconContainerStyle:S,onDragStart:$,rowHeight:v=40,initialScrollOffSet:T,onScroll:I}){const w=be(),k=s.useRef(null),{control:j}=Ko(),C=i.find(P=>P.groupLabel),z=i.filter(P=>!P.groupLabel),A=[];for(const P of z)if(P.isException||A.push(P.value),b!=null&&A.length===b+1)break;const R=i.filter(P=>P.defaultChecked).map(P=>P.value);return t.jsx(wr,{control:j,name:e,rules:m,defaultValue:R,render:({field:{value:P,ref:V,onChange:q}})=>{const D=M=>{ru({event:M,value:P,allCheckBoxValues:A,groupLabelCheckBox:C,onChange:q})};return t.jsxs(lu,{style:u,windowSize:w,children:[C&&t.jsx(Zo,{checkBox:C,index:0,value:P,allCheckBoxValues:A,mode:l,name:e,checkBoxContainerStyle:x,checkBoxIconStyle:g,checkBoxStyle:c,labelCheckBoxStyle:a,labelStyle:d,width:h,draggable:y,groupLabelCheckBox:C,infoIconContainerStyle:S,checkedIconColor:p,isDisabled:r,selectionLimit:b,onDragStart:$,ref:V,onChangeHandler:D}),t.jsx(cu,{children:t.jsx(Jn,{style:{height:"100%",width:"100%"},children:({height:M,width:ae})=>t.jsx(Pi,{ref:k,height:M,width:ae,itemCount:z.length,itemSize:()=>v,estimatedItemSize:v,initialScrollOffset:T??0,onScroll:({scrollOffset:F})=>{I?.(F)},overscanCount:ou,itemKey:F=>z[F].value,itemData:{checkBoxes:z,value:P,allCheckBoxValues:A,mode:l,name:e,checkBoxContainerStyle:x,checkBoxIconStyle:g,checkBoxStyle:c,labelCheckBoxStyle:a,labelStyle:d,width:h,draggable:y,groupLabelCheckBox:C,infoIconContainerStyle:S,checkedIconColor:p,isDisabled:r,selectionLimit:b,onDragStart:$,ref:V,onChange:q,handleChangeEvent:D,rowHeight:v},children:au})})})]})}})}const au=({index:e,style:i,data:l})=>{const r=s.useRef(null),{checkBoxes:u,value:d,allCheckBoxValues:a,mode:c,name:h,checkBoxContainerStyle:m,checkBoxIconStyle:p,checkBoxStyle:g,labelCheckBoxStyle:x,labelStyle:y,width:b,draggable:S,groupLabelCheckBox:$,infoIconContainerStyle:v,checkedIconColor:T,isDisabled:I,selectionLimit:w,onDragStart:k,ref:j,handleChangeEvent:C}=l,z=u[e];return t.jsx(gu,{style:{...i,width:"100%"},ref:r,children:t.jsx(Zo,{checkBox:z,index:e,value:d,allCheckBoxValues:a,mode:c,name:h,checkBoxContainerStyle:m,checkBoxIconStyle:p,checkBoxStyle:g,labelCheckBoxStyle:x,labelStyle:y,width:b,draggable:S,groupLabelCheckBox:$,infoIconContainerStyle:v,checkedIconColor:T,isDisabled:I,selectionLimit:w,onDragStart:k,ref:j,onChangeHandler:C})})},Zo=s.forwardRef((e,i)=>{const{value:l,checkBox:r,groupLabelCheckBox:u,allCheckBoxValues:d,selectionLimit:a,mode:c,checkBoxStyle:h,labelCheckBoxStyle:m,isDisabled:p,draggable:g,checkBoxContainerStyle:x,infoIconContainerStyle:y,name:b,index:S,width:$,checkedIconColor:v,checkBoxIconStyle:T,labelStyle:I,onDragStart:w,onChangeHandler:k}=e,j=be(),C=P=>{typeof i=="function"?i(P):i&&(i.current=P)};let z=l.includes(r.value);const A=Array.from(new Set([...l,r.value]));u?.value===r.value&&l.length>0&&(a!=null?z=A.length===d.length||A.length===a+1:z=d.every(P=>A.includes(P)===!0));const R=()=>c==="off"||r.isException?j==="small"?{display:"none",...h}:{visibility:"hidden",...h}:r.groupLabel?d.length===1&&d[0]===u?.value?{visibility:"hidden",...m}:m:h;return t.jsxs(uu,{mode:c,draggable:g===!0,onDragStart:P=>{w?.(P,r.value)},style:x,isDisabled:p,isSelected:z,exceptionMode:r.exceptionMode,children:[r.prefix?t.jsx(du,{className:"prefix-box",children:r.prefix}):null,r.isException?t.jsx(hu,{style:y,className:"checkbox-alert",children:t.jsx(xe,{style:{padding:`12px ${n.sp3}`},title:r.exceptionInfo??"",placement:"bottom-start",children:r.exceptionType==="info"?t.jsx(pu,{}):t.jsx(mu,{})})}):t.jsx(Nc,{name:`${b}.${r.value}`,checkBoxValue:r.value,value:z,checkedIconColor:v,isDisabled:p||!r.groupLabel&&!z&&a!=null&&A.length===a+1?"disabled":void 0,checkBoxStyle:R(),checkBoxIconStyle:T,ref:C,onChange:k}),typeof r.label=="string"&&r.label?t.jsx(Uc,{isDisabled:p,label:r.label,labelStyle:I,htmlFor:`${b}.${r.value}`,style:{display:"flex",flex:1,minHeight:n.sp4,marginLeft:n.sp2,width:$,backgroundColor:"inherit",...I}}):r.label]},`${r.value}_${S}`)});Zo.displayName="CheckBoxWithLabel";const ru=({event:e,value:i,allCheckBoxValues:l,groupLabelCheckBox:r,onChange:u})=>{const d=e.currentTarget.value,a=e.currentTarget.checked,c=r?.value,h=new Set(i);if(d===c){u(a?Array.from(new Set([c,...l])):[]);return}a?h.add(d):h.delete(d);const m=l.every(p=>h.has(p));c!=null&&(m&&!h.has(c)?h.add(c):!m&&h.has(c)&&h.delete(c)),u(Array.from(h))},lu=o.div`
156
+ `,$s={subSectionContainerLeftRightPadding:new Q(f[3],f[6],f[8])},eu=({onAllThreadsClick:e,companyId:i,companyName:l})=>{const r={application:"cockpit",companyId:i,entityId:i,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:l,url:window.location.href},{url:u,...d}=r,a={...d},{threads:c,isLoading:h}=yc(a,!1,!1),m=c.filter(p=>p.id.includes(dr)===!1);return t.jsxs(Md,{isDisabled:h,onClick:e,"data-testid":B("comment-icon"),children:[t.jsx(wc,{count:m.length,isLoading:h}),t.jsx(Dd,{})]})},tu=({headerData:e,refreshStatus:i,searchText:l,companyName:r,companyId:u,isZeniUser:d,onAllThreadsClick:a,onClose:c,onRefresh:h,onSearchTextChanged:m})=>{const p=()=>{i!=="In-Progress"&&h()};return t.jsx(zd,{children:e.rightSection.map((g,x)=>{switch(g){case"search":return t.jsx(Jl,{isSearchOpen:(l.length??0)>0,searchPlaceHolder:e.searchPlaceholder,searchText:l,searchTextBoxStyle:{position:"initial",height:"fit-content"},styledSearchIconContainerStyle:{height:n.sp4},searchIconMarginRight:n.sp0,onSearchTextChanged:y=>{m(y)},downloadPresent:!1},x+g);case"refresh":return t.jsx(xe,{display:"block",placement:"bottom",title:Id,style:{marginTop:"2px"},enterDelay:600,children:t.jsx(Nd,{onClick:p,$spinning:i==="In-Progress","data-testid":B("refresh-icon")})},x+g);case"comment":return d===!1?null:t.jsx(eu,{companyId:u,companyName:r,onAllThreadsClick:a});case"close":default:return t.jsx(xe,{display:"block",placement:"bottom",title:Td,enterDelay:600,style:{marginTop:"2px"},children:t.jsx(Bd,{onClick:c,"data-testid":B("close-icon")})},x+g)}})})},nu=({headerData:e,onBack:i})=>t.jsx(Pd,{children:e.leftSection.map((l,r)=>{switch(l){case"back":default:return t.jsx(xe,{display:"block",placement:"bottom",title:$d,enterDelay:600,style:{marginTop:"-14px"},children:t.jsx(Vd,{onClick:i,"data-testid":B("back-button")})},r+l)}})}),Is=({text:e,linkText:i,windowSize:l,isCopied:r,onLinkClick:u})=>{if(i==null||!i)return t.jsxs(ui,{windowSize:l,children:[e," "]});const d=e.indexOf(i);if(d===-1)return t.jsxs(ui,{windowSize:l,children:[e," "]});const a=e.substring(0,d),c=e.substring(d+i.length);return t.jsxs(t.Fragment,{children:[a?t.jsxs(ui,{windowSize:l,children:[a.trim()," "]}):null,t.jsx(xe,{display:"flex",placement:"right",title:or.test(i)?r?Ad:Ld:Rd,enterTouchDelay:600,children:t.jsxs(Xd,{onClick:()=>u?.(i),"data-testid":B("pre-link"),children:[i,r?t.jsx(_d,{className:"success-icon"}):t.jsx(Fd,{className:"copy-icon"})]})}),c?t.jsxs(ui,{windowSize:l,children:[c," "]}):null]})},Ts=({subTitles:e})=>{const i=be(),[,l]=Ql(),[r,u]=s.useState(!1),d=s.useRef(null),a=s.useCallback(c=>{or.test(c)?(l(c),u(!0),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{u(!1)},2e3)):window.open(c,"_blank","noopener,noreferrer")},[l]);return s.useEffect(()=>()=>{d.current&&clearTimeout(d.current)},[]),t.jsx(Gd,{children:e.map((c,h)=>t.jsxs(Qd,{children:[c.pre?t.jsx(Is,{text:c.pre,linkText:c.preLink,windowSize:i,isCopied:r,onLinkClick:a}):null,c.prefixIconName?t.jsx(t.Fragment,{children:c.prefixIconName==="zeniAIIcon"?t.jsx(Yd,{}):t.jsx(t.Fragment,{})}):null,c.bold?t.jsx(t.Fragment,{children:t.jsxs(Zd,{windowSize:i,children:[c.bold," "]})}):null,c.post?t.jsx(Is,{text:c.post,linkText:c.postLink,windowSize:i,isCopied:r,onLinkClick:a}):null]},h+c.bold+c.pre+c.post))})};function iu(e){const{headerData:i,currentTab:l,completionStatus:r,onUpdateTab:u,selectedReconAccountId:d,getTabCountAndFetchState:a,reconcileDetailPageFetchState:c,forceShowSubtitle:h,currentSelectedView:m,currentMissingReceiptsTab:p,onMissingReceiptsTabUpdate:g,onReconTabUpdate:x,currentRecontab:y,navBarCustomElement:b,titleStyle:S={},hideEmptyDivBelowTabs:$=!1,belowTabsSlot:v}=e,T=a("autoCategorized")?.count??0,I=a("review")?.count??0,w=a("reconcile")?.count??0,k=i.tabs.length>0||i.subTitle.length>0,j=m==="transaction_categorization"&&l==="autoCategorized",C=m==="reconciliation"&&y==="review"&&d!=null,z=m==="reconciliation"&&y==="reconcile"&&d!=null,A=j?T>0:C?c==="In-Progress"?!0:I>0:z?c==="In-Progress"?!0:w>0:r!=="complete",R=Tt(),P=be();let V=[];i.tabs.length>0&&(V=i.tabs.map(D=>({label:D.label,id:D.id,countDetails:a(D.id)})));const q=i.tabs.some(D=>(m==="reconciliation"?D.id===y:m==="missing_receipts"?D.id===p:D.id===l)&&D.subTitle.length>0);return t.jsxs(Od,{children:[t.jsx(Vl,{title:i.title,subTitle:i.subText,titleTextStyles:{flex:"1 1 0px"},backgroundColor:R.colors.grey4,onBackClick:()=>null,titleStyle:S,ignoreScrollAction:m!=="month_end_insights",keepBackgroundOnScroll:m!=="month_end_insights",leftSideComponent:t.jsx(nu,{...e}),rightSideComponent:t.jsx(tu,{...e}),source:"NavBarWithHeader"}),b??null,t.jsx(Ge,{controller:k===!0,children:t.jsx(ks,{windowSize:P,children:i.tabs.length>0?t.jsxs(t.Fragment,{children:[t.jsx(Hd,{windowSize:P,children:t.jsx(Nl,{allTabs:V,selectedTab:m==="transaction_categorization"?l??V[0].id:m==="missing_receipts"?p??V[0].id:y??V[0].id,onTabChange:D=>{if(m==="transaction_categorization"){const M=ud(D.id);M!=null&&u(M)}else if(m==="reconciliation"){const M=hd(D.id);M!=null&&x(M)}else m==="missing_receipts"&&g?.(D.id)},maximumCountLimit:Ed})}),t.jsx(Kd,{windowSize:P}),$!==!0?t.jsx(Jd,{}):null,t.jsx(Ge,{controller:(A===!0||h===!0)&&q,children:t.jsx(js,{windowSize:P,children:i.tabs.map((D,M)=>(m==="reconciliation"?D.id===y:m==="missing_receipts"?D.id===p:D.id===l)?t.jsx(qd,{children:t.jsx(Ts,{subTitles:D.subTitle})},M+D.id):null)})})]}):t.jsx(Ge,{controller:A===!0||h===!0,children:t.jsx(js,{windowSize:P,children:t.jsx(Ts,{subTitles:i.subTitle})})})})}),v!=null?t.jsx(ks,{windowSize:P,children:t.jsx(Wd,{children:v})}):null]})}const ou=1;function su({name:e,checkBoxes:i,mode:l,isDisabled:r,style:u,labelStyle:d,labelCheckBoxStyle:a,checkBoxStyle:c,width:h,registerOptions:m,checkedIconColor:p,checkBoxIconStyle:g,checkBoxContainerStyle:x,draggable:y=!1,selectionLimit:b,infoIconContainerStyle:S,onDragStart:$,rowHeight:v=40,initialScrollOffSet:T,onScroll:I}){const w=be(),k=s.useRef(null),{control:j}=Ko(),C=i.find(P=>P.groupLabel),z=i.filter(P=>!P.groupLabel),A=[];for(const P of z)if(P.isException||A.push(P.value),b!=null&&A.length===b+1)break;const R=i.filter(P=>P.defaultChecked).map(P=>P.value);return t.jsx(wr,{control:j,name:e,rules:m,defaultValue:R,render:({field:{value:P,ref:V,onChange:q}})=>{const D=M=>{ru({event:M,value:P,allCheckBoxValues:A,groupLabelCheckBox:C,onChange:q})};return t.jsxs(lu,{style:u,windowSize:w,children:[C&&t.jsx(Zo,{checkBox:C,index:0,value:P,allCheckBoxValues:A,mode:l,name:e,checkBoxContainerStyle:x,checkBoxIconStyle:g,checkBoxStyle:c,labelCheckBoxStyle:a,labelStyle:d,width:h,draggable:y,groupLabelCheckBox:C,infoIconContainerStyle:S,checkedIconColor:p,isDisabled:r,selectionLimit:b,onDragStart:$,ref:V,onChangeHandler:D}),t.jsx(cu,{children:t.jsx(Jn,{style:{height:"100%",width:"100%"},children:({height:M,width:ae})=>t.jsx(Pi,{ref:k,height:M,width:ae,itemCount:z.length,itemSize:()=>v,estimatedItemSize:v,initialScrollOffset:T??0,onScroll:({scrollOffset:F})=>{I?.(F)},overscanCount:ou,itemKey:F=>z[F].value,itemData:{checkBoxes:z,value:P,allCheckBoxValues:A,mode:l,name:e,checkBoxContainerStyle:x,checkBoxIconStyle:g,checkBoxStyle:c,labelCheckBoxStyle:a,labelStyle:d,width:h,draggable:y,groupLabelCheckBox:C,infoIconContainerStyle:S,checkedIconColor:p,isDisabled:r,selectionLimit:b,onDragStart:$,ref:V,onChange:q,handleChangeEvent:D,rowHeight:v},children:au})})})]})}})}const au=({index:e,style:i,data:l})=>{const r=s.useRef(null),{checkBoxes:u,value:d,allCheckBoxValues:a,mode:c,name:h,checkBoxContainerStyle:m,checkBoxIconStyle:p,checkBoxStyle:g,labelCheckBoxStyle:x,labelStyle:y,width:b,draggable:S,groupLabelCheckBox:$,infoIconContainerStyle:v,checkedIconColor:T,isDisabled:I,selectionLimit:w,onDragStart:k,ref:j,handleChangeEvent:C}=l,z=u[e];return t.jsx(gu,{style:{...i,width:"100%"},ref:r,children:t.jsx(Zo,{checkBox:z,index:e,value:d,allCheckBoxValues:a,mode:c,name:h,checkBoxContainerStyle:m,checkBoxIconStyle:p,checkBoxStyle:g,labelCheckBoxStyle:x,labelStyle:y,width:b,draggable:S,groupLabelCheckBox:$,infoIconContainerStyle:v,checkedIconColor:T,isDisabled:I,selectionLimit:w,onDragStart:k,ref:j,onChangeHandler:C})})},Zo=s.forwardRef((e,i)=>{const{value:l,checkBox:r,groupLabelCheckBox:u,allCheckBoxValues:d,selectionLimit:a,mode:c,checkBoxStyle:h,labelCheckBoxStyle:m,isDisabled:p,draggable:g,checkBoxContainerStyle:x,infoIconContainerStyle:y,name:b,index:S,width:$,checkedIconColor:v,checkBoxIconStyle:T,labelStyle:I,onDragStart:w,onChangeHandler:k}=e,j=be(),C=P=>{typeof i=="function"?i(P):i&&(i.current=P)};let z=l.includes(r.value);const A=Array.from(new Set([...l,r.value]));u?.value===r.value&&l.length>0&&(a!=null?z=A.length===d.length||A.length===a+1:z=d.every(P=>A.includes(P)===!0));const R=()=>c==="off"||r.isException?j==="small"?{display:"none",...h}:{visibility:"hidden",...h}:r.groupLabel?d.length===1&&d[0]===u?.value?{visibility:"hidden",...m}:m:h;return t.jsxs(uu,{mode:c,draggable:g===!0,onDragStart:P=>{w?.(P,r.value)},style:x,isDisabled:p,isSelected:z,exceptionMode:r.exceptionMode,children:[r.prefix?t.jsx(du,{className:"prefix-box",children:r.prefix}):null,r.isException?t.jsx(hu,{style:y,className:"checkbox-alert",children:t.jsx(xe,{style:{padding:`12px ${n.sp3}`},title:r.exceptionInfo??"",placement:"bottom-start",children:r.exceptionType==="info"?t.jsx(pu,{}):t.jsx(mu,{})})}):t.jsx(Nc,{name:`${b}.${r.value}`,checkBoxValue:r.value,value:z,checkedIconColor:v,isDisabled:p||!r.groupLabel&&!z&&a!=null&&A.length===a+1?"disabled":void 0,checkBoxStyle:R(),checkBoxIconStyle:T,ref:C,onChange:k}),typeof r.label=="string"&&r.label?t.jsx(Uc,{isDisabled:p,label:r.label,labelStyle:I,htmlFor:`${b}.${r.value}`,style:{display:"flex",flex:1,minHeight:n.sp4,marginLeft:n.sp2,width:$,backgroundColor:"inherit",...I}}):r.label]},`${r.value}_${S}`)});Zo.displayName="CheckBoxWithLabel";const ru=({event:e,value:i,allCheckBoxValues:l,groupLabelCheckBox:r,onChange:u})=>{const d=e.currentTarget.value,a=e.currentTarget.checked,c=r?.value,h=new Set(i);if(d===c){u(a?Array.from(new Set([c,...l])):[]);return}a?h.add(d):h.delete(d);const m=l.every(p=>h.has(p));c!=null&&(m&&!h.has(c)?h.add(c):!m&&h.has(c)&&h.delete(c)),u(Array.from(h))},lu=o.div`
157
157
  display: flex;
158
158
  flex-direction: column;
159
159
  width: 100%;
@@ -271,7 +271,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
271
271
  color: ${e=>e.theme.colors.brandColorJade};
272
272
  `,Iu=o(ar)`
273
273
  color: ${e=>e.theme.colors.primary};
274
- `,Tu=e=>{const{tab:i}=e;switch(i){case"transaction_categorization":return t.jsx(bu,{});case"je_schedules":case"reconciliation":return t.jsx(ku,{});case"flux_analysis":return t.jsx(Su,{});case"missing_receipts":default:return t.jsx(vu,{})}};function It(e){const{title:i,subTitle:l}=e;return t.jsx(Cu,{children:t.jsxs(ju,{children:[t.jsx(Tu,{...e}),t.jsx($u,{children:i}),t.jsx(Iu,{children:l})]})})}const{common:{headers:{transactions:Lu,jeSchedules:Au,fluxAnalysis:Ru,missingReceipts:Eu,insights:Du,reconciliation:Ls},strings:{empty:sn}},uncategorizedTransactionList:{missingReceipt:{bulkUpload:{missing:Mu,unmatched:Ou,completed:zu}}},expenseAutomation:{transactions:{tabs:As,subTitles:{review:{item1:hi,item2:pi},autoCategorized:{item1:mi,item2:Pu}},searchPlaceholder:Fu,allDoneText:_u},jeSchedules:{subTitles:{item1:Bu,item2:Vu},searchPlaceholder:Nu,allDoneText:Uu},missingReceipts:{subTitles:Hu,searchPlaceholder:Wu,allDoneText:Qi},fluxAnalysis:{subTitles:{item1:qu,item2:Ku},searchPlaceholder:Ju,emptyPageTexts:{youDidIt:Qu,allReviewed:Gu}},accountRecon:{review:{allDoneText:Rs},reconcile:{allDoneText:Yu},tabs:Es,titles:{item1:Zu,item2:Xu},subTitles:{review:{item1:eh,item2:gi},reconcile:{item1:xi,item2:th}}}}}=me.getLocalizedStrings(),We=(e,i,l,r,u,d)=>{switch(e){case"transaction_categorization":return{key:"transaction_categorization",title:Lu,subTitle:[],tabs:[{label:As.review,id:"review",subTitle:[{pre:hi.pre,bold:hi.bold,prefixIconName:hi.prefixIconName,post:hi.post},{pre:pi.pre,bold:pi.bold,prefixIconName:pi.prefixIconName,post:pi.post}]},{label:As.autoCategorized,id:"autoCategorized",subTitle:[{pre:mi.pre,bold:mi.bold,prefixIconName:mi.prefixIconName,post:mi.post.replace("#number",i!=null&&i!=0?i.toString():"")},Pu]}],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Fu,allDoneText:_u};case"je_schedules":return{key:"je_schedules",title:Au,subTitle:[Bu,Vu],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Nu,allDoneText:Uu};case"missing_receipts":{const a=d?.includeBulkUploadTabs!==!1;return{key:"missing_receipts",title:d?.navTitle??Eu,subTitle:[Hu],tabs:a?[{label:Mu,id:"missing",subTitle:[],allDoneText:Qi},{label:Ou,id:"unmatched",subTitle:[]},{label:zu,id:"completed",subTitle:[],allDoneText:Qi}]:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Wu,allDoneText:Qi}}case"flux_analysis":return{key:"flux_analysis",title:Ru,subTitle:[qu,Ku],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Ju,allDoneText:{title:Qu,subTitle:Gu}};case"month_end_insights":return{key:"month_end_insights",title:Du,subTitle:[],tabs:[],rightSection:["comment","refresh","close"],leftSection:[],searchPlaceholder:sn,allDoneText:{title:sn,subTitle:sn}};case"reconciliation":return l==null?{key:"reconciliation",title:Ls,subTitle:[Zu,Xu],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:sn,allDoneText:{title:sn,subTitle:sn}}:{key:"reconciliation",title:r??Ls,subText:u??void 0,subTitle:[],tabs:[{label:Es.review,id:"review",subTitle:[eh,{pre:gi.pre,bold:gi.bold,prefixIconName:gi.prefixIconName,post:gi.post}],allDoneText:Rs},{label:Es.reconcile,id:"reconcile",subTitle:[{pre:xi.pre,bold:xi.bold,prefixIconName:xi.prefixIconName,post:xi.post},th],allDoneText:Yu}],rightSection:["refresh"],leftSection:["back"],searchPlaceholder:sn,allDoneText:Rs}}},{common:{strings:{empty:nh}},expenseAutomation:{accountRecon:{reconcile:{header:Gt}}}}=me.getLocalizedStrings(),ih={key:"date",value:Gt.date,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginLeft:f[4],marginRight:f[3]}},oh={key:"clearedDate",value:Gt.clearedDate,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3],display:"none"}},sh={key:"type",value:Gt.type,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},ah={key:"payee",value:Gt.payee,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},rh={key:"account",value:Gt.account,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},lh={key:"transactionDirection",value:Gt.direction,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},ch={key:"memo",value:Gt.memo,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},dh={key:"amount",value:Gt.amount,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},uh={key:"recommended",value:nh,sortOrder:"ascending",width:new Q(1.25,1.25,1.25),customStyle:{marginRight:f[4],marginLeft:f[0]}},Ne=[ih,oh,sh,ah,rh,lh,ch,dh,uh],hh=50,Bn={sortKey:"date",sortOrder:"descending"};function ph({sortConfig:e,onReconTabColumnSortConfigChanged:i}){const l=be(),[r,u]=s.useState(Do(Ne));s.useEffect(()=>{const c=[...r];for(const h of c)h.key===e.sortKey?h.sortOrder=e.sortOrder:h.sortOrder="ascending";u(c)},[e.sortKey,e.sortOrder]);const d=(c,h)=>{let m=h;e.sortKey===c&&(m=h==="ascending"?"descending":"ascending"),i(c,m)},a=c=>{d(c.key,c.sortOrder)};return t.jsx(fh,{headerHeight:hh,children:r.map(c=>t.jsx(gh,{columnWidth:c.width,windowSize:l,sortDataValue:e.sortKey,actualDataValue:c.key,style:c.customStyle,children:t.jsxs(vh,{isVisible:c.key!=="recommended",children:[t.jsx(xh,{"data-testid":B("reconcile-tab-list-sort",c.value),onClick:()=>a(c),children:t.jsx(Ye,{children:c.value})}),t.jsx(yh,{sortConfig:e,headerData:c,children:t.jsx(wh,{})}),t.jsx(Ch,{isVisible:e.sortKey===c.key&&(e.sortKey!==Bn.sortKey||e.sortOrder!==Bn.sortOrder),children:t.jsx(bh,{"data-testid":B("reconcile-tab-list-reset-sort",Bn.sortKey),onClick:()=>i(Bn.sortKey,Bn.sortOrder)})})]})},c.key))})}const mh=cd.memo(ph),gh=o.div`
274
+ `,Tu=e=>{const{tab:i}=e;switch(i){case"transaction_categorization":return t.jsx(bu,{});case"je_schedules":case"reconciliation":return t.jsx(ku,{});case"flux_analysis":return t.jsx(Su,{});case"missing_receipts":default:return t.jsx(vu,{})}};function It(e){const{title:i,subTitle:l}=e;return t.jsx(Cu,{children:t.jsxs(ju,{children:[t.jsx(Tu,{...e}),t.jsx($u,{children:i}),t.jsx(Iu,{children:l})]})})}const{common:{headers:{transactions:Lu,jeSchedules:Au,fluxAnalysis:Ru,missingReceipts:Eu,insights:Du,reconciliation:Ls},strings:{empty:sn}},uncategorizedTransactionList:{missingReceipt:{bulkUpload:{missing:Mu,unmatched:Ou,completed:zu}}},expenseAutomation:{transactions:{tabs:As,subTitles:{review:{item1:hi,item2:pi},autoCategorized:{item1:mi,item2:Pu}},searchPlaceholder:Fu,allDoneText:_u},jeSchedules:{subTitles:{item1:Bu,item2:Vu},searchPlaceholder:Nu,allDoneText:Uu},missingReceipts:{subTitles:Wu,searchPlaceholder:Hu,allDoneText:Qi},fluxAnalysis:{subTitles:{item1:qu,item2:Ku},searchPlaceholder:Ju,emptyPageTexts:{youDidIt:Qu,allReviewed:Gu}},accountRecon:{review:{allDoneText:Rs},reconcile:{allDoneText:Yu},tabs:Es,titles:{item1:Zu,item2:Xu},subTitles:{review:{item1:eh,item2:gi},reconcile:{item1:xi,item2:th}}}}}=me.getLocalizedStrings(),He=(e,i,l,r,u,d)=>{switch(e){case"transaction_categorization":return{key:"transaction_categorization",title:Lu,subTitle:[],tabs:[{label:As.review,id:"review",subTitle:[{pre:hi.pre,bold:hi.bold,prefixIconName:hi.prefixIconName,post:hi.post},{pre:pi.pre,bold:pi.bold,prefixIconName:pi.prefixIconName,post:pi.post}]},{label:As.autoCategorized,id:"autoCategorized",subTitle:[{pre:mi.pre,bold:mi.bold,prefixIconName:mi.prefixIconName,post:mi.post.replace("#number",i!=null&&i!=0?i.toString():"")},Pu]}],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Fu,allDoneText:_u};case"je_schedules":return{key:"je_schedules",title:Au,subTitle:[Bu,Vu],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Nu,allDoneText:Uu};case"missing_receipts":{const a=d?.includeBulkUploadTabs!==!1;return{key:"missing_receipts",title:d?.navTitle??Eu,subTitle:[Wu],tabs:a?[{label:Mu,id:"missing",subTitle:[],allDoneText:Qi},{label:Ou,id:"unmatched",subTitle:[]},{label:zu,id:"completed",subTitle:[],allDoneText:Qi}]:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Hu,allDoneText:Qi}}case"flux_analysis":return{key:"flux_analysis",title:Ru,subTitle:[qu,Ku],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Ju,allDoneText:{title:Qu,subTitle:Gu}};case"month_end_insights":return{key:"month_end_insights",title:Du,subTitle:[],tabs:[],rightSection:["comment","refresh","close"],leftSection:[],searchPlaceholder:sn,allDoneText:{title:sn,subTitle:sn}};case"reconciliation":return l==null?{key:"reconciliation",title:Ls,subTitle:[Zu,Xu],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:sn,allDoneText:{title:sn,subTitle:sn}}:{key:"reconciliation",title:r??Ls,subText:u??void 0,subTitle:[],tabs:[{label:Es.review,id:"review",subTitle:[eh,{pre:gi.pre,bold:gi.bold,prefixIconName:gi.prefixIconName,post:gi.post}],allDoneText:Rs},{label:Es.reconcile,id:"reconcile",subTitle:[{pre:xi.pre,bold:xi.bold,prefixIconName:xi.prefixIconName,post:xi.post},th],allDoneText:Yu}],rightSection:["refresh"],leftSection:["back"],searchPlaceholder:sn,allDoneText:Rs}}},{common:{strings:{empty:nh}},expenseAutomation:{accountRecon:{reconcile:{header:Gt}}}}=me.getLocalizedStrings(),ih={key:"date",value:Gt.date,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginLeft:f[4],marginRight:f[3]}},oh={key:"clearedDate",value:Gt.clearedDate,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3],display:"none"}},sh={key:"type",value:Gt.type,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},ah={key:"payee",value:Gt.payee,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},rh={key:"account",value:Gt.account,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},lh={key:"transactionDirection",value:Gt.direction,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},ch={key:"memo",value:Gt.memo,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},dh={key:"amount",value:Gt.amount,sortOrder:"ascending",width:new Q(12.75,12.75,12.75),customStyle:{marginRight:f[3]}},uh={key:"recommended",value:nh,sortOrder:"ascending",width:new Q(1.25,1.25,1.25),customStyle:{marginRight:f[4],marginLeft:f[0]}},Ne=[ih,oh,sh,ah,rh,lh,ch,dh,uh],hh=50,Bn={sortKey:"date",sortOrder:"descending"};function ph({sortConfig:e,onReconTabColumnSortConfigChanged:i}){const l=be(),[r,u]=s.useState(Do(Ne));s.useEffect(()=>{const c=[...r];for(const h of c)h.key===e.sortKey?h.sortOrder=e.sortOrder:h.sortOrder="ascending";u(c)},[e.sortKey,e.sortOrder]);const d=(c,h)=>{let m=h;e.sortKey===c&&(m=h==="ascending"?"descending":"ascending"),i(c,m)},a=c=>{d(c.key,c.sortOrder)};return t.jsx(fh,{headerHeight:hh,children:r.map(c=>t.jsx(gh,{columnWidth:c.width,windowSize:l,sortDataValue:e.sortKey,actualDataValue:c.key,style:c.customStyle,children:t.jsxs(vh,{isVisible:c.key!=="recommended",children:[t.jsx(xh,{"data-testid":B("reconcile-tab-list-sort",c.value),onClick:()=>a(c),children:t.jsx(Ye,{children:c.value})}),t.jsx(yh,{sortConfig:e,headerData:c,children:t.jsx(wh,{})}),t.jsx(Ch,{isVisible:e.sortKey===c.key&&(e.sortKey!==Bn.sortKey||e.sortOrder!==Bn.sortOrder),children:t.jsx(bh,{"data-testid":B("reconcile-tab-list-reset-sort",Bn.sortKey),onClick:()=>i(Bn.sortKey,Bn.sortOrder)})})]})},c.key))})}const mh=cd.memo(ph),gh=o.div`
275
275
  color: ${e=>e.sortDataValue===e.actualDataValue?e.theme.colors.primary:e.theme.colors.grey1};
276
276
  :hover {
277
277
  color: ${e=>e.theme.colors.primary};
@@ -368,7 +368,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
368
368
  padding: 1px 6px;
369
369
  border-radius: ${n.sp1};
370
370
  border: ${e=>`1px solid ${e.isSelected?e.theme.colors.primary:e.theme.colors.hero}`};
371
- `,Rh=me.getLocalizedStrings(),{common:{all:Ms,strings:{empty:Os}}}=Rh,zs="selectedTransactionIds",Eh="expenseAutomationBankReconReconcilePage",Dh=e=>`${e}_form`;function Mh({currentFooterFormId:e,localData:i,matchedTransactions:l,sortConfig:r,onSaveReconciliation:u,selectedAccountId:d,onReconTabColumnSortConfigChanged:a,onUpdateReconcileTabLocalData:c,setCurrentFooterFormId:h}){const m=xn({mode:"all",defaultValues:{selectedTransactionIds:i.selectedTransactionIds},values:{selectedTransactionIds:i.selectedTransactionIds}}),p={label:t.jsx(mh,{onReconTabColumnSortConfigChanged:a,sortConfig:r}),value:Ms.toLocaleLowerCase(),defaultChecked:!1,groupLabel:!0},g=l.map(S=>({label:t.jsx(jh,{transaction:S,selectedTransactionIds:i.selectedTransactionIds,transactionId:S.id}),value:S.id,defaultChecked:!1,groupLabel:!1})),x=[p,...g],y=async S=>{const $=S[zs].filter(v=>v!=Ms.toLocaleLowerCase());c($)};s.useEffect(()=>{const S=m.watch($=>{$!=null&&Yn(()=>y($))});return()=>{S.unsubscribe()}}),s.useEffect(()=>(e!=="expenseAutomationBankReconReconcilePage"&&h("expenseAutomationBankReconReconcilePage"),()=>{h("expenseAutomationPage")}),[]);const b=s.useCallback(()=>{u({reconcileAction:"reconcile"})},[u]);if(l.length===0){const S=We("reconciliation",void 0,d).tabs.find($=>$.id==="reconcile")?.allDoneText;return t.jsx(Fh,{children:t.jsx(It,{tab:"missing_receipts",title:S?.title??Os,subTitle:S?.subTitle??Os})})}return t.jsx(Oh,{children:t.jsx(fn,{...m,children:t.jsx(zh,{onSubmit:m.handleSubmit(b),id:Dh(Eh),children:t.jsx(Ph,{children:t.jsx(su,{name:zs,checkBoxes:x,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:20},rowHeight:kh,mode:i.selectedTransactionIds.length>0?"always_on":"checked_or_hover",checkBoxContainerStyle:{boxSizing:"border-box"}})})})})})}const Oh=o.div``,zh=o.form``,Ph=o.div`
371
+ `,Rh=me.getLocalizedStrings(),{common:{all:Ms,strings:{empty:Os}}}=Rh,zs="selectedTransactionIds",Eh="expenseAutomationBankReconReconcilePage",Dh=e=>`${e}_form`;function Mh({currentFooterFormId:e,localData:i,matchedTransactions:l,sortConfig:r,onSaveReconciliation:u,selectedAccountId:d,onReconTabColumnSortConfigChanged:a,onUpdateReconcileTabLocalData:c,setCurrentFooterFormId:h}){const m=xn({mode:"all",defaultValues:{selectedTransactionIds:i.selectedTransactionIds},values:{selectedTransactionIds:i.selectedTransactionIds}}),p={label:t.jsx(mh,{onReconTabColumnSortConfigChanged:a,sortConfig:r}),value:Ms.toLocaleLowerCase(),defaultChecked:!1,groupLabel:!0},g=l.map(S=>({label:t.jsx(jh,{transaction:S,selectedTransactionIds:i.selectedTransactionIds,transactionId:S.id}),value:S.id,defaultChecked:!1,groupLabel:!1})),x=[p,...g],y=async S=>{const $=S[zs].filter(v=>v!=Ms.toLocaleLowerCase());c($)};s.useEffect(()=>{const S=m.watch($=>{$!=null&&Yn(()=>y($))});return()=>{S.unsubscribe()}}),s.useEffect(()=>(e!=="expenseAutomationBankReconReconcilePage"&&h("expenseAutomationBankReconReconcilePage"),()=>{h("expenseAutomationPage")}),[]);const b=s.useCallback(()=>{u({reconcileAction:"reconcile"})},[u]);if(l.length===0){const S=He("reconciliation",void 0,d).tabs.find($=>$.id==="reconcile")?.allDoneText;return t.jsx(Fh,{children:t.jsx(It,{tab:"missing_receipts",title:S?.title??Os,subTitle:S?.subTitle??Os})})}return t.jsx(Oh,{children:t.jsx(fn,{...m,children:t.jsx(zh,{onSubmit:m.handleSubmit(b),id:Dh(Eh),children:t.jsx(Ph,{children:t.jsx(su,{name:zs,checkBoxes:x,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:20},rowHeight:kh,mode:i.selectedTransactionIds.length>0?"always_on":"checked_or_hover",checkBoxContainerStyle:{boxSizing:"border-box"}})})})})})}const Oh=o.div``,zh=o.form``,Ph=o.div`
372
372
  height: calc(100vh - 350px);
373
373
  `,Fh=o.div`
374
374
  height: 100%;
@@ -511,7 +511,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
511
511
  padding: ${n.sp0} 42px;
512
512
  `,os=o.div`
513
513
  flex: 1;
514
- `,Hr=o(Ye)`
514
+ `,Wr=o(Ye)`
515
515
  padding: ${n.sp0} 6px;
516
516
  color: ${he.info};
517
517
  border: 1px solid ${he.info};
@@ -524,7 +524,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
524
524
  border-radius: ${n.sp1};
525
525
  `,at=o(Ti)`
526
526
  padding: 2px ${n.sp2};
527
- `,Wt=me.getLocalizedStrings().expenseAutomation.accountRecon.review.header,Ft=[{key:"date",value:Wt.date,sortOrder:"ascending",width:new Q(20,20),loaderWidth:120},{key:"payee",value:Wt.payee,sortOrder:"ascending",width:new Q(20,20),loaderWidth:212},{key:"memo",value:Wt.memo,sortOrder:"ascending",width:new Q(20,20),loaderWidth:192},{key:"direction",value:Wt.direction,sortOrder:"ascending",width:new Q(15,15),loaderWidth:84},{key:"match",value:Wt.match,sortOrder:"ascending",width:new Q(15,15),loaderWidth:152},{key:"amount",value:Wt.amount,sortOrder:"ascending",width:new Q(10,10),loaderWidth:64}],Oo=[{key:"payee",value:Wt.payee,sortOrder:"ascending",width:new Q(65,65),loaderWidth:212},{key:"amount",value:Wt.amount,sortOrder:"ascending",width:new Q(30,30),loaderWidth:64}],Nh=e=>{const{sortConfig:i,onColumnSortConfigChanged:l}=e,r=be(),u=Ze()?Oo:Ft,[d,a]=s.useState(()=>u.map(h=>({...h,sortOrder:h.key===i.sortKey?i.sortOrder:"ascending"})));s.useEffect(()=>{a(u.map(h=>({...h,sortOrder:h.key===i.sortKey?i.sortOrder:"ascending"})))},[i.sortKey,i.sortOrder,u]);const c=(h,m)=>{let p=m;i.sortKey===h&&(p=m==="ascending"?"descending":"ascending"),l(h,p)};return t.jsx(Hh,{children:d.map(h=>t.jsxs(Wh,{sortDataValue:i.sortKey,actualDataValue:h.key,wrapperWidth:h.width,windowSize:r,isLastColumn:h.key==="amount",children:[t.jsxs(qh,{"data-testid":B("account-reconciliation-review-header",h.value),sortKey:h.key,onClick:()=>c(h.key,h.sortOrder),children:[t.jsx(Ye,{children:h.value}),t.jsx(Kh,{sortDataValue:i.sortKey,headerData:h,children:t.jsx(Jh,{})})]}),t.jsx(Qh,{sortDataValue:i.sortKey,windowSize:r,isVisible:i.sortKey===h.key&&(i.sortKey!=="date"||i.sortOrder==="ascending"),children:t.jsx(Gh,{"data-testid":B("account-reconciliation-review-sort-by-date"),onClick:()=>c("date","ascending")})})]},h.key))})},Uh=s.memo(Nh),Hh=o(ot)`
527
+ `,Ht=me.getLocalizedStrings().expenseAutomation.accountRecon.review.header,Ft=[{key:"date",value:Ht.date,sortOrder:"ascending",width:new Q(20,20),loaderWidth:120},{key:"payee",value:Ht.payee,sortOrder:"ascending",width:new Q(20,20),loaderWidth:212},{key:"memo",value:Ht.memo,sortOrder:"ascending",width:new Q(20,20),loaderWidth:192},{key:"direction",value:Ht.direction,sortOrder:"ascending",width:new Q(15,15),loaderWidth:84},{key:"match",value:Ht.match,sortOrder:"ascending",width:new Q(15,15),loaderWidth:152},{key:"amount",value:Ht.amount,sortOrder:"ascending",width:new Q(10,10),loaderWidth:64}],Oo=[{key:"payee",value:Ht.payee,sortOrder:"ascending",width:new Q(65,65),loaderWidth:212},{key:"amount",value:Ht.amount,sortOrder:"ascending",width:new Q(30,30),loaderWidth:64}],Nh=e=>{const{sortConfig:i,onColumnSortConfigChanged:l}=e,r=be(),u=Ze()?Oo:Ft,[d,a]=s.useState(()=>u.map(h=>({...h,sortOrder:h.key===i.sortKey?i.sortOrder:"ascending"})));s.useEffect(()=>{a(u.map(h=>({...h,sortOrder:h.key===i.sortKey?i.sortOrder:"ascending"})))},[i.sortKey,i.sortOrder,u]);const c=(h,m)=>{let p=m;i.sortKey===h&&(p=m==="ascending"?"descending":"ascending"),l(h,p)};return t.jsx(Wh,{children:d.map(h=>t.jsxs(Hh,{sortDataValue:i.sortKey,actualDataValue:h.key,wrapperWidth:h.width,windowSize:r,isLastColumn:h.key==="amount",children:[t.jsxs(qh,{"data-testid":B("account-reconciliation-review-header",h.value),sortKey:h.key,onClick:()=>c(h.key,h.sortOrder),children:[t.jsx(Ye,{children:h.value}),t.jsx(Kh,{sortDataValue:i.sortKey,headerData:h,children:t.jsx(Jh,{})})]}),t.jsx(Qh,{sortDataValue:i.sortKey,windowSize:r,isVisible:i.sortKey===h.key&&(i.sortKey!=="date"||i.sortOrder==="ascending"),children:t.jsx(Gh,{"data-testid":B("account-reconciliation-review-sort-by-date"),onClick:()=>c("date","ascending")})})]},h.key))})},Uh=s.memo(Nh),Wh=o(ot)`
528
528
  top: 0;
529
529
  left: 0;
530
530
  width: fit-content;
@@ -537,7 +537,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
537
537
  position: sticky;
538
538
  color: ${e=>e.theme.colors.grey1};
539
539
  background-color: ${e=>e.theme.colors.grey4};
540
- `,Wh=o.div`
540
+ `,Hh=o.div`
541
541
  color: ${e=>e.sortDataValue===e.actualDataValue?e.theme.colors.primary:e.theme.colors.grey1};
542
542
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
543
543
  min-width: ${e=>e.isLastColumn===!0?"auto":e.wrapperWidth.valuePercentage(e.windowSize)};
@@ -577,7 +577,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
577
577
  height: 12px;
578
578
  cursor: pointer;
579
579
  color: ${e=>e.theme.colors.hero};
580
- `,kt="accountReconReviewTableSection",{dateFormat:Yh,expenseAutomation:Zh,common:Dt}=me.getLocalizedStrings(),{visual:Wr}=Yh,{accountRecon:ke}=Zh,qr=e=>[{label:ke.review.formLabels.allBankAccounts,options:e.map(i=>({label:i.accountName,value:i.accountId}))}],Kr=e=>[{label:ke.review.formLabels.allCreditCards,options:e.map(i=>({label:i.accountName,value:i.accountId}))}],Ps=e=>`${kt}_${e}_form`,Oe=(e,i)=>`${kt}.${e}.${i}`,Xh=e=>{const{sortKey:i,sortOrder:l,accountReconEntity:r,entitySearchAutoCompleteActions:u,allAccountList:d,classList:a,localData:c,accountListNestedAccountHierarchy:h,classListNestedAccountHierarchy:m,selectedAccountId:p,entitySearchAutoCompleteData:g,excludeFetchById:x,saveFetchById:y,reviewTabSelectedVendorByTransactionId:b,refreshStatus:S,updateLocalData:$,onColumnSortConfigChanged:v,onSaveReconciliation:T,onSaveReconciliationReview:I,onReconMatchedTransactionClick:w,bankAccounts:k,creditCards:j}=e,{transactionsToReview:C,account:{accountType:z}}=r,A=s.useRef(null),[R,P]=s.useState(null),V=D=>{const M=C[D],ae=Er(M),F=Dr(M),L=Mr(M,z??"bank"),U=Or(M,z??"bank"),X=zr(M),ce=Go(M),ge=M.recommendedAction.recommendedTransactions[0]?.merchantName!=null;return M.transactionId===R?F||L||U||X||ce?275+(ge?25:0):ae?185+M.recommendedAction.recommendedTransactions.length*40+(ge?25:0):146:72},q=s.useMemo(()=>({onColumnSortConfigChanged:v,sortConfig:{sortKey:i,sortOrder:l}}),[v,i,l]);if(s.useEffect(()=>{P(C[0]?.transactionId??null),A.current?.resetAfterIndex(0)},[i,l]),s.useEffect(()=>{A.current?.resetAfterIndex(0)},[R]),s.useEffect(()=>{A.current?.resetAfterIndex(0)},[C.length]),s.useEffect(()=>{S.fetchState==="Completed"&&A.current?.resetAfterIndex(0)},[S]),C.length===0){const D=We("reconciliation",void 0,p).tabs.find(M=>M.id==="review")?.allDoneText;return t.jsx(bp,{children:t.jsx(It,{tab:"reconciliation",title:D?.title??Dt.strings.empty,subTitle:D?.subTitle??Dt.strings.empty})})}return t.jsx(rp,{children:t.jsx(Jr.Provider,{value:q,children:t.jsx(Jn,{children:({height:D,width:M})=>t.jsx(Pi,{width:M,height:D,innerElementType:Qr,ref:A,itemCount:C.length,itemSize:V,itemKey:ae=>C[ae].transactionId,overscanCount:zc,itemData:{transactionsList:C,expandedRowId:R,allAccountList:d,classList:a,accountListNestedAccountHierarchy:h,classListNestedAccountHierarchy:m,localData:c,entitySearchAutoCompleteData:g,entitySearchAutoCompleteActions:u,excludeFetchById:x,saveFetchById:y,reviewTabSelectedVendorByTransactionId:b,bankAccounts:k,creditCards:j,accountType:z,updateLocalData:$,setExpandedRowId:P,onSaveReconciliation:T,onSaveReconciliationReview:I,onReconMatchedTransactionClick:w},initialScrollOffset:0,children:ep})})})})},Jr=s.createContext(void 0),Qr=s.forwardRef((e,i)=>{const{children:l,style:r,...u}=e,d=s.useContext(Jr);return t.jsxs(lp,{ref:i,style:{...r,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)",padding:`${n.sp0} ${n.sp8}`},...u,children:[d!=null&&t.jsx(Uh,{onColumnSortConfigChanged:d.onColumnSortConfigChanged,sortConfig:d.sortConfig}),t.jsx(cp,{children:l})]})});Qr.displayName="Account recon review table inner element type";const ep=({index:e,style:i,data:l})=>{const{selectedTransactionId:r}=zi(),{transactionsList:u,expandedRowId:d,setExpandedRowId:a,entitySearchAutoCompleteActions:c,allAccountList:h,classList:m,localData:p,updateLocalData:g,accountListNestedAccountHierarchy:x,classListNestedAccountHierarchy:y,entitySearchAutoCompleteData:b,onSaveReconciliation:S,onSaveReconciliationReview:$,onReconMatchedTransactionClick:v,excludeFetchById:T,saveFetchById:I,reviewTabSelectedVendorByTransactionId:w,bankAccounts:k,creditCards:j,accountType:C}=l,z=u[e],A=r!=null&&r===z.transactionId;return t.jsx(ap,{isPanelSelected:A,style:{...i,width:"100%"},children:t.jsx(tp,{transaction:z,expandedRowId:d,setExpandedRowId:a,entitySearchAutoCompleteActions:c,accountListNestedAccountHierarchy:x,allAccountList:h,classList:m,localData:p,updateLocalData:g,entitySearchAutoCompleteData:b,classListNestedAccountHierarchy:y,onSaveReconciliation:S,onSaveReconciliationReview:$,onReconMatchedTransactionClick:v,excludeFetchById:T,saveFetchById:I,selectedVendor:w[z.transactionId],bankAccounts:k,creditCards:j,accountType:C})})},tp=({transaction:e,expandedRowId:i,accountListNestedAccountHierarchy:l,entitySearchAutoCompleteActions:r,allAccountList:u,classList:d,classListNestedAccountHierarchy:a,localData:c,entitySearchAutoCompleteData:h,excludeFetchById:m,saveFetchById:p,selectedVendor:g,bankAccounts:x,creditCards:y,accountType:b,setExpandedRowId:S,updateLocalData:$,onSaveReconciliation:v,onSaveReconciliationReview:T,onReconMatchedTransactionClick:I})=>{const w=i===e.transactionId,k=be(),j=Ze(),C=c[e.transactionId],z=e.recommendedAction.action==="record_bill_payment",A=e.recommendedAction.action==="record_expense",R=Go(e),P=u.find(D=>D.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),V=D=>D.recommendedAction.recommendedTransactions.length>0&&D.recommendedAction.recommendedTransactions[0].merchantName!=null?D.recommendedAction.recommendedTransactions[0].merchantName:Dt.strings.hyphen,q=e.recommendedAction.recommendedTransactions[0]?.merchantName;return t.jsxs(ip,{className:"recon-row-card",isQuickViewMode:j,isExpanded:w,children:[t.jsxs(op,{isExpanded:w,onClick:()=>S(e.transactionId),"data-testid":B("account-reconciliation-review-row",e.transactionId),children:[j?null:t.jsx(Sn,{windowSize:k,responsiveWidth:Ft[0].width,children:t.jsx(vn,{children:e.transactionDate.format(Wr.MMMDCommaYYYYformat)})}),t.jsx(Sn,{windowSize:k,responsiveWidth:j?Oo[0].width:Ft[1].width,children:t.jsx(vn,{children:t.jsx(qe,{itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"},text:V(e)})})}),j?null:t.jsxs(t.Fragment,{children:[t.jsx(Sn,{windowSize:k,responsiveWidth:Ft[2].width,children:t.jsx(vn,{children:t.jsx(qe,{itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"},text:e.memo})})}),t.jsx(Sn,{windowSize:k,responsiveWidth:Ft[3].width,children:t.jsx(vn,{style:{textTransform:"capitalize"},children:e.transactionDirection})}),t.jsxs(Sn,{windowSize:k,responsiveWidth:Ft[4].width,children:[t.jsx(Ge,{controller:z,children:t.jsx(vp,{children:t.jsx(Sp,{children:ke.review.matchesCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())})})}),t.jsx(Ge,{controller:!z,children:t.jsx(vn,{children:P!=null?t.jsxs(t.Fragment,{children:[t.jsx(Gr,{}),t.jsx(qe,{itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"},text:P.accountName})]}):Dt.strings.hyphen})})]})]}),t.jsx(Sn,{windowSize:k,isLastColumn:!0,responsiveWidth:j?Oo[1].width:Ft[5].width,children:t.jsx(vn,{children:Jo("0,0.00",e.amount.amount,e.amount.currencySymbol)})})]}),t.jsxs(Ge,{controller:w&&C!=null,children:[t.jsx(np,{onSaveReconciliation:v,onSaveReconciliationReview:T,updateLocalData:$,saveFetchById:p,excludeFetchById:m,localData:C,classListNestedAccountHierarchy:a,allAccountList:u,classList:d,transaction:e,accountListNestedAccountHierarchy:l,entitySearchAutoCompleteActions:r,entitySearchAutoCompleteData:h,selectedVendor:g,bankAccounts:x,creditCards:y,accountType:b,onReconMatchedTransactionClick:I}),t.jsx(Ge,{controller:(z||A||R)&&q!=null,children:t.jsx(jp,{children:t.jsxs($p,{children:[b==="credit_card"?ke.review.creditCardDetail:ke.review.bankDetail,Dt.strings.colon," ",q]})})})]})]})},np=({transaction:e,accountListNestedAccountHierarchy:i,entitySearchAutoCompleteActions:l,allAccountList:r,classList:u,classListNestedAccountHierarchy:d,localData:a,entitySearchAutoCompleteData:c,excludeFetchById:h,saveFetchById:m,selectedVendor:p,bankAccounts:g,creditCards:x,accountType:y,updateLocalData:b,onSaveReconciliation:S,onSaveReconciliationReview:$,onReconMatchedTransactionClick:v})=>{const T=Tt(),I=Ze(),[w,k]=s.useState(!a.vendor?.id),[j,C]=s.useState(!a.customer?.id),[z,A]=s.useState(a.categoryId==null),[R,P]=s.useState(a.classId==null),[V,q]=s.useState(a.bankAccountId==null),[D,M]=s.useState(a.creditCardId==null),[ae,F]=s.useState(!a.memo),L=Er(e),U=Dr(e),X=Or(e,y??"bank"),ce=Mr(e,y??"bank"),ge=zr(e),te=Go(e),J=s.useMemo(()=>{if(!U&&!te)return Kt(i);if(p!=null&&p.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Kt(i,p?.recommendations);const E=r.find($e=>$e.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),de=E!=null?{...E,reason:ke.review.zeniGptRecommendation,min:0,max:0}:void 0;return Kt(i,[{account:de}])},[U,te,p,e.recommendedAction.recommendedTransactions,r,i]),ee=s.useMemo(()=>{if(!U&&!te)return $i(d);if(p!=null&&p.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return $i(d,p?.recommendations);const E=u.find($e=>$e.classId===e.recommendedAction.recommendedTransactions[0]?.classId),de=E!=null?{...E,reason:ke.review.zeniGptRecommendation,min:0,max:0}:void 0;return $i(d,[{class:de}])},[U,te,p,e.recommendedAction.recommendedTransactions,u,d]),W=xn({mode:"onSubmit",reValidateMode:"onSubmit",shouldFocusError:!0,defaultValues:s.useMemo(()=>Fs(e,a,J,r,ee,g,x,c),[e,a,ee,r,J,g,x,c]),values:s.useMemo(()=>Fs(e,a,J,r,ee,g,x,c),[e,a,ee,r,J,g,x,c])}),_=async(E,de)=>{E.includes("memo")||b(_s(de,e,c,r),e.transactionId,E.includes("vendor"))};s.useEffect(()=>{const E=W.watch((de,{name:$e})=>{$e!=null&&de!=null&&Yn(()=>_($e,de))});return()=>{E.unsubscribe()}});const ne=s.useCallback(E=>{if(!I){if(U||ge||te){if((U||te)&&a.vendor==null){k(!1),W.setError(Oe(e.transactionId,"vendor"),{type:"required"});return}if(ge&&a.customer==null){C(!1),W.setError(Oe(e.transactionId,"customer"),{type:"required"});return}if(a.categoryId==null){A(!1),W.setError(Oe(e.transactionId,"category"),{type:"required"});return}}b(_s(E,e,c,r),e.transactionId,!1),$(e.transactionId)}},[I,U,te,ge,b,e,c,r,$,a.categoryId,a.vendor,a.customer]),H=W.watch(Oe(e.transactionId,"vendor")),Z=W.watch(Oe(e.transactionId,"customer")),oe=s.useRef(),K=s.useMemo(()=>U||te?"vendor":ge?"customer":null,[U,te,ge]),N=(E,de)=>{K!=null&&l.onAutoCompleteInputChange?.(E,K),oe.current=de};s.useEffect(()=>{c.entityAutoCompleteView.fetchState==="Completed"&&((U||te)&&oe.current?.(kr(c.entityAutoCompleteView)),ge&&oe.current?.(Kc(c.entityAutoCompleteView)))},[c.entityAutoCompleteView,ge,U,te]);const O=E=>u.filter(de=>de.classId===E)[0]?.accountingClassNumber??void 0,se=E=>r.filter(de=>de.qboId===E)[0]?.qboId,Y=s.useMemo(()=>{if(y==="bank")switch(e.recommendedAction.action){case"record_bill_payment":return["record_bill_payment"];case"record_cc_payment":case"record_expense":case"record_transfer":return["record_expense","record_transfer","record_cc_payment"];default:return["record_deposit","record_cc_credit"]}else switch(e.transactionDirection){case"payment":return["record_expense"];case"deposit":return["record_cc_credit","record_cc_payment"];default:return[]}},[y,e.recommendedAction.action,e.transactionDirection]),G=()=>{I||A(!1)},je=()=>{I||q(!1)},Te=()=>{I||M(!1)};return s.useEffect(()=>{z===!1&&a.categoryId==null&&W.setFocus(Oe(e.transactionId,"category"))},[z]),s.useEffect(()=>{R===!1&&a.classId==null&&W.setFocus(Oe(e.transactionId,"class"))},[R]),s.useEffect(()=>{w===!1&&a.vendor==null&&W.setFocus(Oe(e.transactionId,"vendor"))},[w]),s.useEffect(()=>{j===!1&&a.customer==null&&W.setFocus(Oe(e.transactionId,"customer"))},[j]),s.useEffect(()=>{V===!1&&a.bankAccountId==null&&W.setFocus(Oe(e.transactionId,"bankAccount"))},[V]),s.useEffect(()=>{D===!1&&a.creditCardId==null&&W.setFocus(Oe(e.transactionId,"creditCard"))},[D]),t.jsx(fn,{...W,children:t.jsx("form",{onSubmit:W.handleSubmit(ne),id:Ps(e.transactionId),children:t.jsxs(sp,{children:[t.jsxs(dp,{children:[t.jsxs(pp,{children:[t.jsxs(mp,{children:[t.jsx(Gr,{}),t.jsx(qi,{label:{label:L?ke.review.formLabels.match:ke.review.formLabels.categorize},radioField:{name:Oe(e.transactionId,"match_radio"),id:L?"match":"categorize",value:L?"match":"categorize",checked:!0,style:{width:n.sp3,height:n.sp3,padding:"2px"}},style:{width:"auto"}})]}),t.jsx(Ge,{controller:!L,children:t.jsxs(t.Fragment,{children:[t.jsx(Bs,{}),Y.map(E=>t.jsx(qi,{label:{label:ke.review.formLabels[E]},style:{width:"auto"},isDisabled:"readonly",changeLabelColorInDisableMode:!0,radioField:{name:Oe(e.transactionId,"recommendedActionType"),id:E,value:E,style:{width:n.sp3,height:n.sp3,padding:"2px"}}},E))]})})]}),t.jsxs(hp,{children:[t.jsx(Wn,{variant:"secondary",size:"small",label:ke.review.formLabels.exclude,loading:h[e.transactionId]?.fetchState==="In-Progress","data-testid":B("account-reconciliation-review-exclude-button",e.transactionId),style:{width:n.sp10},reverseSpinnerColor:!1,onClick:()=>{I||S({reconcileAction:"exclude",excludeTransactionId:e.transactionId})}}),t.jsx(Wn,{form:Ps(e.transactionId),"data-testid":B("account-reconciliation-review-save-button",e.transactionId),label:Dt.footer.save,style:{width:n.sp10},variant:"primary",size:"small",type:"submit",loading:m[e.transactionId]?.fetchState==="In-Progress"})]})]}),t.jsx(Ge,{controller:U||ge||te,children:t.jsxs(Yi,{children:[t.jsx(Ge,{controller:U||te,children:t.jsx($t,{onClickAway:()=>{a.vendor==null&&w===!1&&k(!0)},children:t.jsx(re,{style:{flex:1,padding:f[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(Et,{className:"hover-background",style:{padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Dt.texts.vendor}),t.jsx(pe,{style:{gap:f[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:w===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&k(!1)},"data-testid":B("account-reconciliation-review-add-vendor-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(rn,{}),ke.review.formLabels.addVendor]}):t.jsx(Ro,{name:Oe(e.transactionId,"vendor"),allowEmpty:!1,placeholder:ke.review.formLabels.addVendor,valueToId:E=>E,defaultValue:{selectedOption:H?.selectedOption,defaultOptions:H?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:n.sp4})},registerOptions:{required:!0,validate:E=>!!E.selectedOption},loadOptions:N})})})]})})})}),t.jsx(Ge,{controller:ge,children:t.jsx($t,{onClickAway:()=>{a.customer==null&&j===!1&&C(!0)},children:t.jsx(re,{style:{flex:1,padding:f[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(Et,{className:"hover-background",style:{padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Dt.texts.customer}),t.jsx(pe,{style:{gap:f[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:j===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&C(!1)},"data-testid":B("account-reconciliation-review-add-customer-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(rn,{}),ke.review.formLabels.addCustomer]}):t.jsx(Ro,{name:Oe(e.transactionId,"customer"),allowEmpty:!1,placeholder:ke.review.formLabels.addCustomer,valueToId:E=>E,defaultValue:{selectedOption:Z?.selectedOption,defaultOptions:Z?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:n.sp4})},registerOptions:{required:!0,validate:E=>!!E.selectedOption},loadOptions:N})})})]})})})}),t.jsx($t,{onClickAway:()=>{a.categoryId==null&&z===!1&&A(!0)},children:t.jsx(re,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Et,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Dt.texts.category}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:z===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&G()},"data-testid":B("account-reconciliation-review-add-category-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(rn,{}),ke.review.formLabels.addCategory]}):t.jsx(Tn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"category"),placeholder:ke.review.formLabels.addCategory,valueToId:E=>se(E),defaultValue:{allOptions:J,selectedOption:r.find(E=>E.accountId===a.categoryId)?.qboId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})}),t.jsx($t,{onClickAway:()=>{a.classId==null&&R===!1&&P(!0)},children:t.jsx(re,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Et,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Dt.texts.class}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:R===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&P(!1)},"data-testid":B("account-reconciliation-review-add-class-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(rn,{}),ke.review.formLabels.addClass]}):t.jsx(Tn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"class"),placeholder:ke.review.formLabels.addClass,valueToId:E=>O(E),defaultValue:{allOptions:ee,selectedOption:a.classId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})})]})}),t.jsx(Ge,{controller:L,children:t.jsxs(gp,{children:[t.jsxs(xp,{children:[t.jsx("span",{className:"matched-text",children:`${ke.review.matchedFoundCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())} `}),ke.review.matchesFoundFullInfo]}),t.jsx(yp,{children:e.recommendedAction.recommendedTransactions.map(E=>E.bookTransactionId!=null?t.jsxs(wp,{children:[t.jsx(qi,{label:{label:t.jsxs(fp,{children:[t.jsx(Re,{children:E.date.format(Wr.MMMDCommaYYYYformat)}),t.jsx(Re,{children:E.memo})]})},style:{width:"auto"},isDisabled:void 0,changeLabelColorInDisableMode:!0,radioField:{name:Oe(e.transactionId,"matchedTransaction"),registerOptions:{required:!0},id:E.bookTransactionId,value:E.bookTransactionId,style:{width:n.sp3,height:n.sp3,padding:"2px"}}}),t.jsxs(kp,{"data-testid":B("account-reconciliation-review-matched-transaction-amount",E.bookTransactionId),onClick:()=>{E.bookTransactionId!=null&&v(E.bookTransactionId)},children:[t.jsx(Cp,{children:Jo("0,0.00",E.amount.amount,E.amount.currencySymbol)}),t.jsx(Bs,{})]})]},E.bookTransactionId):null)})]})}),t.jsx(Ge,{controller:X,children:t.jsx(Yi,{children:t.jsx($t,{onClickAway:()=>{a.bankAccountId==null&&V===!1&&q(!0)},children:t.jsx(re,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Et,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:y==="credit_card"?ke.review.formLabels.selectAccount:ke.review.formLabels.transferTo}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:V===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&je()},"data-testid":B("account-reconciliation-review-add-account-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(rn,{}),ke.review.formLabels.selectAccount]}):t.jsx(Tn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"bankAccount"),placeholder:ke.review.formLabels.selectAccount,defaultValue:{allOptions:qr(g),selectedOption:a.bankAccountId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})})})}),t.jsx(Ge,{controller:ce,children:t.jsx(Yi,{children:t.jsx($t,{onClickAway:()=>{a.creditCardId==null&&D===!1&&M(!0)},children:t.jsx(re,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Et,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:ke.review.formLabels.creditCard}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:D===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&Te()},"data-testid":B("account-reconciliation-review-add-credit-card-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(rn,{}),ke.review.formLabels.selectCard]}):t.jsx(Tn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"creditCard"),placeholder:ke.review.formLabels.selectCard,defaultValue:{allOptions:Kr(x),selectedOption:a.creditCardId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})})})}),t.jsx(Ge,{controller:!L,children:t.jsx(up,{children:t.jsx(re,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",width:"100%"},children:t.jsxs(Et,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:ke.review.header.memo}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:ae===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&F(!1)},"data-testid":B("account-reconciliation-review-add-memo-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(rn,{}),ke.review.formLabels.addMemo]}):t.jsx(Jc,{name:Oe(e.transactionId,"memo"),placeholder:ke.review.formLabels.addMemo,type:"text",style:{padding:0,textAlign:"left",width:"100%",background:"transparent"}})})})]})})})})]})})})},fi={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:n.sp4}),singleValue:()=>({margin:0}),menuPortal:()=>({zIndex:9999}),menu:()=>({width:`calc(100% + ${n.sp5})`,marginRight:`-${n.sp3}`,marginLeft:`-${n.sp3}`})},Fs=(e,i,l,r,u,d,a,c)=>{const h=r.find(m=>m.accountId===i.categoryId);return{[kt]:{[e.transactionId]:{category:{selectedOption:h?.qboId,allOptions:l},class:{selectedOption:i?.classId,allOptions:u},bankAccount:{selectedOption:i?.bankAccountId,allOptions:qr(d)},creditCard:{selectedOption:i?.creditCardId,allOptions:Kr(a)},memo:i?.memo,recommendedActionType:e.recommendedAction.action,matchedTransaction:i?.matchedTransactionId,vendor:{selectedOption:i?.vendor?.id,defaultOptions:Lr(c.entityAutoCompleteView,i?.vendor)},customer:{selectedOption:i?.customer?.id,defaultOptions:od(i?.customer,c.entityAutoCompleteView)}}}}},_s=(e,i,l,r)=>{const{vendor:u,customer:d}=e[kt][i.transactionId];let a;if(u.selectedOption!=null){const h=u.defaultOptions.find(m=>m.value===u.selectedOption);if(h!=null)a={id:u.selectedOption,name:h.label};else{const m=l.entityAutoCompleteView.vendor.find(p=>p.id===u.selectedOption||p.zeniId===u.selectedOption);m!=null&&(a={id:m.zeniId,name:m.name})}}let c;if(d.selectedOption!=null){const h=d.defaultOptions.find(m=>m.value===d.selectedOption);if(h!=null)c={id:d.selectedOption,name:h.label};else{const m=l.entityAutoCompleteView.customer.find(p=>p.id===d.selectedOption||p.zeniId===d.selectedOption);m!=null&&(c={id:m.zeniId,name:m.name})}}return{categoryId:r.find(h=>h.qboId===e[kt][i.transactionId].category.selectedOption)?.accountId??e[kt][i.transactionId].category.selectedOption,classId:e[kt][i.transactionId].class.selectedOption,memo:e[kt][i.transactionId].memo,matchedTransactionId:e[kt][i.transactionId].matchedTransaction,vendor:a,bankAccountId:e[kt][i.transactionId].bankAccount.selectedOption,creditCardId:e[kt][i.transactionId].creditCard.selectedOption,customer:c}},vn=o(Re)`
580
+ `,kt="accountReconReviewTableSection",{dateFormat:Yh,expenseAutomation:Zh,common:Dt}=me.getLocalizedStrings(),{visual:Hr}=Yh,{accountRecon:ke}=Zh,qr=e=>[{label:ke.review.formLabels.allBankAccounts,options:e.map(i=>({label:i.accountName,value:i.accountId}))}],Kr=e=>[{label:ke.review.formLabels.allCreditCards,options:e.map(i=>({label:i.accountName,value:i.accountId}))}],Ps=e=>`${kt}_${e}_form`,Oe=(e,i)=>`${kt}.${e}.${i}`,Xh=e=>{const{sortKey:i,sortOrder:l,accountReconEntity:r,entitySearchAutoCompleteActions:u,allAccountList:d,classList:a,localData:c,accountListNestedAccountHierarchy:h,classListNestedAccountHierarchy:m,selectedAccountId:p,entitySearchAutoCompleteData:g,excludeFetchById:x,saveFetchById:y,reviewTabSelectedVendorByTransactionId:b,refreshStatus:S,updateLocalData:$,onColumnSortConfigChanged:v,onSaveReconciliation:T,onSaveReconciliationReview:I,onReconMatchedTransactionClick:w,bankAccounts:k,creditCards:j}=e,{transactionsToReview:C,account:{accountType:z}}=r,A=s.useRef(null),[R,P]=s.useState(null),V=D=>{const M=C[D],ae=Er(M),F=Dr(M),L=Mr(M,z??"bank"),U=Or(M,z??"bank"),X=zr(M),ce=Go(M),ge=M.recommendedAction.recommendedTransactions[0]?.merchantName!=null;return M.transactionId===R?F||L||U||X||ce?275+(ge?25:0):ae?185+M.recommendedAction.recommendedTransactions.length*40+(ge?25:0):146:72},q=s.useMemo(()=>({onColumnSortConfigChanged:v,sortConfig:{sortKey:i,sortOrder:l}}),[v,i,l]);if(s.useEffect(()=>{P(C[0]?.transactionId??null),A.current?.resetAfterIndex(0)},[i,l]),s.useEffect(()=>{A.current?.resetAfterIndex(0)},[R]),s.useEffect(()=>{A.current?.resetAfterIndex(0)},[C.length]),s.useEffect(()=>{S.fetchState==="Completed"&&A.current?.resetAfterIndex(0)},[S]),C.length===0){const D=He("reconciliation",void 0,p).tabs.find(M=>M.id==="review")?.allDoneText;return t.jsx(bp,{children:t.jsx(It,{tab:"reconciliation",title:D?.title??Dt.strings.empty,subTitle:D?.subTitle??Dt.strings.empty})})}return t.jsx(rp,{children:t.jsx(Jr.Provider,{value:q,children:t.jsx(Jn,{children:({height:D,width:M})=>t.jsx(Pi,{width:M,height:D,innerElementType:Qr,ref:A,itemCount:C.length,itemSize:V,itemKey:ae=>C[ae].transactionId,overscanCount:zc,itemData:{transactionsList:C,expandedRowId:R,allAccountList:d,classList:a,accountListNestedAccountHierarchy:h,classListNestedAccountHierarchy:m,localData:c,entitySearchAutoCompleteData:g,entitySearchAutoCompleteActions:u,excludeFetchById:x,saveFetchById:y,reviewTabSelectedVendorByTransactionId:b,bankAccounts:k,creditCards:j,accountType:z,updateLocalData:$,setExpandedRowId:P,onSaveReconciliation:T,onSaveReconciliationReview:I,onReconMatchedTransactionClick:w},initialScrollOffset:0,children:ep})})})})},Jr=s.createContext(void 0),Qr=s.forwardRef((e,i)=>{const{children:l,style:r,...u}=e,d=s.useContext(Jr);return t.jsxs(lp,{ref:i,style:{...r,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)",padding:`${n.sp0} ${n.sp8}`},...u,children:[d!=null&&t.jsx(Uh,{onColumnSortConfigChanged:d.onColumnSortConfigChanged,sortConfig:d.sortConfig}),t.jsx(cp,{children:l})]})});Qr.displayName="Account recon review table inner element type";const ep=({index:e,style:i,data:l})=>{const{selectedTransactionId:r}=zi(),{transactionsList:u,expandedRowId:d,setExpandedRowId:a,entitySearchAutoCompleteActions:c,allAccountList:h,classList:m,localData:p,updateLocalData:g,accountListNestedAccountHierarchy:x,classListNestedAccountHierarchy:y,entitySearchAutoCompleteData:b,onSaveReconciliation:S,onSaveReconciliationReview:$,onReconMatchedTransactionClick:v,excludeFetchById:T,saveFetchById:I,reviewTabSelectedVendorByTransactionId:w,bankAccounts:k,creditCards:j,accountType:C}=l,z=u[e],A=r!=null&&r===z.transactionId;return t.jsx(ap,{isPanelSelected:A,style:{...i,width:"100%"},children:t.jsx(tp,{transaction:z,expandedRowId:d,setExpandedRowId:a,entitySearchAutoCompleteActions:c,accountListNestedAccountHierarchy:x,allAccountList:h,classList:m,localData:p,updateLocalData:g,entitySearchAutoCompleteData:b,classListNestedAccountHierarchy:y,onSaveReconciliation:S,onSaveReconciliationReview:$,onReconMatchedTransactionClick:v,excludeFetchById:T,saveFetchById:I,selectedVendor:w[z.transactionId],bankAccounts:k,creditCards:j,accountType:C})})},tp=({transaction:e,expandedRowId:i,accountListNestedAccountHierarchy:l,entitySearchAutoCompleteActions:r,allAccountList:u,classList:d,classListNestedAccountHierarchy:a,localData:c,entitySearchAutoCompleteData:h,excludeFetchById:m,saveFetchById:p,selectedVendor:g,bankAccounts:x,creditCards:y,accountType:b,setExpandedRowId:S,updateLocalData:$,onSaveReconciliation:v,onSaveReconciliationReview:T,onReconMatchedTransactionClick:I})=>{const w=i===e.transactionId,k=be(),j=Ze(),C=c[e.transactionId],z=e.recommendedAction.action==="record_bill_payment",A=e.recommendedAction.action==="record_expense",R=Go(e),P=u.find(D=>D.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),V=D=>D.recommendedAction.recommendedTransactions.length>0&&D.recommendedAction.recommendedTransactions[0].merchantName!=null?D.recommendedAction.recommendedTransactions[0].merchantName:Dt.strings.hyphen,q=e.recommendedAction.recommendedTransactions[0]?.merchantName;return t.jsxs(ip,{className:"recon-row-card",isQuickViewMode:j,isExpanded:w,children:[t.jsxs(op,{isExpanded:w,onClick:()=>S(e.transactionId),"data-testid":B("account-reconciliation-review-row",e.transactionId),children:[j?null:t.jsx(Sn,{windowSize:k,responsiveWidth:Ft[0].width,children:t.jsx(vn,{children:e.transactionDate.format(Hr.MMMDCommaYYYYformat)})}),t.jsx(Sn,{windowSize:k,responsiveWidth:j?Oo[0].width:Ft[1].width,children:t.jsx(vn,{children:t.jsx(qe,{itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"},text:V(e)})})}),j?null:t.jsxs(t.Fragment,{children:[t.jsx(Sn,{windowSize:k,responsiveWidth:Ft[2].width,children:t.jsx(vn,{children:t.jsx(qe,{itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"},text:e.memo})})}),t.jsx(Sn,{windowSize:k,responsiveWidth:Ft[3].width,children:t.jsx(vn,{style:{textTransform:"capitalize"},children:e.transactionDirection})}),t.jsxs(Sn,{windowSize:k,responsiveWidth:Ft[4].width,children:[t.jsx(Ge,{controller:z,children:t.jsx(vp,{children:t.jsx(Sp,{children:ke.review.matchesCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())})})}),t.jsx(Ge,{controller:!z,children:t.jsx(vn,{children:P!=null?t.jsxs(t.Fragment,{children:[t.jsx(Gr,{}),t.jsx(qe,{itemTextStyle:{...yt.standardRegular.cssObject,color:"inherit"},text:P.accountName})]}):Dt.strings.hyphen})})]})]}),t.jsx(Sn,{windowSize:k,isLastColumn:!0,responsiveWidth:j?Oo[1].width:Ft[5].width,children:t.jsx(vn,{children:Jo("0,0.00",e.amount.amount,e.amount.currencySymbol)})})]}),t.jsxs(Ge,{controller:w&&C!=null,children:[t.jsx(np,{onSaveReconciliation:v,onSaveReconciliationReview:T,updateLocalData:$,saveFetchById:p,excludeFetchById:m,localData:C,classListNestedAccountHierarchy:a,allAccountList:u,classList:d,transaction:e,accountListNestedAccountHierarchy:l,entitySearchAutoCompleteActions:r,entitySearchAutoCompleteData:h,selectedVendor:g,bankAccounts:x,creditCards:y,accountType:b,onReconMatchedTransactionClick:I}),t.jsx(Ge,{controller:(z||A||R)&&q!=null,children:t.jsx(jp,{children:t.jsxs($p,{children:[b==="credit_card"?ke.review.creditCardDetail:ke.review.bankDetail,Dt.strings.colon," ",q]})})})]})]})},np=({transaction:e,accountListNestedAccountHierarchy:i,entitySearchAutoCompleteActions:l,allAccountList:r,classList:u,classListNestedAccountHierarchy:d,localData:a,entitySearchAutoCompleteData:c,excludeFetchById:h,saveFetchById:m,selectedVendor:p,bankAccounts:g,creditCards:x,accountType:y,updateLocalData:b,onSaveReconciliation:S,onSaveReconciliationReview:$,onReconMatchedTransactionClick:v})=>{const T=Tt(),I=Ze(),[w,k]=s.useState(!a.vendor?.id),[j,C]=s.useState(!a.customer?.id),[z,A]=s.useState(a.categoryId==null),[R,P]=s.useState(a.classId==null),[V,q]=s.useState(a.bankAccountId==null),[D,M]=s.useState(a.creditCardId==null),[ae,F]=s.useState(!a.memo),L=Er(e),U=Dr(e),X=Or(e,y??"bank"),ce=Mr(e,y??"bank"),ge=zr(e),te=Go(e),J=s.useMemo(()=>{if(!U&&!te)return Kt(i);if(p!=null&&p.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Kt(i,p?.recommendations);const E=r.find($e=>$e.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),de=E!=null?{...E,reason:ke.review.zeniGptRecommendation,min:0,max:0}:void 0;return Kt(i,[{account:de}])},[U,te,p,e.recommendedAction.recommendedTransactions,r,i]),ee=s.useMemo(()=>{if(!U&&!te)return $i(d);if(p!=null&&p.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return $i(d,p?.recommendations);const E=u.find($e=>$e.classId===e.recommendedAction.recommendedTransactions[0]?.classId),de=E!=null?{...E,reason:ke.review.zeniGptRecommendation,min:0,max:0}:void 0;return $i(d,[{class:de}])},[U,te,p,e.recommendedAction.recommendedTransactions,u,d]),H=xn({mode:"onSubmit",reValidateMode:"onSubmit",shouldFocusError:!0,defaultValues:s.useMemo(()=>Fs(e,a,J,r,ee,g,x,c),[e,a,ee,r,J,g,x,c]),values:s.useMemo(()=>Fs(e,a,J,r,ee,g,x,c),[e,a,ee,r,J,g,x,c])}),_=async(E,de)=>{E.includes("memo")||b(_s(de,e,c,r),e.transactionId,E.includes("vendor"))};s.useEffect(()=>{const E=H.watch((de,{name:$e})=>{$e!=null&&de!=null&&Yn(()=>_($e,de))});return()=>{E.unsubscribe()}});const ne=s.useCallback(E=>{if(!I){if(U||ge||te){if((U||te)&&a.vendor==null){k(!1),H.setError(Oe(e.transactionId,"vendor"),{type:"required"});return}if(ge&&a.customer==null){C(!1),H.setError(Oe(e.transactionId,"customer"),{type:"required"});return}if(a.categoryId==null){A(!1),H.setError(Oe(e.transactionId,"category"),{type:"required"});return}}b(_s(E,e,c,r),e.transactionId,!1),$(e.transactionId)}},[I,U,te,ge,b,e,c,r,$,a.categoryId,a.vendor,a.customer]),W=H.watch(Oe(e.transactionId,"vendor")),Z=H.watch(Oe(e.transactionId,"customer")),oe=s.useRef(),K=s.useMemo(()=>U||te?"vendor":ge?"customer":null,[U,te,ge]),N=(E,de)=>{K!=null&&l.onAutoCompleteInputChange?.(E,K),oe.current=de};s.useEffect(()=>{c.entityAutoCompleteView.fetchState==="Completed"&&((U||te)&&oe.current?.(kr(c.entityAutoCompleteView)),ge&&oe.current?.(Kc(c.entityAutoCompleteView)))},[c.entityAutoCompleteView,ge,U,te]);const O=E=>u.filter(de=>de.classId===E)[0]?.accountingClassNumber??void 0,se=E=>r.filter(de=>de.qboId===E)[0]?.qboId,Y=s.useMemo(()=>{if(y==="bank")switch(e.recommendedAction.action){case"record_bill_payment":return["record_bill_payment"];case"record_cc_payment":case"record_expense":case"record_transfer":return["record_expense","record_transfer","record_cc_payment"];default:return["record_deposit","record_cc_credit"]}else switch(e.transactionDirection){case"payment":return["record_expense"];case"deposit":return["record_cc_credit","record_cc_payment"];default:return[]}},[y,e.recommendedAction.action,e.transactionDirection]),G=()=>{I||A(!1)},je=()=>{I||q(!1)},Te=()=>{I||M(!1)};return s.useEffect(()=>{z===!1&&a.categoryId==null&&H.setFocus(Oe(e.transactionId,"category"))},[z]),s.useEffect(()=>{R===!1&&a.classId==null&&H.setFocus(Oe(e.transactionId,"class"))},[R]),s.useEffect(()=>{w===!1&&a.vendor==null&&H.setFocus(Oe(e.transactionId,"vendor"))},[w]),s.useEffect(()=>{j===!1&&a.customer==null&&H.setFocus(Oe(e.transactionId,"customer"))},[j]),s.useEffect(()=>{V===!1&&a.bankAccountId==null&&H.setFocus(Oe(e.transactionId,"bankAccount"))},[V]),s.useEffect(()=>{D===!1&&a.creditCardId==null&&H.setFocus(Oe(e.transactionId,"creditCard"))},[D]),t.jsx(fn,{...H,children:t.jsx("form",{onSubmit:H.handleSubmit(ne),id:Ps(e.transactionId),children:t.jsxs(sp,{children:[t.jsxs(dp,{children:[t.jsxs(pp,{children:[t.jsxs(mp,{children:[t.jsx(Gr,{}),t.jsx(qi,{label:{label:L?ke.review.formLabels.match:ke.review.formLabels.categorize},radioField:{name:Oe(e.transactionId,"match_radio"),id:L?"match":"categorize",value:L?"match":"categorize",checked:!0,style:{width:n.sp3,height:n.sp3,padding:"2px"}},style:{width:"auto"}})]}),t.jsx(Ge,{controller:!L,children:t.jsxs(t.Fragment,{children:[t.jsx(Bs,{}),Y.map(E=>t.jsx(qi,{label:{label:ke.review.formLabels[E]},style:{width:"auto"},isDisabled:"readonly",changeLabelColorInDisableMode:!0,radioField:{name:Oe(e.transactionId,"recommendedActionType"),id:E,value:E,style:{width:n.sp3,height:n.sp3,padding:"2px"}}},E))]})})]}),t.jsxs(hp,{children:[t.jsx(Hn,{variant:"secondary",size:"small",label:ke.review.formLabels.exclude,loading:h[e.transactionId]?.fetchState==="In-Progress","data-testid":B("account-reconciliation-review-exclude-button",e.transactionId),style:{width:n.sp10},reverseSpinnerColor:!1,onClick:()=>{I||S({reconcileAction:"exclude",excludeTransactionId:e.transactionId})}}),t.jsx(Hn,{form:Ps(e.transactionId),"data-testid":B("account-reconciliation-review-save-button",e.transactionId),label:Dt.footer.save,style:{width:n.sp10},variant:"primary",size:"small",type:"submit",loading:m[e.transactionId]?.fetchState==="In-Progress"})]})]}),t.jsx(Ge,{controller:U||ge||te,children:t.jsxs(Yi,{children:[t.jsx(Ge,{controller:U||te,children:t.jsx($t,{onClickAway:()=>{a.vendor==null&&w===!1&&k(!0)},children:t.jsx(re,{style:{flex:1,padding:f[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(Et,{className:"hover-background",style:{padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Dt.texts.vendor}),t.jsx(pe,{style:{gap:f[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:w===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&k(!1)},"data-testid":B("account-reconciliation-review-add-vendor-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(rn,{}),ke.review.formLabels.addVendor]}):t.jsx(Ro,{name:Oe(e.transactionId,"vendor"),allowEmpty:!1,placeholder:ke.review.formLabels.addVendor,valueToId:E=>E,defaultValue:{selectedOption:W?.selectedOption,defaultOptions:W?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:n.sp4})},registerOptions:{required:!0,validate:E=>!!E.selectedOption},loadOptions:N})})})]})})})}),t.jsx(Ge,{controller:ge,children:t.jsx($t,{onClickAway:()=>{a.customer==null&&j===!1&&C(!0)},children:t.jsx(re,{style:{flex:1,padding:f[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(Et,{className:"hover-background",style:{padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Dt.texts.customer}),t.jsx(pe,{style:{gap:f[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:j===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&C(!1)},"data-testid":B("account-reconciliation-review-add-customer-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(rn,{}),ke.review.formLabels.addCustomer]}):t.jsx(Ro,{name:Oe(e.transactionId,"customer"),allowEmpty:!1,placeholder:ke.review.formLabels.addCustomer,valueToId:E=>E,defaultValue:{selectedOption:Z?.selectedOption,defaultOptions:Z?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:n.sp4})},registerOptions:{required:!0,validate:E=>!!E.selectedOption},loadOptions:N})})})]})})})}),t.jsx($t,{onClickAway:()=>{a.categoryId==null&&z===!1&&A(!0)},children:t.jsx(re,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Et,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Dt.texts.category}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:z===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&G()},"data-testid":B("account-reconciliation-review-add-category-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(rn,{}),ke.review.formLabels.addCategory]}):t.jsx(Tn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"category"),placeholder:ke.review.formLabels.addCategory,valueToId:E=>se(E),defaultValue:{allOptions:J,selectedOption:r.find(E=>E.accountId===a.categoryId)?.qboId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})}),t.jsx($t,{onClickAway:()=>{a.classId==null&&R===!1&&P(!0)},children:t.jsx(re,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Et,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Dt.texts.class}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:R===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&P(!1)},"data-testid":B("account-reconciliation-review-add-class-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(rn,{}),ke.review.formLabels.addClass]}):t.jsx(Tn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"class"),placeholder:ke.review.formLabels.addClass,valueToId:E=>O(E),defaultValue:{allOptions:ee,selectedOption:a.classId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})})]})}),t.jsx(Ge,{controller:L,children:t.jsxs(gp,{children:[t.jsxs(xp,{children:[t.jsx("span",{className:"matched-text",children:`${ke.review.matchedFoundCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())} `}),ke.review.matchesFoundFullInfo]}),t.jsx(yp,{children:e.recommendedAction.recommendedTransactions.map(E=>E.bookTransactionId!=null?t.jsxs(wp,{children:[t.jsx(qi,{label:{label:t.jsxs(fp,{children:[t.jsx(Re,{children:E.date.format(Hr.MMMDCommaYYYYformat)}),t.jsx(Re,{children:E.memo})]})},style:{width:"auto"},isDisabled:void 0,changeLabelColorInDisableMode:!0,radioField:{name:Oe(e.transactionId,"matchedTransaction"),registerOptions:{required:!0},id:E.bookTransactionId,value:E.bookTransactionId,style:{width:n.sp3,height:n.sp3,padding:"2px"}}}),t.jsxs(kp,{"data-testid":B("account-reconciliation-review-matched-transaction-amount",E.bookTransactionId),onClick:()=>{E.bookTransactionId!=null&&v(E.bookTransactionId)},children:[t.jsx(Cp,{children:Jo("0,0.00",E.amount.amount,E.amount.currencySymbol)}),t.jsx(Bs,{})]})]},E.bookTransactionId):null)})]})}),t.jsx(Ge,{controller:X,children:t.jsx(Yi,{children:t.jsx($t,{onClickAway:()=>{a.bankAccountId==null&&V===!1&&q(!0)},children:t.jsx(re,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Et,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:y==="credit_card"?ke.review.formLabels.selectAccount:ke.review.formLabels.transferTo}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:V===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&je()},"data-testid":B("account-reconciliation-review-add-account-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(rn,{}),ke.review.formLabels.selectAccount]}):t.jsx(Tn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"bankAccount"),placeholder:ke.review.formLabels.selectAccount,defaultValue:{allOptions:qr(g),selectedOption:a.bankAccountId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})})})}),t.jsx(Ge,{controller:ce,children:t.jsx(Yi,{children:t.jsx($t,{onClickAway:()=>{a.creditCardId==null&&D===!1&&M(!0)},children:t.jsx(re,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(Et,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:ke.review.formLabels.creditCard}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:D===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&Te()},"data-testid":B("account-reconciliation-review-add-credit-card-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(rn,{}),ke.review.formLabels.selectCard]}):t.jsx(Tn,{shouldShowChevronIcon:!1,menuPortal:document.body,name:Oe(e.transactionId,"creditCard"),placeholder:ke.review.formLabels.selectCard,defaultValue:{allOptions:Kr(x),selectedOption:a.creditCardId},registerOptions:{required:!0,validate:E=>!!E.selectedOption},customStyleConfig:fi})})})]})})})})}),t.jsx(Ge,{controller:!L,children:t.jsx(up,{children:t.jsx(re,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",width:"100%"},children:t.jsxs(Et,{className:"hover-background",children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:ke.review.header.memo}),t.jsx(pe,{className:"item-value-container",children:t.jsx(t.Fragment,{children:ae===!0?t.jsxs(we,{onClick:E=>{E.stopPropagation(),!I&&F(!1)},"data-testid":B("account-reconciliation-review-add-memo-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:f[1],color:T.colors.champion,cursor:"pointer"},children:[t.jsx(rn,{}),ke.review.formLabels.addMemo]}):t.jsx(Jc,{name:Oe(e.transactionId,"memo"),placeholder:ke.review.formLabels.addMemo,type:"text",style:{padding:0,textAlign:"left",width:"100%",background:"transparent"}})})})]})})})})]})})})},fi={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:n.sp4}),singleValue:()=>({margin:0}),menuPortal:()=>({zIndex:9999}),menu:()=>({width:`calc(100% + ${n.sp5})`,marginRight:`-${n.sp3}`,marginLeft:`-${n.sp3}`})},Fs=(e,i,l,r,u,d,a,c)=>{const h=r.find(m=>m.accountId===i.categoryId);return{[kt]:{[e.transactionId]:{category:{selectedOption:h?.qboId,allOptions:l},class:{selectedOption:i?.classId,allOptions:u},bankAccount:{selectedOption:i?.bankAccountId,allOptions:qr(d)},creditCard:{selectedOption:i?.creditCardId,allOptions:Kr(a)},memo:i?.memo,recommendedActionType:e.recommendedAction.action,matchedTransaction:i?.matchedTransactionId,vendor:{selectedOption:i?.vendor?.id,defaultOptions:Lr(c.entityAutoCompleteView,i?.vendor)},customer:{selectedOption:i?.customer?.id,defaultOptions:od(i?.customer,c.entityAutoCompleteView)}}}}},_s=(e,i,l,r)=>{const{vendor:u,customer:d}=e[kt][i.transactionId];let a;if(u.selectedOption!=null){const h=u.defaultOptions.find(m=>m.value===u.selectedOption);if(h!=null)a={id:u.selectedOption,name:h.label};else{const m=l.entityAutoCompleteView.vendor.find(p=>p.id===u.selectedOption||p.zeniId===u.selectedOption);m!=null&&(a={id:m.zeniId,name:m.name})}}let c;if(d.selectedOption!=null){const h=d.defaultOptions.find(m=>m.value===d.selectedOption);if(h!=null)c={id:d.selectedOption,name:h.label};else{const m=l.entityAutoCompleteView.customer.find(p=>p.id===d.selectedOption||p.zeniId===d.selectedOption);m!=null&&(c={id:m.zeniId,name:m.name})}}return{categoryId:r.find(h=>h.qboId===e[kt][i.transactionId].category.selectedOption)?.accountId??e[kt][i.transactionId].category.selectedOption,classId:e[kt][i.transactionId].class.selectedOption,memo:e[kt][i.transactionId].memo,matchedTransactionId:e[kt][i.transactionId].matchedTransaction,vendor:a,bankAccountId:e[kt][i.transactionId].bankAccount.selectedOption,creditCardId:e[kt][i.transactionId].creditCard.selectedOption,customer:c}},vn=o(Re)`
581
581
  display: flex;
582
582
  align-items: center;
583
583
  column-gap: ${n.sp1};
@@ -768,7 +768,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
768
768
  `,_p=o.div`
769
769
  width: 100%;
770
770
  height: 100%;
771
- `,{common:Bp}=me.getLocalizedStrings();function Vp({reconciliation:e,companyId:i,onReload:l,onReviewClicked:r,setOpenDrawerClicked:u,onFetchLinkTokenClick:d,onEstablishConnectionClick:a,onAddStatementClick:c}){const[h,m]=s.useState(void 0),[p,g]=s.useState(void 0),x=e.plaidConnectionDetails.link_account_no_microdeposit,y=e.plaidConnectionDetails.update_account,b=p==="update_account"?y:x,[S,$]=s.useState(b.linkToken??null),[v,T]=s.useState(!1),{useDynamicConfig:I}=pr(),{configValue:w}=I(mr.accountReconGLAccountsConfig),k=s.useCallback(K=>{m(K),g("link_account_no_microdeposit")},[]),j=s.useCallback(K=>{const N=R.current.accountReconciliationsByAccountID[K]?.paymentAccountId;m(K),g("update_account"),d("update_account",N)},[]),C=s.useCallback(K=>{u(K)},[]),z=s.useRef(h),A=s.useRef(p),R=s.useRef(e);s.useEffect(()=>{z.current=h},[h]),s.useEffect(()=>{A.current=p},[p]),s.useEffect(()=>{R.current=e},[e]);const P=s.useCallback(K=>{a(K,z.current??"",A.current),m(void 0),g(void 0),T(!1)},[a]),V=s.useCallback((K,N)=>{K!=null&&console.log("Plaid Connection Error",K,N),m(void 0),g(void 0),T(!1)},[]),{open:q,ready:D}=Sc({token:S,onSuccess:P,onExit:V});s.useEffect(()=>{(Di(new Date().toISOString()).isAfter(b.expiration)||b.linkToken==null)&&b.fetchStatus.fetchState==="Not-Started"&&d("link_account_no_microdeposit")},[b.fetchStatus.fetchState]),s.useEffect(()=>{!v&&p!=null&&b.linkToken===S&&b.fetchStatus.fetchState==="Completed"&&D&&T(!0)},[D,S,b.fetchStatus.fetchState,b.linkToken,p,v]),s.useEffect(()=>{b.fetchStatus.fetchState==="Completed"&&b.linkToken!=null&&b.linkToken!==S&&$(b.linkToken)},[b.fetchStatus.fetchState,b.linkToken,S]),s.useEffect(()=>{v&&q()},[v,q]);const[M,ae]=s.useState(void 0),[F,L]=s.useState(void 0),[U,X]=s.useState("assets"),ce=Di("2025-03-31"),ge=1,te="account_reconciliation",J=be(),ee=Tt();Gn({componentName:"expense_automation.account_reconciliation_list",enabled:e.fetchStatus.fetchState==="Completed"});const W=!0,_=Array.isArray(w?.[i])?w[i]:[],ne=e.accountReconciliationBySectionID.assets.accountIDs.filter(K=>!_.includes(K)).length,H=e.accountReconciliationBySectionID.liabilities.accountIDs.length>0,Z=Mp(ne,H),oe=s.useCallback(K=>{const N=K.scrollTop>=Z?"liabilities":"assets";N!==U&&X(N)},[Z,U]);return s.useEffect(()=>{const K={reportId:te,mode:"none",displayOrder:"ascending_date",reportFormat:"more_detailed",bookCloseDate:ce,firstMonthOfFY:ge,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,dataAvailable:void 0,accountReconciliationConfig:{selectedDrawerAccountId:e.selectedDrawerAccountId,onReviewClicked:r,onConnectClicked:k,onReconnectClicked:j,onOpenDrawerClicked:C,onStatementAddClicked:c}};if(M==null||!xr(F,e)){const N=Op(e,K,w,i,W,U);L(e),ae(N)}else{const N=zp(M,e,K,W,U);ae(N)}},[e,U]),e.fetchStatus.fetchState==="Error"?t.jsx(Pp,{children:t.jsx(kc,{onReload:l,message:Bp.errorMessage.somethingWentWrong})}):t.jsx(Fp,{windowSize:J,children:M!=null?t.jsx(_p,{windowSize:J,children:t.jsx(Fr,{backgroundColor:new qo(ee.colors.grey4),rootNodes:M,type:"name+balances_actual",compareMode:"compare_mode_percent",isSticky:{isStickyHeader:W,isStickyName:W},treeNodePadding:{left:zo.contentPaddingLeft.value(J),right:zo.contentPaddingRight.value(J)},nodeOpenStatus:{},scrollPosition:e.reconListUIState.scrollPosition,onCompareModeChanged:()=>{},onScroll:oe})}):null})}function Np({currentFooterFormId:e,vendorSearchAutoCompleteData:i,vendorSearchAutoCompleteActions:l,reconciliation:r,companyId:u,onReconTabColumnSortConfigChanged:d,updateReconReviewTabLocalData:a,onUpdateReconcileTabLocalData:c,setCurrentFooterFormId:h,onReloadReconciliationListPage:m,onReviewClicked:p,onFetchLinkTokenClick:g,onEstablishConnectionClick:x,onAddStatementClick:y,onReconReviewTabColumnSortConfigChanged:b,onSaveReconciliation:S,onSaveReconciliationReview:$,setOpenDrawerClicked:v,onReconMatchedTransactionClick:T}){return r.selectedAccountId==null?t.jsx(Vp,{companyId:u,reconciliation:r,onReload:m,onReviewClicked:p,onFetchLinkTokenClick:g,onEstablishConnectionClick:x,setOpenDrawerClicked:v,onAddStatementClick:y}):t.jsx(Ip,{currentFooterFormId:e,setCurrentFooterFormId:h,onUpdateReconcileTabLocalData:c,onReconTabColumnSortConfigChanged:d,reconciliation:r,updateReviewTabLocalData:a,entitySearchAutoCompleteActions:l,onReconReviewTabColumnSortConfigChanged:b,entitySearchAutoCompleteData:i,selectedAccountId:r.selectedAccountId,onSaveReconciliation:S,onSaveReconciliationReview:$,onReconMatchedTransactionClick:T})}function Up({accountAndClassReport:e,numOfBalances:i,title:l,isLastNode:r,isFirstNode:u,config:d,parentNodeIDs:a,ancestorMetadata:c}){let h="";return e.accountBase&&e.classBase?h=`${e.accountBase.accountId}_${e.classBase.classId}`:e.accountBase?h=e.accountBase.accountId:e.classBase&&(h=e.classBase.classId),{children:[],id:Ot("flux_vendor_account_class_row",a,h),isLastNode:r,isFirstNode:u,reportElementData:{element:{kind:"flux_vendor_account_class_row",title:l,data:e,metadata:c,numOfBalances:i},config:d}}}function Hp({config:e,isLastNode:i,numOfBalances:l,parentNodeIDs:r,title:u,vendorRowIndex:d,vendorView:a}){const c=Ot("flux_vendor_row",r,a.vendor.id),h={children:[],id:c,isLastNode:i,reportElementData:{element:{kind:"flux_vendor_row",title:u,data:a,numOfBalances:l,index:d},config:e}},m=a.vendorAccountsAndClasses;return h.children=m.map((p,g)=>Up({accountAndClassReport:p,numOfBalances:l,title:p.accountBase?.accountName??"",config:e,isLastNode:g===m.length-1,isFirstNode:g===0,parentNodeIDs:[...r,c],ancestorMetadata:{accountAndClassRowMetadata:{depth:0,hasSibling:m.length>1,hasChildren:!1,isLastNode:g===m.length-1,isFirstNode:g===0,name:p.accountBase?.accountName},isVendorLastChild:i,vendorId:a.vendor.id}})),h}function Wp({section:e,numOfBalances:i,title:l,isLastNode:r,config:u,vendorIndexOffset:d}){const a=e.sectionId,c={children:[],id:a,isLastNode:r,reportElementData:{element:{kind:"section",title:l,data:e,numOfBalances:i,sectionType:e.sectionId},config:u}},h=(e.vendors??[]).map((m,p)=>Hp({config:u,isLastNode:p===e.vendors.length-1,numOfBalances:i,parentNodeIDs:[a],title:m.vendor.name,vendorRowIndex:d+p,vendorView:m}));return c.children.push(...h),c}function qp({title:e,balances:i,config:l,nodeId:r}){return{children:[],id:r??Ot("headers_loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"headers_loading_in_progress",title:"",data:i,numOfBalances:i.length},config:l}}}function Kp({title:e,data:i,isLastNode:l,config:r,numOfBalances:u}){const d=Ot("total",[],e);return{children:[],id:d,isLastNode:l,reportElementData:{element:{kind:"total",title:e,data:i,numOfBalances:u},config:r}}}const{common:yi,expenseAutomation:{fluxAnalysis:Jp}}=me.getLocalizedStrings(),Qp=(e,i,l=!0)=>{const r=e.sections.generalExpense.balancesByMonth?Object.keys(e.sections.generalExpense.balancesByMonth).length:e.sections.reimbursement.balancesByMonth?Object.keys(e.sections.reimbursement.balancesByMonth).length:2,u=e.sections.generalExpense.balancesByMonth?Ln(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?Ln(e.sections.reimbursement.balancesByMonth):[],d=_r({balances:u,config:i}),a=[],c=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken==null,h=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken!=null||e.sections.reimbursement.fetchStatus.fetchState==="In-Progress";if(c===!0)a.push(qp({title:`${yi.loading}`,balances:u,config:i})),[...Array(10)].forEach((m,p)=>{a.push(vs({title:`${p}+${yi.loading}`,balances:u,config:i}))});else{a.push(d);const m=["generalExpense","reimbursement"];let p=0;if(m.forEach(g=>{const x=e.sections[g];if(x.vendors.length>0||x.fetchStatus.fetchState==="Completed"){const y=Ln(x.balancesByMonth);a.push(Wp({section:{sectionId:g,reportId:"flux_analysis_operating_expense",balances:y,vendors:x.vendors,varianceAmount:x.varianceAmount,variancePercentage:x.variancePercentage,currency:e.currency},numOfBalances:r,title:Gp(g),isLastNode:!1,config:i,vendorIndexOffset:p})),p+=x.vendors.length}}),e.totalBalancesAndVariance){const g=e.totalBalancesAndVariance.balancesByMonth?Ln(e.totalBalancesAndVariance.balancesByMonth):[],x=Kp({title:yi.texts.total,data:{balances:g,varianceAmount:e.totalBalancesAndVariance.varianceAmount,variancePercentage:e.totalBalancesAndVariance.variancePercentage,currency:e.currency},config:i,isLastNode:!0,numOfBalances:r});a.push(x)}h===!0&&[...Array(1)].forEach((g,x)=>{a.push(vs({title:`${x}+${yi.loading}`,balances:u,config:i}))})}return{config:i,headerNodes:l&&!c?[d]:[],contentNodes:a}},Gp=e=>Jp.sectionTitle[e];function Yp(e,i,l,r=!0){Object.assign(e.config,i);const u=Zp(l),d=_r({balances:u,config:i});return{config:i,headerNodes:r?[d]:[],contentNodes:[d,...e.contentNodes.slice(1)]}}const Zp=e=>e.sections.generalExpense.balancesByMonth?Ln(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?Ln(e.sections.reimbursement.balancesByMonth):[],Po={contentPaddingLeft:new Q(f[0],f[0],f[0]),contentPaddingRight:new Q(f[3],f[3],f[8]),wrapperPadding:new Q(f[3],f[3],f[8])},Xp=o.div`
771
+ `,{common:Bp}=me.getLocalizedStrings();function Vp({reconciliation:e,companyId:i,onReload:l,onReviewClicked:r,setOpenDrawerClicked:u,onFetchLinkTokenClick:d,onEstablishConnectionClick:a,onAddStatementClick:c}){const[h,m]=s.useState(void 0),[p,g]=s.useState(void 0),x=e.plaidConnectionDetails.link_account_no_microdeposit,y=e.plaidConnectionDetails.update_account,b=p==="update_account"?y:x,[S,$]=s.useState(b.linkToken??null),[v,T]=s.useState(!1),{useDynamicConfig:I}=pr(),{configValue:w}=I(mr.accountReconGLAccountsConfig),k=s.useCallback(K=>{m(K),g("link_account_no_microdeposit")},[]),j=s.useCallback(K=>{const N=R.current.accountReconciliationsByAccountID[K]?.paymentAccountId;m(K),g("update_account"),d("update_account",N)},[]),C=s.useCallback(K=>{u(K)},[]),z=s.useRef(h),A=s.useRef(p),R=s.useRef(e);s.useEffect(()=>{z.current=h},[h]),s.useEffect(()=>{A.current=p},[p]),s.useEffect(()=>{R.current=e},[e]);const P=s.useCallback(K=>{a(K,z.current??"",A.current),m(void 0),g(void 0),T(!1)},[a]),V=s.useCallback((K,N)=>{K!=null&&console.log("Plaid Connection Error",K,N),m(void 0),g(void 0),T(!1)},[]),{open:q,ready:D}=Sc({token:S,onSuccess:P,onExit:V});s.useEffect(()=>{(Di(new Date().toISOString()).isAfter(b.expiration)||b.linkToken==null)&&b.fetchStatus.fetchState==="Not-Started"&&d("link_account_no_microdeposit")},[b.fetchStatus.fetchState]),s.useEffect(()=>{!v&&p!=null&&b.linkToken===S&&b.fetchStatus.fetchState==="Completed"&&D&&T(!0)},[D,S,b.fetchStatus.fetchState,b.linkToken,p,v]),s.useEffect(()=>{b.fetchStatus.fetchState==="Completed"&&b.linkToken!=null&&b.linkToken!==S&&$(b.linkToken)},[b.fetchStatus.fetchState,b.linkToken,S]),s.useEffect(()=>{v&&q()},[v,q]);const[M,ae]=s.useState(void 0),[F,L]=s.useState(void 0),[U,X]=s.useState("assets"),ce=Di("2025-03-31"),ge=1,te="account_reconciliation",J=be(),ee=Tt();Gn({componentName:"expense_automation.account_reconciliation_list",enabled:e.fetchStatus.fetchState==="Completed"});const H=!0,_=Array.isArray(w?.[i])?w[i]:[],ne=e.accountReconciliationBySectionID.assets.accountIDs.filter(K=>!_.includes(K)).length,W=e.accountReconciliationBySectionID.liabilities.accountIDs.length>0,Z=Mp(ne,W),oe=s.useCallback(K=>{const N=K.scrollTop>=Z?"liabilities":"assets";N!==U&&X(N)},[Z,U]);return s.useEffect(()=>{const K={reportId:te,mode:"none",displayOrder:"ascending_date",reportFormat:"more_detailed",bookCloseDate:ce,firstMonthOfFY:ge,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,dataAvailable:void 0,accountReconciliationConfig:{selectedDrawerAccountId:e.selectedDrawerAccountId,onReviewClicked:r,onConnectClicked:k,onReconnectClicked:j,onOpenDrawerClicked:C,onStatementAddClicked:c}};if(M==null||!xr(F,e)){const N=Op(e,K,w,i,H,U);L(e),ae(N)}else{const N=zp(M,e,K,H,U);ae(N)}},[e,U]),e.fetchStatus.fetchState==="Error"?t.jsx(Pp,{children:t.jsx(kc,{onReload:l,message:Bp.errorMessage.somethingWentWrong})}):t.jsx(Fp,{windowSize:J,children:M!=null?t.jsx(_p,{windowSize:J,children:t.jsx(Fr,{backgroundColor:new qo(ee.colors.grey4),rootNodes:M,type:"name+balances_actual",compareMode:"compare_mode_percent",isSticky:{isStickyHeader:H,isStickyName:H},treeNodePadding:{left:zo.contentPaddingLeft.value(J),right:zo.contentPaddingRight.value(J)},nodeOpenStatus:{},scrollPosition:e.reconListUIState.scrollPosition,onCompareModeChanged:()=>{},onScroll:oe})}):null})}function Np({currentFooterFormId:e,vendorSearchAutoCompleteData:i,vendorSearchAutoCompleteActions:l,reconciliation:r,companyId:u,onReconTabColumnSortConfigChanged:d,updateReconReviewTabLocalData:a,onUpdateReconcileTabLocalData:c,setCurrentFooterFormId:h,onReloadReconciliationListPage:m,onReviewClicked:p,onFetchLinkTokenClick:g,onEstablishConnectionClick:x,onAddStatementClick:y,onReconReviewTabColumnSortConfigChanged:b,onSaveReconciliation:S,onSaveReconciliationReview:$,setOpenDrawerClicked:v,onReconMatchedTransactionClick:T}){return r.selectedAccountId==null?t.jsx(Vp,{companyId:u,reconciliation:r,onReload:m,onReviewClicked:p,onFetchLinkTokenClick:g,onEstablishConnectionClick:x,setOpenDrawerClicked:v,onAddStatementClick:y}):t.jsx(Ip,{currentFooterFormId:e,setCurrentFooterFormId:h,onUpdateReconcileTabLocalData:c,onReconTabColumnSortConfigChanged:d,reconciliation:r,updateReviewTabLocalData:a,entitySearchAutoCompleteActions:l,onReconReviewTabColumnSortConfigChanged:b,entitySearchAutoCompleteData:i,selectedAccountId:r.selectedAccountId,onSaveReconciliation:S,onSaveReconciliationReview:$,onReconMatchedTransactionClick:T})}function Up({accountAndClassReport:e,numOfBalances:i,title:l,isLastNode:r,isFirstNode:u,config:d,parentNodeIDs:a,ancestorMetadata:c}){let h="";return e.accountBase&&e.classBase?h=`${e.accountBase.accountId}_${e.classBase.classId}`:e.accountBase?h=e.accountBase.accountId:e.classBase&&(h=e.classBase.classId),{children:[],id:Ot("flux_vendor_account_class_row",a,h),isLastNode:r,isFirstNode:u,reportElementData:{element:{kind:"flux_vendor_account_class_row",title:l,data:e,metadata:c,numOfBalances:i},config:d}}}function Wp({config:e,isLastNode:i,numOfBalances:l,parentNodeIDs:r,title:u,vendorRowIndex:d,vendorView:a}){const c=Ot("flux_vendor_row",r,a.vendor.id),h={children:[],id:c,isLastNode:i,reportElementData:{element:{kind:"flux_vendor_row",title:u,data:a,numOfBalances:l,index:d},config:e}},m=a.vendorAccountsAndClasses;return h.children=m.map((p,g)=>Up({accountAndClassReport:p,numOfBalances:l,title:p.accountBase?.accountName??"",config:e,isLastNode:g===m.length-1,isFirstNode:g===0,parentNodeIDs:[...r,c],ancestorMetadata:{accountAndClassRowMetadata:{depth:0,hasSibling:m.length>1,hasChildren:!1,isLastNode:g===m.length-1,isFirstNode:g===0,name:p.accountBase?.accountName},isVendorLastChild:i,vendorId:a.vendor.id}})),h}function Hp({section:e,numOfBalances:i,title:l,isLastNode:r,config:u,vendorIndexOffset:d}){const a=e.sectionId,c={children:[],id:a,isLastNode:r,reportElementData:{element:{kind:"section",title:l,data:e,numOfBalances:i,sectionType:e.sectionId},config:u}},h=(e.vendors??[]).map((m,p)=>Wp({config:u,isLastNode:p===e.vendors.length-1,numOfBalances:i,parentNodeIDs:[a],title:m.vendor.name,vendorRowIndex:d+p,vendorView:m}));return c.children.push(...h),c}function qp({title:e,balances:i,config:l,nodeId:r}){return{children:[],id:r??Ot("headers_loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"headers_loading_in_progress",title:"",data:i,numOfBalances:i.length},config:l}}}function Kp({title:e,data:i,isLastNode:l,config:r,numOfBalances:u}){const d=Ot("total",[],e);return{children:[],id:d,isLastNode:l,reportElementData:{element:{kind:"total",title:e,data:i,numOfBalances:u},config:r}}}const{common:yi,expenseAutomation:{fluxAnalysis:Jp}}=me.getLocalizedStrings(),Qp=(e,i,l=!0)=>{const r=e.sections.generalExpense.balancesByMonth?Object.keys(e.sections.generalExpense.balancesByMonth).length:e.sections.reimbursement.balancesByMonth?Object.keys(e.sections.reimbursement.balancesByMonth).length:2,u=e.sections.generalExpense.balancesByMonth?Ln(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?Ln(e.sections.reimbursement.balancesByMonth):[],d=_r({balances:u,config:i}),a=[],c=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken==null,h=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken!=null||e.sections.reimbursement.fetchStatus.fetchState==="In-Progress";if(c===!0)a.push(qp({title:`${yi.loading}`,balances:u,config:i})),[...Array(10)].forEach((m,p)=>{a.push(vs({title:`${p}+${yi.loading}`,balances:u,config:i}))});else{a.push(d);const m=["generalExpense","reimbursement"];let p=0;if(m.forEach(g=>{const x=e.sections[g];if(x.vendors.length>0||x.fetchStatus.fetchState==="Completed"){const y=Ln(x.balancesByMonth);a.push(Hp({section:{sectionId:g,reportId:"flux_analysis_operating_expense",balances:y,vendors:x.vendors,varianceAmount:x.varianceAmount,variancePercentage:x.variancePercentage,currency:e.currency},numOfBalances:r,title:Gp(g),isLastNode:!1,config:i,vendorIndexOffset:p})),p+=x.vendors.length}}),e.totalBalancesAndVariance){const g=e.totalBalancesAndVariance.balancesByMonth?Ln(e.totalBalancesAndVariance.balancesByMonth):[],x=Kp({title:yi.texts.total,data:{balances:g,varianceAmount:e.totalBalancesAndVariance.varianceAmount,variancePercentage:e.totalBalancesAndVariance.variancePercentage,currency:e.currency},config:i,isLastNode:!0,numOfBalances:r});a.push(x)}h===!0&&[...Array(1)].forEach((g,x)=>{a.push(vs({title:`${x}+${yi.loading}`,balances:u,config:i}))})}return{config:i,headerNodes:l&&!c?[d]:[],contentNodes:a}},Gp=e=>Jp.sectionTitle[e];function Yp(e,i,l,r=!0){Object.assign(e.config,i);const u=Zp(l),d=_r({balances:u,config:i});return{config:i,headerNodes:r?[d]:[],contentNodes:[d,...e.contentNodes.slice(1)]}}const Zp=e=>e.sections.generalExpense.balancesByMonth?Ln(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?Ln(e.sections.reimbursement.balancesByMonth):[],Po={contentPaddingLeft:new Q(f[0],f[0],f[0]),contentPaddingRight:new Q(f[3],f[3],f[8]),wrapperPadding:new Q(f[3],f[3],f[8])},Xp=o.div`
772
772
  display: flex;
773
773
  position: sticky;
774
774
  width: 100%;
@@ -834,7 +834,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
834
834
  `,dm=o(ot)`
835
835
  margin-top: ${n.sp3};
836
836
  color: ${e=>e.theme.colors.hero};
837
- `,um="expenseAutomationJEAccountSettingsPage",Xr="vendorsAccountSection",hm=e=>`${e}_form`;function pm({accountSettings:e,currentFooterFormId:i,onSaveJeAccountSettingsClick:l,setIsJeAccountSettingsOpened:r,onJeAccountSettingsChange:u,setResetJeAccountSettingsForm:d,setCurrentFooterFormId:a}){const c=e.prepaidExpensesRecommendations,h=e.fixedAssetsRecommendations,m=e.accruedExpensesRecommendations,p=s.useMemo(()=>Kt(e.prepaidExpensesAccountHierarchy,c,"Accounts"),[e.prepaidExpensesAccountHierarchy,c]),g=s.useMemo(()=>Kt(e.fixedAssetsAccountHierarchy,h,"Accounts"),[e.fixedAssetsAccountHierarchy,h]),x=s.useMemo(()=>Kt(e.accruedExpensesAccountHierarchy,m,"Accounts"),[e.accruedExpensesAccountHierarchy,m]),y=s.useMemo(()=>gm(e,p,g,x),[e,p,g,x]),b=xn({mode:"all",reValidateMode:"onBlur",defaultValues:y,values:y,resetOptions:{keepDefaultValues:!0}}),S=b.handleSubmit(v=>{l(v)}),$=async v=>{u(v)};return s.useEffect(()=>{const v=b.watch(T=>{T!=null&&Yn(()=>$(T))});return()=>{v.unsubscribe()}}),s.useEffect(()=>(d(()=>b.reset),r(!0),()=>{a("expenseAutomationPage"),r(!1)}),[]),s.useEffect(()=>{const{selectedPrepaidExpensesAccountIds:v,previousPrepaidExpensesAccount:T,selectedFixedAssetsAccountIds:I,previousFixedAssetsAccount:w,selectedAccruedExpensesAccountIds:k,previousAccruedExpensesAccount:j}=e.accountSettingsLocalData,C=Hi(v,T)||Hi(I,w)||Hi(k,j);C===!0&&i!="expenseAutomationJEAccountSettingsPage"?a("expenseAutomationJEAccountSettingsPage"):C===!1&&i!=="expenseAutomationPage"&&a("expenseAutomationPage")},[e,i,a]),t.jsx(mm,{children:t.jsx(fn,{...b,children:t.jsx("form",{id:hm(um),onSubmit:S,children:t.jsx(bd,{showTitle:!1,sectionId:Xr,vendorAccountMappingSection:{accruedExpensesAccountHierarchy:e.accruedExpensesAccountHierarchy,accruedExpensesAccountList:e.accruedExpensesAccountList,accruedExpensesRecommendations:e.accruedExpensesRecommendations,fixedAssetsAccountHierarchy:e.fixedAssetsAccountHierarchy,fixedAssetsAccountList:e.fixedAssetsAccountList,fixedAssetsRecommendations:e.fixedAssetsRecommendations,prepaidExpensesAccountHierarchy:e.prepaidExpensesAccountHierarchy,prepaidExpensesAccountList:e.prepaidExpensesAccountList,prepaidExpensesRecommendations:e.prepaidExpensesRecommendations,selectedAccruedExpensesAccountIds:e.accountSettingsLocalData?.selectedAccruedExpensesAccountIds??[],selectedFixedAssetsAccountIds:e.accountSettingsLocalData?.selectedFixedAssetsAccountIds??[],selectedPrepaidExpensesAccountIds:e.accountSettingsLocalData?.selectedPrepaidExpensesAccountIds??[]},isAccruedExpensesFeatureEnabled:!1})})})})}const mm=o.div`
837
+ `,um="expenseAutomationJEAccountSettingsPage",Xr="vendorsAccountSection",hm=e=>`${e}_form`;function pm({accountSettings:e,currentFooterFormId:i,onSaveJeAccountSettingsClick:l,setIsJeAccountSettingsOpened:r,onJeAccountSettingsChange:u,setResetJeAccountSettingsForm:d,setCurrentFooterFormId:a}){const c=e.prepaidExpensesRecommendations,h=e.fixedAssetsRecommendations,m=e.accruedExpensesRecommendations,p=s.useMemo(()=>Kt(e.prepaidExpensesAccountHierarchy,c,"Accounts"),[e.prepaidExpensesAccountHierarchy,c]),g=s.useMemo(()=>Kt(e.fixedAssetsAccountHierarchy,h,"Accounts"),[e.fixedAssetsAccountHierarchy,h]),x=s.useMemo(()=>Kt(e.accruedExpensesAccountHierarchy,m,"Accounts"),[e.accruedExpensesAccountHierarchy,m]),y=s.useMemo(()=>gm(e,p,g,x),[e,p,g,x]),b=xn({mode:"all",reValidateMode:"onBlur",defaultValues:y,values:y,resetOptions:{keepDefaultValues:!0}}),S=b.handleSubmit(v=>{l(v)}),$=async v=>{u(v)};return s.useEffect(()=>{const v=b.watch(T=>{T!=null&&Yn(()=>$(T))});return()=>{v.unsubscribe()}}),s.useEffect(()=>(d(()=>b.reset),r(!0),()=>{a("expenseAutomationPage"),r(!1)}),[]),s.useEffect(()=>{const{selectedPrepaidExpensesAccountIds:v,previousPrepaidExpensesAccount:T,selectedFixedAssetsAccountIds:I,previousFixedAssetsAccount:w,selectedAccruedExpensesAccountIds:k,previousAccruedExpensesAccount:j}=e.accountSettingsLocalData,C=Wi(v,T)||Wi(I,w)||Wi(k,j);C===!0&&i!="expenseAutomationJEAccountSettingsPage"?a("expenseAutomationJEAccountSettingsPage"):C===!1&&i!=="expenseAutomationPage"&&a("expenseAutomationPage")},[e,i,a]),t.jsx(mm,{children:t.jsx(fn,{...b,children:t.jsx("form",{id:hm(um),onSubmit:S,children:t.jsx(bd,{showTitle:!1,sectionId:Xr,vendorAccountMappingSection:{accruedExpensesAccountHierarchy:e.accruedExpensesAccountHierarchy,accruedExpensesAccountList:e.accruedExpensesAccountList,accruedExpensesRecommendations:e.accruedExpensesRecommendations,fixedAssetsAccountHierarchy:e.fixedAssetsAccountHierarchy,fixedAssetsAccountList:e.fixedAssetsAccountList,fixedAssetsRecommendations:e.fixedAssetsRecommendations,prepaidExpensesAccountHierarchy:e.prepaidExpensesAccountHierarchy,prepaidExpensesAccountList:e.prepaidExpensesAccountList,prepaidExpensesRecommendations:e.prepaidExpensesRecommendations,selectedAccruedExpensesAccountIds:e.accountSettingsLocalData?.selectedAccruedExpensesAccountIds??[],selectedFixedAssetsAccountIds:e.accountSettingsLocalData?.selectedFixedAssetsAccountIds??[],selectedPrepaidExpensesAccountIds:e.accountSettingsLocalData?.selectedPrepaidExpensesAccountIds??[]},isAccruedExpensesFeatureEnabled:!1})})})})}const mm=o.div`
838
838
  padding-top: ${n.sp3};
839
839
  display: flex;
840
840
  align-items: center;
@@ -842,7 +842,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
842
842
  flex-direction: column;
843
843
  width: 100%;
844
844
  background-color: ${e=>e.theme.colors.grey4};
845
- `,gm=(e,i,l,r)=>{const u=e.prepaidExpensesAccountList.filter(p=>e.accountSettingsLocalData.selectedPrepaidExpensesAccountIds.includes(p.accountId)),d=e.fixedAssetsAccountList.filter(p=>e.accountSettingsLocalData.selectedFixedAssetsAccountIds.includes(p.accountId)),a=e.accruedExpensesAccountList.filter(p=>e.accountSettingsLocalData.selectedAccruedExpensesAccountIds.includes(p.accountId)),c=u.map(p=>p.qboId).filter(p=>p!=null),h=d.map(p=>p.qboId).filter(p=>p!=null),m=a.map(p=>p.qboId).filter(p=>p!=null);return{[Xr]:{prepaidExpensesAccount:{selectedOptions:c,allOptions:i},fixedAssetsAccount:{selectedOptions:h,allOptions:l},accruedExpensesAccount:{selectedOptions:m,allOptions:r}}}},{expenseAutomation:{jeSchedules:Nt},common:{currency:wi,review:xm,ignore:fm,strings:{hyphen:Pt},texts:Ci},dateFormat:ym,timeframe:{month:Us}}=me.getLocalizedStrings(),wm=({draft:e,ignoreStatus:i,ignoreRecommendedJeSchedule:l,jeScheduleClickHandler:r,onReviewClickHandler:u})=>t.jsxs(ns,{onClick:d=>{e.jeScheduleType!=null&&e.jeScheduleId!=null&&r(d,e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":B("je-schedule-draft-component",e.jeScheduleId),children:[t.jsxs(ts,{children:[t.jsxs(os,{children:[t.jsxs(Xo,{children:[t.jsxs(re,{style:{width:Ce.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:Ci.vendor}),t.jsxs(pe,{style:{gap:f[2]},children:[e.vendor.logo!=null?t.jsx(Sr,{photoUrl:e.vendor.logo.href,styles:{width:f[4],height:f[4]}}):t.jsx(Jt,{name:e.vendor.name}),t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.vendor.name!=null?t.jsx(at,{children:e.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.vendor.name??Pt})})]})]}),t.jsxs(re,{children:[t.jsx(ue,{children:Nt.scheduleHeaders.scheduleCategory}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.baseTransaction.account.accountName!=null?t.jsx(at,{children:e.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.baseTransaction.account.accountName??Pt})})})]}),t.jsxs(re,{style:{width:Ce.COLUMN_THREE},children:[t.jsx(ue,{children:Nt.scheduleHeaders.startMonth}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:e.startDate?.format(ym.visual.MMMCommaYYYYFormat)??Pt})})]}),t.jsxs(re,{style:{width:Ce.COLUMN_FOUR,paddingLeft:f[3]},children:[t.jsx(ue,{children:Nt.scheduleHeaders.period}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:e.period!=null?`${e.period} ${e.period===1?Us.slice(0,-1):Us}`:Pt})})]}),t.jsxs(re,{style:{alignItems:"flex-end",width:Ce.COLUMN_FIVE},children:[t.jsx(ue,{children:Ci.totalAmount}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(at,{children:nt("0,0.[00]",cn(e.baseTransaction.amount.amount,wi.currencyCode,wi.currencySymbol))??Pt}),children:t.jsx(we,{className:"highlight",children:nt("0,0.[00]",cn(e.baseTransaction.amount.amount,wi.currencyCode,wi.currencySymbol))??Pt})})})]})]}),t.jsxs(es,{children:[t.jsxs(re,{style:{width:Ce.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:Ci.category}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.account?.accountName!=null?t.jsx(at,{children:e.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.jeDebit.account?.accountName??Pt})})})]}),t.jsxs(re,{children:[t.jsx(ue,{children:Ci.classText}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.accountingClass?.className!=null?t.jsx(at,{children:e.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.jeDebit.accountingClass?.className??Pt})})})]}),t.jsxs(re,{style:{width:Ce.COLUMN_THREE},children:[t.jsx(ue,{children:Nt.scheduleHeaders.type}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",style:{width:"unset"},children:t.jsx(Hr,{children:Nt.scheduleTypes[e.jeScheduleType??"prepaid_expenses"]})})})]}),e.jeScheduleType==="fixed_assets"?t.jsxs(re,{style:{width:Ce.COLUMN_FOUR,paddingLeft:f[3]},children:[t.jsx(ue,{children:Nt.scheduleHeaders.accumulatedCategory}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",title:e.jeCredit.account?.accountName!=null?t.jsx(at,{children:e.jeCredit.account?.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.jeCredit.account?.accountName??Pt})})})]}):null,e.jeScheduleType!=="fixed_assets"?t.jsx(re,{style:{width:Ce.COLUMN_FOUR}}):null,t.jsx(re,{style:{width:Ce.COLUMN_FIVE}})]})]}),t.jsxs(is,{children:[t.jsx(Wn,{onClick:()=>{e.jeScheduleId!=null&&e.jeScheduleType!=null&&u(e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":B("je-schedule-draft-component-review-button",e.jeScheduleId),label:xm,variant:"primary",size:"small",className:"item-value-container",style:{minWidth:Mo}}),t.jsx(Wn,{"data-testid":B("je-schedule-draft-component-ignore-button",e.jeScheduleId),className:"item-value-container",label:fm,size:"small",reverseSpinnerColor:!1,loading:i?.fetchState==="In-Progress",onClick:()=>{e.jeScheduleType!=null&&l(e.jeScheduleTransactionKey,e.jeScheduleType)},style:{minWidth:Mo}})]})]}),t.jsxs(Vh,{children:[t.jsx(Cm,{}),t.jsx(bm,{children:Nt.aiAccountant}),t.jsx(vm,{children:Nt.zeniGPTText})]})]}),Cm=o(Qt)`
845
+ `,gm=(e,i,l,r)=>{const u=e.prepaidExpensesAccountList.filter(p=>e.accountSettingsLocalData.selectedPrepaidExpensesAccountIds.includes(p.accountId)),d=e.fixedAssetsAccountList.filter(p=>e.accountSettingsLocalData.selectedFixedAssetsAccountIds.includes(p.accountId)),a=e.accruedExpensesAccountList.filter(p=>e.accountSettingsLocalData.selectedAccruedExpensesAccountIds.includes(p.accountId)),c=u.map(p=>p.qboId).filter(p=>p!=null),h=d.map(p=>p.qboId).filter(p=>p!=null),m=a.map(p=>p.qboId).filter(p=>p!=null);return{[Xr]:{prepaidExpensesAccount:{selectedOptions:c,allOptions:i},fixedAssetsAccount:{selectedOptions:h,allOptions:l},accruedExpensesAccount:{selectedOptions:m,allOptions:r}}}},{expenseAutomation:{jeSchedules:Nt},common:{currency:wi,review:xm,ignore:fm,strings:{hyphen:Pt},texts:Ci},dateFormat:ym,timeframe:{month:Us}}=me.getLocalizedStrings(),wm=({draft:e,ignoreStatus:i,ignoreRecommendedJeSchedule:l,jeScheduleClickHandler:r,onReviewClickHandler:u})=>t.jsxs(ns,{onClick:d=>{e.jeScheduleType!=null&&e.jeScheduleId!=null&&r(d,e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":B("je-schedule-draft-component",e.jeScheduleId),children:[t.jsxs(ts,{children:[t.jsxs(os,{children:[t.jsxs(Xo,{children:[t.jsxs(re,{style:{width:Ce.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:Ci.vendor}),t.jsxs(pe,{style:{gap:f[2]},children:[e.vendor.logo!=null?t.jsx(Sr,{photoUrl:e.vendor.logo.href,styles:{width:f[4],height:f[4]}}):t.jsx(Jt,{name:e.vendor.name}),t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.vendor.name!=null?t.jsx(at,{children:e.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.vendor.name??Pt})})]})]}),t.jsxs(re,{children:[t.jsx(ue,{children:Nt.scheduleHeaders.scheduleCategory}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.baseTransaction.account.accountName!=null?t.jsx(at,{children:e.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.baseTransaction.account.accountName??Pt})})})]}),t.jsxs(re,{style:{width:Ce.COLUMN_THREE},children:[t.jsx(ue,{children:Nt.scheduleHeaders.startMonth}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:e.startDate?.format(ym.visual.MMMCommaYYYYFormat)??Pt})})]}),t.jsxs(re,{style:{width:Ce.COLUMN_FOUR,paddingLeft:f[3]},children:[t.jsx(ue,{children:Nt.scheduleHeaders.period}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:e.period!=null?`${e.period} ${e.period===1?Us.slice(0,-1):Us}`:Pt})})]}),t.jsxs(re,{style:{alignItems:"flex-end",width:Ce.COLUMN_FIVE},children:[t.jsx(ue,{children:Ci.totalAmount}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(at,{children:nt("0,0.[00]",cn(e.baseTransaction.amount.amount,wi.currencyCode,wi.currencySymbol))??Pt}),children:t.jsx(we,{className:"highlight",children:nt("0,0.[00]",cn(e.baseTransaction.amount.amount,wi.currencyCode,wi.currencySymbol))??Pt})})})]})]}),t.jsxs(es,{children:[t.jsxs(re,{style:{width:Ce.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:Ci.category}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.account?.accountName!=null?t.jsx(at,{children:e.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.jeDebit.account?.accountName??Pt})})})]}),t.jsxs(re,{children:[t.jsx(ue,{children:Ci.classText}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:e.jeDebit.accountingClass?.className!=null?t.jsx(at,{children:e.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.jeDebit.accountingClass?.className??Pt})})})]}),t.jsxs(re,{style:{width:Ce.COLUMN_THREE},children:[t.jsx(ue,{children:Nt.scheduleHeaders.type}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",style:{width:"unset"},children:t.jsx(Wr,{children:Nt.scheduleTypes[e.jeScheduleType??"prepaid_expenses"]})})})]}),e.jeScheduleType==="fixed_assets"?t.jsxs(re,{style:{width:Ce.COLUMN_FOUR,paddingLeft:f[3]},children:[t.jsx(ue,{children:Nt.scheduleHeaders.accumulatedCategory}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",title:e.jeCredit.account?.accountName!=null?t.jsx(at,{children:e.jeCredit.account?.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:e.jeCredit.account?.accountName??Pt})})})]}):null,e.jeScheduleType!=="fixed_assets"?t.jsx(re,{style:{width:Ce.COLUMN_FOUR}}):null,t.jsx(re,{style:{width:Ce.COLUMN_FIVE}})]})]}),t.jsxs(is,{children:[t.jsx(Hn,{onClick:()=>{e.jeScheduleId!=null&&e.jeScheduleType!=null&&u(e.jeScheduleId,e.jeScheduleTransactionKey,e.jeScheduleType)},"data-testid":B("je-schedule-draft-component-review-button",e.jeScheduleId),label:xm,variant:"primary",size:"small",className:"item-value-container",style:{minWidth:Mo}}),t.jsx(Hn,{"data-testid":B("je-schedule-draft-component-ignore-button",e.jeScheduleId),className:"item-value-container",label:fm,size:"small",reverseSpinnerColor:!1,loading:i?.fetchState==="In-Progress",onClick:()=>{e.jeScheduleType!=null&&l(e.jeScheduleTransactionKey,e.jeScheduleType)},style:{minWidth:Mo}})]})]}),t.jsxs(Vh,{children:[t.jsx(Cm,{}),t.jsx(bm,{children:Nt.aiAccountant}),t.jsx(vm,{children:Nt.zeniGPTText})]})]}),Cm=o(Qt)`
846
846
  height: ${n.sp3};
847
847
  width: ${n.sp3};
848
848
  margin-right: ${n.sp1};
@@ -853,7 +853,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
853
853
  color: ${e=>e.theme.colors.brandColorSapphire};
854
854
  `,vm=o(Re)`
855
855
  color: ${e=>e.theme.colors.primary};
856
- `,{jeSchedules:{scheduleDetails:{scheduleTransactionsHeader:{addVendor:Hs}}},expenseAutomation:{jeSchedules:Je},common:{currency:Rt,retry:Sm,strings:{hyphen:st,empty:Ws},texts:kn},dateFormat:qs}=me.getLocalizedStrings(),{common:km,timeframe:{month:Ks}}=me.getLocalizedStrings(),gt="jeSchedulePage",Js=e=>`${e}_form`,ss=(e,i)=>`${e}.${i}`,Qs=ss(gt,"vendor"),Gs=ss(gt,"scheduleExpenseCategory"),Ys=ss(gt,"accumulatedDepreciationCategory"),jm=({allAccountGroupedOptions:e,allAccountList:i,allClassGroupedOptions:l,allClassList:r,allDepAccountGroupedOptions:u,allDepAccountList:d,draft:a,localData:c,postStatus:h,uncategorizedAccounts:m,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,jeScheduleClickHandler:x,onFormDataChange:y,onPostJESchedule:b})=>{const{updatedAccumulatedDepreciationCategoryID:S,updatedCategoryId:$,updatedVendor:v}=c,T={vendor_deleted:"updatedVendor",debit_category_deleted:"updatedCategoryId",credit_category_deleted:"updatedAccumulatedDepreciationCategoryID",qbo_authorization_error:"jeScheduleID",qbo_book_close_date_error:"jeScheduleID",qbo_error:"jeScheduleID",qbo_invalid_company_status_error:"jeScheduleID"},I=s.useRef(),w=xn({mode:"all",reValidateMode:"onChange",defaultValues:Zs(c,e,l,u,i,r,d,g.entityAutoCompleteView),values:Zs(c,e,l,u,i,r,d,g.entityAutoCompleteView)}),k={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:n.sp4}),menu:()=>({width:300})},j={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:n.sp4}),menu:()=>({width:350})},C=(a?.scheduledJournalEntry.error??[]).every(_=>{const ne=T[_];return!(c!=null&&ne&&(ne==="updatedAccumulatedDepreciationCategoryID"&&c.updatedAccumulatedDepreciationCategoryID==null||ne==="updatedCategoryId"&&c.updatedCategoryId==null||ne==="updatedVendor"&&(c.updatedVendor?.id==null||c.updatedVendor?.id===""||c.updatedVendor?.name==null||c.updatedVendor?.name==="")))}),z=async(_,ne)=>{if(_!=null){const H=ne[gt],{scheduledJournalEntryID:Z,vendor:oe}=H;if(_.includes("vendor")){const K=oe?.defaultOptions.map(N=>N.value);if(oe?.selectedOption!=null&&K?.includes(oe.selectedOption)!==!0){const N=g.entityAutoCompleteView.vendor.find(O=>O.id===oe.selectedOption);N!=null&&w.setValue(`${gt}.vendor.defaultOptions`,[{label:N.name??km.strings.empty,value:N.id}])}else oe?.selectedOption==null&&oe?.defaultOptions.length!==0&&w.setValue(`${gt}.vendor`,{selectedOption:void 0,defaultOptions:[]})}y(Z,{...H,vendor:oe})}};s.useEffect(()=>{const _=w.watch((ne,{name:H})=>{H!=null&&ne!=null&&Yn(()=>z(H,ne))});return()=>{_.unsubscribe()}}),s.useEffect(()=>{g.entityAutoCompleteView.fetchState==="Completed"&&I.current?.(kr(g.entityAutoCompleteView))},[g.entityAutoCompleteView.fetchState]);const A=w.handleSubmit(()=>{b(a.scheduledJournalEntry.scheduledJournalEntryID,a.jeScheduleTransactionKey)}),R=_=>i.filter(ne=>ne.qboId===_)[0]?.qboId,P=_=>d.filter(ne=>ne.qboId===_)[0]?.qboId,V=_=>[m.expense?.qboId,m.income?.qboId].includes(_),q=w.watch("jeSchedulePage.vendor"),D=(_,ne)=>{p.onAutoCompleteInputChange?.(_,"vendor"),I.current=ne},M=a.scheduledJournalEntry.error?.includes("vendor_deleted")===!0,ae=a.scheduledJournalEntry.error?.includes("debit_category_deleted")===!0,F=a.scheduledJournalEntry.error?.includes("credit_category_deleted")===!0,L=a.vendor.name.split("(deleted)")[0]?.toString(),U=a.jeDebit.account?.accountName.split("(deleted)")?.[0]?.toString()??Ws,X=a.jeCredit.account?.accountName.split("(deleted)")[0]?.toString()??Ws,[ce,ge]=s.useState(ae===!0&&$==null),[te,J]=s.useState(F===!0&&S==null),[ee,W]=s.useState(M&&(v?.id==null||v?.id==""));return s.useEffect(()=>{ce===!1&&c.updatedCategoryId==null&&w.setFocus(Gs),te===!1&&c.updatedAccumulatedDepreciationCategoryID==null&&w.setFocus(Ys),ee===!1&&c.updatedVendor?.id==null&&w.setFocus(Qs)},[ce,te,ee,c,w]),t.jsx(fn,{...w,children:t.jsx("form",{style:{width:"100%"},id:Js(`${gt}_${a.jeScheduleId}`),onSubmit:A,children:t.jsx(ns,{showBorder:C,onClick:_=>{a.jeScheduleType!=null&&a.jeScheduleId!=null&&x(_,a.jeScheduleId,a.jeScheduleTransactionKey,a.jeScheduleType)},"data-testid":B("je-schedule-resolve-component-schedule",`${gt}_${a.jeScheduleId}`),children:t.jsxs(ts,{children:[t.jsxs(os,{children:[t.jsxs(Xo,{children:[M===!0?t.jsx(re,{style:{width:Ce.COLUMN_ONE,padding:f[0],justifyContent:"center"},showHoverEffect:M,forceHoverEffect:ee===!1&&(c?.updatedVendor?.id==null||c?.updatedVendor?.id==""),children:t.jsxs(Et,{className:"hover-background",style:{padding:`${n.sp2} ${n.sp3}`},children:[t.jsxs(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:[kn.vendor,t.jsx(xe,{display:"flex",placement:"top-start",title:t.jsx(Ti,{children:Je.tooltipText.missingVendor.replace("_deleted_vendor_",L)}),children:t.jsx(Xi,{})})]}),t.jsx(pe,{style:{gap:f[3],marginLeft:-2},className:"item-value-container",children:t.jsx(t.Fragment,{children:ee===!0?t.jsxs(we,{onClick:_=>{_.stopPropagation(),W(!1)},"data-testid":B("je-schedule-resolve-component-add-vendor-button",`${gt}_${a.jeScheduleId}`),style:{display:"inline-flex",alignItems:"center",gap:f[2],color:he.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Zi,{}),Hs]}):t.jsx(Ro,{name:Qs,placeholder:Hs,valueToId:_=>_,defaultValue:{selectedOption:q?.selectedOption,defaultOptions:q?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:n.sp4})},registerOptions:{required:!0,validate:_=>!!_.selectedOption},loadOptions:D})})})]})}):t.jsxs(re,{style:{width:Ce.COLUMN_ONE,padding:`${n.sp2} ${n.sp0} ${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:kn.vendor}),t.jsx(pe,{children:t.jsxs(t.Fragment,{children:[a.vendor.logo?.href!=null?t.jsx(Sr,{photoUrl:a.vendor.logo.href,styles:{width:f[4],height:f[4]}}):t.jsx(Jt,{name:a.vendor.name}),t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.vendor.name!==null?t.jsx(at,{children:a.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.vendor.name??st})})]})})]}),t.jsxs(re,{children:[t.jsx(ue,{children:Je.scheduleHeaders.scheduleCategory}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.baseTransaction.account.accountName!=null?t.jsx(at,{children:a.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.baseTransaction.account.accountName??st})})})]}),t.jsxs(re,{style:{width:Ce.COLUMN_THREE},children:[t.jsx(ue,{children:Je.scheduleHeaders.startMonth}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:a.startDate?.format(qs.visual.MMMCommaYYYYFormat)??st})})]}),t.jsxs(re,{style:{width:Ce.COLUMN_FOUR,paddingLeft:f[3]},children:[t.jsx(ue,{children:Je.scheduleHeaders.period}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:a.period!=null?`${a.period} ${a.period===1?Ks.slice(0,-1):Ks}`:st})})]}),t.jsxs(re,{style:{alignItems:"flex-end",width:Ce.COLUMN_FIVE},children:[t.jsx(ue,{children:kn.totalAmount}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",title:t.jsx(at,{children:nt("0,0.[00]",cn(a.baseTransaction.amount.amount,Rt.currencyCode,Rt.currencySymbol))??st}),children:t.jsx(we,{className:"highlight",children:nt("0,0.[00]",cn(a.baseTransaction.amount.amount,Rt.currencyCode,Rt.currencySymbol))??st})})})]})]}),t.jsxs(es,{children:[ae===!0?t.jsx(re,{showHoverEffect:ae===!0,forceHoverEffect:c?.updatedCategoryId==null&&ce===!1,style:{padding:"unset",justifyContent:"center",width:Ce.COLUMN_ONE},children:t.jsxs(Et,{className:"hover-background",children:[t.jsxs(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:[kn.category,ae===!0?t.jsx(xe,{display:"flex",placement:"top-start",title:t.jsx(Ti,{children:Je.tooltipText.missingCategory.replace("_deleted_category_",U)}),children:t.jsx(Xi,{})}):null]}),t.jsx(pe,{className:"item-value-container",style:{marginLeft:ae===!0?-2:0},children:ae===!0?t.jsx(t.Fragment,{children:ce===!0?t.jsxs(we,{onClick:_=>{_.stopPropagation(),ge(!1)},style:{display:"inline-flex",alignItems:"center",gap:f[1],color:he.brandColorGoldDark,cursor:"pointer"},"data-testid":B("je-schedule-resolve-component-add-category-button",`${gt}_${a.jeScheduleId}`),children:[t.jsx(Zi,{}),Je.addCategory]}):t.jsx(Tn,{shouldShowChevronIcon:!1,name:Gs,placeholder:Je.addCategory,valueToId:_=>R(_),defaultValue:{allOptions:e},registerOptions:{required:!0,validate:_=>!!_.selectedOption},disableCurrentOption:V,customStyleConfig:k})}):t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.jeDebit.account?.accountName!=null?t.jsx(at,{children:a.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeDebit.account?.accountName??st})})})]})}):t.jsxs(re,{style:{width:Ce.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:kn.category}),t.jsx(pe,{className:"item-value-container",children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.jeDebit.account?.accountName!=null?t.jsx(at,{children:a.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeDebit.account?.accountName??st})})})]}),t.jsxs(re,{children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:kn.classText}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.jeDebit.accountingClass?.className!=null?t.jsx(at,{children:a.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeDebit.accountingClass?.className??st})})})]}),t.jsxs(re,{style:{width:Ce.COLUMN_THREE},children:[t.jsx(ue,{children:Je.scheduleHeaders.type}),t.jsx(pe,{className:"test",children:t.jsx(we,{className:"highlight",style:{width:"unset"},children:t.jsx(Hr,{children:Je.scheduleTypes[a.jeScheduleType??"prepaid_expenses"]})})})]}),a.jeScheduleType==="fixed_assets"?t.jsx(t.Fragment,{children:F===!0?t.jsx(re,{style:{width:Ce.COLUMN_FOUR,padding:"unset",justifyContent:"center"},showHoverEffect:F,forceHoverEffect:c.updatedAccumulatedDepreciationCategoryID==null&&te===!1,children:t.jsxs(Et,{className:"hover-background",style:{padding:f[2],paddingLeft:f[3]},children:[t.jsxs(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:[Je.scheduleHeaders.accumulatedCategory,F===!0?t.jsx(xe,{display:"flex",placement:"top-end",title:t.jsx(Ti,{children:Je.tooltipText.missingDepCategory.replace("_deleted_dep_category_",X)}),children:t.jsx(Xi,{})}):null]}),t.jsx(pe,{className:"item-value-container",style:{marginLeft:F===!0?-2:0},children:F===!0?t.jsx(t.Fragment,{children:te===!0?t.jsxs(we,{onClick:_=>{_.stopPropagation(),J(!1)},style:{display:"inline-flex",alignItems:"center",gap:f[1],color:he.brandColorGoldDark,cursor:"pointer"},"data-testid":B("je-schedule-resolve-component-add-depreciation-category-button",`${gt}_${a.jeScheduleId}`),children:[t.jsx(Zi,{}),Je.addDepCategory]}):t.jsx(Tn,{shouldShowChevronIcon:!1,showDownChevronWithValue:!1,name:Ys,placeholder:Je.addDepCategory,valueToId:_=>P(_),defaultValue:{allOptions:u},registerOptions:{required:!0,validate:_=>!!_.selectedOption},customStyleConfig:j,disableCurrentOption:V})}):t.jsx(xe,{display:"block",placement:"bottom",title:a.jeCredit.account?.accountName!=null?t.jsx(at,{children:a.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeCredit.account?.accountName??st})})})]})}):t.jsxs(re,{style:{width:Ce.COLUMN_FOUR,padding:`${n.sp2} ${n.sp2} ${n.sp2} ${n.sp3}`,justifyContent:"center"},children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Je.scheduleHeaders.accumulatedCategory}),t.jsx(xe,{display:"block",placement:"bottom",title:a.jeCredit.account?.accountName!=null?t.jsx(at,{children:a.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeCredit.account?.accountName??st})})]})}):null,a.jeScheduleType!=="fixed_assets"?t.jsx(re,{style:{width:Ce.COLUMN_FOUR}}):null,t.jsx(re,{style:{width:Ce.COLUMN_FIVE}})]}),t.jsxs(_h,{children:[t.jsx(re,{style:{padding:"unset",width:Ce.COLUMN_ONE},children:t.jsxs(Bh,{children:[t.jsx(ue,{children:Je.scheduleHeaders.jePostingDate}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:a.scheduledJournalEntry.expectedPostDate.format(qs.visual.MMMDCommaYYFormat)??st})})]})}),t.jsxs(re,{children:[t.jsx(ue,{children:Je.scheduleHeaders.balance}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(at,{children:nt("0,0.[00]",cn(a?.scheduledJournalEntry?.runningBalance?.amount??0,Rt.currencyCode,Rt.currencySymbol))??st}),children:t.jsx(we,{className:"highlight",children:nt("0,0.[00]",cn(a?.scheduledJournalEntry?.runningBalance?.amount??0,Rt.currencyCode,Rt.currencySymbol))??st})})})]}),t.jsxs(re,{style:{width:Ce.COLUMN_THREE},children:[t.jsx(ue,{children:Je.scheduleHeaders.months}),t.jsx(pe,{children:t.jsxs(we,{className:"highlight",children:[a.scheduledJournalEntry.expectedPostDate.diff(a.startDate,"month")+1,"/",a.period]})})]}),t.jsx(re,{style:{width:Ce.COLUMN_FOUR}}),t.jsxs(re,{style:{alignItems:"flex-end",width:Ce.COLUMN_FIVE},children:[t.jsx(ue,{children:Je.scheduleHeaders.amountForMonth}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:nt("0,0.[00]",cn(a.scheduledJournalEntry.amount?.amount??0,Rt.currencyCode,Rt.currencySymbol))??st})})]})]})]}),t.jsx(is,{children:t.jsx(Wn,{form:Js(`${gt}_${a.jeScheduleId}`),label:Sm,variant:"primary",className:"item-value-container",type:"submit",loading:h?.fetchState==="In-Progress",size:"small",disabled:!C,style:{minWidth:Mo}})})]})})})})},Zs=(e,i,l,r,u,d,a,c)=>{const h=e.updatedCategoryId,m=e.updatedVendor,p=m!=null?c.vendor.find($=>$.zeniId===m.id):void 0,g=e.updatedAccumulatedDepreciationCategoryID,x=e.updatedClassId,y=h!=null?u.find($=>$.accountId===h):void 0,b=g!=null?a.find($=>$.accountId===g):void 0,S=x!=null?d.find($=>$.classId===x):void 0;return{[gt]:{jeScheduleID:e.jeScheduleID,scheduledJournalEntryID:e.scheduledJournalEntryID,jeScheduleType:e.jeScheduleType,scheduleExpenseCategory:{selectedOption:y?.qboId,allOptions:i},accumulatedDepreciationCategory:{selectedOption:b?.qboId,allOptions:r},vendor:{selectedOption:p?.id??m?.id,defaultOptions:Lr(c,p??m)},scheduleClass:{selectedOption:S?.classId,allOptions:l}}}},Zi=o(Fi)`
856
+ `,{jeSchedules:{scheduleDetails:{scheduleTransactionsHeader:{addVendor:Ws}}},expenseAutomation:{jeSchedules:Je},common:{currency:Rt,retry:Sm,strings:{hyphen:st,empty:Hs},texts:kn},dateFormat:qs}=me.getLocalizedStrings(),{common:km,timeframe:{month:Ks}}=me.getLocalizedStrings(),gt="jeSchedulePage",Js=e=>`${e}_form`,ss=(e,i)=>`${e}.${i}`,Qs=ss(gt,"vendor"),Gs=ss(gt,"scheduleExpenseCategory"),Ys=ss(gt,"accumulatedDepreciationCategory"),jm=({allAccountGroupedOptions:e,allAccountList:i,allClassGroupedOptions:l,allClassList:r,allDepAccountGroupedOptions:u,allDepAccountList:d,draft:a,localData:c,postStatus:h,uncategorizedAccounts:m,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,jeScheduleClickHandler:x,onFormDataChange:y,onPostJESchedule:b})=>{const{updatedAccumulatedDepreciationCategoryID:S,updatedCategoryId:$,updatedVendor:v}=c,T={vendor_deleted:"updatedVendor",debit_category_deleted:"updatedCategoryId",credit_category_deleted:"updatedAccumulatedDepreciationCategoryID",qbo_authorization_error:"jeScheduleID",qbo_book_close_date_error:"jeScheduleID",qbo_error:"jeScheduleID",qbo_invalid_company_status_error:"jeScheduleID"},I=s.useRef(),w=xn({mode:"all",reValidateMode:"onChange",defaultValues:Zs(c,e,l,u,i,r,d,g.entityAutoCompleteView),values:Zs(c,e,l,u,i,r,d,g.entityAutoCompleteView)}),k={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:n.sp4}),menu:()=>({width:300})},j={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:n.sp4}),menu:()=>({width:350})},C=(a?.scheduledJournalEntry.error??[]).every(_=>{const ne=T[_];return!(c!=null&&ne&&(ne==="updatedAccumulatedDepreciationCategoryID"&&c.updatedAccumulatedDepreciationCategoryID==null||ne==="updatedCategoryId"&&c.updatedCategoryId==null||ne==="updatedVendor"&&(c.updatedVendor?.id==null||c.updatedVendor?.id===""||c.updatedVendor?.name==null||c.updatedVendor?.name==="")))}),z=async(_,ne)=>{if(_!=null){const W=ne[gt],{scheduledJournalEntryID:Z,vendor:oe}=W;if(_.includes("vendor")){const K=oe?.defaultOptions.map(N=>N.value);if(oe?.selectedOption!=null&&K?.includes(oe.selectedOption)!==!0){const N=g.entityAutoCompleteView.vendor.find(O=>O.id===oe.selectedOption);N!=null&&w.setValue(`${gt}.vendor.defaultOptions`,[{label:N.name??km.strings.empty,value:N.id}])}else oe?.selectedOption==null&&oe?.defaultOptions.length!==0&&w.setValue(`${gt}.vendor`,{selectedOption:void 0,defaultOptions:[]})}y(Z,{...W,vendor:oe})}};s.useEffect(()=>{const _=w.watch((ne,{name:W})=>{W!=null&&ne!=null&&Yn(()=>z(W,ne))});return()=>{_.unsubscribe()}}),s.useEffect(()=>{g.entityAutoCompleteView.fetchState==="Completed"&&I.current?.(kr(g.entityAutoCompleteView))},[g.entityAutoCompleteView.fetchState]);const A=w.handleSubmit(()=>{b(a.scheduledJournalEntry.scheduledJournalEntryID,a.jeScheduleTransactionKey)}),R=_=>i.filter(ne=>ne.qboId===_)[0]?.qboId,P=_=>d.filter(ne=>ne.qboId===_)[0]?.qboId,V=_=>[m.expense?.qboId,m.income?.qboId].includes(_),q=w.watch("jeSchedulePage.vendor"),D=(_,ne)=>{p.onAutoCompleteInputChange?.(_,"vendor"),I.current=ne},M=a.scheduledJournalEntry.error?.includes("vendor_deleted")===!0,ae=a.scheduledJournalEntry.error?.includes("debit_category_deleted")===!0,F=a.scheduledJournalEntry.error?.includes("credit_category_deleted")===!0,L=a.vendor.name.split("(deleted)")[0]?.toString(),U=a.jeDebit.account?.accountName.split("(deleted)")?.[0]?.toString()??Hs,X=a.jeCredit.account?.accountName.split("(deleted)")[0]?.toString()??Hs,[ce,ge]=s.useState(ae===!0&&$==null),[te,J]=s.useState(F===!0&&S==null),[ee,H]=s.useState(M&&(v?.id==null||v?.id==""));return s.useEffect(()=>{ce===!1&&c.updatedCategoryId==null&&w.setFocus(Gs),te===!1&&c.updatedAccumulatedDepreciationCategoryID==null&&w.setFocus(Ys),ee===!1&&c.updatedVendor?.id==null&&w.setFocus(Qs)},[ce,te,ee,c,w]),t.jsx(fn,{...w,children:t.jsx("form",{style:{width:"100%"},id:Js(`${gt}_${a.jeScheduleId}`),onSubmit:A,children:t.jsx(ns,{showBorder:C,onClick:_=>{a.jeScheduleType!=null&&a.jeScheduleId!=null&&x(_,a.jeScheduleId,a.jeScheduleTransactionKey,a.jeScheduleType)},"data-testid":B("je-schedule-resolve-component-schedule",`${gt}_${a.jeScheduleId}`),children:t.jsxs(ts,{children:[t.jsxs(os,{children:[t.jsxs(Xo,{children:[M===!0?t.jsx(re,{style:{width:Ce.COLUMN_ONE,padding:f[0],justifyContent:"center"},showHoverEffect:M,forceHoverEffect:ee===!1&&(c?.updatedVendor?.id==null||c?.updatedVendor?.id==""),children:t.jsxs(Et,{className:"hover-background",style:{padding:`${n.sp2} ${n.sp3}`},children:[t.jsxs(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:[kn.vendor,t.jsx(xe,{display:"flex",placement:"top-start",title:t.jsx(Ti,{children:Je.tooltipText.missingVendor.replace("_deleted_vendor_",L)}),children:t.jsx(Xi,{})})]}),t.jsx(pe,{style:{gap:f[3],marginLeft:-2},className:"item-value-container",children:t.jsx(t.Fragment,{children:ee===!0?t.jsxs(we,{onClick:_=>{_.stopPropagation(),H(!1)},"data-testid":B("je-schedule-resolve-component-add-vendor-button",`${gt}_${a.jeScheduleId}`),style:{display:"inline-flex",alignItems:"center",gap:f[2],color:he.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Zi,{}),Ws]}):t.jsx(Ro,{name:Qs,placeholder:Ws,valueToId:_=>_,defaultValue:{selectedOption:q?.selectedOption,defaultOptions:q?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:n.sp4})},registerOptions:{required:!0,validate:_=>!!_.selectedOption},loadOptions:D})})})]})}):t.jsxs(re,{style:{width:Ce.COLUMN_ONE,padding:`${n.sp2} ${n.sp0} ${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{children:kn.vendor}),t.jsx(pe,{children:t.jsxs(t.Fragment,{children:[a.vendor.logo?.href!=null?t.jsx(Sr,{photoUrl:a.vendor.logo.href,styles:{width:f[4],height:f[4]}}):t.jsx(Jt,{name:a.vendor.name}),t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.vendor.name!==null?t.jsx(at,{children:a.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.vendor.name??st})})]})})]}),t.jsxs(re,{children:[t.jsx(ue,{children:Je.scheduleHeaders.scheduleCategory}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.baseTransaction.account.accountName!=null?t.jsx(at,{children:a.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.baseTransaction.account.accountName??st})})})]}),t.jsxs(re,{style:{width:Ce.COLUMN_THREE},children:[t.jsx(ue,{children:Je.scheduleHeaders.startMonth}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:a.startDate?.format(qs.visual.MMMCommaYYYYFormat)??st})})]}),t.jsxs(re,{style:{width:Ce.COLUMN_FOUR,paddingLeft:f[3]},children:[t.jsx(ue,{children:Je.scheduleHeaders.period}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:a.period!=null?`${a.period} ${a.period===1?Ks.slice(0,-1):Ks}`:st})})]}),t.jsxs(re,{style:{alignItems:"flex-end",width:Ce.COLUMN_FIVE},children:[t.jsx(ue,{children:kn.totalAmount}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",title:t.jsx(at,{children:nt("0,0.[00]",cn(a.baseTransaction.amount.amount,Rt.currencyCode,Rt.currencySymbol))??st}),children:t.jsx(we,{className:"highlight",children:nt("0,0.[00]",cn(a.baseTransaction.amount.amount,Rt.currencyCode,Rt.currencySymbol))??st})})})]})]}),t.jsxs(es,{children:[ae===!0?t.jsx(re,{showHoverEffect:ae===!0,forceHoverEffect:c?.updatedCategoryId==null&&ce===!1,style:{padding:"unset",justifyContent:"center",width:Ce.COLUMN_ONE},children:t.jsxs(Et,{className:"hover-background",children:[t.jsxs(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:[kn.category,ae===!0?t.jsx(xe,{display:"flex",placement:"top-start",title:t.jsx(Ti,{children:Je.tooltipText.missingCategory.replace("_deleted_category_",U)}),children:t.jsx(Xi,{})}):null]}),t.jsx(pe,{className:"item-value-container",style:{marginLeft:ae===!0?-2:0},children:ae===!0?t.jsx(t.Fragment,{children:ce===!0?t.jsxs(we,{onClick:_=>{_.stopPropagation(),ge(!1)},style:{display:"inline-flex",alignItems:"center",gap:f[1],color:he.brandColorGoldDark,cursor:"pointer"},"data-testid":B("je-schedule-resolve-component-add-category-button",`${gt}_${a.jeScheduleId}`),children:[t.jsx(Zi,{}),Je.addCategory]}):t.jsx(Tn,{shouldShowChevronIcon:!1,name:Gs,placeholder:Je.addCategory,valueToId:_=>R(_),defaultValue:{allOptions:e},registerOptions:{required:!0,validate:_=>!!_.selectedOption},disableCurrentOption:V,customStyleConfig:k})}):t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.jeDebit.account?.accountName!=null?t.jsx(at,{children:a.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeDebit.account?.accountName??st})})})]})}):t.jsxs(re,{style:{width:Ce.COLUMN_ONE,padding:`${n.sp2} ${n.sp3}`},children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:kn.category}),t.jsx(pe,{className:"item-value-container",children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.jeDebit.account?.accountName!=null?t.jsx(at,{children:a.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeDebit.account?.accountName??st})})})]}),t.jsxs(re,{children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:kn.classText}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:a.jeDebit.accountingClass?.className!=null?t.jsx(at,{children:a.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeDebit.accountingClass?.className??st})})})]}),t.jsxs(re,{style:{width:Ce.COLUMN_THREE},children:[t.jsx(ue,{children:Je.scheduleHeaders.type}),t.jsx(pe,{className:"test",children:t.jsx(we,{className:"highlight",style:{width:"unset"},children:t.jsx(Wr,{children:Je.scheduleTypes[a.jeScheduleType??"prepaid_expenses"]})})})]}),a.jeScheduleType==="fixed_assets"?t.jsx(t.Fragment,{children:F===!0?t.jsx(re,{style:{width:Ce.COLUMN_FOUR,padding:"unset",justifyContent:"center"},showHoverEffect:F,forceHoverEffect:c.updatedAccumulatedDepreciationCategoryID==null&&te===!1,children:t.jsxs(Et,{className:"hover-background",style:{padding:f[2],paddingLeft:f[3]},children:[t.jsxs(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:[Je.scheduleHeaders.accumulatedCategory,F===!0?t.jsx(xe,{display:"flex",placement:"top-end",title:t.jsx(Ti,{children:Je.tooltipText.missingDepCategory.replace("_deleted_dep_category_",X)}),children:t.jsx(Xi,{})}):null]}),t.jsx(pe,{className:"item-value-container",style:{marginLeft:F===!0?-2:0},children:F===!0?t.jsx(t.Fragment,{children:te===!0?t.jsxs(we,{onClick:_=>{_.stopPropagation(),J(!1)},style:{display:"inline-flex",alignItems:"center",gap:f[1],color:he.brandColorGoldDark,cursor:"pointer"},"data-testid":B("je-schedule-resolve-component-add-depreciation-category-button",`${gt}_${a.jeScheduleId}`),children:[t.jsx(Zi,{}),Je.addDepCategory]}):t.jsx(Tn,{shouldShowChevronIcon:!1,showDownChevronWithValue:!1,name:Ys,placeholder:Je.addDepCategory,valueToId:_=>P(_),defaultValue:{allOptions:u},registerOptions:{required:!0,validate:_=>!!_.selectedOption},customStyleConfig:j,disableCurrentOption:V})}):t.jsx(xe,{display:"block",placement:"bottom",title:a.jeCredit.account?.accountName!=null?t.jsx(at,{children:a.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeCredit.account?.accountName??st})})})]})}):t.jsxs(re,{style:{width:Ce.COLUMN_FOUR,padding:`${n.sp2} ${n.sp2} ${n.sp2} ${n.sp3}`,justifyContent:"center"},children:[t.jsx(ue,{style:{display:"flex",alignItems:"center",gap:f[1]},children:Je.scheduleHeaders.accumulatedCategory}),t.jsx(xe,{display:"block",placement:"bottom",title:a.jeCredit.account?.accountName!=null?t.jsx(at,{children:a.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(we,{className:"highlight",children:a.jeCredit.account?.accountName??st})})]})}):null,a.jeScheduleType!=="fixed_assets"?t.jsx(re,{style:{width:Ce.COLUMN_FOUR}}):null,t.jsx(re,{style:{width:Ce.COLUMN_FIVE}})]}),t.jsxs(_h,{children:[t.jsx(re,{style:{padding:"unset",width:Ce.COLUMN_ONE},children:t.jsxs(Bh,{children:[t.jsx(ue,{children:Je.scheduleHeaders.jePostingDate}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:a.scheduledJournalEntry.expectedPostDate.format(qs.visual.MMMDCommaYYFormat)??st})})]})}),t.jsxs(re,{children:[t.jsx(ue,{children:Je.scheduleHeaders.balance}),t.jsx(pe,{children:t.jsx(xe,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(at,{children:nt("0,0.[00]",cn(a?.scheduledJournalEntry?.runningBalance?.amount??0,Rt.currencyCode,Rt.currencySymbol))??st}),children:t.jsx(we,{className:"highlight",children:nt("0,0.[00]",cn(a?.scheduledJournalEntry?.runningBalance?.amount??0,Rt.currencyCode,Rt.currencySymbol))??st})})})]}),t.jsxs(re,{style:{width:Ce.COLUMN_THREE},children:[t.jsx(ue,{children:Je.scheduleHeaders.months}),t.jsx(pe,{children:t.jsxs(we,{className:"highlight",children:[a.scheduledJournalEntry.expectedPostDate.diff(a.startDate,"month")+1,"/",a.period]})})]}),t.jsx(re,{style:{width:Ce.COLUMN_FOUR}}),t.jsxs(re,{style:{alignItems:"flex-end",width:Ce.COLUMN_FIVE},children:[t.jsx(ue,{children:Je.scheduleHeaders.amountForMonth}),t.jsx(pe,{children:t.jsx(we,{className:"highlight",children:nt("0,0.[00]",cn(a.scheduledJournalEntry.amount?.amount??0,Rt.currencyCode,Rt.currencySymbol))??st})})]})]})]}),t.jsx(is,{children:t.jsx(Hn,{form:Js(`${gt}_${a.jeScheduleId}`),label:Sm,variant:"primary",className:"item-value-container",type:"submit",loading:h?.fetchState==="In-Progress",size:"small",disabled:!C,style:{minWidth:Mo}})})]})})})})},Zs=(e,i,l,r,u,d,a,c)=>{const h=e.updatedCategoryId,m=e.updatedVendor,p=m!=null?c.vendor.find($=>$.zeniId===m.id):void 0,g=e.updatedAccumulatedDepreciationCategoryID,x=e.updatedClassId,y=h!=null?u.find($=>$.accountId===h):void 0,b=g!=null?a.find($=>$.accountId===g):void 0,S=x!=null?d.find($=>$.classId===x):void 0;return{[gt]:{jeScheduleID:e.jeScheduleID,scheduledJournalEntryID:e.scheduledJournalEntryID,jeScheduleType:e.jeScheduleType,scheduleExpenseCategory:{selectedOption:y?.qboId,allOptions:i},accumulatedDepreciationCategory:{selectedOption:b?.qboId,allOptions:r},vendor:{selectedOption:p?.id??m?.id,defaultOptions:Lr(c,p??m)},scheduleClass:{selectedOption:S?.classId,allOptions:l}}}},Zi=o(Fi)`
857
857
  width: ${n.sp3};
858
858
  height: ${n.sp3};
859
859
  `,Xi=o(Ar)`
@@ -895,7 +895,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
895
895
  align-items: center;
896
896
  justify-content: center;
897
897
  color: inherit;
898
- `;function Lm({expenseAutomationViewSelector:e,currentFooterFormId:i,setResetJeAccountSettingsForm:l,vendorSearchAutoCompleteData:r,onJESchedulesFormDataChange:u,onPostJESchedule:d,handleJeScheduleClick:a,onJeAccountSettingsChange:c,onSaveJeAccountSettingsClick:h,ignoreRecommendedJeSchedule:m,vendorSearchAutoCompleteActions:p,setCurrentFooterFormId:g,setIsJeAccountSettingsOpened:x}){const{jeSchedules:y}=e;return y.fetchState==="In-Progress"||y.accountSettingsView.fetchState==="In-Progress"?t.jsx(el,{}):y.accountSettingsView.fetchState==="Completed"&&y.accountSettingsView.accountSettingsLocalData.previousPrepaidExpensesAccount.length===0&&y.accountSettingsView.accountSettingsLocalData.previousFixedAssetsAccount.length===0?t.jsx(pm,{setIsJeAccountSettingsOpened:x,setResetJeAccountSettingsForm:l,currentFooterFormId:i,onJeAccountSettingsChange:c,onSaveJeAccountSettingsClick:h,accountSettings:y.accountSettingsView,setCurrentFooterFormId:g}):y.fetchState==="Completed"&&y.draftSchedules.length===0&&y.resolveSchedules.length===0?t.jsx(It,{tab:e.currentSelectedView,title:We(e.currentSelectedView).allDoneText.title,subTitle:We(e.currentSelectedView).allDoneText.subTitle}):y.fetchState==="Completed"?t.jsx(Tm,{setCurrentFooterFormId:g,handleJeScheduleClick:a,ignoreRecommendedJeSchedule:m,jeSchedules:e.jeSchedules,onJESchedulesFormDataChange:u,onPostJESchedule:d,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:r}):null}const Am=72,tl=50,Rm=1,Em=["receipts"],sa=e=>Qo(e,Em),{common:{texts:{vendor:Dm,amount:Mm,receipts:Om,category:zm,classText:Pm,date:Fm}}}=me.getLocalizedStrings(),nl={key:"vendor",value:Dm,sortOrder:"ascending",width:new Q(18,18)},_m={key:"category",value:zm,sortOrder:"ascending",width:new Q(18,18)},Bm={key:"class",value:Pm,sortOrder:"ascending",width:new Q(18,18)},Vm={key:"date",value:Fm,sortOrder:"descending",width:new Q(11,11)},Nm={key:"receipts",value:Om,sortOrder:"descending",width:new Q(6,6)},il={key:"amount",value:Mm,sortOrder:"ascending",width:new Q(10,10)},Un=[nl,_m,Bm,Vm,Nm,il],ol=[{...nl,width:new Q(65,65)},{...il,width:new Q(30,30)}],eo={sortKey:"date",sortOrder:"descending"},sl=({sortConfig:e,isDisabled:i,onColumnSortConfigChanged:l})=>{const r=be(),u=Ze(),d=u?ol:Un,[a,c]=s.useState(d);s.useEffect(()=>{const p=[...d];for(const g of p)g.key===e.sortKey?g.sortOrder=e.sortOrder:g.sortOrder="ascending";c(p)},[e.sortKey,e.sortOrder,u]);const h=(p,g)=>{let x=g;e.sortKey===p&&(x=g==="ascending"?"descending":"ascending"),l(p,x)},m=p=>{sa(p.key)==null&&h(yd(p.key),p.sortOrder)};return t.jsx(Um,{windowSize:r,isQuickViewMode:u,children:a.map((p,g)=>{const x=i!=null||sa(p.key)!=null;return t.jsxs(Hm,{sortDataValue:e.sortKey,actualDataValue:p.key,wrapperWidth:p.width,isSortDisabled:x,windowSize:r,isQuickViewMode:u,isLastItem:g===a.length-1,style:p.key==="receipts"?{justifyContent:"center"}:void 0,children:[t.jsxs(Qm,{onClick:()=>x?null:m(p),isSortDisabled:x,children:[t.jsx(Gm,{children:p.value}),x?null:t.jsx(qm,{sortConfig:e,headerData:p,children:t.jsx(Jm,{})})]}),x?null:t.jsx(Km,{isSortDisabled:x,sortDataValue:e.sortKey,isVisible:e.sortKey===p.key&&e.sortKey!==eo.sortKey,children:t.jsx(Wm,{onClick:()=>{x||h(eo.sortKey,eo.sortOrder)},"data-testid":B("missing-receipts-header-close-icon",p.key)})})]},p.key)})})},Um=o.div`
898
+ `;function Lm({expenseAutomationViewSelector:e,currentFooterFormId:i,setResetJeAccountSettingsForm:l,vendorSearchAutoCompleteData:r,onJESchedulesFormDataChange:u,onPostJESchedule:d,handleJeScheduleClick:a,onJeAccountSettingsChange:c,onSaveJeAccountSettingsClick:h,ignoreRecommendedJeSchedule:m,vendorSearchAutoCompleteActions:p,setCurrentFooterFormId:g,setIsJeAccountSettingsOpened:x}){const{jeSchedules:y}=e;return y.fetchState==="In-Progress"||y.accountSettingsView.fetchState==="In-Progress"?t.jsx(el,{}):y.accountSettingsView.fetchState==="Completed"&&y.accountSettingsView.accountSettingsLocalData.previousPrepaidExpensesAccount.length===0&&y.accountSettingsView.accountSettingsLocalData.previousFixedAssetsAccount.length===0?t.jsx(pm,{setIsJeAccountSettingsOpened:x,setResetJeAccountSettingsForm:l,currentFooterFormId:i,onJeAccountSettingsChange:c,onSaveJeAccountSettingsClick:h,accountSettings:y.accountSettingsView,setCurrentFooterFormId:g}):y.fetchState==="Completed"&&y.draftSchedules.length===0&&y.resolveSchedules.length===0?t.jsx(It,{tab:e.currentSelectedView,title:He(e.currentSelectedView).allDoneText.title,subTitle:He(e.currentSelectedView).allDoneText.subTitle}):y.fetchState==="Completed"?t.jsx(Tm,{setCurrentFooterFormId:g,handleJeScheduleClick:a,ignoreRecommendedJeSchedule:m,jeSchedules:e.jeSchedules,onJESchedulesFormDataChange:u,onPostJESchedule:d,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:r}):null}const Am=72,tl=50,Rm=1,Em=["receipts"],sa=e=>Qo(e,Em),{common:{texts:{vendor:Dm,amount:Mm,receipts:Om,category:zm,classText:Pm,date:Fm}}}=me.getLocalizedStrings(),nl={key:"vendor",value:Dm,sortOrder:"ascending",width:new Q(18,18)},_m={key:"category",value:zm,sortOrder:"ascending",width:new Q(18,18)},Bm={key:"class",value:Pm,sortOrder:"ascending",width:new Q(18,18)},Vm={key:"date",value:Fm,sortOrder:"descending",width:new Q(11,11)},Nm={key:"receipts",value:Om,sortOrder:"descending",width:new Q(6,6)},il={key:"amount",value:Mm,sortOrder:"ascending",width:new Q(10,10)},Un=[nl,_m,Bm,Vm,Nm,il],ol=[{...nl,width:new Q(65,65)},{...il,width:new Q(30,30)}],eo={sortKey:"date",sortOrder:"descending"},sl=({sortConfig:e,isDisabled:i,onColumnSortConfigChanged:l})=>{const r=be(),u=Ze(),d=u?ol:Un,[a,c]=s.useState(d);s.useEffect(()=>{const p=[...d];for(const g of p)g.key===e.sortKey?g.sortOrder=e.sortOrder:g.sortOrder="ascending";c(p)},[e.sortKey,e.sortOrder,u]);const h=(p,g)=>{let x=g;e.sortKey===p&&(x=g==="ascending"?"descending":"ascending"),l(p,x)},m=p=>{sa(p.key)==null&&h(yd(p.key),p.sortOrder)};return t.jsx(Um,{windowSize:r,isQuickViewMode:u,children:a.map((p,g)=>{const x=i!=null||sa(p.key)!=null;return t.jsxs(Wm,{sortDataValue:e.sortKey,actualDataValue:p.key,wrapperWidth:p.width,isSortDisabled:x,windowSize:r,isQuickViewMode:u,isLastItem:g===a.length-1,style:p.key==="receipts"?{justifyContent:"center"}:void 0,children:[t.jsxs(Qm,{onClick:()=>x?null:m(p),isSortDisabled:x,children:[t.jsx(Gm,{children:p.value}),x?null:t.jsx(qm,{sortConfig:e,headerData:p,children:t.jsx(Jm,{})})]}),x?null:t.jsx(Km,{isSortDisabled:x,sortDataValue:e.sortKey,isVisible:e.sortKey===p.key&&e.sortKey!==eo.sortKey,children:t.jsx(Hm,{onClick:()=>{x||h(eo.sortKey,eo.sortOrder)},"data-testid":B("missing-receipts-header-close-icon",p.key)})})]},p.key)})})},Um=o.div`
899
899
  top: ${n.sp0};
900
900
  left: ${n.sp0};
901
901
  height: ${tl}px;
@@ -915,7 +915,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
915
915
  `:le`
916
916
  padding: ${n.sp0} ${n.sp3};
917
917
  `}
918
- `,Hm=o.div`
918
+ `,Wm=o.div`
919
919
  color: ${e=>e.sortDataValue===e.actualDataValue&&!e.isSortDisabled?e.theme.colors.primary:e.theme.colors.grey1};
920
920
  padding-left: ${n.sp0};
921
921
  left: ${n.sp0};
@@ -945,7 +945,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
945
945
  min-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
946
946
  max-width: ${e.wrapperWidth.valuePercentage(e.windowSize)};
947
947
  `}
948
- `,Wm=o(ni)`
948
+ `,Hm=o(ni)`
949
949
  width: ${n.sp2};
950
950
  height: ${n.sp2};
951
951
  cursor: pointer;
@@ -1069,7 +1069,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
1069
1069
  min-height: 100%;
1070
1070
  flex-direction: column;
1071
1071
  row-gap: ${n.sp3};
1072
- `,{common:mg}=me.getLocalizedStrings(),gg=({missingReceipts:e,receiptUploadEndpoint:i,authParams:l,selectedPeriod:r,isDisabled:u,onMissingReceiptsRowClick:d,onUploadReceiptComplete:a,onUploadReceiptAttachment:c,onUploadReceiptFetchStatus:h,onUpdateMissingReceiptsUIState:m,onFetchMissingReceiptsList:p})=>{const g=be(),x=Ze(),{fetchState:y,uiState:b,transactions:S}=e;Gn({componentName:"expense_automation.missing_receipts",enabled:y==="Completed"});const $=s.useRef(null),[v,T]=s.useState(!1);s.useEffect(()=>{$.current?.resetAfterIndex(0)},[g,$]),s.useEffect(()=>{y==="Completed"&&T(!1)},[y]);const I=k=>Am,w=(k,j)=>{m({sortOrder:j,sortKey:k})};return t.jsxs(yg,{children:[t.jsx(wg,{windowSize:g,children:y==="Error"?t.jsxs(bg,{windowSize:g,children:[t.jsx(vg,{onClick:()=>p(),"data-testid":B("missing-receipts-list-table-reload-button"),children:t.jsx(No,{})}),t.jsx(Sg,{children:mg.reloadPage.label})]}):y==="Completed"&&S.length===0?t.jsx(It,{tab:"missing_receipts",title:We("missing_receipts").allDoneText.title,subTitle:We("missing_receipts").allDoneText.subTitle}):y==="Not-Started"||y==="In-Progress"&&S.length===0?t.jsx(dg,{sortConfig:{sortKey:b.sortKey,sortOrder:b.sortOrder},fetchState:y,onColumnSortConfigChanged:w}):t.jsx(Cg,{windowSize:g,children:t.jsx(Jn,{children:({height:k,width:j})=>t.jsxs(jg,{style:{height:k,width:j},children:[t.jsx(fg,{isQuickViewMode:x,children:t.jsx(sl,{sortConfig:{sortKey:b.sortKey,sortOrder:b.sortOrder},isDisabled:y==="In-Progress"?"readonly":u,onColumnSortConfigChanged:w})}),t.jsx(Pi,{ref:$,height:k-tl,innerElementType:ll,itemCount:S.length,itemData:{missingReceipts:e,receiptUploadEndpoint:i,authParams:l,isDisabled:u,isQuickViewMode:x,selectedPeriod:r,onMissingReceiptsRowClick:d,onUploadReceiptComplete:a,onUploadReceiptAttachment:c,onUploadReceiptFetchStatus:h},itemSize:I,width:j,style:{willChange:"auto"},overscanCount:Rm,onScroll:({scrollOffset:C})=>{m({scrollPosition:{scrollTop:C}})},initialScrollOffset:b.scrollPosition?.scrollTop,children:xg})]})})})}),t.jsx(Ge,{controller:v===!0,children:t.jsx($g,{children:t.jsx(Kn,{size:"Small",start:!0})})})]})},xg=({index:e,style:i,data:l})=>{const{selectedTransactionId:r}=zi(),{missingReceipts:u,receiptUploadEndpoint:d,authParams:a,isQuickViewMode:c,onMissingReceiptsRowClick:h,onUploadReceiptComplete:m,onUploadReceiptAttachment:p,onUploadReceiptFetchStatus:g,selectedPeriod:x}=l,y=u.transactions[e],b=r!=null&&r===y.id;return t.jsx(kg,{isPanelSelected:b,isQuickViewMode:c,style:{...i,width:"100%"},children:t.jsx(ng,{transaction:y,receiptUploadEndpoint:d,authParams:a,selectedPeriod:x,onMissingReceiptsRowClick:h,onUploadReceiptComplete:m,onUploadReceiptAttachment:p,onUploadReceiptFetchStatus:g,uploadReceiptsFetchState:u.uploadReceiptStatusById[y.id]??{fetchState:"Not-Started",error:void 0}},y.id)})},fg=o.div`
1072
+ `,{common:mg}=me.getLocalizedStrings(),gg=({missingReceipts:e,receiptUploadEndpoint:i,authParams:l,selectedPeriod:r,isDisabled:u,onMissingReceiptsRowClick:d,onUploadReceiptComplete:a,onUploadReceiptAttachment:c,onUploadReceiptFetchStatus:h,onUpdateMissingReceiptsUIState:m,onFetchMissingReceiptsList:p})=>{const g=be(),x=Ze(),{fetchState:y,uiState:b,transactions:S}=e;Gn({componentName:"expense_automation.missing_receipts",enabled:y==="Completed"});const $=s.useRef(null),[v,T]=s.useState(!1);s.useEffect(()=>{$.current?.resetAfterIndex(0)},[g,$]),s.useEffect(()=>{y==="Completed"&&T(!1)},[y]);const I=k=>Am,w=(k,j)=>{m({sortOrder:j,sortKey:k})};return t.jsxs(yg,{children:[t.jsx(wg,{windowSize:g,children:y==="Error"?t.jsxs(bg,{windowSize:g,children:[t.jsx(vg,{onClick:()=>p(),"data-testid":B("missing-receipts-list-table-reload-button"),children:t.jsx(No,{})}),t.jsx(Sg,{children:mg.reloadPage.label})]}):y==="Completed"&&S.length===0?t.jsx(It,{tab:"missing_receipts",title:He("missing_receipts").allDoneText.title,subTitle:He("missing_receipts").allDoneText.subTitle}):y==="Not-Started"||y==="In-Progress"&&S.length===0?t.jsx(dg,{sortConfig:{sortKey:b.sortKey,sortOrder:b.sortOrder},fetchState:y,onColumnSortConfigChanged:w}):t.jsx(Cg,{windowSize:g,children:t.jsx(Jn,{children:({height:k,width:j})=>t.jsxs(jg,{style:{height:k,width:j},children:[t.jsx(fg,{isQuickViewMode:x,children:t.jsx(sl,{sortConfig:{sortKey:b.sortKey,sortOrder:b.sortOrder},isDisabled:y==="In-Progress"?"readonly":u,onColumnSortConfigChanged:w})}),t.jsx(Pi,{ref:$,height:k-tl,innerElementType:ll,itemCount:S.length,itemData:{missingReceipts:e,receiptUploadEndpoint:i,authParams:l,isDisabled:u,isQuickViewMode:x,selectedPeriod:r,onMissingReceiptsRowClick:d,onUploadReceiptComplete:a,onUploadReceiptAttachment:c,onUploadReceiptFetchStatus:h},itemSize:I,width:j,style:{willChange:"auto"},overscanCount:Rm,onScroll:({scrollOffset:C})=>{m({scrollPosition:{scrollTop:C}})},initialScrollOffset:b.scrollPosition?.scrollTop,children:xg})]})})})}),t.jsx(Ge,{controller:v===!0,children:t.jsx($g,{children:t.jsx(Kn,{size:"Small",start:!0})})})]})},xg=({index:e,style:i,data:l})=>{const{selectedTransactionId:r}=zi(),{missingReceipts:u,receiptUploadEndpoint:d,authParams:a,isQuickViewMode:c,onMissingReceiptsRowClick:h,onUploadReceiptComplete:m,onUploadReceiptAttachment:p,onUploadReceiptFetchStatus:g,selectedPeriod:x}=l,y=u.transactions[e],b=r!=null&&r===y.id;return t.jsx(kg,{isPanelSelected:b,isQuickViewMode:c,style:{...i,width:"100%"},children:t.jsx(ng,{transaction:y,receiptUploadEndpoint:d,authParams:a,selectedPeriod:x,onMissingReceiptsRowClick:h,onUploadReceiptComplete:m,onUploadReceiptAttachment:p,onUploadReceiptFetchStatus:g,uploadReceiptsFetchState:u.uploadReceiptStatusById[y.id]??{fetchState:"Not-Started",error:void 0}},y.id)})},fg=o.div`
1073
1073
  flex: 1;
1074
1074
  width: auto;
1075
1075
  `,yg=o.div`
@@ -1232,10 +1232,10 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
1232
1232
  z-index: ${f[2]};
1233
1233
  min-width: ${cr}px;
1234
1234
  max-width: ${lr}px;
1235
- `,Ai="monthEndReportFormSection",la="monthEndReportPage",dt=me.getLocalizedStrings();function Ug({companyId:e,enableZeniGPTFeature:i,monthEndReportView:l,previewMode:r,customerRequestData:u,allThreadsSectionOpen:d,filterMetaData:a,newThreadMetadata:c,isZeniUser:h,selectedPeriod:m,improveUsingZeniGPTClick:p,onRemoveFileAttachment:g,onUpdateFileAttachment:x,onCloseAllThreadsSection:y,previewMonthEndReport:b,saveMonthEndReport:S,onEditClick:$,onOpenFileAttachmentSnackBar:v,onClickCustomerRequest:T,sendMonthEndReport:I}){const w=Tt(),[k,j]=s.useState(),[C,z]=s.useState(0),[A,R]=s.useState(0),P=s.useRef(),V=s.useRef(null),q=s.useRef(null),{html:D,subject:M,improveUsingZeniGPTStatus:ae}=l,[F,L]=s.useState(),[U,X]=s.useState(!1),[ce,ge]=s.useState(!1),te=s.useRef(null),J=s.useRef(null),ee=ec(d,250),W=l.fetchState==="Not-Started"||l.fetchState==="In-Progress"||l.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||l.companyMonthEndReportTemplatesData.fetchState==="In-Progress",{threadsRefs:_,sortedThreads:ne,threadsPositions:H,observer:Z,unresolvedThreadsMap:oe,handleRemoveFloatingThread:K}=tc(a,te,!r,W,h),N=s.useCallback(()=>{d?J.current!=null&&R(Math.min((J.current.offsetWidth-Vn-f[4])/2,J.current.offsetWidth-Vn-lr-f[4])):J.current!=null&&z(Math.min((J.current.offsetWidth-Vn-f[4])/2,J.current.offsetWidth-Vn-cr-f[4]))},[d]);s.useEffect(()=>{N()},[d,N]),s.useEffect(()=>(window.addEventListener("resize",N),()=>{window.removeEventListener("resize",N)}),[N]);const O=h?er:tr,{openThread:se,addThread:Y,setOpenThread:G}=s.useContext(O),je=nc(hs,!1,!r),Te=te.current?.getBoundingClientRect(),E=je!=null&&je.coords&&Te?{left:je.coords.left-Te.left,top:je.coords.top-Te.top}:void 0,de=s.useCallback(()=>{const Ee=window.getSelection()?.getRangeAt(0),Ie=ic();if(!Ee||Ie==null)return;const Ke={...c,...Ie,startPath:Ie.startPath.join(),endPath:Ie.endPath.join()},ye=`${ur()}${dr}`,Be=`cockpit_${e}`;Y(ye,{type:"thread",id:ye,roomId:Be,createdAt:new Date,comments:[],metadata:Ke,updatedAt:new Date,resolved:!1}),G(ye)},[Y,e,c,G]);s.useEffect(()=>{se!=null&&d&&y()},[d,se,y]);const $e=ae.fetchState==="In-Progress",Me=xn({mode:"all",defaultValues:ca(l),values:ca(l)}),De=Me.handleSubmit(Ee=>{const{recipientEmailList:Ie,subject:Ke}=Ee[Ai];if(r===!0)I?.(F?.id);else{const ye=k?.replace(oc,dt.common.strings.empty);Ie!=null&&Ke!=null&&b(Ie,Ke,F?.id,ye!=null&&ye.length>0?k:void 0)}}),Fe=()=>{V.current!=null&&V.current.click()},ve=()=>{F!==void 0&&F!=null&&(g([F.id]),L(void 0),X(!1))},Xe=Ee=>{const Ie=Ee.target.files?Ee.target.files[0]:null;if(Ie)if(!xd(Ie.type)||ce)console.warn("Please select a valid file.");else{const Ke=new FileReader;Ke.onload=function(ye){const Be=ye.target?.result;if(typeof Be=="string"){const wt={data:Be.split(",")[1],name:Ie.name,id:fd(e,Ie.name)};L(wt),X(!0),x([wt])}},Ke.readAsDataURL(Ie)}},ht=()=>{q.current&&q.current.scrollIntoView({behavior:"smooth"})},et=()=>{const Ee=Me.getValues(),{recipientEmailList:Ie,subject:Ke}=Ee[Ai];Ie!=null&&Ke!=null&&S(Ie,Ke,F?.id,k)};s.useEffect(()=>{j(l.zeniRequestsHtml)},[l.zeniRequestsHtml]),s.useEffect(()=>{P.current=F},[F]),s.useEffect(()=>{L(pd(l.attachmentFile)),X(!1)},[l.attachmentFile]),s.useEffect(()=>{ce&&v()},[ce,v]);const fe=Di(`${m.year}-${m.month}-01`).format(dt.dateFormat.visual.MMMMFormat),_e=D!=null?D.split(sc):[],Vt=l.concatenatedHtml,tt=()=>l.lastDraftSavedDate!=null&&r===!1?t.jsx(Ic,{time:l.lastDraftSavedDate,user:l.reportLastSavedByUser,timeStampLabel:dt.cockpit.monthEndReport.timeStampLabel}):null,pt=()=>h===!0?ee?t.jsxs(t.Fragment,{children:[t.jsx(Ng,{allThreadsSectionOpen:d,children:t.jsx(jc,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${w.colors.grey3}`,boxShadow:`${n.sp0} 1px 2px ${n.sp0} ${he.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${n.sp5} - ${n.sp5})`,backgroundColor:w.colors.background},threadsContainerStyle:{paddingBottom:r?"160px":n.sp12},collapsibleThreadStyle:{width:`calc(100% - ${n.sp4})`},allowComposer:!1,drawerTitle:dt.common.texts.comments,filter:a,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(Ee,Ie)=>{G(Ie);const Ke=ne.findIndex(ye=>ye[0]===Ie);y(),_.current?.[Ke]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>y()})}),t.jsx(no,{availableWidth:C})]}):t.jsx($c,{observer:Z,canvasContainerRef:te,sortedThreads:ne,threadsPositions:H,threadsRefs:_,unresolvedThreadsMap:oe,editorMode:!r,style:{minWidth:`${C}px`,position:"relative",height:"fit-content",top:`${te.current?.offsetTop}px`,minHeight:n.sp12},handleRemoveFloatingThread:K}):t.jsx(no,{availableWidth:C}),Lt=(l.zeniRequestsData??[]).length+ac(l.companyMonthEndReportTemplatesData).length;return t.jsxs(t.Fragment,{children:[t.jsxs(Ag,{ref:J,children:[t.jsx(no,{availableWidth:d?A:C}),t.jsxs(Lg,{children:[t.jsx(fn,{...Me,children:t.jsx("form",{id:da(la),onSubmit:De,children:t.jsxs(_g,{children:[t.jsx(rc,{sectionId:Ai,previewMode:r,subject:M}),!r&&Lt>0?t.jsx(lc,{totalItems:Lt,onClickCustomerRequest:T}):null,t.jsxs(Dg,{id:hs,ref:te,children:[t.jsxs(Mg,{className:"monthEndReportCanvasWrapper",children:[F!=null||ce?t.jsx(Og,{"data-testid":B("email-attachment-container"),onClick:ht,children:t.jsx(cc,{fileSizeError:ce,setFileSizeError:ge,loading:!1,showAnimation:!r&&U})}):null,r?t.jsx(ra,{dangerouslySetInnerHTML:{__html:dc(Vt)}}):t.jsxs(t.Fragment,{children:[t.jsxs(Eg,{id:uc,children:[t.jsx(Re,{dangerouslySetInnerHTML:{__html:_e[0]!=null?_e[0]+"</body></html>":dt.common.strings.empty}}),t.jsxs(Rg,{children:[t.jsx(Fg,{children:dt.cockpit.monthEndReport.editorTitle}),t.jsx(Pg,{children:dt.cockpit.monthEndReport.editorNote})]})]}),t.jsx(zg,{id:hc,children:t.jsx(pc,{handleFileInputClick:Fe,fileAttached:F!=null,enableZeniGPTFeature:i,isZeniGPTResponseLoading:$e,initialHtmlString:l.zeniRequestsHtml,improveUsingZeniGPTClick:p,setZeniRequestsHtml:j,customerRequestData:u})}),t.jsx(ra,{id:hr,dangerouslySetInnerHTML:{__html:_e[1]!=null?"<html><body>"+_e[1]:dt.common.strings.empty}})]}),F!=null?t.jsx(mc,{ref:q,fileName:F.name,fileSize:gc(F.data),onRemove:ve,isRemovable:!r}):null]}),E?t.jsx(xc,{style:{zIndex:15},coords:E,alignment:je.alignment,onClick:de}):null,t.jsx(fc,{canvasContainerRef:te,sortedThreads:ne,editorMode:!r,isZeniUser:h})]})]})})}),t.jsx(Uo,{name:F?.name??dt.common.strings.empty,fileRef:V,sizeLimit:Tg,acceptableTypes:Ig,onFileChange:async Ee=>{Xe(Ee)},onFileSizeError:Ee=>ge(Ee),multiple:!1})]}),pt()]}),t.jsx(nr,{style:{zIndex:10},leftSideComponent:tt(),formId:da(la),cancelBtn:{isDisabled:$e,label:r===!0?dt.cockpit.monthEndReport.editButtonLabel:dt.cockpit.monthEndReport.saveChanges,onClick:r===!0?$:et,style:{width:"136px",padding:`${n.sp0} ${n.sp3}`,boxSizing:"border-box"},size:"medium",isLoading:l.saveMonthEndReportStatus.fetchState==="In-Progress",reverseSpinnerColor:!1},primaryBtn:{isDisabled:$e,isLoading:r===!0?l.sendMonthEndReportStatus.fetchState==="In-Progress":l.previewMonthEndReportStatus.fetchState==="In-Progress",style:{width:r===!0?"unset":"136px"},label:r===!0?dt.cockpit.monthEndReport.sendEmailButtonLabel.replace("__month__",fe):dt.cockpit.monthEndReport.preview,size:"medium"}})]})}const ca=e=>({[Ai]:{recipientEmailList:e.recipientEmailList,subject:e.subject??dt.common.strings.empty}}),da=e=>`${e}_form`;yt.smallBold.lineHeightValue;const Hg=1,Wg=50,ua=56,qg=["memo_and_receipt","activity","paymentAccount","receipt"],ha=e=>Qo(e,qg),io=905,Kg=1240,Jg=1440,Qg=1920;function Bt(e,i,l,r){const u=i,d=Math.round(i*Kg/io),a=Math.round(i*Jg/io),c=Math.round(i*Qg/io),h=l??a,m=r??h;return new Q(e,i,u,Math.min(d,h),Math.min(a,h),Math.min(c,m))}const{common:{strings:{empty:Gg}},expenseAutomation:{transactions:{header:{vendors:Yg,category:Zg,classText:Xg,date:e1,type:t1,amount:n1,paymentAccount:i1,memoReceipt:o1}}}}=me.getLocalizedStrings(),cl={key:"vendor",value:Yg,sortOrder:"ascending",width:Bt(200,200,220,360),customStyle:{common:{paddingLeft:f[7]}}},s1={key:"payment_account",value:i1,sortOrder:"ascending",width:Bt(180,180,200,320),customStyle:{common:{paddingLeft:f[0]}}},a1={key:"category",value:Zg,sortOrder:"ascending",width:Bt(200,200,220,360),customStyle:{common:{paddingLeft:f[6]}}},r1={key:"class",value:Xg,sortOrder:"ascending",width:Bt(200,200,220,360),customStyle:{common:{paddingLeft:f[6]}}},l1={key:"date",value:e1,sortOrder:"descending",width:Bt(108,108,130,144),customStyle:{common:{paddingLeft:f[0]}}},c1={key:"transaction_type",value:t1,sortOrder:"descending",width:Bt(108,108,130,144),customStyle:{common:{paddingLeft:0}}},d1={key:"memo_and_receipt",value:o1,sortOrder:"ascending",width:Bt(108,108,108,120),customStyle:{common:{paddingLeft:0,justifyContent:"center",display:"flex",alignItems:"center"}}},dl={key:"amount",value:n1,sortOrder:"ascending",width:Bt(108,108,140,156),customStyle:{common:{paddingRight:f[0],justifyContent:"flex-end",display:"flex",alignItems:"center"}}},u1={key:"activity",value:Gg,sortOrder:"ascending",width:Bt(f[6],f[6],48,54),customStyle:{common:{}}},as=e=>{const i=[cl,s1,a1,r1,l1,c1,d1,dl];return e===!0&&i.push(u1),i},rs=[{...cl,width:new Q(65,65)},{...dl,width:new Q(30,30)}],oo={sortKey:"date",sortOrder:"descending"},ul=({sortConfig:e,isDisabled:i,isTransactionActivityEnabled:l,onColumnSortConfigChanged:r})=>{const u=be(),d=Ze(),a=d?rs:as(l),[c,h]=s.useState(Do(a));s.useEffect(()=>{const g=Do(a);for(const x of g)x.key===e.sortKey?x.sortOrder=e.sortOrder:x.sortOrder="ascending";h(g)},[e.sortKey,e.sortOrder,d]);const m=(g,x)=>{let y=x;e.sortKey===g&&(y=x==="ascending"?"descending":"ascending"),r(g,y)},p=g=>{ha(g.key)==null&&m(Cd(g.key),g.sortOrder)};return t.jsx(h1,{windowSize:u,isQuickViewMode:d,"data-testid":B("transaction-categorization-header-container"),children:c.map((g,x)=>{const y=i!=null||ha(g.key)!=null;return t.jsxs(p1,{sortDataValue:e.sortKey,actualDataValue:g.key,wrapperWidth:g.width,style:g.customStyle?.common,isSortDisabled:y,isQuickViewMode:d,windowSize:u,isLastItem:x===c.length-1,"data-testid":B("transaction-categorization-header-wrapper",g.key),children:[t.jsxs(y1,{"data-testid":B("transaction-categorization-header",g.value?g.value:g.key),onClick:()=>p(g),isSortDisabled:y,children:[t.jsx(w1,{children:g.value}),y?null:t.jsx(g1,{sortConfig:e,headerData:g,"data-testid":B("transaction-categorization-sort-icon",g.key),children:t.jsx(f1,{})})]}),y?null:t.jsx(x1,{isSortDisabled:y,sortDataValue:e.sortKey,isVisible:e.sortKey===g.key&&e.sortKey!==oo.sortKey,"data-testid":B("transaction-categorization-close-icon",g.key),children:t.jsx(m1,{onClick:()=>{m(oo.sortKey,oo.sortOrder)},"data-testid":B("transaction-categorization-close-icon-button",g.key)})})]},g.key)})})},h1=o.div`
1235
+ `,Ai="monthEndReportFormSection",la="monthEndReportPage",dt=me.getLocalizedStrings();function Ug({companyId:e,enableZeniGPTFeature:i,monthEndReportView:l,previewMode:r,customerRequestData:u,allThreadsSectionOpen:d,filterMetaData:a,newThreadMetadata:c,isZeniUser:h,selectedPeriod:m,improveUsingZeniGPTClick:p,onRemoveFileAttachment:g,onUpdateFileAttachment:x,onCloseAllThreadsSection:y,previewMonthEndReport:b,saveMonthEndReport:S,onEditClick:$,onOpenFileAttachmentSnackBar:v,onClickCustomerRequest:T,sendMonthEndReport:I}){const w=Tt(),[k,j]=s.useState(),[C,z]=s.useState(0),[A,R]=s.useState(0),P=s.useRef(),V=s.useRef(null),q=s.useRef(null),{html:D,subject:M,improveUsingZeniGPTStatus:ae}=l,[F,L]=s.useState(),[U,X]=s.useState(!1),[ce,ge]=s.useState(!1),te=s.useRef(null),J=s.useRef(null),ee=ec(d,250),H=l.fetchState==="Not-Started"||l.fetchState==="In-Progress"||l.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||l.companyMonthEndReportTemplatesData.fetchState==="In-Progress",{threadsRefs:_,sortedThreads:ne,threadsPositions:W,observer:Z,unresolvedThreadsMap:oe,handleRemoveFloatingThread:K}=tc(a,te,!r,H,h),N=s.useCallback(()=>{d?J.current!=null&&R(Math.min((J.current.offsetWidth-Vn-f[4])/2,J.current.offsetWidth-Vn-lr-f[4])):J.current!=null&&z(Math.min((J.current.offsetWidth-Vn-f[4])/2,J.current.offsetWidth-Vn-cr-f[4]))},[d]);s.useEffect(()=>{N()},[d,N]),s.useEffect(()=>(window.addEventListener("resize",N),()=>{window.removeEventListener("resize",N)}),[N]);const O=h?er:tr,{openThread:se,addThread:Y,setOpenThread:G}=s.useContext(O),je=nc(hs,!1,!r),Te=te.current?.getBoundingClientRect(),E=je!=null&&je.coords&&Te?{left:je.coords.left-Te.left,top:je.coords.top-Te.top}:void 0,de=s.useCallback(()=>{const Ee=window.getSelection()?.getRangeAt(0),Ie=ic();if(!Ee||Ie==null)return;const Ke={...c,...Ie,startPath:Ie.startPath.join(),endPath:Ie.endPath.join()},ye=`${ur()}${dr}`,Be=`cockpit_${e}`;Y(ye,{type:"thread",id:ye,roomId:Be,createdAt:new Date,comments:[],metadata:Ke,updatedAt:new Date,resolved:!1}),G(ye)},[Y,e,c,G]);s.useEffect(()=>{se!=null&&d&&y()},[d,se,y]);const $e=ae.fetchState==="In-Progress",Me=xn({mode:"all",defaultValues:ca(l),values:ca(l)}),De=Me.handleSubmit(Ee=>{const{recipientEmailList:Ie,subject:Ke}=Ee[Ai];if(r===!0)I?.(F?.id);else{const ye=k?.replace(oc,dt.common.strings.empty);Ie!=null&&Ke!=null&&b(Ie,Ke,F?.id,ye!=null&&ye.length>0?k:void 0)}}),Fe=()=>{V.current!=null&&V.current.click()},ve=()=>{F!==void 0&&F!=null&&(g([F.id]),L(void 0),X(!1))},Xe=Ee=>{const Ie=Ee.target.files?Ee.target.files[0]:null;if(Ie)if(!xd(Ie.type)||ce)console.warn("Please select a valid file.");else{const Ke=new FileReader;Ke.onload=function(ye){const Be=ye.target?.result;if(typeof Be=="string"){const wt={data:Be.split(",")[1],name:Ie.name,id:fd(e,Ie.name)};L(wt),X(!0),x([wt])}},Ke.readAsDataURL(Ie)}},ht=()=>{q.current&&q.current.scrollIntoView({behavior:"smooth"})},et=()=>{const Ee=Me.getValues(),{recipientEmailList:Ie,subject:Ke}=Ee[Ai];Ie!=null&&Ke!=null&&S(Ie,Ke,F?.id,k)};s.useEffect(()=>{j(l.zeniRequestsHtml)},[l.zeniRequestsHtml]),s.useEffect(()=>{P.current=F},[F]),s.useEffect(()=>{L(pd(l.attachmentFile)),X(!1)},[l.attachmentFile]),s.useEffect(()=>{ce&&v()},[ce,v]);const fe=Di(`${m.year}-${m.month}-01`).format(dt.dateFormat.visual.MMMMFormat),_e=D!=null?D.split(sc):[],Vt=l.concatenatedHtml,tt=()=>l.lastDraftSavedDate!=null&&r===!1?t.jsx(Ic,{time:l.lastDraftSavedDate,user:l.reportLastSavedByUser,timeStampLabel:dt.cockpit.monthEndReport.timeStampLabel}):null,pt=()=>h===!0?ee?t.jsxs(t.Fragment,{children:[t.jsx(Ng,{allThreadsSectionOpen:d,children:t.jsx(jc,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${w.colors.grey3}`,boxShadow:`${n.sp0} 1px 2px ${n.sp0} ${he.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${n.sp5} - ${n.sp5})`,backgroundColor:w.colors.background},threadsContainerStyle:{paddingBottom:r?"160px":n.sp12},collapsibleThreadStyle:{width:`calc(100% - ${n.sp4})`},allowComposer:!1,drawerTitle:dt.common.texts.comments,filter:a,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(Ee,Ie)=>{G(Ie);const Ke=ne.findIndex(ye=>ye[0]===Ie);y(),_.current?.[Ke]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>y()})}),t.jsx(no,{availableWidth:C})]}):t.jsx($c,{observer:Z,canvasContainerRef:te,sortedThreads:ne,threadsPositions:W,threadsRefs:_,unresolvedThreadsMap:oe,editorMode:!r,style:{minWidth:`${C}px`,position:"relative",height:"fit-content",top:`${te.current?.offsetTop}px`,minHeight:n.sp12},handleRemoveFloatingThread:K}):t.jsx(no,{availableWidth:C}),Lt=(l.zeniRequestsData??[]).length+ac(l.companyMonthEndReportTemplatesData).length;return t.jsxs(t.Fragment,{children:[t.jsxs(Ag,{ref:J,children:[t.jsx(no,{availableWidth:d?A:C}),t.jsxs(Lg,{children:[t.jsx(fn,{...Me,children:t.jsx("form",{id:da(la),onSubmit:De,children:t.jsxs(_g,{children:[t.jsx(rc,{sectionId:Ai,previewMode:r,subject:M}),!r&&Lt>0?t.jsx(lc,{totalItems:Lt,onClickCustomerRequest:T}):null,t.jsxs(Dg,{id:hs,ref:te,children:[t.jsxs(Mg,{className:"monthEndReportCanvasWrapper",children:[F!=null||ce?t.jsx(Og,{"data-testid":B("email-attachment-container"),onClick:ht,children:t.jsx(cc,{fileSizeError:ce,setFileSizeError:ge,loading:!1,showAnimation:!r&&U})}):null,r?t.jsx(ra,{dangerouslySetInnerHTML:{__html:dc(Vt)}}):t.jsxs(t.Fragment,{children:[t.jsxs(Eg,{id:uc,children:[t.jsx(Re,{dangerouslySetInnerHTML:{__html:_e[0]!=null?_e[0]+"</body></html>":dt.common.strings.empty}}),t.jsxs(Rg,{children:[t.jsx(Fg,{children:dt.cockpit.monthEndReport.editorTitle}),t.jsx(Pg,{children:dt.cockpit.monthEndReport.editorNote})]})]}),t.jsx(zg,{id:hc,children:t.jsx(pc,{handleFileInputClick:Fe,fileAttached:F!=null,enableZeniGPTFeature:i,isZeniGPTResponseLoading:$e,initialHtmlString:l.zeniRequestsHtml,improveUsingZeniGPTClick:p,setZeniRequestsHtml:j,customerRequestData:u})}),t.jsx(ra,{id:hr,dangerouslySetInnerHTML:{__html:_e[1]!=null?"<html><body>"+_e[1]:dt.common.strings.empty}})]}),F!=null?t.jsx(mc,{ref:q,fileName:F.name,fileSize:gc(F.data),onRemove:ve,isRemovable:!r}):null]}),E?t.jsx(xc,{style:{zIndex:15},coords:E,alignment:je.alignment,onClick:de}):null,t.jsx(fc,{canvasContainerRef:te,sortedThreads:ne,editorMode:!r,isZeniUser:h})]})]})})}),t.jsx(Uo,{name:F?.name??dt.common.strings.empty,fileRef:V,sizeLimit:Tg,acceptableTypes:Ig,onFileChange:async Ee=>{Xe(Ee)},onFileSizeError:Ee=>ge(Ee),multiple:!1})]}),pt()]}),t.jsx(nr,{style:{zIndex:10},leftSideComponent:tt(),formId:da(la),cancelBtn:{isDisabled:$e,label:r===!0?dt.cockpit.monthEndReport.editButtonLabel:dt.cockpit.monthEndReport.saveChanges,onClick:r===!0?$:et,style:{width:"136px",padding:`${n.sp0} ${n.sp3}`,boxSizing:"border-box"},size:"medium",isLoading:l.saveMonthEndReportStatus.fetchState==="In-Progress",reverseSpinnerColor:!1},primaryBtn:{isDisabled:$e,isLoading:r===!0?l.sendMonthEndReportStatus.fetchState==="In-Progress":l.previewMonthEndReportStatus.fetchState==="In-Progress",style:{width:r===!0?"unset":"136px"},label:r===!0?dt.cockpit.monthEndReport.sendEmailButtonLabel.replace("__month__",fe):dt.cockpit.monthEndReport.preview,size:"medium"}})]})}const ca=e=>({[Ai]:{recipientEmailList:e.recipientEmailList,subject:e.subject??dt.common.strings.empty}}),da=e=>`${e}_form`;yt.smallBold.lineHeightValue;const Wg=1,Hg=50,ua=56,qg=["memo_and_receipt","activity","paymentAccount","receipt"],ha=e=>Qo(e,qg),io=905,Kg=1240,Jg=1440,Qg=1920;function Bt(e,i,l,r){const u=i,d=Math.round(i*Kg/io),a=Math.round(i*Jg/io),c=Math.round(i*Qg/io),h=l??a,m=r??h;return new Q(e,i,u,Math.min(d,h),Math.min(a,h),Math.min(c,m))}const{common:{strings:{empty:Gg}},expenseAutomation:{transactions:{header:{vendors:Yg,category:Zg,classText:Xg,date:e1,type:t1,amount:n1,paymentAccount:i1,memoReceipt:o1}}}}=me.getLocalizedStrings(),cl={key:"vendor",value:Yg,sortOrder:"ascending",width:Bt(200,200,220,360),customStyle:{common:{paddingLeft:f[7]}}},s1={key:"payment_account",value:i1,sortOrder:"ascending",width:Bt(180,180,200,320),customStyle:{common:{paddingLeft:f[0]}}},a1={key:"category",value:Zg,sortOrder:"ascending",width:Bt(200,200,220,360),customStyle:{common:{paddingLeft:f[6]}}},r1={key:"class",value:Xg,sortOrder:"ascending",width:Bt(200,200,220,360),customStyle:{common:{paddingLeft:f[6]}}},l1={key:"date",value:e1,sortOrder:"descending",width:Bt(108,108,130,144),customStyle:{common:{paddingLeft:f[0]}}},c1={key:"transaction_type",value:t1,sortOrder:"descending",width:Bt(108,108,130,144),customStyle:{common:{paddingLeft:0}}},d1={key:"memo_and_receipt",value:o1,sortOrder:"ascending",width:Bt(108,108,108,120),customStyle:{common:{paddingLeft:0,justifyContent:"center",display:"flex",alignItems:"center"}}},dl={key:"amount",value:n1,sortOrder:"ascending",width:Bt(108,108,140,156),customStyle:{common:{paddingRight:f[0],justifyContent:"flex-end",display:"flex",alignItems:"center"}}},u1={key:"activity",value:Gg,sortOrder:"ascending",width:Bt(f[6],f[6],48,54),customStyle:{common:{}}},as=e=>{const i=[cl,s1,a1,r1,l1,c1,d1,dl];return e===!0&&i.push(u1),i},rs=[{...cl,width:new Q(65,65)},{...dl,width:new Q(30,30)}],oo={sortKey:"date",sortOrder:"descending"},ul=({sortConfig:e,isDisabled:i,isTransactionActivityEnabled:l,onColumnSortConfigChanged:r})=>{const u=be(),d=Ze(),a=d?rs:as(l),[c,h]=s.useState(Do(a));s.useEffect(()=>{const g=Do(a);for(const x of g)x.key===e.sortKey?x.sortOrder=e.sortOrder:x.sortOrder="ascending";h(g)},[e.sortKey,e.sortOrder,d]);const m=(g,x)=>{let y=x;e.sortKey===g&&(y=x==="ascending"?"descending":"ascending"),r(g,y)},p=g=>{ha(g.key)==null&&m(Cd(g.key),g.sortOrder)};return t.jsx(h1,{windowSize:u,isQuickViewMode:d,"data-testid":B("transaction-categorization-header-container"),children:c.map((g,x)=>{const y=i!=null||ha(g.key)!=null;return t.jsxs(p1,{sortDataValue:e.sortKey,actualDataValue:g.key,wrapperWidth:g.width,style:g.customStyle?.common,isSortDisabled:y,isQuickViewMode:d,windowSize:u,isLastItem:x===c.length-1,"data-testid":B("transaction-categorization-header-wrapper",g.key),children:[t.jsxs(y1,{"data-testid":B("transaction-categorization-header",g.value?g.value:g.key),onClick:()=>p(g),isSortDisabled:y,children:[t.jsx(w1,{children:g.value}),y?null:t.jsx(g1,{sortConfig:e,headerData:g,"data-testid":B("transaction-categorization-sort-icon",g.key),children:t.jsx(f1,{})})]}),y?null:t.jsx(x1,{isSortDisabled:y,sortDataValue:e.sortKey,isVisible:e.sortKey===g.key&&e.sortKey!==oo.sortKey,"data-testid":B("transaction-categorization-close-icon",g.key),children:t.jsx(m1,{onClick:()=>{m(oo.sortKey,oo.sortOrder)},"data-testid":B("transaction-categorization-close-icon-button",g.key)})})]},g.key)})})},h1=o.div`
1236
1236
  top: ${n.sp0};
1237
1237
  left: ${n.sp0};
1238
- height: ${Wg}px;
1238
+ height: ${Hg}px;
1239
1239
  z-index: 2;
1240
1240
  display: flex;
1241
1241
  flex-wrap: nowrap;
@@ -1297,7 +1297,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
1297
1297
  }
1298
1298
  `,w1=o(Ye)`
1299
1299
  display: flex;
1300
- `,so="expenseAutomationTransactionsPage",mn="transactionCategorizationListTable",Pe="account",ut="class",jt="lineEntitySelection",C1="lineEntity",b1="recommendations",hl="lineInfo",v1="vendorDetails",S1="customerDetails",Ri="selectedTransactionIds",Ut=(e,i,l)=>`${e}.${l}.${i}`,k1=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M4.85022 13.5836L5.52057 12.9133C5.63229 12.8016 5.77164 12.7217 5.92438 12.6815C6.07712 12.6413 6.23779 12.6424 6.38999 12.6846C6.54218 12.7268 6.68046 12.8086 6.7907 12.9217C6.90094 13.0348 6.97919 13.1751 7.01747 13.3283L7.08174 13.5836L7.8119 13.0972C7.98361 12.9827 8.1897 12.9312 8.39508 12.9515C8.60046 12.9719 8.79245 13.0628 8.93837 13.2087L9.31326 13.5836H11.0985",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M17.4206 6H2.24629C2.12792 6 2.01441 6.04702 1.93071 6.13072C1.84701 6.21442 1.79999 6.32794 1.79999 6.4463V17.1576C1.79999 17.276 1.84701 17.3895 1.93071 17.4732C2.01441 17.5569 2.12792 17.6039 2.24629 17.6039H21.8837C22.0021 17.6039 22.1156 17.5569 22.1993 17.4732C22.283 17.3895 22.33 17.276 22.33 17.1576V6.4463C22.33 6.32794 22.283 6.21442 22.1993 6.13072C22.1156 6.04702 22.0021 6 21.8837 6H17.4206Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M16.0854 9.6521H19.6559V12.0656H16.0854V9.6521Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),pl=e=>s.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M0.929688 8.00813C0.929688 8.675 1.02283 9.32014 1.19683 9.93121M2.20132 3.98138C3.46937 2.17826 5.566 1 7.93783 1C11.8083 1 14.946 4.13765 14.946 8.00813C14.946 10.2186 13.9226 12.1901 12.3237 13.4745M2.01692 11.7591C2.35672 12.2943 2.7671 12.7804 3.23498 13.2041M4.80209 14.2773C5.39521 14.5746 6.03636 14.7901 6.7108 14.9092M8.65531 14.98C9.34096 14.9103 9.99736 14.7418 10.6101 14.4888",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M8 4.66602V7.93891L11.0228 10.9322",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.1813 4.23989L1.83594 4.24014V1.89453",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})),j1=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M21.7995 14.6384L14.7656 21.6723L11.3086 22.3637L12 18.9067L19.0339 11.8728C19.3997 11.5071 19.8958 11.3016 20.413 11.3016C20.9303 11.3016 21.4263 11.5071 21.7922 11.8728L21.7995 11.8811C21.9808 12.062 22.1246 12.2769 22.2227 12.5134C22.3208 12.75 22.3713 13.0036 22.3713 13.2597C22.3713 13.5158 22.3208 13.7694 22.2227 14.006C22.1246 14.2426 21.9808 14.4575 21.7995 14.6384Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M8.54295 19.5981H3.0117C2.82886 19.6026 2.64701 19.57 2.47718 19.5021C2.30735 19.4342 2.15309 19.3325 2.02376 19.2032C1.89444 19.0739 1.79275 18.9196 1.72487 18.7498C1.65699 18.58 1.62433 18.3981 1.62888 18.2153V4.48579C1.61644 4.10613 1.75499 3.73703 2.01419 3.45934C2.27339 3.18165 2.63209 3.01804 3.0117 3.00433H16.8398C17.2194 3.01804 17.5781 3.18165 17.8373 3.45934C18.0965 3.73703 18.2351 4.10613 18.2226 4.48579V8.53558",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M14.055 8.06982L5.80499 8.06982",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M10.305 12.5698L5.80499 12.5698",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),$1=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M20.25 19.5H6.75C6.55109 19.5 6.36032 19.421 6.21967 19.2803C6.07902 19.1397 6 18.9489 6 18.75V2.25C6 2.05109 6.07902 1.86032 6.21967 1.71967C6.36032 1.57902 6.55109 1.5 6.75 1.5H15.75L21 6.75V18.75C21 18.9489 20.921 19.1397 20.7803 19.2803C20.6397 19.421 20.4489 19.5 20.25 19.5Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M15.75 1.5V6.75H21",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M10.4941 11.2559H16.4941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M10.4941 14.2559H16.4941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M16.5 22.5H3V5.85315",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{common:{strings:{underscore:I1,hyphen:Ht,empty:qt,colon:pa},tooltips:{addReceipt:T1,viewReceipt:L1,viewReceipts:A1}},expenseAutomation:{transactions:St},dateFormat:R1}=me.getLocalizedStrings(),_t={containerPaddingLeftRight:new Q(f[3],f[4]),containerPaddingTopBottom:new Q(f[1],f[2]),containerPaddingTopBottomEmpty:new Q(f[2],f[3]),nameLogoWidth:new Q(f[2],f[4]),nameLogoHeight:new Q(f[2],f[4])},E1=({transactionView:e,transaction:i,sectionId:l,vendorSearchAutoCompleteData:r,vendorSearchAutoCompleteActions:u,selectedTab:d,containerRef:a,listContainerRef:c,isCOTEnabled:h,cotTracking:m,onTransactionCategorizationRowClick:p,setCurrentTransactionInAction:g,vendorLoadOptions:x,openTooltipId:y,setOpenTooltipId:b,isUncategorizedExpenseCategoryEnabled:S,setActivityLogTransactionId:$,isTransactionActivityEnabled:v,authParams:T,onUploadTransactionReceipt:I})=>{const w=be(),k=Ze(),[j,C]=s.useState(!1),[z,A]=s.useState(!1),{lineItemById:R,sortedLineItems:P}=i.transactionReviewLocalData,V=i.transactionReviewLocalData.tabSpecificLineItems?.[d]||[],q=P.filter(O=>V.indexOf(O)!==-1),D=[];q.forEach(O=>{D.push(R[O])});const{accountList:M,accountsHierarchyList:ae,classHierarchyList:F,classList:L,uncategorizedAccounts:U,transactions:X,selectedCheckBoxTransactionIds:ce}=e,ge=e.uploadReceiptStatusById,te=ce.includes(i.transactionId),J=Tt(),ee={control:()=>({marginLeft:-2,backgroundColor:j?J.colors.background:J.colors.grey5}),valueContainer:()=>({justifyContent:"flex-start",paddingLeft:f[0]}),menu:()=>({width:"150%",background:J.colors.grey5}),singleValue:()=>({color:j||te?J.colors.primary:J.colors.hero,paddingLeft:f[2]}),input:O=>({...O,color:j||te?J.colors.primary:J.colors.hero,textAlign:"left",paddingLeft:f[2]}),menuPortal:O=>({...O,zIndex:10})},W={...ee,singleValue:O=>({...O,color:j||te?J.colors.primary:J.colors.hero}),menu:()=>({marginTop:f[1],marginLeft:-8}),input:O=>({...O,color:j||te?J.colors.primary:J.colors.hero,textAlign:"left"})},_=X.find(O=>O.id===i.transactionId),ne=(O,se)=>{const{transactionType:Y}=se.transactionReviewLocalData;let G=O.target;for(;G;){if(G.classList.contains("select-value-container")||G.classList.contains("item-value-container")||G.classList.contains("grouped-single-select-field__value-container")||G.classList.contains("auto-complete-grouped-creatable-single-custom-group-select-field__option")||G.classList.contains("grouped-single-select-field__input")||G.classList.contains("grouped-single-select-field__menu"))return;G=G.parentElement}Y!=null&&p(se.transactionId,Y)},H=s.useRef(null),[Z,oe]=s.useState(void 0),[K,N]=s.useState("bottom");return s.useEffect(()=>{if(Z===void 0)return;const O=c?.current?._outerRef??null,se=()=>{const Y=H.current;if(Y==null||O==null)return;const G=Y.getBoundingClientRect(),je=O.getBoundingClientRect(),Te=O.scrollTop+(G.bottom-je.top),E=O.scrollHeight-Te;N(E>=288?"bottom":"top")};return se(),window.addEventListener("resize",se),O?.addEventListener("scroll",se),()=>{window.removeEventListener("resize",se),O?.removeEventListener("scroll",se)}},[c,Z]),t.jsxs(M1,{onMouseEnter:k?void 0:()=>C(!0),onMouseLeave:k?void 0:()=>C(!1),children:[t.jsx(z1,{className:"categorization-row-card",windowSize:w,isSelected:te,isQuickViewMode:k,isHovered:j,children:t.jsx(P1,{children:D.map((O,se)=>t.jsx(F1,{ref:Z===se?H:void 0,"data-testid":B("transaction-categorization-list-row",O.lineId),windowSize:w,isQuickViewMode:k,onClick:Y=>ne(Y,i),children:t.jsx(D1,{isTransactionActivityEnabled:v,line:O,isHovered:j||te,isSelected:te,isQuickViewMode:k,lineIndex:se,sectionId:l,transaction:i,currentTransaction:_,windowSize:w,accountsHierarchyList:ae,classHierarchyList:F,allAccountList:M,allClassList:L,uncategorizedAccounts:U,vendorSearchAutoCompleteData:r,vendorSearchAutoCompleteActions:u,setCurrentTransactionInAction:g,vendorLoadOptions:x,customStyle:ee,customStyleAutoComplete:W,recommendations:O.recommendationsWithCOT,selectedTab:d,isCOTEnabled:h,menuPlacement:K,cotTracking:m,openTooltipId:y,setOpenTooltipId:b,isUncategorizedExpenseCategoryEnabled:S,authParams:T,uploadReceiptStatus:ge?.[i.transactionId],onUploadTransactionReceipt:I,onDropdownClose:()=>oe(void 0),onDropdownOpen:()=>oe(se)})},`${i.transactionId}.${O.lineId}`))},i.transactionId)},i.transactionId),v===!0&&!k&&t.jsx(ox,{className:"activity-log-icon",onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),onClick:O=>{O.stopPropagation(),$(i.transactionId)},children:t.jsx(xe,{title:St.header.activity,placement:"bottom",children:t.jsx(sx,{style:{color:z?J.colors.primary:J.colors.hero}})})})]})},D1=({accountsHierarchyList:e,allAccountList:i,allClassList:l,classHierarchyList:r,customStyle:u,customStyleAutoComplete:d,line:a,lineIndex:c,transaction:h,currentTransaction:m,windowSize:p,uncategorizedAccounts:g,isHovered:x=!1,isSelected:y=!1,isQuickViewMode:b=!1,sectionId:S,recommendations:$,vendorSearchAutoCompleteData:v,selectedTab:T,isCOTEnabled:I,menuPlacement:w,cotTracking:k,openTooltipId:j,setCurrentTransactionInAction:C,vendorLoadOptions:z,setOpenTooltipId:A,isUncategorizedExpenseCategoryEnabled:R,isTransactionActivityEnabled:P,onDropdownClose:V,onDropdownOpen:q,authParams:D,uploadReceiptStatus:M,onUploadTransactionReceipt:ae})=>{const{transactionDate:F,transactionType:L,transactionTypeName:U,memo:X}=h.transactionReviewLocalData,{setValue:ce}=Ko(),ge=s.useCallback((ie,Se)=>{k?.onCOTView!=null&&k.onCOTView(a.lineId,h.transactionId,ie,Se)},[k,a.lineId,h.transactionId]),te=a.lineDescription,J=s.useMemo(()=>{if(te||X)return[{title:St.description,description:te||Ht},{title:St.header.memo,description:X||Ht}]},[X,te]),ee=Ut(S,jt,c.toString()),W=Ut(S,Pe,c.toString()),_=Ut(S,ut,c.toString()),ne=(ie,Se)=>{if(b)return;let Le;switch(Se){case"vendor":Le=ee;break;case"category":Le=W;break;case"class":Le=_;break;default:return}ce(`${Le}.selectedOption`,ie,{shouldValidate:!0,shouldDirty:!0})},H=Tt(),Z=s.useMemo(()=>m!=null&&ln(m)===!0?{id:h.transactionReviewLocalData.customer?.id??"",logo:h.transactionReviewLocalData.customer?.logo,name:h.transactionReviewLocalData.customer?.name??""}:{id:a.customer?.id??"",logo:a.customer?.logo,name:a.customer?.name??""},[m,a.customer?.id,a.customer?.logo,a.customer?.name,h.transactionReviewLocalData.customer?.id,h.transactionReviewLocalData.customer?.logo,h.transactionReviewLocalData.customer?.name]),oe=s.useMemo(()=>m!=null&&ln(m)===!0?{id:h.transactionReviewLocalData.vendor?.id??"",logo:h.transactionReviewLocalData.vendor?.logo,name:h.transactionReviewLocalData.vendor?.name??""}:{id:a.vendor?.id??"",logo:a.vendor?.logo,name:a.vendor?.name??""},[m,a.vendor?.id,a.vendor?.logo,a.vendor?.name,h.transactionReviewLocalData.vendor?.id,h.transactionReviewLocalData.vendor?.logo,h.transactionReviewLocalData.vendor?.name]),K=a[ut]?.classId,N=a[Pe]?.qboId??a[Pe]?.accountId,O=Z?.id,se=oe?.id,Y=oe?.name,[G,je]=s.useState(!K),[Te,E]=s.useState(!N||a[Pe]?.qboId!=null&&Nn(g,a[Pe].qboId,R===!0?["income"]:void 0)===!0),[de,$e]=s.useState(!se||!O),Me=ie=>$?.find(Se=>Se.vendor?.qboId===ie||Se.vendor?.id===ie||Se.vendor?.name===ie)?.vendor?.reason??"",De=h.transactionReviewLocalData.lineItemById[a.lineId]?.recommendationsWithCOT||[],Fe=$r(e,De),ve=jr(r,De),Xe=ie=>i.filter(Se=>Se.qboId===ie)[0]?.qboId,ht=ie=>l.filter(Se=>Se.classId===ie)[0]?.accountingClassNumber??void 0,et=s.useCallback(ie=>Nn(g,ie,R===!0?["income"]:void 0),[g,R]),[fe,_e]=s.useState(!1),[Vt,tt]=s.useState(!1),[pt,Lt]=s.useState(!1),[Ee,Ie]=s.useState(0),[Ke,ye]=s.useState(null),[Be,wt]=s.useState([]),[yn,Qe]=s.useState(void 0),wn=s.useRef(null),[Cn,Ct]=s.useState(0),[Yt,Zt]=s.useState(0),Xt=Vc()?.url,[ii,Mn]=s.useState(!1),Bi=(ie,Se)=>{C({transactionId:h.transactionId,lineItemId:a.lineId}),z(ie,Se)},en=()=>{$e(!(se||O)),_e(!1),V?.()},tn=()=>{N&&a[Pe]?.qboId!=null&&Nn(g,a[Pe].qboId,R===!0?["income"]:void 0)===!1?E(!1):E(!0),Mn(!1),V?.()},On=()=>{je(!K),tt(!1),V?.()},oi=()=>{b||(se||O)&&(_e(!0),q?.())},Vi=()=>{b||(tt(!0),q?.())},Ni=()=>{b||(Mn(!0),q?.())};s.useEffect(()=>{N&&a[Pe]?.qboId!=null&&Nn(g,a[Pe].qboId,R===!0?["income"]:void 0)===!1?E(!1):E(!0)},[N]),s.useEffect(()=>{je(!K)},[K]),s.useEffect(()=>{$e(!(se||O))},[se,O]);const si=h.transactionReviewLocalData.selectedEntity,ai=h.transactionReviewLocalData.lineItemById[a.lineId].selectedEntityLine,He=m!=null&&ln(m)===!0?si:ai,bn=s.useMemo(()=>{const ie=h.transactionReviewLocalData.lineItemById[a.lineId]?.recommendationsWithCOT||[],Se=v.entityAutoCompleteView;return{selectedOption:He?.qboId??He?.id,defaultOptions:Ho(Se,He,ie??[])}},[He,h.transactionReviewLocalData.lineItemById,a.lineId,v.entityAutoCompleteView]),Ae=()=>He!=null&&He.logo!=null?t.jsx(Xn,{photoUrl:He.logo.toString(),styles:{width:_t.nameLogoWidth.valuePx(p),height:_t.nameLogoHeight.valuePx(p)},fallbackAvatar:t.jsx(xa,{children:t.jsx(Jt,{name:He.name,size:n.sp4})})}):He!=null&&He.name!=null?t.jsx(xa,{children:t.jsx(Jt,{name:He.name,size:n.sp4})}):null,rt=(ie,Se)=>{if(Se==null||!Se)return;let Le=[];return ie.forEach(vt=>{Le=Le.concat(vt.options)}),Le.find(vt=>vt.value===Se)?.label??Se},At=rt(ve,K),ri=rt(Fe,N),bt=T==="review",nn=Wi("vendor",bn.defaultOptions,bn.selectedOption),zn=Wi("category",Fe,N),li=Wi("class",ve,K),Ui=ie=>{const Se=b?rs:as(ie);return Se.map((Le,vt)=>{const xt=`${h.transactionId}_${Le.key}_${a.lineId}`;if(c>0&&m!=null&&ln(m)===!0&&Le.key==="vendor")return t.jsx(mt,{windowSize:p,wrapperWidth:Le.width,isQuickViewMode:b},xt);if(c>0&&(Le.key==="transaction_type"||Le.key==="payment_account"||Le.key==="memo_and_receipt"))return t.jsx(mt,{windowSize:p,wrapperWidth:Le.width,isQuickViewMode:b},xt);switch(Le.key){case"activity":return t.jsx(gl,{},xt);case"vendor":default:return t.jsxs(mt,{windowSize:p,wrapperWidth:Le.width,isQuickViewMode:b,className:"item-value-container",children:[!b&&t.jsx(ao,{isCOTEnabled:I,recommendations:De,type:"vendor",isFirstColumn:!0,isEnabled:!!He?.isPreFilled,isMisCategorized:nn,onRecommendationClick:ne,selectedValue:se,selectedValueLabel:Y,isReviewTab:bt,isAccountOptionDisabled:et,existingOption:{label:m!=null&&ln(m)===!0?m?.vendor?.name:void 0,value:m!=null&&ln(m)===!0?m?.vendor?.id:void 0},cotTracking:k,lineId:a.lineId,transactionId:h.transactionId,openTooltipId:j,setOpenTooltipId:A}),t.jsx(ho,{children:de===!0?t.jsx(co,{isHovered:x,isQuickViewMode:b,children:t.jsxs(lo,{onClick:Ve=>{Ve.stopPropagation(),!b&&(q?.(),$e(!1),_e(!0))},"data-testid":B("add-vendor-button",S),style:{display:"inline-flex",alignItems:"center",color:he.brandColorGoldDark,cursor:"pointer",height:n.sp6},children:[t.jsx(bi,{}),St.addPayee]})}):fe===!0?t.jsx($t,{onClickAway:en,children:t.jsx(tx,{"data-testid":B("vendor-selection-dropdown-container",Ut(S,jt,c.toString())),children:t.jsx(qc,{name:ee,placeholder:St.addPayee,valueToInfo:Me,defaultValue:{selectedOption:bn.selectedOption,defaultOptions:bn.defaultOptions},type:"vendor",autoFocus:!de,style:{width:"100%"},pageSource:"list_page",transactionStatus:bt?"pending_review":"auto_categorized",isOptionRemovable:!1,customStyleConfig:d,menuIsOpen:fe,onMenuClose:en,registerOptions:{required:!1},loadOptions:Bi,showCOT:I,onCOTView:ge,menuPlacement:w})})}):t.jsx(ix,{children:t.jsxs(uo,{isHovered:x,isQuickViewMode:b,showOutline:!b&&nn&&He?.isPreFilled!==!0&&!y&&bt,children:[Ae(),t.jsx(ex,{onClick:oi,"data-testid":B("vendor-name-text",S),children:He!=null&&He.name?t.jsx(qe,{text:He.name,itemTextStyle:{color:x?H.colors.primary:H.colors.hero}}):t.jsx(nx,{children:Ht})})]})})})]},xt);case"category":{const Ve=m?.lines!=null?m?.lines[c]:void 0;return t.jsxs(mt,{windowSize:p,wrapperWidth:Le.width,className:"item-value-container",children:[t.jsx(ao,{isCOTEnabled:I,recommendations:De,type:"category",isFirstColumn:!1,isReviewTab:bt,isEnabled:!!a[Pe]?.isPreFilled,isAccountOptionDisabled:et,isMisCategorized:zn,onRecommendationClick:ne,selectedValue:N,selectedValueLabel:ri,existingOption:{label:Ve?.account?.accountName,value:Ve?.account?.qboId??Ve?.account?.accountId},cotTracking:k,lineId:a.lineId,transactionId:h.transactionId,openTooltipId:j,setOpenTooltipId:A}),t.jsx(ho,{children:Te===!0?t.jsx(co,{isHovered:x,children:t.jsxs(lo,{onClick:ct=>{ct.stopPropagation(),!b&&(q?.(),E(!1),Mn(!0))},"data-testid":B("category-selection-field",W),style:{display:"inline-flex",alignItems:"center",color:he.brandColorGoldDark,cursor:"pointer",height:n.sp6},children:[t.jsx(bi,{}),St.addCategory]})}):ii===!0?t.jsx($t,{onClickAway:tn,children:t.jsx(fa,{isHovered:x,"data-testid":B("category-selection-dropdown-container",W),children:t.jsx(Ss,{name:W,placeholder:St.addCategory,valueToId:ct=>Xe(ct),type:"category",pageSource:"list_page",transactionStatus:bt?"pending_review":"auto_categorized",showCOT:I,defaultValue:{selectedOption:N,allOptions:Fe},style:{display:"flex",flexGrow:1,width:"100%",cursor:"inherit"},registerOptions:{required:!1},menuIsOpen:ii,autoFocus:!Te&&(!N||a[Pe]?.qboId!=null&&[g.expense?.qboId,g.income?.qboId].includes(a[Pe].qboId)),onMenuClose:tn,customStyleConfig:u,disableCurrentOption:et,menuPlacement:w,onCOTView:ge})})}):t.jsx(uo,{isHovered:x,showOutline:zn&&a[Pe]?.isPreFilled!==!0&&!y&&bt,children:t.jsx(ya,{onClick:Ni,"data-testid":B("category-label-text",W),children:t.jsx(qe,{text:ri??"",itemTextStyle:{color:x?H.colors.primary:H.colors.hero}})})})})]},xt)}case"class":{const Ve=m?.lines!=null?m?.lines[c]:void 0;return t.jsxs(mt,{windowSize:p,wrapperWidth:Le.width,className:"item-value-container",children:[t.jsx(ao,{isCOTEnabled:I,recommendations:De,type:"class",isFirstColumn:!1,isReviewTab:bt,isEnabled:!!a[ut]?.isPreFilled,isAccountOptionDisabled:et,isMisCategorized:li,onRecommendationClick:ne,selectedValue:K,selectedValueLabel:At,existingOption:{label:Ve?.class?.className,value:Ve?.class?.classId},cotTracking:k,lineId:a.lineId,transactionId:h.transactionId,openTooltipId:j,setOpenTooltipId:A}),t.jsx(ho,{children:G===!0?t.jsx(co,{isHovered:x,children:t.jsxs(lo,{onClick:ct=>{ct.stopPropagation(),!b&&(q?.(),je(!1),tt(!0))},"data-testid":B("class-selection-field",_),style:{display:"inline-flex",alignItems:"center",color:he.brandColorGoldDark,cursor:"pointer",height:n.sp6},children:[t.jsx(bi,{}),St.addClass]})}):Vt===!0?t.jsx($t,{onClickAway:On,children:t.jsx(fa,{isHovered:x,"data-testid":B("class-selection-dropdown-container",_),children:t.jsx(Ss,{name:_,placeholder:St.addClass,valueToId:ct=>ht(ct),type:"class",showCOT:I,defaultValue:{selectedOption:K,allOptions:ve},pageSource:"list_page",transactionStatus:bt?"pending_review":"auto_categorized",menuIsOpen:Vt,registerOptions:{required:!1},style:{width:"100%"},autoFocus:!G&&!K,customStyleConfig:u,onMenuClose:On,menuPlacement:w,onCOTView:ge})})}):t.jsx(uo,{isHovered:x,showOutline:li&&a[ut]?.isPreFilled!==!0&&!y&&bt,children:t.jsx(ya,{"data-testid":B("class-selection-field",_),onClick:Vi,children:t.jsx(qe,{text:At??"",itemTextStyle:{color:x?H.colors.primary:H.colors.hero}})})})})]},xt)}case"date":return t.jsx(mt,{windowSize:p,wrapperWidth:Le.width,children:t.jsx(hn,{windowSize:p,isLastItem:vt===Se.length-1,children:t.jsx(Fo,{"data-testid":B("date-field",Ut(S,ut,c.toString())),children:t.jsx(ro,{style:{color:x?H.colors.primary:H.colors.hero},children:F!=null?F.format(R1.visual.MMMDCommaYYYYformat):null})})})},xt);case"transaction_type":return t.jsx(mt,{windowSize:p,wrapperWidth:Le.width,children:t.jsx(hn,{windowSize:p,"data-testid":B("transaction-type-field",Ut(S,ut,c.toString())),isLastItem:vt===Se.length-1,children:U!=null?t.jsx(Hc,{textColor:x?new qo(H.colors.primary):Wc(void 0,H),text:U??L}):null})},xt);case"amount":{const Ve=nt("0,0.[00]",a.amount,!0);return t.jsx(mt,{windowSize:p,style:{marginRight:ie&&!b?f[0]:f[4]},wrapperWidth:Le.width,isQuickViewMode:b,children:t.jsx(hn,{windowSize:p,isLastItem:vt===Se.length-1,style:{justifyContent:"flex-end"},children:t.jsx(Fo,{"data-testid":B("transaction-amount-field",Ut(S,ut,c.toString())),style:{color:x?H.colors.primary:H.colors.hero},children:Ve})})},xt)}case"payment_account":{if(!(L==="expense"||L==="check"||L==="bill_payment"||L==="vendor_credit"||L==="credit_card_credit"||L==="deposit"||L==="sales_receipt"||L==="refund"||L==="payment"))return t.jsx(mt,{windowSize:p,wrapperWidth:Le.width,children:t.jsx(hn,{windowSize:p,isLastItem:vt===Se.length-1,children:t.jsx(ro,{style:{textAlign:"center",width:"100%"},children:Ht})})},xt);const Ve=m?.account?.accountName,ct=m?.paymentType,Fn=m?.paymentTypeName,ci=ct==="credit_card"?V1:ct==="cash"?N1:ct==="check"?H1:ct==="ach"?cx:U1,ft={title:qt,items:[{text:St.paymentAccountTooltip.accountLabel+pa,amount:Ve??Ht},...Fn!=null?[{text:St.paymentAccountTooltip.methodLabel+pa,amount:Fn}]:[]]};return t.jsx(mt,{windowSize:p,wrapperWidth:Le.width,children:t.jsx(hn,{windowSize:p,isLastItem:vt===Se.length-1,children:t.jsx(xe,{display:"flex",placement:"bottom",variant:"list-description",data:ft,title:Ve??Ht,enterDelay:600,style:{overflow:"hidden",minWidth:0},children:t.jsxs(B1,{style:{color:x?H.colors.primary:H.colors.hero},children:[ci!=null&&t.jsx(ci,{style:{color:x?H.colors.primary:H.colors.hero}}),t.jsx(ro,{style:{color:"inherit",whiteSpace:"pre-wrap"},children:Ve??Ht})]})})})},xt)}case"memo_and_receipt":{const Ve=m?.attachments??[],ct=M?.fetchState==="In-Progress",Fn=ft=>{if(ft.stopPropagation(),Ve.length===0||m==null)return;if(Xt==null){console.warn("webV2MicroServiceEndpoint is not available, cannot fetch attachments.");return}Qe(Ve[0]),Ie(0),Lt(!0);const _n=Ve.map(on=>on.id),di=`${Xt}/transaction_attachments`;vr(di,D,{transaction_key:{transaction_id:m.id,transaction_type:m.type},attachment_ids:_n}).then(on=>{wt(on),on.length>0&&ye(on[0])})},ci=ft=>{ft.stopPropagation(),wn.current?.click()};return t.jsx(mt,{windowSize:p,wrapperWidth:Le.width,"data-testid":B("memo-field",Ut(S,ut,c.toString())),children:t.jsxs(ax,{onClick:ft=>ft.stopPropagation(),children:[J!=null?t.jsx(xe,{display:"flex",placement:"bottom",data:J,variant:"multi-information-points",style:{maxHeight:"min(60vh, 360px)",overflowY:"auto",overflowX:"hidden"},children:t.jsx(q1,{style:{color:x?H.colors.primary:H.colors.hero}})}):t.jsx(W1,{style:{margin:0},children:Ht}),ct?t.jsx(Kn,{size:"Small",style:{display:"flex"},start:!0}):Ve.length===0?t.jsx(xe,{display:"flex",placement:"bottom",title:T1,enterDelay:600,children:t.jsx(bi,{style:{margin:0},onClick:ft=>{ft.stopPropagation(),ci(ft)}})}):Ve.length===1?t.jsx(xe,{display:"flex",placement:"bottom",title:L1,enterDelay:600,children:t.jsx(rx,{style:{color:x?H.colors.primary:H.colors.hero},onClick:Fn})}):t.jsx(xe,{display:"flex",placement:"bottom",title:A1,enterDelay:600,children:t.jsx(lx,{style:{color:x?H.colors.primary:H.colors.hero},onClick:Fn})}),t.jsx(Uo,{name:`transaction-receipt-${h.transactionId}`,fileRef:wn,sizeLimit:Ii,multiple:!0,acceptableTypes:[...Rr],onFileChange:ft=>{const _n=ft.target.files;if(_n!=null&&_n.length>0){const di=Array.from(_n);ae(T,h.transactionId,L??qt,di,di.map(on=>on.name))}},onFileSizeError:()=>{}})]})},xt)}}})},lt=m?.attachments??[],Pn=yn??lt[0];return t.jsxs(t.Fragment,{children:[Ui(P),pt&&lt.length>0&&Pn!=null?Mi.createPortal(t.jsx(gr,{allFiles:Be,fileSource:Ke,file:Pn,title:Pn.fileName,attachments:lt,showNavigation:!1,setFileSource:ye,setShowFullScreenView:Lt,onCrossClick:()=>{Lt(!1),ye(null),wt([]),Qe(void 0),Ie(0)},onNextClick:()=>{const ie=(Ee+1)%lt.length;Ie(ie),Qe(lt[ie]),Be[ie]!=null&&ye(Be[ie])},onPreviousClick:()=>{const ie=(Ee-1+lt.length)%lt.length;Ie(ie),Qe(lt[ie]),Be[ie]!=null&&ye(Be[ie])},setSelectedFileAttachment:ie=>{Qe(typeof ie=="function"?Se=>ie(Se??lt[0]):ie)},handleTouchStart:ie=>Ct(ie.targetTouches[0].clientX),handleTouchMove:ie=>Zt(ie.targetTouches[0].clientX),handleTouchEnd:()=>{if(Cn-Yt>50&&Yt!==0&&Ee<lt.length-1){const ie=Ee+1;Ie(ie),Qe(lt[ie]),Be[ie]!=null&&ye(Be[ie]),Ct(0),Zt(0)}else if(Cn-Yt<-50&&Yt!==0&&Ee>0){const ie=Ee-1;Ie(ie),Qe(lt[ie]),Be[ie]!=null&&ye(Be[ie]),Ct(0),Zt(0)}}}),document.body):null]})},ma=({isEnabled:e,isReviewTab:i,isMisCategorized:l,hasRecommendations:r,isTooltipVisible:u=!1})=>e?i?u?t.jsx(Q1,{}):t.jsx(K1,{}):u?t.jsx(J1,{}):t.jsx(G1,{className:"ai-icon-selected-plain"}):!e&&l||r?u?t.jsx(Z1,{}):t.jsx(Y1,{}):null,ga=({isFirstColumn:e,children:i})=>t.jsx(xl,{isFirstColumn:e,children:i}),ao=({recommendations:e,isCOTEnabled:i,type:l,isReviewTab:r,selectedValueLabel:u,isFirstColumn:d,isEnabled:a=!1,isMisCategorized:c=!1,selectedValue:h,existingOption:m,cotTracking:p,lineId:g,openTooltipId:x,transactionId:y,isAccountOptionDisabled:b,onRecommendationClick:S,setOpenTooltipId:$})=>{const v=s.useMemo(()=>`${y}:${g}:${l}`,[y,g,l]),T=x===v,I=Xc().analytics,{createAlternateRecommendationCallback:w}=ed(),k=s.useCallback(V=>{const q=e[1],D=e[0];w(l,{currentValue:u??qt,transactionCurrentStatus:r?"pending_review":"auto_categorized",transactionPage:"list_page",cotTracking:p?{transactionId:y,lineId:g,onCOTView:(M,ae,F,L)=>{p.onCOTView?.(M,ae,F,L)}}:void 0},q,D)(V)},[w,e,u,r,l,p,g,y]),j=td(e,l,i,m,"list_page",r?"pending_review":"auto_categorized",S,k,h,b),C=nd(e,l),z=s.useCallback(()=>{$(v);const V=j?.recommendations[0]?.cot??[],q=j?.recommendations[1]?.cot??[],D=q.length>0;if(I.trackTransactionCotView({recommendationFor:l,currentValue:u??qt,recommendation:j?.recommendations[0]?.name??qt,recommendationCot:V,isRecommendationCotAvailable:V.length>0,recommendationReason:j?.recommendations[0]?.reason??qt,recommendationConfidencePercentage:j?.recommendations[0]?.confidencePercentage??null,recommendationConfidenceLevel:fs(ys(j?.recommendations[0]?.confidencePercentage).toLocaleLowerCase()),alternativeRecommendation:j?.recommendations[1]?.name??qt,alternativeRecommendationCot:q,isAlternativeRecommendationCotAvailable:D,alternativeRecommendationReason:j?.recommendations[1]?.reason??qt,alternativeRecommendationConfidencePercentage:j?.recommendations[1]?.confidencePercentage??null,alternativeRecommendationConfidenceLevel:D?fs(ys(j?.recommendations[1]?.confidencePercentage).toLocaleLowerCase()):null,transactionCurrentStatus:r?"pending_review":"auto_categorized",transactionPage:"list_page"}),p?.onCOTView!=null){const M=id(j);M!=null&&p.onCOTView(g,y,l,M)}},[I,j,r,u,l,g,y,v,$]),A=s.useCallback(()=>{x===v&&$(void 0)},[x,v,$]),R=s.useMemo(()=>!h||!C?!1:e.some(V=>l==="vendor"&&V.vendor!=null?V.vendor.id===h||V.vendor.qboId===h:l==="category"&&V.account!=null?V.account.qboId===h||V.account.accountId===h:l==="class"&&V.class!=null?V.class.classId===h:!1),[h,C,e,l]);if(!C)return t.jsx(xl,{isFirstColumn:d});const P=a||R;return j?t.jsx(ga,{isFirstColumn:d,children:t.jsx(xe,{variant:"chain-of-thought",data:j,placement:"bottom-start",disableIntersectionObserver:!0,position:"static",display:"block",open:T,style:{width:"auto",height:"auto"},leaveDelay:200,onOpen:z,onClose:A,children:t.jsx(X1,{children:t.jsx(ma,{isEnabled:P,isReviewTab:r,isMisCategorized:c,hasRecommendations:C,isTooltipVisible:T})})})}):t.jsx(ga,{isFirstColumn:d,children:t.jsx(ma,{isEnabled:P,isReviewTab:r,isMisCategorized:c,hasRecommendations:C,isTooltipVisible:T})})},ml=({isTransactionActivityEnabled:e})=>{const i=be(),l=Ze(),r=l?rs:as(e);return t.jsx(O1,{windowSize:i,isQuickViewMode:l,isTransactionActivityEnabled:e,children:r.map((u,d)=>{const a=`${d}${I1}${u.key}`;switch(u.key){case"activity":return t.jsx(gl,{},a);case"vendor":return t.jsx(mt,{windowSize:i,wrapperWidth:u.width,isQuickViewMode:l,style:l?{paddingLeft:n.sp0}:{paddingLeft:n.sp3},children:t.jsx(hn,{windowSize:i,isLastItem:d===r.length-1,children:t.jsxs(Fo,{children:[t.jsx(ei,{width:f[4],height:f[4]}),t.jsx(it,{width:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})]})})},a);default:{const c=d===r.length-1;return t.jsx(mt,{windowSize:i,wrapperWidth:u.width,isQuickViewMode:l,style:{marginRight:c&&l?f[4]:void 0},children:t.jsx(hn,{windowSize:i,isLastItem:c,children:t.jsx(it,{width:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})})},a)}}})})},gl=o.div`
1300
+ `,so="expenseAutomationTransactionsPage",mn="transactionCategorizationListTable",Pe="account",ut="class",jt="lineEntitySelection",C1="lineEntity",b1="recommendations",hl="lineInfo",v1="vendorDetails",S1="customerDetails",Ri="selectedTransactionIds",Ut=(e,i,l)=>`${e}.${l}.${i}`,k1=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M4.85022 13.5836L5.52057 12.9133C5.63229 12.8016 5.77164 12.7217 5.92438 12.6815C6.07712 12.6413 6.23779 12.6424 6.38999 12.6846C6.54218 12.7268 6.68046 12.8086 6.7907 12.9217C6.90094 13.0348 6.97919 13.1751 7.01747 13.3283L7.08174 13.5836L7.8119 13.0972C7.98361 12.9827 8.1897 12.9312 8.39508 12.9515C8.60046 12.9719 8.79245 13.0628 8.93837 13.2087L9.31326 13.5836H11.0985",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M17.4206 6H2.24629C2.12792 6 2.01441 6.04702 1.93071 6.13072C1.84701 6.21442 1.79999 6.32794 1.79999 6.4463V17.1576C1.79999 17.276 1.84701 17.3895 1.93071 17.4732C2.01441 17.5569 2.12792 17.6039 2.24629 17.6039H21.8837C22.0021 17.6039 22.1156 17.5569 22.1993 17.4732C22.283 17.3895 22.33 17.276 22.33 17.1576V6.4463C22.33 6.32794 22.283 6.21442 22.1993 6.13072C22.1156 6.04702 22.0021 6 21.8837 6H17.4206Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M16.0854 9.6521H19.6559V12.0656H16.0854V9.6521Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),pl=e=>s.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M0.929688 8.00813C0.929688 8.675 1.02283 9.32014 1.19683 9.93121M2.20132 3.98138C3.46937 2.17826 5.566 1 7.93783 1C11.8083 1 14.946 4.13765 14.946 8.00813C14.946 10.2186 13.9226 12.1901 12.3237 13.4745M2.01692 11.7591C2.35672 12.2943 2.7671 12.7804 3.23498 13.2041M4.80209 14.2773C5.39521 14.5746 6.03636 14.7901 6.7108 14.9092M8.65531 14.98C9.34096 14.9103 9.99736 14.7418 10.6101 14.4888",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M8 4.66602V7.93891L11.0228 10.9322",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.1813 4.23989L1.83594 4.24014V1.89453",stroke:"currentColor",strokeWidth:1.25,strokeLinecap:"round",strokeLinejoin:"round"})),j1=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M21.7995 14.6384L14.7656 21.6723L11.3086 22.3637L12 18.9067L19.0339 11.8728C19.3997 11.5071 19.8958 11.3016 20.413 11.3016C20.9303 11.3016 21.4263 11.5071 21.7922 11.8728L21.7995 11.8811C21.9808 12.062 22.1246 12.2769 22.2227 12.5134C22.3208 12.75 22.3713 13.0036 22.3713 13.2597C22.3713 13.5158 22.3208 13.7694 22.2227 14.006C22.1246 14.2426 21.9808 14.4575 21.7995 14.6384Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M8.54295 19.5981H3.0117C2.82886 19.6026 2.64701 19.57 2.47718 19.5021C2.30735 19.4342 2.15309 19.3325 2.02376 19.2032C1.89444 19.0739 1.79275 18.9196 1.72487 18.7498C1.65699 18.58 1.62433 18.3981 1.62888 18.2153V4.48579C1.61644 4.10613 1.75499 3.73703 2.01419 3.45934C2.27339 3.18165 2.63209 3.01804 3.0117 3.00433H16.8398C17.2194 3.01804 17.5781 3.18165 17.8373 3.45934C18.0965 3.73703 18.2351 4.10613 18.2226 4.48579V8.53558",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M14.055 8.06982L5.80499 8.06982",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M10.305 12.5698L5.80499 12.5698",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),$1=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M20.25 19.5H6.75C6.55109 19.5 6.36032 19.421 6.21967 19.2803C6.07902 19.1397 6 18.9489 6 18.75V2.25C6 2.05109 6.07902 1.86032 6.21967 1.71967C6.36032 1.57902 6.55109 1.5 6.75 1.5H15.75L21 6.75V18.75C21 18.9489 20.921 19.1397 20.7803 19.2803C20.6397 19.421 20.4489 19.5 20.25 19.5Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M15.75 1.5V6.75H21",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M10.4941 11.2559H16.4941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M10.4941 14.2559H16.4941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M16.5 22.5H3V5.85315",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{common:{strings:{underscore:I1,hyphen:Wt,empty:qt,colon:pa},tooltips:{addReceipt:T1,viewReceipt:L1,viewReceipts:A1}},expenseAutomation:{transactions:St},dateFormat:R1}=me.getLocalizedStrings(),_t={containerPaddingLeftRight:new Q(f[3],f[4]),containerPaddingTopBottom:new Q(f[1],f[2]),containerPaddingTopBottomEmpty:new Q(f[2],f[3]),nameLogoWidth:new Q(f[2],f[4]),nameLogoHeight:new Q(f[2],f[4])},E1=({transactionView:e,transaction:i,sectionId:l,vendorSearchAutoCompleteData:r,vendorSearchAutoCompleteActions:u,selectedTab:d,containerRef:a,listContainerRef:c,isCOTEnabled:h,cotTracking:m,onTransactionCategorizationRowClick:p,setCurrentTransactionInAction:g,vendorLoadOptions:x,openTooltipId:y,setOpenTooltipId:b,isUncategorizedExpenseCategoryEnabled:S,setActivityLogTransactionId:$,isTransactionActivityEnabled:v,authParams:T,onUploadTransactionReceipt:I})=>{const w=be(),k=Ze(),[j,C]=s.useState(!1),[z,A]=s.useState(!1),{lineItemById:R,sortedLineItems:P}=i.transactionReviewLocalData,V=i.transactionReviewLocalData.tabSpecificLineItems?.[d]||[],q=P.filter(O=>V.indexOf(O)!==-1),D=[];q.forEach(O=>{D.push(R[O])});const{accountList:M,accountsHierarchyList:ae,classHierarchyList:F,classList:L,uncategorizedAccounts:U,transactions:X,selectedCheckBoxTransactionIds:ce}=e,ge=e.uploadReceiptStatusById,te=ce.includes(i.transactionId),J=Tt(),ee={control:()=>({marginLeft:-2,backgroundColor:j?J.colors.background:J.colors.grey5}),valueContainer:()=>({justifyContent:"flex-start",paddingLeft:f[0]}),menu:()=>({width:"150%",background:J.colors.grey5}),singleValue:()=>({color:j||te?J.colors.primary:J.colors.hero,paddingLeft:f[2]}),input:O=>({...O,color:j||te?J.colors.primary:J.colors.hero,textAlign:"left",paddingLeft:f[2]}),menuPortal:O=>({...O,zIndex:10})},H={...ee,singleValue:O=>({...O,color:j||te?J.colors.primary:J.colors.hero}),menu:()=>({marginTop:f[1],marginLeft:-8}),input:O=>({...O,color:j||te?J.colors.primary:J.colors.hero,textAlign:"left"})},_=X.find(O=>O.id===i.transactionId),ne=(O,se)=>{const{transactionType:Y}=se.transactionReviewLocalData;let G=O.target;for(;G;){if(G.classList.contains("select-value-container")||G.classList.contains("item-value-container")||G.classList.contains("grouped-single-select-field__value-container")||G.classList.contains("auto-complete-grouped-creatable-single-custom-group-select-field__option")||G.classList.contains("grouped-single-select-field__input")||G.classList.contains("grouped-single-select-field__menu"))return;G=G.parentElement}Y!=null&&p(se.transactionId,Y)},W=s.useRef(null),[Z,oe]=s.useState(void 0),[K,N]=s.useState("bottom");return s.useEffect(()=>{if(Z===void 0)return;const O=c?.current?._outerRef??null,se=()=>{const Y=W.current;if(Y==null||O==null)return;const G=Y.getBoundingClientRect(),je=O.getBoundingClientRect(),Te=O.scrollTop+(G.bottom-je.top),E=O.scrollHeight-Te;N(E>=288?"bottom":"top")};return se(),window.addEventListener("resize",se),O?.addEventListener("scroll",se),()=>{window.removeEventListener("resize",se),O?.removeEventListener("scroll",se)}},[c,Z]),t.jsxs(M1,{onMouseEnter:k?void 0:()=>C(!0),onMouseLeave:k?void 0:()=>C(!1),children:[t.jsx(z1,{className:"categorization-row-card",windowSize:w,isSelected:te,isQuickViewMode:k,isHovered:j,children:t.jsx(P1,{children:D.map((O,se)=>t.jsx(F1,{ref:Z===se?W:void 0,"data-testid":B("transaction-categorization-list-row",O.lineId),windowSize:w,isQuickViewMode:k,onClick:Y=>ne(Y,i),children:t.jsx(D1,{isTransactionActivityEnabled:v,line:O,isHovered:j||te,isSelected:te,isQuickViewMode:k,lineIndex:se,sectionId:l,transaction:i,currentTransaction:_,windowSize:w,accountsHierarchyList:ae,classHierarchyList:F,allAccountList:M,allClassList:L,uncategorizedAccounts:U,vendorSearchAutoCompleteData:r,vendorSearchAutoCompleteActions:u,setCurrentTransactionInAction:g,vendorLoadOptions:x,customStyle:ee,customStyleAutoComplete:H,recommendations:O.recommendationsWithCOT,selectedTab:d,isCOTEnabled:h,menuPlacement:K,cotTracking:m,openTooltipId:y,setOpenTooltipId:b,isUncategorizedExpenseCategoryEnabled:S,authParams:T,uploadReceiptStatus:ge?.[i.transactionId],onUploadTransactionReceipt:I,onDropdownClose:()=>oe(void 0),onDropdownOpen:()=>oe(se)})},`${i.transactionId}.${O.lineId}`))},i.transactionId)},i.transactionId),v===!0&&!k&&t.jsx(ox,{className:"activity-log-icon",onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),onClick:O=>{O.stopPropagation(),$(i.transactionId)},children:t.jsx(xe,{title:St.header.activity,placement:"bottom",children:t.jsx(sx,{style:{color:z?J.colors.primary:J.colors.hero}})})})]})},D1=({accountsHierarchyList:e,allAccountList:i,allClassList:l,classHierarchyList:r,customStyle:u,customStyleAutoComplete:d,line:a,lineIndex:c,transaction:h,currentTransaction:m,windowSize:p,uncategorizedAccounts:g,isHovered:x=!1,isSelected:y=!1,isQuickViewMode:b=!1,sectionId:S,recommendations:$,vendorSearchAutoCompleteData:v,selectedTab:T,isCOTEnabled:I,menuPlacement:w,cotTracking:k,openTooltipId:j,setCurrentTransactionInAction:C,vendorLoadOptions:z,setOpenTooltipId:A,isUncategorizedExpenseCategoryEnabled:R,isTransactionActivityEnabled:P,onDropdownClose:V,onDropdownOpen:q,authParams:D,uploadReceiptStatus:M,onUploadTransactionReceipt:ae})=>{const{transactionDate:F,transactionType:L,transactionTypeName:U,memo:X}=h.transactionReviewLocalData,{setValue:ce}=Ko(),ge=s.useCallback((ie,Se)=>{k?.onCOTView!=null&&k.onCOTView(a.lineId,h.transactionId,ie,Se)},[k,a.lineId,h.transactionId]),te=a.lineDescription,J=s.useMemo(()=>{if(te||X)return[{title:St.description,description:te||Wt},{title:St.header.memo,description:X||Wt}]},[X,te]),ee=Ut(S,jt,c.toString()),H=Ut(S,Pe,c.toString()),_=Ut(S,ut,c.toString()),ne=(ie,Se)=>{if(b)return;let Le;switch(Se){case"vendor":Le=ee;break;case"category":Le=H;break;case"class":Le=_;break;default:return}ce(`${Le}.selectedOption`,ie,{shouldValidate:!0,shouldDirty:!0})},W=Tt(),Z=s.useMemo(()=>m!=null&&ln(m)===!0?{id:h.transactionReviewLocalData.customer?.id??"",logo:h.transactionReviewLocalData.customer?.logo,name:h.transactionReviewLocalData.customer?.name??""}:{id:a.customer?.id??"",logo:a.customer?.logo,name:a.customer?.name??""},[m,a.customer?.id,a.customer?.logo,a.customer?.name,h.transactionReviewLocalData.customer?.id,h.transactionReviewLocalData.customer?.logo,h.transactionReviewLocalData.customer?.name]),oe=s.useMemo(()=>m!=null&&ln(m)===!0?{id:h.transactionReviewLocalData.vendor?.id??"",logo:h.transactionReviewLocalData.vendor?.logo,name:h.transactionReviewLocalData.vendor?.name??""}:{id:a.vendor?.id??"",logo:a.vendor?.logo,name:a.vendor?.name??""},[m,a.vendor?.id,a.vendor?.logo,a.vendor?.name,h.transactionReviewLocalData.vendor?.id,h.transactionReviewLocalData.vendor?.logo,h.transactionReviewLocalData.vendor?.name]),K=a[ut]?.classId,N=a[Pe]?.qboId??a[Pe]?.accountId,O=Z?.id,se=oe?.id,Y=oe?.name,[G,je]=s.useState(!K),[Te,E]=s.useState(!N||a[Pe]?.qboId!=null&&Nn(g,a[Pe].qboId,R===!0?["income"]:void 0)===!0),[de,$e]=s.useState(!se||!O),Me=ie=>$?.find(Se=>Se.vendor?.qboId===ie||Se.vendor?.id===ie||Se.vendor?.name===ie)?.vendor?.reason??"",De=h.transactionReviewLocalData.lineItemById[a.lineId]?.recommendationsWithCOT||[],Fe=$r(e,De),ve=jr(r,De),Xe=ie=>i.filter(Se=>Se.qboId===ie)[0]?.qboId,ht=ie=>l.filter(Se=>Se.classId===ie)[0]?.accountingClassNumber??void 0,et=s.useCallback(ie=>Nn(g,ie,R===!0?["income"]:void 0),[g,R]),[fe,_e]=s.useState(!1),[Vt,tt]=s.useState(!1),[pt,Lt]=s.useState(!1),[Ee,Ie]=s.useState(0),[Ke,ye]=s.useState(null),[Be,wt]=s.useState([]),[yn,Qe]=s.useState(void 0),wn=s.useRef(null),[Cn,Ct]=s.useState(0),[Yt,Zt]=s.useState(0),Xt=Vc()?.url,[ii,Mn]=s.useState(!1),Bi=(ie,Se)=>{C({transactionId:h.transactionId,lineItemId:a.lineId}),z(ie,Se)},en=()=>{$e(!(se||O)),_e(!1),V?.()},tn=()=>{N&&a[Pe]?.qboId!=null&&Nn(g,a[Pe].qboId,R===!0?["income"]:void 0)===!1?E(!1):E(!0),Mn(!1),V?.()},On=()=>{je(!K),tt(!1),V?.()},oi=()=>{b||(se||O)&&(_e(!0),q?.())},Vi=()=>{b||(tt(!0),q?.())},Ni=()=>{b||(Mn(!0),q?.())};s.useEffect(()=>{N&&a[Pe]?.qboId!=null&&Nn(g,a[Pe].qboId,R===!0?["income"]:void 0)===!1?E(!1):E(!0)},[N]),s.useEffect(()=>{je(!K)},[K]),s.useEffect(()=>{$e(!(se||O))},[se,O]);const si=h.transactionReviewLocalData.selectedEntity,ai=h.transactionReviewLocalData.lineItemById[a.lineId].selectedEntityLine,We=m!=null&&ln(m)===!0?si:ai,bn=s.useMemo(()=>{const ie=h.transactionReviewLocalData.lineItemById[a.lineId]?.recommendationsWithCOT||[],Se=v.entityAutoCompleteView;return{selectedOption:We?.qboId??We?.id,defaultOptions:Wo(Se,We,ie??[])}},[We,h.transactionReviewLocalData.lineItemById,a.lineId,v.entityAutoCompleteView]),Ae=()=>We!=null&&We.logo!=null?t.jsx(Xn,{photoUrl:We.logo.toString(),styles:{width:_t.nameLogoWidth.valuePx(p),height:_t.nameLogoHeight.valuePx(p)},fallbackAvatar:t.jsx(xa,{children:t.jsx(Jt,{name:We.name,size:n.sp4})})}):We!=null&&We.name!=null?t.jsx(xa,{children:t.jsx(Jt,{name:We.name,size:n.sp4})}):null,rt=(ie,Se)=>{if(Se==null||!Se)return;let Le=[];return ie.forEach(vt=>{Le=Le.concat(vt.options)}),Le.find(vt=>vt.value===Se)?.label??Se},At=rt(ve,K),ri=rt(Fe,N),bt=T==="review",nn=Hi("vendor",bn.defaultOptions,bn.selectedOption),zn=Hi("category",Fe,N),li=Hi("class",ve,K),Ui=ie=>{const Se=b?rs:as(ie);return Se.map((Le,vt)=>{const xt=`${h.transactionId}_${Le.key}_${a.lineId}`;if(c>0&&m!=null&&ln(m)===!0&&Le.key==="vendor")return t.jsx(mt,{windowSize:p,wrapperWidth:Le.width,isQuickViewMode:b},xt);if(c>0&&(Le.key==="transaction_type"||Le.key==="payment_account"||Le.key==="memo_and_receipt"))return t.jsx(mt,{windowSize:p,wrapperWidth:Le.width,isQuickViewMode:b},xt);switch(Le.key){case"activity":return t.jsx(gl,{},xt);case"vendor":default:return t.jsxs(mt,{windowSize:p,wrapperWidth:Le.width,isQuickViewMode:b,className:"item-value-container",children:[!b&&t.jsx(ao,{isCOTEnabled:I,recommendations:De,type:"vendor",isFirstColumn:!0,isEnabled:!!We?.isPreFilled,isMisCategorized:nn,onRecommendationClick:ne,selectedValue:se,selectedValueLabel:Y,isReviewTab:bt,isAccountOptionDisabled:et,existingOption:{label:m!=null&&ln(m)===!0?m?.vendor?.name:void 0,value:m!=null&&ln(m)===!0?m?.vendor?.id:void 0},cotTracking:k,lineId:a.lineId,transactionId:h.transactionId,openTooltipId:j,setOpenTooltipId:A}),t.jsx(ho,{children:de===!0?t.jsx(co,{isHovered:x,isQuickViewMode:b,children:t.jsxs(lo,{onClick:Ve=>{Ve.stopPropagation(),!b&&(q?.(),$e(!1),_e(!0))},"data-testid":B("add-vendor-button",S),style:{display:"inline-flex",alignItems:"center",color:he.brandColorGoldDark,cursor:"pointer",height:n.sp6},children:[t.jsx(bi,{}),St.addPayee]})}):fe===!0?t.jsx($t,{onClickAway:en,children:t.jsx(tx,{"data-testid":B("vendor-selection-dropdown-container",Ut(S,jt,c.toString())),children:t.jsx(qc,{name:ee,placeholder:St.addPayee,valueToInfo:Me,defaultValue:{selectedOption:bn.selectedOption,defaultOptions:bn.defaultOptions},type:"vendor",autoFocus:!de,style:{width:"100%"},pageSource:"list_page",transactionStatus:bt?"pending_review":"auto_categorized",isOptionRemovable:!1,customStyleConfig:d,menuIsOpen:fe,onMenuClose:en,registerOptions:{required:!1},loadOptions:Bi,showCOT:I,onCOTView:ge,menuPlacement:w})})}):t.jsx(ix,{children:t.jsxs(uo,{isHovered:x,isQuickViewMode:b,showOutline:!b&&nn&&We?.isPreFilled!==!0&&!y&&bt,children:[Ae(),t.jsx(ex,{onClick:oi,"data-testid":B("vendor-name-text",S),children:We!=null&&We.name?t.jsx(qe,{text:We.name,itemTextStyle:{color:x?W.colors.primary:W.colors.hero}}):t.jsx(nx,{children:Wt})})]})})})]},xt);case"category":{const Ve=m?.lines!=null?m?.lines[c]:void 0;return t.jsxs(mt,{windowSize:p,wrapperWidth:Le.width,className:"item-value-container",children:[t.jsx(ao,{isCOTEnabled:I,recommendations:De,type:"category",isFirstColumn:!1,isReviewTab:bt,isEnabled:!!a[Pe]?.isPreFilled,isAccountOptionDisabled:et,isMisCategorized:zn,onRecommendationClick:ne,selectedValue:N,selectedValueLabel:ri,existingOption:{label:Ve?.account?.accountName,value:Ve?.account?.qboId??Ve?.account?.accountId},cotTracking:k,lineId:a.lineId,transactionId:h.transactionId,openTooltipId:j,setOpenTooltipId:A}),t.jsx(ho,{children:Te===!0?t.jsx(co,{isHovered:x,children:t.jsxs(lo,{onClick:ct=>{ct.stopPropagation(),!b&&(q?.(),E(!1),Mn(!0))},"data-testid":B("category-selection-field",H),style:{display:"inline-flex",alignItems:"center",color:he.brandColorGoldDark,cursor:"pointer",height:n.sp6},children:[t.jsx(bi,{}),St.addCategory]})}):ii===!0?t.jsx($t,{onClickAway:tn,children:t.jsx(fa,{isHovered:x,"data-testid":B("category-selection-dropdown-container",H),children:t.jsx(Ss,{name:H,placeholder:St.addCategory,valueToId:ct=>Xe(ct),type:"category",pageSource:"list_page",transactionStatus:bt?"pending_review":"auto_categorized",showCOT:I,defaultValue:{selectedOption:N,allOptions:Fe},style:{display:"flex",flexGrow:1,width:"100%",cursor:"inherit"},registerOptions:{required:!1},menuIsOpen:ii,autoFocus:!Te&&(!N||a[Pe]?.qboId!=null&&[g.expense?.qboId,g.income?.qboId].includes(a[Pe].qboId)),onMenuClose:tn,customStyleConfig:u,disableCurrentOption:et,menuPlacement:w,onCOTView:ge})})}):t.jsx(uo,{isHovered:x,showOutline:zn&&a[Pe]?.isPreFilled!==!0&&!y&&bt,children:t.jsx(ya,{onClick:Ni,"data-testid":B("category-label-text",H),children:t.jsx(qe,{text:ri??"",itemTextStyle:{color:x?W.colors.primary:W.colors.hero}})})})})]},xt)}case"class":{const Ve=m?.lines!=null?m?.lines[c]:void 0;return t.jsxs(mt,{windowSize:p,wrapperWidth:Le.width,className:"item-value-container",children:[t.jsx(ao,{isCOTEnabled:I,recommendations:De,type:"class",isFirstColumn:!1,isReviewTab:bt,isEnabled:!!a[ut]?.isPreFilled,isAccountOptionDisabled:et,isMisCategorized:li,onRecommendationClick:ne,selectedValue:K,selectedValueLabel:At,existingOption:{label:Ve?.class?.className,value:Ve?.class?.classId},cotTracking:k,lineId:a.lineId,transactionId:h.transactionId,openTooltipId:j,setOpenTooltipId:A}),t.jsx(ho,{children:G===!0?t.jsx(co,{isHovered:x,children:t.jsxs(lo,{onClick:ct=>{ct.stopPropagation(),!b&&(q?.(),je(!1),tt(!0))},"data-testid":B("class-selection-field",_),style:{display:"inline-flex",alignItems:"center",color:he.brandColorGoldDark,cursor:"pointer",height:n.sp6},children:[t.jsx(bi,{}),St.addClass]})}):Vt===!0?t.jsx($t,{onClickAway:On,children:t.jsx(fa,{isHovered:x,"data-testid":B("class-selection-dropdown-container",_),children:t.jsx(Ss,{name:_,placeholder:St.addClass,valueToId:ct=>ht(ct),type:"class",showCOT:I,defaultValue:{selectedOption:K,allOptions:ve},pageSource:"list_page",transactionStatus:bt?"pending_review":"auto_categorized",menuIsOpen:Vt,registerOptions:{required:!1},style:{width:"100%"},autoFocus:!G&&!K,customStyleConfig:u,onMenuClose:On,menuPlacement:w,onCOTView:ge})})}):t.jsx(uo,{isHovered:x,showOutline:li&&a[ut]?.isPreFilled!==!0&&!y&&bt,children:t.jsx(ya,{"data-testid":B("class-selection-field",_),onClick:Vi,children:t.jsx(qe,{text:At??"",itemTextStyle:{color:x?W.colors.primary:W.colors.hero}})})})})]},xt)}case"date":return t.jsx(mt,{windowSize:p,wrapperWidth:Le.width,children:t.jsx(hn,{windowSize:p,isLastItem:vt===Se.length-1,children:t.jsx(Fo,{"data-testid":B("date-field",Ut(S,ut,c.toString())),children:t.jsx(ro,{style:{color:x?W.colors.primary:W.colors.hero},children:F!=null?F.format(R1.visual.MMMDCommaYYYYformat):null})})})},xt);case"transaction_type":return t.jsx(mt,{windowSize:p,wrapperWidth:Le.width,children:t.jsx(hn,{windowSize:p,"data-testid":B("transaction-type-field",Ut(S,ut,c.toString())),isLastItem:vt===Se.length-1,children:U!=null?t.jsx(Wc,{textColor:x?new qo(W.colors.primary):Hc(void 0,W),text:U??L}):null})},xt);case"amount":{const Ve=nt("0,0.[00]",a.amount,!0);return t.jsx(mt,{windowSize:p,style:{marginRight:ie&&!b?f[0]:f[4]},wrapperWidth:Le.width,isQuickViewMode:b,children:t.jsx(hn,{windowSize:p,isLastItem:vt===Se.length-1,style:{justifyContent:"flex-end"},children:t.jsx(Fo,{"data-testid":B("transaction-amount-field",Ut(S,ut,c.toString())),style:{color:x?W.colors.primary:W.colors.hero},children:Ve})})},xt)}case"payment_account":{if(!(L==="expense"||L==="check"||L==="bill_payment"||L==="vendor_credit"||L==="credit_card_credit"||L==="deposit"||L==="sales_receipt"||L==="refund"||L==="payment"))return t.jsx(mt,{windowSize:p,wrapperWidth:Le.width,children:t.jsx(hn,{windowSize:p,isLastItem:vt===Se.length-1,children:t.jsx(ro,{style:{textAlign:"center",width:"100%"},children:Wt})})},xt);const Ve=m?.account?.accountName,ct=m?.paymentType,Fn=m?.paymentTypeName,ci=ct==="credit_card"?V1:ct==="cash"?N1:ct==="check"?W1:ct==="ach"?cx:U1,ft={title:qt,items:[{text:St.paymentAccountTooltip.accountLabel+pa,amount:Ve??Wt},...Fn!=null?[{text:St.paymentAccountTooltip.methodLabel+pa,amount:Fn}]:[]]};return t.jsx(mt,{windowSize:p,wrapperWidth:Le.width,children:t.jsx(hn,{windowSize:p,isLastItem:vt===Se.length-1,children:t.jsx(xe,{display:"flex",placement:"bottom",variant:"list-description",data:ft,title:Ve??Wt,enterDelay:600,style:{overflow:"hidden",minWidth:0},children:t.jsxs(B1,{style:{color:x?W.colors.primary:W.colors.hero},children:[ci!=null&&t.jsx(ci,{style:{color:x?W.colors.primary:W.colors.hero}}),t.jsx(ro,{style:{color:"inherit",whiteSpace:"pre-wrap"},children:Ve??Wt})]})})})},xt)}case"memo_and_receipt":{const Ve=m?.attachments??[],ct=M?.fetchState==="In-Progress",Fn=ft=>{if(ft.stopPropagation(),Ve.length===0||m==null)return;if(Xt==null){console.warn("webV2MicroServiceEndpoint is not available, cannot fetch attachments.");return}Qe(Ve[0]),Ie(0),Lt(!0);const _n=Ve.map(on=>on.id),di=`${Xt}/transaction_attachments`;vr(di,D,{transaction_key:{transaction_id:m.id,transaction_type:m.type},attachment_ids:_n}).then(on=>{wt(on),on.length>0&&ye(on[0])})},ci=ft=>{ft.stopPropagation(),wn.current?.click()};return t.jsx(mt,{windowSize:p,wrapperWidth:Le.width,"data-testid":B("memo-field",Ut(S,ut,c.toString())),children:t.jsxs(ax,{onClick:ft=>ft.stopPropagation(),children:[J!=null?t.jsx(xe,{display:"flex",placement:"bottom",data:J,variant:"multi-information-points",style:{maxHeight:"min(60vh, 360px)",overflowY:"auto",overflowX:"hidden"},children:t.jsx(q1,{style:{color:x?W.colors.primary:W.colors.hero}})}):t.jsx(H1,{style:{margin:0},children:Wt}),ct?t.jsx(Kn,{size:"Small",style:{display:"flex"},start:!0}):Ve.length===0?t.jsx(xe,{display:"flex",placement:"bottom",title:T1,enterDelay:600,children:t.jsx(bi,{style:{margin:0},onClick:ft=>{ft.stopPropagation(),ci(ft)}})}):Ve.length===1?t.jsx(xe,{display:"flex",placement:"bottom",title:L1,enterDelay:600,children:t.jsx(rx,{style:{color:x?W.colors.primary:W.colors.hero},onClick:Fn})}):t.jsx(xe,{display:"flex",placement:"bottom",title:A1,enterDelay:600,children:t.jsx(lx,{style:{color:x?W.colors.primary:W.colors.hero},onClick:Fn})}),t.jsx(Uo,{name:`transaction-receipt-${h.transactionId}`,fileRef:wn,sizeLimit:Ii,multiple:!0,acceptableTypes:[...Rr],onFileChange:ft=>{const _n=ft.target.files;if(_n!=null&&_n.length>0){const di=Array.from(_n);ae(T,h.transactionId,L??qt,di,di.map(on=>on.name))}},onFileSizeError:()=>{}})]})},xt)}}})},lt=m?.attachments??[],Pn=yn??lt[0];return t.jsxs(t.Fragment,{children:[Ui(P),pt&&lt.length>0&&Pn!=null?Mi.createPortal(t.jsx(gr,{allFiles:Be,fileSource:Ke,file:Pn,title:Pn.fileName,attachments:lt,showNavigation:!1,setFileSource:ye,setShowFullScreenView:Lt,onCrossClick:()=>{Lt(!1),ye(null),wt([]),Qe(void 0),Ie(0)},onNextClick:()=>{const ie=(Ee+1)%lt.length;Ie(ie),Qe(lt[ie]),Be[ie]!=null&&ye(Be[ie])},onPreviousClick:()=>{const ie=(Ee-1+lt.length)%lt.length;Ie(ie),Qe(lt[ie]),Be[ie]!=null&&ye(Be[ie])},setSelectedFileAttachment:ie=>{Qe(typeof ie=="function"?Se=>ie(Se??lt[0]):ie)},handleTouchStart:ie=>Ct(ie.targetTouches[0].clientX),handleTouchMove:ie=>Zt(ie.targetTouches[0].clientX),handleTouchEnd:()=>{if(Cn-Yt>50&&Yt!==0&&Ee<lt.length-1){const ie=Ee+1;Ie(ie),Qe(lt[ie]),Be[ie]!=null&&ye(Be[ie]),Ct(0),Zt(0)}else if(Cn-Yt<-50&&Yt!==0&&Ee>0){const ie=Ee-1;Ie(ie),Qe(lt[ie]),Be[ie]!=null&&ye(Be[ie]),Ct(0),Zt(0)}}}),document.body):null]})},ma=({isEnabled:e,isReviewTab:i,isMisCategorized:l,hasRecommendations:r,isTooltipVisible:u=!1})=>e?i?u?t.jsx(Q1,{}):t.jsx(K1,{}):u?t.jsx(J1,{}):t.jsx(G1,{className:"ai-icon-selected-plain"}):!e&&l||r?u?t.jsx(Z1,{}):t.jsx(Y1,{}):null,ga=({isFirstColumn:e,children:i})=>t.jsx(xl,{isFirstColumn:e,children:i}),ao=({recommendations:e,isCOTEnabled:i,type:l,isReviewTab:r,selectedValueLabel:u,isFirstColumn:d,isEnabled:a=!1,isMisCategorized:c=!1,selectedValue:h,existingOption:m,cotTracking:p,lineId:g,openTooltipId:x,transactionId:y,isAccountOptionDisabled:b,onRecommendationClick:S,setOpenTooltipId:$})=>{const v=s.useMemo(()=>`${y}:${g}:${l}`,[y,g,l]),T=x===v,I=Xc().analytics,{createAlternateRecommendationCallback:w}=ed(),k=s.useCallback(V=>{const q=e[1],D=e[0];w(l,{currentValue:u??qt,transactionCurrentStatus:r?"pending_review":"auto_categorized",transactionPage:"list_page",cotTracking:p?{transactionId:y,lineId:g,onCOTView:(M,ae,F,L)=>{p.onCOTView?.(M,ae,F,L)}}:void 0},q,D)(V)},[w,e,u,r,l,p,g,y]),j=td(e,l,i,m,"list_page",r?"pending_review":"auto_categorized",S,k,h,b),C=nd(e,l),z=s.useCallback(()=>{$(v);const V=j?.recommendations[0]?.cot??[],q=j?.recommendations[1]?.cot??[],D=q.length>0;if(I.trackTransactionCotView({recommendationFor:l,currentValue:u??qt,recommendation:j?.recommendations[0]?.name??qt,recommendationCot:V,isRecommendationCotAvailable:V.length>0,recommendationReason:j?.recommendations[0]?.reason??qt,recommendationConfidencePercentage:j?.recommendations[0]?.confidencePercentage??null,recommendationConfidenceLevel:fs(ys(j?.recommendations[0]?.confidencePercentage).toLocaleLowerCase()),alternativeRecommendation:j?.recommendations[1]?.name??qt,alternativeRecommendationCot:q,isAlternativeRecommendationCotAvailable:D,alternativeRecommendationReason:j?.recommendations[1]?.reason??qt,alternativeRecommendationConfidencePercentage:j?.recommendations[1]?.confidencePercentage??null,alternativeRecommendationConfidenceLevel:D?fs(ys(j?.recommendations[1]?.confidencePercentage).toLocaleLowerCase()):null,transactionCurrentStatus:r?"pending_review":"auto_categorized",transactionPage:"list_page"}),p?.onCOTView!=null){const M=id(j);M!=null&&p.onCOTView(g,y,l,M)}},[I,j,r,u,l,g,y,v,$]),A=s.useCallback(()=>{x===v&&$(void 0)},[x,v,$]),R=s.useMemo(()=>!h||!C?!1:e.some(V=>l==="vendor"&&V.vendor!=null?V.vendor.id===h||V.vendor.qboId===h:l==="category"&&V.account!=null?V.account.qboId===h||V.account.accountId===h:l==="class"&&V.class!=null?V.class.classId===h:!1),[h,C,e,l]);if(!C)return t.jsx(xl,{isFirstColumn:d});const P=a||R;return j?t.jsx(ga,{isFirstColumn:d,children:t.jsx(xe,{variant:"chain-of-thought",data:j,placement:"bottom-start",disableIntersectionObserver:!0,position:"static",display:"block",open:T,style:{width:"auto",height:"auto"},leaveDelay:200,onOpen:z,onClose:A,children:t.jsx(X1,{children:t.jsx(ma,{isEnabled:P,isReviewTab:r,isMisCategorized:c,hasRecommendations:C,isTooltipVisible:T})})})}):t.jsx(ga,{isFirstColumn:d,children:t.jsx(ma,{isEnabled:P,isReviewTab:r,isMisCategorized:c,hasRecommendations:C,isTooltipVisible:T})})},ml=({isTransactionActivityEnabled:e})=>{const i=be(),l=Ze(),r=l?rs:as(e);return t.jsx(O1,{windowSize:i,isQuickViewMode:l,isTransactionActivityEnabled:e,children:r.map((u,d)=>{const a=`${d}${I1}${u.key}`;switch(u.key){case"activity":return t.jsx(gl,{},a);case"vendor":return t.jsx(mt,{windowSize:i,wrapperWidth:u.width,isQuickViewMode:l,style:l?{paddingLeft:n.sp0}:{paddingLeft:n.sp3},children:t.jsx(hn,{windowSize:i,isLastItem:d===r.length-1,children:t.jsxs(Fo,{children:[t.jsx(ei,{width:f[4],height:f[4]}),t.jsx(it,{width:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})]})})},a);default:{const c=d===r.length-1;return t.jsx(mt,{windowSize:i,wrapperWidth:u.width,isQuickViewMode:l,style:{marginRight:c&&l?f[4]:void 0},children:t.jsx(hn,{windowSize:i,isLastItem:c,children:t.jsx(it,{width:"100%",height:f[4],style:{display:"flex",alignItems:"center"}})})},a)}}})})},gl=o.div`
1301
1301
  width: ${n.sp0};
1302
1302
  height: ${n.sp0};
1303
1303
  `,M1=o.div`
@@ -1459,7 +1459,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
1459
1459
  width: ${n.sp3};
1460
1460
  height: ${n.sp3};
1461
1461
  flex-shrink: 0;
1462
- `,H1=o(k1)`
1462
+ `,W1=o(k1)`
1463
1463
  width: ${n.sp3};
1464
1464
  height: ${n.sp3};
1465
1465
  flex-shrink: 0;
@@ -1472,7 +1472,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
1472
1472
  &:hover {
1473
1473
  color: ${e=>e.theme.colors.primary};
1474
1474
  }
1475
- `,W1=o.div`
1475
+ `,H1=o.div`
1476
1476
  margin: ${n.sp3};
1477
1477
  `,q1=o(j1)`
1478
1478
  width: ${n.sp3};
@@ -1610,7 +1610,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
1610
1610
  min-height: 100%;
1611
1611
  flex-direction: column;
1612
1612
  row-gap: ${n.sp3};
1613
- `,{common:px,transactionDetail:{notCategorizedTooltipText:mx}}=me.getLocalizedStrings(),po={rowGap:new Q(f[0],f[2],f[3])},gx=({selectedTab:e,transactionView:i,authParams:l,sectionId:r,isCOTEnabled:u,isDisabled:d,vendorSearchAutoCompleteActions:a,isTransactionActivityEnabled:c,vendorSearchAutoCompleteData:h,setCurrentTransactionInAction:m,vendorLoadOptions:p,onTransactionCategorizationRowClick:g,onUpdateTransactionCategorizationUIState:x,onUpdateScrollYOffSetTransactionCategorizationUIState:y,onFetchTransactionCategorizationList:b,containerRef:S,cotTracking:$,isUncategorizedExpenseCategoryEnabled:v,setActivityLogTransactionId:T,onUploadTransactionReceipt:I})=>{const w=be(),k=Ze(),[j,C]=s.useState(void 0),{fetchState:z,uiState:A,transactionLocalData:R,selectedCheckBoxTransactionIds:P,transactionIdsWithUnsavedData:V,transactions:q,uncategorizedAccounts:D}=i;Gn({componentName:`expense_automation.transaction_categorization.${e}`,enabled:z==="Completed"});const M=s.useRef(null),ae=s.useRef({}),{control:F}=Ko();s.useEffect(()=>{M.current?.resetAfterIndex(0,!0)},[w,M,R]),s.useEffect(()=>{M.current?.scrollTo(A.scrollPosition?.scrollTop??0)},[e]);const L=s.useCallback(O=>{if(ae.current?.[O]!=null){const G=w==="small"&&A.pageToken==null&&O===R.length-1?po.rowGap.value("medium-regular"):po.rowGap.value(w);return ae.current[O]+G}if(R[O]==null)return 0;const se=R[O].transactionReviewLocalData,Y=Object.keys(se.lineItemById).length;return Y!=null&&!isNaN(Y)&&Y>1?ua*Y+po.rowGap.value(w)*(Y-1):ua},[R,w,A.pageToken,A.sortKey,A.sortOrder]),U=s.useCallback((O,se)=>{ae.current={...ae.current,[O]:se},M.current?.resetAfterIndex(0,!0)},[w,M,R,A.sortKey,A.sortOrder]),X=s.useCallback(()=>{(A.pageToken!=null&&i.refreshStatus.fetchState!=="In-Progress"||i.refreshStatus.fetchState==="Completed")&&b(e,A.searchString,!0,A.pageToken,!0,!1)},[i.refreshStatus.fetchState,b,e,A.pageToken,A.searchString,A.sortKey,A.sortOrder]),ce=s.useCallback(()=>{A.pageToken!=null&&X()},[X,A.pageToken,A.sortKey,A.sortOrder]),ge=Lc(O=>y(e,{scrollPosition:{scrollTop:O}}),1e3,{trailing:!0}),te=O=>O<i.transactionLocalData.length,J=(O,se)=>{x(e,{sortOrder:se,sortKey:O}),b(e,A.searchString,!1,null,!1,!0)},ee=O=>{if(e==="autoCategorized")return!P.includes(O);const se=R.find(G=>G.transactionId===O)?.transactionReviewLocalData,Y=q.find(G=>G.id===O);return Y!=null&&se!=null?wd(Y,se,D,v)?v===!0&&bs(D,se.lineItemById,["expense"])?V.includes(O)===!1:!1:!0:P.length===0?!0:!P.includes(O)};let W=[],_=[];(z==="Completed"||i.transactionLocalData.length>0)&&(_=i.transactionLocalData.map((O,se)=>{const Y=ee(O.transactionId);let G=!1;v===!0&&Y===!0&&e==="review"&&bs(D,O.transactionReviewLocalData.lineItemById,["expense"])&&(G=!V.includes(O.transactionId));const je=O.transactionReviewLocalData;return{label:t.jsx(E1,{isTransactionActivityEnabled:c,transactionView:i,sectionId:`${r}.${se}.${hl}`,transaction:O,authParams:l,onTransactionCategorizationRowClick:g,vendorLoadOptions:p,setCurrentTransactionInAction:m,vendorSearchAutoCompleteActions:a,vendorSearchAutoCompleteData:h,selectedTab:e,containerRef:S,listContainerRef:M,isCOTEnabled:u,cotTracking:$,openTooltipId:j,setOpenTooltipId:C,isUncategorizedExpenseCategoryEnabled:v,setActivityLogTransactionId:T,onUploadTransactionReceipt:I},`${O.transactionId}.${je.transactionType}`),value:O.transactionId,defaultChecked:!1,groupLabel:!1,isException:G,exceptionMode:G===!0?"checked_or_hover":void 0,isSticky:!0,isDisabled:Y===!0?"readonly":void 0,exceptionType:G===!0?"alert":void 0,exceptionInfo:G===!0?mx:void 0,exceptionTooltipStyle:{textAlign:"center",maxWidth:"250px",padding:`12px ${n.sp2}`}}}),W=_.map(O=>O.value));const ne={label:"All",value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},{title:H,subTitle:Z}=We("transaction_categorization").allDoneText,oe=R.map(O=>O.transactionId),K=s.useMemo(()=>i.totalCountByTab[e],[e,i.totalCountByTab]),N=s.useMemo(()=>R.reduce((O,se)=>{const Y=Object.keys(se.transactionReviewLocalData.lineItemById).length;return O+(Y>0?Y:1)},0)<i.totalCountByTab[e]?R.length+1:R.length,[R,i.totalCountByTab,e]);return t.jsx(Cx,{windowSize:w,"data-testid":B("transaction-categorization-list-wrapper"),children:t.jsx(bx,{windowSize:w,"data-testid":B("transaction-categorization-list-container"),children:z==="Error"?t.jsxs(Sx,{windowSize:w,"data-testid":B("transaction-categorization-reload-page"),children:[t.jsx(kx,{onClick:()=>b(e,void 0,!0,null,!1,!0),"data-testid":B("transaction-categorization-reload-icon"),children:t.jsx(No,{})}),t.jsx(jx,{"data-testid":B("transaction-categorization-reload-label"),children:px.reloadPage.label})]}):z==="Completed"&&R.length===0?t.jsx(It,{tab:"transaction_categorization",title:H,subTitle:Z,"data-testid":B("transaction-categorization-empty-table-section")}):z==="Not-Started"||z==="In-Progress"&&R.length===0?t.jsx(dx,{sortConfig:{sortKey:A.sortKey,sortOrder:A.sortOrder},fetchState:z,onColumnSortConfigChanged:J,"data-testid":B("transaction-categorization-list-empty-table"),isTransactionActivityEnabled:c}):t.jsx(vx,{windowSize:w,"data-testid":B("transaction-categorization-list-view"),children:t.jsx(wr,{control:F,name:"selectedTransactionIds",defaultValue:[],render:({field:{value:O,ref:se,onChange:Y}})=>t.jsx(fl.Provider,{value:{value:O,mode:"off",allCheckBoxValues:W,index:0,isQuickViewMode:k,sortKey:A.sortKey,sortOrder:A.sortOrder,fetchState:z,isDisabled:d,groupLabelCheckBox:ne,isTransactionActivityEnabled:c,onColumnSortConfigChanged:J,ref:se,onChange:Y,selectedTab:e},children:t.jsx(Jn,{children:({height:G,width:je})=>t.jsx(ir,{isItemLoaded:te,itemCount:K,loadMoreItems:ce,children:({onItemsRendered:Te,ref:E})=>t.jsx(Pi,{ref:de=>{E(de),M.current=de},height:G,itemCount:N,itemKey:de=>`${R[de]?.transactionId??""}-row-${de}`,innerElementType:xx,onItemsRendered:Te,width:je,style:{willChange:"auto"},overscanCount:Hg,itemSize:L,itemData:{checkboxes:_,value:O,allCheckBoxValues:W,groupLabelCheckBox:ne,categorizationGroupValue:oe,transactionLocalData:R,isQuickViewMode:k,mode:"always_on",setRowHeight:U,isItemLoaded:te,ref:E,onChange:Y,selectedCheckBoxTransactionIds:P,isTransactionActivityEnabled:c},initialScrollOffset:i.uiState.scrollPosition?.scrollTop,onScroll:({scrollOffset:de})=>{ge(de)},children:yx})})})})})})})})},xx=e=>{const{isQuickViewMode:i,value:l,allCheckBoxValues:r,groupLabelCheckBox:u,index:d,isDisabled:a,fetchState:c,sortKey:h,sortOrder:m,mode:p,isTransactionActivityEnabled:g,ref:x,onChange:y,onColumnSortConfigChanged:b}=fx(),S=Tt(),{children:$,style:v,...T}=e;return c==="Completed"?t.jsxs($x,{ref:x,style:{...v,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)"},...T,children:[t.jsx(Ix,{children:t.jsx(Eo,{selectionLimit:qn,value:l,checkBoxContainerStyle:{width:"auto",backgroundColor:S.colors.grey4},checkBox:{label:t.jsx(wx,{isQuickViewMode:i,children:t.jsx(ul,{isTransactionActivityEnabled:g,sortConfig:{sortKey:h,sortOrder:m},isDisabled:a,onColumnSortConfigChanged:b})}),value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},isDisabled:"disabled",groupLabelCheckBox:u,allCheckBoxValues:r,mode:i?"off":p,draggable:!1,checkBoxStyle:i?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:n.sp3},name:"transactionCategorizationHeader",index:d,onChangeHandler:I=>Ir({event:I,value:l,allCheckBoxValues:r,groupLabelCheckBox:u,onChange:y}),ref:x})}),t.jsx(Tx,{children:$})]},`${r[d]}-${d}`):null},fl=s.createContext(void 0),fx=()=>{const e=s.useContext(fl);if(!e)throw new Error("useStickyContext must be used within a StickyProvider");return e},yx=({index:e,style:i,data:l})=>{const{selectedTransactionId:r}=zi(),{checkboxes:u,value:d,groupLabelCheckBox:a,categorizationGroupValue:c,allCheckBoxValues:h,transactionLocalData:m,isQuickViewMode:p,isItemLoaded:g,setRowHeight:x,ref:y,onChange:b,selectedCheckBoxTransactionIds:S,isTransactionActivityEnabled:$}=l,v=s.useRef(null),T=be();if(s.useEffect(()=>{v.current?.firstElementChild!=null&&x(e,v.current.firstElementChild.clientHeight)},[e,v,T,m[e]?.transactionReviewLocalData]),g(e)===!0){const I=u[e],w=r!=null&&r===c[e];return t.jsx(wa,{isPanelSelected:w,isQuickViewMode:p,style:{...i,paddingBottom:n.sp0,width:"100%",flex:"1"},ref:v,children:t.jsx(Eo,{selectionLimit:qn,checkBox:p===!0?{...I,isException:!1}:I,value:d,groupLabelCheckBox:a,allCheckBoxValues:h,mode:p===!0||I.isDisabled==="readonly"||S.includes(I.value)===!1&&S.length>=qn?"off":"always_on",draggable:!1,isDisabled:I.isDisabled,checkBoxStyle:p===!0?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:n.sp3},infoIconContainerStyle:p===!0?{display:"none"}:{padding:20},name:`${mn}.${d}`,ref:y,index:e,onChangeHandler:k=>Ir({event:k,value:d,allCheckBoxValues:h,groupLabelCheckBox:a,onChange:b})})},c[e])}else return t.jsx(wa,{isQuickViewMode:p,style:{...i,paddingBottom:n.sp0,width:"100%",flex:"1"},ref:v,children:t.jsx(Eo,{checkBox:{label:t.jsx(ml,{isTransactionActivityEnabled:$}),value:"loading",defaultChecked:!1,groupLabel:!1},value:d,groupLabelCheckBox:a,allCheckBoxValues:h,mode:"off",draggable:!1,checkBoxStyle:p===!0?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:n.sp3},infoIconContainerStyle:p===!0?{display:"none"}:{padding:20},name:"loading-placeholder",index:e,onChangeHandler:()=>{}})},ur())},wx=o.div`
1613
+ `,{common:px,transactionDetail:{notCategorizedTooltipText:mx}}=me.getLocalizedStrings(),po={rowGap:new Q(f[0],f[2],f[3])},gx=({selectedTab:e,transactionView:i,authParams:l,sectionId:r,isCOTEnabled:u,isDisabled:d,vendorSearchAutoCompleteActions:a,isTransactionActivityEnabled:c,vendorSearchAutoCompleteData:h,setCurrentTransactionInAction:m,vendorLoadOptions:p,onTransactionCategorizationRowClick:g,onUpdateTransactionCategorizationUIState:x,onUpdateScrollYOffSetTransactionCategorizationUIState:y,onFetchTransactionCategorizationList:b,containerRef:S,cotTracking:$,isUncategorizedExpenseCategoryEnabled:v,setActivityLogTransactionId:T,onUploadTransactionReceipt:I})=>{const w=be(),k=Ze(),[j,C]=s.useState(void 0),{fetchState:z,uiState:A,transactionLocalData:R,selectedCheckBoxTransactionIds:P,transactionIdsWithUnsavedData:V,transactions:q,uncategorizedAccounts:D}=i;Gn({componentName:`expense_automation.transaction_categorization.${e}`,enabled:z==="Completed"});const M=s.useRef(null),ae=s.useRef({}),{control:F}=Ko();s.useEffect(()=>{M.current?.resetAfterIndex(0,!0)},[w,M,R]),s.useEffect(()=>{M.current?.scrollTo(A.scrollPosition?.scrollTop??0)},[e]);const L=s.useCallback(O=>{if(ae.current?.[O]!=null){const G=w==="small"&&A.pageToken==null&&O===R.length-1?po.rowGap.value("medium-regular"):po.rowGap.value(w);return ae.current[O]+G}if(R[O]==null)return 0;const se=R[O].transactionReviewLocalData,Y=Object.keys(se.lineItemById).length;return Y!=null&&!isNaN(Y)&&Y>1?ua*Y+po.rowGap.value(w)*(Y-1):ua},[R,w,A.pageToken,A.sortKey,A.sortOrder]),U=s.useCallback((O,se)=>{ae.current={...ae.current,[O]:se},M.current?.resetAfterIndex(0,!0)},[w,M,R,A.sortKey,A.sortOrder]),X=s.useCallback(()=>{(A.pageToken!=null&&i.refreshStatus.fetchState!=="In-Progress"||i.refreshStatus.fetchState==="Completed")&&b(e,A.searchString,!0,A.pageToken,!0,!1)},[i.refreshStatus.fetchState,b,e,A.pageToken,A.searchString,A.sortKey,A.sortOrder]),ce=s.useCallback(()=>{A.pageToken!=null&&X()},[X,A.pageToken,A.sortKey,A.sortOrder]),ge=Lc(O=>y(e,{scrollPosition:{scrollTop:O}}),1e3,{trailing:!0}),te=O=>O<i.transactionLocalData.length,J=(O,se)=>{x(e,{sortOrder:se,sortKey:O}),b(e,A.searchString,!1,null,!1,!0)},ee=O=>{if(e==="autoCategorized")return!P.includes(O);const se=R.find(G=>G.transactionId===O)?.transactionReviewLocalData,Y=q.find(G=>G.id===O);return Y!=null&&se!=null?wd(Y,se,D,v)?v===!0&&bs(D,se.lineItemById,["expense"])?V.includes(O)===!1:!1:!0:P.length===0?!0:!P.includes(O)};let H=[],_=[];(z==="Completed"||i.transactionLocalData.length>0)&&(_=i.transactionLocalData.map((O,se)=>{const Y=ee(O.transactionId);let G=!1;v===!0&&Y===!0&&e==="review"&&bs(D,O.transactionReviewLocalData.lineItemById,["expense"])&&(G=!V.includes(O.transactionId));const je=O.transactionReviewLocalData;return{label:t.jsx(E1,{isTransactionActivityEnabled:c,transactionView:i,sectionId:`${r}.${se}.${hl}`,transaction:O,authParams:l,onTransactionCategorizationRowClick:g,vendorLoadOptions:p,setCurrentTransactionInAction:m,vendorSearchAutoCompleteActions:a,vendorSearchAutoCompleteData:h,selectedTab:e,containerRef:S,listContainerRef:M,isCOTEnabled:u,cotTracking:$,openTooltipId:j,setOpenTooltipId:C,isUncategorizedExpenseCategoryEnabled:v,setActivityLogTransactionId:T,onUploadTransactionReceipt:I},`${O.transactionId}.${je.transactionType}`),value:O.transactionId,defaultChecked:!1,groupLabel:!1,isException:G,exceptionMode:G===!0?"checked_or_hover":void 0,isSticky:!0,isDisabled:Y===!0?"readonly":void 0,exceptionType:G===!0?"alert":void 0,exceptionInfo:G===!0?mx:void 0,exceptionTooltipStyle:{textAlign:"center",maxWidth:"250px",padding:`12px ${n.sp2}`}}}),H=_.map(O=>O.value));const ne={label:"All",value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},{title:W,subTitle:Z}=He("transaction_categorization").allDoneText,oe=R.map(O=>O.transactionId),K=s.useMemo(()=>i.totalCountByTab[e],[e,i.totalCountByTab]),N=s.useMemo(()=>R.reduce((O,se)=>{const Y=Object.keys(se.transactionReviewLocalData.lineItemById).length;return O+(Y>0?Y:1)},0)<i.totalCountByTab[e]?R.length+1:R.length,[R,i.totalCountByTab,e]);return t.jsx(Cx,{windowSize:w,"data-testid":B("transaction-categorization-list-wrapper"),children:t.jsx(bx,{windowSize:w,"data-testid":B("transaction-categorization-list-container"),children:z==="Error"?t.jsxs(Sx,{windowSize:w,"data-testid":B("transaction-categorization-reload-page"),children:[t.jsx(kx,{onClick:()=>b(e,void 0,!0,null,!1,!0),"data-testid":B("transaction-categorization-reload-icon"),children:t.jsx(No,{})}),t.jsx(jx,{"data-testid":B("transaction-categorization-reload-label"),children:px.reloadPage.label})]}):z==="Completed"&&R.length===0?t.jsx(It,{tab:"transaction_categorization",title:W,subTitle:Z,"data-testid":B("transaction-categorization-empty-table-section")}):z==="Not-Started"||z==="In-Progress"&&R.length===0?t.jsx(dx,{sortConfig:{sortKey:A.sortKey,sortOrder:A.sortOrder},fetchState:z,onColumnSortConfigChanged:J,"data-testid":B("transaction-categorization-list-empty-table"),isTransactionActivityEnabled:c}):t.jsx(vx,{windowSize:w,"data-testid":B("transaction-categorization-list-view"),children:t.jsx(wr,{control:F,name:"selectedTransactionIds",defaultValue:[],render:({field:{value:O,ref:se,onChange:Y}})=>t.jsx(fl.Provider,{value:{value:O,mode:"off",allCheckBoxValues:H,index:0,isQuickViewMode:k,sortKey:A.sortKey,sortOrder:A.sortOrder,fetchState:z,isDisabled:d,groupLabelCheckBox:ne,isTransactionActivityEnabled:c,onColumnSortConfigChanged:J,ref:se,onChange:Y,selectedTab:e},children:t.jsx(Jn,{children:({height:G,width:je})=>t.jsx(ir,{isItemLoaded:te,itemCount:K,loadMoreItems:ce,children:({onItemsRendered:Te,ref:E})=>t.jsx(Pi,{ref:de=>{E(de),M.current=de},height:G,itemCount:N,itemKey:de=>`${R[de]?.transactionId??""}-row-${de}`,innerElementType:xx,onItemsRendered:Te,width:je,style:{willChange:"auto"},overscanCount:Wg,itemSize:L,itemData:{checkboxes:_,value:O,allCheckBoxValues:H,groupLabelCheckBox:ne,categorizationGroupValue:oe,transactionLocalData:R,isQuickViewMode:k,mode:"always_on",setRowHeight:U,isItemLoaded:te,ref:E,onChange:Y,selectedCheckBoxTransactionIds:P,isTransactionActivityEnabled:c},initialScrollOffset:i.uiState.scrollPosition?.scrollTop,onScroll:({scrollOffset:de})=>{ge(de)},children:yx})})})})})})})})},xx=e=>{const{isQuickViewMode:i,value:l,allCheckBoxValues:r,groupLabelCheckBox:u,index:d,isDisabled:a,fetchState:c,sortKey:h,sortOrder:m,mode:p,isTransactionActivityEnabled:g,ref:x,onChange:y,onColumnSortConfigChanged:b}=fx(),S=Tt(),{children:$,style:v,...T}=e;return c==="Completed"?t.jsxs($x,{ref:x,style:{...v,width:"auto",maxWidth:"var(--side-panel-list-width, 100%)"},...T,children:[t.jsx(Ix,{children:t.jsx(Eo,{selectionLimit:qn,value:l,checkBoxContainerStyle:{width:"auto",backgroundColor:S.colors.grey4},checkBox:{label:t.jsx(wx,{isQuickViewMode:i,children:t.jsx(ul,{isTransactionActivityEnabled:g,sortConfig:{sortKey:h,sortOrder:m},isDisabled:a,onColumnSortConfigChanged:b})}),value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},isDisabled:"disabled",groupLabelCheckBox:u,allCheckBoxValues:r,mode:i?"off":p,draggable:!1,checkBoxStyle:i?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:n.sp3},name:"transactionCategorizationHeader",index:d,onChangeHandler:I=>Ir({event:I,value:l,allCheckBoxValues:r,groupLabelCheckBox:u,onChange:y}),ref:x})}),t.jsx(Tx,{children:$})]},`${r[d]}-${d}`):null},fl=s.createContext(void 0),fx=()=>{const e=s.useContext(fl);if(!e)throw new Error("useStickyContext must be used within a StickyProvider");return e},yx=({index:e,style:i,data:l})=>{const{selectedTransactionId:r}=zi(),{checkboxes:u,value:d,groupLabelCheckBox:a,categorizationGroupValue:c,allCheckBoxValues:h,transactionLocalData:m,isQuickViewMode:p,isItemLoaded:g,setRowHeight:x,ref:y,onChange:b,selectedCheckBoxTransactionIds:S,isTransactionActivityEnabled:$}=l,v=s.useRef(null),T=be();if(s.useEffect(()=>{v.current?.firstElementChild!=null&&x(e,v.current.firstElementChild.clientHeight)},[e,v,T,m[e]?.transactionReviewLocalData]),g(e)===!0){const I=u[e],w=r!=null&&r===c[e];return t.jsx(wa,{isPanelSelected:w,isQuickViewMode:p,style:{...i,paddingBottom:n.sp0,width:"100%",flex:"1"},ref:v,children:t.jsx(Eo,{selectionLimit:qn,checkBox:p===!0?{...I,isException:!1}:I,value:d,groupLabelCheckBox:a,allCheckBoxValues:h,mode:p===!0||I.isDisabled==="readonly"||S.includes(I.value)===!1&&S.length>=qn?"off":"always_on",draggable:!1,isDisabled:I.isDisabled,checkBoxStyle:p===!0?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:n.sp3},infoIconContainerStyle:p===!0?{display:"none"}:{padding:20},name:`${mn}.${d}`,ref:y,index:e,onChangeHandler:k=>Ir({event:k,value:d,allCheckBoxValues:h,groupLabelCheckBox:a,onChange:b})})},c[e])}else return t.jsx(wa,{isQuickViewMode:p,style:{...i,paddingBottom:n.sp0,width:"100%",flex:"1"},ref:v,children:t.jsx(Eo,{checkBox:{label:t.jsx(ml,{isTransactionActivityEnabled:$}),value:"loading",defaultChecked:!1,groupLabel:!1},value:d,groupLabelCheckBox:a,allCheckBoxValues:h,mode:"off",draggable:!1,checkBoxStyle:p===!0?{display:"none"}:{padding:20},labelCheckBoxStyle:{padding:n.sp3},infoIconContainerStyle:p===!0?{display:"none"}:{padding:20},name:"loading-placeholder",index:e,onChangeHandler:()=>{}})},ur())},wx=o.div`
1614
1614
  flex: 1;
1615
1615
  width: auto;
1616
1616
  padding-left: ${({isQuickViewMode:e})=>e===!0?n.sp8:n.sp0};
@@ -1679,7 +1679,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
1679
1679
  position: relative;
1680
1680
  width: auto;
1681
1681
  height: 100%;
1682
- `,Lx=({selectedTab:e,transactionView:i,authParams:l,sectionId:r,vendorSearchAutoCompleteData:u,vendorSearchAutoCompleteActions:d,isCOTEnabled:a,isTransactionActivityEnabled:c,setCurrentFooterFormId:h,setLocalDataForCategoryAndClass:m,onTransactionCategorizationRowClick:p,onUpdateTransactionCategorizationUIState:g,onUpdateScrollYOffSetTransactionCategorizationUIState:x,onFetchTransactionCategorizationList:y,onSaveUpdateTransactionCategorization:b,onUpdateSelectedCheckboxTransactionIds:S,onFetchRecommendationsForEntityCategorization:$,onFetchRecommendationsForEntityCategorizationWithCustomer:v,setActivityLogTransactionId:T,onUploadTransactionReceipt:I})=>{const[w,k]=s.useState({transactionId:void 0,lineItemId:void 0}),j=s.useRef(),C=s.useRef({}),{useDynamicConfig:z}=pr(),{configValue:A}=z(mr.enableUncategorizedExpenseCategory),R=A?.uncategorized_expense_category_enabled===!0,P=(ee,W,_,ne)=>{const H={...C.current};H[W]==null&&(H[W]=[]);let Z=H[W].findIndex(oe=>oe.lineId===ee);if(Z===-1){const oe={lineId:ee,category:{recommendationTypesViewed:[]},class:{recommendationTypesViewed:[]},vendor:{recommendationTypesViewed:[]}};H[W].push(oe),Z=H[W].length-1}else{const oe=H[W][Z];H[W][Z]={...oe,category:{...oe.category,recommendationTypesViewed:[...oe.category.recommendationTypesViewed]},class:{...oe.class,recommendationTypesViewed:[...oe.class.recommendationTypesViewed]},vendor:{...oe.vendor,recommendationTypesViewed:[...oe.vendor.recommendationTypesViewed]}}}ne!=null&&ne!==""&&!H[W][Z][_].recommendationTypesViewed.includes(ne)&&H[W][Z][_].recommendationTypesViewed.push(ne),C.current=H},{transactions:V,transactionLocalData:q,accountsHierarchyList:D,classHierarchyList:M,accountList:ae,classList:F,selectedCheckBoxTransactionIds:L,uncategorizedAccounts:U}=i,X=xn({mode:"all",reValidateMode:"onChange",defaultValues:s.useMemo(()=>ba(L,q,D,M,u.entityAutoCompleteView),[D,M,L,q,u.entityAutoCompleteView]),values:s.useMemo(()=>ba(L,q,D,M,u.entityAutoCompleteView),[D,M,L,q,u.entityAutoCompleteView]),resetOptions:{keepDefaultValues:!0,keepDirty:!1}});s.useEffect(()=>()=>{h("expenseAutomationPage")},[]),s.useEffect(()=>{L.length>0?h(so):h("expenseAutomationPage")},[L,h]);const ce=X.handleSubmit(ee=>{const W=ee[Ri],_=C.current;b(e,W,_),W.forEach(ne=>{delete C.current[ne]})}),ge=async(ee,W)=>{if(ee!=null){if(ee===Ri){const _=X.getValues(Ri);if(_.length<L.length){S(e,_);return}if(_.length===qn){S(e,_);return}const ne=_[_.length-1],H=W[mn].findIndex(oe=>oe.transactionId===ne),Z=X.getValues(`${mn}.${H}.lineInfo`);if(Z!=null){let oe=!1;if(Z.every(K=>(oe=Nn(U,K[Pe].selectedOption,R?["income"]:void 0),!!K[Pe].selectedOption&&K[Pe].selectedOption!=null&&!oe&&!!K[ut].selectedOption&&!!K[jt].selectedOption))===!0){S(e,_);return}else{const K=_.filter(N=>N!==ne);S(e,K);return}}return}if(ee.includes(Pe)===!0||ee.includes(ut)===!0){const _=parseInt(ee.split(".")[1]),ne=parseInt(ee.split(".")[3]),H=X.getValues(`${mn}.${_}.lineInfo`),Z=H[ne];if(ee.includes(Pe)||ee.includes(ut)){const{transactionId:oe,lineId:K,recommendations:N}=Z;if(H!=null){const O=Z[Pe].selectedOption,se=Z[ut].selectedOption,Y=Z[jt].selectedOption,G=Z[jt].selectedOption,je=Z[jt].defaultOptions,Te=je?.find(fe=>fe.options?.find(_e=>_e.value===Y))?.options?.find(fe=>fe.value===Y)?.label,E=je?.find(fe=>fe.options?.find(_e=>_e.value===G))?.options?.find(fe=>fe.value===G)?.label,de=u.entityAutoCompleteView.vendor.find(fe=>fe.qboId===Y),$e=u.entityAutoCompleteView.customer.find(fe=>fe.qboId===G),Me=N.find(fe=>fe.vendor?.qboId===Y)?.vendor,De=Y||de?.qboId||Me?.qboId?{id:Y??de?.qboId??Me?.qboId??"",name:Te??de?.name??Me?.name??"",logo:de?.logo??Me?.logo}:void 0,Fe=G||$e?.qboId?{id:G??$e?.qboId??"",name:E??$e?.name??"",logo:$e?.logo}:void 0,ve=ae.find(fe=>fe.qboId===O),Xe=F.find(fe=>fe.classId===se),ht=i.transactionLocalData.find(fe=>fe.transactionId===oe)?.transactionReviewLocalData.lineItemById[K].account,et=i.transactionLocalData.find(fe=>fe.transactionId===oe)?.transactionReviewLocalData.lineItemById[K].class;m(e,oe,K,V,De?.id,Fe?.id,ee.includes(Pe)&&ve!=null?{...ve,isPreFilled:!1}:ht,ee.includes(ut)&&Xe!=null?{...Xe,isPreFilled:!1}:et,void 0,N,R)}return}}if(ee.includes(jt)){const _=parseInt(ee.split(".")[1]),ne=parseInt(ee.split(".")[3]),H=X.getValues(`${mn}.${_}.lineInfo`);if(H!=null){const Z=H[ne],{transactionId:oe,recommendations:K}=Z,N=Z[jt].selectedOption,O=Z[jt].selectedOption,se=Z[jt].defaultOptions,Y=se?.flatMap(ve=>ve.options)?.find(ve=>ve.value===N)?.label,G=se?.flatMap(ve=>ve.options)?.find(ve=>ve.value===O)?.label,je=u.entityAutoCompleteView.vendor.find(ve=>ve.qboId===N),Te=u.entityAutoCompleteView.customer.find(ve=>ve.qboId===O),E=K.find(ve=>ve.vendor?.qboId===N)?.vendor,de=N!==""&&N!=null?N:Y!==""&&Y!=null?Y:"",$e=(je?.qboId!=null&&je.qboId!==""?je.qboId:null)??(E?.qboId!=null&&E.qboId!==""?E.qboId:null)??(N!=null&&N!==""?N:null),Me={id:$e??Y??"",name:Y??je?.name??E?.name??"",logo:je?.logo??E?.logo},De=Te?.qboId!=null&&Te.qboId!==""?{id:Te.qboId??O??"",name:G??Te.name??"",logo:Te.logo}:void 0,Fe=V.find(ve=>ve.id===oe);if(Fe!=null){const ve=i.transactionLocalData.find(_e=>_e.transactionId===Fe.id)?.transactionReviewLocalData,Xe=ve?.lineItemById[Z.lineId],ht=ln(Fe)===!0?ve?.selectedEntity:Xe?.selectedEntityLine,et=De?.id!=null&&De.id!==""?{id:De.id,name:De.name,type:"customer",qboId:De.id,zeniId:De.id,logo:De.logo}:Me.id!==""&&Me.id!=null?{id:de,name:Y??de,type:"vendor",qboId:de,zeniId:de,logo:Me.logo,isPreFilled:ht?.id===$e&&ht?.isPreFilled}:void 0,fe={transactionId:{id:Fe.id,type:Fe.type},transaction:Fe,lineIds:Fe.type!=="journal_entry"?Fe.lines?.map(_e=>_e.id)??[]:[Z.lineId]};et?.type==="customer"?v(Z.amount.amount,fe,!1,e,et,De,R):$(Z.amount.amount,fe,!1,e,et,Me,R)}}d.onCancelAutoComplete?.();return}}};s.useEffect(()=>{const ee=X.watch((W,{name:_})=>{_!=null&&W!=null&&Yn(()=>ge(_,W))});return()=>{ee.unsubscribe()}}),s.useEffect(()=>{if(u.entityAutoCompleteView.fetchState==="Completed"){const ee=i.transactionLocalData.find(W=>W.transactionId===w.transactionId);if(ee){const{transactionReviewLocalData:W}=ee,{selectedEntity:_}=W,ne=w?.lineItemId??W.sortedLineItems[0],H=W.lineItemById[ne],Z=H.selectedEntityLine;j.current?.(Ho(u.entityAutoCompleteView,_??Z,H?.recommendationsWithCOT??[]))}k({transactionId:void 0,lineItemId:void 0})}},[u.entityAutoCompleteView.fetchState]);const te=(ee,W)=>{d.onAutoCompleteInputChange?.(ee),j.current=W},J=s.useRef(null);return t.jsx(Rx,{ref:J,"data-testid":B("transaction-categorization-list-page"),children:t.jsx(fn,{...X,children:t.jsx("form",{id:Ca(so),onSubmit:ce,style:{height:"100%",width:"100%"},"data-testid":B(Ca(so)),children:t.jsx(gx,{isTransactionActivityEnabled:c,selectedTab:e,sectionId:r,transactionView:i,authParams:l,setCurrentTransactionInAction:k,onUpdateTransactionCategorizationUIState:g,onUpdateScrollYOffSetTransactionCategorizationUIState:x,onFetchTransactionCategorizationList:y,onTransactionCategorizationRowClick:p,vendorLoadOptions:te,vendorSearchAutoCompleteData:u,vendorSearchAutoCompleteActions:d,containerRef:J,isCOTEnabled:a,cotTracking:{onCOTView:P},isUncategorizedExpenseCategoryEnabled:R,setActivityLogTransactionId:T,onUploadTransactionReceipt:I})})})})},Ca=e=>`${e}_form`,ba=(e,i,l,r,u)=>({[mn]:i.map(d=>Ax(d.transactionId,d.transactionReviewLocalData,l,r,u)),[Ri]:e}),Ax=(e,i,l,r,u)=>{const{lineItemById:d,sortedLineItems:a,selectedEntity:c}=i,h=Object.values(d).sort((p,g)=>a.indexOf(p.lineId)-a.indexOf(g.lineId)),m=h[0]?.lineId;return{[hl]:h.map(p=>{const g=p.account?.qboId??p.account?.accountId,x=p.class?.classId,y=p.selectedEntityLine;return{id:p.id,transactionId:p.transactionId,type:p.type,amount:p.amount,lineDetailType:p.lineDetailType,platformLineDetailType:p.platformLineDetailType,lineTransactionType:p.lineTransactionType,postingType:p.postingType,postingTypeName:p.postingTypeName,customer:p.customer,vendor:p.vendor,billable:p.billable,item:p.item,isCategoryMiscategorized:p.isCategoryMiscategorized,isClassMiscategorized:p.isClassMiscategorized,lineId:p.id,[Pe]:{selectedOption:g,allOptions:$r(l,p.recommendationsWithCOT)},[ut]:{selectedOption:x,allOptions:jr(r,p.recommendationsWithCOT)},[jt]:{selectedOption:c?.id??y?.id??c?.name??y?.name,defaultOptions:Ho(u,c??y,i.lineItemById[m]?.recommendationsWithCOT??[])},[C1]:p.lineEntity,[b1]:p.recommendationsWithCOT??[]}}),transactionId:e,[v1]:i.vendorDetails!=null&&i.vendorDetails.id!=null?{id:i.vendorDetails.id,qboId:i.vendorDetails.qboId,name:i.vendorDetails.name}:void 0,[S1]:i.customerDetails!=null&&i.customerDetails.id!=null?{id:i.customerDetails.id,qboId:i.customerDetails.qboId,name:i.customerDetails.name}:void 0}},Rx=o.div`
1682
+ `,Lx=({selectedTab:e,transactionView:i,authParams:l,sectionId:r,vendorSearchAutoCompleteData:u,vendorSearchAutoCompleteActions:d,isCOTEnabled:a,isTransactionActivityEnabled:c,setCurrentFooterFormId:h,setLocalDataForCategoryAndClass:m,onTransactionCategorizationRowClick:p,onUpdateTransactionCategorizationUIState:g,onUpdateScrollYOffSetTransactionCategorizationUIState:x,onFetchTransactionCategorizationList:y,onSaveUpdateTransactionCategorization:b,onUpdateSelectedCheckboxTransactionIds:S,onFetchRecommendationsForEntityCategorization:$,onFetchRecommendationsForEntityCategorizationWithCustomer:v,setActivityLogTransactionId:T,onUploadTransactionReceipt:I})=>{const[w,k]=s.useState({transactionId:void 0,lineItemId:void 0}),j=s.useRef(),C=s.useRef({}),{useDynamicConfig:z}=pr(),{configValue:A}=z(mr.enableUncategorizedExpenseCategory),R=A?.uncategorized_expense_category_enabled===!0,P=(ee,H,_,ne)=>{const W={...C.current};W[H]==null&&(W[H]=[]);let Z=W[H].findIndex(oe=>oe.lineId===ee);if(Z===-1){const oe={lineId:ee,category:{recommendationTypesViewed:[]},class:{recommendationTypesViewed:[]},vendor:{recommendationTypesViewed:[]}};W[H].push(oe),Z=W[H].length-1}else{const oe=W[H][Z];W[H][Z]={...oe,category:{...oe.category,recommendationTypesViewed:[...oe.category.recommendationTypesViewed]},class:{...oe.class,recommendationTypesViewed:[...oe.class.recommendationTypesViewed]},vendor:{...oe.vendor,recommendationTypesViewed:[...oe.vendor.recommendationTypesViewed]}}}ne!=null&&ne!==""&&!W[H][Z][_].recommendationTypesViewed.includes(ne)&&W[H][Z][_].recommendationTypesViewed.push(ne),C.current=W},{transactions:V,transactionLocalData:q,accountsHierarchyList:D,classHierarchyList:M,accountList:ae,classList:F,selectedCheckBoxTransactionIds:L,uncategorizedAccounts:U}=i,X=xn({mode:"all",reValidateMode:"onChange",defaultValues:s.useMemo(()=>ba(L,q,D,M,u.entityAutoCompleteView),[D,M,L,q,u.entityAutoCompleteView]),values:s.useMemo(()=>ba(L,q,D,M,u.entityAutoCompleteView),[D,M,L,q,u.entityAutoCompleteView]),resetOptions:{keepDefaultValues:!0,keepDirty:!1}});s.useEffect(()=>()=>{h("expenseAutomationPage")},[]),s.useEffect(()=>{L.length>0?h(so):h("expenseAutomationPage")},[L,h]);const ce=X.handleSubmit(ee=>{const H=ee[Ri],_=C.current;b(e,H,_),H.forEach(ne=>{delete C.current[ne]})}),ge=async(ee,H)=>{if(ee!=null){if(ee===Ri){const _=X.getValues(Ri);if(_.length<L.length){S(e,_);return}if(_.length===qn){S(e,_);return}const ne=_[_.length-1],W=H[mn].findIndex(oe=>oe.transactionId===ne),Z=X.getValues(`${mn}.${W}.lineInfo`);if(Z!=null){let oe=!1;if(Z.every(K=>(oe=Nn(U,K[Pe].selectedOption,R?["income"]:void 0),!!K[Pe].selectedOption&&K[Pe].selectedOption!=null&&!oe&&!!K[ut].selectedOption&&!!K[jt].selectedOption))===!0){S(e,_);return}else{const K=_.filter(N=>N!==ne);S(e,K);return}}return}if(ee.includes(Pe)===!0||ee.includes(ut)===!0){const _=parseInt(ee.split(".")[1]),ne=parseInt(ee.split(".")[3]),W=X.getValues(`${mn}.${_}.lineInfo`),Z=W[ne];if(ee.includes(Pe)||ee.includes(ut)){const{transactionId:oe,lineId:K,recommendations:N}=Z;if(W!=null){const O=Z[Pe].selectedOption,se=Z[ut].selectedOption,Y=Z[jt].selectedOption,G=Z[jt].selectedOption,je=Z[jt].defaultOptions,Te=je?.find(fe=>fe.options?.find(_e=>_e.value===Y))?.options?.find(fe=>fe.value===Y)?.label,E=je?.find(fe=>fe.options?.find(_e=>_e.value===G))?.options?.find(fe=>fe.value===G)?.label,de=u.entityAutoCompleteView.vendor.find(fe=>fe.qboId===Y),$e=u.entityAutoCompleteView.customer.find(fe=>fe.qboId===G),Me=N.find(fe=>fe.vendor?.qboId===Y)?.vendor,De=Y||de?.qboId||Me?.qboId?{id:Y??de?.qboId??Me?.qboId??"",name:Te??de?.name??Me?.name??"",logo:de?.logo??Me?.logo}:void 0,Fe=G||$e?.qboId?{id:G??$e?.qboId??"",name:E??$e?.name??"",logo:$e?.logo}:void 0,ve=ae.find(fe=>fe.qboId===O),Xe=F.find(fe=>fe.classId===se),ht=i.transactionLocalData.find(fe=>fe.transactionId===oe)?.transactionReviewLocalData.lineItemById[K].account,et=i.transactionLocalData.find(fe=>fe.transactionId===oe)?.transactionReviewLocalData.lineItemById[K].class;m(e,oe,K,V,De?.id,Fe?.id,ee.includes(Pe)&&ve!=null?{...ve,isPreFilled:!1}:ht,ee.includes(ut)&&Xe!=null?{...Xe,isPreFilled:!1}:et,void 0,N,R)}return}}if(ee.includes(jt)){const _=parseInt(ee.split(".")[1]),ne=parseInt(ee.split(".")[3]),W=X.getValues(`${mn}.${_}.lineInfo`);if(W!=null){const Z=W[ne],{transactionId:oe,recommendations:K}=Z,N=Z[jt].selectedOption,O=Z[jt].selectedOption,se=Z[jt].defaultOptions,Y=se?.flatMap(ve=>ve.options)?.find(ve=>ve.value===N)?.label,G=se?.flatMap(ve=>ve.options)?.find(ve=>ve.value===O)?.label,je=u.entityAutoCompleteView.vendor.find(ve=>ve.qboId===N),Te=u.entityAutoCompleteView.customer.find(ve=>ve.qboId===O),E=K.find(ve=>ve.vendor?.qboId===N)?.vendor,de=N!==""&&N!=null?N:Y!==""&&Y!=null?Y:"",$e=(je?.qboId!=null&&je.qboId!==""?je.qboId:null)??(E?.qboId!=null&&E.qboId!==""?E.qboId:null)??(N!=null&&N!==""?N:null),Me={id:$e??Y??"",name:Y??je?.name??E?.name??"",logo:je?.logo??E?.logo},De=Te?.qboId!=null&&Te.qboId!==""?{id:Te.qboId??O??"",name:G??Te.name??"",logo:Te.logo}:void 0,Fe=V.find(ve=>ve.id===oe);if(Fe!=null){const ve=i.transactionLocalData.find(_e=>_e.transactionId===Fe.id)?.transactionReviewLocalData,Xe=ve?.lineItemById[Z.lineId],ht=ln(Fe)===!0?ve?.selectedEntity:Xe?.selectedEntityLine,et=De?.id!=null&&De.id!==""?{id:De.id,name:De.name,type:"customer",qboId:De.id,zeniId:De.id,logo:De.logo}:Me.id!==""&&Me.id!=null?{id:de,name:Y??de,type:"vendor",qboId:de,zeniId:de,logo:Me.logo,isPreFilled:ht?.id===$e&&ht?.isPreFilled}:void 0,fe={transactionId:{id:Fe.id,type:Fe.type},transaction:Fe,lineIds:Fe.type!=="journal_entry"?Fe.lines?.map(_e=>_e.id)??[]:[Z.lineId]};et?.type==="customer"?v(Z.amount.amount,fe,!1,e,et,De,R):$(Z.amount.amount,fe,!1,e,et,Me,R)}}d.onCancelAutoComplete?.();return}}};s.useEffect(()=>{const ee=X.watch((H,{name:_})=>{_!=null&&H!=null&&Yn(()=>ge(_,H))});return()=>{ee.unsubscribe()}}),s.useEffect(()=>{if(u.entityAutoCompleteView.fetchState==="Completed"){const ee=i.transactionLocalData.find(H=>H.transactionId===w.transactionId);if(ee){const{transactionReviewLocalData:H}=ee,{selectedEntity:_}=H,ne=w?.lineItemId??H.sortedLineItems[0],W=H.lineItemById[ne],Z=W.selectedEntityLine;j.current?.(Wo(u.entityAutoCompleteView,_??Z,W?.recommendationsWithCOT??[]))}k({transactionId:void 0,lineItemId:void 0})}},[u.entityAutoCompleteView.fetchState]);const te=(ee,H)=>{d.onAutoCompleteInputChange?.(ee),j.current=H},J=s.useRef(null);return t.jsx(Rx,{ref:J,"data-testid":B("transaction-categorization-list-page"),children:t.jsx(fn,{...X,children:t.jsx("form",{id:Ca(so),onSubmit:ce,style:{height:"100%",width:"100%"},"data-testid":B(Ca(so)),children:t.jsx(gx,{isTransactionActivityEnabled:c,selectedTab:e,sectionId:r,transactionView:i,authParams:l,setCurrentTransactionInAction:k,onUpdateTransactionCategorizationUIState:g,onUpdateScrollYOffSetTransactionCategorizationUIState:x,onFetchTransactionCategorizationList:y,onTransactionCategorizationRowClick:p,vendorLoadOptions:te,vendorSearchAutoCompleteData:u,vendorSearchAutoCompleteActions:d,containerRef:J,isCOTEnabled:a,cotTracking:{onCOTView:P},isUncategorizedExpenseCategoryEnabled:R,setActivityLogTransactionId:T,onUploadTransactionReceipt:I})})})})},Ca=e=>`${e}_form`,ba=(e,i,l,r,u)=>({[mn]:i.map(d=>Ax(d.transactionId,d.transactionReviewLocalData,l,r,u)),[Ri]:e}),Ax=(e,i,l,r,u)=>{const{lineItemById:d,sortedLineItems:a,selectedEntity:c}=i,h=Object.values(d).sort((p,g)=>a.indexOf(p.lineId)-a.indexOf(g.lineId)),m=h[0]?.lineId;return{[hl]:h.map(p=>{const g=p.account?.qboId??p.account?.accountId,x=p.class?.classId,y=p.selectedEntityLine;return{id:p.id,transactionId:p.transactionId,type:p.type,amount:p.amount,lineDetailType:p.lineDetailType,platformLineDetailType:p.platformLineDetailType,lineTransactionType:p.lineTransactionType,postingType:p.postingType,postingTypeName:p.postingTypeName,customer:p.customer,vendor:p.vendor,billable:p.billable,item:p.item,isCategoryMiscategorized:p.isCategoryMiscategorized,isClassMiscategorized:p.isClassMiscategorized,lineId:p.id,[Pe]:{selectedOption:g,allOptions:$r(l,p.recommendationsWithCOT)},[ut]:{selectedOption:x,allOptions:jr(r,p.recommendationsWithCOT)},[jt]:{selectedOption:c?.id??y?.id??c?.name??y?.name,defaultOptions:Wo(u,c??y,i.lineItemById[m]?.recommendationsWithCOT??[])},[C1]:p.lineEntity,[b1]:p.recommendationsWithCOT??[]}}),transactionId:e,[v1]:i.vendorDetails!=null&&i.vendorDetails.id!=null?{id:i.vendorDetails.id,qboId:i.vendorDetails.qboId,name:i.vendorDetails.name}:void 0,[S1]:i.customerDetails!=null&&i.customerDetails.id!=null?{id:i.customerDetails.id,qboId:i.customerDetails.qboId,name:i.customerDetails.name}:void 0}},Rx=o.div`
1683
1683
  display: flex;
1684
1684
  min-height: 100%;
1685
1685
  width: 100%;
@@ -1699,7 +1699,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
1699
1699
  display: flex;
1700
1700
  flex-direction: column;
1701
1701
  width: 100%;
1702
- `,Mx=e=>{const{currentFooterFormId:i,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,setResetJeAccountSettingsForm:u,expenseAutomationViewSelector:d,isTransactionActivityEnabled:a,authParams:c,receiptUploadEndpoint:h,companyId:m,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,enableMonthEndInsightsZeniGPTFeature:x,monthEndInsightsPreviewMode:y,monthEndInsightsCustomerRequestData:b,allThreadsSectionOpen:S,loggedInUser:$,isCOTEnabled:v,setCurrentFooterFormId:T,onFetchRecommendationsForEntityCategorization:I,onFetchRecommendationsForEntityCategorizationWithCustomer:w,onTransactionCategorizationRowClick:k,onFetchMissingReceiptsList:j,onMissingReceiptsRowClick:C,onUploadReceiptAttachment:z,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:R,onReconTabColumnSortConfigChanged:P,onReloadReconciliationListPage:V,onUpdateReconcileTabLocalData:q,onUpdateMissingReceiptsUIState:D,onFetchTransactionCategorizationList:M,onUpdateTransactionCategorizationUIState:ae,onUpdateScrollYOffSetTransactionCategorizationUIState:F,handleJeScheduleClick:L,ignoreRecommendedJeSchedule:U,onJESchedulesFormDataChange:X,onPostJESchedule:ce,setLocalDataForCategoryAndClass:ge,resetTransactionCategorizationLocalData:te,updateSelectedVendorForTransaction:J,onSaveUpdateTransactionCategorization:ee,onUpdateSelectedCheckboxTransactionIds:W,improveMonthEndInsightsUsingZeniGPTClick:_,onRemoveFileAttachment:ne,onUpdateFileAttachment:H,onCloseAllThreadsSection:Z,onEditMonthEndInsightsClick:oe,previewMonthEndReport:K,saveMonthEndReport:N,onOpenFileAttachmentSnackBar:O,onCloseFileAttachmentSnackBar:se,onClickCustomerRequest:Y,sendMonthEndReport:G,markAsReview:je,onReloadPage:Te,updateOperatingExpensesIdsForReview:E,onFetchReimbursementView:de,updateSectionIdsForReview:$e,onUpdateFluxAnalysisUIState:Me,fetchFluxViewOnScroll:De,onFetchFluxViewList:Fe,setIsJeAccountSettingsOpened:ve,onReviewClicked:Xe,setOpenDrawerClicked:ht,onEstablishConnectionClick:et,onFetchLinkTokenClick:fe,updateReconReviewTabLocalData:_e,onReconReviewTabColumnSortConfigChanged:Vt,onSaveReconciliation:tt,onSaveReconciliationReview:pt,onReconMatchedTransactionClick:Lt,onAddStatementClick:Ee,redirectToVendorDetailPage:Ie,setActivityLogTransactionId:Ke}=e,{currentSelectedView:ye,missingReceipts:Be,transactionView:wt,selectedPeriod:yn,monthEndInsights:Qe,selectedTransactionCategorizationTab:wn,reconciliation:Cn}=d;switch(ye){case"transaction_categorization":return wt.fetchState==="Completed"&&wt.transactionLocalData.length===0?t.jsx(It,{tab:ye,title:We(ye).allDoneText.title,subTitle:We(ye).allDoneText.subTitle}):t.jsx(Lx,{setCurrentFooterFormId:T,selectedPeriod:yn,selectedTab:wn,sectionId:mn,transactionView:wt,authParams:c,isTransactionActivityEnabled:a,onUpdateTransactionCategorizationUIState:ae,onUpdateScrollYOffSetTransactionCategorizationUIState:F,onFetchTransactionCategorizationList:M,onTransactionCategorizationRowClick:k,setLocalDataForCategoryAndClass:ge,resetTransactionCategorizationLocalData:te,updateSelectedVendorForTransaction:J,onSaveUpdateTransactionCategorization:ee,onUpdateSelectedCheckboxTransactionIds:W,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,onFetchRecommendationsForEntityCategorization:I,onFetchRecommendationsForEntityCategorizationWithCustomer:w,isCOTEnabled:v,setActivityLogTransactionId:Ke,onUploadTransactionReceipt:e.onUploadTransactionReceipt});case"je_schedules":return t.jsx(Lm,{setIsJeAccountSettingsOpened:ve,expenseAutomationViewSelector:d,setResetJeAccountSettingsForm:u,currentFooterFormId:i,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,setCurrentFooterFormId:T,handleJeScheduleClick:L,ignoreRecommendedJeSchedule:U,onJESchedulesFormDataChange:X,onPostJESchedule:ce,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g});case"missing_receipts":return Be.fetchState==="Completed"&&Be.transactions.length===0?t.jsx(It,{tab:ye,title:We(ye).allDoneText.title,subTitle:We(ye).allDoneText.subTitle}):t.jsx(gg,{onUpdateMissingReceiptsUIState:D,onFetchMissingReceiptsList:j,missingReceipts:Be,receiptUploadEndpoint:h,authParams:c,selectedPeriod:yn,onMissingReceiptsRowClick:C,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:R,onUploadReceiptAttachment:z});case"month_end_insights":if(Qe!=null&&d.monthEndCloseChecksView.monthEndCloseChecks!=null){if(Qe.fetchState==="Not-Started"||Qe.fetchState==="In-Progress"||Qe.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||Qe.companyMonthEndReportTemplatesData.fetchState==="In-Progress")return t.jsx(Kl,{fetchState:"In-Progress"});{const Ct={application:"cockpit",companyId:m,entityId:m,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:Qe.companyName,url:window.location.href},{url:Yt,...Zt}=Ct,Xt={...Zt};return t.jsx(Dx,{children:t.jsx(Ug,{allThreadsSectionOpen:S,customerRequestData:b,companyId:m,enableZeniGPTFeature:x,filterMetaData:Xt,selectedPeriod:d.selectedPeriod,improveUsingZeniGPTClick:_,isZeniUser:$?.userEmail?.includes("zeni.ai")??!1,monthEndReportView:Qe,newThreadMetadata:Ct,onClickCustomerRequest:Y,onCloseAllThreadsSection:Z,onCloseFileAttachmentSnackBar:se,onOpenFileAttachmentSnackBar:O,onRemoveFileAttachment:ne,onUpdateFileAttachment:H,previewMode:y,previewMonthEndReport:K,saveMonthEndReport:N,onEditClick:oe,sendMonthEndReport:G})})}}else return null;case"flux_analysis":return d.fluxAnalysis.fetchStatus.fetchState==="Completed"&&d.fluxAnalysis.sections.generalExpense.vendors.length===0&&d.fluxAnalysis.sections.reimbursement.vendors.length===0?t.jsx(It,{tab:ye,title:We(ye).allDoneText.title,subTitle:We(ye).allDoneText.subTitle}):t.jsx(sm,{fluxAnalysis:d.fluxAnalysis,selectedPeriod:d.selectedPeriod,markAsReview:je,onReloadPage:Te,updateOperatingExpensesIdsForReview:E,updateSectionIdsForReview:$e,onUpdateFluxAnalysisUIState:Me,setCurrentFooterFormId:T,fetchFluxViewOnScroll:De,onFetchFluxViewList:Fe,onFetchReimbursementView:de,redirectToVendorDetailPage:Ie});case"reconciliation":return t.jsx(Np,{onReloadReconciliationListPage:V,currentFooterFormId:i,reconciliation:Cn,companyId:m,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,onReviewClicked:Xe,setOpenDrawerClicked:ht,setCurrentFooterFormId:T,onReconTabColumnSortConfigChanged:P,onUpdateReconcileTabLocalData:q,onEstablishConnectionClick:et,onFetchLinkTokenClick:fe,updateReconReviewTabLocalData:_e,onReconReviewTabColumnSortConfigChanged:Vt,onSaveReconciliation:tt,onSaveReconciliationReview:pt,onReconMatchedTransactionClick:Lt,onAddStatementClick:Ee});default:return t.jsx(It,{tab:ye,title:We(ye).allDoneText.title,subTitle:We(ye).allDoneText.subTitle})}};function yl(e){const i=be(),{currentSelectedView:l}=e.expenseAutomationViewSelector,r=e.expenseAutomationViewSelector.currentSelectedView==="transaction_categorization",u=e.expenseAutomationViewSelector.currentSelectedView!=="month_end_insights"&&e.expenseAutomationViewSelector.currentSelectedView!=="flux_analysis";return t.jsx(Ex,{windowSize:i,style:{...u===!0?{paddingLeft:va.subSectionContainerLeftRightPadding.value(i),paddingRight:va.subSectionContainerLeftRightPadding.value(i)}:{paddingLeft:f[0],paddingRight:f[0]},...r===!0||l==="reconciliation"?{paddingLeft:f[0],paddingRight:f[0]}:{}},children:t.jsx(Mx,{...e})})}const Ox=70,wl=50,zx=3,Px=["receipts"],Sa=e=>Qo(e,Px),{common:{texts:{vendor:Fx,amount:_x,receipts:Bx,category:Vx,classText:Nx,date:Ux}}}=me.getLocalizedStrings(),Cl={key:"vendor",value:Fx,sortOrder:"ascending",width:new Q(18,18)},Hx={key:"category",value:Vx,sortOrder:"ascending",width:new Q(18,18)},Wx={key:"class",value:Nx,sortOrder:"ascending",width:new Q(18,18)},qx={key:"date",value:Ux,sortOrder:"descending",width:new Q(11,11)},Kx={key:"receipts",value:Bx,sortOrder:"descending",width:new Q(6,6)},bl={key:"amount",value:_x,sortOrder:"ascending",width:new Q(10,10)},ls=[Cl,Hx,Wx,qx,Kx,bl],cs=[{...Cl,width:new Q(65,65)},{...bl,width:new Q(30,30)}],mo={sortKey:"date",sortOrder:"descending"},vl=({sortConfig:e,isDisabled:i,onColumnSortConfigChanged:l})=>{const r=be(),u=Ze(),d=u?cs:ls,[a,c]=s.useState(d);s.useEffect(()=>{const p=[...d];for(const g of p)g.key===e.sortKey?g.sortOrder=e.sortOrder:g.sortOrder="ascending";c(p)},[e.sortKey,e.sortOrder,u]);const h=(p,g)=>{let x=g;e.sortKey===p&&(x=g==="ascending"?"descending":"ascending"),l(p,x)},m=p=>{Sa(p.key)==null&&h(gd(p.key),p.sortOrder)};return t.jsx(Jx,{windowSize:r,isQuickViewMode:u,children:a.map((p,g)=>{const x=i!=null||Sa(p.key)!=null;return t.jsxs(Qx,{sortDataValue:e.sortKey,actualDataValue:p.key,wrapperWidth:p.width,isSortDisabled:x,windowSize:r,isQuickViewMode:u,isLastItem:g===a.length-1,style:p.key==="receipts"?{justifyContent:"center"}:void 0,children:[t.jsxs(ef,{onClick:()=>x?null:m(p),isSortDisabled:x,children:[t.jsx(tf,{children:p.value}),x?null:t.jsx(Yx,{sortConfig:e,headerData:p,children:t.jsx(Xx,{})})]}),x?null:t.jsx(Zx,{isSortDisabled:x,sortDataValue:e.sortKey,isVisible:e.sortKey===p.key&&e.sortKey!==mo.sortKey,children:t.jsx(Gx,{onClick:()=>{x||h(mo.sortKey,mo.sortOrder)},"data-testid":B("completed-tab-header-close-icon",p.key)})})]},p.key)})})},Jx=o.div`
1702
+ `,Mx=e=>{const{currentFooterFormId:i,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,setResetJeAccountSettingsForm:u,expenseAutomationViewSelector:d,isTransactionActivityEnabled:a,authParams:c,receiptUploadEndpoint:h,companyId:m,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,enableMonthEndInsightsZeniGPTFeature:x,monthEndInsightsPreviewMode:y,monthEndInsightsCustomerRequestData:b,allThreadsSectionOpen:S,loggedInUser:$,isCOTEnabled:v,setCurrentFooterFormId:T,onFetchRecommendationsForEntityCategorization:I,onFetchRecommendationsForEntityCategorizationWithCustomer:w,onTransactionCategorizationRowClick:k,onFetchMissingReceiptsList:j,onMissingReceiptsRowClick:C,onUploadReceiptAttachment:z,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:R,onReconTabColumnSortConfigChanged:P,onReloadReconciliationListPage:V,onUpdateReconcileTabLocalData:q,onUpdateMissingReceiptsUIState:D,onFetchTransactionCategorizationList:M,onUpdateTransactionCategorizationUIState:ae,onUpdateScrollYOffSetTransactionCategorizationUIState:F,handleJeScheduleClick:L,ignoreRecommendedJeSchedule:U,onJESchedulesFormDataChange:X,onPostJESchedule:ce,setLocalDataForCategoryAndClass:ge,resetTransactionCategorizationLocalData:te,updateSelectedVendorForTransaction:J,onSaveUpdateTransactionCategorization:ee,onUpdateSelectedCheckboxTransactionIds:H,improveMonthEndInsightsUsingZeniGPTClick:_,onRemoveFileAttachment:ne,onUpdateFileAttachment:W,onCloseAllThreadsSection:Z,onEditMonthEndInsightsClick:oe,previewMonthEndReport:K,saveMonthEndReport:N,onOpenFileAttachmentSnackBar:O,onCloseFileAttachmentSnackBar:se,onClickCustomerRequest:Y,sendMonthEndReport:G,markAsReview:je,onReloadPage:Te,updateOperatingExpensesIdsForReview:E,onFetchReimbursementView:de,updateSectionIdsForReview:$e,onUpdateFluxAnalysisUIState:Me,fetchFluxViewOnScroll:De,onFetchFluxViewList:Fe,setIsJeAccountSettingsOpened:ve,onReviewClicked:Xe,setOpenDrawerClicked:ht,onEstablishConnectionClick:et,onFetchLinkTokenClick:fe,updateReconReviewTabLocalData:_e,onReconReviewTabColumnSortConfigChanged:Vt,onSaveReconciliation:tt,onSaveReconciliationReview:pt,onReconMatchedTransactionClick:Lt,onAddStatementClick:Ee,redirectToVendorDetailPage:Ie,setActivityLogTransactionId:Ke}=e,{currentSelectedView:ye,missingReceipts:Be,transactionView:wt,selectedPeriod:yn,monthEndInsights:Qe,selectedTransactionCategorizationTab:wn,reconciliation:Cn}=d;switch(ye){case"transaction_categorization":return wt.fetchState==="Completed"&&wt.transactionLocalData.length===0?t.jsx(It,{tab:ye,title:He(ye).allDoneText.title,subTitle:He(ye).allDoneText.subTitle}):t.jsx(Lx,{setCurrentFooterFormId:T,selectedPeriod:yn,selectedTab:wn,sectionId:mn,transactionView:wt,authParams:c,isTransactionActivityEnabled:a,onUpdateTransactionCategorizationUIState:ae,onUpdateScrollYOffSetTransactionCategorizationUIState:F,onFetchTransactionCategorizationList:M,onTransactionCategorizationRowClick:k,setLocalDataForCategoryAndClass:ge,resetTransactionCategorizationLocalData:te,updateSelectedVendorForTransaction:J,onSaveUpdateTransactionCategorization:ee,onUpdateSelectedCheckboxTransactionIds:H,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,onFetchRecommendationsForEntityCategorization:I,onFetchRecommendationsForEntityCategorizationWithCustomer:w,isCOTEnabled:v,setActivityLogTransactionId:Ke,onUploadTransactionReceipt:e.onUploadTransactionReceipt});case"je_schedules":return t.jsx(Lm,{setIsJeAccountSettingsOpened:ve,expenseAutomationViewSelector:d,setResetJeAccountSettingsForm:u,currentFooterFormId:i,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,setCurrentFooterFormId:T,handleJeScheduleClick:L,ignoreRecommendedJeSchedule:U,onJESchedulesFormDataChange:X,onPostJESchedule:ce,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g});case"missing_receipts":return Be.fetchState==="Completed"&&Be.transactions.length===0?t.jsx(It,{tab:ye,title:He(ye).allDoneText.title,subTitle:He(ye).allDoneText.subTitle}):t.jsx(gg,{onUpdateMissingReceiptsUIState:D,onFetchMissingReceiptsList:j,missingReceipts:Be,receiptUploadEndpoint:h,authParams:c,selectedPeriod:yn,onMissingReceiptsRowClick:C,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:R,onUploadReceiptAttachment:z});case"month_end_insights":if(Qe!=null&&d.monthEndCloseChecksView.monthEndCloseChecks!=null){if(Qe.fetchState==="Not-Started"||Qe.fetchState==="In-Progress"||Qe.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||Qe.companyMonthEndReportTemplatesData.fetchState==="In-Progress")return t.jsx(Kl,{fetchState:"In-Progress"});{const Ct={application:"cockpit",companyId:m,entityId:m,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:Qe.companyName,url:window.location.href},{url:Yt,...Zt}=Ct,Xt={...Zt};return t.jsx(Dx,{children:t.jsx(Ug,{allThreadsSectionOpen:S,customerRequestData:b,companyId:m,enableZeniGPTFeature:x,filterMetaData:Xt,selectedPeriod:d.selectedPeriod,improveUsingZeniGPTClick:_,isZeniUser:$?.userEmail?.includes("zeni.ai")??!1,monthEndReportView:Qe,newThreadMetadata:Ct,onClickCustomerRequest:Y,onCloseAllThreadsSection:Z,onCloseFileAttachmentSnackBar:se,onOpenFileAttachmentSnackBar:O,onRemoveFileAttachment:ne,onUpdateFileAttachment:W,previewMode:y,previewMonthEndReport:K,saveMonthEndReport:N,onEditClick:oe,sendMonthEndReport:G})})}}else return null;case"flux_analysis":return d.fluxAnalysis.fetchStatus.fetchState==="Completed"&&d.fluxAnalysis.sections.generalExpense.vendors.length===0&&d.fluxAnalysis.sections.reimbursement.vendors.length===0?t.jsx(It,{tab:ye,title:He(ye).allDoneText.title,subTitle:He(ye).allDoneText.subTitle}):t.jsx(sm,{fluxAnalysis:d.fluxAnalysis,selectedPeriod:d.selectedPeriod,markAsReview:je,onReloadPage:Te,updateOperatingExpensesIdsForReview:E,updateSectionIdsForReview:$e,onUpdateFluxAnalysisUIState:Me,setCurrentFooterFormId:T,fetchFluxViewOnScroll:De,onFetchFluxViewList:Fe,onFetchReimbursementView:de,redirectToVendorDetailPage:Ie});case"reconciliation":return t.jsx(Np,{onReloadReconciliationListPage:V,currentFooterFormId:i,reconciliation:Cn,companyId:m,vendorSearchAutoCompleteActions:p,vendorSearchAutoCompleteData:g,onReviewClicked:Xe,setOpenDrawerClicked:ht,setCurrentFooterFormId:T,onReconTabColumnSortConfigChanged:P,onUpdateReconcileTabLocalData:q,onEstablishConnectionClick:et,onFetchLinkTokenClick:fe,updateReconReviewTabLocalData:_e,onReconReviewTabColumnSortConfigChanged:Vt,onSaveReconciliation:tt,onSaveReconciliationReview:pt,onReconMatchedTransactionClick:Lt,onAddStatementClick:Ee});default:return t.jsx(It,{tab:ye,title:He(ye).allDoneText.title,subTitle:He(ye).allDoneText.subTitle})}};function yl(e){const i=be(),{currentSelectedView:l}=e.expenseAutomationViewSelector,r=e.expenseAutomationViewSelector.currentSelectedView==="transaction_categorization",u=e.expenseAutomationViewSelector.currentSelectedView!=="month_end_insights"&&e.expenseAutomationViewSelector.currentSelectedView!=="flux_analysis";return t.jsx(Ex,{windowSize:i,style:{...u===!0?{paddingLeft:va.subSectionContainerLeftRightPadding.value(i),paddingRight:va.subSectionContainerLeftRightPadding.value(i)}:{paddingLeft:f[0],paddingRight:f[0]},...r===!0||l==="reconciliation"?{paddingLeft:f[0],paddingRight:f[0]}:{}},children:t.jsx(Mx,{...e})})}const Ox=70,wl=50,zx=3,Px=["receipts"],Sa=e=>Qo(e,Px),{common:{texts:{vendor:Fx,amount:_x,receipts:Bx,category:Vx,classText:Nx,date:Ux}}}=me.getLocalizedStrings(),Cl={key:"vendor",value:Fx,sortOrder:"ascending",width:new Q(18,18)},Wx={key:"category",value:Vx,sortOrder:"ascending",width:new Q(18,18)},Hx={key:"class",value:Nx,sortOrder:"ascending",width:new Q(18,18)},qx={key:"date",value:Ux,sortOrder:"descending",width:new Q(11,11)},Kx={key:"receipts",value:Bx,sortOrder:"descending",width:new Q(6,6)},bl={key:"amount",value:_x,sortOrder:"ascending",width:new Q(10,10)},ls=[Cl,Wx,Hx,qx,Kx,bl],cs=[{...Cl,width:new Q(65,65)},{...bl,width:new Q(30,30)}],mo={sortKey:"date",sortOrder:"descending"},vl=({sortConfig:e,isDisabled:i,onColumnSortConfigChanged:l})=>{const r=be(),u=Ze(),d=u?cs:ls,[a,c]=s.useState(d);s.useEffect(()=>{const p=[...d];for(const g of p)g.key===e.sortKey?g.sortOrder=e.sortOrder:g.sortOrder="ascending";c(p)},[e.sortKey,e.sortOrder,u]);const h=(p,g)=>{let x=g;e.sortKey===p&&(x=g==="ascending"?"descending":"ascending"),l(p,x)},m=p=>{Sa(p.key)==null&&h(gd(p.key),p.sortOrder)};return t.jsx(Jx,{windowSize:r,isQuickViewMode:u,children:a.map((p,g)=>{const x=i!=null||Sa(p.key)!=null;return t.jsxs(Qx,{sortDataValue:e.sortKey,actualDataValue:p.key,wrapperWidth:p.width,isSortDisabled:x,windowSize:r,isQuickViewMode:u,isLastItem:g===a.length-1,style:p.key==="receipts"?{justifyContent:"center"}:void 0,children:[t.jsxs(ef,{onClick:()=>x?null:m(p),isSortDisabled:x,children:[t.jsx(tf,{children:p.value}),x?null:t.jsx(Yx,{sortConfig:e,headerData:p,children:t.jsx(Xx,{})})]}),x?null:t.jsx(Zx,{isSortDisabled:x,sortDataValue:e.sortKey,isVisible:e.sortKey===p.key&&e.sortKey!==mo.sortKey,children:t.jsx(Gx,{onClick:()=>{x||h(mo.sortKey,mo.sortOrder)},"data-testid":B("completed-tab-header-close-icon",p.key)})})]},p.key)})})},Jx=o.div`
1703
1703
  top: ${n.sp0};
1704
1704
  left: ${n.sp0};
1705
1705
  height: ${wl}px;
@@ -1862,7 +1862,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
1862
1862
  min-height: 100%;
1863
1863
  flex-direction: column;
1864
1864
  row-gap: ${n.sp3};
1865
- `,pf=({authParams:e,fetchState:i,nextPageToken:l,sortKey:r,sortOrder:u,totalCount:d,transactionAttachmentsEndpoint:a,transactions:c,onFetchMore:h,onMissingReceiptsRowClick:m,onSortConfigChanged:p,onSortReset:g})=>{const x=be(),y=Ze(),b=s.useRef(null),S=(j,C)=>{p?.(j,C)},$=s.useCallback(j=>j<c.length,[c.length]),v=s.useCallback(()=>{l!=null&&i.fetchState!=="In-Progress"&&h(l)},[l,i.fetchState,h]),T=s.useMemo(()=>d,[d]),I=s.useMemo(()=>c.length<d?c.length+1:c.length,[c.length,d]),w=i.fetchState==="Completed"&&c.length===0,k=i.fetchState==="Not-Started"||i.fetchState==="In-Progress"&&c.length===0;return t.jsx(gf,{children:t.jsx(xf,{windowSize:x,children:w?t.jsx(It,{tab:"missing_receipts",title:We("missing_receipts").allDoneText.title,subTitle:We("missing_receipts").allDoneText.subTitle}):k?t.jsx(cf,{sortConfig:{sortKey:r??"date",sortOrder:u},fetchState:i,onColumnSortConfigChanged:S}):t.jsx(ff,{windowSize:x,children:t.jsx(Jn,{children:({height:j,width:C})=>t.jsxs(wf,{style:{height:j,width:C},children:[t.jsx(yf,{isQuickViewMode:y,children:t.jsx(vl,{sortConfig:{sortKey:r??"date",sortOrder:u},isDisabled:i.fetchState==="In-Progress"?"readonly":void 0,onColumnSortConfigChanged:S})}),t.jsx(ir,{isItemLoaded:$,itemCount:T,loadMoreItems:v,children:({onItemsRendered:z,ref:A})=>t.jsx(ql,{ref:R=>{A(R),b.current=R},height:j-wl,innerElementType:jl,itemCount:I,itemSize:Ox,width:C,style:{willChange:"auto"},overscanCount:zx,onItemsRendered:z,itemKey:R=>c[R]?.id??`loading-${R}`,itemData:{transactions:c,isItemLoaded:$,authParams:e,isQuickViewMode:y,transactionAttachmentsEndpoint:a,onMissingReceiptsRowClick:m},children:mf})})]})})})})})},mf=({index:e,style:i,data:l})=>{const{transactions:r,isItemLoaded:u,authParams:d,isQuickViewMode:a,transactionAttachmentsEndpoint:c,onMissingReceiptsRowClick:h}=l;if(u(e)===!1)return t.jsx(ja,{isQuickViewMode:a,style:{...i,width:"100%"},children:t.jsx(Cf,{})});const m=r[e];return t.jsx(ja,{isQuickViewMode:a,style:{...i,width:"100%"},children:t.jsx(of,{transaction:m,authParams:d,transactionAttachmentsEndpoint:c,onMissingReceiptsRowClick:h},m.id)})},gf=o.div`
1865
+ `,pf=({authParams:e,fetchState:i,nextPageToken:l,sortKey:r,sortOrder:u,totalCount:d,transactionAttachmentsEndpoint:a,transactions:c,onFetchMore:h,onMissingReceiptsRowClick:m,onSortConfigChanged:p,onSortReset:g})=>{const x=be(),y=Ze(),b=s.useRef(null),S=(j,C)=>{p?.(j,C)},$=s.useCallback(j=>j<c.length,[c.length]),v=s.useCallback(()=>{l!=null&&i.fetchState!=="In-Progress"&&h(l)},[l,i.fetchState,h]),T=s.useMemo(()=>d,[d]),I=s.useMemo(()=>c.length<d?c.length+1:c.length,[c.length,d]),w=i.fetchState==="Completed"&&c.length===0,k=i.fetchState==="Not-Started"||i.fetchState==="In-Progress"&&c.length===0;return t.jsx(gf,{children:t.jsx(xf,{windowSize:x,children:w?t.jsx(It,{tab:"missing_receipts",title:He("missing_receipts").allDoneText.title,subTitle:He("missing_receipts").allDoneText.subTitle}):k?t.jsx(cf,{sortConfig:{sortKey:r??"date",sortOrder:u},fetchState:i,onColumnSortConfigChanged:S}):t.jsx(ff,{windowSize:x,children:t.jsx(Jn,{children:({height:j,width:C})=>t.jsxs(wf,{style:{height:j,width:C},children:[t.jsx(yf,{isQuickViewMode:y,children:t.jsx(vl,{sortConfig:{sortKey:r??"date",sortOrder:u},isDisabled:i.fetchState==="In-Progress"?"readonly":void 0,onColumnSortConfigChanged:S})}),t.jsx(ir,{isItemLoaded:$,itemCount:T,loadMoreItems:v,children:({onItemsRendered:z,ref:A})=>t.jsx(ql,{ref:R=>{A(R),b.current=R},height:j-wl,innerElementType:jl,itemCount:I,itemSize:Ox,width:C,style:{willChange:"auto"},overscanCount:zx,onItemsRendered:z,itemKey:R=>c[R]?.id??`loading-${R}`,itemData:{transactions:c,isItemLoaded:$,authParams:e,isQuickViewMode:y,transactionAttachmentsEndpoint:a,onMissingReceiptsRowClick:m},children:mf})})]})})})})})},mf=({index:e,style:i,data:l})=>{const{transactions:r,isItemLoaded:u,authParams:d,isQuickViewMode:a,transactionAttachmentsEndpoint:c,onMissingReceiptsRowClick:h}=l;if(u(e)===!1)return t.jsx(ja,{isQuickViewMode:a,style:{...i,width:"100%"},children:t.jsx(Cf,{})});const m=r[e];return t.jsx(ja,{isQuickViewMode:a,style:{...i,width:"100%"},children:t.jsx(of,{transaction:m,authParams:d,transactionAttachmentsEndpoint:c,onMissingReceiptsRowClick:h},m.id)})},gf=o.div`
1866
1866
  display: flex;
1867
1867
  flex-direction: column;
1868
1868
  flex: 1;
@@ -1990,14 +1990,14 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
1990
1990
  min-width: 0;
1991
1991
  padding: ${n.sp0} ${n.sp5};
1992
1992
  text-align: right;
1993
- `,Of="0,0.[00]";function Ll(){return me.getLocalizedStrings().dateFormat.visual.MMMDCommaYYYYformat}function zf(e){return e.format(Ll())}function Al(e){if(e==null||String(e).trim()==="")return"";const i=String(e).trim(),l=Ll(),r=Di(i);return r!=null&&typeof r.isValid=="function"&&r.isValid()?r.format(l):i}function Pf(e){if(e==null||e==="")return"";if(!/^[A-Z]{3}$/.test(e))return e;try{return new Intl.NumberFormat("en",{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(i=>i.type==="currency")?.value??e}catch{return e}}function Rl(e,i){return Jo(Of,e,Pf(i))}const{common:{texts:{vendor:Ff,amount:_f,date:Bf}},uncategorizedTransactionList:{missingReceipt:{bulkUpload:xo}}}=me.getLocalizedStrings(),Vf=({hasCandidates:e,interactionLocked:i=!1,isLoadingMore:l,isSearching:r,manualSearchNextPageToken:u,searchResults:d,selectedTransactionId:a,onClearSelection:c,onSearch:h,onSelectionChange:m,onLoadMore:p})=>{const[g,x]=s.useState(""),y=s.useRef(null),b=s.useRef(null),S=s.useRef(!1),$=s.useCallback(w=>{const[k]=w;i!==!0&&k.isIntersecting&&u!=null&&l!==!0&&r!==!0&&p!=null&&p()},[i,l,r,u,p]);s.useEffect(()=>{const w=y.current,k=b.current;if(w==null||k==null||u==null||p==null)return;const j=new IntersectionObserver($,{root:w,rootMargin:"120px"});return j.observe(k),()=>j.disconnect()},[$,u,p,d?.length]),s.useEffect(()=>{const w=y.current,k=b.current;if(w==null||k==null||u==null||p==null){S.current=l===!0;return}const j=S.current===!0&&l!==!0;if(S.current=l===!0,!j)return;const C=w.getBoundingClientRect(),z=k.getBoundingClientRect();z.top<C.bottom&&z.bottom>C.top&&z.left<C.right&&z.right>C.left&&requestAnimationFrame(()=>{p()})},[l,u,p,d?.length]);const v=s.useCallback(w=>{i||w.key==="Enter"&&g.trim().length>=2&&h(g.trim())},[i,g,h]),T=s.useCallback(w=>{if(i)return;const k=w.target.value;x(k);const j=k.trim();j.length>=2?h(j):h("")},[i,h]),I=s.useCallback(()=>{i||(x(""),c(),h(""))},[i,c,h]);return t.jsxs(Nf,{hasCandidates:e,$interactionLocked:i,children:[t.jsx(Uf,{children:t.jsx(Qn,{children:e?xo.orSearchManually:xo.searchManually})}),t.jsxs(Hf,{children:[t.jsx(Wf,{}),t.jsx(qf,{type:"text",placeholder:xo.searchByVendorDateAmount,value:g,onChange:T,onKeyDown:v,disabled:i,"data-testid":B("manual-search-input")}),g.length>0?t.jsx(Kf,{type:"button",disabled:i,onClick:I,children:t.jsx(Jf,{})}):null]}),d!=null&&d.length>0?t.jsxs(Qf,{children:[t.jsxs(Gf,{children:[t.jsx(fo,{style:{flex:2},children:t.jsx(Ye,{children:Ff})}),t.jsx(fo,{children:t.jsx(Ye,{children:Bf})}),t.jsx(fo,{style:{textAlign:"right"},children:t.jsx(Ye,{children:_f})})]}),t.jsxs(ds,{ref:y,children:[d.map(w=>t.jsxs(Yf,{onClick:()=>{i||m(w.transactionId,w.transactionType)},"data-testid":B("search-result",w.transactionId),children:[t.jsx(Xf,{children:t.jsx(e0,{type:"radio",name:"manual-search-result",checked:a===w.transactionId,disabled:i,onChange:()=>{i||m(w.transactionId,w.transactionType)}})}),t.jsxs(Zf,{isSelected:a===w.transactionId,children:[t.jsxs(t0,{children:[t.jsx(Xn,{photoUrl:w.vendorLogo??"",styles:{width:n.sp4,height:n.sp4,borderRadius:"50%"},placeholder:{width:f[4],height:f[4]},fallbackAvatar:t.jsx(Jt,{name:w.vendorName,size:n.sp4})}),t.jsx(qe,{text:w.vendorName,maxWidth:"120px"})]}),t.jsx(n0,{children:t.jsx(ot,{children:Al(w.transactionDate)})}),t.jsx(i0,{children:t.jsx(ot,{children:Rl(w.amount,w.currencyCode)})})]})]},w.transactionId)),u!=null?t.jsx(o0,{ref:b,"aria-hidden":!0}):null]})]}):r===!0?t.jsx(kf,{}):null]})},Nf=o.div`
1993
+ `,Of="0,0.[00]";function Ll(){return me.getLocalizedStrings().dateFormat.visual.MMMDCommaYYYYformat}function zf(e){return e.format(Ll())}function Al(e){if(e==null||String(e).trim()==="")return"";const i=String(e).trim(),l=Ll(),r=Di(i);return r!=null&&typeof r.isValid=="function"&&r.isValid()?r.format(l):i}function Pf(e){if(e==null||e==="")return"";if(!/^[A-Z]{3}$/.test(e))return e;try{return new Intl.NumberFormat("en",{style:"currency",currency:e,currencyDisplay:"narrowSymbol"}).formatToParts(0).find(i=>i.type==="currency")?.value??e}catch{return e}}function Rl(e,i){return Jo(Of,e,Pf(i))}const{common:{texts:{vendor:Ff,amount:_f,date:Bf}},uncategorizedTransactionList:{missingReceipt:{bulkUpload:xo}}}=me.getLocalizedStrings(),Vf=({hasCandidates:e,interactionLocked:i=!1,isLoadingMore:l,isSearching:r,manualSearchNextPageToken:u,searchResults:d,selectedTransactionId:a,onClearSelection:c,onSearch:h,onSelectionChange:m,onLoadMore:p})=>{const[g,x]=s.useState(""),y=s.useRef(null),b=s.useRef(null),S=s.useRef(!1),$=s.useCallback(w=>{const[k]=w;i!==!0&&k.isIntersecting&&u!=null&&l!==!0&&r!==!0&&p!=null&&p()},[i,l,r,u,p]);s.useEffect(()=>{const w=y.current,k=b.current;if(w==null||k==null||u==null||p==null)return;const j=new IntersectionObserver($,{root:w,rootMargin:"120px"});return j.observe(k),()=>j.disconnect()},[$,u,p,d?.length]),s.useEffect(()=>{const w=y.current,k=b.current;if(w==null||k==null||u==null||p==null){S.current=l===!0;return}const j=S.current===!0&&l!==!0;if(S.current=l===!0,!j)return;const C=w.getBoundingClientRect(),z=k.getBoundingClientRect();z.top<C.bottom&&z.bottom>C.top&&z.left<C.right&&z.right>C.left&&requestAnimationFrame(()=>{p()})},[l,u,p,d?.length]);const v=s.useCallback(w=>{i||w.key==="Enter"&&g.trim().length>=2&&h(g.trim())},[i,g,h]),T=s.useCallback(w=>{if(i)return;const k=w.target.value;x(k);const j=k.trim();j.length>=2?h(j):h("")},[i,h]),I=s.useCallback(()=>{i||(x(""),c(),h(""))},[i,c,h]);return t.jsxs(Nf,{hasCandidates:e,$interactionLocked:i,children:[t.jsx(Uf,{children:t.jsx(Qn,{children:e?xo.orSearchManually:xo.searchManually})}),t.jsxs(Wf,{children:[t.jsx(Hf,{}),t.jsx(qf,{type:"text",placeholder:xo.searchByVendorDateAmount,value:g,onChange:T,onKeyDown:v,disabled:i,"data-testid":B("manual-search-input")}),g.length>0?t.jsx(Kf,{type:"button",disabled:i,onClick:I,children:t.jsx(Jf,{})}):null]}),d!=null&&d.length>0?t.jsxs(Qf,{children:[t.jsxs(Gf,{children:[t.jsx(fo,{style:{flex:2},children:t.jsx(Ye,{children:Ff})}),t.jsx(fo,{children:t.jsx(Ye,{children:Bf})}),t.jsx(fo,{style:{textAlign:"right"},children:t.jsx(Ye,{children:_f})})]}),t.jsxs(ds,{ref:y,children:[d.map(w=>t.jsxs(Yf,{onClick:()=>{i||m(w.transactionId,w.transactionType)},"data-testid":B("search-result",w.transactionId),children:[t.jsx(Xf,{children:t.jsx(e0,{type:"radio",name:"manual-search-result",checked:a===w.transactionId,disabled:i,onChange:()=>{i||m(w.transactionId,w.transactionType)}})}),t.jsxs(Zf,{isSelected:a===w.transactionId,children:[t.jsxs(t0,{children:[t.jsx(Xn,{photoUrl:w.vendorLogo??"",styles:{width:n.sp4,height:n.sp4,borderRadius:"50%"},placeholder:{width:f[4],height:f[4]},fallbackAvatar:t.jsx(Jt,{name:w.vendorName,size:n.sp4})}),t.jsx(qe,{text:w.vendorName,maxWidth:"120px"})]}),t.jsx(n0,{children:t.jsx(ot,{children:Al(w.transactionDate)})}),t.jsx(i0,{children:t.jsx(ot,{children:Rl(w.amount,w.currencyCode)})})]})]},w.transactionId)),u!=null?t.jsx(o0,{ref:b,"aria-hidden":!0}):null]})]}):r===!0?t.jsx(kf,{}):null]})},Nf=o.div`
1994
1994
  display: flex;
1995
1995
  flex-direction: column;
1996
1996
  gap: ${n.sp2};
1997
1997
  padding-top: ${e=>e.hasCandidates?n.sp4:n.sp0};
1998
1998
  pointer-events: ${e=>e.$interactionLocked?"none":"auto"};
1999
1999
  opacity: ${e=>e.$interactionLocked?.65:1};
2000
- `,Uf=o.div``,Hf=o.div`
2000
+ `,Uf=o.div``,Wf=o.div`
2001
2001
  display: flex;
2002
2002
  align-items: center;
2003
2003
  gap: ${n.sp1};
@@ -2006,7 +2006,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
2006
2006
  border-radius: ${n.sp2};
2007
2007
  background-color: ${e=>e.theme.colors.background};
2008
2008
  box-sizing: border-box;
2009
- `,Wf=o(Mc)`
2009
+ `,Hf=o(Mc)`
2010
2010
  width: ${n.sp3};
2011
2011
  height: ${n.sp3};
2012
2012
  color: ${e=>e.theme.colors.hero};
@@ -2026,7 +2026,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
2026
2026
  cursor: pointer;
2027
2027
  padding: 0;
2028
2028
  flex-shrink: 0;
2029
- `,Jf=o(Wo)`
2029
+ `,Jf=o(Ho)`
2030
2030
  width: ${n.sp3};
2031
2031
  height: ${n.sp3};
2032
2032
  color: ${e=>e.theme.colors.hero};
@@ -2275,7 +2275,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
2275
2275
  padding: ${n.sp0};
2276
2276
  display: flex;
2277
2277
  align-items: center;
2278
- `,Ra=o(Wo)`
2278
+ `,Ra=o(Ho)`
2279
2279
  width: ${n.sp4};
2280
2280
  height: ${n.sp4};
2281
2281
  color: ${he.neutralGrey5Light};
@@ -2295,19 +2295,19 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
2295
2295
  max-width: 100%;
2296
2296
  max-height: 100%;
2297
2297
  object-fit: contain;
2298
- `,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Da}}}=me.getLocalizedStrings(),Ma=({authParams:e,file:i,index:l,isLoadingMoreManualSearch:r,isSearching:u,manualSearchUiResetKey:d=0,isConfirmMatchInProgress:a=!1,manualSearchNextPageToken:c,manualSearchTotalCount:h,selectedTransactionId:m,onClearSelection:p,onDelete:g,onLoadMoreManualSearch:x,onSearchTransactions:y,onSelectionChange:b,searchResults:S})=>{const $=i.status==="possible_matches",v=i.status==="no_match",T=$&&i.candidates!=null&&i.candidates.length>0,I=be(),w=i.candidates?.map(C=>({amount:C.transaction.amount.amount,currencyCode:C.transaction.amount.currencySymbol||C.transaction.amount.currencyCode||"",matchScore:C.matchScore,transactionDate:zf(C.transaction.date),transactionId:C.transaction.id,transactionType:C.transaction.type??"",vendorName:C.transaction.vendorName??"",vendorLogo:C.transaction.logo?.href})),k=s.useCallback((C,z)=>{a||b(C,z)},[a,b]),j=`${i.attachmentId}-${d}`;return t.jsxs(U0,{windowSize:I,"data-testid":B("receipt-card",i.attachmentId),children:[t.jsx(H0,{children:t.jsx(W0,{children:t.jsx(A0,{authParams:e,attachmentId:i.attachmentId,attachmentTitle:`#${l+1} ${i.filename}`,fileDownloadUrl:i.fileDownloadUrl,filename:i.filename,filePreviewUrl:i.filePreviewUrl,onDeleteClick:g!=null?()=>g(i.attachmentId):void 0})})}),t.jsxs(q0,{children:[T&&w!=null?t.jsx(l0,{attachmentId:i.attachmentId,candidates:w,interactionLocked:a,selectedTransactionId:m,onSelectionChange:k}):null,v?t.jsxs(K0,{children:[t.jsx(J0,{children:t.jsx(Qn,{children:Da.noPossibleMatch})}),t.jsx(Q0,{children:t.jsx(ot,{children:Da.noMatchFound})})]}):null,$||v?t.jsx(Vf,{hasCandidates:T,interactionLocked:a,isLoadingMore:r,isSearching:u,manualSearchNextPageToken:c,manualSearchTotalCount:h,searchResults:S,selectedTransactionId:m,onClearSelection:p,onLoadMore:x,onSearch:y??(()=>{}),onSelectionChange:k},j):null]})]})},U0=o.div`
2298
+ `,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Da}}}=me.getLocalizedStrings(),Ma=({authParams:e,file:i,index:l,isLoadingMoreManualSearch:r,isSearching:u,manualSearchUiResetKey:d=0,isConfirmMatchInProgress:a=!1,manualSearchNextPageToken:c,manualSearchTotalCount:h,selectedTransactionId:m,onClearSelection:p,onDelete:g,onLoadMoreManualSearch:x,onSearchTransactions:y,onSelectionChange:b,searchResults:S})=>{const $=i.status==="possible_matches",v=i.status==="no_match",T=$&&i.candidates!=null&&i.candidates.length>0,I=be(),w=i.candidates?.map(C=>({amount:C.transaction.amount.amount,currencyCode:C.transaction.amount.currencySymbol||C.transaction.amount.currencyCode||"",matchScore:C.matchScore,transactionDate:zf(C.transaction.date),transactionId:C.transaction.id,transactionType:C.transaction.type??"",vendorName:C.transaction.vendorName??"",vendorLogo:C.transaction.logo?.href})),k=s.useCallback((C,z)=>{a||b(C,z)},[a,b]),j=`${i.attachmentId}-${d}`;return t.jsxs(U0,{windowSize:I,"data-testid":B("receipt-card",i.attachmentId),children:[t.jsx(W0,{children:t.jsx(H0,{children:t.jsx(A0,{authParams:e,attachmentId:i.attachmentId,attachmentTitle:`#${l+1} ${i.filename}`,fileDownloadUrl:i.fileDownloadUrl,filename:i.filename,filePreviewUrl:i.filePreviewUrl,onDeleteClick:g!=null?()=>g(i.attachmentId):void 0})})}),t.jsxs(q0,{children:[T&&w!=null?t.jsx(l0,{attachmentId:i.attachmentId,candidates:w,interactionLocked:a,selectedTransactionId:m,onSelectionChange:k}):null,v?t.jsxs(K0,{children:[t.jsx(J0,{children:t.jsx(Qn,{children:Da.noPossibleMatch})}),t.jsx(Q0,{children:t.jsx(ot,{children:Da.noMatchFound})})]}):null,$||v?t.jsx(Vf,{hasCandidates:T,interactionLocked:a,isLoadingMore:r,isSearching:u,manualSearchNextPageToken:c,manualSearchTotalCount:h,searchResults:S,selectedTransactionId:m,onClearSelection:p,onLoadMore:x,onSearch:y??(()=>{}),onSelectionChange:k},j):null]})]})},U0=o.div`
2299
2299
  display: grid;
2300
2300
  grid-template-columns: ${e=>e.windowSize==="small"?"1fr":"1fr 1fr"};
2301
2301
  grid-template-rows: ${e=>e.windowSize==="small"?"1fr 1fr 1fr 1fr":"auto"};
2302
2302
  align-items: start;
2303
2303
  gap: ${n.sp4};
2304
2304
  min-width: 0;
2305
- `,H0=o.div`
2305
+ `,W0=o.div`
2306
2306
  display: flex;
2307
2307
  flex-direction: column;
2308
2308
  min-width: 0;
2309
2309
  max-width: 94%;
2310
- `,W0=o.div`
2310
+ `,H0=o.div`
2311
2311
  display: flex;
2312
2312
  flex-direction: column;
2313
2313
  width: 100%;
@@ -2393,7 +2393,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
2393
2393
  gap: ${n.sp5};
2394
2394
  min-width: 0;
2395
2395
  margin-top: ${n.sp8};
2396
- `,sy=e=>s.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M22.7737 11.8149C22.781 14.6922 21.6539 17.4563 19.6368 19.5081C17.6197 21.5598 14.8751 22.7338 11.9982 22.7756C10.5931 22.7967 9.19783 22.5387 7.89323 22.0165C6.58864 21.4942 5.40071 20.7182 4.39835 19.7333C3.39598 18.7484 2.59913 17.5743 2.05399 16.2791C1.50886 14.9839 1.2263 13.5934 1.2227 12.1882C1.21466 9.31044 2.34142 6.54556 4.35861 4.49316C6.3758 2.44076 9.12077 1.26633 11.9982 1.22458C13.4035 1.20356 14.799 1.46178 16.1037 1.98426C17.4084 2.50673 18.5964 3.28306 19.5988 4.26821C20.6012 5.25337 21.398 6.42774 21.943 7.72322C22.488 9.0187 22.7704 10.4095 22.7737 11.8149Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M12 13.8571V7",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M11.9902 16.8164C11.9582 16.8169 11.9266 16.8238 11.8972 16.8367C11.8679 16.8496 11.8415 16.8682 11.8195 16.8915C11.7975 16.9148 11.7804 16.9423 11.7691 16.9723C11.7579 17.0023 11.7528 17.0342 11.7541 17.0662C11.7564 17.1305 11.7835 17.1914 11.8297 17.2361C11.8759 17.2809 11.9376 17.306 12.0019 17.3062C12.0339 17.3056 12.0655 17.2986 12.0947 17.2856C12.124 17.2727 12.1504 17.254 12.1723 17.2308C12.1943 17.2075 12.2114 17.1801 12.2227 17.1502C12.234 17.1203 12.2392 17.0884 12.238 17.0564C12.2361 16.9935 12.2103 16.9338 12.1659 16.8892C12.1215 16.8446 12.0619 16.8186 11.999 16.8164H11.9941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Oa}}}=me.getLocalizedStrings(),ay=({authParams:e,unmatchedFiles:i,pastUnmatchedFiles:l,hasMoreBatchDetails:r,isLoading:u,isLoadingMore:d,isLoadingMoreManualSearch:a,isSearching:c,manualSearchNextPageToken:h,manualSearchTotalCount:m,manualSearchUiResetKey:p=0,isConfirmMatchInProgress:g=!1,pendingMatchAttachmentId:x,pendingMatchTransactionId:y,onDelete:b,onLoadMoreBatchDetails:S,onLoadMoreManualSearch:$,onPendingMatchChange:v,onSearchTransactions:T,manualSearchResultsAttachmentId:I,scrollRoot:w,searchResults:k})=>{const j=s.useRef(null),C=s.useRef(!1),[z,A]=s.useState(null),R=I??z,P=s.useCallback((L,U)=>{g||(U.trim().length>=2&&A(L),T?.(U))},[g,T]);s.useEffect(()=>{I==null&&(k?.length??0)===0&&c!==!0&&A(null)},[k,c,I]);const V=s.useCallback(L=>{const[U]=L;U.isIntersecting&&r===!0&&d!==!0&&S?.()},[r,d,S]);if(s.useEffect(()=>{if(u===!0||w==null)return;const L=j.current;if(L==null)return;const U=new IntersectionObserver(V,{root:w,rootMargin:"200px"});return U.observe(L),()=>U.disconnect()},[V,u,w]),s.useEffect(()=>{if(u===!0||w==null||r!==!0){C.current=d===!0;return}const L=C.current===!0&&d!==!0;if(C.current=d===!0,!L)return;const U=j.current;if(U==null)return;const X=w.getBoundingClientRect(),ce=U.getBoundingClientRect();ce.top<X.bottom&&ce.bottom>X.top&&ce.left<X.right&&ce.right>X.left&&requestAnimationFrame(()=>{S?.()})},[u,d,r,w,S]),u===!0)return t.jsx(G0,{});const q=i.length>0,D=l!=null&&l.length>0;if(!q&&!D&&r!==!0&&d!==!0){const{title:L,subTitle:U}=We("missing_receipts").allDoneText;return t.jsx(ry,{children:t.jsx(cy,{children:t.jsx(It,{tab:"missing_receipts",title:L,subTitle:U})})})}const M=D,ae=Oa.unmatchedReceipts.replace("__count__",i.length.toString()),F=i.length>0;return t.jsxs(ly,{children:[F?t.jsxs(hy,{children:[t.jsx(za,{"aria-hidden":!0}),t.jsx(py,{children:ae})]}):null,t.jsx(dy,{children:t.jsxs(uy,{children:[i.length>0?t.jsx(Pa,{children:i.map((L,U)=>t.jsx(Ma,{authParams:e,file:L,index:U,isLoadingMoreManualSearch:a,isSearching:c===!0&&R===L.attachmentId,manualSearchNextPageToken:h,manualSearchTotalCount:m,selectedTransactionId:x===L.attachmentId?y:null,onClearSelection:()=>v(null),onDelete:b,onLoadMoreManualSearch:$,onSearchTransactions:T!=null?X=>P(L.attachmentId,X):void 0,onSelectionChange:(X,ce)=>{g||v({batchId:L.batchId,attachmentId:L.attachmentId,fileName:L.filename,transactionId:X,transactionType:ce})},searchResults:R===L.attachmentId?k:void 0,manualSearchUiResetKey:p,isConfirmMatchInProgress:g},`${L.batchId}-${L.attachmentId}`))}):null,M?t.jsxs(t.Fragment,{children:[t.jsxs(my,{children:[t.jsx(za,{"aria-hidden":!0}),t.jsx(gy,{children:Oa.pastUnmatchedReceipts.replace("__count__",l.length.toString())})]}),t.jsx(Pa,{children:l.map((L,U)=>t.jsx(Ma,{authParams:e,file:L,index:i.length+U,isLoadingMoreManualSearch:a,isSearching:c===!0&&R===L.attachmentId,manualSearchNextPageToken:h,manualSearchTotalCount:m,selectedTransactionId:x===L.attachmentId?y:null,onClearSelection:()=>v(null),onDelete:b,onLoadMoreManualSearch:$,onSearchTransactions:T!=null?X=>P(L.attachmentId,X):void 0,onSelectionChange:(X,ce)=>{g||v({batchId:L.batchId,attachmentId:L.attachmentId,fileName:L.filename,transactionId:X,transactionType:ce})},searchResults:R===L.attachmentId?k:void 0,manualSearchUiResetKey:p,isConfirmMatchInProgress:g},`${L.batchId}-${L.attachmentId}`))})]}):null,t.jsx(xy,{ref:j}),d===!0?t.jsx(fy,{children:t.jsx(Kn,{size:"Small",start:!0})}):null]})})]})},ry=o.div`
2396
+ `,sy=e=>s.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M22.7737 11.8149C22.781 14.6922 21.6539 17.4563 19.6368 19.5081C17.6197 21.5598 14.8751 22.7338 11.9982 22.7756C10.5931 22.7967 9.19783 22.5387 7.89323 22.0165C6.58864 21.4942 5.40071 20.7182 4.39835 19.7333C3.39598 18.7484 2.59913 17.5743 2.05399 16.2791C1.50886 14.9839 1.2263 13.5934 1.2227 12.1882C1.21466 9.31044 2.34142 6.54556 4.35861 4.49316C6.3758 2.44076 9.12077 1.26633 11.9982 1.22458C13.4035 1.20356 14.799 1.46178 16.1037 1.98426C17.4084 2.50673 18.5964 3.28306 19.5988 4.26821C20.6012 5.25337 21.398 6.42774 21.943 7.72322C22.488 9.0187 22.7704 10.4095 22.7737 11.8149Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M12 13.8571V7",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M11.9902 16.8164C11.9582 16.8169 11.9266 16.8238 11.8972 16.8367C11.8679 16.8496 11.8415 16.8682 11.8195 16.8915C11.7975 16.9148 11.7804 16.9423 11.7691 16.9723C11.7579 17.0023 11.7528 17.0342 11.7541 17.0662C11.7564 17.1305 11.7835 17.1914 11.8297 17.2361C11.8759 17.2809 11.9376 17.306 12.0019 17.3062C12.0339 17.3056 12.0655 17.2986 12.0947 17.2856C12.124 17.2727 12.1504 17.254 12.1723 17.2308C12.1943 17.2075 12.2114 17.1801 12.2227 17.1502C12.234 17.1203 12.2392 17.0884 12.238 17.0564C12.2361 16.9935 12.2103 16.9338 12.1659 16.8892C12.1215 16.8446 12.0619 16.8186 11.999 16.8164H11.9941",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Oa}}}=me.getLocalizedStrings(),ay=({authParams:e,unmatchedFiles:i,pastUnmatchedFiles:l,hasMoreBatchDetails:r,isLoading:u,isLoadingMore:d,isLoadingMoreManualSearch:a,isSearching:c,manualSearchNextPageToken:h,manualSearchTotalCount:m,manualSearchUiResetKey:p=0,isConfirmMatchInProgress:g=!1,pendingMatchAttachmentId:x,pendingMatchTransactionId:y,onDelete:b,onLoadMoreBatchDetails:S,onLoadMoreManualSearch:$,onPendingMatchChange:v,onSearchTransactions:T,manualSearchResultsAttachmentId:I,scrollRoot:w,searchResults:k})=>{const j=s.useRef(null),C=s.useRef(!1),[z,A]=s.useState(null),R=I??z,P=s.useCallback((L,U)=>{g||(U.trim().length>=2&&A(L),T?.(U))},[g,T]);s.useEffect(()=>{I==null&&(k?.length??0)===0&&c!==!0&&A(null)},[k,c,I]);const V=s.useCallback(L=>{const[U]=L;U.isIntersecting&&r===!0&&d!==!0&&S?.()},[r,d,S]);if(s.useEffect(()=>{if(u===!0||w==null)return;const L=j.current;if(L==null)return;const U=new IntersectionObserver(V,{root:w,rootMargin:"200px"});return U.observe(L),()=>U.disconnect()},[V,u,w]),s.useEffect(()=>{if(u===!0||w==null||r!==!0){C.current=d===!0;return}const L=C.current===!0&&d!==!0;if(C.current=d===!0,!L)return;const U=j.current;if(U==null)return;const X=w.getBoundingClientRect(),ce=U.getBoundingClientRect();ce.top<X.bottom&&ce.bottom>X.top&&ce.left<X.right&&ce.right>X.left&&requestAnimationFrame(()=>{S?.()})},[u,d,r,w,S]),u===!0)return t.jsx(G0,{});const q=i.length>0,D=l!=null&&l.length>0;if(!q&&!D&&r!==!0&&d!==!0){const{title:L,subTitle:U}=He("missing_receipts").allDoneText;return t.jsx(ry,{children:t.jsx(cy,{children:t.jsx(It,{tab:"missing_receipts",title:L,subTitle:U})})})}const M=D,ae=Oa.unmatchedReceipts.replace("__count__",i.length.toString()),F=i.length>0;return t.jsxs(ly,{children:[F?t.jsxs(hy,{children:[t.jsx(za,{"aria-hidden":!0}),t.jsx(py,{children:ae})]}):null,t.jsx(dy,{children:t.jsxs(uy,{children:[i.length>0?t.jsx(Pa,{children:i.map((L,U)=>t.jsx(Ma,{authParams:e,file:L,index:U,isLoadingMoreManualSearch:a,isSearching:c===!0&&R===L.attachmentId,manualSearchNextPageToken:h,manualSearchTotalCount:m,selectedTransactionId:x===L.attachmentId?y:null,onClearSelection:()=>v(null),onDelete:b,onLoadMoreManualSearch:$,onSearchTransactions:T!=null?X=>P(L.attachmentId,X):void 0,onSelectionChange:(X,ce)=>{g||v({batchId:L.batchId,attachmentId:L.attachmentId,fileName:L.filename,transactionId:X,transactionType:ce})},searchResults:R===L.attachmentId?k:void 0,manualSearchUiResetKey:p,isConfirmMatchInProgress:g},`${L.batchId}-${L.attachmentId}`))}):null,M?t.jsxs(t.Fragment,{children:[t.jsxs(my,{children:[t.jsx(za,{"aria-hidden":!0}),t.jsx(gy,{children:Oa.pastUnmatchedReceipts.replace("__count__",l.length.toString())})]}),t.jsx(Pa,{children:l.map((L,U)=>t.jsx(Ma,{authParams:e,file:L,index:i.length+U,isLoadingMoreManualSearch:a,isSearching:c===!0&&R===L.attachmentId,manualSearchNextPageToken:h,manualSearchTotalCount:m,selectedTransactionId:x===L.attachmentId?y:null,onClearSelection:()=>v(null),onDelete:b,onLoadMoreManualSearch:$,onSearchTransactions:T!=null?X=>P(L.attachmentId,X):void 0,onSelectionChange:(X,ce)=>{g||v({batchId:L.batchId,attachmentId:L.attachmentId,fileName:L.filename,transactionId:X,transactionType:ce})},searchResults:R===L.attachmentId?k:void 0,manualSearchUiResetKey:p,isConfirmMatchInProgress:g},`${L.batchId}-${L.attachmentId}`))})]}):null,t.jsx(xy,{ref:j}),d===!0?t.jsx(fy,{children:t.jsx(Kn,{size:"Small",start:!0})}):null]})})]})},ry=o.div`
2397
2397
  display: flex;
2398
2398
  flex-direction: column;
2399
2399
  flex: 1;
@@ -2630,7 +2630,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
2630
2630
  color: ${e=>e.theme.colors.primary};
2631
2631
  `,zy=o.input`
2632
2632
  display: none;
2633
- `,Py=e=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:1088,height:56,viewBox:"0 0 1088 56",fill:"none",preserveAspectRatio:"none",...e},s.createElement("rect",{x:.5,y:.5,width:1087,height:55,rx:8,ry:8,fill:"none",stroke:"currentColor",strokeWidth:1,strokeDasharray:"8 8",vectorEffect:"non-scaling-stroke"})),Na="receipts@zeni.ai",Fy=2e3,_y=400,By=1200,Vy=2e3,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Si}},common:{copyToClipBoard:ki}}=me.getLocalizedStrings(),Ny=({onFilesSelected:e})=>{const i=s.useRef(null),[l,r]=s.useState(!1),[u,d]=s.useState(0),[a,c]=s.useState(!1),[h,m]=s.useState(0),[p,g]=s.useState(!1);s.useEffect(()=>{const v=window.setInterval(()=>{d(T=>{const I=(T+1)%3;return T===2&&I===0&&c(!0),I})},Fy);return()=>window.clearInterval(v)},[]),s.useEffect(()=>{if(!a)return;const v=requestAnimationFrame(()=>{c(!1)});return()=>cancelAnimationFrame(v)},[a]),s.useEffect(()=>{if(u===1){g(!1),m(360);return}g(!0),m(0);const v=requestAnimationFrame(()=>{g(!1)});return()=>cancelAnimationFrame(v)},[u]);const x=s.useCallback(v=>{v.stopPropagation(),navigator.clipboard.writeText(Na).then(()=>{r(!0),setTimeout(()=>r(!1),Vy)})},[]),y=s.useCallback(()=>{i.current?.click()},[]),b=s.useCallback(v=>{v.preventDefault(),v.stopPropagation();const T=[],{files:I}=v.dataTransfer;for(let w=0;w<I.length;w+=1){const k=I.item(w);if(k==null)continue;const j=String(k.type);if(us.some(C=>C===j)===!0&&(T.push(k),T.length>=Dn))break}T.length>0&&e(T)},[e]),S=s.useCallback(v=>{v.preventDefault()},[]),$=()=>t.jsxs(Jy,{children:[t.jsx(Ua,{children:Si.emailBannerUploadLead}),t.jsx(Bo,{children:Si.emailBannerUploadSuffix}),t.jsxs(Qy,{children:[t.jsx(Ky,{children:Na}),t.jsx(xe,{display:"inline-flex",placement:"top",title:l?ki.copied:ki.copy,enterDelay:300,leaveDelay:0,children:t.jsx(Gy,{type:"button","aria-label":l?ki.copied:ki.copy,onClick:x,children:l?t.jsx(Zy,{}):t.jsx(Yy,{})})})]})]});return t.jsxs(Hy,{onClick:y,onDrop:b,onDragOver:S,children:[t.jsx(Uy,{"aria-hidden":!0,children:t.jsx(Py,{})}),t.jsx(Wy,{children:t.jsxs(qy,{$phase:u,$skipTransition:a,children:[t.jsx(bo,{children:$()}),t.jsx(bo,{children:t.jsxs(Xy,{children:[t.jsx(e2,{$deg:h,$skipTransition:p,"aria-hidden":!0,children:t.jsx(t2,{})}),t.jsx(Ua,{children:Si.emailBannerAiLead}),t.jsx(Bo,{children:Si.emailBannerAiTail})]})}),t.jsx(bo,{children:$()})]})}),t.jsx(n2,{ref:i,type:"file",multiple:!0,accept:Ml,onClick:v=>v.stopPropagation(),onChange:v=>{const T=v.target.files?Array.from(v.target.files):[];T.length>0&&e(T.slice(0,Dn)),v.target.value=""}})]})},Uy=o.div`
2633
+ `,Py=e=>s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:1088,height:56,viewBox:"0 0 1088 56",fill:"none",preserveAspectRatio:"none",...e},s.createElement("rect",{x:.5,y:.5,width:1087,height:55,rx:8,ry:8,fill:"none",stroke:"currentColor",strokeWidth:1,strokeDasharray:"8 8",vectorEffect:"non-scaling-stroke"})),Na="receipts@zeni.ai",Fy=2e3,_y=400,By=1200,Vy=2e3,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:Si}},common:{copyToClipBoard:ki}}=me.getLocalizedStrings(),Ny=({onFilesSelected:e})=>{const i=s.useRef(null),[l,r]=s.useState(!1),[u,d]=s.useState(0),[a,c]=s.useState(!1),[h,m]=s.useState(0),[p,g]=s.useState(!1);s.useEffect(()=>{const v=window.setInterval(()=>{d(T=>{const I=(T+1)%3;return T===2&&I===0&&c(!0),I})},Fy);return()=>window.clearInterval(v)},[]),s.useEffect(()=>{if(!a)return;const v=requestAnimationFrame(()=>{c(!1)});return()=>cancelAnimationFrame(v)},[a]),s.useEffect(()=>{if(u===1){g(!1),m(360);return}g(!0),m(0);const v=requestAnimationFrame(()=>{g(!1)});return()=>cancelAnimationFrame(v)},[u]);const x=s.useCallback(v=>{v.stopPropagation(),navigator.clipboard.writeText(Na).then(()=>{r(!0),setTimeout(()=>r(!1),Vy)})},[]),y=s.useCallback(()=>{i.current?.click()},[]),b=s.useCallback(v=>{v.preventDefault(),v.stopPropagation();const T=[],{files:I}=v.dataTransfer;for(let w=0;w<I.length;w+=1){const k=I.item(w);if(k==null)continue;const j=String(k.type);if(us.some(C=>C===j)===!0&&(T.push(k),T.length>=Dn))break}T.length>0&&e(T)},[e]),S=s.useCallback(v=>{v.preventDefault()},[]),$=()=>t.jsxs(Jy,{children:[t.jsx(Ua,{children:Si.emailBannerUploadLead}),t.jsx(Bo,{children:Si.emailBannerUploadSuffix}),t.jsxs(Qy,{children:[t.jsx(Ky,{children:Na}),t.jsx(xe,{display:"inline-flex",placement:"top",title:l?ki.copied:ki.copy,enterDelay:300,leaveDelay:0,children:t.jsx(Gy,{type:"button","aria-label":l?ki.copied:ki.copy,onClick:x,children:l?t.jsx(Zy,{}):t.jsx(Yy,{})})})]})]});return t.jsxs(Wy,{onClick:y,onDrop:b,onDragOver:S,children:[t.jsx(Uy,{"aria-hidden":!0,children:t.jsx(Py,{})}),t.jsx(Hy,{children:t.jsxs(qy,{$phase:u,$skipTransition:a,children:[t.jsx(bo,{children:$()}),t.jsx(bo,{children:t.jsxs(Xy,{children:[t.jsx(e2,{$deg:h,$skipTransition:p,"aria-hidden":!0,children:t.jsx(t2,{})}),t.jsx(Ua,{children:Si.emailBannerAiLead}),t.jsx(Bo,{children:Si.emailBannerAiTail})]})}),t.jsx(bo,{children:$()})]})}),t.jsx(n2,{ref:i,type:"file",multiple:!0,accept:Ml,onClick:v=>v.stopPropagation(),onChange:v=>{const T=v.target.files?Array.from(v.target.files):[];T.length>0&&e(T.slice(0,Dn)),v.target.value=""}})]})},Uy=o.div`
2634
2634
  position: absolute;
2635
2635
  inset: 0;
2636
2636
  z-index: 0;
@@ -2644,7 +2644,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
2644
2644
  width: 100%;
2645
2645
  height: 100%;
2646
2646
  }
2647
- `,Hy=o.div`
2647
+ `,Wy=o.div`
2648
2648
  position: relative;
2649
2649
  display: flex;
2650
2650
  align-items: center;
@@ -2664,7 +2664,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
2664
2664
  position: relative;
2665
2665
  z-index: 1;
2666
2666
  }
2667
- `,Wy=o.div`
2667
+ `,Hy=o.div`
2668
2668
  flex: 1;
2669
2669
  min-width: 0;
2670
2670
  height: ${n.sp4};
@@ -2771,7 +2771,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
2771
2771
  text-align: center;
2772
2772
  padding: ${n.sp4} ${n.sp4};
2773
2773
  color: ${e=>e.theme.colors.hero};
2774
- `,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:vo}}}=me.getLocalizedStrings(),ji=3e4,Ha=3e4,So=99;function a2(e){if(e<=ji)return e/ji*So;if(e<=ji+Ha){const i=e-ji;return So+i/Ha*(100-So)}return 100}const r2=({fileCount:e,percentage:i=0})=>{const[l,r]=s.useState(0);s.useEffect(()=>{const a=performance.now(),c=()=>{const m=performance.now()-a;r(a2(m))};c();const h=window.setInterval(c,100);return()=>window.clearInterval(h)},[]);const u=Math.min(100,Math.max(l,i)),d=Dl(vo.uploadingReceipts,e,vo.receiptWordSingular,vo.receiptWordPlural);return t.jsxs(l2,{children:[t.jsx(c2,{children:t.jsx(d2,{style:{width:`${u}%`}})}),t.jsx(u2,{children:t.jsx(h2,{children:d})})]})},l2=o.div`
2774
+ `,{uncategorizedTransactionList:{missingReceipt:{bulkUpload:vo}}}=me.getLocalizedStrings(),ji=3e4,Wa=3e4,So=99;function a2(e){if(e<=ji)return e/ji*So;if(e<=ji+Wa){const i=e-ji;return So+i/Wa*(100-So)}return 100}const r2=({fileCount:e,percentage:i=0})=>{const[l,r]=s.useState(0);s.useEffect(()=>{const a=performance.now(),c=()=>{const m=performance.now()-a;r(a2(m))};c();const h=window.setInterval(c,100);return()=>window.clearInterval(h)},[]);const u=Math.min(100,Math.max(l,i)),d=Dl(vo.uploadingReceipts,e,vo.receiptWordSingular,vo.receiptWordPlural);return t.jsxs(l2,{children:[t.jsx(c2,{children:t.jsx(d2,{style:{width:`${u}%`}})}),t.jsx(u2,{children:t.jsx(h2,{children:d})})]})},l2=o.div`
2775
2775
  position: relative;
2776
2776
  display: flex;
2777
2777
  align-items: center;
@@ -2798,11 +2798,11 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
2798
2798
  padding: 0 ${n.sp3};
2799
2799
  `,h2=o(Re)`
2800
2800
  color: ${he.success};
2801
- `,Wa=({bulkUploadPhase:e,isDraggingFiles:i,isUploading:l,matchingProgressBannerTotal:r,onFilesSelected:u,policyDescription:d,showEmailOrDropZone:a,uploadError:c,uploadFileCount:h,uploadProgressPercent:m})=>t.jsxs(p2,{children:[l?t.jsx(r2,{fileCount:h,percentage:m}):null,c!=null&&!l?t.jsx(m2,{children:c}):null,e==="matching"?t.jsx(vy,{total:r}):null,t.jsx(i2,{isDraggingFiles:i,onFilesSelected:u,policyDescription:d,showEmailOrDropZone:a})]}),p2=o.div`
2801
+ `,Ha=({bulkUploadPhase:e,isDraggingFiles:i,isUploading:l,matchingProgressBannerTotal:r,onFilesSelected:u,policyDescription:d,showEmailOrDropZone:a,uploadError:c,uploadFileCount:h,uploadProgressPercent:m})=>t.jsxs(p2,{children:[l?t.jsx(r2,{fileCount:h,percentage:m}):null,c!=null&&!l?t.jsx(m2,{children:c}):null,e==="matching"?t.jsx(vy,{total:r}):null,t.jsx(i2,{isDraggingFiles:i,onFilesSelected:u,policyDescription:d,showEmailOrDropZone:a})]}),p2=o.div`
2802
2802
  display: flex;
2803
2803
  flex-direction: column;
2804
2804
  width: 100%;
2805
- `,m2=o(Wl)`
2805
+ `,m2=o(Hl)`
2806
2806
  padding: ${n.sp2} ${n.sp3};
2807
2807
  margin: ${n.sp2} ${n.sp0} ${n.sp0};
2808
2808
  background-color: ${he.importantLight};
@@ -2868,7 +2868,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
2868
2868
  width: 100%;
2869
2869
  padding-left: ${n.sp0};
2870
2870
  }
2871
- `,Ka=o(Hl)`
2871
+ `,Ka=o(Wl)`
2872
2872
  height: ${n.sp3};
2873
2873
  width: ${n.sp3};
2874
2874
  cursor: pointer;
@@ -2878,7 +2878,7 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
2878
2878
  width: ${n.sp3};
2879
2879
  cursor: pointer;
2880
2880
  color: inherit;
2881
- `,{common:{footer:ze,texts:{maxLimitReached:T2,confirmAction:L2},headers:zl,create:A2,strings:Hn,texts:Rn,cancel:R2,confirm:E2,monthsByIndex:D2},dateFormat:{visual:{MMMDCommaYYYYformat:Qa}},expenseAutomation:En,uncategorizedTransactionList:{missingReceipt:{bulkUpload:Ga}}}=me.getLocalizedStrings(),M2=({setActivityLogTransactionId:e})=>{const{selectedTransactionId:i}=zi(),l=Tt(),[r,u]=s.useState(!1);return i==null?null:t.jsx(xe,{title:En.transactions.header.activity,placement:"bottom",children:t.jsx(X2,{onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),onClick:d=>{d.stopPropagation(),e(i)},children:t.jsx(ew,{style:{color:r?l.colors.primary:l.colors.hero}})})})},Cw=e=>{const{expenseAutomationViewSelector:i,isDisabled:l,isRealtimeInsightsFeatureEnabled:r,isUncategorizedExpenseCategoryEnabled:u,isCOTEnabled:d,onUpdateTab:a,onReconTabUpdate:c,onUpdateStep:h,onSearchTextChanged:m,onRefresh:p,onClose:g,onBack:x,onBulkUploadConfirmMatchAcknowledged:y,onClearMissingReceiptsTabNavigation:b,closeSidePanel:S,initialMissingReceiptsTab:$,resetTransactionCategorizationLocalData:v,updateOperatingExpensesIdsForReview:T,clearJeScheduleLocalData:I,onSaveReconciliation:w}=e,k=e.bulkUploadEndpoint!=null||e.onBulkUploadFiles!=null,j=S2({authParams:e.authParams,bulkUploadEndpoint:e.bulkUploadEndpoint,onBulkUploadProgress:e.onBulkUploadProgress,onBulkUploadSuccess:e.onBulkUploadSuccess,onBulkUploadFilesFallback:e.onBulkUploadFiles}),{currentSelectedView:C,allSteps:z,missingReceipts:A,jeSchedules:R,fluxAnalysis:P,monthEndInsights:V,transactionView:q,selectedTransactionCategorizationTab:D,reconciliation:M,selectedPeriod:ae}=i,{pendingMissingReceiptsTabNavigation:F}=A,[L,U]=s.useState("expenseAutomationPage"),[X,ce]=s.useState(()=>{}),[ge,te]=s.useState(!1),J=be(),ee=!!e.loggedInUser?.userEmail?.includes("zeni.ai"),W=ee?er:tr,{openThread:_,setOpenThread:ne}=s.useContext(W),[H,Z]=s.useState(!1),[oe,K]=s.useState(!1),[N,O]=s.useState($??"missing"),se=s.useRef(null);s.useEffect(()=>{const Ae=se.current;Ae!==null&&Ae!==N&&S?.(),se.current=N},[N,S]);const Y=s.useCallback(Ae=>{O(Ae)},[]),[G,je]=s.useState(null),Te=s.useCallback(Ae=>{je(Ae),U(Ae!=null?"expenseAutomationMissingReceipts":"expenseAutomationPage")},[U]),E=e.bulkUploadSelector?.confirmMatchStatus.fetchState,de=s.useRef(void 0);s.useEffect(()=>{de.current==="In-Progress"&&E==="Completed"&&G!=null&&(Te(null),y?.()),de.current=E},[E,G,Te,y]),s.useEffect(()=>{N!=="unmatched"&&Te(null)},[N,Te]),s.useEffect(()=>{F==="unmatched"&&(k&&Y("unmatched"),b?.())},[F,b,k,Y]),s.useEffect(()=>{k===!1&&(N==="unmatched"||N==="completed")&&Y("missing")},[k,N,Y]);const $e=z.find(Ae=>Ae.step===C),{nextStep:Me,previousStep:De}=P2(z,C),{uiState:{searchString:Fe,pageToken:ve},totalCountByTab:Xe,transactions:ht,fetchStateByTransactionTabs:et,transactionLocalData:fe}=q,{selectedReconAccount:_e,reconciliationTabsState:{reconcile:{localData:{selectedTransactionIds:Vt}}}}=M;let tt="Not-Started",pt="complete";switch(C){case"missing_receipts":tt=A.refreshStatus.fetchState,pt=A.completionStatus;break;case"je_schedules":tt=R.refreshStatus.fetchState,pt=R.completionStatus;break;case"month_end_insights":V!=null&&(tt=V?.fetchState);break;case"flux_analysis":tt=P.refreshStatus.fetchState,pt=P.completionStatus;break;case"transaction_categorization":tt=q.refreshStatus.fetchState,pt=q.completionStatus;break;case"reconciliation":_e==null?(tt=M.refreshStatus.fetchState,pt=M.completionStatus):(tt=M.selectedReconAccount?.refreshStatus.fetchState??"Not-Started",pt=M.completionStatus)}const Lt=()=>{X()},{saveStatus:Ee,selectedCheckBoxTransactionIds:Ie}=q,Ke=()=>{const Ae=Zr(i.fluxAnalysis.sections,i.fluxAnalysis.reviewOperatingExpensesIds),rt=Ki(),{month:At,year:ri}=ae,bt=Ki().set("month",At-1).set("year",ri).endOf("month");switch(L){case"expenseAutomationFluxPage":return{formId:"expenseAutomationFluxPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Ae===!0?ze.markAsReviewed:Rn.undo,style:{justifyContent:"space-evenly"},isLoading:i.fluxAnalysis.bulkReviewStatus.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:ko(i.fluxAnalysis.reviewOperatingExpensesIds.length,Pr,J,Rn.vendor,C),cancelBtn:{label:ze.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{T([])}}};case"expenseAutomationTransactionsPage":return{formId:"expenseAutomationTransactionsPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:ze.save,style:{minWidth:"96px",justifyContent:"space-evenly"},isLoading:Ee.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:ko(Ie.length,qn,J,Rn.transaction,C),cancelBtn:{label:ze.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{v(D,ht.map(nn=>nn.id),ae,!1,Xe[D],ws(fe,D),u,ve)}}};case"expenseAutomationJESchedulePage":return{formId:"expenseAutomationJESchedulePage",nextBtnLabel:ze.next,backBtnLabel:ze.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:ze.next,style:{justifyContent:"space-evenly"},isDisabled:l||$e?.isNextDisabled,suffixIcon:t.jsx(Ka,{}),onClick:()=>{h(Me.step)}},cancelBtn:{label:ze.back,isDisabled:l||$e?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Ja,{}),onClick:()=>{h(De.step)}}};case"expenseAutomationBankReconReconcilePage":return{formId:"expenseAutomationBankReconReconcilePage",nextBtnLabel:ze.reconcile,backBtnLabel:ze.saveForLater,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:ze.reconcile,onClick:()=>{w({reconcileAction:"reconcile"})},isDisabled:!(M.reconciliationTabsState.balances.variance.amount===0&&rt.isAfter(bt)),isLoading:M.actionFetchStates.reconcileFetch.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:132}},leftSideComponent:ko(Vt.length,1/0,J,Rn.transaction,C),cancelBtn:{onClick:()=>{w({reconcileAction:"save_reconcile_for_later"})},reverseSpinnerColor:!1,isLoading:M.actionFetchStates.saveForLaterFetch.fetchState==="In-Progress",label:ze.saveForLater,style:{minWidth:132,justifyContent:"space-evenly"}}};case"expenseAutomationJEAccountSettingsPage":return{formId:"expenseAutomationJEAccountSettingsPage",nextBtnLabel:ze.save,backBtnLabel:ze.cancel,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:ze.save,isLoading:R.accountSettingsView.saveState.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:82}},cancelBtn:{onClick:()=>Lt(),label:ze.cancel,style:{minWidth:82,justifyContent:"space-evenly"}}};case"expenseAutomationMissingReceipts":return{formId:"expenseAutomationMissingReceipts",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Ga.confirmMatch,isLoading:e.bulkUploadSelector?.confirmMatchStatus.fetchState==="In-Progress",isDisabled:G==null||e.bulkUploadSelector?.confirmMatchStatus.fetchState==="In-Progress",style:{minWidth:"96px",justifyContent:"space-evenly"},onClick:()=>{G!=null&&e.bulkUploadSelector?.confirmMatchStatus.fetchState!=="In-Progress"&&e.onConfirmBulkUploadMatch?.(G.batchId,G.attachmentId,G.transactionId,G.transactionType,G.fileName)}},cancelBtn:{label:ze.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>Te(null)}};default:{const nn=C==="reconciliation"&&i.reconciliation.selectedTab==="review"&&i.reconciliation.selectedAccountId!=null,zn=C==="reconciliation"&&i.reconciliation.selectedAccountId==null,li=C==="reconciliation"&&i.reconciliation.selectedTab==="reconcile"&&i.reconciliation.selectedAccountId!=null,Ui=Me.step==="month_end_insights"&&(C==="flux_analysis"&&(i.fluxAnalysis.sections.generalExpense?.balancesByMonth!=null||i.fluxAnalysis.sections.reimbursement?.balancesByMonth!=null)||zn),lt=C==="transaction_categorization"&&i.selectedTransactionCategorizationTab==="review",Pn=C==="transaction_categorization"&&i.selectedTransactionCategorizationTab==="autoCategorized",ie=i.monthEndCloseChecksView.monthEndCloseChecks?.monthEndCloseCheckList.find(vt=>vt.id==="month_end_insights"),Se=i.monthEndCloseChecksView.monthEndCloseChecks?.reportEmailSentDate==null&&ie?.isDisabled===!1&&(r||$e?.isNextDisabled===!1),Le=Me.step==="month_end_insights"&&(zn||C==="flux_analysis")?!Se:$e?.isNextDisabled===!0;return{formId:"expenseAutomationPage",nextBtnLabel:ze.next,backBtnLabel:ze.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Ui===!0?z2(i.selectedPeriod.month):ze.next,style:{justifyContent:"space-evenly"},isDisabled:Le,suffixIcon:t.jsx(Ka,{}),onClick:()=>{lt?a("autoCategorized"):nn?c("reconcile"):h(Me.step)}},cancelBtn:{label:ze.back,isDisabled:l||$e?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Ja,{}),onClick:()=>{Pn?a("review"):li?c("review"):nn?x():h(De.step)}}}}}},ye=()=>{switch(L){case"expenseAutomationFluxPage":return{confirmAction:()=>{Z(!1),T([]),g()}};case"expenseAutomationTransactionsPage":return{confirmAction:()=>{Z(!1),v(D,ht.map(Ae=>Ae.id),ae,!1,Xe[D],ws(fe,D),u,ve),g()}};case"expenseAutomationJESchedulePage":return{confirmAction:()=>{Z(!1),I(),g()}};default:return{confirmAction:()=>{Z(!1)},confirmationDescription:Hn.empty}}},Be=()=>{L==="expenseAutomationFluxPage"||L==="expenseAutomationJESchedulePage"||L==="expenseAutomationTransactionsPage"?Z(!0):g()},{primaryBtn:wt,cancelBtn:yn,leftSideComponent:Qe}=Ke(),{confirmAction:wn}=ye(),Cn=Ae=>{if(C==="transaction_categorization"&&(Ae==="autoCategorized"||Ae==="review")){const rt=Ae;return{hideCountInTab:Xe[rt]>En.common.numbers.maximumCount,count:Xe[rt],isFetching:et[rt].fetchState==="In-Progress"}}if(C==="reconciliation"){const{reconciliation:rt}=i,{selectedAccountId:At}=rt;return At==null?{count:0,isFetching:!1}:Ae==="review"?{count:rt.accountReconciliationsByAccountID[At]?.accountReconEntity?.transactionsToReview.length,isFetching:rt.accountReconciliationsByAccountID[At]?.transactionFetchState.fetchState==="In-Progress"}:{count:rt.accountReconciliationsByAccountID[At]?.accountReconEntity?.transactionsToReconcile.length,isFetching:rt.accountReconciliationsByAccountID[At]?.transactionFetchState.fetchState==="In-Progress"}}if(C==="missing_receipts"){if(Ae==="missing")return{count:A.transactions.length,isFetching:A.fetchState==="In-Progress"};if(Ae==="unmatched")return{count:(e.bulkUploadSelector?.unmatchedFiles.length??0)+(e.bulkUploadSelector?.pastUnmatchedFiles.length??0),isFetching:N==="unmatched"&&$l({bulkUploadSelector:e.bulkUploadSelector})};if(Ae==="completed")return{count:e.bulkUploadSelector?.completedTransactions?.totalCount??0,isFetching:e.bulkUploadSelector?.completedTransactions?.fetchState?.fetchState==="In-Progress",hideCountInTab:!0}}},Ct=C==="reconciliation"&&M.selectedAccountId!=null&&M.selectedReconAccount!=null,{month:Yt,year:Zt}=ae,Xt=Ki().set("month",Yt-1).set("year",Zt),ii=Xt.startOf("month").format(Qa),Mn=Xt.endOf("month").format(Qa),Bi=`${ii} ${Hn.hyphen} ${Mn}`,en=e.sidePanelIsOpen??!1,tn=e.sidePanelIsFullView??!1,On=C==="missing_receipts"&&N==="missing"&&k,oi=e.bulkUploadSelector?.phase,Vi=e.bulkUploadSelector?.progress.total!=null&&e.bulkUploadSelector.progress.total>0?e.bulkUploadSelector.progress.total:j.uploadFileCount,Ni=N==="completed"&&e.bulkUploadSelector!=null&&e.bulkUploadSelector.completedTransactions.fetchState.fetchState==="Completed"&&e.bulkUploadSelector.completedTransactions.totalCount===0,si={bulkUploadPhase:oi,isDraggingFiles:j.isDraggingFiles,isUploading:j.isUploading===!0,matchingProgressBannerTotal:Vi,onFilesSelected:j.handleBulkUploadFiles,policyDescription:Ni?"":Ga.policyDescription,showEmailOrDropZone:j.isUploading!==!0&&oi!=="matching",uploadError:j.uploadError,uploadFileCount:j.uploadFileCount,uploadProgressPercent:e.bulkUploadSelector?.uploadProgress??0},ai=C==="missing_receipts"&&N==="completed"&&k&&e.bulkUploadSelector!=null,He={onDragLeave:j.handleDragLeave,onDragOver:j.handleDragOver,onDrop:j.handleDrop},bn=On===!0&&!(en&&tn)?t.jsx(Fa,{...He,children:t.jsx(Wa,{...si})}):ai===!0&&!(en&&tn)&&e.bulkUploadSelector!=null?t.jsx(qa,{activeSubTab:e.bulkUploadSelector.completedSubTab,completedTransactionsFetchState:e.bulkUploadSelector.completedTransactions.fetchState,completedTransactionsLoadedCount:e.bulkUploadSelector.completedTransactions.transactions.length,onSubTabChange:Ae=>{e.onSetBulkUploadCompletedSubTab?.(Ae)},totalCount:e.bulkUploadSelector.completedTransactions.totalCount}):null;return t.jsxs($2,{children:[H?t.jsx(Fl,{containerStyle:{width:356},titleComponent:t.jsx(U2,{children:L2}),primaryButtonText:E2,secondaryButtonText:R2,proceedButtonVariant:"danger",action:{onOkClick:()=>{wn()},onCancelClick:()=>Z(!1)},descriptionComponent:t.jsx(H2,{children:En.confirmationDescription})}):null,t.jsx(_l,{isOpen:e.sidePanelIsOpen??!1,isFullView:e.sidePanelIsFullView??!1,panelContent:e.panelContent,panelActionBarContent:e.isTransactionActivityEnabled?t.jsx(M2,{setActivityLogTransactionId:e.setActivityLogTransactionId}):null,headerContent:t.jsx(iu,{hideEmptyDivBelowTabs:C==="missing_receipts",onBack:x,navBarCustomElement:C==="reconciliation"&&M.selectedAccountId!=null?t.jsx(O2,{reconciliation:M}):void 0,onReconTabUpdate:c,currentRecontab:M.selectedTab,bulkUploadPhase:e.bulkUploadSelector?.phase,currentMissingReceiptsTab:N,onMissingReceiptsTabUpdate:Y,reconcileDetailPageFetchState:M.selectedAccountId!=null?M.accountReconciliationsByAccountID[M.selectedAccountId]?.transactionFetchState.fetchState:"Not-Started",selectedReconAccountId:Ct?M.selectedAccountId:void 0,currentSelectedView:C,titleStyle:{justifyContent:"center",marginLeft:n.sp0},headerData:We(C,Xe.autoCategorized,Ct?M.selectedAccountId:void 0,Ct?M.selectedReconAccount?.accountReconEntity?.account.accountName:void 0,Ct?Bi:void 0,C==="missing_receipts"?{includeBulkUploadTabs:k,navTitle:k?zl.receipts:void 0}:void 0),searchText:Fe,currentTab:D,getTabCountAndFetchState:Cn,completionStatus:pt,forceShowSubtitle:ge===!0||C==="je_schedules"&&(R.fetchState==="In-Progress"||R.accountSettingsView.fetchState==="In-Progress"),refreshStatus:tt,companyId:e.companyId,companyName:i.monthEndInsights?.companyName??Hn.empty,isZeniUser:ee,onAllThreadsClick:()=>{_!=null&&ne(null),K(!0)},onUpdateTab:a,onSearchTextChanged:m,onRefresh:C==="missing_receipts"?()=>{switch(N){case"missing":e.onFetchMissingReceiptsList();break;case"unmatched":e.onFetchBulkUploadBatches?.({cacheOverride:!0,invalidateBatchDetailsCache:!0});break;case"completed":e.onFetchCompletedTransactions?.(void 0,!0);break}}:p,onClose:Be,belowTabsSlot:bn}),listContent:t.jsxs(I2,{children:[C==="missing_receipts"?t.jsx(yy,{missingReceiptsTab:N,missingTransactionCount:A.transactions.length,missingReceiptsBulkUploadChromeInPageBody:On===!0&&en&&tn?t.jsx(Fa,{...He,children:t.jsx(Wa,{...si})}):null,missingReceiptsCompletedChromeInPageBody:ai===!0&&en&&tn&&e.bulkUploadSelector!=null?t.jsx(qa,{activeSubTab:e.bulkUploadSelector.completedSubTab,completedTransactionsFetchState:e.bulkUploadSelector.completedTransactions.fetchState,completedTransactionsLoadedCount:e.bulkUploadSelector.completedTransactions.transactions.length,onSubTabChange:Ae=>{e.onSetBulkUploadCompletedSubTab?.(Ae)},totalCount:e.bulkUploadSelector.completedTransactions.totalCount}):null,bulkUploadInteractions:j,bulkUploadSelector:e.bulkUploadSelector,selectedPeriod:ae,authParams:e.authParams,bulkUploadEndpoint:e.bulkUploadEndpoint,transactionAttachmentsEndpoint:e.transactionAttachmentsEndpoint,onBulkUploadSuccess:e.onBulkUploadSuccess,onBulkUploadFiles:e.onBulkUploadFiles,onFetchBulkUploadBatches:e.onFetchBulkUploadBatches,onFetchMoreBatchDetails:e.onFetchMoreBatchDetails,onFetchCompletedTransactions:e.onFetchCompletedTransactions,onDeleteUnmatchedReceipt:e.onDeleteUnmatchedReceipt,onLoadMoreManualSearch:e.onLoadMoreManualSearch,onSearchTransactionsForManualMatch:e.onSearchTransactionsForManualMatch,onPendingMatchChange:Te,pendingMatchAttachmentId:G?.attachmentId??null,pendingMatchTransactionId:G?.transactionId??null,onMissingReceiptsRowClick:e.onMissingReceiptsRowClick,onSetBulkUploadCompletedSubTab:e.onSetBulkUploadCompletedSubTab,onSetBulkUploadSortConfig:e.onSetBulkUploadSortConfig,onResetBulkUploadSort:e.onResetBulkUploadSort,setMissingReceiptsTab:Y,tableSectionProps:{parentProps:e,isCOTEnabled:d,setIsJeAccountSettingsOpened:te,setResetJeAccountSettingsForm:ce,allThreadsSectionOpen:oe,setCurrentFooterFormId:U,currentFooterFormId:L,onCloseAllThreadsSection:()=>K(!1)}}):t.jsx(yl,{...e,isCOTEnabled:d,setIsJeAccountSettingsOpened:te,setResetJeAccountSettingsForm:ce,allThreadsSectionOpen:oe,setCurrentFooterFormId:U,currentFooterFormId:L,onCloseAllThreadsSection:()=>K(!1)}),t.jsx(Ge,{controller:C!=="month_end_insights"&&e.sidePanelIsOpen!==!0,children:t.jsx(nr,{style:{width:"-webkit-fill-available",maxHeight:f[8]},formId:F2(L),primaryBtn:wt,leftSideComponent:Qe,cancelBtn:yn,separatorStyle:{marginRight:n.sp4}})})]})})]})},O2=({reconciliation:e})=>{const i=Tt(),{clearedBalance:l,variance:r,variancePercentage:u,deposits:d,payments:a}=e.reconciliationTabsState.balances,{balance:c}=e.selectedReconAccount?.accountReconEntity??{},{selectedReconAccount:h}=e,{transactionFetchState:m}=h??{};return t.jsx(W2,{children:t.jsxs(q2,{children:[t.jsxs(jo,{style:{justifyContent:"flex-end",width:"50%"},children:[t.jsx($o,{children:t.jsx(K2,{})}),t.jsx(Io,{children:m?.fetchState==="In-Progress"?t.jsxs(Ao,{children:[t.jsx(In,{height:25,width:120}),t.jsx(In,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(Lo,{children:nt("0,0.00",c)}),t.jsx(To,{children:En.accountRecon.reconciliation.headers.bankBalance})]})})]}),t.jsxs(jo,{children:[t.jsx($o,{children:t.jsx(Q2,{})}),t.jsx(Io,{children:m?.fetchState==="In-Progress"?t.jsxs(Ao,{children:[t.jsx(In,{height:25,width:120}),t.jsx(In,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(Lo,{children:nt("0,0.00",l)}),t.jsxs(Y2,{children:[t.jsx(To,{children:En.accountRecon.reconciliation.headers.clearedBalance}),t.jsx(xe,{placement:"bottom",title:t.jsxs(Z2,{children:[t.jsxs(Ya,{children:[t.jsxs(Za,{children:[a.count," ",Rn.payments]}),t.jsx(Xa,{children:nt("0,0.[00]",a.totalAmount)})]}),t.jsxs(Ya,{children:[t.jsxs(Za,{children:[d.count," ",Rn.deposits]}),t.jsx(Xa,{children:nt("0,0.[00]",d.totalAmount)})]})]}),display:"flex",children:t.jsx(G2,{})})]})]})})]}),t.jsxs(jo,{style:{justifyContent:"flex-start",width:"50%"},children:[t.jsx($o,{children:t.jsx(J2,{})}),t.jsx(Io,{children:m?.fetchState==="In-Progress"?t.jsxs(Ao,{children:[t.jsx(In,{height:25,width:120}),t.jsx(In,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsxs(Lo,{children:[t.jsx("span",{style:{color:r.amount===0?i.colors.brandColorJadeDark:i.colors.primary},children:nt("0,0.00",r)}),u!=null&&r.amount!==0?t.jsx("span",{style:{color:i.colors.primary,marginLeft:2},children:`(${u.toFixed(2)}%)`}):null]}),t.jsx(To,{children:En.accountRecon.reconciliation.headers.variance})]})})]})]})})},ko=(e,i,l,r,u)=>{const d=r,a=(e>1?d+"s":d)+" selected";return e>0?t.jsxs(_2,{currentView:u,style:l==="small"?{position:"absolute",top:n.sp2,left:`-${n.sp5}`}:{},children:[t.jsx(B2,{multiDigit:e>=5,children:e}),t.jsx(V2,{children:a}),e===i?t.jsx(N2,{children:`(${T2})`}):null]}):null},z2=e=>{const i=D2[e];return`${A2}${Hn.space}${i}${Hn.space}${zl.insights}`};function P2(e,i){const l=e.findIndex(c=>c.step===i);if(l===-1)throw new Error("currentStep not found in allSteps array");const r=(l+1)%e.length,u=(l-1+e.length)%e.length,d=e[r],a=e[u];return{nextStep:d,previousStep:a}}const F2=e=>`${e}_form`,_2=o.div`
2881
+ `,{common:{footer:ze,texts:{maxLimitReached:T2,confirmAction:L2},headers:zl,create:A2,strings:Wn,texts:Rn,cancel:R2,confirm:E2,monthsByIndex:D2},dateFormat:{visual:{MMMDCommaYYYYformat:Qa}},expenseAutomation:En,uncategorizedTransactionList:{missingReceipt:{bulkUpload:Ga}}}=me.getLocalizedStrings(),M2=({setActivityLogTransactionId:e})=>{const{selectedTransactionId:i}=zi(),l=Tt(),[r,u]=s.useState(!1);return i==null?null:t.jsx(xe,{title:En.transactions.header.activity,placement:"bottom",children:t.jsx(X2,{onMouseEnter:()=>u(!0),onMouseLeave:()=>u(!1),onClick:d=>{d.stopPropagation(),e(i)},children:t.jsx(ew,{style:{color:r?l.colors.primary:l.colors.hero}})})})},Cw=e=>{const{expenseAutomationViewSelector:i,isDisabled:l,isRealtimeInsightsFeatureEnabled:r,isUncategorizedExpenseCategoryEnabled:u,isCOTEnabled:d,onUpdateTab:a,onReconTabUpdate:c,onUpdateStep:h,onSearchTextChanged:m,onRefresh:p,onClose:g,onBack:x,onBulkUploadConfirmMatchAcknowledged:y,onClearMissingReceiptsTabNavigation:b,closeSidePanel:S,initialMissingReceiptsTab:$,resetTransactionCategorizationLocalData:v,updateOperatingExpensesIdsForReview:T,clearJeScheduleLocalData:I,onSaveReconciliation:w}=e,k=e.bulkUploadEndpoint!=null||e.onBulkUploadFiles!=null,j=S2({authParams:e.authParams,bulkUploadEndpoint:e.bulkUploadEndpoint,onBulkUploadProgress:e.onBulkUploadProgress,onBulkUploadSuccess:e.onBulkUploadSuccess,onBulkUploadFilesFallback:e.onBulkUploadFiles}),{currentSelectedView:C,allSteps:z,missingReceipts:A,jeSchedules:R,fluxAnalysis:P,monthEndInsights:V,transactionView:q,selectedTransactionCategorizationTab:D,reconciliation:M,selectedPeriod:ae}=i,{pendingMissingReceiptsTabNavigation:F}=A,[L,U]=s.useState("expenseAutomationPage"),[X,ce]=s.useState(()=>{}),[ge,te]=s.useState(!1),J=be(),ee=!!e.loggedInUser?.userEmail?.includes("zeni.ai"),H=ee?er:tr,{openThread:_,setOpenThread:ne}=s.useContext(H),[W,Z]=s.useState(!1),[oe,K]=s.useState(!1),[N,O]=s.useState($??"missing"),se=s.useRef(null);s.useEffect(()=>{const Ae=se.current;Ae!==null&&Ae!==N&&S?.(),se.current=N},[N,S]);const Y=s.useCallback(Ae=>{O(Ae)},[]),[G,je]=s.useState(null),Te=s.useCallback(Ae=>{je(Ae),U(Ae!=null?"expenseAutomationMissingReceipts":"expenseAutomationPage")},[U]),E=e.bulkUploadSelector?.confirmMatchStatus.fetchState,de=s.useRef(void 0);s.useEffect(()=>{de.current==="In-Progress"&&E==="Completed"&&G!=null&&(Te(null),y?.()),de.current=E},[E,G,Te,y]),s.useEffect(()=>{N!=="unmatched"&&Te(null)},[N,Te]),s.useEffect(()=>{F==="unmatched"&&(k&&Y("unmatched"),b?.())},[F,b,k,Y]),s.useEffect(()=>{k===!1&&(N==="unmatched"||N==="completed")&&Y("missing")},[k,N,Y]);const $e=z.find(Ae=>Ae.step===C),{nextStep:Me,previousStep:De}=P2(z,C),{uiState:{searchString:Fe,pageToken:ve},totalCountByTab:Xe,transactions:ht,fetchStateByTransactionTabs:et,transactionLocalData:fe}=q,{selectedReconAccount:_e,reconciliationTabsState:{reconcile:{localData:{selectedTransactionIds:Vt}}}}=M;let tt="Not-Started",pt="complete";switch(C){case"missing_receipts":tt=A.refreshStatus.fetchState,pt=A.completionStatus;break;case"je_schedules":tt=R.refreshStatus.fetchState,pt=R.completionStatus;break;case"month_end_insights":V!=null&&(tt=V?.fetchState);break;case"flux_analysis":tt=P.refreshStatus.fetchState,pt=P.completionStatus;break;case"transaction_categorization":tt=q.refreshStatus.fetchState,pt=q.completionStatus;break;case"reconciliation":_e==null?(tt=M.refreshStatus.fetchState,pt=M.completionStatus):(tt=M.selectedReconAccount?.refreshStatus.fetchState??"Not-Started",pt=M.completionStatus)}const Lt=()=>{X()},{saveStatus:Ee,selectedCheckBoxTransactionIds:Ie}=q,Ke=()=>{const Ae=Zr(i.fluxAnalysis.sections,i.fluxAnalysis.reviewOperatingExpensesIds),rt=Ki(),{month:At,year:ri}=ae,bt=Ki().set("month",At-1).set("year",ri).endOf("month");switch(L){case"expenseAutomationFluxPage":return{formId:"expenseAutomationFluxPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Ae===!0?ze.markAsReviewed:Rn.undo,style:{justifyContent:"space-evenly"},isLoading:i.fluxAnalysis.bulkReviewStatus.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:ko(i.fluxAnalysis.reviewOperatingExpensesIds.length,Pr,J,Rn.vendor,C),cancelBtn:{label:ze.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{T([])}}};case"expenseAutomationTransactionsPage":return{formId:"expenseAutomationTransactionsPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:ze.save,style:{minWidth:"96px",justifyContent:"space-evenly"},isLoading:Ee.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:ko(Ie.length,qn,J,Rn.transaction,C),cancelBtn:{label:ze.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{v(D,ht.map(nn=>nn.id),ae,!1,Xe[D],ws(fe,D),u,ve)}}};case"expenseAutomationJESchedulePage":return{formId:"expenseAutomationJESchedulePage",nextBtnLabel:ze.next,backBtnLabel:ze.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:ze.next,style:{justifyContent:"space-evenly"},isDisabled:l||$e?.isNextDisabled,suffixIcon:t.jsx(Ka,{}),onClick:()=>{h(Me.step)}},cancelBtn:{label:ze.back,isDisabled:l||$e?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Ja,{}),onClick:()=>{h(De.step)}}};case"expenseAutomationBankReconReconcilePage":return{formId:"expenseAutomationBankReconReconcilePage",nextBtnLabel:ze.reconcile,backBtnLabel:ze.saveForLater,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:ze.reconcile,onClick:()=>{w({reconcileAction:"reconcile"})},isDisabled:!(M.reconciliationTabsState.balances.variance.amount===0&&rt.isAfter(bt)),isLoading:M.actionFetchStates.reconcileFetch.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:132}},leftSideComponent:ko(Vt.length,1/0,J,Rn.transaction,C),cancelBtn:{onClick:()=>{w({reconcileAction:"save_reconcile_for_later"})},reverseSpinnerColor:!1,isLoading:M.actionFetchStates.saveForLaterFetch.fetchState==="In-Progress",label:ze.saveForLater,style:{minWidth:132,justifyContent:"space-evenly"}}};case"expenseAutomationJEAccountSettingsPage":return{formId:"expenseAutomationJEAccountSettingsPage",nextBtnLabel:ze.save,backBtnLabel:ze.cancel,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:ze.save,isLoading:R.accountSettingsView.saveState.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:82}},cancelBtn:{onClick:()=>Lt(),label:ze.cancel,style:{minWidth:82,justifyContent:"space-evenly"}}};case"expenseAutomationMissingReceipts":return{formId:"expenseAutomationMissingReceipts",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Ga.confirmMatch,isLoading:e.bulkUploadSelector?.confirmMatchStatus.fetchState==="In-Progress",isDisabled:G==null||e.bulkUploadSelector?.confirmMatchStatus.fetchState==="In-Progress",style:{minWidth:"96px",justifyContent:"space-evenly"},onClick:()=>{G!=null&&e.bulkUploadSelector?.confirmMatchStatus.fetchState!=="In-Progress"&&e.onConfirmBulkUploadMatch?.(G.batchId,G.attachmentId,G.transactionId,G.transactionType,G.fileName)}},cancelBtn:{label:ze.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>Te(null)}};default:{const nn=C==="reconciliation"&&i.reconciliation.selectedTab==="review"&&i.reconciliation.selectedAccountId!=null,zn=C==="reconciliation"&&i.reconciliation.selectedAccountId==null,li=C==="reconciliation"&&i.reconciliation.selectedTab==="reconcile"&&i.reconciliation.selectedAccountId!=null,Ui=Me.step==="month_end_insights"&&(C==="flux_analysis"&&(i.fluxAnalysis.sections.generalExpense?.balancesByMonth!=null||i.fluxAnalysis.sections.reimbursement?.balancesByMonth!=null)||zn),lt=C==="transaction_categorization"&&i.selectedTransactionCategorizationTab==="review",Pn=C==="transaction_categorization"&&i.selectedTransactionCategorizationTab==="autoCategorized",ie=i.monthEndCloseChecksView.monthEndCloseChecks?.monthEndCloseCheckList.find(vt=>vt.id==="month_end_insights"),Se=i.monthEndCloseChecksView.monthEndCloseChecks?.reportEmailSentDate==null&&ie?.isDisabled===!1&&(r||$e?.isNextDisabled===!1),Le=Me.step==="month_end_insights"&&(zn||C==="flux_analysis")?!Se:$e?.isNextDisabled===!0;return{formId:"expenseAutomationPage",nextBtnLabel:ze.next,backBtnLabel:ze.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Ui===!0?z2(i.selectedPeriod.month):ze.next,style:{justifyContent:"space-evenly"},isDisabled:Le,suffixIcon:t.jsx(Ka,{}),onClick:()=>{lt?a("autoCategorized"):nn?c("reconcile"):h(Me.step)}},cancelBtn:{label:ze.back,isDisabled:l||$e?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Ja,{}),onClick:()=>{Pn?a("review"):li?c("review"):nn?x():h(De.step)}}}}}},ye=()=>{switch(L){case"expenseAutomationFluxPage":return{confirmAction:()=>{Z(!1),T([]),g()}};case"expenseAutomationTransactionsPage":return{confirmAction:()=>{Z(!1),v(D,ht.map(Ae=>Ae.id),ae,!1,Xe[D],ws(fe,D),u,ve),g()}};case"expenseAutomationJESchedulePage":return{confirmAction:()=>{Z(!1),I(),g()}};default:return{confirmAction:()=>{Z(!1)},confirmationDescription:Wn.empty}}},Be=()=>{L==="expenseAutomationFluxPage"||L==="expenseAutomationJESchedulePage"||L==="expenseAutomationTransactionsPage"?Z(!0):g()},{primaryBtn:wt,cancelBtn:yn,leftSideComponent:Qe}=Ke(),{confirmAction:wn}=ye(),Cn=Ae=>{if(C==="transaction_categorization"&&(Ae==="autoCategorized"||Ae==="review")){const rt=Ae;return{hideCountInTab:Xe[rt]>En.common.numbers.maximumCount,count:Xe[rt],isFetching:et[rt].fetchState==="In-Progress"}}if(C==="reconciliation"){const{reconciliation:rt}=i,{selectedAccountId:At}=rt;return At==null?{count:0,isFetching:!1}:Ae==="review"?{count:rt.accountReconciliationsByAccountID[At]?.accountReconEntity?.transactionsToReview.length,isFetching:rt.accountReconciliationsByAccountID[At]?.transactionFetchState.fetchState==="In-Progress"}:{count:rt.accountReconciliationsByAccountID[At]?.accountReconEntity?.transactionsToReconcile.length,isFetching:rt.accountReconciliationsByAccountID[At]?.transactionFetchState.fetchState==="In-Progress"}}if(C==="missing_receipts"){if(Ae==="missing")return{count:A.transactions.length,isFetching:A.fetchState==="In-Progress"};if(Ae==="unmatched")return{count:(e.bulkUploadSelector?.unmatchedFiles.length??0)+(e.bulkUploadSelector?.pastUnmatchedFiles.length??0),isFetching:N==="unmatched"&&$l({bulkUploadSelector:e.bulkUploadSelector})};if(Ae==="completed")return{count:e.bulkUploadSelector?.completedTransactions?.totalCount??0,isFetching:e.bulkUploadSelector?.completedTransactions?.fetchState?.fetchState==="In-Progress",hideCountInTab:!0}}},Ct=C==="reconciliation"&&M.selectedAccountId!=null&&M.selectedReconAccount!=null,{month:Yt,year:Zt}=ae,Xt=Ki().set("month",Yt-1).set("year",Zt),ii=Xt.startOf("month").format(Qa),Mn=Xt.endOf("month").format(Qa),Bi=`${ii} ${Wn.hyphen} ${Mn}`,en=e.sidePanelIsOpen??!1,tn=e.sidePanelIsFullView??!1,On=C==="missing_receipts"&&N==="missing"&&k,oi=e.bulkUploadSelector?.phase,Vi=e.bulkUploadSelector?.progress.total!=null&&e.bulkUploadSelector.progress.total>0?e.bulkUploadSelector.progress.total:j.uploadFileCount,Ni=N==="completed"&&e.bulkUploadSelector!=null&&e.bulkUploadSelector.completedTransactions.fetchState.fetchState==="Completed"&&e.bulkUploadSelector.completedTransactions.totalCount===0,si={bulkUploadPhase:oi,isDraggingFiles:j.isDraggingFiles,isUploading:j.isUploading===!0,matchingProgressBannerTotal:Vi,onFilesSelected:j.handleBulkUploadFiles,policyDescription:Ni?"":Ga.policyDescription,showEmailOrDropZone:j.isUploading!==!0&&oi!=="matching",uploadError:j.uploadError,uploadFileCount:j.uploadFileCount,uploadProgressPercent:e.bulkUploadSelector?.uploadProgress??0},ai=C==="missing_receipts"&&N==="completed"&&k&&e.bulkUploadSelector!=null,We={onDragLeave:j.handleDragLeave,onDragOver:j.handleDragOver,onDrop:j.handleDrop},bn=On===!0&&!(en&&tn)?t.jsx(Fa,{...We,children:t.jsx(Ha,{...si})}):ai===!0&&!(en&&tn)&&e.bulkUploadSelector!=null?t.jsx(qa,{activeSubTab:e.bulkUploadSelector.completedSubTab,completedTransactionsFetchState:e.bulkUploadSelector.completedTransactions.fetchState,completedTransactionsLoadedCount:e.bulkUploadSelector.completedTransactions.transactions.length,onSubTabChange:Ae=>{e.onSetBulkUploadCompletedSubTab?.(Ae)},totalCount:e.bulkUploadSelector.completedTransactions.totalCount}):null;return t.jsxs($2,{children:[W?t.jsx(Fl,{containerStyle:{width:356},titleComponent:t.jsx(U2,{children:L2}),primaryButtonText:E2,secondaryButtonText:R2,proceedButtonVariant:"danger",action:{onOkClick:()=>{wn()},onCancelClick:()=>Z(!1)},descriptionComponent:t.jsx(W2,{children:En.confirmationDescription})}):null,t.jsx(_l,{isOpen:e.sidePanelIsOpen??!1,isFullView:e.sidePanelIsFullView??!1,panelContent:e.panelContent,panelActionBarContent:e.isTransactionActivityEnabled?t.jsx(M2,{setActivityLogTransactionId:e.setActivityLogTransactionId}):null,headerContent:t.jsx(iu,{hideEmptyDivBelowTabs:C==="missing_receipts",onBack:x,navBarCustomElement:C==="reconciliation"&&M.selectedAccountId!=null?t.jsx(O2,{reconciliation:M}):void 0,onReconTabUpdate:c,currentRecontab:M.selectedTab,bulkUploadPhase:e.bulkUploadSelector?.phase,currentMissingReceiptsTab:N,onMissingReceiptsTabUpdate:Y,reconcileDetailPageFetchState:M.selectedAccountId!=null?M.accountReconciliationsByAccountID[M.selectedAccountId]?.transactionFetchState.fetchState:"Not-Started",selectedReconAccountId:Ct?M.selectedAccountId:void 0,currentSelectedView:C,titleStyle:{justifyContent:"center",marginLeft:n.sp0},headerData:He(C,Xe.autoCategorized,Ct?M.selectedAccountId:void 0,Ct?M.selectedReconAccount?.accountReconEntity?.account.accountName:void 0,Ct?Bi:void 0,C==="missing_receipts"?{includeBulkUploadTabs:k,navTitle:k?zl.receipts:void 0}:void 0),searchText:Fe,currentTab:D,getTabCountAndFetchState:Cn,completionStatus:pt,forceShowSubtitle:ge===!0||C==="je_schedules"&&(R.fetchState==="In-Progress"||R.accountSettingsView.fetchState==="In-Progress"),refreshStatus:tt,companyId:e.companyId,companyName:i.monthEndInsights?.companyName??Wn.empty,isZeniUser:ee,onAllThreadsClick:()=>{_!=null&&ne(null),K(!0)},onUpdateTab:a,onSearchTextChanged:m,onRefresh:C==="missing_receipts"?()=>{switch(N){case"missing":e.onFetchMissingReceiptsList();break;case"unmatched":e.onFetchBulkUploadBatches?.({cacheOverride:!0,invalidateBatchDetailsCache:!0});break;case"completed":e.onFetchCompletedTransactions?.(void 0,!0);break}}:p,onClose:Be,belowTabsSlot:bn}),listContent:t.jsxs(I2,{children:[C==="missing_receipts"?t.jsx(yy,{missingReceiptsTab:N,missingTransactionCount:A.transactions.length,missingReceiptsBulkUploadChromeInPageBody:On===!0&&en&&tn?t.jsx(Fa,{...We,children:t.jsx(Ha,{...si})}):null,missingReceiptsCompletedChromeInPageBody:ai===!0&&en&&tn&&e.bulkUploadSelector!=null?t.jsx(qa,{activeSubTab:e.bulkUploadSelector.completedSubTab,completedTransactionsFetchState:e.bulkUploadSelector.completedTransactions.fetchState,completedTransactionsLoadedCount:e.bulkUploadSelector.completedTransactions.transactions.length,onSubTabChange:Ae=>{e.onSetBulkUploadCompletedSubTab?.(Ae)},totalCount:e.bulkUploadSelector.completedTransactions.totalCount}):null,bulkUploadInteractions:j,bulkUploadSelector:e.bulkUploadSelector,selectedPeriod:ae,authParams:e.authParams,bulkUploadEndpoint:e.bulkUploadEndpoint,transactionAttachmentsEndpoint:e.transactionAttachmentsEndpoint,onBulkUploadSuccess:e.onBulkUploadSuccess,onBulkUploadFiles:e.onBulkUploadFiles,onFetchBulkUploadBatches:e.onFetchBulkUploadBatches,onFetchMoreBatchDetails:e.onFetchMoreBatchDetails,onFetchCompletedTransactions:e.onFetchCompletedTransactions,onDeleteUnmatchedReceipt:e.onDeleteUnmatchedReceipt,onLoadMoreManualSearch:e.onLoadMoreManualSearch,onSearchTransactionsForManualMatch:e.onSearchTransactionsForManualMatch,onPendingMatchChange:Te,pendingMatchAttachmentId:G?.attachmentId??null,pendingMatchTransactionId:G?.transactionId??null,onMissingReceiptsRowClick:e.onMissingReceiptsRowClick,onSetBulkUploadCompletedSubTab:e.onSetBulkUploadCompletedSubTab,onSetBulkUploadSortConfig:e.onSetBulkUploadSortConfig,onResetBulkUploadSort:e.onResetBulkUploadSort,setMissingReceiptsTab:Y,tableSectionProps:{parentProps:e,isCOTEnabled:d,setIsJeAccountSettingsOpened:te,setResetJeAccountSettingsForm:ce,allThreadsSectionOpen:oe,setCurrentFooterFormId:U,currentFooterFormId:L,onCloseAllThreadsSection:()=>K(!1)}}):t.jsx(yl,{...e,isCOTEnabled:d,setIsJeAccountSettingsOpened:te,setResetJeAccountSettingsForm:ce,allThreadsSectionOpen:oe,setCurrentFooterFormId:U,currentFooterFormId:L,onCloseAllThreadsSection:()=>K(!1)}),t.jsx(Ge,{controller:C!=="month_end_insights"&&e.sidePanelIsOpen!==!0,children:t.jsx(nr,{style:{width:"-webkit-fill-available",maxHeight:f[8]},formId:F2(L),primaryBtn:wt,leftSideComponent:Qe,cancelBtn:yn,separatorStyle:{marginRight:n.sp4}})})]})})]})},O2=({reconciliation:e})=>{const i=Tt(),{clearedBalance:l,variance:r,variancePercentage:u,deposits:d,payments:a}=e.reconciliationTabsState.balances,{balance:c}=e.selectedReconAccount?.accountReconEntity??{},{selectedReconAccount:h}=e,{transactionFetchState:m}=h??{};return t.jsx(H2,{children:t.jsxs(q2,{children:[t.jsxs(jo,{style:{justifyContent:"flex-end",width:"50%"},children:[t.jsx($o,{children:t.jsx(K2,{})}),t.jsx(Io,{children:m?.fetchState==="In-Progress"?t.jsxs(Ao,{children:[t.jsx(In,{height:25,width:120}),t.jsx(In,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(Lo,{children:nt("0,0.00",c)}),t.jsx(To,{children:En.accountRecon.reconciliation.headers.bankBalance})]})})]}),t.jsxs(jo,{children:[t.jsx($o,{children:t.jsx(Q2,{})}),t.jsx(Io,{children:m?.fetchState==="In-Progress"?t.jsxs(Ao,{children:[t.jsx(In,{height:25,width:120}),t.jsx(In,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(Lo,{children:nt("0,0.00",l)}),t.jsxs(Y2,{children:[t.jsx(To,{children:En.accountRecon.reconciliation.headers.clearedBalance}),t.jsx(xe,{placement:"bottom",title:t.jsxs(Z2,{children:[t.jsxs(Ya,{children:[t.jsxs(Za,{children:[a.count," ",Rn.payments]}),t.jsx(Xa,{children:nt("0,0.[00]",a.totalAmount)})]}),t.jsxs(Ya,{children:[t.jsxs(Za,{children:[d.count," ",Rn.deposits]}),t.jsx(Xa,{children:nt("0,0.[00]",d.totalAmount)})]})]}),display:"flex",children:t.jsx(G2,{})})]})]})})]}),t.jsxs(jo,{style:{justifyContent:"flex-start",width:"50%"},children:[t.jsx($o,{children:t.jsx(J2,{})}),t.jsx(Io,{children:m?.fetchState==="In-Progress"?t.jsxs(Ao,{children:[t.jsx(In,{height:25,width:120}),t.jsx(In,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsxs(Lo,{children:[t.jsx("span",{style:{color:r.amount===0?i.colors.brandColorJadeDark:i.colors.primary},children:nt("0,0.00",r)}),u!=null&&r.amount!==0?t.jsx("span",{style:{color:i.colors.primary,marginLeft:2},children:`(${u.toFixed(2)}%)`}):null]}),t.jsx(To,{children:En.accountRecon.reconciliation.headers.variance})]})})]})]})})},ko=(e,i,l,r,u)=>{const d=r,a=(e>1?d+"s":d)+" selected";return e>0?t.jsxs(_2,{currentView:u,style:l==="small"?{position:"absolute",top:n.sp2,left:`-${n.sp5}`}:{},children:[t.jsx(B2,{multiDigit:e>=5,children:e}),t.jsx(V2,{children:a}),e===i?t.jsx(N2,{children:`(${T2})`}):null]}):null},z2=e=>{const i=D2[e];return`${A2}${Wn.space}${i}${Wn.space}${zl.insights}`};function P2(e,i){const l=e.findIndex(c=>c.step===i);if(l===-1)throw new Error("currentStep not found in allSteps array");const r=(l+1)%e.length,u=(l-1+e.length)%e.length,d=e[r],a=e[u];return{nextStep:d,previousStep:a}}const F2=e=>`${e}_form`,_2=o.div`
2882
2882
  display: flex;
2883
2883
  justify-content: flex-start;
2884
2884
  align-items: center;
@@ -2903,11 +2903,11 @@ import{o as n,bX as Pl,J as be,gm as er,gn as tr,V as t,cs as Fl,bD as _l,ab as
2903
2903
  padding-right: ${n.sp8};
2904
2904
  color: ${e=>e.theme.colors.primary};
2905
2905
  word-break: break-word;
2906
- `,H2=o(Bl)`
2906
+ `,W2=o(Bl)`
2907
2907
  color: ${e=>e.theme.colors.primary};
2908
2908
  margin-top: ${n.sp2};
2909
2909
  margin-bottom: ${n.sp2};
2910
- `,W2=o.div`
2910
+ `,H2=o.div`
2911
2911
  display: flex;
2912
2912
  justify-content: center;
2913
2913
  align-items: center;