@zeniai/web-cockpit-ui 1.14.17-qa → 1.14.18-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 (247) hide show
  1. package/dist/assets/ACHDetailsPage-DDccOBrQ-xtRCcN-J.js +21 -0
  2. package/dist/assets/{AIPerformancePage-4oC8MJWN-3x4rvqkH.js → AIPerformancePage-u3qF__mF-Cwmno93h.js} +42 -42
  3. package/dist/assets/{AccountInfoPage-mOPytffA-BHPN2sFX.js → AccountInfoPage-vDWC6AMf-DzR0-3Io.js} +2 -2
  4. package/dist/assets/{AccountInfoPageContent-VULusDEd-Bbj6r5XK.js → AccountInfoPageContent-0PqU7bCV-D6wFAbY2.js} +13 -13
  5. package/dist/assets/{AccountReconDetailsDrawerPage-89APlrhb-OpGiG4Fe.js → AccountReconDetailsDrawerPage-DEqtU-rh-Deoo-ctA.js} +19 -19
  6. package/dist/assets/{AccountRow-DJd-IAIl-C8ES_stT.js → AccountRow-DTQ6Qoyr-_b2APADd.js} +25 -25
  7. package/dist/assets/{AccountsPromoCardStack-DE39TpIu-D-Yop5mF.js → AccountsPromoCardStack-DkYqKp1i-mDnDl8sy.js} +33 -33
  8. package/dist/assets/{AddAddressForCardDrawer-CKdcU_pi-CwaicPlo.js → AddAddressForCardDrawer-DB3HtvgV-DDm-Yx81.js} +2 -2
  9. package/dist/assets/{AddToWalletPage-DPXW2fbY-CtMlIrQx.js → AddToWalletPage-DvgM0-kj-TsEzz5fI.js} +22 -22
  10. package/dist/assets/{AgingReportsPage--CLUwcIa-BsmrKMJu.js → AgingReportsPage-BP6-oG6W-DRhLxK4p.js} +16 -16
  11. package/dist/assets/{AllUserItems-CC9l-O5G-B5y_zhUe.js → AllUserItems-w6M8k5yU-DRpE6VjZ.js} +9 -9
  12. package/dist/assets/ApAgingDetailPage-BZuNGMx_-DRH7p0_b.js +46 -0
  13. package/dist/assets/{AppBasePage-CgHKYFmd-DpxCZRxE.js → AppBasePage-l_TUUps8-K0ozDeR0.js} +10 -10
  14. package/dist/assets/{AppDrawerContent-Cofo0-5p-Bon4ebWD.js → AppDrawerContent-_gInVeZf-CqHabOEw.js} +19 -19
  15. package/dist/assets/{ApprovalRulesSettingsPage-DsshEbzW-bVy7ndBX.js → ApprovalRulesSettingsPage-CKRde9he-CmSQRugq.js} +7 -7
  16. package/dist/assets/{ArAgingChart-K2LSe8mo-8wVTOMUv.js → ArAgingChart-Dg0oBo5K-CF9AvFJC.js} +1 -1
  17. package/dist/assets/{ArAgingDetailPage-DCFL9YAy-C_v7XA9q.js → ArAgingDetailPage-CNizMSbt-CgouefYI.js} +4 -4
  18. package/dist/assets/{AttachmentView-Cn3VnVyO-2AecVG_r.js → AttachmentView-B8hloBca-DRZOHo7x.js} +7 -7
  19. package/dist/assets/{BankAccountSection-Au9_D0Ji-CWUpdxVP.js → BankAccountSection-4HNC0ypd-BpuQrkpU.js} +8 -8
  20. package/dist/assets/{BankAccountWarningSection-927iR_QB-DZ1ZjG-a.js → BankAccountWarningSection-BqgTMjDy-DwldrkYy.js} +7 -7
  21. package/dist/assets/{BankConnectionsSettingsPage-CXab8fzD-DrAzYcY3.js → BankConnectionsSettingsPage-BBQh1oT8-CYERxE0e.js} +26 -26
  22. package/dist/assets/{BillDetailPage-yIdrE7YG-MPJpbHEH.js → BillDetailPage-R4oRrdsm-Bhl-v3vo.js} +20 -20
  23. package/dist/assets/{BillPayApprovalRuleDetailPage-BJl_-eJN-DfaKZiCw.js → BillPayApprovalRuleDetailPage-d_A1-Gv_-D0vt2nJT.js} +1 -1
  24. package/dist/assets/{BillPayApprovalRulesPage-rXaFCSLp-B4hJZE4K.js → BillPayApprovalRulesPage-5q5b2drs-DNrIHclU.js} +8 -8
  25. package/dist/assets/{BillPayPromoPage-BLi_wIbj-CSiPqqF2.js → BillPayPromoPage-Dz_R3Vd_-D4VHTD7W.js} +10 -10
  26. package/dist/assets/{BillPaySetUpPage-BFmpWT_x-BdnlBxHY.js → BillPaySetUpPage-CwTRrElO-Dy2xJbwX.js} +2 -2
  27. package/dist/assets/{BillingSettingsPage-Da01aYql-CO5KbCIq.js → BillingSettingsPage-_XJCl2yq-D0rAMBJt.js} +5 -5
  28. package/dist/assets/{BillsBulkReviewDrawerPage-J2kO9_8C-DvF5RYPT.js → BillsBulkReviewDrawerPage-B_S35aKX-pMNSaHSP.js} +1 -1
  29. package/dist/assets/{BoxItem-CQlEDklH-CpOQze_E.js → BoxItem-9JmA6QqI-D4hhkbCR.js} +4 -4
  30. package/dist/assets/{BusinessVerificationPage-DWhXCuG5-CLLfRzHs.js → BusinessVerificationPage-DJKOIC1M-BEeGVZ1S.js} +11 -11
  31. package/dist/assets/{CardNumberSubText-BTjxrF3b-Dd1chwrY.js → CardNumberSubText-CewmMWju-DJiRPNiZ.js} +1 -1
  32. package/dist/assets/{CashbackDetailPage-qcMtGUQ0-CNgA1vkF.js → CashbackDetailPage-HtjAmPa8-DEVbhkAr.js} +26 -26
  33. package/dist/assets/{ChargeCardDetailPage-BurpUHl9-CHOF0hOK.js → ChargeCardDetailPage-D_5vb_92-DYjdXqRv.js} +27 -27
  34. package/dist/assets/{ChargeCardListPage-CBIYOllB-C5IIqKJ8.js → ChargeCardListPage-BT-8bueF-C8QRxzgr.js} +23 -23
  35. package/dist/assets/{ChargeCardListTable-BTZu7ldI-HV9pRu0d.js → ChargeCardListTable-oJTQcOkc-HAou4pja.js} +104 -104
  36. package/dist/assets/ChargeCardPromoPage-Dp01F4cn-Br2kcjZo.js +222 -0
  37. package/dist/assets/{ChargeCardSetupPage-QOdjFcsr-DPZS2Ku4.js → ChargeCardSetupPage-cqydgFPZ-KP5FKJ0i.js} +2 -2
  38. package/dist/assets/{ChargeCardStatementsPage-C1UmjyIW-D6OuW8Qw.js → ChargeCardStatementsPage-URwhXATj-BVz6_ztr.js} +8 -8
  39. package/dist/assets/{ChargeCardUtils-C3fhOMpV-Bs2JPnXP.js → ChargeCardUtils-DBEgXAMc-DYsQMmpv.js} +1 -1
  40. package/dist/assets/{ChaseOverlay-RPex2o5e-DW09zrbw.js → ChaseOverlay-HTpWDuLt-D0qtM7hD.js} +10 -10
  41. package/dist/assets/CheckDepositDrawerPage-DLc3qfVH-Dq_DIMy3.js +206 -0
  42. package/dist/assets/{CollapsableReportTable-Ds0h8x1N-Cp0fRlE2.js → CollapsableReportTable-PpQgBBRC-BpxIl-X-.js} +93 -93
  43. package/dist/assets/{CompanyOfficerDetailsSection-B8yGAFVj-DKWPUUTw.js → CompanyOfficerDetailsSection-C1aPsDga-DX0GYxxu.js} +35 -35
  44. package/dist/assets/{CompanyPassportCard-BDei9Pfp-D0uwhtPQ.js → CompanyPassportCard-DMKqBgwh-20YLIkOw.js} +6 -6
  45. package/dist/assets/{CompanyPassportPage-DFA733vS-BIvmx8nC.js → CompanyPassportPage-CHHPIqN_-CQsnT2Hp.js} +37 -37
  46. package/dist/assets/CompleteProfile-D6jHfaC2-Cwowcy8N.js +36 -0
  47. package/dist/assets/{ConfettiBurst-97CCPVCH-DogXPRqs.js → ConfettiBurst-14a5kaEE-D-oFz-sG.js} +1 -1
  48. package/dist/assets/{CreateOrEditVendorPage-BSi6pOXN-60R3TaVL.js → CreateOrEditVendorPage-K5rhe_y3-6e_B7drg.js} +11 -11
  49. package/dist/assets/{CreditCardPaymentDrawerPage-ZletyeGG-ChI8BG09.js → CreditCardPaymentDrawerPage-LQ--HUI9-Ct-Z_PH4.js} +20 -20
  50. package/dist/assets/{CreditCardPaymentPlgSection-BE982atG-ChH0EM9O.js → CreditCardPaymentPlgSection-BM05WC-i-Bk08bY1j.js} +12 -12
  51. package/dist/assets/{CurrencySelectField-cnP09xH2-CzK_uHkh.js → CurrencySelectField-bhkJTNUW-TAA9r3NA.js} +4 -4
  52. package/dist/assets/{CustomerOnboardingActivationPage-DhcKiTJ_-BwUbkzAO.js → CustomerOnboardingActivationPage-BHD1irjF-BuHM5vzQ.js} +9 -9
  53. package/dist/assets/CustomerOnboardingContainerPage-BhS5NmVt-CloO5_fX.js +1 -0
  54. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-jguCmaVx-df6TlzkN.js → CustomerOnboardingDetailPageSkeleton-B--kAA3i-BtWP8-CX.js} +11 -11
  55. package/dist/assets/{CustomerOnboardingNoStepsPage-xakP7IDr-C-0r2BD6.js → CustomerOnboardingNoStepsPage-sHKAos8m-1qMzs8BU.js} +5 -5
  56. package/dist/assets/{CustomerOnboardingPage-Ct5YbyHs-CAyxa338.js → CustomerOnboardingPage-B_S5G-6o-Cv0ITZ4_.js} +10 -10
  57. package/dist/assets/{CustomerOnboardingProductSuitePage-CugfvMkw-CslbljsJ.js → CustomerOnboardingProductSuitePage-CVi8WuQY-DZMQtVHo.js} +12 -12
  58. package/dist/assets/{Dashboard-XbVGCnvI-_hcViTk2.js → Dashboard-CIMiF6eU-SPzOaUuR.js} +1 -1
  59. package/dist/assets/{DashboardReportPage-OeEPg2kx-C3vOR__5.js → DashboardReportPage-6z6qBQSB-C79wD_Nr.js} +21 -21
  60. package/dist/assets/{DepositAccTransactionItem-Dy6qzuSL-CpAkao08.js → DepositAccTransactionItem-BQYFrzDW-VNbpp2iU.js} +10 -10
  61. package/dist/assets/DepositAccTransactionListPage-xSNsUwS4-DJcgYerm.js +66 -0
  62. package/dist/assets/{DomesticWireDetailsPage-B0tbjNLO-CzO-wZCX.js → DomesticWireDetailsPage-b1iB1HBM-CrTulX9A.js} +1 -1
  63. package/dist/assets/{DownloadOverlay-BKKO1nm1-C2Pb_CvM.js → DownloadOverlay-C3oy6eq7-CCVozCSE.js} +12 -12
  64. package/dist/assets/{DrawerPage-osM8gPVn-DjFhvXE_.js → DrawerPage-DLVTld-y-Cb3VyNgX.js} +12 -12
  65. package/dist/assets/EditPeoplePage-DKJNf1oJ-6CdgkITi.js +55 -0
  66. package/dist/assets/{EditReimbursementDetailPage-DvLeCixY-DsVIw_1c.js → EditReimbursementDetailPage-zgUt303N-BpiV7KXr.js} +80 -80
  67. package/dist/assets/{EntityDetailPage-BzJbAOSj--n76aj0W.js → EntityDetailPage-DY4i6GZK-DN-UWde9.js} +3 -3
  68. package/dist/assets/{EntitySummarySection-Drj07P9h-B2lq71iV.js → EntitySummarySection-BbxeYdm8-Bf_NXajy.js} +13 -13
  69. package/dist/assets/{ExpenseAutomationOverviewPage-BQ9dwGkq-CJ6yhltW.js → ExpenseAutomationOverviewPage-D3x3XpmU-fjM7OZCO.js} +31 -30
  70. package/dist/assets/{ExpenseAutomationPage-DLld6Lux-0w2CvM4U.js → ExpenseAutomationPage-BTAjM6yZ-yDXqzAOJ.js} +56 -56
  71. package/dist/assets/{ExpressPayPage-QBNV0dC8-ZmY9Sslu.js → ExpressPayPage-C30-lVTo-C8uKTmQz.js} +11 -11
  72. package/dist/assets/FeaturePreviewPage-BRqSxk9H-D2VfZkvq.js +11 -0
  73. package/dist/assets/{FollowStepsSection-1RCO2W7K-8GLsxGi6.js → FollowStepsSection-B171fPtM-D2ueI9DZ.js} +28 -28
  74. package/dist/assets/{GlobalReviewListPage-ByMZFe7Y-DU4g2-mq.js → GlobalReviewListPage-BaZx32sB-CsLBtCph.js} +14 -14
  75. package/dist/assets/HelpButton-ewiNuwlj-a7BLQVoR.js +28 -0
  76. package/dist/assets/{InformationCardStack-C0AmMOu2-CsXKnz33.js → InformationCardStack-BtxneVKK-CvEQzEwX.js} +6 -6
  77. package/dist/assets/{InsightsCardStack-BiIDBYY8-BDWjMJ74.js → InsightsCardStack-CCee6pLA-D-hqWx-q.js} +7 -7
  78. package/dist/assets/InsightsSection-BZNwdoG4-BHWxrsk5.js +27 -0
  79. package/dist/assets/{IntegrationsSettingsPage-7wAnV8kG-a8zGkb-o.js → IntegrationsSettingsPage-CsY38-LI-tUcaBNIE.js} +9 -9
  80. package/dist/assets/{InternationalWireSwiftDetailsPage-C7D15jtK-CNlL_DBa.js → InternationalWireSwiftDetailsPage-sSSgjYdh-CECQrN0I.js} +17 -17
  81. package/dist/assets/{InternationalWireVerificationPage-GDKPXtU--DouJAx7L.js → InternationalWireVerificationPage-zv0FIhUz-BUPdBF6w.js} +14 -14
  82. package/dist/assets/{InviteFormPage-CKGJHYWa-ThYyvIC6.js → InviteFormPage-DxszbbOJ-CJWqS0tA.js} +19 -19
  83. package/dist/assets/{InvitePageListView-CWXyDZU2-B1FV1J7C.js → InvitePageListView-BYVWTwTc-Dq61wzB9.js} +46 -46
  84. package/dist/assets/InvitePeoplePage-CJ4KyyxI-Ci7vEwdq.js +12 -0
  85. package/dist/assets/InvoiceUploadSection-Dy_H9a8Y-CvpINn7W.js +140 -0
  86. package/dist/assets/{IssueChargeCardPage-DLX44XaR-DJEU4BAz.js → IssueChargeCardPage-CPmj_trJ-CTV2OfvE.js} +19 -19
  87. package/dist/assets/LabeledAddressValue-BVpwGdA2-5vfMRzOg.js +49 -0
  88. package/dist/assets/LabeledAddressValueField-Eka4fXzu-BSJMd52k.js +45 -0
  89. package/dist/assets/{LabeledControlledCheckBoxField-B6cLYSmS-HQU25j6e.js → LabeledControlledCheckBoxField-BnfJ3gKr-7p5KdXvW.js} +1 -1
  90. package/dist/assets/{LabeledCreatableSingleSelectField-CV4GQQ7F-DB0whr2c.js → LabeledCreatableSingleSelectField-CJT-CuQl-C0rlBcX2.js} +4 -4
  91. package/dist/assets/{LabeledDocumentField-BFhyNqP8-BF1FtSO9.js → LabeledDocumentField-BoraKtTI-BRERXK8W.js} +6 -6
  92. package/dist/assets/{LabeledDropDownFormattedTextField-gE3aWP_T-D1puR-he.js → LabeledDropDownFormattedTextField-elNvxcOB-BPm7rTz8.js} +7 -7
  93. package/dist/assets/{LabeledText-0pRIcJw5-DnreSqVg.js → LabeledText-DhZgeQqu-Dz4gRnMS.js} +1 -1
  94. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-C-32ySGI-Ckf3XRJ6.js → LabeledUserSingleSelectWithSubtitlesField-D63Z4SE5-Hunv1W3n.js} +16 -16
  95. package/dist/assets/{LabeledZeniRolesDropDownField--l6D29VX-2y_t8N2x.js → LabeledZeniRolesDropDownField-MwrQ9tKT-DwAqMpNU.js} +11 -11
  96. package/dist/assets/{LinkJETransactionPage-DLcpx9ns-B4OQKP_z.js → LinkJETransactionPage-BpQXs8JH-CczVuOJd.js} +6 -6
  97. package/dist/assets/{LowBalancePopup-BuelKDeS-DmsngLwA.js → LowBalancePopup-DPbr0gUO-BMtDcyj7.js} +7 -7
  98. package/dist/assets/{MagicLinkACHDetailsPage-NIkquHvv-DhLEEbR7.js → MagicLinkACHDetailsPage-D11FRh9u-CA4ESgf_.js} +1 -1
  99. package/dist/assets/{MagicLinkDomesticWireDetailsPage-CdaNz396-CGsvsJCT.js → MagicLinkDomesticWireDetailsPage-CG7yqz6X-CxkGJZaJ.js} +1 -1
  100. package/dist/assets/{MagicLinkInternationalWireDetailsPage-CnEhS5PP-BfdXlGYo.js → MagicLinkInternationalWireDetailsPage-PkDENzkO-BALvlHZZ.js} +1 -1
  101. package/dist/assets/{MagicLinkSuccessPage-D_VJZV0O-DKgCh3Z1.js → MagicLinkSuccessPage-BS9ddhQA-DfzVlezu.js} +2 -2
  102. package/dist/assets/MagicLinkTitleSection-CBYkZ8RD-DOnIUCAU.js +17 -0
  103. package/dist/assets/{MailingDetailsSection-CTrx1xoB-DJHX02qB.js → MailingDetailsSection-Cx1s77og-DXexyF-i.js} +1 -1
  104. package/dist/assets/{MeetingCalenderPopup-DWvpTRQJ-B65gs1hH.js → MeetingCalenderPopup-DNthMj1J-DCVu9x9-.js} +1 -1
  105. package/dist/assets/{Menu-CbQ6Zkdp-D6lRjeT8.js → Menu-CIjXHu3p-BVUzW_3W.js} +1 -1
  106. package/dist/assets/{MyBankConnectionsSettingsPage-9dQLb8iw-h322l6cg.js → MyBankConnectionsSettingsPage-D77Axpyj-Dsr9teql.js} +15 -15
  107. package/dist/assets/{MyPendingActivationChargeCardListPage-B2-YthuF-CH0O9Vq4.js → MyPendingActivationChargeCardListPage-CnZZJsMY-KyflajTT.js} +2 -2
  108. package/dist/assets/{MyProfileSettingsPage-CfmYPv4_-m8ou3iA-.js → MyProfileSettingsPage-iXkYV9nQ-C8PmA-Fq.js} +6 -6
  109. package/dist/assets/NavBarWithPicker-D8Mx-0SS-CQTf4kGi.js +30 -0
  110. package/dist/assets/{NavigationArrow-9pvhzLz8-Cjtb_5vy.js → NavigationArrow-DOvptaEZ-B1BrtWg6.js} +2 -2
  111. package/dist/assets/{NavigationDots-CXPwKFh1-D0BlOlke.js → NavigationDots-HukimDRY-BSdcE3Mo.js} +1 -1
  112. package/dist/assets/{NewGlobalMerchantPage-D6ZpP6J1-BvWRpxN8.js → NewGlobalMerchantPage-BlOMnHda-Cw8vvr0B.js} +12 -12
  113. package/dist/assets/{NoDataChart-BUR7CF8w-D1wb8NU8.js → NoDataChart-DyGfwFNo-Bpe0xKgS.js} +1 -1
  114. package/dist/assets/{NoDataTable-3L4pbKR0-DADiNiUz.js → NoDataTable-CJseWuln-x_ccMVrT.js} +1 -1
  115. package/dist/assets/{NotFoundPage-CgZfmKbj-zfL-Bldu.js → NotFoundPage-UG00-OBF-BoQnjyIO.js} +1 -1
  116. package/dist/assets/{NotificationSettingsPage-BwYT3Tdc-NOzItap9.js → NotificationSettingsPage-COyRIY7z-B69eM29f.js} +17 -17
  117. package/dist/assets/NotificationsListConfig-BR7QDiGp-CoZ9cxNa.js +1 -0
  118. package/dist/assets/{NotificationsPage-6qNQYQK4-BVdwZRiv.js → NotificationsPage-DNSiZHw_-DhSCbYyU.js} +38 -38
  119. package/dist/assets/{OpExByVendorPage-C28MBvmW-DRKZbvH2.js → OpExByVendorPage-DmSYppgo-B8QxoNs0.js} +7 -7
  120. package/dist/assets/{OverlayContainerPage-9K5jaX8Z-Co7rIc3P.js → OverlayContainerPage-DB42kFLd-BB8Mm-uG.js} +1 -1
  121. package/dist/assets/{PandLWithForecastPage-onJJ3Fh4-VHgA6a_C.js → PandLWithForecastPage-Cvpj3Rx7-BBqZBlne.js} +12 -12
  122. package/dist/assets/{PaymentAccountSetupBillingAddressSection-nGuJ5fbq-Bl9Hzudf.js → PaymentAccountSetupBillingAddressSection-CsldB-k7-VgWcdB9R.js} +9 -9
  123. package/dist/assets/{PeoplePage-CKzezKqB-C-ecacKb.js → PeoplePage-CZhJF86l-BUJerLay.js} +33 -33
  124. package/dist/assets/PortfolioAllocationFormPage-9GM9dOrM-B8ssUltJ.js +207 -0
  125. package/dist/assets/{PortfolioDetails-CIv1yXo2-Cn8bwh7v.js → PortfolioDetails-BmAHjCVw-CsG6lf5x.js} +42 -42
  126. package/dist/assets/{ProductsCarousel-CSUQ6rVw-Bd7wsnlW.js → ProductsCarousel-DnbMUIHf-CibvwP8L.js} +7 -7
  127. package/dist/assets/{PromoBaseCards-2L1JfY-v-2Z0dVig4.js → PromoBaseCards-BC5rOok_-CbjLwgXv.js} +1 -1
  128. package/dist/assets/{QBOConnectionDialog-DNP_b7aK-Bxywaa9r.js → QBOConnectionDialog-Ci5zNza5-6_E7GkKa.js} +4 -4
  129. package/dist/assets/{QBOSetupSection-CGrGCC2j-ZviOH5QS.js → QBOSetupSection-BTOCiyES-BQ9iHLEQ.js} +12 -12
  130. package/dist/assets/{ReimbursementApprovalRuleDetailPage-DqxyCfuQ-TKf1S-sK.js → ReimbursementApprovalRuleDetailPage-BfU-6jeB-4BEDb2U8.js} +1 -1
  131. package/dist/assets/{ReimbursementApprovalRulesPage-D_RMSSoW-Bf_KsPWO.js → ReimbursementApprovalRulesPage-M8JZSUOE-C8eBggiH.js} +32 -32
  132. package/dist/assets/{ReimbursementDetailPage-BkT7zJoE-DxIxRel2.js → ReimbursementDetailPage-D54RyrP4-DTi4hKLb.js} +23 -23
  133. package/dist/assets/ReimbursementPromoPage-B2uVT4md-CMAH_EoV.js +112 -0
  134. package/dist/assets/{ReimbursementSetUpPage-lH4Z7Lqi-BjSmn0a4.js → ReimbursementSetUpPage-DgZLqhEv-7jHyoRwK.js} +13 -13
  135. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-Bvh4mRws-H31l-TPn.js → ReimbursementsBulkReviewDrawerPage-DdaqWcd4-DhSMDa4E.js} +1 -1
  136. package/dist/assets/{ReloadCard-BQKVLlzZ-kVLw1q8k.js → ReloadCard-Brl4XdzV-avg2x7k6.js} +5 -5
  137. package/dist/assets/{ReportTableViewSelector-Cvk4LxRf-EyWXn90g.js → ReportTableViewSelector-BUwsckE_-Cr50tsiY.js} +9 -9
  138. package/dist/assets/{ReportsPage-C2cIfu51-5H5N0irE.js → ReportsPage-B_p1fu0v-DX66zZ_7.js} +4 -4
  139. package/dist/assets/{RevenueChart-ByCekdyG-CbrdKEhj.js → RevenueChart-Wm8uOprY-DjqKlnHO.js} +17 -17
  140. package/dist/assets/{ReviewDetailsPage-DGyfz9q5-JDs12zdM.js → ReviewDetailsPage-KBHsF8bJ-BZe7KZL0.js} +26 -26
  141. package/dist/assets/{ReviewOverlay-Dp5yLAdR-D5ldovaw.js → ReviewOverlay-Dw0qj7TA-qOb8xPV_.js} +21 -21
  142. package/dist/assets/{RoleWithToolTip-B7xRZ-3a-C1CQ4C1p.js → RoleWithToolTip-XfK92pcD-DtUyDW-U.js} +4 -4
  143. package/dist/assets/{ScheduleDetailsFixedAssetsPage-BvJX-G-F-DjgDOThV.js → ScheduleDetailsFixedAssetsPage-BWlIEli5-C8Xnu1wF.js} +8 -8
  144. package/dist/assets/{ScheduleDetailsPage-CNpkuW7O-8EQwuxLj.js → ScheduleDetailsPage-C1xCJX3o-Cpr_7FVH.js} +3 -3
  145. package/dist/assets/{ScheduleSequenceTable-B_90qPjE-D3mQ-hUZ.js → ScheduleSequenceTable-BprYPV37-CbJbmsNz.js} +48 -48
  146. package/dist/assets/{ScreenRoutes-Df1GkgZA.js → ScreenRoutes--7yT1DKW.js} +62 -62
  147. package/dist/assets/{SetUpAccountSection-D5x8PZG1-BA29puUF.js → SetUpAccountSection-Dr1TfnG_-Cel5DtZp.js} +24 -24
  148. package/dist/assets/{SetUpDefaultSection-BsOdnADR-fIw9FyAe.js → SetUpDefaultSection-Be5NU_Em-BdXA12e3.js} +9 -9
  149. package/dist/assets/{SignIn-Bt7hCYjV-CwfH0JLW.js → SignIn-CE6RYJOs-ty2bYK-D.js} +20 -20
  150. package/dist/assets/{SignInScreen-CWUZN0CQ.js → SignInScreen-B_Dlksbi.js} +1 -1
  151. package/dist/assets/{SpendManagementListViewPage-C5cJKuRq-C1_jwmdt.js → SpendManagementListViewPage-BESddx6p-DEy09jpS.js} +11 -11
  152. package/dist/assets/{SpendManagementPerTabPage-IBAw8wc4-Bn0g9_Tf.js → SpendManagementPerTabPage-BzOooEMS-CS5nadJ3.js} +56 -56
  153. package/dist/assets/{SpendManagementSection-yNP3swb6-BIaTdSBC.js → SpendManagementSection-CczioNZH-D_OdnYKx.js} +12 -12
  154. package/dist/assets/{SpendMgmtSetupAccountSection-CYxt9dN8-BxpldXSf.js → SpendMgmtSetupAccountSection-CVFRXVhZ-KbAbVozh.js} +22 -22
  155. package/dist/assets/{StatementItem-q9U89Htr-DJqALh3W.js → StatementItem-Cptht91w-CXR-Xt2m.js} +8 -8
  156. package/dist/assets/StatementsPage-Bk_DWBsO-D9kCpcdC.js +58 -0
  157. package/dist/assets/{StatusSwitcher-CtuL5COG-Bd0whTb6.js → StatusSwitcher-B3gZD4Xk-Bh4cnysY.js} +4 -4
  158. package/dist/assets/{SubTabSwitcher-DHiC-mOv-B69z0IV-.js → SubTabSwitcher-ymwMdmPQ-Bui2S7lB.js} +3 -3
  159. package/dist/assets/{SummaryCard-D4Me-qWU-Cw61JFxF.js → SummaryCard-CVO_hW5i-BNIAsEAp.js} +1 -1
  160. package/dist/assets/{TaskManagementPage-D-F7ufTD-E-k_0ZqR.js → TaskManagementPage-C8FiHas2-CSgpx3sK.js} +38 -38
  161. package/dist/assets/{TimeRangeSwitcher-CGN9Hq2L-DPvzjSG7.js → TimeRangeSwitcher-CPklgWMn-CIOi92rx.js} +2 -2
  162. package/dist/assets/{TimeframeSwitcher-BN4-ACoQ-DRoCnrrw.js → TimeframeSwitcher-Do-13K0C-DY9TYA6Y.js} +1 -1
  163. package/dist/assets/{TimeframeSwitcherWithToggle-BkzCFclG-CATb3Hw3.js → TimeframeSwitcherWithToggle-CtVJiYRA-BFfeCNSf.js} +2 -2
  164. package/dist/assets/{TopExCard-Wuzj4gLV-C7hKo1xh.js → TopExCard-CAbVMarX-DzMoRGlM.js} +5 -5
  165. package/dist/assets/{TopExDetailPage-DMYNc-gj-BOIId_ra.js → TopExDetailPage-CN49s925-BpBrFgHR.js} +10 -10
  166. package/dist/assets/{TransactionDetailPage-CcryBjJ4-BBoQstAc.js → TransactionDetailPage-Q9XC1VgP-B1t0fuZa.js} +35 -35
  167. package/dist/assets/{TransactionList-BrOpzi25-BpXcE9sq.js → TransactionList-Pn-voMDJ-cxv4xlA8.js} +12 -12
  168. package/dist/assets/{TransactionListBig-D6QMNaV6-dxXwqgSe.js → TransactionListBig-D4U1VfMP-q6KLDBuW.js} +25 -25
  169. package/dist/assets/{TransactionListPage-BB_LkPKR-D44T4dDk.js → TransactionListPage-Dcr5n_hs-BCiA3wu6.js} +4 -4
  170. package/dist/assets/TransactionVendorDetailPage-DxDXndQ6-Cuilftgh.js +80 -0
  171. package/dist/assets/TransferDrawerPage-CuQct69A-B079B2IU.js +362 -0
  172. package/dist/assets/{TreasuryOverviewPage-EDaXKMNQ-D8fnAwU_.js → TreasuryOverviewPage-BDYqKBrS-CScokRvu.js} +56 -56
  173. package/dist/assets/{TreasuryPromoPage-Brja4nGR-4ejoYZft.js → TreasuryPromoPage-CTkEFZ57-BEp9DAWk.js} +22 -23
  174. package/dist/assets/{TreasurySetupPage-8ZXXBvyU-CSrGG7JX.js → TreasurySetupPage-KI_5DQnD-D9S_zLnk.js} +3 -3
  175. package/dist/assets/{TreasuryStatementsPage-BjT1FVfa-CDFhhK60.js → TreasuryStatementsPage-DB1KkguP-BSv5nFQ9.js} +5 -5
  176. package/dist/assets/{TreasuryTaxLetterPage-Cxk8TjrI-BYzTKoII.js → TreasuryTaxLetterPage-DbHBl6-e-B10fxK69.js} +5 -5
  177. package/dist/assets/TreasuryTransferOrReviewPage-CLJ2x2M1-Q00AAxLj.js +506 -0
  178. package/dist/assets/{TrendChart-D2B0mwGW-CDLMKcy5.js → TrendChart-Ck4SVLtn-DxCRoE-5.js} +5 -5
  179. package/dist/assets/{TrendWithTransactions-Ch8smOOz-dEqRqTOG.js → TrendWithTransactions-BiWHzfIf-CM8I_QYq.js} +6 -6
  180. package/dist/assets/{UncategorizedAccountsMappingPage-CCIn9g7v-q0ijIBJ8.js → UncategorizedAccountsMappingPage-BEbiQMPB-P5OqOc0G.js} +8 -8
  181. package/dist/assets/{UnitIntegrationPage-SY0L_D7Z-CKGuE_M5.js → UnitIntegrationPage-DghvgER8-G5psF27e.js} +5 -5
  182. package/dist/assets/{UploadAdditionalDocumentOverlay-BowxerPw-BznAQGh0.js → UploadAdditionalDocumentOverlay-BasudeQ3-BthiTAoM.js} +2 -2
  183. package/dist/assets/Vendor2FAPopup-BVYQk2Yt-C9WsXmh_.js +1 -0
  184. package/dist/assets/{VendorACHDetailsPage-Ba1oMHkp-YzZn8D1q.js → VendorACHDetailsPage-DYwQERlH-B1gQMIfP.js} +1 -1
  185. package/dist/assets/{VendorDetailPage-CjBeVAkw-D_BTgh0F.js → VendorDetailPage-D-Mcnqod-jIU9WO5F.js} +13 -13
  186. package/dist/assets/{VendorDomesticWireDetailsPage-DJcyNUun-XfBIF9jc.js → VendorDomesticWireDetailsPage-sx958z_p-CRI6ZI2U.js} +1 -1
  187. package/dist/assets/{VendorFiling1099EditablePage-CUWkLY0f-CuezbVxz.js → VendorFiling1099EditablePage-D0AAdqa3-D6a_Y5gP.js} +11 -11
  188. package/dist/assets/{VendorFirstReviewPage-XUgEai-M-D0i_iEBg.js → VendorFirstReviewPage-DS7Qb6O_-DE9J3Hnv.js} +30 -30
  189. package/dist/assets/{VendorInternationalWireDetailsPage-BgHCBv0S-D_ke2Imn.js → VendorInternationalWireDetailsPage-CUw0lbm5-B48sIzNH.js} +13 -13
  190. package/dist/assets/{VendorInternationalWireSwiftDetailsPage-axseacZL-DrQ20j5u.js → VendorInternationalWireSwiftDetailsPage-2BGGr3aV-bgtv6P0O.js} +1 -1
  191. package/dist/assets/{VendorsAccountsSection-oYghWvs6-CBTS5C2m.js → VendorsAccountsSection-D5-r6xWp-BXiiVWTo.js} +4 -4
  192. package/dist/assets/{WarningsDrawerPage-B1his2AN-DWCRBrQ3.js → WarningsDrawerPage-BEuiclea-2arBaAmM.js} +9 -9
  193. package/dist/assets/{ZeniAccountDetailPage-B21kawRR-DGJGfsGD.js → ZeniAccountDetailPage-DvUTbTBC-BePzTP3_.js} +31 -31
  194. package/dist/assets/{ZeniAccountListViewPage-D9lefqbT-aMx9U6Vt.js → ZeniAccountListViewPage-BpAa6XZc-xCgx2LuK.js} +22 -22
  195. package/dist/assets/ZeniAccountNavBarPieces-CBRZuAIU-D4DE3sLv.js +14 -0
  196. package/dist/assets/{ZeniAccountPromoPage-B8aWqCOQ-C46UIAAl.js → ZeniAccountPromoPage-BDzkOGum-ucUtzXa7.js} +22 -22
  197. package/dist/assets/{ZeniAccountSetupPage-BmFF5yvk-ncauPk_L.js → ZeniAccountSetupPage-B6ExD1mo-DRJ8Xy53.js} +1 -1
  198. package/dist/assets/{ZeniCopyright-eQoaUH08-BAcaltmK.js → ZeniCopyright-BcpJPWHG-DnS0u_xy.js} +1 -1
  199. package/dist/assets/{ZeniTransferAmountSlider-B6ftMZ_m-CBjZaRui.js → ZeniTransferAmountSlider-BQDqgNKJ-Buxspfp3.js} +2 -2
  200. package/dist/assets/{analyticsHelper-Bns4muDg-CNix0JAa.js → analyticsHelper-BP6myd2z-CsiFRwZa.js} +1 -1
  201. package/dist/assets/{analyticsHelper-DIkeHXkP.js → analyticsHelper-CL3ebWyT.js} +1 -1
  202. package/dist/assets/{chartTypes-ZJYcsh-k-QASYidAg.js → chartTypes-BU-pRq_m-4W1rDqui.js} +1 -1
  203. package/dist/assets/{commonDimensions-NUQEpowf-IZPez2Zj.js → commonDimensions-BpaqG_u8-Hm0X7sCE.js} +1 -1
  204. package/dist/assets/{detailCommon-DMKakaa6-Bgcgnt6c.js → detailCommon-dG26UIR2-hMVwnMUq.js} +6 -6
  205. package/dist/assets/{downloadPdf-CNrmv_yZ-CxSqkh2v.js → downloadPdf-B5Tb5dp_-Ct6A3VYi.js} +1 -1
  206. package/dist/assets/{index-D3AeqRGt.js → index-C5chxI3W.js} +4203 -4371
  207. package/dist/assets/{mapLoadingInProgressToTreeNode-CwLhcXcQ-DE5uV0w5.js → mapLoadingInProgressToTreeNode-DOBKyY4b-Cji_pzGZ.js} +1 -1
  208. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-D8iLkGEE-DaBUvlwh.js → mapSectionWithAcOnlyToTreeNode-Bja0zC1h-BgIeww8r.js} +1 -1
  209. package/dist/assets/{mapSpacerToTreeNode-CF_gEYDy-omwVP5Kf.js → mapSpacerToTreeNode-BnX1Qa3P-BdNPRcx1.js} +1 -1
  210. package/dist/assets/{mapTimeframeBalancesToTreeNode-Dp2QmYvb-FnBEwh3Z.js → mapTimeframeBalancesToTreeNode-BTMBlZfj-BF58Lu6L.js} +1 -1
  211. package/dist/assets/{mapTimeframeBalancesToTreeNode-B672MK55-1iS28pBs.js → mapTimeframeBalancesToTreeNode-DRU0rg28-CA6THCw5.js} +1 -1
  212. package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-BaEMd-vj-y-nXGJ6b.js → mapTimeframeHeaderLoadingInProgressToTreeNode-CafUd-oV-Xm435fDX.js} +1 -1
  213. package/dist/assets/{play-icon-CgWP2Myd-CjzXITiB.js → play-icon-CwzVvYsB-Do7CqLGc.js} +1 -1
  214. package/dist/assets/{toCOABalancesWithID-DJNZCEmi-D9lE8sxN.js → toCOABalancesWithID-CTIZoP69-DeVrMVx4.js} +1 -1
  215. package/dist/assets/{toChartData-HYsxUPzh-CN6TOhlP.js → toChartData-yWFIkpKX-RS3uH3U9.js} +1 -1
  216. package/dist/assets/{treasuryColorHelper-BgV2H9Kv-BBaiHC7Z.js → treasuryColorHelper-I90KNlm_-BYEIYIdA.js} +1 -1
  217. package/dist/assets/{uploadAttachment-BgjFjkkw-CHJQ_-jA.js → uploadAttachment-BIyTb3QF-DLfW32Gd.js} +35 -35
  218. package/dist/assets/{uploadReceipts-CwjPukNh-CnV2uz7X.js → uploadReceipts-CB79ouJi-D3aL_mpJ.js} +1 -1
  219. package/dist/index.html +1 -1
  220. package/package.json +4 -4
  221. package/dist/assets/ACHDetailsPage-BwrF_fEr-Bl6tw_2_.js +0 -21
  222. package/dist/assets/ApAgingDetailPage-CsQ3DujX-DlJxm9wv.js +0 -46
  223. package/dist/assets/ChargeCardPromoPage-us_v89rV-BWpqYDUH.js +0 -222
  224. package/dist/assets/CheckDepositDrawerPage-XZJ1F0aC-DZabwxX9.js +0 -206
  225. package/dist/assets/CompleteProfile-BpX6H4vJ-CZDJQ04r.js +0 -52
  226. package/dist/assets/CustomerOnboardingContainerPage-C1higvpq-tWYvfVXz.js +0 -1
  227. package/dist/assets/DepositAccTransactionListPage-BisaE6sH-CNi5QHjT.js +0 -66
  228. package/dist/assets/EditPeoplePage-ixJkT03_-BL4teQzP.js +0 -55
  229. package/dist/assets/FeaturePreviewPage-CpBX-Xic-CzzPQxyN.js +0 -11
  230. package/dist/assets/HelpButton-CzTfBZQj-CySfZ02w.js +0 -28
  231. package/dist/assets/InsightsSection-C-kpIvRH-BPjMKWaa.js +0 -27
  232. package/dist/assets/InvitePeoplePage-CPBMZNa--CIaNjMb9.js +0 -12
  233. package/dist/assets/InvoiceUploadSection-C0WzT0uv-BIhpe2Cm.js +0 -140
  234. package/dist/assets/LabeledAddressValue-B8awEVKI-D-PU1InD.js +0 -49
  235. package/dist/assets/LabeledAddressValueField-Dl5yKg2N-CEGK2Y9X.js +0 -45
  236. package/dist/assets/MagicLinkTitleSection-tHh2d5Ld-CTdvPKXv.js +0 -17
  237. package/dist/assets/NavBarWithPicker-Bzkl4W0x-CfzrLfDY.js +0 -30
  238. package/dist/assets/NotificationsListConfig-CeeJpJ2p-9azM46PI.js +0 -1
  239. package/dist/assets/PortfolioAllocationFormPage-28Rg5Um0-DY6maLGs.js +0 -207
  240. package/dist/assets/ReimbursementPromoPage-DQsLI50f-DvOFKYbI.js +0 -112
  241. package/dist/assets/StatementsPage-BM5Glizw-KJqDC7mS.js +0 -58
  242. package/dist/assets/TransactionVendorDetailPage-RajWBB1I-n3kajgLY.js +0 -80
  243. package/dist/assets/TransferDrawerPage-D-KFK0BM-BSonC9br.js +0 -362
  244. package/dist/assets/TreasuryTransferOrReviewPage-DrNld8H2-pA_lhDcW.js +0 -506
  245. package/dist/assets/Vendor2FAPopup-DvWVDx58-BBDrtmPb.js +0 -1
  246. package/dist/assets/VerifyDevice-XUExnmR9-BVFZuTkv.js +0 -67
  247. package/dist/assets/ZeniAccountNavBarPieces-5yZFq-zt-CS3RCOOK.js +0 -14
