@zeniai/web-cockpit-ui 1.14.91-dev → 1.14.91-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 (213) hide show
  1. package/dist/assets/{ACHDetailsPage-B6sY0jN6-B0gf8H4B.js → ACHDetailsPage-B6sY0jN6-QcJjVZLW.js} +1 -1
  2. package/dist/assets/{AIPerformancePage-BWK9fXrz-DKsZ1mo0.js → AIPerformancePage-BWK9fXrz-rCBrp1JL.js} +1 -1
  3. package/dist/assets/{AccountInfoPage-DfT5DDiZ-fWZyYCg5.js → AccountInfoPage-DfT5DDiZ-D0CVlv97.js} +1 -1
  4. package/dist/assets/{AccountInfoPageContent-nUi26Aww-BYypek4H.js → AccountInfoPageContent-nUi26Aww-D32CRcv0.js} +1 -1
  5. package/dist/assets/{AccountLockedInfoModal-BROj4bmE-BVM1T1YI.js → AccountLockedInfoModal-BROj4bmE-DFG-AArf.js} +1 -1
  6. package/dist/assets/{AccountReconDetailsDrawerPage-C-3FFCQZ-sRbxt9OR.js → AccountReconDetailsDrawerPage-C-3FFCQZ-DSRssRwi.js} +1 -1
  7. package/dist/assets/{AccountRow-BM2kGWyR-T6iB2hx_.js → AccountRow-BM2kGWyR-CUEabI22.js} +1 -1
  8. package/dist/assets/{AccountsPromoCardStack-CNCG5uPJ-CVvmiGCx.js → AccountsPromoCardStack-CNCG5uPJ-D2Rks2IH.js} +1 -1
  9. package/dist/assets/{AddAddressForCardDrawer-BuAtFO1w-BFBt3SFQ.js → AddAddressForCardDrawer-BuAtFO1w-DfK93MR3.js} +1 -1
  10. package/dist/assets/{AddToWalletPage-DyrcWdBZ-CvPiU8kF.js → AddToWalletPage-DyrcWdBZ-BOmGChQh.js} +1 -1
  11. package/dist/assets/{AgingReportsPage-CmluxKG3-A44UbSFN.js → AgingReportsPage-CmluxKG3-CDFaJsCv.js} +1 -1
  12. package/dist/assets/{AllUserItems-CVZZU-J3-TfKbUj2d.js → AllUserItems-CVZZU-J3-CQYclBqY.js} +1 -1
  13. package/dist/assets/{ApAgingDetailPage-CoNxqskm-DFDFQfze.js → ApAgingDetailPage-CoNxqskm-D1SMh_uB.js} +1 -1
  14. package/dist/assets/{AppBasePage-CTGNzUtN-DSfPwIJw.js → AppBasePage-CTGNzUtN-CsSqlHFb.js} +1 -1
  15. package/dist/assets/{AppDrawerContent-59dQVUxu-C64nAWzc.js → AppDrawerContent-59dQVUxu-BK18x8lU.js} +1 -1
  16. package/dist/assets/{ApprovalRulesSettingsPage-XEW5sdNg-BbhudnSk.js → ApprovalRulesSettingsPage-XEW5sdNg-B6n0n-AH.js} +1 -1
  17. package/dist/assets/{ArAgingChart-D3Ym4gVE-BqVBnPwY.js → ArAgingChart-D3Ym4gVE-BMi6xDeV.js} +1 -1
  18. package/dist/assets/{ArAgingDetailPage-BLEJSLJJ-DwMAtZnW.js → ArAgingDetailPage-BLEJSLJJ-Cks0yhvG.js} +1 -1
  19. package/dist/assets/{AttachmentView-DSP80cjm-UNIl1Ai8.js → AttachmentView-DSP80cjm-CgZkBq6h.js} +1 -1
  20. package/dist/assets/{BankAccountSection-DRrNcA79-hP-Vs5m_.js → BankAccountSection-DRrNcA79-CfWXJkCL.js} +1 -1
  21. package/dist/assets/{BankAccountWarningSection-Ub-gsfhE-CrMug0PW.js → BankAccountWarningSection-Ub-gsfhE-pYaBnYwo.js} +1 -1
  22. package/dist/assets/{BankConnectionsSettingsPage-BcTtJTbg-algC_RED.js → BankConnectionsSettingsPage-BcTtJTbg-Bmy_bjMC.js} +1 -1
  23. package/dist/assets/{BillDetailPage-D7AQyxwr-Cr5mMjBH.js → BillDetailPage-D7AQyxwr-DdsAIdzy.js} +1 -1
  24. package/dist/assets/{BillPayApprovalRuleDetailPage-BQWGENO8-OS81cubl.js → BillPayApprovalRuleDetailPage-BQWGENO8-B3YKN5mU.js} +1 -1
  25. package/dist/assets/{BillPayApprovalRulesPage-BbA1Nwqe-BwMbtGVn.js → BillPayApprovalRulesPage-BbA1Nwqe-Clw-2wlC.js} +1 -1
  26. package/dist/assets/{BillPayPromoPage-DSTS_vBW-BNfdixF0.js → BillPayPromoPage-DSTS_vBW-CQQQB354.js} +1 -1
  27. package/dist/assets/{BillPaySetUpPage-CvlVPVCA-C-Yq8DpY.js → BillPaySetUpPage-CvlVPVCA-NjhuI3UN.js} +1 -1
  28. package/dist/assets/{BillingSettingsPage-nKpHtd4C-Bnbrb4t9.js → BillingSettingsPage-nKpHtd4C-Dt0uXp5Q.js} +1 -1
  29. package/dist/assets/{BillsBulkReviewDrawerPage-DNHAoceL-Dw8wGAVZ.js → BillsBulkReviewDrawerPage-DNHAoceL-Cb4kf05q.js} +1 -1
  30. package/dist/assets/{BoxItem-Bjv3WNXO-DVhc5wWw.js → BoxItem-Bjv3WNXO-BmJyEo8P.js} +1 -1
  31. package/dist/assets/{BusinessVerificationPage-Bj4D9bX2-BIO97DuN.js → BusinessVerificationPage-Bj4D9bX2-BwDZ1SF1.js} +1 -1
  32. package/dist/assets/{CardNumberSubText-BYY-Inxd-BdlFsn4_.js → CardNumberSubText-BYY-Inxd-BF9mueWC.js} +1 -1
  33. package/dist/assets/{CashbackDetailPage-D9UiTqp9-zR6MfAmm.js → CashbackDetailPage-D9UiTqp9-KfzGeeHg.js} +1 -1
  34. package/dist/assets/{ChargeCardDetailPage-C5EdiIyl-DLQH13JM.js → ChargeCardDetailPage-C5EdiIyl-DtWHXqSs.js} +1 -1
  35. package/dist/assets/{ChargeCardListPage-DZwz1qoD-C4LK4t_r.js → ChargeCardListPage-DZwz1qoD-DbcJS4HW.js} +1 -1
  36. package/dist/assets/{ChargeCardListTable-D5B05Z1F-BFq9lu6-.js → ChargeCardListTable-D5B05Z1F-CeQiSd9i.js} +1 -1
  37. package/dist/assets/{ChargeCardPromoPage-CDJMtGJb-BonChypf.js → ChargeCardPromoPage-CDJMtGJb-BhpbAa0E.js} +1 -1
  38. package/dist/assets/{ChargeCardSetupPage-CVV24gS9-Bz9Vbd0f.js → ChargeCardSetupPage-CVV24gS9-DEZ65n_v.js} +1 -1
  39. package/dist/assets/{ChargeCardStatementsPage-CmjBoi5e-CP137h_S.js → ChargeCardStatementsPage-CmjBoi5e-snf3xLLe.js} +1 -1
  40. package/dist/assets/{CheckDepositDrawerPage-CYOhT5Qz-Ctri9wNN.js → CheckDepositDrawerPage-CYOhT5Qz-DksjSdSX.js} +1 -1
  41. package/dist/assets/{CollapsableReportTable-hL_Ycouc-B8J7Q_nq.js → CollapsableReportTable-hL_Ycouc-BeVhCFjP.js} +1 -1
  42. package/dist/assets/{CompanyOfficerDetailsSection-DR_6TlQa-eD8A7jcO.js → CompanyOfficerDetailsSection-DR_6TlQa-CRHkdATL.js} +1 -1
  43. package/dist/assets/{CompanyPassportCard-B4chn7-Q-D5SPmBv_.js → CompanyPassportCard-B4chn7-Q-C5MlH5vF.js} +1 -1
  44. package/dist/assets/{CompanyPassportPage-oT9HnnPQ-SX0lC40Z.js → CompanyPassportPage-oT9HnnPQ-Cn_rUM0x.js} +1 -1
  45. package/dist/assets/{CompleteProfile-BgH4v76Z-8UAVvvgt.js → CompleteProfile-BgH4v76Z-CMAlYJ7H.js} +1 -1
  46. package/dist/assets/{ConfettiBurst-Cl6jHJ8H-LC2meCe-.js → ConfettiBurst-Cl6jHJ8H-CSCZc3Am.js} +1 -1
  47. package/dist/assets/{CreateOrEditVendorPage-CW-u7pJU-p324jU3k.js → CreateOrEditVendorPage-CW-u7pJU-BbNmJCzp.js} +1 -1
  48. package/dist/assets/{CreditCardPaymentDrawerPage-D30M7ol4-DoXJ5bDN.js → CreditCardPaymentDrawerPage-D30M7ol4-DHMoXleH.js} +1 -1
  49. package/dist/assets/{CurrencySelectField-DOCEstMc-DZU689ma.js → CurrencySelectField-DOCEstMc-lt77fvq3.js} +1 -1
  50. package/dist/assets/{CustomerOnboardingActivationPage-DMPNjFL_-ku4Vuy0S.js → CustomerOnboardingActivationPage-DMPNjFL_-Di2Nadj1.js} +1 -1
  51. package/dist/assets/{CustomerOnboardingContainerPage-SmOFmXBW-DTgF2r26.js → CustomerOnboardingContainerPage-SmOFmXBW-BcjiZZxB.js} +1 -1
  52. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-CBYo4VQn-Dn7fU-s8.js → CustomerOnboardingDetailPageSkeleton-CBYo4VQn-BXbbBAgo.js} +1 -1
  53. package/dist/assets/{CustomerOnboardingNoStepsPage-EBVRCYfJ-CfvYqECa.js → CustomerOnboardingNoStepsPage-EBVRCYfJ-D_7GUO1D.js} +1 -1
  54. package/dist/assets/{CustomerOnboardingPage-TJK6s-LM-BKRL2lJB.js → CustomerOnboardingPage-TJK6s-LM-C-OnNjx4.js} +1 -1
  55. package/dist/assets/{CustomerOnboardingProductSuitePage-lNIP5gSu-PR2itKHa.js → CustomerOnboardingProductSuitePage-lNIP5gSu-DYmoezK0.js} +1 -1
  56. package/dist/assets/{Dashboard-WiE9IRrh-Cv0kOt8p.js → Dashboard-WiE9IRrh-DLy2oEV6.js} +1 -1
  57. package/dist/assets/{DashboardReportPage-BKHl_IVD-C4Ea2qys.js → DashboardReportPage-BKHl_IVD--5FXkbx2.js} +1 -1
  58. package/dist/assets/{DashboardSidebarBackgroundAnimation-B1mJObim-BrrhB9xn.js → DashboardSidebarBackgroundAnimation-B1mJObim-DmY76tPV.js} +1 -1
  59. package/dist/assets/{DepositAccTransactionItem-C8tChaJS-DUssbHtI.js → DepositAccTransactionItem-C8tChaJS-C2YE4gmN.js} +1 -1
  60. package/dist/assets/{DepositAccTransactionListPage-B6px7upV-CeIhvwtb.js → DepositAccTransactionListPage-B6px7upV-Cv-bpsAZ.js} +1 -1
  61. package/dist/assets/{DomesticWireDetailsPage-BFQJmzYm-RX-JpFy3.js → DomesticWireDetailsPage-BFQJmzYm-Dc980arD.js} +1 -1
  62. package/dist/assets/{DownloadOverlay-DB-qx46O-j8z4pSob.js → DownloadOverlay-DB-qx46O-QQjLHCMg.js} +1 -1
  63. package/dist/assets/{DrawerPage-Bha9ElcW-B8Be3mMf.js → DrawerPage-Bha9ElcW-DYWZbR7w.js} +1 -1
  64. package/dist/assets/{EditPeoplePage-B6QD5Vld-jl0Ywq6s.js → EditPeoplePage-B6QD5Vld-CisYF3Ng.js} +1 -1
  65. package/dist/assets/{EditReimbursementDetailPage-EplOf2mP-0BJtsB6D.js → EditReimbursementDetailPage-EplOf2mP-D1RbirS3.js} +1 -1
  66. package/dist/assets/{EntityDetailPage-5Cu1qehd-DbU14HUf.js → EntityDetailPage-5Cu1qehd-D07nT3Te.js} +1 -1
  67. package/dist/assets/{EntitySummarySection-D6z6-dM7-CxR6H9p6.js → EntitySummarySection-D6z6-dM7-DEGQNQVO.js} +1 -1
  68. package/dist/assets/{ExpenseAutomationOverviewPage-DkoxczRc-Nhh5EsPg.js → ExpenseAutomationOverviewPage-DkoxczRc-NF6HtctB.js} +1 -1
  69. package/dist/assets/{ExpenseAutomationPage-Na3XKgcg-v_T_dNPC.js → ExpenseAutomationPage-Na3XKgcg-Cmx09CtX.js} +1 -1
  70. package/dist/assets/{ExpressPayPage-DWGl_gml-BK4q9z9-.js → ExpressPayPage-DWGl_gml-D5XRTVzj.js} +1 -1
  71. package/dist/assets/{FeaturePreviewPage-BgkpUPMm-CjuE-Vy6.js → FeaturePreviewPage-BgkpUPMm-DzDv67fj.js} +1 -1
  72. package/dist/assets/{FollowStepsSection-64oy2OLD-mYi4qCkY.js → FollowStepsSection-64oy2OLD-7-LclZyo.js} +1 -1
  73. package/dist/assets/{GlobalReviewListPage-DHfTyj2C-jQOPvWvS.js → GlobalReviewListPage-DHfTyj2C-OAyr9UAc.js} +1 -1
  74. package/dist/assets/{InformationCardStack-Dw3lhl2I-7einUDdd.js → InformationCardStack-Dw3lhl2I-2Y0pRe_r.js} +1 -1
  75. package/dist/assets/{InsightsCardStack-BiEswY1Z-B0ppu_rT.js → InsightsCardStack-BiEswY1Z-CQn7ZFVZ.js} +1 -1
  76. package/dist/assets/{InsightsSection-DvqCilqy-J94KiGaL.js → InsightsSection-DvqCilqy-BvIpOsD6.js} +1 -1
  77. package/dist/assets/{IntegrationsSettingsPage-DzVYf5ff-EFzWzTcS.js → IntegrationsSettingsPage-DzVYf5ff-K49nYAJL.js} +1 -1
  78. package/dist/assets/{InternationalWireSwiftDetailsPage-DTHcuQsH-DCnTBpNn.js → InternationalWireSwiftDetailsPage-DTHcuQsH-C8RSfXK9.js} +1 -1
  79. package/dist/assets/{InternationalWireVerificationPage-BzyRqd-m-CtMekcQE.js → InternationalWireVerificationPage-BzyRqd-m-BPPlgLxU.js} +1 -1
  80. package/dist/assets/{InviteFormPage-CaJB3ss1-BX5i7EqT.js → InviteFormPage-CaJB3ss1-C7CdP0jU.js} +1 -1
  81. package/dist/assets/{InvitePageListView-8Ltt8tHx-CtYoDyrk.js → InvitePageListView-8Ltt8tHx-Dpx_AdxA.js} +1 -1
  82. package/dist/assets/{InvitePeoplePage-A7oKAD7M-BQc_PdIV.js → InvitePeoplePage-A7oKAD7M-BX9kPS5-.js} +1 -1
  83. package/dist/assets/{InvoiceUploadSection-DomquLut-e92SA0tf.js → InvoiceUploadSection-DomquLut-BX54FmZz.js} +1 -1
  84. package/dist/assets/{IssueChargeCardPage-DtIQ1Buk-DjM4t17X.js → IssueChargeCardPage-DtIQ1Buk-BN7RzIYF.js} +1 -1
  85. package/dist/assets/{LabeledAddressValue-B_9lh-_a-DIizmhzb.js → LabeledAddressValue-B_9lh-_a-DrM7vU1s.js} +1 -1
  86. package/dist/assets/{LabeledAddressValueField-CC7T3qZQ-m9gvzhHo.js → LabeledAddressValueField-CC7T3qZQ-1BY0JFnr.js} +1 -1
  87. package/dist/assets/{LabeledControlledCheckBoxField-CeMM7Ci3-mZLzoQGL.js → LabeledControlledCheckBoxField-CeMM7Ci3-LBs1AfJr.js} +1 -1
  88. package/dist/assets/{LabeledCreatableSingleSelectField-DKD0oEl8-gq-eDRMt.js → LabeledCreatableSingleSelectField-DKD0oEl8-TvdaP8Vv.js} +1 -1
  89. package/dist/assets/{LabeledDocumentField-Dy3jwAiL-49YAoImC.js → LabeledDocumentField-Dy3jwAiL-CCiYsV9S.js} +1 -1
  90. package/dist/assets/{LabeledDropDownFormattedTextField-DDzM3r6s-ECrfBFdw.js → LabeledDropDownFormattedTextField-DDzM3r6s-CluakS-U.js} +1 -1
  91. package/dist/assets/{LabeledText-axaAGyUS-Dng_AeMD.js → LabeledText-axaAGyUS-CcC7jZEk.js} +1 -1
  92. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-UlGND56Y-Bns3vXLL.js → LabeledUserSingleSelectWithSubtitlesField-UlGND56Y-BKf09x4e.js} +1 -1
  93. package/dist/assets/{LabeledZeniRolesDropDownField-dpz7g9jK-BS9FUIQq.js → LabeledZeniRolesDropDownField-dpz7g9jK-OaRP8J18.js} +1 -1
  94. package/dist/assets/{LinkJETransactionPage-CJniqVcu-DlmRVmek.js → LinkJETransactionPage-CJniqVcu-CEg5TESY.js} +1 -1
  95. package/dist/assets/{LockCardPage-CjO8cr2a-_f0132IP.js → LockCardPage-CjO8cr2a-D35PEeDH.js} +1 -1
  96. package/dist/assets/{LowBalancePopup-DVS-w3b7-DP0lgN2T.js → LowBalancePopup-DVS-w3b7-B-J4NCtT.js} +1 -1
  97. package/dist/assets/{MagicLinkACHDetailsPage-CUHMKmcj-B4JK6Tsk.js → MagicLinkACHDetailsPage-CUHMKmcj-C1Uh1KWH.js} +1 -1
  98. package/dist/assets/{MagicLinkDomesticWireDetailsPage-Dnc7OzKQ-CjkHVZHo.js → MagicLinkDomesticWireDetailsPage-Dnc7OzKQ-DlGiUpRU.js} +1 -1
  99. package/dist/assets/{MagicLinkInternationalWireDetailsPage-sBpQkYwP-BFgoRuDp.js → MagicLinkInternationalWireDetailsPage-sBpQkYwP-BJ6bmenf.js} +1 -1
  100. package/dist/assets/{MagicLinkSuccessPage-DAAoq3iT-c3oKtr_f.js → MagicLinkSuccessPage-DAAoq3iT-RnQYScep.js} +1 -1
  101. package/dist/assets/{MagicLinkTitleSection-FMRBLlRJ-BOWrScDm.js → MagicLinkTitleSection-FMRBLlRJ-Cd8bErwn.js} +1 -1
  102. package/dist/assets/{MailingDetailsSection-CiJ5JLA6-DddwOxAo.js → MailingDetailsSection-CiJ5JLA6-Cv8N5toW.js} +1 -1
  103. package/dist/assets/{Menu-wpP8R1br-CxnIQs8p.js → Menu-wpP8R1br-C8t8BK70.js} +1 -1
  104. package/dist/assets/{MyBankConnectionsSettingsPage-DIIFgnkE-CogNLqVY.js → MyBankConnectionsSettingsPage-DIIFgnkE-S9MhwXB4.js} +1 -1
  105. package/dist/assets/{MyPendingActivationChargeCardListPage-Di_KYRgS-DRNBLhDG.js → MyPendingActivationChargeCardListPage-Di_KYRgS-CK6YDHgF.js} +1 -1
  106. package/dist/assets/{MyProfileSettingsPage-m6vaeGgZ-chnTYzOu.js → MyProfileSettingsPage-m6vaeGgZ-Dsfb8_5o.js} +1 -1
  107. package/dist/assets/{NavBarWithPicker-C_qO8mgD-DUpFfabv.js → NavBarWithPicker-C_qO8mgD-BXQJ2aBI.js} +1 -1
  108. package/dist/assets/{NavigationArrow-BXYIj6Wz-DziJLhPd.js → NavigationArrow-BXYIj6Wz-D0J_smpz.js} +1 -1
  109. package/dist/assets/{NavigationDots-BvKSgdgh-LQiuRx4x.js → NavigationDots-BvKSgdgh-BqXI1Dvt.js} +1 -1
  110. package/dist/assets/{NewGlobalMerchantPage-Dc3xEoiZ-C2aDiu95.js → NewGlobalMerchantPage-Dc3xEoiZ-DLsg8Naf.js} +1 -1
  111. package/dist/assets/{NoDataChart-C5ZP32zB-Co6FSXzL.js → NoDataChart-C5ZP32zB-DUId3_Lj.js} +1 -1
  112. package/dist/assets/{NoDataTable-BnBYE8p_-CiELOEE2.js → NoDataTable-BnBYE8p_-3MJZp5mC.js} +1 -1
  113. package/dist/assets/{NotFoundPage-CZ25GWwU-BIBXUzqs.js → NotFoundPage-CZ25GWwU-_oSr8iWX.js} +1 -1
  114. package/dist/assets/{NotificationSettingsPage-DHvgj7Hu-D3suXG--.js → NotificationSettingsPage-DHvgj7Hu-BdTBQFAp.js} +1 -1
  115. package/dist/assets/{NotificationsListConfig-BBLSv0sd-C4KCM8pw.js → NotificationsListConfig-BBLSv0sd-CyiwE-QZ.js} +1 -1
  116. package/dist/assets/{NotificationsPage-CGVEC-Zc-C8fq9c_9.js → NotificationsPage-CGVEC-Zc-DTkwGX6T.js} +1 -1
  117. package/dist/assets/{OpExByVendorPage-D55JZne--D9xmj7rz.js → OpExByVendorPage-D55JZne--CJqRGQiy.js} +1 -1
  118. package/dist/assets/{OverlayContainerPage-Daz3A7cI-D6qPPmeQ.js → OverlayContainerPage-Daz3A7cI-DQE32HEH.js} +1 -1
  119. package/dist/assets/{PandLWithForecastPage-fVmttEKP-D6Evs_k0.js → PandLWithForecastPage-fVmttEKP-BDMz5n2J.js} +1 -1
  120. package/dist/assets/{PaymentAccountSetupBillingAddressSection-BiU8tQnm-4Kl9uXwr.js → PaymentAccountSetupBillingAddressSection-BiU8tQnm-Dbfq-Q5l.js} +1 -1
  121. package/dist/assets/{PeoplePage-QuuuX2AS-CUwuNLCQ.js → PeoplePage-QuuuX2AS-BRICHczf.js} +1 -1
  122. package/dist/assets/{ProductsCarousel-zdZkfaiY-CKycG9Wt.js → ProductsCarousel-zdZkfaiY-_T4nYSYs.js} +1 -1
  123. package/dist/assets/{PromoBaseCards-flFtcbIg-iLyc6jwq.js → PromoBaseCards-flFtcbIg-m_Kz4ZRp.js} +1 -1
  124. package/dist/assets/{QBOConnectionDialog-DNB2C1vQ-B6h7mZJt.js → QBOConnectionDialog-DNB2C1vQ-DhNQ7g0E.js} +1 -1
  125. package/dist/assets/{QBOSetupSection-B59etoGz-Dx4Hkrje.js → QBOSetupSection-B59etoGz-_sJLDOFX.js} +1 -1
  126. package/dist/assets/{ReimbursementApprovalRuleDetailPage-D7do3o0A-DaR0xdJA.js → ReimbursementApprovalRuleDetailPage-D7do3o0A-BCz-fjPF.js} +1 -1
  127. package/dist/assets/{ReimbursementApprovalRulesPage-BJ6GewQ2-D7efVmkv.js → ReimbursementApprovalRulesPage-BJ6GewQ2-CIt97LH3.js} +1 -1
  128. package/dist/assets/{ReimbursementDetailPage-DKAtYSOy-C-uqjyM_.js → ReimbursementDetailPage-DKAtYSOy-CiNVqXoI.js} +1 -1
  129. package/dist/assets/{ReimbursementPromoPage-DKcSHlHp-XcrUKScH.js → ReimbursementPromoPage-DKcSHlHp-5hV7x373.js} +1 -1
  130. package/dist/assets/{ReimbursementSetUpPage-Y1e_hna--rh2VyUST.js → ReimbursementSetUpPage-Y1e_hna--D_F0MA0d.js} +1 -1
  131. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-fgz8s4w9-CzZAxGly.js → ReimbursementsBulkReviewDrawerPage-fgz8s4w9-VUP64soN.js} +1 -1
  132. package/dist/assets/{ReloadCard-DjtdPHq5-BoSxtWCb.js → ReloadCard-DjtdPHq5-k80dn-sY.js} +1 -1
  133. package/dist/assets/{ReportTableViewSelector-C8e6IEWt-BJN3fro7.js → ReportTableViewSelector-C8e6IEWt-C9oSqHHS.js} +1 -1
  134. package/dist/assets/{ReportsPage-BIe0eDLC-D5ygJVqP.js → ReportsPage-BIe0eDLC-BkK5XGLi.js} +1 -1
  135. package/dist/assets/{RevenueChart-Cc0XrxLL-BB6kfchw.js → RevenueChart-Cc0XrxLL-CKhxzTm3.js} +1 -1
  136. package/dist/assets/{ReviewDetailsPage-CU1AYWgR--SOiatSS.js → ReviewDetailsPage-CU1AYWgR-BwWw8nzF.js} +1 -1
  137. package/dist/assets/{ReviewOverlay-CruJ9O84-BdMFQyaH.js → ReviewOverlay-CruJ9O84-tthxypv2.js} +1 -1
  138. package/dist/assets/{RoleWithToolTip-fC3byzzv-DteZC2-q.js → RoleWithToolTip-fC3byzzv-h3kSlu0j.js} +1 -1
  139. package/dist/assets/{ScheduleDetailsFixedAssetsPage-CE3tUYhk-Aj3mnuFr.js → ScheduleDetailsFixedAssetsPage-CE3tUYhk-BF1406RS.js} +1 -1
  140. package/dist/assets/{ScheduleDetailsPage-BhAqJ1Of-BNYzMpaE.js → ScheduleDetailsPage-BhAqJ1Of-BbWry4yd.js} +1 -1
  141. package/dist/assets/{ScheduleSequenceTable-NSt1juSD-BtySotUK.js → ScheduleSequenceTable-NSt1juSD-B6P-vowS.js} +1 -1
  142. package/dist/assets/{ScreenRoutes-Ofrn7XPK.js → ScreenRoutes-CPwJf5AY.js} +1 -1
  143. package/dist/assets/{SetUpAccountSection-C1EnJv1V-nWkvB51T.js → SetUpAccountSection-C1EnJv1V-xzskbN4f.js} +1 -1
  144. package/dist/assets/{SignIn-BhIof_Cm-Stp0fHNQ.js → SignIn-BhIof_Cm-BQjlVN_5.js} +1 -1
  145. package/dist/assets/{SignInScreen-ApNcuhAj.js → SignInScreen-FZ4QwHzk.js} +1 -1
  146. package/dist/assets/{SpendManagementListViewPage-BEWNNX_Z-Qf8TDCkQ.js → SpendManagementListViewPage-BEWNNX_Z-LpCmCl9n.js} +3 -3
  147. package/dist/assets/{SpendManagementPerTabPage-Vs1Eoxgd-DGhcXeqs.js → SpendManagementPerTabPage-Vs1Eoxgd-B-R3eaH5.js} +1 -1
  148. package/dist/assets/{SpendManagementSection-C38Zpi1z-Hvu4v5m7.js → SpendManagementSection-C38Zpi1z-CSd7Ra1P.js} +1 -1
  149. package/dist/assets/{StatementItem-bHInVThd-BfGU3kqj.js → StatementItem-bHInVThd-CvDlOdeO.js} +1 -1
  150. package/dist/assets/{StatementsPage-CGQhmaXx-CVtkQqM2.js → StatementsPage-CGQhmaXx-R_F9KvHl.js} +1 -1
  151. package/dist/assets/{StatusSwitcher-7fiKLb5g-cQtYU__8.js → StatusSwitcher-7fiKLb5g-BflTgrEp.js} +1 -1
  152. package/dist/assets/{SubTabSwitcher-9AnfZiNy-CobTdTqd.js → SubTabSwitcher-9AnfZiNy-CnEO-V48.js} +1 -1
  153. package/dist/assets/{SummaryCard-DOycYLs1-BLeRuOD7.js → SummaryCard-DOycYLs1-BBnGU2Uh.js} +1 -1
  154. package/dist/assets/{TaskManagementPage-CehyMnY0-BwJtO-U4.js → TaskManagementPage-CehyMnY0-DxKz3xjn.js} +1 -1
  155. package/dist/assets/{TimeRangeSwitcher-Dq2FEgFR-DmMi5La_.js → TimeRangeSwitcher-Dq2FEgFR-BGlD5dTQ.js} +1 -1
  156. package/dist/assets/{TimeframeSwitcher-By3xz_-m-1CBF6COV.js → TimeframeSwitcher-By3xz_-m-C7-16i-O.js} +1 -1
  157. package/dist/assets/{TimeframeSwitcherWithToggle-a3fmbzNR-B9R7QlVw.js → TimeframeSwitcherWithToggle-a3fmbzNR-BNAWd54k.js} +1 -1
  158. package/dist/assets/{TopExCard-GEQpp_KY-74e79UYx.js → TopExCard-GEQpp_KY-IB_77Mna.js} +1 -1
  159. package/dist/assets/{TopExDetailPage-hid1dQYl-WgHXC6hE.js → TopExDetailPage-hid1dQYl-kxPti7uc.js} +1 -1
  160. package/dist/assets/{TransactionDetailPage-CX4JW9WM-DyZTJ1bq.js → TransactionDetailPage-CX4JW9WM-BDaPm8U3.js} +1 -1
  161. package/dist/assets/{TransactionList-BixeXh4Y-Il163hc_.js → TransactionList-BixeXh4Y-D5p8k6VE.js} +1 -1
  162. package/dist/assets/{TransactionListBig-CGMMJQBd-KQNhkGbE.js → TransactionListBig-CGMMJQBd-DtMoV0wS.js} +1 -1
  163. package/dist/assets/{TransactionListPage-CBVUTX4y-DWsla1LN.js → TransactionListPage-CBVUTX4y-B8N6WUAF.js} +1 -1
  164. package/dist/assets/{TransactionVendorDetailPage-CEbHH_0r-CS6QQqEG.js → TransactionVendorDetailPage-CEbHH_0r-B5vno7Kx.js} +1 -1
  165. package/dist/assets/{TransferDrawerPage-BFd7uQnF-AGu3EQB7.js → TransferDrawerPage-BFd7uQnF-DiQCCcuy.js} +1 -1
  166. package/dist/assets/{TreasuryOverviewPage-Bd58hOy8-P3TIcDYG.js → TreasuryOverviewPage-Bd58hOy8-CiIm-PN1.js} +1 -1
  167. package/dist/assets/{TreasuryPromoPage-BvArufHi-B6OSOn5z.js → TreasuryPromoPage-BvArufHi-H2j749vC.js} +1 -1
  168. package/dist/assets/{TreasuryStatementsPage-YLCEBbRh-BeAedV0-.js → TreasuryStatementsPage-YLCEBbRh-CcMOOxjw.js} +1 -1
  169. package/dist/assets/{TreasuryTaxLetterPage-D_6mgQqi-CO3HXioV.js → TreasuryTaxLetterPage-D_6mgQqi-yYkV0iu8.js} +1 -1
  170. package/dist/assets/{TrendChart-D3dT6hUb-CRyvw86n.js → TrendChart-D3dT6hUb-BHuMWYoT.js} +1 -1
  171. package/dist/assets/{TrendWithTransactions-Gj-u5KXi-CpckXM1N.js → TrendWithTransactions-Gj-u5KXi-81d3HYcO.js} +1 -1
  172. package/dist/assets/{UncategorizedAccountsMappingPage-B3eRYolj-D-Jwo7-l.js → UncategorizedAccountsMappingPage-B3eRYolj-BVdGDC68.js} +1 -1
  173. package/dist/assets/{UnitIntegrationPage-DpjR9hUu-BIdCIf5k.js → UnitIntegrationPage-DpjR9hUu-BLAHxX13.js} +1 -1
  174. package/dist/assets/{UploadAdditionalDocumentOverlay-COtszXUY-DBj80beJ.js → UploadAdditionalDocumentOverlay-COtszXUY-CEOzWsBe.js} +1 -1
  175. package/dist/assets/{Vendor2FAPopup-C85mhuSb-SCWhQlz7.js → Vendor2FAPopup-C85mhuSb-C6pzaZ31.js} +1 -1
  176. package/dist/assets/{VendorACHDetailsPage-DeexeWpV-CvETHK8j.js → VendorACHDetailsPage-DeexeWpV-CCXex94-.js} +1 -1
  177. package/dist/assets/{VendorDetailPage-BrbKfsL4-BYuDBwtU.js → VendorDetailPage-BrbKfsL4-DjpTEW-F.js} +1 -1
  178. package/dist/assets/{VendorDomesticWireDetailsPage-DBChSKlR-4iWeRYsC.js → VendorDomesticWireDetailsPage-DBChSKlR-eyjP7Ln-.js} +1 -1
  179. package/dist/assets/{VendorFiling1099EditablePage-DgBLn3fd-DyXTQ39Q.js → VendorFiling1099EditablePage-DgBLn3fd-BFued49C.js} +1 -1
  180. package/dist/assets/{VendorFirstReviewPage-jc7-OExI-CcNlKzIr.js → VendorFirstReviewPage-jc7-OExI-G9JlI2Cf.js} +1 -1
  181. package/dist/assets/{VendorInternationalWireDetailsPage-c6isgwH2-CfXEdhbK.js → VendorInternationalWireDetailsPage-c6isgwH2-jfoBKQiW.js} +1 -1
  182. package/dist/assets/{VendorInternationalWireSwiftDetailsPage-CywCx8-0-BWyYdePs.js → VendorInternationalWireSwiftDetailsPage-CywCx8-0-C4ZxXJOV.js} +1 -1
  183. package/dist/assets/{VendorsAccountsSection--VfdAF3H-aooc9xax.js → VendorsAccountsSection--VfdAF3H-D5xEFwOn.js} +1 -1
  184. package/dist/assets/{VerifyDevice-CaifjdR8-CqDImdvA.js → VerifyDevice-CaifjdR8-C5gOkIzM.js} +1 -1
  185. package/dist/assets/{VideoPlayer-BVR9LPmm-Cf1X7mgb.js → VideoPlayer-BVR9LPmm-CvUJV07D.js} +1 -1
  186. package/dist/assets/{VideoPopup-BEXc8o78-CxvDyO3n.js → VideoPopup-BEXc8o78-CVV-ILBt.js} +1 -1
  187. package/dist/assets/{WarningsDrawerPage-CboqfxzC-BsdL63Q1.js → WarningsDrawerPage-CboqfxzC-DFYQ5K3H.js} +1 -1
  188. package/dist/assets/{ZeniAccountDetailPage-Dujj0-XC-Bs0_mCxO.js → ZeniAccountDetailPage-Dujj0-XC-CqcpFC6J.js} +1 -1
  189. package/dist/assets/{ZeniAccountListViewPage--SMJDGvC-B9VB-g9k.js → ZeniAccountListViewPage--SMJDGvC-CM-NK1x4.js} +1 -1
  190. package/dist/assets/{ZeniAccountNavBarPieces-DqLJVQ5t-B6EqVL37.js → ZeniAccountNavBarPieces-DqLJVQ5t-C8FJNePa.js} +1 -1
  191. package/dist/assets/{ZeniAccountPromoPage-BVjJvWsA-D_izrQ3u.js → ZeniAccountPromoPage-BVjJvWsA-C-Z-wjK6.js} +1 -1
  192. package/dist/assets/{ZeniAccountSetupPage-Dvxst8RT-Dw_0q67c.js → ZeniAccountSetupPage-Dvxst8RT-DMWDIaa0.js} +1 -1
  193. package/dist/assets/{ZeniCopyright-B88k3pkr-D_GBhPtz.js → ZeniCopyright-B88k3pkr-BZVlJOkG.js} +1 -1
  194. package/dist/assets/{ZeniTransferAmountSlider-1DS0MsTI-D_vM8ORb.js → ZeniTransferAmountSlider-1DS0MsTI-B25HwNSf.js} +1 -1
  195. package/dist/assets/{analyticsHelper-DmujELNG-B2_5NV-p.js → analyticsHelper-DmujELNG-CREtjHan.js} +1 -1
  196. package/dist/assets/{analyticsHelper-D88-Oppk.js → analyticsHelper-lfrGqA3D.js} +1 -1
  197. package/dist/assets/{chartTypes-DRiSljvE-CN4L62GH.js → chartTypes-DRiSljvE-CV6dAhnU.js} +1 -1
  198. package/dist/assets/{commonDimensions-BDftm0gJ-DyUDFvZC.js → commonDimensions-BDftm0gJ-BmGAU2Ka.js} +1 -1
  199. package/dist/assets/{detailCommon-BGgE4mE3-D-w4kHC7.js → detailCommon-BGgE4mE3-DcwKCO51.js} +1 -1
  200. package/dist/assets/{downloadPdf-DCQ9vVZs-Be80rXL-.js → downloadPdf-DCQ9vVZs-BHlJTitV.js} +1 -1
  201. package/dist/assets/{index-DJLrbf0F.js → index-DDpxinoY.js} +558 -558
  202. package/dist/assets/{mapLoadingInProgressToTreeNode-CXP8ZZTG-DkaL-N2A.js → mapLoadingInProgressToTreeNode-CXP8ZZTG-CTGwDEAX.js} +1 -1
  203. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-BZSP-VcP-BuUbTOqM.js → mapSectionWithAcOnlyToTreeNode-BZSP-VcP-DnxPTr5m.js} +1 -1
  204. package/dist/assets/{mapSpacerToTreeNode-Bc1S_1ej-BOT7FVTB.js → mapSpacerToTreeNode-Bc1S_1ej-CYjFYdJ9.js} +1 -1
  205. package/dist/assets/{mapTimeframeBalancesToTreeNode-ClgcHX26-Cs9gyyXd.js → mapTimeframeBalancesToTreeNode-ClgcHX26-NiO57h1_.js} +1 -1
  206. package/dist/assets/{mapTimeframeBalancesToTreeNode-Cwp98PMa-tz5P0V5W.js → mapTimeframeBalancesToTreeNode-Cwp98PMa-D8SBCace.js} +1 -1
  207. package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-BmDRXfMV-Bmf8af15.js → mapTimeframeHeaderLoadingInProgressToTreeNode-BmDRXfMV-2wcYi7O-.js} +1 -1
  208. package/dist/assets/{toCOABalancesWithID--oEGymMJ-DrPkDPTu.js → toCOABalancesWithID--oEGymMJ-DR0b-mdX.js} +1 -1
  209. package/dist/assets/{toChartData-CavJzP6f-B2iIF7nP.js → toChartData-CavJzP6f-KkbBsImT.js} +1 -1
  210. package/dist/assets/{uploadAttachment-BuVCsq0Q-BB-5S1Qg.js → uploadAttachment-BuVCsq0Q-zKioks8R.js} +1 -1
  211. package/dist/assets/{uploadReceipts-CPw64UYa-DU-gRzOR.js → uploadReceipts-CPw64UYa-C0--mSOy.js} +1 -1
  212. package/dist/index.html +1 -1
  213. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import{av as At,a7 as Mt,q as Rt,d as Pt,ca as Bt,y as m,F as Xe,gc as Nt,ge as Lt,gf as _t,V as t,cm as ze,cn as Ae,co as Me,aK as y,bz as Re,bm as Ot,dr as Wt,gg as Et,gr as Pe,o as a,gh as Be,fd as b,ff as w,gk as x,aL as Ne,fc as Le,b as K,gm as _e,aO as Ft,an as Kt,gn as Ut,go as ie,bv as Vt,gp as Gt,L as Yt,a as Ht,B as Jt,ak as et,b7 as tt,p as U,al as qt,bS as Zt,ag as Qt,gI as Xt,gE as ei,c,cf as ti,cT as ii}from"./index-DJLrbf0F.js";import{a as p}from"./core-CA3j8Axi.js";import{n as r}from"./mui-DpJXlk4t.js";import{a as ai}from"./liveblocks-C2I4vRCJ.js";import{bO as ri,bS as oi,FC as ni}from"./zeni-epic-state-CQt4n3Xe.js";import li from"./InvoiceUploadSection-DomquLut-e92SA0tf.js";import{r as si,h as f,u as di}from"./types-DyvtCprH-NFPm5TaG.js";import"./sentry-BA4piVNf.js";import"./lottie-B7mXQ-R-.js";import"./analytics-CHPpxU3b.js";import"./recharts-BGdJnVo5.js";import"./utils-DUsHM-Uc.js";import"./lexical-dZFDzIA1.js";import"./AttachmentView-DSP80cjm-UNIl1Ai8.js";import"./uploadReceipts-CPw64UYa-DU-gRzOR.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]="96ac4536-80fb-4ce6-bed8-5ae1eba56666",e._sentryDebugIdIdentifier="sentry-dbid-96ac4536-80fb-4ce6-bed8-5ae1eba56666")}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])},ci={formTitle:new Ht("h6Regular","h5Regular")},la=({remiDetails:e,uploadInvoiceEndPoint:C,authParams:re,isAdmin:oe,signedInUser:ne,showApproveRejectBtns:le,isRealTimeApprovalEnabled:se,isReimbursementCommentingEnabled:u,isShowDeletedReimbursementEnabled:de,isSignedInUserReimbursementCreator:it,updateEditRealTimeApproverClicked:ce,onSaveRealTimeApprovals:me,redirectToReimbursementListScreen:V,redirectToEditableReimbursementScreen:at,onDuplicateLineClick:rt,approveOrRejectRemi:pe,deleteReimbursement:ot,cancelAndDeleteReport:ue,handleZeniLogoClick:nt,onAddNewRule:he})=>{const d=At(),lt=Mt().analytics,o=Rt(),ye=Pt(),[st,z]=p.useState(!1),[G,Y]=p.useState(!1),[dt,H]=p.useState(!1),[J,q]=p.useState("approved"),B=p.useRef(null),[j,Z]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[k,ct]=p.useState(null),[mt,N]=p.useState(!1),h=`dashboard_${d.currentTenant?.companyId}`,ge=p.useRef({}),be=l=>{const n=ge.current[l];n!=null&&setTimeout(()=>di(n,B.current),100)};p.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed")&&V()},[e,V]),p.useEffect(()=>{const l=window.location.hash;if(l&&l.startsWith("#L")){const n=l.substring(1);be(n)}},[]);const pt=()=>{V()};Bt({componentName:"reimbursement.details"});const ut={onOkClick:()=>{z(!1),j.primaryButtonText===i.buttons.delete?ot?.():j.title===i.cancelReportTitle?ue?.():j.title===i.cancelAndDeleteReportTitle&&ue?.(!0)},onCancelClick:()=>{z(!1)}},I=s.labelWidth.value(o),A=s.largeLabelWidth.value(o),we=Xe.getLocalizedStrings(),{common:{texts:{comments:ht},strings:{empty:xe}},collaboration:{threads:{placeholder:{addANewComment:yt,replyAComment:gt},tooltip:{resolveComment:bt,unResolveComment:wt}}},dateFormat:fe}=we,{reimbursementDetail:i,bulkActions:L}=we.spendManagement.reimbursement,Q=e.remiDetails?.reportTitle,S=e.remiDetails?.lines??[],_=e.remiDetails?.reimbursementInfo.stage,O=e.remiDetails?.reimbursementInfo.billStatus,W=e.remiDetails?.reimbursementInfo.billPaymentStatus,$e=_?.code==="paid",xt=$e?_:O?.code=="approved"&&W?.code?W:O,$=mi(e.remiDetails),M=O?.code=="approved"&&W?.code?W:O,E=e.remiDetails?.isDeleted??!1,ve=e.remiDetails?.amount,Te=e.remiDetails?.amount.amount??0,Se=()=>{Z({title:e.remiDetails?.reimbursementInfo.stage.code==="draft"?i.deleteDraftTitle:i.deleteReportTitle,description:i.deleteAlertDescription,primaryButtonText:i.buttons.delete,secondaryButtonText:i.buttons.cancel}),z(!0)},ft=()=>{Z({title:i.cancelReportTitle,description:i.cancelAlertDescription,primaryButtonText:i.buttons.yes,secondaryButtonText:i.buttons.no}),z(!0)},$t=()=>{Z({title:i.cancelAndDeleteReportTitle,description:i.cancelAndDeleteAlertDescription,primaryButtonText:i.buttons.yes,secondaryButtonText:i.buttons.no}),z(!0)},je=()=>{at()},vt={onOkClick:l=>{H(!1),pe({reimbursementId:e.remiDetails?.id??"",type:"rejected",description:l})},onCancelClick:()=>{H(!1)}},Tt=()=>{e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"?je():(q("approved"),pe({reimbursementId:e.remiDetails?.id??"",type:"approved"}))},St=()=>{e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"?(q("delete"),Se()):(q("rejected"),H(!0))},jt=e.remiDetails?.reimbursementInfo.paymentDate!=null?ri(oi(e.remiDetails.reimbursementInfo.paymentDate.toDate(),[0,6],e.achSameDayMaxDays).toDateString()):void 0,X=e.remiDetails?.reimbursementInfo.expectedDepositDate??jt,It=e.remiDetails?.lines?.some(l=>{const n=l.lineDetail;return n?.account?.isDeleted===!0&&n?.account?.isBillEditableCoaAccountType===!1})??!1,Ie=e.remiDetails?.reimbursementInfo.billStatus.code==="pending_approval"&&it&&!It,Dt=e.remiDetails?.reimbursementInfo.billStatus.code!=="rejected"&&e.remiDetails?.reimbursementInfo.billPaymentStatus.code!=="paid",ee=xt?.code,Ct=si(e.duplicateLineByLineId),De=e.duplicateReimbursementStatus.fetchState==="Completed"&&Ct>0,{requestToOpenThread:te,setRequestToOpenThread:Ce,setOpenThread:F}=p.useContext(Nt),{threads:R,isLoading:D}=Lt({application:"dashboard",companyId:d.currentTenant?.companyId,tab:"reimbursement",entityId:e.remiDetails?.id,isGlobalComment:!1},"both",!1),kt=p.useMemo(()=>R.filter(l=>l.resolved===!1&&!l.id.includes(_t)),[R]).length,zt=p.useCallback((l,n)=>{F(n),N(!1)},[F,N]);p.useEffect(()=>{te?.threadId!=null&&R.length>0&&!D&&(F(te.threadId),Ce(null))},[te,R,D,F,Ce]);const g={application:"dashboard",companyId:d.currentTenant?.companyId,tab:"reimbursement",entityId:e.remiDetails?.id},P=ni(e.remiDetails?.bulkProcessingDetail?.type);return t.jsxs(_i,{windowSize:o,ref:B,children:[st?t.jsx(ze,{titleComponent:t.jsx(Me,{children:j.title}),descriptionComponent:t.jsx(Ae,{children:j.description}),primaryButtonText:j.primaryButtonText,proceedButtonVariant:"danger",secondaryButtonText:j.secondaryButtonText,action:ut}):null,dt?t.jsx(ze,{titleComponent:t.jsx(Me,{children:`${i.rejectRemiTitlePrefix} ${e.remiDetails?.reportTitle??""} by ${e.createdBy?.firstName??""} ${e.createdBy?.lastName??""}`}),descriptionComponent:t.jsx(Ae,{children:i.rejectRemiDescription}),primaryButtonText:i.buttons.send,secondaryButtonText:i.buttons.cancel,action:vt,isEditPopup:!0,isNotesIncluded:!0,notesPlaceholder:i.rejectRejectReasonPlaceholder}):null,t.jsxs(Ai,{windowSize:o,"data-testid":y("reimbursement-detail-page-nav-bar-container"),children:[o!=="small"?t.jsx(Re,{"data-testid":y("reimbursement-detail-page-nav-bar-left"),style:{width:"42%"},title:"",leftSideComponent:t.jsx(Mi,{onClick:()=>nt?.(),"data-testid":y("remi-detail-page-nav-bar-zeni-logo")}),enableTitleOnScroll:!1,backgroundColor:ye.colors.background,keepBackgroundOnScroll:!0,scrollableContent:B,source:"ReimbursementDetailPage"}):null,o!=="small"?t.jsx(Ci,{}):null,t.jsx(Re,{"data-testid":y("reimbursement-detail-page-nav-bar-right"),title:Q??xe,leftSideComponent:t.jsx(t.Fragment,{}),style:{width:o!=="small"?"58%":"100%"},rightSideComponent:t.jsxs(Pi,{children:[u?t.jsxs(Bi,{isDisabled:D,onClick:D?()=>null:l=>{l.preventDefault(),l.stopPropagation(),ct({roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityType:"reimbursement.details",entityId:e.remiDetails?.id??""}),N(!0),lt.trackCommentActivity("reimbursement","clicked",d.currentTenant?.companyName??"",d.controllersList.controllers.map(n=>Wt(n)),void 0,void 0,"page icon")},"data-testid":y("remi-comments-section"),children:[t.jsx(Ot,{count:D?void 0:kt,isLoading:D,style:{left:"12px"}}),t.jsx(Ni,{})]}):null,t.jsx(Li,{size:o,onClick:()=>pt(),"data-testid":y("remi-detail-page-close"),children:t.jsx(Ri,{})})]}),scrollableContent:B,enableTitleOnScroll:o!=="small",scrollThreshold:64,source:"ReimbursementDetailPage"})]}),t.jsxs(Vi,{children:[o==="small"?t.jsxs(t.Fragment,{children:[t.jsx(He,{windowSize:o,children:t.jsx(Je,{windowsSize:o,children:Q})}),e.createdBy?.userId!=null?t.jsx(Ue,{windowSize:o,children:`${i.by} ${e.createdBy.firstName} ${e.createdBy.lastName}`}):null,de&&$!=null?t.jsx(Ve,{color:$.color,bgColor:$.bgColor,borderColor:$.borderColor,children:$.value}):null,M?.code!=null?o==="small"?t.jsxs(t.Fragment,{children:[t.jsx(Et,{progressSectionObj:M,createDate:e.remiDetails?.createTime,paymentDate:X,scheduleDate:e.remiDetails?.reimbursementInfo.paymentDate,approvedDate:e.latestApprovedDate,isFrozen:E}),P?t.jsx(Pe,{variant:"warning",style:{margin:`${a.sp5} ${a.sp3}`},title:L.duplicateWarning.title,description:L.duplicateWarning.description}):De?t.jsxs(Oe,{size:o,children:[t.jsx(Ke,{}),t.jsxs(Ee,{children:[t.jsx(We,{children:i.thereSeems}),t.jsx(Fe,{children:i.pleaseFind})]})]}):null]}):t.jsx(Ye,{windowSize:o,children:t.jsx(Be,{progressSectionObj:M,createDate:e.remiDetails?.createTime,paymentDate:X,scheduleDate:e.remiDetails?.reimbursementInfo.paymentDate,approvedDate:e.latestApprovedDate,isFrozen:E})}):null]}):null,S.map((l,n)=>{const v=e.duplicateLineByLineId[l.lineId];return t.jsxs(Qe,{windowSize:o,children:[t.jsx(Fi,{windowSize:o,children:t.jsx(Ki,{bottomSeperator:S.length!==1,windowSize:o,children:t.jsx(li,{showAutofill:!1,uploadInvoiceEndPoint:C,authParams:re,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(Ei,{windowSize:o,children:[n===0&&o!=="small"?t.jsxs(t.Fragment,{children:[t.jsxs(He,{windowSize:o,children:[t.jsx(Je,{windowsSize:o,children:Q}),de&&$!=null?t.jsx(Ve,{color:$.color,bgColor:$.bgColor,borderColor:$.borderColor,children:$.value}):null]}),e.createdBy?.userId!=null?t.jsx(Ue,{windowSize:o,children:`By ${e.createdBy.firstName} ${e.createdBy.lastName}`}):null,M?.code!=null?t.jsx(Ye,{windowSize:o,children:t.jsx(Be,{progressSectionObj:M,createDate:e.remiDetails?.createTime,paymentDate:X,scheduleDate:e.remiDetails?.reimbursementInfo.paymentDate,approvedDate:e.latestApprovedDate,isFrozen:E})}):null,P?t.jsx(Pe,{variant:"warning",style:{margin:`${a.sp3} ${a.sp8} ${a.sp3} ${a.sp6}`},title:L.duplicateWarning.title,description:L.duplicateWarning.description}):De?t.jsxs(Oe,{size:o,children:[t.jsx(Ke,{}),t.jsxs(Ee,{children:[t.jsx(We,{children:i.thereSeems}),t.jsx(Fe,{children:i.pleaseFind})]})]}):null]}):null,t.jsxs(bi,{windowSize:o,ref:ke=>{ke!=null&&(ge.current[`L${l.lineId}`]=ke)},children:[o!=="small"?t.jsx(gi,{children:t.jsx(wi,{children:S.length>1?`#${n+1} ${i.reimbursement}`:i.reimbursement})}):null,t.jsxs(xi,{windowSize:o,children:[v?.duplicateLineId!=null?t.jsxs(hi,{children:[i.thisExpenseReview," ",t.jsx(yi,{onClick:()=>{if(v.isDuplicateWithinTransaction&&v.duplicateLineId!=null)return be(`L${v.duplicateLineId}`);v.duplicateTransactionId!=null&&v.duplicateLineId!=null&&rt(v.duplicateTransactionId,v.duplicateLineId)},"data-testid":y("remi-view-duplicate-expense"),children:i.viewOriginalExpense})]}):null,t.jsx(b,{isThreadAllowed:u,dashboardTabKey:w({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:v?.duplicateLineId==null?`${a.sp2} ${a.sp2} 0 0`:"0 0 0 0"},children:t.jsx(x,{label:{label:i.reimbursementType,width:A},text:l.type===i.mileageKey?i.mileage:i.outOfPocket,style:{width:"auto",borderRadius:v?.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:w({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(x,{label:{label:i.transactionDate,width:A},text:l.transactionDate?.format(fe.visual.MMMDCommaYYYYformat)??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:w({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(x,{label:{label:i.distanceInMiles,width:A},text:l.distanceMileage.value.toString()??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:w({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(x,{label:{label:i.amount,width:I},text:l.homeCurrencyConversions!=null?Ne("0,0[.]00",l.homeCurrencyConversions):i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:w({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(x,{label:{label:i.memo,width:I},text:l.description??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:w({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(x,{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:w({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(x,{label:{label:i.merchant,width:A},text:l.merchant?.name??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:w({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(x,{label:{label:i.transactionDate,width:A},text:l.transactionDate?.format(fe.visual.MMMDCommaYYYYformat)??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:w({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(x,{label:{label:i.amount,width:I},text:l.homeCurrencyConversions!=null?Ne("0,0[.]00",l.homeCurrencyConversions):i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:w({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(x,{label:{label:i.memo,width:I},text:l.description??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:w({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(x,{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:w({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(x,{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(Wi,{windowSize:o,children:[t.jsxs(qe,{windowSize:o,children:[t.jsx(Ze,{children:i.total}),t.jsx(Le,{amount:ve,integerStyles:K.h6Regular.cssObject,decimalStyles:K.standardRegular.cssObject})]}),e.remiDetails&&t.jsx(_e,{amount:Te,activities:e.remiActivities,stage:_?.code??"draft",onAddNewRule:he,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:oe,signedInUserId:ne?.userId,showRealTimeApproval:se,entityApprovalId:e.remiActivities[0]?.entityApprovalId??e.remiDetails.entityApprovalId,updateEditMode:ce,onSaveRealTimeApprovals:me},historicActivities:e.remiHistory.activities})]})]})]},l.lineId)}),S.length===1&&t.jsxs(Qe,{windowSize:o,children:[t.jsx(Ge,{}),t.jsxs(pi,{windowSize:o,children:[t.jsx(Oi,{windowSize:o,children:t.jsxs(qe,{windowSize:o,children:[t.jsx(Ze,{children:i.total}),t.jsx(Le,{amount:ve,integerStyles:K.h6Regular.cssObject,decimalStyles:K.standardRegular.cssObject})]})}),e.remiDetails&&t.jsx(ui,{windowSize:o,children:t.jsx(_e,{amount:Te,activities:e.remiActivities,stage:_?.code??"draft",onAddNewRule:he,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:oe,signedInUserId:ne?.userId,showRealTimeApproval:se,entityApprovalId:e.remiActivities[0]?.entityApprovalId??e.remiDetails.entityApprovalId,updateEditMode:ce,onSaveRealTimeApprovals:me}})})]})]}),t.jsx(Ui,{})]}),$e||E===!0?null:t.jsxs(zi,{children:[o!=="small"?t.jsx(Ge,{}):null,t.jsx($i,{windowSize:o,"data-testid":y("remi-detail-page-footer"),onClick:l=>{l.stopPropagation(),G===!0&&Y(!1)},children:t.jsx(Ft,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"||le,showCancel:e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"||le,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:J==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress"||J==="delete"&&e.deleteStatus.fetchState==="In-Progress",onClick:St,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:J==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:Tt,style:{width:s.footerButtonWidth.value(o)},isDisabled:e.approvalUpdateStatus.fetchState==="In-Progress"||e.realTimeApproval.isEditMode===!0},rightSideComponent:t.jsx(fi,{children:t.jsxs(ki,{windowSize:o,children:[!P&&G?t.jsx(Kt,{onClickAway:()=>Y(!1),children:t.jsxs(Di,{windowSize:o,children:[ee!=="processing"?t.jsx(ae,{onClick:Se,"data-testid":y("remi-delete-action"),children:i.buttons.deleteReport}):null,ee==="processing"?t.jsx(ae,{onClick:ft,"data-testid":y("remi-cancel-action"),children:i.buttons.cancel}):null,ee==="processing"?t.jsx(ae,{onClick:$t,"data-testid":y("remi-cancel-and-delete-action"),children:i.buttons.cancelAndDelete}):null]})}):null,t.jsxs(Ii,{windowSize:o,children:[!P&&Ie?t.jsx(ji,{onClick:je,"data-testid":y("remi-edit-button"),children:t.jsx(Si,{})}):null,!P&&Dt===!0?t.jsx(Ti,{windowSize:o,showEditIcon:Ie,children:t.jsx(vi,{onClick:()=>Y(!G),"data-testid":y("remi-more-actions-button")})}):null]})]})}),style:{minHeight:62}})})]}),u?t.jsx(ai,{id:h,children:t.jsx(Ut,{isDrawerOpen:mt,allowComposer:!0,drawerTitle:ht,threads:R,autoExpand:!0,autoFocus:!1,filter:{application:"dashboard",companyId:k?.companyId??xe,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:yt,replyComposerPlaceholder:gt,threadResolve:bt,threadUnResolve:wt},onThreadClick:(l,n)=>zt(l,n),onCloseAllThreadsDrawer:()=>N(!1),drawerSectionStyle:{width:"400px",backgroundColor:ye.colors.background}})}):null]})},mi=e=>{const C=Xe.getLocalizedStrings().spendManagement.billPay.billsByTabs;if(e?.isDeleted===!0)return{value:C.tabsById.deleted,color:ie.deleted.color,bgColor:ie.deleted.bgColor,borderColor:ie.deleted.borderColor,code:"deleted"}},pi=r.div`
1
+ import{av as At,a7 as Mt,q as Rt,d as Pt,ca as Bt,y as m,F as Xe,gc as Nt,ge as Lt,gf as _t,V as t,cm as ze,cn as Ae,co as Me,aK as y,bz as Re,bm as Ot,dr as Wt,gg as Et,gr as Pe,o as a,gh as Be,fd as b,ff as w,gk as x,aL as Ne,fc as Le,b as K,gm as _e,aO as Ft,an as Kt,gn as Ut,go as ie,bv as Vt,gp as Gt,L as Yt,a as Ht,B as Jt,ak as et,b7 as tt,p as U,al as qt,bS as Zt,ag as Qt,gI as Xt,gE as ei,c,cf as ti,cT as ii}from"./index-DDpxinoY.js";import{a as p}from"./core-CA3j8Axi.js";import{n as r}from"./mui-DpJXlk4t.js";import{a as ai}from"./liveblocks-C2I4vRCJ.js";import{bO as ri,bS as oi,FC as ni}from"./zeni-epic-state-CQt4n3Xe.js";import li from"./InvoiceUploadSection-DomquLut-BX54FmZz.js";import{r as si,h as f,u as di}from"./types-DyvtCprH-NFPm5TaG.js";import"./sentry-BA4piVNf.js";import"./lottie-B7mXQ-R-.js";import"./analytics-CHPpxU3b.js";import"./recharts-BGdJnVo5.js";import"./utils-DUsHM-Uc.js";import"./lexical-dZFDzIA1.js";import"./AttachmentView-DSP80cjm-CgZkBq6h.js";import"./uploadReceipts-CPw64UYa-C0--mSOy.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]="96ac4536-80fb-4ce6-bed8-5ae1eba56666",e._sentryDebugIdIdentifier="sentry-dbid-96ac4536-80fb-4ce6-bed8-5ae1eba56666")}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])},ci={formTitle:new Ht("h6Regular","h5Regular")},la=({remiDetails:e,uploadInvoiceEndPoint:C,authParams:re,isAdmin:oe,signedInUser:ne,showApproveRejectBtns:le,isRealTimeApprovalEnabled:se,isReimbursementCommentingEnabled:u,isShowDeletedReimbursementEnabled:de,isSignedInUserReimbursementCreator:it,updateEditRealTimeApproverClicked:ce,onSaveRealTimeApprovals:me,redirectToReimbursementListScreen:V,redirectToEditableReimbursementScreen:at,onDuplicateLineClick:rt,approveOrRejectRemi:pe,deleteReimbursement:ot,cancelAndDeleteReport:ue,handleZeniLogoClick:nt,onAddNewRule:he})=>{const d=At(),lt=Mt().analytics,o=Rt(),ye=Pt(),[st,z]=p.useState(!1),[G,Y]=p.useState(!1),[dt,H]=p.useState(!1),[J,q]=p.useState("approved"),B=p.useRef(null),[j,Z]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[k,ct]=p.useState(null),[mt,N]=p.useState(!1),h=`dashboard_${d.currentTenant?.companyId}`,ge=p.useRef({}),be=l=>{const n=ge.current[l];n!=null&&setTimeout(()=>di(n,B.current),100)};p.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed")&&V()},[e,V]),p.useEffect(()=>{const l=window.location.hash;if(l&&l.startsWith("#L")){const n=l.substring(1);be(n)}},[]);const pt=()=>{V()};Bt({componentName:"reimbursement.details"});const ut={onOkClick:()=>{z(!1),j.primaryButtonText===i.buttons.delete?ot?.():j.title===i.cancelReportTitle?ue?.():j.title===i.cancelAndDeleteReportTitle&&ue?.(!0)},onCancelClick:()=>{z(!1)}},I=s.labelWidth.value(o),A=s.largeLabelWidth.value(o),we=Xe.getLocalizedStrings(),{common:{texts:{comments:ht},strings:{empty:xe}},collaboration:{threads:{placeholder:{addANewComment:yt,replyAComment:gt},tooltip:{resolveComment:bt,unResolveComment:wt}}},dateFormat:fe}=we,{reimbursementDetail:i,bulkActions:L}=we.spendManagement.reimbursement,Q=e.remiDetails?.reportTitle,S=e.remiDetails?.lines??[],_=e.remiDetails?.reimbursementInfo.stage,O=e.remiDetails?.reimbursementInfo.billStatus,W=e.remiDetails?.reimbursementInfo.billPaymentStatus,$e=_?.code==="paid",xt=$e?_:O?.code=="approved"&&W?.code?W:O,$=mi(e.remiDetails),M=O?.code=="approved"&&W?.code?W:O,E=e.remiDetails?.isDeleted??!1,ve=e.remiDetails?.amount,Te=e.remiDetails?.amount.amount??0,Se=()=>{Z({title:e.remiDetails?.reimbursementInfo.stage.code==="draft"?i.deleteDraftTitle:i.deleteReportTitle,description:i.deleteAlertDescription,primaryButtonText:i.buttons.delete,secondaryButtonText:i.buttons.cancel}),z(!0)},ft=()=>{Z({title:i.cancelReportTitle,description:i.cancelAlertDescription,primaryButtonText:i.buttons.yes,secondaryButtonText:i.buttons.no}),z(!0)},$t=()=>{Z({title:i.cancelAndDeleteReportTitle,description:i.cancelAndDeleteAlertDescription,primaryButtonText:i.buttons.yes,secondaryButtonText:i.buttons.no}),z(!0)},je=()=>{at()},vt={onOkClick:l=>{H(!1),pe({reimbursementId:e.remiDetails?.id??"",type:"rejected",description:l})},onCancelClick:()=>{H(!1)}},Tt=()=>{e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"?je():(q("approved"),pe({reimbursementId:e.remiDetails?.id??"",type:"approved"}))},St=()=>{e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"?(q("delete"),Se()):(q("rejected"),H(!0))},jt=e.remiDetails?.reimbursementInfo.paymentDate!=null?ri(oi(e.remiDetails.reimbursementInfo.paymentDate.toDate(),[0,6],e.achSameDayMaxDays).toDateString()):void 0,X=e.remiDetails?.reimbursementInfo.expectedDepositDate??jt,It=e.remiDetails?.lines?.some(l=>{const n=l.lineDetail;return n?.account?.isDeleted===!0&&n?.account?.isBillEditableCoaAccountType===!1})??!1,Ie=e.remiDetails?.reimbursementInfo.billStatus.code==="pending_approval"&&it&&!It,Dt=e.remiDetails?.reimbursementInfo.billStatus.code!=="rejected"&&e.remiDetails?.reimbursementInfo.billPaymentStatus.code!=="paid",ee=xt?.code,Ct=si(e.duplicateLineByLineId),De=e.duplicateReimbursementStatus.fetchState==="Completed"&&Ct>0,{requestToOpenThread:te,setRequestToOpenThread:Ce,setOpenThread:F}=p.useContext(Nt),{threads:R,isLoading:D}=Lt({application:"dashboard",companyId:d.currentTenant?.companyId,tab:"reimbursement",entityId:e.remiDetails?.id,isGlobalComment:!1},"both",!1),kt=p.useMemo(()=>R.filter(l=>l.resolved===!1&&!l.id.includes(_t)),[R]).length,zt=p.useCallback((l,n)=>{F(n),N(!1)},[F,N]);p.useEffect(()=>{te?.threadId!=null&&R.length>0&&!D&&(F(te.threadId),Ce(null))},[te,R,D,F,Ce]);const g={application:"dashboard",companyId:d.currentTenant?.companyId,tab:"reimbursement",entityId:e.remiDetails?.id},P=ni(e.remiDetails?.bulkProcessingDetail?.type);return t.jsxs(_i,{windowSize:o,ref:B,children:[st?t.jsx(ze,{titleComponent:t.jsx(Me,{children:j.title}),descriptionComponent:t.jsx(Ae,{children:j.description}),primaryButtonText:j.primaryButtonText,proceedButtonVariant:"danger",secondaryButtonText:j.secondaryButtonText,action:ut}):null,dt?t.jsx(ze,{titleComponent:t.jsx(Me,{children:`${i.rejectRemiTitlePrefix} ${e.remiDetails?.reportTitle??""} by ${e.createdBy?.firstName??""} ${e.createdBy?.lastName??""}`}),descriptionComponent:t.jsx(Ae,{children:i.rejectRemiDescription}),primaryButtonText:i.buttons.send,secondaryButtonText:i.buttons.cancel,action:vt,isEditPopup:!0,isNotesIncluded:!0,notesPlaceholder:i.rejectRejectReasonPlaceholder}):null,t.jsxs(Ai,{windowSize:o,"data-testid":y("reimbursement-detail-page-nav-bar-container"),children:[o!=="small"?t.jsx(Re,{"data-testid":y("reimbursement-detail-page-nav-bar-left"),style:{width:"42%"},title:"",leftSideComponent:t.jsx(Mi,{onClick:()=>nt?.(),"data-testid":y("remi-detail-page-nav-bar-zeni-logo")}),enableTitleOnScroll:!1,backgroundColor:ye.colors.background,keepBackgroundOnScroll:!0,scrollableContent:B,source:"ReimbursementDetailPage"}):null,o!=="small"?t.jsx(Ci,{}):null,t.jsx(Re,{"data-testid":y("reimbursement-detail-page-nav-bar-right"),title:Q??xe,leftSideComponent:t.jsx(t.Fragment,{}),style:{width:o!=="small"?"58%":"100%"},rightSideComponent:t.jsxs(Pi,{children:[u?t.jsxs(Bi,{isDisabled:D,onClick:D?()=>null:l=>{l.preventDefault(),l.stopPropagation(),ct({roomId:h,companyId:d.currentTenant?.companyId??"",companyName:d.currentTenant?.companyName??"",entityType:"reimbursement.details",entityId:e.remiDetails?.id??""}),N(!0),lt.trackCommentActivity("reimbursement","clicked",d.currentTenant?.companyName??"",d.controllersList.controllers.map(n=>Wt(n)),void 0,void 0,"page icon")},"data-testid":y("remi-comments-section"),children:[t.jsx(Ot,{count:D?void 0:kt,isLoading:D,style:{left:"12px"}}),t.jsx(Ni,{})]}):null,t.jsx(Li,{size:o,onClick:()=>pt(),"data-testid":y("remi-detail-page-close"),children:t.jsx(Ri,{})})]}),scrollableContent:B,enableTitleOnScroll:o!=="small",scrollThreshold:64,source:"ReimbursementDetailPage"})]}),t.jsxs(Vi,{children:[o==="small"?t.jsxs(t.Fragment,{children:[t.jsx(He,{windowSize:o,children:t.jsx(Je,{windowsSize:o,children:Q})}),e.createdBy?.userId!=null?t.jsx(Ue,{windowSize:o,children:`${i.by} ${e.createdBy.firstName} ${e.createdBy.lastName}`}):null,de&&$!=null?t.jsx(Ve,{color:$.color,bgColor:$.bgColor,borderColor:$.borderColor,children:$.value}):null,M?.code!=null?o==="small"?t.jsxs(t.Fragment,{children:[t.jsx(Et,{progressSectionObj:M,createDate:e.remiDetails?.createTime,paymentDate:X,scheduleDate:e.remiDetails?.reimbursementInfo.paymentDate,approvedDate:e.latestApprovedDate,isFrozen:E}),P?t.jsx(Pe,{variant:"warning",style:{margin:`${a.sp5} ${a.sp3}`},title:L.duplicateWarning.title,description:L.duplicateWarning.description}):De?t.jsxs(Oe,{size:o,children:[t.jsx(Ke,{}),t.jsxs(Ee,{children:[t.jsx(We,{children:i.thereSeems}),t.jsx(Fe,{children:i.pleaseFind})]})]}):null]}):t.jsx(Ye,{windowSize:o,children:t.jsx(Be,{progressSectionObj:M,createDate:e.remiDetails?.createTime,paymentDate:X,scheduleDate:e.remiDetails?.reimbursementInfo.paymentDate,approvedDate:e.latestApprovedDate,isFrozen:E})}):null]}):null,S.map((l,n)=>{const v=e.duplicateLineByLineId[l.lineId];return t.jsxs(Qe,{windowSize:o,children:[t.jsx(Fi,{windowSize:o,children:t.jsx(Ki,{bottomSeperator:S.length!==1,windowSize:o,children:t.jsx(li,{showAutofill:!1,uploadInvoiceEndPoint:C,authParams:re,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(Ei,{windowSize:o,children:[n===0&&o!=="small"?t.jsxs(t.Fragment,{children:[t.jsxs(He,{windowSize:o,children:[t.jsx(Je,{windowsSize:o,children:Q}),de&&$!=null?t.jsx(Ve,{color:$.color,bgColor:$.bgColor,borderColor:$.borderColor,children:$.value}):null]}),e.createdBy?.userId!=null?t.jsx(Ue,{windowSize:o,children:`By ${e.createdBy.firstName} ${e.createdBy.lastName}`}):null,M?.code!=null?t.jsx(Ye,{windowSize:o,children:t.jsx(Be,{progressSectionObj:M,createDate:e.remiDetails?.createTime,paymentDate:X,scheduleDate:e.remiDetails?.reimbursementInfo.paymentDate,approvedDate:e.latestApprovedDate,isFrozen:E})}):null,P?t.jsx(Pe,{variant:"warning",style:{margin:`${a.sp3} ${a.sp8} ${a.sp3} ${a.sp6}`},title:L.duplicateWarning.title,description:L.duplicateWarning.description}):De?t.jsxs(Oe,{size:o,children:[t.jsx(Ke,{}),t.jsxs(Ee,{children:[t.jsx(We,{children:i.thereSeems}),t.jsx(Fe,{children:i.pleaseFind})]})]}):null]}):null,t.jsxs(bi,{windowSize:o,ref:ke=>{ke!=null&&(ge.current[`L${l.lineId}`]=ke)},children:[o!=="small"?t.jsx(gi,{children:t.jsx(wi,{children:S.length>1?`#${n+1} ${i.reimbursement}`:i.reimbursement})}):null,t.jsxs(xi,{windowSize:o,children:[v?.duplicateLineId!=null?t.jsxs(hi,{children:[i.thisExpenseReview," ",t.jsx(yi,{onClick:()=>{if(v.isDuplicateWithinTransaction&&v.duplicateLineId!=null)return be(`L${v.duplicateLineId}`);v.duplicateTransactionId!=null&&v.duplicateLineId!=null&&rt(v.duplicateTransactionId,v.duplicateLineId)},"data-testid":y("remi-view-duplicate-expense"),children:i.viewOriginalExpense})]}):null,t.jsx(b,{isThreadAllowed:u,dashboardTabKey:w({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:v?.duplicateLineId==null?`${a.sp2} ${a.sp2} 0 0`:"0 0 0 0"},children:t.jsx(x,{label:{label:i.reimbursementType,width:A},text:l.type===i.mileageKey?i.mileage:i.outOfPocket,style:{width:"auto",borderRadius:v?.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:w({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(x,{label:{label:i.transactionDate,width:A},text:l.transactionDate?.format(fe.visual.MMMDCommaYYYYformat)??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:w({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(x,{label:{label:i.distanceInMiles,width:A},text:l.distanceMileage.value.toString()??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:w({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(x,{label:{label:i.amount,width:I},text:l.homeCurrencyConversions!=null?Ne("0,0[.]00",l.homeCurrencyConversions):i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:w({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(x,{label:{label:i.memo,width:I},text:l.description??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:w({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(x,{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:w({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(x,{label:{label:i.merchant,width:A},text:l.merchant?.name??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:w({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(x,{label:{label:i.transactionDate,width:A},text:l.transactionDate?.format(fe.visual.MMMDCommaYYYYformat)??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:w({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(x,{label:{label:i.amount,width:I},text:l.homeCurrencyConversions!=null?Ne("0,0[.]00",l.homeCurrencyConversions):i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:w({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(x,{label:{label:i.memo,width:I},text:l.description??i.emptyValue,style:{width:"auto"}})}),t.jsx(T,{}),t.jsx(b,{isThreadAllowed:u,dashboardTabKey:w({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(x,{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:w({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(x,{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(Wi,{windowSize:o,children:[t.jsxs(qe,{windowSize:o,children:[t.jsx(Ze,{children:i.total}),t.jsx(Le,{amount:ve,integerStyles:K.h6Regular.cssObject,decimalStyles:K.standardRegular.cssObject})]}),e.remiDetails&&t.jsx(_e,{amount:Te,activities:e.remiActivities,stage:_?.code??"draft",onAddNewRule:he,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:oe,signedInUserId:ne?.userId,showRealTimeApproval:se,entityApprovalId:e.remiActivities[0]?.entityApprovalId??e.remiDetails.entityApprovalId,updateEditMode:ce,onSaveRealTimeApprovals:me},historicActivities:e.remiHistory.activities})]})]})]},l.lineId)}),S.length===1&&t.jsxs(Qe,{windowSize:o,children:[t.jsx(Ge,{}),t.jsxs(pi,{windowSize:o,children:[t.jsx(Oi,{windowSize:o,children:t.jsxs(qe,{windowSize:o,children:[t.jsx(Ze,{children:i.total}),t.jsx(Le,{amount:ve,integerStyles:K.h6Regular.cssObject,decimalStyles:K.standardRegular.cssObject})]})}),e.remiDetails&&t.jsx(ui,{windowSize:o,children:t.jsx(_e,{amount:Te,activities:e.remiActivities,stage:_?.code??"draft",onAddNewRule:he,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:oe,signedInUserId:ne?.userId,showRealTimeApproval:se,entityApprovalId:e.remiActivities[0]?.entityApprovalId??e.remiDetails.entityApprovalId,updateEditMode:ce,onSaveRealTimeApprovals:me}})})]})]}),t.jsx(Ui,{})]}),$e||E===!0?null:t.jsxs(zi,{children:[o!=="small"?t.jsx(Ge,{}):null,t.jsx($i,{windowSize:o,"data-testid":y("remi-detail-page-footer"),onClick:l=>{l.stopPropagation(),G===!0&&Y(!1)},children:t.jsx(Ft,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"||le,showCancel:e.remiDetails?.reimbursementInfo.billStatus.code==="rejected"||le,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:J==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress"||J==="delete"&&e.deleteStatus.fetchState==="In-Progress",onClick:St,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:J==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:Tt,style:{width:s.footerButtonWidth.value(o)},isDisabled:e.approvalUpdateStatus.fetchState==="In-Progress"||e.realTimeApproval.isEditMode===!0},rightSideComponent:t.jsx(fi,{children:t.jsxs(ki,{windowSize:o,children:[!P&&G?t.jsx(Kt,{onClickAway:()=>Y(!1),children:t.jsxs(Di,{windowSize:o,children:[ee!=="processing"?t.jsx(ae,{onClick:Se,"data-testid":y("remi-delete-action"),children:i.buttons.deleteReport}):null,ee==="processing"?t.jsx(ae,{onClick:ft,"data-testid":y("remi-cancel-action"),children:i.buttons.cancel}):null,ee==="processing"?t.jsx(ae,{onClick:$t,"data-testid":y("remi-cancel-and-delete-action"),children:i.buttons.cancelAndDelete}):null]})}):null,t.jsxs(Ii,{windowSize:o,children:[!P&&Ie?t.jsx(ji,{onClick:je,"data-testid":y("remi-edit-button"),children:t.jsx(Si,{})}):null,!P&&Dt===!0?t.jsx(Ti,{windowSize:o,showEditIcon:Ie,children:t.jsx(vi,{onClick:()=>Y(!G),"data-testid":y("remi-more-actions-button")})}):null]})]})}),style:{minHeight:62}})})]}),u?t.jsx(ai,{id:h,children:t.jsx(Ut,{isDrawerOpen:mt,allowComposer:!0,drawerTitle:ht,threads:R,autoExpand:!0,autoFocus:!1,filter:{application:"dashboard",companyId:k?.companyId??xe,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:yt,replyComposerPlaceholder:gt,threadResolve:bt,threadUnResolve:wt},onThreadClick:(l,n)=>zt(l,n),onCloseAllThreadsDrawer:()=>N(!1),drawerSectionStyle:{width:"400px",backgroundColor:ye.colors.background}})}):null]})},mi=e=>{const C=Xe.getLocalizedStrings().spendManagement.billPay.billsByTabs;if(e?.isDeleted===!0)return{value:C.tabsById.deleted,color:ie.deleted.color,bgColor:ie.deleted.bgColor,borderColor:ie.deleted.borderColor,code:"deleted"}},pi=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{av as ne,d as S,q as k,aN as le,F,V as e,aK as a,fo as ae,bz as de,n as u,ad as d,o as s,ap as ce,D as me,aQ as N,al as pe,y as xe,p as z,cA as he,aR as ue,b8 as ge,c as we}from"./index-DJLrbf0F.js";import{a as j}from"./core-CA3j8Axi.js";import{n as r}from"./mui-DpJXlk4t.js";import{FB as je,bW as fe}from"./zeni-epic-state-CQt4n3Xe.js";import{f as be}from"./VideoPopup-BEXc8o78-CxvDyO3n.js";import{M as v}from"./usp-line-BBd1wKwW-BZdA9pHf.js";import"./sentry-BA4piVNf.js";import"./lottie-B7mXQ-R-.js";import"./liveblocks-C2I4vRCJ.js";import"./utils-DUsHM-Uc.js";import"./analytics-CHPpxU3b.js";import"./recharts-BGdJnVo5.js";import"./lexical-dZFDzIA1.js";import"./VideoPlayer-BVR9LPmm-Cf1X7mgb.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]="1d7c05f5-43f0-42c4-a367-25b0fb8868e1",i._sentryDebugIdIdentifier="sentry-dbid-1d7c05f5-43f0-42c4-a367-25b0fb8868e1")}catch{}})();const Z="https://storage.googleapis.com/zeni-apis.appspot.com/images/reimbursement-promo-light.png",E="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{av as ne,d as S,q as k,aN as le,F,V as e,aK as a,fo as ae,bz as de,n as u,ad as d,o as s,ap as ce,D as me,aQ as N,al as pe,y as xe,p as z,cA as he,aR as ue,b8 as ge,c as we}from"./index-DDpxinoY.js";import{a as j}from"./core-CA3j8Axi.js";import{n as r}from"./mui-DpJXlk4t.js";import{FB as je,bW as fe}from"./zeni-epic-state-CQt4n3Xe.js";import{f as be}from"./VideoPopup-BEXc8o78-CVV-ILBt.js";import{M as v}from"./usp-line-BBd1wKwW-BZdA9pHf.js";import"./sentry-BA4piVNf.js";import"./lottie-B7mXQ-R-.js";import"./liveblocks-C2I4vRCJ.js";import"./utils-DUsHM-Uc.js";import"./analytics-CHPpxU3b.js";import"./recharts-BGdJnVo5.js";import"./lexical-dZFDzIA1.js";import"./VideoPlayer-BVR9LPmm-CvUJV07D.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]="1d7c05f5-43f0-42c4-a367-25b0fb8868e1",i._sentryDebugIdIdentifier="sentry-dbid-1d7c05f5-43f0-42c4-a367-25b0fb8868e1")}catch{}})();const Z="https://storage.googleapis.com/zeni-apis.appspot.com/images/reimbursement-promo-light.png",E="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{d as Ee,q as Ie,aN as N,a8 as qe,cB as Ge,F as Te,aS as Ce,V as t,f6 as Je,p as J,y as s,bz as Ze,m as Ke,ab as Ye,fp as ve,dM as Xe,fq as Qe,bu as et,dC as tt,aO as it,o as a,fs as nt,c as n,cf as ot,cO as at,cW as lt,fB as ke,fC as $e,gb as st,n as rt,aK as Pe,a as Ae,bJ as ct,ag as dt,br as ut}from"./index-DJLrbf0F.js";import{a as o}from"./core-CA3j8Axi.js";import{n as i}from"./mui-DpJXlk4t.js";import{bM as mt}from"./zeni-epic-state-CQt4n3Xe.js";import{g as pt}from"./UploadAdditionalDocumentOverlay-COtszXUY-DBj80beJ.js";import"./sentry-BA4piVNf.js";import"./lottie-B7mXQ-R-.js";import"./liveblocks-C2I4vRCJ.js";import"./utils-DUsHM-Uc.js";import"./analytics-CHPpxU3b.js";import"./recharts-BGdJnVo5.js";import"./lexical-dZFDzIA1.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]="f3857441-7c16-4a68-bc42-911073740a1f",e._sentryDebugIdIdentifier="sentry-dbid-f3857441-7c16-4a68-bc42-911073740a1f")}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=Ie(),D=Ee(),{formState:{errors:K},trigger:Y}=at(),E=ht(P,"mileageAmountInDenomination"),x=lt(K,E),{localData:c,updateStatus:F,mileageStatus:w}=p,U=e?.denominationConversions.amount==null||e.denominationConversions.amount!==c?.mileageAmountInDenomination,{commonSetUp:X,spendManagement:Q}=Te.getLocalizedStrings(),{reimbursement:ee}=Q,[S,I]=o.useState(U),[te,W]=o.useState(!1);o.useEffect(()=>{x||Y(E)},[]),o.useEffect(()=>{e?.denominationConversions.amount!=null&&e.denominationConversions.amount===c?.mileageAmountInDenomination&&I(!1)},[e?.denominationConversions.amount]),o.useEffect(()=>{S||W(S)},[S]);const{reimbursementSetup:y}=ee,{setUp:ie}=X,ne=S===!1||F.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(wt,{windowSize:l,children:e?.denominationConversions.amount==null?y.mileageAddTitle:y.mileageEditTitle}),t.jsx(St,{children:y.mileageSubTitle})]}),w!=null&&e?.denominationConversions.amount!=null&&l==="small"?t.jsx(ke,{style:{width:"max-content",padding:a.sp0,marginTop:a.sp2},tagTitle:w.name,textColor:$e(w.code)}):null]}),t.jsxs(bt,{children:[w!=null&&e?.denominationConversions.amount!=null&&l!=="small"?t.jsx(ke,{style:{width:"max-content"},tagTitle:w.name,textColor:$e(w.code)}):null,t.jsx(Ct,{})]})]}),t.jsxs(Et,{children:[t.jsxs(It,{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:E,defaultValue:c?.mileageAmountInDenomination,returnValueType:"floatValue",allowEmptyFormatting:!0,prefix:oe,suffix:` ${y.perText} ${ae}`,decimalScale:1,allowNegative:!1,isNumericString:!1,registerOptions:{min:1,validate:T=>T!=null||r!=null,required:r==null},isDisabled:ne}),t.jsx(Vt,{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:F.fetchState==="In-Progress"}):t.jsx(Lt,{isDisabled:r,"data-testid":Pe("edit-mileage"),onClick:T=>{T.stopPropagation(),I(!0),W(!0),$.trackReimbursementMileageRateEdit()}})})]}),c?.description!=null?t.jsx(Tt,{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{d as Ee,q as Ie,aN as N,a8 as qe,cB as Ge,F as Te,aS as Ce,V as t,f6 as Je,p as J,y as s,bz as Ze,m as Ke,ab as Ye,fp as ve,dM as Xe,fq as Qe,bu as et,dC as tt,aO as it,o as a,fs as nt,c as n,cf as ot,cO as at,cW as lt,fB as ke,fC as $e,gb as st,n as rt,aK as Pe,a as Ae,bJ as ct,ag as dt,br as ut}from"./index-DDpxinoY.js";import{a as o}from"./core-CA3j8Axi.js";import{n as i}from"./mui-DpJXlk4t.js";import{bM as mt}from"./zeni-epic-state-CQt4n3Xe.js";import{g as pt}from"./UploadAdditionalDocumentOverlay-COtszXUY-CEOzWsBe.js";import"./sentry-BA4piVNf.js";import"./lottie-B7mXQ-R-.js";import"./liveblocks-C2I4vRCJ.js";import"./utils-DUsHM-Uc.js";import"./analytics-CHPpxU3b.js";import"./recharts-BGdJnVo5.js";import"./lexical-dZFDzIA1.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]="f3857441-7c16-4a68-bc42-911073740a1f",e._sentryDebugIdIdentifier="sentry-dbid-f3857441-7c16-4a68-bc42-911073740a1f")}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=Ie(),D=Ee(),{formState:{errors:K},trigger:Y}=at(),E=ht(P,"mileageAmountInDenomination"),x=lt(K,E),{localData:c,updateStatus:F,mileageStatus:w}=p,U=e?.denominationConversions.amount==null||e.denominationConversions.amount!==c?.mileageAmountInDenomination,{commonSetUp:X,spendManagement:Q}=Te.getLocalizedStrings(),{reimbursement:ee}=Q,[S,I]=o.useState(U),[te,W]=o.useState(!1);o.useEffect(()=>{x||Y(E)},[]),o.useEffect(()=>{e?.denominationConversions.amount!=null&&e.denominationConversions.amount===c?.mileageAmountInDenomination&&I(!1)},[e?.denominationConversions.amount]),o.useEffect(()=>{S||W(S)},[S]);const{reimbursementSetup:y}=ee,{setUp:ie}=X,ne=S===!1||F.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(wt,{windowSize:l,children:e?.denominationConversions.amount==null?y.mileageAddTitle:y.mileageEditTitle}),t.jsx(St,{children:y.mileageSubTitle})]}),w!=null&&e?.denominationConversions.amount!=null&&l==="small"?t.jsx(ke,{style:{width:"max-content",padding:a.sp0,marginTop:a.sp2},tagTitle:w.name,textColor:$e(w.code)}):null]}),t.jsxs(bt,{children:[w!=null&&e?.denominationConversions.amount!=null&&l!=="small"?t.jsx(ke,{style:{width:"max-content"},tagTitle:w.name,textColor:$e(w.code)}):null,t.jsx(Ct,{})]})]}),t.jsxs(Et,{children:[t.jsxs(It,{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:E,defaultValue:c?.mileageAmountInDenomination,returnValueType:"floatValue",allowEmptyFormatting:!0,prefix:oe,suffix:` ${y.perText} ${ae}`,decimalScale:1,allowNegative:!1,isNumericString:!1,registerOptions:{min:1,validate:T=>T!=null||r!=null,required:r==null},isDisabled:ne}),t.jsx(Vt,{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:F.fetchState==="In-Progress"}):t.jsx(Lt,{isDisabled:r,"data-testid":Pe("edit-mileage"),onClick:T=>{T.stopPropagation(),I(!0),W(!0),$.trackReimbursementMileageRateEdit()}})})]}),c?.description!=null?t.jsx(Tt,{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{F as O,V as b,cm as M,cn as q,co as W,k1 as z,aV as G}from"./index-DJLrbf0F.js";import{a as f}from"./core-CA3j8Axi.js";import{G6 as K}from"./zeni-epic-state-CQt4n3Xe.js";import{u as Q}from"./ReviewOverlay-CruJ9O84-BdMFQyaH.js";import"./mui-DpJXlk4t.js";import"./sentry-BA4piVNf.js";import"./lottie-B7mXQ-R-.js";import"./liveblocks-C2I4vRCJ.js";import"./utils-DUsHM-Uc.js";import"./analytics-CHPpxU3b.js";import"./recharts-BGdJnVo5.js";import"./lexical-dZFDzIA1.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]="adead96b-7b25-447b-8963-67862fb181c9",e._sentryDebugIdIdentifier="sentry-dbid-adead96b-7b25-447b-8963-67862fb181c9")}catch{}})();const{common:a,spendManagement:{reimbursement:k}}=O.getLocalizedStrings(),s=k.bulkActions;let j;const ce=({remisReviewView:e,isAdmin:o,analytics:i,onProceedForBulkActionClick:u,onCloseReviewItem:r,onCloseOverlay:n})=>{const{fetchState:p,bulkSubmissionFetchState:c,bulkOperationTypeSelected:t,currentTab:g,currentSubTab:y}=e,v=!1,[x,l]=f.useState(!1),[m,_]=f.useState(P(e,v,o)),[h,R]=f.useState(v),[B,H]=f.useState(0),[w,A]=f.useState({type:"",title:"",description:"",primaryButtonText:"",secondaryButtonText:""});f.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,S=m.filter(d=>d.reviewStatus.code!=="error").length,E=()=>{const{title:d,description:C}=Y(S);A({type:"reject",title:d,description:C,primaryButtonText:a.texts.confirm,secondaryButtonText:a.texts.close}),i.trackReimbursementBulkSubmit(t,g,y),l(!0)},F={onOkClick:d=>{l(!1);const C=e.remisForReview.map(I=>I.reimbursement);i.trackReimbursementBulkPopupConfirm(t,g,y,K(C.map(I=>I?.reimbursementTypesIncluded??[]))),u("reject",d)},onCancelClick:()=>{l(!1)}},{title:$,description:L}=Z(p,S,D,h),T=e.fetchState==="Completed"&&S===0,U=()=>{i.trackReimbursementBulkSubmit(t,g,y),u(t)},V=()=>{let d=a.footer.approve;return T?d=a.texts.close:t==="send_for_approval"&&(d=a.footer.submit),{label:d,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 b.jsxs(b.Fragment,{children:[x?b.jsx(M,{titleComponent:b.jsx(W,{children:w.title}),descriptionComponent:b.jsx(q,{children:w.description}),primaryButtonText:w.primaryButtonText,proceedButtonVariant:"danger",secondaryButtonText:w.secondaryButtonText,action:F,isNotesIncluded:!0,isEditPopup:!0}):null,b.jsx(Q,{title:$,description:{content:L,isError:e.fetchState==="Completed"&&S===0},reviewItems:m,onCloseReviewItem:r,onCloseOverlay:n,showFooter:e.fetchState==="Completed"&&!h,footerProps:{primaryButton:V(),cancelButton:N,hideCancel:T}})]})},P=(e,o,i)=>{const u=e.fetchState==="In-Progress";return e.remisForReview.map(r=>{const n=z(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:G("0,0.[00]",r.reimbursement?.amount?.amount,r.reimbursement?.amount?.currencySymbol),showThunderIcon:!1,subTitle:r.reviewInfoMessage??""},reviewStatus:{isLoading:u,code:r.reviewStatus??""}}})},Y=e=>{const{this_:o,these:i,report:u,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__",u)}},Z=(e,o,i,u)=>{const{has:r,have:n,report:p,reports:c,are:t,is:g,do_:y,does:v}=a.texts,x=o>1,l=i>1;let m="",_="";return e==="Completed"&&!u?(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_>",x?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{F as O,V as b,cm as M,cn as q,co as W,k1 as z,aV as G}from"./index-DDpxinoY.js";import{a as f}from"./core-CA3j8Axi.js";import{G6 as K}from"./zeni-epic-state-CQt4n3Xe.js";import{u as Q}from"./ReviewOverlay-CruJ9O84-tthxypv2.js";import"./mui-DpJXlk4t.js";import"./sentry-BA4piVNf.js";import"./lottie-B7mXQ-R-.js";import"./liveblocks-C2I4vRCJ.js";import"./utils-DUsHM-Uc.js";import"./analytics-CHPpxU3b.js";import"./recharts-BGdJnVo5.js";import"./lexical-dZFDzIA1.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]="adead96b-7b25-447b-8963-67862fb181c9",e._sentryDebugIdIdentifier="sentry-dbid-adead96b-7b25-447b-8963-67862fb181c9")}catch{}})();const{common:a,spendManagement:{reimbursement:k}}=O.getLocalizedStrings(),s=k.bulkActions;let j;const ce=({remisReviewView:e,isAdmin:o,analytics:i,onProceedForBulkActionClick:u,onCloseReviewItem:r,onCloseOverlay:n})=>{const{fetchState:p,bulkSubmissionFetchState:c,bulkOperationTypeSelected:t,currentTab:g,currentSubTab:y}=e,v=!1,[x,l]=f.useState(!1),[m,_]=f.useState(P(e,v,o)),[h,R]=f.useState(v),[B,H]=f.useState(0),[w,A]=f.useState({type:"",title:"",description:"",primaryButtonText:"",secondaryButtonText:""});f.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,S=m.filter(d=>d.reviewStatus.code!=="error").length,E=()=>{const{title:d,description:C}=Y(S);A({type:"reject",title:d,description:C,primaryButtonText:a.texts.confirm,secondaryButtonText:a.texts.close}),i.trackReimbursementBulkSubmit(t,g,y),l(!0)},F={onOkClick:d=>{l(!1);const C=e.remisForReview.map(I=>I.reimbursement);i.trackReimbursementBulkPopupConfirm(t,g,y,K(C.map(I=>I?.reimbursementTypesIncluded??[]))),u("reject",d)},onCancelClick:()=>{l(!1)}},{title:$,description:L}=Z(p,S,D,h),T=e.fetchState==="Completed"&&S===0,U=()=>{i.trackReimbursementBulkSubmit(t,g,y),u(t)},V=()=>{let d=a.footer.approve;return T?d=a.texts.close:t==="send_for_approval"&&(d=a.footer.submit),{label:d,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 b.jsxs(b.Fragment,{children:[x?b.jsx(M,{titleComponent:b.jsx(W,{children:w.title}),descriptionComponent:b.jsx(q,{children:w.description}),primaryButtonText:w.primaryButtonText,proceedButtonVariant:"danger",secondaryButtonText:w.secondaryButtonText,action:F,isNotesIncluded:!0,isEditPopup:!0}):null,b.jsx(Q,{title:$,description:{content:L,isError:e.fetchState==="Completed"&&S===0},reviewItems:m,onCloseReviewItem:r,onCloseOverlay:n,showFooter:e.fetchState==="Completed"&&!h,footerProps:{primaryButton:V(),cancelButton:N,hideCancel:T}})]})},P=(e,o,i)=>{const u=e.fetchState==="In-Progress";return e.remisForReview.map(r=>{const n=z(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:G("0,0.[00]",r.reimbursement?.amount?.amount,r.reimbursement?.amount?.currencySymbol),showThunderIcon:!1,subTitle:r.reviewInfoMessage??""},reviewStatus:{isLoading:u,code:r.reviewStatus??""}}})},Y=e=>{const{this_:o,these:i,report:u,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__",u)}},Z=(e,o,i,u)=>{const{has:r,have:n,report:p,reports:c,are:t,is:g,do_:y,does:v}=a.texts,x=o>1,l=i>1;let m="",_="";return e==="Completed"&&!u?(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_>",x?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{d as l,V as r,aJ as a,aK as f,b0 as y,F as m,aP as h,bB as g,ag as u,o as c,b1 as b}from"./index-DJLrbf0F.js";import{n as d}from"./mui-DpJXlk4t.js";import{a as s}from"./core-CA3j8Axi.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]="0cee4d6e-9b2f-453e-9704-bd8e6b65c2ca",e._sentryDebugIdIdentifier="sentry-dbid-0cee4d6e-9b2f-453e-9704-bd8e6b65c2ca")}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=d(h)`
1
+ import{d as l,V as r,aJ as a,aK as f,b0 as y,F as m,aP as h,bB as g,ag as u,o as c,b1 as b}from"./index-DDpxinoY.js";import{n as d}from"./mui-DpJXlk4t.js";import{a as s}from"./core-CA3j8Axi.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]="0cee4d6e-9b2f-453e-9704-bd8e6b65c2ca",e._sentryDebugIdIdentifier="sentry-dbid-0cee4d6e-9b2f-453e-9704-bd8e6b65c2ca")}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=d(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=>s.createElement("svg",{viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("rect",{opacity:.2,width:72,height:72,rx:36,fill:"#97C3B9"}),s.createElement("path",{d:"M46.7755 32.5635L43.8368 36.9716L40.4082 33.0533",stroke:"#97C3B9",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.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=d(h)`
4
4
  justify-content: space-between;
@@ -1,4 +1,4 @@
1
- import{d as ee,q as de,ca as xe,a8 as ye,V as o,an as _e,F as oe,cb as te,ab as we,y as D,aO as $e,o as n,cc as ke,cd as ve,ce as Ce,cf as je,cg as Ie,al as he,ch as Se,c as f,ag as Ne,aA as X,bB as De,aS as Oe,ak as Pe,at as Fe}from"./index-DJLrbf0F.js";import{a as u,S as ue}from"./core-CA3j8Axi.js";import{n as d}from"./mui-DpJXlk4t.js";import{R as O,I as Be}from"./CollapsableReportTable-hL_Ycouc-B8J7Q_nq.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]="522f0b13-6796-4d33-90ee-9a4e02772e7e",e._sentryDebugIdIdentifier="sentry-dbid-522f0b13-6796-4d33-90ee-9a4e02772e7e")}catch{}})();const V=oe.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,Ae=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 Ee(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:Ae(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(Ee(a)))}`;try{const h=await ke({urlEndPoint:l,authParams:r,fileType:a.statementFileType});if(h.ok){const y=ve(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{d as ee,q as de,ca as xe,a8 as ye,V as o,an as _e,F as oe,cb as te,ab as we,y as D,aO as $e,o as n,cc as ke,cd as ve,ce as Ce,cf as je,cg as Ie,al as he,ch as Se,c as f,ag as Ne,aA as X,bB as De,aS as Oe,ak as Pe,at as Fe}from"./index-DDpxinoY.js";import{a as u,S as ue}from"./core-CA3j8Axi.js";import{n as d}from"./mui-DpJXlk4t.js";import{R as O,I as Be}from"./CollapsableReportTable-hL_Ycouc-BeVhCFjP.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]="522f0b13-6796-4d33-90ee-9a4e02772e7e",e._sentryDebugIdIdentifier="sentry-dbid-522f0b13-6796-4d33-90ee-9a4e02772e7e")}catch{}})();const V=oe.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,Ae=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 Ee(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:Ae(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(Ee(a)))}`;try{const h=await ke({urlEndPoint:l,authParams:r,fileType:a.statementFileType});if(h.ok){const y=ve(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{q as W,d as G,F as y,av as ge,V as r,aK as P,bL as _e,bA as be,bz as Se,y as B,o as w,aQ as we,m as ye,bM as Ce,c as S,C as A,aA as K,O as xe,aS as Oe,as as Re,bD as Ae}from"./index-DJLrbf0F.js";import{a as T,S as X}from"./core-CA3j8Axi.js";import{n as _}from"./mui-DpJXlk4t.js";import{bh as H,EI as Be,ER as ve,ES as E,ET as Le,EU as Te,EV as Pe,EW as Ie,EX as ke,EY as ee,EZ as te}from"./zeni-epic-state-CQt4n3Xe.js";import{m as z,l as q}from"./analyticsHelper-DmujELNG-B2_5NV-p.js";import{x as Ne}from"./ReportTableViewSelector-C8e6IEWt-BJN3fro7.js";import{a as se,p as Me}from"./TimeRangeSwitcher-Dq2FEgFR-DmMi5La_.js";import{M as Fe}from"./TimeframeSwitcherWithToggle-a3fmbzNR-B9R7QlVw.js";import{DownloadOverlayButton as Ee}from"./DownloadOverlay-DB-qx46O-j8z4pSob.js";import{I as je,R as M,x as ne}from"./CollapsableReportTable-hL_Ycouc-B8J7Q_nq.js";import{D as oe,T as ae,C as j,L as $e,g as ie}from"./mapSectionWithAcOnlyToTreeNode-BZSP-VcP-BuUbTOqM.js";import{s as Y}from"./mapTimeframeBalancesToTreeNode-ClgcHX26-Cs9gyyXd.js";import{d as Ve,l as De}from"./mapTimeframeHeaderLoadingInProgressToTreeNode-BmDRXfMV-Bmf8af15.js";import{d as ze}from"./mapLoadingInProgressToTreeNode-CXP8ZZTG-DkaL-N2A.js";import"./sentry-BA4piVNf.js";import"./lottie-B7mXQ-R-.js";import"./liveblocks-C2I4vRCJ.js";import"./utils-DUsHM-Uc.js";import"./analytics-CHPpxU3b.js";import"./recharts-BGdJnVo5.js";import"./lexical-dZFDzIA1.js";import"./TimeframeSwitcher-By3xz_-m-1CBF6COV.js";import"./page-detail-CWX5S47F-Byx36A1h.js";import"./AccountRow-BM2kGWyR-T6iB2hx_.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]="8efcad77-b69d-4b6d-94ac-ca8d61fbaac6",e._sentryDebugIdIdentifier="sentry-dbid-8efcad77-b69d-4b6d-94ac-ca8d61fbaac6")}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(j({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 Ze(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})):ke(s)===!0&&i.push(j({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:[l,...i]}}function He(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($e({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(j({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(j({calculatedSection:u,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))}}),{config:t,headerNodes:o?[p]:[],contentNodes:l}}const Q={contentPaddingLeft:new B(S[0],S[0],S[0]),contentPaddingRight:new B(S[3],S[3],S[8])},Qe=_.div`
1
+ import{q as W,d as G,F as y,av as ge,V as r,aK as P,bL as _e,bA as be,bz as Se,y as B,o as w,aQ as we,m as ye,bM as Ce,c as S,C as A,aA as K,O as xe,aS as Oe,as as Re,bD as Ae}from"./index-DDpxinoY.js";import{a as T,S as X}from"./core-CA3j8Axi.js";import{n as _}from"./mui-DpJXlk4t.js";import{bh as H,EI as Be,ER as ve,ES as E,ET as Le,EU as Te,EV as Pe,EW as Ie,EX as ke,EY as ee,EZ as te}from"./zeni-epic-state-CQt4n3Xe.js";import{m as z,l as q}from"./analyticsHelper-DmujELNG-CREtjHan.js";import{x as Ne}from"./ReportTableViewSelector-C8e6IEWt-C9oSqHHS.js";import{a as se,p as Me}from"./TimeRangeSwitcher-Dq2FEgFR-BGlD5dTQ.js";import{M as Fe}from"./TimeframeSwitcherWithToggle-a3fmbzNR-BNAWd54k.js";import{DownloadOverlayButton as Ee}from"./DownloadOverlay-DB-qx46O-QQjLHCMg.js";import{I as je,R as M,x as ne}from"./CollapsableReportTable-hL_Ycouc-BeVhCFjP.js";import{D as oe,T as ae,C as j,L as $e,g as ie}from"./mapSectionWithAcOnlyToTreeNode-BZSP-VcP-DnxPTr5m.js";import{s as Y}from"./mapTimeframeBalancesToTreeNode-ClgcHX26-NiO57h1_.js";import{d as Ve,l as De}from"./mapTimeframeHeaderLoadingInProgressToTreeNode-BmDRXfMV-2wcYi7O-.js";import{d as ze}from"./mapLoadingInProgressToTreeNode-CXP8ZZTG-CTGwDEAX.js";import"./sentry-BA4piVNf.js";import"./lottie-B7mXQ-R-.js";import"./liveblocks-C2I4vRCJ.js";import"./utils-DUsHM-Uc.js";import"./analytics-CHPpxU3b.js";import"./recharts-BGdJnVo5.js";import"./lexical-dZFDzIA1.js";import"./TimeframeSwitcher-By3xz_-m-C7-16i-O.js";import"./page-detail-CWX5S47F-Byx36A1h.js";import"./AccountRow-BM2kGWyR-CUEabI22.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]="8efcad77-b69d-4b6d-94ac-ca8d61fbaac6",e._sentryDebugIdIdentifier="sentry-dbid-8efcad77-b69d-4b6d-94ac-ca8d61fbaac6")}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(j({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 Ze(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})):ke(s)===!0&&i.push(j({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:[l,...i]}}function He(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($e({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(j({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(j({calculatedSection:u,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))}}),{config:t,headerNodes:o?[p]:[],contentNodes:l}}const Q={contentPaddingLeft:new B(S[0],S[0],S[0]),contentPaddingRight:new B(S[3],S[3],S[8])},Qe=_.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{d as A,V as a,F as D,q as de,aK as Ae,b1 as Q,c as I,b as M,aV as J,o as m,p as g,aA as Ve,y as xe,bJ as ge,ak as T,bK as V,b8 as F}from"./index-DJLrbf0F.js";import{a as P,S as ee}from"./core-CA3j8Axi.js";import{n as x}from"./mui-DpJXlk4t.js";import{p as b,d as ae,y as W,b as N,g as re,u as R}from"./chartTypes-DRiSljvE-CN4L62GH.js";import{i as K,h as oe,c as G}from"./toCOABalancesWithID--oEGymMJ-DrPkDPTu.js";import{V as Z}from"./toChartData-CavJzP6f-B2iIF7nP.js";import{B as Re,C as te,X as le,Y as ne,T as se,L as pe,b as ce,c as me,d as fe}from"./recharts-BGdJnVo5.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]="3733e26a-9575-4941-99f0-4116b64efcd7",e._sentryDebugIdIdentifier="sentry-dbid-3733e26a-9575-4941-99f0-4116b64efcd7")}catch{}})();const X={legendLabelMarginLeft:new xe(2,2),legendLabelMarginRight:new xe(I[3],I[4])},Fe=x.div`
1
+ import{d as A,V as a,F as D,q as de,aK as Ae,b1 as Q,c as I,b as M,aV as J,o as m,p as g,aA as Ve,y as xe,bJ as ge,ak as T,bK as V,b8 as F}from"./index-DDpxinoY.js";import{a as P,S as ee}from"./core-CA3j8Axi.js";import{n as x}from"./mui-DpJXlk4t.js";import{p as b,d as ae,y as W,b as N,g as re,u as R}from"./chartTypes-DRiSljvE-CV6dAhnU.js";import{i as K,h as oe,c as G}from"./toCOABalancesWithID--oEGymMJ-DR0b-mdX.js";import{V as Z}from"./toChartData-CavJzP6f-KkbBsImT.js";import{B as Re,C as te,X as le,Y as ne,T as se,L as pe,b as ce,c as me,d as fe}from"./recharts-BGdJnVo5.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]="3733e26a-9575-4941-99f0-4116b64efcd7",e._sentryDebugIdIdentifier="sentry-dbid-3733e26a-9575-4941-99f0-4116b64efcd7")}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{q as Tt,av as Ct,y as u,e$ as Dt,F as It,f0 as kt,f1 as Pt,V as t,f2 as At,f3 as le,f4 as Mt,f5 as Bt,f6 as Ft,aK as j,f7 as Rt,aL as A,f8 as Lt,f9 as zt,fa as Me,fb as Be,fc as Fe,b as K,fd as O,fe as E,ff as _,p as S,fg as Nt,fh as Ot,fi as Et,fj as _t,bQ as Re,o as n,aO as Wt,c as s,ah as Zt,b$ as Vt,a as qt,B as Yt,fk as Gt,cf as Kt,ak as se,al as ce,fl as Ut,fm as Ht,bg as Qt,l as Jt,b7 as Xt,ap as et,bI as en,ag as tt,br as tn,fn as nn}from"./index-DJLrbf0F.js";import{a as Z}from"./core-CA3j8Axi.js";import{n as a}from"./mui-DpJXlk4t.js";import{bp as Le,bn as ze,bK as I,bQ as an,Fq as ln,bO as oe,bS as on}from"./zeni-epic-state-CQt4n3Xe.js";import{t as rn,o as dn}from"./LowBalancePopup-DVS-w3b7-DP0lgN2T.js";import{S as W}from"./LabeledText-axaAGyUS-Dng_AeMD.js";import"./sentry-BA4piVNf.js";import"./lottie-B7mXQ-R-.js";import"./liveblocks-C2I4vRCJ.js";import"./utils-DUsHM-Uc.js";import"./analytics-CHPpxU3b.js";import"./recharts-BGdJnVo5.js";import"./lexical-dZFDzIA1.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]="43900a93-1b34-4f5e-80b1-41efdf717537",e._sentryDebugIdIdentifier="sentry-dbid-43900a93-1b34-4f5e-80b1-41efdf717537")}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,s[2],s[2]),footerButtonWidth:new u(120,165),iconContainerMarginTop:new u(6,s[1]),navBarContainerPaddingTop:new u(10,s[3]),sectionTitleMarginLeft:new u(s[3],s[0]),reviewContainerMarginLeft:new u(s[3],s[6]),reviewContainerMarginRight:new u(s[3],s[8]),footerRightIconMarginRight:new u(s[0],s[0],s[7]),infoLabelPaddingRight:new u(s[0],s[3]),infoLabelMarginTop:new u(s[1],s[0])},sn={sectionTitle:new qt("h6Medium","h5Medium")},{dateFormat:Ne,common:{currency:v,labels:Oe,edit:cn,strings:{empty:h}},spendManagement:{billPay:mn}}=It.getLocalizedStrings(),{billDetails:i,paymentDetails:Ee}=mn,_e=({attachment:e})=>{const[y,f]=Z.useState(!1),M=()=>{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(Ut,{title:e.fileName,file:e,onCrossClick:()=>M(),setShowFullScreenView:f}):null,t.jsx(En,{children:t.jsx(Ht,{contentType:e.contentType})})]})},sa=({billDetails:e,billpayApprovalView:y,isBillPayCommentingEnabled:f,currentTenant:M,isInternationalPaymentShaVsOurEnabled:T,isLocalCurrencyEnabled:at,style:it,analytics:w,isRecurringBillsFeatureEnabled:lt,isApprovalRequiredForMarkAsPaid:ot,isDetectInsufficientFundsEnabled:rt,billId:x,onClickEdit:me,discardBillDetailsFromLocalStore:pe,saveBillDetails:ue,discardOutsideZeniPaymentData:dt,updateBillDetailSaveBillCode:ye,redirectToBillsScreen:he,onAttachmentClick:J,retryPayment:st})=>{const d=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(d),z=e.saveStatus,X=e.zeniAssistRetryStatus,ee=e.vendor?.vendorCurrencyCode,o=Dt(T,at,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?kt(fe,o):e.recipientTotalAmount.amount+(o?.fee.amount??0),currencyCode:v.currencyCode,currencySymbol:v.currencySymbol},N={amount:o?.method.includes("international")===!0?Pt(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:[`${i.magicLink.collectFrom} ${e.toAccountVendorEmail}`,t.jsx(Ln,{size:d,children:t.jsx(Rn,{})})]}):At(e.paymentDetailsSection?.paymentTo);Z.useEffect(()=>{(z?.fetchState==="Completed"||X?.fetchState==="Completed")&&(pe(),ye(),he())},[z,X,he,pe,ye]);const $=e.billPayInfo?.stage,k=e.billPayInfo?.billStatus,V=e.billPayInfo?.billPaymentStatus,yt=e.billPayInfo?.billPaymentRefundStatus,te=$?.code==="paid"?$:k?.code=="approved"&&V?.code?V:k,ht=e.billPayInfo?.isRefundInitiated===!0?yt:k?.code=="approved"&&V?.code?V:k,ne=()=>{me()},we=()=>{me()},q=e.paymentDetailsSection?.paymentDate,ae=le(o?.method??""),$e=ae.replace("Same Day",""),ft=e.isCollectToAccountInfoFromVendorContact?t.jsx(Mt,{paymentTypeLabel:$e,onClick:pt}):i.addedByZeni,Y=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=()=>{dt(),xe(!1)},P=g&&($?.code!=null?$.code==="draft"||k?.code==="approved":!0),b=P&&!ot,je=We(b,Y,e.isBillMarkedForRetry),wt=()=>g?b?void 0:i.paymentOutsideZeni.reviewInfo:o?.method!=null&&o.method.includes(I)&&e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod!=null&&T&&ee===v.currencyCode?Ot(e.paymentDetailsSection.internationalTransferFeeBearerPaymentMethod):void 0,ie=rt&&e.paymentDetailsSection!=null?Bt(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?i.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}),ie!=null){const Ce=$?.code??"draft",De=k?.code??"",Ie=e.isRecurring?["Recurring"]:["One-Time"],ke=e.invoiceNumber??"",Pe=nn(c.loggedInUser),Ae=e.paymentDetailsSection?.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account";je===i.scheduleBill?w.trackLowBalanceAccountSchedule(Ce,De,Ie,ke,Pe,Ae):je===i.sendForApproval&&w.trackLowBalanceAccountSentForApproval(Ce,De,Ie,ke,Pe,Ae)}}},Se=()=>{Te===!0&&G(!1),e.isBillMarkedForRetry===!0?(st(),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,G]=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(dn,{withdrawFrom:e.paymentDetailsSection?.withdrawFrom,paymentDate:e.paymentDetailsSection?.paymentDate,onOkClick:Se,onCancelClick:()=>{G(!1),ne()},onClickAway:()=>{G(!1)}}):null,t.jsx(Ft,{anchor:"right",open:ct,onClose:be,transitionDuration:250,"data-testid":j("vendor-email-preview-drawer"),children:t.jsx(Rt,{companyName:Lt(M.company?.companyInfo),vendor:e.vendor?.name,paymentDate:q?.format(C)??"",paymentType:$e,amount:A("0,0[.]00",p),isInvoiceAttached:!!e.file,onClose:be})}),t.jsxs(vn,{windowSize:d,style:it,children:[d==="small"?t.jsxs(Fn,{windowSize:d,children:[t.jsx(Ue,{onClick:we,"data-testid":j("review-detail-nav-bar-small-back")}),t.jsx(qe,{windowSize:d,children:i.oneLastLook})]}):t.jsx(Bn,{"data-testid":j("review-details-nav-bar-back"),children:t.jsx(Ue,{onClick:we})}),d!=="small"?t.jsx(Sn,{children:t.jsx(qe,{windowSize:d,children:i.oneLastLook})}):null,e.duplicateBillTransactions.length>0?t.jsxs(Tn,{children:[t.jsxs(Cn,{children:[t.jsx(Yn,{}),t.jsxs(Dn,{children:[t.jsx(kn,{children:i.duplicateBillPayWarning}),t.jsxs(In,{children:[i.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:[i.viewBill,e.duplicateBillTransactions[0].documentId]})]})]})]}),t.jsxs(Zn,{children:[t.jsx(qn,{children:i.duplicateInvoiceFound}),e.duplicateBillTransactions.map(l=>{const r=zt(l);return l!=null?t.jsx(Vn,{children:nt.includes(d)?t.jsxs(Ye,{windowSize:d,children:[t.jsxs(Pn,{children:[t.jsxs(An,{children:[l.attachments&&l.attachments.length>0?t.jsx(_e,{attachment:l.attachments[0]}):t.jsx(He,{children:t.jsx(Qe,{})}),t.jsx(H,{children:t.jsxs(t.Fragment,{children:[l.documentId!=null?i.invoiceNo:null,l.documentId]})})]}),t.jsx(Je,{windowSize:d,children:A("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(H,{children:[l.dueDate!=null?i.due:null," ",l.dueDate?.format(C)]}),t.jsx(Xe,{children:r!=null?Me.includes(r.code)?t.jsx(Be,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(Q,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(Q,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value}):null})]})]}):t.jsxs(Ye,{windowSize:d,children:[l.attachments&&l.attachments.length>0?t.jsx(_e,{attachment:l.attachments[0]}):t.jsx(He,{children:t.jsx(Qe,{})}),t.jsxs(Wn,{"data-testid":j("review-detail-info"),onClick:()=>J(l.id,l.billPayInfo.stage.code),children:[t.jsx(H,{style:{width:"50%"},children:t.jsxs("div",{children:[l.documentId!=null?i.invoiceNo:null," ",l.documentId]})}),t.jsxs(H,{style:{width:"25%"},children:[l.dueDate!=null?i.due:null," ",l.dueDate?.format(C)]}),t.jsx(Je,{style:{width:"25%"},windowSize:d,children:A("0,0[.]00",l.amount)})]}),t.jsx(Xe,{children:r!=null?Me.includes(r.code)?t.jsx(Be,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(Q,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(Q,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value}):null})]})},l.id):null})]})]}):null,t.jsxs(Mn,{children:[t.jsx(Ge,{children:i.pay}),t.jsx(Ke,{children:t.jsx(Fe,{amount:gt,integerStyles:K.largeMedium.cssObject,decimalStyles:K.smallMedium.cssObject})}),t.jsx(Ge,{children:i.to}),t.jsx(Ke,{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:i.withdrawFrom,width:L},style:{width:"auto"},value:e.paymentDetailsSection?.withdrawFrom!=null?Nt(e.paymentDetailsSection.withdrawFrom,d):h,infoLabelStyle:{textAlign:d==="small"?"left":"right",paddingRight:m.infoLabelPaddingRight.valuePx(d),marginTop:m.infoLabelMarginTop.valuePx(d),color:S.brandColorGoldDark},additionalInfoLabel:ie})}),t.jsx(U,{})]}),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:i.paymentMethod,width:L},style:{width:"auto"},value:le(o?.method??""),additionalInfoLabel:wt()})}),t.jsx(U,{}),!g&&q!=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:i.paymentDate,width:L},style:{width:"auto"},value:q.format(C),additionalInfoLabel:`${i.estimatedArrival}${oe(on(q.toDate(),[0,6],o?.maxPeriod.value??0).toDateString()).format(C)} - (${ae.length>0?`${ae} `:""}${i.deliveryTimeLabel} = ${o?.maxPeriod.value??"0"} ${i.deliveryTimeUnits})`})}),t.jsx(U,{})]}):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:i.paymentTo,width:L},style:{width:"auto"},value:ut??"",additionalInfoLabel:ft})}),g||lt?t.jsxs(t.Fragment,{children:[t.jsx(U,{}),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:i.paymentType,width:L},style:{width:"auto"},value:_t(e.isRecurring,g,e.recurringBillInstance??1,e.recurringConfig?.totalPaymentCycles??0),additionalInfoLabel:Et(d,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:d,children:[t.jsxs(bn,{children:[t.jsx(yn,{children:i.total}),t.jsx(Re,{style:{padding:`12px ${n.sp3}`,lineHeight:"18px"},maxWidth:"312px",title:t.jsxs(fn,{children:[t.jsxs(Ve,{children:[t.jsx(de,{children:o.method.includes(I)&&ee!==v.currencyCode?Ee.conversionAmountColon:Oe.invoiceAmount}),t.jsx(re,{children:A("0,0[.]00",{amount:p.amount-N.amount,currencySymbol:N.currencySymbol})})]}),t.jsxs(Ve,{children:[t.jsx(de,{children:Ee.transactionFee}),t.jsx(re,{children:A("0,0[.]00",{amount:N.amount,currencySymbol:N.currencySymbol})})]}),t.jsx(hn,{}),t.jsxs(un,{children:[t.jsx(de,{children:Oe.total}),t.jsx(re,{children:A("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:K.h6Medium.cssObject,decimalStyles:K.standardMedium.cssObject})})]})}):null]}),t.jsx(Wt,{cancelBtn:{label:P&&!b?i.paymentOutsideZeni.markAsPaid:i.editBill,onClick:P&&!b?ve:ne,style:{width:Ze(!1,P,b,Y,d)}},primaryBtn:{label:We(b,Y,e.isBillMarkedForRetry),isLoading:z?.fetchState==="In-Progress"||X?.fetchState==="In-Progress",onClick:b?ve:()=>{vt&&ie!=null?G(!0):Se()},style:{width:Ze(!0,P,b,Y,d)}},rightSideComponent:P&&!b&&z.fetchState!=="In-Progress"?t.jsx(Gn,{windowSize:d,children:t.jsx(Re,{style:{color:S.heroDark,padding:`2px ${n.sp2}`},display:"flex",title:cn,placement:"top",children:t.jsx(Un,{onClick:ne,"data-testid":j("review-detail-edit-bill-button"),children:t.jsx(Kn,{})})})}):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:[i.internationalText1,t.jsx(Nn,{href:"https://www.nium.com/legal/end-customer-terms",target:"_Blank",rel:"noopener noreferrer",children:i.internationalTerms}),i.internationalText2]}):null})]})},We=(e,y,f)=>e?i.paymentOutsideZeni.markAsPaid:f===!0?i.retryPayment:y?i.sendForApproval:i.scheduleBill,Ze=(e,y,f,M,T)=>f?128:y&&!e&&T==="small"?"auto":M?165:m.footerButtonWidth.value(T),pn=a(en)`
1
+ import{q as Tt,av as Ct,y as u,e$ as Dt,F as It,f0 as kt,f1 as Pt,V as t,f2 as At,f3 as le,f4 as Mt,f5 as Bt,f6 as Ft,aK as j,f7 as Rt,aL as A,f8 as Lt,f9 as zt,fa as Me,fb as Be,fc as Fe,b as K,fd as O,fe as E,ff as _,p as S,fg as Nt,fh as Ot,fi as Et,fj as _t,bQ as Re,o as n,aO as Wt,c as s,ah as Zt,b$ as Vt,a as qt,B as Yt,fk as Gt,cf as Kt,ak as se,al as ce,fl as Ut,fm as Ht,bg as Qt,l as Jt,b7 as Xt,ap as et,bI as en,ag as tt,br as tn,fn as nn}from"./index-DDpxinoY.js";import{a as Z}from"./core-CA3j8Axi.js";import{n as a}from"./mui-DpJXlk4t.js";import{bp as Le,bn as ze,bK as I,bQ as an,Fq as ln,bO as oe,bS as on}from"./zeni-epic-state-CQt4n3Xe.js";import{t as rn,o as dn}from"./LowBalancePopup-DVS-w3b7-B-J4NCtT.js";import{S as W}from"./LabeledText-axaAGyUS-CcC7jZEk.js";import"./sentry-BA4piVNf.js";import"./lottie-B7mXQ-R-.js";import"./liveblocks-C2I4vRCJ.js";import"./utils-DUsHM-Uc.js";import"./analytics-CHPpxU3b.js";import"./recharts-BGdJnVo5.js";import"./lexical-dZFDzIA1.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]="43900a93-1b34-4f5e-80b1-41efdf717537",e._sentryDebugIdIdentifier="sentry-dbid-43900a93-1b34-4f5e-80b1-41efdf717537")}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,s[2],s[2]),footerButtonWidth:new u(120,165),iconContainerMarginTop:new u(6,s[1]),navBarContainerPaddingTop:new u(10,s[3]),sectionTitleMarginLeft:new u(s[3],s[0]),reviewContainerMarginLeft:new u(s[3],s[6]),reviewContainerMarginRight:new u(s[3],s[8]),footerRightIconMarginRight:new u(s[0],s[0],s[7]),infoLabelPaddingRight:new u(s[0],s[3]),infoLabelMarginTop:new u(s[1],s[0])},sn={sectionTitle:new qt("h6Medium","h5Medium")},{dateFormat:Ne,common:{currency:v,labels:Oe,edit:cn,strings:{empty:h}},spendManagement:{billPay:mn}}=It.getLocalizedStrings(),{billDetails:i,paymentDetails:Ee}=mn,_e=({attachment:e})=>{const[y,f]=Z.useState(!1),M=()=>{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(Ut,{title:e.fileName,file:e,onCrossClick:()=>M(),setShowFullScreenView:f}):null,t.jsx(En,{children:t.jsx(Ht,{contentType:e.contentType})})]})},sa=({billDetails:e,billpayApprovalView:y,isBillPayCommentingEnabled:f,currentTenant:M,isInternationalPaymentShaVsOurEnabled:T,isLocalCurrencyEnabled:at,style:it,analytics:w,isRecurringBillsFeatureEnabled:lt,isApprovalRequiredForMarkAsPaid:ot,isDetectInsufficientFundsEnabled:rt,billId:x,onClickEdit:me,discardBillDetailsFromLocalStore:pe,saveBillDetails:ue,discardOutsideZeniPaymentData:dt,updateBillDetailSaveBillCode:ye,redirectToBillsScreen:he,onAttachmentClick:J,retryPayment:st})=>{const d=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(d),z=e.saveStatus,X=e.zeniAssistRetryStatus,ee=e.vendor?.vendorCurrencyCode,o=Dt(T,at,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?kt(fe,o):e.recipientTotalAmount.amount+(o?.fee.amount??0),currencyCode:v.currencyCode,currencySymbol:v.currencySymbol},N={amount:o?.method.includes("international")===!0?Pt(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:[`${i.magicLink.collectFrom} ${e.toAccountVendorEmail}`,t.jsx(Ln,{size:d,children:t.jsx(Rn,{})})]}):At(e.paymentDetailsSection?.paymentTo);Z.useEffect(()=>{(z?.fetchState==="Completed"||X?.fetchState==="Completed")&&(pe(),ye(),he())},[z,X,he,pe,ye]);const $=e.billPayInfo?.stage,k=e.billPayInfo?.billStatus,V=e.billPayInfo?.billPaymentStatus,yt=e.billPayInfo?.billPaymentRefundStatus,te=$?.code==="paid"?$:k?.code=="approved"&&V?.code?V:k,ht=e.billPayInfo?.isRefundInitiated===!0?yt:k?.code=="approved"&&V?.code?V:k,ne=()=>{me()},we=()=>{me()},q=e.paymentDetailsSection?.paymentDate,ae=le(o?.method??""),$e=ae.replace("Same Day",""),ft=e.isCollectToAccountInfoFromVendorContact?t.jsx(Mt,{paymentTypeLabel:$e,onClick:pt}):i.addedByZeni,Y=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=()=>{dt(),xe(!1)},P=g&&($?.code!=null?$.code==="draft"||k?.code==="approved":!0),b=P&&!ot,je=We(b,Y,e.isBillMarkedForRetry),wt=()=>g?b?void 0:i.paymentOutsideZeni.reviewInfo:o?.method!=null&&o.method.includes(I)&&e.paymentDetailsSection?.internationalTransferFeeBearerPaymentMethod!=null&&T&&ee===v.currencyCode?Ot(e.paymentDetailsSection.internationalTransferFeeBearerPaymentMethod):void 0,ie=rt&&e.paymentDetailsSection!=null?Bt(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?i.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}),ie!=null){const Ce=$?.code??"draft",De=k?.code??"",Ie=e.isRecurring?["Recurring"]:["One-Time"],ke=e.invoiceNumber??"",Pe=nn(c.loggedInUser),Ae=e.paymentDetailsSection?.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account";je===i.scheduleBill?w.trackLowBalanceAccountSchedule(Ce,De,Ie,ke,Pe,Ae):je===i.sendForApproval&&w.trackLowBalanceAccountSentForApproval(Ce,De,Ie,ke,Pe,Ae)}}},Se=()=>{Te===!0&&G(!1),e.isBillMarkedForRetry===!0?(st(),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,G]=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(dn,{withdrawFrom:e.paymentDetailsSection?.withdrawFrom,paymentDate:e.paymentDetailsSection?.paymentDate,onOkClick:Se,onCancelClick:()=>{G(!1),ne()},onClickAway:()=>{G(!1)}}):null,t.jsx(Ft,{anchor:"right",open:ct,onClose:be,transitionDuration:250,"data-testid":j("vendor-email-preview-drawer"),children:t.jsx(Rt,{companyName:Lt(M.company?.companyInfo),vendor:e.vendor?.name,paymentDate:q?.format(C)??"",paymentType:$e,amount:A("0,0[.]00",p),isInvoiceAttached:!!e.file,onClose:be})}),t.jsxs(vn,{windowSize:d,style:it,children:[d==="small"?t.jsxs(Fn,{windowSize:d,children:[t.jsx(Ue,{onClick:we,"data-testid":j("review-detail-nav-bar-small-back")}),t.jsx(qe,{windowSize:d,children:i.oneLastLook})]}):t.jsx(Bn,{"data-testid":j("review-details-nav-bar-back"),children:t.jsx(Ue,{onClick:we})}),d!=="small"?t.jsx(Sn,{children:t.jsx(qe,{windowSize:d,children:i.oneLastLook})}):null,e.duplicateBillTransactions.length>0?t.jsxs(Tn,{children:[t.jsxs(Cn,{children:[t.jsx(Yn,{}),t.jsxs(Dn,{children:[t.jsx(kn,{children:i.duplicateBillPayWarning}),t.jsxs(In,{children:[i.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:[i.viewBill,e.duplicateBillTransactions[0].documentId]})]})]})]}),t.jsxs(Zn,{children:[t.jsx(qn,{children:i.duplicateInvoiceFound}),e.duplicateBillTransactions.map(l=>{const r=zt(l);return l!=null?t.jsx(Vn,{children:nt.includes(d)?t.jsxs(Ye,{windowSize:d,children:[t.jsxs(Pn,{children:[t.jsxs(An,{children:[l.attachments&&l.attachments.length>0?t.jsx(_e,{attachment:l.attachments[0]}):t.jsx(He,{children:t.jsx(Qe,{})}),t.jsx(H,{children:t.jsxs(t.Fragment,{children:[l.documentId!=null?i.invoiceNo:null,l.documentId]})})]}),t.jsx(Je,{windowSize:d,children:A("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(H,{children:[l.dueDate!=null?i.due:null," ",l.dueDate?.format(C)]}),t.jsx(Xe,{children:r!=null?Me.includes(r.code)?t.jsx(Be,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(Q,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(Q,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value}):null})]})]}):t.jsxs(Ye,{windowSize:d,children:[l.attachments&&l.attachments.length>0?t.jsx(_e,{attachment:l.attachments[0]}):t.jsx(He,{children:t.jsx(Qe,{})}),t.jsxs(Wn,{"data-testid":j("review-detail-info"),onClick:()=>J(l.id,l.billPayInfo.stage.code),children:[t.jsx(H,{style:{width:"50%"},children:t.jsxs("div",{children:[l.documentId!=null?i.invoiceNo:null," ",l.documentId]})}),t.jsxs(H,{style:{width:"25%"},children:[l.dueDate!=null?i.due:null," ",l.dueDate?.format(C)]}),t.jsx(Je,{style:{width:"25%"},windowSize:d,children:A("0,0[.]00",l.amount)})]}),t.jsx(Xe,{children:r!=null?Me.includes(r.code)?t.jsx(Be,{style:{padding:"2px 5px"},title:r.value,placement:"top",children:t.jsx(Q,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value})}):t.jsx(Q,{color:r.color,bgColor:r.bgColor,borderColor:r.borderColor,children:r.value}):null})]})},l.id):null})]})]}):null,t.jsxs(Mn,{children:[t.jsx(Ge,{children:i.pay}),t.jsx(Ke,{children:t.jsx(Fe,{amount:gt,integerStyles:K.largeMedium.cssObject,decimalStyles:K.smallMedium.cssObject})}),t.jsx(Ge,{children:i.to}),t.jsx(Ke,{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:i.withdrawFrom,width:L},style:{width:"auto"},value:e.paymentDetailsSection?.withdrawFrom!=null?Nt(e.paymentDetailsSection.withdrawFrom,d):h,infoLabelStyle:{textAlign:d==="small"?"left":"right",paddingRight:m.infoLabelPaddingRight.valuePx(d),marginTop:m.infoLabelMarginTop.valuePx(d),color:S.brandColorGoldDark},additionalInfoLabel:ie})}),t.jsx(U,{})]}),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:i.paymentMethod,width:L},style:{width:"auto"},value:le(o?.method??""),additionalInfoLabel:wt()})}),t.jsx(U,{}),!g&&q!=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:i.paymentDate,width:L},style:{width:"auto"},value:q.format(C),additionalInfoLabel:`${i.estimatedArrival}${oe(on(q.toDate(),[0,6],o?.maxPeriod.value??0).toDateString()).format(C)} - (${ae.length>0?`${ae} `:""}${i.deliveryTimeLabel} = ${o?.maxPeriod.value??"0"} ${i.deliveryTimeUnits})`})}),t.jsx(U,{})]}):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:i.paymentTo,width:L},style:{width:"auto"},value:ut??"",additionalInfoLabel:ft})}),g||lt?t.jsxs(t.Fragment,{children:[t.jsx(U,{}),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:i.paymentType,width:L},style:{width:"auto"},value:_t(e.isRecurring,g,e.recurringBillInstance??1,e.recurringConfig?.totalPaymentCycles??0),additionalInfoLabel:Et(d,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:d,children:[t.jsxs(bn,{children:[t.jsx(yn,{children:i.total}),t.jsx(Re,{style:{padding:`12px ${n.sp3}`,lineHeight:"18px"},maxWidth:"312px",title:t.jsxs(fn,{children:[t.jsxs(Ve,{children:[t.jsx(de,{children:o.method.includes(I)&&ee!==v.currencyCode?Ee.conversionAmountColon:Oe.invoiceAmount}),t.jsx(re,{children:A("0,0[.]00",{amount:p.amount-N.amount,currencySymbol:N.currencySymbol})})]}),t.jsxs(Ve,{children:[t.jsx(de,{children:Ee.transactionFee}),t.jsx(re,{children:A("0,0[.]00",{amount:N.amount,currencySymbol:N.currencySymbol})})]}),t.jsx(hn,{}),t.jsxs(un,{children:[t.jsx(de,{children:Oe.total}),t.jsx(re,{children:A("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:K.h6Medium.cssObject,decimalStyles:K.standardMedium.cssObject})})]})}):null]}),t.jsx(Wt,{cancelBtn:{label:P&&!b?i.paymentOutsideZeni.markAsPaid:i.editBill,onClick:P&&!b?ve:ne,style:{width:Ze(!1,P,b,Y,d)}},primaryBtn:{label:We(b,Y,e.isBillMarkedForRetry),isLoading:z?.fetchState==="In-Progress"||X?.fetchState==="In-Progress",onClick:b?ve:()=>{vt&&ie!=null?G(!0):Se()},style:{width:Ze(!0,P,b,Y,d)}},rightSideComponent:P&&!b&&z.fetchState!=="In-Progress"?t.jsx(Gn,{windowSize:d,children:t.jsx(Re,{style:{color:S.heroDark,padding:`2px ${n.sp2}`},display:"flex",title:cn,placement:"top",children:t.jsx(Un,{onClick:ne,"data-testid":j("review-detail-edit-bill-button"),children:t.jsx(Kn,{})})})}):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:[i.internationalText1,t.jsx(Nn,{href:"https://www.nium.com/legal/end-customer-terms",target:"_Blank",rel:"noopener noreferrer",children:i.internationalTerms}),i.internationalText2]}):null})]})},We=(e,y,f)=>e?i.paymentOutsideZeni.markAsPaid:f===!0?i.retryPayment:y?i.sendForApproval:i.scheduleBill,Ze=(e,y,f,M,T)=>f?128:y&&!e&&T==="small"?"auto":M?165:m.footerButtonWidth.value(T),pn=a(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{q as B,V as i,aK as m,o as r,aO as L,y as d,L as P,a as C,B as I,p as s,ak as j,cy as W,m as R,ag as b,bf as D,c as n,eg as G,u as _,iR as q,k0 as A}from"./index-DJLrbf0F.js";import{n as t}from"./mui-DpJXlk4t.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]="b415fb42-7c28-4349-939a-aab1932371a9",e._sentryDebugIdIdentifier="sentry-dbid-b415fb42-7c28-4349-939a-aab1932371a9")}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])},F={title:new C("h6Regular","h5Regular")},xe=({title:e,description:g,reviewItems:x,showFooter:S,footerProps:{primaryButton:z,cancelButton:T,hideCancel:k},onCloseOverlay:E,onCloseReviewItem:M})=>{const a=B();return i.jsxs(V,{children:[i.jsx(X,{windowSize:a,children:i.jsx(Y,{children:i.jsx(Z,{windowSize:a,children:i.jsx(ee,{children:i.jsx(ie,{onClick:E,"data-testid":m("review-overlay-close",e)})})})})}),i.jsxs(H,{windowSize:a,children:[i.jsxs(J,{windowSize:a,children:[i.jsx(K,{children:i.jsx(N,{windowSize:a,children:e})}),i.jsx(Q,{isError:g.isError,windowSize:a,children:g.content})]}),i.jsx(U,{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:O(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(L,{primaryBtn:z,cancelBtn:T,showCancel:!k}):null]})},O=e=>e.reviewStatus.isLoading?i.jsx(R,{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,{}),V=t.div`
1
+ import{q as B,V as i,aK as m,o as r,aO as L,y as d,L as P,a as C,B as I,p as s,ak as j,cy as W,m as R,ag as b,bf as D,c as n,eg as G,u as _,iR as q,k0 as A}from"./index-DDpxinoY.js";import{n as t}from"./mui-DpJXlk4t.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]="b415fb42-7c28-4349-939a-aab1932371a9",e._sentryDebugIdIdentifier="sentry-dbid-b415fb42-7c28-4349-939a-aab1932371a9")}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])},F={title:new C("h6Regular","h5Regular")},xe=({title:e,description:g,reviewItems:x,showFooter:S,footerProps:{primaryButton:z,cancelButton:T,hideCancel:k},onCloseOverlay:E,onCloseReviewItem:M})=>{const a=B();return i.jsxs(V,{children:[i.jsx(X,{windowSize:a,children:i.jsx(Y,{children:i.jsx(Z,{windowSize:a,children:i.jsx(ee,{children:i.jsx(ie,{onClick:E,"data-testid":m("review-overlay-close",e)})})})})}),i.jsxs(H,{windowSize:a,children:[i.jsxs(J,{windowSize:a,children:[i.jsx(K,{children:i.jsx(N,{windowSize:a,children:e})}),i.jsx(Q,{isError:g.isError,windowSize:a,children:g.content})]}),i.jsx(U,{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:O(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(L,{primaryBtn:z,cancelBtn:T,showCancel:!k}):null]})},O=e=>e.reviewStatus.isLoading?i.jsx(R,{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,{}),V=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{eL as f,eM as h,V as s,bQ as g,o as a,aK as n,F as b,am as x,ag as c}from"./index-DJLrbf0F.js";import{n as l}from"./mui-DpJXlk4t.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]="679de0f1-623f-4cca-b39a-ab5ab6e49ef5",e._sentryDebugIdIdentifier="sentry-dbid-679de0f1-623f-4cca-b39a-ab5ab6e49ef5")}catch{}})();const{hyphen:d}=b.getLocalizedStrings().common.strings,y=l.div``,m=l.div`
1
+ import{eL as f,eM as h,V as s,bQ as g,o as a,aK as n,F as b,am as x,ag as c}from"./index-DDpxinoY.js";import{n as l}from"./mui-DpJXlk4t.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]="679de0f1-623f-4cca-b39a-ab5ab6e49ef5",e._sentryDebugIdIdentifier="sentry-dbid-679de0f1-623f-4cca-b39a-ab5ab6e49ef5")}catch{}})();const{hyphen:d}=b.getLocalizedStrings().common.strings,y=l.div``,m=l.div`
2
2
  display: flex;
3
3
  min-width: 192px;
4
4
  justify-content: space-between;
@@ -1,4 +1,4 @@
1
- import{aN as K,ig as ee,gB as fe,ew as we,ih as Le,a8 as Je,ii as Me,cB as Ve,cC as _e,V as a,F as be,ab as Fe,cm as Pe,cn as Be,co as Ne,aO as qe,ij as Re,ik as We,a9 as he,il as me,im as Ue,cO as ze,q as $e,iB as Ge,gG as re,c as R,p as Se,y as De,cE as Ke,io as He,ip as Qe,iq as Ye,o as _}from"./index-DJLrbf0F.js";import{a as f}from"./core-CA3j8Axi.js";import{n as U}from"./mui-DpJXlk4t.js";import{FU as Ze,FV as Xe}from"./zeni-epic-state-CQt4n3Xe.js";import{i as et,r as tt,n as lt,o as at}from"./ScheduleSequenceTable-NSt1juSD-BtySotUK.js";import"./sentry-BA4piVNf.js";import"./lottie-B7mXQ-R-.js";import"./liveblocks-C2I4vRCJ.js";import"./utils-DUsHM-Uc.js";import"./analytics-CHPpxU3b.js";import"./recharts-BGdJnVo5.js";import"./lexical-dZFDzIA1.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]="6aadb443-795e-4f00-833b-17772784614c",e._sentryDebugIdIdentifier="sentry-dbid-6aadb443-795e-4f00-833b-17772784614c")}catch{}})();const W={labelWidth:new De(160,160,160),depCategoryLabelWidth:new De(200,280,280)},st=U.div`
1
+ import{aN as K,ig as ee,gB as fe,ew as we,ih as Le,a8 as Je,ii as Me,cB as Ve,cC as _e,V as a,F as be,ab as Fe,cm as Pe,cn as Be,co as Ne,aO as qe,ij as Re,ik as We,a9 as he,il as me,im as Ue,cO as ze,q as $e,iB as Ge,gG as re,c as R,p as Se,y as De,cE as Ke,io as He,ip as Qe,iq as Ye,o as _}from"./index-DDpxinoY.js";import{a as f}from"./core-CA3j8Axi.js";import{n as U}from"./mui-DpJXlk4t.js";import{FU as Ze,FV as Xe}from"./zeni-epic-state-CQt4n3Xe.js";import{i as et,r as tt,n as lt,o as at}from"./ScheduleSequenceTable-NSt1juSD-B6P-vowS.js";import"./sentry-BA4piVNf.js";import"./lottie-B7mXQ-R-.js";import"./liveblocks-C2I4vRCJ.js";import"./utils-DUsHM-Uc.js";import"./analytics-CHPpxU3b.js";import"./recharts-BGdJnVo5.js";import"./lexical-dZFDzIA1.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]="6aadb443-795e-4f00-833b-17772784614c",e._sentryDebugIdIdentifier="sentry-dbid-6aadb443-795e-4f00-833b-17772784614c")}catch{}})();const W={labelWidth:new De(160,160,160),depCategoryLabelWidth:new De(200,280,280)},st=U.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{aN as F,ig as Y,gB as ke,ew as Ie,ih as Ae,a8 as Je,ii as we,cB as Le,cC as Me,V as a,F as Se,ab as Ve,cm as Pe,cn as _e,co as Fe,aO as Be,ij as $e,ik as Ne,a9 as ie,il as he,im as Ue,cO as qe,q as ze,gG as pe,c as X,p as Re,y as We,io as Ke,ip as Ge,iq as He,o as w}from"./index-DJLrbf0F.js";import{a as D}from"./core-CA3j8Axi.js";import{n as P}from"./mui-DpJXlk4t.js";import{FU as Qe,FV as Ye,bO as Xe}from"./zeni-epic-state-CQt4n3Xe.js";import{i as Ze,r as et,n as tt,o as lt}from"./ScheduleSequenceTable-NSt1juSD-BtySotUK.js";import"./sentry-BA4piVNf.js";import"./lottie-B7mXQ-R-.js";import"./liveblocks-C2I4vRCJ.js";import"./utils-DUsHM-Uc.js";import"./analytics-CHPpxU3b.js";import"./recharts-BGdJnVo5.js";import"./lexical-dZFDzIA1.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]="2e8801cb-4b33-4576-9d69-5fcdd0a5c5de",e._sentryDebugIdIdentifier="sentry-dbid-2e8801cb-4b33-4576-9d69-5fcdd0a5c5de")}catch{}})();const U={labelWidth:new We(160,160,160)},at=P.div`
1
+ import{aN as F,ig as Y,gB as ke,ew as Ie,ih as Ae,a8 as Je,ii as we,cB as Le,cC as Me,V as a,F as Se,ab as Ve,cm as Pe,cn as _e,co as Fe,aO as Be,ij as $e,ik as Ne,a9 as ie,il as he,im as Ue,cO as qe,q as ze,gG as pe,c as X,p as Re,y as We,io as Ke,ip as Ge,iq as He,o as w}from"./index-DDpxinoY.js";import{a as D}from"./core-CA3j8Axi.js";import{n as P}from"./mui-DpJXlk4t.js";import{FU as Qe,FV as Ye,bO as Xe}from"./zeni-epic-state-CQt4n3Xe.js";import{i as Ze,r as et,n as tt,o as lt}from"./ScheduleSequenceTable-NSt1juSD-B6P-vowS.js";import"./sentry-BA4piVNf.js";import"./lottie-B7mXQ-R-.js";import"./liveblocks-C2I4vRCJ.js";import"./utils-DUsHM-Uc.js";import"./analytics-CHPpxU3b.js";import"./recharts-BGdJnVo5.js";import"./lexical-dZFDzIA1.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]="2e8801cb-4b33-4576-9d69-5fcdd0a5c5de",e._sentryDebugIdIdentifier="sentry-dbid-2e8801cb-4b33-4576-9d69-5fcdd0a5c5de")}catch{}})();const U={labelWidth:new We(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{q as A,d as Z,V as t,ir as ie,F as N,is as le,a as oe,it as xe,dN as fe,fc as ye,b as I,iu as we,iq as be,o as i,y as b,p as j,l as $e,a9 as re,dJ as je,cm as Se,co as ke,cO as Q,cW as ee,cU as ve,iv as G,iw as De,b1 as Ce,ix as Me,cq as ze,iy as Le,c as h,ak as L,b7 as Ee,cn as Oe,an as pe,cX as Ie,a$ as ne,ek as Ae,aO as Te,iz as T,gb as Ve,aL as Fe,iA as Je,aS as H,cY as Be,bf as Pe}from"./index-DJLrbf0F.js";import{n as o,b as B}from"./mui-DpJXlk4t.js";import{a as C}from"./core-CA3j8Axi.js";import{bj as U,FW as Ne}from"./zeni-epic-state-CQt4n3Xe.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]="9129d8d3-a914-4127-ae5d-fe4cc0062c4e",e._sentryDebugIdIdentifier="sentry-dbid-9129d8d3-a914-4127-ae5d-fe4cc0062c4e")}catch{}})();const R=(e,l)=>`${e}.${l}`,{formElements:{dayOfMonthSelector:M},common:se}=N.getLocalizedStrings();function Re({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}=Q(),v=()=>{k||(c(),u(!1))},y=()=>{w(),u(!1)},k=ee(x,l),g=A(),a=Z();return t.jsx(pe,{onClickAway:()=>{u(!1)},children:t.jsx(Ke,{style:p,isDisabled:n!=null,windowSize:g,onClick:()=>{!f&&n==null&&u(!0)},children:t.jsx(Ie,{name:R(l,"dayOfMonth"),control:m,rules:{...d},render:()=>t.jsxs(_e,{children:[t.jsx(We,{placeholder:s,defaultValue:e,isDisabled:n}),f?t.jsxs(Ue,{alignLeft:r===!0,children:[t.jsx(et,{}),t.jsxs(ae,{isSelected:e.type==="day",children:[t.jsxs(Qe,{isError:e.type==="day"&&k,children:[t.jsx(ne,{label:{label:M.pickDate},radioField:{id:"day",name:R(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:R(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(Xe,{isSelected:e.type==="day",children:M.ofEveryMonth})]}),t.jsx(qe,{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:R(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(Te,{primaryBtn:{label:se.footer.save,onClick:v,isDisabled:Ye(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(Ge,{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 qe({defaultValue:e,onClick:l}){return t.jsxs(Ze,{children:[t.jsx(q,{children:[...Array(7).keys()].map(s=>{const r=s+1;return t.jsx(Y,{isSelected:r===e,onClick:()=>l(Ne(r)),children:r},r)})}),t.jsx(q,{children:[...Array(7).keys()].map(s=>{const r=s+8;return t.jsx(Y,{isSelected:r===e,onClick:()=>l(r),children:r},r)})}),t.jsx(q,{children:[...Array(7).keys()].map(s=>{const r=s+15;return t.jsx(Y,{isSelected:r===e,onClick:()=>l(r),children:r},r)})}),t.jsx(q,{children:[...Array(7).keys()].map(s=>{const r=s+22;return t.jsx(Y,{isSelected:r===e,onClick:()=>l(r),children:r},r)})})]})}const Ye=e=>{switch(e.type){case"day":return e.dayOfMonth==null;case"lastDayOfMonth":return!1;default:return!0}},_e=o.div`
1
+ import{q as A,d as Z,V as t,ir as ie,F as N,is as le,a as oe,it as xe,dN as fe,fc as ye,b as I,iu as we,iq as be,o as i,y as b,p as j,l as $e,a9 as re,dJ as je,cm as Se,co as ke,cO as Q,cW as ee,cU as ve,iv as G,iw as De,b1 as Ce,ix as Me,cq as ze,iy as Le,c as h,ak as L,b7 as Ee,cn as Oe,an as pe,cX as Ie,a$ as ne,ek as Ae,aO as Te,iz as T,gb as Ve,aL as Fe,iA as Je,aS as H,cY as Be,bf as Pe}from"./index-DDpxinoY.js";import{n as o,b as B}from"./mui-DpJXlk4t.js";import{a as C}from"./core-CA3j8Axi.js";import{bj as U,FW as Ne}from"./zeni-epic-state-CQt4n3Xe.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]="9129d8d3-a914-4127-ae5d-fe4cc0062c4e",e._sentryDebugIdIdentifier="sentry-dbid-9129d8d3-a914-4127-ae5d-fe4cc0062c4e")}catch{}})();const R=(e,l)=>`${e}.${l}`,{formElements:{dayOfMonthSelector:M},common:se}=N.getLocalizedStrings();function Re({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}=Q(),v=()=>{k||(c(),u(!1))},y=()=>{w(),u(!1)},k=ee(x,l),g=A(),a=Z();return t.jsx(pe,{onClickAway:()=>{u(!1)},children:t.jsx(Ke,{style:p,isDisabled:n!=null,windowSize:g,onClick:()=>{!f&&n==null&&u(!0)},children:t.jsx(Ie,{name:R(l,"dayOfMonth"),control:m,rules:{...d},render:()=>t.jsxs(_e,{children:[t.jsx(We,{placeholder:s,defaultValue:e,isDisabled:n}),f?t.jsxs(Ue,{alignLeft:r===!0,children:[t.jsx(et,{}),t.jsxs(ae,{isSelected:e.type==="day",children:[t.jsxs(Qe,{isError:e.type==="day"&&k,children:[t.jsx(ne,{label:{label:M.pickDate},radioField:{id:"day",name:R(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:R(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(Xe,{isSelected:e.type==="day",children:M.ofEveryMonth})]}),t.jsx(qe,{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:R(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(Te,{primaryBtn:{label:se.footer.save,onClick:v,isDisabled:Ye(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(Ge,{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 qe({defaultValue:e,onClick:l}){return t.jsxs(Ze,{children:[t.jsx(q,{children:[...Array(7).keys()].map(s=>{const r=s+1;return t.jsx(Y,{isSelected:r===e,onClick:()=>l(Ne(r)),children:r},r)})}),t.jsx(q,{children:[...Array(7).keys()].map(s=>{const r=s+8;return t.jsx(Y,{isSelected:r===e,onClick:()=>l(r),children:r},r)})}),t.jsx(q,{children:[...Array(7).keys()].map(s=>{const r=s+15;return t.jsx(Y,{isSelected:r===e,onClick:()=>l(r),children:r},r)})}),t.jsx(q,{children:[...Array(7).keys()].map(s=>{const r=s+22;return t.jsx(Y,{isSelected:r===e,onClick:()=>l(r),children:r},r)})})]})}const Ye=e=>{switch(e.type){case"day":return e.dayOfMonth==null;case"lastDayOfMonth":return!1;default:return!0}},_e=o.div`
2
2
  position: relative;
3
3
  `,He=o.div`
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import{DP as Jf,DQ as qt,DR as Kf,iO as ot,hw as xl,iQ as Ye,ht as Xf,hA as ql,DS as Ca,hC as Qf,hD as eh,DT as Vt,DU as Lt,h1 as th,DV as jr,DW as ea,cP as rh,f3 as ta,f0 as Ir,f8 as rt,f6 as nh,DX as Ll,DY as kl,hR as ih,hO as oh,DZ as ah,i0 as sh,hX as Pa,hU as uh,hJ as ch,D_ as lh,dK as fh,cV as hh,j0 as Dl,D$ as dh,bO as Or,hG as ja,hL as ph,oM as Nl,iP as xr,E0 as De,ic as ra,E1 as mh,j6 as gh,B as Re,A as X,E2 as na,E3 as yh,g_ as vh,E4 as bh,E5 as $l,E6 as wh,nk as xa,mR as Eh,E7 as Sh,mX as Hr,E8 as _h,mZ as Rh,E9 as Ze,mO as Oh,cC as Ih,iT as Ml,iU as Fl,iS as ia,iR as oa,iV as Th,Ea as Ah,nn as Ch,Eb as Ph,n4 as jh,nh as xh,Ec as qh,n8 as Lh,Ed as kh,Ee as St,Ef as aa,Eg as Dh,Eh as Nh,lR as $h,lX as Ul,Ei as Bl,gv as Mh,CV as Vl,Ej as Fh,CP as Uh,Ek as Bh,El as Vh,l_ as Gh,Em as zh,C_ as Hh,CO as Zh,qh as Gl,En as Zr,Eo as zl,A1 as sa,zP as Wh,A4 as Hl,zS as Yh,Ep as Jh,zX as Kh,zJ as Xh,zM as Qh,Eq as ed,A8 as td,z_ as rd,c3 as nd,bd as id,Er as od,Es as lt,Et as ad,Eu as sd,Ev as ud,i4 as Jo,bb as cd}from"./zeni-epic-state-CQt4n3Xe.js";import{j as D,D as qr,n as Ie,S as ht}from"./mui-DpJXlk4t.js";import{p as me,w as Ee,x as je,y as ld,a as K,n as re,o as ge,N as Ct,s as Ve,t as se,e as Zl,d as Wl,g as fd,u as ua,q as Ko}from"./core-CA3j8Axi.js";import{d as dt,q as Lr,e as pe,z as be,y as Pe,f as hd,W as dd,g as kr,i as pd,N as Je,F as kt,j as pt,k as at,m as Dr,o as tt,r as md,X as gd,R as nt,t as ca,v as it,Z as yd,Y as vd,c as Wr,A as bd,w as Yl,K as wd,x as Jl,O as Kl,C as Xo,E as Ed,S as Sd,H as _d,G as Xl,I as Rd,J as Od,P as Id,Q as Td,T as Ad,U as Cd,_ as Pd,$ as jd,a0 as xd,a1 as qd,a2 as Ld,a3 as kd,a4 as Dd}from"./index-DJLrbf0F.js";import{f as Nd}from"./analyticsHelper-D88-Oppk.js";import{q as ve,v as $d,w as Md,x as Fd,y as la,z as Ud,A as Bd,B as Vd,C as mt,D as Gd,E as jt,F as Nr,G as zd,H as Dt,I as Hd}from"./utils-DUsHM-Uc.js";import{r as fa}from"./empty-Dn000SHy.js";import{r as Zd,a as Wd,b as Yd,c as Jd}from"./constants-B4Ak6U9p.js";import{r as Nt,a as Kd}from"./index-C-ypGNlB.js";import{r as Xd}from"./index-C4-PHmb9.js";import"./sentry-BA4piVNf.js";import"./lottie-B7mXQ-R-.js";import"./liveblocks-C2I4vRCJ.js";import"./analytics-CHPpxU3b.js";import"./recharts-BGdJnVo5.js";import"./lexical-dZFDzIA1.js";import"./url-RUB1rBsd.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]="c9371754-0198-4b92-8721-ff84eb5d0515",e._sentryDebugIdIdentifier="sentry-dbid-c9371754-0198-4b92-8721-ff84eb5d0515")}catch{}})();const Qd={overlayWidth:new Pe(100,100,50)},{common:{strings:qa}}=kt.getLocalizedStrings();function ep(e,n){return{headerActions:{onTabChange:o=>{const a=at(o),i=pt(o);pe.trackCockpitTabClicked(i),n.navigate(`../../${a}`,{replace:!0})},filterActions:{onFilterTextChanged:(o,a)=>{e(Vt({uiState:{filterText:a}}))},onFiltersChange:(o,a)=>{a.categories!=null&&a.categoryCombinationOperator!=null&&pe.trackHealthMonitorFiltersApplied({filterSelection:{condition:a.categories.map(i=>i.matchingOperator).join(qa.comma),logic:a.categoryCombinationOperator,parameter:a.categories.map(i=>i.field).join(qa.comma)}}),e(Vt({uiState:{filters:a}}))}}},healthPageActions:{onRowClick:o=>{e(ql(o))},onColumnSortConfigChanged:(o,a)=>{e(Vt({uiState:{sortKey:o,sortOrder:a}}))},onCockpitReloadData:o=>{o==="healthMonitor"&&e(xl())},onFiltersChange:o=>{e(Vt({uiState:{filters:o}}))}}}}function tp(e,n){return{headerData:{selectedTabOption:Je("healthMonitor")},healthPageData:{healthView:n.healthView,managementView:n.managementView,mixpanelUrl:n.mixpanelHMUrl}}}const rp=ge(tp,ep)(pd);function Yr({isDrawerOpen:e}){const n=me(),o=Ee(),a=dt(),i=Lr(),{companyId:t}=je(),[r,s]=ld(),[d,l]=K.useState(!1),h=re(b=>Jf(b)),f=re(b=>qt(b)),{additionalChurnFactors:c}=re(b=>Kf(b)),{selectedCompanyDetail:w,selectedCompanyId:p,localFormDataAndStatusByCompanyId:y}=h,m=re(b=>b.companyViewState.zeniUsers.fetchState),u=re(b=>b.companyHealthMetricConfigViewState);if(K.useEffect(()=>{const b=g=>g==="Not-Started"||g==="Error";h.fetchState==="Completed"?o(ot(!1)):b(h.fetchState)&&(o(xl()),b(m)&&o(Ye()),b(u.fetchState)&&o(Xf()))},[h.fetchState,u.fetchState]),K.useEffect(()=>{t!=null&&h.fetchState==="Completed"&&r.has("utm_source")===!0&&(o(ql(t)),w!=null&&(pe.trackCockpitHealthMonitorNotificationAlertClicked(r.get("utm_source"),{companyId:w.companyInfo.companyId,companyName:w.companyInfo.name,churnProbability:w.companyHealthMetric.churnProbabilityPercentage??null}),l(r.has("utm_source")),r.delete("utm_source"),s(r)))},[h.fetchState,w?.companyInfo.companyId,w?.companyInfo.name]),be.getSignedInUser()==null)throw Error("Can't access Health Monitor page without signing in...");return D.jsxs(D.Fragment,{children:[e===!0||p!=null&&w!=null?D.jsx(qr,{anchor:"right",open:p!=null,PaperProps:{style:{width:Qd.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>o(Ca()),children:D.jsx(hd,{roomId:`cockpit_${p}`,autoConnect:!0,children:D.jsx(dd,{onSaveClick:()=>{p!=null&&o(eh(p))},onSaveChangesToLocalStore:b=>{h.selectedCompanyId!=null&&o(Qf({companyId:h.selectedCompanyId,updatedLocalData:b}))},localData:y?.companyHealthMetricLocalData??{netPromoterScore:void 0,externalProductServiceExposure:void 0,additionalChurnFactors:{increasingChurnProbability:[],decreasingChurnProbability:[]}},companyHealthMetricViewSelector:h,onCloseDrawer:()=>o(Ca()),analytics:pe,urlSource:d,additionalChurnFactorsOptions:c})})}):null,D.jsx(rp,{healthView:h,managementView:f,navigate:n,mixpanelHMUrl:kr.mixpanelHMUrl})]})}const Ql=(e,n)=>{const o=[...e??[]];return o.push(n),o},np=e=>{const n=[...e??[]];return{poppedPathname:n.pop(),newStack:n}},ip=(e=2)=>{let n="../";for(let o=0;o<e;o++)n=`${n}../`;return n},le=({state:e,element:n})=>be.isSignedIn()===!0?D.jsx(D.Fragment,{children:n}):D.jsx(Ct,{to:"/signin/auth",replace:!0,state:{...e,message:"...",origin:window.location.pathname}});function op(){return D.jsxs(Ve,{children:[D.jsx(se,{path:"/companies/:companyId",element:D.jsx(le,{element:D.jsx(Yr,{isDrawerOpen:!0})})}),D.jsx(se,{path:"/",element:D.jsx(le,{element:D.jsx(Yr,{})})}),D.jsx(se,{path:"/*",element:D.jsx(le,{element:D.jsx(Yr,{})})})]})}const ap={drawerLeftMargin:new Pe(0,0,240)};function $t(e){const{isOpen:n,drawerLeftMargin:o,children:a,onClose:i}=e,t=Lr(),r=o?.valuePx(t)??ap.drawerLeftMargin.valuePx(t),s=dt();return D.jsx(qr,{anchor:"right",open:n,PaperProps:{style:{width:`calc(100% - ${r})`}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.8,cursor:"pointer"}}},onClose:i,children:a})}const sp=({fetchState:e})=>e==="In-Progress"||e==="Not-Started"?D.jsx(up,{children:D.jsx(Dr,{size:"ExtraLarge",start:!0})}):null,up=Ie.div`
1
+ import{DP as Jf,DQ as qt,DR as Kf,iO as ot,hw as xl,iQ as Ye,ht as Xf,hA as ql,DS as Ca,hC as Qf,hD as eh,DT as Vt,DU as Lt,h1 as th,DV as jr,DW as ea,cP as rh,f3 as ta,f0 as Ir,f8 as rt,f6 as nh,DX as Ll,DY as kl,hR as ih,hO as oh,DZ as ah,i0 as sh,hX as Pa,hU as uh,hJ as ch,D_ as lh,dK as fh,cV as hh,j0 as Dl,D$ as dh,bO as Or,hG as ja,hL as ph,oM as Nl,iP as xr,E0 as De,ic as ra,E1 as mh,j6 as gh,B as Re,A as X,E2 as na,E3 as yh,g_ as vh,E4 as bh,E5 as $l,E6 as wh,nk as xa,mR as Eh,E7 as Sh,mX as Hr,E8 as _h,mZ as Rh,E9 as Ze,mO as Oh,cC as Ih,iT as Ml,iU as Fl,iS as ia,iR as oa,iV as Th,Ea as Ah,nn as Ch,Eb as Ph,n4 as jh,nh as xh,Ec as qh,n8 as Lh,Ed as kh,Ee as St,Ef as aa,Eg as Dh,Eh as Nh,lR as $h,lX as Ul,Ei as Bl,gv as Mh,CV as Vl,Ej as Fh,CP as Uh,Ek as Bh,El as Vh,l_ as Gh,Em as zh,C_ as Hh,CO as Zh,qh as Gl,En as Zr,Eo as zl,A1 as sa,zP as Wh,A4 as Hl,zS as Yh,Ep as Jh,zX as Kh,zJ as Xh,zM as Qh,Eq as ed,A8 as td,z_ as rd,c3 as nd,bd as id,Er as od,Es as lt,Et as ad,Eu as sd,Ev as ud,i4 as Jo,bb as cd}from"./zeni-epic-state-CQt4n3Xe.js";import{j as D,D as qr,n as Ie,S as ht}from"./mui-DpJXlk4t.js";import{p as me,w as Ee,x as je,y as ld,a as K,n as re,o as ge,N as Ct,s as Ve,t as se,e as Zl,d as Wl,g as fd,u as ua,q as Ko}from"./core-CA3j8Axi.js";import{d as dt,q as Lr,e as pe,z as be,y as Pe,f as hd,W as dd,g as kr,i as pd,N as Je,F as kt,j as pt,k as at,m as Dr,o as tt,r as md,X as gd,R as nt,t as ca,v as it,Z as yd,Y as vd,c as Wr,A as bd,w as Yl,K as wd,x as Jl,O as Kl,C as Xo,E as Ed,S as Sd,H as _d,G as Xl,I as Rd,J as Od,P as Id,Q as Td,T as Ad,U as Cd,_ as Pd,$ as jd,a0 as xd,a1 as qd,a2 as Ld,a3 as kd,a4 as Dd}from"./index-DDpxinoY.js";import{f as Nd}from"./analyticsHelper-lfrGqA3D.js";import{q as ve,v as $d,w as Md,x as Fd,y as la,z as Ud,A as Bd,B as Vd,C as mt,D as Gd,E as jt,F as Nr,G as zd,H as Dt,I as Hd}from"./utils-DUsHM-Uc.js";import{r as fa}from"./empty-Dn000SHy.js";import{r as Zd,a as Wd,b as Yd,c as Jd}from"./constants-B4Ak6U9p.js";import{r as Nt,a as Kd}from"./index-C-ypGNlB.js";import{r as Xd}from"./index-C4-PHmb9.js";import"./sentry-BA4piVNf.js";import"./lottie-B7mXQ-R-.js";import"./liveblocks-C2I4vRCJ.js";import"./analytics-CHPpxU3b.js";import"./recharts-BGdJnVo5.js";import"./lexical-dZFDzIA1.js";import"./url-RUB1rBsd.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]="c9371754-0198-4b92-8721-ff84eb5d0515",e._sentryDebugIdIdentifier="sentry-dbid-c9371754-0198-4b92-8721-ff84eb5d0515")}catch{}})();const Qd={overlayWidth:new Pe(100,100,50)},{common:{strings:qa}}=kt.getLocalizedStrings();function ep(e,n){return{headerActions:{onTabChange:o=>{const a=at(o),i=pt(o);pe.trackCockpitTabClicked(i),n.navigate(`../../${a}`,{replace:!0})},filterActions:{onFilterTextChanged:(o,a)=>{e(Vt({uiState:{filterText:a}}))},onFiltersChange:(o,a)=>{a.categories!=null&&a.categoryCombinationOperator!=null&&pe.trackHealthMonitorFiltersApplied({filterSelection:{condition:a.categories.map(i=>i.matchingOperator).join(qa.comma),logic:a.categoryCombinationOperator,parameter:a.categories.map(i=>i.field).join(qa.comma)}}),e(Vt({uiState:{filters:a}}))}}},healthPageActions:{onRowClick:o=>{e(ql(o))},onColumnSortConfigChanged:(o,a)=>{e(Vt({uiState:{sortKey:o,sortOrder:a}}))},onCockpitReloadData:o=>{o==="healthMonitor"&&e(xl())},onFiltersChange:o=>{e(Vt({uiState:{filters:o}}))}}}}function tp(e,n){return{headerData:{selectedTabOption:Je("healthMonitor")},healthPageData:{healthView:n.healthView,managementView:n.managementView,mixpanelUrl:n.mixpanelHMUrl}}}const rp=ge(tp,ep)(pd);function Yr({isDrawerOpen:e}){const n=me(),o=Ee(),a=dt(),i=Lr(),{companyId:t}=je(),[r,s]=ld(),[d,l]=K.useState(!1),h=re(b=>Jf(b)),f=re(b=>qt(b)),{additionalChurnFactors:c}=re(b=>Kf(b)),{selectedCompanyDetail:w,selectedCompanyId:p,localFormDataAndStatusByCompanyId:y}=h,m=re(b=>b.companyViewState.zeniUsers.fetchState),u=re(b=>b.companyHealthMetricConfigViewState);if(K.useEffect(()=>{const b=g=>g==="Not-Started"||g==="Error";h.fetchState==="Completed"?o(ot(!1)):b(h.fetchState)&&(o(xl()),b(m)&&o(Ye()),b(u.fetchState)&&o(Xf()))},[h.fetchState,u.fetchState]),K.useEffect(()=>{t!=null&&h.fetchState==="Completed"&&r.has("utm_source")===!0&&(o(ql(t)),w!=null&&(pe.trackCockpitHealthMonitorNotificationAlertClicked(r.get("utm_source"),{companyId:w.companyInfo.companyId,companyName:w.companyInfo.name,churnProbability:w.companyHealthMetric.churnProbabilityPercentage??null}),l(r.has("utm_source")),r.delete("utm_source"),s(r)))},[h.fetchState,w?.companyInfo.companyId,w?.companyInfo.name]),be.getSignedInUser()==null)throw Error("Can't access Health Monitor page without signing in...");return D.jsxs(D.Fragment,{children:[e===!0||p!=null&&w!=null?D.jsx(qr,{anchor:"right",open:p!=null,PaperProps:{style:{width:Qd.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>o(Ca()),children:D.jsx(hd,{roomId:`cockpit_${p}`,autoConnect:!0,children:D.jsx(dd,{onSaveClick:()=>{p!=null&&o(eh(p))},onSaveChangesToLocalStore:b=>{h.selectedCompanyId!=null&&o(Qf({companyId:h.selectedCompanyId,updatedLocalData:b}))},localData:y?.companyHealthMetricLocalData??{netPromoterScore:void 0,externalProductServiceExposure:void 0,additionalChurnFactors:{increasingChurnProbability:[],decreasingChurnProbability:[]}},companyHealthMetricViewSelector:h,onCloseDrawer:()=>o(Ca()),analytics:pe,urlSource:d,additionalChurnFactorsOptions:c})})}):null,D.jsx(rp,{healthView:h,managementView:f,navigate:n,mixpanelHMUrl:kr.mixpanelHMUrl})]})}const Ql=(e,n)=>{const o=[...e??[]];return o.push(n),o},np=e=>{const n=[...e??[]];return{poppedPathname:n.pop(),newStack:n}},ip=(e=2)=>{let n="../";for(let o=0;o<e;o++)n=`${n}../`;return n},le=({state:e,element:n})=>be.isSignedIn()===!0?D.jsx(D.Fragment,{children:n}):D.jsx(Ct,{to:"/signin/auth",replace:!0,state:{...e,message:"...",origin:window.location.pathname}});function op(){return D.jsxs(Ve,{children:[D.jsx(se,{path:"/companies/:companyId",element:D.jsx(le,{element:D.jsx(Yr,{isDrawerOpen:!0})})}),D.jsx(se,{path:"/",element:D.jsx(le,{element:D.jsx(Yr,{})})}),D.jsx(se,{path:"/*",element:D.jsx(le,{element:D.jsx(Yr,{})})})]})}const ap={drawerLeftMargin:new Pe(0,0,240)};function $t(e){const{isOpen:n,drawerLeftMargin:o,children:a,onClose:i}=e,t=Lr(),r=o?.valuePx(t)??ap.drawerLeftMargin.valuePx(t),s=dt();return D.jsx(qr,{anchor:"right",open:n,PaperProps:{style:{width:`calc(100% - ${r})`}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.8,cursor:"pointer"}}},onClose:i,children:a})}const sp=({fetchState:e})=>e==="In-Progress"||e==="Not-Started"?D.jsx(up,{children:D.jsx(Dr,{size:"ExtraLarge",start:!0})}):null,up=Ie.div`
2
2
  display: flex;
3
3
  width: 100%;
4
4
  height: 100%;