PageSourceSearch

https://equilybrium.health/assets/ProjectionsPage-BxCzsan8.js

js equilybrium.health collected 2026-09-24 15:02:32 UTC 4,997 bytes, 1 lines download raw bytes

1var L=Object.defineProperty;var C=Object.getOwnPropertySymbols;var O=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable;var S=(t,n,s)=>n in t?L(t,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[n]=s,T=(t,n)=>{for(var s in n||(n={}))O.call(n,s)&&S(t,s,n[s]);if(C)for(var s of C(n))Y.call(n,s)&&S(t,s,n[s]);return t};import{r as u,j as e}from"./react-vendor-BEafpyAm.js";import{u as H,C as V,e as J,f as R,S as A,k as E,l as M,m as D,n as d,i as F,t as k}from"./index-UpiwJGUq.js";import{T as q,a as G,b as x,c as l,d as I,e as r}from"./table-BQSg_nPU.js";import{a as K,e as z}from"./useBudget-Bwi7Q4ID.js";import{C as m}from"./CurrencyDisplay-qcC-h_j9.js";import{M as Q}from"./MultiYearProjectionChart-Dw6B49Dr.js";import"./crypto-vendor-DdVgyv-Y.js";import"./react-query-vendor-BhLAuXR4.js";import"./recharts-vendor-C3BwgIm8.js";import"./icons-vendor-CNOaxIm9.js";import"./supabase-vendor-DUUDoC-1.js";import"./date-fns-core-p4ULazqZ.js";import"./date-fns-locales-Csbs7Iu2.js";import"./useAnalytics-KuDPi4lL.js";const U=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],W={revenue:"financial.budget.cat.revenue",people:"financial.budget.cat.people",cogs:"financial.budget.cat.cogs",direct_expense:"financial.budget.cat.directExpense",indirect_expense:"financial.budget.cat.indirectExpense",other_expense:"financial.budget.cat.otherExpense",tax:"financial.budget.cat.tax",sales:"financial.budget.cat.sales",investment:"financial.budget.cat.investment"},xe=()=>{var f,b;const{t}=H(),n=new Date().getFullYear(),{data:s}=K(n),[j,P]=u.useState("base"),[_,B]=u.useState((f=s==null?void 0:s.current_month)!=null?f:4),p=(b=s==null?void 0:s.current_month)!=null?b:_,{data:o,isLoading:h}=z(n,p,j),g=u.useMemo(()=>{const a=new Map;return(o!=null?o:[]).forEach(c=>{var y,v,N;let i=a.get(c.category);i||(i={planned:0,actual:0,projected:0},a.set(c.category,i)),i.planned+=Number((y=c.planned)!=null?y:0),i.actual+=Number((v=c.actual)!=null?v:0),i.projected+=Number((N=c.projected)!=null?N:0)}),Array.from(a.entries()).map(([c,i])=>T({category:c},i))},[o]);return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-semibold text-gray-900",children:t("financial.projections.title")}),e.jsx("p",{className:"text-sm text-gray-500",children:t("financial.projections.subtitle")})]}),e.jsxs(V,{children:[e.jsx(J,{children:e.jsxs("div",{className:"flex items-start justify-between flex-wrap gap-3",children:[e.jsxs("div",{children:[e.jsxs(R,{children:[t("financial.projections.annualObjectiveTitle")," ",n]}),e.jsx("p",{className:"text-sm text-gray-500 max-w-2xl mt-1",children:t("financial.projections.annualObjectiveSubtitle")})]}),e.jsxs("div",{className:"flex flex-wrap gap-3 items-center",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-gray-500",children:t("financial.budget.currentMonth")}),e.jsxs(A,{value:String(p),onValueChange:a=>B(Number(a)),children:[e.jsx(E,{className:"w-24",children:e.jsx(M,{})}),e.jsx(D,{children:U.map((a,c)=>e.jsx(d,{value:String(c+1),children:a},c))})]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-gray-500",children:t("financial.projections.scenarioCol")}),e.jsxs(A,{value:j,onValueChange:a=>P(a),children:[e.jsx(E,{className:"w-32",children:e.jsx(M,{})}),e.jsxs(D,{children:[e.jsx(d,{value:"base",children:"Base"}),e.jsx(d,{value:"optimistic",children:"Optimistic"}),e.jsx(d,{value:"pessimistic",children:"Pessimistic"})]})]})]})]})]})}),e.jsx(F,{children:e.jsxs(q,{children:[e.jsx(G,{children:e.jsxs(x,{children:[e.jsx(l,{children:t("financial.projections.category")}),e.jsx(l,{className:"text-right",children:t("financial.budget.totalPlanned")}),e.jsx(l,{className:"text-right",children:t("financial.projections.actualYTD")}),e.jsx(l,{className:"text-right",children:t("financial.projections.projectedYE")}),e.jsx(l,{className:"text-right",children:t("financial.projections.deltaVsPlanned")})]})}),e.jsxs(I,{children:[h&&e.jsx(x,{children:e.jsx(r,{colSpan:5,className:"text-center text-gray-400 py-8",children:t("common.loading")})}),!h&&g.length===0&&e.jsx(x,{children:e.jsx(r,{colSpan:5,className:"text-center text-gray-400 py-8",children:t("financial.budget.noLines")})}),g.map(a=>{const c=a.projected-a.planned;return e.jsxs(x,{children:[e.jsx(r,{className:"font-medium",children:t(W[a.category])}),e.jsx(r,{className:"text-right font-mono",children:e.jsx(m,{value:a.planned,currency:"CAD",compact:!0})}),e.jsx(r,{className:"text-right font-mono text-equilybrium-navy",children:e.jsx(m,{value:a.actual,currency:"CAD",compact:!0})}),e.jsx(r,{className:"text-right font-mono font-semibold",children:e.jsx(m,{value:a.projected,currency:"CAD",compact:!0})}),e.jsx(r,{className:"text-right font-mono",children:e.jsx(k,{variant:Math.abs(c)<a.planned*.05?"secondary":c>0?"default":"destructive",children:e.jsx(m,{value:c,currency:"CAD",compact:!0,showSign:!0})})})]},a.category)})]})]})})]}),e.jsx(Q,{})]})};export{xe as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.