@@ -1,10 +1,10 @@
1
- import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,fL as Qn,fN as Zn,fO as eo,j as t,g5 as to,F as nn,bS as li,bU as on,bV as an,$ as H,o as i,C as c,aW as ki,aK as io,du as no,fP as oo,f_ as rn,fV as Ii,a4 as ln,p as sn,fW as ao,ew as _e,g6 as At,eZ as si,m as xt,g7 as ro,g as j,a3 as cn,s as ci,q as a,aT as lo,fY as so,c8 as co,eD as di,g8 as zt,cT as fe,cV as xe,ca as ui,ck as ct,ei as uo,cS as dn,v as Pt,cd as un,cc as Ze,cs as st,d as mi,g9 as mo,e_ as po,c7 as ho,a8 as Di,aS as go,ap as mn,az as yo,eh as bo,am as Bt,fQ as fo,bq as pn,X as pi,h as hn,cu as gn,bL as Mt,eT as xo,ao as wo,cy as So,c_ as $o,n as hi,J as Ti,bx as yn,ah as ji,cr as vo,B as Co,cg as bn,a0 as ko,ga as fn,gb as ri,fG as Ri,gc as Ot,cq as Io,fK as Do,b5 as To,cp as jo}from"./index-D3AeqRGt.js";import{b as v,n,f as vt}from"./vendor-CnQcJ2Lu.js";import{_ as Ro}from"./liveblocks-DZpRS25q.js";import xn from"./InvoiceUploadSection-C0WzT0uv-BIhpe2Cm.js";import{r as Po,f as Lt,d as yt,p as gi,u as Pi,h as ve}from"./types-DyvtCprH-BcZYcgaq.js";import{D as Oo}from"./LabeledCreatableSingleSelectField-CV4GQQ7F-DB0whr2c.js";import{S as Lo}from"./CurrencySelectField-cnP09xH2-CzK_uHkh.js";import{J as Ao}from"./SetUpDefaultSection-BsOdnADR-fIw9FyAe.js";import{e as zo}from"./BankAccountSection-Au9_D0Ji-CWUpdxVP.js";import{W as Bo,A as Mo}from"./BankAccountWarningSection-927iR_QB-DZ1ZjG-a.js";import{o as Fo}from"./radio-default-CiSgisfh-ub7QGXr8.js";import"./mui-Bi8r7UDG.js";import"./analytics-CBL_L82S.js";import"./routing-CxYXTKiv.js";import"./sentry-HDxG13yk.js";import"./redux-CC-tnuv1.js";import"./crypto-BURQLTgV.js";import"./AttachmentView-Cn3VnVyO-2AecVG_r.js";import"./uploadReceipts-CwjPukNh-CnV2uz7X.js";const Je=(e,o)=>`${e}.${o}`,Oi={largeLabelWidth:new c(120,120,160),paddingBottom:new c(a[3],a[2])},{spendManagement:{reimbursement:{reimbursementDetail:Re}},dateFormat:Eo,common:No}=me.getLocalizedStrings(),Wo=({lineIndex:e,mileage:o,classList:r,defaultCurrency:u,sectionId:p,isReimbursementCommentingEnabled:C,isDisabled:m,isAddReimbursementDisabled:S,companyMileageConfigInfo:b,reimbursementId:l,classHierarchyList:k})=>{const f=Ie(),s=ft(),g=zt(),w=`dashboard_${s.currentTenant?.companyId}`,R=bt(),{getValues:T}=ct(),$=No.strings.empty,K=T(Je(p,"distanceInMiles")),L=Oi.largeLabelWidth.value(f),I={application:"dashboard",companyId:s.currentTenant?.companyId,tab:"reimbursement",entityId:l},E=A=>r.filter(_=>_.classId===A)[0]?.accountingClassNumber,te=r.find(A=>A.classId===o.class),pe={valueContainer:A=>({...A,padding:`2px ${i.sp3} !important`,overflow:"unset"}),singleValue:()=>({margin:0})};return t.jsxs(t.Fragment,{children:[t.jsx(fe,{isThreadAllowed:C&&l!=null,dashboardTabKey:xe({type:"details",key:`${e}.mileage.transactionDate`}),roomId:w,companyId:s.currentTenant?.companyId??$,companyName:s.currentTenant?.companyName??$,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...I,entityType:`reimbursement.details.${ve("transactionDate",e,"mileage")}`},fieldThreadTargetElement:g?.sharedRef?.contentWrapperRef,children:t.jsx(bn,{isDisabled:m,label:{label:Re.transactionDate,width:L},style:{paddingBottom:Oi.paddingBottom.valuePx(f),width:"auto"},dateField:{name:Je(p,"transactionDate"),placeholder:Re.datePlaceholder,defaultValue:o?.transactionDate,dateFormat:Eo.visual.defaultInput,autoComplete:"off",maxDate:ee.dateNow(),registerOptions:{required:!0,validate:A=>!!A}}})}),t.jsx(Ct,{}),t.jsx(fe,{isThreadAllowed:C&&l!=null,dashboardTabKey:xe({type:"details",key:`${e}.mileage.distanceInMiles`}),roomId:w,companyId:s.currentTenant?.companyId??$,companyName:s.currentTenant?.companyName??$,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...I,entityType:`reimbursement.details.${ve("distanceInMiles",e,"mileage")}`},fieldThreadTargetElement:g?.sharedRef?.contentWrapperRef,children:t.jsx(Ri,{isDisabled:S?"disabled":void 0,style:{width:"auto"},label:{label:Re.distanceInMiles,width:L},formattedTextField:{type:"number",name:Je(p,"distanceInMiles"),placeholder:Re.addMiles,defaultValue:o.distanceInMiles,registerOptions:{required:!0,validate:A=>A!=null?A>0:!0,min:.01},returnValueType:"floatValue",allowNegative:!1,isNumericString:!1,decimalScale:2}})}),t.jsx(Ct,{}),t.jsx(fe,{isThreadAllowed:C&&l!=null,dashboardTabKey:xe({type:"details",key:`${e}.mileage.amount`}),roomId:w,companyId:s.currentTenant?.companyId??$,companyName:s.currentTenant?.companyName??$,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...I,entityType:`reimbursement.details.${ve("amount",e,"mileage")}`},fieldThreadTargetElement:g?.sharedRef?.contentWrapperRef,children:t.jsx(Ri,{isDisabled:"disabled",label:{label:Re.amount,width:L},formattedTextField:{type:"number",name:Je(`${p}.amount`,"amount"),defaultValue:o.amount?.amount,placeholder:Ze(Re.amount),returnValueType:"floatValue",prefix:o.amount?.currencySymbol,allowNegative:!1,isNumericString:!1,registerOptions:{required:!0,validate:A=>A!=null?A>0:!0},autoComplete:"off",decimalSeparator:".",decimalScale:2,fixedDecimalScale:!1,thousandSeparator:!0},style:{width:"auto"},additionalInfoLabel:K!=null&&b?.mileageUnitAmount!=null?`${u.currencySymbol}${b?.mileageUnitAmount} per mile x ${K}`:void 0})}),t.jsx(Ct,{}),t.jsx(fe,{isThreadAllowed:C&&l!=null,dashboardTabKey:xe({type:"details",key:`${e}.mileage.memo`}),roomId:w,companyId:s.currentTenant?.companyId??$,companyName:s.currentTenant?.companyName??$,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...I,entityType:`reimbursement.details.${ve("memo",e,"mileage")}`},fieldThreadTargetElement:g?.sharedRef?.contentWrapperRef,children:t.jsx(ui,{isDisabled:m,label:{label:Re.memo,width:L},style:{width:"auto"},text:{type:"text",name:Je(p,"memo"),placeholder:Ze(Re.memo),defaultValue:o.memo,autoComplete:"off",options:{pattern:fn}}})}),t.jsx(Ct,{}),t.jsx(fe,{isThreadAllowed:C&&l!=null,dashboardTabKey:xe({type:"details",key:`${e}.mileage.class`}),roomId:w,companyId:s.currentTenant?.companyId??$,companyName:s.currentTenant?.companyName??$,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...I,entityType:`reimbursement.details.${ve("class",e,"mileage")}`},fieldThreadTargetElement:g?.sharedRef?.contentWrapperRef,style:{borderRadius:`0 0 ${i.sp2} ${i.sp2}`},children:t.jsx(ri,{isLoading:!1,label:{label:Re.department,width:L},groupedSingleSelectField:{shouldShowChevronIcon:!1,name:Je(p,"class"),placeholder:Ze(Re.department),valueToId:A=>E(A),defaultValue:{selectedOption:te?.classId,allOptions:_e(k,[])},style:{width:"100%"},customStyleConfig:pe,registerOptions:{required:!0,validate:A=>!!A.selectedOption}},style:{borderBottom:`1px solid ${R.colors.grey3}`,borderBottomLeftRadius:i.sp2,borderBottomRightRadius:i.sp2},fullWidthSelect:!0},Je(p,"class"))})]})},Ct=n.div`
1
+ import{a2 as ai,u as bt,w as ft,a as en,z as Ci,l as ee,M as me,H as tn,X as Ie,fJ as Xn,fL as Qn,fM as eo,j as t,g3 as to,F as nn,bP as li,bR as on,bS as an,_ as K,o as i,C as c,aW as ki,aK as io,dr as no,fN as oo,fY as rn,fT as Ii,a4 as ln,p as sn,fU as ao,et as _e,g4 as At,eW as si,c as xt,g5 as ro,g as j,a3 as cn,Z as ci,q as a,aT as lo,fW as so,c5 as co,eA as di,g6 as zt,cQ as fe,cS as xe,c7 as ui,ch as ct,ef as uo,cP as dn,f as Rt,ca as un,c9 as Qe,cp as st,v as mi,g7 as mo,eY as po,c4 as ho,a8 as Ti,aS as go,ap as mn,az as yo,ee as bo,am as Bt,fO as fo,eX as pn,Q as pi,h as hn,cr as gn,bI as Mt,eQ as xo,ao as wo,cv as So,cX as $o,e as hi,K as Di,bt as yn,ah as ji,co as vo,m as Co,cd as bn,a0 as ko,g8 as fn,g9 as ri,fE as Pi,ga as Ot,cn as Io,fI as To,b5 as Do,cm as jo}from"./index-C5chxI3W.js";import{b as v,n,f as vt}from"./vendor-CnQcJ2Lu.js";import{_ as Po}from"./liveblocks-DZpRS25q.js";import xn from"./InvoiceUploadSection-Dy_H9a8Y-CvpINn7W.js";import{r as Ro,f as Lt,d as yt,p as gi,u as Ri,h as ve}from"./types-DyvtCprH-BcZYcgaq.js";import{T as Oo}from"./LabeledCreatableSingleSelectField-CJT-CuQl-C0rlBcX2.js";import{S as Lo}from"./CurrencySelectField-bhkJTNUW-TAA9r3NA.js";import{K as Ao}from"./SetUpDefaultSection-Be5NU_Em-BdXA12e3.js";import{e as zo}from"./BankAccountSection-4HNC0ypd-BpuQrkpU.js";import{W as Bo,A as Mo}from"./BankAccountWarningSection-BqgTMjDy-DwldrkYy.js";import{o as Fo}from"./radio-default-CiSgisfh-ub7QGXr8.js";import"./mui-Bi8r7UDG.js";import"./analytics-CBL_L82S.js";import"./routing-CxYXTKiv.js";import"./sentry-HDxG13yk.js";import"./redux-CC-tnuv1.js";import"./crypto-BURQLTgV.js";import"./AttachmentView-B8hloBca-DRZOHo7x.js";import"./uploadReceipts-CB79ouJi-D3aL_mpJ.js";const Je=(e,o)=>`${e}.${o}`,Oi={largeLabelWidth:new c(120,120,160),paddingBottom:new c(a[3],a[2])},{spendManagement:{reimbursement:{reimbursementDetail:Pe}},dateFormat:Eo,common:No}=me.getLocalizedStrings(),Wo=({lineIndex:e,mileage:o,classList:r,defaultCurrency:u,sectionId:p,isReimbursementCommentingEnabled:C,isDisabled:m,isAddReimbursementDisabled:S,companyMileageConfigInfo:b,reimbursementId:l,classHierarchyList:k})=>{const f=Ie(),s=ft(),g=zt(),w=`dashboard_${s.currentTenant?.companyId}`,P=bt(),{getValues:D}=ct(),$=No.strings.empty,q=D(Je(p,"distanceInMiles")),L=Oi.largeLabelWidth.value(f),I={application:"dashboard",companyId:s.currentTenant?.companyId,tab:"reimbursement",entityId:l},E=A=>r.filter(_=>_.classId===A)[0]?.accountingClassNumber,te=r.find(A=>A.classId===o.class),pe={valueContainer:A=>({...A,padding:`2px ${i.sp3} !important`,overflow:"unset"}),singleValue:()=>({margin:0})};return t.jsxs(t.Fragment,{children:[t.jsx(fe,{isThreadAllowed:C&&l!=null,dashboardTabKey:xe({type:"details",key:`${e}.mileage.transactionDate`}),roomId:w,companyId:s.currentTenant?.companyId??$,companyName:s.currentTenant?.companyName??$,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...I,entityType:`reimbursement.details.${ve("transactionDate",e,"mileage")}`},fieldThreadTargetElement:g?.sharedRef?.contentWrapperRef,children:t.jsx(bn,{isDisabled:m,label:{label:Pe.transactionDate,width:L},style:{paddingBottom:Oi.paddingBottom.valuePx(f),width:"auto"},dateField:{name:Je(p,"transactionDate"),placeholder:Pe.datePlaceholder,defaultValue:o?.transactionDate,dateFormat:Eo.visual.defaultInput,autoComplete:"off",maxDate:ee.dateNow(),registerOptions:{required:!0,validate:A=>!!A}}})}),t.jsx(Ct,{}),t.jsx(fe,{isThreadAllowed:C&&l!=null,dashboardTabKey:xe({type:"details",key:`${e}.mileage.distanceInMiles`}),roomId:w,companyId:s.currentTenant?.companyId??$,companyName:s.currentTenant?.companyName??$,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...I,entityType:`reimbursement.details.${ve("distanceInMiles",e,"mileage")}`},fieldThreadTargetElement:g?.sharedRef?.contentWrapperRef,children:t.jsx(Pi,{isDisabled:S?"disabled":void 0,style:{width:"auto"},label:{label:Pe.distanceInMiles,width:L},formattedTextField:{type:"number",name:Je(p,"distanceInMiles"),placeholder:Pe.addMiles,defaultValue:o.distanceInMiles,registerOptions:{required:!0,validate:A=>A!=null?A>0:!0,min:.01},returnValueType:"floatValue",allowNegative:!1,isNumericString:!1,decimalScale:2}})}),t.jsx(Ct,{}),t.jsx(fe,{isThreadAllowed:C&&l!=null,dashboardTabKey:xe({type:"details",key:`${e}.mileage.amount`}),roomId:w,companyId:s.currentTenant?.companyId??$,companyName:s.currentTenant?.companyName??$,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...I,entityType:`reimbursement.details.${ve("amount",e,"mileage")}`},fieldThreadTargetElement:g?.sharedRef?.contentWrapperRef,children:t.jsx(Pi,{isDisabled:"disabled",label:{label:Pe.amount,width:L},formattedTextField:{type:"number",name:Je(`${p}.amount`,"amount"),defaultValue:o.amount?.amount,placeholder:Qe(Pe.amount),returnValueType:"floatValue",prefix:o.amount?.currencySymbol,allowNegative:!1,isNumericString:!1,registerOptions:{required:!0,validate:A=>A!=null?A>0:!0},autoComplete:"off",decimalSeparator:".",decimalScale:2,fixedDecimalScale:!1,thousandSeparator:!0},style:{width:"auto"},additionalInfoLabel:q!=null&&b?.mileageUnitAmount!=null?`${u.currencySymbol}${b?.mileageUnitAmount} per mile x ${q}`:void 0})}),t.jsx(Ct,{}),t.jsx(fe,{isThreadAllowed:C&&l!=null,dashboardTabKey:xe({type:"details",key:`${e}.mileage.memo`}),roomId:w,companyId:s.currentTenant?.companyId??$,companyName:s.currentTenant?.companyName??$,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...I,entityType:`reimbursement.details.${ve("memo",e,"mileage")}`},fieldThreadTargetElement:g?.sharedRef?.contentWrapperRef,children:t.jsx(ui,{isDisabled:m,label:{label:Pe.memo,width:L},style:{width:"auto"},text:{type:"text",name:Je(p,"memo"),placeholder:Qe(Pe.memo),defaultValue:o.memo,autoComplete:"off",options:{pattern:fn}}})}),t.jsx(Ct,{}),t.jsx(fe,{isThreadAllowed:C&&l!=null,dashboardTabKey:xe({type:"details",key:`${e}.mileage.class`}),roomId:w,companyId:s.currentTenant?.companyId??$,companyName:s.currentTenant?.companyName??$,entityId:l,dashboardOptionType:"reimbursement",filterMetaData:{...I,entityType:`reimbursement.details.${ve("class",e,"mileage")}`},fieldThreadTargetElement:g?.sharedRef?.contentWrapperRef,style:{borderRadius:`0 0 ${i.sp2} ${i.sp2}`},children:t.jsx(ri,{isLoading:!1,label:{label:Pe.department,width:L},groupedSingleSelectField:{shouldShowChevronIcon:!1,name:Je(p,"class"),placeholder:Qe(Pe.department),valueToId:A=>E(A),defaultValue:{selectedOption:te?.classId,allOptions:_e(k,[])},style:{width:"100%"},customStyleConfig:pe,registerOptions:{required:!0,validate:A=>!!A.selectedOption}},style:{borderBottom:`1px solid ${P.colors.grey3}`,borderBottomLeftRadius:i.sp2,borderBottomRightRadius:i.sp2},fullWidthSelect:!0},Je(p,"class"))})]})},Ct=n.div`
2
2
  display: flex;
3
3
  flex: 1;
4
4
  background-color: ${e=>e.theme.colors.grey3};
5
5
  min-height: 1px;
6
6
  max-height: 1px;
7
- `,Li={amounWidth:new c(50,30),currencyWidth:new c(50,70)};function Uo({name:e,placeHolder:o,defaultValue:r,isDisabled:u,showAmountCurrencyError:p,style:C,allCurrencies:m}){const[S,b]=v.useState(!1),{getValues:l,formState:{errors:k}}=ct(),f=bt(),s=Ie(),g=u!=null,w=l(e),R=`${w?.amount} ${w?.currency?.selectedOption}`,T=st(k,e)&&Ot(k,`${e}.amount`)!=null,$=st(k,e)&&Ot(k,`${e}.currency`)!=null,K=p===!0?T||$:!1,L=!K&&S===!1;return v.useEffect(()=>{L===!1&&b(!0)},[L]),t.jsx(sn,{onClickAway:()=>g===!1&&!K&&b(!1),children:t.jsx(_o,{style:C,isDisabled:g,tabIndex:L&&!g?0:void 0,onClick:()=>g===!1&&b(!0),"data-testid":H("currency-amount-field",e),children:t.jsxs(t.Fragment,{children:[w?.amount!=null?t.jsx(Ai,{className:"amount-field",isVisible:L,children:R}):t.jsx(Ai,{className:"amount-field amount-placeholder",isVisible:L,children:o?.name}),t.jsxs(Vo,{isVisible:!L,children:[t.jsx(Do,{type:"number",name:`${e}.amount`,defaultValue:r?.amount,placeholder:o?.amount,returnValueType:"floatValue",allowNegative:!1,isNumericString:!1,registerOptions:{required:!0,validate:I=>I!=null?I>0:!0},autoComplete:"off",decimalSeparator:".",decimalScale:2,fixedDecimalScale:!1,thousandSeparator:!0,isDisabled:u,style:{display:"flex",flexGrow:1,width:Li.amounWidth.valuePercentage(s),cursor:"inherit"},bgColor:f.colors.background,isFieldError:T,shouldHighlightZeroAmount:!0}),L?null:t.jsx(qo,{}),t.jsx(Lo,{name:`${e}.currency`,registerOptions:{validate:I=>I!=null&&I.selectedOption!=null},defaultValue:{allOptions:m.map(I=>({label:s==="small"?I.currencyCode:`${I.currencyCode} - ${I.currency}`,value:I.currencyCode,countryCode:I.countryCode})),selectedOption:r?.currencyCode},controlStyle:{justifyContent:"flex-start",backgroundColor:f.colors.background},isDisabled:u,style:{width:Li.currencyWidth.valuePercentage(s),flexGrow:1},isOptionRemovable:!1})]})]})})})}const Vo=n.div`
7
+ `,Li={amounWidth:new c(50,30),currencyWidth:new c(50,70)};function Uo({name:e,placeHolder:o,defaultValue:r,isDisabled:u,showAmountCurrencyError:p,style:C,allCurrencies:m}){const[S,b]=v.useState(!1),{getValues:l,formState:{errors:k}}=ct(),f=bt(),s=Ie(),g=u!=null,w=l(e),P=`${w?.amount} ${w?.currency?.selectedOption}`,D=st(k,e)&&Ot(k,`${e}.amount`)!=null,$=st(k,e)&&Ot(k,`${e}.currency`)!=null,q=p===!0?D||$:!1,L=!q&&S===!1;return v.useEffect(()=>{L===!1&&b(!0)},[L]),t.jsx(sn,{onClickAway:()=>g===!1&&!q&&b(!1),children:t.jsx(_o,{style:C,isDisabled:g,tabIndex:L&&!g?0:void 0,onClick:()=>g===!1&&b(!0),"data-testid":K("currency-amount-field",e),children:t.jsxs(t.Fragment,{children:[w?.amount!=null?t.jsx(Ai,{className:"amount-field",isVisible:L,children:P}):t.jsx(Ai,{className:"amount-field amount-placeholder",isVisible:L,children:o?.name}),t.jsxs(Vo,{isVisible:!L,children:[t.jsx(To,{type:"number",name:`${e}.amount`,defaultValue:r?.amount,placeholder:o?.amount,returnValueType:"floatValue",allowNegative:!1,isNumericString:!1,registerOptions:{required:!0,validate:I=>I!=null?I>0:!0},autoComplete:"off",decimalSeparator:".",decimalScale:2,fixedDecimalScale:!1,thousandSeparator:!0,isDisabled:u,style:{display:"flex",flexGrow:1,width:Li.amounWidth.valuePercentage(s),cursor:"inherit"},bgColor:f.colors.background,isFieldError:D,shouldHighlightZeroAmount:!0}),L?null:t.jsx(Ho,{}),t.jsx(Lo,{name:`${e}.currency`,registerOptions:{validate:I=>I!=null&&I.selectedOption!=null},defaultValue:{allOptions:m.map(I=>({label:s==="small"?I.currencyCode:`${I.currencyCode} - ${I.currency}`,value:I.currencyCode,countryCode:I.countryCode})),selectedOption:r?.currencyCode},controlStyle:{justifyContent:"flex-start",backgroundColor:f.colors.background},isDisabled:u,style:{width:Li.currencyWidth.valuePercentage(s),flexGrow:1},isOptionRemovable:!1})]})]})})})}const Vo=n.div`
8
8
  display: ${e=>e.isVisible?"flex":"none"};
