@zeniai/web-app-ui 5.0.22-qa → 5.0.23-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/dist/assets/AddressRoutes-B96ZjQE1.js +1 -0
  2. package/dist/assets/AddressScreen-CYHsPgWj.js +9 -0
  3. package/dist/assets/AiCfoScreen-CkfzDWkE.js +11 -0
  4. package/dist/assets/{BillPayApprovalRoutes-BS_D0je9.js → BillPayApprovalRoutes-BY148MnK.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-CJuUX28E.js → BillPayRoutes-JAVl8Bkx.js} +8 -8
  6. package/dist/assets/{BusinessVerificationPageScreen-Ct3CJnEw.js → BusinessVerificationPageScreen-DdszsNUv.js} +1 -1
  7. package/dist/assets/{ChargeCardRoutes-D_xq2_5H.js → ChargeCardRoutes-BrqQVoDm.js} +8 -8
  8. package/dist/assets/CompanyPassportScreen-BUb3f5UY.js +1 -0
  9. package/dist/assets/ConnectionAuthScreen-MbA9Adhr.js +11 -0
  10. package/dist/assets/CustomerOnboardingAuthScreen-B6jDr66v.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-C8OrkodX.js → CustomerOnboardingRoutes-BPkGIbkQ.js} +4 -4
  12. package/dist/assets/DashboardRoutes-Do4ciljo.js +20 -0
  13. package/dist/assets/{DefaultTenantHome-xuRYKgB0.js → DefaultTenantHome-DLzgvz7E.js} +1 -1
  14. package/dist/assets/{DomesticWireDetailScreen-Ca6CaUgR.js → DomesticWireDetailScreen-Ddx0pXf8.js} +3 -3
  15. package/dist/assets/{DrawerScreen-C1N2vxzH.js → DrawerScreen-BjiSvp6m.js} +1 -1
  16. package/dist/assets/EntityDetailRoutes-YJz3l1_v.js +1 -0
  17. package/dist/assets/{ExpenseAutomationRoutes-CnueZmCh.js → ExpenseAutomationRoutes-DAizWDSO.js} +3 -3
  18. package/dist/assets/FeaturePreviewScreen-DJS-jmsS.js +1 -0
  19. package/dist/assets/MagicLinkRoutes-BnqhUMu3.js +72 -0
  20. package/dist/assets/MagicLinkSignInScreen-DiHnsMcC.js +12 -0
  21. package/dist/assets/MobileAppDrawer-K2exKYWR.js +1 -0
  22. package/dist/assets/NotFoundScreen-B0Nlm2gz.js +1 -0
  23. package/dist/assets/{NotificationRoutes-BD0OYkg7.js → NotificationRoutes-DajFEZK6.js} +1 -1
  24. package/dist/assets/{PandLWithForecastRoutes-XYkyX6Zd.js → PandLWithForecastRoutes-BlDGUcvE.js} +1 -1
  25. package/dist/assets/{PeopleRoutes-D1WRsJRH.js → PeopleRoutes-D2zxBXMD.js} +9 -9
  26. package/dist/assets/PerformanceRoutes-u0NqtXN2.js +1 -0
  27. package/dist/assets/{Preview-DQaLRQjm.js → Preview-C3YwU0I2.js} +1 -1
  28. package/dist/assets/{QBOConnectionScreen-DuZo1yzm.js → QBOConnectionScreen-CE9eE6PV.js} +1 -1
  29. package/dist/assets/ReferralListScreen-B4-hegsc.js +5 -0
  30. package/dist/assets/ReimbursementApprovalRoutes-BhF99olM.js +1 -0
  31. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-B5d9VJOs.js → ReimbursementApprovalRuleDetailScreen--OohA-qM.js} +1 -1
  32. package/dist/assets/{ReimbursementRoutes-NrYMBi1J.js → ReimbursementRoutes-DX3xO4CI.js} +4 -4
  33. package/dist/assets/{ReportsRoutes-iQbBEqit.js → ReportsRoutes-B1A24iUD.js} +1 -1
  34. package/dist/assets/RewardsRoutes-tRIxQxZU.js +1 -0
  35. package/dist/assets/{ScreenRoutes-C6aVSF4T.js → ScreenRoutes-Or9C15VM.js} +2 -2
  36. package/dist/assets/{SettingsRoutes-DdJgAtqN.js → SettingsRoutes-D318tl7x.js} +4 -4
  37. package/dist/assets/{SetupPagesScreen-CT-3H_u9.js → SetupPagesScreen-CN2fXuK5.js} +1 -1
  38. package/dist/assets/{SignInScreen-BLhSO9X9.js → SignInScreen-Ii8USKVp.js} +1 -1
  39. package/dist/assets/SignOutScreen-lcNon_h7.js +9 -0
  40. package/dist/assets/{TaskListScreen-CQhH6Qhp.js → TaskListScreen-CCKt-Z8A.js} +2 -2
  41. package/dist/assets/TaskRoutes-D0Rf5ZIQ.js +9 -0
  42. package/dist/assets/TransactionDetailRoutes-BXI22-o4.js +1 -0
  43. package/dist/assets/{TransactionDetailScreen-D4rokNI1.js → TransactionDetailScreen-CspxK2Wp.js} +2 -2
  44. package/dist/assets/{TransactionListRoutes-WmX0p3n5.js → TransactionListRoutes-CNmz8hjL.js} +1 -1
  45. package/dist/assets/{TreasuryRoutes-E8ubjS7Q.js → TreasuryRoutes-jzRjehDq.js} +6 -6
  46. package/dist/assets/{VendorsRoutes-B7y1YfME.js → VendorsRoutes-2Jnog0dl.js} +1 -1
  47. package/dist/assets/WiseConfirmationScreen-CJOwjsow.js +12 -0
  48. package/dist/assets/ZeniAccountRoutes-BkOn-UZP.js +66 -0
  49. package/dist/assets/ZeniAccountStatementScreen-DWrx5fNs.js +9 -0
  50. package/dist/assets/{accountMappingHelper-DpblOBXy.js → accountMappingHelper-CJzGKxCi.js} +1 -1
  51. package/dist/assets/{analytics-BSnG8C1z.js → analytics-B8BYlogo.js} +1 -1
  52. package/dist/assets/{analyticsHelper-DkI5fHpv.js → analyticsHelper-xd4lZWd7.js} +1 -1
  53. package/dist/assets/{core-BF8mCLAO.js → core-C_FlMzhB.js} +1 -1
  54. package/dist/assets/{decodeURIComponentSafe-BogCAdat.js → decodeURIComponentSafe-Bq-dYOxp.js} +1 -1
  55. package/dist/assets/{dnd-BwvUecBQ.js → dnd-CTZ8xt4P.js} +1 -1
  56. package/dist/assets/{empty-CH1gmPwH.js → empty-8tyTORBQ.js} +1 -1
  57. package/dist/assets/{empty-DhgRx5Ms.js → empty-Ba3wQ_0C.js} +1 -1
  58. package/dist/assets/{emptyVideoElement-CIPD7QoK.js → emptyVideoElement-CMq3v722.js} +1 -1
  59. package/dist/assets/{epic-CBSMbAdJ.js → epic-DcM6ZH0h.js} +1 -1
  60. package/dist/assets/getLocaleForTenant-VyeT67nF.js +1 -0
  61. package/dist/assets/{index-Bv4UcPLE.js → index-6WoOptp-.js} +2 -2
  62. package/dist/assets/{index-Cuo-3WZY.js → index-8DvIGOR_.js} +1 -1
  63. package/dist/assets/{index-DzmJ6hZq.js → index-BU1P3OoO.js} +1 -1
  64. package/dist/assets/{index-DxU2jKyi.js → index-C2TFXiJV.js} +1 -1
  65. package/dist/assets/{index-BjHWZg4v.js → index-DKffoxhZ.js} +1 -1
  66. package/dist/assets/{index-C-wmbsLK.js → index-DlR0ZNoW.js} +1 -1
  67. package/dist/assets/{index-NPabbksF.js → index-EyQIQQea.js} +11764 -11578
  68. package/dist/assets/{lexical-BHRXj1_E.js → lexical-BmFHbDfb.js} +1 -1
  69. package/dist/assets/{liveblocks-it_Rhm8-.js → liveblocks-DXiLz49w.js} +1 -1
  70. package/dist/assets/{lottie-CJdx3HBv.js → lottie-Bi_BmPss.js} +1 -1
  71. package/dist/assets/{mui-B87RTrAV.js → mui-D4wswOer.js} +1 -1
  72. package/dist/assets/{pathToGoBack-_pwiC6EH.js → pathToGoBack-D9SmrC7Q.js} +1 -1
  73. package/dist/assets/{pdf-oE7nS36B.js → pdf-BUMfUQyN.js} +3 -3
  74. package/dist/assets/{pdf-lib-BX9OJ6Nl.js → pdf-lib-BiL5LzBn.js} +1 -1
  75. package/dist/assets/{plaid-lXH1vlKo.js → plaid-CknlBCWN.js} +1 -1
  76. package/dist/assets/{pusher-BuqNN16A.js → pusher-919nhfWF.js} +1 -1
  77. package/dist/assets/{react-BqI_r-ls.js → react-BegT7c31.js} +1 -1
  78. package/dist/assets/{react-K11bZKBw.js → react-CO9qvT1d.js} +1 -1
  79. package/dist/assets/{react-BPb4kZZA.js → react-CxtHJFJc.js} +1 -1
  80. package/dist/assets/{react-fYlmVc1c.js → react-DORUVTyV.js} +1 -1
  81. package/dist/assets/{react-DcdwnIrk.js → react-OYc9lUHZ.js} +1 -1
  82. package/dist/assets/{react-Z36nuoKZ.js → react-tG70id2q.js} +1 -1
  83. package/dist/assets/{recharts-BBMAmq_A.js → recharts-BjJxsXby.js} +1 -1
  84. package/dist/assets/{routePaths-DuYx1box.js → routePaths-ByBdv6j2.js} +1 -1
  85. package/dist/assets/{sentry-C-hGmJ4T.js → sentry-C8WyuRaf.js} +1 -1
  86. package/dist/assets/{url-0lwNJByp.js → url-CK7SN0RL.js} +1 -1
  87. package/dist/assets/{url-DTsNJhPz.js → url-rqOciRjJ.js} +1 -1
  88. package/dist/assets/useAskAiCfoHostNavButtonProps-B_w7SPaL.js +1 -0
  89. package/dist/assets/{useDeviceId-CGZ6TLY7.js → useDeviceId-DFIMsX1U.js} +1 -1
  90. package/dist/assets/useFetchSuggestedQuestionsWhenReady-CIJpTQVz.js +1 -0
  91. package/dist/assets/{useInitialThreadRequest-D34WQTSQ.js → useInitialThreadRequest-BDtsBfLB.js} +1 -1
  92. package/dist/assets/{utils-C4NhxqJn.js → utils-l6Jt_9tl.js} +1 -1
  93. package/dist/assets/{withTransactionSidePanel-Bz9MapFR.js → withTransactionSidePanel-DyPNd8eG.js} +3 -3
  94. package/dist/assets/{zeni-epic-state-Ds1G4QGX.js → zeni-epic-state-BP6Uj047.js} +5 -5
  95. package/dist/index.html +1 -1
  96. package/package.json +3 -3
  97. package/dist/assets/AddressRoutes-DO2AMO4C.js +0 -1
  98. package/dist/assets/AddressScreen-TNOlKW9-.js +0 -9
  99. package/dist/assets/AiCfoScreen-rcLklXCc.js +0 -11
  100. package/dist/assets/CompanyPassportScreen-DKFPDRmC.js +0 -1
  101. package/dist/assets/ConnectionAuthScreen-D-2Rr6lB.js +0 -11
  102. package/dist/assets/CustomerOnboardingAuthScreen-clFIvqKE.js +0 -1
  103. package/dist/assets/DashboardRoutes-CjS7HJYX.js +0 -20
  104. package/dist/assets/EntityDetailRoutes-EMHOSBah.js +0 -1
  105. package/dist/assets/FeaturePreviewScreen-DFD5zg_r.js +0 -1
  106. package/dist/assets/MagicLinkRoutes-DBNJfJLb.js +0 -72
  107. package/dist/assets/MagicLinkSignInScreen-CwJKRjV0.js +0 -12
  108. package/dist/assets/MobileAppDrawer-voD2LpO-.js +0 -1
  109. package/dist/assets/NotFoundScreen-Cryu2QFy.js +0 -1
  110. package/dist/assets/PerformanceRoutes-DOMszLDU.js +0 -1
  111. package/dist/assets/ReferralListScreen-BTF2hmjO.js +0 -5
  112. package/dist/assets/ReimbursementApprovalRoutes-WG3WahZX.js +0 -1
  113. package/dist/assets/RewardsRoutes-CJcbxkYG.js +0 -1
  114. package/dist/assets/SignOutScreen-CYSC9fTl.js +0 -9
  115. package/dist/assets/TaskRoutes-Ba2ZPNgS.js +0 -9
  116. package/dist/assets/TransactionDetailRoutes-BQ0pIg0n.js +0 -1
  117. package/dist/assets/WiseConfirmationScreen-ByuVB3n7.js +0 -12
  118. package/dist/assets/ZeniAccountRoutes-BlNqWDSd.js +0 -66
  119. package/dist/assets/ZeniAccountStatementScreen-Bl764lap.js +0 -9
  120. package/dist/assets/getLocaleForTenant-CdAyQ18u.js +0 -1
  121. package/dist/assets/useAskAiCfoHostNavButtonProps-BTitwH51.js +0 -1
  122. package/dist/assets/useFetchSuggestedQuestionsWhenReady-Dv4iLJ0Q.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as k}from"./liveblocks-it_Rhm8-.js";import{a as m}from"./sentry-C-hGmJ4T.js";import{j,h as N,u as R,g as G,l as $,k as v}from"./core-BF8mCLAO.js";import{H as O,z as K,s as M,d as U,v as _,e as z,g as V,cB as W,n as f,p as q}from"./index-NPabbksF.js";import{eM as H,Pk as L,Fo as y,Pl as w,Pg as J,EP as S,Pm as Q,ET as I,Es as X,Fp as b,Pn as B,gy as Y,Fe as Z,Fj as aa,F6 as ta,F4 as ea,Fk as sa,F1 as oa,Po as na,Pp as ia,Pq as la,Pr as d,e8 as ra,Ps as ca,Pt as pa}from"./zeni-epic-state-Ds1G4QGX.js";import{n as ka}from"./mui-B87RTrAV.js";import{u as da}from"./useAskAiCfoHostNavButtonProps-BTitwH51.js";import{c as ua}from"./useFetchSuggestedQuestionsWhenReady-Dv4iLJ0Q.js";import{M as ma}from"./MobileAppDrawer-voD2LpO-.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="febde9aa-6dbf-41a6-b8b7-ced36f53ad8a",t._sentryDebugIdIdentifier="sentry-dbid-febde9aa-6dbf-41a6-b8b7-ced36f53ad8a")}catch{}})();const fa=ka.div`
