@zeniai/web-app-ui 5.2.20-dev → 5.2.21-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 (106) hide show
  1. package/dist/assets/AddressRoutes-DxmvMb05.js +1 -0
  2. package/dist/assets/{AddressScreen-2BaT3oA-.js → AddressScreen-DIqjx48a.js} +1 -1
  3. package/dist/assets/{AiCfoScreen-D51UIBd5.js → AiCfoScreen-CrYSqsDW.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-DmH2FpGv.js → BillPayApprovalRoutes-DNnCD0MB.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-DfJ2aUyG.js → BillPayRoutes-_ZcW8FPr.js} +1 -1
  6. package/dist/assets/{BusinessVerificationPageScreen-Bj1xk_4H.js → BusinessVerificationPageScreen-B-wvnrXB.js} +1 -1
  7. package/dist/assets/{CardsAiCfoScreen-BgnMfnsv.js → CardsAiCfoScreen-BRHcH0UC.js} +1 -1
  8. package/dist/assets/{ChargeCardRoutes-OCtj3EGu.js → ChargeCardRoutes-qFtN4Ye0.js} +1 -1
  9. package/dist/assets/{CompanyPassportScreen-DZx6t9Ym.js → CompanyPassportScreen-kjymniC5.js} +1 -1
  10. package/dist/assets/{ConnectionAuthScreen-MT-IQAtA.js → ConnectionAuthScreen-8BwAvUbL.js} +1 -1
  11. package/dist/assets/CustomerOnboardingAuthScreen-CRE_diWX.js +1 -0
  12. package/dist/assets/{CustomerOnboardingRoutes-wfQZLitF.js → CustomerOnboardingRoutes-pDACY6i1.js} +1 -1
  13. package/dist/assets/DashboardRoutes-BAU3Ibey.js +20 -0
  14. package/dist/assets/{DefaultTenantHome-p5Sm1nZ3.js → DefaultTenantHome-DUTdtXp0.js} +1 -1
  15. package/dist/assets/{DomesticWireDetailScreen-CkUpa35c.js → DomesticWireDetailScreen-C1Dd4ngM.js} +1 -1
  16. package/dist/assets/{DrawerScreen-C0UDia2K.js → DrawerScreen-0yAAklt1.js} +1 -1
  17. package/dist/assets/{EntityDetailRoutes-CVYJbbdy.js → EntityDetailRoutes-BfJbSwDL.js} +1 -1
  18. package/dist/assets/{ExpenseAutomationRoutes-DlWNUUJC.js → ExpenseAutomationRoutes-CFrS-dO7.js} +1 -1
  19. package/dist/assets/{FeaturePreviewScreen-BnJlO_wg.js → FeaturePreviewScreen-ThRft5vA.js} +1 -1
  20. package/dist/assets/{HubSpotOAuthCallbackScreen-CSIQ97oS.js → HubSpotOAuthCallbackScreen-CeO2NxX2.js} +1 -1
  21. package/dist/assets/{MagicLinkRoutes-BjPIElfX.js → MagicLinkRoutes-BdFY9ONU.js} +1 -1
  22. package/dist/assets/{MagicLinkSignInScreen-91bKq8wl.js → MagicLinkSignInScreen-CGGxu5S8.js} +1 -1
  23. package/dist/assets/{MobileAppDrawer-CinzTjr5.js → MobileAppDrawer-DzJzSgT6.js} +1 -1
  24. package/dist/assets/NotFoundScreen-CXpw5ccb.js +1 -0
  25. package/dist/assets/{NotificationRoutes-D6XmhJmY.js → NotificationRoutes-DUsFGMLY.js} +1 -1
  26. package/dist/assets/{OAuthConsentScreen-BoXeHjzR.js → OAuthConsentScreen-DknXvlIK.js} +1 -1
  27. package/dist/assets/{PandLWithForecastRoutes-CSWL87A6.js → PandLWithForecastRoutes-DBwvjyhf.js} +1 -1
  28. package/dist/assets/{PeopleRoutes-DYYpRS5n.js → PeopleRoutes-DlZpFXaH.js} +1 -1
  29. package/dist/assets/{PerformanceRoutes-D39M8yO2.js → PerformanceRoutes-DgVbhlv9.js} +1 -1
  30. package/dist/assets/{Preview-K7kVfJNZ.js → Preview-CRPYVI6t.js} +1 -1
  31. package/dist/assets/{QBOConnectionScreen-OLT5sXwr.js → QBOConnectionScreen-hHibn3nh.js} +1 -1
  32. package/dist/assets/{ReimbursementApprovalRoutes-DBKdGYm6.js → ReimbursementApprovalRoutes-CvZrgPUd.js} +1 -1
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DwTxQqE3.js → ReimbursementApprovalRuleDetailScreen-RfbEJD7G.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-BGm8wHdZ.js → ReimbursementRoutes-I-bqtRTr.js} +1 -1
  35. package/dist/assets/{ReportsRoutes-NgI0ftPw.js → ReportsRoutes-B2xd2wz-.js} +1 -1
  36. package/dist/assets/{RewardsRoutes-BR5NZ2Mx.js → RewardsRoutes-OCfmkQy_.js} +1 -1
  37. package/dist/assets/{ScreenRoutes-CXSdkcuS.js → ScreenRoutes-CoUwxF2N.js} +2 -2
  38. package/dist/assets/{SettingsRoutes-BaPhIBve.js → SettingsRoutes-BRjlnN1I.js} +1 -1
  39. package/dist/assets/{SetupPagesScreen-Cvdlisb9.js → SetupPagesScreen-Gl6Ev5mh.js} +1 -1
  40. package/dist/assets/{SignInScreen-D4Abp5hF.js → SignInScreen-BUqh5vc2.js} +1 -1
  41. package/dist/assets/{SignOutScreen-iBWPMOhx.js → SignOutScreen-B9z8eI-Z.js} +1 -1
  42. package/dist/assets/{TaskListScreen-C2zap0Rn.js → TaskListScreen-Ba2VReu6.js} +1 -1
  43. package/dist/assets/{TaskRoutes-CZVLK5dG.js → TaskRoutes-Devbp0kK.js} +1 -1
  44. package/dist/assets/{TransactionDetailRoutes-Dxvv503N.js → TransactionDetailRoutes-DEYaLVln.js} +1 -1
  45. package/dist/assets/{TransactionDetailScreen-4CysuAHi.js → TransactionDetailScreen-CaGnx38Y.js} +1 -1
  46. package/dist/assets/{TransactionListRoutes-DNSGDUp4.js → TransactionListRoutes-D3-4FbZY.js} +1 -1
  47. package/dist/assets/{TreasuryRoutes-CVqgaqHD.js → TreasuryRoutes-Df0dXAls.js} +1 -1
  48. package/dist/assets/{VendorsRoutes-DVTbhmec.js → VendorsRoutes-DZrbgG94.js} +1 -1
  49. package/dist/assets/{WiseConfirmationScreen-TxMYz6AU.js → WiseConfirmationScreen-BW2Zo5if.js} +1 -1
  50. package/dist/assets/{ZeniAccountRoutes-BvMIfD-Y.js → ZeniAccountRoutes-BRv1xo02.js} +1 -1
  51. package/dist/assets/{ZeniAccountStatementScreen-D9RVH8zp.js → ZeniAccountStatementScreen-BbPJuLXl.js} +1 -1
  52. package/dist/assets/{accountMappingHelper-gMZWceAt.js → accountMappingHelper-DXKNp4_g.js} +1 -1
  53. package/dist/assets/{analytics-BP5D4JyB.js → analytics-Det0UZFe.js} +1 -1
  54. package/dist/assets/{analyticsHelper-BgeHTAVC.js → analyticsHelper-8-InFpUB.js} +1 -1
  55. package/dist/assets/{core-BfWJ7zKT.js → core-DslHP-Nt.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-D2jiQ7Do.js → decodeURIComponentSafe-uhKYYVbR.js} +1 -1
  57. package/dist/assets/{dnd-tQgCG5z3.js → dnd-CQxwFT7m.js} +1 -1
  58. package/dist/assets/{empty-0zu7mfa-.js → empty-Wy9lgs00.js} +1 -1
  59. package/dist/assets/{empty-D4KL-CgN.js → empty-pFhUOX6X.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-D2WpBqYb.js → emptyVideoElement-w1_MywKD.js} +1 -1
  61. package/dist/assets/{epic-_aUX4Son.js → epic-DTnE0Nui.js} +1 -1
  62. package/dist/assets/{getLocaleForTenant-BJ1a_Zja.js → getLocaleForTenant-D03M5oWL.js} +1 -1
  63. package/dist/assets/{index-oBgu7-MV.js → index--54UVqXL.js} +2 -2
  64. package/dist/assets/{index-DpTDwQon.js → index-B3Qv-ngJ.js} +1 -1
  65. package/dist/assets/{index-zYcXrqlT.js → index-BSV1Wtow.js} +1 -1
  66. package/dist/assets/{index-edb9TugW.js → index-Cbw-Hudf.js} +1 -1
  67. package/dist/assets/{index-BtVRjclm.js → index-D9jKQIPj.js} +1 -1
  68. package/dist/assets/{index-C2k_pBZi.js → index-DCO11L1y.js} +1 -1
  69. package/dist/assets/{index-DWJVmwhz.js → index-Dg4tyRsb.js} +9953 -9953
  70. package/dist/assets/{index-CiS2dMrM.js → index-H3qfOHz1.js} +1 -1
  71. package/dist/assets/{lexical-Bg8ldM3i.js → lexical-DYyincEg.js} +1 -1
  72. package/dist/assets/{liveblocks-DJbBe3tc.js → liveblocks-Dge8uQhE.js} +1 -1
  73. package/dist/assets/{lottie-BaCgeYyk.js → lottie-JtX4it7w.js} +1 -1
  74. package/dist/assets/{mui-ts7KHm6i.js → mui-DskYaYyd.js} +1 -1
  75. package/dist/assets/{pathToGoBack-DG10zCZ4.js → pathToGoBack-DPWssLbl.js} +1 -1
  76. package/dist/assets/{pdf-C9HGpLCu.js → pdf-8n9gC55d.js} +3 -3
  77. package/dist/assets/{pdf-lib-DX6kz8a9.js → pdf-lib-CuyyFcf5.js} +1 -1
  78. package/dist/assets/{plaid-Cv0mPYlm.js → plaid-ajCcP-UI.js} +1 -1
  79. package/dist/assets/{pusher-CgG6vGRj.js → pusher-gYNLjWxj.js} +1 -1
  80. package/dist/assets/{react-tqWON72J.js → react-B1cHKI31.js} +1 -1
  81. package/dist/assets/{react-r7Nkvi02.js → react-Cj6es5B3.js} +1 -1
  82. package/dist/assets/{react-Bu9a3mw7.js → react-D56X5BsD.js} +1 -1
  83. package/dist/assets/{react-LH5dN4Ph.js → react-D8SoUGP2.js} +1 -1
  84. package/dist/assets/{react-Dp-aIPjg.js → react-h386o274.js} +1 -1
  85. package/dist/assets/{react-CdB2kFeI.js → react-qy_mbxl-.js} +1 -1
  86. package/dist/assets/{recharts-DNnhB5R_.js → recharts-BV1Rao9g.js} +1 -1
  87. package/dist/assets/{routePaths-DqVKIcAE.js → routePaths-DaHBcomz.js} +1 -1
  88. package/dist/assets/{sentry-C6T1HHHS.js → sentry-ConJlCAk.js} +1 -1
  89. package/dist/assets/{url-CJ3E3PSB.js → url-FGF171Cm.js} +1 -1
  90. package/dist/assets/{url-Xy6MI2YY.js → url-rW6Xsakn.js} +1 -1
  91. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BH6Wd98D.js → useAiCfoDashboardSuggestedQuestionsChips-CNgwQr_C.js} +1 -1
  92. package/dist/assets/{useAskAiCfoHostNavButtonProps-DJm2npkG.js → useAskAiCfoHostNavButtonProps-B4wJLWMn.js} +1 -1
  93. package/dist/assets/{useCashManagementBanner-Bjdnpen4.js → useCashManagementBanner-JRbdWYI5.js} +1 -1
  94. package/dist/assets/{useChargeCardPusherEvents-Bfrohee4.js → useChargeCardPusherEvents-BtMWwDMr.js} +1 -1
  95. package/dist/assets/{useDeviceId-DNuYTM17.js → useDeviceId-DS-lzRmX.js} +1 -1
  96. package/dist/assets/{useEmailConnectResultRefresh-DFbMcoeq.js → useEmailConnectResultRefresh-Bc2zbLFy.js} +1 -1
  97. package/dist/assets/{useInitialThreadRequest-D3K2ol9C.js → useInitialThreadRequest-3JvlSTXq.js} +1 -1
  98. package/dist/assets/{utils-xWcqC4Wl.js → utils-KyL5SnF3.js} +1 -1
  99. package/dist/assets/{withTransactionSidePanel-BMpiKSmG.js → withTransactionSidePanel-6rcxd76V.js} +1 -1
  100. package/dist/assets/{zeni-epic-state-kow6PLud.js → zeni-epic-state-COMt8QIe.js} +3 -3
  101. package/dist/index.html +1 -1
  102. package/package.json +3 -3
  103. package/dist/assets/AddressRoutes-EXo_W2G8.js +0 -1
  104. package/dist/assets/CustomerOnboardingAuthScreen-LgV5vbRx.js +0 -1
  105. package/dist/assets/DashboardRoutes-DZ3q6bkK.js +0 -20
  106. package/dist/assets/NotFoundScreen-0K6cd0N1.js +0 -1