9
9
  width: 100%;
10
10
  input {
@@ -22,7 +22,7 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
22
22
  input {
23
23
  text-align: right;
24
24
  }
25
- `,qo=n.div`
25
+ `,Ho=n.div`
26
26
  background-color: ${e=>e.theme.colors.grey5};
27
27
  min-width: ${i.sp3};
28
28
  `,Ai=n(mn)`
@@ -37,7 +37,7 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
37
37
  &.amount-placeholder {
38
38
  color: ${e=>e.theme.colors.grey1};
39
39
  }
40
- `,Fe={width:new c(343,580,726),height:new c(a[6],a[6]),controlHeight:new c(a[6],a[6]),paddingTopBottom:new c(a[2],a[2]),marginRight:new c(a[2],a[2]),labelMarginLeft:new c(a[3],a[4]),labelMarginRight:new c(a[3],a[4]),labelMarginTop:new c(a[2],a[2])},wn={infoLabel:new pi("extraSmallRegular","smallRegular")};function Ho({isDisabled:e,label:o,currencyAmountField:r,style:u,errorInfoLabel:p,isAdditionalInfoLabelLoading:C,showAdditionalLabelTooltip:m=!1,additionalLabelTooltip:S,additionalInfoLabel:b,showAdditionalInfoLabel:l=!0}){const k=Ie(),{formState:{errors:f}}=ct(),s=st(f,r.name)&&Ot(f,`${r.name}.amount`)!=null,g=st(f,r.name)&&Ot(f,`${r.name}.currency`)!=null,w=r.showAmountCurrencyError===!0?s||g:!1,R=s||g||w,T=()=>{if(C===!0)return t.jsx(Xo,{children:t.jsx(xt,{size:"Small",start:!0})});if(l&&b||w){let $=null;return m===!0&&l&&b&&($=t.jsx(yn,{placement:k==="small"?"bottom":"right",maxWidth:"364px",title:t.jsx(Jo,{children:S??""}),children:t.jsx(Zo,{children:t.jsx(ea,{})})})),t.jsxs(Qo,{size:k,isError:w,hasToolTip:m,children:[$,b]})}};return t.jsxs(Ko,{size:k,style:u,isDisabled:e!=null,isAmountError:s,isCurrencyError:g,"data-testid":H("labeled-currency-amount-field",r.name),children:[t.jsx(Io,{isDisabled:e,label:o.label,htmlFor:r.name,style:{marginLeft:Fe.labelMarginLeft.value(k),marginRight:Fe.labelMarginRight.value(k),marginTop:Fe.labelMarginTop.value(k),width:o.width??"auto"}}),t.jsxs(Yo,{labelWidth:o.width,children:[t.jsx(Uo,{...r,isDisabled:e,style:{flexGrow:1,height:Fe.controlHeight.value(k)}}),R?t.jsx(Go,{size:k,hasError:R,children:p}):null,T()]})]})}const Ko=n.div`
40
+ `,Fe={width:new c(343,580,726),height:new c(a[6],a[6]),controlHeight:new c(a[6],a[6]),paddingTopBottom:new c(a[2],a[2]),marginRight:new c(a[2],a[2]),labelMarginLeft:new c(a[3],a[4]),labelMarginRight:new c(a[3],a[4]),labelMarginTop:new c(a[2],a[2])},wn={infoLabel:new pi("extraSmallRegular","smallRegular")};function Ko({isDisabled:e,label:o,currencyAmountField:r,style:u,errorInfoLabel:p,isAdditionalInfoLabelLoading:C,showAdditionalLabelTooltip:m=!1,additionalLabelTooltip:S,additionalInfoLabel:b,showAdditionalInfoLabel:l=!0}){const k=Ie(),{formState:{errors:f}}=ct(),s=st(f,r.name)&&Ot(f,`${r.name}.amount`)!=null,g=st(f,r.name)&&Ot(f,`${r.name}.currency`)!=null,w=r.showAmountCurrencyError===!0?s||g:!1,P=s||g||w,D=()=>{if(C===!0)return t.jsx(Zo,{children:t.jsx(xt,{size:"Small",start:!0})});if(l&&b||w){let $=null;return m===!0&&l&&b&&($=t.jsx(yn,{placement:k==="small"?"bottom":"right",maxWidth:"364px",title:t.jsx(Jo,{children:S??""}),children:t.jsx(Qo,{children:t.jsx(ea,{})})})),t.jsxs(Xo,{size:k,isError:w,hasToolTip:m,children:[$,b]})}};return t.jsxs(qo,{size:k,style:u,isDisabled:e!=null,isAmountError:s,isCurrencyError:g,"data-testid":K("labeled-currency-amount-field",r.name),children:[t.jsx(Io,{isDisabled:e,label:o.label,htmlFor:r.name,style:{marginLeft:Fe.labelMarginLeft.value(k),marginRight:Fe.labelMarginRight.value(k),marginTop:Fe.labelMarginTop.value(k),width:o.width??"auto"}}),t.jsxs(Yo,{labelWidth:o.width,children:[t.jsx(Uo,{...r,isDisabled:e,style:{flexGrow:1,height:Fe.controlHeight.value(k)}}),P?t.jsx(Go,{size:k,hasError:P,children:p}):null,D()]})]})}const qo=n.div`
41
41
  display: flex;
42
42
  flex-direction: row;
43
43
  align-items: flex-start;
@@ -121,12 +121,12 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
121
121
  color: ${e=>e.theme.colors.grey1};
122
122
  background: ${e=>e.theme.colors.overlayColor};
123
123
  border-radius: ${i.sp1};
124
- `,Xo=n.div`
124
+ `,Zo=n.div`
125
125
  padding-right: ${i.sp3};
126
126
  padding-top: ${i.sp1};
127
127
  display: flex;
128
128
  justify-content: flex-end;
129
- `,Qo=n.label`
129
+ `,Xo=n.label`
130
130
  display: flex;
131
131
  justify-content: flex-end;
132
132
  color: ${e=>e.isError?j.important:e.theme.colors.hero};
@@ -137,16 +137,16 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
137
137
  padding-right: ${i.sp3};
138
138
  text-align: right;
139
139
  margin-top: ${e=>e.hasToolTip===!0?i.sp1:i.sp0};
140
- `,Zo=n.div`
140
+ `,Qo=n.div`
141
141
  display: flex;
142
142
  margin-right: ${i.sp2};
143
143
  margin-top: 2px;
144
144
  align-items: center;
145
- `,ea=n(To)`
145
+ `,ea=n(Do)`
146
146
  width: ${i.sp3};
147
147
  height: ${i.sp3};
148
148
  color: inherit;
149
- `,Be=(e,o)=>`${e}.${o}`,jt={largeLabelWidth:new c(120,120,160),smallLabelWidth:new c(85,85,160),paddingBottom:new c(a[3],a[2]),autoFillIconLeft:new c(-8,-24)},{dateFormat:ta,common:Sn,spendManagement:{reimbursement:{reimbursementDetail:de}}}=me.getLocalizedStrings(),{strings:{empty:oe}}=Sn,ia=(e,o)=>{const r=e.slice(1);let u=!1;return r.forEach(p=>{p.account?.qboId!=null&&p.account?.qboId===o&&(u=!0)}),u},na=e=>e.charAt(0).toLowerCase()+e.slice(1),oa=({lineIndex:e,outOfPocket:o,accountList:r,classList:u,merchantList:p,isAddReimbursementDisabled:C,sectionId:m,isReimbursementCommentingEnabled:S,isDisabled:b,autoFields:l=[],accountsHierarchyList:k,classHierarchyList:f,reimbursementId:s,tentativeMerchantName:g,allCurrencies:w,uncategorizedAccounts:R})=>{const T=Ie(),$=ft(),K=zt(),L=bt(),I=o.isCategoryUpdateSelected!=null&&o.recommendedAccount!=null&&!o.isCategoryFirstTimeAutofilled&&!ia(o.recommendations,o.account),E=o.isRetainedCategorySelected!=null&&o.retainedAccount!=null,te=jt.largeLabelWidth.value(T),pe=jt.smallLabelWidth.value(T),A=p.map(P=>P.id??oe),_={application:"dashboard",companyId:$.currentTenant?.companyId,tab:"reimbursement",entityId:s},Y=`dashboard_${$.currentTenant?.companyId}`,q=P=>p.find(ge=>ge.id===P)?.name??P,ie=r.find(P=>P.qboId===o.account),Z=P=>[R.expense?.qboId,R.income?.qboId].includes(P),we=u.find(P=>P.classId===o.class),he={valueContainer:P=>({...P,padding:`2px ${i.sp3} !important`,overflow:"unset"}),singleValue:()=>({margin:0})},re=P=>r.filter(ge=>ge.qboId===P)[0]?.qboId,J=P=>u.filter(ge=>ge.classId===P)[0]?.accountingClassNumber,le=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail.tooltip.category.replace("__based__",na(o?.recommendedAccount?.reason??oe)),Oe=At(k,o.recommendations);return t.jsxs(t.Fragment,{children:[g!=null||l.includes("merchant")?t.jsx(ot,{children:t.jsx(rt,{windowSize:T,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.merchant`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("merchant",e,"out_of_pocket")}`},fieldThreadTargetElement:K?.sharedRef?.contentWrapperRef,children:t.jsx(Oo,{isDisabled:b!=null||C?"disabled":void 0,label:{label:de.merchant,width:te},style:{width:"auto"},creatableSingleSelectField:{name:Be(m,"merchant"),placeholder:de.merchantPlaceholder,defaultValue:{selectedOption:o.merchant??oe,allOptions:A},registerOptions:{required:!0,validate:P=>!!P.selectedOption}},isOptionRemovable:!0,addIconInCreateLabel:!0,getLabelForId:q})}),t.jsx(kt,{}),l.includes("transactionDate")?t.jsx(ot,{children:t.jsx(rt,{windowSize:T,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.transactionDate`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("transactionDate",e,"out_of_pocket")}`},fieldThreadTargetElement:K?.sharedRef?.contentWrapperRef,children:t.jsx(bn,{isDisabled:b,label:{label:de.transactionDate,width:te},style:{paddingBottom:jt.paddingBottom.valuePx(T),width:"auto"},dateField:{name:Be(m,"transactionDate"),placeholder:de.datePlaceholder,defaultValue:o?.transactionDate,dateFormat:ta.visual.defaultInput,autoComplete:"off",maxDate:ee.dateNow(),registerOptions:{required:!0,validate:P=>!!P}}})}),t.jsx(kt,{}),l.includes("amount")?t.jsx(ot,{children:t.jsx(rt,{windowSize:T,isTwoLined:!0,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.amount`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("amount",e,"out_of_pocket")}`},fieldThreadTargetElement:K?.sharedRef?.contentWrapperRef,children:t.jsx(Ho,{isDisabled:b!=null||C?"disabled":void 0,label:{label:de.amount,width:pe},style:{width:"auto"},currencyAmountField:{style:{height:i.sp6},name:`${m}.amount`,defaultValue:{amount:o.amount.amount,currencyCode:o.amount.currencyCode,currencySymbol:o.amount.currencySymbol},placeHolder:{amount:de.addAmount,name:de.addAmount},allCurrencies:w,showAmountCurrencyError:!0},showAdditionalInfoLabel:!0,showAdditionalLabelTooltip:!0,additionalLabelTooltip:de.amountExchangeRateTooltip,isAdditionalInfoLabelLoading:o.isConvertedCurrencyLoading===!0,additionalInfoLabel:!tn(o.homeCurrencyDetails,o.amount)&&o.amount.currencyCode!==Sn.currency.currencyCode&&o.homeCurrencyDetails?.amount!==0?`${ko("0,0[.]00",o.homeCurrencyDetails)} ${o.homeCurrencyDetails?.currencyCode}`:void 0})}),t.jsx(kt,{}),l.includes("memo")?t.jsx(ot,{children:t.jsx(rt,{windowSize:T,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.memo`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("memo",e,"out_of_pocket")}`},fieldThreadTargetElement:K?.sharedRef?.contentWrapperRef,children:t.jsx(ui,{isDisabled:b,label:{label:de.memo,width:te},style:{width:"auto"},text:{type:"text",name:Be(m,"memo"),placeholder:Ze(de.memo),defaultValue:o.memo,autoComplete:"off",options:{pattern:fn}}})}),t.jsx(kt,{}),l.includes("account")?t.jsx(ot,{children:t.jsx(rt,{windowSize:T,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.account`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("account",e,"out_of_pocket")}`},fieldThreadTargetElement:K?.sharedRef?.contentWrapperRef,children:t.jsx(ri,{label:{label:de.category,width:te},groupedSingleSelectField:{shouldShowChevronIcon:I||E,name:Be(m,"account"),placeholder:de.categoryPlaceholder,valueToId:P=>re(P),defaultValue:{selectedOption:ie?.qboId??ie?.accountId,allOptions:Oe},style:{width:"100%"},customStyleConfig:he,registerOptions:{required:!0,validate:P=>!!P.selectedOption}},disableCurrentOption:Z,style:{borderBottom:`1px solid ${L.colors.grey3}`,minHeight:i.sp6,boxSizing:"initial"},fullWidthSelect:!0,isLoading:o.isRecommendationLoading,recommendationCheckboxField:I?{tooltipProps:{text:le},label:{label:o.recommendedAccount?.accountName??oe},checkBoxField:{name:Be(m,"isCategoryUpdateSelected"),defaultChecked:!!o.isCategoryUpdateSelected}}:void 0,retainCheckboxField:E?{label:{label:o.retainedAccount?.accountName??oe},checkBoxField:{name:Be(m,"isRetainedCategorySelected"),defaultChecked:!!o.isRetainedCategorySelected}}:void 0},Be(m,"account"))}),l.includes("class")?t.jsx(ot,{children:t.jsx(rt,{windowSize:T,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.class`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("class",e,"out_of_pocket")}`},fieldThreadTargetElement:K?.sharedRef?.contentWrapperRef,style:{borderRadius:`0 0 ${i.sp2} ${i.sp2}`},children:t.jsx(ri,{isLoading:!1,label:{label:de.department,width:te},groupedSingleSelectField:{shouldShowChevronIcon:!1,name:Be(m,"class"),placeholder:Ze(de.department),valueToId:P=>J(P),defaultValue:{selectedOption:we?.classId,allOptions:_e(f,[])},style:{width:"100%"},customStyleConfig:he,registerOptions:{required:!0,validate:P=>!!P.selectedOption}},style:{borderBottom:`1px solid ${L.colors.grey3}`,borderBottomLeftRadius:i.sp2,borderBottomRightRadius:i.sp2},fullWidthSelect:!0},Be(m,"class"))})]})},ot=n.span`
149
+ `,Be=(e,o)=>`${e}.${o}`,jt={largeLabelWidth:new c(120,120,160),smallLabelWidth:new c(85,85,160),paddingBottom:new c(a[3],a[2]),autoFillIconLeft:new c(-8,-24)},{dateFormat:ta,common:Sn,spendManagement:{reimbursement:{reimbursementDetail:de}}}=me.getLocalizedStrings(),{strings:{empty:oe}}=Sn,ia=(e,o)=>{const r=e.slice(1);let u=!1;return r.forEach(p=>{p.account?.qboId!=null&&p.account?.qboId===o&&(u=!0)}),u},na=e=>e.charAt(0).toLowerCase()+e.slice(1),oa=({lineIndex:e,outOfPocket:o,accountList:r,classList:u,merchantList:p,isAddReimbursementDisabled:C,sectionId:m,isReimbursementCommentingEnabled:S,isDisabled:b,autoFields:l=[],accountsHierarchyList:k,classHierarchyList:f,reimbursementId:s,tentativeMerchantName:g,allCurrencies:w,uncategorizedAccounts:P})=>{const D=Ie(),$=ft(),q=zt(),L=bt(),I=o.isCategoryUpdateSelected!=null&&o.recommendedAccount!=null&&!o.isCategoryFirstTimeAutofilled&&!ia(o.recommendations,o.account),E=o.isRetainedCategorySelected!=null&&o.retainedAccount!=null,te=jt.largeLabelWidth.value(D),pe=jt.smallLabelWidth.value(D),A=p.map(R=>R.id??oe),_={application:"dashboard",companyId:$.currentTenant?.companyId,tab:"reimbursement",entityId:s},Y=`dashboard_${$.currentTenant?.companyId}`,H=R=>p.find(ge=>ge.id===R)?.name??R,ie=r.find(R=>R.qboId===o.account),Q=R=>[P.expense?.qboId,P.income?.qboId].includes(R),we=u.find(R=>R.classId===o.class),he={valueContainer:R=>({...R,padding:`2px ${i.sp3} !important`,overflow:"unset"}),singleValue:()=>({margin:0})},re=R=>r.filter(ge=>ge.qboId===R)[0]?.qboId,J=R=>u.filter(ge=>ge.classId===R)[0]?.accountingClassNumber,le=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail.tooltip.category.replace("__based__",na(o?.recommendedAccount?.reason??oe)),Oe=At(k,o.recommendations);return t.jsxs(t.Fragment,{children:[g!=null||l.includes("merchant")?t.jsx(ot,{children:t.jsx(rt,{windowSize:D,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.merchant`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("merchant",e,"out_of_pocket")}`},fieldThreadTargetElement:q?.sharedRef?.contentWrapperRef,children:t.jsx(Oo,{isDisabled:b!=null||C?"disabled":void 0,label:{label:de.merchant,width:te},style:{width:"auto"},creatableSingleSelectField:{name:Be(m,"merchant"),placeholder:de.merchantPlaceholder,defaultValue:{selectedOption:o.merchant??oe,allOptions:A},registerOptions:{required:!0,validate:R=>!!R.selectedOption}},isOptionRemovable:!0,addIconInCreateLabel:!0,getLabelForId:H})}),t.jsx(kt,{}),l.includes("transactionDate")?t.jsx(ot,{children:t.jsx(rt,{windowSize:D,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.transactionDate`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("transactionDate",e,"out_of_pocket")}`},fieldThreadTargetElement:q?.sharedRef?.contentWrapperRef,children:t.jsx(bn,{isDisabled:b,label:{label:de.transactionDate,width:te},style:{paddingBottom:jt.paddingBottom.valuePx(D),width:"auto"},dateField:{name:Be(m,"transactionDate"),placeholder:de.datePlaceholder,defaultValue:o?.transactionDate,dateFormat:ta.visual.defaultInput,autoComplete:"off",maxDate:ee.dateNow(),registerOptions:{required:!0,validate:R=>!!R}}})}),t.jsx(kt,{}),l.includes("amount")?t.jsx(ot,{children:t.jsx(rt,{windowSize:D,isTwoLined:!0,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.amount`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("amount",e,"out_of_pocket")}`},fieldThreadTargetElement:q?.sharedRef?.contentWrapperRef,children:t.jsx(Ko,{isDisabled:b!=null||C?"disabled":void 0,label:{label:de.amount,width:pe},style:{width:"auto"},currencyAmountField:{style:{height:i.sp6},name:`${m}.amount`,defaultValue:{amount:o.amount.amount,currencyCode:o.amount.currencyCode,currencySymbol:o.amount.currencySymbol},placeHolder:{amount:de.addAmount,name:de.addAmount},allCurrencies:w,showAmountCurrencyError:!0},showAdditionalInfoLabel:!0,showAdditionalLabelTooltip:!0,additionalLabelTooltip:de.amountExchangeRateTooltip,isAdditionalInfoLabelLoading:o.isConvertedCurrencyLoading===!0,additionalInfoLabel:!tn(o.homeCurrencyDetails,o.amount)&&o.amount.currencyCode!==Sn.currency.currencyCode&&o.homeCurrencyDetails?.amount!==0?`${ko("0,0[.]00",o.homeCurrencyDetails)} ${o.homeCurrencyDetails?.currencyCode}`:void 0})}),t.jsx(kt,{}),l.includes("memo")?t.jsx(ot,{children:t.jsx(rt,{windowSize:D,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.memo`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("memo",e,"out_of_pocket")}`},fieldThreadTargetElement:q?.sharedRef?.contentWrapperRef,children:t.jsx(ui,{isDisabled:b,label:{label:de.memo,width:te},style:{width:"auto"},text:{type:"text",name:Be(m,"memo"),placeholder:Qe(de.memo),defaultValue:o.memo,autoComplete:"off",options:{pattern:fn}}})}),t.jsx(kt,{}),l.includes("account")?t.jsx(ot,{children:t.jsx(rt,{windowSize:D,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.account`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("account",e,"out_of_pocket")}`},fieldThreadTargetElement:q?.sharedRef?.contentWrapperRef,children:t.jsx(ri,{label:{label:de.category,width:te},groupedSingleSelectField:{shouldShowChevronIcon:I||E,name:Be(m,"account"),placeholder:de.categoryPlaceholder,valueToId:R=>re(R),defaultValue:{selectedOption:ie?.qboId??ie?.accountId,allOptions:Oe},style:{width:"100%"},customStyleConfig:he,registerOptions:{required:!0,validate:R=>!!R.selectedOption}},disableCurrentOption:Q,style:{borderBottom:`1px solid ${L.colors.grey3}`,minHeight:i.sp6,boxSizing:"initial"},fullWidthSelect:!0,isLoading:o.isRecommendationLoading,recommendationCheckboxField:I?{tooltipProps:{text:le},label:{label:o.recommendedAccount?.accountName??oe},checkBoxField:{name:Be(m,"isCategoryUpdateSelected"),defaultChecked:!!o.isCategoryUpdateSelected}}:void 0,retainCheckboxField:E?{label:{label:o.retainedAccount?.accountName??oe},checkBoxField:{name:Be(m,"isRetainedCategorySelected"),defaultChecked:!!o.isRetainedCategorySelected}}:void 0},Be(m,"account"))}),l.includes("class")?t.jsx(ot,{children:t.jsx(rt,{windowSize:D,children:t.jsx(at,{})})}):null,t.jsx(fe,{isThreadAllowed:S&&s!=null,dashboardTabKey:xe({type:"details",key:`${e}.out_of_pocket.class`}),roomId:Y,companyId:$.currentTenant?.companyId??oe,companyName:$.currentTenant?.companyName??oe,entityId:s,dashboardOptionType:"reimbursement",filterMetaData:{..._,entityType:`reimbursement.details.${ve("class",e,"out_of_pocket")}`},fieldThreadTargetElement:q?.sharedRef?.contentWrapperRef,style:{borderRadius:`0 0 ${i.sp2} ${i.sp2}`},children:t.jsx(ri,{isLoading:!1,label:{label:de.department,width:te},groupedSingleSelectField:{shouldShowChevronIcon:!1,name:Be(m,"class"),placeholder:Qe(de.department),valueToId:R=>J(R),defaultValue:{selectedOption:we?.classId,allOptions:_e(f,[])},style:{width:"100%"},customStyleConfig:he,registerOptions:{required:!0,validate:R=>!!R.selectedOption}},style:{borderBottom:`1px solid ${L.colors.grey3}`,borderBottomLeftRadius:i.sp2,borderBottomRightRadius:i.sp2},fullWidthSelect:!0},Be(m,"class"))})]})},ot=n.span`
150
150
  position: relative;
151
151
  `,at=n(di)`
152
152
  color: ${e=>e.theme.colors.primary};
@@ -163,7 +163,7 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
163
163
  background-color: ${e=>e.theme.colors.grey3};
164
164
  min-height: 1px;
165
165
  max-height: 1px;