1
+ import{j as k}from"./liveblocks-DXiLz49w.js";import{a as m}from"./sentry-C8WyuRaf.js";import{j,h as N,u as R,g as G,l as $,k as v}from"./core-C_FlMzhB.js";import{I as O,z as K,s as M,c as U,v as _,d as q,f as z,cE as V,r as f,q as W}from"./index-EyQIQQea.js";import{eM as H,Pk as L,Fo as y,Pl as w,Pg as J,EP as I,Pm as Q,ET as S,Es as X,Fp as b,Pn as B,gy as Y,Fe as Z,Fj as aa,F6 as ta,F4 as ea,Fk as sa,F1 as oa,Po as na,Pp as ia,Pq as la,Pr as u,e8 as ra,Ps as ca,Pt as pa}from"./zeni-epic-state-BP6Uj047.js";import{n as ka}from"./mui-D4wswOer.js";import{u as ua}from"./useAskAiCfoHostNavButtonProps-B_w7SPaL.js";import{c as da}from"./useFetchSuggestedQuestionsWhenReady-CIJpTQVz.js";import{M as ma}from"./MobileAppDrawer-K2exKYWR.js";import"./recharts-BjJxsXby.js";import"./analytics-B8BYlogo.js";import"./plaid-CknlBCWN.js";import"./dnd-CTZ8xt4P.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bi_BmPss.js";import"./lexical-BmFHbDfb.js";import"./pdf-BUMfUQyN.js";import"./utils-l6Jt_9tl.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="c0fa5434-40f3-4cd8-9ce7-12b7f49ff2ae",t._sentryDebugIdIdentifier="sentry-dbid-c0fa5434-40f3-4cd8-9ce7-12b7f49ff2ae")}catch{}})();const fa=ka.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,4 +6,4 @@ import{j as k}from"./liveblocks-it_Rhm8-.js";import{a as m}from"./sentry-C-hGmJ4
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${t=>t.theme.colors.grey4};
9
- `,Ta=v(function(t,e){const o=L(t,e.isTaskTemplatesEnabled),{taskGroupId:i}=e,n=i!=null&&i!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(r=>r.taskGroupIds.includes(i))})).filter(l=>l.tasks.length>0)}:o;return{taskListView:n,tagListView:J(t),localData:n.localData,isTaskTemplatesEnabled:e.isTaskTemplatesEnabled}},function(t,e){const{navigate:o,currentTenant:i,location:n,isTaskTemplatesEnabled:l}=e,{tenantEmailDomain:r}=i,{groupByKey:T}=e.uiState;return{onTaskManagementRowClick:a=>{const s=ga(r,a),p=f(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:p}})},onReloadTasks:()=>{t(y(!0,l))},onNewTaskClick:()=>{if(e.localData.defaultTaskGroupId!=null){const a=C(r,e.localData.defaultTaskGroupId),s=f(n.state?.pathnameStackToGoBack,n.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{t(B({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{t(la({filters:a}))},onSearchTextChanged:a=>{t(ia({searchText:a}))},onReloadCards:()=>{t(y(!0,l))},onBackClick:()=>{if(n.state?.message==="triggerBackClick"){const a=q(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{t(na({localData:a}))},resetLocalData:()=>{t(w({taskGroupById:e.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{t(oa(e.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{t(ea(e.localData.selectedTaskIds,a,sa(e.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{t(ta(a))},onAddNewTaskToTaskGroup:a=>{if(e.localData.defaultTaskGroupId!=null){const s=ha(T,a);t(S({taskDetailLocalData:s}));const p=C(r,e.uiState.groupByKey==="groupName"?a:e.localData.defaultTaskGroupId),g=f(n.state?.pathnameStackToGoBack,n.pathname);o(p,{state:{pathnameStackToGoBack:g,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{t(aa(e.localData.selectedTaskIds.length>0?e.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{t(Z(a,s))},onTimeSpentUpdate:(a,s)=>{t(b({task:a,updates:s}))},onShowToast:a=>{t(Y(a))},onGroupByFilterChange:a=>{t(B({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{t(b({task:a,updates:s}))},onCreateTagClick:(a,s)=>{t(X(a,s))},handleGroupTemplateClick:a=>{t(I(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{t(I(a,[s]))},handleNewTaskInitialization:a=>{if(t(S({taskDetailLocalData:{...Q,name:a}})),e.localData.defaultTaskGroupId!=null){const s=C(r,e.localData.defaultTaskGroupId),p=f(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:p,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${r}/tasks/group/${a}`)}}})(W);function $a(){const{isAiCfoOpen:t,setIsAiCfoOpen:e}=O(),o=j(),i=N(),n=R(),l=K.getSignedInUser(),r=G(c=>H(c)),{taskGroupId:T}=$(),{useFeatureGate:a}=M(),{isFeatureEnabled:s}=a(U.isTaskTemplatesEnabled),[p,g]=m.useState(!1),[E,P]=m.useState(!1),h=G(c=>L(c,s)),D=G(c=>c.taskGroupState),u=h.fetchState,{isAiCfoAccessEnabled:F,onAskAiCfoClick:A}=da({isAiCfoOpen:t,setIsAiCfoOpen:e,mobileExploreReferrer:"Task Checklist"});if(ua({isDataReady:u==="Completed"}),m.useEffect(()=>{p||(g(!0),i(y(!1,s)))},[p,i]),m.useEffect(()=>{u==="Completed"&&i(w({taskGroupById:D.taskGroupById}))},[u,D.taskGroupById]),l==null)throw Error("Can't access task list page without signing in...");return k.jsxs(k.Fragment,{children:[u==="Completed"?k.jsx(_,{analytics:z,onLoad:c=>(x=>x.trackPageLoaded(V.Event.taskListPage))(c)}):null,k.jsxs(fa,{children:[k.jsx(ma,{isAppContentDrawerOpen:E,handleDrawerToggle:c=>{P(c)}}),k.jsx(Ta,{location:n,navigate:o,currentTenant:r,taskGroupId:T,taskGroupState:D,localData:h.localData,uiState:h.uiState,isTaskTemplatesEnabled:s,taskListFetchState:u,isAiCfoAccessEnabled:F,onAskAiCfoClick:A})]})]})}const ga=(t,e)=>`/${t}/tasks/${encodeURIComponent(e)}`,C=(t,e)=>`/${t}/tasks/new/${e}`,ha=(t,e)=>{if(t==="assignee"){const o=e.split(",");return{...d.taskDetailLocalData,assignee:o}}if(t==="priority"){const o=ra(e);return{...d.taskDetailLocalData,priority:o}}if(t==="status"){const o=ca(e);return{...d.taskDetailLocalData,status:o}}if(t==="tag"){const o=e.split(",");return{...d.taskDetailLocalData,tagIds:o}}if(t==="dueDate"){const o=pa(e);return{...d.taskDetailLocalData,dueDate:o}}return{...d.taskDetailLocalData}};export{$a as default};
9
+ `,Ta=v(function(t,e){const o=L(t,e.isTaskTemplatesEnabled),{taskGroupId:i}=e,n=i!=null&&i!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(r=>r.taskGroupIds.includes(i))})).filter(l=>l.tasks.length>0)}:o;return{taskListView:n,tagListView:J(t),localData:n.localData,isTaskTemplatesEnabled:e.isTaskTemplatesEnabled}},function(t,e){const{navigate:o,currentTenant:i,location:n,isTaskTemplatesEnabled:l}=e,{tenantEmailDomain:r}=i,{groupByKey:T}=e.uiState;return{onTaskManagementRowClick:a=>{const s=ga(r,a),p=f(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:p}})},onReloadTasks:()=>{t(y(!0,l))},onNewTaskClick:()=>{if(e.localData.defaultTaskGroupId!=null){const a=C(r,e.localData.defaultTaskGroupId),s=f(n.state?.pathnameStackToGoBack,n.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{t(B({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{t(la({filters:a}))},onSearchTextChanged:a=>{t(ia({searchText:a}))},onReloadCards:()=>{t(y(!0,l))},onBackClick:()=>{if(n.state?.message==="triggerBackClick"){const a=W(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{t(na({localData:a}))},resetLocalData:()=>{t(w({taskGroupById:e.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{t(oa(e.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{t(ea(e.localData.selectedTaskIds,a,sa(e.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{t(ta(a))},onAddNewTaskToTaskGroup:a=>{if(e.localData.defaultTaskGroupId!=null){const s=ha(T,a);t(I({taskDetailLocalData:s}));const p=C(r,e.uiState.groupByKey==="groupName"?a:e.localData.defaultTaskGroupId),g=f(n.state?.pathnameStackToGoBack,n.pathname);o(p,{state:{pathnameStackToGoBack:g,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{t(aa(e.localData.selectedTaskIds.length>0?e.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{t(Z(a,s))},onTimeSpentUpdate:(a,s)=>{t(b({task:a,updates:s}))},onShowToast:a=>{t(Y(a))},onGroupByFilterChange:a=>{t(B({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{t(b({task:a,updates:s}))},onCreateTagClick:(a,s)=>{t(X(a,s))},handleGroupTemplateClick:a=>{t(S(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{t(S(a,[s]))},handleNewTaskInitialization:a=>{if(t(I({taskDetailLocalData:{...Q,name:a}})),e.localData.defaultTaskGroupId!=null){const s=C(r,e.localData.defaultTaskGroupId),p=f(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:p,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${r}/tasks/group/${a}`)}}})(V);function $a(){const{isAiCfoOpen:t,setIsAiCfoOpen:e}=O(),o=j(),i=N(),n=R(),l=K.getSignedInUser(),r=G(c=>H(c)),{taskGroupId:T}=$(),{useFeatureGate:a}=M(),{isFeatureEnabled:s}=a(U.isTaskTemplatesEnabled),[p,g]=m.useState(!1),[E,P]=m.useState(!1),h=G(c=>L(c,s)),D=G(c=>c.taskGroupState),d=h.fetchState,{isAiCfoAccessEnabled:F,onAskAiCfoClick:A}=ua({isAiCfoOpen:t,setIsAiCfoOpen:e,mobileExploreReferrer:"Task Checklist"});if(da({isDataReady:d==="Completed"}),m.useEffect(()=>{p||(g(!0),i(y(!1,s)))},[p,i]),m.useEffect(()=>{d==="Completed"&&i(w({taskGroupById:D.taskGroupById}))},[d,D.taskGroupById]),l==null)throw Error("Can't access task list page without signing in...");return k.jsxs(k.Fragment,{children:[d==="Completed"?k.jsx(_,{analytics:q,onLoad:c=>(x=>x.trackPageLoaded(z.Event.taskListPage))(c)}):null,k.jsxs(fa,{children:[k.jsx(ma,{isAppContentDrawerOpen:E,handleDrawerToggle:c=>{P(c)}}),k.jsx(Ta,{location:n,navigate:o,currentTenant:r,taskGroupId:T,taskGroupState:D,localData:h.localData,uiState:h.uiState,isTaskTemplatesEnabled:s,taskListFetchState:d,isAiCfoAccessEnabled:F,onAskAiCfoClick:A})]})]})}const ga=(t,e)=>`/${t}/tasks/${encodeURIComponent(e)}`,C=(t,e)=>`/${t}/tasks/new/${e}`,ha=(t,e)=>{if(t==="assignee"){const o=e.split(",");return{...u.taskDetailLocalData,assignee:o}}if(t==="priority"){const o=ra(e);return{...u.taskDetailLocalData,priority:o}}if(t==="status"){const o=ca(e);return{...u.taskDetailLocalData,status:o}}if(t==="tag"){const o=e.split(",");return{...u.taskDetailLocalData,tagIds:o}}if(t==="dueDate"){const o=pa(e);return{...u.taskDetailLocalData,dueDate:o}}return{...u.taskDetailLocalData}};export{$a as default};
@@ -0,0 +1,9 @@
1
+ import{j as s}from"./liveblocks-DXiLz49w.js";import z from"./NotFoundScreen-B0Nlm2gz.js";import{a as m}from"./sentry-C8WyuRaf.js";import{j as A,h as M,u as $,l as q,g as k,N as V,k as _,n as O,o as u}from"./core-C_FlMzhB.js";import{E as R,z as w,r as C,v as Q,d as T,f as W,cD as H,j as Z,ao as J,q as K}from"./index-EyQIQQea.js";import{eM as b,Pg as G,EL as v,Ez as X,Fb as Y,Ph as P,Pi as aa,Ev as ea,Es as ta,pA as sa,po as na,jW as oa,EF as ia,Pj as ra,EC as la,EQ as ca,EP as da}from"./zeni-epic-state-BP6Uj047.js";import{n as ma}from"./mui-D4wswOer.js";import{u as pa}from"./useInitialThreadRequest-BDtsBfLB.js";import{M as ua}from"./MobileAppDrawer-K2exKYWR.js";import fa from"./TaskListScreen-CCKt-Z8A.js";import"./recharts-BjJxsXby.js";import"./analytics-B8BYlogo.js";import"./plaid-CknlBCWN.js";import"./dnd-CTZ8xt4P.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bi_BmPss.js";import"./lexical-BmFHbDfb.js";import"./pdf-BUMfUQyN.js";import"./utils-l6Jt_9tl.js";import"./useAskAiCfoHostNavButtonProps-B_w7SPaL.js";import"./useFetchSuggestedQuestionsWhenReady-CIJpTQVz.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="536d80bd-1aa2-4d58-81c1-a96ff49fa3e9",a._sentryDebugIdIdentifier="sentry-dbid-536d80bd-1aa2-4d58-81c1-a96ff49fa3e9")}catch{}})();const ka=_(function(a,t){const{location:n,taskGroupId:l}=t,d=P(a,t.taskId),c=b(a),i=l!=null?aa(a.taskGroupState,l):void 0,p=w.getSignedInUser(),e=c.tenantId,r={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:e??""},f=G(a);return{taskDetailSelectorView:d,authParams:r,isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:J.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${Z.appUrl}${t.location.pathname}`,tagListView:f,taskGroupName:l!=null&&i!=null&&i.isDefault===!1?i.name:void 0}},function(a,t){const{taskId:n,navigate:l,currentTenant:d,location:c,taskGroupId:i}=t,{tenantEmailDomain:p}=d;return{onSaveChangesToLocalStore:e=>{a(da({taskDetailLocalData:e,taskId:n}))},onSaveDetailClick:()=>{a(ca(n,i))},onArchiveTaskClick:()=>{t.taskId!=null&&a(la(t.taskId))},onDismissClick:()=>{if(c.state?.message==="triggerBackClick"){const e=K(c.state?.pathnameStackToGoBack),r=e.poppedPathname??"../../dashboard";l(r,{state:{pathnameStackToGoBack:e.newStack}})}else{const e=B(p),r=C(c.state?.pathnameStackToGoBack,c.pathname);l(e,{state:{pathnameStackToGoBack:r}})}a(ra({taskId:n}))},onDeleteTaskClick:()=>{a(ia(n))},updateFilesEntity:e=>{a(oa({files:e}))},onDeleteFile:e=>{a(na(e))},onEditFileName:(e,r)=>{a(sa(e,r.split(".")[0]))},onReloadTaskDetailPage:()=>{a(v(!1,n))},onCreateTagClick:e=>{a(ta(e,n))},onDeleteTagClick:e=>{a(ea(e,n))}}})(H);function I(){const a=A(),t=M(),n=$(),l=R(),{taskId:d,taskGroupId:c}=q(),i=k(o=>b(o)),p=pa(i?.companyId),[e,r]=m.useState(!1),[f,F]=m.useState(!1),[S,L]=m.useState(!1),[j,N]=m.useState(!1),x=k(o=>G(o)),y=k(o=>o.taskGroupViewState.fetchState);m.useEffect(()=>{f||(F(!0),t(v(!1,d)))},[f,t]),m.useEffect(()=>{S||x.fetchState==="Completed"||(L(!0),t(X()))},[S,t,x.fetchState]),m.useEffect(()=>{j||y==="Completed"||(N(!0),t(Y()))},[j,t,y]);const D=k(o=>P(o,d)),g=D.fetchState,E=w.getSignedInUser();if(E==null)throw Error("Can't access task detail page without signing in...");if(g==="Error"&&D.error?.code===400){const{tenantEmailDomain:o}=i,h=B(o),U=C(n.state?.pathnameStackToGoBack,n.pathname);return s.jsx(V,{to:h,state:{pathnameStackToGoBack:U}})}return s.jsxs(s.Fragment,{children:[g==="Completed"?s.jsx(Q,{analytics:T,onLoad:o=>(h=>h.trackPageLoaded(W.Event.taskDetailPage))(o)}):null,s.jsxs(ga,{children:[s.jsx(ua,{isAppContentDrawerOpen:e,handleDrawerToggle:o=>{r(o)}}),s.jsx(ka,{analytics:T,currentTenant:i,handleZeniLogoClick:()=>{l.toggle()},initialOpenThreadRequest:p,location:n,loggedInUser:E,navigate:a,taskGroupId:c,taskId:d,taskDetailFetchState:g})]})]})}const ga=ma.div`
2
+ display: flex;
3
+ min-height: 100%;
4
+ width: 100%;
5
+ flex: 1 1 auto;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ background-color: ${a=>a.theme.colors.grey4};
9
+ `,B=a=>`/${a}/tasks`;function Aa(){return s.jsxs(O,{children:[s.jsx(u,{path:"/new",element:s.jsx(I,{})}),s.jsx(u,{path:"/new/:taskGroupId",element:s.jsx(I,{})}),s.jsx(u,{path:"/group/:taskGroupId",element:s.jsx(fa,{})}),s.jsx(u,{path:"/:taskId",element:s.jsx(I,{})}),s.jsx(u,{path:"*",element:s.jsx(z,{})})]})}export{Aa as default};
@@ -0,0 +1 @@
1
+ import{j as t}from"./liveblocks-DXiLz49w.js";import i from"./NotFoundScreen-B0Nlm2gz.js";import{T as r}from"./TransactionDetailScreen-CspxK2Wp.js";import"./sentry-C8WyuRaf.js";import{n as d,o as e}from"./core-C_FlMzhB.js";import"./zeni-epic-state-BP6Uj047.js";import"./recharts-BjJxsXby.js";import"./index-EyQIQQea.js";import"./mui-D4wswOer.js";import"./analytics-B8BYlogo.js";import"./plaid-CknlBCWN.js";import"./dnd-CTZ8xt4P.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bi_BmPss.js";import"./lexical-BmFHbDfb.js";import"./pdf-BUMfUQyN.js";import"./utils-l6Jt_9tl.js";import"./useAskAiCfoHostNavButtonProps-B_w7SPaL.js";import"./useFetchSuggestedQuestionsWhenReady-CIJpTQVz.js";import"./decodeURIComponentSafe-Bq-dYOxp.js";import"./routePaths-ByBdv6j2.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new o.Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="256f287b-7a3d-4d6d-890e-a8cb9db8b86d",o._sentryDebugIdIdentifier="sentry-dbid-256f287b-7a3d-4d6d-890e-a8cb9db8b86d")}catch{}})();function q(){return t.jsxs(d,{children:[t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(e,{path:"/*",element:t.jsx(r,{})})]})}export{q as default};
@@ -1,5 +1,5 @@
1
- import{j as I}from"./liveblocks-it_Rhm8-.js";import{a as d}from"./sentry-C-hGmJ4T.js";import{h as K,g as S,u as re,j as le,l as de,N as Ke,k as je}from"./core-BF8mCLAO.js";import{bm as Me,eM as W,cM as ue,bu as me,pf as H,Jn as B,Ko as pe,Kp as Y,JN as he,jx as fe,Kq as ge,JS as Q,JT as X,km as Se,Gv as Z,Jh as _,jr as Te,jp as ye,jB as $e,Kr as Je,Ks as qe,t4 as G,jw as ve,FS as Ee,cS as We,cT as He,Kt as Ye,Jg as Qe,Ku as Xe,t8 as Ze,Kv as ea,Kw as aa,Kx as ta,Ky as na,Kz as oa,jA as sa,KA as ia,KB as ca,Ji as ra,KC as la,KD as da,KE as ua,FM as ma,FA as pa,G2 as ha,jC as fa,Gw as ie,FJ as ga}from"./zeni-epic-state-Ds1G4QGX.js";import{z as Ce,s as ee,d as V,aI as De,h as Sa,K as Ta,aJ as ya,A as va,p as J,S as Ea,aK as Ca,n as q,H as Da,e as be,aL as ba,ao as Ia,Q as $}from"./index-NPabbksF.js";import{n as ka,S as Aa,D as Ua}from"./mui-B87RTrAV.js";import{u as xa}from"./useAskAiCfoHostNavButtonProps-BTitwH51.js";import{c as _a}from"./useFetchSuggestedQuestionsWhenReady-Dv4iLJ0Q.js";import{d as Ie}from"./decodeURIComponentSafe-BogCAdat.js";import{h as ke,g as Va,d as wa,b as Fa}from"./routePaths-DuYx1box.js";import{t as Ba}from"./utils-C4NhxqJn.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="f02c6455-7166-4658-b50a-22568c0f18ab",a._sentryDebugIdIdentifier="sentry-dbid-f02c6455-7166-4658-b50a-22568c0f18ab")}catch{}})();const ae=()=>{const a=Ce.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(V.isChainOfThoughtEnabled);return d.useMemo(()=>Me(a)&&s,[a,s])};function Ae(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Za(a,e){const s=K(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>W(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:T}=t(V.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:b}=t(V.isExpenseAutomationEnabled),{configValue:h}=n(De.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,k=ae(),y=d.useMemo(()=>({id:a,type:H(e)}),[a,e]),m=S(u=>B(u,y)),D=S(u=>{const N=B(u,y)?.transactionDetailLocalData.vendorUpdates?.id;return N==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[N]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Ae(m?.transaction):void 0,[m?.fetchState,m?.transaction]),E=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),A=S(u=>Y(u)),w=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),j=o.company?.companyInfo.firstMonthOfFY??1,M=S(u=>fe(u.accountState,u.accountListState,"accountList")),[P,F]=d.useState(!1),[L,v]=d.useState(!1),[c,O]=d.useState(!1);d.useEffect(()=>{F(!1),v(!1),O(!1)},[a,e]);const C=d.useCallback(()=>{F(!1),v(!1)},[]),[U,x]=d.useState(!1),z=w?.selectedPeriod?.timePeriod;return d.useEffect(()=>{c||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),O(!0)),p!=null&&(!i||l&&g===!1)&&(P?L||E==null||(v(!0),s(Z(p,"TransactionDetail",{timeframe:"month",timePeriod:z??E}))):(s(Q()),s(X()),F(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,P,L,E,z]),d.useEffect(()=>{A.newVendorState?.vendorDetailLocalData?.vendorName!=null?x(!0):x(!1)},[A.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(_("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:b,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:k,selectedTransaction:y,transactionDetail:m,vendorSaveStatus:D,tranEntity:p,defaultTrendTransactionTimePeriod:E,vendorViewDetails:A,uiState:w,firstMonthOfFY:j,uncategorizedAccounts:M,resetTrendIsFetchedStates:C,isCreateVendorDrawerOpen:U,setIsCreateVendorDrawerOpen:x}}const Pa={overlayWidth:new va(100,100,58)},La=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=Sa(),i=Ta(),l=K(),g=S(h=>Y(h)),T=()=>{t()},b={vendorDetailView:n??g,onSaveSuccess:()=>{l(ye()),l($e("Not-Started")),s()},onSaveVendor:e,onCancelClick:T,saveVendorDetailLocalData:h=>{l(Te({vendorId:void 0,localData:h}))}};return I.jsx(Ua,{anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:T,children:I.jsx(Oa,{onClick:h=>h.stopPropagation(),children:I.jsx(ya,{...b})})})},Oa=ka(Aa)`
1
+ import{j as I}from"./liveblocks-DXiLz49w.js";import{a as d}from"./sentry-C8WyuRaf.js";import{h as K,g as S,u as re,j as le,l as de,N as Ke,k as je}from"./core-C_FlMzhB.js";import{bm as Me,eM as W,cM as ue,bu as me,pf as H,Jn as B,Ko as pe,Kp as Y,JN as fe,jx as he,Kq as ge,JS as Q,JT as X,km as Se,Gv as Z,Jh as _,jr as Te,jp as ye,jB as $e,Kr as Je,Ks as qe,t4 as G,jw as ve,FS as Ee,cS as We,cT as He,Kt as Ye,Jg as Qe,Ku as Xe,t8 as Ze,Kv as ea,Kw as aa,Kx as ta,Ky as na,Kz as oa,jA as sa,KA as ia,KB as ca,Ji as ra,KC as la,KD as da,KE as ua,FM as ma,FA as pa,G2 as fa,jC as ha,Gw as ie,FJ as ga}from"./zeni-epic-state-BP6Uj047.js";import{z as Ce,s as ee,c as V,aI as De,h as Sa,K as Ta,aJ as ya,A as va,q as J,S as Ea,aK as Ca,r as q,I as Da,d as be,aL as ba,ao as Ia,T as $}from"./index-EyQIQQea.js";import{n as ka,S as Aa,D as Ua}from"./mui-D4wswOer.js";import{u as xa}from"./useAskAiCfoHostNavButtonProps-B_w7SPaL.js";import{c as _a}from"./useFetchSuggestedQuestionsWhenReady-CIJpTQVz.js";import{d as Ie}from"./decodeURIComponentSafe-Bq-dYOxp.js";import{h as ke,g as Va,d as wa,b as Fa}from"./routePaths-ByBdv6j2.js";import{t as Ba}from"./utils-l6Jt_9tl.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="4bd873f1-638f-4da6-b822-9a0b814474fa",a._sentryDebugIdIdentifier="sentry-dbid-4bd873f1-638f-4da6-b822-9a0b814474fa")}catch{}})();const ae=()=>{const a=Ce.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(V.isChainOfThoughtEnabled);return d.useMemo(()=>Me(a)&&s,[a,s])};function Ae(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Za(a,e){const s=K(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>W(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:T}=t(V.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:b}=t(V.isExpenseAutomationEnabled),{configValue:f}=n(De.enableUncategorizedExpenseCategory),h=f?.uncategorized_expense_category_enabled===!0,k=ae(),y=d.useMemo(()=>({id:a,type:H(e)}),[a,e]),m=S(u=>B(u,y)),D=S(u=>{const N=B(u,y)?.transactionDetailLocalData.vendorUpdates?.id;return N==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[N]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Ae(m?.transaction):void 0,[m?.fetchState,m?.transaction]),E=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),A=S(u=>Y(u)),w=S(u=>{if(p!=null)return fe(u.trendWithTransactionsState,p,"TransactionDetail")}),j=o.company?.companyInfo.firstMonthOfFY??1,M=S(u=>he(u.accountState,u.accountListState,"accountList")),[P,F]=d.useState(!1),[L,v]=d.useState(!1),[c,O]=d.useState(!1);d.useEffect(()=>{F(!1),v(!1),O(!1)},[a,e]);const C=d.useCallback(()=>{F(!1),v(!1)},[]),[U,x]=d.useState(!1),z=w?.selectedPeriod?.timePeriod;return d.useEffect(()=>{c||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),O(!0)),p!=null&&(!i||l&&g===!1)&&(P?L||E==null||(v(!0),s(Z(p,"TransactionDetail",{timeframe:"month",timePeriod:z??E}))):(s(Q()),s(X()),F(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,P,L,E,z]),d.useEffect(()=>{A.newVendorState?.vendorDetailLocalData?.vendorName!=null?x(!0):x(!1)},[A.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(_("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:b,isUncategorizedExpenseCategoryEnabled:h,isChainOfThoughtEnabled:k,selectedTransaction:y,transactionDetail:m,vendorSaveStatus:D,tranEntity:p,defaultTrendTransactionTimePeriod:E,vendorViewDetails:A,uiState:w,firstMonthOfFY:j,uncategorizedAccounts:M,resetTrendIsFetchedStates:C,isCreateVendorDrawerOpen:U,setIsCreateVendorDrawerOpen:x}}const Pa={overlayWidth:new va(100,100,58)},La=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=Sa(),i=Ta(),l=K(),g=S(f=>Y(f)),T=()=>{t()},b={vendorDetailView:n??g,onSaveSuccess:()=>{l(ye()),l($e("Not-Started")),s()},onSaveVendor:e,onCancelClick:T,saveVendorDetailLocalData:f=>{l(Te({vendorId:void 0,localData:f}))}};return I.jsx(Ua,{anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:T,children:I.jsx(Oa,{onClick:f=>f.stopPropagation(),children:I.jsx(ya,{...b})})})},Oa=ka(Aa)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
5
- `,za=({closeDrawerHandler:a,overrideTransactionId:e,overrideTransactionType:s})=>{const t=re(),n=le(),o=K(),i=ae(),{transactionTypeEncoded:l,transactionId:g}=de(),T=e??g,b=s??Ie(l??"");let h;ke(T,b)&&(h={id:T,type:H(b)});const f=h!=null?S(y=>B(y,h)):void 0,k=()=>{const y=J(t.state?.pathnameStackToGoBack),m=y.poppedPathname??((D=2)=>{let p="../";for(let E=0;E<D;E++)p=`${p}../`;return p})(1);n(m,{state:{pathnameStackToGoBack:y.newStack}})};return{transactionId:h,onSaveVendor:()=>{o(ve(h,void 0))},onSaveSuccess:()=>{if(f!=null&&f?.transaction&&f?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&f?.transactionDetailLocalData.vendorUpdates?.id!=null){const y=f?.transactionDetailLocalData.vendorUpdates,m={id:f?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:f?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:y?.name,qboId:f?.transactionDetailLocalData.vendorUpdates?.qboId??""},D={transactionId:{id:f?.transaction?.id,type:f?.transaction?.type},transaction:f?.transaction,lineIds:f?.transaction?.lines?.map(p=>p.id)??[]};o(G(m,f?.transaction?.amount.amount,D,!1,!1,i))}k()},onCancel:()=>{h!=null&&o(Je({transactionId:h})),o(ye()),o(qe()),a(!0),k()}}},Na=je(function(a,e){const s=B(a,e.selectedTransaction);let t;s==null&&console.warn("Check if the you've selected the transaction before getting the details");const n=Ce.getSignedInUser(),o=a.tenantState.currentTenantId,i={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""};s!=null&&s.fetchState==="Completed"&&s.transaction!=null&&e.entity!=null&&(t=Ye(a,e.entity,"TransactionDetail"));const l=a.entityAutoCompleteState.autoCompleteText.common,g=Qe(a,"common"),T=W(a);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${$}/transaction_attachment`,transactionAttachmentsEndpointToFetch:T.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${$}/transaction_attachments_accounting_provider`:`${$}/transaction_attachments`,attachmentUploadEndpoint:`${Ia.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:i,trendReport:t,analytics:be,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:l,entityAutoCompleteView:g},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails")}},function(a,e){const{isCOTEnabled:s}=e;return{onBackClick:()=>{if(a(_("common")),e.onBackClick!=null)return void e.onBackClick();const t=J(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ue(2);e.navigate(n,{state:{pathnameStackToGoBack:t.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(t,n)=>{e.transaction!=null&&a(ga({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:t,customerId:n}))},onTransactionClick:t=>{e.resetTrendIsFetchedStates(),a(Q()),a(X());const n=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(Fa(t,e.tenantEmailDomain),{state:{pathnameStackToGoBack:n}})},onTrendSelectedPeriodChange:t=>{if(t==null)e.defaultTrendTransactionTimePeriod!=null&&a(ie(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const n=t.currentTimePeriod==null?t.addTimePeriod:{startDate:t.addTimePeriod.startDate,endDate:t.currentTimePeriod.endDate};a(Z(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:t.addTimePeriod})),a(ie(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:n}))}},onSaveUpdates:(t,n,o,i)=>{a(i===!0&&o!=null?ve(t,o,!0,e.isExpenseAutomationEnabled,e.isUncategorizedExpenseCategoryEnabled):fa({transactionId:t,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:n,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled})),a(_("common"))},onUploadAttachmentAttachment:t=>{a(ha(t))},onDeleteAttachment:t=>{e.transaction!=null&&a(pa(t,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(t,n)=>{a(ma({transactionId:t,transactionLocalData:n}))},onUpdateAllChecked:(t,n,o,i)=>{e.transaction!=null&&a(ua(e.selectedTransaction,e.transaction,t,n,o,i))},onResetLineItemsCategoryClassInLocalData:(t,n,o,i,l,g)=>{a(da(t,n,o,i,l,g))},onChangeCategoryClassWhenUpdateAllIsChecked:(t,n)=>{e.transaction!=null&&a(la({id:e.transaction.id,type:e.transaction.type},e.transaction,t,n))},onSaveSuccess:()=>{const t=J(e.location.state?.pathnameStackToGoBack);if(t.poppedPathname!=null){const n=Ba(t.poppedPathname,"/").split("/"),o=n[n.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(o)&&e.navigate(t.poppedPathname,{state:{pathnameStackToGoBack:t.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const i=`${Va(e.tenantEmailDomain)}`;e.navigate(i)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const i=`${wa(e.tenantEmailDomain)}`;e.navigate(i)}}},onPageRefresh:()=>{a(Ee(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?a(ra({searchString:t,entityType:n,searchOrigin:"common"})):t.trim().length===0&&a(_("common"))},onCancelAutoComplete:()=>{a(_("common"))}},onFetchRecommendationsForEntity:(t,n,o,i)=>{a(G(t,n,o,i,!1,s))},clearRecommendationForLineId:t=>{const{transactionId:n,transaction:o,lineId:i}=t;a(ca(n,o,i))},resetUpdateErrorState:()=>{const t={id:e.selectedTransaction.id,type:e.selectedTransaction.type};a(ia(t))},onSaveVendorInLocalData:(t,n,o,i,l)=>{if(a(sa({transactionId:t,vendorUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(G(o,i,l,!1,!1,s)),a(Te({vendorId:n.id?n.id:void 0,localData:{vendorName:n.name,vendorId:n.id?n.id:void 0}})),!n.id&&e.transaction!=null){const g=e.transaction,T=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(g.type??"")}/${g.id}/vendor/create`,{state:{pathnameStackToGoBack:T}})}},onSaveCustomerInLocalData:(t,n,o,i,l)=>{a(oa({transactionId:t,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(G(o,i,l,!1,!1,s))},onUpdateAllTranactionsWithCurrentVendorChecked:t=>{a(na({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:t}))},onClickUpdateVendorToAllLineItems:(t,n,o)=>{a(ta(t,n,o))},onResetVendorToAllLineItems:(t,n,o)=>{a(aa(t,n,o))},saveLatestSelectedEntity:(t,n,o)=>{a(ea({transactionId:t,lineId:n,entity:o}))},updateVendorBulkRecommendationsFetchStatus:(t,n)=>{a(Ze(t,n))},setIsVendorUpdateAllChecked:(t,n,o)=>{a(Xe(t,n,o))}}})(ba);function et(){const a=le(),e=K(),s=re(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=Ea(),i=S(r=>W(r)),l=i.userRole.includes("charge_card_user")||i.userRole.includes("charge_card_admin"),g=i.userRole!=null&&ue(i.userRole),T=i.userRole!=null&&me(i.userRole),{isFeatureEnabled:b}=t(V.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:h}=t(V.isExpenseAutomationEnabled),{configValue:f}=n(De.enableUncategorizedExpenseCategory),k=f?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:y,transactionTypeEncoded:m,transactionId:D}=de(),[p,E]=d.useState(!1),A=Ie(m??""),w=ke(D,A),j=S(r=>r.transactionVendorViewState),M=ae(),{isFeatureEnabled:P}=t(V.isTransactionCommentingEnabled),F=o?.currentTenant?.companyId,L=o?.currentTenant?.companyName;let v;w&&(v={id:D,type:H(A)});const c=v!=null?S(r=>B(r,v)):void 0,O=c?.transactionDetailLocalData.vendorUpdates?.id!=null?j.editVendorStateById[c?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",C=c?.fetchState==="Completed"?Ae(c?.transaction):void 0,U=S(r=>C!=null?pe(r.customerIncomeState,r.vendorExpenseState,r.trendState,C,"month"):void 0),x=S(r=>Y(r)),z=S(r=>C!=null?he(r.trendWithTransactionsState,C,"TransactionDetail"):void 0),u=i.company?.companyInfo.firstMonthOfFY??1,N=S(r=>fe(r.accountState,r.accountListState,"accountList")),[xe,te]=d.useState(!1),[_e,ne]=d.useState(!1),[Ve,we]=d.useState(!1),oe=()=>{te(!1),ne(!1)},Fe=Ca();d.useEffect(()=>{if(v!=null&&c!=null&&c.fetchState==="Not-Started")e(Ee(v)),oe();else if(v!=null&&c!=null&&c.fetchState==="Error"){const r=q(s.state?.pathnameStackToGoBack,s.pathname),R={pathnameStackToGoBack:r,message:"pageNotFound",origin:"transaction_detail"};Fe&&(R.message="expenseAutomation",R.origin="transaction_categorization",R.pathnameStackToGoBack=r),a("page-not-found",{replace:!0,state:R})}},[v]),d.useEffect(()=>{Ve||c==null||c.transaction==null||(e(ge({id:c.transaction.id,type:c.transaction.type})),we(!0)),C==null&&c?.fetchState==="Completed"&&ce(c?.transaction),C!=null&&(!l||g&&T===!1)&&(xe?_e||U==null||(ne(!0),e(Z(C,"TransactionDetail",{timeframe:"month",timePeriod:z?.selectedPeriod?.timePeriod??U}))):(e(Q()),e(X()),ce(c?.transaction),te(!0),e(Se(C))))},[c?.fetchState,c?.transaction,U,l]),d.useEffect(()=>{x.newVendorState?.vendorDetailLocalData?.vendorName!=null?E(!0):E(!1)},[x.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{e(_("common"))},[]);const Be=[m,D].filter(r=>r!=null),{transactionId:se,onSaveVendor:Pe,onSaveSuccess:Le,onCancel:Oe}=za({closeDrawerHandler:r=>{E(!1),a(r?"../":"../..")}}),{isAiCfoOpen:ze,setIsAiCfoOpen:Ne}=Da(),{isAiCfoAccessEnabled:Re,onAskAiCfoClick:Ge}=xa({isAiCfoOpen:ze,setIsAiCfoOpen:Ne,mobileExploreReferrer:"Transaction Details"});return _a({isDataReady:c?.fetchState==="Completed"}),w?I.jsxs(I.Fragment,{children:[se!=null&&p&&I.jsx(La,{isOpen:p,transactionId:se,onSaveVendor:Pe,onSaveSuccess:Le,onCancel:Oe}),I.jsx(Na,{hideDeleteAttachment:!0,firstMonthOfFY:u,isDisabled:c?.transaction?.type==="transfer"&&o?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:y,location:s,navigate:a,selectedTransaction:v,entity:C,isCOTEnabled:M,defaultTrendTransactionTimePeriod:U,resetTrendIsFetchedStates:oe,transaction:c?.transaction,uncategorizedAccounts:N,vendorSaveStatus:O,isVendorBulkUpdateOnTransactionEnabled:b,isExpenseAutomationEnabled:h,isUncategorizedExpenseCategoryEnabled:k,isAiCfoAccessEnabled:Re,onAskAiCfoClick:Ge,isTransactionCommentingEnabled:P,companyId:F,companyName:L})]}):I.jsx(Ke,{to:Ue(Be.length)})}const Ue=(a=2)=>{let e="../";for(let s=0;s<a;s++)e=`${e}../`;return e},ce=a=>{if(a!=null){const{transactionCategory:e,transactionClass:s}=Ra(a),t=Ga(a);be.trackTransactionDetails(a.account?.accountId,a.account?.accountName,a.id,t,e.length>0?e:void 0,s.length>0?s:void 0,a.type,a.amount,a.memo,a.lines?.length??0,a.attachments?.map(n=>n.fileName))}},Ra=a=>{const e=[],s=[];return a.lines?.forEach(t=>{switch(t.type){case"transaction_with_account_and_class_line":case"transaction_with_product_or_service_line":case"journal_entry_transaction_line":case"linked_transaction_line":{const n=t;n!=null&&n.account!=null&&n.account.accountName?.length>0&&e.push(n.account.accountName),n.class!=null&&n.class.className?.length>0&&s.push(n.class.className);break}}}),{transactionCategory:e,transactionClass:s}},Ga=a=>We(a)===!0?a.customer?.name??"":He(a)===!0?a.vendor?.name??"":a.memo!=null?a.memo:a.type;export{La as C,et as T,za as a,Na as b,ae as c,Za as u};
5
+ `,za=({closeDrawerHandler:a,overrideTransactionId:e,overrideTransactionType:s})=>{const t=re(),n=le(),o=K(),i=ae(),{transactionTypeEncoded:l,transactionId:g}=de(),T=e??g,b=s??Ie(l??"");let f;ke(T,b)&&(f={id:T,type:H(b)});const h=f!=null?S(y=>B(y,f)):void 0,k=()=>{const y=J(t.state?.pathnameStackToGoBack),m=y.poppedPathname??((D=2)=>{let p="../";for(let E=0;E<D;E++)p=`${p}../`;return p})(1);n(m,{state:{pathnameStackToGoBack:y.newStack}})};return{transactionId:f,onSaveVendor:()=>{o(ve(f,void 0))},onSaveSuccess:()=>{if(h!=null&&h?.transaction&&h?.transactionDetailLocalData.vendorUpdates?.qboId!=null&&h?.transactionDetailLocalData.vendorUpdates?.id!=null){const y=h?.transactionDetailLocalData.vendorUpdates,m={id:h?.transactionDetailLocalData.vendorUpdates?.qboId,zeniId:h?.transactionDetailLocalData.vendorUpdates?.id,type:"vendor",name:y?.name,qboId:h?.transactionDetailLocalData.vendorUpdates?.qboId??""},D={transactionId:{id:h?.transaction?.id,type:h?.transaction?.type},transaction:h?.transaction,lineIds:h?.transaction?.lines?.map(p=>p.id)??[]};o(G(m,h?.transaction?.amount.amount,D,!1,!1,i))}k()},onCancel:()=>{f!=null&&o(Je({transactionId:f})),o(ye()),o(qe()),a(!0),k()}}},Na=je(function(a,e){const s=B(a,e.selectedTransaction);let t;s==null&&console.warn("Check if the you've selected the transaction before getting the details");const n=Ce.getSignedInUser(),o=a.tenantState.currentTenantId,i={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:o??""};s!=null&&s.fetchState==="Completed"&&s.transaction!=null&&e.entity!=null&&(t=Ye(a,e.entity,"TransactionDetail"));const l=a.entityAutoCompleteState.autoCompleteText.common,g=Qe(a,"common"),T=W(a);return{transactionDetail:s,transactionAttachmentEndpointToDownload:`${$}/transaction_attachment`,transactionAttachmentsEndpointToFetch:T.externalConnections?.accounting[0]?.connectionName==="netsuite"?`${$}/transaction_attachments_accounting_provider`:`${$}/transaction_attachments`,attachmentUploadEndpoint:`${Ia.accountMicroServiceBaseUrl}`,isCOTEnabled:e.isCOTEnabled,authParams:i,trendReport:t,analytics:be,uncategorizedAccounts:e.uncategorizedAccounts,autoCompleteData:{autoCompleteText:l,entityAutoCompleteView:g},isVendorBulkUpdateOnTransactionEnabled:e.isVendorBulkUpdateOnTransactionEnabled,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled,enableBackClickOnSave:e.location.state?.message?.startsWith("comingFromScheduleDetails")}},function(a,e){const{isCOTEnabled:s}=e;return{onBackClick:()=>{if(a(_("common")),e.onBackClick!=null)return void e.onBackClick();const t=J(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ue(2);e.navigate(n,{state:{pathnameStackToGoBack:t.newStack,message:"comingFromTransactionDetail"}})},discardTransactionDetailLocalData:(t,n)=>{e.transaction!=null&&a(ga({transactionId:{id:e.transaction.id,type:e.transaction.type},vendorId:t,customerId:n}))},onTransactionClick:t=>{e.resetTrendIsFetchedStates(),a(Q()),a(X());const n=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(Fa(t,e.tenantEmailDomain),{state:{pathnameStackToGoBack:n}})},onTrendSelectedPeriodChange:t=>{if(t==null)e.defaultTrendTransactionTimePeriod!=null&&a(ie(e.entity,"TransactionDetail",{timeframe:"month",timePeriod:e.defaultTrendTransactionTimePeriod}));else{const n=t.currentTimePeriod==null?t.addTimePeriod:{startDate:t.addTimePeriod.startDate,endDate:t.currentTimePeriod.endDate};a(Z(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:t.addTimePeriod})),a(ie(e.entity,"TransactionDetail",{timeframe:t.timeframe,timePeriod:n}))}},onSaveUpdates:(t,n,o,i)=>{a(i===!0&&o!=null?ve(t,o,!0,e.isExpenseAutomationEnabled,e.isUncategorizedExpenseCategoryEnabled):ha({transactionId:t,isExpenseAutomationEnabled:e.isExpenseAutomationEnabled,cotTransactionTracking:n,isUncategorizedExpenseCategoryEnabled:e.isUncategorizedExpenseCategoryEnabled})),a(_("common"))},onUploadAttachmentAttachment:t=>{a(fa(t))},onDeleteAttachment:t=>{e.transaction!=null&&a(pa(t,{id:e.transaction.id,type:e.transaction.type}))},onSaveTransactionDetailLocalData:(t,n)=>{a(ma({transactionId:t,transactionLocalData:n}))},onUpdateAllChecked:(t,n,o,i)=>{e.transaction!=null&&a(ua(e.selectedTransaction,e.transaction,t,n,o,i))},onResetLineItemsCategoryClassInLocalData:(t,n,o,i,l,g)=>{a(da(t,n,o,i,l,g))},onChangeCategoryClassWhenUpdateAllIsChecked:(t,n)=>{e.transaction!=null&&a(la({id:e.transaction.id,type:e.transaction.type},e.transaction,t,n))},onSaveSuccess:()=>{const t=J(e.location.state?.pathnameStackToGoBack);if(t.poppedPathname!=null){const n=Ba(t.poppedPathname,"/").split("/"),o=n[n.length-1];if(["uncategorized-income","uncategorized-expense","missing-receipts"].includes(o)&&e.navigate(t.poppedPathname,{state:{pathnameStackToGoBack:t.newStack}}),e.location.state?.message==="comingFromScheduleDetails"){const i=`${Va(e.tenantEmailDomain)}`;e.navigate(i)}else if(e.location.state?.message==="comingFromScheduleDetailsFixedAssets"){const i=`${wa(e.tenantEmailDomain)}`;e.navigate(i)}}},onPageRefresh:()=>{a(Ee(e.selectedTransaction,!0))},autoCompleteActions:{onAutoCompleteInputChange:(t,n)=>{t.trim().length>=2?a(ra({searchString:t,entityType:n,searchOrigin:"common"})):t.trim().length===0&&a(_("common"))},onCancelAutoComplete:()=>{a(_("common"))}},onFetchRecommendationsForEntity:(t,n,o,i)=>{a(G(t,n,o,i,!1,s))},clearRecommendationForLineId:t=>{const{transactionId:n,transaction:o,lineId:i}=t;a(ca(n,o,i))},resetUpdateErrorState:()=>{const t={id:e.selectedTransaction.id,type:e.selectedTransaction.type};a(ia(t))},onSaveVendorInLocalData:(t,n,o,i,l)=>{if(a(sa({transactionId:t,vendorUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(G(o,i,l,!1,!1,s)),a(Te({vendorId:n.id?n.id:void 0,localData:{vendorName:n.name,vendorId:n.id?n.id:void 0}})),!n.id&&e.transaction!=null){const g=e.transaction,T=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(`/${e.tenantEmailDomain}/transaction/${encodeURIComponent(g.type??"")}/${g.id}/vendor/create`,{state:{pathnameStackToGoBack:T}})}},onSaveCustomerInLocalData:(t,n,o,i,l)=>{a(oa({transactionId:t,customerUpdates:n,entity:o})),n.id!=null&&o!=null&&i!=null&&l!=null&&a(G(o,i,l,!1,!1,s))},onUpdateAllTranactionsWithCurrentVendorChecked:t=>{a(na({transactionId:{id:e.selectedTransaction.id,type:e.selectedTransaction.type},isUpdateEnabled:t}))},onClickUpdateVendorToAllLineItems:(t,n,o)=>{a(ta(t,n,o))},onResetVendorToAllLineItems:(t,n,o)=>{a(aa(t,n,o))},saveLatestSelectedEntity:(t,n,o)=>{a(ea({transactionId:t,lineId:n,entity:o}))},updateVendorBulkRecommendationsFetchStatus:(t,n)=>{a(Ze(t,n))},setIsVendorUpdateAllChecked:(t,n,o)=>{a(Xe(t,n,o))}}})(ba);function et(){const a=le(),e=K(),s=re(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=Ea(),i=S(r=>W(r)),l=i.userRole.includes("charge_card_user")||i.userRole.includes("charge_card_admin"),g=i.userRole!=null&&ue(i.userRole),T=i.userRole!=null&&me(i.userRole),{isFeatureEnabled:b}=t(V.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:f}=t(V.isExpenseAutomationEnabled),{configValue:h}=n(De.enableUncategorizedExpenseCategory),k=h?.uncategorized_expense_category_enabled===!0,{tenantEmailDomain:y,transactionTypeEncoded:m,transactionId:D}=de(),[p,E]=d.useState(!1),A=Ie(m??""),w=ke(D,A),j=S(r=>r.transactionVendorViewState),M=ae(),{isFeatureEnabled:P}=t(V.isTransactionCommentingEnabled),F=o?.currentTenant?.companyId,L=o?.currentTenant?.companyName;let v;w&&(v={id:D,type:H(A)});const c=v!=null?S(r=>B(r,v)):void 0,O=c?.transactionDetailLocalData.vendorUpdates?.id!=null?j.editVendorStateById[c?.transactionDetailLocalData.vendorUpdates.id]?.saveStatus.fetchState:"Not-Started",C=c?.fetchState==="Completed"?Ae(c?.transaction):void 0,U=S(r=>C!=null?pe(r.customerIncomeState,r.vendorExpenseState,r.trendState,C,"month"):void 0),x=S(r=>Y(r)),z=S(r=>C!=null?fe(r.trendWithTransactionsState,C,"TransactionDetail"):void 0),u=i.company?.companyInfo.firstMonthOfFY??1,N=S(r=>he(r.accountState,r.accountListState,"accountList")),[xe,te]=d.useState(!1),[_e,ne]=d.useState(!1),[Ve,we]=d.useState(!1),oe=()=>{te(!1),ne(!1)},Fe=Ca();d.useEffect(()=>{if(v!=null&&c!=null&&c.fetchState==="Not-Started")e(Ee(v)),oe();else if(v!=null&&c!=null&&c.fetchState==="Error"){const r=q(s.state?.pathnameStackToGoBack,s.pathname),R={pathnameStackToGoBack:r,message:"pageNotFound",origin:"transaction_detail"};Fe&&(R.message="expenseAutomation",R.origin="transaction_categorization",R.pathnameStackToGoBack=r),a("page-not-found",{replace:!0,state:R})}},[v]),d.useEffect(()=>{Ve||c==null||c.transaction==null||(e(ge({id:c.transaction.id,type:c.transaction.type})),we(!0)),C==null&&c?.fetchState==="Completed"&&ce(c?.transaction),C!=null&&(!l||g&&T===!1)&&(xe?_e||U==null||(ne(!0),e(Z(C,"TransactionDetail",{timeframe:"month",timePeriod:z?.selectedPeriod?.timePeriod??U}))):(e(Q()),e(X()),ce(c?.transaction),te(!0),e(Se(C))))},[c?.fetchState,c?.transaction,U,l]),d.useEffect(()=>{x.newVendorState?.vendorDetailLocalData?.vendorName!=null?E(!0):E(!1)},[x.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{e(_("common"))},[]);const Be=[m,D].filter(r=>r!=null),{transactionId:se,onSaveVendor:Pe,onSaveSuccess:Le,onCancel:Oe}=za({closeDrawerHandler:r=>{E(!1),a(r?"../":"../..")}}),{isAiCfoOpen:ze,setIsAiCfoOpen:Ne}=Da(),{isAiCfoAccessEnabled:Re,onAskAiCfoClick:Ge}=xa({isAiCfoOpen:ze,setIsAiCfoOpen:Ne,mobileExploreReferrer:"Transaction Details"});return _a({isDataReady:c?.fetchState==="Completed"}),w?I.jsxs(I.Fragment,{children:[se!=null&&p&&I.jsx(La,{isOpen:p,transactionId:se,onSaveVendor:Pe,onSaveSuccess:Le,onCancel:Oe}),I.jsx(Na,{hideDeleteAttachment:!0,firstMonthOfFY:u,isDisabled:c?.transaction?.type==="transfer"&&o?.connectionName==="netsuite"?"readonly":void 0,tenantEmailDomain:y,location:s,navigate:a,selectedTransaction:v,entity:C,isCOTEnabled:M,defaultTrendTransactionTimePeriod:U,resetTrendIsFetchedStates:oe,transaction:c?.transaction,uncategorizedAccounts:N,vendorSaveStatus:O,isVendorBulkUpdateOnTransactionEnabled:b,isExpenseAutomationEnabled:f,isUncategorizedExpenseCategoryEnabled:k,isAiCfoAccessEnabled:Re,onAskAiCfoClick:Ge,isTransactionCommentingEnabled:P,companyId:F,companyName:L})]}):I.jsx(Ke,{to:Ue(Be.length)})}const Ue=(a=2)=>{let e="../";for(let s=0;s<a;s++)e=`${e}../`;return e},ce=a=>{if(a!=null){const{transactionCategory:e,transactionClass:s}=Ra(a),t=Ga(a);be.trackTransactionDetails(a.account?.accountId,a.account?.accountName,a.id,t,e.length>0?e:void 0,s.length>0?s:void 0,a.type,a.amount,a.memo,a.lines?.length??0,a.attachments?.map(n=>n.fileName))}},Ra=a=>{const e=[],s=[];return a.lines?.forEach(t=>{switch(t.type){case"transaction_with_account_and_class_line":case"transaction_with_product_or_service_line":case"journal_entry_transaction_line":case"linked_transaction_line":{const n=t;n!=null&&n.account!=null&&n.account.accountName?.length>0&&e.push(n.account.accountName),n.class!=null&&n.class.className?.length>0&&s.push(n.class.className);break}}}),{transactionCategory:e,transactionClass:s}},Ga=a=>We(a)===!0?a.customer?.name??"":He(a)===!0?a.vendor?.name??"":a.memo!=null?a.memo:a.type;export{La as C,et as T,za as a,Na as b,ae as c,Za as u};
@@ -1 +1 @@
1
- import{j as i}from"./liveblocks-it_Rhm8-.js";import{j as U,u as w,h as q,l as H,g as L,N as z,k as Q,n as Ae,o as v}from"./core-BF8mCLAO.js";import{eM as R,iL as T,NL as Z,Gm as ue,bp as ie,NM as he,jm as K,JP as W,NN as se,NO as Se,bB as x,Gj as me,NP as ke,NQ as re,NR as Ie,NS as pe,NT as be,NU as ve,NV as de,Hz as Ye,bm as xe}from"./zeni-epic-state-Ds1G4QGX.js";import{O as X,e as B,c2 as ee,n as _,p as te,s as fe,d as J,I as Pe,z as Ee}from"./index-NPabbksF.js";import"./mui-B87RTrAV.js";import{a as A}from"./sentry-C-hGmJ4T.js";import{w as ae}from"./withTransactionSidePanel-Bz9MapFR.js";import{p as ne,b as ce}from"./routePaths-DuYx1box.js";import{u as Le}from"./utils-C4NhxqJn.js";import{d as E}from"./decodeURIComponentSafe-BogCAdat.js";import{Z as je}from"./ZeniAccountStatementScreen-Bl764lap.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./useAskAiCfoHostNavButtonProps-BTitwH51.js";import"./useFetchSuggestedQuestionsWhenReady-Dv4iLJ0Q.js";import"./TransactionDetailScreen-D4rokNI1.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="a7278bd5-2e34-48ac-aac3-df27679cd1c0",a._sentryDebugIdIdentifier="sentry-dbid-a7278bd5-2e34-48ac-aac3-df27679cd1c0")}catch{}})();const G=a=>Le(a),Me=Q(function(a,e){const t=he(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,G(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=X.getLocalizedStrings(),r=G(e.selectedAccount.tranListType),s=Be(t,n,c,r,e.bookCloseDate);B.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:s},type:G(e.selectedAccount.tranListType)})),a(ue(r,T(s),!1,r==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(s))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:G(e.selectedAccount.tranListType)}))}}})(ee),F=ae(function({...a}){const e=U(),t=w(),n=q(),c=t.pathname.substring(t.pathname.lastIndexOf("/")+1),{tenantEmailDomain:o}=H(),r=X.getLocalizedStrings(),{accountType:s,title:u,subTitle:h}=Ce(c),D="month",g=L(p=>R(p)),Y=g.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:y,initialTimeframeTick:S}=ze(c,Y,g.bookCloseDate),[k,j]=A.useState(!1),[M,P]=A.useState(void 0),m=A.useMemo(()=>{const p=T(S);return{tranListType:c,accountType:Z(s),title:u,subTitle:h,timeframe:D,period:p}},[c,D,s,y]);A.useEffect(()=>{if(!k&&m!=null){j(!0),B.trackTransactionList(void 0,void 0,void 0,m.title);const p=G(m.tranListType);n(ue(p,m.period,!0,p==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[k,m,n]);let I=m;return m!=null&&M!=null&&(I={...m,period:M}),I==null?i.jsx(z,{to:"../"}):i.jsx(Me,{firstMonthOfFY:Y,tenantEmailDomain:o,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:y,navigate:e,selectedAccount:I,referrerType:c,bookCloseDate:g.bookCloseDate,onSelectedTimePeriodChange:p=>P(p),...a})}),Ce=a=>{let e="",t="",n="";const c=X.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=c.uncategorizedTransactionList.income.title,n=c.uncategorizedTransactionList.income.subTitle;break;case"uncategorized-expense":e="expenses",t=c.uncategorizedTransactionList.expense.title,n=c.uncategorizedTransactionList.expense.subTitle;break;case"miscategorized-expense":e="expenses",t=c.miscategorizedTransactionList.expense.title,n=c.miscategorizedTransactionList.expense.subTitle;break;case"miscategorized-income":e="income",t=c.miscategorizedTransactionList.income.title,n=c.miscategorizedTransactionList.income.subTitle;break;case"missing-receipts":t=c.uncategorizedTransactionList.missingReceipt.title,n=c.uncategorizedTransactionList.missingReceipt.subTitle}return{accountType:e,title:t,subTitle:n}},ze=(a,e,t)=>{const n=ie();let c=ie().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ne(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Be=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Oe=Q(function(a,e){const t=ke(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Te();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),B.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(me(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),Fe=ae(function({referrerType:a,...e}){const t=U(),n=w(),c=q(),{tenantEmailDomain:o,accountTypeEncoded:r,accountIdEncoded:s,classIdEncoded:u,timeframe:h,startDate:D,endDate:g,titleEncoded:Y}=H(),y=E(r??""),S=E(s??""),k=E(u??""),j=E(Y??""),M=L(f=>Se(f.transactionListState,S,y,k)),[P,m]=A.useState(!1),[I,p]=A.useState(void 0),N=L(f=>R(f)),$=N.company?.companyInfo.firstMonthOfFY??1;let d;const l=Ge(y,S,k,h,D,g,j);if(l){const f={startDate:x(D,"YYYY-MM-DD"),endDate:x(g,"YYYY-MM-DD")},V=Ne(M?.dateRange,f);d={accountId:S,accountType:Z(y),classId:k,title:j,timeframe:h,period:V}}A.useEffect(()=>{P||d==null||(m(!0),B.trackTransactionList(d.accountId,void 0,a,d.title),c(me(d.accountId,d.accountType,d.classId,d.period)))},[P,d,c]);let C=d;d!=null&&I!=null&&(C={...d,period:I});const O=[r,s,u,h,D,g,Y].filter(f=>f!=null);return l&&C!=null?i.jsx(Oe,{firstMonthOfFY:$,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:C,referrerType:a,onSelectedTimePeriodChange:f=>p(f),...e}):i.jsx(z,{to:Te(O.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ge=(a,e,t,n,c,o,r)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&x(c,"YYYY-MM-DD").isValid()&&x(o,"YYYY-MM-DD").isValid()&&r!=null,Ne=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),_e=Q(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ve(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??De();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),B.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=$e(e.tenantEmailDomain),n=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=U(),n=w(),c=q(),{tenantEmailDomain:o,accountTypeEncoded:r,accountIdEncoded:s,timeframe:u,startDate:h,endDate:D,titleEncoded:g,excludeSubAccounts:Y}=H(),y=E(r??""),S=E(s??""),k=E(g??""),j=!(Y!=null&&Y==="exclude_subaccounts"),M=L(b=>Ie(b.transactionListState,S,y)),[P,m]=A.useState(!1),[I,p]=A.useState(void 0),N=L(b=>R(b)),$=N.company?.featuresActivationInfo.connectedAccountProvider==="unit",d=N.company?.companyInfo.firstMonthOfFY??1;let l;const C=we(y,S,u,h,D,k);if(C){const b={startDate:x(h,"YYYY-MM-DD"),endDate:x(D,"YYYY-MM-DD")},ye=Re(M?.dateRange,b);l={accountId:S,accountType:Z(y),title:k,timeframe:u,period:ye}}let O=l;l!=null&&I!=null&&(O={...l,period:I});const{useFeatureGate:f}=fe(),{isFeatureEnabled:V}=f(J.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Pe();A.useEffect(()=>{!P&&l!=null&&oe&&(m(!0),B.trackTransactionList(l.accountId,void 0,a,l.title),c(pe(l.accountId,l.accountType,l.period,void 0,!1,j)))},[P,l,c,oe]);const ge=[r,s,u,h,D,g].filter(b=>b!=null);return C&&O!=null?i.jsx(_e,{firstMonthOfFY:d,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:$,isTransactionCommentingEnabled:V,selectedAccount:O,referrerType:a,onSelectedTimePeriodChange:b=>p(b),...e}):i.jsx(z,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},we=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&x(n,"YYYY-MM-DD").isValid()&&x(c,"YYYY-MM-DD").isValid()&&o!=null,Re=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),$e=a=>`/${a}/transactions/${Ye}/statements`;function mt(){const a=w().state?.referrer,e=Ee.getSignedInUser(),t=xe(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(J.isExpenseAutomationEnabled),o=L(u=>u.expenseAutomationViewState.selectedPeriodByTenantId)[L(u=>R(u)).tenantId],{isFeatureEnabled:r}=n(J.isExpenseAutomationEnabledV2),s=r||c&&t;return i.jsxs(Ae,{children:[i.jsx(v,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(v,{path:"/zeni-clearing-account/statements",element:i.jsx(je,{})}),i.jsx(v,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(v,{path:"/uncategorized-income/*",element:i.jsx(F,{})}),i.jsx(v,{path:"/uncategorized-expense/*",element:s?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/miscategorized-income/*",element:i.jsx(F,{})}),i.jsx(v,{path:"/miscategorized-expense/*",element:s?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/missing-receipts/*",element:s?i.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(Fe,{referrerType:a})})]})}export{mt as default};
1
+ import{j as i}from"./liveblocks-DXiLz49w.js";import{j as U,u as w,h as q,l as H,g as L,N as z,k as Q,n as Ae,o as v}from"./core-C_FlMzhB.js";import{eM as R,iL as T,NL as Z,Gm as ue,bp as ie,NM as he,jm as K,JP as W,NN as se,NO as Se,bB as x,Gj as me,NP as be,NQ as re,NR as ke,NS as pe,NT as Ie,NU as ve,NV as de,Hz as Ye,bm as xe}from"./zeni-epic-state-BP6Uj047.js";import{D as X,d as B,c5 as ee,r as _,q as te,s as fe,c as J,J as Pe,z as Ee}from"./index-EyQIQQea.js";import"./mui-D4wswOer.js";import{a as A}from"./sentry-C8WyuRaf.js";import{w as ae}from"./withTransactionSidePanel-DyPNd8eG.js";import{p as ne,b as ce}from"./routePaths-ByBdv6j2.js";import{u as Le}from"./utils-l6Jt_9tl.js";import{d as E}from"./decodeURIComponentSafe-Bq-dYOxp.js";import{Z as je}from"./ZeniAccountStatementScreen-DWrx5fNs.js";import"./recharts-BjJxsXby.js";import"./analytics-B8BYlogo.js";import"./plaid-CknlBCWN.js";import"./dnd-CTZ8xt4P.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bi_BmPss.js";import"./lexical-BmFHbDfb.js";import"./pdf-BUMfUQyN.js";import"./useAskAiCfoHostNavButtonProps-B_w7SPaL.js";import"./useFetchSuggestedQuestionsWhenReady-CIJpTQVz.js";import"./TransactionDetailScreen-CspxK2Wp.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="eebebcdb-54ef-46c9-b30e-ae2cc735f4fe",a._sentryDebugIdIdentifier="sentry-dbid-eebebcdb-54ef-46c9-b30e-ae2cc735f4fe")}catch{}})();const G=a=>Le(a),Me=Q(function(a,e){const t=he(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,G(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=X.getLocalizedStrings(),r=G(e.selectedAccount.tranListType),s=Be(t,n,c,r,e.bookCloseDate);B.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:s},type:G(e.selectedAccount.tranListType)})),a(ue(r,T(s),!1,r==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(s))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:G(e.selectedAccount.tranListType)}))}}})(ee),F=ae(function({...a}){const e=U(),t=w(),n=q(),c=t.pathname.substring(t.pathname.lastIndexOf("/")+1),{tenantEmailDomain:o}=H(),r=X.getLocalizedStrings(),{accountType:s,title:u,subTitle:h}=Ce(c),D="month",g=L(p=>R(p)),Y=g.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:y,initialTimeframeTick:S}=ze(c,Y,g.bookCloseDate),[b,j]=A.useState(!1),[M,P]=A.useState(void 0),m=A.useMemo(()=>{const p=T(S);return{tranListType:c,accountType:Z(s),title:u,subTitle:h,timeframe:D,period:p}},[c,D,s,y]);A.useEffect(()=>{if(!b&&m!=null){j(!0),B.trackTransactionList(void 0,void 0,void 0,m.title);const p=G(m.tranListType);n(ue(p,m.period,!0,p==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[b,m,n]);let k=m;return m!=null&&M!=null&&(k={...m,period:M}),k==null?i.jsx(z,{to:"../"}):i.jsx(Me,{firstMonthOfFY:Y,tenantEmailDomain:o,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:y,navigate:e,selectedAccount:k,referrerType:c,bookCloseDate:g.bookCloseDate,onSelectedTimePeriodChange:p=>P(p),...a})}),Ce=a=>{let e="",t="",n="";const c=X.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=c.uncategorizedTransactionList.income.title,n=c.uncategorizedTransactionList.income.subTitle;break;case"uncategorized-expense":e="expenses",t=c.uncategorizedTransactionList.expense.title,n=c.uncategorizedTransactionList.expense.subTitle;break;case"miscategorized-expense":e="expenses",t=c.miscategorizedTransactionList.expense.title,n=c.miscategorizedTransactionList.expense.subTitle;break;case"miscategorized-income":e="income",t=c.miscategorizedTransactionList.income.title,n=c.miscategorizedTransactionList.income.subTitle;break;case"missing-receipts":t=c.uncategorizedTransactionList.missingReceipt.title,n=c.uncategorizedTransactionList.missingReceipt.subTitle}return{accountType:e,title:t,subTitle:n}},ze=(a,e,t)=>{const n=ie();let c=ie().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ne(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Be=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Oe=Q(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Te();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),B.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(me(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),Fe=ae(function({referrerType:a,...e}){const t=U(),n=w(),c=q(),{tenantEmailDomain:o,accountTypeEncoded:r,accountIdEncoded:s,classIdEncoded:u,timeframe:h,startDate:D,endDate:g,titleEncoded:Y}=H(),y=E(r??""),S=E(s??""),b=E(u??""),j=E(Y??""),M=L(f=>Se(f.transactionListState,S,y,b)),[P,m]=A.useState(!1),[k,p]=A.useState(void 0),N=L(f=>R(f)),$=N.company?.companyInfo.firstMonthOfFY??1;let d;const l=Ge(y,S,b,h,D,g,j);if(l){const f={startDate:x(D,"YYYY-MM-DD"),endDate:x(g,"YYYY-MM-DD")},V=Ne(M?.dateRange,f);d={accountId:S,accountType:Z(y),classId:b,title:j,timeframe:h,period:V}}A.useEffect(()=>{P||d==null||(m(!0),B.trackTransactionList(d.accountId,void 0,a,d.title),c(me(d.accountId,d.accountType,d.classId,d.period)))},[P,d,c]);let C=d;d!=null&&k!=null&&(C={...d,period:k});const O=[r,s,u,h,D,g,Y].filter(f=>f!=null);return l&&C!=null?i.jsx(Oe,{firstMonthOfFY:$,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:C,referrerType:a,onSelectedTimePeriodChange:f=>p(f),...e}):i.jsx(z,{to:Te(O.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ge=(a,e,t,n,c,o,r)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&x(c,"YYYY-MM-DD").isValid()&&x(o,"YYYY-MM-DD").isValid()&&r!=null,Ne=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),_e=Q(function(a,e){const t=Ie(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ve(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:K(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??De();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),B.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=$e(e.tenantEmailDomain),n=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=U(),n=w(),c=q(),{tenantEmailDomain:o,accountTypeEncoded:r,accountIdEncoded:s,timeframe:u,startDate:h,endDate:D,titleEncoded:g,excludeSubAccounts:Y}=H(),y=E(r??""),S=E(s??""),b=E(g??""),j=!(Y!=null&&Y==="exclude_subaccounts"),M=L(I=>ke(I.transactionListState,S,y)),[P,m]=A.useState(!1),[k,p]=A.useState(void 0),N=L(I=>R(I)),$=N.company?.featuresActivationInfo.connectedAccountProvider==="unit",d=N.company?.companyInfo.firstMonthOfFY??1;let l;const C=we(y,S,u,h,D,b);if(C){const I={startDate:x(h,"YYYY-MM-DD"),endDate:x(D,"YYYY-MM-DD")},ye=Re(M?.dateRange,I);l={accountId:S,accountType:Z(y),title:b,timeframe:u,period:ye}}let O=l;l!=null&&k!=null&&(O={...l,period:k});const{useFeatureGate:f}=fe(),{isFeatureEnabled:V}=f(J.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Pe();A.useEffect(()=>{!P&&l!=null&&oe&&(m(!0),B.trackTransactionList(l.accountId,void 0,a,l.title),c(pe(l.accountId,l.accountType,l.period,void 0,!1,j)))},[P,l,c,oe]);const ge=[r,s,u,h,D,g].filter(I=>I!=null);return C&&O!=null?i.jsx(_e,{firstMonthOfFY:d,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:$,isTransactionCommentingEnabled:V,selectedAccount:O,referrerType:a,onSelectedTimePeriodChange:I=>p(I),...e}):i.jsx(z,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},we=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&x(n,"YYYY-MM-DD").isValid()&&x(c,"YYYY-MM-DD").isValid()&&o!=null,Re=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),$e=a=>`/${a}/transactions/${Ye}/statements`;function mt(){const a=w().state?.referrer,e=Ee.getSignedInUser(),t=xe(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(J.isExpenseAutomationEnabled),o=L(u=>u.expenseAutomationViewState.selectedPeriodByTenantId)[L(u=>R(u)).tenantId],{isFeatureEnabled:r}=n(J.isExpenseAutomationEnabledV2),s=r||c&&t;return i.jsxs(Ae,{children:[i.jsx(v,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(v,{path:"/zeni-clearing-account/statements",element:i.jsx(je,{})}),i.jsx(v,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(v,{path:"/uncategorized-income/*",element:i.jsx(F,{})}),i.jsx(v,{path:"/uncategorized-expense/*",element:s?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/miscategorized-income/*",element:i.jsx(F,{})}),i.jsx(v,{path:"/miscategorized-expense/*",element:s?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/missing-receipts/*",element:s?i.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(Fe,{referrerType:a})})]})}export{mt as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-it_Rhm8-.js";import{j as B,u as M,h as U,l as O,g as f,N as L,k as N,n as Ce,o as k}from"./core-BF8mCLAO.js";import{ci as V,eM as D,Mx as P,D2 as ae,fb as H,CM as ne,Mz as we,D5 as Te,Mv as ke,Mw as se,MN as be,Bc as je,s1 as Ae,MB as Ee,Dg as ve,My as re,cL as K,w7 as oe,eQ as De,eS as Fe,NI as Le,NJ as Be,CN as Me,NK as Ue,CO as Pe,CX as Re,bu as Oe,bC as Ne,ct as Ve,bD as _e,cN as ze,fa as $e,br as Ge,If as Ze,ch as He}from"./zeni-epic-state-Ds1G4QGX.js";import{S as _,al as Ke,z as A,v as z,e as b,bX as We,bY as Je,bZ as Z,K as W,h as Xe,I as qe,H as Qe,s as ie,d as v,A as Ye,r as et,b_ as tt,ao as J,n as at,b$ as nt,p as X,c0 as st,w as Q,c1 as rt,a4 as ot}from"./index-NPabbksF.js";import{D as it,n as R,S as ct}from"./mui-B87RTrAV.js";import lt from"./NotFoundScreen-Cryu2QFy.js";import{S as Y}from"./SetupPagesScreen-CT-3H_u9.js";import{a as d}from"./sentry-C-hGmJ4T.js";import{u as ut}from"./useAskAiCfoHostNavButtonProps-BTitwH51.js";import{c as dt}from"./useFetchSuggestedQuestionsWhenReady-Dv4iLJ0Q.js";import{M as ce}from"./MobileAppDrawer-voD2LpO-.js";import{F as pt}from"./FeaturePreviewScreen-DFD5zg_r.js";import{a as ee}from"./analyticsHelper-DkI5fHpv.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.js";import"./routePaths-DuYx1box.js";import"./BusinessVerificationPageScreen-Ct3CJnEw.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="2561e27d-a375-4a59-af61-e18e5dcf4025",t._sentryDebugIdIdentifier="sentry-dbid-2561e27d-a375-4a59-af61-e18e5dcf4025")}catch{}})();const mt=N(function(t,a){const{companyId:n}=a;return{treasurySetupView:P(t,n),analytics:b}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Te(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(We);function ft(){const t=B(),a=M(),n=U(),{tenantEmailDomain:o}=O(),p=_(),r=f(T=>T.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=Ke(r),s=V(p?.loggedInUserRoleMap),[c,i]=d.useState(!1),[y,w]=d.useState(!1),[u,l]=d.useState(!1),g=f(T=>D(T)),h=A.getSignedInUserTenant(o)?.companyId??g.companyId,I=A.getSignedInUser(),S=f(T=>P(T,h)),C=f(T=>T.treasurySetupViewState.fetchState),x=f(T=>T.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(T=>T.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(I==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{c||C!=="Not-Started"||h==null||(i(!0),n(ae(h,!0,!1)))},[c,C,h,n]),d.useEffect(()=>{u||F!=="Not-Started"||h==null||(l(!0),n(H()))},[u,F,h,n]),d.useEffect(()=>{y||x!=="Not-Started"||h==null||(w(!0),n(ne()))},[y,x,h,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(L,{to:"../promo"});const E=g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||C!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(mt,{navigate:t,location:a,companyId:h,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:b})]})}const yt=N(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:be(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:P(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{Z(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Z(a.analytics,"confirm",r,m,"Transfer"),t(ve())},onSaveChangesToLocalStore:s=>{t(Ee(s))},onFetchLinkTokenClick:s=>{t(Ae("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Je),gt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=O(),o=U(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[c,i]=d.useState(!1),[y,w]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),l=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),g=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),h=f(x=>D(x)),I=A.getSignedInUserTenant(n)?.companyId??h.companyId,S=f(x=>ke(x)),C=f(x=>P(x,I));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||I==null||(s(!0),o(ae(I,!0,!1)))},[m,u,I,o]),d.useEffect(()=>{c||l!=="Not-Started"||I==null||(i(!0),o(H()))},[c,l,I,o]),d.useEffect(()=>{y||g!=="Not-Started"||I==null||(w(!0),o(ne()))},[y,g,I,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(yt,{analytics:b,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:h,treasurySetupView:C,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{Z(b,"review",S.treasuryTransferMoneyLocalData,C.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},ht=R.div`
1
+ import{j as e}from"./liveblocks-DXiLz49w.js";import{j as B,u as M,h as U,l as O,g as f,N as L,k as N,n as Ce,o as b}from"./core-C_FlMzhB.js";import{ci as V,eM as D,Mx as P,D2 as ae,fb as K,CM as ne,Mz as we,D5 as Te,Mv as be,Mw as se,MN as ke,Bc as je,s1 as Ae,MB as Ee,Dg as ve,My as re,cL as W,w7 as oe,eQ as De,eS as Fe,NI as Le,NJ as Be,CN as Me,NK as Ue,CO as Pe,CX as Re,bu as Oe,bC as Ne,ct as Ve,bD as _e,cN as ze,fa as $e,br as Ge,If as He,ch as Ke}from"./zeni-epic-state-BP6Uj047.js";import{S as _,al as We,z as A,v as z,d as k,b_ as Ze,b$ as qe,c0 as H,K as Z,h as Je,J as Qe,I as Xe,s as ie,c as v,A as Ye,B as et,c1 as tt,ao as q,r as at,c2 as nt,q as J,c3 as st,w as X,c4 as rt,a4 as ot}from"./index-EyQIQQea.js";import{D as it,n as R,S as ct}from"./mui-D4wswOer.js";import lt from"./NotFoundScreen-B0Nlm2gz.js";import{S as Y}from"./SetupPagesScreen-CN2fXuK5.js";import{a as d}from"./sentry-C8WyuRaf.js";import{u as ut}from"./useAskAiCfoHostNavButtonProps-B_w7SPaL.js";import{c as dt}from"./useFetchSuggestedQuestionsWhenReady-CIJpTQVz.js";import{M as ce}from"./MobileAppDrawer-K2exKYWR.js";import{F as pt}from"./FeaturePreviewScreen-DJS-jmsS.js";import{a as ee}from"./analyticsHelper-xd4lZWd7.js";import"./recharts-BjJxsXby.js";import"./analytics-B8BYlogo.js";import"./plaid-CknlBCWN.js";import"./dnd-CTZ8xt4P.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bi_BmPss.js";import"./lexical-BmFHbDfb.js";import"./pdf-BUMfUQyN.js";import"./utils-l6Jt_9tl.js";import"./routePaths-ByBdv6j2.js";import"./BusinessVerificationPageScreen-DdszsNUv.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="35babbbf-0103-4adb-a697-bbda82a21254",t._sentryDebugIdIdentifier="sentry-dbid-35babbbf-0103-4adb-a697-bbda82a21254")}catch{}})();const mt=N(function(t,a){const{companyId:n}=a;return{treasurySetupView:P(t,n),analytics:k}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Te(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(Ze);function ft(){const t=B(),a=M(),n=U(),{tenantEmailDomain:o}=O(),p=_(),r=f(T=>T.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=We(r),s=V(p?.loggedInUserRoleMap),[c,i]=d.useState(!1),[y,w]=d.useState(!1),[u,l]=d.useState(!1),g=f(T=>D(T)),h=A.getSignedInUserTenant(o)?.companyId??g.companyId,I=A.getSignedInUser(),S=f(T=>P(T,h)),C=f(T=>T.treasurySetupViewState.fetchState),x=f(T=>T.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(T=>T.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(I==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{c||C!=="Not-Started"||h==null||(i(!0),n(ae(h,!0,!1)))},[c,C,h,n]),d.useEffect(()=>{u||F!=="Not-Started"||h==null||(l(!0),n(K()))},[u,F,h,n]),d.useEffect(()=>{y||x!=="Not-Started"||h==null||(w(!0),n(ne()))},[y,x,h,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(L,{to:"../promo"});const E=g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||C!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:k,onLoad:()=>{}}),e.jsx(mt,{navigate:t,location:a,companyId:h,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:k})]})}const yt=N(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:P(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{H(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{H(a.analytics,"confirm",r,m,"Transfer"),t(ve())},onSaveChangesToLocalStore:s=>{t(Ee(s))},onFetchLinkTokenClick:s=>{t(Ae("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(qe),gt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=O(),o=U(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[c,i]=d.useState(!1),[y,w]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),l=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),g=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),h=f(x=>D(x)),I=A.getSignedInUserTenant(n)?.companyId??h.companyId,S=f(x=>be(x)),C=f(x=>P(x,I));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||I==null||(s(!0),o(ae(I,!0,!1)))},[m,u,I,o]),d.useEffect(()=>{c||l!=="Not-Started"||I==null||(i(!0),o(K()))},[c,l,I,o]),d.useEffect(()=>{y||g!=="Not-Started"||I==null||(w(!0),o(ne()))},[y,g,I,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:k,onLoad:()=>{}}),e.jsx(yt,{analytics:k,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:h,treasurySetupView:C,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{H(k,"review",S.treasuryTransferMoneyLocalData,C.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},ht=R.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,11 +6,11 @@ import{j as e}from"./liveblocks-it_Rhm8-.js";import{j as B,u as M,h as U,l as O,
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${t=>t.theme.colors.grey4};
9
- `,St={overlayWidth:new Ye(100,100,48)},xt=N(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:P(t,o),downloadEndPoint:`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:c=>{let i="page-not-found";c==="editPortfolio"?i=It(s):c==="statements"?i=Ct(s):c==="taxLetter"?i=wt(s):c==="settings"&&(i=Tt(s));const y=at(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:y}})},onColumnSortConfigChanged:(c,i)=>{t(Le({uiState:{sortKey:c,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(tt);function G({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=M(),o=B(),p=U(),r=W(),m=Xe(),s=f(j=>D(j)),{tenantEmailDomain:c}=O(),i=s.companyId??A.getSignedInUserTenant(c)?.companyId,[y,w]=d.useState(!1),u=f(j=>re(j)),l=u.fetchState,g=u.accountSummary?.totalBalance?.amount,h=f(j=>j.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),I=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),C=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=V(S?.loggedInUserRoleMap),F=K(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=qe();d.useEffect(()=>{l==="Not-Started"&&!y&&E&&(w(!0),p(oe(!0)))},[y,p,l,E]),d.useEffect(()=>{u.transactionsFetchState.fetchState==="Completed"&&u.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[u.transactionsFetchState.fetchState,u.transactions.length]);const T=()=>{o("..")},[le,ue]=d.useState(!1),q=j=>{ue(j)},{isAiCfoOpen:de,setIsAiCfoOpen:pe}=Qe(),{isAiCfoAccessEnabled:me,onAskAiCfoClick:fe}=ut({isAiCfoOpen:de,setIsAiCfoOpen:pe,mobileExploreReferrer:"Treasury"});dt({isDataReady:l==="Completed"});const{useFeatureGate:$}=ie(),{isFeatureEnabled:ye}=$(v.isDebitCardFeatureEnabled),{isFeatureEnabled:ge}=$(v.isAutoTransferRuleEnabled),{isFeatureEnabled:he}=$(v.isTreasuryCommentingEnabled),Se=De(s),xe=Fe(ye,s);if(Se===!0&&xe!==!0)return e.jsx(pt,{});if(I){const j=h?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&h?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:b,onLoad:()=>{}}):null,e.jsx(it,{onClose:T,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:St.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(kt,{onClick:Ie=>Ie.stopPropagation(),children:[t===!0?e.jsx(gt,{isFirstTransfer:u.transactions.length===0||g===0}):null,a===!0?e.jsx(ft,{}):null]})}),e.jsxs(ht,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:q}),e.jsx(xt,{treasuryDetailsView:u,isAutoTransferRuleEnabled:ge,navigate:o,currentTenant:s,location:n,companyId:i,analytics:b,isTreasuryCommentingEnabled:he,handleDrawerToggle:q,isLoading:j,isAiCfoAccessEnabled:me,onAskAiCfoClick:fe})]})]})}return C&&x?e.jsx(L,{to:"../setup"}):s.companyTreasuryInfo?.info&&!C&&F?e.jsx(L,{to:"../promo",state:n.state}):e.jsx(et,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const It=t=>`/${t}/treasury/edit-portfolio`,Ct=t=>`/${t}/treasury/statements`,wt=t=>`/${t}/treasury/tax-letter`,Tt=t=>`/${t}/treasury/setup`,kt=R(ct)`
9
+ `,St={overlayWidth:new Ye(100,100,48)},xt=N(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:P(t,o),downloadEndPoint:`${q.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:c=>{let i="page-not-found";c==="editPortfolio"?i=It(s):c==="statements"?i=Ct(s):c==="taxLetter"?i=wt(s):c==="settings"&&(i=Tt(s));const y=at(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:y}})},onColumnSortConfigChanged:(c,i)=>{t(Le({uiState:{sortKey:c,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(tt);function G({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=M(),o=B(),p=U(),r=Z(),m=Je(),s=f(j=>D(j)),{tenantEmailDomain:c}=O(),i=s.companyId??A.getSignedInUserTenant(c)?.companyId,[y,w]=d.useState(!1),u=f(j=>re(j)),l=u.fetchState,g=u.accountSummary?.totalBalance?.amount,h=f(j=>j.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),I=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),C=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=V(S?.loggedInUserRoleMap),F=W(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=Qe();d.useEffect(()=>{l==="Not-Started"&&!y&&E&&(w(!0),p(oe(!0)))},[y,p,l,E]),d.useEffect(()=>{u.transactionsFetchState.fetchState==="Completed"&&u.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[u.transactionsFetchState.fetchState,u.transactions.length]);const T=()=>{o("..")},[le,ue]=d.useState(!1),Q=j=>{ue(j)},{isAiCfoOpen:de,setIsAiCfoOpen:pe}=Xe(),{isAiCfoAccessEnabled:me,onAskAiCfoClick:fe}=ut({isAiCfoOpen:de,setIsAiCfoOpen:pe,mobileExploreReferrer:"Treasury"});dt({isDataReady:l==="Completed"});const{useFeatureGate:$}=ie(),{isFeatureEnabled:ye}=$(v.isDebitCardFeatureEnabled),{isFeatureEnabled:ge}=$(v.isAutoTransferRuleEnabled),{isFeatureEnabled:he}=$(v.isTreasuryCommentingEnabled),Se=De(s),xe=Fe(ye,s);if(Se===!0&&xe!==!0)return e.jsx(pt,{});if(I){const j=h?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&h?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:k,onLoad:()=>{}}):null,e.jsx(it,{onClose:T,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:St.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(bt,{onClick:Ie=>Ie.stopPropagation(),children:[t===!0?e.jsx(gt,{isFirstTransfer:u.transactions.length===0||g===0}):null,a===!0?e.jsx(ft,{}):null]})}),e.jsxs(ht,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:Q}),e.jsx(xt,{treasuryDetailsView:u,isAutoTransferRuleEnabled:ge,navigate:o,currentTenant:s,location:n,companyId:i,analytics:k,isTreasuryCommentingEnabled:he,handleDrawerToggle:Q,isLoading:j,isAiCfoAccessEnabled:me,onAskAiCfoClick:fe})]})]})}return C&&x?e.jsx(L,{to:"../setup"}):s.companyTreasuryInfo?.info&&!C&&F?e.jsx(L,{to:"../promo",state:n.state}):e.jsx(et,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const It=t=>`/${t}/treasury/edit-portfolio`,Ct=t=>`/${t}/treasury/statements`,wt=t=>`/${t}/treasury/tax-letter`,Tt=t=>`/${t}/treasury/setup`,bt=R(ct)`
10
10
  display: flex;
11
11
  min-height: 100%;
12
12
  flex-direction: column;
13
- `,bt=R.div`
13
+ `,kt=R.div`
14
14
  display: flex;
15
15
  height: 100vh;
16
16
  width: 100%;
@@ -18,7 +18,7 @@ import{j as e}from"./liveblocks-it_Rhm8-.js";import{j as B,u as M,h as U,l as O,
18
18
  flex-direction: column;
19
19
  align-items: center;
20
20
  background-color: ${t=>t.theme.colors.grey4};
21
- `;function jt(){const t=B(),a=U(),n=W(),o=M(),p=`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Be(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Me(!1)))},[r,s.fetchState,a]);const c=A.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},w=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(bt,{windowSize:n,children:e.jsx(nt,{currentTenantCompanyName:w,statementListView:s,isLoading:u,onBackClick:()=>{const l=X(o.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const At=R.div`
21
+ `;function jt(){const t=B(),a=U(),n=Z(),o=M(),p=`${q.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Be(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Me(!1)))},[r,s.fetchState,a]);const c=A.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},w=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(kt,{windowSize:n,children:e.jsx(nt,{currentTenantCompanyName:w,statementListView:s,isLoading:u,onBackClick:()=>{const l=J(o.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const At=R.div`
22
22
  display: flex;
23
23
  height: 100vh;
24
24
  width: 100%;
@@ -26,7 +26,7 @@ import{j as e}from"./liveblocks-it_Rhm8-.js";import{j as B,u as M,h as U,l as O,
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  background-color: ${t=>t.theme.colors.grey4};
29
- `;function Et(){const t=B(),a=W(),n=M(),o=U(),p=`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Ue(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Pe(!1)))},[r,s.fetchState,o]);const c=A.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},w=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access tax letter page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(At,{windowSize:a,children:e.jsx(st,{currentTenantCompanyName:w,taxLetterListView:s,isLoading:u,onBackClick:()=>{const l=X(n.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const vt=N(function(t,a){const{companyId:n}=a,o=P(t,n);return{treasurySetupView:o,isSetupComplete:o.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk",meetingUrl:"https://meetings.hubspot.com/yoshi-araki/treasury-product-schedule-demo-link?embed=true"}},function(t,a){const{navigate:n,companyId:o}=a;return{onSetupButtonClick:()=>{t(Re(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(rt),Dt=()=>{const t=B(),a=M(),n=U(),{tenantEmailDomain:o}=O(),[p,r]=d.useState(!1),m=f(S=>D(S)),[s,c]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||y==null||(c(!0),n(H()))},[i,n]);const y=A.getSignedInUserTenant(o)?.companyId??m.companyId,w=A.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,l=S=>{r(S)};if(w==null)throw Error("Can't access treasury promo page without signing in...");const g=_(),h=V(g?.loggedInUserRoleMap),I=K(g?.loggedInUserRoleMap);if(u&&h)return e.jsx(L,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&h||I)){if(a.state?.message==="activation"){const S=X(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:S.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(Q,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:S=>(C=>C.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:l}),e.jsx(vt,{analytics:b,navigate:t,companyId:y,onClickMenuIcon:()=>{l(!0)}})]})}return e.jsx(te,{children:e.jsx(Q,{size:"ExtraLarge",start:!0})})},te=R.div`
29
+ `;function Et(){const t=B(),a=Z(),n=M(),o=U(),p=`${q.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Ue(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Pe(!1)))},[r,s.fetchState,o]);const c=A.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},w=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access tax letter page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(At,{windowSize:a,children:e.jsx(st,{currentTenantCompanyName:w,taxLetterListView:s,isLoading:u,onBackClick:()=>{const l=J(n.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const vt=N(function(t,a){const{companyId:n}=a,o=P(t,n);return{treasurySetupView:o,isSetupComplete:o.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk",meetingUrl:"https://meetings.hubspot.com/yoshi-araki/treasury-product-schedule-demo-link?embed=true"}},function(t,a){const{navigate:n,companyId:o}=a;return{onSetupButtonClick:()=>{t(Re(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(rt),Dt=()=>{const t=B(),a=M(),n=U(),{tenantEmailDomain:o}=O(),[p,r]=d.useState(!1),m=f(S=>D(S)),[s,c]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||y==null||(c(!0),n(K()))},[i,n]);const y=A.getSignedInUserTenant(o)?.companyId??m.companyId,w=A.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,l=S=>{r(S)};if(w==null)throw Error("Can't access treasury promo page without signing in...");const g=_(),h=V(g?.loggedInUserRoleMap),I=W(g?.loggedInUserRoleMap);if(u&&h)return e.jsx(L,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&h||I)){if(a.state?.message==="activation"){const S=J(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:S.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:k,onLoad:S=>(C=>C.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:l}),e.jsx(vt,{analytics:k,navigate:t,companyId:y,onClickMenuIcon:()=>{l(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=R.div`
30
30
  display: flex;
31
31
  width: 100%;
32
32
  height: 100%;
@@ -34,4 +34,4 @@ import{j as e}from"./liveblocks-it_Rhm8-.js";import{j as B,u as M,h as U,l as O,
34
34
  justify-content: center;
35
35
  align-items: center;
36
36
  background-color: ${t=>t.theme.colors.grey5};
37
- `;function ta(){const t=M(),a=f(E=>D(E)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(v.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=K(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Oe(a?.userRole),c=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ne(r?.loggedInUserRoleMap),i=Ve(r?.loggedInUserRoleMap),y=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&_e(r?.loggedInUserRoleMap),{isFeatureEnabled:w}=n(v.isDepositAccountsFeatureEnabled),u=w&&!s&&ze(r?.loggedInUserRoleMap),l=a.company!=null&&$e(a.company),g=o&&l===!0&&!s&&V(r?.loggedInUserRoleMap),{isFeatureEnabled:h}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:I}=n(v.isDebitCardFeatureEnabled),S=ot(a,h,I)&&!s&&Ge(r?.loggedInUserRoleMap),C=Ze(r?.loggedInUserRoleMap),x=He(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Ce,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:C,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:C,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(Dt,{})}),e.jsx(k,{path:"statements",element:e.jsx(jt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(Et,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx(G,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),g?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx(G,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx(G,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(lt,{})})]}):p&&g?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ta as default};
37
+ `;function ta(){const t=M(),a=f(E=>D(E)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(v.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=W(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Oe(a?.userRole),c=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ne(r?.loggedInUserRoleMap),i=Ve(r?.loggedInUserRoleMap),y=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&_e(r?.loggedInUserRoleMap),{isFeatureEnabled:w}=n(v.isDepositAccountsFeatureEnabled),u=w&&!s&&ze(r?.loggedInUserRoleMap),l=a.company!=null&&$e(a.company),g=o&&l===!0&&!s&&V(r?.loggedInUserRoleMap),{isFeatureEnabled:h}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:I}=n(v.isDebitCardFeatureEnabled),S=ot(a,h,I)&&!s&&Ge(r?.loggedInUserRoleMap),C=He(r?.loggedInUserRoleMap),x=Ke(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Ce,{children:[x?null:e.jsx(b,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:C,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(b,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:C,productType:"zeni_treasury",type:"verification"})}),e.jsx(b,{path:"promo",element:e.jsx(Dt,{})}),e.jsx(b,{path:"statements",element:e.jsx(jt,{})}),e.jsx(b,{path:"tax-letter",element:e.jsx(Et,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(b,{path:"/",element:e.jsx(G,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),g?e.jsxs(e.Fragment,{children:[e.jsx(b,{path:"edit-portfolio",element:e.jsx(G,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(b,{path:"transfer",element:e.jsx(G,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(b,{path:"*",element:e.jsx(lt,{})})]}):p&&g?e.jsx(b,{path:"*",element:e.jsx(L,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(b,{path:"*",element:e.jsx(L,{to:"../promo",state:t.state})}):e.jsx(b,{path:"*",element:null})]})}export{ta as default};
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-it_Rhm8-.js";import{a as g}from"./sentry-C-hGmJ4T.js";import{j as M,u as q,l as J,g as S,k as G,h as Y,n as nt,o as B,N as K}from"./core-BF8mCLAO.js";import{eM as O,Jd as Ee,Je as Ue,fK as ee,co as be,cp as ke,uI as ft,Jf as st,uM as Yt,Hq as te,jm as ae,uG as qt,uA as Ht,Jg as Ne,us as Qt,ur as Wt,ul as Zt,ux as Xt,uN as ea,Jh as pe,Ji as Me,ut as ta,Jj as he,eX as gt,v0 as vt,uV as xt,Jk as Tt,nO as Ct,uQ as yt,uO as Dt,Jl as It,v7 as Et,v4 as bt,uR as kt,v6 as Ge,FS as wt,Jm as aa,Jn as na,cr as sa,Jo as oa,Jp as la,Jq as me,Jr as ce,Js as we,Hr as $e,vm as ye,Hp as De,v9 as At,uJ as Ke,Jt as ia,Hs as Q,Ju as ze,uD as ca,Jv as da,Jw as ra,Jx as Ye,Jy as qe,Jz as He,JA as Qe,vg as Ae,JB as jt,uZ as Ft,JC as ua,JD as pa,JE as ha,JF as ma,JG as Sa,JH as fa,JI as ga,JJ as va,sd as xa,se as Ta,Gw as Fe,JK as Ca,JL as ya,iL as Pe,bp as Da,JM as Ia,JN as Ea,kk as ba,kt as ka,Gv as _e,bB as ot,JO as Pt,Gb as _t,JP as wa,JQ as Aa,JR as ja,kv as Fa,JS as lt,JT as it,JU as ct,JV as dt,JW as Pa,kr as _a,JX as Va,ku as La,JY as Oa,JZ as Vt,GS as Lt,jK as Ba,J_ as Ja,J$ as Ve,K0 as Ot,GQ as Bt,xz as Ra,K1 as Ua,K2 as Na,k2 as Jt,K3 as Ma,K4 as Ga,H2 as $a,pV as Ka,K5 as Rt,K6 as rt,G$ as Le,K7 as ut,K8 as za,H4 as Ya,K9 as qa,Ka as Ha,Kb as Qa,Kc as Wa,Kd as Za,pY as Xa,Ke as en,Ht as tn,Kf as an,GJ as Oe,gt as nn,Kg as sn,Kh as on,gr as ln,Ki as cn,Kj as dn,xD as rn,Kk as un,Kl as pn,Km as hn,Kn as mn,jO as Sn,bm as fn,eS as gn,eQ as vn}from"./zeni-epic-state-Ds1G4QGX.js";import{z as R,al as Be,r as Ut,v as Z,e as P,Q as X,ar as xn,n as N,O as Ie,q as de,as as We,at as Tn,au as Cn,p as Ze,av as yn,h as Dn,K as re,A as Xe,s as ne,d as z,aw as In,j as et,H as Se,ax as En,ay as Nt,I as bn,az as kn,S as wn,aA as An,ao as Mt,aB as jn,o as W,x as Fn,E as Gt,F as Pn,aC as _n,aD as Vn,g as tt,aE as Ln,aF as On,k as Bn,aG as Jn,aH as Rn}from"./index-NPabbksF.js";import{n as U,D as Un,S as $t}from"./mui-B87RTrAV.js";import{t as Nn,A as Mn}from"./AddressScreen-TNOlKW9-.js";import ie from"./NotFoundScreen-Cryu2QFy.js";import{F as Gn}from"./FeaturePreviewScreen-DFD5zg_r.js";import{b as H,v as at,c as $n}from"./routePaths-DuYx1box.js";import{p as Kt}from"./pathToGoBack-_pwiC6EH.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-BTitwH51.js";import{c as ge}from"./useFetchSuggestedQuestionsWhenReady-Dv4iLJ0Q.js";import{M as ve}from"./MobileAppDrawer-voD2LpO-.js";import{D as Kn}from"./DrawerScreen-C1N2vxzH.js";import{g as zn,m as Yn}from"./accountMappingHelper-DpblOBXy.js";import"./recharts-BBMAmq_A.js";import"./analytics-BSnG8C1z.js";import"./plaid-lXH1vlKo.js";import"./dnd-BwvUecBQ.js";import"./stripe-DMRn4zHo.js";import"./lottie-CJdx3HBv.js";import"./lexical-BHRXj1_E.js";import"./pdf-oE7nS36B.js";import"./utils-C4NhxqJn.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="cc3b689f-63d8-483d-88c0-31fbbf1a98dc",e._sentryDebugIdIdentifier="sentry-dbid-cc3b689f-63d8-483d-88c0-31fbbf1a98dc")}catch{}})();const qn=Ie.getLocalizedStrings(),Hn=G(function(e,a){const s=Ue(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(st({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(st({selectedTransaction:void 0})),e(Yt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${H(n,a.tenantEmailDomain)}`,c=N(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(ft(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(xn),Qn=({setShouldNavigateBack:e})=>{const a=M(),s=q(),{scheduleDetailId:t,tenantEmailDomain:n}=J(),{scheduleType:o}=J();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>O(f)),d=Ee(o)??"accrued_expenses",u=R.getSignedInUser();if(u==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Ue(f,d)),m=i.selectedJELinkRowIndex,r=S(f=>ee(f,c.companyId)),p=Be(i.updateStatus.fetchState);g.useEffect(()=>{p==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[p,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const h=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Ut,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[h===!0?l.jsx(Z,{analytics:P,onLoad:()=>{Wn(i,d,r)}}):null,l.jsx(Hn,{signedInUser:u,attachmentEndPoint:`${X}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:d,navigate:a,analytics:P,controllerUserDetails:r,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},zt=e=>{const a=qn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Wn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,d=c.some(m=>m.isRecommendedTransaction===!0),u=be(s.controllers),i=ke(s.controllerUserIds);t!=null&&P.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...zt(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:d,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:u,controllerUserIds:i})},Zn=U.div`
1
+ import{j as l}from"./liveblocks-DXiLz49w.js";import{a as g}from"./sentry-C8WyuRaf.js";import{j as M,u as q,l as J,g as S,k as G,h as Y,n as nt,o as B,N as K}from"./core-C_FlMzhB.js";import{eM as O,Jd as Ee,Je as Ue,fK as ee,co as be,cp as ke,uI as ft,Jf as st,uM as Yt,Hq as te,jm as ae,uG as qt,uA as Ht,Jg as Ne,us as Qt,ur as Wt,ul as Zt,ux as Xt,uN as ea,Jh as pe,Ji as Me,ut as ta,Jj as he,eX as gt,v0 as vt,uV as xt,Jk as Tt,nO as Ct,uQ as yt,uO as Dt,Jl as It,v7 as Et,v4 as bt,uR as kt,v6 as Ge,FS as wt,Jm as aa,Jn as na,cr as sa,Jo as oa,Jp as la,Jq as me,Jr as ce,Js as we,Hr as $e,vm as ye,Hp as De,v9 as At,uJ as Ke,Jt as ia,Hs as Q,Ju as ze,uD as ca,Jv as da,Jw as ra,Jx as Ye,Jy as qe,Jz as He,JA as Qe,vg as Ae,JB as jt,uZ as Ft,JC as ua,JD as pa,JE as ha,JF as ma,JG as Sa,JH as fa,JI as ga,JJ as va,sd as xa,se as Ta,Gw as Fe,JK as Ca,JL as ya,iL as Pe,bp as Da,JM as Ia,JN as Ea,kk as ba,kt as ka,Gv as _e,bB as ot,JO as Pt,Gb as _t,JP as wa,JQ as Aa,JR as ja,kv as Fa,JS as lt,JT as it,JU as ct,JV as dt,JW as Pa,kr as _a,JX as Va,ku as La,JY as Oa,JZ as Vt,GS as Lt,jK as Ba,J_ as Ja,J$ as Ve,K0 as Ot,GQ as Bt,xz as Ra,K1 as Ua,K2 as Na,k2 as Jt,K3 as Ma,K4 as Ga,H2 as $a,pV as Ka,K5 as Rt,K6 as rt,G$ as Le,K7 as ut,K8 as za,H4 as Ya,K9 as qa,Ka as Ha,Kb as Qa,Kc as Wa,Kd as Za,pY as Xa,Ke as en,Ht as tn,Kf as an,GJ as Oe,gt as nn,Kg as sn,Kh as on,gr as ln,Ki as cn,Kj as dn,xD as rn,Kk as un,Kl as pn,Km as hn,Kn as mn,jO as Sn,bm as fn,eS as gn,eQ as vn}from"./zeni-epic-state-BP6Uj047.js";import{z as R,al as Be,B as Ut,v as Z,d as P,T as X,ar as xn,r as N,D as Ie,E as de,as as We,at as Tn,au as Cn,q as Ze,av as yn,h as Dn,K as re,A as Xe,s as ne,c as z,aw as In,j as et,I as Se,ax as En,ay as Nt,J as bn,az as kn,S as wn,aA as An,ao as Mt,aB as jn,o as W,x as Fn,F as Gt,G as Pn,aC as _n,aD as Vn,f as tt,aE as Ln,aF as On,p as Bn,aG as Jn,aH as Rn}from"./index-EyQIQQea.js";import{n as U,D as Un,S as $t}from"./mui-D4wswOer.js";import{t as Nn,A as Mn}from"./AddressScreen-CYHsPgWj.js";import ie from"./NotFoundScreen-B0Nlm2gz.js";import{F as Gn}from"./FeaturePreviewScreen-DJS-jmsS.js";import{b as H,v as at,c as $n}from"./routePaths-ByBdv6j2.js";import{p as Kt}from"./pathToGoBack-D9SmrC7Q.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-B_w7SPaL.js";import{c as ge}from"./useFetchSuggestedQuestionsWhenReady-CIJpTQVz.js";import{M as ve}from"./MobileAppDrawer-K2exKYWR.js";import{D as Kn}from"./DrawerScreen-BjiSvp6m.js";import{g as zn,m as Yn}from"./accountMappingHelper-CJzGKxCi.js";import"./recharts-BjJxsXby.js";import"./analytics-B8BYlogo.js";import"./plaid-CknlBCWN.js";import"./dnd-CTZ8xt4P.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bi_BmPss.js";import"./lexical-BmFHbDfb.js";import"./pdf-BUMfUQyN.js";import"./utils-l6Jt_9tl.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="4da877b4-cc35-4a9a-a5b6-6e93d3dfa686",e._sentryDebugIdIdentifier="sentry-dbid-4da877b4-cc35-4a9a-a5b6-6e93d3dfa686")}catch{}})();const qn=Ie.getLocalizedStrings(),Hn=G(function(e,a){const s=Ue(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(st({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(st({selectedTransaction:void 0})),e(Yt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${H(n,a.tenantEmailDomain)}`,c=N(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(ft(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(xn),Qn=({setShouldNavigateBack:e})=>{const a=M(),s=q(),{scheduleDetailId:t,tenantEmailDomain:n}=J(),{scheduleType:o}=J();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>O(f)),d=Ee(o)??"accrued_expenses",u=R.getSignedInUser();if(u==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Ue(f,d)),m=i.selectedJELinkRowIndex,r=S(f=>ee(f,c.companyId)),p=Be(i.updateStatus.fetchState);g.useEffect(()=>{p==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[p,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const h=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Ut,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[h===!0?l.jsx(Z,{analytics:P,onLoad:()=>{Wn(i,d,r)}}):null,l.jsx(Hn,{signedInUser:u,attachmentEndPoint:`${X}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:d,navigate:a,analytics:P,controllerUserDetails:r,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},zt=e=>{const a=qn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Wn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,d=c.some(m=>m.isRecommendedTransaction===!0),u=be(s.controllers),i=ke(s.controllerUserIds);t!=null&&P.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...zt(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:d,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:u,controllerUserIds:i})},Zn=U.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -0,0 +1,12 @@
1
+ import{j as o}from"./liveblocks-DXiLz49w.js";import{a as f}from"./sentry-C8WyuRaf.js";import{q as u,h,g as y,N as I}from"./core-C_FlMzhB.js";import{Iz as b,eN as w,yU as x}from"./zeni-epic-state-BP6Uj047.js";import{z as l,B as j,F as S,G as D}from"./index-EyQIQQea.js";import{n as c}from"./mui-D4wswOer.js";import"./recharts-BjJxsXby.js";import"./analytics-B8BYlogo.js";import"./plaid-CknlBCWN.js";import"./dnd-CTZ8xt4P.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bi_BmPss.js";import"./lexical-BmFHbDfb.js";import"./pdf-BUMfUQyN.js";import"./utils-l6Jt_9tl.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]="6be182de-458e-4432-9779-ccf73d5f8559",e._sentryDebugIdIdentifier="sentry-dbid-6be182de-458e-4432-9779-ccf73d5f8559")}catch{}})();const W=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=f.useState(!1),a=h(),i=y(m=>b(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(p(!0),a(x(t,g,s)))},[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},E=c.div`
2
+ display: flex;
3
+ width: 100%;
4
+ height: 100vh;
5
+ flex-direction: row;
6
+ justify-content: center;
7
+ align-items: center;
8
+ background-color: ${e=>e.theme.colors.grey5};
9
+ `,_=c(D.LargeRegular)`
10
+ display: flex;
11
+ color: ${S.important};
12
+ `;export{W as default};
@@ -0,0 +1,66 @@
1
+ import{j as n}from"./liveblocks-DXiLz49w.js";import{j as G,u as W,h as N,l as Z,g as A,k as Y,N as ne,n as $e,o as C}from"./core-C_FlMzhB.js";import{eM as V,Nn as ke,No as Ze,cN as te,ci as He,fa as Ge,w5 as we,Ai as We,v$ as Fn,Np as Rn,Nq as Un,w2 as Ln,w9 as Ce,vY as Mn,vV as zn,Ma as pe,Nr as Nn,DC as Vn,Jg as _n,DE as $n,k3 as Fe,Ns as Zn,pA as Ye,po as Je,jW as qe,jZ as Re,Jh as Ue,Ji as Hn,Nt as Gn,jY as Wn,kj as Yn,jN as Jn,ij as qn,ii as Kn,Nu as Qn,Nv as xe,Dj as Xn,Nw as et,Nx as nt,M3 as De,Ny as Le,Nz as tt,DP as at,MN as ot,Bc as Ke,s1 as Qe,NA as st,DM as it,NB as Xe,cJ as Ie,DT as en,fb as rt,eQ as nn,eS as Se,DR as ct,B6 as lt,DJ as dt,NC as tn,ND as an,Dl as on,Dv as Me,NE as ut,Dp as pt,NF as mt,MC as ht,DU as gt,bu as ft,bC as yt,ct as Ct,bD as xt,br as At,If as kt}from"./zeni-epic-state-BP6Uj047.js";import{S as ae,s as $,z as w,c as O,h as L,B as oe,bO as wt,T as be,K as _,A as J,q as sn,al as Dt,aa as ze,d as U,bP as It,ao as ve,bQ as St,v as me,bR as bt,f as je,aI as H,bS as vt,J as jt,I as rn,a7 as Et,bT as Ne,bU as Pt,r as ee,bV as Tt,bW as Bt,bX as Ot,bY as Ft,a4 as Rt,o as Ut}from"./index-EyQIQQea.js";import{n as M,D as q,S as K}from"./mui-D4wswOer.js";import ue from"./NotFoundScreen-B0Nlm2gz.js";import{S as Ve}from"./SetupPagesScreen-CN2fXuK5.js";import{F as cn}from"./FeaturePreviewScreen-DJS-jmsS.js";import{a as d}from"./sentry-C8WyuRaf.js";import{M as he}from"./MobileAppDrawer-K2exKYWR.js";import{A as Lt,D as Mt,V as zt}from"./DomesticWireDetailScreen-Ddx0pXf8.js";import{A as Nt}from"./AddressScreen-CYHsPgWj.js";import{u as ln}from"./useAskAiCfoHostNavButtonProps-B_w7SPaL.js";import{c as dn}from"./useFetchSuggestedQuestionsWhenReady-CIJpTQVz.js";import{Z as Vt}from"./ZeniAccountStatementScreen-DWrx5fNs.js";import"./recharts-BjJxsXby.js";import"./analytics-B8BYlogo.js";import"./plaid-CknlBCWN.js";import"./dnd-CTZ8xt4P.js";import"./stripe-DMRn4zHo.js";import"./lottie-Bi_BmPss.js";import"./lexical-BmFHbDfb.js";import"./pdf-BUMfUQyN.js";import"./utils-l6Jt_9tl.js";import"./analyticsHelper-xd4lZWd7.js";import"./routePaths-ByBdv6j2.js";import"./BusinessVerificationPageScreen-DdszsNUv.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]="76702844-4662-4934-a74e-2e85f4a3de0e",e._sentryDebugIdIdentifier="sentry-dbid-76702844-4662-4934-a74e-2e85f4a3de0e")}catch{}})();const _t=M.div`
2
+ display: flex;
3
+ min-height: 100%;
4
+ width: 100%;
5
+ flex: 1 1 auto;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ background-color: ${e=>e.theme.colors.grey4};
9
+ `,$t=Y(function(e){return{autoTransferRuleView:ke(e),downloadAccountDetailEndPoint:`${be}/account_details`,transferLimit:5e5,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){const{navigate:s,handleDrawerToggle:o}=t;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{o(!0)},onFetchAutoTransferRules:a=>{e(we(a))},onCreateRule:()=>{e(zn())},onUpdateRule:a=>{e(Ce(a))},onDeleteClick:a=>{e(Mn(a))},onPauseClick:a=>{e(Ce(a,!0,!1))},onResumeClick:a=>{e(Ce(a,!1,!0))},onActivityClick:(a,i)=>{e(Ln(a,i))},onUpdateRuleLocalData:a=>{e(Un(a))},clearRuleLocalData:()=>{e(Rn())},onEditClick:a=>{s(`./${a}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Fn())}}})(wt);function _e({isEditDrawerOpen:e}){const t=G(),s=W(),o=N(),a=ae(),{ruleId:i,tenantEmailDomain:l}=Z(),{useFeatureGate:c}=$(),[u,h]=d.useState(!1),[x,r]=d.useState(!1),p=A(S=>V(S)),m=A(S=>ke(S)),g=m?.fetchState??"Not-Started",v=A(S=>Ze(S)),y=p?.companyId??w.getSignedInUserTenant(l)?.companyId,k=te(a?.loggedInUserRoleMap)||He(a?.loggedInUserRoleMap),{isFeatureEnabled:I}=c(O.isTreasuryEnabled),f=p?.company!=null&&Ge(p.company),D=I&&f,T=w.getSignedInUser(),z=p.tenantId,F={userId:T?.userId??"",sessionId:T?.zeniSessionId??"",tenantId:z??""};d.useEffect(()=>{!x&&g==="Not-Started"&&y&&(r(!0),o(we(!0)))},[x,g,y,o]);const j=S=>{h(S)},P=L(),B=!!s.state?.scrollToAddRule;return m?.fetchState!=="Completed"?n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:P.colors.grey5}}):n.jsxs(_t,{children:[n.jsx(he,{isAppContentDrawerOpen:u,handleDrawerToggle:j}),n.jsx($t,{navigate:t,location:s,currentTenant:p,handleDrawerToggle:j,isEditDrawerOpen:e,editingRuleId:i,authParams:F,includeTreasuryOption:D,hasAdminLevelAccess:k,zeniAccountsConfigDetail:v,scrollToAddRule:B})]})}const Zt={overlayWidth:new J(100,100,58)},Ht=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=N(),a=L(),i=_();if(w.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(q,{onClose:()=>{s(!0),o(pe())},anchor:"right",open:t,PaperProps:{style:{width:Zt.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Gt,{onClick:l=>l.stopPropagation(),children:n.jsx(Lt,{vendorIdParam:e,accountContext:"express-pay"})})})},Gt=M(K)`
10
+ display: flex;
11
+ min-height: 100%;
12
+ flex-direction: column;
13
+ `,Wt={overlayWidth:new J(100,100,58)},Yt=({isDrawerOpen:e,closeDrawerHandler:t})=>{const s=N(),o=L(),a=_();if(w.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(q,{onClose:()=>{t(!0),s(pe())},anchor:"right",open:e,PaperProps:{style:{width:Wt.overlayWidth.valuePercentage(a),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Jt,{onClick:i=>i.stopPropagation(),children:n.jsx(Nt,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Jt=M(K)`
14
+ display: flex;
15
+ min-height: 100%;
16
+ flex-direction: column;
17
+ `,qt={overlayWidth:new J(100,100,58)},Kt=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=N(),a=L(),i=_();if(w.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(q,{onClose:()=>{s(!0),o(pe())},anchor:"right",open:t,PaperProps:{style:{width:qt.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Qt,{onClick:l=>l.stopPropagation(),children:n.jsx(Mt,{vendorIdParam:e,accountContext:"express-pay"})})})},Qt=M(K)`
18
+ display: flex;
19
+ min-height: 100%;
20
+ flex-direction: column;
21
+ `,Xt=M.div`
22
+ display: flex;
23
+ height: 100vh;
24
+ width: 100%;
25
+ flex: 1 1 auto;
26
+ flex-direction: column;
27
+ align-items: center;
28
+ background-color: ${e=>e.theme.colors.grey4};
29
+ `,ea=Y(function(e,t){const s=V(e),o=w.getSignedInUser(),a=s.tenantId,i={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:a??""},l=t.expressPayDetails,c=e.entityAutoCompleteState.autoCompleteText.common,u=_n(e,"common");return{expressPayDetails:l,fileProps:{authParams:i,filesEndPoint:`${ve.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:u},analytics:t.analytics}},function(e,t){const{navigate:s}=t;return{onSaveVendor:o=>{e(Kn(o,void 0,void 0,!0))},saveVendorDetailLocalData:(o,a)=>{e(Re({vendorId:a,localData:o}))},saveExpressPayLocalData:o=>{e(qn({localData:o}))},onVendorSelected:o=>{o!=null&&e(Jn(o,!1))},updateSelectedVendorForCreate:o=>{e(Yn(o))},initializeVendorAddress:()=>{e(Wn())},resetVendorSaveStatus:o=>{e(Gn({vendorId:o}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,a)=>{o.trim().length>=2?e(Hn({searchString:o,entityType:a,searchOrigin:"common"})):o.trim().length===0&&e(Ue("common"))},onCancelAutoComplete:()=>{e(Ue("common"))}},chooseNewVendor:o=>{e(Re({localData:{vendorName:o}}))},onClickAddAccount:o=>{o.method.toLowerCase().indexOf("ach")!==-1?s("./add-ach",{relative:"path"}):o.method.toLowerCase().indexOf("wire")!==-1&&o.method.toLowerCase().indexOf("domestic")!==-1&&s("./add-wire",{relative:"path"})},updateFilesEntity:o=>{e(qe({files:o}))},onDeleteFile:o=>{e(Je(o))},onEditFileName:(o,a)=>{e(Ye(o,a.split(".")[0]))},onBackClick:o=>{o!=null&&e(Fe(o)),e(Fe()),e(Zn()),e(pe()),s("../",{relative:"path"})},onSchedulePayment:()=>{e($n())}}})(It);function le({isAddACHDrawerOpen:e,isAddWireDrawerOpen:t,isAddAddressDrawerOpen:s}){const o=G(),a=W(),i=N(),[l,c]=d.useState(!1),{tenantEmailDomain:u}=Z(),h=ae(),x=L(),r=A(E=>E.expressPayState.fetchState),p=A(E=>V(E)),m=A(E=>Nn(E)),g=m.expressPayLocalData?.vendorId,v=p.companyId??w.getSignedInUserTenant(u)?.companyId,[y,k]=d.useState(!1),[I,f]=d.useState(!1),[D,T]=d.useState(!1),z=sn(a.state?.pathnameStackToGoBack),{poppedPathname:F}=z,j=F?.split("/"),P=j?.[j.length-1];d.useEffect(()=>{e===!0?k(!0):(k(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{t===!0?f(!0):(f(!1),document.body.style.overflow="auto")},[t]),d.useEffect(()=>{s===!0?T(!0):(T(!1),document.body.style.overflow="auto")},[s]),d.useEffect(()=>{r==="Not-Started"&&i(Vn(!0,!0))},[r,i]);const B=Dt(m.vendorViewDetails.bankAccountCreationState?.fetchState);if(d.useEffect(()=>{B==="In-Progress"&&m.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&b()},[B,m.vendorViewDetails.bankAccountCreationState?.fetchState]),w.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const S=E=>{c(E)},b=()=>{k(!1),f(!1),o("../",{relative:"path"})};return m.fetchState==="Completed"?n.jsxs(Xt,{children:[ze(a)?n.jsx(he,{isAppContentDrawerOpen:l,handleDrawerToggle:S}):null,y===!0?n.jsx(Ht,{vendorId:g,closeDrawerHandler:b,isDrawerOpen:y}):null,I===!0?n.jsx(Kt,{vendorId:g,closeDrawerHandler:b,isDrawerOpen:I}):null,D===!0?n.jsx(Yt,{closeDrawerHandler:b,isDrawerOpen:D}):null,n.jsx(zt,{vendorId:g,isExpressPayPage:!0}),n.jsx(ea,{navigate:o,location:a,companyId:v,accountId:P,analytics:U,currentTenant:p,vendorId:g,roleMap:h?.loggedInUserRoleMap,isSettings:ze(a),expressPayDetails:m,onClickMenuIcon:()=>{S(!0)}})]}):n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:x.colors.grey5}})}const na={overlayWidth:new J(100,100,58)},ta=({authParams:e,downloadAccountDetailEndPoint:t,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:o,closeDrawerHandler:a})=>{const i=L(),l=_(),c=A(r=>Ze(r)),u=A(r=>V(r));if(w.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const h=()=>{a(!0)},x={depositAccount:o,onDismissClick:h,zeniAccountsConfigDetail:c,authParams:e,downloadAccountDetailEndPoint:t,currentTenant:u};return n.jsx(q,{anchor:"right",open:s,PaperProps:{style:{width:na.overlayWidth.valuePercentage(l),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>h(),children:n.jsx(aa,{onClick:r=>r.stopPropagation(),children:n.jsx(St,{...x})})})},aa=M(K)`
30
+ display: flex;
31
+ min-height: 100%;
32
+ flex-direction: column;
33
+ `,oa={overlayWidth:new J(100,100,58)},un=({isCheckDepositDrawerOpen:e,closeDrawerHandler:t})=>{const s=L(),o=_(),a=N(),i=A(r=>V(r)),l=w.getSignedInUser(),c=i.tenantId,u={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:c??""};if(l==null)throw Error("Can't access check deposit page without signing in...");const h=A(r=>Qn(r)),x={analytics:U,checkDeposit:h,filesEndPoint:`${ve.fileMicroServiceBaseUrl}`,authParams:u,onSaveChangesToLocalStore:r=>{a(et(r))},updateFilesEntity:r=>{a(qe({files:r}))},onAnotherTransferClick:()=>{a(xe())},onDeleteFile:r=>{a(Je(r))},onEditFileName:(r,p)=>{a(Ye(r,p.split(".")[0]))},onCheckDpositClick:()=>{a(Xn())},onDismissClick:()=>{t(!0),a(xe())}};return n.jsxs(n.Fragment,{children:[n.jsx(me,{analytics:U,onLoad:r=>(p=>p.trackPageLoaded(je.Event.accountsDepositCheckFormViewed))(r)}),n.jsx(q,{anchor:"right",open:e,PaperProps:{style:{width:oa.overlayWidth.valuePercentage(o),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(r,p)=>(p==="backdropClick"||p==="escapeKeyDown")&&(t(!0),void a(xe())),children:n.jsx(sa,{onClick:r=>r.stopPropagation(),children:n.jsx(bt,{...x})})})]})},sa=M(K)`
34
+ display: flex;
35
+ min-height: 100%;
36
+ flex-direction: column;
37
+ `,ia={overlayWidth:new J(100,100,58)},ra=Y(function(e,t){const s=t.currentTenant?.companyId;return{plaidConnectionDetails:ot(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){return{onReviewClick:()=>e(it()),clearReviewTransferDetail:()=>e(st()),onFetchLinkTokenClick:s=>{e(Qe("external_account",s))},onEstablishConnectionClick:s=>{e(Ke(s,t.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(vt),pn=({isTransferDrawerOpen:e,authParams:t,downloadAccountDetailEndPoint:s,closeDrawerHandler:o,zeniAccountsConfig:a})=>{const i=A(f=>nt(f)),l=A(f=>V(f)),c=L(),u=_(),h=N(),{accountId:x}=Z(),[r,p]=d.useState("achTransfer"),[m,g]=d.useState(!1);if(w.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:v}=$(),{configValue:y}=v(H.zeniAccountsConfig),k=De(y),I=()=>{o(!0),h(Le())};return d.useEffect(()=>{i.reviewTransferDetail.fetchState==="Completed"&&g(!0)},[g,i.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(me,{analytics:U,onLoad:f=>(D=>D.trackPageLoaded(je.Event.zeniAccountsTransferFormViewed))(f)}),n.jsx(q,{onClose:()=>{(r==="achTransfer"&&m===!1||r==="achTransfer"&&m&&i.fetchState==="Completed")&&I()},anchor:"right",open:e,PaperProps:{style:{width:ia.overlayWidth.valuePercentage(u),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(ca,{onClick:f=>f.stopPropagation(),children:n.jsx(ra,{analytics:U,transferDetails:i,authParams:t,downloadAccountDetailEndPoint:s,onTransferClick:()=>{U.trackTransferBetweenAccountsFormClicked("Transfer",i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",i.transferDetailLocalData.transferFrom?.label,i.transferDetailLocalData.transferTo?.label,i.transferDetailLocalData.amount.amount,i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,i.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,i.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&i.transferDetailLocalData.transferTo?.accType==="depositAccount"&&a.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&i.transferDetailLocalData.amount.amount>a.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),h(at(x))},onDismissClick:I,onSaveChangesToLocalStore:f=>{h(tt(f))},onAnotherTransferClick:()=>{g(!1),h(Le())},currentTenant:l,zeniAccountsConfigDetail:a,currentDrawerContent:r,setCurrentDrawerContent:p,showReviewContent:m,setShowReviewContent:g,onBackClick:()=>{},maxInsuredAmount:k.maxInsuredAmount})})})]})},ca=M(K)`
38
+ display: flex;
39
+ min-height: 100%;
40
+ flex-direction: column;
41
+ `,la=M.div`
42
+ display: flex;
43
+ min-height: 100%;
44
+ width: 100%;
45
+ flex: 1 1 auto;
46
+ flex-direction: column;
47
+ align-items: center;
48
+ background-color: ${e=>e.theme.colors.grey4};
49
+ `,da=Y(function(e,t){return{zeniAccountListView:Xe(e),isExpressPayEnabled:t.isExpressPayEnabled,analytics:t.analytics}},function(e,t){const{navigate:s,currentTenant:o,location:a,companyId:i,handleDrawerToggle:l,analytics:c,isBillPayEnabled:u,isDebitCardFeatureEnabled:h}=t,{tenantEmailDomain:x}=o;return{onZeniAccountClick:(r,p)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",p,"active");const m=ua(x,r),g=ee(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:g}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(en(!1))},handleMoveMoneyOptionSelection:(r,p)=>{let m="page-not-found";r==="sendMoney"&&(m=fn(x)),r==="payBill"?m=mn(o,u,h):r==="transfer"?(m=hn(x),p!=null&&e(tn(p))):r==="checkDeposit"&&(m=gn(x));const g=ee(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:g}})},unlinkPaymentAccount:(r,p)=>{c.trackAccountsListPageClicked("Unlink Account",p),e(dt(r))},onFetchLinkTokenClick:(r,p)=>{e(Qe("external_account",r,p))},onUpdatePaymentAccountStatus:(r,p,m)=>{e(lt(r,p,"zeni_accounts","external_account",m))},onEstablishConnectionClick:r=>{e(Ke(r,i,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:r=>{e(ct(r))},onClickMenuIcon:()=>{l(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:r=>{r?s("./auto-transfer",{state:{...a.state,scrollToAddRule:!0}}):s("./auto-transfer")}}})(Pt);function Ae({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t}){const s=W(),o=G(),a=N(),i=_(),{tenantEmailDomain:l}=Z(),{useDynamicConfig:c,useFeatureGate:u}=$(),h=L(),{configValue:x}=c(H.zeniAccountsConfig),{isFeatureEnabled:r}=u(O.isTreasuryEnabled),{isFeatureEnabled:p}=u(O.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=u(O.isAutoTransferRuleEnabled),{isFeatureEnabled:g}=u(O.isCheckingCommentingEnabled),v=De(x),y=A(R=>V(R)),k=y.companyId??w.getSignedInUserTenant(l)?.companyId,{configValue:I}=c(H.expressPayConfig),f=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(y.tenantId),[D,T]=d.useState(!1),[z,F]=d.useState(!1),[j,P]=d.useState(!1),[B,S]=d.useState(!1),b=A(R=>Xe(R)),E=b.fetchState,se=A(R=>ke(R)),ie=se?.fetchState??"Not-Started",ge=!!y.companyZeniAccountInfo?.info?.isZeniAccountEnabled,re=ae(),ce=!!y.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,Q=!!y.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,X=te(re?.loggedInUserRoleMap),yn=Ie(re?.loggedInUserRoleMap),Cn=!!y.companyBillPayInfo?.info?.isBillPayEnabled,Ee=w.getSignedInUser(),xn={userId:Ee?.userId??"",sessionId:Ee?.zeniSessionId??"",tenantId:y.tenantId??""},An=`${be}/account_details`,{areTenantIdsInSync:Pe}=jt();d.useEffect(()=>{!D&&Pe&&(T(!0),a(en(!1)))},[D,a,E,Pe]),d.useEffect(()=>{!z&&ie==="Not-Started"&&k&&(F(!0),a(we(!0)))},[z,ie,k,a]),d.useEffect(()=>{e!=null&&e===!0?P(!0):(P(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{S(t!=null&&t===!0)},[t]);const Te=()=>{P(!1),o("..")},[kn,wn]=d.useState(!1),Be=R=>{wn(R)},{isAiCfoOpen:Dn,setIsAiCfoOpen:In}=rn(),{isAiCfoAccessEnabled:Sn,onAskAiCfoClick:bn}=ln({isAiCfoOpen:Dn,setIsAiCfoOpen:In,mobileExploreReferrer:"Checking Accounts"});dn({isDataReady:E==="Completed"});const vn=y.company!=null&&Ge(y.company),fe=(r&&vn)===!0&&!Q,[jn,En]=d.useState(!1),ye=A(R=>R.treasurySetupViewState.treasuryFundsDetails),Pn=ye.fundsDetails,Tn=Et(Pn);d.useEffect(()=>{fe!==!0||jn||ye?.fetchStatus.fetchState!=="Not-Started"||(En(!0),a(rt()))},[ye.fetchStatus,a]);const Bn=nn(y),On=Se(p,y);return Bn===!0&&On!==!0?n.jsx(cn,{}):ge?n.jsxs(n.Fragment,{children:[b.fetchState==="Completed"&&j===!1&&B===!1?n.jsx(me,{analytics:U,onLoad:R=>(Oe=>{Oe.trackAccountsListPageViewed(b.depositAccountsSelectorView.depositAccounts.length,b.externalAccountsSelectorView.paymentAccounts.length,Ne(b.summary?.totalBalance.available.amount??0),Ne(b.summary?.totalInterest.available.amount??0),b.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),fe&&Oe.trackTreasuryPromoView("Checking Promo Banner")})(R)}):null,j===!0?n.jsx(pn,{closeDrawerHandler:Te,isTransferDrawerOpen:j,zeniAccountsConfig:b.zeniAccountsConfig,authParams:xn,downloadAccountDetailEndPoint:An}):null,B===!0?n.jsx(un,{closeDrawerHandler:Te,isCheckDepositDrawerOpen:B}):null,n.jsxs(la,{windowSize:i,children:[n.jsx(he,{isAppContentDrawerOpen:kn,handleDrawerToggle:Be}),n.jsx(da,{zeniBankListView:b,navigate:o,currentTenant:y,location:s,companyId:k,analytics:U,maxInsuredAmount:v.maxInsuredAmount,isExpressPayEnabled:f,isBillPayEnabled:Cn,isCheckingCommentingEnabled:g,isDebitCardFeatureEnabled:p,isAutoTransferRuleEnabled:m,handleDrawerToggle:Be,showTreasuryPromo:fe,treasuryYieldPercentage:Tn,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:Sn,onAskAiCfoClick:bn})]})]}):ce&&X?n.jsx(ne,{to:"../setup"}):y.companyZeniAccountInfo?.info&&!ce&&yn?n.jsx(ne,{to:"../promo",state:s.state}):n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}})}const mn=(e,t,s)=>{const o=Se(s,e),{tenantEmailDomain:a}=e;return o===!0||t===!1?`/${a}/bills`:`/${a}/bill/new`},ua=(e,t)=>`/${e}/checking/${t}`,hn=(e,t)=>t==null?`/${e}/checking/transfer`:`/${e}/checking/${t}/transfer`,gn=(e,t)=>t==null?`/${e}/checking/check-deposit`:`/${e}/checking/${t}/check-deposit`,fn=e=>`/${e}/checking/express-pay`,pa=M.div`
50
+ display: flex;
51
+ width: 100%;
52
+ flex: 1 1 auto;
53
+ flex-direction: column;
54
+ align-items: center;
55
+ min-height: 100vh;
56
+ background-color: ${e=>e.theme.colors.grey4};
57
+ `,ma=Y(function(e,t){const{currentTenant:s}=t,o=an(e,t.accountId),a=w.getSignedInUser(),i=e.tenantState.currentTenantId,l={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:i??""},c=o.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:l,downloadEndPoint:`${ve.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:o,isExpressPayEnabled:t.isExpressPayEnabled,fetchState:o.fetchState}},function(e,t){const{navigate:s,currentTenant:o,location:a,accountId:i}=t,{tenantEmailDomain:l}=o;return{handleMoveMoneyOptionSelection:(c,u)=>{let h="page-not-found";c==="sendMoney"?h=fn(l):c==="payBill"?h=mn(o,t.isBillPayEnabled,t.isDebitCardFeatureEnabled):c==="transfer"?(h=hn(l,i),u!=null&&e(tn(u))):c==="checkDeposit"?(h=gn(l,i),u!=null&&e(ut(u))):c==="accountStatement"&&(h=fa(l,i));const x=ee(a.state?.pathnameStackToGoBack,a.pathname);s(h,{state:{pathnameStackToGoBack:x}})},onViewAllTransactionClick:()=>{const c=ga(l,i),u=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:u}})},onAccountDetailClick:()=>{const c=ha(l,i),u=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:u}})},onEditNameClick:c=>{e(Me(i,"editName",c))},onReloadZeniAccountDetailPage:()=>{e(on(i,!1))},onCloseAccountClick:()=>{e(Me(i,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}})(Tt);function de({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t,isAccountInfoDrawerOpen:s}){const o=W(),a=G(),i=N(),l=_(),{tenantEmailDomain:c,accountId:u}=Z(),{useDynamicConfig:h}=$(),{useFeatureGate:x}=$(),{isFeatureEnabled:r}=x(O.isDebitCardFeatureEnabled),{isFeatureEnabled:p}=x(O.isCheckingCommentingEnabled),m=A(X=>V(X)),{configValue:g}=h(H.expressPayConfig),v=g.is_enable_all_tenants===!0||g.tenant_ids!=null&&g.tenant_ids.includes(m.tenantId),y=!!m.companyBillPayInfo?.info?.isBillPayEnabled,k=w.getSignedInUser(),I=m.companyId??w.getSignedInUserTenant(c)?.companyId,f={userId:k?.userId??"",sessionId:k?.zeniSessionId??"",tenantId:m.tenantId??""},D=`${be}/account_details`,[T,z]=d.useState(!1),[F,j]=d.useState(!1),[P,B]=d.useState(!1),[S,b]=d.useState(!1),E=A(X=>an(X,u??"")),se=E.fetchState,{isAiCfoOpen:ie,setIsAiCfoOpen:ge}=rn(),{isAiCfoAccessEnabled:re,onAskAiCfoClick:ce}=ln({isAiCfoOpen:ie,setIsAiCfoOpen:ge,mobileExploreReferrer:"Checking Account Detail"});dn({isDataReady:se==="Completed"}),d.useEffect(()=>{T||(i(on(u??"",!1)),z(!0))},[T,i,se]),d.useEffect(()=>{b(s!=null&&s===!0)},[s]),d.useEffect(()=>{e!=null&&e===!0?j(!0):(j(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{B(t!=null&&t===!0)},[t]);const Q=()=>{b(!1),a("..")};return n.jsxs(n.Fragment,{children:[S===!0&&E.accountDetail!=null?n.jsx(ta,{authParams:f,downloadAccountDetailEndPoint:D,closeDrawerHandler:Q,isAccountInfoDrawerOpen:S,zeniBankAccountDetail:E.accountDetail}):null,F===!0?n.jsx(pn,{closeDrawerHandler:Q,isTransferDrawerOpen:F,zeniAccountsConfig:E.zeniAccountsConfig,authParams:f,downloadAccountDetailEndPoint:D}):null,P===!0?n.jsx(un,{closeDrawerHandler:Q,isCheckDepositDrawerOpen:P}):null,n.jsx(pa,{windowSize:l,children:n.jsx(ma,{navigate:a,currentTenant:m,location:o,companyId:I,isDebitCardFeatureEnabled:r,accountId:u??"",isBillPayEnabled:y,isCheckingCommentingEnabled:p,isExpressPayEnabled:v,isAiCfoAccessEnabled:re,onAskAiCfoClick:ce})})]})}const ha=(e,t)=>`/${e}/checking/${t}/account-info`,ga=(e,t)=>`/${e}/checking/${t}/transactions`,fa=(e,t)=>`/${e}/checking/${t}/statements`,ya=M.div`
58
+ display: flex;
59
+ height: 100vh;
60
+ width: 100%;
61
+ flex: 1 1 auto;
62
+ flex-direction: column;
63
+ overflow: auto;
64
+ align-items: center;
65
+ background-color: ${e=>e.theme.colors.grey4};
66
+ `;function Ca(){const e=G(),t=N(),s=_(),{accountId:o}=Z(),{useFeatureGate:a}=$(),{isFeatureEnabled:i}=a(O.isCheckingCommentingEnabled),[l,c]=d.useState(!1);d.useEffect(()=>{l||(c(!0),t(pt(o??"",!1)))},[l,t]);const u=A(h=>mt(h,o??""));if(w.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(ya,{windowSize:s,children:n.jsx(Bt,{transactionListView:u,depositAccountId:o??"",isCheckingCommentingEnabled:i,onBackClick:()=>{e("../")}})})}const xa=Y(function(e,t){const{companyId:s}=t;return{zeniAccountSetupView:ht(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,t){const{navigate:s,companyId:o}=t;return{onSetupButtonClick:()=>{U.trackAccountsPromoPageClicked("Setup Accounts"),e(gt(o))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(Ft),Aa=()=>{const e=G(),t=W(),{tenantEmailDomain:s}=Z(),{useDynamicConfig:o}=$(),a=L(),[i,l]=d.useState(!1),[c,u]=d.useState(!1),h=A(f=>V(f)),{configValue:x}=o(H.zeniAccountsConfig),r=De(x);d.useEffect(()=>{c===!1&&t.state?.message==="activation"&&u(!0)},[t.state]);const p=w.getSignedInUserTenant(s)?.companyId??h.companyId,m=w.getSignedInUser(),g=!!h.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,v=f=>{l(f)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const y=ae(),k=te(y?.loggedInUserRoleMap),I=Ie(y?.loggedInUserRoleMap);if(g&&k)return n.jsx(ne,{to:"../../checking/setup"});if(h.company?.companyZeniAccountInfo&&(!g&&k||I)){if(t.state?.message==="activation"){const f=sn(t.state?.pathnameStackToGoBack);e(t.pathname,{state:{...t.state,message:void 0,pathnameStackToGoBack:f.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(Ot,{showConfetti:c}),n.jsx(me,{analytics:U,onLoad:f=>(D=>D.trackPageLoaded(je.Event.accountsPromoPageViewed))(f)}),n.jsx(he,{isAppContentDrawerOpen:i,handleDrawerToggle:v}),n.jsx(xa,{analytics:U,navigate:e,companyId:p,onClickMenuIcon:()=>{v(!0)},maxAnnualPercentageYield:r.maxAnnualPercentageYield,maxInsuredAmount:r.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}})};function Ja(){const e=W(),t=A(S=>V(S)),s=L(),{useFeatureGate:o,useDynamicConfig:a}=$(),i=ae(),l=te(i?.loggedInUserRoleMap),c=Ie(i?.loggedInUserRoleMap),u=!!t.company?.companyZeniAccountInfo.isZeniAccountEnabled,h=!!t.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:x}=o(O.isChargeCardFeatureEnabled),{isFeatureEnabled:r}=o(O.isDebitCardFeatureEnabled),p=nn(t),m=Se(r,t),g=t?.userRole!=null&&ft(t?.userRole),v=(t?.company==null||t.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!g)&&yt(i?.loggedInUserRoleMap),y=Ct(i?.loggedInUserRoleMap),k=(t?.company==null||t.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!g)&&xt(i?.loggedInUserRoleMap),{isFeatureEnabled:I}=o(O.isDepositAccountsFeatureEnabled),f=I&&!g,{configValue:D}=a(H.expressPayConfig),T=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(t.tenantId),{isFeatureEnabled:z}=o(O.isAutoTransferRuleEnabled),F=Rt(t,x,r)&&!g&&At(i?.loggedInUserRoleMap),j=kt(i?.loggedInUserRoleMap),P=f&&te(i?.loggedInUserRoleMap),B=P||He(i?.loggedInUserRoleMap);return n.jsxs($e,{children:[n.jsx(C,{path:"setup",element:n.jsx(Ve,{isBillPayAdminLevelAccess:v,isUserHasOnlyBillPayAccess:y,isReimbursementAdminLevelAccess:k,isZeniAccountAdminLevelAccess:P,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:j,productType:"zeni_accounts",type:"setup"})}),n.jsx(C,{path:"verification",element:n.jsx(Ve,{isBillPayAdminLevelAccess:v,isUserHasOnlyBillPayAccess:y,isReimbursementAdminLevelAccess:k,isZeniAccountAdminLevelAccess:P,isChargeCardAdminLevelAccess:F,isUserHasOnlyCardAccess:j,productType:"zeni_accounts",type:"verification"})}),z?n.jsxs(n.Fragment,{children:[n.jsx(C,{path:"auto-transfer",element:n.jsx(_e,{})}),B?n.jsx(C,{path:"auto-transfer/:ruleId/edit",element:n.jsx(_e,{isEditDrawerOpen:!0})}):null]}):n.jsx(C,{path:"auto-transfer",element:n.jsx(ue,{})}),T&&l?n.jsxs(n.Fragment,{children:[n.jsx(C,{path:"express-pay",element:n.jsx(le,{})}),n.jsx(C,{path:"express-pay/add-ach",element:n.jsx(le,{isAddACHDrawerOpen:!0})}),n.jsx(C,{path:"express-pay/add-wire/add-address",element:n.jsx(le,{isAddAddressDrawerOpen:!0})}),n.jsx(C,{path:"express-pay/add-wire",element:n.jsx(le,{isAddWireDrawerOpen:!0})})]}):n.jsx(C,{path:"express-pay",element:n.jsx(ue,{})}),n.jsx(C,{path:"promo",element:n.jsx(Aa,{})}),p&&!m?n.jsx(C,{path:"/*",element:n.jsx(cn,{})}):u?n.jsxs(n.Fragment,{children:[n.jsx(C,{path:"/",element:n.jsx(Ae,{})}),n.jsx(C,{path:"transfer",element:n.jsx(Ae,{isTransferDrawerOpen:!0})}),n.jsx(C,{path:"check-deposit",element:n.jsx(Ae,{isCheckDepositDrawerOpen:!0})}),n.jsx(C,{path:":accountId/*",element:n.jsx(ka,{})}),n.jsx(C,{path:"*",element:n.jsx(ue,{})})]}):h&&l?n.jsx(C,{path:"*",element:n.jsx(ne,{to:"../setup"})}):t.company?.companyZeniAccountInfo&&c?n.jsx(C,{path:"*",element:n.jsx(ne,{to:"../promo",state:e.state})}):n.jsx(C,{path:"*",element:n.jsx(oe,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${Ut.sp1} ${s.colors.dropShadowNormal}`}})})]})}function ka(){return n.jsxs($e,{children:[n.jsx(C,{path:"/",element:n.jsx(de,{})}),n.jsx(C,{path:"account-info",element:n.jsx(de,{isAccountInfoDrawerOpen:!0})}),n.jsx(C,{path:"transfer",element:n.jsx(de,{isTransferDrawerOpen:!0})}),n.jsx(C,{path:"check-deposit",element:n.jsx(de,{isCheckDepositDrawerOpen:!0})}),n.jsx(C,{path:"transactions",element:n.jsx(Ca,{})}),n.jsx(C,{path:"statements",element:n.jsx(Vt,{})}),n.jsx(C,{path:"*",element:n.jsx(ue,{})})]})}export{Ja as default};
@@ -0,0 +1,9 @@
1
+ import{j as c}from"./liveblocks-DXiLz49w.js";import{a as u}from"./sentry-C8WyuRaf.js";import{j as x,h as B,u as $,l as j,g as p}from"./core-C_FlMzhB.js";import{Hz as s,Hy as v,NG as z,eM as C,NH as N}from"./zeni-epic-state-BP6Uj047.js";import{K as D,ao as g,h as E,z as L,B as P,bZ as T,q as G}from"./index-EyQIQQea.js";import{n as H}from"./mui-D4wswOer.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]="e3ad124a-e487-4105-9b69-25894ff001b7",e._sentryDebugIdIdentifier="sentry-dbid-e3ad124a-e487-4105-9b69-25894ff001b7")}catch{}})();const _=H.div`
2
+ display: flex;
3
+ height: 100vh;
4
+ width: 100%;
5
+ flex: 1 1 auto;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ background-color: ${e=>e.theme.colors.grey4};
9
+ `;function V(){const e=x(),n=B(),d=D(),l=$();let{accountId:a}=j(),f=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,f=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[m,y]=u.useState(!1),h=E();u.useEffect(()=>{m||(y(!0),n(v(a??"",!1)))},[m,n]);const o=p(t=>z(t,a??"")),b=()=>{const t=G(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},r=L.getSignedInUser(),i=p(t=>C(t)),I={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:i.tenantId??""},w=N(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=i.company?.companyInfo.companyLegalName??i.companyName;if(r==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?c.jsx(P,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):c.jsx(_,{windowSize:d,children:c.jsx(T,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:b,authParams:I,downloadEndPoint:f})})}export{V as Z};
@@ -1 +1 @@
1
- import"./sentry-C-hGmJ4T.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]="aeade864-8999-4b65-a5fe-284d93c9cae4",e._sentryDebugIdIdentifier="sentry-dbid-aeade864-8999-4b65-a5fe-284d93c9cae4")}catch{}})();function d(e,t){if(t!=null)return e.find(n=>n.qboId===t)}function i(e,t){return e.filter(n=>n.qboId!=null&&t.includes(n.qboId))}function a(e,t){return t.map(n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""}))}export{d as a,i as g,a as m};
1
+ import"./sentry-C8WyuRaf.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]="aeade864-8999-4b65-a5fe-284d93c9cae4",e._sentryDebugIdIdentifier="sentry-dbid-aeade864-8999-4b65-a5fe-284d93c9cae4")}catch{}})();function d(e,t){if(t!=null)return e.find(n=>n.qboId===t)}function i(e,t){return e.filter(n=>n.qboId!=null&&t.includes(n.qboId))}function a(e,t){return t.map(n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""}))}export{d as a,i as g,a as m};