@zeniai/web-app-ui 5.1.14-qa → 5.1.15-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 (128) hide show
  1. package/dist/assets/AddressRoutes-B4CPHzP3.js +1 -0
  2. package/dist/assets/{AddressScreen-DSUmBeDi.js → AddressScreen-CzR_LrnW.js} +2 -2
  3. package/dist/assets/{AiCfoScreen-BOZ3U8iE.js → AiCfoScreen-DPZZ8ajD.js} +5 -5
  4. package/dist/assets/{BillPayApprovalRoutes-BcrHy3_d.js → BillPayApprovalRoutes-Bm_XpBTH.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-YgBi3X8x.js → BillPayRoutes-D1GX5fXu.js} +18 -18
  6. package/dist/assets/{BusinessVerificationPageScreen-CWb716op.js → BusinessVerificationPageScreen-bE_ZDJAJ.js} +2 -2
  7. package/dist/assets/ChargeCardRoutes-BLLbAX9F.js +71 -0
  8. package/dist/assets/CompanyPassportScreen-SbNXr-Yc.js +1 -0
  9. package/dist/assets/ConnectionAuthScreen-MQo8QSWh.js +11 -0
  10. package/dist/assets/CustomerOnboardingAuthScreen-C75q1vSn.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-G4MKQ9R6.js → CustomerOnboardingRoutes-CLQqWT1U.js} +5 -5
  12. package/dist/assets/{DashboardRoutes-JxZvBYab.js → DashboardRoutes-Cbd-s4sZ.js} +1 -1
  13. package/dist/assets/{DefaultTenantHome-Dme3DP6J.js → DefaultTenantHome-BThka-Bo.js} +1 -1
  14. package/dist/assets/{DomesticWireDetailScreen-CN2xy1Dg.js → DomesticWireDetailScreen-zzVpWVLi.js} +3 -3
  15. package/dist/assets/DrawerScreen-Gfrg1kSz.js +1 -0
  16. package/dist/assets/EntityDetailRoutes-BgFQpu7B.js +1 -0
  17. package/dist/assets/ExpenseAutomationRoutes-BAse6mjP.js +25 -0
  18. package/dist/assets/{FeaturePreviewScreen-D4fzXiSu.js → FeaturePreviewScreen-uAIP-fYO.js} +1 -1
  19. package/dist/assets/HubSpotOAuthCallbackScreen-C0DZ619s.js +1 -0
  20. package/dist/assets/MagicLinkRoutes-JfchsLuo.js +72 -0
  21. package/dist/assets/MagicLinkSignInScreen-DPjrjxGJ.js +12 -0
  22. package/dist/assets/{MobileAppDrawer-CACo4kMO.js → MobileAppDrawer-DIkQMB49.js} +1 -1
  23. package/dist/assets/NotFoundScreen-Da7ROUUQ.js +1 -0
  24. package/dist/assets/{NotificationRoutes-BWW1ON6g.js → NotificationRoutes-cGHIq347.js} +1 -1
  25. package/dist/assets/OAuthConsentScreen-CgPhgWbB.js +1 -0
  26. package/dist/assets/PandLWithForecastRoutes-DtzPR2o7.js +1 -0
  27. package/dist/assets/PeopleRoutes-Cll4VO9B.js +22 -0
  28. package/dist/assets/PerformanceRoutes-DFm0I2dv.js +1 -0
  29. package/dist/assets/{Preview-DV7jcNJq.js → Preview-B6ablJhs.js} +1 -1
  30. package/dist/assets/{QBOConnectionScreen-CEl_0cd_.js → QBOConnectionScreen-BbLUwFlj.js} +1 -1
  31. package/dist/assets/ReferralListScreen-DfwbFR5J.js +5 -0
  32. package/dist/assets/ReimbursementApprovalRoutes-DCDF3NSX.js +1 -0
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DGGsRmkG.js → ReimbursementApprovalRuleDetailScreen-D6KJ85nX.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-DbdgfdZO.js → ReimbursementRoutes-5q91KW8o.js} +9 -9
  35. package/dist/assets/{ReportsRoutes-Bn5dyHsG.js → ReportsRoutes-Aeq5-eMG.js} +1 -1
  36. package/dist/assets/RewardsRoutes-f3XwDF6M.js +1 -0
  37. package/dist/assets/ScreenRoutes-DTL8yguT.js +2 -0
  38. package/dist/assets/{SettingsRoutes-TFYXXQvf.js → SettingsRoutes-BFSNSnIj.js} +8 -8
  39. package/dist/assets/{SetupPagesScreen-DQQMK2Pe.js → SetupPagesScreen-M65-gLmB.js} +5 -5
  40. package/dist/assets/SignInScreen-DD27pE2P.js +1 -0
  41. package/dist/assets/SignOutScreen-DRQLWZe-.js +9 -0
  42. package/dist/assets/TaskListScreen-BesFePXd.js +9 -0
  43. package/dist/assets/TaskRoutes-DIfZcYIv.js +9 -0
  44. package/dist/assets/{TransactionDetailRoutes-DDq43332.js → TransactionDetailRoutes-Cc1Mpbvi.js} +1 -1
  45. package/dist/assets/{TransactionDetailScreen-C-EmLt2t.js → TransactionDetailScreen-DZOVFjTd.js} +2 -2
  46. package/dist/assets/{TransactionListRoutes-0kJw-sSs.js → TransactionListRoutes-n6NAKkAr.js} +1 -1
  47. package/dist/assets/{TreasuryRoutes-MmngbaSb.js → TreasuryRoutes-DfOeL5SA.js} +6 -6
  48. package/dist/assets/{VendorsRoutes-l_Dx0YSI.js → VendorsRoutes-BkJbsbPW.js} +22 -22
  49. package/dist/assets/WiseConfirmationScreen-QumfI681.js +12 -0
  50. package/dist/assets/{ZeniAccountRoutes-BuSSg7oM.js → ZeniAccountRoutes-DvXFiqdo.js} +11 -11
  51. package/dist/assets/ZeniAccountStatementScreen-K35ghEPz.js +9 -0
  52. package/dist/assets/{accountMappingHelper-olmW29yz.js → accountMappingHelper-jtc3uKxM.js} +1 -1
  53. package/dist/assets/{analytics-CaY7rw-O.js → analytics-DQbIsXyz.js} +1 -1
  54. package/dist/assets/analyticsHelper-DM466Z6a.js +1 -0
  55. package/dist/assets/{core-CZ9_x3uq.js → core-BFMTUSM0.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-COFNvK3Q.js → decodeURIComponentSafe-D0SUerS2.js} +1 -1
  57. package/dist/assets/{dnd-Zw_s-D7Q.js → dnd-Cql54npb.js} +1 -1
  58. package/dist/assets/{empty-7cyPspc8.js → empty-Bi9aSFCY.js} +1 -1
  59. package/dist/assets/{empty-9FZm-BqI.js → empty-YdjS7t9J.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-Btt4krqI.js → emptyVideoElement-SVYMv4gU.js} +1 -1
  61. package/dist/assets/epic-eSQDJDvX.js +2 -0
  62. package/dist/assets/{getLocaleForTenant-KiSPE8IK.js → getLocaleForTenant-Bb1D5XV3.js} +1 -1
  63. package/dist/assets/{index-Dddel4wm.js → index-B64Tv9qs.js} +1 -1
  64. package/dist/assets/{index-Bl5Gxo9i.js → index-CG-AdJzL.js} +10546 -10549
  65. package/dist/assets/{index-CL3xKt_a.js → index-DRcmIlgW.js} +1 -1
  66. package/dist/assets/{index-BlTI1Mt8.js → index-DRgRUsQa.js} +1 -1
  67. package/dist/assets/{index-DGuD8Ns6.js → index-Deo1jzfD.js} +1 -1
  68. package/dist/assets/{index-DK4X4Vk8.js → index-DhsG_xNf.js} +2 -2
  69. package/dist/assets/{index-G8xNq7rD.js → index-KP9GUOx-.js} +1 -1
  70. package/dist/assets/{index-CuxNhIGG.js → index-xzuInRc5.js} +1 -1
  71. package/dist/assets/{lexical-DW7Zgdoo.js → lexical-gkFF34rv.js} +1 -1
  72. package/dist/assets/{liveblocks-CA2qpkTt.js → liveblocks-BtPAMLyF.js} +1 -1
  73. package/dist/assets/{lottie-DW7v-RpQ.js → lottie-CzQDocEZ.js} +1 -1
  74. package/dist/assets/{mui-_CQ1MGrl.js → mui-CgK_bxa9.js} +1 -1
  75. package/dist/assets/{pathToGoBack-DbVxA-Rx.js → pathToGoBack-ShY4gpuW.js} +1 -1
  76. package/dist/assets/{pdf-BRE_7-P-.js → pdf-BXjDreb1.js} +4 -4
  77. package/dist/assets/{pdf-lib-8meLjW9k.js → pdf-lib-Be477S51.js} +1 -1
  78. package/dist/assets/{plaid-bOhNZMPB.js → plaid-B4L2ZxXd.js} +1 -1
  79. package/dist/assets/{pusher-D5RDWDl8.js → pusher-BGiYOOA4.js} +1 -1
  80. package/dist/assets/{react-BkZq36aw.js → react-B-OmPLpG.js} +1 -1
  81. package/dist/assets/{react-lbjp65Wj.js → react-BOoigsqi.js} +1 -1
  82. package/dist/assets/{react-CFWgn4__.js → react-CQrePhu5.js} +1 -1
  83. package/dist/assets/{react-DnPEHWM7.js → react-DFFWPACY.js} +1 -1
  84. package/dist/assets/{react-E4pIjTga.js → react-D_ie4iVu.js} +1 -1
  85. package/dist/assets/{react-BH9weH58.js → react-DjfHbTT-.js} +1 -1
  86. package/dist/assets/{recharts-DG48H-3-.js → recharts-w48xCyfx.js} +1 -1
  87. package/dist/assets/{routePaths-DynLDVDN.js → routePaths-7eiiv5jz.js} +1 -1
  88. package/dist/assets/{sentry-C8Zmy8eq.js → sentry-D1h6Hser.js} +1 -1
  89. package/dist/assets/{url-DZj7kXcI.js → url-Bg8R3-BS.js} +1 -1
  90. package/dist/assets/{url-ByuQXOc6.js → url-DkdZFqOF.js} +1 -1
  91. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BL6bbKBu.js → useAiCfoDashboardSuggestedQuestionsChips-rMC2fvV7.js} +1 -1
  92. package/dist/assets/useAskAiCfoHostNavButtonProps-Dz4QpLa9.js +1 -0
  93. package/dist/assets/{useDeviceId-DA16gBd2.js → useDeviceId-DEMMIXK0.js} +1 -1
  94. package/dist/assets/{useInitialThreadRequest-DyYfRVlJ.js → useInitialThreadRequest-wXxfQETp.js} +1 -1
  95. package/dist/assets/{utils-CmjIXJxz.js → utils-BJp9FPT3.js} +1 -1
  96. package/dist/assets/{withTransactionSidePanel-CAqdAy8r.js → withTransactionSidePanel-NRwvOrhY.js} +2 -2
  97. package/dist/assets/{zeni-epic-state-CeRetUx9.js → zeni-epic-state-DlmAHa_t.js} +6 -6
  98. package/dist/index.html +1 -1
  99. package/package.json +4 -5
  100. package/dist/assets/AddressRoutes-CTHJ7nga.js +0 -1
  101. package/dist/assets/ChargeCardRoutes-xCmOBvgL.js +0 -71
  102. package/dist/assets/CompanyPassportScreen-1-2hcUKs.js +0 -1
  103. package/dist/assets/ConnectionAuthScreen-DQW6eH4t.js +0 -11
  104. package/dist/assets/CustomerOnboardingAuthScreen-CDhsSOdf.js +0 -1
  105. package/dist/assets/DrawerScreen-DG4CCTYZ.js +0 -1
  106. package/dist/assets/EntityDetailRoutes-CbyVY3jc.js +0 -1
  107. package/dist/assets/ExpenseAutomationRoutes-BJi8fni-.js +0 -25
  108. package/dist/assets/HubSpotOAuthCallbackScreen-OAVaLhSF.js +0 -1
  109. package/dist/assets/MagicLinkRoutes-DhY4yijg.js +0 -72
  110. package/dist/assets/MagicLinkSignInScreen-C6j9YoZW.js +0 -12
  111. package/dist/assets/NotFoundScreen-D0aNQysK.js +0 -1
  112. package/dist/assets/OAuthConsentScreen-79vAyxp5.js +0 -1
  113. package/dist/assets/PandLWithForecastRoutes-BCT-glGf.js +0 -1
  114. package/dist/assets/PeopleRoutes-DSl60kI7.js +0 -22
  115. package/dist/assets/PerformanceRoutes-DO510pLR.js +0 -1
  116. package/dist/assets/ReferralListScreen-Cw5PnCdh.js +0 -5
  117. package/dist/assets/ReimbursementApprovalRoutes-COn4sGv0.js +0 -1
  118. package/dist/assets/RewardsRoutes-B2MJrs_o.js +0 -1
  119. package/dist/assets/ScreenRoutes-D9hZPo_a.js +0 -2
  120. package/dist/assets/SignInScreen-BTa5d-nx.js +0 -1
  121. package/dist/assets/SignOutScreen-oxyFxGQp.js +0 -9
  122. package/dist/assets/TaskListScreen-Emg8otmN.js +0 -9
  123. package/dist/assets/TaskRoutes-HhKys__h.js +0 -9
  124. package/dist/assets/WiseConfirmationScreen-Bw_aff0d.js +0 -12
  125. package/dist/assets/ZeniAccountStatementScreen-3EXJRXGT.js +0 -9
  126. package/dist/assets/analyticsHelper-BdzlNWvU.js +0 -1
  127. package/dist/assets/epic-DPPpA4p6.js +0 -2
  128. package/dist/assets/useAskAiCfoHostNavButtonProps-B695I2Ok.js +0 -1