166
- `,Xe=(e,o)=>`${e}.${o}`,Ee={paddingTop:new c(a[5],a[4]),marginBottom:new c(a[3],a[3]),labelPaddingLeft:new c(a[3],a[4]),buttonWidth:new c(70,70),containerRightMargin:new c(a[3],a[8]),containerLeftMargin:new c(a[3],a[6]),deleteConfirmationTextMarginBottom:new c(a[2],a[0])},G=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail,aa=({lineData:e,currencyConversionState:o,recommendationFetchState:r,remiStage:u,lineIndex:p,accountList:C,classList:m,merchantList:S,hasFile:b,defaultCurrency:l,hasMultipleLineItems:k,fileRequiredLineIds:f,duplicateLineDetails:s,remiStatus:g,sectionId:w,isDisabled:R,isReimbursementCommentingEnabled:T,isAddReimbursementDisabled:$,style:K,autoFields:L=[],analytics:I,reimbursementId:E,tentativeMerchantName:te,companyMileageConfigInfo:pe,uncategorizedAccounts:A,removeDuplicateReimbursementForLine:_,scrollToSection:Y,onDuplicateLineClick:q,onRemoveReimbursement:ie,clearTentativeNameForLine:Z,allCurrencies:we,accountsHierarchyList:he,classHierarchyList:re})=>{const J=Ie(),le=ft(),Oe=zt(),P=me.getLocalizedStrings().common.strings.empty,ge={application:"dashboard",companyId:le.currentTenant?.companyId,tab:"reimbursement",entityId:E},se=`dashboard_${le.currentTenant?.companyId}`,{getValues:Ne}=ct(),[Le,Ae]=v.useState(!1),Se=Ne(Xe(w,"reimbursementType"));return t.jsxs(ma,{style:K,windowSize:J,children:[t.jsxs(la,{hasFile:b,windowSize:J,showDeleteConfirmation:Le,children:[t.jsx(ha,{windowSize:J,children:k?`#${p+1} ${G.reimbursement}`:G.reimbursement}),Le?t.jsxs(ua,{windowSize:J,children:[t.jsx(da,{windowSize:J,children:G.deleteConfirmation}),t.jsxs(ra,{children:[t.jsx(Ti,{label:G.buttons.cancel,onClick:()=>Ae(!1),style:{width:Ee.buttonWidth.value(J),marginLeft:J==="small"?i.sp0:i.sp4,marginRight:i.sp3},size:"small",variant:"secondary","data-testid":H("delete-remi-button",G.buttons.cancel)}),t.jsx(Ti,{label:G.buttons.remove,onClick:()=>{I?.trackReimbursementDeleteReimbursementLine(e.lineId,E),Z?.(e.lineId??"1"),Ae(!1),_(e.lineId),ie(p)},style:{width:Ee.buttonWidth.value(J)},size:"small",variant:"danger","data-testid":H("delete-remi-button",G.buttons.remove)})]})]}):k&&(u==="draft"||g==="rejected")?t.jsx(sa,{className:"deleteIconWrapper",windowSize:J,onClick:()=>Ae(!0),"data-testid":H("delete-remi-button",e.lineId),children:t.jsx(yn,{enterDelay:600,title:G.deleteReimbursement,placement:"top-end",children:t.jsx(ca,{})})}):null]}),f.includes(e.lineId)?t.jsx(rn,{title:G.missingReceipt,description:G.missingReceiptDescription,style:{marginBottom:i.sp3}}):null,t.jsxs(ga,{windowSize:J,children:[s?.duplicateLineId!=null?t.jsxs(pa,{children:[G.thisExpense," ",s.isDuplicateWithinTransaction?t.jsx(zi,{"data-testid":H("view-duplicate-transaction-expense"),onClick:()=>(I?.trackReimbursementViewDuplicateExpense(!0,E),Y(s.duplicateLineId)),children:G.viewOriginalExpense}):t.jsx(zi,{"data-testid":H("view-duplicate-expense"),onClick:()=>{s.duplicateTransactionId!=null&&s.duplicateLineId!=null&&(I?.trackReimbursementViewDuplicateExpense(!1,E),q(s.duplicateTransactionId,s.duplicateLineId))},children:G.viewOriginalExpense})]}):null,t.jsx(fe,{isThreadAllowed:T&&E!=null,dashboardTabKey:xe({type:"details",key:Se===G.mileageKey?`${p}.mileage.reimbursementType`:`${p}.out_of_pocket.reimbursementType`}),roomId:se,companyId:le.currentTenant?.companyId??P,companyName:le.currentTenant?.companyName??P,entityId:E,dashboardOptionType:"reimbursement",filterMetaData:{...ge,entityType:`reimbursement.details.${ve("reimbursementType",p,Se===G.mileageKey?"mileage":"out_of_pocket")}`},fieldThreadTargetElement:Oe?.sharedRef?.contentWrapperRef,style:{borderRadius:s?.duplicateLineId!=null?"0 0 0 0":`${i.sp2} ${i.sp2} 0 0`},children:t.jsxs(ba,{isDisabled:R!=null,haveBorderRadius:s?.duplicateLineId==null,children:[t.jsx(ji,{isDisabled:R!=null||$?"disabled":void 0,isContainerClickable:!0,label:{label:G.outOfPocket},style:{padding:`${i.sp3} ${i.sp0}`,paddingLeft:Ee.labelPaddingLeft.value(J),borderTopLeftRadius:"inherit"},showOutline:!(T&&E!=null),radioField:{name:Xe(w,"reimbursementType"),id:`${Xe(w,"reimbursementType")}.${G.outOfPocketKey}`,value:G.outOfPocketKey}}),t.jsx(ya,{}),t.jsx(ji,{isDisabled:R!=null||$?"disabled":void 0,isContainerClickable:!0,label:{label:G.mileage},style:{padding:`${i.sp3} ${i.sp0}`,paddingLeft:Ee.labelPaddingLeft.value(J),borderTopRightRadius:"inherit"},showOutline:!(T&&E!=null),radioField:{name:Xe(w,"reimbursementType"),id:`${Xe(w,"reimbursementType")}.${G.mileageKey}`,value:G.mileageKey}})]})}),t.jsx(fa,{}),Se===G.outOfPocketKey?t.jsx(oa,{lineIndex:p,reimbursementId:E,uncategorizedAccounts:A,isReimbursementCommentingEnabled:T,isDisabled:R,outOfPocket:{transactionDate:e.outOfPocket.transactionDate!=null?ee.zeniDate(e.outOfPocket.transactionDate.toDateString()):void 0,account:e.outOfPocket.account.selectedOption,isConvertedCurrencyLoading:o?.fetchState==="In-Progress",isRecommendationLoading:r==="In-Progress",homeCurrencyDetails:e.homeCurrencyConversions,class:e.outOfPocket.class.selectedOption,amount:{amount:e.outOfPocket.amount?.amount??0,currencyCode:e.outOfPocket.amount?.currencyCode??"USD",currencySymbol:e.outOfPocket.amount?.currencySymbol??"$"},memo:e.outOfPocket.memo,merchant:e.outOfPocket.merchant.selectedOption,recommendations:e.outOfPocket.recommendations,recommendedAccount:e.outOfPocket.recommendedAccount,isCategoryUpdateSelected:e.outOfPocket.isCategoryUpdateSelected,isCategoryFirstTimeAutofilled:e.outOfPocket.isCategoryFirstTimeAutofilled,retainedAccount:e.outOfPocket.retainedAccount,isRetainedCategorySelected:e.outOfPocket.isRetainedCategorySelected},sectionId:Xe(w,"outOfPocket"),accountList:C,classList:m,autoFields:L,merchantList:S,tentativeMerchantName:te,allCurrencies:we,isAddReimbursementDisabled:$,accountsHierarchyList:he,classHierarchyList:re}):t.jsx(Wo,{lineIndex:p,reimbursementId:E,isReimbursementCommentingEnabled:T,isDisabled:R,mileage:{transactionDate:e.mileage.transactionDate!=null?ee.zeniDate(e.mileage.transactionDate.toDateString()):void 0,class:e.mileage.class.selectedOption,distanceInMiles:e.mileage.distanceInMiles,amount:{amount:e.mileage.amount?.amount??0,currencyCode:e.mileage.amount?.currencyCode??"USD",currencySymbol:e.mileage.amount?.currencySymbol??"$"},memo:e.mileage.memo},classList:m,sectionId:Xe(w,"mileage"),companyMileageConfigInfo:pe,defaultCurrency:l,isAddReimbursementDisabled:$,classHierarchyList:re})]})]})},ra=n.div``,la=n.div`
166
+ `,Ze=(e,o)=>`${e}.${o}`,Ee={paddingTop:new c(a[5],a[4]),marginBottom:new c(a[3],a[3]),labelPaddingLeft:new c(a[3],a[4]),buttonWidth:new c(70,70),containerRightMargin:new c(a[3],a[8]),containerLeftMargin:new c(a[3],a[6]),deleteConfirmationTextMarginBottom:new c(a[2],a[0])},G=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail,aa=({lineData:e,currencyConversionState:o,recommendationFetchState:r,remiStage:u,lineIndex:p,accountList:C,classList:m,merchantList:S,hasFile:b,defaultCurrency:l,hasMultipleLineItems:k,fileRequiredLineIds:f,duplicateLineDetails:s,remiStatus:g,sectionId:w,isDisabled:P,isReimbursementCommentingEnabled:D,isAddReimbursementDisabled:$,style:q,autoFields:L=[],analytics:I,reimbursementId:E,tentativeMerchantName:te,companyMileageConfigInfo:pe,uncategorizedAccounts:A,removeDuplicateReimbursementForLine:_,scrollToSection:Y,onDuplicateLineClick:H,onRemoveReimbursement:ie,clearTentativeNameForLine:Q,allCurrencies:we,accountsHierarchyList:he,classHierarchyList:re})=>{const J=Ie(),le=ft(),Oe=zt(),R=me.getLocalizedStrings().common.strings.empty,ge={application:"dashboard",companyId:le.currentTenant?.companyId,tab:"reimbursement",entityId:E},se=`dashboard_${le.currentTenant?.companyId}`,{getValues:Ne}=ct(),[Le,Ae]=v.useState(!1),Se=Ne(Ze(w,"reimbursementType"));return t.jsxs(ma,{style:q,windowSize:J,children:[t.jsxs(la,{hasFile:b,windowSize:J,showDeleteConfirmation:Le,children:[t.jsx(ha,{windowSize:J,children:k?`#${p+1} ${G.reimbursement}`:G.reimbursement}),Le?t.jsxs(ua,{windowSize:J,children:[t.jsx(da,{windowSize:J,children:G.deleteConfirmation}),t.jsxs(ra,{children:[t.jsx(Di,{label:G.buttons.cancel,onClick:()=>Ae(!1),style:{width:Ee.buttonWidth.value(J),marginLeft:J==="small"?i.sp0:i.sp4,marginRight:i.sp3},size:"small",variant:"secondary","data-testid":K("delete-remi-button",G.buttons.cancel)}),t.jsx(Di,{label:G.buttons.remove,onClick:()=>{I?.trackReimbursementDeleteReimbursementLine(e.lineId,E),Q?.(e.lineId??"1"),Ae(!1),_(e.lineId),ie(p)},style:{width:Ee.buttonWidth.value(J)},size:"small",variant:"danger","data-testid":K("delete-remi-button",G.buttons.remove)})]})]}):k&&(u==="draft"||g==="rejected")?t.jsx(sa,{className:"deleteIconWrapper",windowSize:J,onClick:()=>Ae(!0),"data-testid":K("delete-remi-button",e.lineId),children:t.jsx(yn,{enterDelay:600,title:G.deleteReimbursement,placement:"top-end",children:t.jsx(ca,{})})}):null]}),f.includes(e.lineId)?t.jsx(rn,{title:G.missingReceipt,description:G.missingReceiptDescription,style:{marginBottom:i.sp3}}):null,t.jsxs(ga,{windowSize:J,children:[s?.duplicateLineId!=null?t.jsxs(pa,{children:[G.thisExpense," ",s.isDuplicateWithinTransaction?t.jsx(zi,{"data-testid":K("view-duplicate-transaction-expense"),onClick:()=>(I?.trackReimbursementViewDuplicateExpense(!0,E),Y(s.duplicateLineId)),children:G.viewOriginalExpense}):t.jsx(zi,{"data-testid":K("view-duplicate-expense"),onClick:()=>{s.duplicateTransactionId!=null&&s.duplicateLineId!=null&&(I?.trackReimbursementViewDuplicateExpense(!1,E),H(s.duplicateTransactionId,s.duplicateLineId))},children:G.viewOriginalExpense})]}):null,t.jsx(fe,{isThreadAllowed:D&&E!=null,dashboardTabKey:xe({type:"details",key:Se===G.mileageKey?`${p}.mileage.reimbursementType`:`${p}.out_of_pocket.reimbursementType`}),roomId:se,companyId:le.currentTenant?.companyId??R,companyName:le.currentTenant?.companyName??R,entityId:E,dashboardOptionType:"reimbursement",filterMetaData:{...ge,entityType:`reimbursement.details.${ve("reimbursementType",p,Se===G.mileageKey?"mileage":"out_of_pocket")}`},fieldThreadTargetElement:Oe?.sharedRef?.contentWrapperRef,style:{borderRadius:s?.duplicateLineId!=null?"0 0 0 0":`${i.sp2} ${i.sp2} 0 0`},children:t.jsxs(ba,{isDisabled:P!=null,haveBorderRadius:s?.duplicateLineId==null,children:[t.jsx(ji,{isDisabled:P!=null||$?"disabled":void 0,isContainerClickable:!0,label:{label:G.outOfPocket},style:{padding:`${i.sp3} ${i.sp0}`,paddingLeft:Ee.labelPaddingLeft.value(J),borderTopLeftRadius:"inherit"},showOutline:!(D&&E!=null),radioField:{name:Ze(w,"reimbursementType"),id:`${Ze(w,"reimbursementType")}.${G.outOfPocketKey}`,value:G.outOfPocketKey}}),t.jsx(ya,{}),t.jsx(ji,{isDisabled:P!=null||$?"disabled":void 0,isContainerClickable:!0,label:{label:G.mileage},style:{padding:`${i.sp3} ${i.sp0}`,paddingLeft:Ee.labelPaddingLeft.value(J),borderTopRightRadius:"inherit"},showOutline:!(D&&E!=null),radioField:{name:Ze(w,"reimbursementType"),id:`${Ze(w,"reimbursementType")}.${G.mileageKey}`,value:G.mileageKey}})]})}),t.jsx(fa,{}),Se===G.outOfPocketKey?t.jsx(oa,{lineIndex:p,reimbursementId:E,uncategorizedAccounts:A,isReimbursementCommentingEnabled:D,isDisabled:P,outOfPocket:{transactionDate:e.outOfPocket.transactionDate!=null?ee.zeniDate(e.outOfPocket.transactionDate.toDateString()):void 0,account:e.outOfPocket.account.selectedOption,isConvertedCurrencyLoading:o?.fetchState==="In-Progress",isRecommendationLoading:r==="In-Progress",homeCurrencyDetails:e.homeCurrencyConversions,class:e.outOfPocket.class.selectedOption,amount:{amount:e.outOfPocket.amount?.amount??0,currencyCode:e.outOfPocket.amount?.currencyCode??"USD",currencySymbol:e.outOfPocket.amount?.currencySymbol??"$"},memo:e.outOfPocket.memo,merchant:e.outOfPocket.merchant.selectedOption,recommendations:e.outOfPocket.recommendations,recommendedAccount:e.outOfPocket.recommendedAccount,isCategoryUpdateSelected:e.outOfPocket.isCategoryUpdateSelected,isCategoryFirstTimeAutofilled:e.outOfPocket.isCategoryFirstTimeAutofilled,retainedAccount:e.outOfPocket.retainedAccount,isRetainedCategorySelected:e.outOfPocket.isRetainedCategorySelected},sectionId:Ze(w,"outOfPocket"),accountList:C,classList:m,autoFields:L,merchantList:S,tentativeMerchantName:te,allCurrencies:we,isAddReimbursementDisabled:$,accountsHierarchyList:he,classHierarchyList:re}):t.jsx(Wo,{lineIndex:p,reimbursementId:E,isReimbursementCommentingEnabled:D,isDisabled:P,mileage:{transactionDate:e.mileage.transactionDate!=null?ee.zeniDate(e.mileage.transactionDate.toDateString()):void 0,class:e.mileage.class.selectedOption,distanceInMiles:e.mileage.distanceInMiles,amount:{amount:e.mileage.amount?.amount??0,currencyCode:e.mileage.amount?.currencyCode??"USD",currencySymbol:e.mileage.amount?.currencySymbol??"$"},memo:e.mileage.memo},classList:m,sectionId:Ze(w,"mileage"),companyMileageConfigInfo:pe,defaultCurrency:l,isAddReimbursementDisabled:$,classHierarchyList:re})]})]})},ra=n.div``,la=n.div`
167
167
  //when file is present and it's a small window, we don't have to show the title and delete icon. Delete icon will be displayed inside the invoice title, next to replace
168
168
  //https://www.figma.com/file/ERKhHKvXKZSfIUruWfHqwU/New-Reimbursement-Mobile-Ver-1.0?type=design&node-id=419%3A6356&mode=design&t=upxphJ6HQRaue6wK-1
169
169
  display: ${e=>e.hasFile&&e.windowSize==="small"?"none":"flex"};
@@ -258,7 +258,7 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
258
258
  `,$a=n(Bt)`
259
259
  color: ${e=>e.theme.colors.primary};
260
260
  margin-bottom: ${e=>lt.marginBottom.valuePx(e.windowSize)};
261
- `,M={largeLabelWidth:new c(120,120,220),marginTop:new c(28,8),paymentToMarginTop:new c(0,a[4]),marginBottom:new c(a[5],a[4]),paymentToMarginBottom:new c(12,a[3]),totalMarginBottom:new c(a[3],a[3]),reimbursementSectionLeftMargin:new c(a[3],a[6]),reimbursementSectionRightMargin:new c(a[3],a[8]),invoiceSectionLeftMargin:new c(a[3],a[8]),invoiceSectionRightMargin:new c(a[3],a[6]),rightSectionWidth:new c(100,58),firstOrLastItemHeight:new c(390,760),itemHeight:new c(390,459),duplicateBannerWrapperMarginTop:new c(a[5],a[3]),duplicateBannerWrapperMarginRight:new c(a[3],a[8]),duplicateBannerWrapperMarginBottom:new c(a[5],a[3]),duplicateBannerWrapperMarginLeft:new c(a[3],a[6])},va={total:new pi("largeMedium","h6Medium")},{spendManagement:{reimbursement:{reimbursementDetail:V},billPay:{vendorCreation:{achDetails:It}}},common:{currency:{currencyCode:Dt}}}=me.getLocalizedStrings(),vn=e=>{let o=0,r=Dt;if("recommendationFetchState"in e&&e.recommendationFetchState!=null){const u=e;o=u.outOfPocket.amount??0,r=u.outOfPocket.currencyCode??Dt}else{const u=e;o=u.outOfPocket.amount?.amount??0,r=u.outOfPocket.amount?.currencyCode??Dt}return(e.homeCurrencyConversions?.currencyCode??Dt)!==r&&(o=e.homeCurrencyConversions?.amount??0),o},Ca=({remiUploadStatus:e,progressSectionObj:o,reimbursementId:r,createDate:u,scheduleDate:p,paymentDate:C,hasDuplicateLine:m,approvedDate:S,isFirstOrLastListItem:b,index:l,reimbursementSectionRef:k,showSkipAutoFill:f,lineData:s,currencyConversionState:g,authParams:w,uploadInvoiceEndPoint:R,accountList:T,classList:$,merchantList:K,remiStage:L,autoFieldsByLineId:I,isReimbursementCommentingEnabled:E,isAutoFieldsExist:te,totalAmount:pe,showTotalAmountLoader:A,totalNumberOfLines:_,defaultCurrency:Y,bankAccounts:q,fileRequiredLineIds:ie,isAddReimbursementDisabled:Z,duplicateLineByLineId:we,remiStatus:he,file:re,uncategorizedAccounts:J,reportTitle:le,recommendationFetchState:Oe,tentativeMerchantName:P,paymentTo:ge,analytics:se,companyMileageConfigInfo:Ne,loggedInUserDepartmentId:Le,isSignedInUserReimbursementCreator:Ae,setShowBankAccountPage:Se,setRefByLineId:ze,setCurrentLineIdForUpload:ye,onDuplicateLineClick:De,setUploadedReceiptPayload:dt,removeDuplicateReimbursementForLine:W,onReceiptsUpload:et,scrollToSection:tt,onRemoveReimbursement:We,onAddReimbursement:ke,clearTentativeNameForLine:qe,onReplaceClick:Te,onDeleteBankAccount:Ue,updateInvoiceUploadFetchState:Ve,removeFileFromLine:He,allCurrencies:Ke,accountsHierarchyList:ne,classHierarchyList:it})=>{const{formState:{errors:ut}}=ct(),Ge=v.useRef(null);v.useEffect(()=>(ze(z=>({...z,[`L${s.lineId}`]:Ge.current})),()=>{ze(z=>({...z,[`L${s.lineId}`]:null}))}),[s.lineId,ze]);const U=Ie(),mt=L==="draft"?V.newReimbursementTitle:V.editReimbursementTitle,F=M.largeLabelWidth.value(U),ae=z=>z.outOfPocket.account.selectedOption==null&&(z.outOfPocket.amount==null||z.outOfPocket.amount.amount==0)&&(z.outOfPocket.class.selectedOption==null||z.outOfPocket.class.selectedOption===Le)&&(z.outOfPocket.memo===""||z.outOfPocket.memo==null)&&z.outOfPocket.merchant.selectedOption==null&&z.outOfPocket.transactionDate==null,wt=q.map(z=>z.bankAccountId),$e=s.reimbursementType===V.outOfPocketKey&&vn(s)>=75&&re==null;return t.jsxs(Va,{ref:k,windowSize:U,children:[t.jsx(_a,{ref:z=>{z!=null&&(Ge.current=z)},windowSize:U,bottomSeperator:_!==1,showSkipAutoFill:f,isFirstItem:l===0,children:t.jsx(xn,{customError:$e?V.requireReceipt:void 0,analytics:se,showAutofill:!1,uploadInvoiceEndPoint:R,authParams:w,entityId:Z?"":void 0,file:re,style:{width:"auto",padding:0,height:b?M.firstOrLastItemHeight.valuePx(U):M.itemHeight.valuePx(U),margin:U==="small"?i.sp0:void 0},updateInvoiceUploadFetchState:Ve,onInvoiceUpload:z=>{s.reimbursementType===V.outOfPocketKey&&!ae(s)?(ye(Number(s.lineId)),dt(z),Te?.()):et(z,Number(s.lineId),!0)},dropFilePlaceholder:{upload:V.dropReceipt.upload,receipt:V.dropReceipt.receipt},showInfoText:!1,showTitlebar:!0,showTitlebarIcon:!Z,pdfTitle:_>1?`#${l+1} Receipt`:"Receipt",onDeleteClick:()=>{Ve?.("In-Progress"),setTimeout(()=>He?.(Number(s.lineId)))},onReplaceClick:()=>{ye(Number(s.lineId)),Te?.()},allowMultiFiles:_===l+1,type:"receipt"})}),t.jsxs(Ua,{windowSize:U,children:[l===0&&U!=="small"?t.jsxs(t.Fragment,{children:[t.jsx(La,{children:mt}),t.jsx(qa,{children:t.jsx(fo,{progressSectionObj:o,createDate:u,paymentDate:C,scheduleDate:p,approvedDate:S,isBillUploaded:r!=null?!0:e==="Completed"})}),te&&t.jsxs(Da,{children:[t.jsx(ka,{}),t.jsx(Oa,{children:V.banner})]}),m&&t.jsxs(Ta,{size:U,children:[t.jsx(Ia,{}),t.jsxs(Ra,{children:[t.jsx(ja,{children:V.thereSeems}),t.jsx(Pa,{children:V.pleaseFind})]})]}),t.jsx($n,{isReimbursementCommentingEnabled:E,sectionId:Lt,reportTitle:le,reimbursementId:r})]}):null,t.jsx(aa,{analytics:se,reimbursementId:r,onDuplicateLineClick:De,uncategorizedAccounts:J,sectionId:`${gi}.${l}`,scrollToSection:tt,lineIndex:l,lineData:s,accountList:T,classList:$,merchantList:K,autoFields:s.lineId!=null?I[s.lineId]:[],currencyConversionState:g,recommendationFetchState:Oe,onRemoveReimbursement:We,hasMultipleLineItems:_>1,clearTentativeNameForLine:qe,tentativeMerchantName:P,hasFile:re!=null,companyMileageConfigInfo:Ne,defaultCurrency:Y,remiStage:L,remiStatus:he,fileRequiredLineIds:ie,allCurrencies:Ke,isReimbursementCommentingEnabled:E,isAddReimbursementDisabled:Z,accountsHierarchyList:ne,classHierarchyList:it,duplicateLineDetails:we[s.lineId],removeDuplicateReimbursementForLine:W}),_!==1&&_===l+1&&t.jsxs(t.Fragment,{children:[t.jsxs(za,{windowSize:U,children:[t.jsx(Ba,{children:V.total}),A?t.jsx(Ma,{windowSize:U,children:t.jsx(Fa,{children:t.jsx(xt,{size:"Standard",start:!0,style:{display:"flex"}})})}):t.jsx(dn,{amount:ee.toAmount(pe,"USD","$"),integerStyles:Pt.h6Regular.cssObject,decimalStyles:Pt.standardRegular.cssObject})]}),t.jsxs(Na,{windowSize:U,onClick:()=>{Z===!1&&ke()},isDisabled:Z,"data-testid":H("add-reimbursement-row"),children:[t.jsx(Mi,{}),t.jsx(Bi,{children:V.addReimbursement})]}),Ae?t.jsxs(t.Fragment,{children:[t.jsx(Aa,{windowSize:U,children:V.receivePaymentTo}),t.jsx(Ea,{windowSize:U,shouldDisplay:q.length>0,children:t.jsx(un,{label:{label:V.yourBankAccount,width:F},style:{width:"auto"},singleSelectField:{singleSelect:{name:yt,placeholder:Ze(V.yourBankAccount),showValueEyeIcon:!Z,menuPlacement:"top",maxMenuHeight:308,showEyeIconOnSelect:!1,onDelete:Ue,getTooltipInfo:z=>Cn(q,z),onClickCreateBankAccount:()=>Se(!0),getLabelForId:z=>In(q,z),isOptionRemovable:!1,showDeleteIcon:!0,showAddBankAccountOption:!0,isDisabled:Z?"readonly":void 0,showTickMark:!1,alwaysShowEyeTooltip:!0},defaultValue:{selectedOption:ge,allOptions:wt},registerOptions:{required:!0,validate:z=>!!z.selectedOption}},isFunctional:!0})}),t.jsxs(Wa,{shouldDisplay:q.length===0,windowSize:U,hasError:st(ut,yt),onClick:()=>{Z===!1&&Se(!0)},isDisabled:Z,"data-testid":H("remi-add-bank-account-container"),children:[t.jsx(Mi,{}),t.jsx(Bi,{children:V.addBankAccount})]})]}):null]})]})]})},Cn=(e,o)=>{const r=kn(e,o);return r==null?`${It.bankRoutingNumber} ${V.emptyValue}
261
+ `,M={largeLabelWidth:new c(120,120,220),marginTop:new c(28,8),paymentToMarginTop:new c(0,a[4]),marginBottom:new c(a[5],a[4]),paymentToMarginBottom:new c(12,a[3]),totalMarginBottom:new c(a[3],a[3]),reimbursementSectionLeftMargin:new c(a[3],a[6]),reimbursementSectionRightMargin:new c(a[3],a[8]),invoiceSectionLeftMargin:new c(a[3],a[8]),invoiceSectionRightMargin:new c(a[3],a[6]),rightSectionWidth:new c(100,58),firstOrLastItemHeight:new c(390,760),itemHeight:new c(390,459),duplicateBannerWrapperMarginTop:new c(a[5],a[3]),duplicateBannerWrapperMarginRight:new c(a[3],a[8]),duplicateBannerWrapperMarginBottom:new c(a[5],a[3]),duplicateBannerWrapperMarginLeft:new c(a[3],a[6])},va={total:new pi("largeMedium","h6Medium")},{spendManagement:{reimbursement:{reimbursementDetail:V},billPay:{vendorCreation:{achDetails:It}}},common:{currency:{currencyCode:Tt}}}=me.getLocalizedStrings(),vn=e=>{let o=0,r=Tt;if("recommendationFetchState"in e&&e.recommendationFetchState!=null){const u=e;o=u.outOfPocket.amount??0,r=u.outOfPocket.currencyCode??Tt}else{const u=e;o=u.outOfPocket.amount?.amount??0,r=u.outOfPocket.amount?.currencyCode??Tt}return(e.homeCurrencyConversions?.currencyCode??Tt)!==r&&(o=e.homeCurrencyConversions?.amount??0),o},Ca=({remiUploadStatus:e,progressSectionObj:o,reimbursementId:r,createDate:u,scheduleDate:p,paymentDate:C,hasDuplicateLine:m,approvedDate:S,isFirstOrLastListItem:b,index:l,reimbursementSectionRef:k,showSkipAutoFill:f,lineData:s,currencyConversionState:g,authParams:w,uploadInvoiceEndPoint:P,accountList:D,classList:$,merchantList:q,remiStage:L,autoFieldsByLineId:I,isReimbursementCommentingEnabled:E,isAutoFieldsExist:te,totalAmount:pe,showTotalAmountLoader:A,totalNumberOfLines:_,defaultCurrency:Y,bankAccounts:H,fileRequiredLineIds:ie,isAddReimbursementDisabled:Q,duplicateLineByLineId:we,remiStatus:he,file:re,uncategorizedAccounts:J,reportTitle:le,recommendationFetchState:Oe,tentativeMerchantName:R,paymentTo:ge,analytics:se,companyMileageConfigInfo:Ne,loggedInUserDepartmentId:Le,isSignedInUserReimbursementCreator:Ae,setShowBankAccountPage:Se,setRefByLineId:ze,setCurrentLineIdForUpload:ye,onDuplicateLineClick:Te,setUploadedReceiptPayload:dt,removeDuplicateReimbursementForLine:W,onReceiptsUpload:et,scrollToSection:tt,onRemoveReimbursement:We,onAddReimbursement:ke,clearTentativeNameForLine:He,onReplaceClick:De,onDeleteBankAccount:Ue,updateInvoiceUploadFetchState:Ve,removeFileFromLine:Ke,allCurrencies:qe,accountsHierarchyList:ne,classHierarchyList:it})=>{const{formState:{errors:ut}}=ct(),Ge=v.useRef(null);v.useEffect(()=>(ze(z=>({...z,[`L${s.lineId}`]:Ge.current})),()=>{ze(z=>({...z,[`L${s.lineId}`]:null}))}),[s.lineId,ze]);const U=Ie(),mt=L==="draft"?V.newReimbursementTitle:V.editReimbursementTitle,F=M.largeLabelWidth.value(U),ae=z=>z.outOfPocket.account.selectedOption==null&&(z.outOfPocket.amount==null||z.outOfPocket.amount.amount==0)&&(z.outOfPocket.class.selectedOption==null||z.outOfPocket.class.selectedOption===Le)&&(z.outOfPocket.memo===""||z.outOfPocket.memo==null)&&z.outOfPocket.merchant.selectedOption==null&&z.outOfPocket.transactionDate==null,wt=H.map(z=>z.bankAccountId),$e=s.reimbursementType===V.outOfPocketKey&&vn(s)>=75&&re==null;return t.jsxs(Va,{ref:k,windowSize:U,children:[t.jsx(_a,{ref:z=>{z!=null&&(Ge.current=z)},windowSize:U,bottomSeperator:_!==1,showSkipAutoFill:f,isFirstItem:l===0,children:t.jsx(xn,{customError:$e?V.requireReceipt:void 0,analytics:se,showAutofill:!1,uploadInvoiceEndPoint:P,authParams:w,entityId:Q?"":void 0,file:re,style:{width:"auto",padding:0,height:b?M.firstOrLastItemHeight.valuePx(U):M.itemHeight.valuePx(U),margin:U==="small"?i.sp0:void 0},updateInvoiceUploadFetchState:Ve,onInvoiceUpload:z=>{s.reimbursementType===V.outOfPocketKey&&!ae(s)?(ye(Number(s.lineId)),dt(z),De?.()):et(z,Number(s.lineId),!0)},dropFilePlaceholder:{upload:V.dropReceipt.upload,receipt:V.dropReceipt.receipt},showInfoText:!1,showTitlebar:!0,showTitlebarIcon:!Q,pdfTitle:_>1?`#${l+1} Receipt`:"Receipt",onDeleteClick:()=>{Ve?.("In-Progress"),setTimeout(()=>Ke?.(Number(s.lineId)))},onReplaceClick:()=>{ye(Number(s.lineId)),De?.()},allowMultiFiles:_===l+1,type:"receipt"})}),t.jsxs(Ua,{windowSize:U,children:[l===0&&U!=="small"?t.jsxs(t.Fragment,{children:[t.jsx(La,{children:mt}),t.jsx(Ha,{children:t.jsx(fo,{progressSectionObj:o,createDate:u,paymentDate:C,scheduleDate:p,approvedDate:S,isBillUploaded:r!=null?!0:e==="Completed"})}),te&&t.jsxs(Ta,{children:[t.jsx(ka,{}),t.jsx(Oa,{children:V.banner})]}),m&&t.jsxs(Da,{size:U,children:[t.jsx(Ia,{}),t.jsxs(Pa,{children:[t.jsx(ja,{children:V.thereSeems}),t.jsx(Ra,{children:V.pleaseFind})]})]}),t.jsx($n,{isReimbursementCommentingEnabled:E,sectionId:Lt,reportTitle:le,reimbursementId:r})]}):null,t.jsx(aa,{analytics:se,reimbursementId:r,onDuplicateLineClick:Te,uncategorizedAccounts:J,sectionId:`${gi}.${l}`,scrollToSection:tt,lineIndex:l,lineData:s,accountList:D,classList:$,merchantList:q,autoFields:s.lineId!=null?I[s.lineId]:[],currencyConversionState:g,recommendationFetchState:Oe,onRemoveReimbursement:We,hasMultipleLineItems:_>1,clearTentativeNameForLine:He,tentativeMerchantName:R,hasFile:re!=null,companyMileageConfigInfo:Ne,defaultCurrency:Y,remiStage:L,remiStatus:he,fileRequiredLineIds:ie,allCurrencies:qe,isReimbursementCommentingEnabled:E,isAddReimbursementDisabled:Q,accountsHierarchyList:ne,classHierarchyList:it,duplicateLineDetails:we[s.lineId],removeDuplicateReimbursementForLine:W}),_!==1&&_===l+1&&t.jsxs(t.Fragment,{children:[t.jsxs(za,{windowSize:U,children:[t.jsx(Ba,{children:V.total}),A?t.jsx(Ma,{windowSize:U,children:t.jsx(Fa,{children:t.jsx(xt,{size:"Standard",start:!0,style:{display:"flex"}})})}):t.jsx(dn,{amount:ee.toAmount(pe,"USD","$"),integerStyles:Rt.h6Regular.cssObject,decimalStyles:Rt.standardRegular.cssObject})]}),t.jsxs(Na,{windowSize:U,onClick:()=>{Q===!1&&ke()},isDisabled:Q,"data-testid":K("add-reimbursement-row"),children:[t.jsx(Mi,{}),t.jsx(Bi,{children:V.addReimbursement})]}),Ae?t.jsxs(t.Fragment,{children:[t.jsx(Aa,{windowSize:U,children:V.receivePaymentTo}),t.jsx(Ea,{windowSize:U,shouldDisplay:H.length>0,children:t.jsx(un,{label:{label:V.yourBankAccount,width:F},style:{width:"auto"},singleSelectField:{singleSelect:{name:yt,placeholder:Qe(V.yourBankAccount),showValueEyeIcon:!Q,menuPlacement:"top",maxMenuHeight:308,showEyeIconOnSelect:!1,onDelete:Ue,getTooltipInfo:z=>Cn(H,z),onClickCreateBankAccount:()=>Se(!0),getLabelForId:z=>In(H,z),isOptionRemovable:!1,showDeleteIcon:!0,showAddBankAccountOption:!0,isDisabled:Q?"readonly":void 0,showTickMark:!1,alwaysShowEyeTooltip:!0},defaultValue:{selectedOption:ge,allOptions:wt},registerOptions:{required:!0,validate:z=>!!z.selectedOption}},isFunctional:!0})}),t.jsxs(Wa,{shouldDisplay:H.length===0,windowSize:U,hasError:st(ut,yt),onClick:()=>{Q===!1&&Se(!0)},isDisabled:Q,"data-testid":K("remi-add-bank-account-container"),children:[t.jsx(Mi,{}),t.jsx(Bi,{children:V.addBankAccount})]})]}):null]})]})]})},Cn=(e,o)=>{const r=kn(e,o);return r==null?`${It.bankRoutingNumber} ${V.emptyValue}
262
262
  ${It.bankAccountNumber} ${V.emptyValue}`:`${It.bankRoutingNumber} ${r.bankRoutingNumberAch??V.emptyValue}, ${r.bankName??V.emptyValue}
263
263
  ${It.bankAccountNumber} ${r.bankAccountNumber??V.emptyValue}`},kn=(e,o)=>e.find(r=>r.bankAccountId===o),In=(e,o)=>{const r=kn(e,o);return r==null?V.selectBankAccount:r.bankAccountName?r.bankAccountName:r.maskedAccountNumber?r.maskedAccountNumber:r.bankName&&r.bankAccountNumber?`${r.bankName} ${V.accountNameConnector}${r.bankAccountNumber.slice(r.bankAccountNumber.length-4)}`:V.selectBankAccount},ka=n(di)`
