@zeniai/web-app-ui 5.0.68-qa → 5.0.69-qa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-1NXz8t4Q.js +1 -0
- package/dist/assets/{AddressScreen-2d2ovpiZ.js → AddressScreen-DcX4lc_F.js} +1 -1
- package/dist/assets/{AiCfoScreen-LLFGWtB2.js → AiCfoScreen-B-SD-BvW.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-Cngtnc1t.js → BillPayApprovalRoutes-Basd0KQv.js} +1 -1
- package/dist/assets/{BillPayRoutes-CMrCjkm3.js → BillPayRoutes-xwiyRCEj.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-Ck14gI3x.js → BusinessVerificationPageScreen-B-O4fGng.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-BlpW4les.js → ChargeCardRoutes-CZHJ2f3S.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-DsIgXQcl.js → CompanyPassportScreen-DMNbV7xV.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-Ba4cIzn3.js → ConnectionAuthScreen-DQHN7Yil.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-DWZf1W12.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-k4zdaFbp.js → CustomerOnboardingRoutes-DBczs8W1.js} +1 -1
- package/dist/assets/{DashboardRoutes-DQNi4Bls.js → DashboardRoutes-6tX_FJnK.js} +1 -1
- package/dist/assets/{DefaultTenantHome-DlneJXmh.js → DefaultTenantHome-gdhC8rFn.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-DlrlDnHx.js → DomesticWireDetailScreen-CwGd9Q26.js} +1 -1
- package/dist/assets/{DrawerScreen-C5kc-1KR.js → DrawerScreen-DApdgXsr.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-B6pJdYpn.js → EntityDetailRoutes-CGMIAqZF.js} +1 -1
- package/dist/assets/ExpenseAutomationRoutes-RczgWR48.js +25 -0
- package/dist/assets/{FeaturePreviewScreen-DfcTWDpe.js → FeaturePreviewScreen-DukdbkDU.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-7Kk-vZgW.js → MagicLinkRoutes-CJq_o8r6.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-CLVah6RB.js → MagicLinkSignInScreen-Cq-_I3N7.js} +1 -1
- package/dist/assets/{MobileAppDrawer-FuW2cx8a.js → MobileAppDrawer-B0SDRa0y.js} +1 -1
- package/dist/assets/NotFoundScreen-DnYi4Alo.js +1 -0
- package/dist/assets/{NotificationRoutes-kZE0n5II.js → NotificationRoutes-DE_b-rRI.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-MRpg6Yeq.js → OAuthConsentScreen-C4y7IeaO.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-DBStXMKI.js → PandLWithForecastRoutes-BegSQYJd.js} +1 -1
- package/dist/assets/{PeopleRoutes-DSZLNeqx.js → PeopleRoutes-CaRj4nPy.js} +1 -1
- package/dist/assets/{PerformanceRoutes-DtpdAAnW.js → PerformanceRoutes-BmdUlT3Y.js} +1 -1
- package/dist/assets/{Preview-DVbK_8TN.js → Preview-BzKmpY8q.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-HcQe0eGd.js → QBOConnectionScreen-H8Qvt38d.js} +1 -1
- package/dist/assets/{ReferralListScreen-DvrPT4g8.js → ReferralListScreen-Ih6wu8ZB.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-CCv3xLQT.js → ReimbursementApprovalRoutes-B07Q_12k.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Bei2xs0S.js → ReimbursementApprovalRuleDetailScreen-Cs1Oz67I.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-B-Sg6Hqq.js → ReimbursementRoutes-V4aVhNjv.js} +1 -1
- package/dist/assets/{ReportsRoutes-Dbi4SYIJ.js → ReportsRoutes-IDUQFhiX.js} +1 -1
- package/dist/assets/{RewardsRoutes-BMJQqTth.js → RewardsRoutes-DsoF8WDm.js} +1 -1
- package/dist/assets/{ScreenRoutes-DHRRpjB0.js → ScreenRoutes-q84xLWb1.js} +2 -2
- package/dist/assets/{SettingsRoutes-pHLO4SVh.js → SettingsRoutes-0j-n-7mu.js} +1 -1
- package/dist/assets/{SetupPagesScreen-BJApXgeQ.js → SetupPagesScreen-C4GjXjRP.js} +1 -1
- package/dist/assets/{SignInScreen-C0lNsIe4.js → SignInScreen-B6ywBnJ6.js} +1 -1
- package/dist/assets/{SignOutScreen-Bi-9EAnk.js → SignOutScreen-syLC8-ZX.js} +1 -1
- package/dist/assets/{TaskListScreen-QQkoAcfV.js → TaskListScreen-Ute_eU7l.js} +1 -1
- package/dist/assets/{TaskRoutes-C88qaxgI.js → TaskRoutes-BqaUB3X4.js} +1 -1
- package/dist/assets/TransactionDetailRoutes-RdDsGxG0.js +1 -0
- package/dist/assets/{TransactionDetailScreen-8mXHg0UY.js → TransactionDetailScreen-B71792qc.js} +1 -1
- package/dist/assets/{TransactionListRoutes-CX-Kc7E-.js → TransactionListRoutes-Blo9KvRe.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CJ7Oy-uL.js → TreasuryRoutes-D4_fryuU.js} +1 -1
- package/dist/assets/{VendorsRoutes-DIC-oUiR.js → VendorsRoutes-DKMnK28g.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-Jo50UPm3.js → WiseConfirmationScreen-iZmAunYq.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-Bjeduxw9.js → ZeniAccountRoutes-ByRr-Rvb.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-DutbAsuJ.js → ZeniAccountStatementScreen-DLzmrfoy.js} +1 -1
- package/dist/assets/{accountMappingHelper-QtwozoN5.js → accountMappingHelper-CbeIjSvu.js} +1 -1
- package/dist/assets/{analytics-DxyMm95L.js → analytics-CX30pJB4.js} +1 -1
- package/dist/assets/{analyticsHelper-Djzujhjh.js → analyticsHelper-SG8tB9jY.js} +1 -1
- package/dist/assets/{core-BFuZewo1.js → core-Chn6k0lm.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-GFuMfgir.js → decodeURIComponentSafe-B4WuQ5yM.js} +1 -1
- package/dist/assets/{dnd-mZw2LJiL.js → dnd-CKKgQZIG.js} +1 -1
- package/dist/assets/{empty-Bp3kP_ka.js → empty-BOUM9tFw.js} +1 -1
- package/dist/assets/{empty-k_XNQecn.js → empty-CM7hXaA6.js} +1 -1
- package/dist/assets/{emptyVideoElement-DkqeoE-M.js → emptyVideoElement-BB3xSIc2.js} +1 -1
- package/dist/assets/epic-CWSv6htf.js +2 -0
- package/dist/assets/{getLocaleForTenant-BjDLo9MD.js → getLocaleForTenant-j9oTpFdD.js} +1 -1
- package/dist/assets/{index-Bya5oAxf.js → index-BOIvqKof.js} +1 -1
- package/dist/assets/{index-DyQYRNiR.js → index-BreaiJNl.js} +7 -7
- package/dist/assets/{index-4iSF13bs.js → index-CAPfyPqh.js} +1 -1
- package/dist/assets/{index-fD_ZJJNS.js → index-Cyof-eFv.js} +1 -1
- package/dist/assets/{index-Ly4rr8Gt.js → index-D-iEs16m.js} +2 -2
- package/dist/assets/{index-CS3R_7Wp.js → index-Dswa3EzJ.js} +1 -1
- package/dist/assets/{index-u5Oc_Hut.js → index-qc05mnSq.js} +1 -1
- package/dist/assets/{index-BcBTxYRI.js → index-vkGyITuL.js} +1 -1
- package/dist/assets/{lexical-DGyy1g7u.js → lexical-CMmB3hg4.js} +1 -1
- package/dist/assets/{liveblocks-Dh2QAkHf.js → liveblocks-DuKOLlGn.js} +1 -1
- package/dist/assets/{lottie-DueJpsnD.js → lottie-BzC_z70r.js} +1 -1
- package/dist/assets/{mui-sjj8uXYx.js → mui-BKTsYfTF.js} +1 -1
- package/dist/assets/{pathToGoBack-CI2c4nh7.js → pathToGoBack-DuG_pESe.js} +1 -1
- package/dist/assets/{pdf-BDzUzBn8.js → pdf-DKctSUPl.js} +3 -3
- package/dist/assets/{pdf-lib-C3DJztgI.js → pdf-lib-CFnSeXgz.js} +1 -1
- package/dist/assets/{plaid-CvsW7WgG.js → plaid-BDw9fPCd.js} +1 -1
- package/dist/assets/{pusher-bE72k_fg.js → pusher-C3OEsBE6.js} +1 -1
- package/dist/assets/{react-BA6cfPHm.js → react-7DVU8bop.js} +1 -1
- package/dist/assets/{react-DazvgizP.js → react-CJKpxSUM.js} +1 -1
- package/dist/assets/{react-C2gtub8l.js → react-CyKriL-x.js} +1 -1
- package/dist/assets/{react-D9akfTfa.js → react-D6FwTuSW.js} +1 -1
- package/dist/assets/{react-CJsxDDv6.js → react-DX8ScWZU.js} +1 -1
- package/dist/assets/{react-CEHzE8fT.js → react-w6DB2NS-.js} +1 -1
- package/dist/assets/{recharts-Di30TSqm.js → recharts-DDgm0ZY-.js} +1 -1
- package/dist/assets/{routePaths-zFH_1U3e.js → routePaths-D5pZG1HW.js} +1 -1
- package/dist/assets/{sentry-DK3ab-Mk.js → sentry-8NyHUHYi.js} +1 -1
- package/dist/assets/{url-BrRDv2PY.js → url-Ch2k8kvj.js} +1 -1
- package/dist/assets/{url-Cw9gHNrq.js → url-KL9dl4eL.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-BBmaNftJ.js → useAskAiCfoHostNavButtonProps-Yc6V_8SE.js} +1 -1
- package/dist/assets/{useDeviceId-GTblrVdw.js → useDeviceId-EvuyeVv7.js} +1 -1
- package/dist/assets/{useFetchSuggestedQuestionsWhenReady-Cem1fO9j.js → useFetchSuggestedQuestionsWhenReady-Dl_AzQW_.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-ZTV3oo-i.js → useInitialThreadRequest-DWCinY7g.js} +1 -1
- package/dist/assets/{utils-DdXexb3v.js → utils-BgDKBMSG.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-Bd_ziiFV.js → withTransactionSidePanel-BxWHMEM-.js} +1 -1
- package/dist/assets/{zeni-epic-state-Bhb0JOZy.js → zeni-epic-state-CrPv4S-z.js} +5 -5
- package/dist/index.html +1 -1
- package/package.json +3 -3
- package/dist/assets/AddressRoutes-DaSOTLqQ.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-CD6W8O0B.js +0 -1
- package/dist/assets/ExpenseAutomationRoutes-CfsSexJs.js +0 -25
- package/dist/assets/NotFoundScreen-CLbpaFRJ.js +0 -1
- package/dist/assets/TransactionDetailRoutes-Ch1h2s4g.js +0 -1
- package/dist/assets/epic-CNC5mVA8.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-Dh2QAkHf.js";import{u as z,j as ye,h as Ce,l as ge,g as d,k as Se,n as we,o as G}from"./core-BFuZewo1.js";import{eO as L,f8 as S,J1 as Ie,jr as W,J2 as X,pJ as k,jf as Re,ii as Te,t6 as K,pO as Oe,bv as ke,J3 as Ae,bn as Fe,u5 as De,J4 as je,J5 as Ee,s_ as Pe,J6 as H,J7 as Le,J8 as Me,J9 as Be,Ja as Je,Jb as w,Jc as A,Jd as F,Je as Y,Jf as D,Jg as j,dC as ve,tN as Ue,tB as N,tC as $,tT as Ve,tG as q,tZ as xe,Jh as ze,Ji as Ge,Jj as He,Jk as Ye,Jl as Ne,eU as $e,eS as qe}from"./zeni-epic-state-Bhb0JOZy.js";import{Q as Ze,R as Qe,Z as We,C as ee,$ as E,z as ae,U as Xe,I as Ke,a as ea,x as aa,c as P,f as sa,s as se,V as ta,W as oa,X as na}from"./index-DyQYRNiR.js";import"./mui-sjj8uXYx.js";import ra from"./NotFoundScreen-CLbpaFRJ.js";import{F as ia}from"./FeaturePreviewScreen-DfcTWDpe.js";import{a as _}from"./sentry-DK3ab-Mk.js";import{u as la,a as ca,b as da,c as pa}from"./useFetchSuggestedQuestionsWhenReady-Cem1fO9j.js";import{u as fa}from"./useInitialThreadRequest-ZTV3oo-i.js";import{t as Z,a as Q}from"./routePaths-zFH_1U3e.js";import{M as ma}from"./MobileAppDrawer-FuW2cx8a.js";import"./recharts-Di30TSqm.js";import"./analytics-DxyMm95L.js";import"./plaid-CvsW7WgG.js";import"./dnd-mZw2LJiL.js";import"./stripe-DMRn4zHo.js";import"./lottie-DueJpsnD.js";import"./lexical-DGyy1g7u.js";import"./pdf-BDzUzBn8.js";import"./utils-DdXexb3v.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]="27467195-26b8-47e9-9ffa-3961ec37c4a8",e._sentryDebugIdIdentifier="sentry-dbid-27467195-26b8-47e9-9ffa-3961ec37c4a8")}catch{}})();const ua=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(F({resetLeftScroll:!0})),e(A({resetLeftScroll:!0}))},_a=e=>{e(Ge()),e(He()),e(Ye()),e(Ne())},ha=Se(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=S(e),r=Ae(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:P,isZeniUser:Fe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:W(e),isAccountingProjectsEnabled:X(e),currentTenantCompanyName:a,statementEndPoint:`${na}/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(ze(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(xe(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;let i=[...m];a==="year"&&(i=i.filter(C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year")),e(N(o.firstMonthOfFY,r,l.numberOfPeriods<1?1:l.numberOfPeriods,i)),m.length>0&&e($(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<1?1:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(w(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(q({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(H({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(q(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(Ve(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(N(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e($(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,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=ve(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return Q(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(l,{state:{pathnameStackToGoBack:i,referrer:I(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(j({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(Y({scrollPosition:s}));break;case"balance_sheet":e(F({scrollPosition:s}));break;case"cash_flow":e(A({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(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(Je({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",I(o.selectedReportID)),e(w("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",I(o.selectedReportID)),e(w("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",I(o.selectedReportID)),e(w("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Me({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(H({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(K())},onUpdateDisplayOrder:a=>{e(Ee(a))},onUpdateReportFormat:a=>{_a(e),e(je(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ta);function ba(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Qe(),f=We(),u=oa(f),a=ye(),s=Ce(),t=z(),{tenantEmailDomain:r}=ge(),{useFeatureGate:c}=ee(),{isFeatureEnabled:m}=c(E.isReportsHorizontalClassLayoutSwitchEnabled),l=ae.getSignedInUser(),[i,C]=_.useState(!1),[M,te]=_.useState(!1),{isFeatureEnabled:B}=c(E.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const J=d(n=>L(n)),oe=J.company?.companyInfo.firstMonthOfFY??1,ne=fa(B?J?.companyId:void 0),g=d(n=>S(n).fetchState),re=d(n=>Ie(n)),{areTenantIdsInSync:h}=Xe(),R=d(n=>n.financeStatementState.selectedReportId),v=d(n=>W(n)),T=d(n=>X(n)),ie=d(n=>S(n).isCompareModeOn),b=d(n=>S(n).filter),O=d(n=>S(n).selectedReportAndTimeframeFetchState),le=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(C(!0),s(k(l.userId,!0,!0,!1)))},[i,l,s,h]),_.useEffect(()=>{i&&!M&&g==="Completed"&&h&&(s(k(l.userId,!1,!0,!1)),te(!0))},[i,M,g,h]),_.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(b.timeframe));break;case"profit_and_loss_by_projects":T&&s(K());break;case"balance_sheet":s(Te(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,O,h,v,T]);const U=Ke(),ce=U?.loggedInUserRole!=null&&ke(U?.loggedInUserRole)!==!0,[de,pe]=_.useState(!1),V=n=>{pe(n)},fe=ea(),me=da();return function(n){const{isDataReady:ue}=n,{pathname:_e}=z(),x=Ze(_e??"")==="reports",he=la(ue),be=_.useMemo(()=>x?ua:void 0,[x]);ca({canFetchSuggestedQuestions:he,pageContexts:be})}({isDataReady:g==="Completed"}),pa({isDataReady:g==="Completed"}),p.jsxs(p.Fragment,{children:[g==="Completed"?p.jsx(aa,{analytics:P,onLoad:n=>n.trackPageLoaded(sa.Event.reports)}):null,p.jsx(ma,{isAppContentDrawerOpen:de,handleDrawerToggle:V}),p.jsx(ha,{firstMonthOfFY:oe,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:le,selectedReportID:R,analytics:P,filter:b,isAccountingClassesEnabled:v,isAccountingProjectsEnabled:T,isCompareModeOn:ie,hasTransactionAccess:ce,signedInUser:l,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:V,reportsResyncFetchState:re.reportsResyncFetchState,isAiCfoAccessEnabled:me&&fe&&!e,onAskAiCfoClick:()=>{if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:ne})]})}const I=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 Ua(){const e=d(s=>L(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(E.isDebitCardFeatureEnabled),u=$e(f,e),a=qe(e);return u===!0||a===!0?p.jsx(ia,{}):p.jsxs(we,{children:[p.jsx(G,{path:"/",element:p.jsx(ba,{})}),p.jsx(G,{path:"*",element:p.jsx(ra,{})})]})}export{Ua as default};
|
|
1
|
+
import{j as p}from"./liveblocks-DuKOLlGn.js";import{u as z,j as ye,h as Ce,l as ge,g as d,k as Se,n as we,o as G}from"./core-Chn6k0lm.js";import{eO as L,f8 as S,J1 as Ie,jr as W,J2 as X,pJ as k,jf as Re,ii as Te,t6 as K,pO as Oe,bv as ke,J3 as Ae,bn as Fe,u5 as De,J4 as je,J5 as Ee,s_ as Pe,J6 as H,J7 as Le,J8 as Me,J9 as Be,Ja as Je,Jb as w,Jc as A,Jd as F,Je as Y,Jf as D,Jg as j,dC as ve,tN as Ue,tB as N,tC as $,tT as Ve,tG as q,tZ as xe,Jh as ze,Ji as Ge,Jj as He,Jk as Ye,Jl as Ne,eU as $e,eS as qe}from"./zeni-epic-state-CrPv4S-z.js";import{Q as Ze,R as Qe,Z as We,C as ee,$ as E,z as ae,U as Xe,I as Ke,a as ea,x as aa,c as P,f as sa,s as se,V as ta,W as oa,X as na}from"./index-BreaiJNl.js";import"./mui-BKTsYfTF.js";import ra from"./NotFoundScreen-DnYi4Alo.js";import{F as ia}from"./FeaturePreviewScreen-DukdbkDU.js";import{a as _}from"./sentry-8NyHUHYi.js";import{u as la,a as ca,b as da,c as pa}from"./useFetchSuggestedQuestionsWhenReady-Dl_AzQW_.js";import{u as fa}from"./useInitialThreadRequest-DWCinY7g.js";import{t as Z,a as Q}from"./routePaths-D5pZG1HW.js";import{M as ma}from"./MobileAppDrawer-B0SDRa0y.js";import"./recharts-DDgm0ZY-.js";import"./analytics-CX30pJB4.js";import"./plaid-BDw9fPCd.js";import"./dnd-CKKgQZIG.js";import"./stripe-DMRn4zHo.js";import"./lottie-BzC_z70r.js";import"./lexical-CMmB3hg4.js";import"./pdf-DKctSUPl.js";import"./utils-BgDKBMSG.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]="27467195-26b8-47e9-9ffa-3961ec37c4a8",e._sentryDebugIdIdentifier="sentry-dbid-27467195-26b8-47e9-9ffa-3961ec37c4a8")}catch{}})();const ua=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(F({resetLeftScroll:!0})),e(A({resetLeftScroll:!0}))},_a=e=>{e(Ge()),e(He()),e(Ye()),e(Ne())},ha=Se(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=S(e),r=Ae(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:P,isZeniUser:Fe(o),showAccountGroups:r===!0,isAccountingClassesEnabled:W(e),isAccountingProjectsEnabled:X(e),currentTenantCompanyName:a,statementEndPoint:`${na}/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(ze(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(xe(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;let i=[...m];a==="year"&&(i=i.filter(C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year")),e(N(o.firstMonthOfFY,r,l.numberOfPeriods<1?1:l.numberOfPeriods,i)),m.length>0&&e($(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<1?1:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>y(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(w(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(q({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(H({classViewLayout:"vertical"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(q(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(Ve(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(N(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e($(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,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=ve(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return Q(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?Z(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(l,{state:{pathnameStackToGoBack:i,referrer:I(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(j({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(Y({scrollPosition:s}));break;case"balance_sheet":e(F({scrollPosition:s}));break;case"cash_flow":e(A({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(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(F({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(Je({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",I(o.selectedReportID)),e(w("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",I(o.selectedReportID)),e(w("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",I(o.selectedReportID)),e(w("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Me({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Le({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(H({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(K())},onUpdateDisplayOrder:a=>{e(Ee(a))},onUpdateReportFormat:a=>{_a(e),e(je(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ta);function ba(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Qe(),f=We(),u=oa(f),a=ye(),s=Ce(),t=z(),{tenantEmailDomain:r}=ge(),{useFeatureGate:c}=ee(),{isFeatureEnabled:m}=c(E.isReportsHorizontalClassLayoutSwitchEnabled),l=ae.getSignedInUser(),[i,C]=_.useState(!1),[M,te]=_.useState(!1),{isFeatureEnabled:B}=c(E.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const J=d(n=>L(n)),oe=J.company?.companyInfo.firstMonthOfFY??1,ne=fa(B?J?.companyId:void 0),g=d(n=>S(n).fetchState),re=d(n=>Ie(n)),{areTenantIdsInSync:h}=Xe(),R=d(n=>n.financeStatementState.selectedReportId),v=d(n=>W(n)),T=d(n=>X(n)),ie=d(n=>S(n).isCompareModeOn),b=d(n=>S(n).filter),O=d(n=>S(n).selectedReportAndTimeframeFetchState),le=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(C(!0),s(k(l.userId,!0,!0,!1)))},[i,l,s,h]),_.useEffect(()=>{i&&!M&&g==="Completed"&&h&&(s(k(l.userId,!1,!0,!1)),te(!0))},[i,M,g,h]),_.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(b.timeframe));break;case"profit_and_loss_by_projects":T&&s(K());break;case"balance_sheet":s(Te(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,O,h,v,T]);const U=Ke(),ce=U?.loggedInUserRole!=null&&ke(U?.loggedInUserRole)!==!0,[de,pe]=_.useState(!1),V=n=>{pe(n)},fe=ea(),me=da();return function(n){const{isDataReady:ue}=n,{pathname:_e}=z(),x=Ze(_e??"")==="reports",he=la(ue),be=_.useMemo(()=>x?ua:void 0,[x]);ca({canFetchSuggestedQuestions:he,pageContexts:be})}({isDataReady:g==="Completed"}),pa({isDataReady:g==="Completed"}),p.jsxs(p.Fragment,{children:[g==="Completed"?p.jsx(aa,{analytics:P,onLoad:n=>n.trackPageLoaded(sa.Event.reports)}):null,p.jsx(ma,{isAppContentDrawerOpen:de,handleDrawerToggle:V}),p.jsx(ha,{firstMonthOfFY:oe,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:le,selectedReportID:R,analytics:P,filter:b,isAccountingClassesEnabled:v,isAccountingProjectsEnabled:T,isCompareModeOn:ie,hasTransactionAccess:ce,signedInUser:l,selectedReportAndTimeframeFetchState:O,handleDrawerToggle:V,reportsResyncFetchState:re.reportsResyncFetchState,isAiCfoAccessEnabled:me&&fe&&!e,onAskAiCfoClick:()=>{if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:ne})]})}const I=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 Ua(){const e=d(s=>L(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(E.isDebitCardFeatureEnabled),u=$e(f,e),a=qe(e);return u===!0||a===!0?p.jsx(ia,{}):p.jsxs(we,{children:[p.jsx(G,{path:"/",element:p.jsx(ba,{})}),p.jsx(G,{path:"*",element:p.jsx(ra,{})})]})}export{Ua as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-DuKOLlGn.js";import{C as j,z as w,aK as y,x as I,c as p,f as F,cG as P,$ as L}from"./index-BreaiJNl.js";import"./mui-BKTsYfTF.js";import l from"./NotFoundScreen-DnYi4Alo.js";import{a as u}from"./sentry-8NyHUHYi.js";import{h as T,g as x,j as V,u as A,k as R,n as U,o as f}from"./core-Chn6k0lm.js";import{eO as z,PD as C,Mt as G,PE as _,ts as O,e_ as Y,PF as q,tq as K}from"./zeni-epic-state-CrPv4S-z.js";import{R as b}from"./ReferralListScreen-Ih6wu8ZB.js";import"./recharts-DDgm0ZY-.js";import"./analytics-CX30pJB4.js";import"./plaid-BDw9fPCd.js";import"./dnd-CKKgQZIG.js";import"./stripe-DMRn4zHo.js";import"./lottie-BzC_z70r.js";import"./lexical-CMmB3hg4.js";import"./pdf-DKctSUPl.js";import"./utils-BgDKBMSG.js";import"./useAskAiCfoHostNavButtonProps-Yc6V_8SE.js";import"./useFetchSuggestedQuestionsWhenReady-Dl_AzQW_.js";import"./MobileAppDrawer-B0SDRa0y.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]="a1f85e83-3092-4466-86b2-8eea56e867f6",e._sentryDebugIdIdentifier="sentry-dbid-a1f85e83-3092-4466-86b2-8eea56e867f6")}catch{}})();const M=R(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,i=w.getSignedInUser();return{onDismissClick:()=>{e(_()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(K())},onUpdateInviteFormLocalData:s=>{e(q({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(P),$=()=>{const e=T(),[t,n]=u.useState(!1),[i,s]=u.useState(!1),r=x(o=>z(o)),c=V(),D=A(),{useDynamicConfig:g}=j(),d=w.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const m=x(o=>C(o)),k=d?.firstName!=null?d.firstName:"User",{configValue:h}=g(y.zeniCardsConfig),{configValue:v}=g(y.zeniAccountsConfig),N=G(v);u.useEffect(()=>{e(_()),r?.rewardsLastViewedTime==null&&i===!1&&(e(O()),s(!0))},[]),u.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(Y(!0)))},[m.fetchState,e]);const S=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(I,{analytics:p,onLoad:o=>(E=>E.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,a.jsx(M,{navigate:c,location:D,currentTenant:r,companyName:S,userName:k,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:N.maxAnnualPercentageYield})]})};function de(){const{useFeatureGate:e}=j(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(f,{path:"/",element:t?a.jsx(b,{}):a.jsx(l,{})}),a.jsx(f,{path:"how-it-works",element:t?a.jsx(b,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(f,{path:"refer/*",element:t?a.jsx($,{}):a.jsx(l,{})}),a.jsx(f,{path:"*",element:a.jsx(l,{})})]})}export{de as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-
|
|
2
|
-
import{_ as n,bn as os,eO as ls,eU as cs,eS as ds,eT as ms,fD as us,eQ as _s,cP as Ee,cw as Es,f9 as As,co as ps,bD as Is,bq as gs,fe as xs,v as Ts,IB as hs,bv as js,IC as Us,bF as Ds,fb as Hs,bE as bs,bs as Rs,ck as ys,ID as fs,IE as Cs,cM as vs,cO as Os,cN as Ps,cv as Fs,cB as Ls,mm as Ae,eP as pe,fN as Bs,fi as Ie,fK as ge,fL as xe,fj as ks}from"./zeni-epic-state-Bhb0JOZy.js";import{j as e}from"./liveblocks-Dh2QAkHf.js";import{a as v}from"./sentry-DK3ab-Mk.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as z,i as Te,N as c,n as Zs,o as t}from"./core-BFuZewo1.js";import{m as ws,u as zs,z as H,C as $s,a as Gs,o as Ys,$ as L,I as qs,L as B,D as he,t as _,P as Ws,c as X,l}from"./index-DyQYRNiR.js";import"./mui-sjj8uXYx.js";import{f as je}from"./analyticsHelper-Djzujhjh.js";import{t as Ks}from"./getLocaleForTenant-BjDLo9MD.js";import"./recharts-Di30TSqm.js";import"./analytics-DxyMm95L.js";import"./plaid-CvsW7WgG.js";import"./dnd-mZw2LJiL.js";import"./stripe-DMRn4zHo.js";import"./lottie-DueJpsnD.js";import"./lexical-DGyy1g7u.js";import"./pdf-BDzUzBn8.js";import"./utils-DdXexb3v.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="728c31a7-27bc-4c6e-9d50-67ef7fd9a727",i._sentryDebugIdIdentifier="sentry-dbid-728c31a7-27bc-4c6e-9d50-67ef7fd9a727")}catch{}})();const Qs={dashboard:()=>n(()=>import("./DashboardRoutes-DQNi4Bls.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:()=>n(()=>import("./BillPayRoutes-CMrCjkm3.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-B-Sg6Hqq.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20])),transactions:()=>n(()=>import("./TransactionListRoutes-CX-Kc7E-.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>n(()=>import("./SettingsRoutes-pHLO4SVh.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>n(()=>import("./ReportsRoutes-Dbi4SYIJ.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-BlpW4les.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>n(()=>import("./PeopleRoutes-DSZLNeqx.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-CfsSexJs.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>n(()=>import("./TreasuryRoutes-CJ7Oy-uL.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>n(()=>import("./VendorsRoutes-DIC-oUiR.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-Bjeduxw9.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Js=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>n(()=>import("./ReportsRoutes-Dbi4SYIJ.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),en=l(()=>n(()=>import("./AddressRoutes-DaSOTLqQ.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sn=l(()=>n(()=>import("./PeopleRoutes-DSZLNeqx.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-DBStXMKI.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-k4zdaFbp.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),tn=l(()=>n(()=>import("./VendorsRoutes-DIC-oUiR.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-Ch1h2s4g.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-B6pJdYpn.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),on=l(()=>n(()=>import("./DashboardRoutes-DQNi4Bls.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(()=>n(()=>import("./BillPayRoutes-CMrCjkm3.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),ln=l(()=>n(()=>import("./SettingsRoutes-pHLO4SVh.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),He=l(()=>n(()=>import("./ReimbursementRoutes-B-Sg6Hqq.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-Bjeduxw9.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),dn=l(()=>n(()=>import("./TreasuryRoutes-CJ7Oy-uL.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),mn=l(()=>n(()=>import("./TransactionListRoutes-CX-Kc7E-.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),un=l(()=>n(()=>import("./ChargeCardRoutes-BlpW4les.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),_n=l(()=>n(()=>import("./NotificationRoutes-kZE0n5II.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),En=l(()=>n(()=>import("./PerformanceRoutes-DtpdAAnW.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),An=l(()=>n(()=>import("./ExpenseAutomationRoutes-CfsSexJs.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),pn=l(()=>n(()=>import("./RewardsRoutes-BMJQqTth.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),In=l(()=>n(()=>import("./TaskRoutes-C88qaxgI.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),gn=l(()=>n(()=>import("./AiCfoScreen-LLFGWtB2.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),y=l(()=>n(()=>import("./NotFoundScreen-CLbpaFRJ.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),xn=l(()=>n(()=>import("./TaskListScreen-QQkoAcfV.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=zs(),R=H.getSignedInUserTenant(o)?.tenantId,h=H.getSignedInUser(),K=os(h),$=Ms(),[N,Re]=v.useState(!1),r=z(a=>ls(a)),{useFeatureGate:P}=$s(),Q=Gs(),ye=Ys(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&K,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=z(a=>a.tenantState.fetchState),A=z(a=>a.tenantState.activeTenantFetchState.fetchState),u=A==="Completed"||j==="Completed"?cs(se,r):void 0,G=A==="Completed"||j==="Completed"?ds(r):void 0,Le=A==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!G||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),Y=z(a=>us(a));if(o!=null){const a=H.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:R,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),E=qs(),Se=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=Es(E?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,J=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(a=>w.tenantId!=null?As(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(J!=null&&R!=null){const a=J.params.selectedPeriod;if(a!=null){const D=a.split("-");if(D.length===2){const d=ps(Number(D[0])),s=Number(D[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=gs();m.isAfter(M,"month")===!1?U(xs(R,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[J,R]),v.useEffect(()=>{N||(Re(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&H.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,D,d,s){if(pe(D?.userId,D?.zeniSessionId,a.tenantId),d(Bs(!0)),d(Ie(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=H.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(Ks(s)),m?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,H]),v.useEffect(()=>{H.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,D,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const q=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(q&&ts){k(Ie(s));const W=H.getSignedInUserTenantWithId(s);W?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(W?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)))}else q&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),q&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)));if(q){X.identify(m.userId,{tenant_id:s});const W=s==null||s!=null&&(D==="Completed"||D==="Error");a==="Completed"||D!=="Not-Started"&&D!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ae(m.userId,m.zeniSessionId)))}}(j,A,r,R,h,f,U))},[R,A]),v.useEffect(()=>{H.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),H.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{A==="In-Progress"&&f(B.TENANT_FETCHING),A!=="Completed"&&A!=="Error"||(A==="Completed"&&R!=null?(O(),_.markActiveTenantFetchCompleted(R)):A==="Error"&&R!=null&&(_.markActiveTenantFetchFailed(R),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[A,j,R,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&A==="Completed"&&N&&(ie.current=!0,function(a=Js,D=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Qs[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},D)}())},[A,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ee(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,$e=Us(E?.loggedInUserRoleMap),Ge=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&Ds(E?.loggedInUserRoleMap),me=Oe&&!C,Ye=r.company!=null&&Hs(r.company),qe=Pe&&Ye===!0&&!C,We=re&&bs(E?.loggedInUserRoleMap),Ke=oe&&Rs(E?.loggedInUserRoleMap),Qe=me&&ys(E?.loggedInUserRoleMap),Je=fs(E?.loggedInUserRoleMap),Xe=Cs(E?.loggedInUserRoleMap),p=vs(E?.loggedInUserRoleMap),I=Os(E?.loggedInUserRoleMap),g=Ps(E?.loggedInUserRoleMap),x=Fs(E?.loggedInUserRoleMap),T=Ls(E?.loggedInUserRoleMap),ue=re&&x,_e=ce&&T,es=me&&p,ss=qe&&I,ns=oe&&g,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||$e===!0||Je===!0||Xe===!0;return H.isSignedIn()?R==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ae(h.userId,h.zeniSessionId)),null):A!=="In-Progress"&&A!=="Not-Started"||j==="Completed"?(le===!0||K&&!te)&&Ge===!1&&u===!1&&G===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||K?N&&r?.userRole&&u!=null&&G!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(Ws,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:G})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||ze?e.jsx(rn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(xn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(In,{})}),e.jsx(t,{path:"address/*",element:We||de||Qe||Ke?e.jsx(en,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(En,{}):e.jsx(be,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(An,{}):e.jsx(be,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(De,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(De,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(He,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(He,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Q?e.jsx(gn,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const Tn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),b=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(Dn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Hn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Dn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),be=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{b as FallBackRoute,wn as default};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-6tX_FJnK.js","assets/sentry-8NyHUHYi.js","assets/core-Chn6k0lm.js","assets/zeni-epic-state-CrPv4S-z.js","assets/index-BreaiJNl.js","assets/mui-BKTsYfTF.js","assets/analytics-CX30pJB4.js","assets/utils-BgDKBMSG.js","assets/withTransactionSidePanel-BxWHMEM-.js","assets/useAskAiCfoHostNavButtonProps-Yc6V_8SE.js","assets/useFetchSuggestedQuestionsWhenReady-Dl_AzQW_.js","assets/TransactionDetailScreen-B71792qc.js","assets/decodeURIComponentSafe-B4WuQ5yM.js","assets/routePaths-D5pZG1HW.js","assets/NotFoundScreen-DnYi4Alo.js","assets/analyticsHelper-SG8tB9jY.js","assets/CompanyPassportScreen-DMNbV7xV.js","assets/MobileAppDrawer-B0SDRa0y.js","assets/FeaturePreviewScreen-DukdbkDU.js","assets/ReferralListScreen-Ih6wu8ZB.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-xwiyRCEj.js","assets/AddressScreen-DcX4lc_F.js","assets/DomesticWireDetailScreen-CwGd9Q26.js","assets/useInitialThreadRequest-DWCinY7g.js","assets/DrawerScreen-DApdgXsr.js","assets/SetupPagesScreen-C4GjXjRP.js","assets/BusinessVerificationPageScreen-B-O4fGng.js","assets/BillPayApprovalRoutes-Basd0KQv.js","assets/ReimbursementApprovalRuleDetailScreen-Cs1Oz67I.js","assets/getLocaleForTenant-j9oTpFdD.js","assets/ReimbursementRoutes-V4aVhNjv.js","assets/ReimbursementApprovalRoutes-B07Q_12k.js","assets/TransactionListRoutes-Blo9KvRe.js","assets/ZeniAccountStatementScreen-DLzmrfoy.js","assets/SettingsRoutes-0j-n-7mu.js","assets/accountMappingHelper-CbeIjSvu.js","assets/QBOConnectionScreen-H8Qvt38d.js","assets/empty-CM7hXaA6.js","assets/index-Cyof-eFv.js","assets/url-KL9dl4eL.js","assets/index-vkGyITuL.js","assets/ReportsRoutes-IDUQFhiX.js","assets/ChargeCardRoutes-CZHJ2f3S.js","assets/PeopleRoutes-CaRj4nPy.js","assets/ExpenseAutomationRoutes-RczgWR48.js","assets/TreasuryRoutes-D4_fryuU.js","assets/VendorsRoutes-DKMnK28g.js","assets/pathToGoBack-DuG_pESe.js","assets/ZeniAccountRoutes-ByRr-Rvb.js","assets/AddressRoutes-1NXz8t4Q.js","assets/PandLWithForecastRoutes-BegSQYJd.js","assets/CustomerOnboardingRoutes-DBczs8W1.js","assets/TransactionDetailRoutes-RdDsGxG0.js","assets/EntityDetailRoutes-CGMIAqZF.js","assets/NotificationRoutes-DE_b-rRI.js","assets/PerformanceRoutes-BmdUlT3Y.js","assets/RewardsRoutes-DsoF8WDm.js","assets/TaskRoutes-BqaUB3X4.js","assets/TaskListScreen-Ute_eU7l.js","assets/AiCfoScreen-B-SD-BvW.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as n,bn as os,eO as ls,eU as cs,eS as ds,eT as ms,fD as us,eQ as _s,cP as Ee,cw as Es,f9 as As,co as ps,bD as Is,bq as gs,fe as xs,v as Ts,IB as hs,bv as js,IC as Us,bF as Ds,fb as Hs,bE as bs,bs as Rs,ck as ys,ID as fs,IE as Cs,cM as vs,cO as Os,cN as Ps,cv as Fs,cB as Ls,mm as Ae,eP as pe,fN as Bs,fi as Ie,fK as ge,fL as xe,fj as ks}from"./zeni-epic-state-CrPv4S-z.js";import{j as e}from"./liveblocks-DuKOLlGn.js";import{a as v}from"./sentry-8NyHUHYi.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as z,i as Te,N as c,n as Zs,o as t}from"./core-Chn6k0lm.js";import{m as ws,u as zs,z as H,C as $s,a as Gs,o as Ys,$ as L,I as qs,L as B,D as he,t as _,P as Ws,c as X,l}from"./index-BreaiJNl.js";import"./mui-BKTsYfTF.js";import{f as je}from"./analyticsHelper-SG8tB9jY.js";import{t as Ks}from"./getLocaleForTenant-j9oTpFdD.js";import"./recharts-DDgm0ZY-.js";import"./analytics-CX30pJB4.js";import"./plaid-BDw9fPCd.js";import"./dnd-CKKgQZIG.js";import"./stripe-DMRn4zHo.js";import"./lottie-BzC_z70r.js";import"./lexical-CMmB3hg4.js";import"./pdf-DKctSUPl.js";import"./utils-BgDKBMSG.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="728c31a7-27bc-4c6e-9d50-67ef7fd9a727",i._sentryDebugIdIdentifier="sentry-dbid-728c31a7-27bc-4c6e-9d50-67ef7fd9a727")}catch{}})();const Qs={dashboard:()=>n(()=>import("./DashboardRoutes-6tX_FJnK.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:()=>n(()=>import("./BillPayRoutes-xwiyRCEj.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-V4aVhNjv.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20])),transactions:()=>n(()=>import("./TransactionListRoutes-Blo9KvRe.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>n(()=>import("./SettingsRoutes-0j-n-7mu.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>n(()=>import("./ReportsRoutes-IDUQFhiX.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-CZHJ2f3S.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>n(()=>import("./PeopleRoutes-CaRj4nPy.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-RczgWR48.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>n(()=>import("./TreasuryRoutes-D4_fryuU.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>n(()=>import("./VendorsRoutes-DKMnK28g.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-ByRr-Rvb.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Js=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>n(()=>import("./ReportsRoutes-IDUQFhiX.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),en=l(()=>n(()=>import("./AddressRoutes-1NXz8t4Q.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sn=l(()=>n(()=>import("./PeopleRoutes-CaRj4nPy.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-BegSQYJd.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-DBczs8W1.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),tn=l(()=>n(()=>import("./VendorsRoutes-DKMnK28g.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-RdDsGxG0.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-CGMIAqZF.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),on=l(()=>n(()=>import("./DashboardRoutes-6tX_FJnK.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(()=>n(()=>import("./BillPayRoutes-xwiyRCEj.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),ln=l(()=>n(()=>import("./SettingsRoutes-0j-n-7mu.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),He=l(()=>n(()=>import("./ReimbursementRoutes-V4aVhNjv.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-ByRr-Rvb.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),dn=l(()=>n(()=>import("./TreasuryRoutes-D4_fryuU.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),mn=l(()=>n(()=>import("./TransactionListRoutes-Blo9KvRe.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),un=l(()=>n(()=>import("./ChargeCardRoutes-CZHJ2f3S.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),_n=l(()=>n(()=>import("./NotificationRoutes-DE_b-rRI.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),En=l(()=>n(()=>import("./PerformanceRoutes-BmdUlT3Y.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),An=l(()=>n(()=>import("./ExpenseAutomationRoutes-RczgWR48.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),pn=l(()=>n(()=>import("./RewardsRoutes-DsoF8WDm.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),In=l(()=>n(()=>import("./TaskRoutes-BqaUB3X4.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),gn=l(()=>n(()=>import("./AiCfoScreen-B-SD-BvW.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),y=l(()=>n(()=>import("./NotFoundScreen-DnYi4Alo.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),xn=l(()=>n(()=>import("./TaskListScreen-Ute_eU7l.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=zs(),R=H.getSignedInUserTenant(o)?.tenantId,h=H.getSignedInUser(),K=os(h),$=Ms(),[N,Re]=v.useState(!1),r=z(a=>ls(a)),{useFeatureGate:P}=$s(),Q=Gs(),ye=Ys(),{isFeatureEnabled:fe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||fe&&K,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=z(a=>a.tenantState.fetchState),A=z(a=>a.tenantState.activeTenantFetchState.fetchState),u=A==="Completed"||j==="Completed"?cs(se,r):void 0,G=A==="Completed"||j==="Completed"?ds(r):void 0,Le=A==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!G||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),Y=z(a=>us(a));if(o!=null){const a=H.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:R,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),E=qs(),Se=r.company==null||E?.loggedInUserRoleMap!=null&&Ee(E.loggedInUserRole),Ne=Es(E?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,J=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(a=>w.tenantId!=null?As(a,w.tenantId):void 0);v.useEffect(()=>{f(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(J!=null&&R!=null){const a=J.params.selectedPeriod;if(a!=null){const D=a.split("-");if(D.length===2){const d=ps(Number(D[0])),s=Number(D[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=gs();m.isAfter(M,"month")===!1?U(xs(R,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[J,R]),v.useEffect(()=>{N||(Re(!0),f(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&H.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,D,d,s){if(pe(D?.userId,D?.zeniSessionId,a.tenantId),d(Bs(!0)),d(Ie(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=H.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(Ks(s)),m?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,H]),v.useEffect(()=>{H.isSignedIn()&&(f(B.TENANT_FETCHING),function(a,D,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const q=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(q&&ts){k(Ie(s));const W=H.getSignedInUserTenantWithId(s);W?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(W?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)))}else q&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),q&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)));if(q){X.identify(m.userId,{tenant_id:s});const W=s==null||s!=null&&(D==="Completed"||D==="Error");a==="Completed"||D!=="Not-Started"&&D!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ae(m.userId,m.zeniSessionId)))}}(j,A,r,R,h,f,U))},[R,A]),v.useEffect(()=>{H.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),H.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{A==="In-Progress"&&f(B.TENANT_FETCHING),A!=="Completed"&&A!=="Error"||(A==="Completed"&&R!=null?(O(),_.markActiveTenantFetchCompleted(R)):A==="Error"&&R!=null&&(_.markActiveTenantFetchFailed(R),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[A,j,R,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&A==="Completed"&&N&&(ie.current=!0,function(a=Js,D=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Qs[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},D)}())},[A,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ee(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,$e=Us(E?.loggedInUserRoleMap),Ge=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&Ds(E?.loggedInUserRoleMap),me=Oe&&!C,Ye=r.company!=null&&Hs(r.company),qe=Pe&&Ye===!0&&!C,We=re&&bs(E?.loggedInUserRoleMap),Ke=oe&&Rs(E?.loggedInUserRoleMap),Qe=me&&ys(E?.loggedInUserRoleMap),Je=fs(E?.loggedInUserRoleMap),Xe=Cs(E?.loggedInUserRoleMap),p=vs(E?.loggedInUserRoleMap),I=Os(E?.loggedInUserRoleMap),g=Ps(E?.loggedInUserRoleMap),x=Fs(E?.loggedInUserRoleMap),T=Ls(E?.loggedInUserRoleMap),ue=re&&x,_e=ce&&T,es=me&&p,ss=qe&&I,ns=oe&&g,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||$e===!0||Je===!0||Xe===!0;return H.isSignedIn()?R==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ae(h.userId,h.zeniSessionId)),null):A!=="In-Progress"&&A!=="Not-Started"||j==="Completed"?(le===!0||K&&!te)&&Ge===!1&&u===!1&&G===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||K?N&&r?.userRole&&u!=null&&G!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(Ws,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:G})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||ze?e.jsx(rn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(xn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(In,{})}),e.jsx(t,{path:"address/*",element:We||de||Qe||Ke?e.jsx(en,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(y,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(y,{})}),e.jsx(t,{path:"performance",element:ye?e.jsx(En,{}):e.jsx(be,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(An,{}):e.jsx(be,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(y,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(De,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(De,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(He,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(He,{}):e.jsx(b,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(y,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(y,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo",element:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/",element:Q?e.jsx(c,{to:"explore"}):e.jsx(y,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:Q?e.jsx(gn,{isFileUploadEnabled:Ve}):e.jsx(y,{})}),e.jsx(t,{path:"*",element:e.jsx(y,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const Tn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),b=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(Dn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Hn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(y,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Dn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),be=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{b as FallBackRoute,wn as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-DuKOLlGn.js";import{a as u}from"./sentry-8NyHUHYi.js";import{j as T,u as B,h as P,g as m,k as R,l as _,n as X,o as C}from"./core-Chn6k0lm.js";import{bn as Ie,eO as w,gw as ce,KF as Ce,J2 as xe,jr as le,lK as Ee,gy as Ae,KH as je,KG as we,N4 as ke,x3 as Pe,By as ve,MF as De,MO as Ue,c1 as re,cG as Me,cH as Te,IN as Fe,N5 as Be,IO as Re,vv as _e,N6 as Ve,DO as Oe,Be as Le,B5 as de,B2 as Ne,vz as ue,B8 as pe,Bb as ge,Bh as W,s6 as Y,vy as $e,j3 as q,j6 as me,N7 as Ge,k7 as Ke,vO as ze,JA as Je,JB as Ze,j1 as He,N8 as Qe,j4 as Xe,N9 as qe,vL as We,Na as Ye,Nb as en,Bv as nn,eS as fe,eU as he,Nc as tn,fw as an,J3 as sn,vK as te,fB as ae,fA as on,vJ as cn,fz as ln,fy as rn,Nd as dn,eX as be,Ne as un,Nf as pn,vR as gn,vI as se,Ng as mn,fd as fn,vF as hn,bU as bn,c0 as Sn,b$ as yn,bV as In,bZ as Cn,bY as xn,bX as En,b_ as An,bW as jn}from"./zeni-epic-state-CrPv4S-z.js";import{C as ee,$ as U,z as x,ac as Se,bC as wn,c as G,f as kn,I as V,B as ne,bD as Pn,bE as vn,an as Dn,i as ye,bF as Un,bG as Mn,bH as Tn,a6 as Fn,U as Bn,bI as Rn,s as _n,bJ as Vn}from"./index-BreaiJNl.js";import{n as M}from"./mui-BKTsYfTF.js";import{M as v}from"./MobileAppDrawer-B0SDRa0y.js";import{a as N,g as $,m as On}from"./accountMappingHelper-CbeIjSvu.js";import{t as Ln,A as Nn}from"./AddressScreen-DcX4lc_F.js";import F from"./NotFoundScreen-DnYi4Alo.js";import{g as $n}from"./analyticsHelper-SG8tB9jY.js";import{B as Gn}from"./BusinessVerificationPageScreen-B-O4fGng.js";import{C as Kn}from"./CompanyPassportScreen-DMNbV7xV.js";import{q as oe}from"./QBOConnectionScreen-H8Qvt38d.js";import{B as zn}from"./BillPayApprovalRoutes-Basd0KQv.js";import{R as Jn}from"./ReimbursementApprovalRoutes-B07Q_12k.js";import"./recharts-DDgm0ZY-.js";import"./analytics-CX30pJB4.js";import"./plaid-BDw9fPCd.js";import"./dnd-CKKgQZIG.js";import"./stripe-DMRn4zHo.js";import"./lottie-BzC_z70r.js";import"./lexical-CMmB3hg4.js";import"./pdf-DKctSUPl.js";import"./utils-BgDKBMSG.js";import"./routePaths-D5pZG1HW.js";import"./empty-CM7hXaA6.js";import"./pdf-lib-CFnSeXgz.js";import"./index-Cyof-eFv.js";import"./url-KL9dl4eL.js";import"./index-vkGyITuL.js";import"./decodeURIComponentSafe-B4WuQ5yM.js";import"./ReimbursementApprovalRuleDetailScreen-Cs1Oz67I.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]="363ca02e-ded7-49f3-bed6-f9793a628e94",e._sentryDebugIdIdentifier="sentry-dbid-363ca02e-ded7-49f3-bed6-f9793a628e94")}catch{}})();const Zn=M.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-DuKOLlGn.js";import{j as X,u as Q,h as Y,l as W,g as E,N as M,k as G,q as Qe}from"./core-Chn6k0lm.js";import{bE as Ye,ck as Ie,Mt as ye,eO as x,cw as en,xe as Z,x3 as nn,MF as tn,MI as an,pF as ee,pt as ne,j$ as te,rE as N,MK as Ae,fA as $e,fz as We,fy as Ge,ML as sn,xn as on,Be as ke,B5 as _e,B2 as ve,AV as K,B8 as Pe,Bb as Ee,Bh as we,s6 as Te,fP as cn,cr as rn,eU as un,eS as dn,eT as ln,bs as pn,MM as mn,zX as le,Az as yn,MN as fn,bF as gn,Cu as pe,By as Sn,MO as bn,MP as hn,Cy as Cn,CC as In,rx as An,GW as kn,D7 as Ce,E0 as me,MQ as _n,MR as vn,MS as Pn,MT as He,MU as En,Jn as wn,LS as Tn,Jz as Dn,MV as qe,MW as Fe,Dl as Ke,k7 as Un,pw as Je,rG as On,bD as je,rS as Me,cu as Bn,MX as Xe,fc as Fn,CR as xn,CV as Vn,MY as jn,Da as Re,MZ as Mn,M_ as Rn,M$ as Nn,N0 as zn,fI as Ln,yy as Zn,N1 as $n,yD as Wn,yC as Gn}from"./zeni-epic-state-CrPv4S-z.js";import{I as ae,C as ie,$ as de,m as De,aK as J,z as T,x as se,c as w,B as Ue,f as $,br as Hn,aq as oe,bs as V,bt as qn,bu as Kn,ac as Ve,bv as Jn,s as Ne,ar as ze,Z as Xn,A as Qn,bw as Yn,bx as et,by as nt,a3 as tt}from"./index-BreaiJNl.js";import{a as C}from"./sentry-8NyHUHYi.js";import{n as xe,D as at,S as it}from"./mui-BKTsYfTF.js";import{M as fe}from"./MobileAppDrawer-B0SDRa0y.js";import R from"./NotFoundScreen-DnYi4Alo.js";import{a as Le}from"./analyticsHelper-SG8tB9jY.js";import{c as Ze}from"./routePaths-D5pZG1HW.js";import{B as Be}from"./BusinessVerificationPageScreen-B-O4fGng.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]="8eec9993-5338-47d9-9061-94442cf11ca0",e._sentryDebugIdIdentifier="sentry-dbid-8eec9993-5338-47d9-9061-94442cf11ca0")}catch{}})();const st=xe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-
|
|
1
|
+
import{j as f}from"./liveblocks-DuKOLlGn.js";import{a as u,b as T,q as A}from"./sentry-8NyHUHYi.js";import{h as D,j as z,g as c,u as M,N as O,k as P}from"./core-Chn6k0lm.js";import{u as j,z as s,m as B,c as E,D as F,e as _,f as N,g as G,h as H,G as J,i as v}from"./index-BreaiJNl.js";import{eO as V,IA as $,IB as q,eP as W,fi as K,IG as Q,fH as R,cT as X,IH as C,II as Y,IJ as Z,bS as y}from"./zeni-epic-state-CrPv4S-z.js";import"./mui-BKTsYfTF.js";import{u as ee}from"./useDeviceId-EvuyeVv7.js";import{f as te}from"./analyticsHelper-SG8tB9jY.js";import{t as ne}from"./getLocaleForTenant-j9oTpFdD.js";import"./recharts-DDgm0ZY-.js";import"./analytics-CX30pJB4.js";import"./plaid-BDw9fPCd.js";import"./dnd-CKKgQZIG.js";import"./stripe-DMRn4zHo.js";import"./lottie-BzC_z70r.js";import"./lexical-CMmB3hg4.js";import"./pdf-DKctSUPl.js";import"./utils-BgDKBMSG.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]="35f0105c-ecea-48d0-876c-88f0797d9d3c",t._sentryDebugIdIdentifier="sentry-dbid-35f0105c-ecea-48d0-876c-88f0797d9d3c")}catch{}})();const ie=P(function(t,i){const d=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:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(l),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Y(n,a)))},clearSignInError:()=>{t(C())}}})(J),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=j(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=c(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:U,accountUnlockTime:k}=c(e=>e.tenantState),p=c(e=>e.tenantState.fetchState),L=c(e=>e.tenantState.activeTenantFetchState.fetchState),I=c(e=>e.tenantState.signInState),o=c(e=>e.tenantState.loggedInUser),r=c(e=>V(e)),S=c(e=>$(e)),m=M(),w=B().mode,b=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[h.fetchState,l]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{I!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(q(S.tenantsInOrder),o.zeniSessionId),W(o.userId,o.zeniSessionId,r.tenantId),i(K(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(Q("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,w,void 0,S.tenantsInOrder),R().then(()=>{const e=H();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(N.Event.loginSuccess,o.authProvider??"google",X(r.productSettings))},2e3))},[I,p,L,o,r,S,w,m.state,i]),I==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!b,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),U===!0&&k!=null?f.jsx(G,{onClose:()=>i(C()),unlockDate:k}):null]})}export{ve as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-DuKOLlGn.js";import{a as n}from"./sentry-8NyHUHYi.js";import{h as u,u as m,j as p,N as g}from"./core-Chn6k0lm.js";import{z as f,B as b,t as y,c,f as h}from"./index-BreaiJNl.js";import{fM as I,fN as x,IW as j}from"./zeni-epic-state-CrPv4S-z.js";import{n as w}from"./mui-BKTsYfTF.js";import"./recharts-DDgm0ZY-.js";import"./analytics-CX30pJB4.js";import"./plaid-BDw9fPCd.js";import"./dnd-CKKgQZIG.js";import"./stripe-DMRn4zHo.js";import"./lottie-BzC_z70r.js";import"./lexical-CMmB3hg4.js";import"./pdf-DKctSUPl.js";import"./utils-BgDKBMSG.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]="b354cbd7-0302-4a59-8b6f-5ca4fa80abae",e._sentryDebugIdIdentifier="sentry-dbid-b354cbd7-0302-4a59-8b6f-5ca4fa80abae")}catch{}})();function W(){const e=u(),t=m(),a=p(),i=n.useRef(!1),d=f.isSignedIn(),r=t.state?.message==="logout",o=r||d;return n.useEffect(()=>{o&&!i.current&&(i.current=!0,setTimeout(()=>{try{f.clearAll(),e(I()),e(x(!1)),j(),y.reset(),c.trackLogout(h.Event.logoutSuccess),c.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||a("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(b,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=w.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-
|
|
1
|
+
import{j as p}from"./liveblocks-DuKOLlGn.js";import{a as g}from"./sentry-8NyHUHYi.js";import{j as _,h as z,u as O,g as b,l as M,k as Q}from"./core-Chn6k0lm.js";import{z as P,C as V,$ as d,x as W,c as Z,f as q,cJ as J,s as f,p as H}from"./index-BreaiJNl.js";import{eO as X,PK as R,Fy as E,PL as x,PG as Y,E_ as S,PM as aa,F2 as I,Ex as ea,Fz as B,PN as F,gD as ta,Fp as sa,Fu as oa,Fh as na,Ff as w,Fv as ia,Fc as la,PO as ra,PP as ca,PQ as ka,PR as ua,PS as m,ea as pa,PT as da,PU as ma}from"./zeni-epic-state-CrPv4S-z.js";import{n as Ta}from"./mui-BKTsYfTF.js";import{u as ga}from"./useAskAiCfoHostNavButtonProps-Yc6V_8SE.js";import{c as fa}from"./useFetchSuggestedQuestionsWhenReady-Dl_AzQW_.js";import{M as ha}from"./MobileAppDrawer-B0SDRa0y.js";import"./recharts-DDgm0ZY-.js";import"./analytics-CX30pJB4.js";import"./plaid-BDw9fPCd.js";import"./dnd-CKKgQZIG.js";import"./stripe-DMRn4zHo.js";import"./lottie-BzC_z70r.js";import"./lexical-CMmB3hg4.js";import"./pdf-DKctSUPl.js";import"./utils-BgDKBMSG.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]="10e56675-a14b-4c62-80a5-227e647e7678",e._sentryDebugIdIdentifier="sentry-dbid-10e56675-a14b-4c62-80a5-227e647e7678")}catch{}})();const Da=Ta.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-
|
|
1
|
+
import{j as n}from"./liveblocks-DuKOLlGn.js";import se from"./NotFoundScreen-DnYi4Alo.js";import{a as c}from"./sentry-8NyHUHYi.js";import{j as _,h as H,g,u as ne,l as oe,N as ie,k as re,n as ce,o as f}from"./core-Chn6k0lm.js";import{FC as M,FF as le,FI as de,eO as Z,PG as J,EW as W,EE as pe,Fm as ue,Ff as ke,PH as K,PI as z,EA as me,Ex as fe,pF as ge,pt as he,j$ as Se,EM as Ie,PJ as Ee,ER as Te,EO as be,EH as Ce,E$ as Ge,E_ as De}from"./zeni-epic-state-CrPv4S-z.js";import{z as G,cH as xe,H as je,C as ye,$ as T,p as X,s as F,x as Fe,c as A,f as we,cI as ve,i as O,aq as Re}from"./index-BreaiJNl.js";import{n as Pe}from"./mui-BKTsYfTF.js";import{u as Be}from"./useInitialThreadRequest-DWCinY7g.js";import{M as Ue}from"./MobileAppDrawer-B0SDRa0y.js";import Le from"./TaskListScreen-Ute_eU7l.js";import"./recharts-DDgm0ZY-.js";import"./analytics-CX30pJB4.js";import"./plaid-BDw9fPCd.js";import"./dnd-CKKgQZIG.js";import"./stripe-DMRn4zHo.js";import"./lottie-BzC_z70r.js";import"./lexical-CMmB3hg4.js";import"./pdf-DKctSUPl.js";import"./utils-BgDKBMSG.js";import"./useAskAiCfoHostNavButtonProps-Yc6V_8SE.js";import"./useFetchSuggestedQuestionsWhenReady-Dl_AzQW_.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]="ea1b0d81-aded-41d6-a68e-3d720c1f0a5a",e._sentryDebugIdIdentifier="sentry-dbid-ea1b0d81-aded-41d6-a68e-3d720c1f0a5a")}catch{}})();function $e(){const e=_(),t=H(),s=G.getSignedInUser(),{cannedResponses:d,fetchState:r,saveFetchState:p}=g(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(M())},[t]),k=c.useCallback((o,h,S)=>{t(le({name:o,content:h,cannedResponseId:S}))},[t]),a=c.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(xe,{cannedResponses:d,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:p==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let V,q=[];const Ne=re(function(e,t){const{location:s,taskGroupId:d}=t,r=K(e,t.taskId),p=Z(e),l=d!=null?z(e.taskGroupState,d):void 0,k=G.getSignedInUser(),a=p.tenantId,o={userId:k?.userId??"",sessionId:k?.zeniSessionId??"",tenantId:a??""},h=J(e),{tenantEmailDomain:S}=p,b=r.recurringSourceTaskId,D=b!=null?`${O.appUrl}/${S}/tasks/${encodeURIComponent(b)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:o,isZeniUser:G.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==V&&(V=I,q=Object.values(I)),q),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Re.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${O.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:D,tagListView:h,taskGroupName:d!=null&&l!=null&&l.isDefault===!1?l.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(u=>z(e.taskGroupState,u)).filter(u=>u!=null&&!u.isDeleted).map(u=>({id:u.id,name:u.name,isDefault:u.isDefault}))}},function(e,t){const{taskId:s,navigate:d,currentTenant:r,location:p,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ge(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ce(t.taskId))},onSnoozeTask:(a,o)=>{e(be(a,o))},onUnsnoozeTask:a=>{e(Te(a))},onDismissClick:()=>{if(p.state?.message==="triggerBackClick"){const a=X(p.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";d(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=w(k),o=F(p.state?.pathnameStackToGoBack,p.pathname);d(a,{state:{pathnameStackToGoBack:o}})}e(Ee({taskId:s}))},onDeleteTaskClick:()=>{e(Ie(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(W(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(M())},onManageTemplatesClick:()=>{d(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(ve);function y(){const e=_(),t=H(),s=ne(),d=je(),{taskId:r,taskGroupId:p}=oe(),l=g(i=>Z(i)),k=Be(l?.companyId),{useFeatureGate:a}=ye(),{isFeatureEnabled:o}=a(T.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(T.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(T.isTaskCannedResponsesEnabled),{isFeatureEnabled:b}=a(T.isTaskRecurringParentEnabled),{isFeatureEnabled:D}=a(T.isTaskGroupAssigneesEnabled),[I,u]=c.useState(!1),[v,Y]=c.useState(!1),[R,Q]=c.useState(!1),[P,ee]=c.useState(!1),[B,x]=c.useState(!1),E=c.useRef(!1),C=g(i=>i.taskListState.updateTasksFetchState.fetchState),U=g(i=>J(i)),L=g(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{v||(Y(!0),t(W(!1,r)))},[v,t]),c.useEffect(()=>{R||U.fetchState==="Completed"||(Q(!0),t(pe()))},[R,t,U.fetchState]),c.useEffect(()=>{P||L==="Completed"||(ee(!0),t(ue()))},[P,t,L]);const ae=c.useCallback(()=>{r!=null&&(E.current=!1,t(ke([r],null,{isArchived:!1})),x(!0))},[t,r]);c.useEffect(()=>{if(B)if(C!=="In-Progress"){if(E.current){if(C==="Error")return x(!1),void(E.current=!1);if(C==="Completed"){x(!1),E.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=X(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=w(i);e(m,{state:{pathnameStackToGoBack:F(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else E.current=!0},[B,C,l,s,e]);const $=g(i=>K(i,r)),j=$.fetchState,N=G.getSignedInUser();if(N==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=w(i),te=F(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[j==="Completed"?n.jsx(Fe,{analytics:A,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(ze,{children:[n.jsx(Ue,{isAppContentDrawerOpen:I,handleDrawerToggle:i=>{u(i)}}),n.jsx(Ne,{analytics:A,currentTenant:l,handleZeniLogoClick:()=>{d.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:N,navigate:e,taskGroupId:p,taskId:r,taskDetailFetchState:j,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:b,isTaskGroupAssigneesEnabled:D})]})]})}const ze=Pe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./liveblocks-DuKOLlGn.js";import i from"./NotFoundScreen-DnYi4Alo.js";import{T as r}from"./TransactionDetailScreen-B71792qc.js";import"./sentry-8NyHUHYi.js";import{n as a,o}from"./core-Chn6k0lm.js";import"./zeni-epic-state-CrPv4S-z.js";import"./recharts-DDgm0ZY-.js";import"./index-BreaiJNl.js";import"./mui-BKTsYfTF.js";import"./analytics-CX30pJB4.js";import"./plaid-BDw9fPCd.js";import"./dnd-CKKgQZIG.js";import"./stripe-DMRn4zHo.js";import"./lottie-BzC_z70r.js";import"./lexical-CMmB3hg4.js";import"./pdf-DKctSUPl.js";import"./utils-BgDKBMSG.js";import"./useAskAiCfoHostNavButtonProps-Yc6V_8SE.js";import"./useFetchSuggestedQuestionsWhenReady-Dl_AzQW_.js";import"./decodeURIComponentSafe-B4WuQ5yM.js";import"./routePaths-D5pZG1HW.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]="50e87735-4ba7-4a09-8438-0ea2bea3d928",e._sentryDebugIdIdentifier="sentry-dbid-50e87735-4ba7-4a09-8438-0ea2bea3d928")}catch{}})();function q(){return t.jsxs(a,{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{q as default};
|
package/dist/assets/{TransactionDetailScreen-8mXHg0UY.js → TransactionDetailScreen-B71792qc.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as I}from"./liveblocks-
|
|
1
|
+
import{j as I}from"./liveblocks-DuKOLlGn.js";import{a as d}from"./sentry-8NyHUHYi.js";import{h as j,g as S,u as re,j as le,l as de,N as Re,k as ze}from"./core-Chn6k0lm.js";import{bn as je,eO as H,cP as ue,bv as me,pk as Y,JN as B,KO as pe,KP as J,Kb as he,jC as fe,KQ as ge,Kg as X,Kh as Z,kr as Se,GO as Q,JH as _,jw as Te,ju as ye,jG as Ke,KR as $e,KS as Me,t9 as z,jB as ve,G9 as Ee,cU as We,cV as qe,KT as He,JG as Ye,KU as Je,td as Xe,KV as Ze,KW as Qe,KX as ea,KY as aa,KZ as ta,jF as na,K_ as oa,K$ as sa,JI as ia,L0 as ca,L1 as ra,L2 as la,G3 as da,FT as ua,Gl as ma,jH as pa,GP as ie,G0 as ha}from"./zeni-epic-state-CrPv4S-z.js";import{z as be,C as ee,$ as V,aK as De,m as fa,Z as ga,aL as Sa,A as Ta,p as W,I as ya,aM as va,s as q,c as Ce,aN as Ea,aq as ba,X as M}from"./index-BreaiJNl.js";import{n as Da,S as Ca,D as Ia}from"./mui-BKTsYfTF.js";import{u as ka}from"./useAskAiCfoHostNavButtonProps-Yc6V_8SE.js";import{c as Ua}from"./useFetchSuggestedQuestionsWhenReady-Dl_AzQW_.js";import{d as Ie}from"./decodeURIComponentSafe-B4WuQ5yM.js";import{h as ke,g as Aa,d as xa,b as _a}from"./routePaths-D5pZG1HW.js";import{t as Va}from"./utils-BgDKBMSG.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]="6bb835dc-aeaf-42e8-bd2e-1fb2a49e15c8",a._sentryDebugIdIdentifier="sentry-dbid-6bb835dc-aeaf-42e8-bd2e-1fb2a49e15c8")}catch{}})();const ae=()=>{const a=be.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(V.isChainOfThoughtEnabled);return d.useMemo(()=>je(a)&&s,[a,s])};function Ue(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Ja(a,e){const s=j(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>H(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:T}=t(V.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:C}=t(V.isExpenseAutomationEnabled),{configValue:h}=n(De.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,k=ae(),y=d.useMemo(()=>({id:a,type:Y(e)}),[a,e]),m=S(u=>B(u,y)),D=S(u=>{const N=B(u,y)?.transactionDetailLocalData.vendorUpdates?.id;return N==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[N]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Ue(m?.transaction):void 0,[m?.fetchState,m?.transaction]),E=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),U=S(u=>J(u)),L=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),K=o.company?.companyInfo.firstMonthOfFY??1,$=S(u=>fe(u.accountState,u.accountListState,"accountList")),[w,P]=d.useState(!1),[F,v]=d.useState(!1),[c,O]=d.useState(!1);d.useEffect(()=>{P(!1),v(!1),O(!1)},[a,e]);const b=d.useCallback(()=>{P(!1),v(!1)},[]),[A,x]=d.useState(!1),G=L?.selectedPeriod?.timePeriod;return d.useEffect(()=>{c||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),O(!0)),p!=null&&(!i||l&&g===!1)&&(w?F||E==null||(v(!0),s(Q(p,"TransactionDetail",{timeframe:"month",timePeriod:G??E}))):(s(X()),s(Z()),P(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,w,F,E,G]),d.useEffect(()=>{U.newVendorState?.vendorDetailLocalData?.vendorName!=null?x(!0):x(!1)},[U.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(_("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:C,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:k,selectedTransaction:y,transactionDetail:m,vendorSaveStatus:D,tranEntity:p,defaultTrendTransactionTimePeriod:E,vendorViewDetails:U,uiState:L,firstMonthOfFY:K,uncategorizedAccounts:$,resetTrendIsFetchedStates:b,isCreateVendorDrawerOpen:A,setIsCreateVendorDrawerOpen:x}}const La={overlayWidth:new Ta(100,100,58)},Pa=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=fa(),i=ga(),l=j(),g=S(h=>J(h)),T=()=>{t()},C={vendorDetailView:n??g,onSaveSuccess:()=>{l(ye()),l(Ke("Not-Started")),s()},onSaveVendor:e,onCancelClick:T,saveVendorDetailLocalData:h=>{l(Te({vendorId:void 0,localData:h}))}};return I.jsx(Ia,{anchor:"right",open:a,PaperProps:{style:{width:La.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:T,children:I.jsx(Ba,{onClick:h=>h.stopPropagation(),children:I.jsx(Sa,{...C})})})},Ba=Da(Ca)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-Dh2QAkHf.js";import{j as J,u as R,h as U,l as H,g as z,N as O,k as Q,n as Ae,o as I}from"./core-BFuZewo1.js";import{eO as $,iQ as T,O9 as K,GF as ue,bq as ie,Oa as he,jr as Z,Kd as W,Ob as se,Oc as Se,bD as Y,GC as me,Od as ke,Oe as re,Of as be,Og as pe,Oh as Ie,Oi as ve,Oj as de,HS as xe,bn as Ye}from"./zeni-epic-state-Bhb0JOZy.js";import{D as X,c as C,c7 as ee,s as w,p as te,C as fe,$ as q,U as Ee,z as Pe}from"./index-DyQYRNiR.js";import"./mui-sjj8uXYx.js";import{a as y}from"./sentry-DK3ab-Mk.js";import{w as ae}from"./withTransactionSidePanel-Bd_ziiFV.js";import{p as ne,b as ce}from"./routePaths-zFH_1U3e.js";import{u as Le}from"./utils-DdXexb3v.js";import{d as L}from"./decodeURIComponentSafe-GFuMfgir.js";import{Z as ze}from"./ZeniAccountStatementScreen-DutbAsuJ.js";import"./recharts-Di30TSqm.js";import"./analytics-DxyMm95L.js";import"./plaid-CvsW7WgG.js";import"./dnd-mZw2LJiL.js";import"./stripe-DMRn4zHo.js";import"./lottie-DueJpsnD.js";import"./lexical-DGyy1g7u.js";import"./pdf-BDzUzBn8.js";import"./useAskAiCfoHostNavButtonProps-BBmaNftJ.js";import"./useFetchSuggestedQuestionsWhenReady-Cem1fO9j.js";import"./TransactionDetailScreen-8mXHg0UY.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]="d45aa02a-2588-4cdd-b7b6-c3b0fd33948c",a._sentryDebugIdIdentifier="sentry-dbid-d45aa02a-2588-4cdd-b7b6-c3b0fd33948c")}catch{}})();const je=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],_=a=>Le(a),Oe=Q(function(a,e){const t=he(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,_(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:Z(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=X.getLocalizedStrings(),s=_(e.selectedAccount.tranListType),r=Be(t,n,c,s,e.bookCloseDate);C.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:r},type:_(e.selectedAccount.tranListType)})),a(ue(s,T(r),!1,s==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(r))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:_(e.selectedAccount.tranListType)}))}}})(ee),G=ae(function({...a}){const e=J(),t=R(),n=U(),c=t.pathname.split("/").find(d=>je.includes(d)),o=c??"uncategorized-expense",{tenantEmailDomain:s}=H(),r=X.getLocalizedStrings(),{accountType:p,title:A,subTitle:h}=Ce(o),S="month",k=z(d=>$(d)),D=k.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:g,initialTimeframeTick:v}=Me(o,D,k.bookCloseDate),[E,M]=y.useState(!1),[x,B]=y.useState(void 0),l=y.useMemo(()=>{const d=T(v);return{tranListType:o,accountType:K(p),title:A,subTitle:h,timeframe:S,period:d}},[o,S,p,g]);y.useEffect(()=>{if(!E&&l!=null){M(!0),C.trackTransactionList(void 0,void 0,void 0,l.title);const d=_(l.tranListType);n(ue(d,l.period,!0,d==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[E,l,n]);let P=l;return l!=null&&x!=null&&(P={...l,period:x}),c==null||P==null?i.jsx(O,{to:"../"}):i.jsx(Oe,{firstMonthOfFY:D,tenantEmailDomain:s,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:g,navigate:e,selectedAccount:P,referrerType:o,bookCloseDate:k.bookCloseDate,onSelectedTimePeriodChange:d=>B(d),...a})}),Ce=a=>{let e="",t="",n="";const c=X.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=c.uncategorizedTransactionList.income.title,n=c.uncategorizedTransactionList.income.subTitle;break;case"uncategorized-expense":e="expenses",t=c.uncategorizedTransactionList.expense.title,n=c.uncategorizedTransactionList.expense.subTitle;break;case"miscategorized-expense":e="expenses",t=c.miscategorizedTransactionList.expense.title,n=c.miscategorizedTransactionList.expense.subTitle;break;case"miscategorized-income":e="income",t=c.miscategorizedTransactionList.income.title,n=c.miscategorizedTransactionList.income.subTitle;break;case"missing-receipts":t=c.uncategorizedTransactionList.missingReceipt.title,n=c.uncategorizedTransactionList.missingReceipt.subTitle}return{accountType:e,title:t,subTitle:n}},Me=(a,e,t)=>{const n=ie();let c=ie().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ne(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Be=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Fe=Q(function(a,e){const t=ke(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:Z(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Te();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),C.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(me(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),Ge=ae(function({referrerType:a,...e}){const t=J(),n=R(),c=U(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,classIdEncoded:p,timeframe:A,startDate:h,endDate:S,titleEncoded:k}=H(),D=L(s??""),g=L(r??""),v=L(p??""),E=L(k??""),M=z(f=>Se(f.transactionListState,g,D,v)),[x,B]=y.useState(!1),[l,P]=y.useState(void 0),d=z(f=>$(f)),V=d.company?.companyInfo.firstMonthOfFY??1;let u;const m=_e(D,g,v,A,h,S,E);if(m){const f={startDate:Y(h,"YYYY-MM-DD"),endDate:Y(S,"YYYY-MM-DD")},N=we(M?.dateRange,f);u={accountId:g,accountType:K(D),classId:v,title:E,timeframe:A,period:N}}y.useEffect(()=>{x||u==null||(B(!0),C.trackTransactionList(u.accountId,void 0,a,u.title),c(me(u.accountId,u.accountType,u.classId,u.period)))},[x,u,c]);let j=u;u!=null&&l!=null&&(j={...u,period:l});const F=[s,r,p,A,h,S,k].filter(f=>f!=null);return m&&j!=null?i.jsx(Fe,{firstMonthOfFY:V,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:j,referrerType:a,onSelectedTimePeriodChange:f=>P(f),...e}):i.jsx(O,{to:Te(F.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},_e=(a,e,t,n,c,o,s)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&s!=null,we=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),Re=Q(function(a,e){const t=Ie(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ve(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:Z(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??De();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),C.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=Ne(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=J(),n=R(),c=U(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,timeframe:p,startDate:A,endDate:h,titleEncoded:S,excludeSubAccounts:k}=H(),D=L(s??""),g=L(r??""),v=L(S??""),E=!(k!=null&&k==="exclude_subaccounts"),M=z(b=>be(b.transactionListState,g,D)),[x,B]=y.useState(!1),[l,P]=y.useState(void 0),d=z(b=>$(b)),V=d.company?.featuresActivationInfo.connectedAccountProvider==="unit",u=d.company?.companyInfo.firstMonthOfFY??1;let m;const j=$e(D,g,p,A,h,v);if(j){const b={startDate:Y(A,"YYYY-MM-DD"),endDate:Y(h,"YYYY-MM-DD")},ye=Ve(M?.dateRange,b);m={accountId:g,accountType:K(D),title:v,timeframe:p,period:ye}}let F=m;m!=null&&l!=null&&(F={...m,period:l});const{useFeatureGate:f}=fe(),{isFeatureEnabled:N}=f(q.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Ee();y.useEffect(()=>{!x&&m!=null&&oe&&(B(!0),C.trackTransactionList(m.accountId,void 0,a,m.title),c(pe(m.accountId,m.accountType,m.period,void 0,!1,E)))},[x,m,c,oe]);const ge=[s,r,p,A,h,S].filter(b=>b!=null);return j&&F!=null?i.jsx(Re,{firstMonthOfFY:u,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:V,isTransactionCommentingEnabled:N,selectedAccount:F,referrerType:a,onSelectedTimePeriodChange:b=>P(b),...e}):i.jsx(O,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},$e=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,Ve=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),Ne=a=>`/${a}/transactions/${xe}/statements`;function pt(){const a=R().state?.referrer,e=Pe.getSignedInUser(),t=Ye(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(q.isExpenseAutomationEnabled),o=z(p=>p.expenseAutomationViewState.selectedPeriodByTenantId)[z(p=>$(p)).tenantId],{isFeatureEnabled:s}=n(q.isExpenseAutomationEnabledV2),r=s||c&&t;return i.jsxs(Ae,{children:[i.jsx(I,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(I,{path:"/zeni-clearing-account/statements",element:i.jsx(ze,{})}),i.jsx(I,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(I,{path:"/uncategorized-income/*",element:i.jsx(G,{})}),i.jsx(I,{path:"/uncategorized-expense/*",element:r?i.jsx(O,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(I,{path:"/miscategorized-income/*",element:i.jsx(G,{})}),i.jsx(I,{path:"/miscategorized-expense/*",element:r?i.jsx(O,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(I,{path:"/missing-receipts/*",element:r?i.jsx(O,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(I,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(Ge,{referrerType:a})})]})}export{pt as default};
|
|
1
|
+
import{j as i}from"./liveblocks-DuKOLlGn.js";import{j as J,u as R,h as U,l as H,g as z,N as O,k as Q,n as Ae,o as I}from"./core-Chn6k0lm.js";import{eO as $,iQ as T,O9 as K,GF as ue,bq as ie,Oa as he,jr as Z,Kd as W,Ob as se,Oc as Se,bD as Y,GC as me,Od as ke,Oe as re,Of as be,Og as pe,Oh as Ie,Oi as ve,Oj as de,HS as xe,bn as Ye}from"./zeni-epic-state-CrPv4S-z.js";import{D as X,c as C,c7 as ee,s as w,p as te,C as fe,$ as q,U as Ee,z as Pe}from"./index-BreaiJNl.js";import"./mui-BKTsYfTF.js";import{a as y}from"./sentry-8NyHUHYi.js";import{w as ae}from"./withTransactionSidePanel-BxWHMEM-.js";import{p as ne,b as ce}from"./routePaths-D5pZG1HW.js";import{u as Le}from"./utils-BgDKBMSG.js";import{d as L}from"./decodeURIComponentSafe-B4WuQ5yM.js";import{Z as ze}from"./ZeniAccountStatementScreen-DLzmrfoy.js";import"./recharts-DDgm0ZY-.js";import"./analytics-CX30pJB4.js";import"./plaid-BDw9fPCd.js";import"./dnd-CKKgQZIG.js";import"./stripe-DMRn4zHo.js";import"./lottie-BzC_z70r.js";import"./lexical-CMmB3hg4.js";import"./pdf-DKctSUPl.js";import"./useAskAiCfoHostNavButtonProps-Yc6V_8SE.js";import"./useFetchSuggestedQuestionsWhenReady-Dl_AzQW_.js";import"./TransactionDetailScreen-B71792qc.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]="d45aa02a-2588-4cdd-b7b6-c3b0fd33948c",a._sentryDebugIdIdentifier="sentry-dbid-d45aa02a-2588-4cdd-b7b6-c3b0fd33948c")}catch{}})();const je=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],_=a=>Le(a),Oe=Q(function(a,e){const t=he(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,_(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:Z(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=X.getLocalizedStrings(),s=_(e.selectedAccount.tranListType),r=Be(t,n,c,s,e.bookCloseDate);C.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:r},type:_(e.selectedAccount.tranListType)})),a(ue(s,T(r),!1,s==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(r))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:_(e.selectedAccount.tranListType)}))}}})(ee),G=ae(function({...a}){const e=J(),t=R(),n=U(),c=t.pathname.split("/").find(d=>je.includes(d)),o=c??"uncategorized-expense",{tenantEmailDomain:s}=H(),r=X.getLocalizedStrings(),{accountType:p,title:A,subTitle:h}=Ce(o),S="month",k=z(d=>$(d)),D=k.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:g,initialTimeframeTick:v}=Me(o,D,k.bookCloseDate),[E,M]=y.useState(!1),[x,B]=y.useState(void 0),l=y.useMemo(()=>{const d=T(v);return{tranListType:o,accountType:K(p),title:A,subTitle:h,timeframe:S,period:d}},[o,S,p,g]);y.useEffect(()=>{if(!E&&l!=null){M(!0),C.trackTransactionList(void 0,void 0,void 0,l.title);const d=_(l.tranListType);n(ue(d,l.period,!0,d==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[E,l,n]);let P=l;return l!=null&&x!=null&&(P={...l,period:x}),c==null||P==null?i.jsx(O,{to:"../"}):i.jsx(Oe,{firstMonthOfFY:D,tenantEmailDomain:s,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:g,navigate:e,selectedAccount:P,referrerType:o,bookCloseDate:k.bookCloseDate,onSelectedTimePeriodChange:d=>B(d),...a})}),Ce=a=>{let e="",t="",n="";const c=X.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=c.uncategorizedTransactionList.income.title,n=c.uncategorizedTransactionList.income.subTitle;break;case"uncategorized-expense":e="expenses",t=c.uncategorizedTransactionList.expense.title,n=c.uncategorizedTransactionList.expense.subTitle;break;case"miscategorized-expense":e="expenses",t=c.miscategorizedTransactionList.expense.title,n=c.miscategorizedTransactionList.expense.subTitle;break;case"miscategorized-income":e="income",t=c.miscategorizedTransactionList.income.title,n=c.miscategorizedTransactionList.income.subTitle;break;case"missing-receipts":t=c.uncategorizedTransactionList.missingReceipt.title,n=c.uncategorizedTransactionList.missingReceipt.subTitle}return{accountType:e,title:t,subTitle:n}},Me=(a,e,t)=>{const n=ie();let c=ie().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ne(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Be=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Fe=Q(function(a,e){const t=ke(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:Z(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Te();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),C.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(me(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),Ge=ae(function({referrerType:a,...e}){const t=J(),n=R(),c=U(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,classIdEncoded:p,timeframe:A,startDate:h,endDate:S,titleEncoded:k}=H(),D=L(s??""),g=L(r??""),v=L(p??""),E=L(k??""),M=z(f=>Se(f.transactionListState,g,D,v)),[x,B]=y.useState(!1),[l,P]=y.useState(void 0),d=z(f=>$(f)),V=d.company?.companyInfo.firstMonthOfFY??1;let u;const m=_e(D,g,v,A,h,S,E);if(m){const f={startDate:Y(h,"YYYY-MM-DD"),endDate:Y(S,"YYYY-MM-DD")},N=we(M?.dateRange,f);u={accountId:g,accountType:K(D),classId:v,title:E,timeframe:A,period:N}}y.useEffect(()=>{x||u==null||(B(!0),C.trackTransactionList(u.accountId,void 0,a,u.title),c(me(u.accountId,u.accountType,u.classId,u.period)))},[x,u,c]);let j=u;u!=null&&l!=null&&(j={...u,period:l});const F=[s,r,p,A,h,S,k].filter(f=>f!=null);return m&&j!=null?i.jsx(Fe,{firstMonthOfFY:V,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:j,referrerType:a,onSelectedTimePeriodChange:f=>P(f),...e}):i.jsx(O,{to:Te(F.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},_e=(a,e,t,n,c,o,s)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&s!=null,we=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),Re=Q(function(a,e){const t=Ie(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ve(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:W(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:Z(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??De();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),C.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=Ne(e.tenantEmailDomain),n=w(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=J(),n=R(),c=U(),{tenantEmailDomain:o,accountTypeEncoded:s,accountIdEncoded:r,timeframe:p,startDate:A,endDate:h,titleEncoded:S,excludeSubAccounts:k}=H(),D=L(s??""),g=L(r??""),v=L(S??""),E=!(k!=null&&k==="exclude_subaccounts"),M=z(b=>be(b.transactionListState,g,D)),[x,B]=y.useState(!1),[l,P]=y.useState(void 0),d=z(b=>$(b)),V=d.company?.featuresActivationInfo.connectedAccountProvider==="unit",u=d.company?.companyInfo.firstMonthOfFY??1;let m;const j=$e(D,g,p,A,h,v);if(j){const b={startDate:Y(A,"YYYY-MM-DD"),endDate:Y(h,"YYYY-MM-DD")},ye=Ve(M?.dateRange,b);m={accountId:g,accountType:K(D),title:v,timeframe:p,period:ye}}let F=m;m!=null&&l!=null&&(F={...m,period:l});const{useFeatureGate:f}=fe(),{isFeatureEnabled:N}=f(q.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Ee();y.useEffect(()=>{!x&&m!=null&&oe&&(B(!0),C.trackTransactionList(m.accountId,void 0,a,m.title),c(pe(m.accountId,m.accountType,m.period,void 0,!1,E)))},[x,m,c,oe]);const ge=[s,r,p,A,h,S].filter(b=>b!=null);return j&&F!=null?i.jsx(Re,{firstMonthOfFY:u,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:V,isTransactionCommentingEnabled:N,selectedAccount:F,referrerType:a,onSelectedTimePeriodChange:b=>P(b),...e}):i.jsx(O,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},$e=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,Ve=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),Ne=a=>`/${a}/transactions/${xe}/statements`;function pt(){const a=R().state?.referrer,e=Pe.getSignedInUser(),t=Ye(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(q.isExpenseAutomationEnabled),o=z(p=>p.expenseAutomationViewState.selectedPeriodByTenantId)[z(p=>$(p)).tenantId],{isFeatureEnabled:s}=n(q.isExpenseAutomationEnabledV2),r=s||c&&t;return i.jsxs(Ae,{children:[i.jsx(I,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(I,{path:"/zeni-clearing-account/statements",element:i.jsx(ze,{})}),i.jsx(I,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(I,{path:"/uncategorized-income/*",element:i.jsx(G,{})}),i.jsx(I,{path:"/uncategorized-expense/*",element:r?i.jsx(O,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(I,{path:"/miscategorized-income/*",element:i.jsx(G,{})}),i.jsx(I,{path:"/miscategorized-expense/*",element:r?i.jsx(O,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(I,{path:"/missing-receipts/*",element:r?i.jsx(O,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(G,{})}),i.jsx(I,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(Ge,{referrerType:a})})]})}export{pt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-
|
|
1
|
+
import{j as e}from"./liveblocks-DuKOLlGn.js";import{j as L,u as B,h as M,l as O,g as f,N as U,k as V,n as xe,o as k}from"./core-Chn6k0lm.js";import{cl as N,eO as D,MX as P,D7 as ae,fc as Z,CR as ne,MZ as we,Da as Te,MV as Ie,MW as se,Nb as Ce,Bh as ke,s6 as je,M$ as be,Dl as Ae,MY as re,cO as H,wc as oe,eS as Ee,eU as ve,O6 as De,O7 as Fe,CS as Ue,O8 as Le,CT as Be,D0 as Me,bv as Pe,bE as Re,cw as Oe,bF as Ve,ck as Ne,fb as _e,bs as $e,IC as ze,cj as Ge}from"./zeni-epic-state-CrPv4S-z.js";import{I as _,an as We,z as A,x as $,c as j,c0 as Ze,c1 as He,c2 as W,Z as q,m as qe,U as Je,C as ie,$ as v,A as Ke,B as Qe,c3 as Xe,aq as J,s as Ye,c4 as et,p as K,c5 as tt,k as X,c6 as at,a6 as nt}from"./index-BreaiJNl.js";import{D as st,n as R,S as rt}from"./mui-BKTsYfTF.js";import ot from"./NotFoundScreen-DnYi4Alo.js";import{S as Y}from"./SetupPagesScreen-C4GjXjRP.js";import{a as d}from"./sentry-8NyHUHYi.js";import{u as it}from"./useAskAiCfoHostNavButtonProps-Yc6V_8SE.js";import{c as ct}from"./useFetchSuggestedQuestionsWhenReady-Dl_AzQW_.js";import{M as ce}from"./MobileAppDrawer-B0SDRa0y.js";import{F as lt}from"./FeaturePreviewScreen-DukdbkDU.js";import{a as ee}from"./analyticsHelper-SG8tB9jY.js";import"./recharts-DDgm0ZY-.js";import"./analytics-CX30pJB4.js";import"./plaid-BDw9fPCd.js";import"./dnd-CKKgQZIG.js";import"./stripe-DMRn4zHo.js";import"./lottie-BzC_z70r.js";import"./lexical-CMmB3hg4.js";import"./pdf-DKctSUPl.js";import"./utils-BgDKBMSG.js";import"./routePaths-D5pZG1HW.js";import"./BusinessVerificationPageScreen-B-O4fGng.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="c022ab64-e714-48e1-8d40-c3d57ae344a8",t._sentryDebugIdIdentifier="sentry-dbid-c022ab64-e714-48e1-8d40-c3d57ae344a8")}catch{}})();const ut=V(function(t,a){const{companyId:n}=a;return{treasurySetupView:P(t,n),analytics:j}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Te(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(Ze);function dt(){const t=L(),a=B(),n=M(),{tenantEmailDomain:o}=O(),p=_(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=We(r),s=N(p?.loggedInUserRoleMap),[c,i]=d.useState(!1),[y,I]=d.useState(!1),[u,l]=d.useState(!1),g=f(C=>D(C)),h=A.getSignedInUserTenant(o)?.companyId??g.companyId,w=A.getSignedInUser(),S=f(C=>P(C,h)),T=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(w==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{c||T!=="Not-Started"||h==null||(i(!0),n(ae(h,!0,!1)))},[c,T,h,n]),d.useEffect(()=>{u||F!=="Not-Started"||h==null||(l(!0),n(Z()))},[u,F,h,n]),d.useEffect(()=>{y||x!=="Not-Started"||h==null||(I(!0),n(ne()))},[y,x,h,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(U,{to:"../promo"});const E=g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||T!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx($,{analytics:j,onLoad:()=>{}}),e.jsx(ut,{navigate:t,location:a,companyId:h,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const pt=V(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:Ce(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:P(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{W(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{W(a.analytics,"confirm",r,m,"Transfer"),t(Ae())},onSaveChangesToLocalStore:s=>{t(be(s))},onFetchLinkTokenClick:s=>{t(je("treasury_setup",s))},onEstablishConnectionClick:s=>{t(ke(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(He),mt=({isFirstTransfer:t})=>{const a=L(),{tenantEmailDomain:n}=O(),o=M(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[c,i]=d.useState(!1),[y,I]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),l=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),g=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),h=f(x=>D(x)),w=A.getSignedInUserTenant(n)?.companyId??h.companyId,S=f(x=>Ie(x)),T=f(x=>P(x,w));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||w==null||(s(!0),o(ae(w,!0,!1)))},[m,u,w,o]),d.useEffect(()=>{c||l!=="Not-Started"||w==null||(i(!0),o(Z()))},[c,l,w,o]),d.useEffect(()=>{y||g!=="Not-Started"||w==null||(I(!0),o(ne()))},[y,g,w,o]),e.jsxs(e.Fragment,{children:[e.jsx($,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:h,treasurySetupView:T,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{W(j,"review",S.treasuryTransferMoneyLocalData,T.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},ft=R.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-DuKOLlGn.js";import{a as g}from"./sentry-8NyHUHYi.js";import{j as M,u as Y,l as J,g as S,k as K,h as z,n as at,o as B,N as G}from"./core-Chn6k0lm.js";import{eO as L,JD as Ee,JE as Re,fP as X,cr as be,cs as Ie,uN as St,JF as nt,uR as zt,HJ as ee,jr as te,uL as Yt,uF as qt,JG as Ue,ux as Ht,uw as Wt,uq as Qt,uC as Zt,uS as Xt,JH as he,JI as Ne,uy as ea,JJ as pe,eZ as ft,v5 as gt,u_ as vt,JK as xt,nU as Tt,uV as yt,uT as Dt,JL as Ct,vc as Et,v9 as bt,uW as It,vb as Me,G9 as kt,JM as ta,JN as aa,cu as na,JO as sa,JP as oa,JQ as me,JR as ie,JS as ke,HK as Ke,vr as ye,HI as De,ve as wt,uO as Ge,JT as la,HL as H,JU as $e,uI as ia,JV as ca,JW as da,JX as ze,JY as Ye,JZ as qe,J_ as He,vl as we,J$ as At,v2 as jt,K0 as ra,K1 as ua,K2 as ha,K3 as pa,K4 as ma,K5 as Sa,K6 as fa,K7 as ga,si as va,sj as xa,GP as je,K8 as Ta,K9 as ya,iQ as Fe,bq as Da,Ka as Ca,Kb as Ea,kp as ba,ky as Ia,GO as Pe,bD as st,Kc as Ft,Gu as Pt,Kd as ka,Ke as wa,Kf as Aa,kA as ja,Kg as ot,Kh as lt,Ki as it,Kj as ct,Kk as Fa,kw as Pa,Kl as _a,kz as Va,Km as La,Kn as _t,H9 as Vt,jP as Ba,Ko as Oa,Kp as _e,Kq as Lt,H7 as Bt,xE as Ja,Kr as Ra,Ks as Ua,k7 as Ot,Kt as Na,Ku as Ma,Hl as Ka,p_ as Ga,Kv as Jt,Kw as dt,Hi as Ve,Kx as rt,Ky as $a,Hn as za,Kz as Ya,KA as qa,KB as Ha,KC as Wa,KD as Qa,q1 as Za,KE as Xa,HM as en,KF as tn,H0 as Le,gy as an,KG as nn,KH as sn,gw as on,KI as ln,KJ as cn,xI as dn,KK as rn,KL as un,KM as hn,KN as pn,jT as mn,bn as Sn,eU as fn,eS as gn}from"./zeni-epic-state-CrPv4S-z.js";import{z as R,an as Be,B as Rt,x as Q,c as j,X as Z,at as vn,s as N,D as Ce,H as ce,au as We,av as xn,aw as Tn,p as Qe,ax as yn,m as Dn,Z as de,A as Ze,C as ae,$,ay as Cn,i as Xe,az as En,aA as Ut,U as bn,aB as In,I as kn,aC as wn,aq as Nt,aD as An,d as W,S as jn,F as Mt,J as Fn,aE as Pn,aF as _n,f as et,aG as Vn,aH as Ln,E as Bn,aI as On,aJ as Jn}from"./index-BreaiJNl.js";import{n as U,D as Rn,S as Kt}from"./mui-BKTsYfTF.js";import{t as Un,A as Nn}from"./AddressScreen-DcX4lc_F.js";import le from"./NotFoundScreen-DnYi4Alo.js";import{F as Mn}from"./FeaturePreviewScreen-DukdbkDU.js";import{b as q,v as tt,c as Kn}from"./routePaths-D5pZG1HW.js";import{p as Gt}from"./pathToGoBack-DuG_pESe.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-Yc6V_8SE.js";import{c as fe}from"./useFetchSuggestedQuestionsWhenReady-Dl_AzQW_.js";import{M as ge}from"./MobileAppDrawer-B0SDRa0y.js";import{D as Gn}from"./DrawerScreen-DApdgXsr.js";import{g as $n,m as zn}from"./accountMappingHelper-CbeIjSvu.js";import"./recharts-DDgm0ZY-.js";import"./analytics-CX30pJB4.js";import"./plaid-BDw9fPCd.js";import"./dnd-CKKgQZIG.js";import"./stripe-DMRn4zHo.js";import"./lottie-BzC_z70r.js";import"./lexical-CMmB3hg4.js";import"./pdf-DKctSUPl.js";import"./utils-BgDKBMSG.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]="a5975762-b9be-4919-9704-948690eaf0e1",e._sentryDebugIdIdentifier="sentry-dbid-a5975762-b9be-4919-9704-948690eaf0e1")}catch{}})();const Yn=Ce.getLocalizedStrings(),qn=K(function(e,a){const s=Re(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(zt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=N(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(vn),Hn=({setShouldNavigateBack:e})=>{const a=M(),s=Y(),{scheduleDetailId:t,tenantEmailDomain:n}=J(),{scheduleType:o}=J();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>L(f)),r=Ee(o)??"accrued_expenses",h=R.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Re(f,r)),m=i.selectedJELinkRowIndex,d=S(f=>X(f,c.companyId)),u=Be(i.updateStatus.fetchState);g.useEffect(()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[u,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const p=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Rt,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(Q,{analytics:j,onLoad:()=>{Wn(i,r,d)}}):null,l.jsx(qn,{signedInUser:h,attachmentEndPoint:`${Z}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:j,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},$t=e=>{const a=Yn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Wn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some(m=>m.isRecommendedTransaction===!0),h=be(s.controllers),i=Ie(s.controllerUserIds);t!=null&&j.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...$t(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Qn=U.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
package/dist/assets/{WiseConfirmationScreen-Jo50UPm3.js → WiseConfirmationScreen-iZmAunYq.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-
|
|
1
|
+
import{j as o}from"./liveblocks-DuKOLlGn.js";import{a as c}from"./sentry-8NyHUHYi.js";import{q as u,h,g as y,N as I}from"./core-Chn6k0lm.js";import{IV as b,eP as w,yZ as x}from"./zeni-epic-state-CrPv4S-z.js";import{z as l,B as j,F as S,J as D}from"./index-BreaiJNl.js";import{n as f}from"./mui-BKTsYfTF.js";import"./recharts-DDgm0ZY-.js";import"./analytics-CX30pJB4.js";import"./plaid-BDw9fPCd.js";import"./dnd-CKKgQZIG.js";import"./stripe-DMRn4zHo.js";import"./lottie-BzC_z70r.js";import"./lexical-CMmB3hg4.js";import"./pdf-DKctSUPl.js";import"./utils-BgDKBMSG.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]="0c9e5d42-5dc9-47c4-82c9-329d772a109b",e._sentryDebugIdIdentifier="sentry-dbid-0c9e5d42-5dc9-47c4-82c9-329d772a109b")}catch{}})();const V=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=c.useState(!1),a=h(),i=y(m=>b(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),c.useEffect(()=>{n||(p(!0),a(x(t,g,s)))},[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},E=f.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
width: 100%;
|
|
4
4
|
height: 100vh;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-
|
|
1
|
+
import{j as n}from"./liveblocks-DuKOLlGn.js";import{j as Y,u as J,h as z,l as Z,g as w,k as X,N as ne,n as Ne,o as k}from"./core-Chn6k0lm.js";import{eO as _,NN as Ce,NO as Ve,ck as te,cl as $e,fb as Ze,wa as ke,An as He,w4 as Tn,NP as Bn,NQ as On,w7 as Fn,we as fe,w1 as Rn,v_ as Un,MA as le,NR as Ln,DH as zn,JG as _n,DJ as Mn,k8 as Be,NS as Nn,pF as Ge,pt as We,j$ as Ye,k2 as Oe,JH as Fe,JI as Vn,NT as $n,k1 as Zn,ko as Hn,jS as Gn,ip as Wn,io as Yn,NU as Jn,NV as ye,Do as Xn,NW as qn,NX as Kn,Mt as we,NY as Re,NZ as Qn,DU as et,Nb as nt,Bh as Je,s6 as Xe,N_ as tt,DR as at,N$ as qe,cM as De,DY as Ke,fc as ot,eS as Qe,eU as Ae,DW as st,Bb as rt,DO as it,O0 as en,O1 as nn,Dq as tn,DA as Ue,O2 as ct,Du as lt,O3 as dt,N0 as ut,DZ as pt,bv as mt,bE as ht,cw as gt,bF as ft,bs as yt,IC as xt}from"./zeni-epic-state-CrPv4S-z.js";import{I as ae,C as V,z as A,$ as B,m as M,B as de,bQ as Ct,X as Ie,Z as N,A as q,p as an,an as kt,ac as Le,c as R,bR as wt,aq as Se,bS as Dt,x as ue,bT as At,f as be,aK as W,bU as It,U as St,a9 as bt,bV as ze,bW as vt,s as ee,bX as Et,bY as jt,bZ as Pt,b_ as Tt,a6 as Bt,d as Ot}from"./index-BreaiJNl.js";import{n as U,D as K,S as Q}from"./mui-BKTsYfTF.js";import ce from"./NotFoundScreen-DnYi4Alo.js";import{S as _e}from"./SetupPagesScreen-C4GjXjRP.js";import{F as on}from"./FeaturePreviewScreen-DukdbkDU.js";import{a as u}from"./sentry-8NyHUHYi.js";import{M as pe}from"./MobileAppDrawer-B0SDRa0y.js";import{A as Ft,D as Rt,V as Ut}from"./DomesticWireDetailScreen-CwGd9Q26.js";import{A as Lt}from"./AddressScreen-DcX4lc_F.js";import{u as sn}from"./useAskAiCfoHostNavButtonProps-Yc6V_8SE.js";import{c as rn}from"./useFetchSuggestedQuestionsWhenReady-Dl_AzQW_.js";import{Z as zt}from"./ZeniAccountStatementScreen-DLzmrfoy.js";import"./recharts-DDgm0ZY-.js";import"./analytics-CX30pJB4.js";import"./plaid-BDw9fPCd.js";import"./dnd-CKKgQZIG.js";import"./stripe-DMRn4zHo.js";import"./lottie-BzC_z70r.js";import"./lexical-CMmB3hg4.js";import"./pdf-DKctSUPl.js";import"./utils-BgDKBMSG.js";import"./analyticsHelper-SG8tB9jY.js";import"./routePaths-D5pZG1HW.js";import"./BusinessVerificationPageScreen-B-O4fGng.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]="efa973c2-e8e2-4234-83e4-ce977174410d",e._sentryDebugIdIdentifier="sentry-dbid-efa973c2-e8e2-4234-83e4-ce977174410d")}catch{}})();const _t=U.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-
|
|
1
|
+
import{j as i}from"./liveblocks-DuKOLlGn.js";import{a as u}from"./sentry-8NyHUHYi.js";import{j as x,h as $,u as j,l as B,g as p}from"./core-Chn6k0lm.js";import{HS as s,HR as v,O4 as C,eO as T,O5 as z}from"./zeni-epic-state-CrPv4S-z.js";import{Z as D,aq as g,m as E,z as L,B as P,b$ as N,p as O}from"./index-BreaiJNl.js";import{n as _}from"./mui-BKTsYfTF.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]="f9d43557-a8cf-4de4-a943-c95937b0da19",e._sentryDebugIdIdentifier="sentry-dbid-f9d43557-a8cf-4de4-a943-c95937b0da19")}catch{}})();const U=_.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|