@@ -1,72 +0,0 @@
1
- import{j as t}from"./liveblocks-CA2qpkTt.js";import{i as S,n as g,h as C,g as y,u as ee,s as te,j as E,N as ae,o as ne,p}from"./core-CZ9_x3uq.js";import{JF as k,JG as v,JH as T,zF as z,zr as J,JI as B,JJ as oe,JK as se,zv as ie,eW as I,zC as le,zz as re}from"./zeni-epic-state-CeRetUx9.js";import{J as x,o as r,F as de,c as j,i as G,m as ce,p as me,N as pe,n as H,v as ue,I as he,H as ge,O as xe,h as fe,q as we,B as be,K as Se,E as ye,S as ke,r as ve,s as je,W as Ie}from"./index-Bl5Gxo9i.js";import{n as m}from"./mui-_CQ1MGrl.js";import f from"./NotFoundScreen-D0aNQysK.js";import{a as $}from"./sentry-C8Zmy8eq.js";import"./recharts-DG48H-3-.js";import"./analytics-CaY7rw-O.js";import"./plaid-bOhNZMPB.js";import"./dnd-Zw_s-D7Q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DW7v-RpQ.js";import"./lexical-DW7Zgdoo.js";import"./pdf-BRE_7-P-.js";import"./utils-CmjIXJxz.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]="e825e7a2-9b06-42f6-819c-387b0d3e6905",e._sentryDebugIdIdentifier="sentry-dbid-e825e7a2-9b06-42f6-819c-387b0d3e6905")}catch{}})();const $e=m.div`
2
- display: flex;
3
- 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
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
10
- `,Ce=g(function(e){const a=k(e),n=v(e),{companyName:o}=a;return{companyName:o,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:a}},function(e,a){const{vendorId:n,billId:o}=a;return{onFetchBankName:s=>{e(J(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(z(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(T({data:l}))}}})(de);function F(){const e=x(),{vendorId:a,billId:n}=S();return a==null||n==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx($e,{windowSize:e,children:t.jsx(Ce,{vendorId:a,billId:n})})})}const ze=m.div`
11
- display: flex;
12
- height: 100vh;
13
- width: 100%;
14
- flex: 1 1 auto;
15
- flex-direction: column;
16
- align-items: center;
17
- background-color: ${e=>e.theme.colors.grey4};
18
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
19
- `,Be=g(function(e,a){const{isSubPage:n}=a;return{addressToEdit:B(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}},function(e,a){const{navigate:n,location:o}=a,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??Ae();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=Pe(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}})(ce);function De({isSubPage:e}){const a=C(),n=y(),o=x();return t.jsx(t.Fragment,{children:t.jsx(ze,{windowSize:o,children:t.jsx(Be,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const Ae=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},Pe=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Ne=m.div`
20
- display: flex;
21
- height: 100%;
22
- width: 100%;
23
- flex: 1 1 auto;
24
- flex-direction: column;
25
- align-items: center;
26
- background-color: ${e=>e.theme.colors.grey4};
27
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
28
- `,Le=g(function(e){const a=k(e),n=v(e),o=B(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankName:i=>{e(J(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(z(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:d}=i;e(T({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),d=H(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(pe);function Ee(){const e=C(),a=y(),n=x(),{vendorId:o,billId:s}=S();return o==null||s==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Ne,{windowSize:n,children:t.jsx(Le,{location:a,navigate:e,vendorId:o,billId:s})})})}const Fe=m.div`
29
- display: flex;
30
- height: 100%;
31
- width: 100%;
32
- flex: 1 1 auto;
33
- flex-direction: column;
34
- align-items: center;
35
- background-color: ${e=>e.theme.colors.grey4};
36
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
37
- `,Te=g(function(e){const a=k(e),n=v(e),o=B(e),{companyName:s}=a;return{companyName:s,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}},function(e,a){const{navigate:n,location:o,vendorId:s,billId:l}=a;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(z(i,"international",s,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:d}=i;e(se({data:d}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),d=H(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:d}})}}})(ge);function Je(){const e=C(),a=y(),n=x(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?t.jsx(f,{}):t.jsx(Fe,{windowSize:n,children:t.jsx(Te,{location:a,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Ge={containerWidth:new je(100,58)},He=m(ke)`
38
- width: ${r.sp4};
39
- height: ${r.sp4};
40
- margin-bottom: ${r.sp3};
41
- margin-top: ${r.sp3};
42
- margin-left: ${r.sp8};
43
- cursor: pointer;
44
- position: absolute;
45
- color: ${e=>e.theme.colors.brandColorJade};
46
- `,Ke=m.div`
47
- display: flex;
48
- height: 100vh;
49
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
50
- width: 100vw;
51
- overflow-y: scroll;
52
- background-color: ${e=>e.theme.colors.grey4};
53
- `,Me=m.div`
54
- display: flex;
55
- flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
56
- flex-direction: column;
57
- width: ${e=>`${Ge.containerWidth.value(e.windowSize)}%`};
58
- ${e=>e.windowSize!=="small"?"overflow: auto;":""}
59
- box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
60
- padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
61
- `,We=m.div`
62
- display: flex;
63
- flex-direction: column;
64
- align-items: center;
65
- justify-content: center;
66
- padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.sp8}`};
67
- height: ${e=>e.windowSize==="small"?"490px":"auto"};
68
- overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
69
- width: ${e=>e.windowSize=="small"?"auto":"42%"};
70
- background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
71
- margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
72
- `,Ve=g(function(e,a){return{file:a.file,type:a.type}})(ve);function h({appContent:e}){const a=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=te(),d=i.get("token"),K=n.pathname.includes("address"),w=x(),M=xe(),D=fe(),b=we(),W=()=>{M.toggle()},V=E(u=>k(u)),_=E(u=>v(u)),{authParams:U,fetchState:c,billAttachment:O,billFetchState:A,companyName:q,currencySymbol:Q,amount:R}=V,{tenantId:P,userId:N,sessionId:L}=U,{fetchState:X,internationalBankAccountCreateStatus:Y}=_;return $.useEffect(()=>{I()},[]),$.useEffect(()=>{b&&c==="Not-Started"&&s!=null&&o!=null&&d!=null&&a(le(s,o,d))},[b,c,s,o,d,a]),$.useEffect(()=>{b&&c==="Completed"&&(I(N,L,P),l!=null&&a(re(l)))},[c,b,N,L,P,l,a]),c==="Error"?t.jsx(f,{}):X==="Completed"||Y.fetchState==="Completed"?(I(),t.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?t.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:D.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${D.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[c==="Completed"&&A==="Completed"&&t.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",s??"",q,l??"",_e(n.pathname),Q,R))(u)}),t.jsxs(Ke,{windowSize:w,children:[w!=="small"?t.jsx(He,{onClick:W}):null,t.jsx(We,{windowSize:w,isAddressPage:K,children:A==="In-Progress"?t.jsx(ye,{size:"ExtraLarge",start:!0}):t.jsx(Ve,{file:O,type:"bill"})}),t.jsx(Me,{windowSize:w,children:e})]})]})}const _e=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Ue(){return t.jsx(Ie,{})}function dt(){return t.jsxs(ne,{children:[t.jsx(p,{path:"bank/account/save/success",element:t.jsx(Ue,{})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(F,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(De,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Ee,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Je,{})})}),t.jsx(p,{path:"*",element:t.jsx(f,{})})]})}export{dt as default};
@@ -1,12 +0,0 @@
1
- import{j as f}from"./liveblocks-CA2qpkTt.js";import{a as u}from"./sentry-C8Zmy8eq.js";import{u as U,g as w,h as _,s as J,j as l,N as T}from"./core-CZ9_x3uq.js";import{z as r,h as P,D as A,d as M,c as V,e as N,j as W,E as q,g as B}from"./index-Bl5Gxo9i.js";import{eP as R,Jq as $,JA as G,Jr as H,eW as K,fn as Q,Jw as X,fL as Y,cT as Z,JB as ee,JC as te}from"./zeni-epic-state-CeRetUx9.js";import{n as ne}from"./mui-_CQ1MGrl.js";import{u as se}from"./useDeviceId-DA16gBd2.js";import{f as ae}from"./analyticsHelper-BdzlNWvU.js";import{t as ie}from"./getLocaleForTenant-KiSPE8IK.js";import"./recharts-DG48H-3-.js";import"./analytics-CaY7rw-O.js";import"./plaid-bOhNZMPB.js";import"./dnd-Zw_s-D7Q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DW7v-RpQ.js";import"./lexical-DW7Zgdoo.js";import"./pdf-BRE_7-P-.js";import"./utils-CmjIXJxz.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]="4367efa1-057f-4207-8e8d-1ffea3d3d56a",t._sentryDebugIdIdentifier="sentry-dbid-4367efa1-057f-4207-8e8d-1ffea3d3d56a")}catch{}})();const C=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function Ce(){const t=U(),a=w(),m=_(),[y]=J(),n=y.get("token"),p=y.get("stytch_token_type"),g=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:D,magicLinkEmail:c,verifyDeviceFetchState:x,resendVerifyDeviceOTPFetchState:z}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),b=l(e=>e.tenantState.activeTenantFetchState.fetchState),h=l(e=>e.tenantState.signInState),I=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>R(e)),k=l(e=>$(e)),E=r.getSignedInUser(),v=P().mode;u.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&C(n,p)&&i!=null&&g!=null&&(r.saveMagicLinkTriggered(n),t(G(n,i,g)))},[n,p,t,i,g,s?.zeniSessionId]),u.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&b!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(H(k.tenantsInOrder),s.zeniSessionId),K(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),A.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,k.tenantsInOrder),Y().then(()=>{const e=B();e!=null&&M(e)}),setTimeout(()=>{V.trackLogin(N.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,b,s,o,k,v,a.state,t]);const j=u.useCallback(()=>{m("/signin/auth")},[m]),F=u.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),O=u.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(I==="Completed"&&d!=null)return f.jsx(W,{phoneNumber:D,verifyOtpFetchState:x.fetchState,resendVerifyDeviceOTPFetchState:z,onResendOtp:F,onVerifyOtp:O,onCancelVerifyDevice:j});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=a.state?.origin??"/";return f.jsx(T,{to:e,state:{...a.state,origin:""}})}if(!C(n,p)||g==null||I==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return f.jsx(T,{to:e,state:{...a.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return f.jsx(oe,{"data-testid":"smooth-loader",children:f.jsx(q,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
2
- position: fixed;
3
- top: 0;
4
- left: 0;
5
- right: 0;
6
- bottom: 0;
7
- display: flex;
8
- align-items: center;
9
- justify-content: center;
10
- z-index: 9999;
11
- background-color: ${t=>t.theme.colors.background};
12
- `;export{Ce as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./liveblocks-CA2qpkTt.js";import{h as r,n}from"./core-CZ9_x3uq.js";import{T as i}from"./index-Bl5Gxo9i.js";import"./mui-_CQ1MGrl.js";import"./sentry-C8Zmy8eq.js";import"./zeni-epic-state-CeRetUx9.js";import"./recharts-DG48H-3-.js";import"./analytics-CaY7rw-O.js";import"./plaid-bOhNZMPB.js";import"./dnd-Zw_s-D7Q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DW7v-RpQ.js";import"./lexical-DW7Zgdoo.js";import"./pdf-BRE_7-P-.js";import"./utils-CmjIXJxz.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="df9e7e33-2ed0-48bd-9985-e24b323e3cf3",o._sentryDebugIdIdentifier="sentry-dbid-df9e7e33-2ed0-48bd-9985-e24b323e3cf3")}catch{}})();const d=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function _(){const o=r();return e.jsx(d,{navigate:o})}export{_ as default};
@@ -1 +0,0 @@
1
- import{j as m}from"./liveblocks-CA2qpkTt.js";import{a as r}from"./sentry-C8Zmy8eq.js";import{u as P,g as A,j as o,N as C}from"./core-CZ9_x3uq.js";import{JP as j,eP as J,f7 as R,JQ as x,JR as z,JS as D,JT as L,mW as M,IL as N}from"./zeni-epic-state-CeRetUx9.js";import{z as h,C as I}from"./index-Bl5Gxo9i.js";import"./mui-_CQ1MGrl.js";import"./recharts-DG48H-3-.js";import"./analytics-CaY7rw-O.js";import"./plaid-bOhNZMPB.js";import"./dnd-Zw_s-D7Q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DW7v-RpQ.js";import"./lexical-DW7Zgdoo.js";import"./pdf-BRE_7-P-.js";import"./utils-CmjIXJxz.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="f4598364-ed5b-40d7-befa-df4364e6066b",n._sentryDebugIdIdentifier="sentry-dbid-f4598364-ed5b-40d7-befa-df4364e6066b")}catch{}})();function ee(){const n=P(),s=A(),{params:t,error:i}=r.useMemo(()=>j(s.search),[s.search]),w=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),f=h.isSignedIn(),a=h.getSignedInUser(),p=o(e=>J(e)),l=o(e=>R(e)),d=o(e=>e.tenantState.fetchState),b=o(x),y=o(z),u=o(D),[S,v]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(L())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{f&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(M(a.userId,a.zeniSessionId??void 0))))},[f,a,d,n]),r.useEffect(()=>{u!=null&&u!==""&&(window.location.href=u)},[u]);const U=r.useMemo(()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(T=>T.tenantId===e)?e:l.length===1?l[0].tenantId:null},[p?.tenantId,l]),c=S??U;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:v,approveError:E??y,isApproving:b==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&a!=null&&c!=null&&n(N(a.userId,a.zeniSessionId??void 0,c,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(C,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
@@ -1 +0,0 @@
1
- import{j as r}from"./liveblocks-CA2qpkTt.js";import{h as V,u as z,g as Z,i as H,j as d,n as J,o as Q,p as I}from"./core-CZ9_x3uq.js";import{eP as U,qT as R,qr as X,Kl as v,qm as T,bt as ee,bn as ae,bT as te,qn as se,Km as oe,K7 as C,dE as ne,un as re,Kn as ce,uK as ie,e_ as le,eY as de}from"./zeni-epic-state-CeRetUx9.js";import{z as me,Y as fe,_ as pe,k as ue,v as q,I as M,K as he,c as $,ao as ge,n as Fe}from"./index-Bl5Gxo9i.js";import"./mui-_CQ1MGrl.js";import be from"./NotFoundScreen-D0aNQysK.js";import{F as Ie}from"./FeaturePreviewScreen-D4fzXiSu.js";import{a as g}from"./sentry-C8Zmy8eq.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-B695I2Ok.js";import{u as Te}from"./useInitialThreadRequest-DyYfRVlJ.js";import{t as Se}from"./routePaths-DynLDVDN.js";import{M as ye}from"./MobileAppDrawer-CACo4kMO.js";import"./recharts-DG48H-3-.js";import"./analytics-CaY7rw-O.js";import"./plaid-bOhNZMPB.js";import"./dnd-Zw_s-D7Q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DW7v-RpQ.js";import"./lexical-DW7Zgdoo.js";import"./pdf-BRE_7-P-.js";import"./utils-CmjIXJxz.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="c1cf31fe-5745-4c66-98b4-e5268372d180",s._sentryDebugIdIdentifier="sentry-dbid-c1cf31fe-5745-4c66-98b4-e5268372d180")}catch{}})();const S=(s,e,a,o)=>{if(s!=e){const n=o??"";s!=null&&s.length>0?a(`../${e}${n}`,{replace:!0}):a(`${e}${n}`,{replace:!0})}},ke=J(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(n=>{a[n]=o[n]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:$}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(v(a,o)),e.isPandLReportFetched(a)||s(T(a)),S(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ie(a))},onForecastVsActualsCompareToggle:a=>{s(ce(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(re(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let n,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(n=o.balanceTimeFrame,c=ne(o)):o.balanceTimeFrame==="year"?(n="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&n!=null){const m=Se(e.tenantEmailDomain,a.accountId,a.accountType,p,n,c),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(ge);function O(){const s=V(),e=z(),a=Z(),{forecastId:o,tenantEmailDomain:n}=H(),[c,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d(t=>U(t)),w=y.company?.companyInfo.firstMonthOfFY??1,i=d(t=>R(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:K,onAskAiCfoClick:_}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!c&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,L,P)=>L!=null?f.forecasts.findIndex(b=>b.id===L):P!=null?f.forecasts.findIndex(b=>b.id===P):f.forecasts.length>0?0:-1)(i,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(v(i.forecasts[t].id,t)),S(o,i.forecasts[t].id,s,a.search)):o==null&&t!==-1&&S(void 0,i.forecasts[t].id,s,a.search),t!==-1&&!x(i.forecasts[t].id)&&F&&e(T(i.forecasts[t].id))}},[c,p,e,l,i,m,u,R,T,F]);const D=ue(),B=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:N}=q(),{isFeatureEnabled:E}=N(M.isReportsCommentingEnabled),W=Te(E?y?.companyId:void 0,{clearParams:l&&m}),[Y,G]=g.useState(!1),j=t=>{G(t)};return r.jsxs(r.Fragment,{children:[l?r.jsx(he,{analytics:$,onLoad:t=>(f=>f.trackForecast())(t)}):null,r.jsx(ye,{isAppContentDrawerOpen:Y,handleDrawerToggle:j}),r.jsx(ke,{firstMonthOfFY:w,tenantEmailDomain:n,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:B,isAiCfoAccessEnabled:K,onAskAiCfoClick:_,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:W,onClickMenuIcon:()=>{j(!0)}})]})}function Ge(){const s=d(c=>U(c)),{useFeatureGate:e}=q(),{isFeatureEnabled:a}=e(M.isDebitCardFeatureEnabled),o=le(a,s),n=de(s);return o===!0||n===!0?r.jsx(Ie,{}):r.jsxs(Q,{children:[r.jsx(I,{path:"/",element:r.jsx(O,{})}),r.jsx(I,{path:"/:forecastId",element:r.jsx(O,{})}),r.jsx(I,{path:"/:forecastId/*",element:r.jsx(be,{})})]})}export{Ge as PandLWithForecastRoutes,Ge as default};
@@ -1,22 +0,0 @@
1
- import{j as s}from"./liveblocks-CA2qpkTt.js";import{Kg as te,eP as J,jG as z,e_ as Q,eY as ne,HI as q,JW as oe,tt as Ee,Kh as N,th as ke,tC as Ie,tw as ie,tl as re,tA as Pe,tx as je,Ki as le,v9 as Te,Kj as ve,fB as Le,Kk as K,tq as de,to as ce,tF as Fe,c2 as Ae}from"./zeni-epic-state-CeRetUx9.js";import{J as pe,v as X,I as E,z as H,a9 as ue,w as me,ak as ge,al as Re,s as he,o as R,x as fe,D as Ce,am as Oe,Y as Ve,_ as Ue,K as Be,c as be,e as Ze,n as $e,an as Ke,k as _e}from"./index-Bl5Gxo9i.js";import{D as ye,n as W,S as we}from"./mui-_CQ1MGrl.js";import ae from"./NotFoundScreen-D0aNQysK.js";import{a as r}from"./sentry-C8Zmy8eq.js";import{u as ee,i as Ge,j as m,h as ze,g as He,n as We,o as se,p as $}from"./core-CZ9_x3uq.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-B695I2Ok.js";import{M as Me}from"./MobileAppDrawer-CACo4kMO.js";import"./recharts-DG48H-3-.js";import"./analytics-CaY7rw-O.js";import"./plaid-bOhNZMPB.js";import"./dnd-Zw_s-D7Q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DW7v-RpQ.js";import"./lexical-DW7Zgdoo.js";import"./pdf-BRE_7-P-.js";import"./utils-CmjIXJxz.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]="d6f5cba2-1b62-435e-a61b-1a6b8a3edb55",a._sentryDebugIdIdentifier="sentry-dbid-d6f5cba2-1b62-435e-a61b-1a6b8a3edb55")}catch{}})();const Ne={overlayWidth:new he(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,Je=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:S}=Ge(),d=m(e=>te(e)),u=m(e=>J(e)),D=m(e=>z(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=Q(k,u),v=ne(u),L=q(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&D&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(N()),y()},F=()=>{O===!0?w(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),T=ue(u,j,k),{isFeatureEnabled:A}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:L,isAccountingClassesEnabled:D,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:v,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(a):Ie(L))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&S!=null&&p(Ee(S))},[x,S]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:s.jsxs(Qe,{onClick:e=>e.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:i,isEditPopup:!0}):null,s.jsx(Re,{...b})]})})},Qe=W(we)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,Se=W(fe.H6Regular)`
6
- margin-top: ${R.sp7};
7
- padding-left: ${R.sp8};
8
- padding-right: ${R.sp8};
9
- color: ${a=>a.theme.colors.primary};
10
- word-break: break-word;
11
- `,De=W(fe.LargeRegularSp)`
12
- color: ${a=>a.theme.colors.hero};
13
- padding-left: ${R.sp8};
14
- padding-right: ${R.sp8};
15
- margin-bottom: 30px;
16
- margin-top: ${R.sp4};
17
- white-space: pre-line;
18
- `,qe={overlayWidth:new he(100,100,48)},G=Ce.getLocalizedStrings().peoplePage.invitePage,Xe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),S=m(i=>te(i)),d=m(i=>J(i)),u=m(i=>z(i)),{useFeatureGate:D}=X(),{isFeatureEnabled:f}=D(E.isDebitCardFeatureEnabled),k=Q(f,d),P=ne(d),v=q(d),L=oe(d),U=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!k&&u&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(H.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{y(),p(N())},C=()=>{O===!0?w(!0):x()},F={onOkClick:()=>{w(!1),x()},onCancelClick:()=>{w(!1)}},Z=l.companyView?.controllers.map(i=>i.user),{isFeatureEnabled:c}=D(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=D(E.isChargeCardFeatureEnabled),T=ue(d,j,f),{isFeatureEnabled:A}=D(E.isTreasuryEnabled),b={classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:v,onPeopleLocalDataUpdated:i=>{p(ie({peopleLocalData:i})),V(!0)},onResetClick:x,onSaveClick:()=>{p(g==="zeni_only"?Pe(a):je())},onCloseClick:C,peopleDetails:S,isAccountingClassesEnabled:u,isReimbursementDisabled:U===!1,isLiteRoleDisabled:L===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:k,isCardsOnlyTenant:P,isLoading:B};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),p(N()))},[S.invitePersonState.fetchState]),s.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:C,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[I===!0?s.jsx(ge,{titleComponent:s.jsx(Se,{children:G.discardTitle}),descriptionComponent:s.jsx(De,{children:G.discardDescription}),primaryButtonText:G.discard,secondaryButtonText:G.no,action:F}):null,s.jsx(Oe,{...b})]})})},ea=W(we)`
19
- display: flex;
20
- min-height: 100%;
21
- flex-direction: column;
22
- `,aa=We(function(a,t){const l=le(a),n=H.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:z(a),analytics:be}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Fe(o))},onReloadPeople:()=>{a(de()),a(ce(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a(K({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a(K({searchText:o}))}}}})(Ke);function M({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=ze(),n=ee(),g=He(),{areTenantIdsInSync:o}=Ve(),y=H.getSignedInUser(),h=m(e=>J(e)),{useFeatureGate:p}=X(),{isFeatureEnabled:O}=p(E.isDebitCardFeatureEnabled),V=m(e=>z(e)),I=!Q(O,h)&&V,w=q(h),S=h?.tenantId,{tenantEmailDomain:d}=h,[u,D]=r.useState(!1),[f,k]=r.useState(!1),[P,v]=r.useState(!1),[L,U]=r.useState("off"),[B,x]=r.useState(!1),C=e=>{x(e)},{isAiCfoAccessEnabled:F,onAskAiCfoClick:Z}=Ye({mobileExploreReferrer:"People"}),c=m(e=>le(e));Ue({isDataReady:c.fetchState==="Completed"});const j=m(e=>Te(e.classState,e.classListState)),T=m(e=>ve(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>Le(e)),b=h?.companyId;r.useEffect(()=>{u&&L===c.uiState.mode||!o||(n(K({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(c.uiState.mode),D(!0),n(de()))},[u,y,S,n,c.uiState.mode,o]),r.useEffect(()=>{b!=null&&o&&n(ce(b,I))},[b,I,o]),r.useEffect(()=>{k(a!=null&&a===!0),v(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n(K({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{k(!1),v(!1),l("../")};return s.jsxs(s.Fragment,{children:[c.fetchState==="Completed"?s.jsx(Be,{analytics:be,onLoad:e=>e.trackPageLoaded(Ze.Event.members)}):null,f===!0?s.jsx(Xe,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:f,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,P===!0?s.jsx(Je,{closeDrawerHandler:i,isEditPeopleDrawerOpen:P,managersListView:T,companyPassportView:A,classListView:j,companyId:b,mode:c.uiState.mode}):null,s.jsx(Me,{isAppContentDrawerOpen:B,handleDrawerToggle:C}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:h.isZeni,isZeniTenant:w,peopleUIState:c.uiState,companyId:b,shouldFetchClasses:I,classList:j,managersView:T,peopleView:c,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,Y)=>{n(K({sortKey:e,sortOrder:Y}))},onRowClick:e=>{const Y=`/${d}/people/${encodeURIComponent(e)}/edit`,xe=$e(g.state?.pathnameStackToGoBack,g.pathname);l(Y,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:F,onAskAiCfoClick:Z})]})}function wa(){const a=_e();return Ae(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx($,{path:"/",element:s.jsx(M,{})}),s.jsx($,{path:"new",element:s.jsx(M,{isInvitePeopleDrawerOpen:!0})}),s.jsx($,{path:":userId/edit",element:s.jsx(M,{isEditPeopleDrawerOpen:!0})}),s.jsx($,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx($,{path:"*",element:s.jsx(ae,{})})})}export{wa as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-CA2qpkTt.js";import E from"./NotFoundScreen-D0aNQysK.js";import{a as r}from"./sentry-C8Zmy8eq.js";import{h as _,g as v,j as p,i as M,u as P,N as U,n as O,o as z,p as h}from"./core-CZ9_x3uq.js";import{eP as B,Q6 as b,bo as F,bn as N,hn as V,gT as Q}from"./zeni-epic-state-CeRetUx9.js";import{O as $,z as I,_ as q,cD as G}from"./index-Bl5Gxo9i.js";import"./mui-_CQ1MGrl.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-B695I2Ok.js";import{M as J}from"./MobileAppDrawer-CACo4kMO.js";import"./recharts-DG48H-3-.js";import"./analytics-CaY7rw-O.js";import"./plaid-bOhNZMPB.js";import"./dnd-Zw_s-D7Q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DW7v-RpQ.js";import"./lexical-DW7Zgdoo.js";import"./pdf-BRE_7-P-.js";import"./utils-CmjIXJxz.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]="9c25fb59-7d16-460a-8e5d-1fbf0fa3bf59",e._sentryDebugIdIdentifier="sentry-dbid-9c25fb59-7d16-460a-8e5d-1fbf0fa3bf59")}catch{}})();const K=O(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(G),L=()=>{const e=_(),t=v(),c=$(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:m}=M(),u=P(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=r.useRef(!1),[w,S]=r.useState(!1),C=F(o?.userRole??[]),D=o?.userRole?.includes("bookkeeping_admin")??!1,k=N(l),x=C||D||k,d=r.useCallback((a,i,A)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:A}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&f.current&&(u(Q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const y=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),f.current=!0},[n?.fetchState,d]),j=r.useCallback((a,i)=>{d(a,i,!1)},[d]),g=a=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:T}=H({mobileExploreReferrer:"Performance"});return q({isDataReady:n?.fetchState==="Completed"}),x?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:y,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:T})]}):s.jsx(U,{to:`/${m}/dashboard`,replace:!0})};function ge(){return s.jsxs(z,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
@@ -1,5 +0,0 @@
1
- import{j as s}from"./liveblocks-CA2qpkTt.js";import{a as o}from"./sentry-C8Zmy8eq.js";import{j as f,h as B,u as _,g as F,n as H}from"./core-CZ9_x3uq.js";import{h as N,J as V,z as R,b9 as W,s as U,Y as $,_ as z,K,c as l,e as Y,a7 as J,ba as q}from"./index-Bl5Gxo9i.js";import{f2 as G,eP as Q,ML as P,MM as X,ud as Z,u3 as g,f4 as ee,bO as ae,u8 as re,MN as ne}from"./zeni-epic-state-CeRetUx9.js";import{D as te,e as se,n as oe,S as ie}from"./mui-_CQ1MGrl.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-B695I2Ok.js";import{M as de}from"./MobileAppDrawer-CACo4kMO.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]="98ca402b-73ed-44e1-85e4-ed482e058b57",e._sentryDebugIdIdentifier="sentry-dbid-98ca402b-73ed-44e1-85e4-ed482e058b57")}catch{}})();const ce={overlayWidth:new U(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=N(),n=V();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(d=>G(d));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:ce.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx(W,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
2
- display: flex;
3
- min-height: 100%;
4
- flex-direction: column;
5
- `,I="refer-and-earn-status-update",we=H(function(e){const a=P(e),r=e.referralViewState.rewardsPlanFetchState,n=ae([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(re(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(J(q));function ve({isReferralDrawerOpen:e}){const a=B(),r=_(),n=F(),[i,u]=o.useState(!1),[d,x]=o.useState(!1),[D,E]=o.useState(!1),[k,h]=o.useState(!1),w=R.getSignedInUser(),C=f(t=>Q(t)),m=f(t=>P(t)),b=m.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),y=X([m,p]),{areTenantIdsInSync:c}=$();o.useEffect(()=>{C?.rewardsLastViewedTime==null&&D===!1&&(r(Z()),E(!0))},[]),o.useEffect(()=>{!i&&b==="Not-Started"&&c&&(u(!0),r(g(!0)))},[b,r,c]),o.useEffect(()=>{!d&&p.fetchState==="Not-Started"&&c&&(x(!0),r(ee(!0)))},[p,r,c]),o.useEffect(()=>{h(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),v=t=>{A(t)},{isAiCfoAccessEnabled:M,onAskAiCfoClick:O}=le({mobileExploreReferrer:"Rewards"});z({isDataReady:y===!0});const L={events:w?.userId!=null?[`private-encrypted-${w.userId}.${I}`]:[],eventCallback:(t,S,T)=>{T.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[y===!0?s.jsx(K,{analytics:l,onLoad:t=>(S=>{w!=null&&S.trackPageLoaded(Y.Event.rewardsPageViewed)})(t)}):null,s.jsx(de,{isAppContentDrawerOpen:j,handleDrawerToggle:v}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{h(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:a,currentTenant:C,onClickMenuIcon:()=>{v(!0)},isAiCfoAccessEnabled:M,onAskAiCfoClick:O,...L})]})}export{ve as R};
@@ -1 +0,0 @@
1
- import{j as t}from"./liveblocks-CA2qpkTt.js";import x from"./NotFoundScreen-D0aNQysK.js";import{a as p}from"./sentry-C8Zmy8eq.js";import{h as I,g as C,u as D,j as u,N as A,n as E,o as k,p as c}from"./core-CZ9_x3uq.js";import{eP as V,NF as g,NV as S,Da as T,Cj as N,D9 as d,D0 as U,O9 as _}from"./zeni-epic-state-CeRetUx9.js";import{h as O,z as $,B,a7 as P,bQ as W,af as z}from"./index-Bl5Gxo9i.js";import"./mui-_CQ1MGrl.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-DGGsRmkG.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="9f1a89f5-5c35-4d8c-a495-35112bbebedb",e._sentryDebugIdIdentifier="sentry-dbid-9f1a89f5-5c35-4d8c-a495-35112bbebedb")}catch{}})();const m="reimbursement-approval-rule-update",F=E(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(m)&&e(_(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(U(s))},onEditRuleClick:s=>{s!=null?(e(d(s)),a(`./${s}/edit`)):(e(d()),a("./new"))}}})(P(W)),Q=()=>{const e=I(),r=C(),a=D(),[l,s]=p.useState(!1),[f,y]=p.useState(!1),b=u(n=>n.remiSetupApproverViewState.fetchState),o=u(n=>V(n)),w=O(),i=u(n=>g(n)),h=u(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(T())},[h]),p.useEffect(()=>{l||b!=="Not-Started"||(s(!0),a(N(!0)))},[l,b,a]),$.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(f||(y(!0),a(d())),e("./new"))},[f,i,a]);const j={events:o.companyId!=null?[`private-encrypted-${o.companyId}.${m}`]:[],eventCallback:(n,q,R)=>{n.endsWith(m)&&R.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(A,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(B,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(F,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(k,{children:[t.jsx(c,{path:"/",element:t.jsx(Q,{})}),t.jsx(c,{path:"/new",element:t.jsx(v,{})}),t.jsx(c,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(c,{path:"*",element:t.jsx(x,{})})]})}export{Z as R};
@@ -1 +0,0 @@
1
- import{j as a}from"./liveblocks-CA2qpkTt.js";import{v as x,z as w,aN as y,K as E,c as p,e as F,cN as P,I as L}from"./index-Bl5Gxo9i.js";import"./mui-_CQ1MGrl.js";import l from"./NotFoundScreen-D0aNQysK.js";import{a as u}from"./sentry-C8Zmy8eq.js";import{u as T,j as b,h as V,g as A,n as R,o as U,p as d}from"./core-CZ9_x3uq.js";import{eP as z,QG as C,Nk as Q,QH as N,ud as G,f4 as Y,QI as H,ub as K}from"./zeni-epic-state-CeRetUx9.js";import{R as j}from"./ReferralListScreen-Cw5PnCdh.js";import"./recharts-DG48H-3-.js";import"./analytics-CaY7rw-O.js";import"./plaid-bOhNZMPB.js";import"./dnd-Zw_s-D7Q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DW7v-RpQ.js";import"./lexical-DW7Zgdoo.js";import"./pdf-BRE_7-P-.js";import"./utils-CmjIXJxz.js";import"./useAskAiCfoHostNavButtonProps-B695I2Ok.js";import"./MobileAppDrawer-CACo4kMO.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]="ac2bd1ee-5315-4369-88b2-0a6f489a2d09",e._sentryDebugIdIdentifier="sentry-dbid-ac2bd1ee-5315-4369-88b2-0a6f489a2d09")}catch{}})();const O=R(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{e(N()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(K())},onUpdateInviteFormLocalData:s=>{e(H({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(P),q=()=>{const e=T(),[t,n]=u.useState(!1),[i,s]=u.useState(!1),r=b(o=>z(o)),c=V(),_=A(),{useDynamicConfig:g}=x(),f=w.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const m=b(o=>C(o)),k=f?.firstName!=null?f.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:v}=g(y.zeniAccountsConfig),I=Q(v);u.useEffect(()=>{e(N()),r?.rewardsLastViewedTime==null&&i===!1&&(e(G()),s(!0))},[]),u.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(Y(!0)))},[m.fetchState,e]);const D=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:o=>(S=>S.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,a.jsx(O,{navigate:c,location:_,currentTenant:r,companyName:D,userName:k,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:I.maxAnnualPercentageYield})]})};function de(){const{useFeatureGate:e}=x(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(d,{path:"/",element:t?a.jsx(j,{}):a.jsx(l,{})}),a.jsx(d,{path:"how-it-works",element:t?a.jsx(j,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(q,{}):a.jsx(l,{})}),a.jsx(d,{path:"*",element:a.jsx(l,{})})]})}export{de as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-JxZvBYab.js","assets/sentry-C8Zmy8eq.js","assets/core-CZ9_x3uq.js","assets/zeni-epic-state-CeRetUx9.js","assets/index-Bl5Gxo9i.js","assets/mui-_CQ1MGrl.js","assets/analytics-CaY7rw-O.js","assets/utils-CmjIXJxz.js","assets/withTransactionSidePanel-CAqdAy8r.js","assets/useAskAiCfoHostNavButtonProps-B695I2Ok.js","assets/TransactionDetailScreen-C-EmLt2t.js","assets/decodeURIComponentSafe-COFNvK3Q.js","assets/routePaths-DynLDVDN.js","assets/NotFoundScreen-D0aNQysK.js","assets/useInitialThreadRequest-DyYfRVlJ.js","assets/analyticsHelper-BdzlNWvU.js","assets/CompanyPassportScreen-1-2hcUKs.js","assets/MobileAppDrawer-CACo4kMO.js","assets/useAiCfoDashboardSuggestedQuestionsChips-BL6bbKBu.js","assets/FeaturePreviewScreen-D4fzXiSu.js","assets/ReferralListScreen-Cw5PnCdh.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-YgBi3X8x.js","assets/AddressScreen-DSUmBeDi.js","assets/DomesticWireDetailScreen-CN2xy1Dg.js","assets/DrawerScreen-DG4CCTYZ.js","assets/SetupPagesScreen-DQQMK2Pe.js","assets/BusinessVerificationPageScreen-CWb716op.js","assets/BillPayApprovalRoutes-BcrHy3_d.js","assets/ReimbursementApprovalRuleDetailScreen-DGGsRmkG.js","assets/getLocaleForTenant-KiSPE8IK.js","assets/ReimbursementRoutes-DbdgfdZO.js","assets/ReimbursementApprovalRoutes-COn4sGv0.js","assets/TransactionListRoutes-0kJw-sSs.js","assets/ZeniAccountStatementScreen-3EXJRXGT.js","assets/SettingsRoutes-TFYXXQvf.js","assets/accountMappingHelper-olmW29yz.js","assets/QBOConnectionScreen-CEl_0cd_.js","assets/empty-9FZm-BqI.js","assets/index-G8xNq7rD.js","assets/url-ByuQXOc6.js","assets/index-CuxNhIGG.js","assets/ReportsRoutes-Bn5dyHsG.js","assets/ChargeCardRoutes-xCmOBvgL.js","assets/PeopleRoutes-DSl60kI7.js","assets/ExpenseAutomationRoutes-BJi8fni-.js","assets/TreasuryRoutes-MmngbaSb.js","assets/VendorsRoutes-l_Dx0YSI.js","assets/pathToGoBack-DbVxA-Rx.js","assets/ZeniAccountRoutes-BuSSg7oM.js","assets/AddressRoutes-CTHJ7nga.js","assets/PandLWithForecastRoutes-BCT-glGf.js","assets/CustomerOnboardingRoutes-G4MKQ9R6.js","assets/TransactionDetailRoutes-DDq43332.js","assets/EntityDetailRoutes-CbyVY3jc.js","assets/NotificationRoutes-BWW1ON6g.js","assets/PerformanceRoutes-DO510pLR.js","assets/RewardsRoutes-B2MJrs_o.js","assets/TaskRoutes-HhKys__h.js","assets/TaskListScreen-Emg8otmN.js","assets/AiCfoScreen-BOZ3U8iE.js"])))=>i.map(i=>d[i]);
2
- import{_ as n,bn as os,eP as ls,e_ as cs,eY as ds,eZ as ms,fH as us,eT as _s,cP as Ee,cx as Es,fe as As,cp as ps,bE as gs,bq as xs,fj as Is,v as Ts,Jr as hs,bt as js,Js as Us,bG as Hs,fg as Rs,bF as bs,bs as Ds,cl as ys,Jt as fs,Ju as Cs,cM as vs,cO as Os,cN as Ps,cw as Fs,cC as Ls,mW as Ae,eW as pe,fR as Bs,fn as ge,fO as xe,fP as Ie,fo as ks}from"./zeni-epic-state-CeRetUx9.js";import{j as e}from"./liveblocks-CA2qpkTt.js";import{a as v}from"./sentry-C8Zmy8eq.js";import{u as Vs,h as Ss,i as Ns,g as Ms,j as G,l as Te,N as c,o as Zs,p as t}from"./core-CZ9_x3uq.js";import{h as ws,u as Gs,z as R,v as zs,a as $s,X as Ws,I as L,k as Ys,L as B,D as he,t as _,P as Js,c as Q,l}from"./index-Bl5Gxo9i.js";import"./mui-_CQ1MGrl.js";import{f as je}from"./analyticsHelper-BdzlNWvU.js";import{t as qs}from"./getLocaleForTenant-KiSPE8IK.js";import"./recharts-DG48H-3-.js";import"./analytics-CaY7rw-O.js";import"./plaid-bOhNZMPB.js";import"./dnd-Zw_s-D7Q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DW7v-RpQ.js";import"./lexical-DW7Zgdoo.js";import"./pdf-BRE_7-P-.js";import"./utils-CmjIXJxz.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="98e71810-449b-43d5-8a0c-2547ef74ff51",i._sentryDebugIdIdentifier="sentry-dbid-98e71810-449b-43d5-8a0c-2547ef74ff51")}catch{}})();const Xs={dashboard:()=>n(()=>import("./DashboardRoutes-JxZvBYab.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>n(()=>import("./BillPayRoutes-YgBi3X8x.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-DbdgfdZO.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>n(()=>import("./TransactionListRoutes-0kJw-sSs.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>n(()=>import("./SettingsRoutes-TFYXXQvf.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21])),reports:()=>n(()=>import("./ReportsRoutes-Bn5dyHsG.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-xCmOBvgL.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21])),people:()=>n(()=>import("./PeopleRoutes-DSl60kI7.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-BJi8fni-.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>n(()=>import("./TreasuryRoutes-MmngbaSb.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21])),vendors:()=>n(()=>import("./VendorsRoutes-l_Dx0YSI.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-BuSSg7oM.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))},Ks=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Qs=l(()=>n(()=>import("./ReportsRoutes-Bn5dyHsG.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21]))),en=l(()=>n(()=>import("./AddressRoutes-CTHJ7nga.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,13,21]))),sn=l(()=>n(()=>import("./PeopleRoutes-DSl60kI7.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-BCT-glGf.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-G4MKQ9R6.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,13,37,38,39,40,41,11,21]))),tn=l(()=>n(()=>import("./VendorsRoutes-l_Dx0YSI.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-DDq43332.js"),__vite__mapDeps([53,1,2,3,13,4,5,6,7,10,9,11,12,21]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-CbyVY3jc.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,11,8,9,10,12,21]))),on=l(()=>n(()=>import("./DashboardRoutes-JxZvBYab.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),He=l(()=>n(()=>import("./BillPayRoutes-YgBi3X8x.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21]))),ln=l(()=>n(()=>import("./SettingsRoutes-TFYXXQvf.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21]))),Re=l(()=>n(()=>import("./ReimbursementRoutes-DbdgfdZO.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-BuSSg7oM.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))),dn=l(()=>n(()=>import("./TreasuryRoutes-MmngbaSb.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21]))),mn=l(()=>n(()=>import("./TransactionListRoutes-0kJw-sSs.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),un=l(()=>n(()=>import("./ChargeCardRoutes-xCmOBvgL.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,13,15,12,27,14,9,23,21]))),_n=l(()=>n(()=>import("./NotificationRoutes-BWW1ON6g.js"),__vite__mapDeps([55,1,2,3,13,4,5,6,7,9,21]))),En=l(()=>n(()=>import("./PerformanceRoutes-DO510pLR.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,9,17,21]))),An=l(()=>n(()=>import("./ExpenseAutomationRoutes-BJi8fni-.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),pn=l(()=>n(()=>import("./RewardsRoutes-B2MJrs_o.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,13,20,9,17,21]))),gn=l(()=>n(()=>import("./TaskRoutes-HhKys__h.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,14,17,59,9,21]))),xn=l(()=>n(()=>import("./AiCfoScreen-BOZ3U8iE.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,18,48,21]))),y=l(()=>n(()=>import("./NotFoundScreen-D0aNQysK.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),In=l(()=>n(()=>import("./TaskListScreen-Emg8otmN.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,17,21])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Gs(),D=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),q=os(h),z=Ms(),[N,De]=v.useState(!1),r=G(a=>ls(a)),{useFeatureGate:P}=zs(),X=$s(),ye=Ws(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&q,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=G(a=>a.tenantState.fetchState),A=G(a=>a.tenantState.activeTenantFetchState.fetchState),u=A==="Completed"||j==="Completed"?cs(se,r):void 0,$=A==="Completed"||j==="Completed"?ds(r):void 0,Le=A==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),W=G(a=>us(a));if(o!=null){const a=R.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:D,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),E=Ys(),Se=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=Es(E?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,K=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=G(a=>w.tenantId!=null?As(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(K!=null&&D!=null){const a=K.params.selectedPeriod;if(a!=null){const H=a.split("-");if(H.length===2){const d=ps(Number(H[0])),s=Number(H[1]),m=gs(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=xs();m.isAfter(M,"month")===!1?U(Is(D,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[K,D]),v.useEffect(()=>{N||(De(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s){if(pe(H?.userId,H?.zeniSessionId,a.tenantId),d(Bs(!0)),d(ge(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=R.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(qs(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?Q.identify(a.userId,{tenant_id:a.tenantId}):Q.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,H,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const Y=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(Y&&ts){k(ge(s));const J=R.getSignedInUserTenantWithId(s);J?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(J?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)))}else Y&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(xe(m.userId,s))),Y&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(Ie(m.userId,s)));if(Y){Q.identify(m.userId,{tenant_id:s});const J=s==null||s!=null&&(H==="Completed"||H==="Error");a==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),J&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ae(m.userId,m.zeniSessionId)))}}(j,A,r,D,h,f,U))},[D,A]),v.useEffect(()=>{R.isSignedIn()&&j==="Completed"&&W.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),R.saveSignedInUserTenants(hs(W.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,W.tenantsBaseInOrder))},[W,j,r,h]),v.useEffect(()=>{A==="In-Progress"&&f(B.TENANT_FETCHING),A!=="Completed"&&A!=="Error"||(A==="Completed"&&D!=null?(O(),_.markActiveTenantFetchCompleted(D)):A==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[A,j,D,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&A==="Completed"&&N&&(ie.current=!0,function(a=Ks,H=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Xs[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},H)}())},[A,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ee(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,ze=Us(E?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&Hs(E?.loggedInUserRoleMap),me=Oe&&!C,We=r.company!=null&&Rs(r.company),Ye=Pe&&We===!0&&!C,Je=re&&bs(E?.loggedInUserRoleMap),qe=oe&&Ds(E?.loggedInUserRoleMap),Xe=me&&ys(E?.loggedInUserRoleMap),Ke=fs(E?.loggedInUserRoleMap),Qe=Cs(E?.loggedInUserRoleMap),p=vs(E?.loggedInUserRoleMap),g=Os(E?.loggedInUserRoleMap),x=Ps(E?.loggedInUserRoleMap),I=Fs(E?.loggedInUserRoleMap),T=Ls(E?.loggedInUserRoleMap),ue=re&&I,_e=ce&&T,es=me&&p,ss=Ye&&g,ns=oe&&x,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||ze===!0||Ke===!0||Qe===!0;return R.isSignedIn()?D==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ae(h.userId,h.zeniSessionId)),null):A!=="In-Progress"&&A!=="Not-Started"||j==="Completed"?(le===!0||q&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||q?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(Js,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Qs,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||Ge?e.jsx(rn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:g,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(In,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(gn,{})}),e.jsx(t,{path:"address/*",element:Je||de||Xe||qe?e.jsx(en,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(En,{}):e.jsx(be,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(An,{}):e.jsx(be,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(He,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(He,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(Re,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(Re,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:x,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:g,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:X?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:X?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:X?e.jsx(xn,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}const Tn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),b=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(Hn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Rn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Rn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),be=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{b as FallBackRoute,wn as default};
@@ -1 +0,0 @@
1
- import{j as f}from"./liveblocks-CA2qpkTt.js";import{a as u,b as T,q as A}from"./sentry-C8Zmy8eq.js";import{u as D,h as z,j as l,g as J,N as M,n as O}from"./core-CZ9_x3uq.js";import{u as P,z as s,h as j,c as E,D as F,d as _,e as B,A as N,g as q,f as V,i as v}from"./index-Bl5Gxo9i.js";import{eP as W,Jq as $,Jr as G,eW as H,fn as K,Jw as Q,fL as R,cT as X,Jx as b,Jy as Y,Jz as Z,bT as y}from"./zeni-epic-state-CeRetUx9.js";import"./mui-_CQ1MGrl.js";import{u as ee}from"./useDeviceId-DA16gBd2.js";import{f as te}from"./analyticsHelper-BdzlNWvU.js";import{t as ne}from"./getLocaleForTenant-KiSPE8IK.js";import"./recharts-DG48H-3-.js";import"./analytics-CaY7rw-O.js";import"./plaid-bOhNZMPB.js";import"./dnd-Zw_s-D7Q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DW7v-RpQ.js";import"./lexical-DW7Zgdoo.js";import"./pdf-BRE_7-P-.js";import"./utils-CmjIXJxz.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="64db6861-9fe4-4818-be1c-a6706255796b",t._sentryDebugIdIdentifier="sentry-dbid-64db6861-9fe4-4818-be1c-a6706255796b")}catch{}})();const ie=O(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}},function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(c),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Y(n,a)))},clearSignInError:()=>{t(b())}}})(V),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),c=l(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:x,accountUnlockTime:k}=l(e=>e.tenantState),p=l(e=>e.tenantState.fetchState),L=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),o=l(e=>e.tenantState.loggedInUser),r=l(e=>W(e)),I=l(e=>$(e)),m=J(),w=j().mode,C=m.state?.magicLinkExpired,U=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[h.fetchState,c]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(G(I.tenantsInOrder),o.zeniSessionId),H(o.userId,o.zeniSessionId,r.tenantId),i(K(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(Q("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),R().then(()=>{const e=q();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",X(r.productSettings))},2e3))},[S,p,L,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(M,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!U,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),x===!0&&k!=null?f.jsx(N,{onClose:()=>i(b()),unlockDate:k}):null]})}export{ve as default};
@@ -1,9 +0,0 @@
1
- import{j as s}from"./liveblocks-CA2qpkTt.js";import{a as n}from"./sentry-C8Zmy8eq.js";import{u,g as m,h as p,N as g}from"./core-CZ9_x3uq.js";import{z as f,B as y,t as b,c as d,e as h}from"./index-Bl5Gxo9i.js";import{fQ as x,fR as I,JO as w}from"./zeni-epic-state-CeRetUx9.js";import{n as j}from"./mui-_CQ1MGrl.js";import"./recharts-DG48H-3-.js";import"./analytics-CaY7rw-O.js";import"./plaid-bOhNZMPB.js";import"./dnd-Zw_s-D7Q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DW7v-RpQ.js";import"./lexical-DW7Zgdoo.js";import"./pdf-BRE_7-P-.js";import"./utils-CmjIXJxz.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]="2dacdfc5-13e6-419d-bfba-01f38107e18e",e._sentryDebugIdIdentifier="sentry-dbid-2dacdfc5-13e6-419d-bfba-01f38107e18e")}catch{}})();function Q(){const e=u(),t=m(),i=p(),a=n.useRef(!1),c=f.isSignedIn(),r=t.state?.message==="logout",o=r||c;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{f.clearAll(),e(x()),e(I(!1)),w(),b.reset(),d.trackLogout(h.Event.logoutSuccess),d.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=j.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
- `;export{Q as default};
@@ -1,9 +0,0 @@
1
- import{j as d}from"./liveblocks-CA2qpkTt.js";import{a as g}from"./sentry-C8Zmy8eq.js";import{h as K,u as _,g as z,j as b,i as O,n as V}from"./core-CZ9_x3uq.js";import{z as Q,v as W,I as p,_ as Z,K as M,c as q,e as J,cQ as X,n as f,p as H}from"./index-Bl5Gxo9i.js";import{eP as Y,QN as R,Gj as y,QO as x,QJ as aa,FL as S,QP as ea,FP as I,Fi as ta,Gk as B,QQ as w,gT as sa,Ga as oa,Gf as na,G2 as ia,G0 as L,Gg as la,FZ as ra,QR as ka,QS as ca,QT as ua,QU as da,QV as T,ec as pa,QW as Ta,QX as ma}from"./zeni-epic-state-CeRetUx9.js";import{n as ga}from"./mui-_CQ1MGrl.js";import{u as fa}from"./useAskAiCfoHostNavButtonProps-B695I2Ok.js";import{M as Ga}from"./MobileAppDrawer-CACo4kMO.js";import"./recharts-DG48H-3-.js";import"./analytics-CaY7rw-O.js";import"./plaid-bOhNZMPB.js";import"./dnd-Zw_s-D7Q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DW7v-RpQ.js";import"./lexical-DW7Zgdoo.js";import"./pdf-BRE_7-P-.js";import"./utils-CmjIXJxz.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]="fea2b5b9-d740-445a-ba2d-ee393414045c",e._sentryDebugIdIdentifier="sentry-dbid-fea2b5b9-d740-445a-ba2d-ee393414045c")}catch{}})();const ha=ga.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
- `,Da=V(function(e,t){const o=R(e,t.isTaskTemplatesEnabled),{taskGroupId:k}=t,i=k!=null&&k!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(a=>a.taskGroupIds.includes(k))})).filter(l=>l.tasks.length>0)}:o,u=aa(e),n=Q.isZeniUser();return{taskListView:i,tagListView:u,localData:i.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:n}},function(e,t){const{navigate:o,currentTenant:k,location:i,isTaskTemplatesEnabled:u}=t,{tenantEmailDomain:n}=k,{groupByKey:l}=t.uiState;return{onTaskManagementRowClick:a=>{const s=F(n,a),c=f(i.state?.pathnameStackToGoBack,i.pathname);o(s,{state:{pathnameStackToGoBack:c}})},onReloadTasks:()=>{e(y(!0,u))},onTabChange:a=>{e(da(a))},onParentTaskClick:a=>{const s=F(n,a);window.open(s,"_blank","noopener")},bulkUpdateTasks:(a,s)=>{e(L(a,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const a=C(n,t.localData.defaultTaskGroupId),s=f(i.state?.pathnameStackToGoBack,i.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{e(w({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{e(ua({filters:a}))},onSearchTextChanged:a=>{e(ca({searchText:a}))},onReloadCards:()=>{e(y(!0,u))},onBackClick:()=>{if(i.state?.message==="triggerBackClick"){const a=H(i.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{e(ka({localData:a}))},resetLocalData:()=>{e(x({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{e(ra(t.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{e(L(t.localData.selectedTaskIds,a,la(t.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{e(ia(a))},onAddNewTaskToTaskGroup:a=>{if(t.localData.defaultTaskGroupId!=null){const s=ba(l,a);e(S({taskDetailLocalData:s}));const c=C(n,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),G=f(i.state?.pathnameStackToGoBack,i.pathname);o(c,{state:{pathnameStackToGoBack:G,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{e(na(t.localData.selectedTaskIds.length>0?t.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{e(oa(a,s))},onTimeSpentUpdate:(a,s)=>{e(B({task:a,updates:s}))},onShowToast:a=>{e(sa(a))},onGroupByFilterChange:a=>{e(w({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{e(B({task:a,updates:s}))},onCreateTagClick:(a,s)=>{e(ta(a,s))},handleGroupTemplateClick:a=>{e(I(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{e(I(a,[s]))},handleNewTaskInitialization:a=>{if(e(S({taskDetailLocalData:{...ea,name:a}})),t.localData.defaultTaskGroupId!=null){const s=C(n,t.localData.defaultTaskGroupId),c=f(i.state?.pathnameStackToGoBack,i.pathname);o(s,{state:{pathnameStackToGoBack:c,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${n}/tasks/group/${a}`)},onQuickResponsesClick:()=>{o(`/${n}/tasks/quick-responses`)}}})(X);function va(){const e=K(),t=_(),o=z(),k=Q.getSignedInUser(),i=b(r=>Y(r)),{taskGroupId:u}=O(),{useFeatureGate:n}=W(),{isFeatureEnabled:l}=n(p.isTaskTemplatesEnabled),{isFeatureEnabled:a}=n(p.isTaskCannedResponsesEnabled),{isFeatureEnabled:s}=n(p.isTaskCategorizationEnabled),{isFeatureEnabled:c}=n(p.isTaskBulkResolutionEnabled),{isFeatureEnabled:G}=n(p.isTaskGroupAssigneesEnabled),{isFeatureEnabled:A}=n(p.isTaskRecurringParentEnabled),[E,P]=g.useState(!1),[j,N]=g.useState(!1),h=b(r=>R(r,l)),D=b(r=>r.taskGroupState),m=h.fetchState,{isAiCfoAccessEnabled:$,onAskAiCfoClick:v}=fa({mobileExploreReferrer:"Task Checklist"});if(Z({isDataReady:m==="Completed"}),g.useEffect(()=>{E||(P(!0),t(y(!1,l)))},[E,t]),g.useEffect(()=>{m==="Completed"&&t(x({taskGroupById:D.taskGroupById}))},[m,D.taskGroupById]),k==null)throw Error("Can't access task list page without signing in...");return d.jsxs(d.Fragment,{children:[m==="Completed"?d.jsx(M,{analytics:q,onLoad:r=>(U=>U.trackPageLoaded(J.Event.taskListPage))(r)}):null,d.jsxs(ha,{children:[d.jsx(Ga,{isAppContentDrawerOpen:j,handleDrawerToggle:r=>{N(r)}}),d.jsx(Da,{location:o,navigate:e,currentTenant:i,taskGroupId:u,taskGroupState:D,localData:h.localData,uiState:h.uiState,isTaskTemplatesEnabled:l,taskListFetchState:m,isTaskCategorizationEnabled:s,isTaskCannedResponsesEnabled:a,isTaskBulkResolutionEnabled:c,isTaskGroupAssigneesEnabled:G,isTaskRecurringParentEnabled:A,isAiCfoAccessEnabled:$,onAskAiCfoClick:v})]})]})}const F=(e,t)=>`/${e}/tasks/${encodeURIComponent(t)}`,C=(e,t)=>`/${e}/tasks/new/${t}`,ba=(e,t)=>{if(e==="assignee"){const o=t.split(",");return{...T.taskDetailLocalData,assignee:o}}if(e==="priority"){const o=pa(t);return{...T.taskDetailLocalData,priority:o}}if(e==="status"){const o=Ta(t);return{...T.taskDetailLocalData,status:o}}if(e==="tag"){const o=t.split(",");return{...T.taskDetailLocalData,tagIds:o}}if(e==="dueDate"){const o=ma(t);return{...T.taskDetailLocalData,dueDate:o}}return{...T.taskDetailLocalData}};export{va as default};
@@ -1,9 +0,0 @@
1
- import{j as n}from"./liveblocks-CA2qpkTt.js";import se from"./NotFoundScreen-D0aNQysK.js";import{a as c}from"./sentry-C8Zmy8eq.js";import{h as O,u as Q,j as f,g as ne,i as oe,N as ie,n as re,o as ce,p as g}from"./core-CZ9_x3uq.js";import{Gn as _,Gq as le,Gt as de,eP as Z,QJ as K,FH as H,Fp as pe,G7 as ue,G0 as ke,QK as J,QL as z,Fl as me,Fi as ge,qh as fe,q5 as he,ke as Se,Fx as Ie,QM as Te,FC as be,Fz as Ge,Fs as Ee,FM as Ce,FL as De}from"./zeni-epic-state-CeRetUx9.js";import{z as C,cO as Fe,O as xe,v as ye,I as b,p as X,n as v,K as je,c as N,e as ve,cP as we,i as V,at as Re}from"./index-Bl5Gxo9i.js";import{n as Pe}from"./mui-_CQ1MGrl.js";import{u as Be}from"./useInitialThreadRequest-DyYfRVlJ.js";import{M as Ue}from"./MobileAppDrawer-CACo4kMO.js";import Le from"./TaskListScreen-Emg8otmN.js";import"./recharts-DG48H-3-.js";import"./analytics-CaY7rw-O.js";import"./plaid-bOhNZMPB.js";import"./dnd-Zw_s-D7Q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DW7v-RpQ.js";import"./lexical-DW7Zgdoo.js";import"./pdf-BRE_7-P-.js";import"./utils-CmjIXJxz.js";import"./useAskAiCfoHostNavButtonProps-B695I2Ok.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]="1ddd8f49-7aed-41ba-a09b-4e49330a89b7",e._sentryDebugIdIdentifier="sentry-dbid-1ddd8f49-7aed-41ba-a09b-4e49330a89b7")}catch{}})();function $e(){const e=O(),t=Q(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=f(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(_())},[t]),k=c.useCallback((o,h,S)=>{t(le({name:o,content:h,cannedResponseId:S}))},[t]),a=c.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(Fe,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let A,M=[];const qe=re(function(e,t){const{location:s,taskGroupId:u}=t,r=J(e,t.taskId),d=Z(e),l=r.taskGroupId??u,k=l!=null?z(e.taskGroupState,l):void 0,a=C.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=K(e),{tenantEmailDomain:D}=d,G=r.recurringSourceTaskId,F=G!=null?`${V.appUrl}/${D}/tasks/${encodeURIComponent(G)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==A&&(A=I,M=Object.values(I)),M),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Re.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${V.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:F,tagListView:S,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>z(e.taskGroupState,p)).filter(p=>p!=null&&!p.isDeleted).map(p=>({id:p.id,name:p.name,isDefault:p.isDefault}))}},function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ee(t.taskId))},onSnoozeTask:(a,o)=>{e(Ge(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=X(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=w(k),o=v(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Ie(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(fe(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(H(!1,s))},onCreateTagClick:a=>{e(ge(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(_())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(we);function j(){const e=O(),t=Q(),s=ne(),u=xe(),{taskId:r,taskGroupId:d}=oe(),l=f(i=>Z(i)),k=Be(l?.companyId),{useFeatureGate:a}=ye(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:G}=a(b.isTaskGroupAssigneesEnabled),[F,I]=c.useState(!1),[p,Y]=c.useState(!1),[R,W]=c.useState(!1),[P,ee]=c.useState(!1),[B,x]=c.useState(!1),T=c.useRef(!1),E=f(i=>i.taskListState.updateTasksFetchState.fetchState),U=f(i=>K(i)),L=f(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(Y(!0),t(H(!1,r)))},[p,t]),c.useEffect(()=>{R||U.fetchState==="Completed"||(W(!0),t(pe()))},[R,t,U.fetchState]),c.useEffect(()=>{P||L==="Completed"||(ee(!0),t(ue()))},[P,t,L]);const ae=c.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),x(!0))},[t,r]);c.useEffect(()=>{if(B)if(E!=="In-Progress"){if(T.current){if(E==="Error")return x(!1),void(T.current=!1);if(E==="Completed"){x(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=X(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=w(i);e(m,{state:{pathnameStackToGoBack:v(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[B,E,l,s,e]);const $=f(i=>J(i,r)),y=$.fetchState,q=C.getSignedInUser();if(q==null)throw Error("Can't access task detail page without signing in...");if(y==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=w(i),te=v(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[y==="Completed"?n.jsx(je,{analytics:N,onLoad:i=>(m=>m.trackPageLoaded(ve.Event.taskDetailPage))(i)}):null,n.jsxs(ze,{children:[n.jsx(Ue,{isAppContentDrawerOpen:F,handleDrawerToggle:i=>{I(i)}}),n.jsx(qe,{analytics:N,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:q,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:y,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:G})]})]})}const ze=Pe.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
- `,w=e=>`/${e}/tasks`;function ia(){return n.jsxs(ce,{children:[n.jsx(g,{path:"/new",element:n.jsx(j,{})}),n.jsx(g,{path:"/new/:taskGroupId",element:n.jsx(j,{})}),n.jsx(g,{path:"/group/:taskGroupId",element:n.jsx(Le,{})}),n.jsx(g,{path:"/quick-responses",element:n.jsx($e,{})}),n.jsx(g,{path:"/:taskId",element:n.jsx(j,{})}),n.jsx(g,{path:"*",element:n.jsx(se,{})})]})}export{ia as default};
@@ -1,12 +0,0 @@
1
- import{j as o}from"./liveblocks-CA2qpkTt.js";import{a as f}from"./sentry-C8Zmy8eq.js";import{s as u,u as h,j as y,N as I}from"./core-CZ9_x3uq.js";import{JL as w,eW as b,zK as x}from"./zeni-epic-state-CeRetUx9.js";import{z as l,B as j,w as S,x as D}from"./index-Bl5Gxo9i.js";import{n as p}from"./mui-_CQ1MGrl.js";import"./recharts-DG48H-3-.js";import"./analytics-CaY7rw-O.js";import"./plaid-bOhNZMPB.js";import"./dnd-Zw_s-D7Q.js";import"./stripe-DMRn4zHo.js";import"./lottie-DW7v-RpQ.js";import"./lexical-DW7Zgdoo.js";import"./pdf-BRE_7-P-.js";import"./utils-CmjIXJxz.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]="4e476ab3-4f19-4ee8-9ced-776f5121dd72",e._sentryDebugIdIdentifier="sentry-dbid-4e476ab3-4f19-4ee8-9ced-776f5121dd72")}catch{}})();const q=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",c=e.get("profileId")??"",[n,g]=f.useState(!1),a=h(),s=y(m=>w(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(i);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 b(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(g(!0),a(x(t,c,i)))},[n,a]),s.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},E=p.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
- `,_=p(D.LargeRegular)`
10
- display: flex;
11
- color: ${S.important};
12
- `;export{q as default};
@@ -1,9 +0,0 @@
1
- import{j as i}from"./liveblocks-CA2qpkTt.js";import{a as u}from"./sentry-C8Zmy8eq.js";import{h as x,u as j,g as B,i as $,j as p}from"./core-CZ9_x3uq.js";import{II as s,IH as v,OX as C,eP as P,OY as T}from"./zeni-epic-state-CeRetUx9.js";import{J as z,at as g,h as D,z as E,B as L,c4 as N,p as U}from"./index-Bl5Gxo9i.js";import{n as _}from"./mui-_CQ1MGrl.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]="decdd614-f67e-45df-9f5f-82f6a5a8403c",e._sentryDebugIdIdentifier="sentry-dbid-decdd614-f67e-45df-9f5f-82f6a5a8403c")}catch{}})();const G=_.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 X(){const e=x(),n=j(),d=z(),f=B();let{accountId:a}=$(),l=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&f.pathname.includes(`${s}/statements`)&&(a=s,l=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[m,y]=u.useState(!1),h=D();u.useEffect(()=>{m||(y(!0),n(v(a??"",!1)))},[m,n]);const o=p(t=>C(t,a??"")),I=()=>{const t=U(f.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},c=E.getSignedInUser(),r=p(t=>P(t)),b={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=T(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=r.company?.companyInfo.companyLegalName??r.companyName;if(c==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(L,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(G,{windowSize:d,children:i.jsx(N,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:I,authParams:b,downloadEndPoint:l})})}export{X as Z};
@@ -1 +0,0 @@
1
- import{cH as m,cI as l,JD as _,JE as d}from"./zeni-epic-state-CeRetUx9.js";import{c as u}from"./index-Bl5Gxo9i.js";import"./sentry-C8Zmy8eq.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]="1429d6e3-4d05-41b9-80af-8843db66835c",e._sentryDebugIdIdentifier="sentry-dbid-1429d6e3-4d05-41b9-80af-8843db66835c")}catch{}})();const b=e=>{switch(e){case"this_month_to_date":case"this_week_to_date":case"this_year_to_date":case"last_year":case"last_week":case"last_month":case"last_6_months":case"last_3_months":case"last_12_months":case"free_range":return e;case"month":default:return"months";case"quarter":return"quarters";case"year":return"years"}},h=(e,a,o,i,s)=>{const r=[],c=[];let t=[];s?.forEach(n=>{r.push(n.companyId),c.push(n.companyName),t=t.concat(n.userRole)}),u.identify(e.userId,{tenant_id:a.tenantId,tenant_email_domain:a.tenantEmailDomain,company_id:a.companyId,company_name:a.companyName,user_role:a.userRole,chargebee_customer_id:i,$email:e.userEmail,user_email_domain:e.userEmailDomain,$first_name:e.firstName,$last_name:e.lastName,company_ids:s!=null?r:void 0,company_names:s!=null?c:void 0,user_roles:s!=null?t:void 0,app_type:"web",appearance:o})},g=(e,a)=>m(e,a)?"bill_pay":l(e,a)?"reimbursement":_(e,a)?"zeni_accounts":d(e,a)?"charge_cards":"bill_pay",I=e=>Object.values(e.allocation).map(String).join("-");export{I as a,h as f,g,b as t};