1try{!function(){var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5d489073-cf31-4aa1-87e1-571ae0d5698b",e._sentryDebugIdIdentifier="sentry-dbid-5d489073-cf31-4aa1-87e1-571ae0d5698b")}()}catch(e){}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[89235],{5246:(e,t,n)=>{"use strict";n.d(t,{_:()=>j});var a=n(95155),i=n(91227),r=n(35678),o=n(76655),s=n(26977),l=n(96276),d=n(78955),c=n(20020),u=n(16225),_=n(8607),m=n(51071),v=n(70730),g=n(43871),p=n(60994),h=n(95555),f=n(83234),y=n.n(f),b=n(36436),w=n.n(b);let E={[_.Mw.ONE_TIME]:"One-time",[_.Mw.MONTHLY]:"Monthly",[_.Mw.QUARTERLY]:"Quarterly",[_.Mw.BIANNUALLY]:"Biannually",[_.Mw.ANNUALLY]:"Annually"};function j(e){let{isOpen:t,onOpenChange:n,onAddEvent:l,onEditEvent:g}=e,{data:p=[],isLoading:f}=u.w7.useGetForecastingEventsQuery(),b=v.yx.today().toTimestamp(),E=[...p].sort((e,t)=>e.date-t.date),j=E.filter(e=>e.frequency!==_.Mw.ONE_TIME||e.date>=b),N=E.filter(e=>e.frequency===_.Mw.ONE_TIME&&e.date<b);return(0,a.jsx)(i.aF,{isDismissable:!0,isOpen:t,onOpenChange:n,className:(0,c.I)(y().sidemodal,y().sidemodal_editable),children:(0,a.jsx)(r.lG,{className:w().dialog_container,children:e=>{let{close:t}=e;return(0,a.jsxs)("div",{className:w().container,children:[(0,a.jsx)("div",{children:(0,a.jsx)(o.$,{onPress:t,className:(0,c.I)("alb-btn-empty",y().close_icon),children:(0,a.jsx)(d.gc,{icon:s.u3t})})}),(0,a.jsx)("div",{className:w().scrollable_content,children:(0,a.jsxs)("div",{className:y().modal_content,children:[(0,a.jsx)(h.H3,{margins:!0,children:m.A.EventListSideModal.title}),f?(0,a.jsx)(h.P,{children:m.A.EventListSideModal.loading}):0===j.length&&0===N.length?(0,a.jsx)("div",{className:w().empty_state,children:(0,a.jsx)(h.P,{children:m.A.EventListSideModal.emptyState})}):(0,a.jsx)(a.Fragment,{children:j.length>0&&(0,a.jsx)("div",{className:w().events_list,children:j.map(e=>(0,a.jsx)(x,{event:e,onPress:()=>g(e)},e.id))})}),!f&&N.length>0&&(0,a.jsxs)("div",{className:w().past_events_section,children:[(0,a.jsx)("div",{className:w().past_events_title,children:m.A.EventListSideModal.pastEventsTitle}),(0,a.jsx)("div",{className:w().events_list,children:N.map(e=>(0,a.jsx)(x,{event:e,onPress:()=>g(e)},e.id))})]})]})}),(0,a.jsx)(o.$,{className:(0,c.I)("react-aria-Button","alb-btn-blue",w().add_event_button),onPress:l,children:m.A.EventListSideModal.addEvent})]})}})})}function x(e){let{event:t,onPress:n}=e;return(0,a.jsxs)(o.$,{className:(0,c.I)(w().event_row,!t.is_included&&w().event_row_excluded),onPress:n,children:[(0,a.jsxs)("div",{className:w().event_row_left,children:[(0,a.jsx)("div",{className:w().event_row_emoji,children:t.emoji}),(0,a.jsxs)("div",{className:w().event_row_text,children:[(0,a.jsxs)("div",{className:w().event_row_title_row,children:[(0,a.jsx)("span",{className:w().event_row_title,children:t.name}),!1===t.is_owner&&(0,a.jsx)(d.gc,{icon:l.USd,className:w().event_row_badge_icon,size:"2xs"}),t.frequency!==_.Mw.ONE_TIME&&(0,a.jsx)(d.gc,{icon:s.$3Z,className:w().event_row_badge_icon,size:"2xs"})]}),(0,a.jsx)("span",{className:w().event_row_date,children:t.frequency===_.Mw.ONE_TIME?(0,a.jsx)(p.o,{timestamp:t.date,fmt:v.BU.dateLongMonthShort}):(0,a.jsxs)(a.Fragment,{children:[E[t.frequency]," \xb7 ".concat(m.A.EventListSideModal.starting," "),(0,a.jsx)(p.o,{timestamp:t.date,fmt:v.BU.dateLongMonthShort})]})})]})]}),(0,a.jsxs)("div",{className:w().event_row_right,children:[(0,a.jsx)(g.p,{amount:t.amount,rounded:!0,showPlus:t.event_type===_.sr.INCOME,className:w().event_row_amount}),(0,a.jsx)(d.gc,{icon:s.XkK,className:w().event_row_chevron})]})]})}},6535:e=>{e.exports={date:"CalendarDateInput_date__PXrKQ",simple:"CalendarDateInput_simple__SZREs",pill:"CalendarDateInput_pill__E9IJe",pill_chevron:"CalendarDateInput_pill_chevron__jiPIX",calendar:"CalendarDateInput_calendar__KESUZ",nav_button:"CalendarDateInput_nav_button___iSAj",today_row:"CalendarDateInput_today_row__fBaQw",today:"CalendarDateInput_today__YZeXU"}},8607:(e,t,n)=>{"use strict";n.d(t,{H9:()=>a,Mw:()=>o,k2:()=>i,sr:()=>r,tq:()=>s});var a=function(e){return e.ONE_YEAR="1_year",e.TWO_YEARS="2_years",e.FIVE_YEARS="5_years",e}({}),i=function(e){return e.CASH="cash",e.INVESTMENTS="investments",e.RETIREMENT="retirement",e.PRIVATE="private",e.REAL_ESTATE="real_estate",e.CREDIT_CARDS="credit_cards",e.LOANS="loans",e}({}),r=function(e){return e.EXPENSE="expense",e.INCOME="income",e.TRANSFER="transfer",e}({}),o=function(e){return e.ONE_TIME="one_time",e.MONTHLY="monthly",e.QUARTERLY="quarterly",e.BIANNUALLY="biannually",e.ANNUALLY="annually",e}({}),s=function(e){return e.UPDATE="update_view",e.CREATE="create_view",e}({})}
1,9300:e=>{e.exports={budget:"budget_budget__EF9vU",budget_page_header:"budget_budget_page_header__Gcq57",page_header_setting:"budget_page_header_setting__WknJo",header_right:"budget_header_right__5YrZz",budget_contents:"budget_budget_contents__XElfS",loader_ellipsis:"budget_loader_ellipsis__sSLNF",header_row:"budget_header_row__hSax2",sort:"budget_sort__57spv",icon:"budget_icon___Wo8b",header_sticky:"budget_header_sticky__BXeJA",manage_categories:"budget_manage_categories__xgVWs",budget_table_row:"budget_budget_table_row__oWsW7",opens_category_panel:"budget_opens_category_panel__RpkRj",budget_item:"budget_budget_item__2OS7R",component_dollar:"budget_component_dollar__l3OJl",totals_row:"budget_totals_row__2QJzV",total_amount:"budget_total_amount__4DI63",excluded_section_header:"budget_excluded_section_header__TEVtk",summary_card_container:"budget_summary_card_container__ZYB2B",auto_set_budget_btn:"budget_auto_set_budget_btn__CWo8r",info_icon:"budget_info_icon__05reV",auto_budget_spinner:"budget_auto_budget_spinner__cTNtc"}},9596:e=>{e.exports={emoji_selector:"EmojiSelector_emoji_selector__0WIrp",emoji_button:"EmojiSelector_emoji_button__ZqXtX",emoji_error:"EmojiSelector_emoji_error__Hascx",emoji_button_small:"EmojiSelector_emoji_button_small__NJ_zs",emoji_display:"EmojiSelector_emoji_display__PRTt6",emoji_display_small:"EmojiSelector_emoji_display_small__uPW5o",emoji_picker_container:"EmojiSelector_emoji_picker_container__ijm7s"}},12596:(e,t,n)=>{"use strict";n.d(t,{Q:()=>et});var a=n(95155),i=n(12115),r=n(91227),o=n(35678),s=n(76655),l=n(90896),d=n(96447),c=n(26977),u=n(78955),_=n(20020),m=n(16225),v=n(58785),g=n(51071),p=n(68868),h=n(33857),f=n(9956),y=n(8607),b=n(70730),w=n(54564),E=n(9833),j=n(24577),x=n(83234),N=n.n(x);function S(e){let{value:t,options:n,onSelectionChange:i,isEditable:r=!0,className:o,hasError:l=!1}=e,d=n.find(e=>e.value===t),m=(null==d?void 0:d.label)||t;return(0,a.jsxs)(E.cQ,{children:[(0,a.jsxs)(s.$,{"aria-label":"Select option",className:(0,_.I)("alb-btn-empty",N().details_dropdown,o,l&&N().error),children:[m,r&&(0,a.jsxs)(a.Fragment,{children:["\xa0",(0,a.jsx)(u.gc,{icon:c.Jt$,className:N().icon})]})]}),r&&(0,a.jsx)(j.A,{placement:"bottom right",children:(0,a.jsx)(E.W1,{onAction:e=>i(e),className:"react-aria-Menu menu-wide",children:n.map(e=>(0,a.jsx)(E.Dr,{id:e.value,children:e.label},e.value))})})]})}var M=n(95555),F=n(68299),A=n.n(F);function T(e){let{label:t,children:n,error:i}=e;return(0,a.jsxs)("div",{className:A().form_field,children:[(0,a.jsx)("div",{className:A().label,children:t}),(0,a.jsxs)("div",{className:A().input_container,children:[(0,a.jsx)("div",{className:A().input_wrapper,children:n}),i&&(0,a.jsx)(M.P,{className:A().error_text,children:i})]})]})}var C=n(34304),D=n.n(C);function L(e){let{formData:t,onChange:n,errors:i,amountField:r}=e;return(0,a.jsxs)("div",{className:D().event_form,children:[(0,a.jsx)(T,{label:t.frequency===y.Mw.ONE_TIME?"Date":"Start date",error:null==i?void 0:i.date,children:(0,a.jsx)(w.A,{"aria-label":"Event date",value:t.date.toString(b.BU.dateStandard),onChange:e=>{if(e){let t=b.yx.fromDateString(e);t&&n({date:t})}},variant:"simple"})}),(0,a.jsx)(T,{label:"Amount",error:null==i?void 0:i.amount,children:(0,a.jsxs)("div",{className:D().editable_amount_container,children:[(0,a.jsx)("span",{className:D().dollar_prefix,children:"$"}),(0,a.jsx)(f.Ay,{ref:null==r?void 0:r.ref,className:D().editable_amount_input,value:t.amount,onValueChange:e=>{n({amount:e?parseFloat(e):0})},onFocus:null==r?void 0:r.onFocus,onBlur:null==r?void 0:r.onBlur,onKeyDown:null==r?void 0:r.onKeyDown,placeholder:"0.00",decimalsLimit:2,allowNegativeValue:!1,maxLength:10})]})}),(0,a.jsx)(T,{label:"Type",children:(0,a.jsx)(S,{value:t.type,options:I,onSelectionChange:e=>n({type:e}),className:D().dropdown})}),(0,a.jsx)(T,{label:"Frequency",children:(0,a.jsx)(S,{value:t.frequency,options:q,onSelectionChange:e=>n({frequency:e}),className:D().dropdown})})]})}let I=[{value:y.sr.EXPENSE,label:"Expense"},{value:y.sr.INCOME,label:"Income"}],q=[{value:y.Mw.ONE_TIME,label:"One-time"},{value:y.Mw.MONTHLY,label:"Monthly"},{value:y.Mw.QUARTERLY,label:"Quarterly"},{value:y.Mw.BIANNUALLY,label:"Biannually"},{value:y.Mw.ANNUALLY,label:"Annually"}];var P=n(50343),R=n(35184),O=n(94307),k=n(65506),B=n(57563);let U=new Map,V={emoji:"\uD83D\uDCC5",title:"",date:()=>b.yx.today().daysFuture(1),amount:0,type:y.sr.EXPENSE,frequency:y.Mw.ONE_TIME};function Y(e,t){var n,a,i;let r;if(null==e?void 0:e.start_date)r=b.yx.fromTimestampAsUtc(e.start_date);else if(null==e?void 0:e.date)r=b.yx.fromTimestampAsUtc(e.date);else if(t){let e=b.yx.fromDateString(t);r=null!=e?e:V.date()}else r=V.date();return{emoji:(null==e?void 0:e.emoji)||V.emoji,title:(null==e?void 0:e.name)||V.title,formData:{date:r,amount:null!=(n=null==e?void 0:e.amount)?n:V.amount,type:null!=(a=null==e?void 0:e.event_type)?a:V.type,frequency:null!=(i=null==e?void 0:e.frequency)?i:V.frequency}}}function G(e){let t=e;for(;U.has(t);)t=U.get(t);return t}var Q=n(46351),W=n(92854),X=n(56407),H=n(9596),Z=n.n(H),$=n(35800);function J(e){let{emoji:t,onEmojiSelect:n,isOpen:r,onOpenChange:o,hasError:l=!1,className:d,size:c="default"}=e,u=(0,i.useRef)(null),m=(0,i.useRef)(null),v=(0,$.d)(),[g,p]=(0,i.useState)({top:0,left:0});return(0,i.useEffect)(()=>
1{if(r&&u.current){let e=u.current.getBoundingClientRect();p({top:e.bottom+8,left:e.left})}},[r]),(0,P.Zk)(m,u,o),(0,a.jsxs)("div",{className:(0,_.I)(Z().emoji_selector,d),children:[(0,a.jsx)(s.$,{ref:u,className:(0,_.I)("alb-btn-empty",Z().emoji_button,"small"===c&&Z().emoji_button_small,l&&Z().emoji_error),onPress:()=>o(!r),children:(0,a.jsx)("span",{className:(0,_.I)(Z().emoji_display,"small"===c&&Z().emoji_display_small),children:t})}),r&&(0,a.jsx)("div",{ref:m,className:Z().emoji_picker_container,style:{position:"fixed",top:g.top,left:g.left},children:(0,a.jsx)(X.Ay,{onEmojiClick:e=>{n(e.emoji),o(!1)},theme:"dark"===v?X.Sx.DARK:X.Sx.LIGHT})})]})}var z=n(61916),K=n(18408),ee=n.n(K);function et(e){let{isOpen:t,onOpenChange:n,eventData:i,onBack:s}=e;return(0,a.jsx)(r.aF,{isDismissable:!0,isOpen:t,onOpenChange:e=>n(e),className:(0,_.I)(N().sidemodal,N().sidemodal_editable),children:(0,a.jsx)(o.lG,{children:t=>{let{close:n}=t;return(0,a.jsx)(en,{...e,eventData:null!=i?i:null,onClose:n,onBack:s})}})})}function en(e){var t;let{eventData:n,onOpenChange:r,initialDate:o,onBack:f,onClose:y}=e,w=g.A.EventSideModal,E=!!n,{data:j}=m.w7.useGetForecastingEventsQuery(void 0,{selectFromResult:e=>{let{data:t}=e;return{data:null==t?void 0:t.find(e=>e.id===(null==n?void 0:n.id))}},skip:!(null==n?void 0:n.id)}),[x,{error:S}]=m.w7.useCreateForecastingEventMutation(),[F]=m.w7.useDeleteForecastingEventMutation();(0,P.dG)(S);let{emoji:A,title:T,formData:C,isEmojiPickerOpen:D,setIsEmojiPickerOpen:I,alertModal:q,titleField:V,amountField:X,handleEmojiSelect:H,handleTitleChange:Z,handleTitleFocus:$,handleTitleBlur:K,handleFormChange:et,handleDelete:en,resetToDefaults:ea,saveEdit:ei}=function(e){var t,n;let{event:a,onDeleted:r,initialDate:o}=e,{modal:s,openModal:l}=(0,k.ZL)(),[d]=m.w7.useCreateForecastingEventMutation(),[c,{error:u}]=m.w7.useUpdateForecastingEventMutation(),[_,{error:v}]=m.w7.useDeleteForecastingEventMutation();(0,P.dG)(u),(0,P.dG)(v);let h=Y(a,o),[f,y]=(0,i.useState)(h.emoji),[w,E]=(0,i.useState)(h.title),[j,x]=(0,i.useState)(!1),[N,S]=(0,i.useState)(h.formData),M=(0,i.useRef)(!0),F=e=>{void 0!==e.emoji&&y(e.emoji),void 0!==e.name&&E(e.name),S(t=>{var n;return{...t,...void 0!==e.date?{date:null!=(n=b.yx.fromDateString(e.date))?n:t.date}:{},...void 0!==e.amount?{amount:e.amount}:{},...void 0!==e.event_type?{type:e.event_type}:{},...void 0!==e.frequency?{frequency:e.frequency}:{}}})},A=e=>(F(e),(null==a?void 0:a.id)&&!M.current?c({eventId:G(a.id),updates:e}):{error:"No event loaded"}),T=async e=>{let{prev:t,next:n}=e;(null==a?void 0:a.id)&&!M.current&&(await R.Vg.run({banner:p.t.forecastingEvent,apply:A,prev:t,next:n})||F(t))},C=(0,O.q)({banner:p.t.forecastingEvent,value:null!=(t=null==a?void 0:a.name)?t:"",apply:e=>A({name:e}),debounceMs:500}),D=(0,O.q)({banner:p.t.forecastingEvent,value:null!=(n=null==a?void 0:a.amount)?n:0,apply:e=>A({amount:e}),debounceMs:500});return(0,i.useEffect)(()=>{let e=Y(a,o);y(e.emoji),E(e.title),S(e.formData),M.current=!0,queueMicrotask(()=>{M.current=!1})},[a,o]),{emoji:f,title:w,formData:N,isEmojiPickerOpen:j,setIsEmojiPickerOpen:x,alertModal:s,titleField:C,amountField:D,handleEmojiSelect:e=>{y(e),T({prev:{emoji:f},next:{emoji:e}})},handleTitleChange:e=>{E(e),C.onChange(e)},handleTitleFocus:()=>{a&&C.onFocus()},handleTitleBlur:()=>{""===w.trim()&&(null==a?void 0:a.name)&&(E(a.name),C.onChange(a.name)),C.onBlur()},handleFormChange:e=>{S(t=>({...t,...e})),void 0!==e.amount&&D.onChange(e.amount);let t={},n={};e.date&&(t.date=N.date.toString(),n.date=e.date.toString()),e.type&&(t.event_type=N.type,n.event_type=e.type),e.frequency&&(t.frequency=N.frequency,n.frequency=e.frequency),Object.keys(n).length>0&&T({prev:t,next:n})},handleDelete:()=>{(null==a?void 0:a.id)&&l({...g.A.DeleteEventModal,action:async()=>{let{error:e}=await _(a.id);e||(R.Vg.record({banner:p.t.forecastingEvent,async undo(){var e,t;let n=await d({name:(e=a).name,emoji:e.emoji,date:b.yx.fromTimestampAsUtc(null!=(t=e.start_date)?t:e.date).toString(),amount:e.amount,event_type:e.event_type,frequency:e.frequency});if(n.error)return n;if(U.set(a.id,n.data.id),!a.included_in_forecast){let e=await c({eventId:n.data.id,updates:{included_in_forecast:!1}});e.error&&B.v.error(e.error)}return n},redo:()=>_(G(a.id))}),null==r||r())}})},resetToDefaults:()=>{let e=Y(null,o);y(e.emoji),E(e.title),S(e.formData)},saveEdit:T}}({event:n,onDeleted:()=>r(!1),initialDate:o}),[er,eo]=(0,i.useState)({}),[es,el]=(0,i.useState)(!1),ed=async()=>{let e={};if(T&&""!==T.trim()||(e.title=w.titleRequired),A&&""!==A||(e.emoji=w.emojiRequired),C.amount<0&&(e.amount=w.amountRequired),Object.keys(e).length>0)return void eo(e);let t={name:T,emoji:A,date:C.date.toString(),amount:C.amount,event_type:C.type,frequency:C.frequency};el(!0);let{data:n,error:a}=await x(t);el(!1),a||(R.Vg.record({banner:p.t.forecastingEvent,undo:()=>F(G(n.id)),async redo(){let e=await x(t);return e.error||U.set(n.id,e.data.id),e}}
1),ea(),eo({}),f?f():r(!1))};return(0,a.jsxs)(a.Fragment,{children:[q,(0,a.jsxs)("div",{className:ee().event_modal_container,children:[(0,a.jsxs)("div",{children:[(0,a.jsx)(s.$,{onPress:null!=f?f:y,className:(0,_.I)("alb-btn-empty",N().close_icon),children:(0,a.jsx)(u.gc,{icon:f?c.Wzs:c.u3t})}),E&&(0,a.jsx)(W.s2,{label:w.delete,action:en})]}),(0,a.jsx)("div",{className:ee().scrollable_content,children:(0,a.jsxs)("div",{className:N().modal_content,children:[(0,a.jsxs)("div",{className:ee().event_header_section,children:[(0,a.jsx)("div",{className:ee().emoji_section,children:(0,a.jsx)(J,{emoji:A,onEmojiSelect:E?H:e=>{H(e),eo(e=>({...e,emoji:void 0}))},isOpen:D,onOpenChange:I,hasError:!!er.emoji})}),(0,a.jsx)("div",{className:ee().title_section,children:(0,a.jsxs)(l.A,{className:ee().title_field,children:[(0,a.jsx)(d.p,{ref:V.ref,className:(0,_.I)(ee().title_input,er.title&&ee().input_error),value:T,onChange:e=>{var t;Z(t=e.target.value),""!==t.trim()&&eo(e=>({...e,title:void 0}))},onFocus:$,onBlur:K,placeholder:w.titlePlaceholder,maxLength:50}),er.title&&(0,a.jsx)("span",{className:ee().error_text,children:er.title})]})})]}),(0,a.jsx)(M.H6,{margins:!0,className:(0,_.I)(N().header,ee().details_header),children:"Details"}),(0,a.jsx)(L,{formData:C,onChange:E?et:e=>{et(e),void 0!==e.amount&&eo(e=>({...e,amount:void 0}))},errors:er,amountField:E?X:void 0}),E&&(0,a.jsxs)("div",{className:ee().toggle_row,children:[(0,a.jsx)(M.H5,{children:w.includedInForecast}),(0,a.jsx)("div",{className:N().toggle_item,children:(0,a.jsx)(W.lM,{isChecked:null==(t=null==j?void 0:j.included_in_forecast)||t,isControlled:!0,id:"included_in_forecast",onChange:e=>ei({prev:{included_in_forecast:!e.target.checked},next:{included_in_forecast:e.target.checked}})})})]}),(null==n?void 0:n.id)&&(0,a.jsx)(z.A,{scope:(0,Q.ot)(v.S.forecasting_event,n.id),emptyDescription:h.A.EmptyDescription.forecastingEvent,className:ee().notes})]})}),!E&&(0,a.jsx)("div",{className:ee().action_button_container,children:(0,a.jsx)(s.$,{className:(0,_.I)("react-aria-Button",ee().primary_action_button),onPress:ed,isDisabled:es,children:es?w.creating:w.createEvent})})]})]})}},16225:(e,t,n)=>{"use strict";n.d(t,{OX:()=>d,Z0:()=>h,w7:()=>_});var a=n(41811),i=n(71821),r=n(75723),o=n(8607),s=n(70730),l=n(77132);let d={12:"1yr",24:"2yr",60:"5yr"},c=Object.values(d);function u(e){var t=l.vm.financial_outlook_summary;for(let n of c)e(r.s1.util.updateQueryData("getCanvas",{prompt:t,key:n},e=>{e.is_active=!1}))}let _=i.F.injectEndpoints({endpoints:e=>({getForecast:e.query({query:()=>({url:(0,a.yP)(i.v.forecastingData)}),transformResponse:e=>({starting_balance:e.starting_balance,projected_balances:function(e){return e.timestamps.map((t,n)=>({timestamp:t,cash:e.cash[n],investments:e.investments[n],real_estate:e.real_estate[n],retirement:e.retirement[n],private:e.private[n],credit_cards:e.credit_cards[n],loans:e.loans[n],budgets:e.budgets[n],events:e.events[n],net_worth:e.net_worth[n]}))}(e.projected_balances),projected_cash_flow:e.projected_cash_flow}),providesTags:["forecastingData"]}),getForecastingEvents:e.query({query:()=>(0,a.yP)(i.v.forecastingEvents),providesTags:["forecastingEvents"]}),getForecastingEvent:e.query({query:e=>(0,a.yP)(i.v.forecastingEvent,{event_id:e}),providesTags:(e,t,n)=>[{type:"forecastingEvents",id:n}]}),createForecastingEvent:e.mutation({query:e=>({url:(0,a.yP)(i.v.forecastingEvents),method:"POST",body:e}),onQueryStarted:m,invalidatesTags:["forecastingEvents","forecastingData"]}),updateForecastingEvent:e.mutation({query(e){let{eventId:t,updates:n}=e;return{url:(0,a.yP)(i.v.forecastingEvent,{event_id:t}),method:"PUT",body:n}},onQueryStarted:v,invalidatesTags:(e,t,n)=>{let{eventId:a}=n;return[{type:"forecastingEvents",id:a},"forecastingEvents","forecastingData"]}}),deleteForecastingEvent:e.mutation({query:e=>({url:(0,a.yP)(i.v.forecastingEvent,{event_id:e}),method:"DELETE"}),onQueryStarted:g,invalidatesTags:["forecastingEvents","forecastingData"]}),getGrowthAssumptions:e.query({query:()=>(0,a.yP)(i.v.forecastingGrowthAssumptions),providesTags:["forecastingAssumptions"]}),updateGrowthAssumptions:e.mutation({query:e=>({url:(0,a.yP)(i.v.forecastingGrowthAssumptions),method:"PUT",body:e}),onQueryStarted:p,invalidatesTags:["forecastingData"]}),resetGrowthAssumptions:e.mutation({query:()=>({url:(0,a.yP)(i.v.forecastingGrowthAssumptions),method:"DELETE"}
1),onQueryStarted:f,invalidatesTags:["forecastingAssumptions","forecastingData"]})})});async function m(e,t){let{dispatch:n,queryFulfilled:a}=t,i=n(_.util.updateQueryData("getForecastingEvents",void 0,t=>{let n=e.frequency||o.Mw.ONE_TIME,a=s.yx.fromDateString(e.date);a&&t.push({id:-Date.now(),user_id:0,name:e.name,emoji:e.emoji,date:a.getTime()/1e3,amount:e.amount,event_type:e.event_type||o.sr.EXPENSE,frequency:n,created_timestamp:Date.now()/1e3,is_owner:!0,included_in_forecast:!0,is_included:!0})}));try{await a,u(n)}catch(e){i.undo()}}async function v(e,t){let{eventId:n,updates:a}=e,{dispatch:i,queryFulfilled:r}=t,o=i(_.util.updateQueryData("getForecastingEvents",void 0,e=>{let t=e.find(e=>e.id===n);if(!t)return;let{date:i,...r}=a;if(Object.assign(t,r),void 0!==i){let e=s.yx.fromDateString(i);e&&(t.date=e.getTime()/1e3)}t.is_included=t.included_in_forecast}));try{await r,u(i)}catch(e){o.undo()}}async function g(e,t){let{dispatch:n,queryFulfilled:a}=t,i=n(_.util.updateQueryData("getForecastingEvents",void 0,t=>{let n=t.findIndex(t=>t.id===e);-1!==n&&t.splice(n,1)}));try{await a,u(n)}catch(e){i.undo()}}async function p(e,t){let{dispatch:n,queryFulfilled:a}=t,i=n(_.util.updateQueryData("getGrowthAssumptions",void 0,t=>{Object.assign(t,e)}));try{let{data:e}=await a;n(_.util.updateQueryData("getGrowthAssumptions",void 0,()=>e)),u(n)}catch(e){i.undo()}}let h={cash_growth_rate:.025,investment_growth_rate:.05,retirement_growth_rate:.05,private_growth_rate:0,real_estate_growth_rate:.03,credit_card_growth_rate:0,loans_growth_rate:-.06};async function f(e,t){let{dispatch:n,queryFulfilled:a}=t,i=n(_.util.updateQueryData("getGrowthAssumptions",void 0,e=>{Object.assign(e,h)}));try{await a,u(n)}catch(e){i.undo()}}},18408:e=>{e.exports={event_modal_container:"ForecastingEventSideModal_event_modal_container___2lwH",scrollable_content:"ForecastingEventSideModal_scrollable_content__YSrVK",title_section:"ForecastingEventSideModal_title_section__du2xW",title_field:"ForecastingEventSideModal_title_field__e1Uj3",title_input:"ForecastingEventSideModal_title_input__ZWsZT",input_error:"ForecastingEventSideModal_input_error__6DL7L",event_header_section:"ForecastingEventSideModal_event_header_section__mY1yp",emoji_section:"ForecastingEventSideModal_emoji_section__5otXY",error_text:"ForecastingEventSideModal_error_text__rat5Y",toggle_row:"ForecastingEventSideModal_toggle_row__1_eMb",notes:"ForecastingEventSideModal_notes__wGPXJ",details_header:"ForecastingEventSideModal_details_header__rrZWQ",primary_action_button:"ForecastingEventSideModal_primary_action_button__9rfN6",action_button_container:"ForecastingEventSideModal_action_button_container__Xo0i1"}},34304:e=>{e.exports={event_form:"ForecastingEventForm_event_form__i31Mh",dropdown:"ForecastingEventForm_dropdown__2beLV",editable_amount_container:"ForecastingEventForm_editable_amount_container__N073A",dollar_prefix:"ForecastingEventForm_dollar_prefix__O5ZYO",editable_amount_input:"ForecastingEventForm_editable_amount_input__khnvC"}},36436:e=>{e.exports={dialog_container:"ForecastingEventListSideModal_dialog_container__j88JI",container:"ForecastingEventListSideModal_container__trPEB",scrollable_content:"ForecastingEventListSideModal_scrollable_content__wxALa",add_event_button:"ForecastingEventListSideModal_add_event_button__jHdwF",empty_state:"ForecastingEventListSideModal_empty_state__fBpno",events_list:"ForecastingEventListSideModal_events_list__7kAnN",event_row:"ForecastingEventListSideModal_event_row__ZN_Lw",event_row_excluded:"ForecastingEventListSideModal_event_row_excluded__uCFc1",event_row_left:"ForecastingEventListSideModal_event_row_left__BEixw",event_row_emoji:"ForecastingEventListSideModal_event_row_emoji__SCnA8",event_row_text:"ForecastingEventListSideModal_event_row_text__Ax20t",event_row_title_row:"ForecastingEventListSideModal_event_row_title_row__Nc_tr",event_row_title:"ForecastingEventListSideModal_event_row_title__kpABV",event_row_badge_icon:"ForecastingEventListSideModal_event_row_badge_icon__yZmNw",event_row_date:"ForecastingEventListSideModal_event_row_date__8wPQv",event_row_right:"ForecastingEventListSideModal_event_row_right__J4Emm",event_row_amount:"ForecastingEventListSideModal_event_row_amount__7h38F",event_row_chevron:"ForecastingEventListSideModal_event_row_chevron__Mv9mD",past_events_section:"ForecastingEventListSideModal_past_events_section__nJWkb",past_events_title:"ForecastingEventListSideModal_past_events_title__dYPwK",disclosure:"ForecastingEventListSideModal_disclosure__m44Rw"}},40886:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var a=n(95155),i=n(76655),r=n(26977),o=n(78955),s=n(20020),l=n(47272),d=n(69073),c=n(61609),u=n(26223),_=n(77132),m=n(92854),v=n(93
100),g=n.n(v);function p(e){var t;let{variant:n="default"}=e,{data:v}=l.R.useGetGeniusLanguageQuery(),p=null==v||null==(t=v.CanvasPrompts)?void 0:t[d.Q.setup_budgets],{execute:h,geniusUrl:f}=(0,c.EW)(u.F.autoBudget);function y(){p&&h({message:p.message,prompt:_.vm.action_plan,canvasKey:p.key})}return f?"link"===n?(0,a.jsx)(i.$,{className:"alb-btn-empty alb-btn-link",onPress:y,children:"Set budget automatically"}):(0,a.jsx)(m.wV,{text:(null==p?void 0:p.tooltip)||(null==p?void 0:p.title)||"",children:(0,a.jsxs)(i.$,{className:(0,s.I)("react-aria-Button",g().auto_set_budget_btn),onPress:y,children:[(0,a.jsx)(o.gc,{icon:r.p7g,className:g().icon}),"Auto budget"]})}):null}},51071:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});class a{}a.CashFlowCard={tabCashFlow:"Cash flow",tabBudgetForecast:"Budget forecast",income:"Income",spending:"Spending",cashFlow:"Cash flow",editBudgetForecast:"Edit budget forecast",budgetForecastTooltip:"Monthly cash flow forecast based on projected future budgets. Update future to change future cash flow."},a.GrowthAssumptions={title:"Growth assumptions",titleTooltip:"For assets, a positive % means the balance grows and a negative % means it decreases.\n\nFor credit cards and loans, negative % means you're paying them down, while positive % means interest increases the balance.",description:"The annual % change of your assets and liabilities.",reset:"Reset",resetConfirmModal:{title:"Reset growth assumptions",body:"Are you sure you want to reset all growth assumptions to their default values?",button:"Reset",cancel:"Cancel"},disclaimer:"Values entered are hypothetical and are not predictions of future results",labels:{cash:"Interest on cash",investment:"Investments",retirement:"Retirement",privateAssets:"Private",realEstate:"Real estate",creditCards:"Credit cards",loans:"Loans"}},a.DeleteEventModal={title:"Delete event",body:"Are you sure you want to delete this event?",button:"Delete",cancel:"Go back"},a.FinancialOutlook={title:"Summary",emptyState:"No financial outlook available."},a.NetWorthChange={currentNetWorth:"Current net worth",changeOf:"Change"},a.WhereYourMoneyIs={title:"Where your money is",totalAssets:"Total assets",columns:{holding:"Holding",changeFromToday:"Change from today"},holdings:{cash:"Cash",investments:"Investments",realEstate:"Real estate",retirement:"Retirement"}},a.Table={cashTooltip:"Projected cash balance, including your future budget and forecast events.",fromBudget:"From budget",fromEvents:"From events"},a.Paywall={title:"Unlock Forecasting",description:"Forecast your net worth and cash flow and get insights from Genius to stay on track.",continueButton:"Continue"},a.EventSideModal={titleRequired:"Event title is required",emojiRequired:"Please select an emoji",amountRequired:"Amount must be 0 or greater",creating:"Creating...",createEvent:"Create event",titlePlaceholder:"Event title",delete:"Delete",includedInForecast:"Included in forecast"},a.BudgetForecastEvents={label:"Events",linkText:"Edit and view forecasted events"},a.EventListSideModal={title:"Events",addEvent:"Add new event",loading:"Loading events...",emptyState:"No events yet. Add an event to see it here.",starting:"Starting",pastEventsTitle:"Past events",pastEventsDescription:"Past events don't impact future forecast"},a.GeniusCleanupModal={title:"Let Genius organize your finances",description:"Before diving in, Genius can review your entire financial profile â transactions, categories, and budgets â and clean everything up so your data makes sense.",button:"Continue"},a.OrganizeButton={tooltip:"Organize spending and budgets with Genius"},a.Tooltips={buildPlan:"Chat with Genius about your plan",addEvent:"Add and manage events",renameView:"Rename",deleteView:"Delete"},a.SavedViews={label:"Saved views",clearLabel:"Clear saved view",createView:"Create view",createNewView:"Create new view",updateView:"Update view",save:"Save",revertChanges:"Revert changes",reset:"Reset",viewUpdated:"View updated",nameModal:{createTitle:"Create view",renameTitle:"Rename view",ariaLabel:"Name this view",label:"View name",placeholder:"e.g. Retirement funds",saveButton:"Save"},errors:{empty:"Add a name to save this view",tooLong:"Max character limit exceeded",duplicate:"The name â{name}â is taken. Try a different name.",saveFailed:"Couldn't save your view. Try again.",tooMany:"You can save up to 50 views"},switchViewModal:{title:"Hold on",body:"Are you sure you want to switch this view? Unsaved changes will be cleared.",buttonAction:"Switch view",buttonCancel:"Cancel"},deleteModal:{title:"Hold on",body:"Are you sure you want to delete this view? This can't be und
1one.",buttonAction:"Delete view",buttonCancel:"Cancel"}}},54564:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var a=n(95155),i=n(12115),r=n(29356),o=n(9833),s=n(76655),l=n(24577),d=n(97808),c=n(17193),u=n(26977),_=n(78955),m=n(45525),v=n(79891),g=n(34574),p=n(20020),h=n(70730),f=n(6535),y=n.n(f);function b(e){var t,n;let{value:v,onChange:f,minDate:b,maxDate:E,today:j,variant:x="default",isSelected:N=!1,showYearNavigation:S=!1,showToday:M=!1,onOpen:F,className:A,...T}=e,C=(0,i.useMemo)(()=>{var e;return null!=(e=w(v))?e:null},[v]),D=(0,i.useMemo)(()=>w(b),[b]),L=(0,i.useMemo)(()=>w(E),[E]),[I,q]=(0,i.useState)(),P=S||M||"pill"===x,R=(0,r.i)({year:"numeric",month:"pill"===x?"short":"long",day:"numeric"}),O=null!=(t=null!=I?I:C)?t:D;function k(e){var t,n,a;let i;O&&q((t=O.add({years:e}),n=D,a=L,i=t,n&&0>i.compare(n)&&(i=n),a&&i.compare(a)>0&&(i=a),i))}return(0,a.jsx)("div",{className:(0,p.I)(y().date,"simple"===x&&y().simple,"pill"===x&&y().pill,A),children:(0,a.jsxs)(o.cQ,{onOpenChange:e=>{e&&(C&&q(C),null==F||F())},children:[(0,a.jsxs)(s.$,{type:"button","aria-label":null!=(n=T["aria-label"])?n:"Menu",className:y().date,"data-selected":N||void 0,children:["pill"!==x&&(0,a.jsx)(_.gc,{icon:u.okg}),null===C?(0,a.jsx)("span",{children:"Select date"}):(0,a.jsx)("span",{children:R.format(C.toDate((0,m.Xj)()))}),"pill"===x&&(0,a.jsx)(_.gc,{icon:u.Jt$,className:y().pill_chevron})]}),(0,a.jsx)(l.A,{placement:"bottom left",children:(0,a.jsxs)(d.Vv,{...T,value:C,onChange:function(e){f((0,g.A)(e.toDate((0,m.Xj)()),"yyyy-MM-dd"))},minValue:D,maxValue:L,...O?{focusedValue:O,onFocusChange:q}:{},className:(0,p.I)("react-aria-Calendar alb-calendar-transactions",P&&y().calendar),children:[(0,a.jsxs)("header",{children:[S&&(0,a.jsx)("button",{type:"button","aria-label":"Previous year",className:y().nav_button,onClick:()=>k(-1),children:(0,a.jsx)(_.gc,{icon:u.nvA})}),(0,a.jsx)(s.$,{slot:"previous",children:(0,a.jsx)(_.gc,{icon:u.Wzs})}),(0,a.jsx)(c.D,{}),(0,a.jsx)(s.$,{slot:"next",children:(0,a.jsx)(_.gc,{icon:u.XkK})}),S&&(0,a.jsx)("button",{type:"button","aria-label":"Next year",className:y().nav_button,onClick:()=>k(1),children:(0,a.jsx)(_.gc,{icon:u.u3t})})]}),(0,a.jsx)(d.r8,{children:e=>(0,a.jsx)(d.Zr,{date:e})}),M&&(0,a.jsx)("div",{className:y().today_row,children:(0,a.jsx)("button",{type:"button",className:y().today,onClick:function(){let e=h.yx.today().toString(h.BU.dateStandard),t=null!=j?j:e;b&&t<b&&(t=b),E&&t>E&&(t=E),f(t);let n=w(t);n&&q(n)},children:"Today"})})]})})]})})}function w(e){if(e)try{return(0,v._U)(e)}catch(e){return}}},68299:e=>{e.exports={form_field:"FormField_form_field__Sg77K",label:"FormField_label___Ye5i",input_container:"FormField_input_container__7rE8I",input_wrapper:"FormField_input_wrapper__0e73g",error_text:"FormField_error_text__H_NfJ"}},70712:(e,t,n)=>{"use strict";n.d(t,{aX:()=>l,mg:()=>o,wN:()=>s});var a=n(12115),i=n(8607),r=n(70730);function o(e){let{chartRef:t,chartDataPoints:n,events:i,timelineMonths:o}=e,[d,c]=(0,a.useState)([]),u=(0,a.useMemo)(()=>{let e=new Map;for(let t of n)e.set(t.date,t.value);return e},[n]),_=(0,a.useMemo)(()=>{var e;if(0===n.length)return 0;let t=r.yx.fromDateString(n[n.length-1].date);return null!=(e=null==t?void 0:t.getTime())?e:0},[n]),m=(0,a.useMemo)(()=>{var e;let t=r.yx.today().getTime(),n=[];for(let e of i){if(!s(e)){n.push({event:e,isFirstOccurrence:!0});continue}let a=l(e.frequency),i=r.yx.fromTimestampAsUtc(e.date),o=!1;for(;i.getTime()<=_;){let r=i.getTime()>t&&!o;r&&(o=!0),n.push({event:{...e,date:i.getTime()/1e3,start_date:e.date},isFirstOccurrence:r}),i=i.monthsFuture(a)}}let a=n.filter(e=>r.yx.fromTimestampAsUtc(e.event.date).getTime()>t);a.sort((e,t)=>e.event.date-t.event.date);let d=(e=o)<=3?1:e<=6?2:e<=12?5:20,c=[];for(let e of a){if(0===c.length){c.push([e]);continue}let t=c[c.length-1],n=t[0].event.date;Math.abs(e.event.date-n)/86400<=d?t.push(e):c.push([e])}return c},[i,_,o]),v=(0,a.useCallback)(e=>{var t,a,i;let o=u.get(e);if(void 0!==o)return o;let s=null==(t=r.yx.fromDateString(e))?void 0:t.getTime();if(!s)return null;let l=null,d=1/0;for(let e of n){let t=null==(a=r.yx.fromDateString(e.date))?void 0:a.getTime();if(!t)continue;let n=Math.abs(t-s);n<d&&(d=n,l=e)}return null!=(i=null==l?void 0:l.value)?i:null},[u,n]),g=(0,a.useCallback)(()=>{let e=t.current;if(!e||!e.scales.x||!e.scales.y||0===n.length)return void c([]);let a=e.chartArea,i=[];for(let t of m){let n=t[0],o=r.yx.fromTimestampAsUtc(n.event.date),s=o.toString(r.BU.dateStandard),l=e.scales.x.getPixelForValue(o.getTime());if(l<a.left||l>a.right)continue;let d=v(s);if(null===d)continue;let c=e.scales.y.getPixelForValue(d),u=[...t].sort((e,t)=>
1e.isFirstOccurrence!==t.isFirstOccurrence?e.isFirstOccurrence?-1:1:0),_=u.map(e=>e.event),m=u.every(e=>!e.isFirstOccurrence),g=u.every(e=>!e.event.is_included);i.push({x:l,y:c,events:_,isStacked:_.length>1,isLaterRecurrence:m,isExcluded:g})}c(i)},[t,m,n,v]);return(0,a.useEffect)(()=>{g()},[g]),(0,a.useEffect)(()=>{let e=t.current;if(!e)return;let n=e.canvas;if(!n)return;let a=new ResizeObserver(()=>{requestAnimationFrame(()=>{g()})});return a.observe(n),()=>{a.disconnect()}},[t,g]),d}function s(e){return e.frequency!==i.Mw.ONE_TIME}function l(e){switch(e){case i.Mw.MONTHLY:return 1;case i.Mw.QUARTERLY:return 3;case i.Mw.BIANNUALLY:return 6;case i.Mw.ANNUALLY:default:return 12}}}}]); 2//# sourceMappingURL=89235-e0c8bc2f80541f41.js.map
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.