@zeniai/web-cockpit-ui 1.15.8-dev → 1.15.8-qa

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 (217) hide show
  1. package/dist/assets/{ACHDetailsPage-C4kSZtcW-DXbi1tk_.js → ACHDetailsPage-C4kSZtcW-CRAncXjZ.js} +1 -1
  2. package/dist/assets/{AIPerformancePage-nAXYlFHx-B-yNLxsI.js → AIPerformancePage-nAXYlFHx-D8t7UfO6.js} +1 -1
  3. package/dist/assets/{AccountInfoPage-BgYgT10O-CcaqKm0M.js → AccountInfoPage-BgYgT10O-BPubXPU8.js} +1 -1
  4. package/dist/assets/{AccountInfoPageContent-C6fN_njt-BfclYIhc.js → AccountInfoPageContent-C6fN_njt-HYk5LymM.js} +1 -1
  5. package/dist/assets/{AccountLockedInfoModal-DRmaVRzS-BiL1l-3p.js → AccountLockedInfoModal-DRmaVRzS-Dz8UCOQu.js} +1 -1
  6. package/dist/assets/{AccountReconDetailsDrawerPage-ChfImufh-Qmw1sJds.js → AccountReconDetailsDrawerPage-ChfImufh-xGH31FUE.js} +1 -1
  7. package/dist/assets/{AccountRow-C0plHrDu-BlMGnWxc.js → AccountRow-C0plHrDu-BHbrjlQa.js} +1 -1
  8. package/dist/assets/{AccountsPromoCardStack-BCRuoijH-D0HIkJsh.js → AccountsPromoCardStack-BCRuoijH-BiUfxCis.js} +1 -1
  9. package/dist/assets/{AddAddressForCardDrawer-BOX_B6jm-BbCABLHY.js → AddAddressForCardDrawer-BOX_B6jm-HjaseCvO.js} +1 -1
  10. package/dist/assets/{AddToWalletPage-CKPw3FXG-D61c3n-w.js → AddToWalletPage-CKPw3FXG-1yjoUpl3.js} +1 -1
  11. package/dist/assets/{AgingReportsPage-BLYXtrbx-DW-1ybPL.js → AgingReportsPage-BLYXtrbx-ChP2VVRq.js} +1 -1
  12. package/dist/assets/{AllUserItems-CIuKSRs--B0618Ye4.js → AllUserItems-CIuKSRs--BSTdrFJx.js} +1 -1
  13. package/dist/assets/{ApAgingDetailPage-DeqICFKW-a9KWHhRJ.js → ApAgingDetailPage-DeqICFKW-BGrGI80f.js} +1 -1
  14. package/dist/assets/{AppBasePage-zQkWIZIS-COyO76Q-.js → AppBasePage-zQkWIZIS-J73aeT5P.js} +1 -1
  15. package/dist/assets/{AppDrawerContent-OIrm7j-k-Dut49GGC.js → AppDrawerContent-OIrm7j-k-CAl-h4tc.js} +1 -1
  16. package/dist/assets/{ApprovalRulesSettingsPage-Df5F_wnw-CP1luL-w.js → ApprovalRulesSettingsPage-Df5F_wnw-Cn6qw6gU.js} +1 -1
  17. package/dist/assets/{ArAgingChart-Dv9GPrlk-1IjLiFwv.js → ArAgingChart-Dv9GPrlk-BDO04yvC.js} +1 -1
  18. package/dist/assets/{ArAgingDetailPage-vW-JcTgF-Cy7lc6dB.js → ArAgingDetailPage-vW-JcTgF-CdtFinK-.js} +1 -1
  19. package/dist/assets/{AttachmentView-CHgDKLit-BOkUOxft.js → AttachmentView-CHgDKLit-CNDwc0Eo.js} +1 -1
  20. package/dist/assets/{BankAccountSection-danXlJW--Ci61_HQI.js → BankAccountSection-danXlJW--CGFGOQdm.js} +1 -1
  21. package/dist/assets/{BankAccountWarningSection-Byabqq8Z-DlkkUlqm.js → BankAccountWarningSection-Byabqq8Z-B6b9o7wy.js} +1 -1
  22. package/dist/assets/{BankConnectionsSettingsPage-D4iHZXiy-B50Jr36L.js → BankConnectionsSettingsPage-D4iHZXiy-DBmd09rV.js} +1 -1
  23. package/dist/assets/{BillDetailPage-BD2IX-iP-C1AsdsRK.js → BillDetailPage-BD2IX-iP-QIATdRex.js} +1 -1
  24. package/dist/assets/{BillPayApprovalRuleDetailPage-DYbGnWVc-B9dRHLuy.js → BillPayApprovalRuleDetailPage-DYbGnWVc-JKxreggo.js} +1 -1
  25. package/dist/assets/{BillPayApprovalRulesPage-BW2wEvAf-BP_2ZRbS.js → BillPayApprovalRulesPage-BW2wEvAf-DrTI5_46.js} +1 -1
  26. package/dist/assets/{BillPayPromoPage-C7PX-EVL-RrQTQk3r.js → BillPayPromoPage-C7PX-EVL-DDmbTE9O.js} +1 -1
  27. package/dist/assets/{BillPaySetUpPage-Czno3Zre-B54xXO94.js → BillPaySetUpPage-Czno3Zre-BE6uTwDe.js} +1 -1
  28. package/dist/assets/{BillingSettingsPage-DwBAvbyP-BA7TOSu8.js → BillingSettingsPage-DwBAvbyP-BOeTv55Y.js} +1 -1
  29. package/dist/assets/{BillsBulkReviewDrawerPage-YBZ0Qqa6-BvssydGl.js → BillsBulkReviewDrawerPage-YBZ0Qqa6-Btjur5rB.js} +1 -1
  30. package/dist/assets/{BoxItem-CQn8-mlp-3WaKvXCN.js → BoxItem-CQn8-mlp-BpjhTACd.js} +1 -1
  31. package/dist/assets/{BusinessVerificationPage-Pj_43PYG-Bf2eq8Ab.js → BusinessVerificationPage-Pj_43PYG-BBfAZpRu.js} +1 -1
  32. package/dist/assets/{CardNumberSubText-2Tw37MOu-DLENhMmY.js → CardNumberSubText-2Tw37MOu-Na5odSIe.js} +1 -1
  33. package/dist/assets/{CashbackDetailPage-BPGA9iT0-BE7Kx4cM.js → CashbackDetailPage-BPGA9iT0-pfH6WY-d.js} +1 -1
  34. package/dist/assets/{ChargeCardDetailPage-draAZn9S-DVIwh9R-.js → ChargeCardDetailPage-draAZn9S-BLHAWsUD.js} +1 -1
  35. package/dist/assets/{ChargeCardListPage-gsG1eX_i-Dapb8J_Z.js → ChargeCardListPage-gsG1eX_i-DncsEeIV.js} +1 -1
  36. package/dist/assets/{ChargeCardListTable-DVFpdT9f-BEElVTwC.js → ChargeCardListTable-DVFpdT9f-D6Qv1C8v.js} +1 -1
  37. package/dist/assets/{ChargeCardPaymentHistoryPage-BbggvUhU-DsH52CB6.js → ChargeCardPaymentHistoryPage-BbggvUhU-KYpdTWjw.js} +1 -1
  38. package/dist/assets/{ChargeCardPromoPage-DIxy-YcS-Bpah01ZO.js → ChargeCardPromoPage-DIxy-YcS-CPRuhZCR.js} +1 -1
  39. package/dist/assets/{ChargeCardSetupPage-Ck37bWHj-CA4YDMXc.js → ChargeCardSetupPage-Ck37bWHj-63DpNOd1.js} +1 -1
  40. package/dist/assets/{ChargeCardStatementsPage-4bExV6ox-DsvdoV21.js → ChargeCardStatementsPage-4bExV6ox-BSLQYECC.js} +1 -1
  41. package/dist/assets/{CheckDepositDrawerPage-cZ9nSw3H-CEFjqZ5t.js → CheckDepositDrawerPage-cZ9nSw3H-D2wZXg2E.js} +1 -1
  42. package/dist/assets/{CollapsableReportTable-D9EGRkFb-DwhLMO0b.js → CollapsableReportTable-D9EGRkFb-rtyJvli3.js} +1 -1
  43. package/dist/assets/{CompanyOfficerDetailsSection-C2j4TNi_-D3zewiNv.js → CompanyOfficerDetailsSection-C2j4TNi_-P80aH3rj.js} +1 -1
  44. package/dist/assets/{CompanyPassportCard--3g9aidd-CxwOeh5K.js → CompanyPassportCard--3g9aidd-DEP92iFu.js} +1 -1
  45. package/dist/assets/{CompanyPassportPage-BhF3zWN0-Cn2clYh0.js → CompanyPassportPage-BhF3zWN0-D1AeDDw0.js} +1 -1
  46. package/dist/assets/{CompleteProfile-iee5HgiC-iD1IzEAE.js → CompleteProfile-iee5HgiC-DWDz1H5n.js} +1 -1
  47. package/dist/assets/{ConfettiBurst-Dl2Z6LKw-OEcvzGtj.js → ConfettiBurst-Dl2Z6LKw-BXiTHcqO.js} +1 -1
  48. package/dist/assets/{CreateOrEditVendorPage-DTlxyMQ8-D1vsmSkA.js → CreateOrEditVendorPage-DTlxyMQ8-DUgUVqol.js} +1 -1
  49. package/dist/assets/{CreditCardPaymentDrawerPage-CAZbzyFh-1lHa8wZR.js → CreditCardPaymentDrawerPage-CAZbzyFh-BQoH4AnG.js} +1 -1
  50. package/dist/assets/{CurrencySelectField-CcU9PAOW-u3CiOTPH.js → CurrencySelectField-CcU9PAOW-UhjAv5pw.js} +1 -1
  51. package/dist/assets/{CustomerOnboardingActivationPage-dXGInCs4-_xQt3N4Y.js → CustomerOnboardingActivationPage-dXGInCs4-BfLZrVA_.js} +1 -1
  52. package/dist/assets/CustomerOnboardingContainerPage-CtySgp6R-DlPVcAtZ.js +1 -0
  53. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-eZtb_MiZ-oykMYoxJ.js → CustomerOnboardingDetailPageSkeleton-eZtb_MiZ-B7Pjeba4.js} +1 -1
  54. package/dist/assets/{CustomerOnboardingNoStepsPage-BprU0lwT-FU4__G2R.js → CustomerOnboardingNoStepsPage-BprU0lwT-CBl7xIv9.js} +1 -1
  55. package/dist/assets/{CustomerOnboardingPage-CP969grW-CLGTaPd5.js → CustomerOnboardingPage-CP969grW-DSt_mh2c.js} +1 -1
  56. package/dist/assets/{CustomerOnboardingProductSuitePage-C-oDFj9a-By3_gtmn.js → CustomerOnboardingProductSuitePage-C-oDFj9a-KXFyyrbX.js} +1 -1
  57. package/dist/assets/{Dashboard-CKSEolZn-B8UGwGX2.js → Dashboard-CKSEolZn-KkJW27CG.js} +1 -1
  58. package/dist/assets/{DashboardReportPage-JLORU_HF-JuRm0_l-.js → DashboardReportPage-JLORU_HF-Cpq1a7z1.js} +1 -1
  59. package/dist/assets/{DashboardSidebarBackgroundAnimation-BhNP2YDK-RRWjqzmy.js → DashboardSidebarBackgroundAnimation-BhNP2YDK-AvtdKUwZ.js} +1 -1
  60. package/dist/assets/{DepositAccTransactionItem-B3A_2ZTg-BGji2vDD.js → DepositAccTransactionItem-B3A_2ZTg-BCChPgpu.js} +1 -1
  61. package/dist/assets/{DepositAccTransactionListPage-S0zh1Xel-D4E89wzd.js → DepositAccTransactionListPage-S0zh1Xel-DgEcVBWB.js} +1 -1
  62. package/dist/assets/{DomesticWireDetailsPage-DqVaQ5WI-CEmGU0Lk.js → DomesticWireDetailsPage-DqVaQ5WI-DBkE3G1h.js} +1 -1
  63. package/dist/assets/{DownloadOverlay-D7AI3CGS-DY9OdGrk.js → DownloadOverlay-D7AI3CGS-BSXz1TYL.js} +1 -1
  64. package/dist/assets/{DrawerPage-BiQurb8Q-CEeTnVDp.js → DrawerPage-BiQurb8Q-CwosoM_H.js} +1 -1
  65. package/dist/assets/{EditPeoplePage-DkLTV485-DyUGQQC3.js → EditPeoplePage-DkLTV485-DSmYd3gF.js} +1 -1
  66. package/dist/assets/{EditReimbursementDetailPage-CoBKUQzs-DPjSJBny.js → EditReimbursementDetailPage-CoBKUQzs-C2zvDGNE.js} +1 -1
  67. package/dist/assets/{EntityDetailPage-ougFUO1M-BRBPuzyF.js → EntityDetailPage-ougFUO1M-D5lOJcsX.js} +1 -1
  68. package/dist/assets/{EntitySummarySection-dbyZ3ZMD-WaXS93t5.js → EntitySummarySection-dbyZ3ZMD-DIUFVdBF.js} +1 -1
  69. package/dist/assets/{ExpenseAutomationOverviewPage-WTK5jHbV-RX7MJN4K.js → ExpenseAutomationOverviewPage-WTK5jHbV-D_hqg6CV.js} +1 -1
  70. package/dist/assets/{ExpenseAutomationPage-BLk7BdAz-BiJ_8J_A.js → ExpenseAutomationPage-BLk7BdAz-ozrsfKpW.js} +1 -1
  71. package/dist/assets/{ExpressPayPage-CaBFl4M3-N5saqSFG.js → ExpressPayPage-CaBFl4M3-CpnlRAIb.js} +1 -1
  72. package/dist/assets/{FeaturePreviewPage-BY7VDaUB-C72FE9k5.js → FeaturePreviewPage-BY7VDaUB-BlOtvf2P.js} +1 -1
  73. package/dist/assets/{FollowStepsSection-BGZ3rzSO-DAxx1unm.js → FollowStepsSection-BGZ3rzSO-DZqA0Ls-.js} +1 -1
  74. package/dist/assets/{GlobalReviewListPage-DIiVT0qf-DgTvaNXq.js → GlobalReviewListPage-DIiVT0qf-C1h-R-9P.js} +1 -1
  75. package/dist/assets/{InformationCardStack-BZIU9Bwm-DWOE8xSt.js → InformationCardStack-BZIU9Bwm-BPjI_Aqf.js} +1 -1
  76. package/dist/assets/{InsightsCardStack-BZ6yws_x-DiUvTias.js → InsightsCardStack-BZ6yws_x-l5SDGStI.js} +1 -1
  77. package/dist/assets/{InsightsSection-CdlmvyOs-DmXLU_Lu.js → InsightsSection-CdlmvyOs-CSbQ6jxV.js} +1 -1
  78. package/dist/assets/{IntegrationsSettingsPage-JQ0sBJ-E-Dbn9Coz2.js → IntegrationsSettingsPage-JQ0sBJ-E-D0GHOz8k.js} +1 -1
  79. package/dist/assets/{InternationalWireSwiftDetailsPage-Bt0SYfe8-BOhQnyuJ.js → InternationalWireSwiftDetailsPage-Bt0SYfe8-D4jFazij.js} +1 -1
  80. package/dist/assets/{InternationalWireVerificationPage-ZiPvLcjo-TFRIwP9z.js → InternationalWireVerificationPage-ZiPvLcjo-CzF6c2rU.js} +1 -1
  81. package/dist/assets/{InviteFormPage-C-_fbwpS-DFnpH_Sg.js → InviteFormPage-C-_fbwpS-Dc7fjvDO.js} +1 -1
  82. package/dist/assets/{InvitePageListView-DX3LFpcZ-wgARDxxe.js → InvitePageListView-DX3LFpcZ-x0SBH5kb.js} +1 -1
  83. package/dist/assets/{InvitePeoplePage-DOfw4ntH-CNo6v_nK.js → InvitePeoplePage-DOfw4ntH-Bnv1S2jS.js} +1 -1
  84. package/dist/assets/{InvoiceUploadSection-7NLq2wUY-qezR9Z74.js → InvoiceUploadSection-7NLq2wUY-D1Ujr_CT.js} +1 -1
  85. package/dist/assets/{IssueChargeCardPage-BSax9G6t-Ccz8TXME.js → IssueChargeCardPage-BSax9G6t-li0Yc8Qz.js} +1 -1
  86. package/dist/assets/{LabeledAddressValue-kz4tRnLH-XbapS3ut.js → LabeledAddressValue-kz4tRnLH-fkTasFZL.js} +1 -1
  87. package/dist/assets/{LabeledAddressValueField-D950JjHi-B7-ZxMwG.js → LabeledAddressValueField-D950JjHi-CobscTGb.js} +1 -1
  88. package/dist/assets/{LabeledControlledCheckBoxField-BxXnpjp--Dg3HIXbL.js → LabeledControlledCheckBoxField-BxXnpjp--D8QByb_Y.js} +1 -1
  89. package/dist/assets/{LabeledCountryMultiSelectField-CzFImFhW-CGgJ4k83.js → LabeledCountryMultiSelectField-CzFImFhW-y52IAHGb.js} +1 -1
  90. package/dist/assets/{LabeledCreatableSingleSelectField-gJu9uvr7-DQ2Nsagb.js → LabeledCreatableSingleSelectField-gJu9uvr7-Baz8OVT_.js} +1 -1
  91. package/dist/assets/{LabeledDocumentField-y5kqHnHe-CmBeTY2E.js → LabeledDocumentField-y5kqHnHe-Cd6aBb3C.js} +1 -1
  92. package/dist/assets/{LabeledDropDownFormattedTextField-Vg6A9BxH-DOIAkkAy.js → LabeledDropDownFormattedTextField-Vg6A9BxH-8L8nXgg2.js} +1 -1
  93. package/dist/assets/{LabeledMultiSelectField-CIuHS55z-0cjXFx_d.js → LabeledMultiSelectField-CIuHS55z-BSvQJ-Z0.js} +1 -1
  94. package/dist/assets/{LabeledText-D0g7m29R-CGPY2mDY.js → LabeledText-D0g7m29R-cxnm614T.js} +1 -1
  95. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-DzIW_6we-BycaRLEY.js → LabeledUserSingleSelectWithSubtitlesField-DzIW_6we-BrxkJlKg.js} +1 -1
  96. package/dist/assets/{LabeledZeniRolesDropDownField-LWb3m6uz-DqLmiKb-.js → LabeledZeniRolesDropDownField-LWb3m6uz-BV8yj32-.js} +1 -1
  97. package/dist/assets/{LinkJETransactionPage-DQUYzOEN-Dr7MZbKQ.js → LinkJETransactionPage-DQUYzOEN-CAqtea48.js} +1 -1
  98. package/dist/assets/{LockCardPage-XgZwsozn-B7KEhFgG.js → LockCardPage-XgZwsozn-DcNxXIWb.js} +1 -1
  99. package/dist/assets/{LowBalancePopup-ChBTdcM2-CwIZnZTi.js → LowBalancePopup-ChBTdcM2-BRhnRaDc.js} +1 -1
  100. package/dist/assets/{MagicLinkACHDetailsPage-CwTDkcTO-CNPrJSVK.js → MagicLinkACHDetailsPage-CwTDkcTO-Caq0ps9o.js} +1 -1
  101. package/dist/assets/{MagicLinkDomesticWireDetailsPage-ncokQaY5-NW6YIUza.js → MagicLinkDomesticWireDetailsPage-ncokQaY5-Cl_8tBOk.js} +1 -1
  102. package/dist/assets/{MagicLinkInternationalWireDetailsPage-BHRkSlI7-DhjhQlqA.js → MagicLinkInternationalWireDetailsPage-BHRkSlI7-oQ1LN-Ng.js} +1 -1
  103. package/dist/assets/{MagicLinkSuccessPage-D9asRaYX-BLWFhDtP.js → MagicLinkSuccessPage-D9asRaYX-hreLPWO1.js} +1 -1
  104. package/dist/assets/{MagicLinkTitleSection-CI_X5_g6-DmElUYen.js → MagicLinkTitleSection-CI_X5_g6-B9qDUBZ-.js} +1 -1
  105. package/dist/assets/{MailingDetailsSection-C_ZYNZtm-CsF-OIaa.js → MailingDetailsSection-C_ZYNZtm-CJ5xMswj.js} +1 -1
  106. package/dist/assets/{MyBankConnectionsSettingsPage-Bo5DQnsA-KlDGNzcW.js → MyBankConnectionsSettingsPage-Bo5DQnsA-D0Sufsix.js} +1 -1
  107. package/dist/assets/{MyPendingActivationChargeCardListPage-yE_BAGUU-CF-N63jy.js → MyPendingActivationChargeCardListPage-yE_BAGUU-BmwV3pjH.js} +1 -1
  108. package/dist/assets/{MyProfileSettingsPage-BHZrydBY-CouLcv-w.js → MyProfileSettingsPage-BHZrydBY-B_909T6y.js} +1 -1
  109. package/dist/assets/{NavBarWithPicker-DfM5Vi5g-B5Y2cvHv.js → NavBarWithPicker-DfM5Vi5g-BWJESbaI.js} +1 -1
  110. package/dist/assets/{NavigationArrow-BuPVGh38-C7FStd2H.js → NavigationArrow-BuPVGh38-XNHRi9o5.js} +1 -1
  111. package/dist/assets/{NavigationDots-CLd0nZZT-DkTweDHl.js → NavigationDots-CLd0nZZT-CV65Lnrl.js} +1 -1
  112. package/dist/assets/{NewGlobalMerchantPage-B4X5B9Kx-DIjUgsWq.js → NewGlobalMerchantPage-B4X5B9Kx-DrYC7XeB.js} +1 -1
  113. package/dist/assets/{NoDataChart-VrW0gNeK-CoKQWY6y.js → NoDataChart-VrW0gNeK-D9AHc7Vl.js} +1 -1
  114. package/dist/assets/{NoDataTable-CZaHTbXi-BvRSGEWZ.js → NoDataTable-CZaHTbXi-cbckRR4v.js} +1 -1
  115. package/dist/assets/{NotFoundPage-CvuhMeh3-DzAU1c1V.js → NotFoundPage-CvuhMeh3-DqU44v-s.js} +1 -1
  116. package/dist/assets/{NotificationSettingsPage-612cyOPa-BDov0Or2.js → NotificationSettingsPage-612cyOPa-B2Br4UTC.js} +1 -1
  117. package/dist/assets/{NotificationsListConfig-CrNHxW9v-0zuPtBoA.js → NotificationsListConfig-CrNHxW9v-KkWyZsCx.js} +1 -1
  118. package/dist/assets/{NotificationsPage-DOq8YY_K-B5AJl0PR.js → NotificationsPage-DOq8YY_K-DXXt11Bj.js} +1 -1
  119. package/dist/assets/{OpExByVendorPage-JhAQyVWO-CgqLDeMB.js → OpExByVendorPage-JhAQyVWO-CFIAoogA.js} +1 -1
  120. package/dist/assets/{OverlayContainerPage-CEiw6dk7-DNyrAeAy.js → OverlayContainerPage-CEiw6dk7-D-uaIGKT.js} +1 -1
  121. package/dist/assets/{PandLWithForecastPage-B8WG6VDM-B7n_PAXf.js → PandLWithForecastPage-B8WG6VDM-DheE6AGf.js} +1 -1
  122. package/dist/assets/{PaymentAccountSetupBillingAddressSection-BT4jtUDt-BicenMSK.js → PaymentAccountSetupBillingAddressSection-BT4jtUDt-wAvdlMUp.js} +1 -1
  123. package/dist/assets/{PeoplePage-BJui-Wgk-Blym3c87.js → PeoplePage-BJui-Wgk-ZqLOzULs.js} +1 -1
  124. package/dist/assets/{ProductsCarousel-CGhEa82h-Bt-P-vzg.js → ProductsCarousel-CGhEa82h-DIdMDRd_.js} +1 -1
  125. package/dist/assets/{PromoBaseCards-1PF_kyGP-DnK5w4Qj.js → PromoBaseCards-1PF_kyGP-BRJ2sUha.js} +1 -1
  126. package/dist/assets/{QBOConnectionDialog-BVpU5kvg-BwCSP0e9.js → QBOConnectionDialog-BVpU5kvg-HDDG_kF6.js} +1 -1
  127. package/dist/assets/{QBOSetupSection-QpfgbXqT-DZhl1eaB.js → QBOSetupSection-QpfgbXqT-DygUgRVU.js} +1 -1
  128. package/dist/assets/{ReimbursementApprovalRuleDetailPage-CcH6vHDZ-1I93dA7B.js → ReimbursementApprovalRuleDetailPage-CcH6vHDZ-zXLIrPpr.js} +1 -1
  129. package/dist/assets/{ReimbursementApprovalRulesPage-C22bGg4Y-DujacG7V.js → ReimbursementApprovalRulesPage-C22bGg4Y-ClYVlFhQ.js} +1 -1
  130. package/dist/assets/{ReimbursementDetailPage-BntmMmsa-BON1Pgl-.js → ReimbursementDetailPage-BntmMmsa-DBIHpTWQ.js} +1 -1
  131. package/dist/assets/{ReimbursementPromoPage--ddzF7ri-CzikH3CP.js → ReimbursementPromoPage--ddzF7ri-C8Whx13o.js} +1 -1
  132. package/dist/assets/{ReimbursementSetUpPage-B_Mkgwzu-K4BhhXOp.js → ReimbursementSetUpPage-B_Mkgwzu-BjjCmbcS.js} +1 -1
  133. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-XRdWaRhQ-CM2OmWD1.js → ReimbursementsBulkReviewDrawerPage-XRdWaRhQ-DF7X2SfJ.js} +1 -1
  134. package/dist/assets/{ReloadCard-crbWeOPP-CkioU763.js → ReloadCard-crbWeOPP-CXnI4BBC.js} +1 -1
  135. package/dist/assets/{ReportTableViewSelector-KXoOW677-Cxk4-6kw.js → ReportTableViewSelector-KXoOW677-VB10UJ6e.js} +1 -1
  136. package/dist/assets/{ReportsPage-C3Jj54B2-CJg2yyXf.js → ReportsPage-C3Jj54B2-BeGQBjYf.js} +1 -1
  137. package/dist/assets/{RevenueChart-B2lwdex1-DM-m44Ax.js → RevenueChart-B2lwdex1-Cn6eIKBB.js} +1 -1
  138. package/dist/assets/{ReviewDetailsPage-BzJuymlx-B43bDwEk.js → ReviewDetailsPage-BzJuymlx-De8jeqFq.js} +1 -1
  139. package/dist/assets/{ReviewOverlay-CXHcM5J8-Z1A7mqWB.js → ReviewOverlay-CXHcM5J8-CWmuYC1c.js} +1 -1
  140. package/dist/assets/{RoleWithToolTip-q4rQTPKj-BeUt86oC.js → RoleWithToolTip-q4rQTPKj-DnZtHqjj.js} +1 -1
  141. package/dist/assets/{ScheduleDetailsFixedAssetsPage-BDxnIjkN-CrAKUlFE.js → ScheduleDetailsFixedAssetsPage-BDxnIjkN-RHoI8Wq9.js} +1 -1
  142. package/dist/assets/{ScheduleDetailsPage-C0WZjjTg-DX2t9Wrq.js → ScheduleDetailsPage-C0WZjjTg-4LVdyrEA.js} +1 -1
  143. package/dist/assets/{ScheduleSequenceTable-MEIZsagy-bHxXvqLR.js → ScheduleSequenceTable-MEIZsagy-Bs57M6oJ.js} +1 -1
  144. package/dist/assets/{ScreenRoutes-BGG-33kI.js → ScreenRoutes-Br3O3Bv3.js} +1 -1
  145. package/dist/assets/{SetUpAccountSection-Drp97o6h-xxM8m8_w.js → SetUpAccountSection-Drp97o6h-CUmuMQTP.js} +1 -1
  146. package/dist/assets/{SignIn-YqQXhCUb-BOeW8x0h.js → SignIn-YqQXhCUb-DTchfIMW.js} +1 -1
  147. package/dist/assets/{SignInScreen-D-bsy2_u.js → SignInScreen-BEl-iT5I.js} +1 -1
  148. package/dist/assets/{SpendManagementListViewPage-SufQOT9Y-5mvmwHQW.js → SpendManagementListViewPage-SufQOT9Y-DsXDsMNB.js} +3 -3
  149. package/dist/assets/{SpendManagementPerTabPage-vkAKQl3f-CYCCZ3rU.js → SpendManagementPerTabPage-vkAKQl3f-CDT-okI2.js} +1 -1
  150. package/dist/assets/{SpendManagementSection-WqBeexgm-D6ZHNQRi.js → SpendManagementSection-WqBeexgm-FC3yMOoP.js} +1 -1
  151. package/dist/assets/{StatementItem-DNtPyOiC-mibD54OH.js → StatementItem-DNtPyOiC-Cwms937J.js} +1 -1
  152. package/dist/assets/{StatementsPage-ProqQbaP-BB4Fbh50.js → StatementsPage-ProqQbaP-Bwe3MvOf.js} +1 -1
  153. package/dist/assets/{StatusSwitcher-CWQs9lpu-RXB7-04g.js → StatusSwitcher-CWQs9lpu-vdzoI5uC.js} +1 -1
  154. package/dist/assets/{SubTabSwitcher-B2uBojsp-DZNkw8WS.js → SubTabSwitcher-B2uBojsp-BscSJfWm.js} +1 -1
  155. package/dist/assets/{SummaryCard-Dcd_VUph-BV3h5iTx.js → SummaryCard-Dcd_VUph-CtvPqFVw.js} +1 -1
  156. package/dist/assets/{TaskManagementPage-BM9VR6Lt-C4YfHc_A.js → TaskManagementPage-BM9VR6Lt-96HNn42p.js} +1 -1
  157. package/dist/assets/{TimeRangeSwitcher-Sfz9Zsfu-DOBYaYdI.js → TimeRangeSwitcher-Sfz9Zsfu-C7Lz4In0.js} +1 -1
  158. package/dist/assets/{TimeframeSwitcher--oC4RNb6-CvfDTC-U.js → TimeframeSwitcher--oC4RNb6-9wGsnDTh.js} +1 -1
  159. package/dist/assets/{TimeframeSwitcherWithToggle-CaOGQOMX-D3Vo1Cjd.js → TimeframeSwitcherWithToggle-CaOGQOMX-IGT58opJ.js} +1 -1
  160. package/dist/assets/{TopExCard-DQ50kCvS-_2HPPX6t.js → TopExCard-DQ50kCvS-ChFGt_1f.js} +1 -1
  161. package/dist/assets/{TopExDetailPage-iwv1KNmn-sj6nj5zr.js → TopExDetailPage-iwv1KNmn-D2goxRJ1.js} +1 -1
  162. package/dist/assets/{TransactionDetailPage-dcUFs9xb-CrNRbBcr.js → TransactionDetailPage-dcUFs9xb-D1c2i9oL.js} +1 -1
  163. package/dist/assets/{TransactionList-1g-61_2b-CWHQyly8.js → TransactionList-1g-61_2b-BsVHB-dP.js} +1 -1
  164. package/dist/assets/{TransactionListBig-CSrLWjaV-BtYTXkmc.js → TransactionListBig-CSrLWjaV-DmreU3Pg.js} +1 -1
  165. package/dist/assets/{TransactionListPage-CKkWpoxH-CDqG5M4K.js → TransactionListPage-CKkWpoxH-DwZxceId.js} +1 -1
  166. package/dist/assets/{TransactionVendorDetailPage-BdVFxZdL-Dwyqb3QB.js → TransactionVendorDetailPage-BdVFxZdL-Da7F6NI9.js} +1 -1
  167. package/dist/assets/{TransferDrawerPage-nyepeege-Tib1D3Ko.js → TransferDrawerPage-nyepeege-C5aOIw_t.js} +1 -1
  168. package/dist/assets/{TreasuryOverviewPage-CkaOtstB-DJ6jh11f.js → TreasuryOverviewPage-CkaOtstB-Cb7VOc7Q.js} +1 -1
  169. package/dist/assets/{TreasuryPromoPage-B55rqmLO-BovduQF3.js → TreasuryPromoPage-B55rqmLO-B6nyli4-.js} +1 -1
  170. package/dist/assets/{TreasuryStatementsPage-DA72LRB2-COfX6A9q.js → TreasuryStatementsPage-DA72LRB2-BCFMT-Wb.js} +1 -1
  171. package/dist/assets/{TreasuryTaxLetterPage-CQ2nQIPi-CBS_UC-D.js → TreasuryTaxLetterPage-CQ2nQIPi-BvK8_LPp.js} +1 -1
  172. package/dist/assets/{TrendChart-BsSVNJm5-CngvRWQH.js → TrendChart-BsSVNJm5-C5P4NUjk.js} +1 -1
  173. package/dist/assets/{TrendWithTransactions-B6iLzpiJ-BNwLmu5S.js → TrendWithTransactions-B6iLzpiJ-CD-GjoX8.js} +1 -1
  174. package/dist/assets/{UncategorizedAccountsMappingPage-p3mhxO3d-hTb-4Xip.js → UncategorizedAccountsMappingPage-p3mhxO3d-BzXjBs-h.js} +1 -1
  175. package/dist/assets/{UnitIntegrationPage-CEtqPMTy-BFsuhTVj.js → UnitIntegrationPage-CEtqPMTy-CkFNHSgJ.js} +1 -1
  176. package/dist/assets/{UploadAdditionalDocumentOverlay-BYrAIUiK-zdW8Yium.js → UploadAdditionalDocumentOverlay-BYrAIUiK-19i7WD8j.js} +1 -1
  177. package/dist/assets/{Vendor2FAPopup-BPoFrkoj-DQVyS_En.js → Vendor2FAPopup-BPoFrkoj-CrkNrLcq.js} +1 -1
  178. package/dist/assets/{VendorACHDetailsPage-_UmamDKx-3__MSdLg.js → VendorACHDetailsPage-_UmamDKx-DnLhvKeC.js} +1 -1
  179. package/dist/assets/{VendorDetailPage-C0qX459r-CReufchw.js → VendorDetailPage-C0qX459r-DAL6sRtd.js} +1 -1
  180. package/dist/assets/{VendorDomesticWireDetailsPage-DJCb_XK0-CqOHNcHl.js → VendorDomesticWireDetailsPage-DJCb_XK0-D6ans18-.js} +1 -1
  181. package/dist/assets/{VendorFiling1099EditablePage-Da667Gu2-1r_mMv0x.js → VendorFiling1099EditablePage-Da667Gu2-DUD0rine.js} +1 -1
  182. package/dist/assets/{VendorFirstReviewPage-CJ-NKRm1-_2DgNT9J.js → VendorFirstReviewPage-CJ-NKRm1-BgMJtPzx.js} +1 -1
  183. package/dist/assets/{VendorInternationalWireDetailsPage-DodDB5wc-DbWBFoxR.js → VendorInternationalWireDetailsPage-DodDB5wc-DKjAmytq.js} +1 -1
  184. package/dist/assets/{VendorInternationalWireSwiftDetailsPage-ain3pHSa-EKqJyej-.js → VendorInternationalWireSwiftDetailsPage-ain3pHSa-CGNH7X2x.js} +1 -1
  185. package/dist/assets/{VendorsAccountsSection-C5cJ9KYV-CyL_wlEF.js → VendorsAccountsSection-C5cJ9KYV-BmGEajTn.js} +1 -1
  186. package/dist/assets/{VerifyDevice-B23jU0_c-B85D_w3i.js → VerifyDevice-B23jU0_c-Y4SYDFq4.js} +1 -1
  187. package/dist/assets/{VideoPlayer-CylTUX4X-BEZtED7z.js → VideoPlayer-CylTUX4X-DSxfswME.js} +1 -1
  188. package/dist/assets/{VideoPopup-C9x0ntQ5-C94oLuE1.js → VideoPopup-C9x0ntQ5-BVA3i-oV.js} +1 -1
  189. package/dist/assets/{WarningsDrawerPage-DrjxA1t_-DrM3KM-2.js → WarningsDrawerPage-DrjxA1t_-BoFSpSiS.js} +1 -1
  190. package/dist/assets/{ZeniAccountDetailPage-B7aCx_qz-DMRHevfC.js → ZeniAccountDetailPage-B7aCx_qz-CIWx2G2v.js} +1 -1
  191. package/dist/assets/{ZeniAccountListViewPage-C2AHdlrD-DmjpZpES.js → ZeniAccountListViewPage-C2AHdlrD-C79um01B.js} +1 -1
  192. package/dist/assets/{ZeniAccountNavBarPieces-AwdFLryC-S89TIuvH.js → ZeniAccountNavBarPieces-AwdFLryC-Jh4OQT7x.js} +1 -1
  193. package/dist/assets/{ZeniAccountPromoPage-c0ITsnMc-BxSMGlkl.js → ZeniAccountPromoPage-c0ITsnMc-B2My929b.js} +1 -1
  194. package/dist/assets/{ZeniAccountSetupPage-BE975QGg-DFrCRSD2.js → ZeniAccountSetupPage-BE975QGg-D-DppFIe.js} +1 -1
  195. package/dist/assets/{ZeniCopyright-eB9rNuZ3-BNyg83Vo.js → ZeniCopyright-eB9rNuZ3-cNG8Rw7j.js} +1 -1
  196. package/dist/assets/{ZeniTransferAmountSlider-CMYjwzsb--Afhr34i.js → ZeniTransferAmountSlider-CMYjwzsb-D5scnWJV.js} +1 -1
  197. package/dist/assets/{analyticsHelper-CLY1vV_E-BemgqSJF.js → analyticsHelper-CLY1vV_E-BwSnChaf.js} +1 -1
  198. package/dist/assets/{analyticsHelper-D-tLilsz.js → analyticsHelper-fz25hsmq.js} +1 -1
  199. package/dist/assets/{chartTypes-BjaXr-A2-DXtLo4Yx.js → chartTypes-BjaXr-A2-D3DBmfud.js} +1 -1
  200. package/dist/assets/{commonDimensions-C0X17W9N-BSrHO4N_.js → commonDimensions-C0X17W9N-CR9paNIq.js} +1 -1
  201. package/dist/assets/{commonTypes-BN7Uh_8W-pfbkHgmN.js → commonTypes-BN7Uh_8W-BM1Dtb_1.js} +1 -1
  202. package/dist/assets/{detailCommon-D9PsnkY1-BuBcpPrC.js → detailCommon-D9PsnkY1-D9_PN47h.js} +1 -1
  203. package/dist/assets/{downloadPdf-DE7Hd8jE-DAbFGRh1.js → downloadPdf-DE7Hd8jE-BAK9xguG.js} +1 -1
  204. package/dist/assets/{index-CRNmezJu.js → index-e-SZUuyN.js} +5 -5
  205. package/dist/assets/{mapLoadingInProgressToTreeNode-C4CzR5xS-Cg81Asz9.js → mapLoadingInProgressToTreeNode-C4CzR5xS-BKTQHVzy.js} +1 -1
  206. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-4MBuc1Sm-B6R5EAwN.js → mapSectionWithAcOnlyToTreeNode-4MBuc1Sm-CE09aSrt.js} +1 -1
  207. package/dist/assets/{mapSpacerToTreeNode-hZvWCXjA-CuA0QfzK.js → mapSpacerToTreeNode-hZvWCXjA-hu7JWeUA.js} +1 -1
  208. package/dist/assets/{mapTimeframeBalancesToTreeNode-CHvIKq5Y-CV_qZTRk.js → mapTimeframeBalancesToTreeNode-CHvIKq5Y-DtuP5OpB.js} +1 -1
  209. package/dist/assets/{mapTimeframeBalancesToTreeNode-D4r2BVXx-DnEFsarG.js → mapTimeframeBalancesToTreeNode-D4r2BVXx-BgK_pIe_.js} +1 -1
  210. package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-nP8CDp4j-BxTMyk7D.js → mapTimeframeHeaderLoadingInProgressToTreeNode-nP8CDp4j-H65zpMKu.js} +1 -1
  211. package/dist/assets/{toCOABalancesWithID-DPAmy3GS-lyRBWxwk.js → toCOABalancesWithID-DPAmy3GS-PiTKgxz9.js} +1 -1
  212. package/dist/assets/{toChartData-D5QdTlGa-DOsyIRYt.js → toChartData-D5QdTlGa-DLv4zZlP.js} +1 -1
  213. package/dist/assets/{uploadAttachment-BLADYUsp-BO1TVLxu.js → uploadAttachment-BLADYUsp-CuyJL9Ae.js} +1 -1
  214. package/dist/assets/{uploadReceipts-CLN2DLHQ-CHihhpL-.js → uploadReceipts-CLN2DLHQ-BcmoXhPJ.js} +1 -1
  215. package/dist/index.html +1 -1
  216. package/package.json +1 -1
  217. package/dist/assets/CustomerOnboardingContainerPage-CtySgp6R-CAM0wcfl.js +0 -1