264
264
  color: ${e=>e.theme.colors.primary};
@@ -268,7 +268,7 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
268
268
  width: ${i.sp4};
269
269
  height: ${i.sp4};
270
270
  color: ${j.brandColorGoldDark};
271
- `,Da=n.div`
271
+ `,Ta=n.div`
272
272
  display: flex;
273
273
  gap: ${i.sp2};
274
274
  border: 1px solid ${e=>e.theme.colors.grey3};
@@ -276,7 +276,7 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
276
276
  border-radius: ${i.sp2};
277
277
  align-items: center;
278
278
  margin: 0 ${i.sp8} 0 ${i.sp6};
279
- `,Ta=n.div`
279
+ `,Da=n.div`
280
280
  display: flex;
281
281
  gap: ${i.sp2};
282
282
  padding: ${i.sp3};
@@ -290,9 +290,9 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
290
290
  border: 1px solid ${e=>e.theme.colors.brandColorGoldDark};
291
291
  `,ja=n(Mt)`
292
292
  color: ${e=>e.theme.colors.brandColorGoldDark};
293
- `,Ra=n.div`
293
+ `,Pa=n.div`
294
294
  width: 100%;
295
- `,Pa=n(hi)`
295
+ `,Ra=n(hi)`
296
296
  color: ${e=>e.theme.colors.brandColorGoldDark};
297
297
  `,Oa=n.span`
298
298
  color: ${e=>e.theme.colors.hero};
@@ -405,12 +405,12 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
405
405
  visibility: ${e=>e.showSkipAutoFill?"hidden":"unset"};
406
406
  margin-bottom: ${e=>e.bottomSeperator===!0&&e.windowSize!=="small"?e.isFirstItem?"102px":i.sp10:0};
407
407
  margin-top: ${e=>M.marginTop.valuePx(e.windowSize)};
408
- `,qa=n.div`
408
+ `,Ha=n.div`
409
409
  padding: ${i.sp2} ${i.sp8} ${i.sp0} ${i.sp6};
410
- `,Ha={total:new pi("largeMedium","h6Medium")},X={largeLabelWidth:new c(120,120,220),marginBottom:new c(a[5],a[4]),addBankAccountMarginBottom:new c(a[5],a[5]),marginTop:new c(a[0],78),paymentToMarginTop:new c(0,a[4]),totalMarginBottom:new c(a[3],a[3]),rightMargin:new c(a[3],a[8]),leftMargin:new c(a[3],a[6]),paymentToMarginBottom:new c(12,a[3])},Qe=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail,Ka=({remiDetails:e,isUserAdmin:o,authParams:r,uploadInvoiceEndPoint:u,showSkipAutoFill:p,isReimbursementCommentingEnabled:C,isAutoFieldsExist:m,totalAmount:S,defaultCurrency:b,hasDuplicateLine:l,bankAccounts:k,fileRequiredLineIds:f,companyMileageConfigInfo:s,analytics:g,reimbursementId:w,currencyConversionStatus:R,setShowSkipAutoFill:T,setShowBankAccountPage:$,removeDuplicateReimbursementForLine:K,onReceiptsUpload:L,setCurrentLineIdForUpload:I,onDuplicateLineClick:E,setUploadedReceiptPayload:te,removeFileFromLine:pe,onReplaceClick:A,updateInvoiceUploadFetchState:_,clearTentativeNameForLine:Y,onDeleteBankAccount:q,uncategorizedAccounts:ie,isSignedInUserReimbursementCreator:Z,duplicateLineByLineId:we,showTotalAmountLoader:he,scrollContainerRef:re})=>{const{control:J,formState:{errors:le}}=ct(),{fields:Oe,append:P,remove:ge}=uo({name:gi,control:J}),se=Oe,Ne=v.useRef(null),Le=F=>{setTimeout(()=>{ge(F)})},{tentativeMerchantNameByLineId:Ae,remiStage:Se,remiStatus:ze}=e,ye=!Z||Se==="pending_approval"&&ze!=="rejected"&&o||Se==="pending_approval"&&ze==="rejected",De=ye?e.paymentToBankAccountDetail!=null?[e.paymentToBankAccountDetail]:[]:k,dt=De.map(F=>F.bankAccountId),W=Ie(),et=X.largeLabelWidth.value(W),tt=e.whatForSection.reportTitle,We=e.accountList.accounts,ke=e.accountsHierarchyList,qe=e.classHierarchyList,Te=e.classList.classes,Ue=e.merchantList.merchants,Ve=e.addRemiAutoFieldsByLineId,He=Math.max(...Object.keys(e.editRemiInitialDetails?.lineDetailSection??{}).map(F=>Number(F)),0),Ke=()=>{const F=se[se.length-1],ae=Dn(se.length,Number(F.lineId)>He?String(Number(F.lineId)+1):String(He+1),ke,qe,Ue,b,e.allCurrencies,e.loggedInUserDepartmentId);setTimeout(()=>{P(ae,{shouldFocus:!1})}),I(Number(ae.lineId)),T(!0),setTimeout(()=>Pi(Ne.current,re?.current),50)},[ne,it]=v.useState({}),ut=v.useCallback(F=>{const ae=ne[`L${F}`];ae!=null&&Pi(ae,re?.current)},[ne,re]),Ge=e.reimbursementInfo?.billStatus.code=="approved"&&e.reimbursementInfo?.billPaymentStatus.code?e.reimbursementInfo?.billPaymentStatus:e.reimbursementInfo?.billStatus,U=e.reimbursementInfo?.paymentDate!=null?ee.zeniDate(ee.getNextNthWorkingDay(e.reimbursementInfo.paymentDate.toDate(),[0,6],e.achSameDayMaxDays).toDateString()):void 0,mt=e.reimbursementInfo?.expectedDepositDate??U;return t.jsxs(Xa,{windowSize:W,showSkipAutoFill:p,children:[se.map((F,ae)=>t.jsx(Ca,{removeDuplicateReimbursementForLine:K,onDuplicateLineClick:E,scrollToSection:ut,setRefByLineId:it,duplicateLineByLineId:we,reimbursementId:w,remiUploadStatus:e.uploadStatus,uncategorizedAccounts:ie,progressSectionObj:Ge,createDate:e.createTime,paymentDate:mt,scheduleDate:e.reimbursementInfo?.paymentDate,approvedDate:e.latestApprovedDate,isFirstOrLastListItem:se.length-1===ae||ae===0,index:ae,reimbursementSectionRef:Ne,remiStage:Se,remiStatus:ze,authParams:r,file:F.file,uploadInvoiceEndPoint:u,showSkipAutoFill:p,lineData:F,currencyConversionState:R[F.lineId],recommendationFetchState:e.lineDetailSection[F.lineId]?.recommendationFetchState,setCurrentLineIdForUpload:I,setUploadedReceiptPayload:te,onReplaceClick:A,onReceiptsUpload:L,removeFileFromLine:pe,isReimbursementCommentingEnabled:C,isAutoFieldsExist:m,reportTitle:tt,accountList:We,classList:Te,merchantList:Ue,autoFieldsByLineId:Ve,onRemoveReimbursement:Le,onAddReimbursement:Ke,totalAmount:S,showTotalAmountLoader:he,hasDuplicateLine:l,totalNumberOfLines:se.length,updateInvoiceUploadFetchState:_,clearTentativeNameForLine:Y,tentativeMerchantName:Ae[F.lineId],companyMileageConfigInfo:s,defaultCurrency:b,setShowBankAccountPage:$,paymentTo:e.paymentTo,bankAccounts:De,onDeleteBankAccount:q,analytics:g,fileRequiredLineIds:f,allCurrencies:e.allCurrencies,loggedInUserDepartmentId:e.loggedInUserDepartmentId,isAddReimbursementDisabled:ye,accountsHierarchyList:ke,classHierarchyList:qe,isSignedInUserReimbursementCreator:Z},F.lineId)),se.length===1&&t.jsxs(t.Fragment,{children:[t.jsxs(Jt,{children:[W!=="small"?t.jsx(Gt,{windowSize:W}):null,t.jsx(Yt,{windowSize:W,children:t.jsxs(Qa,{windowSize:W,children:[t.jsx(Za,{children:Qe.total}),he?t.jsx(tr,{windowSize:W,children:t.jsx(ir,{children:t.jsx(xt,{size:"Standard",start:!0,style:{display:"flex"}})})}):t.jsx(dn,{amount:ee.toAmount(S,ee.defaultVendorCurrency.currencyCode,ee.defaultVendorCurrency.currencySymbol),integerStyles:Pt.h6Regular.cssObject,decimalStyles:Pt.standardRegular.cssObject})]})})]}),t.jsxs(Jt,{children:[W!=="small"?t.jsx(Gt,{windowSize:W}):null,t.jsx(Yt,{windowSize:W,children:t.jsxs(nr,{windowSize:W,onClick:()=>{ye===!1&&Ke()},isDisabled:ye,"data-testid":H("add-reimbursement-container"),children:[t.jsx(Ei,{}),t.jsx(Fi,{children:Qe.addReimbursement})]})})]}),t.jsxs(Jt,{children:[W!=="small"?t.jsx(Gt,{windowSize:W}):null,Z?t.jsxs(Yt,{windowSize:W,children:[t.jsx(er,{windowSize:W,children:Qe.receivePaymentTo}),t.jsx(Ja,{windowSize:W,shouldDisplay:De.length>0,children:t.jsx(un,{label:{label:Qe.yourBankAccount,width:et},style:{width:"auto"},singleSelectField:{singleSelect:{name:yt,placeholder:Ze(Qe.yourBankAccount),showValueEyeIcon:!ye,menuPlacement:"top",maxMenuHeight:308,showEyeIconOnSelect:!1,onDelete:q,getTooltipInfo:F=>Cn(De,F),onClickCreateBankAccount:()=>$(!0),getLabelForId:F=>In(De,F),isOptionRemovable:!1,showDeleteIcon:!0,showAddBankAccountOption:!0,isDisabled:ye?"readonly":void 0,showTickMark:!1,alwaysShowEyeTooltip:!0},defaultValue:{selectedOption:e.paymentTo,allOptions:dt},registerOptions:{required:!0,validate:F=>!!F.selectedOption}},isFunctional:!0})}),t.jsxs(or,{shouldDisplay:De.length===0,windowSize:W,onClick:()=>{ye===!1&&$(!0)},hasError:st(le,yt),isDisabled:ye,"data-testid":H("remi-add-bank-account-container"),children:[t.jsx(Ei,{}),t.jsx(Fi,{children:Qe.addBankAccount})]})]}):null]})]})]})},Dn=(e,o,r,u,p,C,m,S)=>{const b=Ga(r,u,p,C,m,S);return{lineIndex:e,lineId:o,reimbursementType:Qe.outOfPocketKey,file:void 0,outOfPocket:b,mileage:Ya(u,C,S)}},Ga=(e,o,r,u,p,C)=>({transactionDate:void 0,class:{allOptions:_e(o,[]),selectedOption:C},account:{allOptions:At(e,[]),selectedOption:void 0},amount:{amount:0,currencyCode:u.currencyCode,currencySymbol:u.currencySymbol,currency:{allOptions:p.map(m=>({label:`${m.currencyCode} - ${m.currency}`,value:m.currencyCode,countryCode:si(m.countryCode)})),selectedOption:u.currencyCode??me.getLocalizedStrings().common.currency.currencyCode}},memo:void 0,merchant:{allOptions:r.map(m=>m.id).filter(m=>!!m),selectedOption:void 0},recommendations:[],isCategoryUpdateSelected:!1,isCategoryFirstTimeAutofilled:!1,isRetainedCategorySelected:!1}),Ya=(e,o,r)=>({transactionDate:void 0,class:{allOptions:_e(e,[]),selectedOption:r},distanceInMiles:void 0,amount:{amount:0,currencyCode:o.currencyCode,currencySymbol:o.currencySymbol},memo:void 0}),Ja=n.div`
411
- margin-left: ${e=>X.leftMargin.valuePx(e.windowSize)};
412
- margin-right: ${e=>X.rightMargin.valuePx(e.windowSize)};
413
- margin-bottom: ${e=>X.addBankAccountMarginBottom.valuePx(e.windowSize)};
410
+ `,Ka={total:new pi("largeMedium","h6Medium")},Z={largeLabelWidth:new c(120,120,220),marginBottom:new c(a[5],a[4]),addBankAccountMarginBottom:new c(a[5],a[5]),marginTop:new c(a[0],78),paymentToMarginTop:new c(0,a[4]),totalMarginBottom:new c(a[3],a[3]),rightMargin:new c(a[3],a[8]),leftMargin:new c(a[3],a[6]),paymentToMarginBottom:new c(12,a[3])},Xe=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail,qa=({remiDetails:e,isUserAdmin:o,authParams:r,uploadInvoiceEndPoint:u,showSkipAutoFill:p,isReimbursementCommentingEnabled:C,isAutoFieldsExist:m,totalAmount:S,defaultCurrency:b,hasDuplicateLine:l,bankAccounts:k,fileRequiredLineIds:f,companyMileageConfigInfo:s,analytics:g,reimbursementId:w,currencyConversionStatus:P,setShowSkipAutoFill:D,setShowBankAccountPage:$,removeDuplicateReimbursementForLine:q,onReceiptsUpload:L,setCurrentLineIdForUpload:I,onDuplicateLineClick:E,setUploadedReceiptPayload:te,removeFileFromLine:pe,onReplaceClick:A,updateInvoiceUploadFetchState:_,clearTentativeNameForLine:Y,onDeleteBankAccount:H,uncategorizedAccounts:ie,isSignedInUserReimbursementCreator:Q,duplicateLineByLineId:we,showTotalAmountLoader:he,scrollContainerRef:re})=>{const{control:J,formState:{errors:le}}=ct(),{fields:Oe,append:R,remove:ge}=uo({name:gi,control:J}),se=Oe,Ne=v.useRef(null),Le=F=>{setTimeout(()=>{ge(F)})},{tentativeMerchantNameByLineId:Ae,remiStage:Se,remiStatus:ze}=e,ye=!Q||Se==="pending_approval"&&ze!=="rejected"&&o||Se==="pending_approval"&&ze==="rejected",Te=ye?e.paymentToBankAccountDetail!=null?[e.paymentToBankAccountDetail]:[]:k,dt=Te.map(F=>F.bankAccountId),W=Ie(),et=Z.largeLabelWidth.value(W),tt=e.whatForSection.reportTitle,We=e.accountList.accounts,ke=e.accountsHierarchyList,He=e.classHierarchyList,De=e.classList.classes,Ue=e.merchantList.merchants,Ve=e.addRemiAutoFieldsByLineId,Ke=Math.max(...Object.keys(e.editRemiInitialDetails?.lineDetailSection??{}).map(F=>Number(F)),0),qe=()=>{const F=se[se.length-1],ae=Tn(se.length,Number(F.lineId)>Ke?String(Number(F.lineId)+1):String(Ke+1),ke,He,Ue,b,e.allCurrencies,e.loggedInUserDepartmentId);setTimeout(()=>{R(ae,{shouldFocus:!1})}),I(Number(ae.lineId)),D(!0),setTimeout(()=>Ri(Ne.current,re?.current),50)},[ne,it]=v.useState({}),ut=v.useCallback(F=>{const ae=ne[`L${F}`];ae!=null&&Ri(ae,re?.current)},[ne,re]),Ge=e.reimbursementInfo?.billStatus.code=="approved"&&e.reimbursementInfo?.billPaymentStatus.code?e.reimbursementInfo?.billPaymentStatus:e.reimbursementInfo?.billStatus,U=e.reimbursementInfo?.paymentDate!=null?ee.zeniDate(ee.getNextNthWorkingDay(e.reimbursementInfo.paymentDate.toDate(),[0,6],e.achSameDayMaxDays).toDateString()):void 0,mt=e.reimbursementInfo?.expectedDepositDate??U;return t.jsxs(Za,{windowSize:W,showSkipAutoFill:p,children:[se.map((F,ae)=>t.jsx(Ca,{removeDuplicateReimbursementForLine:q,onDuplicateLineClick:E,scrollToSection:ut,setRefByLineId:it,duplicateLineByLineId:we,reimbursementId:w,remiUploadStatus:e.uploadStatus,uncategorizedAccounts:ie,progressSectionObj:Ge,createDate:e.createTime,paymentDate:mt,scheduleDate:e.reimbursementInfo?.paymentDate,approvedDate:e.latestApprovedDate,isFirstOrLastListItem:se.length-1===ae||ae===0,index:ae,reimbursementSectionRef:Ne,remiStage:Se,remiStatus:ze,authParams:r,file:F.file,uploadInvoiceEndPoint:u,showSkipAutoFill:p,lineData:F,currencyConversionState:P[F.lineId],recommendationFetchState:e.lineDetailSection[F.lineId]?.recommendationFetchState,setCurrentLineIdForUpload:I,setUploadedReceiptPayload:te,onReplaceClick:A,onReceiptsUpload:L,removeFileFromLine:pe,isReimbursementCommentingEnabled:C,isAutoFieldsExist:m,reportTitle:tt,accountList:We,classList:De,merchantList:Ue,autoFieldsByLineId:Ve,onRemoveReimbursement:Le,onAddReimbursement:qe,totalAmount:S,showTotalAmountLoader:he,hasDuplicateLine:l,totalNumberOfLines:se.length,updateInvoiceUploadFetchState:_,clearTentativeNameForLine:Y,tentativeMerchantName:Ae[F.lineId],companyMileageConfigInfo:s,defaultCurrency:b,setShowBankAccountPage:$,paymentTo:e.paymentTo,bankAccounts:Te,onDeleteBankAccount:H,analytics:g,fileRequiredLineIds:f,allCurrencies:e.allCurrencies,loggedInUserDepartmentId:e.loggedInUserDepartmentId,isAddReimbursementDisabled:ye,accountsHierarchyList:ke,classHierarchyList:He,isSignedInUserReimbursementCreator:Q},F.lineId)),se.length===1&&t.jsxs(t.Fragment,{children:[t.jsxs(Jt,{children:[W!=="small"?t.jsx(Gt,{windowSize:W}):null,t.jsx(Yt,{windowSize:W,children:t.jsxs(Xa,{windowSize:W,children:[t.jsx(Qa,{children:Xe.total}),he?t.jsx(tr,{windowSize:W,children:t.jsx(ir,{children:t.jsx(xt,{size:"Standard",start:!0,style:{display:"flex"}})})}):t.jsx(dn,{amount:ee.toAmount(S,ee.defaultVendorCurrency.currencyCode,ee.defaultVendorCurrency.currencySymbol),integerStyles:Rt.h6Regular.cssObject,decimalStyles:Rt.standardRegular.cssObject})]})})]}),t.jsxs(Jt,{children:[W!=="small"?t.jsx(Gt,{windowSize:W}):null,t.jsx(Yt,{windowSize:W,children:t.jsxs(nr,{windowSize:W,onClick:()=>{ye===!1&&qe()},isDisabled:ye,"data-testid":K("add-reimbursement-container"),children:[t.jsx(Ei,{}),t.jsx(Fi,{children:Xe.addReimbursement})]})})]}),t.jsxs(Jt,{children:[W!=="small"?t.jsx(Gt,{windowSize:W}):null,Q?t.jsxs(Yt,{windowSize:W,children:[t.jsx(er,{windowSize:W,children:Xe.receivePaymentTo}),t.jsx(Ja,{windowSize:W,shouldDisplay:Te.length>0,children:t.jsx(un,{label:{label:Xe.yourBankAccount,width:et},style:{width:"auto"},singleSelectField:{singleSelect:{name:yt,placeholder:Qe(Xe.yourBankAccount),showValueEyeIcon:!ye,menuPlacement:"top",maxMenuHeight:308,showEyeIconOnSelect:!1,onDelete:H,getTooltipInfo:F=>Cn(Te,F),onClickCreateBankAccount:()=>$(!0),getLabelForId:F=>In(Te,F),isOptionRemovable:!1,showDeleteIcon:!0,showAddBankAccountOption:!0,isDisabled:ye?"readonly":void 0,showTickMark:!1,alwaysShowEyeTooltip:!0},defaultValue:{selectedOption:e.paymentTo,allOptions:dt},registerOptions:{required:!0,validate:F=>!!F.selectedOption}},isFunctional:!0})}),t.jsxs(or,{shouldDisplay:Te.length===0,windowSize:W,onClick:()=>{ye===!1&&$(!0)},hasError:st(le,yt),isDisabled:ye,"data-testid":K("remi-add-bank-account-container"),children:[t.jsx(Ei,{}),t.jsx(Fi,{children:Xe.addBankAccount})]})]}):null]})]})]})},Tn=(e,o,r,u,p,C,m,S)=>{const b=Ga(r,u,p,C,m,S);return{lineIndex:e,lineId:o,reimbursementType:Xe.outOfPocketKey,file:void 0,outOfPocket:b,mileage:Ya(u,C,S)}},Ga=(e,o,r,u,p,C)=>({transactionDate:void 0,class:{allOptions:_e(o,[]),selectedOption:C},account:{allOptions:At(e,[]),selectedOption:void 0},amount:{amount:0,currencyCode:u.currencyCode,currencySymbol:u.currencySymbol,currency:{allOptions:p.map(m=>({label:`${m.currencyCode} - ${m.currency}`,value:m.currencyCode,countryCode:si(m.countryCode)})),selectedOption:u.currencyCode??me.getLocalizedStrings().common.currency.currencyCode}},memo:void 0,merchant:{allOptions:r.map(m=>m.id).filter(m=>!!m),selectedOption:void 0},recommendations:[],isCategoryUpdateSelected:!1,isCategoryFirstTimeAutofilled:!1,isRetainedCategorySelected:!1}),Ya=(e,o,r)=>({transactionDate:void 0,class:{allOptions:_e(e,[]),selectedOption:r},distanceInMiles:void 0,amount:{amount:0,currencyCode:o.currencyCode,currencySymbol:o.currencySymbol},memo:void 0}),Ja=n.div`
411
+ margin-left: ${e=>Z.leftMargin.valuePx(e.windowSize)};
412
+ margin-right: ${e=>Z.rightMargin.valuePx(e.windowSize)};
413
+ margin-bottom: ${e=>Z.addBankAccountMarginBottom.valuePx(e.windowSize)};
414
414
  border: 1px solid ${e=>e.theme.colors.grey3};
415
415
  border-radius: ${i.sp2};
416
416
  box-shadow: ${e=>`${i.sp0} 2px ${i.sp1} ${e.theme.colors.dropShadowNormal}`};
@@ -419,11 +419,11 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
419
419
  width: ${e=>e.windowSize==="small"?"100%":"42%"};
420
420
  `,Yt=n.div`
421
421
  width: ${e=>e.windowSize==="small"?"100%":"58%"};
422
- `,Xa=n.div`
422
+ `,Za=n.div`
423
423
  display: ${e=>e.windowSize==="small"&&e.showSkipAutoFill?"none":"flex"};
424
424
  flex-direction: column;
425
- margin-top: ${e=>X.marginTop.valuePx(e.windowSize)};
426
- `,Qa=n.div`
425
+ margin-top: ${e=>Z.marginTop.valuePx(e.windowSize)};
426
+ `,Xa=n.div`
427
427
  padding: ${i.sp3};
428
428
  display: flex;
429
429
  align-items: center;
@@ -432,26 +432,26 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
432
432
  border: 1px solid ${e=>e.theme.colors.grey3};
433
433
  border-radius: ${i.sp2};
434
434
  color: ${e=>e.theme.colors.hero};
435
- margin-top: ${e=>X.totalMarginBottom.valuePx(e.windowSize)};
436
- margin-left: ${e=>X.leftMargin.valuePx(e.windowSize)};
437
- margin-right: ${e=>X.rightMargin.valuePx(e.windowSize)};
438
- margin-bottom: ${e=>X.totalMarginBottom.valuePx(e.windowSize)};
439
- `,Za=n(pn)`
435
+ margin-top: ${e=>Z.totalMarginBottom.valuePx(e.windowSize)};
436
+ margin-left: ${e=>Z.leftMargin.valuePx(e.windowSize)};
437
+ margin-right: ${e=>Z.rightMargin.valuePx(e.windowSize)};
438
+ margin-bottom: ${e=>Z.totalMarginBottom.valuePx(e.windowSize)};
439
+ `,Qa=n(pn)`
440
440
  display: flex;
441
441
  width: 176px;
442
442
  color: ${e=>e.theme.colors.primary};
443
443
  `,er=n(Bt)`
444
444
  color: ${e=>e.theme.colors.primary};
445
- margin-top: ${e=>X.paymentToMarginTop.valuePx(e.windowSize)};
446
- margin-bottom: ${e=>X.paymentToMarginBottom.valuePx(e.windowSize)};
447
- margin-left: ${e=>X.leftMargin.valuePx(e.windowSize)};
448
- margin-right: ${e=>X.rightMargin.valuePx(e.windowSize)};
445
+ margin-top: ${e=>Z.paymentToMarginTop.valuePx(e.windowSize)};
446
+ margin-bottom: ${e=>Z.paymentToMarginBottom.valuePx(e.windowSize)};
447
+ margin-left: ${e=>Z.leftMargin.valuePx(e.windowSize)};
448
+ margin-right: ${e=>Z.rightMargin.valuePx(e.windowSize)};
449
449
  `,tr=n(hn)`
450
450
  display: flex;
451
451
  width: calc(100% - 176px);
452
452
  justify-content: flex-end;
453
453
  color: ${e=>e.theme.colors.primary};
454
- ${e=>`${Ha.total.style(e.windowSize)}`};
454
+ ${e=>`${Ka.total.style(e.windowSize)}`};
455
455
  `,ir=n.div`
456
456
  padding-right: ${i.sp3};
457
457
  height: 30px;
@@ -473,10 +473,10 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
473
473
  border: 1px solid
474
474
  ${e=>e.isDisabled?e.theme.colors.grey3:e.hasError===!0?j.important:e.theme.colors.primary};
475
475
  }
476
- margin-top: ${e=>X.totalMarginBottom.valuePx(e.windowSize)};
477
- margin-left: ${e=>X.leftMargin.valuePx(e.windowSize)};
478
- margin-right: ${e=>X.rightMargin.valuePx(e.windowSize)};
479
- margin-bottom: ${e=>X.marginBottom.valuePx(e.windowSize)};
476
+ margin-top: ${e=>Z.totalMarginBottom.valuePx(e.windowSize)};
477
+ margin-left: ${e=>Z.leftMargin.valuePx(e.windowSize)};
478
+ margin-right: ${e=>Z.rightMargin.valuePx(e.windowSize)};
479
+ margin-bottom: ${e=>Z.marginBottom.valuePx(e.windowSize)};
480
480
  `,or=n.div`
481
481
  padding: ${i.sp3};
482
482
  display: ${e=>e.shouldDisplay?"flex":"none"};
@@ -492,9 +492,9 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
492
492
  border: 1px solid
493
493
  ${e=>e.isDisabled?e.theme.colors.grey3:e.hasError===!0?j.important:e.theme.colors.primary};
494
494
  }
495
- margin-left: ${e=>X.leftMargin.valuePx(e.windowSize)};
496
- margin-right: ${e=>X.rightMargin.valuePx(e.windowSize)};
497
- margin-bottom: ${e=>X.addBankAccountMarginBottom.valuePx(e.windowSize)};
495
+ margin-left: ${e=>Z.leftMargin.valuePx(e.windowSize)};
496
+ margin-right: ${e=>Z.rightMargin.valuePx(e.windowSize)};
497
+ margin-bottom: ${e=>Z.addBankAccountMarginBottom.valuePx(e.windowSize)};
498
498
  `,Fi=n(Mt)`
499
499
  color: inherit;
500
500
  `,Ei=n(gn)`
@@ -504,7 +504,7 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
504
504
  `,Jt=n.div`
505
505
  display: flex;
506
506
  width: 100%;