@@ -1 +1 @@
1
- import{a as h,b as t}from"./sentry-C6T1HHHS.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect((()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})}),[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
1
+ import{a as h,b as t}from"./sentry-ConJlCAk.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect((()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})}),[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
@@ -1,4 +1,4 @@
1
- import{j as Ol}from"./liveblocks-DJbBe3tc.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-C6T1HHHS.js";import{L as dt,bZ as Tc,e$ as Ac,Ms as Rc,MW as kl,c7 as Tl,g4 as Al,g5 as Rl}from"./zeni-epic-state-kow6PLud.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,o as Yt,p as ue,q as Dl}from"./utils-xWcqC4Wl.js";import{r as un}from"./empty-D4KL-CgN.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-DX6kz8a9.js";import{r as Gl}from"./index-CiS2dMrM.js";import{r as zl}from"./index-DpTDwQon.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-BfWJ7zKT.js";import{u as Kl,z as Pc,L as Wl,K as Jl,M as Xl,m as Ql,f as tf}from"./index-DWJVmwhz.js";import"./mui-ts7KHm6i.js";import{d as Pe}from"./decodeURIComponentSafe-D2jiQ7Do.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="7cb0661d-8a36-4027-ab4f-d11a714ae111",t._sentryDebugIdIdentifier="sentry-dbid-7cb0661d-8a36-4027-ab4f-d11a714ae111")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return(function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g})(d)})(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=(function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return(function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")})(this,g),S=b.call(this,(function(w,_,M){return typeof e=="string"?e:e(w,_,M)})(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d})(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map((function(p){return String(p)})),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",(function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",(function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c})(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=(function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1})(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))}),TypeError),i("ERR_INVALID_ARG_VALUE",(function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)}),TypeError),i("ERR_INVALID_RETURN_VALUE",(function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")}),TypeError),i("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map((function(d){return'"'.concat(d,'"')})),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")}),TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter((function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable}))),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach((function(x){m(k,x,j[x])})):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach((function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))}))}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&(function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}})(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=(function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)})(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach((function(x){j[x]=k[x]})),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
1
+ import{j as Ol}from"./liveblocks-Dge8uQhE.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-ConJlCAk.js";import{L as dt,bZ as Tc,e$ as Ac,Ms as Rc,MW as kl,c7 as Tl,g4 as Al,g5 as Rl}from"./zeni-epic-state-COMt8QIe.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,o as Yt,p as ue,q as Dl}from"./utils-KyL5SnF3.js";import{r as un}from"./empty-pFhUOX6X.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-CuyyFcf5.js";import{r as Gl}from"./index-H3qfOHz1.js";import{r as zl}from"./index-B3Qv-ngJ.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-DslHP-Nt.js";import{u as Kl,z as Pc,L as Wl,K as Jl,M as Xl,m as Ql,f as tf}from"./index-Dg4tyRsb.js";import"./mui-DskYaYyd.js";import{d as Pe}from"./decodeURIComponentSafe-uhKYYVbR.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="7cb0661d-8a36-4027-ab4f-d11a714ae111",t._sentryDebugIdIdentifier="sentry-dbid-7cb0661d-8a36-4027-ab4f-d11a714ae111")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return(function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g})(d)})(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=(function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return(function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")})(this,g),S=b.call(this,(function(w,_,M){return typeof e=="string"?e:e(w,_,M)})(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d})(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map((function(p){return String(p)})),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",(function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",(function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c})(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=(function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1})(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))}),TypeError),i("ERR_INVALID_ARG_VALUE",(function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)}),TypeError),i("ERR_INVALID_RETURN_VALUE",(function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")}),TypeError),i("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map((function(d){return'"'.concat(d,'"')})),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")}),TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter((function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable}))),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach((function(x){m(k,x,j[x])})):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach((function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))}))}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&(function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}})(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=(function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)})(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach((function(x){j[x]=k[x]})),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
2
2
  `),I=_(E).split(`
3
3
  `),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
4
4
 
@@ -1 +1 @@
1
- import{j as r}from"./liveblocks-DJbBe3tc.js";import O from"./NotFoundScreen-0K6cd0N1.js";import{a as p}from"./sentry-C6T1HHHS.js";import{h as x,g as C,u as E,j as u,N as D,n as k,o as W,p as b}from"./core-BfWJ7zKT.js";import{e$ as I,QP as g,R3 as S,G1 as V,Fa as U,G0 as d,FT as $,Rg as B,G3 as G}from"./zeni-epic-state-kow6PLud.js";import{z as N,a9 as T,bZ as F,ag as L,bC as z,b_ as K}from"./index-DWJVmwhz.js";import"./mui-ts7KHm6i.js";import{u as P,R as A}from"./ReimbursementApprovalRuleDetailScreen-DwTxQqE3.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="601edc68-8abf-4e3b-b94e-c3885e72f348",e._sentryDebugIdIdentifier="sentry-dbid-601edc68-8abf-4e3b-b94e-c3885e72f348")}catch{}})();const y="reimbursement-approval-rule-update",Q=k((function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}}),(function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(B(!1))},onBackClick:()=>{L(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!1))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))}}}))(T(F)),Z=({isLoading:e})=>{const o=x(),s=C(),n=E(),[t,i]=p.useState(!1),[m,R]=p.useState(!1),f=u((a=>a.remiSetupApproverViewState.fetchState)),l=u((a=>I(a))),c=u((a=>g(a))),v=u((a=>S(a).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{v?.updateStatus.fetchState==="Completed"&&n(V())}),[v]),p.useEffect((()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!1)))}),[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(R(!0),n(d())),o("./new"))}),[m,c,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,_,h)=>{a.endsWith(y)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(Q,{currentTenant:l,location:s,navigate:o,...w})},j="reimbursement-approval-rule-update",q=k((function(e){const o=g(e),s=S(e).remiSetupApproverViewUpdateData,n={};for(const i of Object.values(e.vendorState.vendorByID))i?.id!=null&&(n[i.id]=i.name);const t={};for(const i of Object.values(e.classState.classesByKey))i?.classId!=null&&(t[i.classId]=i.className);return{approvalView:o,remiSetupApproverViewUpdateData:s,vendorNamesById:n,departmentNamesById:t}}),(function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(B(!1))},onBackClick:()=>{L(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!0))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))},onReorderRules:t=>{e(G(t,!0))}}}))(T(K)),H=()=>{const e=u((n=>I(n))),{isApprovalRulesV3Enabled:o,isLoading:s}=z(e?.tenantId);return o?r.jsx(J,{isLoading:s}):r.jsx(Z,{isLoading:s})},J=({isLoading:e})=>{const o=x(),s=C(),n=E(),[t,i]=p.useState(!1),[m,R]=p.useState(!1),f=u((a=>a.remiSetupApproverViewState.fetchState)),l=u((a=>I(a))),c=u((a=>g(a)));P();const v=u((a=>S(a).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{v?.updateStatus.fetchState==="Completed"&&n(V())}),[v]),p.useEffect((()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!0)))}),[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(R(!0),n(d())),o("./new"))}),[m,c,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${j}`]:[],eventCallback:(a,_,h)=>{a.endsWith(j)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(q,{currentTenant:l,location:s,navigate:o,isLoading:e,...w})};function oe(){return r.jsxs(W,{children:[r.jsx(b,{path:"/",element:r.jsx(H,{})}),r.jsx(b,{path:"/new",element:r.jsx(A,{})}),r.jsx(b,{path:"/:approvalRuleId/edit",element:r.jsx(A,{})}),r.jsx(b,{path:"*",element:r.jsx(O,{})})]})}export{oe as R};
1
+ import{j as r}from"./liveblocks-Dge8uQhE.js";import O from"./NotFoundScreen-CXpw5ccb.js";import{a as p}from"./sentry-ConJlCAk.js";import{h as x,g as C,u as E,j as u,N as D,n as k,o as W,p as b}from"./core-DslHP-Nt.js";import{e$ as I,QP as g,R3 as S,G1 as V,Fa as U,G0 as d,FT as $,Rg as B,G3 as G}from"./zeni-epic-state-COMt8QIe.js";import{z as N,a9 as T,bZ as F,ag as L,bC as z,b_ as K}from"./index-Dg4tyRsb.js";import"./mui-DskYaYyd.js";import{u as P,R as A}from"./ReimbursementApprovalRuleDetailScreen-RfbEJD7G.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="601edc68-8abf-4e3b-b94e-c3885e72f348",e._sentryDebugIdIdentifier="sentry-dbid-601edc68-8abf-4e3b-b94e-c3885e72f348")}catch{}})();const y="reimbursement-approval-rule-update",Q=k((function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}}),(function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(B(!1))},onBackClick:()=>{L(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!1))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))}}}))(T(F)),Z=({isLoading:e})=>{const o=x(),s=C(),n=E(),[t,i]=p.useState(!1),[m,R]=p.useState(!1),f=u((a=>a.remiSetupApproverViewState.fetchState)),l=u((a=>I(a))),c=u((a=>g(a))),v=u((a=>S(a).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{v?.updateStatus.fetchState==="Completed"&&n(V())}),[v]),p.useEffect((()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!1)))}),[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(R(!0),n(d())),o("./new"))}),[m,c,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,_,h)=>{a.endsWith(y)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(Q,{currentTenant:l,location:s,navigate:o,...w})},j="reimbursement-approval-rule-update",q=k((function(e){const o=g(e),s=S(e).remiSetupApproverViewUpdateData,n={};for(const i of Object.values(e.vendorState.vendorByID))i?.id!=null&&(n[i.id]=i.name);const t={};for(const i of Object.values(e.classState.classesByKey))i?.classId!=null&&(t[i.classId]=i.className);return{approvalView:o,remiSetupApproverViewUpdateData:s,vendorNamesById:n,departmentNamesById:t}}),(function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(B(!1))},onBackClick:()=>{L(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!0))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))},onReorderRules:t=>{e(G(t,!0))}}}))(T(K)),H=()=>{const e=u((n=>I(n))),{isApprovalRulesV3Enabled:o,isLoading:s}=z(e?.tenantId);return o?r.jsx(J,{isLoading:s}):r.jsx(Z,{isLoading:s})},J=({isLoading:e})=>{const o=x(),s=C(),n=E(),[t,i]=p.useState(!1),[m,R]=p.useState(!1),f=u((a=>a.remiSetupApproverViewState.fetchState)),l=u((a=>I(a))),c=u((a=>g(a)));P();const v=u((a=>S(a).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{v?.updateStatus.fetchState==="Completed"&&n(V())}),[v]),p.useEffect((()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!0)))}),[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(R(!0),n(d())),o("./new"))}),[m,c,n]);const w={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${j}`]:[],eventCallback:(a,_,h)=>{a.endsWith(j)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(q,{currentTenant:l,location:s,navigate:o,isLoading:e,...w})};function oe(){return r.jsxs(W,{children:[r.jsx(b,{path:"/",element:r.jsx(H,{})}),r.jsx(b,{path:"/new",element:r.jsx(A,{})}),r.jsx(b,{path:"/:approvalRuleId/edit",element:r.jsx(A,{})}),r.jsx(b,{path:"*",element:r.jsx(O,{})})]})}export{oe as R};
@@ -1 +1 @@
1
- import{j as b}from"./liveblocks-DJbBe3tc.js";import{a as f}from"./sentry-C6T1HHHS.js";import{u as T,j as y,h as _,g as O,i as k,n as V}from"./core-BfWJ7zKT.js";import{lb as L,R3 as w,QP as C,FW as F,G6 as B,G1 as A,G2 as E,R4 as j,e$ as Q,G0 as W}from"./zeni-epic-state-kow6PLud.js";import{z as P,E as N,B as $,bP as z,ag as G,bC as K,bQ as H}from"./index-DWJVmwhz.js";import"./mui-ts7KHm6i.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="2d89a4f2-a62f-4bfb-90bb-30844fbe56fc",e._sentryDebugIdIdentifier="sentry-dbid-2d89a4f2-a62f-4bfb-90bb-30844fbe56fc")}catch{}})();function J(){const e=T(),s=f.useRef(!1),t=y((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=y((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(L({})))}),[p,t,e])}const M=V((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return s.approvalRuleId&&(l=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:l,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=G(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const h=[];return v.forEach((u=>{const R=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),I=u.actors.selectedNonUsers.map((m=>{const g=(S=m.value,j(S)==null);var S;return{type:g?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!g}})),c=R.concat(I);h.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),h},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:l,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(z);function X(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=k(),o=P.getSignedInUser(),l=N(),r=y((n=>w(n))),i=y((n=>C(n))),[a,d]=f.useState(!1);if(f.useEffect((()=>{a||(d(!0),s(F(!0)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?b.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):b.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return j(e)==null}const Y=V((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],l={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),l[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:l,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:C(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=G(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((g=>{const S=g.actorKind?.selectedOption,U=g.selectedRole?.selectedOption;let D=[];S==="role"&&U!=null?D=[{type:"attribute",subType:U,userId:void 0,idType:void 0,isImplicitActor:!1}]:S==="specific_person"&&(D=(g.persons?.selectedUsers??[]).map((q=>({type:"user",subType:void 0,userId:q.userId,idType:"user",isImplicitActor:!1}))));const x=g.action??"require_approval";m.push({action:x,actors:D,operator:D.length>1?x==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,h=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const R=v?.selection.selectedOptions??[];R.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:R});const I=h?.selection.selectedOptions??[];if(I.length>0&&(u.department={type:"department",operator:h?.operator.selectedOption??"is",departmentIds:I}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:l,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(W(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(H);function ne(){const e=y((t=>Q(t))),{isApprovalRulesV3Enabled:s}=K(e?.tenantId);return s?b.jsx(Z,{}):b.jsx(X,{})}function Z(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=k(),o=P.getSignedInUser(),l=N(),r=y((n=>w(n))),i=y((n=>C(n))),[a,d]=f.useState(!1);if(J(),f.useEffect((()=>{a||(d(!0),s(F(!0)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?b.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):b.jsx(Y,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,J as u};
1
+ import{j as b}from"./liveblocks-Dge8uQhE.js";import{a as f}from"./sentry-ConJlCAk.js";import{u as T,j as y,h as _,g as O,i as k,n as V}from"./core-DslHP-Nt.js";import{lb as L,R3 as w,QP as C,FW as F,G6 as B,G1 as A,G2 as E,R4 as j,e$ as Q,G0 as W}from"./zeni-epic-state-COMt8QIe.js";import{z as P,E as N,B as $,bP as z,ag as G,bC as K,bQ as H}from"./index-Dg4tyRsb.js";import"./mui-DskYaYyd.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="2d89a4f2-a62f-4bfb-90bb-30844fbe56fc",e._sentryDebugIdIdentifier="sentry-dbid-2d89a4f2-a62f-4bfb-90bb-30844fbe56fc")}catch{}})();function J(){const e=T(),s=f.useRef(!1),t=y((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=y((o=>o.vendorListState.allVendorIdsBillsTab.length>0));f.useEffect((()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(L({})))}),[p,t,e])}const M=V((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return s.approvalRuleId&&(l=t.allApprovalRules.findIndex((r=>r.approvalRuleId===s.approvalRuleId))===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:l,approvalUpdateActionType:p}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=G(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const h=[];return v.forEach((u=>{const R=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),I=u.actors.selectedNonUsers.map((m=>{const g=(S=m.value,j(S)==null);var S;return{type:g?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!g}})),c=R.concat(I);h.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),h},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:l,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(z);function X(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=k(),o=P.getSignedInUser(),l=N(),r=y((n=>w(n))),i=y((n=>C(n))),[a,d]=f.useState(!1);if(f.useEffect((()=>{a||(d(!0),s(F(!0)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?b.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):b.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return j(e)==null}const Y=V((function(e,s){const t=w(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],l={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),l[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:l,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:C(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=G(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((g=>{const S=g.actorKind?.selectedOption,U=g.selectedRole?.selectedOption;let D=[];S==="role"&&U!=null?D=[{type:"attribute",subType:U,userId:void 0,idType:void 0,isImplicitActor:!1}]:S==="specific_person"&&(D=(g.persons?.selectedUsers??[]).map((q=>({type:"user",subType:void 0,userId:q.userId,idType:"user",isImplicitActor:!1}))));const x=g.action??"require_approval";m.push({action:x,actors:D,operator:D.length>1?x==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,h=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const R=v?.selection.selectedOptions??[];R.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:R});const I=h?.selection.selectedOptions??[];if(I.length>0&&(u.department={type:"department",operator:h?.operator.selectedOption??"is",departmentIds:I}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:l,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(W(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(H);function ne(){const e=y((t=>Q(t))),{isApprovalRulesV3Enabled:s}=K(e?.tenantId);return s?b.jsx(Z,{}):b.jsx(X,{})}function Z(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=k(),o=P.getSignedInUser(),l=N(),r=y((n=>w(n))),i=y((n=>C(n))),[a,d]=f.useState(!1);if(J(),f.useEffect((()=>{a||(d(!0),s(F(!0)))})),f.useEffect((()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")}),[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?b.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):b.jsx(Y,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,J as u};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-DJbBe3tc.js";import{h as Q,u as de,g as H,i as Y,j as w,N as _,n as K,l as ct,o as dt,p as C}from"./core-BfWJ7zKT.js";import{e$ as V,Rh as ue,c7 as pe,F5 as Ue,kW as ut,Fi as oe,Fh as re,Ri as pt,bn as be,gy as Le,Rj as bt,NG as gt,kL as Pe,NH as ve,NI as ht,jG as ft,QB as St,jV as Rt,EV as It,uz as yt,jN as vt,FF as $e,Rk as Me,Rl as At,Rm as kt,Rn as Ct,Ro as Et,Rp as wt,Fp as Ae,j$ as xt,QK as Bt,Fj as Tt,F3 as Ft,Rq as jt,F2 as Dt,Rr as Ut,Fb as ke,Ft as Lt,Fs as Pt,Fo as $t,Rs as _e,KM as Mt,bq as _t,Fe as Nt,FX as Gt,Rt as Ot,Ru as zt,FB as Zt,Fy as Ce,Q4 as Ht,F0 as Vt,Rv as Ne,Gn as Ee,Gv as Wt,Rw as Qt,Rx as z,Ry as Kt,Rz as Ge,RA as qt,RB as Oe,RC as ze,FN as le,bu as Jt,bK as ge,cJ as he,fI as Ze,fG as He,RD as Xt,fD as Yt,Qh as en,RE as tn,RF as Ve,Ql as nn,R3 as an,RG as sn,Rg as on,Gs as we,Gr as rn,RH as ln,RI as mn,RJ as cn,RK as dn,RL as un,QQ as pn,Gi as bn,Gm as gn,bs as hn,bJ as fn,cD as Sn,cr as Rn,bt as In,Mu as yn,cT as vn,cW as An,cV as kn,cC as Cn}from"./zeni-epic-state-kow6PLud.js";import{x as We,J as Qe,w as ee,i as E,z as P,b$ as Ke,A as te,f as A,aM as xe,o as j,au as X,H as En,a as qe,c0 as wn,v as Z,a0 as Je,c1 as xn,D as ne,c2 as Bn,X as Tn,F as Fn,B as fe,h as Xe,a9 as jn,bn as Dn,a4 as Un,E as Ye,c3 as Ln,d as Pn}from"./index-DWJVmwhz.js";import{n as N,S as $n}from"./mui-ts7KHm6i.js";import me from"./NotFoundScreen-0K6cd0N1.js";import{S as Be}from"./SetupPagesScreen-Cvdlisb9.js";import{F as et}from"./FeaturePreviewScreen-BnJlO_wg.js";import{a as f}from"./sentry-C6T1HHHS.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-DJm2npkG.js";import{u as tt}from"./useInitialThreadRequest-D3K2ol9C.js";import{D as Mn}from"./DrawerScreen-C0UDia2K.js";import{M as nt}from"./MobileAppDrawer-CinzTjr5.js";import{R as _n}from"./ReimbursementApprovalRoutes-DBKdGYm6.js";import{FallBackRoute as Nn}from"./ScreenRoutes-CXSdkcuS.js";import"./recharts-DNnhB5R_.js";import"./analytics-BP5D4JyB.js";import"./plaid-Cv0mPYlm.js";import"./dnd-tQgCG5z3.js";import"./stripe-cKAAJElX.js";import"./lottie-BaCgeYyk.js";import"./lexical-Bg8ldM3i.js";import"./pdf-C9HGpLCu.js";import"./utils-xWcqC4Wl.js";import"./analyticsHelper-BgeHTAVC.js";import"./routePaths-DqVKIcAE.js";import"./BusinessVerificationPageScreen-Bj1xk_4H.js";import"./ReimbursementApprovalRuleDetailScreen-DwTxQqE3.js";import"./getLocaleForTenant-BJ1a_Zja.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]="e211d5c7-077e-4108-9390-88cf21adf661",e._sentryDebugIdIdentifier="sentry-dbid-e211d5c7-077e-4108-9390-88cf21adf661")}catch{}})();const at=e=>`/${e}/reimbursements`,Gn=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:Te,spendManagement:{reimbursement:{reimbursementDetail:M}}}=qe.getLocalizedStrings(),On=K((function(e,t){const n=t.currentTenant?.companyId,r=pt(e.plaidAccountViewState,"user_reimbursement_account"),d=P.getSignedInUser(),c=be(d),m=r.plaidConnectionDetails,o=Le(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=ue(e,t.reimbursementId),b=bt(e,d?.userId??"");let y=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=gt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:pe(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:A,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Pe(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(re(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ke(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e($t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Pt())},clearRemiSaveStatus:()=>{e(Lt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ke(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ut({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Dt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(jt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Ft({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Tt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ae(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(Bt({data:l}))},onFetchBankName:i=>{e(xt(i))},submitRemiDetails:()=>{e(Ae("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(wt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(oe({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Et({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Ct({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Me()),e(At());const i=at(o),l=Z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(A.trackReimbursementDeleteReimbursement(n),e($e(n)))},onSaveBankAccount:()=>{a?.userId&&e(vt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(Rt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ft({fetchState:"Not-Started"})),e(St())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(ht({searchString:i,entityType:l,searchOrigin:"common"})):e(ve("common"))},onCancelAutoComplete:()=>{e(ve("common"))}}}}))(wn);function Fe(){const e=Q(),t=de(),n=H(),{reimbursementId:r}=Y(),d=We(),c=Qe(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:b}=l(E.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(E.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(E.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=Se({mobileExploreReferrer:"Reimbursement Details"}),x=H().pathname,F=x.includes("edit"),v=x.includes("reimbursement/new"),[D,B]=f.useState(!1),k=P.getSignedInUser(),R=w((p=>V(p))),g=w((p=>ue(p,r))),U=tt(R?.companyId,{clearParams:g.fetchState==="Completed"}),L=pe(R?.userRole??[]);f.useEffect((()=>{(v&&!D||F&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(B(!0),t(Ue(!1,b,y,r)))}));const $=w((p=>ut(p.accountState,p.accountListState,"reimbursementAccountList")));if(k==null)throw Error("Can't access address page without signing in...");const I={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||L&&g.billStatus==="rejected"||L===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:I}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Ke,{isNewReimbursement:r==null}):s.jsxs(zn,{windowSize:c,children:[s.jsx(te,{analytics:A,onLoad:p=>(W=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&W.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Zn,{}):null,m&&c!=="small"?s.jsx(Hn,{children:s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:k?.userId??"",sessionId:k?.zeniSessionId??"",tenantId:R?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,k?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:Te.upload,single:M.dropReceipt.single,or:M.dropReceipt.or,multiple:M.dropReceipt.multiple,receipts:M.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Vn,{children:[s.jsx(Wn,{onClick:()=>o(!1),children:s.jsx(Gn,{})}),s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:k?.userId??"",sessionId:k?.zeniSessionId??"",tenantId:R?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,k?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:Te.upload,single:M.dropReceipt.single,or:M.dropReceipt.or,multiple:M.dropReceipt.multiple,receipts:M.dropReceipt.receipts}})]}):null,s.jsx(Qn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:U??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:R,reimbursementId:r,themeState:d,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const zn=N.div`
1
+ import{j as s}from"./liveblocks-Dge8uQhE.js";import{h as Q,u as de,g as H,i as Y,j as w,N as _,n as K,l as ct,o as dt,p as C}from"./core-DslHP-Nt.js";import{e$ as V,Rh as ue,c7 as pe,F5 as Ue,kW as ut,Fi as oe,Fh as re,Ri as pt,bn as be,gy as Le,Rj as bt,NG as gt,kL as Pe,NH as ve,NI as ht,jG as ft,QB as St,jV as Rt,EV as It,uz as yt,jN as vt,FF as $e,Rk as Me,Rl as At,Rm as kt,Rn as Ct,Ro as Et,Rp as wt,Fp as Ae,j$ as xt,QK as Bt,Fj as Tt,F3 as Ft,Rq as jt,F2 as Dt,Rr as Ut,Fb as ke,Ft as Lt,Fs as Pt,Fo as $t,Rs as _e,KM as Mt,bq as _t,Fe as Nt,FX as Gt,Rt as Ot,Ru as zt,FB as Zt,Fy as Ce,Q4 as Ht,F0 as Vt,Rv as Ne,Gn as Ee,Gv as Wt,Rw as Qt,Rx as z,Ry as Kt,Rz as Ge,RA as qt,RB as Oe,RC as ze,FN as le,bu as Jt,bK as ge,cJ as he,fI as Ze,fG as He,RD as Xt,fD as Yt,Qh as en,RE as tn,RF as Ve,Ql as nn,R3 as an,RG as sn,Rg as on,Gs as we,Gr as rn,RH as ln,RI as mn,RJ as cn,RK as dn,RL as un,QQ as pn,Gi as bn,Gm as gn,bs as hn,bJ as fn,cD as Sn,cr as Rn,bt as In,Mu as yn,cT as vn,cW as An,cV as kn,cC as Cn}from"./zeni-epic-state-COMt8QIe.js";import{x as We,J as Qe,w as ee,i as E,z as P,b$ as Ke,A as te,f as A,aM as xe,o as j,au as X,H as En,a as qe,c0 as wn,v as Z,a0 as Je,c1 as xn,D as ne,c2 as Bn,X as Tn,F as Fn,B as fe,h as Xe,a9 as jn,bn as Dn,a4 as Un,E as Ye,c3 as Ln,d as Pn}from"./index-Dg4tyRsb.js";import{n as N,S as $n}from"./mui-DskYaYyd.js";import me from"./NotFoundScreen-CXpw5ccb.js";import{S as Be}from"./SetupPagesScreen-Gl6Ev5mh.js";import{F as et}from"./FeaturePreviewScreen-ThRft5vA.js";import{a as f}from"./sentry-ConJlCAk.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-B4wJLWMn.js";import{u as tt}from"./useInitialThreadRequest-3JvlSTXq.js";import{D as Mn}from"./DrawerScreen-0yAAklt1.js";import{M as nt}from"./MobileAppDrawer-DzJzSgT6.js";import{R as _n}from"./ReimbursementApprovalRoutes-CvZrgPUd.js";import{FallBackRoute as Nn}from"./ScreenRoutes-CoUwxF2N.js";import"./recharts-BV1Rao9g.js";import"./analytics-Det0UZFe.js";import"./plaid-ajCcP-UI.js";import"./dnd-CQxwFT7m.js";import"./stripe-cKAAJElX.js";import"./lottie-JtX4it7w.js";import"./lexical-DYyincEg.js";import"./pdf-8n9gC55d.js";import"./utils-KyL5SnF3.js";import"./analyticsHelper-8-InFpUB.js";import"./routePaths-DaHBcomz.js";import"./BusinessVerificationPageScreen-B-wvnrXB.js";import"./ReimbursementApprovalRuleDetailScreen-RfbEJD7G.js";import"./getLocaleForTenant-D03M5oWL.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]="e211d5c7-077e-4108-9390-88cf21adf661",e._sentryDebugIdIdentifier="sentry-dbid-e211d5c7-077e-4108-9390-88cf21adf661")}catch{}})();const at=e=>`/${e}/reimbursements`,Gn=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:Te,spendManagement:{reimbursement:{reimbursementDetail:M}}}=qe.getLocalizedStrings(),On=K((function(e,t){const n=t.currentTenant?.companyId,r=pt(e.plaidAccountViewState,"user_reimbursement_account"),d=P.getSignedInUser(),c=be(d),m=r.plaidConnectionDetails,o=Le(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=ue(e,t.reimbursementId),b=bt(e,d?.userId??"");let y=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(y=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=gt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:y,isUserAdmin:pe(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:A,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:Pe(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=P.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(re(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ke(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e($t(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Pt())},clearRemiSaveStatus:()=>{e(Lt("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ke(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ut({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Dt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(jt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Ft({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(Tt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ae(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(Bt({data:l}))},onFetchBankName:i=>{e(xt(i))},submitRemiDetails:()=>{e(Ae("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(wt({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(oe({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Et({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(Ct({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Me()),e(At());const i=at(o),l=Z(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(A.trackReimbursementDeleteReimbursement(n),e($e(n)))},onSaveBankAccount:()=>{a?.userId&&e(vt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(Rt(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ft({fetchState:"Not-Started"})),e(St())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(ht({searchString:i,entityType:l,searchOrigin:"common"})):e(ve("common"))},onCancelAutoComplete:()=>{e(ve("common"))}}}}))(wn);function Fe(){const e=Q(),t=de(),n=H(),{reimbursementId:r}=Y(),d=We(),c=Qe(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=ee(),{isFeatureEnabled:b}=l(E.isLimitedCategoryForReimbursement),{isFeatureEnabled:y}=l(E.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(E.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=Se({mobileExploreReferrer:"Reimbursement Details"}),x=H().pathname,F=x.includes("edit"),v=x.includes("reimbursement/new"),[D,B]=f.useState(!1),k=P.getSignedInUser(),R=w((p=>V(p))),g=w((p=>ue(p,r))),U=tt(R?.companyId,{clearParams:g.fetchState==="Completed"}),L=pe(R?.userRole??[]);f.useEffect((()=>{(v&&!D||F&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(B(!0),t(Ue(!1,b,y,r)))}));const $=w((p=>ut(p.accountState,p.accountListState,"reimbursementAccountList")));if(k==null)throw Error("Can't access address page without signing in...");const I={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||L&&g.billStatus==="rejected"||L===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx(_,{to:I}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(Ke,{isNewReimbursement:r==null}):s.jsxs(zn,{windowSize:c,children:[s.jsx(te,{analytics:A,onLoad:p=>(W=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&W.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(Zn,{}):null,m&&c!=="small"?s.jsx(Hn,{children:s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:k?.userId??"",sessionId:k?.zeniSessionId??"",tenantId:R?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,k?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:Te.upload,single:M.dropReceipt.single,or:M.dropReceipt.or,multiple:M.dropReceipt.multiple,receipts:M.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Vn,{children:[s.jsx(Wn,{onClick:()=>o(!1),children:s.jsx(Gn,{})}),s.jsx(xe,{showAutofill:m,uploadInvoiceEndPoint:`${X.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:k?.userId??"",sessionId:k?.zeniSessionId??"",tenantId:R?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(re(p,a,!0,r,k?.userId))},updateInvoiceUploadFetchState:p=>{t(oe({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:Te.upload,single:M.dropReceipt.single,or:M.dropReceipt.or,multiple:M.dropReceipt.multiple,receipts:M.dropReceipt.receipts}})]}):null,s.jsx(Qn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:U??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:R,reimbursementId:r,themeState:d,uncategorizedAccounts:$,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const zn=N.div`
2
2
  display: flex;
3
3
  position: relative;
4
4
  height: 100vh;
@@ -1 +1 @@
1
- import{j as p}from"./liveblocks-DJbBe3tc.js";import{g as z,h as ge,u as Ce,i as we,j as d,n as Ie,o as Se,p as G}from"./core-BfWJ7zKT.js";import{e$ as L,fX as w,MX as Te,kL as J,re as W,s3 as k,kz as Re,jD as Oe,vC as K,s8 as Ae,bs as ke,MY as Fe,bn as De,wL as je,MZ as Ee,M_ as Pe,vu as Me,M$ as Y,N0 as Le,N1 as Ne,N2 as ve,N3 as Be,N4 as I,N5 as F,N6 as D,N7 as H,N8 as j,N9 as E,dL as Ve,wr as Ue,wf as $,wg as q,wx as xe,wk as Z,wD as ze,Na as Ge,Nb as Ye,Nc as He,Nd as $e,Ne as qe,fI as Ze,fG as Xe}from"./zeni-epic-state-kow6PLud.js";import{R as Qe,T as Je,V as We,W as Ke,J as ea,w as ee,i as P,z as ae,X as aa,D as sa,c as ta,Z as oa,a0 as na,A as ra,f as M,h as ia,a1 as la,v as se,a2 as ca,a3 as da,a4 as pa}from"./index-DWJVmwhz.js";import"./mui-ts7KHm6i.js";import fa from"./NotFoundScreen-0K6cd0N1.js";import{F as ma}from"./FeaturePreviewScreen-BnJlO_wg.js";import{a as _}from"./sentry-C6T1HHHS.js";import{u as ua}from"./useInitialThreadRequest-D3K2ol9C.js";import{t as X,a as Q,b as _a}from"./routePaths-DqVKIcAE.js";import{M as ha}from"./MobileAppDrawer-CinzTjr5.js";import"./recharts-DNnhB5R_.js";import"./analytics-BP5D4JyB.js";import"./plaid-Cv0mPYlm.js";import"./dnd-tQgCG5z3.js";import"./stripe-cKAAJElX.js";import"./lottie-BaCgeYyk.js";import"./lexical-Bg8ldM3i.js";import"./pdf-C9HGpLCu.js";import"./utils-xWcqC4Wl.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="932cbca6-8d09-4794-9baf-4496a7a043e2",e._sentryDebugIdIdentifier="sentry-dbid-932cbca6-8d09-4794-9baf-4496a7a043e2")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},ya=e=>{e(Ye()),e(He()),e($e()),e(qe())},ga=Ie((function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=w(e),r=Fe(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:M,isZeniUser:De(o),showAccountGroups:r===!0,isAccountingClassesEnabled:J(e),isAccountingProjectsEnabled:W(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(k(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ge(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ze(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter((g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year"))),e($(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e(q(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(I(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Z({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Y({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(Z(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(xe(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e($(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(q(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout((()=>y(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Ue({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ve(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return X(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return Q(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?_a(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?X(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(j({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(H({scrollPosition:s}));break;case"balance_sheet":e(D({scrollPosition:s}));break;case"cash_flow":e(F({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(E({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(ve({viewMode:a})),e(Be({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(I("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(I("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(I("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Ne({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Me()),o.isAccountingProjectsEnabled&&e(K())},onUpdateDisplayOrder:a=>{e(Pe(a))},onUpdateReportFormat:a=>{ya(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(je("profit_and_loss_by_classes"))}}}))(ca);function Ca(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Ke(),f=ea(),u=da(f),a=ge(),s=Ce(),t=z(),{tenantEmailDomain:r}=we(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(P.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[N,te]=_.useState(!1),{isFeatureEnabled:v}=l(P.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d((n=>L(n))),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(v?T?.companyId:void 0),C=d((n=>w(n).fetchState)),ie=d((n=>Te(n))),{areTenantIdsInSync:h}=aa(),R=d((n=>n.financeStatementState.selectedReportId)),B=d((n=>J(n))),O=d((n=>W(n))),le=d((n=>w(n).isCompareModeOn)),b=d((n=>w(n).filter)),A=d((n=>w(n).selectedReportAndTimeframeFetchState)),ce=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));_.useEffect((()=>{!i&&h&&(g(!0),s(k(c.userId,!0,!0,!1)))}),[i,c,s,h]),_.useEffect((()=>{i&&!N&&C==="Completed"&&h&&(s(k(c.userId,!1,!0,!1)),te(!0))}),[i,N,C,h]),_.useEffect((()=>{if(i&&A.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Ae(b.timeframe));break;case"profit_and_loss_by_projects":O&&s(K());break;case"balance_sheet":s(Oe(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}}),[i,R,A,h,B,O]);const V=sa(),de=V?.loggedInUserRole!=null&&ke(V?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),U=n=>{fe(n)},me=ta(),ue=oa();return(function(n){const{isDataReady:_e}=n,{pathname:he}=z(),x=Qe(he??"")==="reports",be=Je(_e),ye=_.useMemo((()=>x?ba:void 0),[x]);We({canFetchSuggestedQuestions:be,pageContexts:ye})})({isDataReady:C==="Completed"}),na({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ra,{analytics:M,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:U}),p.jsx(ga,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:R,analytics:M,filter:b,isAccountingClassesEnabled:B,isAccountingProjectsEnabled:O,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:A,handleDrawerToggle:U,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:v,initialOpenThreadRequest:re})]})}const S=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function xa(){const e=d((s=>L(s))),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(P.isDebitCardFeatureEnabled),u=Ze(f,e),a=Xe(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(Se,{children:[p.jsx(G,{path:"/",element:p.jsx(Ca,{})}),p.jsx(G,{path:"*",element:p.jsx(fa,{})})]})}export{xa as default};
1
+ import{j as p}from"./liveblocks-Dge8uQhE.js";import{g as z,h as ge,u as Ce,i as we,j as d,n as Ie,o as Se,p as G}from"./core-DslHP-Nt.js";import{e$ as L,fX as w,MX as Te,kL as J,re as W,s3 as k,kz as Re,jD as Oe,vC as K,s8 as Ae,bs as ke,MY as Fe,bn as De,wL as je,MZ as Ee,M_ as Pe,vu as Me,M$ as Y,N0 as Le,N1 as Ne,N2 as ve,N3 as Be,N4 as I,N5 as F,N6 as D,N7 as H,N8 as j,N9 as E,dL as Ve,wr as Ue,wf as $,wg as q,wx as xe,wk as Z,wD as ze,Na as Ge,Nb as Ye,Nc as He,Nd as $e,Ne as qe,fI as Ze,fG as Xe}from"./zeni-epic-state-COMt8QIe.js";import{R as Qe,T as Je,V as We,W as Ke,J as ea,w as ee,i as P,z as ae,X as aa,D as sa,c as ta,Z as oa,a0 as na,A as ra,f as M,h as ia,a1 as la,v as se,a2 as ca,a3 as da,a4 as pa}from"./index-Dg4tyRsb.js";import"./mui-DskYaYyd.js";import fa from"./NotFoundScreen-CXpw5ccb.js";import{F as ma}from"./FeaturePreviewScreen-ThRft5vA.js";import{a as _}from"./sentry-ConJlCAk.js";import{u as ua}from"./useInitialThreadRequest-3JvlSTXq.js";import{t as X,a as Q,b as _a}from"./routePaths-DaHBcomz.js";import{M as ha}from"./MobileAppDrawer-DzJzSgT6.js";import"./recharts-BV1Rao9g.js";import"./analytics-Det0UZFe.js";import"./plaid-ajCcP-UI.js";import"./dnd-CQxwFT7m.js";import"./stripe-cKAAJElX.js";import"./lottie-JtX4it7w.js";import"./lexical-DYyincEg.js";import"./pdf-8n9gC55d.js";import"./utils-KyL5SnF3.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="932cbca6-8d09-4794-9baf-4496a7a043e2",e._sentryDebugIdIdentifier="sentry-dbid-932cbca6-8d09-4794-9baf-4496a7a043e2")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},ya=e=>{e(Ye()),e(He()),e($e()),e(qe())},ga=Ie((function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=L(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=w(e),r=Fe(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:M,isZeniUser:De(o),showAccountGroups:r===!0,isAccountingClassesEnabled:J(e),isAccountingProjectsEnabled:W(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/statement`,authParams:s,isZeniCOAUsed:r}}),(function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(k(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ge(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ze(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter((g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year"))),e($(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e(q(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(I(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Z({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Y({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(Z(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(xe(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e($(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(q(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout((()=>y(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Ue({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ve(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return X(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return Q(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?_a(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?X(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:S(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(j({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(H({scrollPosition:s}));break;case"balance_sheet":e(D({scrollPosition:s}));break;case"cash_flow":e(F({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(E({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(ve({viewMode:a})),e(Be({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",S(o.selectedReportID)),e(I("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(I("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(I("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Ne({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Me()),o.isAccountingProjectsEnabled&&e(K())},onUpdateDisplayOrder:a=>{e(Pe(a))},onUpdateReportFormat:a=>{ya(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(je("profit_and_loss_by_classes"))}}}))(ca);function Ca(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Ke(),f=ea(),u=da(f),a=ge(),s=Ce(),t=z(),{tenantEmailDomain:r}=we(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(P.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[N,te]=_.useState(!1),{isFeatureEnabled:v}=l(P.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d((n=>L(n))),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(v?T?.companyId:void 0),C=d((n=>w(n).fetchState)),ie=d((n=>Te(n))),{areTenantIdsInSync:h}=aa(),R=d((n=>n.financeStatementState.selectedReportId)),B=d((n=>J(n))),O=d((n=>W(n))),le=d((n=>w(n).isCompareModeOn)),b=d((n=>w(n).filter)),A=d((n=>w(n).selectedReportAndTimeframeFetchState)),ce=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));_.useEffect((()=>{!i&&h&&(g(!0),s(k(c.userId,!0,!0,!1)))}),[i,c,s,h]),_.useEffect((()=>{i&&!N&&C==="Completed"&&h&&(s(k(c.userId,!1,!0,!1)),te(!0))}),[i,N,C,h]),_.useEffect((()=>{if(i&&A.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Ae(b.timeframe));break;case"profit_and_loss_by_projects":O&&s(K());break;case"balance_sheet":s(Oe(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}}),[i,R,A,h,B,O]);const V=sa(),de=V?.loggedInUserRole!=null&&ke(V?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),U=n=>{fe(n)},me=ta(),ue=oa();return(function(n){const{isDataReady:_e}=n,{pathname:he}=z(),x=Qe(he??"")==="reports",be=Je(_e),ye=_.useMemo((()=>x?ba:void 0),[x]);We({canFetchSuggestedQuestions:be,pageContexts:ye})})({isDataReady:C==="Completed"}),na({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ra,{analytics:M,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:U}),p.jsx(ga,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:R,analytics:M,filter:b,isAccountingClassesEnabled:B,isAccountingProjectsEnabled:O,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:A,handleDrawerToggle:U,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:v,initialOpenThreadRequest:re})]})}const S=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function xa(){const e=d((s=>L(s))),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(P.isDebitCardFeatureEnabled),u=Ze(f,e),a=Xe(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(Se,{children:[p.jsx(G,{path:"/",element:p.jsx(Ca,{})}),p.jsx(G,{path:"*",element:p.jsx(fa,{})})]})}export{xa as default};
@@ -1 +1 @@
1
- import{j as a}from"./liveblocks-DJbBe3tc.js";import{z as w,A as S,f as u,h as E,da as k,w as I,i as C}from"./index-DWJVmwhz.js";import"./mui-ts7KHm6i.js";import g from"./NotFoundScreen-0K6cd0N1.js";import{a as c}from"./sentry-C6T1HHHS.js";import{u as D,j as h,h as F,g as U,n as L,o as T,p as f,N as y}from"./core-BfWJ7zKT.js";import{e$ as _,Ue as j,Uf as p,w6 as P,fO as V,Ug as z,w4 as A}from"./zeni-epic-state-kow6PLud.js";import"./recharts-DNnhB5R_.js";import"./analytics-BP5D4JyB.js";import"./plaid-Cv0mPYlm.js";import"./dnd-tQgCG5z3.js";import"./stripe-cKAAJElX.js";import"./lottie-BaCgeYyk.js";import"./lexical-Bg8ldM3i.js";import"./pdf-C9HGpLCu.js";import"./utils-xWcqC4Wl.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]="14fe87df-ea73-4340-ac36-284b96168822",e._sentryDebugIdIdentifier="sentry-dbid-14fe87df-ea73-4340-ac36-284b96168822")}catch{}})();const G=L((function(e,t){const n=j(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(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((m=>{s.push(m.companyName),r.push(m.emailIds[0])})),u.trackInviteEmailClicked("send",s,r,s.length)}e(A())},onUpdateInviteFormLocalData:s=>{e(z({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}}))(k),O=()=>{const e=D(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>_(o))),m=F(),x=U(),d=w.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const l=h((o=>j(o))),b=d?.firstName!=null?d.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),c.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[l.fetchState,e]);const v=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(S,{analytics:u,onLoad:o=>(N=>N.trackPageLoaded(E.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:m,location:x,currentTenant:r,companyName:v,userName:b,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=I(),{isFeatureEnabled:t}=e(C.isReferralFeatureEnabled);return a.jsxs(T,{children:[a.jsx(f,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"refer/*",element:t?a.jsx(O,{}):a.jsx(g,{})}),a.jsx(f,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
1
+ import{j as a}from"./liveblocks-Dge8uQhE.js";import{z as w,A as S,f as u,h as E,da as k,w as I,i as C}from"./index-Dg4tyRsb.js";import"./mui-DskYaYyd.js";import g from"./NotFoundScreen-CXpw5ccb.js";import{a as c}from"./sentry-ConJlCAk.js";import{u as D,j as h,h as F,g as U,n as L,o as T,p as f,N as y}from"./core-DslHP-Nt.js";import{e$ as _,Ue as j,Uf as p,w6 as P,fO as V,Ug as z,w4 as A}from"./zeni-epic-state-COMt8QIe.js";import"./recharts-BV1Rao9g.js";import"./analytics-Det0UZFe.js";import"./plaid-ajCcP-UI.js";import"./dnd-CQxwFT7m.js";import"./stripe-cKAAJElX.js";import"./lottie-JtX4it7w.js";import"./lexical-DYyincEg.js";import"./pdf-8n9gC55d.js";import"./utils-KyL5SnF3.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]="14fe87df-ea73-4340-ac36-284b96168822",e._sentryDebugIdIdentifier="sentry-dbid-14fe87df-ea73-4340-ac36-284b96168822")}catch{}})();const G=L((function(e,t){const n=j(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(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((m=>{s.push(m.companyName),r.push(m.emailIds[0])})),u.trackInviteEmailClicked("send",s,r,s.length)}e(A())},onUpdateInviteFormLocalData:s=>{e(z({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}}))(k),O=()=>{const e=D(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>_(o))),m=F(),x=U(),d=w.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const l=h((o=>j(o))),b=d?.firstName!=null?d.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),c.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[l.fetchState,e]);const v=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(S,{analytics:u,onLoad:o=>(N=>N.trackPageLoaded(E.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:m,location:x,currentTenant:r,companyName:v,userName:b,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=I(),{isFeatureEnabled:t}=e(C.isReferralFeatureEnabled);return a.jsxs(T,{children:[a.jsx(f,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"refer/*",element:t?a.jsx(O,{}):a.jsx(g,{})}),a.jsx(f,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-DZ3q6bkK.js","assets/sentry-C6T1HHHS.js","assets/core-BfWJ7zKT.js","assets/zeni-epic-state-kow6PLud.js","assets/index-DWJVmwhz.js","assets/mui-ts7KHm6i.js","assets/analytics-BP5D4JyB.js","assets/utils-xWcqC4Wl.js","assets/withTransactionSidePanel-BMpiKSmG.js","assets/useAskAiCfoHostNavButtonProps-DJm2npkG.js","assets/TransactionDetailScreen-4CysuAHi.js","assets/decodeURIComponentSafe-D2jiQ7Do.js","assets/routePaths-DqVKIcAE.js","assets/NotFoundScreen-0K6cd0N1.js","assets/useInitialThreadRequest-D3K2ol9C.js","assets/analyticsHelper-BgeHTAVC.js","assets/CompanyPassportScreen-DZx6t9Ym.js","assets/MobileAppDrawer-CinzTjr5.js","assets/useAiCfoDashboardSuggestedQuestionsChips-BH6Wd98D.js","assets/FeaturePreviewScreen-BnJlO_wg.js","assets/index-Cx4f0JbF.css","assets/BillPayRoutes-DfJ2aUyG.js","assets/AddressScreen-2BaT3oA-.js","assets/DomesticWireDetailScreen-CkUpa35c.js","assets/DrawerScreen-C0UDia2K.js","assets/SetupPagesScreen-Cvdlisb9.js","assets/BusinessVerificationPageScreen-Bj1xk_4H.js","assets/BillPayApprovalRoutes-DmH2FpGv.js","assets/ReimbursementApprovalRuleDetailScreen-DwTxQqE3.js","assets/getLocaleForTenant-BJ1a_Zja.js","assets/ReimbursementRoutes-BGm8wHdZ.js","assets/ReimbursementApprovalRoutes-DBKdGYm6.js","assets/TransactionListRoutes-DNSGDUp4.js","assets/ZeniAccountStatementScreen-D9RVH8zp.js","assets/SettingsRoutes-BaPhIBve.js","assets/accountMappingHelper-gMZWceAt.js","assets/useEmailConnectResultRefresh-DFbMcoeq.js","assets/QBOConnectionScreen-OLT5sXwr.js","assets/empty-D4KL-CgN.js","assets/index-CiS2dMrM.js","assets/url-CJ3E3PSB.js","assets/index-DpTDwQon.js","assets/ReportsRoutes-NgI0ftPw.js","assets/ChargeCardRoutes-OCtj3EGu.js","assets/useChargeCardPusherEvents-Bfrohee4.js","assets/PeopleRoutes-DYYpRS5n.js","assets/ExpenseAutomationRoutes-DlWNUUJC.js","assets/TreasuryRoutes-CVqgaqHD.js","assets/useCashManagementBanner-Bjdnpen4.js","assets/VendorsRoutes-DVTbhmec.js","assets/pathToGoBack-DG10zCZ4.js","assets/ZeniAccountRoutes-BvMIfD-Y.js","assets/AddressRoutes-EXo_W2G8.js","assets/PandLWithForecastRoutes-CSWL87A6.js","assets/CustomerOnboardingRoutes-wfQZLitF.js","assets/TransactionDetailRoutes-Dxvv503N.js","assets/EntityDetailRoutes-CVYJbbdy.js","assets/NotificationRoutes-D6XmhJmY.js","assets/PerformanceRoutes-D39M8yO2.js","assets/RewardsRoutes-BR5NZ2Mx.js","assets/TaskRoutes-CZVLK5dG.js","assets/TaskListScreen-C2zap0Rn.js","assets/AiCfoScreen-D51UIBd5.js","assets/CardsAiCfoScreen-BgnMfnsv.js"])))=>i.map(i=>d[i]);
2
- import{_ as t,bn as ls,e$ as us,fI as ds,fG as cs,gq as ms,fv as _s,cX as Ee,cD as hs,fY as Es,cv as ps,bE as xs,bo as Rs,g0 as gs,v as Is,Mt as js,bs as Ts,Mu as As,bK as fs,bJ as Ds,bt as ys,cr as bs,Mv as Cs,Mw as vs,cT as ws,cW as Us,cV as Os,cC as Ps,cJ as Fs,on as pe,fE as xe,gD as Ls,g4 as Re,gA as ge,gB as Ie,g5 as ks}from"./zeni-epic-state-kow6PLud.js";import{j as e}from"./liveblocks-DJbBe3tc.js";import{a as O}from"./sentry-C6T1HHHS.js";import{u as Bs,h as Hs,i as Vs,g as Ss,j as G,l as je,N as u,o as Ns,p as a}from"./core-BfWJ7zKT.js";import{E as Ms,u as Zs,z as y,w as Gs,c as zs,Q as $s,i as z,d as Ys,e as Ws,D as qs,L as F,a as Te,t as _,P as Js,f as X,l}from"./index-DWJVmwhz.js";import"./mui-ts7KHm6i.js";import{f as Ae}from"./analyticsHelper-BgeHTAVC.js";import{t as Ks}from"./getLocaleForTenant-BJ1a_Zja.js";import"./recharts-DNnhB5R_.js";import"./analytics-BP5D4JyB.js";import"./plaid-Cv0mPYlm.js";import"./dnd-tQgCG5z3.js";import"./stripe-cKAAJElX.js";import"./lottie-BaCgeYyk.js";import"./lexical-Bg8ldM3i.js";import"./pdf-C9HGpLCu.js";import"./utils-xWcqC4Wl.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]="674edba9-20dd-46d8-9dc8-a141bcf02286",o._sentryDebugIdIdentifier="sentry-dbid-674edba9-20dd-46d8-9dc8-a141bcf02286")}catch{}})();const Qs={dashboard:()=>t((()=>import("./DashboardRoutes-DZ3q6bkK.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>t((()=>import("./BillPayRoutes-DfJ2aUyG.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])),reimbursement:()=>t((()=>import("./ReimbursementRoutes-BGm8wHdZ.js")),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])),transactions:()=>t((()=>import("./TransactionListRoutes-DNSGDUp4.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])),settings:()=>t((()=>import("./SettingsRoutes-BaPhIBve.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])),reports:()=>t((()=>import("./ReportsRoutes-NgI0ftPw.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])),chargeCards:()=>t((()=>import("./ChargeCardRoutes-OCtj3EGu.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])),people:()=>t((()=>import("./PeopleRoutes-DYYpRS5n.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])),expenseAutomation:()=>t((()=>import("./ExpenseAutomationRoutes-DlWNUUJC.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])),treasury:()=>t((()=>import("./TreasuryRoutes-CVqgaqHD.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])),vendors:()=>t((()=>import("./VendorsRoutes-DVTbhmec.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])),zeniAccounts:()=>t((()=>import("./ZeniAccountRoutes-BvMIfD-Y.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20]))},Xs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},et=l((()=>t((()=>import("./ReportsRoutes-NgI0ftPw.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])))),st=l((()=>t((()=>import("./AddressRoutes-EXo_W2G8.js")),__vite__mapDeps([52,1,2,3,22,4,5,6,7,13,20])))),tt=l((()=>t((()=>import("./PeopleRoutes-DYYpRS5n.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])))),nt=l((()=>t((()=>import("./PandLWithForecastRoutes-CSWL87A6.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,13,19,9,14,12,17,20])))),at=l((()=>t((()=>import("./CustomerOnboardingRoutes-wfQZLitF.js")),__vite__mapDeps([54,1,2,3,22,4,5,6,7,13,37,38,39,40,41,11,36,44,20])))),ot=l((()=>t((()=>import("./VendorsRoutes-DVTbhmec.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])))),rt=l((()=>t((()=>import("./TransactionDetailRoutes-Dxvv503N.js")),__vite__mapDeps([55,1,2,3,13,4,5,6,7,10,9,11,12,20])))),fe=l((()=>t((()=>import("./EntityDetailRoutes-CVYJbbdy.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,11,8,9,10,12,20])))),it=l((()=>t((()=>import("./DashboardRoutes-DZ3q6bkK.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])))),De=l((()=>t((()=>import("./BillPayRoutes-DfJ2aUyG.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])))),lt=l((()=>t((()=>import("./SettingsRoutes-BaPhIBve.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])))),ye=l((()=>t((()=>import("./ReimbursementRoutes-BGm8wHdZ.js")),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])))),ut=l((()=>t((()=>import("./ZeniAccountRoutes-BvMIfD-Y.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20])))),dt=l((()=>t((()=>import("./TreasuryRoutes-CVqgaqHD.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])))),ct=l((()=>t((()=>import("./TransactionListRoutes-DNSGDUp4.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])))),mt=l((()=>t((()=>import("./ChargeCardRoutes-OCtj3EGu.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])))),_t=l((()=>t((()=>import("./NotificationRoutes-D6XmhJmY.js")),__vite__mapDeps([57,1,2,3,13,4,5,6,7,9,20])))),ht=l((()=>t((()=>import("./PerformanceRoutes-D39M8yO2.js")),__vite__mapDeps([58,1,2,3,13,4,5,6,7,9,17,20])))),Et=l((()=>t((()=>import("./ExpenseAutomationRoutes-DlWNUUJC.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])))),pt=l((()=>t((()=>import("./RewardsRoutes-BR5NZ2Mx.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,13,20])))),xt=l((()=>t((()=>import("./TaskRoutes-CZVLK5dG.js")),__vite__mapDeps([60,1,2,3,13,4,5,6,7,14,17,61,9,20])))),Rt=l((()=>t((()=>import("./AiCfoScreen-D51UIBd5.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,18,50,20])))),be=l((()=>t((()=>import("./CardsAiCfoScreen-BgnMfnsv.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,20])))),C=l((()=>t((()=>import("./NotFoundScreen-0K6cd0N1.js")),__vite__mapDeps([13,1,2,3,4,5,6,7,20])))),gt=l((()=>t((()=>import("./TaskListScreen-C2zap0Rn.js").then((o=>o.f))),__vite__mapDeps([61,1,2,3,4,5,6,7,9,17,20]))));function St({setTenantEmailDomain:o}){const T=Bs(),V=Hs(),{tenantEmailDomain:i}=Vs(),L=Ms().mode,{setLoading:w,clearAllLoading:v,clearLoading:k}=Zs(),A=y.getSignedInUserTenant(i)?.tenantId,I=y.getSignedInUser(),se=ls(I),$=Ss(),[B,Oe]=O.useState(!1),r=G((n=>us(n))),{useFeatureGate:N}=Gs(),M=zs(),te=$s(),Pe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Fe=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Le}=N(z.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=N(z.isDebitCardFeatureEnabled),f=G((n=>n.tenantState.fetchState)),j=G((n=>n.tenantState.activeTenantFetchState.fetchState)),h=j==="Completed"||f==="Completed"?ds(ne,r):void 0,J=j==="Completed"||f==="Completed"?cs(r):void 0,ke=Ys(r,Le,ne),{isCardsHidden:Be}=Ws(r?.tenantId),He=!ke||!!Be,{isFeatureEnabled:Ve}=N(z.isSettingsFeatureEnabled),{isFeatureEnabled:K}=N(z.isAiCfoFileUploadEnabled),Y=G((n=>ms(n)));if(i!=null){const n=y.getSignedInUserTenant(i);I!=null&&n!=null&&Ae(I,r,L)}const Z={tenantId:A,userId:I?.userId,sessionId:I?.zeniSessionId},ae=_s(),E=qs(),Se=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=hs(E?.loggedInUserRoleMap),oe=je("/:tenantEmailDomain/onboarding/*")!==null,Q=je("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=G((n=>Z.tenantId!=null?Es(n,Z.tenantId):void 0));O.useEffect((()=>{w(F.TENANT_FETCHING),o(i)}),[i]),O.useEffect((()=>{if(Q!=null&&A!=null){const n=Q.params.selectedPeriod;if(n!=null){const D=n.split("-");if(D.length===2){const d=ps(Number(D[0])),s=Number(D[1]),c=xs(`01-${d<10?`0${d}`:d}-${s}`,Te.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),S=Rs();c.isAfter(S,"month")===!1?T(gs(A,{month:d,year:s})):V("./month_end_close_checks/review")}}}}),[Q,A]),O.useEffect((()=>{B||(Oe(!0),w(F.TENANT_FETCHING))}),[B,Z,ae,I,T,y]),O.useLayoutEffect((()=>{!Is(ae,Z)&&y.isSignedIn()&&(w(F.TENANT_FETCHING),(function(n,D,d,s){if(xe(D?.userId,D?.zeniSessionId,n.tenantId),d(Ls(!0)),d(Re(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const c=y.getSignedInUserTenantWithId(n.tenantId);s&&Te.updateAppLocaleID(Ks(s)),c?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}n.userId!=null?X.identify(n.userId,{tenant_id:n.tenantId}):X.resetUserIdentity()})(Z,I,T,Me))}),[A]),O.useEffect((()=>{y.isSignedIn()&&(w(F.TENANT_FETCHING),(function(n,D,d,s,c,S,H){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&c?.zeniSessionId!=null,os=d==null||d.tenantId!==s,rs=d!=null&&d.excludedResources==null,is=d!=null&&d.externalConnections==null;if(W&&os){H(Re(s));const q=y.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(q?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(ge(c.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(Ie(c.userId,s)))}else W&&rs&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(ge(c.userId,s))),W&&is&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(Ie(c.userId,s)));if(W){X.identify(c.userId,{tenant_id:s});const q=s==null||s!=null&&(D==="Completed"||D==="Error");n==="Completed"||D!=="Not-Started"&&D!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),S(F.TENANT_FETCHING),H(ks(c.userId,s,c.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(pe(c.userId,c.zeniSessionId)))}})(f,j,r,A,I,w,T))}),[A,j]),O.useEffect((()=>{y.isSignedIn()&&f==="Completed"&&Y.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),y.saveSignedInUserTenants(js(Y.tenantsBaseInOrder)),I!=null&&Ae(I,r,L,void 0,Y.tenantsBaseInOrder))}),[Y,f,r,I]),O.useEffect((()=>{j==="In-Progress"&&w(F.TENANT_FETCHING),j!=="Completed"&&j!=="Error"||(j==="Completed"&&A!=null?(v(),_.markActiveTenantFetchCompleted(A)):j==="Error"&&A!=null&&(_.markActiveTenantFetchFailed(A),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),f!=="Completed"&&f!=="Error"||(f==="Completed"?_.markAllTenantsFetchCompleted():f==="Error"&&_.markAllTenantsFetchFailed())}),[j,f,A,B]);const re=O.useRef(!1);O.useEffect((()=>{!re.current&&j==="Completed"&&B&&(re.current=!0,(function(n=Xs,D=3e3){setTimeout((()=>{const d=s=>{if(s>=n.length)return;const c=n[s],S=Qs[c];S!=null?S().then((()=>ee((()=>d(s+1))))).catch((()=>ee((()=>d(s+1))))):d(s+1)};ee((()=>d(0)))}),D)})())}),[j,B]);const U=r?.userRole!=null&&Ts(r?.userRole),{isFeatureEnabled:Ze}=N(z.isReferralFeatureEnabled),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),P=r?.userRole!=null&&Ee(r.userRole),ie=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!U,le=!He&&!U,$e=As(E?.loggedInUserRoleMap),Ye=r.externalConnections?.accounting[0]?.isValid,We=r.externalConnections?.fetchState==="Completed",ue=r.company?.companyOnboardingInfo.isOnboardingCompleted,de=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!U,ce=de&&fs(E?.loggedInUserRoleMap),me=Pe&&!U,qe=Fe&&!U,Je=ie&&Ds(E?.loggedInUserRoleMap),Ke=le&&ys(E?.loggedInUserRoleMap),Qe=me&&bs(E?.loggedInUserRoleMap),Xe=Cs(E?.loggedInUserRoleMap),es=vs(E?.loggedInUserRoleMap),ss=ws(E?.loggedInUserRoleMap),ts=Us(E?.loggedInUserRoleMap),ns=Os(E?.loggedInUserRoleMap),p=Ps(E?.loggedInUserRoleMap),x=Fs(E?.loggedInUserRoleMap),_e=ie&&p,he=de&&x,R=me&&ss,g=qe&&ts,m=le&&ns,as=r.excludedResources?.resources?.find((n=>n.resource==="/invites"))!=null||Ne===!0||$e===!0||Xe===!0||es===!0;return y.isSignedIn()?A==null?f==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&f!=="In-Progress"&&T(pe(I.userId,I.zeniSessionId)),null):j!=="In-Progress"&&j!=="Not-Started"||f==="Completed"?(ue===!0||se&&!oe)&&We&&Ye!==!0&&h===!1&&J===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!B||ue!==!1||oe||se?B&&r?.userRole&&h!=null&&J!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Ns,{children:e.jsxs(a,{element:e.jsx(Js,{}),children:[e.jsx(a,{path:"/",element:e.jsx(It,{isDashboardAccess:P,showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,isTenantCardsOnly:J,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:P?e.jsx(it,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reports/*",element:P?e.jsx(et,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"people/*",element:as||P?e.jsx(tt,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"forecast/*",element:P?e.jsx(nt,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(at,{})}),e.jsx(a,{path:"transaction/*",element:P&&U===!1||Ge||ze?e.jsx(rt,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"transactions/*",element:P&&U===!1?e.jsx(ct,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"customer/*",element:P&&U===!1?e.jsx(fe,{entityType:"customer"}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,isTenantBankingOnly:h,showTreasuryRoute:g,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"vendor/*",element:P&&U===!1?e.jsx(fe,{entityType:"vendor"}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"tasks",element:e.jsx(gt,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(xt,{})}),e.jsx(a,{path:"address/*",element:Je||ce||Qe||Ke?e.jsx(st,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"checking/*",element:R?e.jsx(ut,{}):e.jsx(C,{})}),e.jsx(a,{path:"treasury/*",element:g?e.jsx(dt,{}):e.jsx(C,{})}),e.jsx(a,{path:"performance",element:te===!0?e.jsx(ht,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:te===!0&&U===!1?e.jsx(Et,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(a,{path:"notifications/*",element:e.jsx(_t,{})}),e.jsx(a,{path:"vendors/*",element:Se?e.jsx(ot,{}):e.jsx(C,{})}),e.jsx(a,{path:"bill/*",element:_e?e.jsx(De,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"bills/*",element:_e?e.jsx(De,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursement/*",element:he?e.jsx(ye,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursements/*",element:he?e.jsx(ye,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"settings/*",element:Ve?e.jsx(lt,{hasAdminLevelAccess:ce}):e.jsx(C,{})}),e.jsx(a,{path:"cards/ask",element:m&&M?e.jsx(be,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(a,{path:"cards/ask/:session_id",element:m&&M?e.jsx(be,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(a,{path:"cards/*",element:m?e.jsx(mt,{}):e.jsx(C,{})}),e.jsx(a,{path:"rewards/*",element:Ze?e.jsx(pt,{}):e.jsx(C,{})}),e.jsx(a,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(a,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:M?e.jsx(Rt,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(a,{path:"*",element:e.jsx(C,{})})]})}):null:(o(void 0),e.jsx(u,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const It=({isDashboardAccess:o,showZeniAccountRoute:T,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:i,showTreasuryRoute:L,isTenantBankingOnly:w,isTenantCardsOnly:v,showChargeCardRoute:k})=>{if(w===!0){if(T)return e.jsx(u,{to:"checking"});if(L)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return v===!0&&k?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):T?e.jsx(u,{to:"checking"}):L?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):V?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},b=({showZeniAccountRoute:o,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:V,showTreasuryRoute:i,isTenantBankingOnly:L,showChargeCardRoute:w,tenantEmailDomain:v})=>{if(L===!0){if(o)return e.jsx(ve,{tenantEmailDomain:v});if(i)return e.jsx(Ce,{tenantEmailDomain:v});if(w)return e.jsx(we,{tenantEmailDomain:v})}return o?e.jsx(ve,{tenantEmailDomain:v}):i?e.jsx(Ce,{tenantEmailDomain:v}):w?e.jsx(we,{tenantEmailDomain:v}):T?e.jsx(Tt,{tenantEmailDomain:v}):V?e.jsx(jt,{tenantEmailDomain:v}):e.jsx(C,{})},jt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),Tt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),Ce=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),ve=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),we=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`});export{b as FallBackRoute,St as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-BAU3Ibey.js","assets/sentry-ConJlCAk.js","assets/core-DslHP-Nt.js","assets/zeni-epic-state-COMt8QIe.js","assets/index-Dg4tyRsb.js","assets/mui-DskYaYyd.js","assets/analytics-Det0UZFe.js","assets/utils-KyL5SnF3.js","assets/withTransactionSidePanel-6rcxd76V.js","assets/useAskAiCfoHostNavButtonProps-B4wJLWMn.js","assets/TransactionDetailScreen-CaGnx38Y.js","assets/decodeURIComponentSafe-uhKYYVbR.js","assets/routePaths-DaHBcomz.js","assets/NotFoundScreen-CXpw5ccb.js","assets/useInitialThreadRequest-3JvlSTXq.js","assets/analyticsHelper-8-InFpUB.js","assets/CompanyPassportScreen-kjymniC5.js","assets/MobileAppDrawer-DzJzSgT6.js","assets/useAiCfoDashboardSuggestedQuestionsChips-CNgwQr_C.js","assets/FeaturePreviewScreen-ThRft5vA.js","assets/index-Cx4f0JbF.css","assets/BillPayRoutes-_ZcW8FPr.js","assets/AddressScreen-DIqjx48a.js","assets/DomesticWireDetailScreen-C1Dd4ngM.js","assets/DrawerScreen-0yAAklt1.js","assets/SetupPagesScreen-Gl6Ev5mh.js","assets/BusinessVerificationPageScreen-B-wvnrXB.js","assets/BillPayApprovalRoutes-DNnCD0MB.js","assets/ReimbursementApprovalRuleDetailScreen-RfbEJD7G.js","assets/getLocaleForTenant-D03M5oWL.js","assets/ReimbursementRoutes-I-bqtRTr.js","assets/ReimbursementApprovalRoutes-CvZrgPUd.js","assets/TransactionListRoutes-D3-4FbZY.js","assets/ZeniAccountStatementScreen-BbPJuLXl.js","assets/SettingsRoutes-BRjlnN1I.js","assets/accountMappingHelper-DXKNp4_g.js","assets/useEmailConnectResultRefresh-Bc2zbLFy.js","assets/QBOConnectionScreen-hHibn3nh.js","assets/empty-pFhUOX6X.js","assets/index-H3qfOHz1.js","assets/url-FGF171Cm.js","assets/index-B3Qv-ngJ.js","assets/ReportsRoutes-B2xd2wz-.js","assets/ChargeCardRoutes-qFtN4Ye0.js","assets/useChargeCardPusherEvents-BtMWwDMr.js","assets/PeopleRoutes-DlZpFXaH.js","assets/ExpenseAutomationRoutes-CFrS-dO7.js","assets/TreasuryRoutes-Df0dXAls.js","assets/useCashManagementBanner-JRbdWYI5.js","assets/VendorsRoutes-DZrbgG94.js","assets/pathToGoBack-DPWssLbl.js","assets/ZeniAccountRoutes-BRv1xo02.js","assets/AddressRoutes-DxmvMb05.js","assets/PandLWithForecastRoutes-DBwvjyhf.js","assets/CustomerOnboardingRoutes-pDACY6i1.js","assets/TransactionDetailRoutes-DEYaLVln.js","assets/EntityDetailRoutes-BfJbSwDL.js","assets/NotificationRoutes-DUsFGMLY.js","assets/PerformanceRoutes-DgVbhlv9.js","assets/RewardsRoutes-OCfmkQy_.js","assets/TaskRoutes-Devbp0kK.js","assets/TaskListScreen-Ba2VReu6.js","assets/AiCfoScreen-CrYSqsDW.js","assets/CardsAiCfoScreen-BRHcH0UC.js"])))=>i.map(i=>d[i]);
2
+ import{_ as t,bn as ls,e$ as us,fI as ds,fG as cs,gq as ms,fv as _s,cX as Ee,cD as hs,fY as Es,cv as ps,bE as xs,bo as Rs,g0 as gs,v as Is,Mt as js,bs as Ts,Mu as As,bK as fs,bJ as Ds,bt as ys,cr as bs,Mv as Cs,Mw as vs,cT as ws,cW as Us,cV as Os,cC as Ps,cJ as Fs,on as pe,fE as xe,gD as Ls,g4 as Re,gA as ge,gB as Ie,g5 as ks}from"./zeni-epic-state-COMt8QIe.js";import{j as e}from"./liveblocks-Dge8uQhE.js";import{a as O}from"./sentry-ConJlCAk.js";import{u as Bs,h as Hs,i as Vs,g as Ss,j as G,l as je,N as u,o as Ns,p as a}from"./core-DslHP-Nt.js";import{E as Ms,u as Zs,z as y,w as Gs,c as zs,Q as $s,i as z,d as Ys,e as Ws,D as qs,L as F,a as Te,t as _,P as Js,f as X,l}from"./index-Dg4tyRsb.js";import"./mui-DskYaYyd.js";import{f as Ae}from"./analyticsHelper-8-InFpUB.js";import{t as Ks}from"./getLocaleForTenant-D03M5oWL.js";import"./recharts-BV1Rao9g.js";import"./analytics-Det0UZFe.js";import"./plaid-ajCcP-UI.js";import"./dnd-CQxwFT7m.js";import"./stripe-cKAAJElX.js";import"./lottie-JtX4it7w.js";import"./lexical-DYyincEg.js";import"./pdf-8n9gC55d.js";import"./utils-KyL5SnF3.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]="674edba9-20dd-46d8-9dc8-a141bcf02286",o._sentryDebugIdIdentifier="sentry-dbid-674edba9-20dd-46d8-9dc8-a141bcf02286")}catch{}})();const Qs={dashboard:()=>t((()=>import("./DashboardRoutes-BAU3Ibey.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>t((()=>import("./BillPayRoutes-_ZcW8FPr.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])),reimbursement:()=>t((()=>import("./ReimbursementRoutes-I-bqtRTr.js")),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])),transactions:()=>t((()=>import("./TransactionListRoutes-D3-4FbZY.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])),settings:()=>t((()=>import("./SettingsRoutes-BRjlnN1I.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])),reports:()=>t((()=>import("./ReportsRoutes-B2xd2wz-.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])),chargeCards:()=>t((()=>import("./ChargeCardRoutes-qFtN4Ye0.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])),people:()=>t((()=>import("./PeopleRoutes-DlZpFXaH.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])),expenseAutomation:()=>t((()=>import("./ExpenseAutomationRoutes-CFrS-dO7.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])),treasury:()=>t((()=>import("./TreasuryRoutes-Df0dXAls.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])),vendors:()=>t((()=>import("./VendorsRoutes-DZrbgG94.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])),zeniAccounts:()=>t((()=>import("./ZeniAccountRoutes-BRv1xo02.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20]))},Xs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},et=l((()=>t((()=>import("./ReportsRoutes-B2xd2wz-.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])))),st=l((()=>t((()=>import("./AddressRoutes-DxmvMb05.js")),__vite__mapDeps([52,1,2,3,22,4,5,6,7,13,20])))),tt=l((()=>t((()=>import("./PeopleRoutes-DlZpFXaH.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])))),nt=l((()=>t((()=>import("./PandLWithForecastRoutes-DBwvjyhf.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,13,19,9,14,12,17,20])))),at=l((()=>t((()=>import("./CustomerOnboardingRoutes-pDACY6i1.js")),__vite__mapDeps([54,1,2,3,22,4,5,6,7,13,37,38,39,40,41,11,36,44,20])))),ot=l((()=>t((()=>import("./VendorsRoutes-DZrbgG94.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])))),rt=l((()=>t((()=>import("./TransactionDetailRoutes-DEYaLVln.js")),__vite__mapDeps([55,1,2,3,13,4,5,6,7,10,9,11,12,20])))),fe=l((()=>t((()=>import("./EntityDetailRoutes-BfJbSwDL.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,11,8,9,10,12,20])))),it=l((()=>t((()=>import("./DashboardRoutes-BAU3Ibey.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])))),De=l((()=>t((()=>import("./BillPayRoutes-_ZcW8FPr.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])))),lt=l((()=>t((()=>import("./SettingsRoutes-BRjlnN1I.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])))),ye=l((()=>t((()=>import("./ReimbursementRoutes-I-bqtRTr.js")),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])))),ut=l((()=>t((()=>import("./ZeniAccountRoutes-BRv1xo02.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20])))),dt=l((()=>t((()=>import("./TreasuryRoutes-Df0dXAls.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])))),ct=l((()=>t((()=>import("./TransactionListRoutes-D3-4FbZY.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])))),mt=l((()=>t((()=>import("./ChargeCardRoutes-qFtN4Ye0.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])))),_t=l((()=>t((()=>import("./NotificationRoutes-DUsFGMLY.js")),__vite__mapDeps([57,1,2,3,13,4,5,6,7,9,20])))),ht=l((()=>t((()=>import("./PerformanceRoutes-DgVbhlv9.js")),__vite__mapDeps([58,1,2,3,13,4,5,6,7,9,17,20])))),Et=l((()=>t((()=>import("./ExpenseAutomationRoutes-CFrS-dO7.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])))),pt=l((()=>t((()=>import("./RewardsRoutes-OCfmkQy_.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,13,20])))),xt=l((()=>t((()=>import("./TaskRoutes-Devbp0kK.js")),__vite__mapDeps([60,1,2,3,13,4,5,6,7,14,17,61,9,20])))),Rt=l((()=>t((()=>import("./AiCfoScreen-CrYSqsDW.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,18,50,20])))),be=l((()=>t((()=>import("./CardsAiCfoScreen-BRHcH0UC.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,20])))),C=l((()=>t((()=>import("./NotFoundScreen-CXpw5ccb.js")),__vite__mapDeps([13,1,2,3,4,5,6,7,20])))),gt=l((()=>t((()=>import("./TaskListScreen-Ba2VReu6.js").then((o=>o.f))),__vite__mapDeps([61,1,2,3,4,5,6,7,9,17,20]))));function St({setTenantEmailDomain:o}){const T=Bs(),V=Hs(),{tenantEmailDomain:i}=Vs(),L=Ms().mode,{setLoading:w,clearAllLoading:v,clearLoading:k}=Zs(),A=y.getSignedInUserTenant(i)?.tenantId,I=y.getSignedInUser(),se=ls(I),$=Ss(),[B,Oe]=O.useState(!1),r=G((n=>us(n))),{useFeatureGate:N}=Gs(),M=zs(),te=$s(),Pe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Fe=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Le}=N(z.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=N(z.isDebitCardFeatureEnabled),f=G((n=>n.tenantState.fetchState)),j=G((n=>n.tenantState.activeTenantFetchState.fetchState)),h=j==="Completed"||f==="Completed"?ds(ne,r):void 0,J=j==="Completed"||f==="Completed"?cs(r):void 0,ke=Ys(r,Le,ne),{isCardsHidden:Be}=Ws(r?.tenantId),He=!ke||!!Be,{isFeatureEnabled:Ve}=N(z.isSettingsFeatureEnabled),{isFeatureEnabled:K}=N(z.isAiCfoFileUploadEnabled),Y=G((n=>ms(n)));if(i!=null){const n=y.getSignedInUserTenant(i);I!=null&&n!=null&&Ae(I,r,L)}const Z={tenantId:A,userId:I?.userId,sessionId:I?.zeniSessionId},ae=_s(),E=qs(),Se=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=hs(E?.loggedInUserRoleMap),oe=je("/:tenantEmailDomain/onboarding/*")!==null,Q=je("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=G((n=>Z.tenantId!=null?Es(n,Z.tenantId):void 0));O.useEffect((()=>{w(F.TENANT_FETCHING),o(i)}),[i]),O.useEffect((()=>{if(Q!=null&&A!=null){const n=Q.params.selectedPeriod;if(n!=null){const D=n.split("-");if(D.length===2){const d=ps(Number(D[0])),s=Number(D[1]),c=xs(`01-${d<10?`0${d}`:d}-${s}`,Te.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),S=Rs();c.isAfter(S,"month")===!1?T(gs(A,{month:d,year:s})):V("./month_end_close_checks/review")}}}}),[Q,A]),O.useEffect((()=>{B||(Oe(!0),w(F.TENANT_FETCHING))}),[B,Z,ae,I,T,y]),O.useLayoutEffect((()=>{!Is(ae,Z)&&y.isSignedIn()&&(w(F.TENANT_FETCHING),(function(n,D,d,s){if(xe(D?.userId,D?.zeniSessionId,n.tenantId),d(Ls(!0)),d(Re(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const c=y.getSignedInUserTenantWithId(n.tenantId);s&&Te.updateAppLocaleID(Ks(s)),c?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}n.userId!=null?X.identify(n.userId,{tenant_id:n.tenantId}):X.resetUserIdentity()})(Z,I,T,Me))}),[A]),O.useEffect((()=>{y.isSignedIn()&&(w(F.TENANT_FETCHING),(function(n,D,d,s,c,S,H){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&c?.zeniSessionId!=null,os=d==null||d.tenantId!==s,rs=d!=null&&d.excludedResources==null,is=d!=null&&d.externalConnections==null;if(W&&os){H(Re(s));const q=y.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(q?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(ge(c.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(Ie(c.userId,s)))}else W&&rs&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(ge(c.userId,s))),W&&is&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(Ie(c.userId,s)));if(W){X.identify(c.userId,{tenant_id:s});const q=s==null||s!=null&&(D==="Completed"||D==="Error");n==="Completed"||D!=="Not-Started"&&D!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),S(F.TENANT_FETCHING),H(ks(c.userId,s,c.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(pe(c.userId,c.zeniSessionId)))}})(f,j,r,A,I,w,T))}),[A,j]),O.useEffect((()=>{y.isSignedIn()&&f==="Completed"&&Y.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),y.saveSignedInUserTenants(js(Y.tenantsBaseInOrder)),I!=null&&Ae(I,r,L,void 0,Y.tenantsBaseInOrder))}),[Y,f,r,I]),O.useEffect((()=>{j==="In-Progress"&&w(F.TENANT_FETCHING),j!=="Completed"&&j!=="Error"||(j==="Completed"&&A!=null?(v(),_.markActiveTenantFetchCompleted(A)):j==="Error"&&A!=null&&(_.markActiveTenantFetchFailed(A),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),f!=="Completed"&&f!=="Error"||(f==="Completed"?_.markAllTenantsFetchCompleted():f==="Error"&&_.markAllTenantsFetchFailed())}),[j,f,A,B]);const re=O.useRef(!1);O.useEffect((()=>{!re.current&&j==="Completed"&&B&&(re.current=!0,(function(n=Xs,D=3e3){setTimeout((()=>{const d=s=>{if(s>=n.length)return;const c=n[s],S=Qs[c];S!=null?S().then((()=>ee((()=>d(s+1))))).catch((()=>ee((()=>d(s+1))))):d(s+1)};ee((()=>d(0)))}),D)})())}),[j,B]);const U=r?.userRole!=null&&Ts(r?.userRole),{isFeatureEnabled:Ze}=N(z.isReferralFeatureEnabled),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),P=r?.userRole!=null&&Ee(r.userRole),ie=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!U,le=!He&&!U,$e=As(E?.loggedInUserRoleMap),Ye=r.externalConnections?.accounting[0]?.isValid,We=r.externalConnections?.fetchState==="Completed",ue=r.company?.companyOnboardingInfo.isOnboardingCompleted,de=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!U,ce=de&&fs(E?.loggedInUserRoleMap),me=Pe&&!U,qe=Fe&&!U,Je=ie&&Ds(E?.loggedInUserRoleMap),Ke=le&&ys(E?.loggedInUserRoleMap),Qe=me&&bs(E?.loggedInUserRoleMap),Xe=Cs(E?.loggedInUserRoleMap),es=vs(E?.loggedInUserRoleMap),ss=ws(E?.loggedInUserRoleMap),ts=Us(E?.loggedInUserRoleMap),ns=Os(E?.loggedInUserRoleMap),p=Ps(E?.loggedInUserRoleMap),x=Fs(E?.loggedInUserRoleMap),_e=ie&&p,he=de&&x,R=me&&ss,g=qe&&ts,m=le&&ns,as=r.excludedResources?.resources?.find((n=>n.resource==="/invites"))!=null||Ne===!0||$e===!0||Xe===!0||es===!0;return y.isSignedIn()?A==null?f==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(I!=null&&f!=="In-Progress"&&T(pe(I.userId,I.zeniSessionId)),null):j!=="In-Progress"&&j!=="Not-Started"||f==="Completed"?(ue===!0||se&&!oe)&&We&&Ye!==!0&&h===!1&&J===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!B||ue!==!1||oe||se?B&&r?.userRole&&h!=null&&J!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Ns,{children:e.jsxs(a,{element:e.jsx(Js,{}),children:[e.jsx(a,{path:"/",element:e.jsx(It,{isDashboardAccess:P,showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,isTenantCardsOnly:J,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:P?e.jsx(it,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reports/*",element:P?e.jsx(et,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"people/*",element:as||P?e.jsx(tt,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"forecast/*",element:P?e.jsx(nt,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(at,{})}),e.jsx(a,{path:"transaction/*",element:P&&U===!1||Ge||ze?e.jsx(rt,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"transactions/*",element:P&&U===!1?e.jsx(ct,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"customer/*",element:P&&U===!1?e.jsx(fe,{entityType:"customer"}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,isTenantBankingOnly:h,showTreasuryRoute:g,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"vendor/*",element:P&&U===!1?e.jsx(fe,{entityType:"vendor"}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"tasks",element:e.jsx(gt,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(xt,{})}),e.jsx(a,{path:"address/*",element:Je||ce||Qe||Ke?e.jsx(st,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"checking/*",element:R?e.jsx(ut,{}):e.jsx(C,{})}),e.jsx(a,{path:"treasury/*",element:g?e.jsx(dt,{}):e.jsx(C,{})}),e.jsx(a,{path:"performance",element:te===!0?e.jsx(ht,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:te===!0&&U===!1?e.jsx(Et,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(a,{path:"notifications/*",element:e.jsx(_t,{})}),e.jsx(a,{path:"vendors/*",element:Se?e.jsx(ot,{}):e.jsx(C,{})}),e.jsx(a,{path:"bill/*",element:_e?e.jsx(De,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"bills/*",element:_e?e.jsx(De,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursement/*",element:he?e.jsx(ye,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursements/*",element:he?e.jsx(ye,{}):e.jsx(b,{showZeniAccountRoute:R,isUserHasBillPayAccess:p,isUserHasReimbursementAccess:x,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"settings/*",element:Ve?e.jsx(lt,{hasAdminLevelAccess:ce}):e.jsx(C,{})}),e.jsx(a,{path:"cards/ask",element:m&&M?e.jsx(be,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(a,{path:"cards/ask/:session_id",element:m&&M?e.jsx(be,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(a,{path:"cards/*",element:m?e.jsx(mt,{}):e.jsx(C,{})}),e.jsx(a,{path:"rewards/*",element:Ze?e.jsx(pt,{}):e.jsx(C,{})}),e.jsx(a,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(a,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(C,{})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:M?e.jsx(Rt,{isFileUploadEnabled:K}):e.jsx(C,{})}),e.jsx(a,{path:"*",element:e.jsx(C,{})})]})}):null:(o(void 0),e.jsx(u,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const It=({isDashboardAccess:o,showZeniAccountRoute:T,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:i,showTreasuryRoute:L,isTenantBankingOnly:w,isTenantCardsOnly:v,showChargeCardRoute:k})=>{if(w===!0){if(T)return e.jsx(u,{to:"checking"});if(L)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return v===!0&&k?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):T?e.jsx(u,{to:"checking"}):L?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):V?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},b=({showZeniAccountRoute:o,isUserHasBillPayAccess:T,isUserHasReimbursementAccess:V,showTreasuryRoute:i,isTenantBankingOnly:L,showChargeCardRoute:w,tenantEmailDomain:v})=>{if(L===!0){if(o)return e.jsx(ve,{tenantEmailDomain:v});if(i)return e.jsx(Ce,{tenantEmailDomain:v});if(w)return e.jsx(we,{tenantEmailDomain:v})}return o?e.jsx(ve,{tenantEmailDomain:v}):i?e.jsx(Ce,{tenantEmailDomain:v}):w?e.jsx(we,{tenantEmailDomain:v}):T?e.jsx(Tt,{tenantEmailDomain:v}):V?e.jsx(jt,{tenantEmailDomain:v}):e.jsx(C,{})},jt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),Tt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),Ce=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),ve=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),we=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`});export{b as FallBackRoute,St as default};
@@ -1,4 +1,4 @@
1
- import{j as o}from"./liveblocks-DJbBe3tc.js";import{a as u}from"./sentry-C6T1HHHS.js";import{h as L,g as G,u as R,j as y,s as re,n as H,i as Z,o as ne,p as v}from"./core-BfWJ7zKT.js";import{bn as De,e$ as j,gy as Me,nd as le,OO as Te,hO as he,OF as Re,re as Ue,kL as be,n9 as _e,hQ as Fe,OH as Oe,OG as Be,R5 as Ve,zJ as ze,Fa as Le,QG as Ne,QP as $e,c7 as ae,cO as Ge,cP as He,bs as Ze,MG as Ke,y9 as Qe,R6 as Je,HB as qe,ES as Xe,EJ as ye,EG as Ye,yd as Se,EM as Ce,EP as Ie,EV as oe,uz as se,yc as We,kn as X,kq as Ae,R7 as en,lr as nn,ys as tn,Nx as an,Ny as on,kl as sn,R8 as cn,ko as rn,rI as ln,Ns as dn,Nt as un,rM as pn,hz as gn,MO as ee,hr as de,ho as mn,hw as fn,MP as hn,yp as bn,R9 as yn,Ra as Sn,F7 as Cn,fG as Ee,fI as xe,Rb as In,gj as An,MY as En,yo as ue,go as pe,gn as xn,yn as vn,gm as wn,gl as kn,Rc as Pn,fL as ve,Rd as jn,Re as Dn,yv as Mn,ym as ge,Rf as Tn,f$ as Rn,yj as Un,b_ as _n,c6 as Fn,c5 as On,b$ as Bn,c3 as Vn,c2 as zn,c1 as Ln,c4 as Nn,c0 as $n}from"./zeni-epic-state-kow6PLud.js";import{w as Y,i as B,z as k,ag as we,bR as Gn,f as K,h as Hn,bC as Zn,D as Q,B as ie,bS as Kn,d as ke,e as Pe,bT as Qn,ar as Jn,m as je,bU as qn,bV as Xn,bW as Yn,X as Wn,bX as et,v as nt,bY as tt}from"./index-DWJVmwhz.js";import{n as V}from"./mui-ts7KHm6i.js";import{M as F}from"./MobileAppDrawer-CinzTjr5.js";import{a as J,g as q,m as at}from"./accountMappingHelper-gMZWceAt.js";import{t as ot,A as st}from"./AddressScreen-2BaT3oA-.js";import $ from"./NotFoundScreen-0K6cd0N1.js";import{g as it}from"./analyticsHelper-BgeHTAVC.js";import{B as ct}from"./BusinessVerificationPageScreen-Bj1xk_4H.js";import{C as rt}from"./CompanyPassportScreen-DZx6t9Ym.js";import{u as lt,a as dt}from"./useEmailConnectResultRefresh-DFbMcoeq.js";import{q as me}from"./QBOConnectionScreen-OLT5sXwr.js";import{B as ut}from"./BillPayApprovalRoutes-DmH2FpGv.js";import{R as pt}from"./ReimbursementApprovalRoutes-DBKdGYm6.js";import"./recharts-DNnhB5R_.js";import"./analytics-BP5D4JyB.js";import"./plaid-Cv0mPYlm.js";import"./dnd-tQgCG5z3.js";import"./stripe-cKAAJElX.js";import"./lottie-BaCgeYyk.js";import"./lexical-Bg8ldM3i.js";import"./pdf-C9HGpLCu.js";import"./utils-xWcqC4Wl.js";import"./routePaths-DqVKIcAE.js";import"./empty-D4KL-CgN.js";import"./pdf-lib-DX6kz8a9.js";import"./index-CiS2dMrM.js";import"./url-CJ3E3PSB.js";import"./index-DpTDwQon.js";import"./decodeURIComponentSafe-D2jiQ7Do.js";import"./ReimbursementApprovalRuleDetailScreen-DwTxQqE3.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]="2be731ec-7199-4f42-aed6-03b3bad9ce5d",e._sentryDebugIdIdentifier="sentry-dbid-2be731ec-7199-4f42-aed6-03b3bad9ce5d")}catch{}})();const gt=V.div`
1
+ import{j as o}from"./liveblocks-Dge8uQhE.js";import{a as u}from"./sentry-ConJlCAk.js";import{h as L,g as G,u as R,j as y,s as re,n as H,i as Z,o as ne,p as v}from"./core-DslHP-Nt.js";import{bn as De,e$ as j,gy as Me,nd as le,OO as Te,hO as he,OF as Re,re as Ue,kL as be,n9 as _e,hQ as Fe,OH as Oe,OG as Be,R5 as Ve,zJ as ze,Fa as Le,QG as Ne,QP as $e,c7 as ae,cO as Ge,cP as He,bs as Ze,MG as Ke,y9 as Qe,R6 as Je,HB as qe,ES as Xe,EJ as ye,EG as Ye,yd as Se,EM as Ce,EP as Ie,EV as oe,uz as se,yc as We,kn as X,kq as Ae,R7 as en,lr as nn,ys as tn,Nx as an,Ny as on,kl as sn,R8 as cn,ko as rn,rI as ln,Ns as dn,Nt as un,rM as pn,hz as gn,MO as ee,hr as de,ho as mn,hw as fn,MP as hn,yp as bn,R9 as yn,Ra as Sn,F7 as Cn,fG as Ee,fI as xe,Rb as In,gj as An,MY as En,yo as ue,go as pe,gn as xn,yn as vn,gm as wn,gl as kn,Rc as Pn,fL as ve,Rd as jn,Re as Dn,yv as Mn,ym as ge,Rf as Tn,f$ as Rn,yj as Un,b_ as _n,c6 as Fn,c5 as On,b$ as Bn,c3 as Vn,c2 as zn,c1 as Ln,c4 as Nn,c0 as $n}from"./zeni-epic-state-COMt8QIe.js";import{w as Y,i as B,z as k,ag as we,bR as Gn,f as K,h as Hn,bC as Zn,D as Q,B as ie,bS as Kn,d as ke,e as Pe,bT as Qn,ar as Jn,m as je,bU as qn,bV as Xn,bW as Yn,X as Wn,bX as et,v as nt,bY as tt}from"./index-Dg4tyRsb.js";import{n as V}from"./mui-DskYaYyd.js";import{M as F}from"./MobileAppDrawer-DzJzSgT6.js";import{a as J,g as q,m as at}from"./accountMappingHelper-DXKNp4_g.js";import{t as ot,A as st}from"./AddressScreen-DIqjx48a.js";import $ from"./NotFoundScreen-CXpw5ccb.js";import{g as it}from"./analyticsHelper-8-InFpUB.js";import{B as ct}from"./BusinessVerificationPageScreen-B-wvnrXB.js";import{C as rt}from"./CompanyPassportScreen-kjymniC5.js";import{u as lt,a as dt}from"./useEmailConnectResultRefresh-Bc2zbLFy.js";import{q as me}from"./QBOConnectionScreen-hHibn3nh.js";import{B as ut}from"./BillPayApprovalRoutes-DNnCD0MB.js";import{R as pt}from"./ReimbursementApprovalRoutes-CvZrgPUd.js";import"./recharts-BV1Rao9g.js";import"./analytics-Det0UZFe.js";import"./plaid-ajCcP-UI.js";import"./dnd-CQxwFT7m.js";import"./stripe-cKAAJElX.js";import"./lottie-JtX4it7w.js";import"./lexical-DYyincEg.js";import"./pdf-8n9gC55d.js";import"./utils-KyL5SnF3.js";import"./routePaths-DaHBcomz.js";import"./empty-pFhUOX6X.js";import"./pdf-lib-CuyyFcf5.js";import"./index-H3qfOHz1.js";import"./url-FGF171Cm.js";import"./index-B3Qv-ngJ.js";import"./decodeURIComponentSafe-uhKYYVbR.js";import"./ReimbursementApprovalRuleDetailScreen-RfbEJD7G.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]="2be731ec-7199-4f42-aed6-03b3bad9ce5d",e._sentryDebugIdIdentifier="sentry-dbid-2be731ec-7199-4f42-aed6-03b3bad9ce5d")}catch{}})();const gt=V.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as u}from"./liveblocks-DJbBe3tc.js";import{h as Y,g as ee,u as ne,i as Q,j as v,N as x,n as W,t as en}from"./core-BfWJ7zKT.js";import{bJ as nn,cr as Ce,Qu as ye,e$ as V,cD as tn,zZ as $,zJ as an,QG as sn,QJ as on,r$ as te,rP as ae,lj as ie,u5 as z,QL as Ie,gn as Ge,gm as Qe,gl as We,QM as cn,A6 as rn,ES as Ae,EJ as ke,EG as _e,Eo as q,EM as Pe,EP as Ee,EV as ve,uz as we,gF as un,cy as dn,fI as ln,fG as pn,fH as mn,bt as yn,QN as fn,Do as le,E0 as gn,QO as Sn,bK as bn,G9 as pe,Fa as hn,QP as Cn,QQ as In,Gd as An,Gh as kn,t_ as _n,KP as Pn,GO as he,HO as me,QR as En,QS as vn,QT as wn,QU as He,QV as Tn,Ng as Dn,PW as Un,Nv as On,QW as Je,Es as Fn,Nw as Vn,Ew as Bn,QX as Oe,H8 as Ke,lr as xn,rS as qe,u7 as jn,bE as Re,uj as Ne,cB as Rn,QY as Xe,f_ as Nn,Gw as zn,GA as Ln,QZ as Mn,GR as ze,Q_ as Zn,Q$ as $n,R0 as Gn,R1 as Qn,gy as Wn,Bh as Hn,R2 as Jn,Bm as Kn,Bl as qn}from"./zeni-epic-state-kow6PLud.js";import{D as se,w as oe,i as K,E as Te,aS as X,bC as Ye,z as U,A as ce,f as O,B as De,h as G,bD as Xn,au as re,bE as B,bF as Yn,bG as et,ag as xe,bH as nt,v as Le,av as Me,J as tt,F as at,bI as it,bJ as st,bK as ot,a9 as ct}from"./index-DWJVmwhz.js";import{a as h}from"./sentry-C6T1HHHS.js";import{n as Fe,D as rt,S as ut}from"./mui-ts7KHm6i.js";import{M as fe}from"./MobileAppDrawer-CinzTjr5.js";import N from"./NotFoundScreen-0K6cd0N1.js";import{a as Ze}from"./analyticsHelper-BgeHTAVC.js";import{d as $e}from"./routePaths-DqVKIcAE.js";import{B as Ue}from"./BusinessVerificationPageScreen-Bj1xk_4H.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="4f0a56fb-d116-4636-9d68-4f3efce6a3ef",e._sentryDebugIdIdentifier="sentry-dbid-4f0a56fb-d116-4636-9d68-4f3efce6a3ef")}catch{}})();const dt=Fe.div`
1
+ import{j as u}from"./liveblocks-Dge8uQhE.js";import{h as Y,g as ee,u as ne,i as Q,j as v,N as x,n as W,t as en}from"./core-DslHP-Nt.js";import{bJ as nn,cr as Ce,Qu as ye,e$ as V,cD as tn,zZ as $,zJ as an,QG as sn,QJ as on,r$ as te,rP as ae,lj as ie,u5 as z,QL as Ie,gn as Ge,gm as Qe,gl as We,QM as cn,A6 as rn,ES as Ae,EJ as ke,EG as _e,Eo as q,EM as Pe,EP as Ee,EV as ve,uz as we,gF as un,cy as dn,fI as ln,fG as pn,fH as mn,bt as yn,QN as fn,Do as le,E0 as gn,QO as Sn,bK as bn,G9 as pe,Fa as hn,QP as Cn,QQ as In,Gd as An,Gh as kn,t_ as _n,KP as Pn,GO as he,HO as me,QR as En,QS as vn,QT as wn,QU as He,QV as Tn,Ng as Dn,PW as Un,Nv as On,QW as Je,Es as Fn,Nw as Vn,Ew as Bn,QX as Oe,H8 as Ke,lr as xn,rS as qe,u7 as jn,bE as Re,uj as Ne,cB as Rn,QY as Xe,f_ as Nn,Gw as zn,GA as Ln,QZ as Mn,GR as ze,Q_ as Zn,Q$ as $n,R0 as Gn,R1 as Qn,gy as Wn,Bh as Hn,R2 as Jn,Bm as Kn,Bl as qn}from"./zeni-epic-state-COMt8QIe.js";import{D as se,w as oe,i as K,E as Te,aS as X,bC as Ye,z as U,A as ce,f as O,B as De,h as G,bD as Xn,au as re,bE as B,bF as Yn,bG as et,ag as xe,bH as nt,v as Le,av as Me,J as tt,F as at,bI as it,bJ as st,bK as ot,a9 as ct}from"./index-Dg4tyRsb.js";import{a as h}from"./sentry-ConJlCAk.js";import{n as Fe,D as rt,S as ut}from"./mui-DskYaYyd.js";import{M as fe}from"./MobileAppDrawer-DzJzSgT6.js";import N from"./NotFoundScreen-CXpw5ccb.js";import{a as Ze}from"./analyticsHelper-8-InFpUB.js";import{d as $e}from"./routePaths-DaHBcomz.js";import{B as Ue}from"./BusinessVerificationPageScreen-B-wvnrXB.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="4f0a56fb-d116-4636-9d68-4f3efce6a3ef",e._sentryDebugIdIdentifier="sentry-dbid-4f0a56fb-d116-4636-9d68-4f3efce6a3ef")}catch{}})();const dt=Fe.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as f}from"./liveblocks-DJbBe3tc.js";import{a as u,b as M,q as A}from"./sentry-C6T1HHHS.js";import{u as T,h as z,j as d,g as D,N as j,n as O}from"./core-BfWJ7zKT.js";import{u as P,z as s,E as _,f as w,a as B,g as F,h as $,$ as N,j as V,k as q,m as v}from"./index-DWJVmwhz.js";import{e$ as J,Ms as W,Mt as Z,fE as G,g4 as H,My as K,gx as Q,c_ as R,Mz as b,MA as X,MB as Y,bZ as y}from"./zeni-epic-state-kow6PLud.js";import"./mui-ts7KHm6i.js";import{u as ee}from"./useDeviceId-DNuYTM17.js";import{f as te}from"./analyticsHelper-BgeHTAVC.js";import{t as ne}from"./getLocaleForTenant-BJ1a_Zja.js";import"./recharts-DNnhB5R_.js";import"./analytics-BP5D4JyB.js";import"./plaid-Cv0mPYlm.js";import"./dnd-tQgCG5z3.js";import"./stripe-cKAAJElX.js";import"./lottie-BaCgeYyk.js";import"./lexical-Bg8ldM3i.js";import"./pdf-C9HGpLCu.js";import"./utils-xWcqC4Wl.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]="3be9c730-3575-4a88-8f36-7fcac1cff02e",t._sentryDebugIdIdentifier="sentry-dbid-3be9c730-3575-4a88-8f36-7fcac1cff02e")}catch{}})();const ie=O((function(t,i){const c=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:c,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}}),(function(t,i){const{location:c,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 l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Y({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),sourceUri:y(c.state!=null?c.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=c.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(X(n,a)))},clearSignInError:()=>{t(b())}}}))(q),ae=M.memo(ie);function ve({setTenantEmailDomain:t}){const i=T(),c=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect((()=>{g()}),[g]);const a=ee(),l=d((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:E,accountLocked:x,accountUnlockTime:h}=d((e=>e.tenantState)),p=d((e=>e.tenantState.fetchState)),k=d((e=>e.tenantState.activeTenantFetchState.fetchState)),S=d((e=>e.tenantState.signInState)),o=d((e=>e.tenantState.loggedInUser)),r=d((e=>J(e))),I=d((e=>W(e))),m=D(),L=_().mode,C=m.state?.magicLinkExpired,U=m.state?.magicLinkAlreadyUsed;if(u.useEffect((()=>{E.fetchState==="Completed"&&l!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))}),[E.fetchState,l]),u.useEffect((()=>{t(void 0)}),[]),u.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&k!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(Z(I.tenantsInOrder),o.zeniSessionId),G(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(K("Completed")),B.updateAppLocaleID(ne(r)),te(o,r,L,void 0,I.tenantsInOrder),Q().then((()=>{const e=V();e!=null&&F(e)})),setTimeout((()=>{w.trackLogin($.Event.loginSuccess,o.authProvider??"google",R(r.productSettings))}),2e3))}),[S,p,k,o,r,I,L,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(j,{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:c,deviceId:a??void 0,showEmailLogin:!0}),x===!0&&h!=null?f.jsx(N,{onClose:()=>i(b()),unlockDate:h}):null]})}export{ve as default};
1
+ import{j as f}from"./liveblocks-Dge8uQhE.js";import{a as u,b as M,q as A}from"./sentry-ConJlCAk.js";import{u as T,h as z,j as d,g as D,N as j,n as O}from"./core-DslHP-Nt.js";import{u as P,z as s,E as _,f as w,a as B,g as F,h as $,$ as N,j as V,k as q,m as v}from"./index-Dg4tyRsb.js";import{e$ as J,Ms as W,Mt as Z,fE as G,g4 as H,My as K,gx as Q,c_ as R,Mz as b,MA as X,MB as Y,bZ as y}from"./zeni-epic-state-COMt8QIe.js";import"./mui-DskYaYyd.js";import{u as ee}from"./useDeviceId-DS-lzRmX.js";import{f as te}from"./analyticsHelper-8-InFpUB.js";import{t as ne}from"./getLocaleForTenant-D03M5oWL.js";import"./recharts-BV1Rao9g.js";import"./analytics-Det0UZFe.js";import"./plaid-ajCcP-UI.js";import"./dnd-CQxwFT7m.js";import"./stripe-cKAAJElX.js";import"./lottie-JtX4it7w.js";import"./lexical-DYyincEg.js";import"./pdf-8n9gC55d.js";import"./utils-KyL5SnF3.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]="3be9c730-3575-4a88-8f36-7fcac1cff02e",t._sentryDebugIdIdentifier="sentry-dbid-3be9c730-3575-4a88-8f36-7fcac1cff02e")}catch{}})();const ie=O((function(t,i){const c=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:c,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}}),(function(t,i){const{location:c,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 l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Y({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),sourceUri:y(c.state!=null?c.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=c.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(X(n,a)))},clearSignInError:()=>{t(b())}}}))(q),ae=M.memo(ie);function ve({setTenantEmailDomain:t}){const i=T(),c=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect((()=>{g()}),[g]);const a=ee(),l=d((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:E,accountLocked:x,accountUnlockTime:h}=d((e=>e.tenantState)),p=d((e=>e.tenantState.fetchState)),k=d((e=>e.tenantState.activeTenantFetchState.fetchState)),S=d((e=>e.tenantState.signInState)),o=d((e=>e.tenantState.loggedInUser)),r=d((e=>J(e))),I=d((e=>W(e))),m=D(),L=_().mode,C=m.state?.magicLinkExpired,U=m.state?.magicLinkAlreadyUsed;if(u.useEffect((()=>{E.fetchState==="Completed"&&l!=null&&(w.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))}),[E.fetchState,l]),u.useEffect((()=>{t(void 0)}),[]),u.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&k!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(Z(I.tenantsInOrder),o.zeniSessionId),G(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(K("Completed")),B.updateAppLocaleID(ne(r)),te(o,r,L,void 0,I.tenantsInOrder),Q().then((()=>{const e=V();e!=null&&F(e)})),setTimeout((()=>{w.trackLogin($.Event.loginSuccess,o.authProvider??"google",R(r.productSettings))}),2e3))}),[S,p,k,o,r,I,L,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(j,{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:c,deviceId:a??void 0,showEmailLogin:!0}),x===!0&&h!=null?f.jsx(N,{onClose:()=>i(b()),unlockDate:h}):null]})}export{ve as default};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-DJbBe3tc.js";import{a as i}from"./sentry-C6T1HHHS.js";import{u as l,g as c,N as u}from"./core-BfWJ7zKT.js";import{z as n,f as a,h as m,B as p}from"./index-DWJVmwhz.js";import{gC as g,MQ as b}from"./zeni-epic-state-kow6PLud.js";import{n as y}from"./mui-ts7KHm6i.js";import"./recharts-DNnhB5R_.js";import"./analytics-BP5D4JyB.js";import"./plaid-Cv0mPYlm.js";import"./dnd-tQgCG5z3.js";import"./stripe-cKAAJElX.js";import"./lottie-BaCgeYyk.js";import"./lexical-Bg8ldM3i.js";import"./pdf-C9HGpLCu.js";import"./utils-xWcqC4Wl.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]="60df70f9-b306-4a3f-8b5d-7638be1c0b0b",e._sentryDebugIdIdentifier="sentry-dbid-60df70f9-b306-4a3f-8b5d-7638be1c0b0b")}catch{}})();function L(){const e=l(),t=c(),r=i.useRef(!1),f=n.isSignedIn(),o=t.state?.message==="logout"||f;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),b(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(d){console.error("Error during sign out:",d)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=y.div`
1
+ import{j as s}from"./liveblocks-Dge8uQhE.js";import{a as i}from"./sentry-ConJlCAk.js";import{u as l,g as c,N as u}from"./core-DslHP-Nt.js";import{z as n,f as a,h as m,B as p}from"./index-Dg4tyRsb.js";import{gC as g,MQ as b}from"./zeni-epic-state-COMt8QIe.js";import{n as y}from"./mui-DskYaYyd.js";import"./recharts-BV1Rao9g.js";import"./analytics-Det0UZFe.js";import"./plaid-ajCcP-UI.js";import"./dnd-CQxwFT7m.js";import"./stripe-cKAAJElX.js";import"./lottie-JtX4it7w.js";import"./lexical-DYyincEg.js";import"./pdf-8n9gC55d.js";import"./utils-KyL5SnF3.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]="60df70f9-b306-4a3f-8b5d-7638be1c0b0b",e._sentryDebugIdIdentifier="sentry-dbid-60df70f9-b306-4a3f-8b5d-7638be1c0b0b")}catch{}})();function L(){const e=l(),t=c(),r=i.useRef(!1),f=n.isSignedIn(),o=t.state?.message==="logout"||f;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),b(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(d){console.error("Error during sign out:",d)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=y.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as C}from"./liveblocks-DJbBe3tc.js";import{a as f}from"./sentry-C6T1HHHS.js";import{h as pe,u as Te,g as fe,k as ge,j as F,i as _e,n as me}from"./core-BfWJ7zKT.js";import{az as De,aA as be,z as x,w as Se,i as G,a0 as he,A as Ee,f as ye,h as Ae,dd as Ce,v as w,s as Ge}from"./index-DWJVmwhz.js";import{e$ as Ie,Um as X,JB as U,Un as Y,Ui as Ue,IZ as M,Uo as Be,J5 as q,IH as ve,Ij as Ke,JC as V,Up as W,fD as Le,Js as we,Jx as Re,Jk as Pe,Ji as H,Jy as Fe,Jf as je,Uq as xe,Ur as $e,Us as Ne,Ut as Oe,Uu as I,da as Je,d9 as ze,Uv as Ze,IF as Me}from"./zeni-epic-state-kow6PLud.js";import{n as qe}from"./mui-ts7KHm6i.js";import{u as Ve}from"./useAskAiCfoHostNavButtonProps-DJm2npkG.js";import{M as We}from"./MobileAppDrawer-CinzTjr5.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="6232b89a-a8e4-4247-a2a1-08e3669b6454",a._sentryDebugIdIdentifier="sentry-dbid-6232b89a-a8e4-4247-a2a1-08e3669b6454")}catch{}})();const c={TASK_CREATED:"task-created",TASK_UPDATED:"task-updated",TASK_SNOOZE_RESURFACED:"task-snooze-resurfaced",TASKS_BULK_UPDATED:"tasks-bulk-updated",TASKS_BULK_DELETED:"tasks-bulk-deleted"},He=(a,e)=>a==null||a===""?[]:e.map((n=>`private-encrypted-${a}.${n}`)),Qe=(a,e)=>a==null||a===""?[]:e.map((n=>`private-encrypted-${a}.${n}`)),R=a=>Array.isArray(a)&&a.every((e=>typeof e=="string")),Xe=a=>{if(a==null||typeof a!="object")return null;const e=a,n=typeof e.task_id=="string"?e.task_id:typeof e.id=="string"?e.id:null;if(n==null||typeof e.tenant_id!="string"||typeof e.event_type!="string")return null;const r={task_id:n,tenant_id:e.tenant_id,event_type:e.event_type};return typeof e.is_private=="boolean"&&(r.is_private=e.is_private),R(e.assignees)&&(r.assignees=e.assignees),R(e.direct_assignees)&&(r.direct_assignees=e.direct_assignees),typeof e.created_by=="string"&&(r.created_by=e.created_by),R(e.task_group_ids)&&(r.task_group_ids=e.task_group_ids),typeof e.name=="string"&&(r.name=e.name),typeof e.parent_task_id=="string"&&(r.parent_task_id=e.parent_task_id),r},Ye=a=>{if(a==null||typeof a!="object")return null;const e=a;return R(e.task_ids)?{task_ids:e.task_ids}:null},pa=a=>{if(a==null||typeof a!="object")return null;const e=a;return typeof e.task_id!="string"?null:{task_id:e.task_id}},ea=a=>{const{events:e,onEvent:n,onSubscribed:r}=a,i=De(),g=f.useRef(n),l=f.useRef(r),_=f.useRef(0);f.useEffect((()=>{g.current=n}),[n]),f.useEffect((()=>{l.current=r}),[r]);const t=f.useMemo((()=>[...e].sort().join("|")),[e]);f.useEffect((()=>{if(i==null||e.length===0)return;const s=[],p=new Set,S=()=>{if(l.current==null)return;const m=Date.now();m-_.current<5e3||(_.current=m,l.current())};return e.forEach((m=>{const[D,b]=be(m);if(b==="")return;const E=i.channel(D),y=T=>{g.current(b,T)};let k;if(E?.subscribed===!0){if(k=E,k.bind(b,y),!p.has(D)){p.add(D),S();const T=()=>{S()};k.bind("pusher:subscription_succeeded",T),s.push((()=>{k.unbind("pusher:subscription_succeeded",T)}))}s.push((()=>{E.unbind(b,y)}))}else{if(k=E??i.subscribe(D),k.bind(b,y),!p.has(D)){p.add(D);const T=()=>{S()};k.bind("pusher:subscription_succeeded",T),s.push((()=>{k.unbind("pusher:subscription_succeeded",T)}))}s.push((()=>{k.unbind(b,y)}))}})),()=>{s.forEach((m=>m()))}}),[i,t])},aa=qe.div`
1
+ import{j as C}from"./liveblocks-Dge8uQhE.js";import{a as f}from"./sentry-ConJlCAk.js";import{h as pe,u as Te,g as fe,k as ge,j as F,i as _e,n as me}from"./core-DslHP-Nt.js";import{az as De,aA as be,z as x,w as Se,i as G,a0 as he,A as Ee,f as ye,h as Ae,dd as Ce,v as w,s as Ge}from"./index-Dg4tyRsb.js";import{e$ as Ie,Um as X,JB as U,Un as Y,Ui as Ue,IZ as M,Uo as Be,J5 as q,IH as ve,Ij as Ke,JC as V,Up as W,fD as Le,Js as we,Jx as Re,Jk as Pe,Ji as H,Jy as Fe,Jf as je,Uq as xe,Ur as $e,Us as Ne,Ut as Oe,Uu as I,da as Je,d9 as ze,Uv as Ze,IF as Me}from"./zeni-epic-state-COMt8QIe.js";import{n as qe}from"./mui-DskYaYyd.js";import{u as Ve}from"./useAskAiCfoHostNavButtonProps-B4wJLWMn.js";import{M as We}from"./MobileAppDrawer-DzJzSgT6.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="6232b89a-a8e4-4247-a2a1-08e3669b6454",a._sentryDebugIdIdentifier="sentry-dbid-6232b89a-a8e4-4247-a2a1-08e3669b6454")}catch{}})();const c={TASK_CREATED:"task-created",TASK_UPDATED:"task-updated",TASK_SNOOZE_RESURFACED:"task-snooze-resurfaced",TASKS_BULK_UPDATED:"tasks-bulk-updated",TASKS_BULK_DELETED:"tasks-bulk-deleted"},He=(a,e)=>a==null||a===""?[]:e.map((n=>`private-encrypted-${a}.${n}`)),Qe=(a,e)=>a==null||a===""?[]:e.map((n=>`private-encrypted-${a}.${n}`)),R=a=>Array.isArray(a)&&a.every((e=>typeof e=="string")),Xe=a=>{if(a==null||typeof a!="object")return null;const e=a,n=typeof e.task_id=="string"?e.task_id:typeof e.id=="string"?e.id:null;if(n==null||typeof e.tenant_id!="string"||typeof e.event_type!="string")return null;const r={task_id:n,tenant_id:e.tenant_id,event_type:e.event_type};return typeof e.is_private=="boolean"&&(r.is_private=e.is_private),R(e.assignees)&&(r.assignees=e.assignees),R(e.direct_assignees)&&(r.direct_assignees=e.direct_assignees),typeof e.created_by=="string"&&(r.created_by=e.created_by),R(e.task_group_ids)&&(r.task_group_ids=e.task_group_ids),typeof e.name=="string"&&(r.name=e.name),typeof e.parent_task_id=="string"&&(r.parent_task_id=e.parent_task_id),r},Ye=a=>{if(a==null||typeof a!="object")return null;const e=a;return R(e.task_ids)?{task_ids:e.task_ids}:null},pa=a=>{if(a==null||typeof a!="object")return null;const e=a;return typeof e.task_id!="string"?null:{task_id:e.task_id}},ea=a=>{const{events:e,onEvent:n,onSubscribed:r}=a,i=De(),g=f.useRef(n),l=f.useRef(r),_=f.useRef(0);f.useEffect((()=>{g.current=n}),[n]),f.useEffect((()=>{l.current=r}),[r]);const t=f.useMemo((()=>[...e].sort().join("|")),[e]);f.useEffect((()=>{if(i==null||e.length===0)return;const s=[],p=new Set,S=()=>{if(l.current==null)return;const m=Date.now();m-_.current<5e3||(_.current=m,l.current())};return e.forEach((m=>{const[D,b]=be(m);if(b==="")return;const E=i.channel(D),y=T=>{g.current(b,T)};let k;if(E?.subscribed===!0){if(k=E,k.bind(b,y),!p.has(D)){p.add(D),S();const T=()=>{S()};k.bind("pusher:subscription_succeeded",T),s.push((()=>{k.unbind("pusher:subscription_succeeded",T)}))}s.push((()=>{E.unbind(b,y)}))}else{if(k=E??i.subscribe(D),k.bind(b,y),!p.has(D)){p.add(D);const T=()=>{S()};k.bind("pusher:subscription_succeeded",T),s.push((()=>{k.unbind("pusher:subscription_succeeded",T)}))}s.push((()=>{k.unbind(b,y)}))}})),()=>{s.forEach((m=>m()))}}),[i,t])},aa=qe.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as r}from"./liveblocks-DJbBe3tc.js";import ue from"./NotFoundScreen-0K6cd0N1.js";import{a as k}from"./sentry-C6T1HHHS.js";import{h as Y,u as ee,j as b,g as de,i as ke,N as pe,n as me,o as Se,p as I}from"./core-BfWJ7zKT.js";import{Iw as ae,Iz as fe,It as Te,Uh as ge,e$ as te,Ui as se,IV as g,IN as T,Iq as he,Jp as Ie,Ji as be,Uj as ne,fD as oe,Uk as q,Im as Ee,Ij as De,r$ as Ce,rP as Ge,lj as Ue,IL as _e,Ul as Re,JC as we,IH as xe,J4 as je,J1 as ye,IC as Be,I_ as ve,IZ as Ae}from"./zeni-epic-state-kow6PLud.js";import{z as _,db as Pe,x as Le,w as Fe,i as G,s as ie,v as U,A as Ke,f as J,h as $e,dc as Ne,m as M,au as ze}from"./index-DWJVmwhz.js";import{n as Oe}from"./mui-ts7KHm6i.js";import{u as Ve}from"./useInitialThreadRequest-D3K2ol9C.js";import{M as Ze}from"./MobileAppDrawer-CinzTjr5.js";import{b as qe,a as Je,u as Me,T as f,t as He,c as H,d as Q,e as Qe}from"./TaskListScreen-C2zap0Rn.js";import"./recharts-DNnhB5R_.js";import"./analytics-BP5D4JyB.js";import"./plaid-Cv0mPYlm.js";import"./dnd-tQgCG5z3.js";import"./stripe-cKAAJElX.js";import"./lottie-BaCgeYyk.js";import"./lexical-Bg8ldM3i.js";import"./pdf-C9HGpLCu.js";import"./utils-xWcqC4Wl.js";import"./useAskAiCfoHostNavButtonProps-DJm2npkG.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]="7e3dc458-f5b0-43ff-8f2f-01511c362618",e._sentryDebugIdIdentifier="sentry-dbid-7e3dc458-f5b0-43ff-8f2f-01511c362618")}catch{}})();function We(){const e=Y(),a=ee(),n=_.getSignedInUser(),{cannedResponses:c,fetchState:s,saveFetchState:u}=b((o=>o.cannedResponsesState)),d=k.useCallback((()=>{a(ae())}),[a]),m=k.useCallback(((o,E,D)=>{a(fe({name:o,content:E,cannedResponseId:D}))}),[a]),t=k.useCallback((o=>{a(Te({cannedResponseId:o}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(Pe,{cannedResponses:c,isLoading:s==="In-Progress"||s==="Not-Started",isSaving:u==="In-Progress",onBackClick:()=>e(-1),onDelete:t,onFetch:d,onSave:m})}const F=e=>e?.taskState?.taskByID,P=(e,a)=>{const n=F(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},Xe=ge([P,(e,a)=>{const n=P(e,a),c=F(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=P(e,a),c=F(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}}));let W,X=[];const Ye=me((function(e,a){const{location:n,taskGroupId:c}=a,s=ne(e,a.taskId),u=te(e),d=Xe(e,a.taskId),m=s.taskGroupId??c,t=m!=null?q(e.taskGroupState,m):void 0,o=_.getSignedInUser(),E=u.tenantId,D={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:E??""},j=se(e),{tenantEmailDomain:y}=u,R=s.recurringSourceTaskId,B=R!=null?`${M.appUrl}/${y}/tasks/${encodeURIComponent(R)}`:void 0;var h;return{taskDetailSelectorView:s,authParams:D,isZeniUser:_.isZeniUser(),userGroupList:((h=e.userGroupsState.userGroupByUserGroupId)!==W&&(W=h,X=Object.values(h)),X),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:ze.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${M.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:B,tagListView:j,taskGroupName:m!=null&&t!=null&&t.isDefault===!1?t.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((S=>q(e.taskGroupState,S))).filter((S=>S!=null&&!S.isDeleted)).map((S=>({id:S.id,name:S.name,isDefault:S.isDefault}))),subtasks:s.subtasks,parentTaskRef:d,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:s,location:u,taskGroupId:d}=a,{tenantEmailDomain:m}=s;return{onSaveChangesToLocalStore:t=>{e(Ae({taskDetailLocalData:t,taskId:n}))},onSaveDetailClick:t=>{e(ve(n,t??d))},onArchiveTaskClick:()=>{a.taskId!=null&&e(Be(a.taskId))},onSnoozeTask:(t,o)=>{e(ye(t,o))},onUnsnoozeTask:t=>{e(je(t))},onCreateSubtask:(t,o)=>{e(xe({...o,parentTaskId:t}))},onSubtaskUpdate:(t,o)=>{e(we({task:t,updates:o}))},onShowToast:t=>{e(oe(t))},onSubtaskRowClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:U(u.state?.pathnameStackToGoBack,u.pathname)}})},onParentBreadcrumbClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:U(u.state?.pathnameStackToGoBack,u.pathname)}})},onDismissClick:()=>{if(u.state?.message==="triggerBackClick"){const t=ie(u.state?.pathnameStackToGoBack),o=t.poppedPathname??"../../dashboard";c(o,{state:{pathnameStackToGoBack:t.newStack}})}else{const t=x(m),o=U(u.state?.pathnameStackToGoBack,u.pathname);c(t,{state:{pathnameStackToGoBack:o}})}e(Re({taskId:n}))},onDeleteTaskClick:()=>{e(_e(n))},updateFilesEntity:t=>{e(Ue({files:t}))},onDeleteFile:t=>{e(Ge(t))},onEditFileName:(t,o)=>{e(Ce(t,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(g(!1,n))},onCreateTagClick:t=>{e(De(t,n))},onDeleteTagClick:t=>{e(Ee(t,n))},onFetchCannedResponses:()=>{e(ae())},onManageTemplatesClick:()=>{c(`/${s.tenantEmailDomain}/tasks/quick-responses`)}}}))(Ne);function L(){const e=Y(),a=ee(),n=de(),c=Le(),{taskId:s,taskGroupId:u}=ke(),d=b((i=>te(i))),m=Ve(d?.companyId),{useFeatureGate:t}=Fe(),{isFeatureEnabled:o}=t(G.isTaskSnoozeEnabled),{isFeatureEnabled:E}=t(G.isTaskVisibilityEnabled),{isFeatureEnabled:D}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:j}=t(G.isTaskRecurringParentEnabled),{isFeatureEnabled:y}=t(G.isTaskGroupAssigneesEnabled),[R,B]=k.useState(!1),[h,S]=k.useState(!1),[K,re]=k.useState(!1),[$,v]=k.useState(!1),C=k.useRef(!1),w=b((i=>i.taskListState.updateTasksFetchState.fetchState)),N=b((i=>se(i))),z=b((i=>i.taskGroupViewState.fetchState));k.useEffect((()=>{a(g(!1,s)),s!=null&&a(T(s))}),[a,s]);const O=_.getSignedInUser()?.userId,ce=k.useMemo((()=>{const i=[f.TASK_CREATED,f.TASK_UPDATED,f.TASKS_BULK_UPDATED,f.TASKS_BULK_DELETED],l=[...i,f.TASK_SNOOZE_RESURFACED];return[...qe(d?.tenantId,i),...Je(O,l)]}),[d?.tenantId,O]);Me({events:ce,onSubscribed:()=>{s!=null&&(a(g(!0,s)),a(T(s)))},onEvent:(i,l)=>{if(s!=null)switch(i){case f.TASK_CREATED:{Q(l)?.parent_task_id===s&&(a(g(!0,s)),a(T(s)));break}case f.TASK_UPDATED:{const p=Q(l);if(p==null)break;p.task_id===s?(a(g(!0,s)),a(T(s))):p.parent_task_id===s&&a(T(s));break}case f.TASKS_BULK_UPDATED:{const p=H(l);if(p==null)break;p.task_ids.includes(s)&&a(g(!0,s)),a(T(s));break}case f.TASKS_BULK_DELETED:{const p=H(l);if(p==null)break;if(p.task_ids.includes(s)){a(oe({messageSection:"delete_task",messageText:"success",type:"success"})),d?.tenantEmailDomain!=null&&e(x(d.tenantEmailDomain));break}a(T(s));break}case f.TASK_SNOOZE_RESURFACED:{He(l)?.task_id===s&&a(g(!0,s));break}}}}),k.useEffect((()=>{h||N.fetchState==="Completed"||(S(!0),a(he()))}),[h,a,N.fetchState]),k.useEffect((()=>{K||z==="Completed"||(re(!0),a(Ie()))}),[K,a,z]);const le=k.useCallback((()=>{s!=null&&(C.current=!1,a(be([s],null,{isArchived:!1})),v(!0))}),[a,s]);k.useEffect((()=>{if($)if(w!=="In-Progress"){if(C.current){if(w==="Error")return v(!1),void(C.current=!1);if(w==="Completed"){v(!1),C.current=!1;const{tenantEmailDomain:i}=d;if(n.state?.message==="triggerBackClick"){const l=ie(n.state?.pathnameStackToGoBack);e(l.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:l.newStack}})}else{const l=x(i);e(l,{state:{pathnameStackToGoBack:U(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else C.current=!0}),[$,w,d,n,e]);const V=b((i=>ne(i,s))),A=V.fetchState,Z=_.getSignedInUser();if(Z==null)throw Error("Can't access task detail page without signing in...");if(A==="Error"&&V.error?.code===400){const{tenantEmailDomain:i}=d,l=x(i),p=U(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(pe,{to:l,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[A==="Completed"?r.jsx(Ke,{analytics:J,onLoad:i=>(l=>l.trackPageLoaded($e.Event.taskDetailPage))(i)}):null,r.jsxs(ea,{children:[r.jsx(Ze,{isAppContentDrawerOpen:R,handleDrawerToggle:i=>{B(i)}}),r.jsx(Ye,{analytics:J,currentTenant:d,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:m,location:n,loggedInUser:Z,navigate:e,taskGroupId:u,taskId:s,taskDetailFetchState:A,onUnarchiveTaskClick:le,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:E,isTaskCannedResponsesEnabled:D,isTaskRecurringParentEnabled:j,isTaskGroupAssigneesEnabled:y})]})]})}const ea=Oe.div`
1
+ import{j as r}from"./liveblocks-Dge8uQhE.js";import ue from"./NotFoundScreen-CXpw5ccb.js";import{a as k}from"./sentry-ConJlCAk.js";import{h as Y,u as ee,j as b,g as de,i as ke,N as pe,n as me,o as Se,p as I}from"./core-DslHP-Nt.js";import{Iw as ae,Iz as fe,It as Te,Uh as ge,e$ as te,Ui as se,IV as g,IN as T,Iq as he,Jp as Ie,Ji as be,Uj as ne,fD as oe,Uk as q,Im as Ee,Ij as De,r$ as Ce,rP as Ge,lj as Ue,IL as _e,Ul as Re,JC as we,IH as xe,J4 as je,J1 as ye,IC as Be,I_ as ve,IZ as Ae}from"./zeni-epic-state-COMt8QIe.js";import{z as _,db as Pe,x as Le,w as Fe,i as G,s as ie,v as U,A as Ke,f as J,h as $e,dc as Ne,m as M,au as ze}from"./index-Dg4tyRsb.js";import{n as Oe}from"./mui-DskYaYyd.js";import{u as Ve}from"./useInitialThreadRequest-3JvlSTXq.js";import{M as Ze}from"./MobileAppDrawer-DzJzSgT6.js";import{b as qe,a as Je,u as Me,T as f,t as He,c as H,d as Q,e as Qe}from"./TaskListScreen-Ba2VReu6.js";import"./recharts-BV1Rao9g.js";import"./analytics-Det0UZFe.js";import"./plaid-ajCcP-UI.js";import"./dnd-CQxwFT7m.js";import"./stripe-cKAAJElX.js";import"./lottie-JtX4it7w.js";import"./lexical-DYyincEg.js";import"./pdf-8n9gC55d.js";import"./utils-KyL5SnF3.js";import"./useAskAiCfoHostNavButtonProps-B4wJLWMn.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]="7e3dc458-f5b0-43ff-8f2f-01511c362618",e._sentryDebugIdIdentifier="sentry-dbid-7e3dc458-f5b0-43ff-8f2f-01511c362618")}catch{}})();function We(){const e=Y(),a=ee(),n=_.getSignedInUser(),{cannedResponses:c,fetchState:s,saveFetchState:u}=b((o=>o.cannedResponsesState)),d=k.useCallback((()=>{a(ae())}),[a]),m=k.useCallback(((o,E,D)=>{a(fe({name:o,content:E,cannedResponseId:D}))}),[a]),t=k.useCallback((o=>{a(Te({cannedResponseId:o}))}),[a]);if(n==null)throw Error("Can't access quick responses page without signing in...");return r.jsx(Pe,{cannedResponses:c,isLoading:s==="In-Progress"||s==="Not-Started",isSaving:u==="In-Progress",onBackClick:()=>e(-1),onDelete:t,onFetch:d,onSave:m})}const F=e=>e?.taskState?.taskByID,P=(e,a)=>{const n=F(e);if(a!=null&&n!=null)return n[a]?.parentTaskId??void 0},Xe=ge([P,(e,a)=>{const n=P(e,a),c=F(e);if(n!=null&&c!=null)return c[n]?.name},(e,a)=>{const n=P(e,a),c=F(e);return n!=null&&c!=null&&c[n]!=null}],((e,a,n)=>{if(e!=null&&n===!0)return{id:e,name:a??""}}));let W,X=[];const Ye=me((function(e,a){const{location:n,taskGroupId:c}=a,s=ne(e,a.taskId),u=te(e),d=Xe(e,a.taskId),m=s.taskGroupId??c,t=m!=null?q(e.taskGroupState,m):void 0,o=_.getSignedInUser(),E=u.tenantId,D={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:E??""},j=se(e),{tenantEmailDomain:y}=u,R=s.recurringSourceTaskId,B=R!=null?`${M.appUrl}/${y}/tasks/${encodeURIComponent(R)}`:void 0;var h;return{taskDetailSelectorView:s,authParams:D,isZeniUser:_.isZeniUser(),userGroupList:((h=e.userGroupsState.userGroupByUserGroupId)!==W&&(W=h,X=Object.values(h)),X),isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:ze.fileMicroServiceBaseUrl,companyName:a.currentTenant.companyName,companyId:a.currentTenant.companyId,currentUrl:`${M.appUrl}${a.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:B,tagListView:j,taskGroupName:m!=null&&t!=null&&t.isDefault===!1?t.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((S=>q(e.taskGroupState,S))).filter((S=>S!=null&&!S.isDeleted)).map((S=>({id:S.id,name:S.name,isDefault:S.isDefault}))),subtasks:s.subtasks,parentTaskRef:d,subTaskCreateStatus:e.taskDetailState?.subTaskCreateStatus?.fetchState}}),(function(e,a){const{taskId:n,navigate:c,currentTenant:s,location:u,taskGroupId:d}=a,{tenantEmailDomain:m}=s;return{onSaveChangesToLocalStore:t=>{e(Ae({taskDetailLocalData:t,taskId:n}))},onSaveDetailClick:t=>{e(ve(n,t??d))},onArchiveTaskClick:()=>{a.taskId!=null&&e(Be(a.taskId))},onSnoozeTask:(t,o)=>{e(ye(t,o))},onUnsnoozeTask:t=>{e(je(t))},onCreateSubtask:(t,o)=>{e(xe({...o,parentTaskId:t}))},onSubtaskUpdate:(t,o)=>{e(we({task:t,updates:o}))},onShowToast:t=>{e(oe(t))},onSubtaskRowClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:U(u.state?.pathnameStackToGoBack,u.pathname)}})},onParentBreadcrumbClick:t=>{c(`/${m}/tasks/${t}`,{state:{pathnameStackToGoBack:U(u.state?.pathnameStackToGoBack,u.pathname)}})},onDismissClick:()=>{if(u.state?.message==="triggerBackClick"){const t=ie(u.state?.pathnameStackToGoBack),o=t.poppedPathname??"../../dashboard";c(o,{state:{pathnameStackToGoBack:t.newStack}})}else{const t=x(m),o=U(u.state?.pathnameStackToGoBack,u.pathname);c(t,{state:{pathnameStackToGoBack:o}})}e(Re({taskId:n}))},onDeleteTaskClick:()=>{e(_e(n))},updateFilesEntity:t=>{e(Ue({files:t}))},onDeleteFile:t=>{e(Ge(t))},onEditFileName:(t,o)=>{e(Ce(t,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(g(!1,n))},onCreateTagClick:t=>{e(De(t,n))},onDeleteTagClick:t=>{e(Ee(t,n))},onFetchCannedResponses:()=>{e(ae())},onManageTemplatesClick:()=>{c(`/${s.tenantEmailDomain}/tasks/quick-responses`)}}}))(Ne);function L(){const e=Y(),a=ee(),n=de(),c=Le(),{taskId:s,taskGroupId:u}=ke(),d=b((i=>te(i))),m=Ve(d?.companyId),{useFeatureGate:t}=Fe(),{isFeatureEnabled:o}=t(G.isTaskSnoozeEnabled),{isFeatureEnabled:E}=t(G.isTaskVisibilityEnabled),{isFeatureEnabled:D}=t(G.isTaskCannedResponsesEnabled),{isFeatureEnabled:j}=t(G.isTaskRecurringParentEnabled),{isFeatureEnabled:y}=t(G.isTaskGroupAssigneesEnabled),[R,B]=k.useState(!1),[h,S]=k.useState(!1),[K,re]=k.useState(!1),[$,v]=k.useState(!1),C=k.useRef(!1),w=b((i=>i.taskListState.updateTasksFetchState.fetchState)),N=b((i=>se(i))),z=b((i=>i.taskGroupViewState.fetchState));k.useEffect((()=>{a(g(!1,s)),s!=null&&a(T(s))}),[a,s]);const O=_.getSignedInUser()?.userId,ce=k.useMemo((()=>{const i=[f.TASK_CREATED,f.TASK_UPDATED,f.TASKS_BULK_UPDATED,f.TASKS_BULK_DELETED],l=[...i,f.TASK_SNOOZE_RESURFACED];return[...qe(d?.tenantId,i),...Je(O,l)]}),[d?.tenantId,O]);Me({events:ce,onSubscribed:()=>{s!=null&&(a(g(!0,s)),a(T(s)))},onEvent:(i,l)=>{if(s!=null)switch(i){case f.TASK_CREATED:{Q(l)?.parent_task_id===s&&(a(g(!0,s)),a(T(s)));break}case f.TASK_UPDATED:{const p=Q(l);if(p==null)break;p.task_id===s?(a(g(!0,s)),a(T(s))):p.parent_task_id===s&&a(T(s));break}case f.TASKS_BULK_UPDATED:{const p=H(l);if(p==null)break;p.task_ids.includes(s)&&a(g(!0,s)),a(T(s));break}case f.TASKS_BULK_DELETED:{const p=H(l);if(p==null)break;if(p.task_ids.includes(s)){a(oe({messageSection:"delete_task",messageText:"success",type:"success"})),d?.tenantEmailDomain!=null&&e(x(d.tenantEmailDomain));break}a(T(s));break}case f.TASK_SNOOZE_RESURFACED:{He(l)?.task_id===s&&a(g(!0,s));break}}}}),k.useEffect((()=>{h||N.fetchState==="Completed"||(S(!0),a(he()))}),[h,a,N.fetchState]),k.useEffect((()=>{K||z==="Completed"||(re(!0),a(Ie()))}),[K,a,z]);const le=k.useCallback((()=>{s!=null&&(C.current=!1,a(be([s],null,{isArchived:!1})),v(!0))}),[a,s]);k.useEffect((()=>{if($)if(w!=="In-Progress"){if(C.current){if(w==="Error")return v(!1),void(C.current=!1);if(w==="Completed"){v(!1),C.current=!1;const{tenantEmailDomain:i}=d;if(n.state?.message==="triggerBackClick"){const l=ie(n.state?.pathnameStackToGoBack);e(l.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:l.newStack}})}else{const l=x(i);e(l,{state:{pathnameStackToGoBack:U(n.state?.pathnameStackToGoBack,n.pathname)}})}}}}else C.current=!0}),[$,w,d,n,e]);const V=b((i=>ne(i,s))),A=V.fetchState,Z=_.getSignedInUser();if(Z==null)throw Error("Can't access task detail page without signing in...");if(A==="Error"&&V.error?.code===400){const{tenantEmailDomain:i}=d,l=x(i),p=U(n.state?.pathnameStackToGoBack,n.pathname);return r.jsx(pe,{to:l,state:{pathnameStackToGoBack:p}})}return r.jsxs(r.Fragment,{children:[A==="Completed"?r.jsx(Ke,{analytics:J,onLoad:i=>(l=>l.trackPageLoaded($e.Event.taskDetailPage))(i)}):null,r.jsxs(ea,{children:[r.jsx(Ze,{isAppContentDrawerOpen:R,handleDrawerToggle:i=>{B(i)}}),r.jsx(Ye,{analytics:J,currentTenant:d,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:m,location:n,loggedInUser:Z,navigate:e,taskGroupId:u,taskId:s,taskDetailFetchState:A,onUnarchiveTaskClick:le,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:E,isTaskCannedResponsesEnabled:D,isTaskRecurringParentEnabled:j,isTaskGroupAssigneesEnabled:y})]})]})}const ea=Oe.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as t}from"./liveblocks-DJbBe3tc.js";import i from"./NotFoundScreen-0K6cd0N1.js";import{T as r}from"./TransactionDetailScreen-4CysuAHi.js";import"./sentry-C6T1HHHS.js";import{o as s,p as o}from"./core-BfWJ7zKT.js";import"./zeni-epic-state-kow6PLud.js";import"./recharts-DNnhB5R_.js";import"./index-DWJVmwhz.js";import"./mui-ts7KHm6i.js";import"./analytics-BP5D4JyB.js";import"./plaid-Cv0mPYlm.js";import"./dnd-tQgCG5z3.js";import"./stripe-cKAAJElX.js";import"./lottie-BaCgeYyk.js";import"./lexical-Bg8ldM3i.js";import"./pdf-C9HGpLCu.js";import"./utils-xWcqC4Wl.js";import"./useAskAiCfoHostNavButtonProps-DJm2npkG.js";import"./decodeURIComponentSafe-D2jiQ7Do.js";import"./routePaths-DqVKIcAE.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]="a4852925-22e4-4d6c-b9c0-7fe8ce24ec96",e._sentryDebugIdIdentifier="sentry-dbid-a4852925-22e4-4d6c-b9c0-7fe8ce24ec96")}catch{}})();function k(){return t.jsxs(s,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{k as default};
1
+ import{j as t}from"./liveblocks-Dge8uQhE.js";import i from"./NotFoundScreen-CXpw5ccb.js";import{T as r}from"./TransactionDetailScreen-CaGnx38Y.js";import"./sentry-ConJlCAk.js";import{o as s,p as o}from"./core-DslHP-Nt.js";import"./zeni-epic-state-COMt8QIe.js";import"./recharts-BV1Rao9g.js";import"./index-Dg4tyRsb.js";import"./mui-DskYaYyd.js";import"./analytics-Det0UZFe.js";import"./plaid-ajCcP-UI.js";import"./dnd-CQxwFT7m.js";import"./stripe-cKAAJElX.js";import"./lottie-JtX4it7w.js";import"./lexical-DYyincEg.js";import"./pdf-8n9gC55d.js";import"./utils-KyL5SnF3.js";import"./useAskAiCfoHostNavButtonProps-B4wJLWMn.js";import"./decodeURIComponentSafe-uhKYYVbR.js";import"./routePaths-DaHBcomz.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]="a4852925-22e4-4d6c-b9c0-7fe8ce24ec96",e._sentryDebugIdIdentifier="sentry-dbid-a4852925-22e4-4d6c-b9c0-7fe8ce24ec96")}catch{}})();function k(){return t.jsxs(s,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{k as default};