@@ -1,4 +1,4 @@
1
- import{y as W,c as L,e as M,J as G,O as U,a9 as J,aR as K,aK as X,cF as H,V as r,bC as Q,ac as Y,aS as Z,o as b,g6 as ee}from"./index-CRNmezJu.js";import{a as T}from"./sentry-Dla7mstv.js";import{n as c}from"./mui-mhzAEcDs.js";import{b as ae,f as te,o as B,l as C}from"./FollowStepsSection-BGZ3rzSO-DAxx1unm.js";import"./liveblocks-BKvkleJ3.js";import"./core-hVMF2uNa.js";import"./recharts-BErFcng5.js";import"./zeni-epic-state-CSmiPBaP.js";import"./lottie-N_bekW9H.js";import"./analytics-g5EpLRud.js";import"./lexical-DYQnWL1V.js";import"./utils-D6NmQd1Q.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="37969a27-c0a2-4077-a19f-3ca264e2562d",e._sentryDebugIdIdentifier="sentry-dbid-37969a27-c0a2-4077-a19f-3ca264e2562d")}catch{}})();const _="reimbursementApprovalRuleDetailPage",k="lowerBound",j="upperBound",I="steps",h="applyToExistingReimbursements",le={footerPadding:new W(L[2],L[3])};function Re({localData:e,approvalUpdateActionType:t,isLowerBoundDisabled:a=!1,isUpperBoundDisabled:o=!0,hideUpperBoundField:s=!1,onBackClick:p,onApprovalRuleDataUpdated:g,onResetClick:E,onSaveRuleClick:N,onSaveRuleSuccess:A}){const V=M(),S=G(),l=U.getLocalizedStrings().commonSetUp.approval,w=U.getLocalizedStrings().spendManagement.reimbursement.reimbursementApproval,x=re(e,t==="approval_create"&&!a),y=J({mode:"all",reValidateMode:"onChange",defaultValues:x}),u=e.remiSetupApproverViewUpdateData?.updateStatus,R=K(u?.fetchState),{upperBound:P}=x,{allApprovalRules:i,allAccountingClasses:F,remiSetupApproverViewUpdateData:m}=e;let f=i.length>1?i.length-1:0,v=i.length>0?i[f].criteria[0].range.min.amount:0;if(m!=null&&m.type==="approval_update"&&m.data!=null){const{approvalRuleId:n}=m.data;f=i.findIndex(d=>d.approvalRuleId===n),v=f>0?i[f-1].criteria[0].range.min.amount:0}const O=y.handleSubmit(()=>{N()}),q=async(n,d)=>{g(d)};return T.useEffect(()=>{const n=y.watch((d,{name:D})=>{if(D!=null&&d!=null){const z=X(d);H(()=>q(D,z))}});return()=>{n.unsubscribe()}}),T.useEffect(()=>{R==="In-Progress"&&u?.fetchState==="Completed"&&A()},[R,u?.fetchState,A]),r.jsxs(ie,{children:[r.jsx(Q,{title:t==="approval_create"?l.newApproval:l.editApproval,backgroundColor:V.colors.grey4,style:{zIndex:4},onBackClick:()=>{p()},source:"ReimbursementApprovalRuleDetailPage"}),r.jsx(de,{children:r.jsxs(Y,{...y,children:[r.jsx(ue,{children:r.jsx("form",{id:$(_),onSubmit:O,children:r.jsxs(pe,{children:[r.jsx(ae,{label:{label:s?w.amountPerRemiGreaterLabel:w.amountPerRemiLabel},firstText:{type:"number",name:k,placeholder:"$0",options:{required:!0,max:P===1/0?Number.MAX_SAFE_INTEGER-1:P-1,min:v,validate:n=>a?!0:n!=null&&n>v},isDisabled:a,additionalInfoLabel:l.firstRuleLowerBoundInfoLabel,additionalErrorLabel:l.firstRuleErrorInfoLabel},secondText:{type:"number",name:j,placeholder:"Infinity",isDisabled:o,hideField:s,additionalInfoLabel:l.upperBoundInfoLabel}}),r.jsx(ce,{}),r.jsx(te,{sectionId:I,label:{label:l.followStepsLabel},approversPlaceholder:l.approversPlaceholder,notifiersPlaceholder:l.notifiersPlaceholder,allUserWithRoles:e.allApprovers,filteredApprovers:e.filteredApprovers.map(n=>n.user),allAttributes:e.allAttributes,filteredAttributes:e.filteredAttributes,allAccountingClasses:F,stepsInfo:x[I],userSelectPlaceholder:l.userSelectPlaceholder,approveNotifyPlaceholder:l.approveNotifyPlaceholder,productType:"zeni_reimbursements"})]})})}),r.jsx(Z,{formId:$(_),primaryBtn:{label:l.saveBtnText,isLoading:u?.fetchState==="In-Progress",isDisabled:u?.fetchState==="In-Progress",style:{width:"85px",minWidth:"auto"}},topComponent:t==="approval_create"?null:r.jsx(ee,{name:h,mode:"always_on",checkBoxes:[{value:h,label:l.applyToExistingReimbursements,defaultChecked:!0,groupLabel:!1}],style:{width:"100%"}}),showCancel:!0,cancelBtn:{label:l.cancelBtnText,isLoading:!1,style:{width:"85px",minWidth:"auto"},onClick:E},containerStyle:{justifyContent:S==="small"?"space-between":"center"},style:{padding:le.footerPadding.valuePx(S)},separatorStyle:{marginRight:b.sp4}})]})})]})}const re=(e,t)=>{const{criteria:a,steps:o}=e.remiSetupApproverViewUpdateData?.data??{};return{[h]:[h],[I]:oe(e.allApprovers.map(s=>s.user),e.filteredApprovers.map(s=>s.user),B(e.allAttributes),B(e.filteredAttributes),o??[])??[],[k]:t?void 0:a!=null?a.range.min.amount??0:0,[j]:a!=null?a.range.max==null?1/0:a.range.max.amount:1/0}},oe=(e,t,a,o,s)=>s&&s.length>0?s.map((p,g)=>({stepIndex:g,stepType:{selectedOption:p.action,allOptions:C},actors:{allUsers:t,selectedUsers:se(e,p.actors),allNonUsers:o,selectedNonUsers:ne(a,p.actors)}})):[{stepIndex:0,stepType:{selectedOption:"require_approval",allOptions:C},actors:{allUsers:t,selectedUsers:[],allNonUsers:o,selectedNonUsers:[]}}],se=(e,t)=>e.filter(a=>a.userId!=null&&t.findIndex(o=>o.userId===a.userId)>-1),ne=(e,t)=>e.filter(a=>t.findIndex(o=>o.subType===a.value)>-1),$=e=>`${e}_form`,Pe=e=>`${e}`,ie=c.div`
1
+ import{y as W,c as L,e as M,J as G,O as U,a9 as J,aR as K,aK as X,cF as H,V as r,bC as Q,ac as Y,aS as Z,o as b,g6 as ee}from"./index-e-SZUuyN.js";import{a as T}from"./sentry-Dla7mstv.js";import{n as c}from"./mui-mhzAEcDs.js";import{b as ae,f as te,o as B,l as C}from"./FollowStepsSection-BGZ3rzSO-DZqA0Ls-.js";import"./liveblocks-BKvkleJ3.js";import"./core-hVMF2uNa.js";import"./recharts-BErFcng5.js";import"./zeni-epic-state-CSmiPBaP.js";import"./lottie-N_bekW9H.js";import"./analytics-g5EpLRud.js";import"./lexical-DYQnWL1V.js";import"./utils-D6NmQd1Q.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="37969a27-c0a2-4077-a19f-3ca264e2562d",e._sentryDebugIdIdentifier="sentry-dbid-37969a27-c0a2-4077-a19f-3ca264e2562d")}catch{}})();const _="reimbursementApprovalRuleDetailPage",k="lowerBound",j="upperBound",I="steps",h="applyToExistingReimbursements",le={footerPadding:new W(L[2],L[3])};function Re({localData:e,approvalUpdateActionType:t,isLowerBoundDisabled:a=!1,isUpperBoundDisabled:o=!0,hideUpperBoundField:s=!1,onBackClick:p,onApprovalRuleDataUpdated:g,onResetClick:E,onSaveRuleClick:N,onSaveRuleSuccess:A}){const V=M(),S=G(),l=U.getLocalizedStrings().commonSetUp.approval,w=U.getLocalizedStrings().spendManagement.reimbursement.reimbursementApproval,x=re(e,t==="approval_create"&&!a),y=J({mode:"all",reValidateMode:"onChange",defaultValues:x}),u=e.remiSetupApproverViewUpdateData?.updateStatus,R=K(u?.fetchState),{upperBound:P}=x,{allApprovalRules:i,allAccountingClasses:F,remiSetupApproverViewUpdateData:m}=e;let f=i.length>1?i.length-1:0,v=i.length>0?i[f].criteria[0].range.min.amount:0;if(m!=null&&m.type==="approval_update"&&m.data!=null){const{approvalRuleId:n}=m.data;f=i.findIndex(d=>d.approvalRuleId===n),v=f>0?i[f-1].criteria[0].range.min.amount:0}const O=y.handleSubmit(()=>{N()}),q=async(n,d)=>{g(d)};return T.useEffect(()=>{const n=y.watch((d,{name:D})=>{if(D!=null&&d!=null){const z=X(d);H(()=>q(D,z))}});return()=>{n.unsubscribe()}}),T.useEffect(()=>{R==="In-Progress"&&u?.fetchState==="Completed"&&A()},[R,u?.fetchState,A]),r.jsxs(ie,{children:[r.jsx(Q,{title:t==="approval_create"?l.newApproval:l.editApproval,backgroundColor:V.colors.grey4,style:{zIndex:4},onBackClick:()=>{p()},source:"ReimbursementApprovalRuleDetailPage"}),r.jsx(de,{children:r.jsxs(Y,{...y,children:[r.jsx(ue,{children:r.jsx("form",{id:$(_),onSubmit:O,children:r.jsxs(pe,{children:[r.jsx(ae,{label:{label:s?w.amountPerRemiGreaterLabel:w.amountPerRemiLabel},firstText:{type:"number",name:k,placeholder:"$0",options:{required:!0,max:P===1/0?Number.MAX_SAFE_INTEGER-1:P-1,min:v,validate:n=>a?!0:n!=null&&n>v},isDisabled:a,additionalInfoLabel:l.firstRuleLowerBoundInfoLabel,additionalErrorLabel:l.firstRuleErrorInfoLabel},secondText:{type:"number",name:j,placeholder:"Infinity",isDisabled:o,hideField:s,additionalInfoLabel:l.upperBoundInfoLabel}}),r.jsx(ce,{}),r.jsx(te,{sectionId:I,label:{label:l.followStepsLabel},approversPlaceholder:l.approversPlaceholder,notifiersPlaceholder:l.notifiersPlaceholder,allUserWithRoles:e.allApprovers,filteredApprovers:e.filteredApprovers.map(n=>n.user),allAttributes:e.allAttributes,filteredAttributes:e.filteredAttributes,allAccountingClasses:F,stepsInfo:x[I],userSelectPlaceholder:l.userSelectPlaceholder,approveNotifyPlaceholder:l.approveNotifyPlaceholder,productType:"zeni_reimbursements"})]})})}),r.jsx(Z,{formId:$(_),primaryBtn:{label:l.saveBtnText,isLoading:u?.fetchState==="In-Progress",isDisabled:u?.fetchState==="In-Progress",style:{width:"85px",minWidth:"auto"}},topComponent:t==="approval_create"?null:r.jsx(ee,{name:h,mode:"always_on",checkBoxes:[{value:h,label:l.applyToExistingReimbursements,defaultChecked:!0,groupLabel:!1}],style:{width:"100%"}}),showCancel:!0,cancelBtn:{label:l.cancelBtnText,isLoading:!1,style:{width:"85px",minWidth:"auto"},onClick:E},containerStyle:{justifyContent:S==="small"?"space-between":"center"},style:{padding:le.footerPadding.valuePx(S)},separatorStyle:{marginRight:b.sp4}})]})})]})}const re=(e,t)=>{const{criteria:a,steps:o}=e.remiSetupApproverViewUpdateData?.data??{};return{[h]:[h],[I]:oe(e.allApprovers.map(s=>s.user),e.filteredApprovers.map(s=>s.user),B(e.allAttributes),B(e.filteredAttributes),o??[])??[],[k]:t?void 0:a!=null?a.range.min.amount??0:0,[j]:a!=null?a.range.max==null?1/0:a.range.max.amount:1/0}},oe=(e,t,a,o,s)=>s&&s.length>0?s.map((p,g)=>({stepIndex:g,stepType:{selectedOption:p.action,allOptions:C},actors:{allUsers:t,selectedUsers:se(e,p.actors),allNonUsers:o,selectedNonUsers:ne(a,p.actors)}})):[{stepIndex:0,stepType:{selectedOption:"require_approval",allOptions:C},actors:{allUsers:t,selectedUsers:[],allNonUsers:o,selectedNonUsers:[]}}],se=(e,t)=>e.filter(a=>a.userId!=null&&t.findIndex(o=>o.userId===a.userId)>-1),ne=(e,t)=>e.filter(a=>t.findIndex(o=>o.subType===a.value)>-1),$=e=>`${e}_form`,Pe=e=>`${e}`,ie=c.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  flex-direction: column;
@@ -1,4 +1,4 @@
1
- import{e as N,J as A,O as S,V as t,bC as M,T as E,aQ as j,o,y as i,al as z,aO as k,cp as H,cq as V,cr as F,c$ as G,c as l,ba as U,F as T,b9 as q,p as P,c_ as J,bu as O,b as K}from"./index-CRNmezJu.js";import{n as r}from"./mui-mhzAEcDs.js";import{a as Q}from"./sentry-Dla7mstv.js";import"./liveblocks-BKvkleJ3.js";import"./core-hVMF2uNa.js";import"./recharts-BErFcng5.js";import"./zeni-epic-state-CSmiPBaP.js";import"./lottie-N_bekW9H.js";import"./analytics-g5EpLRud.js";import"./lexical-DYQnWL1V.js";import"./utils-D6NmQd1Q.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},m=new e.Error().stack;m&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[m]="c6814c0c-83a3-4333-ad92-f9732812b22f",e._sentryDebugIdIdentifier="sentry-dbid-c6814c0c-83a3-4333-ad92-f9732812b22f")}catch{}})();const s={sectionWidth:new i(343,580,726),ruleWrapperPadding:new i(l[3],l[4]),wrapperGap:new i(l[4],l[3]),wrapperMarginBottom:new i(l[6],l[8]),lastWrapperMarginBottom:new i(l[5],l[9]),stepperWidthHeight:new i(20,l[5]),stepperItemLeft:new i(-29,-23),stepperItemTop:new i(2,l[0]),stepperItemPaddingLeft:new i(l[0],10),stepperItemMinHeight:new i(22,28),stepperLeft:new i(11,17),stepperTop:new i(2,l[0]),stepperContentTop:new i(l[0],-4)},W={stepper:new T("smallRegular","standardRegular"),amount:new T("standardRegular","largeRegular")},Y=({showDeleteBtn:e=!1,isLastSection:m=!1,approvalRule:u,onEditRuleClick:b,onDeleteRuleClick:v})=>{const[w,c]=Q.useState(!1),a=A(),{range:d}=u.criteria[0],{steps:g,approvalRuleId:x}=u,n=S.getLocalizedStrings().commonSetUp.approval,f=()=>{c(!0)},y={onOkClick:()=>{c(!1),v?.(x)},onCancelClick:()=>{c(!1)}};return t.jsxs(Z,{windowSize:a,isLastSection:m,"data-testid":j("approval-rule-section",x),children:[t.jsxs(X,{windowSize:a,children:[t.jsxs(ne,{children:[t.jsxs(L,{windowSize:a,children:[n.from," ",k("0,0",d.min)]}),t.jsxs(ee,{children:[t.jsx(C,{}),t.jsx(te,{}),t.jsx(C,{})]}),d.max==null?t.jsx(ce,{}):t.jsx(L,{windowSize:a,children:k("0,0",{...d.min,amount:d.max.amount})})]}),t.jsxs(ae,{className:"icons",children:[e?t.jsx(pe,{onClick:f}):null,t.jsx(de,{onClick:()=>{b(x)},"data-testid":j("edit-approval-rule",x)})]})]}),t.jsx(oe,{windowSize:a,children:t.jsx(re,{isSingleStep:g.length===1,windowSize:a,children:g.map((h,D)=>t.jsxs(ie,{isSingleStep:g.length===1,className:"stepperItem",windowSize:a,children:[h.action==="require_approval"?t.jsx(le,{children:n.requireText}):t.jsx(se,{children:n.notifyText}),h.nonUserActors.filter(p=>p.subType!=null).map((p,_)=>t.jsxs(B,{children:[t.jsx(I,{children:p.subType!=null?n.nonUsers[p.subType].label:null}),h.operator!="is"?t.jsx(R,{className:"operator",children:h.operator}):null]},`${p.subType}_${_}`)),h.actors.map(p=>t.jsxs(B,{children:[t.jsxs(I,{children:[p.firstName," ",p.lastName]}),h.operator!="is"?t.jsx(R,{className:"operator",children:h.operator}):null]},p.userId))]},D))})}),w?t.jsx(H,{titleComponent:t.jsx(F,{children:n.deleteApprovalRuleTitle}),descriptionComponent:t.jsx(V,{children:n.deleteApprovalRuleDesc}),primaryButtonText:n.deleteTxt,proceedButtonVariant:"danger",secondaryButtonText:n.cancelBtnText,action:y}):null]})},Z=r.div`
1
+ import{e as N,J as A,O as S,V as t,bC as M,T as E,aQ as j,o,y as i,al as z,aO as k,cp as H,cq as V,cr as F,c$ as G,c as l,ba as U,F as T,b9 as q,p as P,c_ as J,bu as O,b as K}from"./index-e-SZUuyN.js";import{n as r}from"./mui-mhzAEcDs.js";import{a as Q}from"./sentry-Dla7mstv.js";import"./liveblocks-BKvkleJ3.js";import"./core-hVMF2uNa.js";import"./recharts-BErFcng5.js";import"./zeni-epic-state-CSmiPBaP.js";import"./lottie-N_bekW9H.js";import"./analytics-g5EpLRud.js";import"./lexical-DYQnWL1V.js";import"./utils-D6NmQd1Q.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},m=new e.Error().stack;m&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[m]="c6814c0c-83a3-4333-ad92-f9732812b22f",e._sentryDebugIdIdentifier="sentry-dbid-c6814c0c-83a3-4333-ad92-f9732812b22f")}catch{}})();const s={sectionWidth:new i(343,580,726),ruleWrapperPadding:new i(l[3],l[4]),wrapperGap:new i(l[4],l[3]),wrapperMarginBottom:new i(l[6],l[8]),lastWrapperMarginBottom:new i(l[5],l[9]),stepperWidthHeight:new i(20,l[5]),stepperItemLeft:new i(-29,-23),stepperItemTop:new i(2,l[0]),stepperItemPaddingLeft:new i(l[0],10),stepperItemMinHeight:new i(22,28),stepperLeft:new i(11,17),stepperTop:new i(2,l[0]),stepperContentTop:new i(l[0],-4)},W={stepper:new T("smallRegular","standardRegular"),amount:new T("standardRegular","largeRegular")},Y=({showDeleteBtn:e=!1,isLastSection:m=!1,approvalRule:u,onEditRuleClick:b,onDeleteRuleClick:v})=>{const[w,c]=Q.useState(!1),a=A(),{range:d}=u.criteria[0],{steps:g,approvalRuleId:x}=u,n=S.getLocalizedStrings().commonSetUp.approval,f=()=>{c(!0)},y={onOkClick:()=>{c(!1),v?.(x)},onCancelClick:()=>{c(!1)}};return t.jsxs(Z,{windowSize:a,isLastSection:m,"data-testid":j("approval-rule-section",x),children:[t.jsxs(X,{windowSize:a,children:[t.jsxs(ne,{children:[t.jsxs(L,{windowSize:a,children:[n.from," ",k("0,0",d.min)]}),t.jsxs(ee,{children:[t.jsx(C,{}),t.jsx(te,{}),t.jsx(C,{})]}),d.max==null?t.jsx(ce,{}):t.jsx(L,{windowSize:a,children:k("0,0",{...d.min,amount:d.max.amount})})]}),t.jsxs(ae,{className:"icons",children:[e?t.jsx(pe,{onClick:f}):null,t.jsx(de,{onClick:()=>{b(x)},"data-testid":j("edit-approval-rule",x)})]})]}),t.jsx(oe,{windowSize:a,children:t.jsx(re,{isSingleStep:g.length===1,windowSize:a,children:g.map((h,D)=>t.jsxs(ie,{isSingleStep:g.length===1,className:"stepperItem",windowSize:a,children:[h.action==="require_approval"?t.jsx(le,{children:n.requireText}):t.jsx(se,{children:n.notifyText}),h.nonUserActors.filter(p=>p.subType!=null).map((p,_)=>t.jsxs(B,{children:[t.jsx(I,{children:p.subType!=null?n.nonUsers[p.subType].label:null}),h.operator!="is"?t.jsx(R,{className:"operator",children:h.operator}):null]},`${p.subType}_${_}`)),h.actors.map(p=>t.jsxs(B,{children:[t.jsxs(I,{children:[p.firstName," ",p.lastName]}),h.operator!="is"?t.jsx(R,{className:"operator",children:h.operator}):null]},p.userId))]},D))})}),w?t.jsx(H,{titleComponent:t.jsx(F,{children:n.deleteApprovalRuleTitle}),descriptionComponent:t.jsx(V,{children:n.deleteApprovalRuleDesc}),primaryButtonText:n.deleteTxt,proceedButtonVariant:"danger",secondaryButtonText:n.cancelBtnText,action:y}):null]})},Z=r.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: ${e=>s.wrapperGap.valuePx(e.windowSize)};
@@ -1,4 +1,4 @@
1
- import{ax as Mt,a8 as Rt,J as Pt,e as Bt,cd as Nt,y as m,O as et,gh as Lt,gj as _t,gk as Ot,V as t,cp as Ae,cq as Me,cr as Re,bC as Pe,aQ as y,bp as Wt,du as Et,gl as Ft,gw as Be,o as a,gm as Ne,fh as b,gp as w,fk as x,aO as Le,fg as _e,b as V,gr as Oe,aS as Kt,ao as Ut,gs as Vt,gt as re,by as Ht,gu as Gt,x as Jt,F as qt,M as Yt,al as tt,ba as it,p as H,am as Zt,bV as Qt,ai as Xt,gO as ei,gK as ti,c,ci as ii,cZ as ai}from"./index-CRNmezJu.js";import{a as p}from"./sentry-Dla7mstv.js";import{n as r}from"./mui-mhzAEcDs.js";import{a as ri}from"./liveblocks-BKvkleJ3.js";import{bL as oi,bP as ni,FH as li}from"./zeni-epic-state-CSmiPBaP.js";import si from"./InvoiceUploadSection-7NLq2wUY-qezR9Z74.js";import{r as di,h as f,u as ci}from"./types-DyvtCprH-NFPm5TaG.js";import"./core-hVMF2uNa.js";import"./lottie-N_bekW9H.js";import"./recharts-BErFcng5.js";import"./analytics-g5EpLRud.js";import"./lexical-DYQnWL1V.js";import"./utils-D6NmQd1Q.js";import"./AttachmentView-CHgDKLit-BOkUOxft.js";import"./uploadReceipts-CLN2DLHQ-CHihhpL-.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},C=new e.Error().stack;C&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[C]="c1d84189-bb9f-4676-ab3c-862d11640ea7",e._sentryDebugIdIdentifier="sentry-dbid-c1d84189-bb9f-4676-ab3c-862d11640ea7")}catch{}})();const s={labelWidth:new m(120,160,160),largeLabelWidth:new m(150,235,235),rightMargin:new m(c[3],c[8]),leftMargin:new m(c[3],c[6]),invoiceRightMargin:new m(c[3],c[6]),invoiceLeftMargin:new m(c[3],c[8]),topMargin:new m(c[3],0),bottomMargin:new m(c[4],27),activityBottomMargin:new m(96,0),totalBottomMargin:new m(c[5],c[3]),formBottomMargin:new m(c[5],c[3]),navBarHeight:new m(44,62),closeMarginTop:new m(0,0),rightSectionWidth:new m(100,58),leftSectionWidth:new m(100,42),footerButtonWidth:new m(120,165),right:new m(c[3],c[0]),actionsContainerRight:new m(c[0],c[6]),otherActionsContainerBottom:new m(58,44),duplicateBannerWrapperMarginTop:new m(c[5],c[3]),duplicateBannerWrapperMarginRight:new m(c[3],c[8]),duplicateBannerWrapperMarginBottom:new m(c[5],c[3]),duplicateBannerWrapperMarginLeft:new m(c[3],c[6])},mi={formTitle:new qt("h6Regular","h5Regular")},sa=({remiDetails:e,uploadInvoiceEndPoint:C,authParams:ne,isAdmin:le,signedInUser:se,showApproveRejectBtns:de,isRealTimeApprovalEnabled:ce,isReimbursementCommentingEnabled:u,isShowDeletedReimbursementEnabled:me,isSignedInUserReimbursementCreator:at,updateEditRealTimeApproverClicked:pe,onSaveRealTimeApprovals:ue,redirectToReimbursementListScreen:G,redirectToEditableReimbursementScreen:rt,onDuplicateLineClick:ot,approveOrRejectRemi:he,deleteReimbursement:nt,cancelAndDeleteReport:ye,handleZeniLogoClick:lt,onAddNewRule:ge,initialOpenThreadRequest:z})=>{const d=Mt(),st=Rt().analytics,o=Pt(),be=Bt(),[dt,A]=p.useState(!1),[J,q]=p.useState(!1),[ct,Y]=p.useState(!1),[Z,Q]=p.useState("approved"),N=p.useRef(null),[j,X]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[k,mt]=p.useState(null),[pt,L]=p.useState(!1),h=`dashboard_${d.currentTenant?.companyId}`,we=p.useRef({}),xe=l=>{const n=we.current[l];n!=null&&setTimeout(()=>ci(n,N.current),100)};p.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed")&&G()},[e,G]),p.useEffect(()=>{const l=window.location.hash;if(l&&l.startsWith("#L")){const n=l.substring(1);xe(n)}},[]);const ut=()=>{G()};Nt({componentName:"reimbursement.details"});const ht={onOkClick:()=>{A(!1),j.primaryButtonText===i.buttons.delete?nt?.():j.title===i.cancelReportTitle?ye?.():j.title===i.cancelAndDeleteReportTitle&&ye?.(!0)},onCancelClick:()=>{A(!1)}},I=s.labelWidth.value(o),M=s.largeLabelWidth.value(o),fe=et.getLocalizedStrings(),{common:{texts:{comments:yt},strings:{empty:ve}},collaboration:{threads:{placeholder:{addANewComment:gt,replyAComment:bt},tooltip:{resolveComment:wt,unResolveComment:xt}}},dateFormat:$e}=fe,{reimbursementDetail:i,bulkActions:_}=fe.spendManagement.reimbursement,ee=e.remiDetails?.reportTitle,S=e.remiDetails?.lines??[],O=e.remiDetails?.reimbursementInfo.stage,W=e.remiDetails?.reimbursementInfo.billStatus,E=e.remiDetails?.reimbursementInfo.billPaymentStatus,Te=O?.code==="paid",ft=Te?O:W?.code=="approved"&&E?.code?E:W,v=pi(e.remiDetails),R=W?.code=="approved"&&E?.code?E:W,F=e.remiDetails?.isDeleted??!1,Se=e.remiDetails?.amount,je=e.remiDetails?.amount.amount??0,Ie=()=>{X({title:e.remiDetails?.reimbursementInfo.stage.code==="draft"?i.deleteDraftTitle:i.deleteReportTitle,description:i.deleteAlertDescription,primaryButtonText:i.buttons.delete,secondaryButtonText:i.buttons.cancel}),A(!0)},vt=()=>{X({title:i.cancelReportTitle,description:i.cancelAlertDescription,primaryButtonText:i.buttons.yes,secondaryButtonText:i.buttons.no}),A(!0)},$t=()=>{X({title:i.cancelAndDeleteReportTitle,description:i.cancelAndDeleteAlertDescription,primaryButtonText:i.buttons.yes,secondaryButtonText:i.buttons.no}),A(!0)},De=()=>{rt()},Tt={onOkClick:l=>{Y(!1),he({reimbursementId:e.remiDetails?.id??"",type:"rejected",description:l})},onCancelClick:()=>{Y(!1)}},St=()=>{e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"?De():(Q("approved"),he({reimbursementId:e.remiDetails?.id??"",type:"approved"}))},jt=()=>{e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"?(Q("delete"),Ie()):(Q("rejected"),Y(!0))},It=e.remiDetails?.reimbursementInfo.paymentDate!=null?oi(ni(e.remiDetails.reimbursementInfo.paymentDate.toDate(),[0,6],e.achSameDayMaxDays).toDateString()):void 0,te=e.remiDetails?.reimbursementInfo.expectedDepositDate??It,Dt=e.remiDetails?.lines?.some(l=>{const n=l.lineDetail;return n?.account?.isDeleted===!0&&n?.account?.isBillEditableCoaAccountType===!1})??!1,Ce=e.remiDetails?.reimbursementInfo.billStatus.code==="pending_approval"&&at&&!Dt,Ct=e.remiDetails?.reimbursementInfo.billStatus.code!=="rejected"&&e.remiDetails?.reimbursementInfo.billPaymentStatus.code!=="paid",ie=ft?.code,kt=di(e.duplicateLineByLineId),ke=e.duplicateReimbursementStatus.fetchState==="Completed"&&kt>0,{requestToOpenThread:ae,setRequestToOpenThread:K,setOpenThread:U}=p.useContext(Lt);p.useEffect(()=>{z?.threadId!=null&&z?.companyId!=null&&z?.entityType!=null&&K(z)},[z,K]);const{threads:P,isLoading:D}=_t({application:"dashboard",companyId:d.currentTenant?.companyId,tab:"reimbursement",entityId:e.remiDetails?.id,isGlobalComment:!1},"both",!1),zt=p.useMemo(()=>P.filter(l=>l.resolved===!1&&!l.id.includes(Ot)),[P]).length,At=p.useCallback((l,n)=>{U(n),L(!1)},[U,L]);p.useEffect(()=>{ae?.threadId!=null&&P.length>0&&!D&&(U(ae.threadId),K(null))},[ae,P,D,U,K]);const g={application:"dashboard",companyId:d.currentTenant?.companyId,tab:"reimbursement",entityId:e.remiDetails?.id},B=li(e.remiDetails?.bulkProcessingDetail?.type);return t.jsxs(Oi,{windowSize:o,ref:N,children:[dt?t.jsx(Ae,{titleComponent:t.jsx(Re,{children:j.title}),descriptionComponent:t.jsx(Me,{children:j.description}),primaryButtonText:j.primaryButtonText,proceedButtonVariant:"danger",secondaryButtonText:j.secondaryButtonText,action:ht}):null,ct?t.jsx(Ae,{titleComponent:t.jsx(Re,{children:`${i.rejectRemiTitlePrefix} ${e.remiDetails?.reportTitle??""} by ${e.createdBy?.firstName??""} ${e.createdBy?.lastName??""}`}),descriptionComponent:t.jsx(Me,{children:i.rejectRemiDescription}),primaryButtonText:i.buttons.send,secondaryButtonText:i.buttons.cancel,action:Tt,isEditPopup:!0,isNotesIncluded:!0,notesPlaceholder:i.rejectRejectReasonPlaceholder}):null,t.jsxs(Mi,{windowSize:o,"data-testid":y("reimbursement-detail-page-nav-bar-container"),children:[o!=="small"?t.jsx(Pe,{"data-testid":y("reimbursement-detail-page-nav-bar-left"),style:{width:"42%"},title:"",leftSideComponent:t.jsx(Ri,{onClick:()=>lt?.(),"data-testid":y("remi-detail-page-nav-bar-zeni-logo")}),enableTitleOnScroll:!1,backgroundColor:be.colors.background,keepBackgroundOnScroll:!0,scrollableContent:N,source:"ReimbursementDetailPage"}):null,o!=="small"?t.jsx(ki,{}):null,t.jsx(Pe,{"data-testid":y("reimbursement-detail-page-nav-bar-right"),title:ee??ve,leftSideComponent:t.jsx(t.Fragment,{}),style:{width:o!=="small"?"58%":"100%"},rightSideComponent:t.jsxs(Bi,{children:[u?t.jsxs(Ni,{isDisabled:D,onClick:D?()=>null:l=>{l.preventDefault(),l.stopPropagation(),mt({roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityType:"reimbursement.details",entityId:e.remiDetails?.id??""}),L(!0),st.trackCommentActivity("reimbursement","clicked",d.currentTenant?.companyName??"",d.controllersList.controllers.map(n=>Et(n)),void 0,void 0,"page icon")},"data-testid":y("remi-comments-section"),children:[t.jsx(Wt,{count:D?void 0:zt,isLoading:D,style:{left:"12px"}}),t.jsx(Li,{})]}):null,t.jsx(_i,{size:o,onClick:()=>ut(),"data-testid":y("remi-detail-page-close"),children:t.jsx(Pi,{})})]}),scrollableContent:N,enableTitleOnScroll:o!=="small",scrollThreshold:64,source:"ReimbursementDetailPage"})]}),t.jsxs(Hi,{children:[o==="small"?t.jsxs(t.Fragment,{children:[t.jsx(qe,{windowSize:o,children:t.jsx(Ye,{windowsSize:o,children:ee})}),e.createdBy?.userId!=null?t.jsx(Ve,{windowSize:o,children:`${i.by} ${e.createdBy.firstName} ${e.createdBy.lastName}`}):null,me&&v!=null?t.jsx(He,{color:v.color,bgColor:v.bgColor,borderColor:v.borderColor,children:v.value}):null,R?.code!=null?o==="small"?t.jsxs(t.Fragment,{children:[t.jsx(Ft,{progressSectionObj:R,createDate:e.remiDetails?.createTime,paymentDate:te,scheduleDate:e.remiDetails?.reimbursementInfo.paymentDate,approvedDate:e.latestApprovedDate,isFrozen:F}),B?t.jsx(Be,{variant:"warning",style:{margin:`${a.sp5} ${a.sp3}`},title:_.duplicateWarning.title,description:_.duplicateWarning.description}):ke?t.jsxs(We,{size:o,children:[t.jsx(Ue,{}),t.jsxs(Fe,{children:[t.jsx(Ee,{children:i.thereSeems}),t.jsx(Ke,{children:i.pleaseFind})]})]}):null]}):t.jsx(Je,{windowSize:o,children:t.jsx(Ne,{progressSectionObj:R,createDate:e.remiDetails?.createTime,paymentDate:te,scheduleDate:e.remiDetails?.reimbursementInfo.paymentDate,approvedDate:e.latestApprovedDate,isFrozen:F})}):null]}):null,S.map((l,n)=>{const $=e.duplicateLineByLineId[l.lineId];return t.jsxs(Xe,{windowSize:o,children:[t.jsx(Ki,{windowSize:o,children:t.jsx(Ui,{bottomSeperator:S.length!==1,windowSize:o,children:t.jsx(si,{showAutofill:!1,uploadInvoiceEndPoint:C,authParams:ne,entityId:e.remiDetails?.id,file:l.file,showTitlebar:!0,showTitlebarIcon:!1,pdfTitle:S.length>1?`#${n+1} Receipt`:"Receipt",style:{width:"auto",padding:0,height:S.length-1===n||n===0?760:451},onInvoiceUpload:()=>{console.log("onInvoiceUpload")},noAttachmentText:i.noReceiptAttached,type:"reimbursement"})})}),t.jsxs(Fi,{windowSize:o,children:[n===0&&o!=="small"?t.jsxs(t.Fragment,{children:[t.jsxs(qe,{windowSize:o,children:[t.jsx(Ye,{windowsSize:o,children:ee}),me&&v!=null?t.jsx(He,{color:v.color,bgColor:v.bgColor,borderColor:v.borderColor,children:v.value}):null]}),e.createdBy?.userId!=null?t.jsx(Ve,{windowSize:o,children:`By ${e.createdBy.firstName} ${e.createdBy.lastName}`}):null,R?.code!=null?t.jsx(Je,{windowSize:o,children:t.jsx(Ne,{progressSectionObj:R,createDate:e.remiDetails?.createTime,paymentDate:te,scheduleDate:e.remiDetails?.reimbursementInfo.paymentDate,approvedDate:e.latestApprovedDate,isFrozen:F})}):null,B?t.jsx(Be,{variant:"warning",style:{margin:`${a.sp3} ${a.sp8} ${a.sp3} ${a.sp6}`},title:_.duplicateWarning.title,description:_.duplicateWarning.description}):ke?t.jsxs(We,{size:o,children:[t.jsx(Ue,{}),t.jsxs(Fe,{children:[t.jsx(Ee,{children:i.thereSeems}),t.jsx(Ke,{children:i.pleaseFind})]})]}):null]}):null,t.jsxs(wi,{windowSize:o,ref:ze=>{ze!=null&&(we.current[`L${l.lineId}`]=ze)},children:[o!=="small"?t.jsx(bi,{children:t.jsx(xi,{children:S.length>1?`#${n+1} ${i.reimbursement}`:i.reimbursement})}):null,t.jsxs(fi,{windowSize:o,children:[$?.duplicateLineId!=null?t.jsxs(yi,{children:[i.thisExpenseReview," ",t.jsx(gi,{onClick:()=>{if($.isDuplicateWithinTransaction&&$.duplicateLineId!=null)return xe(`L${$.duplicateLineId}`);$.duplicateTransactionId!=null&&$.duplicateLineId!=null&&ot($.duplicateTransactionId,$.duplicateLineId)},"data-testid":y("remi-view-duplicate-expense"),children:i.viewOriginalExpense})]}):null,t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:l.type===i.mileageKey?`${n}.mileage.reimbursementType`:`${n}.out_of_pocket.reimbursementType`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("reimbursementType",n,l.type===i.mileageKey?"mileage":"out_of_pocket")}`},style:{borderRadius:$?.duplicateLineId==null?`${a.sp2} ${a.sp2} 0 0`:"0 0 0 0"},children:t.jsx(w,{label:{label:i.reimbursementType,width:M},text:l.type===i.mileageKey?i.mileage:i.outOfPocket,style:{width:"auto",borderRadius:$?.duplicateLineId==null?`${a.sp2} ${a.sp2} 0 0`:"0 0 0 0"}})}),t.jsx(T,{}),l.type===i.mileageKey?t.jsxs(t.Fragment,{children:[t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.mileage.transactionDate`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("transactionDate",n,"mileage")}`},children:t.jsx(w,{label:{label:i.transactionDate,width:M},text:l.transactionDate?.format($e.visual.MMMDCommaYYYYformat)??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.mileage.distanceInMiles`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("distanceInMiles",n,"mileage")}`},children:t.jsx(w,{label:{label:i.distanceInMiles,width:M},text:l.distanceMileage.value.toString()??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.mileage.amount`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("amount",n,"mileage")}`},children:t.jsx(w,{label:{label:i.amount,width:I},text:l.homeCurrencyConversions!=null?Le("0,0[.]00",l.homeCurrencyConversions):i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.mileage.memo`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("memo",n,"mileage")}`},children:t.jsx(w,{label:{label:i.memo,width:I},text:l.description??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.mileage.class`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("class",n,"mileage")}`},style:{borderRadius:`0 0 ${a.sp2} ${a.sp2}`},children:t.jsx(w,{label:{label:i.department,width:I},text:l.lineDetail.class?.className??i.emptyValue,style:{width:"auto",borderRadius:`0 0 ${a.sp2} ${a.sp2}`}})})]}):t.jsxs(t.Fragment,{children:[t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.out_of_pocket.merchant`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("merchant",n,"out_of_pocket")}`},children:t.jsx(w,{label:{label:i.merchant,width:M},text:l.merchant?.name??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.out_of_pocket.transactionDate`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("transactionDate",n,"out_of_pocket")}`},children:t.jsx(w,{label:{label:i.transactionDate,width:M},text:l.transactionDate?.format($e.visual.MMMDCommaYYYYformat)??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.out_of_pocket.amount`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("amount",n,"out_of_pocket")}`},children:t.jsx(w,{label:{label:i.amount,width:I},text:l.homeCurrencyConversions!=null?Le("0,0[.]00",l.homeCurrencyConversions):i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.out_of_pocket.memo`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("memo",n,"out_of_pocket")}`},children:t.jsx(w,{label:{label:i.memo,width:I},text:l.description??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.out_of_pocket.account`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("account",n,"out_of_pocket")}`},children:t.jsx(w,{label:{label:i.category,width:I},text:l.lineDetail.account?.accountName??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.out_of_pocket.class`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("class",n,"out_of_pocket")}`},style:{borderRadius:`0 0 ${a.sp2} ${a.sp2}`},children:t.jsx(w,{label:{label:i.department,width:I},text:l.lineDetail.class?.className??i.emptyValue,style:{width:"auto",borderRadius:`0 0 ${a.sp2} ${a.sp2}`}})})]})]})]}),S.length!==1&&S.length===n+1&&t.jsxs(Ei,{windowSize:o,children:[t.jsxs(Ze,{windowSize:o,children:[t.jsx(Qe,{children:i.total}),t.jsx(_e,{amount:Se,integerStyles:V.h6Regular.cssObject,decimalStyles:V.standardRegular.cssObject})]}),e.remiDetails&&t.jsx(Oe,{amount:je,activities:e.remiActivities,stage:O?.code??"draft",onAddNewRule:ge,entity:"reimbursement",realTimeApproval:{allApprovers:e.filteredApprovers,filteredAttributes:e.filteredAttributes,allAccountingClass:e.allAccountingClasses,isRealTimeApproverEditMode:e.realTimeApproval.isEditMode??!1,realTimeApprovalSaveStatus:{fetchState:e.realTimeApproval.fetchState,error:e.realTimeApproval.error},approvalListFetchState:e.approverListFetchState.fetchState,attributeSubTypeToUserIdMapping:e.attributeSubTypeToUserIdMapping,isAdmin:le,signedInUserId:se?.userId,showRealTimeApproval:ce,entityApprovalId:e.remiActivities[0]?.entityApprovalId??e.remiDetails.entityApprovalId,updateEditMode:pe,onSaveRealTimeApprovals:ue},historicActivities:e.remiHistory.activities})]})]})]},l.lineId)}),S.length===1&&t.jsxs(Xe,{windowSize:o,children:[t.jsx(Ge,{}),t.jsxs(ui,{windowSize:o,children:[t.jsx(Wi,{windowSize:o,children:t.jsxs(Ze,{windowSize:o,children:[t.jsx(Qe,{children:i.total}),t.jsx(_e,{amount:Se,integerStyles:V.h6Regular.cssObject,decimalStyles:V.standardRegular.cssObject})]})}),e.remiDetails&&t.jsx(hi,{windowSize:o,children:t.jsx(Oe,{amount:je,activities:e.remiActivities,stage:O?.code??"draft",onAddNewRule:ge,entity:"reimbursement",historicActivities:e.remiHistory.activities,realTimeApproval:{allApprovers:e.filteredApprovers,allAccountingClass:e.allAccountingClasses,filteredAttributes:e.filteredAttributes,isRealTimeApproverEditMode:e.realTimeApproval.isEditMode??!1,realTimeApprovalSaveStatus:{fetchState:e.realTimeApproval.fetchState,error:e.realTimeApproval.error},approvalListFetchState:e.approverListFetchState.fetchState,attributeSubTypeToUserIdMapping:e.attributeSubTypeToUserIdMapping,isAdmin:le,signedInUserId:se?.userId,showRealTimeApproval:ce,entityApprovalId:e.remiActivities[0]?.entityApprovalId??e.remiDetails.entityApprovalId,updateEditMode:pe,onSaveRealTimeApprovals:ue}})})]})]}),t.jsx(Vi,{})]}),Te||F===!0?null:t.jsxs(Ai,{children:[o!=="small"?t.jsx(Ge,{}):null,t.jsx($i,{windowSize:o,"data-testid":y("remi-detail-page-footer"),onClick:l=>{l.stopPropagation(),J===!0&&q(!1)},children:t.jsx(Kt,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"||de,showCancel:e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"||de,cancelBtn:{label:e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"?o==="small"?i.buttons.delete:i.buttons.deleteReport:o==="small"?i.buttons.reject:i.buttons.rejectReport,isLoading:Z==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress"||Z==="delete"&&e.deleteStatus.fetchState==="In-Progress",onClick:jt,style:{width:s.footerButtonWidth.value(o)},reverseSpinnerColor:!1},primaryBtn:{label:e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"?o==="small"?i.buttons.edit:i.buttons.editAndResubmit:o==="small"?i.buttons.approve:i.buttons.approveReport,isLoading:Z==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:St,style:{width:s.footerButtonWidth.value(o)},isDisabled:e.approvalUpdateStatus.fetchState==="In-Progress"||e.realTimeApproval.isEditMode===!0},rightSideComponent:t.jsx(vi,{children:t.jsxs(zi,{windowSize:o,children:[!B&&J?t.jsx(Ut,{onClickAway:()=>q(!1),children:t.jsxs(Ci,{windowSize:o,children:[ie!=="processing"?t.jsx(oe,{onClick:Ie,"data-testid":y("remi-delete-action"),children:i.buttons.deleteReport}):null,ie==="processing"?t.jsx(oe,{onClick:vt,"data-testid":y("remi-cancel-action"),children:i.buttons.cancel}):null,ie==="processing"?t.jsx(oe,{onClick:$t,"data-testid":y("remi-cancel-and-delete-action"),children:i.buttons.cancelAndDelete}):null]})}):null,t.jsxs(Di,{windowSize:o,children:[!B&&Ce?t.jsx(Ii,{onClick:De,"data-testid":y("remi-edit-button"),children:t.jsx(ji,{})}):null,!B&&Ct===!0?t.jsx(Si,{windowSize:o,showEditIcon:Ce,children:t.jsx(Ti,{onClick:()=>q(!J),"data-testid":y("remi-more-actions-button")})}):null]})]})}),style:{minHeight:62}})})]}),u?t.jsx(ri,{id:h,children:t.jsx(Vt,{isDrawerOpen:pt,allowComposer:!0,drawerTitle:yt,threads:P,autoExpand:!0,autoFocus:!1,filter:{application:"dashboard",companyId:k?.companyId??ve,isGlobalComment:!1,tab:"reimbursement"},isLoading:D,threadMetadata:k?{companyName:k.companyName,companyId:k.companyId,entityId:k.entityId,entityType:k.entityType,isGlobalComment:!1,application:"dashboard",tab:"reimbursement",url:window.location.href}:void 0,textOverrides:{composerPlaceholder:gt,replyComposerPlaceholder:bt,threadResolve:wt,threadUnResolve:xt},onThreadClick:(l,n)=>At(l,n),onCloseAllThreadsDrawer:()=>L(!1),drawerSectionStyle:{width:"400px",backgroundColor:be.colors.background}})}):null]})},pi=e=>{const C=et.getLocalizedStrings().spendManagement.billPay.billsByTabs;if(e?.isDeleted===!0)return{value:C.tabsById.deleted,color:re.deleted.color,bgColor:re.deleted.bgColor,borderColor:re.deleted.borderColor,code:"deleted"}},ui=r.div`
1
+ import{ax as Mt,a8 as Rt,J as Pt,e as Bt,cd as Nt,y as m,O as et,gh as Lt,gj as _t,gk as Ot,V as t,cp as Ae,cq as Me,cr as Re,bC as Pe,aQ as y,bp as Wt,du as Et,gl as Ft,gw as Be,o as a,gm as Ne,fh as b,gp as w,fk as x,aO as Le,fg as _e,b as V,gr as Oe,aS as Kt,ao as Ut,gs as Vt,gt as re,by as Ht,gu as Gt,x as Jt,F as qt,M as Yt,al as tt,ba as it,p as H,am as Zt,bV as Qt,ai as Xt,gO as ei,gK as ti,c,ci as ii,cZ as ai}from"./index-e-SZUuyN.js";import{a as p}from"./sentry-Dla7mstv.js";import{n as r}from"./mui-mhzAEcDs.js";import{a as ri}from"./liveblocks-BKvkleJ3.js";import{bL as oi,bP as ni,FH as li}from"./zeni-epic-state-CSmiPBaP.js";import si from"./InvoiceUploadSection-7NLq2wUY-D1Ujr_CT.js";import{r as di,h as f,u as ci}from"./types-DyvtCprH-NFPm5TaG.js";import"./core-hVMF2uNa.js";import"./lottie-N_bekW9H.js";import"./recharts-BErFcng5.js";import"./analytics-g5EpLRud.js";import"./lexical-DYQnWL1V.js";import"./utils-D6NmQd1Q.js";import"./AttachmentView-CHgDKLit-CNDwc0Eo.js";import"./uploadReceipts-CLN2DLHQ-BcmoXhPJ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},C=new e.Error().stack;C&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[C]="c1d84189-bb9f-4676-ab3c-862d11640ea7",e._sentryDebugIdIdentifier="sentry-dbid-c1d84189-bb9f-4676-ab3c-862d11640ea7")}catch{}})();const s={labelWidth:new m(120,160,160),largeLabelWidth:new m(150,235,235),rightMargin:new m(c[3],c[8]),leftMargin:new m(c[3],c[6]),invoiceRightMargin:new m(c[3],c[6]),invoiceLeftMargin:new m(c[3],c[8]),topMargin:new m(c[3],0),bottomMargin:new m(c[4],27),activityBottomMargin:new m(96,0),totalBottomMargin:new m(c[5],c[3]),formBottomMargin:new m(c[5],c[3]),navBarHeight:new m(44,62),closeMarginTop:new m(0,0),rightSectionWidth:new m(100,58),leftSectionWidth:new m(100,42),footerButtonWidth:new m(120,165),right:new m(c[3],c[0]),actionsContainerRight:new m(c[0],c[6]),otherActionsContainerBottom:new m(58,44),duplicateBannerWrapperMarginTop:new m(c[5],c[3]),duplicateBannerWrapperMarginRight:new m(c[3],c[8]),duplicateBannerWrapperMarginBottom:new m(c[5],c[3]),duplicateBannerWrapperMarginLeft:new m(c[3],c[6])},mi={formTitle:new qt("h6Regular","h5Regular")},sa=({remiDetails:e,uploadInvoiceEndPoint:C,authParams:ne,isAdmin:le,signedInUser:se,showApproveRejectBtns:de,isRealTimeApprovalEnabled:ce,isReimbursementCommentingEnabled:u,isShowDeletedReimbursementEnabled:me,isSignedInUserReimbursementCreator:at,updateEditRealTimeApproverClicked:pe,onSaveRealTimeApprovals:ue,redirectToReimbursementListScreen:G,redirectToEditableReimbursementScreen:rt,onDuplicateLineClick:ot,approveOrRejectRemi:he,deleteReimbursement:nt,cancelAndDeleteReport:ye,handleZeniLogoClick:lt,onAddNewRule:ge,initialOpenThreadRequest:z})=>{const d=Mt(),st=Rt().analytics,o=Pt(),be=Bt(),[dt,A]=p.useState(!1),[J,q]=p.useState(!1),[ct,Y]=p.useState(!1),[Z,Q]=p.useState("approved"),N=p.useRef(null),[j,X]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[k,mt]=p.useState(null),[pt,L]=p.useState(!1),h=`dashboard_${d.currentTenant?.companyId}`,we=p.useRef({}),xe=l=>{const n=we.current[l];n!=null&&setTimeout(()=>ci(n,N.current),100)};p.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed")&&G()},[e,G]),p.useEffect(()=>{const l=window.location.hash;if(l&&l.startsWith("#L")){const n=l.substring(1);xe(n)}},[]);const ut=()=>{G()};Nt({componentName:"reimbursement.details"});const ht={onOkClick:()=>{A(!1),j.primaryButtonText===i.buttons.delete?nt?.():j.title===i.cancelReportTitle?ye?.():j.title===i.cancelAndDeleteReportTitle&&ye?.(!0)},onCancelClick:()=>{A(!1)}},I=s.labelWidth.value(o),M=s.largeLabelWidth.value(o),fe=et.getLocalizedStrings(),{common:{texts:{comments:yt},strings:{empty:ve}},collaboration:{threads:{placeholder:{addANewComment:gt,replyAComment:bt},tooltip:{resolveComment:wt,unResolveComment:xt}}},dateFormat:$e}=fe,{reimbursementDetail:i,bulkActions:_}=fe.spendManagement.reimbursement,ee=e.remiDetails?.reportTitle,S=e.remiDetails?.lines??[],O=e.remiDetails?.reimbursementInfo.stage,W=e.remiDetails?.reimbursementInfo.billStatus,E=e.remiDetails?.reimbursementInfo.billPaymentStatus,Te=O?.code==="paid",ft=Te?O:W?.code=="approved"&&E?.code?E:W,v=pi(e.remiDetails),R=W?.code=="approved"&&E?.code?E:W,F=e.remiDetails?.isDeleted??!1,Se=e.remiDetails?.amount,je=e.remiDetails?.amount.amount??0,Ie=()=>{X({title:e.remiDetails?.reimbursementInfo.stage.code==="draft"?i.deleteDraftTitle:i.deleteReportTitle,description:i.deleteAlertDescription,primaryButtonText:i.buttons.delete,secondaryButtonText:i.buttons.cancel}),A(!0)},vt=()=>{X({title:i.cancelReportTitle,description:i.cancelAlertDescription,primaryButtonText:i.buttons.yes,secondaryButtonText:i.buttons.no}),A(!0)},$t=()=>{X({title:i.cancelAndDeleteReportTitle,description:i.cancelAndDeleteAlertDescription,primaryButtonText:i.buttons.yes,secondaryButtonText:i.buttons.no}),A(!0)},De=()=>{rt()},Tt={onOkClick:l=>{Y(!1),he({reimbursementId:e.remiDetails?.id??"",type:"rejected",description:l})},onCancelClick:()=>{Y(!1)}},St=()=>{e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"?De():(Q("approved"),he({reimbursementId:e.remiDetails?.id??"",type:"approved"}))},jt=()=>{e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"?(Q("delete"),Ie()):(Q("rejected"),Y(!0))},It=e.remiDetails?.reimbursementInfo.paymentDate!=null?oi(ni(e.remiDetails.reimbursementInfo.paymentDate.toDate(),[0,6],e.achSameDayMaxDays).toDateString()):void 0,te=e.remiDetails?.reimbursementInfo.expectedDepositDate??It,Dt=e.remiDetails?.lines?.some(l=>{const n=l.lineDetail;return n?.account?.isDeleted===!0&&n?.account?.isBillEditableCoaAccountType===!1})??!1,Ce=e.remiDetails?.reimbursementInfo.billStatus.code==="pending_approval"&&at&&!Dt,Ct=e.remiDetails?.reimbursementInfo.billStatus.code!=="rejected"&&e.remiDetails?.reimbursementInfo.billPaymentStatus.code!=="paid",ie=ft?.code,kt=di(e.duplicateLineByLineId),ke=e.duplicateReimbursementStatus.fetchState==="Completed"&&kt>0,{requestToOpenThread:ae,setRequestToOpenThread:K,setOpenThread:U}=p.useContext(Lt);p.useEffect(()=>{z?.threadId!=null&&z?.companyId!=null&&z?.entityType!=null&&K(z)},[z,K]);const{threads:P,isLoading:D}=_t({application:"dashboard",companyId:d.currentTenant?.companyId,tab:"reimbursement",entityId:e.remiDetails?.id,isGlobalComment:!1},"both",!1),zt=p.useMemo(()=>P.filter(l=>l.resolved===!1&&!l.id.includes(Ot)),[P]).length,At=p.useCallback((l,n)=>{U(n),L(!1)},[U,L]);p.useEffect(()=>{ae?.threadId!=null&&P.length>0&&!D&&(U(ae.threadId),K(null))},[ae,P,D,U,K]);const g={application:"dashboard",companyId:d.currentTenant?.companyId,tab:"reimbursement",entityId:e.remiDetails?.id},B=li(e.remiDetails?.bulkProcessingDetail?.type);return t.jsxs(Oi,{windowSize:o,ref:N,children:[dt?t.jsx(Ae,{titleComponent:t.jsx(Re,{children:j.title}),descriptionComponent:t.jsx(Me,{children:j.description}),primaryButtonText:j.primaryButtonText,proceedButtonVariant:"danger",secondaryButtonText:j.secondaryButtonText,action:ht}):null,ct?t.jsx(Ae,{titleComponent:t.jsx(Re,{children:`${i.rejectRemiTitlePrefix} ${e.remiDetails?.reportTitle??""} by ${e.createdBy?.firstName??""} ${e.createdBy?.lastName??""}`}),descriptionComponent:t.jsx(Me,{children:i.rejectRemiDescription}),primaryButtonText:i.buttons.send,secondaryButtonText:i.buttons.cancel,action:Tt,isEditPopup:!0,isNotesIncluded:!0,notesPlaceholder:i.rejectRejectReasonPlaceholder}):null,t.jsxs(Mi,{windowSize:o,"data-testid":y("reimbursement-detail-page-nav-bar-container"),children:[o!=="small"?t.jsx(Pe,{"data-testid":y("reimbursement-detail-page-nav-bar-left"),style:{width:"42%"},title:"",leftSideComponent:t.jsx(Ri,{onClick:()=>lt?.(),"data-testid":y("remi-detail-page-nav-bar-zeni-logo")}),enableTitleOnScroll:!1,backgroundColor:be.colors.background,keepBackgroundOnScroll:!0,scrollableContent:N,source:"ReimbursementDetailPage"}):null,o!=="small"?t.jsx(ki,{}):null,t.jsx(Pe,{"data-testid":y("reimbursement-detail-page-nav-bar-right"),title:ee??ve,leftSideComponent:t.jsx(t.Fragment,{}),style:{width:o!=="small"?"58%":"100%"},rightSideComponent:t.jsxs(Bi,{children:[u?t.jsxs(Ni,{isDisabled:D,onClick:D?()=>null:l=>{l.preventDefault(),l.stopPropagation(),mt({roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityType:"reimbursement.details",entityId:e.remiDetails?.id??""}),L(!0),st.trackCommentActivity("reimbursement","clicked",d.currentTenant?.companyName??"",d.controllersList.controllers.map(n=>Et(n)),void 0,void 0,"page icon")},"data-testid":y("remi-comments-section"),children:[t.jsx(Wt,{count:D?void 0:zt,isLoading:D,style:{left:"12px"}}),t.jsx(Li,{})]}):null,t.jsx(_i,{size:o,onClick:()=>ut(),"data-testid":y("remi-detail-page-close"),children:t.jsx(Pi,{})})]}),scrollableContent:N,enableTitleOnScroll:o!=="small",scrollThreshold:64,source:"ReimbursementDetailPage"})]}),t.jsxs(Hi,{children:[o==="small"?t.jsxs(t.Fragment,{children:[t.jsx(qe,{windowSize:o,children:t.jsx(Ye,{windowsSize:o,children:ee})}),e.createdBy?.userId!=null?t.jsx(Ve,{windowSize:o,children:`${i.by} ${e.createdBy.firstName} ${e.createdBy.lastName}`}):null,me&&v!=null?t.jsx(He,{color:v.color,bgColor:v.bgColor,borderColor:v.borderColor,children:v.value}):null,R?.code!=null?o==="small"?t.jsxs(t.Fragment,{children:[t.jsx(Ft,{progressSectionObj:R,createDate:e.remiDetails?.createTime,paymentDate:te,scheduleDate:e.remiDetails?.reimbursementInfo.paymentDate,approvedDate:e.latestApprovedDate,isFrozen:F}),B?t.jsx(Be,{variant:"warning",style:{margin:`${a.sp5} ${a.sp3}`},title:_.duplicateWarning.title,description:_.duplicateWarning.description}):ke?t.jsxs(We,{size:o,children:[t.jsx(Ue,{}),t.jsxs(Fe,{children:[t.jsx(Ee,{children:i.thereSeems}),t.jsx(Ke,{children:i.pleaseFind})]})]}):null]}):t.jsx(Je,{windowSize:o,children:t.jsx(Ne,{progressSectionObj:R,createDate:e.remiDetails?.createTime,paymentDate:te,scheduleDate:e.remiDetails?.reimbursementInfo.paymentDate,approvedDate:e.latestApprovedDate,isFrozen:F})}):null]}):null,S.map((l,n)=>{const $=e.duplicateLineByLineId[l.lineId];return t.jsxs(Xe,{windowSize:o,children:[t.jsx(Ki,{windowSize:o,children:t.jsx(Ui,{bottomSeperator:S.length!==1,windowSize:o,children:t.jsx(si,{showAutofill:!1,uploadInvoiceEndPoint:C,authParams:ne,entityId:e.remiDetails?.id,file:l.file,showTitlebar:!0,showTitlebarIcon:!1,pdfTitle:S.length>1?`#${n+1} Receipt`:"Receipt",style:{width:"auto",padding:0,height:S.length-1===n||n===0?760:451},onInvoiceUpload:()=>{console.log("onInvoiceUpload")},noAttachmentText:i.noReceiptAttached,type:"reimbursement"})})}),t.jsxs(Fi,{windowSize:o,children:[n===0&&o!=="small"?t.jsxs(t.Fragment,{children:[t.jsxs(qe,{windowSize:o,children:[t.jsx(Ye,{windowsSize:o,children:ee}),me&&v!=null?t.jsx(He,{color:v.color,bgColor:v.bgColor,borderColor:v.borderColor,children:v.value}):null]}),e.createdBy?.userId!=null?t.jsx(Ve,{windowSize:o,children:`By ${e.createdBy.firstName} ${e.createdBy.lastName}`}):null,R?.code!=null?t.jsx(Je,{windowSize:o,children:t.jsx(Ne,{progressSectionObj:R,createDate:e.remiDetails?.createTime,paymentDate:te,scheduleDate:e.remiDetails?.reimbursementInfo.paymentDate,approvedDate:e.latestApprovedDate,isFrozen:F})}):null,B?t.jsx(Be,{variant:"warning",style:{margin:`${a.sp3} ${a.sp8} ${a.sp3} ${a.sp6}`},title:_.duplicateWarning.title,description:_.duplicateWarning.description}):ke?t.jsxs(We,{size:o,children:[t.jsx(Ue,{}),t.jsxs(Fe,{children:[t.jsx(Ee,{children:i.thereSeems}),t.jsx(Ke,{children:i.pleaseFind})]})]}):null]}):null,t.jsxs(wi,{windowSize:o,ref:ze=>{ze!=null&&(we.current[`L${l.lineId}`]=ze)},children:[o!=="small"?t.jsx(bi,{children:t.jsx(xi,{children:S.length>1?`#${n+1} ${i.reimbursement}`:i.reimbursement})}):null,t.jsxs(fi,{windowSize:o,children:[$?.duplicateLineId!=null?t.jsxs(yi,{children:[i.thisExpenseReview," ",t.jsx(gi,{onClick:()=>{if($.isDuplicateWithinTransaction&&$.duplicateLineId!=null)return xe(`L${$.duplicateLineId}`);$.duplicateTransactionId!=null&&$.duplicateLineId!=null&&ot($.duplicateTransactionId,$.duplicateLineId)},"data-testid":y("remi-view-duplicate-expense"),children:i.viewOriginalExpense})]}):null,t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:l.type===i.mileageKey?`${n}.mileage.reimbursementType`:`${n}.out_of_pocket.reimbursementType`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("reimbursementType",n,l.type===i.mileageKey?"mileage":"out_of_pocket")}`},style:{borderRadius:$?.duplicateLineId==null?`${a.sp2} ${a.sp2} 0 0`:"0 0 0 0"},children:t.jsx(w,{label:{label:i.reimbursementType,width:M},text:l.type===i.mileageKey?i.mileage:i.outOfPocket,style:{width:"auto",borderRadius:$?.duplicateLineId==null?`${a.sp2} ${a.sp2} 0 0`:"0 0 0 0"}})}),t.jsx(T,{}),l.type===i.mileageKey?t.jsxs(t.Fragment,{children:[t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.mileage.transactionDate`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("transactionDate",n,"mileage")}`},children:t.jsx(w,{label:{label:i.transactionDate,width:M},text:l.transactionDate?.format($e.visual.MMMDCommaYYYYformat)??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.mileage.distanceInMiles`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("distanceInMiles",n,"mileage")}`},children:t.jsx(w,{label:{label:i.distanceInMiles,width:M},text:l.distanceMileage.value.toString()??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.mileage.amount`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("amount",n,"mileage")}`},children:t.jsx(w,{label:{label:i.amount,width:I},text:l.homeCurrencyConversions!=null?Le("0,0[.]00",l.homeCurrencyConversions):i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.mileage.memo`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("memo",n,"mileage")}`},children:t.jsx(w,{label:{label:i.memo,width:I},text:l.description??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.mileage.class`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("class",n,"mileage")}`},style:{borderRadius:`0 0 ${a.sp2} ${a.sp2}`},children:t.jsx(w,{label:{label:i.department,width:I},text:l.lineDetail.class?.className??i.emptyValue,style:{width:"auto",borderRadius:`0 0 ${a.sp2} ${a.sp2}`}})})]}):t.jsxs(t.Fragment,{children:[t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.out_of_pocket.merchant`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("merchant",n,"out_of_pocket")}`},children:t.jsx(w,{label:{label:i.merchant,width:M},text:l.merchant?.name??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.out_of_pocket.transactionDate`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("transactionDate",n,"out_of_pocket")}`},children:t.jsx(w,{label:{label:i.transactionDate,width:M},text:l.transactionDate?.format($e.visual.MMMDCommaYYYYformat)??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.out_of_pocket.amount`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("amount",n,"out_of_pocket")}`},children:t.jsx(w,{label:{label:i.amount,width:I},text:l.homeCurrencyConversions!=null?Le("0,0[.]00",l.homeCurrencyConversions):i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.out_of_pocket.memo`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("memo",n,"out_of_pocket")}`},children:t.jsx(w,{label:{label:i.memo,width:I},text:l.description??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.out_of_pocket.account`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("account",n,"out_of_pocket")}`},children:t.jsx(w,{label:{label:i.category,width:I},text:l.lineDetail.account?.accountName??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:x({type:"details",key:`${n}.out_of_pocket.class`}),roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityId:e.remiDetails?.id??"",dashboardOptionType:"reimbursement",filterMetaData:{...g,entityType:`reimbursement.details.${f("class",n,"out_of_pocket")}`},style:{borderRadius:`0 0 ${a.sp2} ${a.sp2}`},children:t.jsx(w,{label:{label:i.department,width:I},text:l.lineDetail.class?.className??i.emptyValue,style:{width:"auto",borderRadius:`0 0 ${a.sp2} ${a.sp2}`}})})]})]})]}),S.length!==1&&S.length===n+1&&t.jsxs(Ei,{windowSize:o,children:[t.jsxs(Ze,{windowSize:o,children:[t.jsx(Qe,{children:i.total}),t.jsx(_e,{amount:Se,integerStyles:V.h6Regular.cssObject,decimalStyles:V.standardRegular.cssObject})]}),e.remiDetails&&t.jsx(Oe,{amount:je,activities:e.remiActivities,stage:O?.code??"draft",onAddNewRule:ge,entity:"reimbursement",realTimeApproval:{allApprovers:e.filteredApprovers,filteredAttributes:e.filteredAttributes,allAccountingClass:e.allAccountingClasses,isRealTimeApproverEditMode:e.realTimeApproval.isEditMode??!1,realTimeApprovalSaveStatus:{fetchState:e.realTimeApproval.fetchState,error:e.realTimeApproval.error},approvalListFetchState:e.approverListFetchState.fetchState,attributeSubTypeToUserIdMapping:e.attributeSubTypeToUserIdMapping,isAdmin:le,signedInUserId:se?.userId,showRealTimeApproval:ce,entityApprovalId:e.remiActivities[0]?.entityApprovalId??e.remiDetails.entityApprovalId,updateEditMode:pe,onSaveRealTimeApprovals:ue},historicActivities:e.remiHistory.activities})]})]})]},l.lineId)}),S.length===1&&t.jsxs(Xe,{windowSize:o,children:[t.jsx(Ge,{}),t.jsxs(ui,{windowSize:o,children:[t.jsx(Wi,{windowSize:o,children:t.jsxs(Ze,{windowSize:o,children:[t.jsx(Qe,{children:i.total}),t.jsx(_e,{amount:Se,integerStyles:V.h6Regular.cssObject,decimalStyles:V.standardRegular.cssObject})]})}),e.remiDetails&&t.jsx(hi,{windowSize:o,children:t.jsx(Oe,{amount:je,activities:e.remiActivities,stage:O?.code??"draft",onAddNewRule:ge,entity:"reimbursement",historicActivities:e.remiHistory.activities,realTimeApproval:{allApprovers:e.filteredApprovers,allAccountingClass:e.allAccountingClasses,filteredAttributes:e.filteredAttributes,isRealTimeApproverEditMode:e.realTimeApproval.isEditMode??!1,realTimeApprovalSaveStatus:{fetchState:e.realTimeApproval.fetchState,error:e.realTimeApproval.error},approvalListFetchState:e.approverListFetchState.fetchState,attributeSubTypeToUserIdMapping:e.attributeSubTypeToUserIdMapping,isAdmin:le,signedInUserId:se?.userId,showRealTimeApproval:ce,entityApprovalId:e.remiActivities[0]?.entityApprovalId??e.remiDetails.entityApprovalId,updateEditMode:pe,onSaveRealTimeApprovals:ue}})})]})]}),t.jsx(Vi,{})]}),Te||F===!0?null:t.jsxs(Ai,{children:[o!=="small"?t.jsx(Ge,{}):null,t.jsx($i,{windowSize:o,"data-testid":y("remi-detail-page-footer"),onClick:l=>{l.stopPropagation(),J===!0&&q(!1)},children:t.jsx(Kt,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"||de,showCancel:e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"||de,cancelBtn:{label:e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"?o==="small"?i.buttons.delete:i.buttons.deleteReport:o==="small"?i.buttons.reject:i.buttons.rejectReport,isLoading:Z==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress"||Z==="delete"&&e.deleteStatus.fetchState==="In-Progress",onClick:jt,style:{width:s.footerButtonWidth.value(o)},reverseSpinnerColor:!1},primaryBtn:{label:e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"?o==="small"?i.buttons.edit:i.buttons.editAndResubmit:o==="small"?i.buttons.approve:i.buttons.approveReport,isLoading:Z==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:St,style:{width:s.footerButtonWidth.value(o)},isDisabled:e.approvalUpdateStatus.fetchState==="In-Progress"||e.realTimeApproval.isEditMode===!0},rightSideComponent:t.jsx(vi,{children:t.jsxs(zi,{windowSize:o,children:[!B&&J?t.jsx(Ut,{onClickAway:()=>q(!1),children:t.jsxs(Ci,{windowSize:o,children:[ie!=="processing"?t.jsx(oe,{onClick:Ie,"data-testid":y("remi-delete-action"),children:i.buttons.deleteReport}):null,ie==="processing"?t.jsx(oe,{onClick:vt,"data-testid":y("remi-cancel-action"),children:i.buttons.cancel}):null,ie==="processing"?t.jsx(oe,{onClick:$t,"data-testid":y("remi-cancel-and-delete-action"),children:i.buttons.cancelAndDelete}):null]})}):null,t.jsxs(Di,{windowSize:o,children:[!B&&Ce?t.jsx(Ii,{onClick:De,"data-testid":y("remi-edit-button"),children:t.jsx(ji,{})}):null,!B&&Ct===!0?t.jsx(Si,{windowSize:o,showEditIcon:Ce,children:t.jsx(Ti,{onClick:()=>q(!J),"data-testid":y("remi-more-actions-button")})}):null]})]})}),style:{minHeight:62}})})]}),u?t.jsx(ri,{id:h,children:t.jsx(Vt,{isDrawerOpen:pt,allowComposer:!0,drawerTitle:yt,threads:P,autoExpand:!0,autoFocus:!1,filter:{application:"dashboard",companyId:k?.companyId??ve,isGlobalComment:!1,tab:"reimbursement"},isLoading:D,threadMetadata:k?{companyName:k.companyName,companyId:k.companyId,entityId:k.entityId,entityType:k.entityType,isGlobalComment:!1,application:"dashboard",tab:"reimbursement",url:window.location.href}:void 0,textOverrides:{composerPlaceholder:gt,replyComposerPlaceholder:bt,threadResolve:wt,threadUnResolve:xt},onThreadClick:(l,n)=>At(l,n),onCloseAllThreadsDrawer:()=>L(!1),drawerSectionStyle:{width:"400px",backgroundColor:be.colors.background}})}):null]})},pi=e=>{const C=et.getLocalizedStrings().spendManagement.billPay.billsByTabs;if(e?.isDeleted===!0)return{value:C.tabsById.deleted,color:re.deleted.color,bgColor:re.deleted.bgColor,borderColor:re.deleted.borderColor,code:"deleted"}},ui=r.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: ${e=>s.rightSectionWidth.valuePercentage(e.windowSize)};
@@ -1,4 +1,4 @@
1
- import{ax as ne,e as S,J as k,aR as le,V as e,aQ as a,fs as ae,bC as de,r as u,ae as d,O as E,o as t,aq as ce,a as me,aU as F,am as pe,y as xe,p as z,cE as he,aV as ue,bb as ge,c as we}from"./index-CRNmezJu.js";import{a as j}from"./sentry-Dla7mstv.js";import{n as r}from"./mui-mhzAEcDs.js";import{FG as je,bT as be}from"./zeni-epic-state-CSmiPBaP.js";import{f as fe}from"./VideoPopup-C9x0ntQ5-C94oLuE1.js";import{M as v}from"./usp-line-BBd1wKwW-C5eOwLOD.js";import"./liveblocks-BKvkleJ3.js";import"./core-hVMF2uNa.js";import"./recharts-BErFcng5.js";import"./lottie-N_bekW9H.js";import"./analytics-g5EpLRud.js";import"./lexical-DYQnWL1V.js";import"./utils-D6NmQd1Q.js";import"./VideoPlayer-CylTUX4X-BEZtED7z.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new i.Error().stack;o&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[o]="68602369-9b70-473d-87f2-9160065a4c01",i._sentryDebugIdIdentifier="sentry-dbid-68602369-9b70-473d-87f2-9160065a4c01")}catch{}})();const V="https://storage.googleapis.com/zeni-apis.appspot.com/images/reimbursement-promo-light.png",Z="https://storage.googleapis.com/zeni-apis.appspot.com/images/reimbursement-promo-dark.png",ye={midContainerMarginBottom:new xe(we[5],44)},$e=r.div`
1
+ import{ax as ne,e as S,J as k,aR as le,V as e,aQ as a,fs as ae,bC as de,r as u,ae as d,O as E,o as t,aq as ce,a as me,aU as F,am as pe,y as xe,p as z,cE as he,aV as ue,bb as ge,c as we}from"./index-e-SZUuyN.js";import{a as j}from"./sentry-Dla7mstv.js";import{n as r}from"./mui-mhzAEcDs.js";import{FG as je,bT as be}from"./zeni-epic-state-CSmiPBaP.js";import{f as fe}from"./VideoPopup-C9x0ntQ5-BVA3i-oV.js";import{M as v}from"./usp-line-BBd1wKwW-C5eOwLOD.js";import"./liveblocks-BKvkleJ3.js";import"./core-hVMF2uNa.js";import"./recharts-BErFcng5.js";import"./lottie-N_bekW9H.js";import"./analytics-g5EpLRud.js";import"./lexical-DYQnWL1V.js";import"./utils-D6NmQd1Q.js";import"./VideoPlayer-CylTUX4X-DSxfswME.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new i.Error().stack;o&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[o]="68602369-9b70-473d-87f2-9160065a4c01",i._sentryDebugIdIdentifier="sentry-dbid-68602369-9b70-473d-87f2-9160065a4c01")}catch{}})();const V="https://storage.googleapis.com/zeni-apis.appspot.com/images/reimbursement-promo-light.png",Z="https://storage.googleapis.com/zeni-apis.appspot.com/images/reimbursement-promo-dark.png",ye={midContainerMarginBottom:new xe(we[5],44)},$e=r.div`
2
2
  display: flex;
3
3
  flex: 1 1 auto;
4
4
  min-height: 100%;
@@ -1,4 +1,4 @@
1
- import{e as Te,J as Ve,aR as N,a9 as Ge,cF as qe,O as Ie,aW as Ce,V as t,fa as Je,p as J,y as s,bC as Ze,T as Qe,ac as Ye,ft as ve,dP as Ke,fu as Xe,bx as et,dF as tt,aS as it,o as a,fw as nt,c as n,ci as ot,cJ as at,es as lt,fF as ke,fG as $e,gg as st,r as rt,aQ as Pe,F as Ae,bM as ct,ai as dt,bu as ut}from"./index-CRNmezJu.js";import{a as o}from"./sentry-Dla7mstv.js";import{n as i}from"./mui-mhzAEcDs.js";import{bJ as mt}from"./zeni-epic-state-CSmiPBaP.js";import{g as pt}from"./UploadAdditionalDocumentOverlay-BYrAIUiK-zdW8Yium.js";import"./liveblocks-BKvkleJ3.js";import"./core-hVMF2uNa.js";import"./recharts-BErFcng5.js";import"./lottie-N_bekW9H.js";import"./analytics-g5EpLRud.js";import"./lexical-DYQnWL1V.js";import"./utils-D6NmQd1Q.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},p=new e.Error().stack;p&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[p]="cc151653-e98a-4c03-a6f6-d62aab9b60df",e._sentryDebugIdIdentifier="sentry-dbid-cc151653-e98a-4c03-a6f6-d62aab9b60df")}catch{}})();const gt=e=>o.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.createElement("path",{d:"M12.7113 3H2.89261C2.39963 3 2 3.39963 2 3.89261V20.8522C2 21.3451 2.39963 21.7448 2.89261 21.7448H12.7113C13.2043 21.7448 13.6039 21.3451 13.6039 20.8522V3.89261C13.6039 3.39963 13.2043 3 12.7113 3Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M10.4798 13.7113H9.58719C9.3407 13.7113 9.14088 13.9111 9.14088 14.1576V16.8354C9.14088 17.0819 9.3407 17.2817 9.58719 17.2817H10.4798C10.7263 17.2817 10.9261 17.0819 10.9261 16.8354V14.1576C10.9261 13.9111 10.7263 13.7113 10.4798 13.7113Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M21.6374 16.1133C21.6374 16.1961 21.6143 16.2773 21.5708 16.3477C21.5273 16.4182 21.4651 16.4752 21.391 16.5123L19.8522 17.2817V14.6039H21.1911C21.3095 14.6039 21.423 14.6509 21.5067 14.7346C21.5904 14.8183 21.6374 14.9318 21.6374 15.0502V16.1133Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M19.8522 14.6039V13.265C19.8522 12.5268 22.53 10.1409 22.53 10.1409",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M19.8522 17.2817V19.9596C19.8522 20.433 19.6641 20.8871 19.3293 21.2219C18.9945 21.5567 18.5404 21.7448 18.067 21.7448C17.5935 21.7448 17.1394 21.5567 16.8046 21.2219C16.4698 20.8871 16.2817 20.433 16.2817 19.9596V7.90935C16.2817 7.55424 16.1407 7.21369 15.8896 6.96259C15.6385 6.7115 15.2979 6.57043 14.9428 6.57043H13.6039",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M2 10.1409H13.6039",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M11.3724 4.78528H4.23154C3.98505 4.78528 3.78523 4.9851 3.78523 5.23158V7.90941C3.78523 8.15589 3.98505 8.35571 4.23154 8.35571H11.3724C11.6189 8.35571 11.8187 8.15589 11.8187 7.90941V5.23158C11.8187 4.9851 11.6189 4.78528 11.3724 4.78528Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M9.14088 19.0669H10.9261",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),h={sectionWidth:new s(343,580,726),iconContainerMaxWidthHeight:new s(n[6],n[7]),iconContainerMarginRight:new s(12,n[3]),infoLabelPaddingLeft:new s(n[0],n[3]),iconPadding:new s(10,12),iconWidthHeight:new s(20,n[4]),rowGap:new s(n[2],n[3]),containerPadding:new s(n[3],n[4])},ge={title:new Ae("standardSemiBold","largeSemiBold"),infoLabel:new Ae("extraSmallRegular","smallRegular")};function ft({companyMileageConfigInfo:e,mileageDetails:p,analytics:$,style:j,sectionId:P,isActive:d=!0,isDisabled:r,onSaveMileageClick:Z}){const l=Ve(),D=Te(),{formState:{errors:Q},trigger:Y}=at(),T=ht(P,"mileageAmountInDenomination"),x=lt(Q,T),{localData:c,updateStatus:R,mileageStatus:b}=p,U=e?.denominationConversions.amount==null||e.denominationConversions.amount!==c?.mileageAmountInDenomination,{commonSetUp:K,spendManagement:X}=Ie.getLocalizedStrings(),{reimbursement:ee}=X,[S,V]=o.useState(U),[te,W]=o.useState(!1);o.useEffect(()=>{x||Y(T)},[]),o.useEffect(()=>{e?.denominationConversions.amount!=null&&e.denominationConversions.amount===c?.mileageAmountInDenomination&&V(!1)},[e?.denominationConversions.amount]),o.useEffect(()=>{S||W(S)},[S]);const{reimbursementSetup:y}=ee,{setUp:ie}=K,ne=S===!1||R.fetchState==="In-Progress"?"readonly":r,oe=c&&c?.denominationSymbol?`${c?.denominationSymbol} `:"",ae=c&&c?.mileageUnit?c?.mileageUnit:"";return t.jsxs(xt,{windowSize:l,style:j,isActive:d&&r==null,children:[t.jsxs(Pt,{windowSize:l,children:[y.mileageHeader,d===!1?t.jsx(Dt,{children:ie.comingSoon}):null]}),t.jsxs(kt,{windowSize:l,children:[t.jsx(vt,{windowSize:l,isDarkMode:D.mode==="dark",children:t.jsx(gt,{width:h.iconWidthHeight.valuePx(l),height:h.iconWidthHeight.valuePx(l)})}),t.jsxs(yt,{children:[t.jsxs($t,{children:[t.jsxs(At,{children:[t.jsxs(jt,{children:[t.jsx(bt,{windowSize:l,children:e?.denominationConversions.amount==null?y.mileageAddTitle:y.mileageEditTitle}),t.jsx(St,{children:y.mileageSubTitle})]}),b!=null&&e?.denominationConversions.amount!=null&&l==="small"?t.jsx(ke,{style:{width:"max-content",padding:a.sp0,marginTop:a.sp2},tagTitle:b.name,textColor:$e(b.code)}):null]}),t.jsxs(wt,{children:[b!=null&&e?.denominationConversions.amount!=null&&l!=="small"?t.jsx(ke,{style:{width:"max-content"},tagTitle:b.name,textColor:$e(b.code)}):null,t.jsx(Ct,{})]})]}),t.jsxs(Tt,{children:[t.jsxs(Vt,{children:[t.jsx(st,{style:{height:a.sp6,textAlign:"left"},inputStyle:{textAlign:"left",paddingRight:a.sp10,backgroundColor:x?void 0:D.colors.background,color:S||x?void 0:D.colors.grey1},isFieldError:x,type:"number",autoFocus:!1,focus:te,name:T,defaultValue:c?.mileageAmountInDenomination,returnValueType:"floatValue",allowEmptyFormatting:!0,prefix:oe,suffix:` ${y.perText} ${ae}`,decimalScale:1,allowNegative:!1,isNumericString:!1,registerOptions:{min:1,validate:I=>I!=null||r!=null,required:r==null},isDisabled:ne}),t.jsx(Et,{children:S?t.jsx(rt,{label:y.save,"data-testid":Pe("save-mileage"),onClick:()=>{c?.mileageAmountInDenomination!=null&&U&&!x&&Z?.(c.mileageAmountInDenomination)},style:{outline:"none"},size:"small",disabled:r!=null,variant:"light_transparent",reverseSpinnerColor:!1,loading:R.fetchState==="In-Progress"}):t.jsx(Lt,{isDisabled:r,"data-testid":Pe("edit-mileage"),onClick:I=>{I.stopPropagation(),V(!0),W(!0),$.trackReimbursementMileageRateEdit()}})})]}),c?.description!=null?t.jsx(It,{size:l,hasError:x,children:x&&e?.defaultMileageUnitAmount!=null?y.yourMileage.replace("__defaultMileageUnitAmount__",(e.defaultMileageUnitAmount*100).toString()):c.description}):null]})]})]})]})}const ht=(e,p)=>`${e}.${p}`,xt=i.div`
1
+ import{e as Te,J as Ve,aR as N,a9 as Ge,cF as qe,O as Ie,aW as Ce,V as t,fa as Je,p as J,y as s,bC as Ze,T as Qe,ac as Ye,ft as ve,dP as Ke,fu as Xe,bx as et,dF as tt,aS as it,o as a,fw as nt,c as n,ci as ot,cJ as at,es as lt,fF as ke,fG as $e,gg as st,r as rt,aQ as Pe,F as Ae,bM as ct,ai as dt,bu as ut}from"./index-e-SZUuyN.js";import{a as o}from"./sentry-Dla7mstv.js";import{n as i}from"./mui-mhzAEcDs.js";import{bJ as mt}from"./zeni-epic-state-CSmiPBaP.js";import{g as pt}from"./UploadAdditionalDocumentOverlay-BYrAIUiK-19i7WD8j.js";import"./liveblocks-BKvkleJ3.js";import"./core-hVMF2uNa.js";import"./recharts-BErFcng5.js";import"./lottie-N_bekW9H.js";import"./analytics-g5EpLRud.js";import"./lexical-DYQnWL1V.js";import"./utils-D6NmQd1Q.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},p=new e.Error().stack;p&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[p]="cc151653-e98a-4c03-a6f6-d62aab9b60df",e._sentryDebugIdIdentifier="sentry-dbid-cc151653-e98a-4c03-a6f6-d62aab9b60df")}catch{}})();const gt=e=>o.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.createElement("path",{d:"M12.7113 3H2.89261C2.39963 3 2 3.39963 2 3.89261V20.8522C2 21.3451 2.39963 21.7448 2.89261 21.7448H12.7113C13.2043 21.7448 13.6039 21.3451 13.6039 20.8522V3.89261C13.6039 3.39963 13.2043 3 12.7113 3Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M10.4798 13.7113H9.58719C9.3407 13.7113 9.14088 13.9111 9.14088 14.1576V16.8354C9.14088 17.0819 9.3407 17.2817 9.58719 17.2817H10.4798C10.7263 17.2817 10.9261 17.0819 10.9261 16.8354V14.1576C10.9261 13.9111 10.7263 13.7113 10.4798 13.7113Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M21.6374 16.1133C21.6374 16.1961 21.6143 16.2773 21.5708 16.3477C21.5273 16.4182 21.4651 16.4752 21.391 16.5123L19.8522 17.2817V14.6039H21.1911C21.3095 14.6039 21.423 14.6509 21.5067 14.7346C21.5904 14.8183 21.6374 14.9318 21.6374 15.0502V16.1133Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M19.8522 14.6039V13.265C19.8522 12.5268 22.53 10.1409 22.53 10.1409",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M19.8522 17.2817V19.9596C19.8522 20.433 19.6641 20.8871 19.3293 21.2219C18.9945 21.5567 18.5404 21.7448 18.067 21.7448C17.5935 21.7448 17.1394 21.5567 16.8046 21.2219C16.4698 20.8871 16.2817 20.433 16.2817 19.9596V7.90935C16.2817 7.55424 16.1407 7.21369 15.8896 6.96259C15.6385 6.7115 15.2979 6.57043 14.9428 6.57043H13.6039",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M2 10.1409H13.6039",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M11.3724 4.78528H4.23154C3.98505 4.78528 3.78523 4.9851 3.78523 5.23158V7.90941C3.78523 8.15589 3.98505 8.35571 4.23154 8.35571H11.3724C11.6189 8.35571 11.8187 8.15589 11.8187 7.90941V5.23158C11.8187 4.9851 11.6189 4.78528 11.3724 4.78528Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M9.14088 19.0669H10.9261",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),h={sectionWidth:new s(343,580,726),iconContainerMaxWidthHeight:new s(n[6],n[7]),iconContainerMarginRight:new s(12,n[3]),infoLabelPaddingLeft:new s(n[0],n[3]),iconPadding:new s(10,12),iconWidthHeight:new s(20,n[4]),rowGap:new s(n[2],n[3]),containerPadding:new s(n[3],n[4])},ge={title:new Ae("standardSemiBold","largeSemiBold"),infoLabel:new Ae("extraSmallRegular","smallRegular")};function ft({companyMileageConfigInfo:e,mileageDetails:p,analytics:$,style:j,sectionId:P,isActive:d=!0,isDisabled:r,onSaveMileageClick:Z}){const l=Ve(),D=Te(),{formState:{errors:Q},trigger:Y}=at(),T=ht(P,"mileageAmountInDenomination"),x=lt(Q,T),{localData:c,updateStatus:R,mileageStatus:b}=p,U=e?.denominationConversions.amount==null||e.denominationConversions.amount!==c?.mileageAmountInDenomination,{commonSetUp:K,spendManagement:X}=Ie.getLocalizedStrings(),{reimbursement:ee}=X,[S,V]=o.useState(U),[te,W]=o.useState(!1);o.useEffect(()=>{x||Y(T)},[]),o.useEffect(()=>{e?.denominationConversions.amount!=null&&e.denominationConversions.amount===c?.mileageAmountInDenomination&&V(!1)},[e?.denominationConversions.amount]),o.useEffect(()=>{S||W(S)},[S]);const{reimbursementSetup:y}=ee,{setUp:ie}=K,ne=S===!1||R.fetchState==="In-Progress"?"readonly":r,oe=c&&c?.denominationSymbol?`${c?.denominationSymbol} `:"",ae=c&&c?.mileageUnit?c?.mileageUnit:"";return t.jsxs(xt,{windowSize:l,style:j,isActive:d&&r==null,children:[t.jsxs(Pt,{windowSize:l,children:[y.mileageHeader,d===!1?t.jsx(Dt,{children:ie.comingSoon}):null]}),t.jsxs(kt,{windowSize:l,children:[t.jsx(vt,{windowSize:l,isDarkMode:D.mode==="dark",children:t.jsx(gt,{width:h.iconWidthHeight.valuePx(l),height:h.iconWidthHeight.valuePx(l)})}),t.jsxs(yt,{children:[t.jsxs($t,{children:[t.jsxs(At,{children:[t.jsxs(jt,{children:[t.jsx(bt,{windowSize:l,children:e?.denominationConversions.amount==null?y.mileageAddTitle:y.mileageEditTitle}),t.jsx(St,{children:y.mileageSubTitle})]}),b!=null&&e?.denominationConversions.amount!=null&&l==="small"?t.jsx(ke,{style:{width:"max-content",padding:a.sp0,marginTop:a.sp2},tagTitle:b.name,textColor:$e(b.code)}):null]}),t.jsxs(wt,{children:[b!=null&&e?.denominationConversions.amount!=null&&l!=="small"?t.jsx(ke,{style:{width:"max-content"},tagTitle:b.name,textColor:$e(b.code)}):null,t.jsx(Ct,{})]})]}),t.jsxs(Tt,{children:[t.jsxs(Vt,{children:[t.jsx(st,{style:{height:a.sp6,textAlign:"left"},inputStyle:{textAlign:"left",paddingRight:a.sp10,backgroundColor:x?void 0:D.colors.background,color:S||x?void 0:D.colors.grey1},isFieldError:x,type:"number",autoFocus:!1,focus:te,name:T,defaultValue:c?.mileageAmountInDenomination,returnValueType:"floatValue",allowEmptyFormatting:!0,prefix:oe,suffix:` ${y.perText} ${ae}`,decimalScale:1,allowNegative:!1,isNumericString:!1,registerOptions:{min:1,validate:I=>I!=null||r!=null,required:r==null},isDisabled:ne}),t.jsx(Et,{children:S?t.jsx(rt,{label:y.save,"data-testid":Pe("save-mileage"),onClick:()=>{c?.mileageAmountInDenomination!=null&&U&&!x&&Z?.(c.mileageAmountInDenomination)},style:{outline:"none"},size:"small",disabled:r!=null,variant:"light_transparent",reverseSpinnerColor:!1,loading:R.fetchState==="In-Progress"}):t.jsx(Lt,{isDisabled:r,"data-testid":Pe("edit-mileage"),onClick:I=>{I.stopPropagation(),V(!0),W(!0),$.trackReimbursementMileageRateEdit()}})})]}),c?.description!=null?t.jsx(It,{size:l,hasError:x,children:x&&e?.defaultMileageUnitAmount!=null?y.yourMileage.replace("__defaultMileageUnitAmount__",(e.defaultMileageUnitAmount*100).toString()):c.description}):null]})]})]})]})}const ht=(e,p)=>`${e}.${p}`,xt=i.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  pointer-events: ${e=>e.isLoading===!0||e.isActive===!1?"none":"initial"};
@@ -1 +1 @@
1
- import{V as f,cp as V,cq as q,cr as M,k9 as J,aZ as W,O as z}from"./index-CRNmezJu.js";import{a as b}from"./sentry-Dla7mstv.js";import{Ge as G}from"./zeni-epic-state-CSmiPBaP.js";import{u as K}from"./ReviewOverlay-CXHcM5J8-Z1A7mqWB.js";import"./liveblocks-BKvkleJ3.js";import"./core-hVMF2uNa.js";import"./recharts-BErFcng5.js";import"./mui-mhzAEcDs.js";import"./lottie-N_bekW9H.js";import"./analytics-g5EpLRud.js";import"./lexical-DYQnWL1V.js";import"./utils-D6NmQd1Q.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="2395b72a-e34f-4a39-8205-0f59721241b9",e._sentryDebugIdIdentifier="sentry-dbid-2395b72a-e34f-4a39-8205-0f59721241b9")}catch{}})();const{common:a,spendManagement:{reimbursement:k}}=z.getLocalizedStrings(),s=k.bulkActions;let j;const ce=({remisReviewView:e,isAdmin:o,analytics:i,onProceedForBulkActionClick:d,onCloseReviewItem:r,onCloseOverlay:n})=>{const{fetchState:p,bulkSubmissionFetchState:c,bulkOperationTypeSelected:t,currentTab:g,currentSubTab:y}=e,v=!1,[S,l]=b.useState(!1),[m,_]=b.useState(P(e,v,o)),[h,R]=b.useState(v),[B,Z]=b.useState(0),[w,A]=b.useState({type:"",title:"",description:"",primaryButtonText:"",secondaryButtonText:""});b.useEffect(()=>(B===m.length&&h&&(R(!1),clearInterval(j)),e.fetchState==="Completed"&&_(P(e,!1,o)),()=>{clearInterval(j)}),[m.length,B,h,e.fetchState,v,e,o]);const D=m.length,x=m.filter(u=>u.reviewStatus.code!=="error").length,E=()=>{const{title:u,description:C}=X(x);A({type:"reject",title:u,description:C,primaryButtonText:a.texts.confirm,secondaryButtonText:a.texts.close}),i.trackReimbursementBulkSubmit(t,g,y),l(!0)},F={onOkClick:u=>{l(!1);const C=e.remisForReview.map(I=>I.reimbursement);i.trackReimbursementBulkPopupConfirm(t,g,y,G(C.map(I=>I?.reimbursementTypesIncluded??[]))),d("reject",u)},onCancelClick:()=>{l(!1)}},{title:$,description:L}=Y(p,x,D,h),T=e.fetchState==="Completed"&&x===0,U=()=>{i.trackReimbursementBulkSubmit(t,g,y),d(t)},O=()=>{let u=a.footer.approve;return T?u=a.texts.close:t==="send_for_approval"&&(u=a.footer.submit),{label:u,isDisabled:p!=="Completed"||t==="reject"&&c==="In-Progress",isLoading:c==="In-Progress"&&(t==="send_for_approval"||t==="approve"),onClick:T?n:U,style:t==="send_for_approval"?{minWidth:"92px"}:{}}},N={label:t==="send_for_approval"?a.texts.goBack:a.footer.reject,isDisabled:t!=="reject"&&c==="In-Progress",isLoading:t==="reject"&&c==="In-Progress",reverseSpinnerColor:!1,onClick:t==="send_for_approval"?n:E,style:t==="approve"?{minWidth:"92px"}:{}};return f.jsxs(f.Fragment,{children:[S?f.jsx(V,{titleComponent:f.jsx(M,{children:w.title}),descriptionComponent:f.jsx(q,{children:w.description}),primaryButtonText:w.primaryButtonText,proceedButtonVariant:"danger",secondaryButtonText:w.secondaryButtonText,action:F,isNotesIncluded:!0,isEditPopup:!0}):null,f.jsx(K,{title:$,description:{content:L,isError:e.fetchState==="Completed"&&x===0},reviewItems:m,onCloseReviewItem:r,onCloseOverlay:n,showFooter:e.fetchState==="Completed"&&!h,footerProps:{primaryButton:O(),cancelButton:N,hideCancel:T}})]})},P=(e,o,i)=>{const d=e.fetchState==="In-Progress";return e.remisForReview.map(r=>{const n=J(i,r.submittedBy);return{id:r.transactionId,leftSideText:{title:r.reimbursement?.reportTitle!=null?r.reimbursement.reportTitle:k.reimbursementDetail.newReimbursementTitle,subTitle:n!=null?`${a.by} ${n?.firstName} ${n?.lastName}`:a.strings.empty},rightSideText:{title:W("0,0.[00]",r.reimbursement?.amount?.amount,r.reimbursement?.amount?.currencySymbol),showThunderIcon:!1,subTitle:r.reviewInfoMessage??""},reviewStatus:{isLoading:d,code:r.reviewStatus??""}}})},X=e=>{const{this_:o,these:i,report:d,reports:r,payment:n,payments:p}=a.texts;return e>1?{title:s.popUps.reject.title.replace("__report__",s.reports),description:s.popUps.reject.description.replaceAll("<_this_>",i).replaceAll("<_payment_>",p).replaceAll("__report__",r)}:{title:s.popUps.reject.title.replace("__report__",s.report),description:s.popUps.reject.description.replaceAll("<_this_>",o).replaceAll("<_payment_>",n).replaceAll("__report__",d)}},Y=(e,o,i,d)=>{const{has:r,have:n,report:p,reports:c,are:t,is:g,do_:y,does:v}=a.texts,S=o>1,l=i>1;let m="",_="";return e==="Completed"&&!d?(m=s.reviewPage.reportsReviewed.title.replace("__report__",l?k.bulkActions.reports:s.report).replace("<_has_>",l?n:r),o===0?_=s.reviewPage.reportsReviewed.descriptionError.replace("__report__",l?c:p).replace("<_do_>",l?y:v):_=`${o}/${i} ${s.reviewPage.reportsReviewed.description.replace("__report__",i>1?c:p).replace("<_is_>",S?t:g)}`):(m=s.reviewPage.reportsReviewing.title.replace("__report__",l?c:p),_=s.reviewPage.reportsReviewing.description.replace("__report__",l?c:p)),{title:m,description:_}};export{ce as default};
1
+ import{V as f,cp as V,cq as q,cr as M,k9 as J,aZ as W,O as z}from"./index-e-SZUuyN.js";import{a as b}from"./sentry-Dla7mstv.js";import{Ge as G}from"./zeni-epic-state-CSmiPBaP.js";import{u as K}from"./ReviewOverlay-CXHcM5J8-CWmuYC1c.js";import"./liveblocks-BKvkleJ3.js";import"./core-hVMF2uNa.js";import"./recharts-BErFcng5.js";import"./mui-mhzAEcDs.js";import"./lottie-N_bekW9H.js";import"./analytics-g5EpLRud.js";import"./lexical-DYQnWL1V.js";import"./utils-D6NmQd1Q.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="2395b72a-e34f-4a39-8205-0f59721241b9",e._sentryDebugIdIdentifier="sentry-dbid-2395b72a-e34f-4a39-8205-0f59721241b9")}catch{}})();const{common:a,spendManagement:{reimbursement:k}}=z.getLocalizedStrings(),s=k.bulkActions;let j;const ce=({remisReviewView:e,isAdmin:o,analytics:i,onProceedForBulkActionClick:d,onCloseReviewItem:r,onCloseOverlay:n})=>{const{fetchState:p,bulkSubmissionFetchState:c,bulkOperationTypeSelected:t,currentTab:g,currentSubTab:y}=e,v=!1,[S,l]=b.useState(!1),[m,_]=b.useState(P(e,v,o)),[h,R]=b.useState(v),[B,Z]=b.useState(0),[w,A]=b.useState({type:"",title:"",description:"",primaryButtonText:"",secondaryButtonText:""});b.useEffect(()=>(B===m.length&&h&&(R(!1),clearInterval(j)),e.fetchState==="Completed"&&_(P(e,!1,o)),()=>{clearInterval(j)}),[m.length,B,h,e.fetchState,v,e,o]);const D=m.length,x=m.filter(u=>u.reviewStatus.code!=="error").length,E=()=>{const{title:u,description:C}=X(x);A({type:"reject",title:u,description:C,primaryButtonText:a.texts.confirm,secondaryButtonText:a.texts.close}),i.trackReimbursementBulkSubmit(t,g,y),l(!0)},F={onOkClick:u=>{l(!1);const C=e.remisForReview.map(I=>I.reimbursement);i.trackReimbursementBulkPopupConfirm(t,g,y,G(C.map(I=>I?.reimbursementTypesIncluded??[]))),d("reject",u)},onCancelClick:()=>{l(!1)}},{title:$,description:L}=Y(p,x,D,h),T=e.fetchState==="Completed"&&x===0,U=()=>{i.trackReimbursementBulkSubmit(t,g,y),d(t)},O=()=>{let u=a.footer.approve;return T?u=a.texts.close:t==="send_for_approval"&&(u=a.footer.submit),{label:u,isDisabled:p!=="Completed"||t==="reject"&&c==="In-Progress",isLoading:c==="In-Progress"&&(t==="send_for_approval"||t==="approve"),onClick:T?n:U,style:t==="send_for_approval"?{minWidth:"92px"}:{}}},N={label:t==="send_for_approval"?a.texts.goBack:a.footer.reject,isDisabled:t!=="reject"&&c==="In-Progress",isLoading:t==="reject"&&c==="In-Progress",reverseSpinnerColor:!1,onClick:t==="send_for_approval"?n:E,style:t==="approve"?{minWidth:"92px"}:{}};return f.jsxs(f.Fragment,{children:[S?f.jsx(V,{titleComponent:f.jsx(M,{children:w.title}),descriptionComponent:f.jsx(q,{children:w.description}),primaryButtonText:w.primaryButtonText,proceedButtonVariant:"danger",secondaryButtonText:w.secondaryButtonText,action:F,isNotesIncluded:!0,isEditPopup:!0}):null,f.jsx(K,{title:$,description:{content:L,isError:e.fetchState==="Completed"&&x===0},reviewItems:m,onCloseReviewItem:r,onCloseOverlay:n,showFooter:e.fetchState==="Completed"&&!h,footerProps:{primaryButton:O(),cancelButton:N,hideCancel:T}})]})},P=(e,o,i)=>{const d=e.fetchState==="In-Progress";return e.remisForReview.map(r=>{const n=J(i,r.submittedBy);return{id:r.transactionId,leftSideText:{title:r.reimbursement?.reportTitle!=null?r.reimbursement.reportTitle:k.reimbursementDetail.newReimbursementTitle,subTitle:n!=null?`${a.by} ${n?.firstName} ${n?.lastName}`:a.strings.empty},rightSideText:{title:W("0,0.[00]",r.reimbursement?.amount?.amount,r.reimbursement?.amount?.currencySymbol),showThunderIcon:!1,subTitle:r.reviewInfoMessage??""},reviewStatus:{isLoading:d,code:r.reviewStatus??""}}})},X=e=>{const{this_:o,these:i,report:d,reports:r,payment:n,payments:p}=a.texts;return e>1?{title:s.popUps.reject.title.replace("__report__",s.reports),description:s.popUps.reject.description.replaceAll("<_this_>",i).replaceAll("<_payment_>",p).replaceAll("__report__",r)}:{title:s.popUps.reject.title.replace("__report__",s.report),description:s.popUps.reject.description.replaceAll("<_this_>",o).replaceAll("<_payment_>",n).replaceAll("__report__",d)}},Y=(e,o,i,d)=>{const{has:r,have:n,report:p,reports:c,are:t,is:g,do_:y,does:v}=a.texts,S=o>1,l=i>1;let m="",_="";return e==="Completed"&&!d?(m=s.reviewPage.reportsReviewed.title.replace("__report__",l?k.bulkActions.reports:s.report).replace("<_has_>",l?n:r),o===0?_=s.reviewPage.reportsReviewed.descriptionError.replace("__report__",l?c:p).replace("<_do_>",l?y:v):_=`${o}/${i} ${s.reviewPage.reportsReviewed.description.replace("__report__",i>1?c:p).replace("<_is_>",S?t:g)}`):(m=s.reviewPage.reportsReviewing.title.replace("__report__",l?c:p),_=s.reviewPage.reportsReviewing.description.replace("__report__",l?c:p)),{title:m,description:_}};export{ce as default};
@@ -1,4 +1,4 @@
1
- import{e as l,V as r,aN as a,b3 as f,O as y,aQ as m,aT as h,bE as g,ai as u,o as c,b4 as b}from"./index-CRNmezJu.js";import{n as s}from"./mui-mhzAEcDs.js";import{a as d}from"./sentry-Dla7mstv.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="b6008cb3-f2c6-4e57-8143-03a3e62be831",e._sentryDebugIdIdentifier="sentry-dbid-b6008cb3-f2c6-4e57-8143-03a3e62be831")}catch{}})();function w({backgroundColor:e,foregroundColor:o,animated:t,width:n,height:i}){return r.jsxs(g,{speed:2,width:n,height:i,viewBox:`0 0 ${n} ${i}`,animate:t!=!1,backgroundColor:e,foregroundColor:o,children:[r.jsx("rect",{x:"64",y:"0",rx:"4",ry:"4",width:`${n-128}`,height:"21"}),r.jsx("rect",{x:"24",y:"45",rx:"4",ry:"4",width:`${n-48}`,height:"228"})]})}function p({backgroundColor:e,foregroundColor:o,animated:t}){return r.jsxs(g,{speed:2,width:240,height:98,viewBox:"0 0 240 98",animate:t!=!1,backgroundColor:e,foregroundColor:o,children:[r.jsx("rect",{x:"66",y:"0",rx:"4",ry:"4",width:"108",height:"21"}),r.jsx("rect",{x:"44",y:"77",rx:"4",ry:"4",width:"152",height:"21"}),r.jsx("rect",{x:"0",y:"29",rx:"4",ry:"4",width:"240",height:"40"})]})}const x=s(h)`
1
+ import{e as l,V as r,aN as a,b3 as f,O as y,aQ as m,aT as h,bE as g,ai as u,o as c,b4 as b}from"./index-e-SZUuyN.js";import{n as s}from"./mui-mhzAEcDs.js";import{a as d}from"./sentry-Dla7mstv.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="b6008cb3-f2c6-4e57-8143-03a3e62be831",e._sentryDebugIdIdentifier="sentry-dbid-b6008cb3-f2c6-4e57-8143-03a3e62be831")}catch{}})();function w({backgroundColor:e,foregroundColor:o,animated:t,width:n,height:i}){return r.jsxs(g,{speed:2,width:n,height:i,viewBox:`0 0 ${n} ${i}`,animate:t!=!1,backgroundColor:e,foregroundColor:o,children:[r.jsx("rect",{x:"64",y:"0",rx:"4",ry:"4",width:`${n-128}`,height:"21"}),r.jsx("rect",{x:"24",y:"45",rx:"4",ry:"4",width:`${n-48}`,height:"228"})]})}function p({backgroundColor:e,foregroundColor:o,animated:t}){return r.jsxs(g,{speed:2,width:240,height:98,viewBox:"0 0 240 98",animate:t!=!1,backgroundColor:e,foregroundColor:o,children:[r.jsx("rect",{x:"66",y:"0",rx:"4",ry:"4",width:"108",height:"21"}),r.jsx("rect",{x:"44",y:"77",rx:"4",ry:"4",width:"152",height:"21"}),r.jsx("rect",{x:"0",y:"29",rx:"4",ry:"4",width:"240",height:"40"})]})}const x=s(h)`
2
2
  justify-content: flex-start;
3
3
  `;function T({dimension:e,animated:o}){const t=l();return r.jsx(a,{dimension:e,children:r.jsx(x,{children:r.jsx(p,{backgroundColor:t.colors.grey3,foregroundColor:t.colors.grey4,animated:o})})})}function D({dimension:e,animated:o}){const t=l();return r.jsx(a,{dimension:e,children:r.jsx(x,{children:r.jsx("div",{style:{width:"100%",height:"100%"},children:r.jsx(b,{children:({height:n,width:i})=>r.jsx(w,{backgroundColor:t.colors.grey3,foregroundColor:t.colors.grey4,animated:o,width:i,height:n})})})})})}const j=e=>d.createElement("svg",{viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},d.createElement("rect",{opacity:.2,width:72,height:72,rx:36,fill:"#97C3B9"}),d.createElement("path",{d:"M46.7755 32.5635L43.8368 36.9716L40.4082 33.0533",stroke:"#97C3B9",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),d.createElement("path",{d:"M34.5307 44.8163C32.6902 44.8163 30.8909 44.2705 29.3605 43.248C27.8301 42.2254 26.6374 40.772 25.933 39.0715C25.2286 37.3711 25.0443 35.4999 25.4034 33.6947C25.7625 31.8895 26.6488 30.2313 27.9503 28.9298C29.2518 27.6283 30.91 26.742 32.7152 26.3829C34.5204 26.0238 36.3916 26.2081 38.092 26.9125C39.7925 27.6169 41.2459 28.8096 42.2685 30.34C43.291 31.8704 43.8369 33.6697 43.8369 35.5102V36.9737",stroke:"#97C3B9",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),C=s(h)`
4
4
  justify-content: space-between;
@@ -1,4 +1,4 @@
1
- import{e as ee,J as de,cd as xe,a9 as ye,V as o,ao as _e,ce as te,ac as we,y as D,aS as $e,o as n,O as oe,cf as ve,cg as ke,ch as Ce,ci as je,cj as Ie,am as he,ck as Se,ai as Ne,aE as X,bE as De,c as f,aW as Oe,al as Pe,au as Ee}from"./index-CRNmezJu.js";import{a as u,S as ue}from"./sentry-Dla7mstv.js";import{n as d}from"./mui-mhzAEcDs.js";import{R as O,I as Fe}from"./CollapsableReportTable-D9EGRkFb-DwhLMO0b.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="a4855c64-123a-4877-b8bc-51a891f7e9f0",e._sentryDebugIdIdentifier="sentry-dbid-a4855c64-123a-4877-b8bc-51a891f7e9f0")}catch{}})();const V=oe.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,Be=e=>({this_period:{start_date:e.thisPeriod.startDate.format(V),end_date:e.thisPeriod.endDate.format(V)},number_of_periods:e.numberOfPeriods,order_by:e.orderBy}),Te=e=>e!=null?{start_date:e.startDate.format(V),end_date:e.endDate.format(V)}:void 0;function Ae(e){return{locale_id:e.localeId,show_negative_amount_in_parenthesis:e.showNegativeAmountInParenthesis,filter_accounts_with_nil_balances:e.filterAccountsWithNilBalances,filter_account_groups_with_nil_balances:e.filterAccountGroupsWithNilBalances,include_cover_page:e.includeCoverPage,company_name:e.companyName,statement_file_type:e.statementFileType,statements:e.statements,first_month_of_fy:e.firstMonthOfFY,book_close_date:e.bookCloseDate!=null?e.bookCloseDate.format(V):void 0,timeframe:e.timeframe,additional_balances:e.additionalBalances,format:e.format,balances_filter:Be(e.balancesFilter),account_view_mode:e.accountViewMode,classes_to_filter_out:e.classesToFilterOut,data_available:Te(e.dataAvailable),is_zeni_coa_used:e.isZeniCOAUsed}}async function ho(e,r,a){const t=oe.getLocalizedStrings().downloadReport,l=`${e}?query=${encodeURIComponent(JSON.stringify(Ae(a)))}`;try{const h=await ve({urlEndPoint:l,authParams:r,fileType:a.statementFileType});if(h.ok){const y=ke(h.headers,t.defaultFileName),_=await h.arrayBuffer();Ce(_,y)}else console.error(`${t.reportErrorMessage} ${h.statusText}`)}catch(h){console.error(`${t.reportErrorMessage} ${JSON.stringify(h)}`)}}const Le=d.div`
1
+ import{e as ee,J as de,cd as xe,a9 as ye,V as o,ao as _e,ce as te,ac as we,y as D,aS as $e,o as n,O as oe,cf as ve,cg as ke,ch as Ce,ci as je,cj as Ie,am as he,ck as Se,ai as Ne,aE as X,bE as De,c as f,aW as Oe,al as Pe,au as Ee}from"./index-e-SZUuyN.js";import{a as u,S as ue}from"./sentry-Dla7mstv.js";import{n as d}from"./mui-mhzAEcDs.js";import{R as O,I as Fe}from"./CollapsableReportTable-D9EGRkFb-rtyJvli3.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="a4855c64-123a-4877-b8bc-51a891f7e9f0",e._sentryDebugIdIdentifier="sentry-dbid-a4855c64-123a-4877-b8bc-51a891f7e9f0")}catch{}})();const V=oe.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,Be=e=>({this_period:{start_date:e.thisPeriod.startDate.format(V),end_date:e.thisPeriod.endDate.format(V)},number_of_periods:e.numberOfPeriods,order_by:e.orderBy}),Te=e=>e!=null?{start_date:e.startDate.format(V),end_date:e.endDate.format(V)}:void 0;function Ae(e){return{locale_id:e.localeId,show_negative_amount_in_parenthesis:e.showNegativeAmountInParenthesis,filter_accounts_with_nil_balances:e.filterAccountsWithNilBalances,filter_account_groups_with_nil_balances:e.filterAccountGroupsWithNilBalances,include_cover_page:e.includeCoverPage,company_name:e.companyName,statement_file_type:e.statementFileType,statements:e.statements,first_month_of_fy:e.firstMonthOfFY,book_close_date:e.bookCloseDate!=null?e.bookCloseDate.format(V):void 0,timeframe:e.timeframe,additional_balances:e.additionalBalances,format:e.format,balances_filter:Be(e.balancesFilter),account_view_mode:e.accountViewMode,classes_to_filter_out:e.classesToFilterOut,data_available:Te(e.dataAvailable),is_zeni_coa_used:e.isZeniCOAUsed}}async function ho(e,r,a){const t=oe.getLocalizedStrings().downloadReport,l=`${e}?query=${encodeURIComponent(JSON.stringify(Ae(a)))}`;try{const h=await ve({urlEndPoint:l,authParams:r,fileType:a.statementFileType});if(h.ok){const y=ke(h.headers,t.defaultFileName),_=await h.arrayBuffer();Ce(_,y)}else console.error(`${t.reportErrorMessage} ${h.statusText}`)}catch(h){console.error(`${t.reportErrorMessage} ${JSON.stringify(h)}`)}}const Le=d.div`
2
2
  padding: 0 ${n.sp3} 0 ${n.sp3};
3
3
  border: 1px solid ${e=>e.theme.colors.primary};
4
4
  background: ${e=>e.theme.colors.grey5};
@@ -1,4 +1,4 @@
1
- import{J as W,e as G,O as y,ax as ge,V as r,bO as _e,aQ as P,bD as be,bC as Se,o as w,aU as we,T as ye,y as B,bP as Ce,c as S,D as A,aE as X,C as xe,aW as Oe,at as Re,bL as Ae}from"./index-CRNmezJu.js";import{a as T,S as K}from"./sentry-Dla7mstv.js";import{n as _}from"./mui-mhzAEcDs.js";import{bg as Z,EN as Be,EW as ve,EX as $,EY as Le,EZ as Te,E_ as Pe,E$ as Ie,F0 as Ne,F1 as ee,F2 as te}from"./zeni-epic-state-CSmiPBaP.js";import{m as z,l as q}from"./analyticsHelper-CLY1vV_E-BemgqSJF.js";import{x as ke}from"./ReportTableViewSelector-KXoOW677-Cxk4-6kw.js";import{a as se,p as Me}from"./TimeRangeSwitcher-Sfz9Zsfu-DOBYaYdI.js";import{M as Fe}from"./TimeframeSwitcherWithToggle-CaOGQOMX-D3Vo1Cjd.js";import{DownloadOverlayButton as $e}from"./DownloadOverlay-D7AI3CGS-DY9OdGrk.js";import{I as Ee,R as M,x as ne}from"./CollapsableReportTable-D9EGRkFb-DwhLMO0b.js";import{D as oe,T as ae,C as E,L as je,g as ie}from"./mapSectionWithAcOnlyToTreeNode-4MBuc1Sm-B6R5EAwN.js";import{s as Y}from"./mapTimeframeBalancesToTreeNode-D4r2BVXx-DnEFsarG.js";import{d as Ve,l as De}from"./mapTimeframeHeaderLoadingInProgressToTreeNode-nP8CDp4j-BxTMyk7D.js";import{d as ze}from"./mapLoadingInProgressToTreeNode-C4CzR5xS-Cg81Asz9.js";import"./liveblocks-BKvkleJ3.js";import"./core-hVMF2uNa.js";import"./recharts-BErFcng5.js";import"./lottie-N_bekW9H.js";import"./analytics-g5EpLRud.js";import"./lexical-DYQnWL1V.js";import"./utils-D6NmQd1Q.js";import"./TimeframeSwitcher--oC4RNb6-CvfDTC-U.js";import"./page-detail-CWX5S47F-C7t8NOxn.js";import"./AccountRow-C0plHrDu-BlMGnWxc.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f6c6a5a6-0d10-4d4b-9784-c6a7cd2af631",e._sentryDebugIdIdentifier="sentry-dbid-f6c6a5a6-0d10-4d4b-9784-c6a7cd2af631")}catch{}})();function ce({section:e,sectionId:t,numOfBalances:o,config:a}){return ne("no_filter",a.filterAccountsWithNilBalances,a.filterAccountGroupsWithNilBalances).compactedAccountGroupsSelector(e.accountGroups).map(n=>Ue({accountGroup:n,sectionType:t,numOfBalances:o,title:n.accountGroupName,isLastNode:!0,config:a}))}function Ue({accountGroup:e,sectionType:t,numOfBalances:o,title:a,isLastNode:n,config:d}){const p=M("section",[],a+t),l={children:[],id:p,isLastNode:n,reportElementData:{element:{kind:"section",title:a,sectionType:t,data:e,numOfBalances:o},config:d}},i=ne("no_filter",d.filterAccountsWithNilBalances,d.filterAccountGroupsWithNilBalances).compactedAccountsSelectorVariant(e.accounts),u=i.map((g,h)=>ie({account:g,sectionType:t,numOfBalances:o,title:g.account.accountName,config:d,isLastNode:h===i.length-1,parentNodeIDs:[p],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:i.length>1,hasChildren:g.children.length>0,isLastNode:h===i.length-1}]}}));return l.children.push(...u),l}function re({sectionWithAcOnly:e,sectionType:t,numOfBalances:o,config:a}){return e.accounts.map((n,d)=>ie({account:n,sectionType:t,numOfBalances:o,title:n.account.accountName,config:a,isLastNode:d===e.accounts.length-1,parentNodeIDs:[],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:e.accounts.length>1,hasChildren:n.children.length>0,isLastNode:d===e.accounts.length-1}]}}))}function le({balances:e,config:t,nodeId:o}){return{children:[],id:o??M("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:t.mode==="actual_vs_forecast"?"timeframe_headers_with_forecast":"timeframe_headers",title:"",data:e,numOfBalances:e.length},config:t}}}function We(e,t,o,a=!0){Object.assign(e.config,t);const n=de(o),d=Y({balances:n,config:t});return{config:t,headerNodes:a?[d]:[],contentNodes:[d,...e.contentNodes.slice(1)]}}const de=e=>{switch(e.reportId){case"profit_and_loss":{const t=e;return t.sections.expenses.balances.length>0?[...t.sections.expenses.balances,...t.sections.expenses.additionalBalances]:[...t.sections.income.balances,...t.sections.income.additionalBalances]}case"profit_and_loss_by_classes":{const t=e;return t.sections.expenses.balances.length>0?[...t.sections.expenses.balances,...t.sections.expenses.additionalBalances]:[...t.sections.income.balances,...t.sections.income.additionalBalances]}case"cash_flow":{const t=e;return[...t.calculatedSections.operatingActivitiesTotal.balances,...t.calculatedSections.operatingActivitiesTotal.additionalBalances]}case"balance_sheet":{const t=e;let o=[];return Object.keys(t.sections).forEach(a=>{t.sections[a].balances.length>0&&(o=[...t.sections[a].balances,...t.sections[a].additionalBalances])}),o}default:return[]}};function Ge(e,t,o=!0){const a=y.getLocalizedStrings().reports.sections,n=y.getLocalizedStrings().reports.balanceSheet,d=de(e),p=t.mode!=null&&t.mode==="this_period_vs_period_before"&&d.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,l=le({balances:d,config:t}),i=[];return i.push(l),Object.keys(e.rootSectionsWithSubSectionIds).forEach(u=>{const g=M("title_string_only",[],u),h={children:[],id:g,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:a[u],data:void 0,numOfBalances:0},config:t}};i.push(h),e.rootSectionsWithSubSectionIds[u].forEach(s=>{if(Le(s)===!0)if(e.sections[s].accountGroups.length>0)if(s==="equity"){const c=ce({sectionId:s,section:e.sections[s],numOfBalances:p,config:t});i.push(...c)}else i.push(oe({section:e.sections[s],sectionType:s,numOfBalances:p,title:n[s],isLastNode:!0,config:t}));else if(s==="equity"){const c=re({sectionWithAcOnly:e.sections[s],sectionType:s,numOfBalances:p,config:t});i.push(...c)}else{const c=e.sections[s];i.push(ae({sectionWithAcOnly:c,sectionType:s,numOfBalances:p,title:n[s],isLastNode:!0,config:t}))}else Te(s)===!0&&i.push(E({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:i}}function Ye({calculatedSection:e,numOfBalances:t,title:o,isLastNode:a,config:n}){return{children:[],id:M("calculated_section_type1",[],o),isLastNode:a,reportElementData:{element:{kind:"calculated_section_type1",title:o,data:e,numOfBalances:t},config:n}}}function He(e,t,o=!0){const a=y.getLocalizedStrings().reports.sections,n=y.getLocalizedStrings().reports.cashFlow,d=[...e.calculatedSections.operatingActivitiesTotal.balances,...e.calculatedSections.operatingActivitiesTotal.additionalBalances],p=t.mode!=null&&t.mode==="this_period_vs_period_before"&&d.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,l=le({balances:d,config:t}),i=[];return Object.keys(e.rootSectionsWithSubSectionIds).forEach(u=>{const g=M("title_string_only",[],u),h={children:[],id:g,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:a[u],data:void 0,numOfBalances:0},config:t}};i.push(h),e.rootSectionsWithSubSectionIds[u].forEach(s=>{if(Pe(s)===!0)if(e.sections[s].accountGroups.length>0){const c=ce({sectionId:s,section:e.sections[s],numOfBalances:p,config:t});i.push(...c)}else{const c=re({sectionWithAcOnly:e.sections[s],sectionType:s,numOfBalances:p,config:t});i.push(...c)}else Ie(s)===!0?i.push(Ye({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t})):Ne(s)===!0&&i.push(E({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:[l,...i]}}function Ze(e,t,o=!0,a=!1){const n=y.getLocalizedStrings().reports,d=y.getLocalizedStrings().common;let p=[];const l=[];let i=[];if(a===!0){const u=Ve({title:d.loading,balances:[],config:t});u.reportElementData.element.numOfBalances=6,o&&(i=[u]),l.push(u),[...Array(8)].forEach((g,h)=>{const s=h%4;let c=De[s];const C=ze({title:`${h}+${c}`,balances:p,config:t});C.reportElementData.element.numOfBalances=6,l.push(C)})}else{const u=e.sections.expenses.balances.length>0?[...e.sections.expenses.balances,...e.sections.expenses.additionalBalances]:e.sections.income.balances.length>0?[...e.sections.income.balances,...e.sections.income.additionalBalances]:e.sections.cogs.balances.length>0?[...e.sections.cogs.balances,...e.sections.cogs.additionalBalances]:e.sections.otherIncome.balances.length>0?[...e.sections.otherIncome.balances,...e.sections.otherIncome.additionalBalances]:e.sections.otherExpenses.balances.length>0?[...e.sections.otherExpenses.balances,...e.sections.otherExpenses.additionalBalances]:[],g=Y({balances:u,config:t}),h=t.mode!=null&&t.mode==="this_period_vs_period_before"&&u.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1;l.push(g),o&&(i=[g]),e.idsInOrder.forEach(s=>{if(ee(s)===!0){const c=e.sections[s];c!=null&&l.push(je({section:c,sectionType:s,numOfBalances:h,title:n.sections[s],isLastNode:!0,config:t}))}else if(te(s)===!0){const c=e.calculatedSections[s];c!=null&&l.push(E({calculatedSection:c,numOfBalances:h,title:n.sections[s],isLastNode:!0,config:t}))}})}return{config:t,headerNodes:i,contentNodes:l}}function qe(e,t,o=!0){const a=y.getLocalizedStrings().reports,n=e.sections.expenses!=null&&e.sections.expenses.balances.length>0?[...e.sections.expenses.balances,...e.sections.expenses.additionalBalances]:e.sections.income!=null&&e.sections.income.balances.length>0?[...e.sections.income.balances,...e.sections.income.additionalBalances]:e.sections.cogs!=null&&e.sections.cogs.balances.length>0?[...e.sections.cogs.balances,...e.sections.cogs.additionalBalances]:e.sections.otherIncome!=null&&e.sections.otherIncome.balances.length>0?[...e.sections.otherIncome.balances,...e.sections.otherIncome.additionalBalances]:e.sections.otherExpenses!=null&&e.sections.otherExpenses.balances.length>0?[...e.sections.otherExpenses.balances,...e.sections.otherExpenses.additionalBalances]:[],d=t.mode!=null&&t.mode==="this_period_vs_period_before"&&n.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,p=Y({balances:n,config:t}),l=[];return l.push(p),e.idsInOrder.forEach(i=>{if(ee(i)===!0&&(e.sections[i].accountGroups.length>0?l.push(oe({section:e.sections[i],sectionType:i,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t})):l.push(ae({sectionWithAcOnly:e.sections[i],sectionType:i,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))),te(i)===!0){const u=e.calculatedSections[i];u!=null&&l.push(E({calculatedSection:u,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))}}),{config:t,headerNodes:o?[p]:[],contentNodes:l}}const J={contentPaddingLeft:new B(S[0],S[0],S[0]),contentPaddingRight:new B(S[3],S[3],S[8])},Je=_.div`
1
+ import{J as W,e as G,O as y,ax as ge,V as r,bO as _e,aQ as P,bD as be,bC as Se,o as w,aU as we,T as ye,y as B,bP as Ce,c as S,D as A,aE as X,C as xe,aW as Oe,at as Re,bL as Ae}from"./index-e-SZUuyN.js";import{a as T,S as K}from"./sentry-Dla7mstv.js";import{n as _}from"./mui-mhzAEcDs.js";import{bg as Z,EN as Be,EW as ve,EX as $,EY as Le,EZ as Te,E_ as Pe,E$ as Ie,F0 as Ne,F1 as ee,F2 as te}from"./zeni-epic-state-CSmiPBaP.js";import{m as z,l as q}from"./analyticsHelper-CLY1vV_E-BwSnChaf.js";import{x as ke}from"./ReportTableViewSelector-KXoOW677-VB10UJ6e.js";import{a as se,p as Me}from"./TimeRangeSwitcher-Sfz9Zsfu-C7Lz4In0.js";import{M as Fe}from"./TimeframeSwitcherWithToggle-CaOGQOMX-IGT58opJ.js";import{DownloadOverlayButton as $e}from"./DownloadOverlay-D7AI3CGS-BSXz1TYL.js";import{I as Ee,R as M,x as ne}from"./CollapsableReportTable-D9EGRkFb-rtyJvli3.js";import{D as oe,T as ae,C as E,L as je,g as ie}from"./mapSectionWithAcOnlyToTreeNode-4MBuc1Sm-CE09aSrt.js";import{s as Y}from"./mapTimeframeBalancesToTreeNode-D4r2BVXx-BgK_pIe_.js";import{d as Ve,l as De}from"./mapTimeframeHeaderLoadingInProgressToTreeNode-nP8CDp4j-H65zpMKu.js";import{d as ze}from"./mapLoadingInProgressToTreeNode-C4CzR5xS-BKTQHVzy.js";import"./liveblocks-BKvkleJ3.js";import"./core-hVMF2uNa.js";import"./recharts-BErFcng5.js";import"./lottie-N_bekW9H.js";import"./analytics-g5EpLRud.js";import"./lexical-DYQnWL1V.js";import"./utils-D6NmQd1Q.js";import"./TimeframeSwitcher--oC4RNb6-9wGsnDTh.js";import"./page-detail-CWX5S47F-C7t8NOxn.js";import"./AccountRow-C0plHrDu-BHbrjlQa.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f6c6a5a6-0d10-4d4b-9784-c6a7cd2af631",e._sentryDebugIdIdentifier="sentry-dbid-f6c6a5a6-0d10-4d4b-9784-c6a7cd2af631")}catch{}})();function ce({section:e,sectionId:t,numOfBalances:o,config:a}){return ne("no_filter",a.filterAccountsWithNilBalances,a.filterAccountGroupsWithNilBalances).compactedAccountGroupsSelector(e.accountGroups).map(n=>Ue({accountGroup:n,sectionType:t,numOfBalances:o,title:n.accountGroupName,isLastNode:!0,config:a}))}function Ue({accountGroup:e,sectionType:t,numOfBalances:o,title:a,isLastNode:n,config:d}){const p=M("section",[],a+t),l={children:[],id:p,isLastNode:n,reportElementData:{element:{kind:"section",title:a,sectionType:t,data:e,numOfBalances:o},config:d}},i=ne("no_filter",d.filterAccountsWithNilBalances,d.filterAccountGroupsWithNilBalances).compactedAccountsSelectorVariant(e.accounts),u=i.map((g,h)=>ie({account:g,sectionType:t,numOfBalances:o,title:g.account.accountName,config:d,isLastNode:h===i.length-1,parentNodeIDs:[p],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:i.length>1,hasChildren:g.children.length>0,isLastNode:h===i.length-1}]}}));return l.children.push(...u),l}function re({sectionWithAcOnly:e,sectionType:t,numOfBalances:o,config:a}){return e.accounts.map((n,d)=>ie({account:n,sectionType:t,numOfBalances:o,title:n.account.accountName,config:a,isLastNode:d===e.accounts.length-1,parentNodeIDs:[],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:e.accounts.length>1,hasChildren:n.children.length>0,isLastNode:d===e.accounts.length-1}]}}))}function le({balances:e,config:t,nodeId:o}){return{children:[],id:o??M("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:t.mode==="actual_vs_forecast"?"timeframe_headers_with_forecast":"timeframe_headers",title:"",data:e,numOfBalances:e.length},config:t}}}function We(e,t,o,a=!0){Object.assign(e.config,t);const n=de(o),d=Y({balances:n,config:t});return{config:t,headerNodes:a?[d]:[],contentNodes:[d,...e.contentNodes.slice(1)]}}const de=e=>{switch(e.reportId){case"profit_and_loss":{const t=e;return t.sections.expenses.balances.length>0?[...t.sections.expenses.balances,...t.sections.expenses.additionalBalances]:[...t.sections.income.balances,...t.sections.income.additionalBalances]}case"profit_and_loss_by_classes":{const t=e;return t.sections.expenses.balances.length>0?[...t.sections.expenses.balances,...t.sections.expenses.additionalBalances]:[...t.sections.income.balances,...t.sections.income.additionalBalances]}case"cash_flow":{const t=e;return[...t.calculatedSections.operatingActivitiesTotal.balances,...t.calculatedSections.operatingActivitiesTotal.additionalBalances]}case"balance_sheet":{const t=e;let o=[];return Object.keys(t.sections).forEach(a=>{t.sections[a].balances.length>0&&(o=[...t.sections[a].balances,...t.sections[a].additionalBalances])}),o}default:return[]}};function Ge(e,t,o=!0){const a=y.getLocalizedStrings().reports.sections,n=y.getLocalizedStrings().reports.balanceSheet,d=de(e),p=t.mode!=null&&t.mode==="this_period_vs_period_before"&&d.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,l=le({balances:d,config:t}),i=[];return i.push(l),Object.keys(e.rootSectionsWithSubSectionIds).forEach(u=>{const g=M("title_string_only",[],u),h={children:[],id:g,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:a[u],data:void 0,numOfBalances:0},config:t}};i.push(h),e.rootSectionsWithSubSectionIds[u].forEach(s=>{if(Le(s)===!0)if(e.sections[s].accountGroups.length>0)if(s==="equity"){const c=ce({sectionId:s,section:e.sections[s],numOfBalances:p,config:t});i.push(...c)}else i.push(oe({section:e.sections[s],sectionType:s,numOfBalances:p,title:n[s],isLastNode:!0,config:t}));else if(s==="equity"){const c=re({sectionWithAcOnly:e.sections[s],sectionType:s,numOfBalances:p,config:t});i.push(...c)}else{const c=e.sections[s];i.push(ae({sectionWithAcOnly:c,sectionType:s,numOfBalances:p,title:n[s],isLastNode:!0,config:t}))}else Te(s)===!0&&i.push(E({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:i}}function Ye({calculatedSection:e,numOfBalances:t,title:o,isLastNode:a,config:n}){return{children:[],id:M("calculated_section_type1",[],o),isLastNode:a,reportElementData:{element:{kind:"calculated_section_type1",title:o,data:e,numOfBalances:t},config:n}}}function He(e,t,o=!0){const a=y.getLocalizedStrings().reports.sections,n=y.getLocalizedStrings().reports.cashFlow,d=[...e.calculatedSections.operatingActivitiesTotal.balances,...e.calculatedSections.operatingActivitiesTotal.additionalBalances],p=t.mode!=null&&t.mode==="this_period_vs_period_before"&&d.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,l=le({balances:d,config:t}),i=[];return Object.keys(e.rootSectionsWithSubSectionIds).forEach(u=>{const g=M("title_string_only",[],u),h={children:[],id:g,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:a[u],data:void 0,numOfBalances:0},config:t}};i.push(h),e.rootSectionsWithSubSectionIds[u].forEach(s=>{if(Pe(s)===!0)if(e.sections[s].accountGroups.length>0){const c=ce({sectionId:s,section:e.sections[s],numOfBalances:p,config:t});i.push(...c)}else{const c=re({sectionWithAcOnly:e.sections[s],sectionType:s,numOfBalances:p,config:t});i.push(...c)}else Ie(s)===!0?i.push(Ye({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t})):Ne(s)===!0&&i.push(E({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:[l,...i]}}function Ze(e,t,o=!0,a=!1){const n=y.getLocalizedStrings().reports,d=y.getLocalizedStrings().common;let p=[];const l=[];let i=[];if(a===!0){const u=Ve({title:d.loading,balances:[],config:t});u.reportElementData.element.numOfBalances=6,o&&(i=[u]),l.push(u),[...Array(8)].forEach((g,h)=>{const s=h%4;let c=De[s];const C=ze({title:`${h}+${c}`,balances:p,config:t});C.reportElementData.element.numOfBalances=6,l.push(C)})}else{const u=e.sections.expenses.balances.length>0?[...e.sections.expenses.balances,...e.sections.expenses.additionalBalances]:e.sections.income.balances.length>0?[...e.sections.income.balances,...e.sections.income.additionalBalances]:e.sections.cogs.balances.length>0?[...e.sections.cogs.balances,...e.sections.cogs.additionalBalances]:e.sections.otherIncome.balances.length>0?[...e.sections.otherIncome.balances,...e.sections.otherIncome.additionalBalances]:e.sections.otherExpenses.balances.length>0?[...e.sections.otherExpenses.balances,...e.sections.otherExpenses.additionalBalances]:[],g=Y({balances:u,config:t}),h=t.mode!=null&&t.mode==="this_period_vs_period_before"&&u.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1;l.push(g),o&&(i=[g]),e.idsInOrder.forEach(s=>{if(ee(s)===!0){const c=e.sections[s];c!=null&&l.push(je({section:c,sectionType:s,numOfBalances:h,title:n.sections[s],isLastNode:!0,config:t}))}else if(te(s)===!0){const c=e.calculatedSections[s];c!=null&&l.push(E({calculatedSection:c,numOfBalances:h,title:n.sections[s],isLastNode:!0,config:t}))}})}return{config:t,headerNodes:i,contentNodes:l}}function qe(e,t,o=!0){const a=y.getLocalizedStrings().reports,n=e.sections.expenses!=null&&e.sections.expenses.balances.length>0?[...e.sections.expenses.balances,...e.sections.expenses.additionalBalances]:e.sections.income!=null&&e.sections.income.balances.length>0?[...e.sections.income.balances,...e.sections.income.additionalBalances]:e.sections.cogs!=null&&e.sections.cogs.balances.length>0?[...e.sections.cogs.balances,...e.sections.cogs.additionalBalances]:e.sections.otherIncome!=null&&e.sections.otherIncome.balances.length>0?[...e.sections.otherIncome.balances,...e.sections.otherIncome.additionalBalances]:e.sections.otherExpenses!=null&&e.sections.otherExpenses.balances.length>0?[...e.sections.otherExpenses.balances,...e.sections.otherExpenses.additionalBalances]:[],d=t.mode!=null&&t.mode==="this_period_vs_period_before"&&n.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,p=Y({balances:n,config:t}),l=[];return l.push(p),e.idsInOrder.forEach(i=>{if(ee(i)===!0&&(e.sections[i].accountGroups.length>0?l.push(oe({section:e.sections[i],sectionType:i,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t})):l.push(ae({sectionWithAcOnly:e.sections[i],sectionType:i,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))),te(i)===!0){const u=e.calculatedSections[i];u!=null&&l.push(E({calculatedSection:u,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))}}),{config:t,headerNodes:o?[p]:[],contentNodes:l}}const J={contentPaddingLeft:new B(S[0],S[0],S[0]),contentPaddingRight:new B(S[3],S[3],S[8])},Je=_.div`
2
2
  height: ${e=>e.height}px;
3
3
  width: 99.9%;
4
4
  margin-top: ${w.sp2};
@@ -1,4 +1,4 @@
1
- import{e as A,V as a,O as D,J as de,b4 as Q,c as I,b as M,aZ as J,o as m,aQ as Ae,p as g,aE as Ve,y as xe,bM as ge,al as R,bN as V,bb as F}from"./index-CRNmezJu.js";import{a as P,S as ee}from"./sentry-Dla7mstv.js";import{n as x}from"./mui-mhzAEcDs.js";import{p as b,d as ae,y as W,b as N,g as re,u as T}from"./chartTypes-BjaXr-A2-DXtLo4Yx.js";import{i as K,h as oe,c as G}from"./toCOABalancesWithID-DPAmy3GS-lyRBWxwk.js";import{V as Z}from"./toChartData-D5QdTlGa-DOsyIRYt.js";import{H as Te,I as te,X as le,Y as ne,J as se,L as pe,K as ce,M as me,N as fe}from"./recharts-BErFcng5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="91f6f3f3-405e-460e-8f7a-e858061071f5",e._sentryDebugIdIdentifier="sentry-dbid-91f6f3f3-405e-460e-8f7a-e858061071f5")}catch{}})();const X={legendLabelMarginLeft:new xe(2,2),legendLabelMarginRight:new xe(I[3],I[4])},Fe=x.div`
1
+ import{e as A,V as a,O as D,J as de,b4 as Q,c as I,b as M,aZ as J,o as m,aQ as Ae,p as g,aE as Ve,y as xe,bM as ge,al as R,bN as V,bb as F}from"./index-e-SZUuyN.js";import{a as P,S as ee}from"./sentry-Dla7mstv.js";import{n as x}from"./mui-mhzAEcDs.js";import{p as b,d as ae,y as W,b as N,g as re,u as T}from"./chartTypes-BjaXr-A2-D3DBmfud.js";import{i as K,h as oe,c as G}from"./toCOABalancesWithID-DPAmy3GS-PiTKgxz9.js";import{V as Z}from"./toChartData-D5QdTlGa-DLv4zZlP.js";import{H as Te,I as te,X as le,Y as ne,J as se,L as pe,K as ce,M as me,N as fe}from"./recharts-BErFcng5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="91f6f3f3-405e-460e-8f7a-e858061071f5",e._sentryDebugIdIdentifier="sentry-dbid-91f6f3f3-405e-460e-8f7a-e858061071f5")}catch{}})();const X={legendLabelMarginLeft:new xe(2,2),legendLabelMarginRight:new xe(I[3],I[4])},Fe=x.div`
2
2
  display: flex;
3
3
  `,He=x.div`
4
4
  margin: ${m.sp2} ${m.sp0} ${m.sp2} ${m.sp0};
@@ -1,4 +1,4 @@
1
- import{J as Tt,ax as Ct,y as u,f3 as Dt,f4 as It,f5 as kt,V as t,f6 as Pt,f7 as le,f8 as Mt,f9 as At,fa as Bt,fb as Ft,aO as M,fc as Rt,aQ as j,fd as Lt,fe as Ae,ff as Be,fg as Fe,b as G,fh as O,p as S,fi as zt,fj as E,fk as _,fl as Nt,fm as Ot,bT as Re,o as n,aS as Et,c as d,O as _t,ag as Wt,c2 as Zt,F as Kt,M as Vt,fn as qt,ci as Yt,al as de,am as ce,fo as Gt,fp as Ht,bj as Ut,l as Xt,ba as Jt,fq as Qt,aq as et,bK as en,ai as tt,bu as tn,fr as nn}from"./index-CRNmezJu.js";import{a as Z}from"./sentry-Dla7mstv.js";import{n as i}from"./mui-mhzAEcDs.js";import{bo as Le,bm as ze,bH as I,bN as an,Fv as ln,bL as oe,bP as on}from"./zeni-epic-state-CSmiPBaP.js";import{t as rn,o as sn}from"./LowBalancePopup-ChBTdcM2-CwIZnZTi.js";import{S as W}from"./LabeledText-D0g7m29R-CGPY2mDY.js";import"./liveblocks-BKvkleJ3.js";import"./core-hVMF2uNa.js";import"./recharts-BErFcng5.js";import"./lottie-N_bekW9H.js";import"./analytics-g5EpLRud.js";import"./lexical-DYQnWL1V.js";import"./utils-D6NmQd1Q.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},y=new e.Error().stack;y&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[y]="603549ff-4b02-4695-8f80-343929366bbf",e._sentryDebugIdIdentifier="sentry-dbid-603549ff-4b02-4695-8f80-343929366bbf")}catch{}})();const nt=["small","medium-compact","medium-regular"],m={largeLabelWidth:new u(150,215,215),infoMinWidth:new u(0,0,0,142,142),infoMarginRight:new u(0,0,0,d[2],d[2]),footerButtonWidth:new u(120,165),iconContainerMarginTop:new u(6,d[1]),navBarContainerPaddingTop:new u(10,d[3]),sectionTitleMarginLeft:new u(d[3],d[0]),reviewContainerMarginLeft:new u(d[3],d[6]),reviewContainerMarginRight:new u(d[3],d[8]),footerRightIconMarginRight:new u(d[0],d[0],d[7]),infoLabelPaddingRight:new u(d[0],d[3]),infoLabelMarginTop:new u(d[1],d[0])},dn={sectionTitle:new Kt("h6Medium","h5Medium")},{dateFormat:Ne,common:{currency:v,labels:Oe,edit:cn,strings:{empty:h}},spendManagement:{billPay:mn}}=_t.getLocalizedStrings(),{billDetails:a,paymentDetails:Ee}=mn,_e=({attachment:e})=>{const[y,f]=Z.useState(!1),A=()=>{f(!1)},T=e.fileId?.length===0;return t.jsxs(On,{isDisabled:e.fileId?.length===0,"data-testid":j("attachment-tag",e.fileName),onClick:()=>T===!1?f(!0):null,children:[y&&e?.fileDownloadUrl!=null?t.jsx(Gt,{title:e.fileName,file:e,onCrossClick:()=>A(),setShowFullScreenView:f}):null,t.jsx(En,{children:t.jsx(Ht,{contentType:e.contentType})})]})},di=({billDetails:e,billpayApprovalView:y,isBillPayCommentingEnabled:f,currentTenant:A,isInternationalPaymentShaVsOurEnabled:T,isLocalCurrencyEnabled:it,style:at,analytics:w,isRecurringBillsFeatureEnabled:lt,isApprovalRequiredForMarkAsPaid:ot,isDetectInsufficientFundsEnabled:rt,billId:x,onClickEdit:me,discardBillDetailsFromLocalStore:pe,saveBillDetails:ue,discardOutsideZeniPaymentData:st,updateBillDetailSaveBillCode:ye,redirectToBillsScreen:he,onAttachmentClick:J,retryPayment:dt})=>{const s=Tt(),c=Ct(),B={application:"dashboard",companyId:c.currentTenant?.companyId,tab:"bill",entityId:x},F=f&&x!=null,R=`dashboard_${c.currentTenant?.companyId}`,L=m.largeLabelWidth.value(s),z=e.saveStatus,Q=e.zeniAssistRetryStatus,ee=e.vendor?.vendorCurrencyCode,o=Dt(T,it,e.billPayConfigList.filter(l=>l.method.includes(e.paymentDetailsSection?.withdrawFrom?.accType??"depositAccount")),e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod,e.paymentDetailsSection?.paymentType,ee),C=Ne.visual.MMMDCommaYYYYformat,fe={amount:e.recipientTotalAmount.amount/(e.paymentDetailsSection?.conversionRate??1)*100/100,currencyCode:v.currencyCode,currencySymbol:v.currencySymbol},p={amount:o?.method.includes("international")===!0?It(fe,o):e.recipientTotalAmount.amount+(o?.fee.amount??0),currencyCode:v.currencyCode,currencySymbol:v.currencySymbol},N={amount:o?.method.includes("international")===!0?kt(fe,o):o?.fee.amount??0,currencyCode:v.currencyCode,currencySymbol:v.currencySymbol},[ct,ge]=Z.useState(!1),[mt,xe]=Z.useState(!1),be=()=>ge(!1),pt=()=>{w.trackBillPayMagicLinkPreviewEmail("review_bill"),ge(!0)},ut=e.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${a.magicLink.collectFrom} ${e.toAccountVendorEmail}`,t.jsx(Ln,{size:s,children:t.jsx(Rn,{})})]}):Pt(e.paymentDetailsSection?.paymentTo);Z.useEffect(()=>{(z?.fetchState==="Completed"||Q?.fetchState==="Completed")&&(pe(),ye(),he())},[z,Q,he,pe,ye]);const $=e.billPayInfo?.stage,k=e.billPayInfo?.billStatus,K=e.billPayInfo?.billPaymentStatus,yt=e.billPayInfo?.billPaymentRefundStatus,te=$?.code==="paid"?$:k?.code=="approved"&&K?.code?K:k,ht=e.billPayInfo?.isRefundInitiated===!0?yt:k?.code=="approved"&&K?.code?K:k,ne=()=>{me()},we=()=>{me()},V=e.paymentDetailsSection?.paymentDate,ie=le(o?.method??""),$e=ie.replace("Same Day",""),ft=e.isCollectToAccountInfoFromVendorContact?t.jsx(Mt,{paymentTypeLabel:$e,onClick:pt}):a.addedByZeni,q=y.allApprovalRules.length>0,gt=Le(o?.method!=null&&(o.method.includes(I)||o?.fee.amount!=null&&o.fee.amount!==0)?p.amount-N.amount:p.amount,o?.fee.currencyCode??ze.currencyCode,o?.fee.currencySymbol??ze.currencySymbol),g=an(e.paymentDetailsSection?.paymentType?.method),xt=l=>{w.trackBillPayMarkAsPaidSubmit(l.paymentMode??"other",$?.code??"draft",te?.code??""),ue(!0,l)},ve=()=>{xe(!0),w.trackBillPayMarkAsPaid($?.code??"draft",te?.code??"")},bt=()=>{st(),xe(!1)},P=g&&($?.code!=null?$.code==="draft"||k?.code==="approved":!0),b=P&&!ot,je=We(b,q,e.isBillMarkedForRetry),wt=()=>g?b?void 0:a.paymentOutsideZeni.reviewInfo:o?.method!=null&&o.method.includes(I)&&e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod!=null&&T&&ee===v.currencyCode?Qt(e.paymentDetailsSection.internationalTransferFeeBearerPaymentMethod):void 0,ae=rt&&e.paymentDetailsSection!=null?At(p,e.paymentDetailsSection.withdrawFrom,e.paymentDetailsSection.paymentDate):void 0,$t=()=>{const l=e.paymentDetailsSection?.paymentDate,r=e.isCollectToAccountInfoFromVendorContact,D=e.recurringConfig,jt=e.recipientTotalAmount;if(e.isInvoiceDateAutoUpdated===!0&&w.trackBillPayAutoDateChange(x??"new_bill"),o?.method!=null&&l!=null){const St=g?a.paymentOutsideZeni.offline:le(o.method);if(w.trackBillPaySendForApproval(St,l.format(Ne.analytics.MMMDashDDDashYYYYFormat),r,e.isRecurring,x,e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod,{startDate:oe(D?.startDate?.toString()??"").format(C),endDate:oe(D?.endDate?.toString()??"").format(C),frequency:D?.frequency??"monthly",totalAmount:jt.amount,totalPaymentCycles:D?.totalPaymentCycles??0,isApprovalRequired:D?.isApprovalRequired??!1,updateCurrentBill:e.recurringConfig?.id!=null?D?.updateRecurringBills==="current":void 0,updateFutureRecurringBills:e.recurringConfig?.id!=null?D?.updateRecurringBills==="all":void 0}),ae!=null){const Ce=$?.code??"draft",De=k?.code??"",Ie=e.isRecurring?["Recurring"]:["One-Time"],ke=e.invoiceNumber??"",Pe=nn(c.loggedInUser),Me=e.paymentDetailsSection?.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account";je===a.scheduleBill?w.trackLowBalanceAccountSchedule(Ce,De,Ie,ke,Pe,Me):je===a.sendForApproval&&w.trackLowBalanceAccountSentForApproval(Ce,De,Ie,ke,Pe,Me)}}},Se=()=>{Te===!0&&Y(!1),e.isBillMarkedForRetry===!0?(dt(),w.trackRetryConfirmClick(te?.code??"",$?.code??"",ht?.description??"",e.isRecurring?["Recurring"]:["One-Time"],e.invoiceNumber??"")):e.vendor!=null&&($t(),ue(!1,{}))},vt=ln(p.amount,y.allApprovalRules,c.loggedInUser),[Te,Y]=Z.useState(!1);return t.jsxs($n,{children:[mt?t.jsx(rn,{onCancel:bt,onProceedForMarkAsPaid:xt,saveDetailsFetchState:z?.fetchState,paymentData:e.outsideZeniPaymentInfo}):null,Te?t.jsx(sn,{withdrawFrom:e.paymentDetailsSection?.withdrawFrom,paymentDate:e.paymentDetailsSection?.paymentDate,onOkClick:Se,onCancelClick:()=>{Y(!1),ne()},onClickAway:()=>{Y(!1)}}):null,t.jsx(Bt,{anchor:"right",open:ct,onClose:be,transitionDuration:250,"data-testid":j("vendor-email-preview-drawer"),children:t.jsx(Ft,{companyName:Rt(A.company?.companyInfo),vendor:e.vendor?.name,paymentDate:V?.format(C)??"",paymentType:$e,amount:M("0,0[.]00",p),isInvoiceAttached:!!e.file,onClose:be})}),t.jsxs(vn,{windowSize:s,style:at,children:[s==="small"?t.jsxs(Fn,{windowSize:s,children:[t.jsx(He,{onClick:we,"data-testid":j("review-detail-nav-bar-small-back")}),t.jsx(Ve,{windowSize:s,children:a.oneLastLook})]}):t.jsx(Bn,{"data-testid":j("review-details-nav-bar-back"),children:t.jsx(He,{onClick:we})}),s!=="small"?t.jsx(Sn,{children:t.jsx(Ve,{windowSize:s,children:a.oneLastLook})}):null,e.duplicateBillTransactions.length>0?t.jsxs(Tn,{children:[t.jsxs(Cn,{children:[t.jsx(qn,{}),t.jsxs(Dn,{children:[t.jsx(kn,{children:a.duplicateBillPayWarning}),t.jsxs(In,{children:[a.duplicateBillPayWarningSubHeading,t.jsxs("span",{"data-testid":j("review-detail-attachment-button"),onClick:()=>J(e.duplicateBillTransactions[0].id,e.duplicateBillTransactions[0].billPayInfo.stage.code),style:{textDecoration:"underline",cursor:"pointer"},children:[a.viewBill,e.duplicateBillTransactions[0].documentId]})]})]})]}),t.jsxs(Zn,{children:[t.jsx(Vn,{children:a.duplicateInvoiceFound}),e.duplicateBillTransactions.map(l=>{const r=Lt(l);return l!=null?t.jsx(Kn,{children:nt.includes(s)?t.jsxs(qe,{windowSize:s,children:[t.jsxs(Pn,{children:[t.jsxs(Mn,{children:[l.attachments&&l.attachments.length>0?t.jsx(_e,{attachment:l.attachments[0]}):t.jsx(Ue,{children:t.jsx(Xe,{})}),t.jsx(U,{children:t.jsxs(t.Fragment,{children:[l.documentId!=null?a.invoiceNo:null,l.documentId]})})]}),t.jsx(Je,{windowSize:s,children:M("0,0[.]00",l.recipientTotalAmount)})]}),t.jsxs(_n,{"data-testid":j("review-detail-mobile-info"),onClick:()=>J(l.id,l.billPayInfo.stage.code),children:[t.jsxs(U,{children:[l.dueDate!=null?a.due:null," ",l.dueDate?.format(C)]}),t.jsx(Qe,{children:r!=null?Ae.includes(r.code)?t.jsx(Be,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(X,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(X,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value}):null})]})]}):t.jsxs(qe,{windowSize:s,children:[l.attachments&&l.attachments.length>0?t.jsx(_e,{attachment:l.attachments[0]}):t.jsx(Ue,{children:t.jsx(Xe,{})}),t.jsxs(Wn,{"data-testid":j("review-detail-info"),onClick:()=>J(l.id,l.billPayInfo.stage.code),children:[t.jsx(U,{style:{width:"50%"},children:t.jsxs("div",{children:[l.documentId!=null?a.invoiceNo:null," ",l.documentId]})}),t.jsxs(U,{style:{width:"25%"},children:[l.dueDate!=null?a.due:null," ",l.dueDate?.format(C)]}),t.jsx(Je,{style:{width:"25%"},windowSize:s,children:M("0,0[.]00",l.amount)})]}),t.jsx(Qe,{children:r!=null?Ae.includes(r.code)?t.jsx(Be,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(X,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(X,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value}):null})]})},l.id):null})]})]}):null,t.jsxs(An,{children:[t.jsx(Ye,{children:a.pay}),t.jsx(Ge,{children:t.jsx(Fe,{amount:gt,integerStyles:G.largeMedium.cssObject,decimalStyles:G.smallMedium.cssObject})}),t.jsx(Ye,{children:a.to}),t.jsx(Ge,{children:e.vendor?.name})]}),t.jsxs(jn,{children:[g?null:t.jsxs(t.Fragment,{children:[t.jsx(O,{isThreadAllowed:F,entityId:x,dashboardTabKey:_({type:"details",key:"withdrawFrom"}),roomId:R,companyId:c.currentTenant?.companyId??h,companyName:c.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${E("withdrawFrom")}`},children:t.jsx(W,{label:{label:a.withdrawFrom,width:L},style:{width:"auto"},value:e.paymentDetailsSection?.withdrawFrom!=null?zt(e.paymentDetailsSection.withdrawFrom,s):h,infoLabelStyle:{textAlign:s==="small"?"left":"right",paddingRight:m.infoLabelPaddingRight.valuePx(s),marginTop:m.infoLabelMarginTop.valuePx(s),color:S.brandColorGoldDark},additionalInfoLabel:ae})}),t.jsx(H,{})]}),t.jsx(O,{isThreadAllowed:F,entityId:x,dashboardTabKey:_({type:"details",key:"paymentType"}),roomId:R,companyId:c.currentTenant?.companyId??h,companyName:c.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${E("paymentType")}`},children:t.jsx(W,{label:{label:a.paymentMethod,width:L},style:{width:"auto"},value:le(o?.method??""),additionalInfoLabel:wt()})}),t.jsx(H,{}),!g&&V!=null?t.jsxs(t.Fragment,{children:[t.jsx(O,{isThreadAllowed:F,entityId:x,dashboardTabKey:_({type:"details",key:"paymentDate"}),roomId:R,companyId:c.currentTenant?.companyId??h,companyName:c.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${E("paymentDate")}`},children:t.jsx(W,{label:{label:a.paymentDate,width:L},style:{width:"auto"},value:V.format(C),additionalInfoLabel:`${a.estimatedArrival}${oe(on(V.toDate(),[0,6],o?.maxPeriod.value??0).toDateString()).format(C)} - (${ie.length>0?`${ie} `:""}${a.deliveryTimeLabel} = ${o?.maxPeriod.value??"0"} ${a.deliveryTimeUnits})`})}),t.jsx(H,{})]}):null,g?null:t.jsx(O,{isThreadAllowed:F,entityId:x,dashboardTabKey:_({type:"details",key:"paymentTo"}),roomId:R,companyId:c.currentTenant?.companyId??h,companyName:c.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${E("paymentTo")}`},children:t.jsx(W,{label:{label:a.paymentTo,width:L},style:{width:"auto"},value:ut??"",additionalInfoLabel:ft})}),g||lt?t.jsxs(t.Fragment,{children:[t.jsx(H,{}),t.jsx(O,{isThreadAllowed:F,entityId:x,dashboardTabKey:_({type:"details",key:"recurringPaymentType"}),roomId:R,companyId:c.currentTenant?.companyId??h,companyName:c.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${E("recurringPaymentType")}`},children:t.jsx(W,{label:{label:a.paymentType,width:L},style:{width:"auto"},value:Ot(e.isRecurring,g,e.recurringBillInstance??1,e.recurringConfig?.totalPaymentCycles??0),additionalInfoLabel:Nt(s,e.isRecurring,g,e.recurringConfig)})})]}):null]}),!g&&o?.method!=null&&(o.method.includes(I)||o?.fee.amount!=null&&o.fee.amount!==0)?t.jsx(gn,{children:t.jsxs(xn,{windowSize:s,children:[t.jsxs(bn,{children:[t.jsx(yn,{children:a.total}),t.jsx(Re,{style:{padding:`12px ${n.sp3}`,lineHeight:"18px"},maxWidth:"312px",title:t.jsxs(fn,{children:[t.jsxs(Ke,{children:[t.jsx(se,{children:o.method.includes(I)&&ee!==v.currencyCode?Ee.conversionAmountColon:Oe.invoiceAmount}),t.jsx(re,{children:M("0,0[.]00",{amount:p.amount-N.amount,currencySymbol:N.currencySymbol})})]}),t.jsxs(Ke,{children:[t.jsx(se,{children:Ee.transactionFee}),t.jsx(re,{children:M("0,0[.]00",{amount:N.amount,currencySymbol:N.currencySymbol})})]}),t.jsx(hn,{}),t.jsxs(un,{children:[t.jsx(se,{children:Oe.total}),t.jsx(re,{children:M("0,0[.]00",{amount:p.amount,currencyCode:p.currencyCode,currencySymbol:p.currencySymbol})})]})]}),placement:"top-end",children:t.jsx(pn,{})})]}),t.jsx(wn,{children:t.jsx(Fe,{amount:Le(p.amount,p.currencyCode,p.currencySymbol),integerStyles:G.h6Medium.cssObject,decimalStyles:G.standardMedium.cssObject})})]})}):null]}),t.jsx(Et,{cancelBtn:{label:P&&!b?a.paymentOutsideZeni.markAsPaid:a.editBill,onClick:P&&!b?ve:ne,style:{width:Ze(!1,P,b,q,s)}},primaryBtn:{label:We(b,q,e.isBillMarkedForRetry),isLoading:z?.fetchState==="In-Progress"||Q?.fetchState==="In-Progress",onClick:b?ve:()=>{vt&&ae!=null?Y(!0):Se()},style:{width:Ze(!0,P,b,q,s)}},rightSideComponent:P&&!b&&z.fetchState!=="In-Progress"?t.jsx(Yn,{windowSize:s,children:t.jsx(Re,{style:{color:S.heroDark,padding:`2px ${n.sp2}`},display:"flex",title:cn,placement:"top",children:t.jsx(Hn,{onClick:ne,"data-testid":j("review-detail-edit-bill-button"),children:t.jsx(Gn,{})})})}):null,style:{minHeight:e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(I)?127:62,...e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(I)&&{padding:n.sp3,rowGap:n.sp3}},children:e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(I)?t.jsxs(zn,{children:[a.internationalText1,t.jsx(Nn,{href:"https://www.nium.com/legal/end-customer-terms",target:"_Blank",rel:"noopener noreferrer",children:a.internationalTerms}),a.internationalText2]}):null})]})},We=(e,y,f)=>e?a.paymentOutsideZeni.markAsPaid:f===!0?a.retryPayment:y?a.sendForApproval:a.scheduleBill,Ze=(e,y,f,A,T)=>f?128:y&&!e&&T==="small"?"auto":A?165:m.footerButtonWidth.value(T),pn=i(en)`
1
+ import{J as Tt,ax as Ct,y as u,f3 as Dt,f4 as It,f5 as kt,V as t,f6 as Pt,f7 as le,f8 as Mt,f9 as At,fa as Bt,fb as Ft,aO as M,fc as Rt,aQ as j,fd as Lt,fe as Ae,ff as Be,fg as Fe,b as G,fh as O,p as S,fi as zt,fj as E,fk as _,fl as Nt,fm as Ot,bT as Re,o as n,aS as Et,c as d,O as _t,ag as Wt,c2 as Zt,F as Kt,M as Vt,fn as qt,ci as Yt,al as de,am as ce,fo as Gt,fp as Ht,bj as Ut,l as Xt,ba as Jt,fq as Qt,aq as et,bK as en,ai as tt,bu as tn,fr as nn}from"./index-e-SZUuyN.js";import{a as Z}from"./sentry-Dla7mstv.js";import{n as i}from"./mui-mhzAEcDs.js";import{bo as Le,bm as ze,bH as I,bN as an,Fv as ln,bL as oe,bP as on}from"./zeni-epic-state-CSmiPBaP.js";import{t as rn,o as sn}from"./LowBalancePopup-ChBTdcM2-BRhnRaDc.js";import{S as W}from"./LabeledText-D0g7m29R-cxnm614T.js";import"./liveblocks-BKvkleJ3.js";import"./core-hVMF2uNa.js";import"./recharts-BErFcng5.js";import"./lottie-N_bekW9H.js";import"./analytics-g5EpLRud.js";import"./lexical-DYQnWL1V.js";import"./utils-D6NmQd1Q.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},y=new e.Error().stack;y&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[y]="603549ff-4b02-4695-8f80-343929366bbf",e._sentryDebugIdIdentifier="sentry-dbid-603549ff-4b02-4695-8f80-343929366bbf")}catch{}})();const nt=["small","medium-compact","medium-regular"],m={largeLabelWidth:new u(150,215,215),infoMinWidth:new u(0,0,0,142,142),infoMarginRight:new u(0,0,0,d[2],d[2]),footerButtonWidth:new u(120,165),iconContainerMarginTop:new u(6,d[1]),navBarContainerPaddingTop:new u(10,d[3]),sectionTitleMarginLeft:new u(d[3],d[0]),reviewContainerMarginLeft:new u(d[3],d[6]),reviewContainerMarginRight:new u(d[3],d[8]),footerRightIconMarginRight:new u(d[0],d[0],d[7]),infoLabelPaddingRight:new u(d[0],d[3]),infoLabelMarginTop:new u(d[1],d[0])},dn={sectionTitle:new Kt("h6Medium","h5Medium")},{dateFormat:Ne,common:{currency:v,labels:Oe,edit:cn,strings:{empty:h}},spendManagement:{billPay:mn}}=_t.getLocalizedStrings(),{billDetails:a,paymentDetails:Ee}=mn,_e=({attachment:e})=>{const[y,f]=Z.useState(!1),A=()=>{f(!1)},T=e.fileId?.length===0;return t.jsxs(On,{isDisabled:e.fileId?.length===0,"data-testid":j("attachment-tag",e.fileName),onClick:()=>T===!1?f(!0):null,children:[y&&e?.fileDownloadUrl!=null?t.jsx(Gt,{title:e.fileName,file:e,onCrossClick:()=>A(),setShowFullScreenView:f}):null,t.jsx(En,{children:t.jsx(Ht,{contentType:e.contentType})})]})},di=({billDetails:e,billpayApprovalView:y,isBillPayCommentingEnabled:f,currentTenant:A,isInternationalPaymentShaVsOurEnabled:T,isLocalCurrencyEnabled:it,style:at,analytics:w,isRecurringBillsFeatureEnabled:lt,isApprovalRequiredForMarkAsPaid:ot,isDetectInsufficientFundsEnabled:rt,billId:x,onClickEdit:me,discardBillDetailsFromLocalStore:pe,saveBillDetails:ue,discardOutsideZeniPaymentData:st,updateBillDetailSaveBillCode:ye,redirectToBillsScreen:he,onAttachmentClick:J,retryPayment:dt})=>{const s=Tt(),c=Ct(),B={application:"dashboard",companyId:c.currentTenant?.companyId,tab:"bill",entityId:x},F=f&&x!=null,R=`dashboard_${c.currentTenant?.companyId}`,L=m.largeLabelWidth.value(s),z=e.saveStatus,Q=e.zeniAssistRetryStatus,ee=e.vendor?.vendorCurrencyCode,o=Dt(T,it,e.billPayConfigList.filter(l=>l.method.includes(e.paymentDetailsSection?.withdrawFrom?.accType??"depositAccount")),e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod,e.paymentDetailsSection?.paymentType,ee),C=Ne.visual.MMMDCommaYYYYformat,fe={amount:e.recipientTotalAmount.amount/(e.paymentDetailsSection?.conversionRate??1)*100/100,currencyCode:v.currencyCode,currencySymbol:v.currencySymbol},p={amount:o?.method.includes("international")===!0?It(fe,o):e.recipientTotalAmount.amount+(o?.fee.amount??0),currencyCode:v.currencyCode,currencySymbol:v.currencySymbol},N={amount:o?.method.includes("international")===!0?kt(fe,o):o?.fee.amount??0,currencyCode:v.currencyCode,currencySymbol:v.currencySymbol},[ct,ge]=Z.useState(!1),[mt,xe]=Z.useState(!1),be=()=>ge(!1),pt=()=>{w.trackBillPayMagicLinkPreviewEmail("review_bill"),ge(!0)},ut=e.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${a.magicLink.collectFrom} ${e.toAccountVendorEmail}`,t.jsx(Ln,{size:s,children:t.jsx(Rn,{})})]}):Pt(e.paymentDetailsSection?.paymentTo);Z.useEffect(()=>{(z?.fetchState==="Completed"||Q?.fetchState==="Completed")&&(pe(),ye(),he())},[z,Q,he,pe,ye]);const $=e.billPayInfo?.stage,k=e.billPayInfo?.billStatus,K=e.billPayInfo?.billPaymentStatus,yt=e.billPayInfo?.billPaymentRefundStatus,te=$?.code==="paid"?$:k?.code=="approved"&&K?.code?K:k,ht=e.billPayInfo?.isRefundInitiated===!0?yt:k?.code=="approved"&&K?.code?K:k,ne=()=>{me()},we=()=>{me()},V=e.paymentDetailsSection?.paymentDate,ie=le(o?.method??""),$e=ie.replace("Same Day",""),ft=e.isCollectToAccountInfoFromVendorContact?t.jsx(Mt,{paymentTypeLabel:$e,onClick:pt}):a.addedByZeni,q=y.allApprovalRules.length>0,gt=Le(o?.method!=null&&(o.method.includes(I)||o?.fee.amount!=null&&o.fee.amount!==0)?p.amount-N.amount:p.amount,o?.fee.currencyCode??ze.currencyCode,o?.fee.currencySymbol??ze.currencySymbol),g=an(e.paymentDetailsSection?.paymentType?.method),xt=l=>{w.trackBillPayMarkAsPaidSubmit(l.paymentMode??"other",$?.code??"draft",te?.code??""),ue(!0,l)},ve=()=>{xe(!0),w.trackBillPayMarkAsPaid($?.code??"draft",te?.code??"")},bt=()=>{st(),xe(!1)},P=g&&($?.code!=null?$.code==="draft"||k?.code==="approved":!0),b=P&&!ot,je=We(b,q,e.isBillMarkedForRetry),wt=()=>g?b?void 0:a.paymentOutsideZeni.reviewInfo:o?.method!=null&&o.method.includes(I)&&e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod!=null&&T&&ee===v.currencyCode?Qt(e.paymentDetailsSection.internationalTransferFeeBearerPaymentMethod):void 0,ae=rt&&e.paymentDetailsSection!=null?At(p,e.paymentDetailsSection.withdrawFrom,e.paymentDetailsSection.paymentDate):void 0,$t=()=>{const l=e.paymentDetailsSection?.paymentDate,r=e.isCollectToAccountInfoFromVendorContact,D=e.recurringConfig,jt=e.recipientTotalAmount;if(e.isInvoiceDateAutoUpdated===!0&&w.trackBillPayAutoDateChange(x??"new_bill"),o?.method!=null&&l!=null){const St=g?a.paymentOutsideZeni.offline:le(o.method);if(w.trackBillPaySendForApproval(St,l.format(Ne.analytics.MMMDashDDDashYYYYFormat),r,e.isRecurring,x,e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod,{startDate:oe(D?.startDate?.toString()??"").format(C),endDate:oe(D?.endDate?.toString()??"").format(C),frequency:D?.frequency??"monthly",totalAmount:jt.amount,totalPaymentCycles:D?.totalPaymentCycles??0,isApprovalRequired:D?.isApprovalRequired??!1,updateCurrentBill:e.recurringConfig?.id!=null?D?.updateRecurringBills==="current":void 0,updateFutureRecurringBills:e.recurringConfig?.id!=null?D?.updateRecurringBills==="all":void 0}),ae!=null){const Ce=$?.code??"draft",De=k?.code??"",Ie=e.isRecurring?["Recurring"]:["One-Time"],ke=e.invoiceNumber??"",Pe=nn(c.loggedInUser),Me=e.paymentDetailsSection?.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account";je===a.scheduleBill?w.trackLowBalanceAccountSchedule(Ce,De,Ie,ke,Pe,Me):je===a.sendForApproval&&w.trackLowBalanceAccountSentForApproval(Ce,De,Ie,ke,Pe,Me)}}},Se=()=>{Te===!0&&Y(!1),e.isBillMarkedForRetry===!0?(dt(),w.trackRetryConfirmClick(te?.code??"",$?.code??"",ht?.description??"",e.isRecurring?["Recurring"]:["One-Time"],e.invoiceNumber??"")):e.vendor!=null&&($t(),ue(!1,{}))},vt=ln(p.amount,y.allApprovalRules,c.loggedInUser),[Te,Y]=Z.useState(!1);return t.jsxs($n,{children:[mt?t.jsx(rn,{onCancel:bt,onProceedForMarkAsPaid:xt,saveDetailsFetchState:z?.fetchState,paymentData:e.outsideZeniPaymentInfo}):null,Te?t.jsx(sn,{withdrawFrom:e.paymentDetailsSection?.withdrawFrom,paymentDate:e.paymentDetailsSection?.paymentDate,onOkClick:Se,onCancelClick:()=>{Y(!1),ne()},onClickAway:()=>{Y(!1)}}):null,t.jsx(Bt,{anchor:"right",open:ct,onClose:be,transitionDuration:250,"data-testid":j("vendor-email-preview-drawer"),children:t.jsx(Ft,{companyName:Rt(A.company?.companyInfo),vendor:e.vendor?.name,paymentDate:V?.format(C)??"",paymentType:$e,amount:M("0,0[.]00",p),isInvoiceAttached:!!e.file,onClose:be})}),t.jsxs(vn,{windowSize:s,style:at,children:[s==="small"?t.jsxs(Fn,{windowSize:s,children:[t.jsx(He,{onClick:we,"data-testid":j("review-detail-nav-bar-small-back")}),t.jsx(Ve,{windowSize:s,children:a.oneLastLook})]}):t.jsx(Bn,{"data-testid":j("review-details-nav-bar-back"),children:t.jsx(He,{onClick:we})}),s!=="small"?t.jsx(Sn,{children:t.jsx(Ve,{windowSize:s,children:a.oneLastLook})}):null,e.duplicateBillTransactions.length>0?t.jsxs(Tn,{children:[t.jsxs(Cn,{children:[t.jsx(qn,{}),t.jsxs(Dn,{children:[t.jsx(kn,{children:a.duplicateBillPayWarning}),t.jsxs(In,{children:[a.duplicateBillPayWarningSubHeading,t.jsxs("span",{"data-testid":j("review-detail-attachment-button"),onClick:()=>J(e.duplicateBillTransactions[0].id,e.duplicateBillTransactions[0].billPayInfo.stage.code),style:{textDecoration:"underline",cursor:"pointer"},children:[a.viewBill,e.duplicateBillTransactions[0].documentId]})]})]})]}),t.jsxs(Zn,{children:[t.jsx(Vn,{children:a.duplicateInvoiceFound}),e.duplicateBillTransactions.map(l=>{const r=Lt(l);return l!=null?t.jsx(Kn,{children:nt.includes(s)?t.jsxs(qe,{windowSize:s,children:[t.jsxs(Pn,{children:[t.jsxs(Mn,{children:[l.attachments&&l.attachments.length>0?t.jsx(_e,{attachment:l.attachments[0]}):t.jsx(Ue,{children:t.jsx(Xe,{})}),t.jsx(U,{children:t.jsxs(t.Fragment,{children:[l.documentId!=null?a.invoiceNo:null,l.documentId]})})]}),t.jsx(Je,{windowSize:s,children:M("0,0[.]00",l.recipientTotalAmount)})]}),t.jsxs(_n,{"data-testid":j("review-detail-mobile-info"),onClick:()=>J(l.id,l.billPayInfo.stage.code),children:[t.jsxs(U,{children:[l.dueDate!=null?a.due:null," ",l.dueDate?.format(C)]}),t.jsx(Qe,{children:r!=null?Ae.includes(r.code)?t.jsx(Be,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(X,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(X,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value}):null})]})]}):t.jsxs(qe,{windowSize:s,children:[l.attachments&&l.attachments.length>0?t.jsx(_e,{attachment:l.attachments[0]}):t.jsx(Ue,{children:t.jsx(Xe,{})}),t.jsxs(Wn,{"data-testid":j("review-detail-info"),onClick:()=>J(l.id,l.billPayInfo.stage.code),children:[t.jsx(U,{style:{width:"50%"},children:t.jsxs("div",{children:[l.documentId!=null?a.invoiceNo:null," ",l.documentId]})}),t.jsxs(U,{style:{width:"25%"},children:[l.dueDate!=null?a.due:null," ",l.dueDate?.format(C)]}),t.jsx(Je,{style:{width:"25%"},windowSize:s,children:M("0,0[.]00",l.amount)})]}),t.jsx(Qe,{children:r!=null?Ae.includes(r.code)?t.jsx(Be,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(X,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(X,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value}):null})]})},l.id):null})]})]}):null,t.jsxs(An,{children:[t.jsx(Ye,{children:a.pay}),t.jsx(Ge,{children:t.jsx(Fe,{amount:gt,integerStyles:G.largeMedium.cssObject,decimalStyles:G.smallMedium.cssObject})}),t.jsx(Ye,{children:a.to}),t.jsx(Ge,{children:e.vendor?.name})]}),t.jsxs(jn,{children:[g?null:t.jsxs(t.Fragment,{children:[t.jsx(O,{isThreadAllowed:F,entityId:x,dashboardTabKey:_({type:"details",key:"withdrawFrom"}),roomId:R,companyId:c.currentTenant?.companyId??h,companyName:c.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${E("withdrawFrom")}`},children:t.jsx(W,{label:{label:a.withdrawFrom,width:L},style:{width:"auto"},value:e.paymentDetailsSection?.withdrawFrom!=null?zt(e.paymentDetailsSection.withdrawFrom,s):h,infoLabelStyle:{textAlign:s==="small"?"left":"right",paddingRight:m.infoLabelPaddingRight.valuePx(s),marginTop:m.infoLabelMarginTop.valuePx(s),color:S.brandColorGoldDark},additionalInfoLabel:ae})}),t.jsx(H,{})]}),t.jsx(O,{isThreadAllowed:F,entityId:x,dashboardTabKey:_({type:"details",key:"paymentType"}),roomId:R,companyId:c.currentTenant?.companyId??h,companyName:c.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${E("paymentType")}`},children:t.jsx(W,{label:{label:a.paymentMethod,width:L},style:{width:"auto"},value:le(o?.method??""),additionalInfoLabel:wt()})}),t.jsx(H,{}),!g&&V!=null?t.jsxs(t.Fragment,{children:[t.jsx(O,{isThreadAllowed:F,entityId:x,dashboardTabKey:_({type:"details",key:"paymentDate"}),roomId:R,companyId:c.currentTenant?.companyId??h,companyName:c.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${E("paymentDate")}`},children:t.jsx(W,{label:{label:a.paymentDate,width:L},style:{width:"auto"},value:V.format(C),additionalInfoLabel:`${a.estimatedArrival}${oe(on(V.toDate(),[0,6],o?.maxPeriod.value??0).toDateString()).format(C)} - (${ie.length>0?`${ie} `:""}${a.deliveryTimeLabel} = ${o?.maxPeriod.value??"0"} ${a.deliveryTimeUnits})`})}),t.jsx(H,{})]}):null,g?null:t.jsx(O,{isThreadAllowed:F,entityId:x,dashboardTabKey:_({type:"details",key:"paymentTo"}),roomId:R,companyId:c.currentTenant?.companyId??h,companyName:c.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${E("paymentTo")}`},children:t.jsx(W,{label:{label:a.paymentTo,width:L},style:{width:"auto"},value:ut??"",additionalInfoLabel:ft})}),g||lt?t.jsxs(t.Fragment,{children:[t.jsx(H,{}),t.jsx(O,{isThreadAllowed:F,entityId:x,dashboardTabKey:_({type:"details",key:"recurringPaymentType"}),roomId:R,companyId:c.currentTenant?.companyId??h,companyName:c.currentTenant?.companyName??h,dashboardOptionType:"bill",filterMetaData:{...B,entityType:`bill.details.${E("recurringPaymentType")}`},children:t.jsx(W,{label:{label:a.paymentType,width:L},style:{width:"auto"},value:Ot(e.isRecurring,g,e.recurringBillInstance??1,e.recurringConfig?.totalPaymentCycles??0),additionalInfoLabel:Nt(s,e.isRecurring,g,e.recurringConfig)})})]}):null]}),!g&&o?.method!=null&&(o.method.includes(I)||o?.fee.amount!=null&&o.fee.amount!==0)?t.jsx(gn,{children:t.jsxs(xn,{windowSize:s,children:[t.jsxs(bn,{children:[t.jsx(yn,{children:a.total}),t.jsx(Re,{style:{padding:`12px ${n.sp3}`,lineHeight:"18px"},maxWidth:"312px",title:t.jsxs(fn,{children:[t.jsxs(Ke,{children:[t.jsx(se,{children:o.method.includes(I)&&ee!==v.currencyCode?Ee.conversionAmountColon:Oe.invoiceAmount}),t.jsx(re,{children:M("0,0[.]00",{amount:p.amount-N.amount,currencySymbol:N.currencySymbol})})]}),t.jsxs(Ke,{children:[t.jsx(se,{children:Ee.transactionFee}),t.jsx(re,{children:M("0,0[.]00",{amount:N.amount,currencySymbol:N.currencySymbol})})]}),t.jsx(hn,{}),t.jsxs(un,{children:[t.jsx(se,{children:Oe.total}),t.jsx(re,{children:M("0,0[.]00",{amount:p.amount,currencyCode:p.currencyCode,currencySymbol:p.currencySymbol})})]})]}),placement:"top-end",children:t.jsx(pn,{})})]}),t.jsx(wn,{children:t.jsx(Fe,{amount:Le(p.amount,p.currencyCode,p.currencySymbol),integerStyles:G.h6Medium.cssObject,decimalStyles:G.standardMedium.cssObject})})]})}):null]}),t.jsx(Et,{cancelBtn:{label:P&&!b?a.paymentOutsideZeni.markAsPaid:a.editBill,onClick:P&&!b?ve:ne,style:{width:Ze(!1,P,b,q,s)}},primaryBtn:{label:We(b,q,e.isBillMarkedForRetry),isLoading:z?.fetchState==="In-Progress"||Q?.fetchState==="In-Progress",onClick:b?ve:()=>{vt&&ae!=null?Y(!0):Se()},style:{width:Ze(!0,P,b,q,s)}},rightSideComponent:P&&!b&&z.fetchState!=="In-Progress"?t.jsx(Yn,{windowSize:s,children:t.jsx(Re,{style:{color:S.heroDark,padding:`2px ${n.sp2}`},display:"flex",title:cn,placement:"top",children:t.jsx(Hn,{onClick:ne,"data-testid":j("review-detail-edit-bill-button"),children:t.jsx(Gn,{})})})}):null,style:{minHeight:e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(I)?127:62,...e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(I)&&{padding:n.sp3,rowGap:n.sp3}},children:e.paymentDetailsSection?.paymentType?.method!=null&&e.paymentDetailsSection.paymentType.method.includes(I)?t.jsxs(zn,{children:[a.internationalText1,t.jsx(Nn,{href:"https://www.nium.com/legal/end-customer-terms",target:"_Blank",rel:"noopener noreferrer",children:a.internationalTerms}),a.internationalText2]}):null})]})},We=(e,y,f)=>e?a.paymentOutsideZeni.markAsPaid:f===!0?a.retryPayment:y?a.sendForApproval:a.scheduleBill,Ze=(e,y,f,A,T)=>f?128:y&&!e&&T==="small"?"auto":A?165:m.footerButtonWidth.value(T),pn=i(en)`
2
2
  width: ${n.sp3};
3
3
  height: ${n.sp3};
4
4
  color: ${e=>e.theme.colors.hero};
@@ -1,4 +1,4 @@
1
- import{J as P,V as i,aQ as m,o as r,aS as B,y as d,x as L,F as C,M as I,p as s,al as j,cC as W,T as D,ai as b,bi as R,c as n,ej as G,u as F,iX as _,k8 as J}from"./index-CRNmezJu.js";import{n as t}from"./mui-mhzAEcDs.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},g=new e.Error().stack;g&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[g]="75b73c51-ce17-47ac-ae84-f5ab79394649",e._sentryDebugIdIdentifier="sentry-dbid-75b73c51-ce17-47ac-ae84-f5ab79394649")}catch{}})();const l={containerMarginTop:new d(0,n[2]),containerMarginLeft:new d(n[3],n[8]),containerMarginRight:new d(n[3],n[8]),subTitleMarginBottom:new d(n[2],n[2]),titleMarginBotom:new d(n[0],n[2]),titleMarginRight:new d(n[0],n[3]),navBarHeight:new d(62,62,62),navBarPaddingLeft:new d(n[3],n[3],n[8]),navBarPaddingRight:new d(n[3],n[3],n[8])},A={title:new C("h6Regular","h5Regular")},xe=({title:e,description:g,reviewItems:x,showFooter:S,footerProps:{primaryButton:z,cancelButton:T,hideCancel:E},onCloseOverlay:k,onCloseReviewItem:M})=>{const a=P();return i.jsxs(H,{children:[i.jsx(U,{windowSize:a,children:i.jsx(Y,{children:i.jsx(Z,{windowSize:a,children:i.jsx(ee,{children:i.jsx(ie,{onClick:k,"data-testid":m("review-overlay-close",e)})})})})}),i.jsxs(O,{windowSize:a,children:[i.jsxs(Q,{windowSize:a,children:[i.jsx(X,{children:i.jsx(q,{windowSize:a,children:e})}),i.jsx(K,{isError:g.isError,windowSize:a,children:g.content})]}),i.jsx(N,{windowSize:a,children:x.map(o=>{const h=o.reviewStatus.code==="error",c=o.reviewStatus.code==="warning"||o.reviewStatus.code==="low-balance";return i.jsxs(re,{isLoading:!1,isActive:!0,isWarning:c,isError:h,children:[c?i.jsx(ce,{onClick:()=>M(o.id),"data-testid":m("review-close",o.id)}):null,i.jsxs(te,{children:[i.jsxs(ne,{children:[i.jsx(de,{children:V(o)}),i.jsxs(oe,{children:[i.jsxs(w,{children:[i.jsx(f,{style:{marginLeft:r.sp2},isWarning:c,isError:h,children:o.leftSideText.title}),i.jsx(f,{isWarning:c,isError:h,children:o.rightSideText.title})]}),i.jsxs(w,{children:[i.jsx(se,{style:{marginLeft:r.sp2},children:o.leftSideText.subTitle}),a!=="small"?i.jsxs(u,{windowSize:a,children:[i.jsx(p,{isError:h,isWarning:c,children:i.jsxs(i.Fragment,{children:[o.rightSideText.showThunderIcon===!0?i.jsx(v,{children:i.jsx($,{})}):null,o.rightSideText.subTitle]})}),i.jsx(p,{isWarning:!0,isError:!1,children:o.rightSideText.additonalInfo})]}):null]})]})]}),a==="small"?i.jsxs(u,{windowSize:a,children:[i.jsx(p,{style:{marginLeft:r.sp5,marginTop:r.sp0},isError:h,isWarning:c,children:i.jsxs(i.Fragment,{children:[o.rightSideText.showThunderIcon===!0?i.jsx(v,{children:i.jsx($,{})}):null,o.rightSideText.subTitle]})}),i.jsx(p,{style:{marginLeft:r.sp5,marginTop:r.sp0},isWarning:c,isError:h,children:o.rightSideText.additonalInfo})]}):null]})]},o.id)})})]}),S?i.jsx(B,{primaryBtn:z,cancelBtn:T,showCancel:!E}):null]})},V=e=>e.reviewStatus.isLoading?i.jsx(D,{size:"Small",style:{display:"flex",width:r.sp4,height:r.sp4,alignItems:"center",justifyContent:"center"},start:!0}):e.reviewStatus.code==="error"?i.jsx(y,{isError:!0}):e.reviewStatus.code==="warning"?i.jsx(y,{isError:!1}):e.reviewStatus.code==="valid"?i.jsx(ae,{}):e.reviewStatus.code==="low-balance"?i.jsx(he,{}):i.jsx(le,{}),H=t.div`
1
+ import{J as P,V as i,aQ as m,o as r,aS as B,y as d,x as L,F as C,M as I,p as s,al as j,cC as W,T as D,ai as b,bi as R,c as n,ej as G,u as F,iX as _,k8 as J}from"./index-e-SZUuyN.js";import{n as t}from"./mui-mhzAEcDs.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},g=new e.Error().stack;g&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[g]="75b73c51-ce17-47ac-ae84-f5ab79394649",e._sentryDebugIdIdentifier="sentry-dbid-75b73c51-ce17-47ac-ae84-f5ab79394649")}catch{}})();const l={containerMarginTop:new d(0,n[2]),containerMarginLeft:new d(n[3],n[8]),containerMarginRight:new d(n[3],n[8]),subTitleMarginBottom:new d(n[2],n[2]),titleMarginBotom:new d(n[0],n[2]),titleMarginRight:new d(n[0],n[3]),navBarHeight:new d(62,62,62),navBarPaddingLeft:new d(n[3],n[3],n[8]),navBarPaddingRight:new d(n[3],n[3],n[8])},A={title:new C("h6Regular","h5Regular")},xe=({title:e,description:g,reviewItems:x,showFooter:S,footerProps:{primaryButton:z,cancelButton:T,hideCancel:E},onCloseOverlay:k,onCloseReviewItem:M})=>{const a=P();return i.jsxs(H,{children:[i.jsx(U,{windowSize:a,children:i.jsx(Y,{children:i.jsx(Z,{windowSize:a,children:i.jsx(ee,{children:i.jsx(ie,{onClick:k,"data-testid":m("review-overlay-close",e)})})})})}),i.jsxs(O,{windowSize:a,children:[i.jsxs(Q,{windowSize:a,children:[i.jsx(X,{children:i.jsx(q,{windowSize:a,children:e})}),i.jsx(K,{isError:g.isError,windowSize:a,children:g.content})]}),i.jsx(N,{windowSize:a,children:x.map(o=>{const h=o.reviewStatus.code==="error",c=o.reviewStatus.code==="warning"||o.reviewStatus.code==="low-balance";return i.jsxs(re,{isLoading:!1,isActive:!0,isWarning:c,isError:h,children:[c?i.jsx(ce,{onClick:()=>M(o.id),"data-testid":m("review-close",o.id)}):null,i.jsxs(te,{children:[i.jsxs(ne,{children:[i.jsx(de,{children:V(o)}),i.jsxs(oe,{children:[i.jsxs(w,{children:[i.jsx(f,{style:{marginLeft:r.sp2},isWarning:c,isError:h,children:o.leftSideText.title}),i.jsx(f,{isWarning:c,isError:h,children:o.rightSideText.title})]}),i.jsxs(w,{children:[i.jsx(se,{style:{marginLeft:r.sp2},children:o.leftSideText.subTitle}),a!=="small"?i.jsxs(u,{windowSize:a,children:[i.jsx(p,{isError:h,isWarning:c,children:i.jsxs(i.Fragment,{children:[o.rightSideText.showThunderIcon===!0?i.jsx(v,{children:i.jsx($,{})}):null,o.rightSideText.subTitle]})}),i.jsx(p,{isWarning:!0,isError:!1,children:o.rightSideText.additonalInfo})]}):null]})]})]}),a==="small"?i.jsxs(u,{windowSize:a,children:[i.jsx(p,{style:{marginLeft:r.sp5,marginTop:r.sp0},isError:h,isWarning:c,children:i.jsxs(i.Fragment,{children:[o.rightSideText.showThunderIcon===!0?i.jsx(v,{children:i.jsx($,{})}):null,o.rightSideText.subTitle]})}),i.jsx(p,{style:{marginLeft:r.sp5,marginTop:r.sp0},isWarning:c,isError:h,children:o.rightSideText.additonalInfo})]}):null]})]},o.id)})})]}),S?i.jsx(B,{primaryBtn:z,cancelBtn:T,showCancel:!E}):null]})},V=e=>e.reviewStatus.isLoading?i.jsx(D,{size:"Small",style:{display:"flex",width:r.sp4,height:r.sp4,alignItems:"center",justifyContent:"center"},start:!0}):e.reviewStatus.code==="error"?i.jsx(y,{isError:!0}):e.reviewStatus.code==="warning"?i.jsx(y,{isError:!1}):e.reviewStatus.code==="valid"?i.jsx(ae,{}):e.reviewStatus.code==="low-balance"?i.jsx(he,{}):i.jsx(le,{}),H=t.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  background-color: ${e=>e.theme.colors.grey4};
@@ -1,4 +1,4 @@
1
- import{eO as h,eP as f,V as s,bT as b,o,aQ as l,O as g,an as y,ai as c}from"./index-CRNmezJu.js";import{n}from"./mui-mhzAEcDs.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f6f2b2c9-6406-4ed5-b075-58d8103b2798",e._sentryDebugIdIdentifier="sentry-dbid-f6f2b2c9-6406-4ed5-b075-58d8103b2798")}catch{}})();const{hyphen:i}=g.getLocalizedStrings().common.strings,x=n.div``,m=n.div`
1
+ import{eO as h,eP as f,V as s,bT as b,o,aQ as l,O as g,an as y,ai as c}from"./index-e-SZUuyN.js";import{n}from"./mui-mhzAEcDs.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f6f2b2c9-6406-4ed5-b075-58d8103b2798",e._sentryDebugIdIdentifier="sentry-dbid-f6f2b2c9-6406-4ed5-b075-58d8103b2798")}catch{}})();const{hyphen:i}=g.getLocalizedStrings().common.strings,x=n.div``,m=n.div`
2
2
  display: flex;
3
3
  min-width: 192px;
4
4
  justify-content: space-between;
@@ -1,4 +1,4 @@
1
- import{aR as H,im as ee,gH as fe,eA as Je,io as we,a9 as Le,ip as Me,cF as _e,cG as Ve,V as a,ac as Pe,cp as Fe,cq as qe,cr as Ne,aS as Be,iq as Re,ir as We,O as ge,aa as he,is as me,it as $e,cJ as Ue,J as ze,iH as Ge,gM as re,c as R,p as Se,y as De,cK as He,iu as Ke,iv as Ye,iw as Ze,o as V}from"./index-CRNmezJu.js";import{a as f}from"./sentry-Dla7mstv.js";import{n as $}from"./mui-mhzAEcDs.js";import{F_ as Xe,F$ as Qe}from"./zeni-epic-state-CSmiPBaP.js";import{i as et,r as tt,n as lt,o as at}from"./ScheduleSequenceTable-MEIZsagy-bHxXvqLR.js";import"./liveblocks-BKvkleJ3.js";import"./core-hVMF2uNa.js";import"./recharts-BErFcng5.js";import"./lottie-N_bekW9H.js";import"./analytics-g5EpLRud.js";import"./lexical-DYQnWL1V.js";import"./utils-D6NmQd1Q.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="41bc2973-f560-4742-bc8a-b8592ded9b95",e._sentryDebugIdIdentifier="sentry-dbid-41bc2973-f560-4742-bc8a-b8592ded9b95")}catch{}})();const W={labelWidth:new De(160,160,160),depCategoryLabelWidth:new De(200,280,280)},st=$.div`
1
+ import{aR as H,im as ee,gH as fe,eA as Je,io as we,a9 as Le,ip as Me,cF as _e,cG as Ve,V as a,ac as Pe,cp as Fe,cq as qe,cr as Ne,aS as Be,iq as Re,ir as We,O as ge,aa as he,is as me,it as $e,cJ as Ue,J as ze,iH as Ge,gM as re,c as R,p as Se,y as De,cK as He,iu as Ke,iv as Ye,iw as Ze,o as V}from"./index-e-SZUuyN.js";import{a as f}from"./sentry-Dla7mstv.js";import{n as $}from"./mui-mhzAEcDs.js";import{F_ as Xe,F$ as Qe}from"./zeni-epic-state-CSmiPBaP.js";import{i as et,r as tt,n as lt,o as at}from"./ScheduleSequenceTable-MEIZsagy-Bs57M6oJ.js";import"./liveblocks-BKvkleJ3.js";import"./core-hVMF2uNa.js";import"./recharts-BErFcng5.js";import"./lottie-N_bekW9H.js";import"./analytics-g5EpLRud.js";import"./lexical-DYQnWL1V.js";import"./utils-D6NmQd1Q.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="41bc2973-f560-4742-bc8a-b8592ded9b95",e._sentryDebugIdIdentifier="sentry-dbid-41bc2973-f560-4742-bc8a-b8592ded9b95")}catch{}})();const W={labelWidth:new De(160,160,160),depCategoryLabelWidth:new De(200,280,280)},st=$.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{aR as F,im as Q,gH as ke,eA as Ae,io as Ie,a9 as Je,ip as we,cF as Le,cG as Me,V as a,ac as Ve,cp as Pe,cq as _e,cr as Fe,aS as $e,iq as Be,ir as Ne,O as fe,aa as ie,is as he,it as qe,cJ as Ue,J as We,gM as pe,c as X,p as ze,y as Re,iu as Ke,iv as Ge,iw as He,o as w}from"./index-CRNmezJu.js";import{a as D}from"./sentry-Dla7mstv.js";import{n as P}from"./mui-mhzAEcDs.js";import{F_ as Ye,F$ as Qe,bL as Xe}from"./zeni-epic-state-CSmiPBaP.js";import{i as Ze,r as et,n as tt,o as lt}from"./ScheduleSequenceTable-MEIZsagy-bHxXvqLR.js";import"./liveblocks-BKvkleJ3.js";import"./core-hVMF2uNa.js";import"./recharts-BErFcng5.js";import"./lottie-N_bekW9H.js";import"./analytics-g5EpLRud.js";import"./lexical-DYQnWL1V.js";import"./utils-D6NmQd1Q.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="a1546e42-c57b-4262-8242-3b1b811e7739",e._sentryDebugIdIdentifier="sentry-dbid-a1546e42-c57b-4262-8242-3b1b811e7739")}catch{}})();const q={labelWidth:new Re(160,160,160)},at=P.div`
1
+ import{aR as F,im as Q,gH as ke,eA as Ae,io as Ie,a9 as Je,ip as we,cF as Le,cG as Me,V as a,ac as Ve,cp as Pe,cq as _e,cr as Fe,aS as $e,iq as Be,ir as Ne,O as fe,aa as ie,is as he,it as qe,cJ as Ue,J as We,gM as pe,c as X,p as ze,y as Re,iu as Ke,iv as Ge,iw as He,o as w}from"./index-e-SZUuyN.js";import{a as D}from"./sentry-Dla7mstv.js";import{n as P}from"./mui-mhzAEcDs.js";import{F_ as Ye,F$ as Qe,bL as Xe}from"./zeni-epic-state-CSmiPBaP.js";import{i as Ze,r as et,n as tt,o as lt}from"./ScheduleSequenceTable-MEIZsagy-Bs57M6oJ.js";import"./liveblocks-BKvkleJ3.js";import"./core-hVMF2uNa.js";import"./recharts-BErFcng5.js";import"./lottie-N_bekW9H.js";import"./analytics-g5EpLRud.js";import"./lexical-DYQnWL1V.js";import"./utils-D6NmQd1Q.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="a1546e42-c57b-4262-8242-3b1b811e7739",e._sentryDebugIdIdentifier="sentry-dbid-a1546e42-c57b-4262-8242-3b1b811e7739")}catch{}})();const q={labelWidth:new Re(160,160,160)},at=P.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{J as A,e as X,V as t,ix as ie,iy as le,F as oe,iz as xe,dQ as fe,fg as ye,b as I,O as R,iA as we,iw as be,o as i,y as b,p as j,l as $e,aa as re,dM as je,cp as Se,cr as ke,cJ as Z,es as ee,cO as ve,iB as K,iC as De,b4 as Ce,iD as Me,ct as ze,iE as Oe,c as h,al as O,ba as Ee,cq as Le,ao as pe,eB as Ie,b2 as ne,en as Ae,aS as Fe,iF as F,gg as Be,aO as Te,iG as Ve,aW as H,c$ as Je,bi as Pe}from"./index-CRNmezJu.js";import{n as o,c as J}from"./mui-mhzAEcDs.js";import{a as C}from"./sentry-Dla7mstv.js";import{bh as G,G0 as Re}from"./zeni-epic-state-CSmiPBaP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="b171933e-4707-43db-aca2-9ef297ab8433",e._sentryDebugIdIdentifier="sentry-dbid-b171933e-4707-43db-aca2-9ef297ab8433")}catch{}})();const N=(e,l)=>`${e}.${l}`,{formElements:{dayOfMonthSelector:M},common:se}=R.getLocalizedStrings();function Ne({defaultValue:e,name:l,placeholder:s,alignLeft:r=!1,style:p,isDisabled:n,registerOptions:d,onSaveClick:c,onCancelClick:w}){const[f,u]=C.useState(!1),{control:m,formState:{errors:x},setValue:S}=Z(),v=()=>{k||(c(),u(!1))},y=()=>{w(),u(!1)},k=ee(x,l),g=A(),a=X();return t.jsx(pe,{onClickAway:()=>{u(!1)},children:t.jsx(Qe,{style:p,isDisabled:n!=null,windowSize:g,onClick:()=>{!f&&n==null&&u(!0)},children:t.jsx(Ie,{name:N(l,"dayOfMonth"),control:m,rules:{...d},render:()=>t.jsxs(qe,{children:[t.jsx(We,{placeholder:s,defaultValue:e,isDisabled:n}),f?t.jsxs(Ge,{alignLeft:r===!0,children:[t.jsx(et,{}),t.jsxs(ae,{isSelected:e.type==="day",children:[t.jsxs(Ze,{isError:e.type==="day"&&k,children:[t.jsx(ne,{label:{label:M.pickDate},radioField:{id:"day",name:N(l,"type"),value:"day",radioSize:"small",checked:e.type==="day"},style:{...I.smallRegular.cssObject,padding:`${i.sp3} ${i.sp0}`,width:"fit-content",marginLeft:i.sp3,minWidth:"35%"},labelStyle:{color:e.type==="day"&&k?j.important:"inherit"}}),t.jsx(Ae,{name:N(l,"dayOfMonth"),type:"number",placeholder:M.placeholder,disableCopyPaste:!0,autoTrim:"trim",onKeyDown:$=>{$.key!=="Backspace"&&isNaN(parseInt($.key))&&$.preventDefault()},defaultValue:e.dayOfMonth!=null&&!isNaN(e.dayOfMonth)?e.dayOfMonth:0,registerOptions:{min:1,max:28},outerDivStyle:{width:"fit-content",marginLeft:i.sp1,marginRight:i.sp1},style:{border:`1px solid ${e.type==="day"&&k?j.important:a.colors.grey2}`,borderRadius:i.sp1,...I.smallRegular.cssObject,padding:i.sp2,maxWidth:"35px",boxSizing:"border-box"}}),t.jsx(Ue,{isSelected:e.type==="day",children:M.ofEveryMonth})]}),t.jsx(Ye,{defaultValue:e.dayOfMonth,onClick:$=>{S(`${l}.dayOfMonth`,$),S(`${l}.type`,"day")}})]}),t.jsx(tt,{}),t.jsx(ae,{isSelected:e.type==="lastDayOfMonth",children:t.jsx(ne,{label:{label:M.lastDayOfMonth},radioField:{id:"lastDayOfMonth",name:N(l,"type"),value:"lastDayOfMonth",radioSize:"small",checked:e.type==="lastDayOfMonth"},style:{...I.smallRegular.cssObject,padding:`${i.sp3} ${i.sp0}`,width:"fit-content",marginLeft:i.sp3},labelStyle:{color:e.type==="lastDayOfMonth"&&k?j.important:"inherit"}})}),t.jsx(Fe,{primaryBtn:{label:se.footer.save,onClick:v,isDisabled:_e(e),type:"button",style:{minWidth:"83px"}},cancelBtn:{label:se.footer.cancel,onClick:y,style:{minWidth:"83px"}},style:{position:"unset",backgroundColor:"transparent"}})]}):null]})})})})}function We({placeholder:e,defaultValue:l,isDisabled:s}){return t.jsxs(He,{isDisabled:s!=null,children:[l?.type==null?t.jsx(Ke,{children:e}):null,l?.type=="day"&&l.dayOfMonth!=null?t.jsxs(de,{children:[t.jsx(W,{children:M.daysOfMonth[`${l.dayOfMonth}`]}),t.jsx(W,{children:M.ofEveryMonth})]}):null,l?.type==="lastDayOfMonth"?t.jsxs(de,{children:[t.jsx(W,{children:M.daysOfMonth.lastDayOfMonth}),t.jsx(W,{children:M.ofEveryMonth})]}):null]})}function Ye({defaultValue:e,onClick:l}){return t.jsxs(Xe,{children:[t.jsx(Y,{children:[...Array(7).keys()].map(s=>{const r=s+1;return t.jsx(_,{isSelected:r===e,onClick:()=>l(Re(r)),children:r},r)})}),t.jsx(Y,{children:[...Array(7).keys()].map(s=>{const r=s+8;return t.jsx(_,{isSelected:r===e,onClick:()=>l(r),children:r},r)})}),t.jsx(Y,{children:[...Array(7).keys()].map(s=>{const r=s+15;return t.jsx(_,{isSelected:r===e,onClick:()=>l(r),children:r},r)})}),t.jsx(Y,{children:[...Array(7).keys()].map(s=>{const r=s+22;return t.jsx(_,{isSelected:r===e,onClick:()=>l(r),children:r},r)})})]})}const _e=e=>{switch(e.type){case"day":return e.dayOfMonth==null;case"lastDayOfMonth":return!1;default:return!0}},qe=o.div`
1
+ import{J as A,e as X,V as t,ix as ie,iy as le,F as oe,iz as xe,dQ as fe,fg as ye,b as I,O as R,iA as we,iw as be,o as i,y as b,p as j,l as $e,aa as re,dM as je,cp as Se,cr as ke,cJ as Z,es as ee,cO as ve,iB as K,iC as De,b4 as Ce,iD as Me,ct as ze,iE as Oe,c as h,al as O,ba as Ee,cq as Le,ao as pe,eB as Ie,b2 as ne,en as Ae,aS as Fe,iF as F,gg as Be,aO as Te,iG as Ve,aW as H,c$ as Je,bi as Pe}from"./index-e-SZUuyN.js";import{n as o,c as J}from"./mui-mhzAEcDs.js";import{a as C}from"./sentry-Dla7mstv.js";import{bh as G,G0 as Re}from"./zeni-epic-state-CSmiPBaP.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="b171933e-4707-43db-aca2-9ef297ab8433",e._sentryDebugIdIdentifier="sentry-dbid-b171933e-4707-43db-aca2-9ef297ab8433")}catch{}})();const N=(e,l)=>`${e}.${l}`,{formElements:{dayOfMonthSelector:M},common:se}=R.getLocalizedStrings();function Ne({defaultValue:e,name:l,placeholder:s,alignLeft:r=!1,style:p,isDisabled:n,registerOptions:d,onSaveClick:c,onCancelClick:w}){const[f,u]=C.useState(!1),{control:m,formState:{errors:x},setValue:S}=Z(),v=()=>{k||(c(),u(!1))},y=()=>{w(),u(!1)},k=ee(x,l),g=A(),a=X();return t.jsx(pe,{onClickAway:()=>{u(!1)},children:t.jsx(Qe,{style:p,isDisabled:n!=null,windowSize:g,onClick:()=>{!f&&n==null&&u(!0)},children:t.jsx(Ie,{name:N(l,"dayOfMonth"),control:m,rules:{...d},render:()=>t.jsxs(qe,{children:[t.jsx(We,{placeholder:s,defaultValue:e,isDisabled:n}),f?t.jsxs(Ge,{alignLeft:r===!0,children:[t.jsx(et,{}),t.jsxs(ae,{isSelected:e.type==="day",children:[t.jsxs(Ze,{isError:e.type==="day"&&k,children:[t.jsx(ne,{label:{label:M.pickDate},radioField:{id:"day",name:N(l,"type"),value:"day",radioSize:"small",checked:e.type==="day"},style:{...I.smallRegular.cssObject,padding:`${i.sp3} ${i.sp0}`,width:"fit-content",marginLeft:i.sp3,minWidth:"35%"},labelStyle:{color:e.type==="day"&&k?j.important:"inherit"}}),t.jsx(Ae,{name:N(l,"dayOfMonth"),type:"number",placeholder:M.placeholder,disableCopyPaste:!0,autoTrim:"trim",onKeyDown:$=>{$.key!=="Backspace"&&isNaN(parseInt($.key))&&$.preventDefault()},defaultValue:e.dayOfMonth!=null&&!isNaN(e.dayOfMonth)?e.dayOfMonth:0,registerOptions:{min:1,max:28},outerDivStyle:{width:"fit-content",marginLeft:i.sp1,marginRight:i.sp1},style:{border:`1px solid ${e.type==="day"&&k?j.important:a.colors.grey2}`,borderRadius:i.sp1,...I.smallRegular.cssObject,padding:i.sp2,maxWidth:"35px",boxSizing:"border-box"}}),t.jsx(Ue,{isSelected:e.type==="day",children:M.ofEveryMonth})]}),t.jsx(Ye,{defaultValue:e.dayOfMonth,onClick:$=>{S(`${l}.dayOfMonth`,$),S(`${l}.type`,"day")}})]}),t.jsx(tt,{}),t.jsx(ae,{isSelected:e.type==="lastDayOfMonth",children:t.jsx(ne,{label:{label:M.lastDayOfMonth},radioField:{id:"lastDayOfMonth",name:N(l,"type"),value:"lastDayOfMonth",radioSize:"small",checked:e.type==="lastDayOfMonth"},style:{...I.smallRegular.cssObject,padding:`${i.sp3} ${i.sp0}`,width:"fit-content",marginLeft:i.sp3},labelStyle:{color:e.type==="lastDayOfMonth"&&k?j.important:"inherit"}})}),t.jsx(Fe,{primaryBtn:{label:se.footer.save,onClick:v,isDisabled:_e(e),type:"button",style:{minWidth:"83px"}},cancelBtn:{label:se.footer.cancel,onClick:y,style:{minWidth:"83px"}},style:{position:"unset",backgroundColor:"transparent"}})]}):null]})})})})}function We({placeholder:e,defaultValue:l,isDisabled:s}){return t.jsxs(He,{isDisabled:s!=null,children:[l?.type==null?t.jsx(Ke,{children:e}):null,l?.type=="day"&&l.dayOfMonth!=null?t.jsxs(de,{children:[t.jsx(W,{children:M.daysOfMonth[`${l.dayOfMonth}`]}),t.jsx(W,{children:M.ofEveryMonth})]}):null,l?.type==="lastDayOfMonth"?t.jsxs(de,{children:[t.jsx(W,{children:M.daysOfMonth.lastDayOfMonth}),t.jsx(W,{children:M.ofEveryMonth})]}):null]})}function Ye({defaultValue:e,onClick:l}){return t.jsxs(Xe,{children:[t.jsx(Y,{children:[...Array(7).keys()].map(s=>{const r=s+1;return t.jsx(_,{isSelected:r===e,onClick:()=>l(Re(r)),children:r},r)})}),t.jsx(Y,{children:[...Array(7).keys()].map(s=>{const r=s+8;return t.jsx(_,{isSelected:r===e,onClick:()=>l(r),children:r},r)})}),t.jsx(Y,{children:[...Array(7).keys()].map(s=>{const r=s+15;return t.jsx(_,{isSelected:r===e,onClick:()=>l(r),children:r},r)})}),t.jsx(Y,{children:[...Array(7).keys()].map(s=>{const r=s+22;return t.jsx(_,{isSelected:r===e,onClick:()=>l(r),children:r},r)})})]})}const _e=e=>{switch(e.type){case"day":return e.dayOfMonth==null;case"lastDayOfMonth":return!1;default:return!0}},qe=o.div`
2
2
  position: relative;
3
3
  `,He=o.div`
4
4
  display: flex;