507
- `,Pe={buttonWidth:new c(140,140),paddingLeft:new c(a[3],a[6]),paddingRight:new c(a[3],a[8]),subTitleMarginbottom:new c(a[2],a[3]),orSeperatorTopBottomMargin:new c(a[6],44),iconWidthHeight:new c(20,a[4])},Ni="userBankAccountPage",Rt="bankAccountSection",ar=e=>({[Rt]:{bankRoutingNumber:e?.bankRoutingNumber,bankName:e?.bankName,bankAccountNumber:e?.bankAccountNumber,confirmedBankAccountNumber:e?.confirmedBankAccountNumber,bankAccountName:e?.bankAccountName}}),Wi=e=>`${e}_form`,rr=({bankAccountCreationState:e,setShowBankAccountPage:o,plaidConnectionDetails:r,onFetchLinkTokenClick:u,onEstablishConnectionClick:p,bankAccountToCreate:C,fetchBankNameByRoutingStatus:m,isDisabled:S,onSaveHandler:b,onUserBankDetailsUpdated:l,onFetchBankName:k,onBackClick:f})=>{const s=bt(),g=Ie(),w=en({mode:"onBlur",reValidateMode:"onChange",defaultValues:v.useMemo(()=>ar(C),[C])}),R=v.useCallback(Y=>{p?.(Y),f()},[f,p]),T=r.link_account_no_microdeposit,{open:$}=po({token:T.linkToken??null,onSuccess:R});v.useEffect(()=>{(ee.zeniDate(new Date().toISOString()).isAfter(T.expiration)||T.linkToken==null)&&u?.("link_account_no_microdeposit")},[]);const[K,L]=v.useState(!1),I=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail,E=me.getLocalizedStrings().common.footer,te={onOkClick:()=>{L(!1),w.reset(),f()},onCancelClick:()=>{L(!1)}},pe=async(Y,q)=>{const ie=q[Rt].bankRoutingNumber;l(q),Y===`${Rt}.bankRoutingNumber`&&ie?.length===9&&xo.test(ie)===!0&&k?.(ie)};v.useEffect(()=>{const Y=w.watch((q,{name:ie})=>{ie!=null&&q!=null&&ho(()=>pe(ie,q))});return()=>{Y.unsubscribe()}}),v.useEffect(()=>{e?.fetchState==="Completed"&&f()},[e?.fetchState,f,o]);const A=w.handleSubmit(Y=>{m.fetchState!=="In-Progress"&&b()}),_=s.mode==="light"?new Di(s.colors.brandColorJadeLight):new Di(s.colors.brandColorJadeDark);return t.jsxs(lr,{children:[t.jsxs(hr,{windowSize:g,children:[K===!0?t.jsx(li,{titleComponent:t.jsx(an,{children:I.discardTitle}),descriptionComponent:t.jsx(on,{children:I.discardDescription}),primaryButtonText:I.buttons.delete,secondaryButtonText:I.buttons.cancel,action:te}):null,t.jsx(Bo,{header:I.addBankAccount,isDirty:w.formState.isDirty,onBackClick:f,setShowConfirmationPopup:L}),t.jsx(sr,{}),t.jsxs(gr,{size:g,children:[t.jsx(Ao,{onClick:()=>{w.reset(),$()},title:I.connectYourBank,subTitle:I.loginToBank,header:I.setupAchPayments,icon:{element:t.jsx(go,{width:Pe.iconWidthHeight.valuePx(g),height:Pe.iconWidthHeight.valuePx(g)}),color:_},style:{width:"unset",rowGap:g==="small"?i.sp2:void 0}}),t.jsxs(cr,{windowSize:g,children:[t.jsx(dr,{}),t.jsx(mr,{children:t.jsx(pr,{children:I.or})})]}),t.jsx(ur,{windowSize:g,children:I.saveAccountManually})]}),t.jsx(yr,{size:g,children:t.jsx(nn,{...w,children:t.jsxs("form",{id:Wi(Ni),onSubmit:A,children:[e?.fetchState==="Error"&&e.error?.code===409?t.jsx(Mo,{warningText:I.accountExistWarning}):null,t.jsx(zo,{bankAccountToCreate:C,fetchBankNameByRoutingStatus:m,sectionId:Rt})]})})})]}),t.jsx(ln,{formId:Wi(Ni),primaryBtn:{label:I.saveAccount,isLoading:e.fetchState==="In-Progress",style:{width:Pe.buttonWidth.value(g)},isDisabled:S!=null},cancelBtn:{label:E.cancel,style:{width:Pe.buttonWidth.value(g)},shouldResetOnCancel:!1,onClick:()=>{w.formState.isDirty?L(!0):(L(!1),w.reset(),f())}}})]})},lr=n.div`
507
+ `,Re={buttonWidth:new c(140,140),paddingLeft:new c(a[3],a[6]),paddingRight:new c(a[3],a[8]),subTitleMarginbottom:new c(a[2],a[3]),orSeperatorTopBottomMargin:new c(a[6],44),iconWidthHeight:new c(20,a[4])},Ni="userBankAccountPage",Pt="bankAccountSection",ar=e=>({[Pt]:{bankRoutingNumber:e?.bankRoutingNumber,bankName:e?.bankName,bankAccountNumber:e?.bankAccountNumber,confirmedBankAccountNumber:e?.confirmedBankAccountNumber,bankAccountName:e?.bankAccountName}}),Wi=e=>`${e}_form`,rr=({bankAccountCreationState:e,setShowBankAccountPage:o,plaidConnectionDetails:r,onFetchLinkTokenClick:u,onEstablishConnectionClick:p,bankAccountToCreate:C,fetchBankNameByRoutingStatus:m,isDisabled:S,onSaveHandler:b,onUserBankDetailsUpdated:l,onFetchBankName:k,onBackClick:f})=>{const s=bt(),g=Ie(),w=en({mode:"onBlur",reValidateMode:"onChange",defaultValues:v.useMemo(()=>ar(C),[C])}),P=v.useCallback(Y=>{p?.(Y),f()},[f,p]),D=r.link_account_no_microdeposit,{open:$}=po({token:D.linkToken??null,onSuccess:P});v.useEffect(()=>{(ee.zeniDate(new Date().toISOString()).isAfter(D.expiration)||D.linkToken==null)&&u?.("link_account_no_microdeposit")},[]);const[q,L]=v.useState(!1),I=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail,E=me.getLocalizedStrings().common.footer,te={onOkClick:()=>{L(!1),w.reset(),f()},onCancelClick:()=>{L(!1)}},pe=async(Y,H)=>{const ie=H[Pt].bankRoutingNumber;l(H),Y===`${Pt}.bankRoutingNumber`&&ie?.length===9&&xo.test(ie)===!0&&k?.(ie)};v.useEffect(()=>{const Y=w.watch((H,{name:ie})=>{ie!=null&&H!=null&&ho(()=>pe(ie,H))});return()=>{Y.unsubscribe()}}),v.useEffect(()=>{e?.fetchState==="Completed"&&f()},[e?.fetchState,f,o]);const A=w.handleSubmit(Y=>{m.fetchState!=="In-Progress"&&b()}),_=s.mode==="light"?new Ti(s.colors.brandColorJadeLight):new Ti(s.colors.brandColorJadeDark);return t.jsxs(lr,{children:[t.jsxs(hr,{windowSize:g,children:[q===!0?t.jsx(li,{titleComponent:t.jsx(an,{children:I.discardTitle}),descriptionComponent:t.jsx(on,{children:I.discardDescription}),primaryButtonText:I.buttons.delete,secondaryButtonText:I.buttons.cancel,action:te}):null,t.jsx(Bo,{header:I.addBankAccount,isDirty:w.formState.isDirty,onBackClick:f,setShowConfirmationPopup:L}),t.jsx(sr,{}),t.jsxs(gr,{size:g,children:[t.jsx(Ao,{onClick:()=>{w.reset(),$()},title:I.connectYourBank,subTitle:I.loginToBank,header:I.setupAchPayments,icon:{element:t.jsx(go,{width:Re.iconWidthHeight.valuePx(g),height:Re.iconWidthHeight.valuePx(g)}),color:_},style:{width:"unset",rowGap:g==="small"?i.sp2:void 0}}),t.jsxs(cr,{windowSize:g,children:[t.jsx(dr,{}),t.jsx(mr,{children:t.jsx(pr,{children:I.or})})]}),t.jsx(ur,{windowSize:g,children:I.saveAccountManually})]}),t.jsx(yr,{size:g,children:t.jsx(nn,{...w,children:t.jsxs("form",{id:Wi(Ni),onSubmit:A,children:[e?.fetchState==="Error"&&e.error?.code===409?t.jsx(Mo,{warningText:I.accountExistWarning}):null,t.jsx(zo,{bankAccountToCreate:C,fetchBankNameByRoutingStatus:m,sectionId:Pt})]})})})]}),t.jsx(ln,{formId:Wi(Ni),primaryBtn:{label:I.saveAccount,isLoading:e.fetchState==="In-Progress",style:{width:Re.buttonWidth.value(g)},isDisabled:S!=null},cancelBtn:{label:E.cancel,style:{width:Re.buttonWidth.value(g)},shouldResetOnCancel:!1,onClick:()=>{w.formState.isDirty?L(!0):(L(!1),w.reset(),f())}}})]})},lr=n.div`
508
508
  display: flex;
509
509
  flex-direction: column;
510
510
  width: 100%;
@@ -513,14 +513,14 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
513
513
  margin: ${i.sp2} 0;
514
514
  position: relative;
515
515
  `,cr=n.div`
516
- margin: ${e=>Pe.orSeperatorTopBottomMargin.valuePx(e.windowSize)} 0;
516
+ margin: ${e=>Re.orSeperatorTopBottomMargin.valuePx(e.windowSize)} 0;
517
517
  position: relative;
518
518
  `,dr=n.div`
519
519
  background: ${e=>e.theme.colors.grey2};
520
520
  height: 1px;
521
521
  `,ur=n(wo)`
522
522
  color: ${e=>e.theme.colors.primary};
523
- margin-bottom: ${e=>Pe.subTitleMarginbottom.valuePx(e.windowSize)};
523
+ margin-bottom: ${e=>Re.subTitleMarginbottom.valuePx(e.windowSize)};
524
524
  `,mr=n.div`
525
525
  display: flex;
526
526
  justify-content: center;
@@ -541,13 +541,13 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
541
541
  flex-direction: column;
542
542
  flex-grow: 1;
543
543
  `,gr=n.div`
544
- padding-left: ${e=>Pe.paddingLeft.valuePx(e.size)};
545
- padding-right: ${e=>Pe.paddingRight.valuePx(e.size)};
544
+ padding-left: ${e=>Re.paddingLeft.valuePx(e.size)};
545
+ padding-right: ${e=>Re.paddingRight.valuePx(e.size)};
546
546
  `,yr=n.div`
547
- padding-left: ${e=>Pe.paddingLeft.valuePx(e.size)};
548
- padding-right: ${e=>Pe.paddingRight.valuePx(e.size)};
547
+ padding-left: ${e=>Re.paddingLeft.valuePx(e.size)};
548
+ padding-right: ${e=>Re.paddingRight.valuePx(e.size)};
549
549
  padding-bottom: ${i.sp3};
550
- `,Ce={containerWidth:new c(343,544),confirmationPopUpTitleMarginTop:new c(a[6],a[7]),confirmationPopUpTitlePaddingLeftRight:new c(a[5],a[8]),submitButtonWidth:new c(145,156),cancelButtonWidth:new c(121,121),errorLineItemGap:new c(a[2],12),styledCloseIconRight:new c(a[3],a[8])},{footer:Ui}=me.getLocalizedStrings().common,ue=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail.duplicatePopUpInfo,Vi=({fetchState:e})=>{switch(e){case"Not-Started":return t.jsx(qi,{});case"In-Progress":return t.jsx(xt,{size:"Small",start:!0,style:{alignItems:"center",display:"flex"}});case"Completed":return t.jsx(Tn,{});default:return t.jsx(qi,{})}},br=e=>{switch(e){case"Not-Started":return ue.detectDuplicates;case"In-Progress":return ue.detectingDuplicates;case"Completed":return ue.noDuplicatesFound;default:return ue.detectDuplicates}},fr=({submitFetchState:e,duplicateReimbursementStatus:o,hasDuplicateLine:r,numberOfDuplicateLines:u,setShowDuplicatePopup:p,analytics:C,reimbursementId:m,submitReport:S,fetchDuplicateReimbursement:b,clearDuplicateReimbursementDetail:l,clearRemiSaveStatus:k})=>{const f=Ie(),[s,g]=vt.useState(!0),w=ai(e),R=ai(o);vt.useEffect(()=>{setTimeout(()=>{s&&(g(!1),o==="Not-Started"&&b())},2e3)},[o,b,s]),vt.useEffect(()=>{w==="In-Progress"&&e==="Completed"&&(l(),p(!1))},[e,w,p,l]),vt.useEffect(()=>{R==="In-Progress"&&o==="Completed"&&!r&&S()},[R,o,r,S]);const T=o==="Error"||e==="Error";return t.jsxs(t.Fragment,{children:[T?t.jsx(xr,{size:f}):null,t.jsx(li,{action:{onOkClick:()=>{T?(l(),e==="Error"&&k(),g(!0)):(C?.trackReimbursementReviewDuplicateReportReimbursement(u,m),p(!1),ro())},onCancelClick:()=>{T?(l(),e==="Error"&&k(),p(!1)):(C?.trackReimbursementSubmitAnywayDuplicateReimbursement(u,m),S())}},shouldClickAway:T,isSecondaryLoading:e==="In-Progress",secondaryButtonVariant:"secondary",primaryButtonText:T?Ui.resubmit:ue.primaryButtonText,secondaryButtonText:T?Ui.cancel:ue.secondaryButtonText,primaryButtonWidth:T?Ce.cancelButtonWidth.value(f):Ce.submitButtonWidth.value(f),secondaryButtonWidth:T?Ce.cancelButtonWidth.value(f):Ce.submitButtonWidth.value(f),descriptionComponent:t.jsx($r,{size:f,children:t.jsxs(wr,{hasDuplicate:r,duplicateReimbursementStatus:o,children:[t.jsxs(Qt,{isDisabled:!1,isSuccess:!s,children:[s?t.jsx(xt,{size:"Small",start:!0,style:{alignItems:"center",display:"flex"}}):t.jsx(Tn,{}),t.jsx(Xt,{isDisabled:!1,children:s?ue.reviewingExpenses:ue.reviewedAllExpenses})]}),r||o==="Error"?t.jsxs(Ki,{size:f,children:[t.jsx(_i,{}),t.jsx(Hi,{children:o==="Error"?ue.failedToDetect:`${u} ${ue.duplicateExpensesFound}`})]}):t.jsxs(Qt,{isDisabled:o==="Not-Started",isSuccess:o==="Completed"&&u===0,children:[t.jsx(Vi,{fetchState:o}),t.jsx(Xt,{isDisabled:o==="Not-Started",children:br(o)})]}),e==="Error"?t.jsxs(Ki,{size:f,children:[t.jsx(_i,{}),t.jsx(Hi,{children:ue.failedToSubmit})]}):r||o==="Error"?null:t.jsxs(Qt,{isDisabled:e==="Not-Started",isSuccess:e==="Completed",children:[t.jsx(Vi,{fetchState:e}),t.jsx(Xt,{isDisabled:e==="Not-Started",children:e==="Not-Started"?ue.submitReport:ue.submittingReport})]})]})}),titleComponent:t.jsx(Sr,{size:f,children:ue.title}),showFooter:r||T,containerStyle:{width:Ce.containerWidth.value(f),maxWidth:"unset"}})]})},xr=n(cn)`
550
+ `,Ce={containerWidth:new c(343,544),confirmationPopUpTitleMarginTop:new c(a[6],a[7]),confirmationPopUpTitlePaddingLeftRight:new c(a[5],a[8]),submitButtonWidth:new c(145,156),cancelButtonWidth:new c(121,121),errorLineItemGap:new c(a[2],12),styledCloseIconRight:new c(a[3],a[8])},{footer:Ui}=me.getLocalizedStrings().common,ue=me.getLocalizedStrings().spendManagement.reimbursement.reimbursementDetail.duplicatePopUpInfo,Vi=({fetchState:e})=>{switch(e){case"Not-Started":return t.jsx(Hi,{});case"In-Progress":return t.jsx(xt,{size:"Small",start:!0,style:{alignItems:"center",display:"flex"}});case"Completed":return t.jsx(Dn,{});default:return t.jsx(Hi,{})}},br=e=>{switch(e){case"Not-Started":return ue.detectDuplicates;case"In-Progress":return ue.detectingDuplicates;case"Completed":return ue.noDuplicatesFound;default:return ue.detectDuplicates}},fr=({submitFetchState:e,duplicateReimbursementStatus:o,hasDuplicateLine:r,numberOfDuplicateLines:u,setShowDuplicatePopup:p,analytics:C,reimbursementId:m,submitReport:S,fetchDuplicateReimbursement:b,clearDuplicateReimbursementDetail:l,clearRemiSaveStatus:k})=>{const f=Ie(),[s,g]=vt.useState(!0),w=ai(e),P=ai(o);vt.useEffect(()=>{setTimeout(()=>{s&&(g(!1),o==="Not-Started"&&b())},2e3)},[o,b,s]),vt.useEffect(()=>{w==="In-Progress"&&e==="Completed"&&(l(),p(!1))},[e,w,p,l]),vt.useEffect(()=>{P==="In-Progress"&&o==="Completed"&&!r&&S()},[P,o,r,S]);const D=o==="Error"||e==="Error";return t.jsxs(t.Fragment,{children:[D?t.jsx(xr,{size:f}):null,t.jsx(li,{action:{onOkClick:()=>{D?(l(),e==="Error"&&k(),g(!0)):(C?.trackReimbursementReviewDuplicateReportReimbursement(u,m),p(!1),ro())},onCancelClick:()=>{D?(l(),e==="Error"&&k(),p(!1)):(C?.trackReimbursementSubmitAnywayDuplicateReimbursement(u,m),S())}},shouldClickAway:D,isSecondaryLoading:e==="In-Progress",secondaryButtonVariant:"secondary",primaryButtonText:D?Ui.resubmit:ue.primaryButtonText,secondaryButtonText:D?Ui.cancel:ue.secondaryButtonText,primaryButtonWidth:D?Ce.cancelButtonWidth.value(f):Ce.submitButtonWidth.value(f),secondaryButtonWidth:D?Ce.cancelButtonWidth.value(f):Ce.submitButtonWidth.value(f),descriptionComponent:t.jsx($r,{size:f,children:t.jsxs(wr,{hasDuplicate:r,duplicateReimbursementStatus:o,children:[t.jsxs(Xt,{isDisabled:!1,isSuccess:!s,children:[s?t.jsx(xt,{size:"Small",start:!0,style:{alignItems:"center",display:"flex"}}):t.jsx(Dn,{}),t.jsx(Zt,{isDisabled:!1,children:s?ue.reviewingExpenses:ue.reviewedAllExpenses})]}),r||o==="Error"?t.jsxs(qi,{size:f,children:[t.jsx(_i,{}),t.jsx(Ki,{children:o==="Error"?ue.failedToDetect:`${u} ${ue.duplicateExpensesFound}`})]}):t.jsxs(Xt,{isDisabled:o==="Not-Started",isSuccess:o==="Completed"&&u===0,children:[t.jsx(Vi,{fetchState:o}),t.jsx(Zt,{isDisabled:o==="Not-Started",children:br(o)})]}),e==="Error"?t.jsxs(qi,{size:f,children:[t.jsx(_i,{}),t.jsx(Ki,{children:ue.failedToSubmit})]}):r||o==="Error"?null:t.jsxs(Xt,{isDisabled:e==="Not-Started",isSuccess:e==="Completed",children:[t.jsx(Vi,{fetchState:e}),t.jsx(Zt,{isDisabled:e==="Not-Started",children:e==="Not-Started"?ue.submitReport:ue.submittingReport})]})]})}),titleComponent:t.jsx(Sr,{size:f,children:ue.title}),showFooter:r||D,containerStyle:{width:Ce.containerWidth.value(f),maxWidth:"unset"}})]})},xr=n(cn)`
551
551
  width: ${i.sp4};
552
552
  height: ${i.sp4};
553
553
  color: ${e=>e.theme.colors.hero};
@@ -564,17 +564,17 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
564
564
  height: ${i.sp4};
565
565
  min-width: ${i.sp4};
566
566
  color: ${j.brandColorGoldDark};
567
- `,qi=n(Fo)`
567
+ `,Hi=n(Fo)`
568
568
  width: ${i.sp3};
569
569
  height: ${i.sp3};
570
570
  min-width: ${i.sp3};
571
571
  color: ${e=>e.theme.colors.grey3};
572
- `,Xt=n.div`
572
+ `,Zt=n.div`
573
573
  color: ${e=>e.isDisabled?e.theme.colors.grey2:e.theme.colors.primary};
574
574
  text-align: left;
575
- `,Hi=n.div`
575
+ `,Ki=n.div`
576
576
  color: ${j.brandColorGoldDark};
577
- `,Qt=n.div`
577
+ `,Xt=n.div`
578
578
  display: flex;
579
579
  align-items: center;
580
580
  gap: ${e=>e.isSuccess?i.sp2:i.sp3};
@@ -587,7 +587,7 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
587
587
  flex-direction: column;
588
588
  gap: ${i.sp3};
589
589
  margin-bottom: ${e=>e.hasDuplicate||e.duplicateReimbursementStatus==="Error"?0:i.sp3};
590
- `,Ki=n.div`
590
+ `,qi=n.div`
591
591
  display: flex;
592
592
  align-items: center;
593
593
  gap: ${e=>Ce.errorLineItemGap.valuePx(e.size)};
@@ -611,12 +611,12 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
611
611
  margin-top: ${i.sp4};
612
612
  white-space: pre-line;
613
613
  width: -webkit-fill-available;
614
- `,Tn=n(yo)`
614
+ `,Dn=n(yo)`
615
615
  width: ${i.sp4};
616
616
  height: ${i.sp4};
617
617
  min-width: ${i.sp4};
618
618
  color: ${j.success};
619
- `,Q={rightMargin:new c(a[3],a[8]),leftMargin:new c(a[3],a[6]),bottomMargin:new c(56,56),closeMarginTop:new c(0,19),closeMarginRight:new c(a[3],a[8]),rightSectionWidth:new c(100,58),leftSectionWidth:new c(100,42),footerButtonWidth:new c(120,165),right:new c(a[3],a[0]),actionsContainerRight:new c(a[0],a[6]),otherActionsContainerBottom:new c(58,44),duplicateBannerWrapperMarginTop:new c(a[5],a[3]),duplicateBannerWrapperMarginRight:new c(a[3],a[8]),duplicateBannerWrapperMarginBottom:new c(a[5],a[3]),duplicateBannerWrapperMarginLeft:new c(a[3],a[6]),navBarWidth:new c(100,58)},{spendManagement:{reimbursement:{reimbursementDetail:y,bulkActions:Gi}},common:{currency:{currencyCode:Me,currencySymbol:Tt},texts:{comments:vr},strings:{empty:Cr}},collaboration:{threads:{placeholder:{addANewComment:kr,replyAComment:Ir},tooltip:{resolveComment:Dr,unResolveComment:Tr}}},dateFormat:Yi}=me.getLocalizedStrings(),Ji="editReimbursementDetailPage",Xi=e=>`${e}_form`,jr=(e,o,r,u,p,C,m,S,b)=>{const l=e.outOfPocket,k=e.mileage,f=l.merchant,s=l.recommendations;return{lineIndex:C,lineId:e?.lineId??String(C+1),reimbursementType:e?.type??y.outOfPocketKey,file:e?.file,homeCurrencyConversions:{amount:e?.homeCurrencyConversions?.amount??0,currencyCode:e?.homeCurrencyConversions?.currencyCode??m.currencyCode,currencySymbol:e?.homeCurrencyConversions?.currencySymbol??m.currencySymbol},outOfPocket:{recommendedAccount:l.recommendedAccount,isCategoryUpdateSelected:l.isCategoryUpdateSelected??!1,isCategoryFirstTimeAutofilled:l.isCategoryFirstTimeAutofilled??!1,retainedAccount:l.retainedAccount,isRetainedCategorySelected:l.isRetainedCategorySelected??!1,recommendations:s??[],transactionDate:l?.transactionDate?.toDate()??void 0,class:{allOptions:_e(r,[]),selectedOption:l?.lineDetail?.class?.classId??b},account:{allOptions:At(o,s),selectedOption:l.lineDetail?.account?.qboId??l.lineDetail?.account?.accountId},amount:{amount:l?.amount??0,currencyCode:l?.currencyCode??m.currencyCode,currencySymbol:l?.currencySymbol??m.currencySymbol,currency:{allOptions:S.map(g=>({label:`${g.currencyCode} - ${g.currency}`,value:g.currencyCode,countryCode:si(g.countryCode)})),selectedOption:l?.currencyCode??m.currencyCode??Me}},memo:l?.description??void 0,merchant:{allOptions:u.map(g=>g.id).filter(g=>!!g),selectedOption:f?.id?f?.id:f?.name?f?.name:e?.lineId!=null?p[e?.lineId]:void 0}},mileage:{transactionDate:k?.transactionDate?.toDate(),class:{allOptions:_e(r,[]),selectedOption:k?.lineDetail?.class?.classId},distanceInMiles:k?.distanceMileage?.value,amount:{amount:k?.amount??0,currencyCode:k?.currencyCode??m.currencyCode,currencySymbol:k?.currencySymbol??m.currencySymbol},memo:k?.description}}},Zt=(e,o,r)=>{const u=[];return Object.values(e.lineDetailSection).forEach((p,C)=>{p?.lineId!=null&&u.push(jr(p,e.accountsHierarchyList,e.classHierarchyList,e.merchantList.merchants,e.tentativeMerchantNameByLineId,C,o,e.allCurrencies,e.loggedInUserDepartmentId))}),u.length===0&&u.push(Dn(0,"1",e.accountsHierarchyList,e.classHierarchyList,e.merchantList.merchants,o,e.allCurrencies,e.loggedInUserDepartmentId)),{[Lt]:{reportTitle:e.whatForSection.reportTitle},[gi]:u,[yt]:{selectedOption:e.paymentTo,allOptions:r.map(p=>p.bankAccountId)}}},ei=(e,o)=>{const r=u=>u.lineId==null||o[u.lineId]?.fetchState==="In-Progress"?0:(o[u.lineId]?.fetchState,u.type===y.mileageKey?u?.mileage?.amount??0:u?.outOfPocket?.currencyCode!==Me&&u.homeCurrencyConversions?.amount!==u?.outOfPocket?.amount?u.homeCurrencyConversions?.amount??0:u?.outOfPocket?.amount??0);return Object.values(e).reduce((u,p)=>u+r(p),0)},ti=(e,o,r,u,p,C,m,S)=>{const b={};return e.lineInfo.forEach(l=>{const k=S.find(R=>R.classId===l.mileage.class.selectedOption),f=m.find(R=>R.qboId===l.outOfPocket.account.selectedOption||R.accountId===l.outOfPocket.account.selectedOption),s=S.find(R=>R.classId===l.outOfPocket.class.selectedOption),g=o.find(R=>R.id===l.outOfPocket.merchant.selectedOption),w=C.find(R=>R.currencyCode===l.outOfPocket.amount?.currency.selectedOption)?.currencySymbol;b[l.lineId]={fileId:l.file?.fileId,lineId:l.lineId,type:l.reimbursementType,homeCurrencyConversions:l.homeCurrencyConversions??{amount:0,currencyCode:"USD",currencySymbol:"$"},mileage:{description:l.mileage.memo??"",lineDetail:{class:k},transactionDate:l.mileage.transactionDate!=null?ee.zeniDate(l.mileage.transactionDate.toDateString()):void 0,amount:l.mileage.amount?.amount??0,currencyCode:l.mileage.amount?.currencyCode??w,currencySymbol:l.mileage.amount?.currencySymbol??w,distanceMileage:{unit:"miles",value:l.mileage.distanceInMiles??0}},outOfPocket:{description:l.outOfPocket.memo??"",lineDetail:{class:s,account:f},transactionDate:l.outOfPocket.transactionDate!=null?ee.zeniDate(l.outOfPocket.transactionDate.toDateString()):void 0,amount:l.outOfPocket.amount?.amount??0,currencyCode:l.outOfPocket.amount?.currency.selectedOption??w,currencySymbol:w,merchant:l.outOfPocket.merchant.selectedOption!=null?{id:g?.id??"",name:g?.name??l.outOfPocket.merchant.selectedOption}:void 0,recommendations:l.outOfPocket.recommendations,recommendedAccount:l.outOfPocket.recommendedAccount,isCategoryUpdateSelected:l.outOfPocket.isCategoryUpdateSelected,isCategoryFirstTimeAutofilled:l.outOfPocket.isCategoryFirstTimeAutofilled,isRetainedCategorySelected:l.outOfPocket.isRetainedCategorySelected,retainedAccount:l.outOfPocket.retainedAccount}}}),{whatForSection:{reportTitle:e.whatFor.reportTitle},updatesByLineId:b,totalAmount:{amount:u,...r},currencyConversionStateByLineId:p,paymentTo:e.paymentTo.selectedOption}},Rl=({remiDetails:e,authParams:o,defaultCurrency:r,companyMileageConfigInfo:u,uploadInvoiceEndPoint:p,isReimbursementCommentingEnabled:C,isUserAdmin:m,analytics:S,reimbursementId:b,plaidConnectionDetails:l,bankAccountCreationState:k,bankNameByRouting:f,bankAccounts:s,isSignedInUserReimbursementCreator:g,uncategorizedAccounts:w,bankAccountToCreate:R,fetchBankNameByRoutingStatus:T,onUserBankDetailsUpdated:$,onFetchBankName:K,onSaveBankAccount:L,fetchDuplicateReimbursement:I,clearDuplicateReimbursementDetail:E,clearRemiSaveStatus:te,removeDuplicateReimbursementForLine:pe,onDuplicateLineClick:A,onExistingMerchantChange:_,onNewMerchantChange:Y,onReceiptsUpload:q,saveRemiDetails:ie,submitRemiDetails:Z,discardReimbursementDetailsFromLocalStore:we,onReimbursementDetailsChanged:he,updateReimbursementType:re,onHomeCurrencyConversionUpdate:J,redirectToReimbursementListScreen:le,redirectToReimbursementDetailScreen:Oe,deleteReimbursement:P,removeFileFromLine:ge,onZeniLogoClick:se,onAmountChanged:Ne,updateInvoiceUploadFetchState:Le,clearTentativeNameForLine:Ae,onAddNewRule:Se,onFetchLinkTokenClick:ze,onEstablishConnectionClick:ye,deleteBankAccount:De,onBackClickFromBankAccountPage:dt})=>{const W=v.useRef(null),et=v.useRef(null),tt=ai(e.uploadStatus),We=bt(),ke=ft(),[qe,Te]=v.useState(!1),[Ue,Ve]=v.useState(!1),[He,Ke]=v.useState("save"),[ne,it]=v.useState(ei(e.lineDetailSection,e.currencyConversionStatus)),[ut,Ge]=v.useState(!1),[U,mt]=v.useState(null),[F,ae]=v.useState(!1),wt=`dashboard_${ke.currentTenant?.companyId}`,$e=en({mode:"all",reValidateMode:"onChange",defaultValues:v.useMemo(()=>Zt(e,r,s),[e,r,s]),values:v.useMemo(()=>Zt(e,r,s),[e,r,s])}),{isDirty:z,dirtyFields:jn}=$e.formState,Rn=async(h,D)=>{const{lineInfo:d}=D,x=Number(h.split(".")[1]);if(h.includes("reportTitle")||h.includes("memo"))return;if(h.includes("reimbursementType")){const B=d[x].mileage,N=d[x].outOfPocket;d[x]={...d[x],outOfPocket:{transactionDate:N.transactionDate??void 0,class:{allOptions:N.class.allOptions??_e(e.classHierarchyList,[]),selectedOption:N.class.selectedOption??void 0},account:{allOptions:N.account.allOptions??At(e.accountsHierarchyList,[]),selectedOption:N.account.selectedOption??void 0},amount:N.amount??{amount:0,currencyCode:r.currencyCode,currencySymbol:r.currencySymbol,currency:{allOptions:e.allCurrencies.map(be=>({label:`${be.currencyCode} - ${be.currency}`,value:be.currencyCode,countryCode:si(be.countryCode)})),selectedOption:r.currencyCode??Me}},memo:N.memo??void 0,merchant:N.merchant??void 0,recommendations:N.recommendations??[],recommendedAccount:N.recommendedAccount??void 0,isCategoryUpdateSelected:N.isCategoryUpdateSelected??!1,isCategoryFirstTimeAutofilled:N.isCategoryFirstTimeAutofilled??!1,retainedAccount:N.retainedAccount??void 0,isRetainedCategorySelected:N.isRetainedCategorySelected??!1},mileage:{transactionDate:B.transactionDate??void 0,class:{allOptions:B.class.allOptions??_e(e.classHierarchyList,[]),selectedOption:B.class.selectedOption??e.loggedInUserDepartmentId},distanceInMiles:B.distanceInMiles,amount:{amount:B?.amount?.amount??0,currencyCode:B?.amount?.currencyCode??Me,currencySymbol:B?.amount?.currencySymbol??Tt},memo:B.memo??void 0}}}else if(h.includes("mileage.distanceInMiles")){const{distanceInMiles:B}=d[x].mileage,N=u?.mileageUnitAmount??0;d[x].mileage={...d[x].mileage,amount:{amount:B!=null?B*N:0,currencyCode:r.currencyCode,currencySymbol:r.currencySymbol}}}else if(h.includes("outOfPocket.amount")&&d[x].lineId){const B=d[x].outOfPocket.amount,N=e.allCurrencies.find(be=>be.currencyCode===B?.currency.selectedOption)?.currencySymbol;if(B?.currencyCode!==B?.currency.selectedOption){const be=B?.currency?.allOptions||[];d[x].outOfPocket.amount={currency:{allOptions:be,selectedOption:B?.currency?.selectedOption},amount:d[x].outOfPocket?.amount?.amount??0,currencyCode:B?.currency.selectedOption??Me,currencySymbol:N??Tt}}if(B?.currency.selectedOption!==Me)Ge(!0),Fn(d[x].lineId,Me);else{const be={};d.forEach(Kt=>{be[Kt.lineId]={lineId:Kt.lineId,homeCurrencyConversions:Kt.homeCurrencyConversions}}),d[x].homeCurrencyConversions={amount:B.amount??0,currencyCode:B?.currency.selectedOption??Me,currencySymbol:N??Tt};const vi=ei(be,e.currencyConversionStatus);ne!==vi&&it(vi)}}else if(h.includes("outOfPocket.isRetainedCategorySelected"))d[x].outOfPocket.isRetainedCategorySelected===!0&&(d[x].outOfPocket.isCategoryUpdateSelected=!1,d[x].outOfPocket.account.selectedOption=d[x].outOfPocket.retainedAccount?.qboId);else if(h.includes("outOfPocket.isCategoryUpdateSelected"))if(d[x].outOfPocket.isCategoryUpdateSelected===!0)d[x].outOfPocket.account.selectedOption=d[x].outOfPocket.recommendedAccount?.qboId,d[x].outOfPocket.isRetainedCategorySelected=!1;else{const B=d[x].lineId,N=e.editRemiInitialDetails.lineDetailSection[B]?.lineDetail?.account?.qboId;d[x].outOfPocket.account.selectedOption=N,d[x].outOfPocket.isRetainedCategorySelected=!1}else h.includes("outOfPocket.account")&&(d[x].outOfPocket.recommendations.length>0&&(d[x].outOfPocket.recommendedAccount=d[x].outOfPocket.recommendations[0].account),d[x].outOfPocket.recommendedAccount?.qboId!=null&&d[x].outOfPocket.account.selectedOption===d[x].outOfPocket.recommendedAccount?.qboId?d[x].outOfPocket.isCategoryUpdateSelected=!0:d[x].outOfPocket.isCategoryUpdateSelected=!1,d[x].outOfPocket.retainedAccount?.qboId!=null&&d[x].outOfPocket.account.selectedOption===d[x].outOfPocket.retainedAccount?.qboId?d[x].outOfPocket.isRetainedCategorySelected=!0:d[x].outOfPocket.isRetainedCategorySelected=!1,d[x].outOfPocket.isCategoryFirstTimeAutofilled=!1);const $t=ti({...D,lineInfo:d},e.merchantList.merchants,r,ne,e.currencyConversionStatus,e.allCurrencies,e.accountList.accounts,e.classList.classes);if(he?.($t),h.includes("outOfPocket.merchant")){const B=d[x].lineId,N=d[x].outOfPocket.merchant.selectedOption??"";d[x].outOfPocket.merchant.allOptions.find(be=>be===N)!=null?_(N,B):Y(N,B)}},yi=v.useMemo(()=>Ci((h,D)=>Rn(h,D),300),[e.accountList.fetchState,e.classList.fetchState,e.merchantList.fetchState]);v.useEffect(()=>{const h=$e.watch((D,{name:d})=>{d!=null&&D!=null&&yi(d,D)});return()=>{h.unsubscribe()}},[yi,$e]),v.useEffect(()=>{const h=ee.reduceAnyFetchState(Object.values(e.currencyConversionStatus)),D=h.fetchState==="In-Progress"||h.fetchState==="Error";Ge(D)},[e.currencyConversionStatus]),v.useEffect(()=>{for(const D in e.currencyConversionStatus){const d=e.lineDetailSection[D],x=e.lineDetailSection[D];e.currencyConversionStatus[D].fetchState==="Completed"&&x!=null&&d.type!==y.mileageKey&&!tn(d?.homeCurrencyConversions,x.homeCurrencyConversions)&&J({amount:d?.homeCurrencyConversions?.amount??0,currencyCode:d?.homeCurrencyConversions?.currencyCode??Me,currencySymbol:d?.homeCurrencyConversions?.currencySymbol??Tt},D,b)}const h=ei(e.lineDetailSection,e.currencyConversionStatus);ne!==h&&it(h)},[e.currencyConversionStatus,e.lineDetailSection]),v.useEffect(()=>{(e.saveStatus?.fetchState==="Completed"||e.deleteStatus.fetchState==="Completed")&&(we(b),le?.())},[e.saveStatus?.fetchState,e.deleteStatus.fetchState,b,we,le]);const O=Ie(),[je,pt]=v.useState(b==null),[ht,Pn]=v.useState(1),[On,Ft]=v.useState(!1),[Ln,An]=v.useState(""),[Et,zn]=v.useState(null),[Bn,nt]=v.useState(!1),[Mn,bi]=v.useState(!1),[Nt,Wt]=v.useState([]),[ce,St]=v.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),Fn=v.useRef(Ci((h,D)=>Ne(h,D),500,{trailing:!0})).current;v.useEffect(()=>{tt==="In-Progress"&&(e.uploadStatus==="Completed"?($e.reset(Zt(e,r,s),{keepDefaultValues:!0}),Te(!1),pt(!1)):e.uploadStatus==="Error"&&Te(!1))},[tt,e.uploadStatus,$e,e,qe,Te,je,r,s,S]),v.useEffect(()=>{e.uploadStatus==="In-Progress"&&je===!1&&Te(!0)},[e.uploadStatus,Te,je]);const Ut=e.remiStage==="draft"?y.newReimbursementTitle:y.editReimbursementTitle,En={onOkClick:()=>{if(nt(!1),ce.primaryButtonText===y.buttons.discard)we(b),e.remiStage==="draft"?le?.():Oe?.();else if(ce.primaryButtonText===y.buttons.delete)ce.title===y.deleteBankAccountTitle?De?.(Ln):P?.();else if(ce.primaryButtonText===y.buttons.yes&&Et!=null){const h=Nt.filter(D=>D!==ht.toString());Wt(h),q(Et,ht,!0)}},onCancelClick:()=>{if(nt(!1),ce.secondaryButtonText===y.buttons.no){const h=Nt.filter(D=>D!==ht.toString());Wt(h),q(Et,ht,!1)}}},fi=()=>{z||co(jn)?(St({title:y.discardTitle,description:y.discardDescription,primaryButtonText:y.buttons.discard,secondaryButtonText:y.buttons.cancel}),nt(!0)):(we(b),le?.())},Nn=()=>{St({title:e.remiStage==="draft"?y.deleteDraftTitle:y.deleteReportTitle,description:y.deleteAlertDescription,primaryButtonText:y.buttons.delete,secondaryButtonText:y.buttons.cancel}),nt(!0)},Wn=h=>{An(h),St({title:y.deleteBankAccountTitle,description:y.deleteBankAccountDescription,primaryButtonText:y.buttons.delete,secondaryButtonText:y.buttons.cancel}),nt(!0)},Un=()=>{St({title:y.overwriteTitle,description:y.overwriteDescription,primaryButtonText:y.buttons.yes,secondaryButtonText:y.buttons.no}),nt(!0)},Vn=()=>{let h=!0;const D=[];return Object.values(e.lineDetailSection).forEach((d,x)=>{d.type===y.outOfPocketKey&&vn(d)>=75&&d.file==null&&(D.push(d.lineId),h=!1)}),Wt(D),h},xi=()=>{if(m&&e.remiStage==="pending_approval"&&e.remiStatus!=="rejected")fi();else{Ke("save");const h=$e.getValues(),D=ti(h,e.merchantList.merchants,r,ne,e.currencyConversionStatus,e.allCurrencies,e.accountList.accounts,e.classList.classes);he?.(D);const d=D.whatForSection?.reportTitle;d!=null&&d.length>0?ie(e.remiStatus==="rejected"?"pending_approval":"draft"):$e.trigger(`${Lt}.reportTitle`,{shouldFocus:!0})}};let Vt=!1;Object.values(e.addRemiAutoFieldsByLineId).forEach(h=>{h.length>0&&(Vt=!0)});let wi=[];if(e.remiId==null){const h=ne??0;h>0&&(wi=e.approvalRules.allApprovalRules?.filter(D=>{const d=D.criteria[0].range;if(d.max!=null){if(d.min.amount<h&&d.max.amount>=h)return D}else if(d.min.amount<h)return D;return null}).map(D=>({...D,stepsWithStatus:D.steps.map(d=>({...d,actorsActivity:[],isOriginalApprovalStep:!0})),isRealTimeApprovalEnabled:!1})))}const _n=h=>{const D=Vn();return $e.handleSubmit(()=>{D&&(Ke("submit"),S?.trackReimbursementSubmitReimbursement(e.createTime?.format(Yi.analytics.MMMDashDDDashYYYYFormat)??ee.dateNow().format(Yi.analytics.MMMDashDDDashYYYYFormat),r.currencyCode,ne,b),E(),bi(!0))})(h)},qn=()=>{const h=$e.getValues(),D=ti(h,e.merchantList.merchants,r,ne,e.currencyConversionStatus,e.allCurrencies,e.accountList.accounts,e.classList.classes);he?.(D),Z()},Hn=e.reimbursementInfo?.billStatus.code=="approved"&&e.reimbursementInfo?.billPaymentStatus.code?e.reimbursementInfo?.billPaymentStatus:e.reimbursementInfo?.billStatus,Kn=e.reimbursementInfo?.paymentDate!=null?ee.zeniDate(ee.getNextNthWorkingDay(e.reimbursementInfo.paymentDate.toDate(),[0,6],e.achSameDayMaxDays).toDateString()):void 0,Gn=e.reimbursementInfo?.expectedDepositDate??Kn,Yn=b!=null&&e.remiStage==="draft",Si=Po(e.duplicateLineByLineId),_t=e.duplicateReimbursementStatus.fetchState==="Completed"&&Si>0,{requestToOpenThread:qt,setRequestToOpenThread:$i,setOpenThread:Ht}=v.useContext(Qn),{threads:gt,isLoading:Ye}=Zn({application:"dashboard",companyId:ke.currentTenant?.companyId,tab:"reimbursement",entityId:b,isGlobalComment:!1},"both",!1);v.useEffect(()=>{qt?.threadId!=null&&gt.length>0&&!Ye&&(Ht(qt.threadId),$i(null))},[qt,gt,Ye,Ht,$i]);const Jn=v.useMemo(()=>b==null?[]:gt.filter(h=>h.resolved===!1&&!h.id.includes(eo)),[gt,b]).length,Xn=(h,D)=>{Ht(D);const d=h.entityType.split("."),x=parseInt(d[2]);if(isNaN(x)){ae(!1);return}const $t=`${x+1}`,B=e.lineDetailSection[x+1].type;d.includes(y.mileageKey)&&B===y.outOfPocketKey?re(ee.toReimbursementTypeCode(y.mileageKey),$t,b):d.includes(y.outOfPocketKey)&&B===y.mileageKey&&re(ee.toReimbursementTypeCode(y.outOfPocketKey),$t,b),ae(!1)};return t.jsx(Pr,{ref:W,children:t.jsx(to,{sharedItems:{sharedFunctions:void 0,sharedRef:{contentWrapperRef:et.current??null}},children:t.jsxs(nn,{...$e,children:[t.jsx("form",{id:Xi(Ji),onSubmit:h=>_n(h),children:t.jsxs(rl,{windowSize:O,ref:et,children:[Bn?t.jsx(li,{titleComponent:t.jsx(an,{children:ce.title}),descriptionComponent:t.jsx(on,{children:ce.description}),primaryButtonText:ce.primaryButtonText,secondaryButtonText:ce.secondaryButtonText,action:En,proceedButtonVariant:ce.title===y.deleteBankAccountTitle||ce.title===y.deleteDraftTitle||ce.title===y.deleteReportTitle||ce.title===y.discardTitle?"danger":"primary",isEditPopup:ce.title===y.deleteBankAccountTitle}):null,Mn?t.jsx(fr,{reimbursementId:b,submitFetchState:e.saveStatus?.fetchState??"Not-Started",duplicateReimbursementStatus:e.duplicateReimbursementStatus.fetchState,hasDuplicateLine:_t,numberOfDuplicateLines:Si,setShowDuplicatePopup:bi,submitReport:qn,fetchDuplicateReimbursement:I,clearDuplicateReimbursementDetail:E,clearRemiSaveStatus:te,analytics:S}):null,qe?t.jsx(Zi,{windowSize:O}):null,je?t.jsxs(Zi,{windowSize:O,"data-testid":H("skip-autofill-section"),children:[O==="small"?t.jsxs(t.Fragment,{children:[t.jsx(Vr,{children:t.jsx(oi,{partOfSkipAutoFill:!0,size:O,onClick:()=>pt(!1),"data-testid":H("close-invoice-upload"),children:t.jsx(ni,{withOverlay:!0,children:t.jsx(ii,{})})})}),t.jsx(qr,{children:Ut})]}):null,t.jsx(xn,{showAutofill:je,analytics:S,onSkipAutofill:()=>{S?.trackReimbursementSkipAutofill(),pt(!1)},uploadInvoiceEndPoint:p,authParams:o,style:{width:Q.leftSectionWidth.valuePercentage(O),boxSizing:"border-box",backgroundColor:O==="small"?We.colors.grey4:"unset",padding:O==="small"?`${i.sp5} ${i.sp3}`:`78px ${i.sp6} 15px ${i.sp8}`,margin:O==="small"?i.sp0:void 0},onInvoiceUpload:h=>q(h,ht,!0),dropFilePlaceholder:{upload:y.dropReceipt.upload,single:y.dropReceipt.single,or:y.dropReceipt.or,multiple:y.dropReceipt.multiple,receipts:y.dropReceipt.receipts},updateInvoiceUploadFetchState:Le,showInfoText:!1,allowMultiFiles:je,type:"receipt"}),O!=="small"?t.jsx(_r,{children:t.jsx(oi,{partOfSkipAutoFill:!0,onClick:()=>pt(!1),"data-testid":H("close-invoice-upload"),children:t.jsx(ni,{withOverlay:!0,children:t.jsx(ii,{})})})}):null]}):null,t.jsxs(tl,{windowSize:O,"data-testid":H("edit-reimbursement-detail-page-nav-bar-container"),children:[O!=="small"?t.jsx(ki,{style:{width:"42%"},"data-testid":H("edit-reimbursement-detail-page-left-nav-bar"),title:"",leftSideComponent:t.jsx(il,{"data-testid":H("zeni-logo-spend-management-reimbursement-detail-page"),onClick:se}),enableTitleOnScroll:!1,scrollableContent:W,backgroundColor:We.colors.background,keepBackgroundOnScroll:!0,source:"EditReimbursementDetailPage"}):null,O!=="small"?t.jsx(Or,{}):null,t.jsx(ki,{style:{width:Q.navBarWidth.valuePercentage(O)},"data-testid":H("edit-reimbursement-detail-page-right-nav-bar"),source:"EditReimbursementDetailPage",title:Ut,leftSideComponent:t.jsx(t.Fragment,{}),rightSideComponent:je!=!0?t.jsxs(nl,{children:[C&&b!=null?t.jsxs(ol,{isDisabled:Ye,"data-testid":H("remi-comment-button"),onClick:Ye?()=>null:h=>{h.preventDefault(),h.stopPropagation(),mt({roomId:wt,companyId:ke.currentTenant?.companyId??"",companyName:ke.currentTenant?.companyName??"",entityType:"reimbursement.details",entityId:b}),ae(!0),S?.trackCommentActivity("reimbursement","clicked",ke.currentTenant?.companyName??"",ke.controllersList.controllers.map(D=>no(D)),void 0,void 0,"page icon")},children:[t.jsx(io,{count:Ye?void 0:Jn,isLoading:Ye,style:{left:"12px"}}),t.jsx(al,{})]}):null,t.jsx(oi,{size:O,onClick:()=>fi(),"data-testid":H("close-nav-bar"),children:t.jsx(ni,{withOverlay:!1,children:t.jsx(ii,{})})})]}):null,enableTitleOnScroll:O!=="small",scrollThreshold:64,scrollableContent:W,backgroundColor:We.colors.grey4})]}),O==="small"?t.jsxs(t.Fragment,{children:[t.jsx(el,{children:Ut}),t.jsx(oo,{progressSectionObj:Hn,createDate:e.createTime,paymentDate:Gn,scheduleDate:e.reimbursementInfo?.paymentDate,approvedDate:e.latestApprovedDate,isBillUploaded:b!=null?!0:e.uploadStatus==="Completed"}),Vt&&t.jsxs(Gr,{children:[t.jsx(Kr,{}),t.jsx(Yr,{children:y.banner})]}),e.isProcessing?t.jsx(rn,{variant:"warning",style:{margin:O==="small"?`${i.sp5} ${i.sp3}`:`${i.sp3} ${i.sp8} ${i.sp3} ${i.sp6}`},title:Gi.duplicateWarning.title,description:Gi.duplicateWarning.description}):_t?t.jsxs(Jr,{size:O,children:[t.jsx(Br,{}),t.jsxs(Qr,{children:[t.jsx(Xr,{children:y.thereSeems}),t.jsx(Zr,{children:y.pleaseFind})]})]}):null,t.jsx($n,{isReimbursementCommentingEnabled:C,sectionId:Lt,reimbursementId:e.remiId,reportTitle:e.whatForSection.reportTitle})]}):null,t.jsx(Ka,{onDuplicateLineClick:A,reimbursementId:b,remiDetails:e,uploadInvoiceEndPoint:p,authParams:o,showSkipAutoFill:je,setShowSkipAutoFill:pt,isReimbursementCommentingEnabled:C,isAutoFieldsExist:Vt,totalAmount:ne,removeFileFromLine:ge,onReplaceClick:Un,onReceiptsUpload:q,currencyConversionStatus:e.currencyConversionStatus,setCurrentLineIdForUpload:Pn,setUploadedReceiptPayload:zn,updateInvoiceUploadFetchState:Le,clearTentativeNameForLine:Ae,defaultCurrency:r,companyMileageConfigInfo:u,isUserAdmin:m,setShowBankAccountPage:Ft,bankAccounts:s,onDeleteBankAccount:Wn,analytics:S,fileRequiredLineIds:Nt,isSignedInUserReimbursementCreator:g,uncategorizedAccounts:w,showTotalAmountLoader:ut,duplicateLineByLineId:e.duplicateLineByLineId,hasDuplicateLine:_t,removeDuplicateReimbursementForLine:pe,scrollContainerRef:W}),t.jsxs(ll,{showSkipAutoFill:je,windowSize:O,children:[O!=="small"?t.jsx(Qi,{}):null,t.jsx(sl,{windowSize:O,children:t.jsxs(cl,{windowSize:O,children:[e.remiId!==void 0&&t.jsx(Ii,{amount:ne??0,activities:e.remiActivities,stage:e.remiStage??"draft",onAddNewRule:Se,entity:"reimbursement",historicActivities:e.remiHistory.activities}),e.remiId==null&&ne!=null&&ne>0?t.jsx(Ii,{amount:ne??0,activities:wi,stage:"draft",entity:"reimbursement",historicActivities:e.remiHistory.activities}):null]})})]}),t.jsx(dl,{}),t.jsxs(Hr,{showSkipAutoFill:je,windowSize:O,children:[O!=="small"?t.jsx(Qi,{}):null,t.jsx(Lr,{windowSize:O,onClick:h=>{h.stopPropagation(),Ue===!0&&Ve(!1)},children:t.jsx(ln,{formId:Xi(Ji),separatorStyle:{marginRight:i.sp4},showCancel:g,cancelBtn:{label:m&&e.remiStage==="pending_approval"&&e.remiStatus!=="rejected"?O==="small"?y.buttons.discard:y.buttons.discardChanges:O==="small"?y.buttons.save:y.buttons.saveChanges,isLoading:He==="save"&&e.saveStatus?.fetchState==="In-Progress",onClick:xi,style:{width:Q.footerButtonWidth.value(O)},reverseSpinnerColor:!1},primaryBtn:{label:Rr(g,m,e,O),isDisabled:!g,style:{width:g?Q.footerButtonWidth.value(O):"auto"},type:g?"submit":"button",onClick:g?()=>null:xi,isLoading:!g&&He==="save"&&e.saveStatus?.fetchState==="In-Progress"},rightSideComponent:t.jsx(Ar,{children:t.jsxs(Nr,{windowSize:O,children:[Ue?t.jsx(sn,{onClickAway:()=>Ve(!1),children:t.jsx(Er,{windowSize:O,"data-testid":H("remi-other-actions-container"),children:t.jsx(Wr,{onClick:Nn,"data-testid":H("delete-report-action"),children:y.buttons.deleteReport})})}):null,t.jsx(Fr,{windowSize:O,children:Yn===!0?t.jsx(Mr,{windowSize:O,"data-testid":H("more-details-button"),children:t.jsx(zr,{onClick:()=>Ve(!Ue)})}):null})]})}),style:{minHeight:62}})})]}),C&&b!=null?t.jsx(Ro,{id:wt,children:t.jsx(ao,{isDrawerOpen:F,allowComposer:!0,drawerTitle:vr,threads:gt,autoExpand:!0,autoFocus:!1,filter:{application:"dashboard",companyId:U?.companyId??Cr,isGlobalComment:!1,tab:"reimbursement"},isLoading:Ye,threadMetadata:U?{companyName:U.companyName,companyId:U.companyId,entityId:U.entityId,entityType:U.entityType,isGlobalComment:!1,application:"dashboard",tab:"reimbursement",url:window.location.href}:void 0,textOverrides:{composerPlaceholder:kr,replyComposerPlaceholder:Ir,threadResolve:Dr,threadUnResolve:Tr},onThreadClick:(h,D)=>Xn(h,D),onCloseAllThreadsDrawer:()=>ae(!1),drawerSectionStyle:{width:"400px",backgroundColor:We.colors.background}})}):null]})}),On?t.jsx(Ur,{windowSize:O,children:t.jsx(rr,{bankAccountCreationState:k,setShowBankAccountPage:Ft,plaidConnectionDetails:l,onFetchLinkTokenClick:ze,onEstablishConnectionClick:ye,onSaveHandler:L,bankAccountToCreate:R,bankNameByRouting:f,fetchBankNameByRoutingStatus:T,onUserBankDetailsUpdated:$,onFetchBankName:K,onBackClick:()=>{dt(),Ft(!1)}})}):null]})})})},Rr=(e,o,r,u)=>e?r.reimbursementId!=null&&r.remiStage==="pending_approval"?y.buttons.resubmit:y.buttons.submit:o&&r.remiStage==="pending_approval"&&r.remiStatus!=="rejected"?u==="small"?y.buttons.discard:y.buttons.discardChanges:u==="small"?y.buttons.save:y.buttons.saveChanges,Pr=n.div`
619
+ `,X={rightMargin:new c(a[3],a[8]),leftMargin:new c(a[3],a[6]),bottomMargin:new c(56,56),closeMarginTop:new c(0,19),closeMarginRight:new c(a[3],a[8]),rightSectionWidth:new c(100,58),leftSectionWidth:new c(100,42),footerButtonWidth:new c(120,165),right:new c(a[3],a[0]),actionsContainerRight:new c(a[0],a[6]),otherActionsContainerBottom:new c(58,44),duplicateBannerWrapperMarginTop:new c(a[5],a[3]),duplicateBannerWrapperMarginRight:new c(a[3],a[8]),duplicateBannerWrapperMarginBottom:new c(a[5],a[3]),duplicateBannerWrapperMarginLeft:new c(a[3],a[6]),navBarWidth:new c(100,58)},{spendManagement:{reimbursement:{reimbursementDetail:y,bulkActions:Gi}},common:{currency:{currencyCode:Me,currencySymbol:Dt},texts:{comments:vr},strings:{empty:Cr}},collaboration:{threads:{placeholder:{addANewComment:kr,replyAComment:Ir},tooltip:{resolveComment:Tr,unResolveComment:Dr}}},dateFormat:Yi}=me.getLocalizedStrings(),Ji="editReimbursementDetailPage",Zi=e=>`${e}_form`,jr=(e,o,r,u,p,C,m,S,b)=>{const l=e.outOfPocket,k=e.mileage,f=l.merchant,s=l.recommendations;return{lineIndex:C,lineId:e?.lineId??String(C+1),reimbursementType:e?.type??y.outOfPocketKey,file:e?.file,homeCurrencyConversions:{amount:e?.homeCurrencyConversions?.amount??0,currencyCode:e?.homeCurrencyConversions?.currencyCode??m.currencyCode,currencySymbol:e?.homeCurrencyConversions?.currencySymbol??m.currencySymbol},outOfPocket:{recommendedAccount:l.recommendedAccount,isCategoryUpdateSelected:l.isCategoryUpdateSelected??!1,isCategoryFirstTimeAutofilled:l.isCategoryFirstTimeAutofilled??!1,retainedAccount:l.retainedAccount,isRetainedCategorySelected:l.isRetainedCategorySelected??!1,recommendations:s??[],transactionDate:l?.transactionDate?.toDate()??void 0,class:{allOptions:_e(r,[]),selectedOption:l?.lineDetail?.class?.classId??b},account:{allOptions:At(o,s),selectedOption:l.lineDetail?.account?.qboId??l.lineDetail?.account?.accountId},amount:{amount:l?.amount??0,currencyCode:l?.currencyCode??m.currencyCode,currencySymbol:l?.currencySymbol??m.currencySymbol,currency:{allOptions:S.map(g=>({label:`${g.currencyCode} - ${g.currency}`,value:g.currencyCode,countryCode:si(g.countryCode)})),selectedOption:l?.currencyCode??m.currencyCode??Me}},memo:l?.description??void 0,merchant:{allOptions:u.map(g=>g.id).filter(g=>!!g),selectedOption:f?.id?f?.id:f?.name?f?.name:e?.lineId!=null?p[e?.lineId]:void 0}},mileage:{transactionDate:k?.transactionDate?.toDate(),class:{allOptions:_e(r,[]),selectedOption:k?.lineDetail?.class?.classId},distanceInMiles:k?.distanceMileage?.value,amount:{amount:k?.amount??0,currencyCode:k?.currencyCode??m.currencyCode,currencySymbol:k?.currencySymbol??m.currencySymbol},memo:k?.description}}},Qt=(e,o,r)=>{const u=[];return Object.values(e.lineDetailSection).forEach((p,C)=>{p?.lineId!=null&&u.push(jr(p,e.accountsHierarchyList,e.classHierarchyList,e.merchantList.merchants,e.tentativeMerchantNameByLineId,C,o,e.allCurrencies,e.loggedInUserDepartmentId))}),u.length===0&&u.push(Tn(0,"1",e.accountsHierarchyList,e.classHierarchyList,e.merchantList.merchants,o,e.allCurrencies,e.loggedInUserDepartmentId)),{[Lt]:{reportTitle:e.whatForSection.reportTitle},[gi]:u,[yt]:{selectedOption:e.paymentTo,allOptions:r.map(p=>p.bankAccountId)}}},ei=(e,o)=>{const r=u=>u.lineId==null||o[u.lineId]?.fetchState==="In-Progress"?0:(o[u.lineId]?.fetchState,u.type===y.mileageKey?u?.mileage?.amount??0:u?.outOfPocket?.currencyCode!==Me&&u.homeCurrencyConversions?.amount!==u?.outOfPocket?.amount?u.homeCurrencyConversions?.amount??0:u?.outOfPocket?.amount??0);return Object.values(e).reduce((u,p)=>u+r(p),0)},ti=(e,o,r,u,p,C,m,S)=>{const b={};return e.lineInfo.forEach(l=>{const k=S.find(P=>P.classId===l.mileage.class.selectedOption),f=m.find(P=>P.qboId===l.outOfPocket.account.selectedOption||P.accountId===l.outOfPocket.account.selectedOption),s=S.find(P=>P.classId===l.outOfPocket.class.selectedOption),g=o.find(P=>P.id===l.outOfPocket.merchant.selectedOption),w=C.find(P=>P.currencyCode===l.outOfPocket.amount?.currency.selectedOption)?.currencySymbol;b[l.lineId]={fileId:l.file?.fileId,lineId:l.lineId,type:l.reimbursementType,homeCurrencyConversions:l.homeCurrencyConversions??{amount:0,currencyCode:"USD",currencySymbol:"$"},mileage:{description:l.mileage.memo??"",lineDetail:{class:k},transactionDate:l.mileage.transactionDate!=null?ee.zeniDate(l.mileage.transactionDate.toDateString()):void 0,amount:l.mileage.amount?.amount??0,currencyCode:l.mileage.amount?.currencyCode??w,currencySymbol:l.mileage.amount?.currencySymbol??w,distanceMileage:{unit:"miles",value:l.mileage.distanceInMiles??0}},outOfPocket:{description:l.outOfPocket.memo??"",lineDetail:{class:s,account:f},transactionDate:l.outOfPocket.transactionDate!=null?ee.zeniDate(l.outOfPocket.transactionDate.toDateString()):void 0,amount:l.outOfPocket.amount?.amount??0,currencyCode:l.outOfPocket.amount?.currency.selectedOption??w,currencySymbol:w,merchant:l.outOfPocket.merchant.selectedOption!=null?{id:g?.id??"",name:g?.name??l.outOfPocket.merchant.selectedOption}:void 0,recommendations:l.outOfPocket.recommendations,recommendedAccount:l.outOfPocket.recommendedAccount,isCategoryUpdateSelected:l.outOfPocket.isCategoryUpdateSelected,isCategoryFirstTimeAutofilled:l.outOfPocket.isCategoryFirstTimeAutofilled,isRetainedCategorySelected:l.outOfPocket.isRetainedCategorySelected,retainedAccount:l.outOfPocket.retainedAccount}}}),{whatForSection:{reportTitle:e.whatFor.reportTitle},updatesByLineId:b,totalAmount:{amount:u,...r},currencyConversionStateByLineId:p,paymentTo:e.paymentTo.selectedOption}},Pl=({remiDetails:e,authParams:o,defaultCurrency:r,companyMileageConfigInfo:u,uploadInvoiceEndPoint:p,isReimbursementCommentingEnabled:C,isUserAdmin:m,analytics:S,reimbursementId:b,plaidConnectionDetails:l,bankAccountCreationState:k,bankNameByRouting:f,bankAccounts:s,isSignedInUserReimbursementCreator:g,uncategorizedAccounts:w,bankAccountToCreate:P,fetchBankNameByRoutingStatus:D,onUserBankDetailsUpdated:$,onFetchBankName:q,onSaveBankAccount:L,fetchDuplicateReimbursement:I,clearDuplicateReimbursementDetail:E,clearRemiSaveStatus:te,removeDuplicateReimbursementForLine:pe,onDuplicateLineClick:A,onExistingMerchantChange:_,onNewMerchantChange:Y,onReceiptsUpload:H,saveRemiDetails:ie,submitRemiDetails:Q,discardReimbursementDetailsFromLocalStore:we,onReimbursementDetailsChanged:he,updateReimbursementType:re,onHomeCurrencyConversionUpdate:J,redirectToReimbursementListScreen:le,redirectToReimbursementDetailScreen:Oe,deleteReimbursement:R,removeFileFromLine:ge,onZeniLogoClick:se,onAmountChanged:Ne,updateInvoiceUploadFetchState:Le,clearTentativeNameForLine:Ae,onAddNewRule:Se,onFetchLinkTokenClick:ze,onEstablishConnectionClick:ye,deleteBankAccount:Te,onBackClickFromBankAccountPage:dt})=>{const W=v.useRef(null),et=v.useRef(null),tt=ai(e.uploadStatus),We=bt(),ke=ft(),[He,De]=v.useState(!1),[Ue,Ve]=v.useState(!1),[Ke,qe]=v.useState("save"),[ne,it]=v.useState(ei(e.lineDetailSection,e.currencyConversionStatus)),[ut,Ge]=v.useState(!1),[U,mt]=v.useState(null),[F,ae]=v.useState(!1),wt=`dashboard_${ke.currentTenant?.companyId}`,$e=en({mode:"all",reValidateMode:"onChange",defaultValues:v.useMemo(()=>Qt(e,r,s),[e,r,s]),values:v.useMemo(()=>Qt(e,r,s),[e,r,s])}),{isDirty:z,dirtyFields:jn}=$e.formState,Pn=async(h,T)=>{const{lineInfo:d}=T,x=Number(h.split(".")[1]);if(h.includes("reportTitle")||h.includes("memo"))return;if(h.includes("reimbursementType")){const B=d[x].mileage,N=d[x].outOfPocket;d[x]={...d[x],outOfPocket:{transactionDate:N.transactionDate??void 0,class:{allOptions:N.class.allOptions??_e(e.classHierarchyList,[]),selectedOption:N.class.selectedOption??void 0},account:{allOptions:N.account.allOptions??At(e.accountsHierarchyList,[]),selectedOption:N.account.selectedOption??void 0},amount:N.amount??{amount:0,currencyCode:r.currencyCode,currencySymbol:r.currencySymbol,currency:{allOptions:e.allCurrencies.map(be=>({label:`${be.currencyCode} - ${be.currency}`,value:be.currencyCode,countryCode:si(be.countryCode)})),selectedOption:r.currencyCode??Me}},memo:N.memo??void 0,merchant:N.merchant??void 0,recommendations:N.recommendations??[],recommendedAccount:N.recommendedAccount??void 0,isCategoryUpdateSelected:N.isCategoryUpdateSelected??!1,isCategoryFirstTimeAutofilled:N.isCategoryFirstTimeAutofilled??!1,retainedAccount:N.retainedAccount??void 0,isRetainedCategorySelected:N.isRetainedCategorySelected??!1},mileage:{transactionDate:B.transactionDate??void 0,class:{allOptions:B.class.allOptions??_e(e.classHierarchyList,[]),selectedOption:B.class.selectedOption??e.loggedInUserDepartmentId},distanceInMiles:B.distanceInMiles,amount:{amount:B?.amount?.amount??0,currencyCode:B?.amount?.currencyCode??Me,currencySymbol:B?.amount?.currencySymbol??Dt},memo:B.memo??void 0}}}else if(h.includes("mileage.distanceInMiles")){const{distanceInMiles:B}=d[x].mileage,N=u?.mileageUnitAmount??0;d[x].mileage={...d[x].mileage,amount:{amount:B!=null?B*N:0,currencyCode:r.currencyCode,currencySymbol:r.currencySymbol}}}else if(h.includes("outOfPocket.amount")&&d[x].lineId){const B=d[x].outOfPocket.amount,N=e.allCurrencies.find(be=>be.currencyCode===B?.currency.selectedOption)?.currencySymbol;if(B?.currencyCode!==B?.currency.selectedOption){const be=B?.currency?.allOptions||[];d[x].outOfPocket.amount={currency:{allOptions:be,selectedOption:B?.currency?.selectedOption},amount:d[x].outOfPocket?.amount?.amount??0,currencyCode:B?.currency.selectedOption??Me,currencySymbol:N??Dt}}if(B?.currency.selectedOption!==Me)Ge(!0),Fn(d[x].lineId,Me);else{const be={};d.forEach(qt=>{be[qt.lineId]={lineId:qt.lineId,homeCurrencyConversions:qt.homeCurrencyConversions}}),d[x].homeCurrencyConversions={amount:B.amount??0,currencyCode:B?.currency.selectedOption??Me,currencySymbol:N??Dt};const vi=ei(be,e.currencyConversionStatus);ne!==vi&&it(vi)}}else if(h.includes("outOfPocket.isRetainedCategorySelected"))d[x].outOfPocket.isRetainedCategorySelected===!0&&(d[x].outOfPocket.isCategoryUpdateSelected=!1,d[x].outOfPocket.account.selectedOption=d[x].outOfPocket.retainedAccount?.qboId);else if(h.includes("outOfPocket.isCategoryUpdateSelected"))if(d[x].outOfPocket.isCategoryUpdateSelected===!0)d[x].outOfPocket.account.selectedOption=d[x].outOfPocket.recommendedAccount?.qboId,d[x].outOfPocket.isRetainedCategorySelected=!1;else{const B=d[x].lineId,N=e.editRemiInitialDetails.lineDetailSection[B]?.lineDetail?.account?.qboId;d[x].outOfPocket.account.selectedOption=N,d[x].outOfPocket.isRetainedCategorySelected=!1}else h.includes("outOfPocket.account")&&(d[x].outOfPocket.recommendations.length>0&&(d[x].outOfPocket.recommendedAccount=d[x].outOfPocket.recommendations[0].account),d[x].outOfPocket.recommendedAccount?.qboId!=null&&d[x].outOfPocket.account.selectedOption===d[x].outOfPocket.recommendedAccount?.qboId?d[x].outOfPocket.isCategoryUpdateSelected=!0:d[x].outOfPocket.isCategoryUpdateSelected=!1,d[x].outOfPocket.retainedAccount?.qboId!=null&&d[x].outOfPocket.account.selectedOption===d[x].outOfPocket.retainedAccount?.qboId?d[x].outOfPocket.isRetainedCategorySelected=!0:d[x].outOfPocket.isRetainedCategorySelected=!1,d[x].outOfPocket.isCategoryFirstTimeAutofilled=!1);const $t=ti({...T,lineInfo:d},e.merchantList.merchants,r,ne,e.currencyConversionStatus,e.allCurrencies,e.accountList.accounts,e.classList.classes);if(he?.($t),h.includes("outOfPocket.merchant")){const B=d[x].lineId,N=d[x].outOfPocket.merchant.selectedOption??"";d[x].outOfPocket.merchant.allOptions.find(be=>be===N)!=null?_(N,B):Y(N,B)}},yi=v.useMemo(()=>Ci((h,T)=>Pn(h,T),300),[e.accountList.fetchState,e.classList.fetchState,e.merchantList.fetchState]);v.useEffect(()=>{const h=$e.watch((T,{name:d})=>{d!=null&&T!=null&&yi(d,T)});return()=>{h.unsubscribe()}},[yi,$e]),v.useEffect(()=>{const h=ee.reduceAnyFetchState(Object.values(e.currencyConversionStatus)),T=h.fetchState==="In-Progress"||h.fetchState==="Error";Ge(T)},[e.currencyConversionStatus]),v.useEffect(()=>{for(const T in e.currencyConversionStatus){const d=e.lineDetailSection[T],x=e.lineDetailSection[T];e.currencyConversionStatus[T].fetchState==="Completed"&&x!=null&&d.type!==y.mileageKey&&!tn(d?.homeCurrencyConversions,x.homeCurrencyConversions)&&J({amount:d?.homeCurrencyConversions?.amount??0,currencyCode:d?.homeCurrencyConversions?.currencyCode??Me,currencySymbol:d?.homeCurrencyConversions?.currencySymbol??Dt},T,b)}const h=ei(e.lineDetailSection,e.currencyConversionStatus);ne!==h&&it(h)},[e.currencyConversionStatus,e.lineDetailSection]),v.useEffect(()=>{(e.saveStatus?.fetchState==="Completed"||e.deleteStatus.fetchState==="Completed")&&(we(b),le?.())},[e.saveStatus?.fetchState,e.deleteStatus.fetchState,b,we,le]);const O=Ie(),[je,pt]=v.useState(b==null),[ht,Rn]=v.useState(1),[On,Ft]=v.useState(!1),[Ln,An]=v.useState(""),[Et,zn]=v.useState(null),[Bn,nt]=v.useState(!1),[Mn,bi]=v.useState(!1),[Nt,Wt]=v.useState([]),[ce,St]=v.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),Fn=v.useRef(Ci((h,T)=>Ne(h,T),500,{trailing:!0})).current;v.useEffect(()=>{tt==="In-Progress"&&(e.uploadStatus==="Completed"?($e.reset(Qt(e,r,s),{keepDefaultValues:!0}),De(!1),pt(!1)):e.uploadStatus==="Error"&&De(!1))},[tt,e.uploadStatus,$e,e,He,De,je,r,s,S]),v.useEffect(()=>{e.uploadStatus==="In-Progress"&&je===!1&&De(!0)},[e.uploadStatus,De,je]);const Ut=e.remiStage==="draft"?y.newReimbursementTitle:y.editReimbursementTitle,En={onOkClick:()=>{if(nt(!1),ce.primaryButtonText===y.buttons.discard)we(b),e.remiStage==="draft"?le?.():Oe?.();else if(ce.primaryButtonText===y.buttons.delete)ce.title===y.deleteBankAccountTitle?Te?.(Ln):R?.();else if(ce.primaryButtonText===y.buttons.yes&&Et!=null){const h=Nt.filter(T=>T!==ht.toString());Wt(h),H(Et,ht,!0)}},onCancelClick:()=>{if(nt(!1),ce.secondaryButtonText===y.buttons.no){const h=Nt.filter(T=>T!==ht.toString());Wt(h),H(Et,ht,!1)}}},fi=()=>{z||co(jn)?(St({title:y.discardTitle,description:y.discardDescription,primaryButtonText:y.buttons.discard,secondaryButtonText:y.buttons.cancel}),nt(!0)):(we(b),le?.())},Nn=()=>{St({title:e.remiStage==="draft"?y.deleteDraftTitle:y.deleteReportTitle,description:y.deleteAlertDescription,primaryButtonText:y.buttons.delete,secondaryButtonText:y.buttons.cancel}),nt(!0)},Wn=h=>{An(h),St({title:y.deleteBankAccountTitle,description:y.deleteBankAccountDescription,primaryButtonText:y.buttons.delete,secondaryButtonText:y.buttons.cancel}),nt(!0)},Un=()=>{St({title:y.overwriteTitle,description:y.overwriteDescription,primaryButtonText:y.buttons.yes,secondaryButtonText:y.buttons.no}),nt(!0)},Vn=()=>{let h=!0;const T=[];return Object.values(e.lineDetailSection).forEach((d,x)=>{d.type===y.outOfPocketKey&&vn(d)>=75&&d.file==null&&(T.push(d.lineId),h=!1)}),Wt(T),h},xi=()=>{if(m&&e.remiStage==="pending_approval"&&e.remiStatus!=="rejected")fi();else{qe("save");const h=$e.getValues(),T=ti(h,e.merchantList.merchants,r,ne,e.currencyConversionStatus,e.allCurrencies,e.accountList.accounts,e.classList.classes);he?.(T);const d=T.whatForSection?.reportTitle;d!=null&&d.length>0?ie(e.remiStatus==="rejected"?"pending_approval":"draft"):$e.trigger(`${Lt}.reportTitle`,{shouldFocus:!0})}};let Vt=!1;Object.values(e.addRemiAutoFieldsByLineId).forEach(h=>{h.length>0&&(Vt=!0)});let wi=[];if(e.remiId==null){const h=ne??0;h>0&&(wi=e.approvalRules.allApprovalRules?.filter(T=>{const d=T.criteria[0].range;if(d.max!=null){if(d.min.amount<h&&d.max.amount>=h)return T}else if(d.min.amount<h)return T;return null}).map(T=>({...T,stepsWithStatus:T.steps.map(d=>({...d,actorsActivity:[],isOriginalApprovalStep:!0})),isRealTimeApprovalEnabled:!1})))}const _n=h=>{const T=Vn();return $e.handleSubmit(()=>{T&&(qe("submit"),S?.trackReimbursementSubmitReimbursement(e.createTime?.format(Yi.analytics.MMMDashDDDashYYYYFormat)??ee.dateNow().format(Yi.analytics.MMMDashDDDashYYYYFormat),r.currencyCode,ne,b),E(),bi(!0))})(h)},Hn=()=>{const h=$e.getValues(),T=ti(h,e.merchantList.merchants,r,ne,e.currencyConversionStatus,e.allCurrencies,e.accountList.accounts,e.classList.classes);he?.(T),Q()},Kn=e.reimbursementInfo?.billStatus.code=="approved"&&e.reimbursementInfo?.billPaymentStatus.code?e.reimbursementInfo?.billPaymentStatus:e.reimbursementInfo?.billStatus,qn=e.reimbursementInfo?.paymentDate!=null?ee.zeniDate(ee.getNextNthWorkingDay(e.reimbursementInfo.paymentDate.toDate(),[0,6],e.achSameDayMaxDays).toDateString()):void 0,Gn=e.reimbursementInfo?.expectedDepositDate??qn,Yn=b!=null&&e.remiStage==="draft",Si=Ro(e.duplicateLineByLineId),_t=e.duplicateReimbursementStatus.fetchState==="Completed"&&Si>0,{requestToOpenThread:Ht,setRequestToOpenThread:$i,setOpenThread:Kt}=v.useContext(Xn),{threads:gt,isLoading:Ye}=Qn({application:"dashboard",companyId:ke.currentTenant?.companyId,tab:"reimbursement",entityId:b,isGlobalComment:!1},"both",!1);v.useEffect(()=>{Ht?.threadId!=null&&gt.length>0&&!Ye&&(Kt(Ht.threadId),$i(null))},[Ht,gt,Ye,Kt,$i]);const Jn=v.useMemo(()=>b==null?[]:gt.filter(h=>h.resolved===!1&&!h.id.includes(eo)),[gt,b]).length,Zn=(h,T)=>{Kt(T);const d=h.entityType.split("."),x=parseInt(d[2]);if(isNaN(x)){ae(!1);return}const $t=`${x+1}`,B=e.lineDetailSection[x+1].type;d.includes(y.mileageKey)&&B===y.outOfPocketKey?re(ee.toReimbursementTypeCode(y.mileageKey),$t,b):d.includes(y.outOfPocketKey)&&B===y.mileageKey&&re(ee.toReimbursementTypeCode(y.outOfPocketKey),$t,b),ae(!1)};return t.jsx(Rr,{ref:W,children:t.jsx(to,{sharedItems:{sharedFunctions:void 0,sharedRef:{contentWrapperRef:et.current??null}},children:t.jsxs(nn,{...$e,children:[t.jsx("form",{id:Zi(Ji),onSubmit:h=>_n(h),children:t.jsxs(rl,{windowSize:O,ref:et,children:[Bn?t.jsx(li,{titleComponent:t.jsx(an,{children:ce.title}),descriptionComponent:t.jsx(on,{children:ce.description}),primaryButtonText:ce.primaryButtonText,secondaryButtonText:ce.secondaryButtonText,action:En,proceedButtonVariant:ce.title===y.deleteBankAccountTitle||ce.title===y.deleteDraftTitle||ce.title===y.deleteReportTitle||ce.title===y.discardTitle?"danger":"primary",isEditPopup:ce.title===y.deleteBankAccountTitle}):null,Mn?t.jsx(fr,{reimbursementId:b,submitFetchState:e.saveStatus?.fetchState??"Not-Started",duplicateReimbursementStatus:e.duplicateReimbursementStatus.fetchState,hasDuplicateLine:_t,numberOfDuplicateLines:Si,setShowDuplicatePopup:bi,submitReport:Hn,fetchDuplicateReimbursement:I,clearDuplicateReimbursementDetail:E,clearRemiSaveStatus:te,analytics:S}):null,He?t.jsx(Qi,{windowSize:O}):null,je?t.jsxs(Qi,{windowSize:O,"data-testid":K("skip-autofill-section"),children:[O==="small"?t.jsxs(t.Fragment,{children:[t.jsx(Vr,{children:t.jsx(oi,{partOfSkipAutoFill:!0,size:O,onClick:()=>pt(!1),"data-testid":K("close-invoice-upload"),children:t.jsx(ni,{withOverlay:!0,children:t.jsx(ii,{})})})}),t.jsx(Hr,{children:Ut})]}):null,t.jsx(xn,{showAutofill:je,analytics:S,onSkipAutofill:()=>{S?.trackReimbursementSkipAutofill(),pt(!1)},uploadInvoiceEndPoint:p,authParams:o,style:{width:X.leftSectionWidth.valuePercentage(O),boxSizing:"border-box",backgroundColor:O==="small"?We.colors.grey4:"unset",padding:O==="small"?`${i.sp5} ${i.sp3}`:`78px ${i.sp6} 15px ${i.sp8}`,margin:O==="small"?i.sp0:void 0},onInvoiceUpload:h=>H(h,ht,!0),dropFilePlaceholder:{upload:y.dropReceipt.upload,single:y.dropReceipt.single,or:y.dropReceipt.or,multiple:y.dropReceipt.multiple,receipts:y.dropReceipt.receipts},updateInvoiceUploadFetchState:Le,showInfoText:!1,allowMultiFiles:je,type:"receipt"}),O!=="small"?t.jsx(_r,{children:t.jsx(oi,{partOfSkipAutoFill:!0,onClick:()=>pt(!1),"data-testid":K("close-invoice-upload"),children:t.jsx(ni,{withOverlay:!0,children:t.jsx(ii,{})})})}):null]}):null,t.jsxs(tl,{windowSize:O,"data-testid":K("edit-reimbursement-detail-page-nav-bar-container"),children:[O!=="small"?t.jsx(ki,{style:{width:"42%"},"data-testid":K("edit-reimbursement-detail-page-left-nav-bar"),title:"",leftSideComponent:t.jsx(il,{"data-testid":K("zeni-logo-spend-management-reimbursement-detail-page"),onClick:se}),enableTitleOnScroll:!1,scrollableContent:W,backgroundColor:We.colors.background,keepBackgroundOnScroll:!0,source:"EditReimbursementDetailPage"}):null,O!=="small"?t.jsx(Or,{}):null,t.jsx(ki,{style:{width:X.navBarWidth.valuePercentage(O)},"data-testid":K("edit-reimbursement-detail-page-right-nav-bar"),source:"EditReimbursementDetailPage",title:Ut,leftSideComponent:t.jsx(t.Fragment,{}),rightSideComponent:je!=!0?t.jsxs(nl,{children:[C&&b!=null?t.jsxs(ol,{isDisabled:Ye,"data-testid":K("remi-comment-button"),onClick:Ye?()=>null:h=>{h.preventDefault(),h.stopPropagation(),mt({roomId:wt,companyId:ke.currentTenant?.companyId??"",companyName:ke.currentTenant?.companyName??"",entityType:"reimbursement.details",entityId:b}),ae(!0),S?.trackCommentActivity("reimbursement","clicked",ke.currentTenant?.companyName??"",ke.controllersList.controllers.map(T=>no(T)),void 0,void 0,"page icon")},children:[t.jsx(io,{count:Ye?void 0:Jn,isLoading:Ye,style:{left:"12px"}}),t.jsx(al,{})]}):null,t.jsx(oi,{size:O,onClick:()=>fi(),"data-testid":K("close-nav-bar"),children:t.jsx(ni,{withOverlay:!1,children:t.jsx(ii,{})})})]}):null,enableTitleOnScroll:O!=="small",scrollThreshold:64,scrollableContent:W,backgroundColor:We.colors.grey4})]}),O==="small"?t.jsxs(t.Fragment,{children:[t.jsx(el,{children:Ut}),t.jsx(oo,{progressSectionObj:Kn,createDate:e.createTime,paymentDate:Gn,scheduleDate:e.reimbursementInfo?.paymentDate,approvedDate:e.latestApprovedDate,isBillUploaded:b!=null?!0:e.uploadStatus==="Completed"}),Vt&&t.jsxs(Gr,{children:[t.jsx(qr,{}),t.jsx(Yr,{children:y.banner})]}),e.isProcessing?t.jsx(rn,{variant:"warning",style:{margin:O==="small"?`${i.sp5} ${i.sp3}`:`${i.sp3} ${i.sp8} ${i.sp3} ${i.sp6}`},title:Gi.duplicateWarning.title,description:Gi.duplicateWarning.description}):_t?t.jsxs(Jr,{size:O,children:[t.jsx(Br,{}),t.jsxs(Xr,{children:[t.jsx(Zr,{children:y.thereSeems}),t.jsx(Qr,{children:y.pleaseFind})]})]}):null,t.jsx($n,{isReimbursementCommentingEnabled:C,sectionId:Lt,reimbursementId:e.remiId,reportTitle:e.whatForSection.reportTitle})]}):null,t.jsx(qa,{onDuplicateLineClick:A,reimbursementId:b,remiDetails:e,uploadInvoiceEndPoint:p,authParams:o,showSkipAutoFill:je,setShowSkipAutoFill:pt,isReimbursementCommentingEnabled:C,isAutoFieldsExist:Vt,totalAmount:ne,removeFileFromLine:ge,onReplaceClick:Un,onReceiptsUpload:H,currencyConversionStatus:e.currencyConversionStatus,setCurrentLineIdForUpload:Rn,setUploadedReceiptPayload:zn,updateInvoiceUploadFetchState:Le,clearTentativeNameForLine:Ae,defaultCurrency:r,companyMileageConfigInfo:u,isUserAdmin:m,setShowBankAccountPage:Ft,bankAccounts:s,onDeleteBankAccount:Wn,analytics:S,fileRequiredLineIds:Nt,isSignedInUserReimbursementCreator:g,uncategorizedAccounts:w,showTotalAmountLoader:ut,duplicateLineByLineId:e.duplicateLineByLineId,hasDuplicateLine:_t,removeDuplicateReimbursementForLine:pe,scrollContainerRef:W}),t.jsxs(ll,{showSkipAutoFill:je,windowSize:O,children:[O!=="small"?t.jsx(Xi,{}):null,t.jsx(sl,{windowSize:O,children:t.jsxs(cl,{windowSize:O,children:[e.remiId!==void 0&&t.jsx(Ii,{amount:ne??0,activities:e.remiActivities,stage:e.remiStage??"draft",onAddNewRule:Se,entity:"reimbursement",historicActivities:e.remiHistory.activities}),e.remiId==null&&ne!=null&&ne>0?t.jsx(Ii,{amount:ne??0,activities:wi,stage:"draft",entity:"reimbursement",historicActivities:e.remiHistory.activities}):null]})})]}),t.jsx(dl,{}),t.jsxs(Kr,{showSkipAutoFill:je,windowSize:O,children:[O!=="small"?t.jsx(Xi,{}):null,t.jsx(Lr,{windowSize:O,onClick:h=>{h.stopPropagation(),Ue===!0&&Ve(!1)},children:t.jsx(ln,{formId:Zi(Ji),separatorStyle:{marginRight:i.sp4},showCancel:g,cancelBtn:{label:m&&e.remiStage==="pending_approval"&&e.remiStatus!=="rejected"?O==="small"?y.buttons.discard:y.buttons.discardChanges:O==="small"?y.buttons.save:y.buttons.saveChanges,isLoading:Ke==="save"&&e.saveStatus?.fetchState==="In-Progress",onClick:xi,style:{width:X.footerButtonWidth.value(O)},reverseSpinnerColor:!1},primaryBtn:{label:Pr(g,m,e,O),isDisabled:!g,style:{width:g?X.footerButtonWidth.value(O):"auto"},type:g?"submit":"button",onClick:g?()=>null:xi,isLoading:!g&&Ke==="save"&&e.saveStatus?.fetchState==="In-Progress"},rightSideComponent:t.jsx(Ar,{children:t.jsxs(Nr,{windowSize:O,children:[Ue?t.jsx(sn,{onClickAway:()=>Ve(!1),children:t.jsx(Er,{windowSize:O,"data-testid":K("remi-other-actions-container"),children:t.jsx(Wr,{onClick:Nn,"data-testid":K("delete-report-action"),children:y.buttons.deleteReport})})}):null,t.jsx(Fr,{windowSize:O,children:Yn===!0?t.jsx(Mr,{windowSize:O,"data-testid":K("more-details-button"),children:t.jsx(zr,{onClick:()=>Ve(!Ue)})}):null})]})}),style:{minHeight:62}})})]}),C&&b!=null?t.jsx(Po,{id:wt,children:t.jsx(ao,{isDrawerOpen:F,allowComposer:!0,drawerTitle:vr,threads:gt,autoExpand:!0,autoFocus:!1,filter:{application:"dashboard",companyId:U?.companyId??Cr,isGlobalComment:!1,tab:"reimbursement"},isLoading:Ye,threadMetadata:U?{companyName:U.companyName,companyId:U.companyId,entityId:U.entityId,entityType:U.entityType,isGlobalComment:!1,application:"dashboard",tab:"reimbursement",url:window.location.href}:void 0,textOverrides:{composerPlaceholder:kr,replyComposerPlaceholder:Ir,threadResolve:Tr,threadUnResolve:Dr},onThreadClick:(h,T)=>Zn(h,T),onCloseAllThreadsDrawer:()=>ae(!1),drawerSectionStyle:{width:"400px",backgroundColor:We.colors.background}})}):null]})}),On?t.jsx(Ur,{windowSize:O,children:t.jsx(rr,{bankAccountCreationState:k,setShowBankAccountPage:Ft,plaidConnectionDetails:l,onFetchLinkTokenClick:ze,onEstablishConnectionClick:ye,onSaveHandler:L,bankAccountToCreate:P,bankNameByRouting:f,fetchBankNameByRoutingStatus:D,onUserBankDetailsUpdated:$,onFetchBankName:q,onBackClick:()=>{dt(),Ft(!1)}})}):null]})})})},Pr=(e,o,r,u)=>e?r.reimbursementId!=null&&r.remiStage==="pending_approval"?y.buttons.resubmit:y.buttons.submit:o&&r.remiStage==="pending_approval"&&r.remiStatus!=="rejected"?u==="small"?y.buttons.discard:y.buttons.discardChanges:u==="small"?y.buttons.save:y.buttons.saveChanges,Rr=n.div`
620
620
  position: relative;
621
621
  height: 100vh;
622
622
  overflow-y: scroll;
@@ -631,7 +631,7 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
631
631
  pointer-events: none;
632
632
  z-index: 3;
633
633
  `,Lr=n.div`
634
- width: ${e=>Q.rightSectionWidth.valuePercentage(e.windowSize)};
634
+ width: ${e=>X.rightSectionWidth.valuePercentage(e.windowSize)};
635
635
  `,Ar=n.div`
636
636
  display: flex;
637
637
  justify-content: flex-end;
@@ -671,17 +671,17 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
671
671
  padding-top: ${i.sp1};
672
672
  padding-bottom: ${i.sp1};
673
673
  position: absolute;
674
- bottom: ${e=>Q.otherActionsContainerBottom.valuePx(e.windowSize)};
674
+ bottom: ${e=>X.otherActionsContainerBottom.valuePx(e.windowSize)};
675
675
  z-index: 3;
676
676
  border: ${e=>`1px solid ${e.theme.colors.grey3}`};
677
677
  border-radius: ${i.sp1};
678
- right: ${e=>Q.right.valuePx(e.windowSize)};
678
+ right: ${e=>X.right.valuePx(e.windowSize)};
679
679
  box-shadow: ${e=>`${i.sp0} 2px ${i.sp1} ${e.theme.colors.grey1} 3D`};
680
680
  `,Nr=n.div`
681
681
  width: 100%;
682
682
  justify-content: flex-end;
683
683
  position: ${e=>e.windowSize==="small"?"static":"relative"};
684
- right: ${e=>Q.actionsContainerRight.valuePx(e.windowSize)};
684
+ right: ${e=>X.actionsContainerRight.valuePx(e.windowSize)};
685
685
  height: 100%;
686
686
  display: flex;
687
687
  `,Wr=n(mi)`
@@ -701,7 +701,7 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
701
701
  height: 100vh;
702
702
  position: fixed;
703
703
  background: ${e=>e.theme.colors.grey4};
704
- width: ${e=>Q.rightSectionWidth.valuePercentage(e.windowSize)};
704
+ width: ${e=>X.rightSectionWidth.valuePercentage(e.windowSize)};
705
705
  right: 0;
706
706
  top: 0;
707
707
  `,Vr=n.div`
@@ -712,19 +712,19 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
712
712
  justify-content: end;
713
713
  `,_r=n.div`
714
714
  width: 58%;
715
- `,qr=n(ci)`
715
+ `,Hr=n(ci)`
716
716
  padding: ${i.sp3} ${i.sp3} 0 ${i.sp3};
717
717
  background: ${e=>e.theme.colors.grey4};
718
718
  color: ${e=>e.theme.colors.primary};
719
- `,Hr=n.div`
719
+ `,Kr=n.div`
720
720
  display: ${e=>e.windowSize==="small"&&e.showSkipAutoFill?"none":"flex"};
721
721
  width: 100%;
722
722
  position: fixed;
723
723
  bottom: 0;
724
724
  z-index: 3;
725
- `,Qi=n.div`
725
+ `,Xi=n.div`
726
726
  width: 42%;
727
- `,Kr=n(di)`
727
+ `,qr=n(di)`
728
728
  color: ${e=>e.theme.colors.primary};
729
729
  width: ${i.sp3};
730
730
  height: ${i.sp3};
@@ -744,23 +744,23 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
744
744
  padding: ${i.sp3};
745
745
  border-radius: ${i.sp2};
746
746
  align-items: start;
747
- margin-top: ${e=>Q.duplicateBannerWrapperMarginTop.valuePx(e.size)};
748
- margin-right: ${e=>Q.duplicateBannerWrapperMarginRight.valuePx(e.size)};
749
- margin-bottom: ${e=>Q.duplicateBannerWrapperMarginBottom.valuePx(e.size)};
750
- margin-left: ${e=>Q.duplicateBannerWrapperMarginLeft.valuePx(e.size)};
747
+ margin-top: ${e=>X.duplicateBannerWrapperMarginTop.valuePx(e.size)};
748
+ margin-right: ${e=>X.duplicateBannerWrapperMarginRight.valuePx(e.size)};
749
+ margin-bottom: ${e=>X.duplicateBannerWrapperMarginBottom.valuePx(e.size)};
750
+ margin-left: ${e=>X.duplicateBannerWrapperMarginLeft.valuePx(e.size)};
751
751
  background-color: ${j.alertLight};
752
752
  border: 1px solid ${e=>e.theme.colors.brandColorGoldDark};
753
- `,Xr=n(Mt)`
753
+ `,Zr=n(Mt)`
754
754
  color: ${e=>e.theme.colors.brandColorGoldDark};
755
- `,Qr=n.div`
755
+ `,Xr=n.div`
756
756
  width: 100%;
757
- `,Zr=n(hi)`
757
+ `,Qr=n(hi)`
758
758
  color: ${e=>e.theme.colors.brandColorGoldDark};
759
759
  `,el=n(ci)`
760
760
  letter-spacing: -0.02em;
761
761
  color: ${e=>e.theme.colors.primary};
762
762
  margin: ${i.sp3};
763
- `,Zi=n.div`
763
+ `,Qi=n.div`
764
764
  display: flex;
765
765
  flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
766
766
  height: 100vh;
@@ -796,7 +796,7 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
796
796
  color: ${e=>e.withOverlay?j.primaryDark:e.theme.colors.primary};
797
797
  }
798
798
  `,nl=n.div`
799
- margin-top: ${e=>Q.closeMarginTop.valuePx(e.windowSize)};
799
+ margin-top: ${e=>X.closeMarginTop.valuePx(e.windowSize)};
800
800
  display: flex;
801
801
  float: right;
802
802
  `,ol=n.div`
@@ -817,9 +817,9 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
817
817
  align-items: center;
818
818
  justify-content: center;
819
819
  `,oi=n.div`
820
- margin-top: ${e=>e.partOfSkipAutoFill===!0?Q.closeMarginTop.valuePx(e.size):0};
820
+ margin-top: ${e=>e.partOfSkipAutoFill===!0?X.closeMarginTop.valuePx(e.size):0};
821
821
  margin-left: ${i.sp5};
822
- margin-right: ${e=>e.partOfSkipAutoFill===!0?Q.closeMarginRight.valuePx(e.size):0};
822
+ margin-right: ${e=>e.partOfSkipAutoFill===!0?X.closeMarginRight.valuePx(e.size):0};
823
823
  `,rl=n.div`
824
824
  display: flex;
825
825
  flex-direction: column;
@@ -852,14 +852,14 @@ import{a2 as ai,u as bt,Y as ft,a as en,y as Ci,l as ee,M as me,I as tn,e as Ie,
852
852
  `,ll=n.div`
853
853
  display: ${e=>e.windowSize==="small"&&e.showSkipAutoFill?"none":"flex"};
854
854
  width: 100%;
855
- margin-bottom: ${e=>Q.bottomMargin.valuePx(e.windowSize)};
855
+ margin-bottom: ${e=>X.bottomMargin.valuePx(e.windowSize)};
856
856
  `,sl=n.div`
857
- width: ${e=>Q.rightSectionWidth.valuePercentage(e.windowSize)};
857
+ width: ${e=>X.rightSectionWidth.valuePercentage(e.windowSize)};
858
858
  `,cl=n.div`
859
- margin-left: ${e=>Q.leftMargin.valuePx(e.windowSize)};
860
- margin-right: ${e=>Q.rightMargin.valuePx(e.windowSize)};
859
+ margin-left: ${e=>X.leftMargin.valuePx(e.windowSize)};
860
+ margin-right: ${e=>X.rightMargin.valuePx(e.windowSize)};
861
861
  `,dl=n.div`
862
862
  display: flex;
863
863
  flex-direction: column;
864
864
  height: ${i.sp11};
865
- `;export{Rl as default,Xi as uniqueName};
865
+ `;export{Pl as default,Zi as uniqueName};