PageSourceSearch

https://ghostfol.io/en/chunk-hgcPVLpD.js

js ghostfol.io collected 2026-09-25 20:43:26 UTC 26,041 bytes, 1 lines download raw bytes

1import{a as w,o as x,r as C,t as A}from"./chunk-JAOQM8Cn.js";import{n as e,t as a}from"./chunk-BtAgi5yo.js";import{$t as WE,Ai as yy,B as Hy,En as ab,Gn as e_,Ht as UC,In as cM,Ir as oB,Jn as ev,Kt as Uu,Ln as c_,Mn as bs,O as Fp,Oi as xT,Or as nM,Pn as cB,Qr as rb,Qt as Vu,Ti as vy,Tn as a_,Vn as di,Vr as pb,Y as Jb,ai as sb,an as Xb,bi as uv,c as BC,cn as Yb,dr as ib,en as W_,fi as tv,g as C$1,h as By,hn as Zy,in as X_,jn as bf,jr as nb,k as G_,kt as Qs,li as tB,m as Bw,n as $u,or as hn,qt as Uy,r as $y,vr as jp,w as Eo,xn as _e,xr as k_,yt as OM}from"./chunk-CURRVo-b.js";import"./chunk-BjogDFms.js";import"./chunk-CWEajFkI.js";import{g as mr,m as lr,u as ar}from"./chunk-Ck8iuz3S.js";import"./chunk-VOQLMcKZ.js";import{nt as os,yt as za}from"./chunk-Bs0bKjUL.js";import{a as Ge,d as W,g as mn,n as At,s as It}from"./chunk-BYkKVaWx.js";import{C as pn,E as qn,O as yn,T as q,a as En,d as Qn,f as Vn,g as Zn,h as Yn,n as At$1,o as Fn,p as Xn,s as Jn,t as $n,u as Qe,x as fn}from"./chunk-DDb967TJ.js";import{o as ot,r as at,t as Ie}from"./chunk-Bz-QjA_w.js";import"./chunk-C6wkjQDx.js";import"./chunk-C2t52SQI.js";import"./chunk-BNN5XOJO.js";import"./chunk-Cy8M3DFp.js";import{Dn as kq,G as Kc,Jn as sK,Mn as mpe,N as HB,Ot as WB,Qt as dV,Sn as jq,_ as Dx,_r as yQ,br as yv,cr as wh,dn as fv,ht as Qt,n as $d,nn as e9,xt as Sx}from"./chunk-BibJlzT8.js";import"./chunk-CD_IkxAN.js";import"./chunk-C7aPY-LE.js";import{i as n,r as l,t as a$1}from"./chunk-DWHaKLt5.js";import"./chunk-BwV9B6ng.js";import{Bt as xn,Dt as re,J as _i,S as K3,W as Y3,b as J3,p as G3}from"./chunk-DBOT4Gq9.js";import{s as nt}from"./chunk-OeT5qc2p.js";import{r as w$1,t as P}from"./chunk-dv8Le2lA.js";import{i as Oi,o as ft,r as Mn,s as ut}from"./chunk-CSAyoN4O.js";import{n as K,r as U,t as B}from"./chunk-ChUOWPps.js";import{n as rt}from"./chunk-C6FyLIgY.js";import{t as e$1}from"./chunk-DP-UTisU2.js";import"./chunk-CXKT416L2.js";import{a as Za,c as qn$1,i as Xa,r as Qn$1,s as na,t as Ja}from"./chunk-UEVe02Ud2.js";import{a as it,i as gt}from"./chunk-Ds0l1azp2.js";import{n as rt$1,t as _t}from"./chunk-BMwlEQ682.js";import{$ as nh,C as Sl,F as ah,V as eh,Z as lh,at as zc,j as Xc,m as Hc,nt as rh,w as To}from"./chunk-Bb6HVS-M2.js";import{t as U$1}from"./chunk-2letIMRR2.js";import{n as p,t as h}from"./chunk-BselUOi4.js";import{n as Z$1,t as M}from"./chunk-ClaMunTs.js";var Z;var ue=A(()=>{yv();OM();Z=(()=>{class n{constructor(){this.COMPOUND_PERIOD=12}calculateCompoundInterest({P:e,periodInMonths:t,PMT:a,r}){let i=new Kc(0),m=new Kc(e).plus(new Kc(a).mul(t)),T=m;if(r){let R=new Kc(1).plus(new Kc(r).div(this.COMPOUND_PERIOD)).pow(t),I=new Kc(e).mul(R),y=new Kc(new Kc(a).mul(R.minus(1))).div(new Kc(r).div(this.COMPOUND_PERIOD));i=I.plus(y).minus(m),T=I.plus(y)}return{interest:i,principal:m,totalAmount:T}}calculatePeriodsToRetire({P:e,PMT:t,r:a,totalAmount:r}){if(a===0)return(r-e)/t;if(r<=e)return 0;let i=new Kc(a).div(this.COMPOUND_PERIOD),m=Math.log10(new Kc(r).plus(new Kc(t).div(i)).toNumber()),T=Math.log10(new Kc(e).plus(new Kc(t).div(i)).toNumber()),R=Math.log10(new Kc(1).plus(i).toNumber());return(m-T)/R}static{this.ɵfac=function(t){return new(t||n)}}static{this.ɵprov=hn({token:n,factory:n.ɵfac,autoProvided:!1})}}return n})()});function Ca(n,g){n&1&&vy(0,`ngx-skeleton-loader`,21),n&2&&yy(`theme`,G_(1,fa))}var Gt;var _a;var fa;var $t;var kt=A(()=>{To();fv();HB();mr();OM();w$1();Fn();za();Ja();It();Ie();G3();zc();U$1();rt$1();Dx();K3();J3();Gt=C(Sx());U();di();ue();OM();ue();Fn();Ja();It();Ie();U();_a=[`chartCanvas`],fa=()=>({height:`100%`,width:`100%`});$t=(()=>{class n{constructor(e,t,a,r){this.changeDetectorRef=e,this.destroyRef=t,this.fireCalculatorService=a,this.formBuilder=r,this.annualInterestRate=0,this.fireWealth=0,this.locale=WB(),this.projectedTotalAmount=0,this.savingsRate=0,this.calculatorForm=this.formBuilder.group({annualInterestRate:new q(null),paymentPerPeriod:new q(null),principalInvestmentAmount:new q(null),projectedTotalAmount:new q(null),retirementDate:new q(null)}),this.isLoading=!0,this.minDate=Qt(new Date,1),this.periodsToRetire=0,this.annualInterestRateChanged=tB(),this.calculationCompleted=tB(),this.projectedTotalAmountChanged=tB(),this.retirementDateChanged=tB(),this.savingsRateChanged=tB(),this.CONTRIBUTION_PE
1RIOD=12,this.DEFAULT_RETIREMENT_DATE=dV($d(new Date,10)),this.chartCanvas=oB.required(`chartCanvas`),Sl.register(eh,nh,rh,lh,ah),nt({calendarClearOutline:xn}),this.calculatorForm.valueChanges.pipe(P(this.destroyRef)).subscribe(()=>{this.initialize()}),this.calculatorForm.valueChanges.pipe(bf(500),P(this.destroyRef)).subscribe(()=>{let{projectedTotalAmount:i,retirementDate:m}=this.calculatorForm.getRawValue();i!==null&&m!==null&&this.calculationCompleted.emit({projectedTotalAmount:i,retirementDate:m})}),this.calculatorForm.get(`annualInterestRate`)?.valueChanges.pipe(bf(500),P(this.destroyRef)).subscribe(i=>{i!==null&&this.annualInterestRateChanged.emit(i)}),this.calculatorForm.get(`paymentPerPeriod`)?.valueChanges.pipe(bf(500),P(this.destroyRef)).subscribe(i=>{i!==null&&this.savingsRateChanged.emit(i)}),this.calculatorForm.get(`projectedTotalAmount`)?.valueChanges.pipe(bf(500),P(this.destroyRef)).subscribe(i=>{i!==null&&this.projectedTotalAmountChanged.emit(i)}),this.calculatorForm.get(`retirementDate`)?.valueChanges.pipe(bf(500),P(this.destroyRef)).subscribe(i=>{i!==null&&this.retirementDateChanged.emit(i)})}get retirementDateLabel(){let e=this.calculatorForm.get(`retirementDate`)?.value;return e?mpe({date:e,locale:this.locale}):``}ngOnChanges(){(0,Gt.isNumber)(this.fireWealth)&&this.fireWealth>=0&&(this.calculatorForm.setValue({annualInterestRate:this.annualInterestRate,paymentPerPeriod:this.savingsRate,principalInvestmentAmount:this.fireWealth,projectedTotalAmount:this.projectedTotalAmount,retirementDate:this.retirementDate??this.DEFAULT_RETIREMENT_DATE},{emitEvent:!1}),this.periodsToRetire=this.getPeriodsToRetire(),setTimeout(()=>{this.calculatorForm.patchValue({annualInterestRate:this.calculatorForm.get(`annualInterestRate`)?.value,paymentPerPeriod:this.getPMT(),principalInvestmentAmount:this.calculatorForm.get(`principalInvestmentAmount`)?.value,projectedTotalAmount:Math.round(this.getProjectedTotalAmount())||0,retirementDate:this.getRetirementDate()??this.DEFAULT_RETIREMENT_DATE},{emitEvent:!1}),this.calculatorForm.get(`principalInvestmentAmount`)?.disable(),this.changeDetectorRef.markForCheck()})),this.hasPermissionToUpdateUserSettings===!0?(this.calculatorForm.get(`annualInterestRate`)?.enable({emitEvent:!1}),this.calculatorForm.get(`paymentPerPeriod`)?.enable({emitEvent:!1}),this.calculatorForm.get(`projectedTotalAmount`)?.enable({emitEvent:!1})):(this.calculatorForm.get(`annualInterestRate`)?.disable({emitEvent:!1}),this.calculatorForm.get(`paymentPerPeriod`)?.disable({emitEvent:!1}),this.calculatorForm.get(`projectedTotalAmount`)?.disable({emitEvent:!1})),this.calculatorForm.get(`retirementDate`)?.disable({emitEvent:!1})}setMonthAndYear(e,t){let r=kq(jq(this.calculatorForm.get(`retirementDate`)?.value??this.DEFAULT_RETIREMENT_DATE,e.getFullYear()),e.getMonth());this.calculatorForm.get(`retirementDate`)?.setValue(r),t.close()}ngOnDestroy(){this.chart?.destroy()}initialize(){this.isLoading=!0;let e=this.getChartData();if(this.chartCanvas())if(this.chart){this.chart.data.labels=e.labels;for(let t=0;t<this.chart.data.datasets.length;t++)this.chart.data.datasets[t].data=e.datasets[t].data;this.chart.update()}else this.chart=new Sl(this.chartCanvas().nativeElement,{data:e,options:{plugins:{tooltip:x(w({},Hc({colorScheme:this.colorScheme})),{mode:`index`,callbacks:{footer:t=>{let a=t.reduce((r,i)=>r+(i.parsed.y??0),0);return`Total: ${new Intl.NumberFormat(this.locale,{currency:this.currency,currencyDisplay:`code`,style:`currency`}).format(a)}`},label:t=>{let a=t.dataset.label??``;return a&&(a+=`: `),t.parsed.y!==null&&(a+=new Intl.NumberFormat(this.locale,{currency:this.currency,currencyDisplay:`code`,style:`currency`}).format(t.parsed.y)),a}}})},responsive:!0,scales:{x:{grid:{display:!1},stacked:!0},y:{display:this.deviceType!==`mobile`,grid:{display:!1},position:`right`,stacked:!0,ticks:{callback:t=>Xc(t)}}}},type:`bar`});this.isLoading=!1}getChartData(){let e=new Date().getFullYear(),t=[],a=this.getP(),r=this.getPMT(),i=this.getR(),R=sK(this.getRetirementDate(),{months:1}).getFullYear()-e+1;for(let S=e;S<e+R;S++)t.push(S);let I={backgroundColor:`rgb(${yQ.r}, ${yQ.g}, ${yQ.b})`,data:[],label:"Deposit"},y={backgroundColor:_t(`rgb(${yQ.r}, ${yQ.g}, ${yQ.b})`).lighten(.5).hex(),data:[],label:"Interest"},ce={backgroundColor:_t(`rgb(${yQ.r}, ${yQ.g}, ${yQ.b})`).lighten(.25).hex(),data:[],label:"Savings"},jt=wh(new Date);for(let S=1;S<=R;
1S++){let Bt=S*this.CONTRIBUTION_PERIOD-jt,{interest:Wt,principal:Xt}=this.fireCalculatorService.calculateCompoundInterest({P:a,periodInMonths:Bt,PMT:r,r:i});I.data.push(this.fireWealth),y.data.push(Wt.toNumber()),ce.data.push(Xt.minus(this.fireWealth).toNumber())}return{labels:t,datasets:[I,ce,y]}}getP(){return this.fireWealth||0}getPeriodsToRetire(){let e=this.calculatorForm.get(`projectedTotalAmount`)?.value;if(e){let t=this.fireCalculatorService.calculatePeriodsToRetire({P:this.getP(),PMT:this.getPMT(),r:this.getR(),totalAmount:e});return t===Infinity&&(t=Number.MAX_SAFE_INTEGER),t}else{let t=new Date,a=this.retirementDate??this.DEFAULT_RETIREMENT_DATE;return 12*(a.getFullYear()-t.getFullYear())+a.getMonth()-t.getMonth()}}getPMT(){return this.calculatorForm.get(`paymentPerPeriod`)?.value??0}getProjectedTotalAmount(){let e=this.calculatorForm.get(`projectedTotalAmount`)?.value;if(e)return e;let{totalAmount:t}=this.fireCalculatorService.calculateCompoundInterest({P:this.getP(),periodInMonths:this.periodsToRetire,PMT:this.getPMT(),r:this.getR()});return t.toNumber()}getR(){return(this.calculatorForm.get(`annualInterestRate`)?.value??0)/100}getRetirementDate(){if(this.periodsToRetire===Number.MAX_SAFE_INTEGER)return this.DEFAULT_RETIREMENT_DATE;let e=this.periodsToRetire%12,t=Math.floor(this.periodsToRetire/12);return dV(e9(new Date,{months:e,years:t}))}static{this.ɵfac=function(t){return new(t||n)(Eo(cB),Eo(_e),Eo(Z),Eo(En))}}static{this.ɵcmp=xT({type:n,selectors:[[`gf-fire-calculator`]],viewQuery:function(t,a){t&1&&Zy(a.chartCanvas,_a,5),t&2&&a_()},inputs:{annualInterestRate:`annualInterestRate`,colorScheme:`colorScheme`,currency:`currency`,deviceType:`deviceType`,fireWealth:`fireWealth`,hasPermissionToUpdateUserSettings:`hasPermissionToUpdateUserSettings`,locale:`locale`,projectedTotalAmount:`projectedTotalAmount`,retirementDate:`retirementDate`,savingsRate:`savingsRate`},outputs:{annualInterestRateChanged:`annualInterestRateChanged`,calculationCompleted:`calculationCompleted`,projectedTotalAmountChanged:`projectedTotalAmountChanged`,retirementDateChanged:`retirementDateChanged`,savingsRateChanged:`savingsRateChanged`},features:[W_([Z]),WE],decls:37,vars:12,consts:()=>{let e;e="Savings Rate per Month";let t;t="Annual Interest Rate";let a;a="Retirement Date";let r;return r="Projected Total Amount",[[`date`,``],[`chartCanvas`,``],e,t,a,r,[1,`container`,`p-0`],[1,`row`],[1,`col-md-3`],[1,`mb-4`,3,`formGroup`],[`appearance`,`outline`,1,`w-100`],[`formControlName`,`paymentPerPeriod`,`matInput`,``,`step`,`100`,`type`,`number`],[`matTextSuffix`,``,1,`ml-2`],[`formControlName`,`annualInterestRate`,`matInput`,``,`step`,`0.25`,`type`,`number`],[`formControlName`,`retirementDate`,`matInput`,``,1,`d-none`,3,`matDatepicker`,`min`],[`matSuffix`,``,1,`mr-2`,3,`disabled`,`for`],[`matDatepickerToggleIcon`,``,`name`,`calendar-clear-outline`,1,`text-muted`],[`startView`,`multi-year`,3,`monthSelected`,`disabled`],[`formControlName`,`projectedTotalAmount`,`matInput`,``,`step`,`100`,`type`,`number`],[1,`col-md-9`,`text-center`],[1,`chart-container`,`mb-4`],[`animation`,`pulse`,3,`theme`],[1,`h-100`]]},template:function(t,a){if(t&1){let r=pb();bs(0,`div`,6)(1,`div`,7)(2,`div`,8)(3,`form`,9)(4,`mat-form-field`,10)(5,`mat-label`),Yb(6,2),Vu(),vy(7,`input`,11),BC(),bs(8,`span`,12),k_(9),Vu()(),bs(10,`mat-form-field`,10)(11,`mat-label`),Yb(12,3),Vu(),vy(13,`input`,13),BC(),bs(14,`div`,12),k_(15,`%`),Vu()(),bs(16,`mat-form-field`,10)(17,`mat-label`),Yb(18,4),Vu(),bs(19,`div`),k_(20),Vu(),vy(21,`input`,14),BC(),bs(22,`mat-datepicker-toggle`,15),vy(23,`ion-icon`,16),Vu(),bs(24,`mat-datepicker`,17,0),Uy(`monthSelected`,function(m){Fp(r);let T=c_(25);return jp(a.setMonthAndYear(m,T))}),Vu()(),bs(26,`mat-form-field`,10)(27,`mat-label`),Yb(28,5),Vu(),vy(29,`input`,18),BC(),bs(30,`span`,12),k_(31),Vu()()()(),bs(32,`div`,19)(33,`div`,20),nb(34,Ca,1,2,`ngx-skeleton-loader`,21),vy(35,`canvas`,22,1),Vu()()()()}if(t&2){let r=c_(25);Bw(3),yy(`formGroup`,a.calculatorForm),Bw(4),UC(),Bw(2),uv(a.currency),Bw(4),UC(),Bw(7),uv(a.retirementDateLabel),Bw(),yy(`matDatepicker`,r)(`min`,a.minDate),UC(),Bw(),yy(`disabled`,a.hasPermissionToUpdateUserSettings!==!0)(`for`,r),Bw(2),yy(`disabled`,a.hasPermissionToUpdateUserSettings!==!0),Bw(5),UC(),Bw(2),uv(a.currency),Bw(3),rb(a.isLoading?34:-1),Bw(),ev(`display`,a.isLoading?`none`:`block`)}},dependencies:[lr,Jn,Zn,Qe,fn,qn,$n,Y3,os,Qn$1,qn$1,na,Za,Xa,mn,Ge,W,At,at,ot,K,B,Qn,Vn,yn],styles:[`[_nghost-%COMP%]{display:block}
1[_nghost-%COMP%]   .chart-container[_ngcontent-%COMP%]{aspect-ratio:16/9}[_nghost-%COMP%]   .chart-container[_ngcontent-%COMP%]   ngx-skeleton-loader[_ngcontent-%COMP%]{height:100%}[_nghost-%COMP%]     .mdc-text-field--disabled .mdc-floating-label, [_nghost-%COMP%]     .mdc-text-field--disabled .mdc-text-field__input{color:inherit!important}[_nghost-%COMP%]     .mdc-text-field--disabled .mdc-notched-outline__leading, [_nghost-%COMP%]     .mdc-text-field--disabled .mdc-notched-outline__notch, [_nghost-%COMP%]     .mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:rgba(var(--%NS%dark-disabled-text))}.theme-dark[_nghost-%COMP%]     .mdc-text-field--disabled .mdc-notched-outline__leading, .theme-dark   [_nghost-%COMP%]     .mdc-text-field--disabled .mdc-notched-outline__leading, .theme-dark[_nghost-%COMP%]     .mdc-text-field--disabled .mdc-notched-outline__notch, .theme-dark   [_nghost-%COMP%]     .mdc-text-field--disabled .mdc-notched-outline__notch, .theme-dark[_nghost-%COMP%]     .mdc-text-field--disabled .mdc-notched-outline__trailing, .theme-dark   [_nghost-%COMP%]     .mdc-text-field--disabled .mdc-notched-outline__trailing{border-color:rgba(var(--%NS%light-disabled-text))}`]})}}return n})()});var Ut=A(()=>{kt()});function Ra(n,g){n&1&&vy(0,`gf-premium-indicator`,10)}function Sa(n,g){n&1&&vy(0,`gf-premium-indicator`,10)}function Pa(n,g){n&1&&(bs(0,`div`),vy(1,`ngx-skeleton-loader`,14)(2,`ngx-skeleton-loader`,15),Vu()),n&2&&(Bw(),yy(`theme`,G_(2,Da)),Bw(),yy(`theme`,G_(3,Ta)))}function va(n,g){if(n&1&&(bs(0,`option`,20),k_(1),X_(2,`number`),Vu()),n&2){let e=g.$implicit;yy(`value`,e),Bw(),Uu(` `,nM(2,2,e*100,`1.1-1`),` % `)}}function Ea(n,g){if(n&1&&(bs(0,`select`,19),sb(1,va,3,5,`option`,20,ib),Vu(),BC(),k_(3,`. `)),n&2){let e=e_(2);yy(`formControl`,e.safeWithdrawalRateControl),UC(),Bw(),ab(e.safeWithdrawalRateOptions)}}function Aa(n,g){if(n&1&&($u(0),k_(1,`\xA0`),Qs(),bs(2,`span`,17),vy(3,`gf-value`,21),Vu(),k_(4,`. `)),n&2){let e=e_(2);Bw(3),yy(`isPercent`,!0)(`locale`,e.user?.settings?.locale)(`precision`,1)(`value`,e.user?.settings?.safeWithdrawalRate)}}function ba(n,g){if(n&1&&(bs(0,`div`),$u(1),Hy(2,4),vy(3,`span`,17),bs(4,`span`,17),vy(5,`gf-value`,18),Vu(),bs(6,`span`,17),vy(7,`gf-value`,18),Vu(),bs(8,`span`,17),vy(9,`gf-value`,21),Vu(),By(),Qs(),Vu()),n&2){let e=e_(2);Bw(5),yy(`isCurrency`,!0)(`locale`,e.user?.settings?.locale)(`unit`,e.user?.settings?.baseCurrency)(`value`,e.withdrawalRatePerYearProjected?.toNumber()),Bw(2),yy(`isCurrency`,!0)(`locale`,e.user?.settings?.locale)(`unit`,e.user?.settings?.baseCurrency)(`value`,e.withdrawalRatePerMonthProjected?.toNumber()),Bw(2),yy(`isPercent`,!0)(`locale`,e.user?.settings?.locale)(`precision`,2)(`value`,e.user?.settings?.annualInterestRate/100),$y(e.retirementDateLabel),Jb(2)}}function Ia(n,g){if(n&1&&(bs(0,`div`)(1,`div`,16),$u(2),Hy(3,3),bs(4,`span`,17),vy(5,`gf-value`,18),Vu(),bs(6,`span`,17),vy(7,`gf-value`,18),Vu(),bs(8,`span`,17),vy(9,`gf-value`,18),Vu(),By(),Qs(),nb(10,Ea,4,1)(11,Aa,5,4),Vu(),nb(12,ba,10,13,`div`),Vu()),n&2){let e=e_();tv(`text-muted`,e.user?.subscription?.type===`Basic`),Bw(5),yy(`isCurrency`,!0)(`locale`,e.user?.settings?.locale)(`unit`,e.user?.settings?.baseCurrency)(`value`,e.withdrawalRatePerYear?.toNumber()),Bw(2),yy(`isCurrency`,!0)(`locale`,e.user?.settings?.locale)(`unit`,e.user?.settings?.baseCurrency)(`value`,e.withdrawalRatePerMonth?.toNumber()),Bw(2),yy(`isCurrency`,!0)(`locale`,e.user?.settings?.locale)(`unit`,e.user?.settings?.baseCurrency)(`value`,e.fireWealth?.today.valueInBaseCurrency),Bw(),rb(!e.hasImpersonationId&&e.hasPermissionToUpdateUserSettings&&e.user?.settings?.isExperimentalFeatures?10:11),Bw(2),rb(e.user?.settings?.isExperimentalFeatures?12:-1)}}var Da;var Ta;var xt;var Vt=A(()=>{h();Mn();a();HB();l();Ut();re();it();e$1();mr();OM();w$1();Fn();Fn();yv();ft();U();OM();Fn();U();mr();Da=()=>({height:`1rem`,width:`100%`}),Ta=()=>({height:`1rem`,width:`10rem`});xt=(()=>{class n$1{constructor(){this.deviceType=cM(()=>this.deviceDetectorService.deviceInfo().deviceType),this.isLoading=!1,this.safeWithdrawalRateControl=new q(void 0),this.safeWithdrawalRateOptions=[.025,.03,.035,.04,.045],this.changeDetectorRef=C$1(cB),this.dataService=C$1(gt),this.destroyRef=C$1(_e),this.deviceDetectorService=C$1(ut),this.impersonationStorageService=C$1(p),this.userService=C$1(Oi)}get retirementDateLabel(){let e=this.user?.settings?.retirementDate??this.retirementDate;return e?mpe({date:new Date(e),locale:this.user?.settings?.locale}):``}ngOnInit(){this.isLoading=!0,this.dataService.fetchPortfolioDetails().pipe(P(this.destroyRef)).subscribe(({summary:e$2})=>{this.fireWealth={today:{valueInBaseCurrency:e$2?.fireWealth?e$2.fireWealth.today.valueInBaseCurrency:0}},this.user.subscription?.type===e.Basic&&(this.fireWealth={today:{valueInBaseCurrency:1e4}}),this.calculateWithdrawalRates(),this.changeDetectorRef.markForCheck()}),this.impersonationStorageService.onChangeHasImpersonation().pipe(P(this.destroyRef)).subscribe(e=>{this.hasImpersonationId=!!e,this.changeDetectorRef.markForCheck()}),this.safeWithdrawalRateControl.valueChanges.pipe(P(this.destroyRef)).subscribe(e=>{this.updateSafeWithdrawalRate(Number(e))}),this.userService.stateChanged.pipe(P(this.destroyRef)).subscribe(e$3=>{e$3?.user&&(this.user=e$3.user,this.hasPermissionToUpdateUserSettings=this.user.subscription?.type===e.Basic?!1:n(this.user.permissions,a$1.updateUserSettings),this.safeWithdrawalRateControl.setValue(this.user.settings.safeWithdrawalRate,{emitEvent:!1}),this.calculateWithdrawalRates()),this.changeDetectorRef.markForCheck()})}onAnnualInterestRateChange(e){this.dataService.putUserSetting({annualInterestRate:e}).pipe(P(this.destroyRef)).subscribe(()=>{this.userService.get(!0).pipe(P(this.destroyRef)).subscribe(t=>{this.user=t,this.changeDetectorRef.markForCheck()})})}onCalculationComplete({projectedTotalAmount:e,retirementDate:t}){this.projectedTotalAmount=e,this.retirementDate=t,this.calculateWithdrawalRatesProjected(),this.isLoading=!1}onProjectedTotalAmountChange(e){this.dataService.putUserSetting({projectedTotalAmount:e,retirementDate:null}).pipe(P(this.destroyRef)).subscribe(()=>{this.userService.get(!0).pipe(P(this.destroyRef)).subscribe(t=>{this.user=t,this.changeDetectorRef.markForCheck()})})}onRetirementDateChange(e){this.dataService.putUserSetting({projectedTotalAmount:null,retirementDate:e.toISOString()}).pipe(P(this.destroyRef)).subscribe(()=>{this.userService.get(!0).pipe(P(this.destroyRef)).subscribe(t=>{this.user=t,this.changeDetectorRef.markForCheck()})})}onSavingsRateChange(e){this.dataService.putUserSetting({savingsRate:e}).pipe(P(this.destroyRef)).subscribe(()=>{this.userService.get(!0).pipe(P(this.destroyRef)).subscribe(t=>{this.user=t,this.changeDetectorRef.markForCheck()})})}calculateWithdrawalRates(){this.fireWealth&&this.user?.settings?.safeWithdrawalRate&&(this.withdrawalRatePerYear=new Kc(this.fireWealth.today.valueInBaseCurrency).mul(this.user.settings.safeWithdrawalRate),this.withdrawalRatePerMonth=this.withdrawalRatePerYear.div(12))}calculateWithdrawalRatesProjected(){this.fireWealth&&this.projectedTotalAmount&&this.user?.settings?.safeWithdrawalRate&&(this.withdrawalRatePerYearProjected=new Kc(this.projectedTotalAmount).mul(this.user.settings.safeWithdrawalRate),this.withdrawalRatePerMonthProjected=this.withdrawalRatePerYearProjected.div(12))}updateSafeWithdrawalRate(e){this.dataService.putUserSetting({safeWithdrawalRate:e}).pipe(P(this.destroyRef)).subscribe(()=>{this.userService.get(!0).pipe(P(this.destroyRef)).subscribe(t=>{this.user=t,this.calculateWithdrawalRates(),this.calculateWithdrawalRatesProjected(),this.changeDetectorRef.markForCheck()})})}static{this.ɵfac=function(t){return new(t||n$1)}}static{this.ɵcmp=xT({type:n$1,selectors:[[`gf-fire-page`]],decls:18,vars:17,consts:()=>{let e;e="FIRE";let t;t="Calculator";let a;a="Sustainable retirement income";let r;r=`If you retire today, you would be able to withdraw ${`[�#4�|�#6�|�#8�]`}${`�#5�`}${`[�/#5�|�/#7�|�/#9�]`} per year${`[�/#4�|�/#6�|�/#8�]`} or ${`[�#4�|�#6�|�#8�]`}${`�#7�`}${`[�/#5�|�/#7�|�/#9�]`} per month${`[�/#4�|�/#6�|�/#8�]`}, based on your total assets of ${`[�#4�|�#6�|�#8�]`}${`�#9�`}${`[�/#5�|�/#7�|�/#9�]`}${`[�/#4�|�/#6�|�/#8�]`} and a safe withdrawal rate (SWR) of`,r=Xb(r);let i;return i=`By ${`[�#3�|�#4�|�#6�|�#8�]`}${`�0�`}${`[�/#3�|�/#4�|�/#6�|�/#8�]`}, this is projected to increase to ${`[�#3�|�#4�|�#6�|�#8�]`}${`�#5�`}${`[�/#5�|�/#7�|�/#9�]`} per year${`[�/#3�|�/#4�|�/#6�|�/#8�]`} or ${`[�#3�|�#4�|�#6�|�#8�]`}${`�#7�`}${`[�/#5�|�/#7�|�/#9�]`} per month${`[�/#3�|�/#4�|�/#6�|�/#8�]`}, assuming a ${`[�#3�|�#4�|�#6�|�#8�]`}${`�#9�`}${`[�/#5�|�/#7�|�/#9�]`}${`[�/#3�|�/#4�|�/#6�|�/#8�]`} annual interest rate.`,i=Xb(i),[e,t,a,r,i,[1,`container`],[1,`row`,`mb-5`],[1,`col-lg`],[1,`d-none`,`d-sm-block`,`h3`,`mb-3`,`text-center`],[1,`align-items-center`,`d-flex`,`mb-3`],[1,`ml-1`],[3,`annualInterestRateChanged`,`calculationCompleted`,`projectedTotalAmountChanged`,`retirementDateChanged`,`savingsRateChanged`,`annualInterestRate`,`colorScheme`,`currency`,`deviceType`,`fireWealth`,`hasPermissionToUpdateUserSettings`,`locale`,`projectedTotalAmount`,`retirementDate`,`savingsRate`],[1,`align-items-center`,`d-flex`],[3,`text-muted`],[`animation`,`pulse`,1,`my-1`,3,`theme`],[`animation`,`pulse`,3,`theme`],[1,`mb-2`],[1,`font-weight-bold`],[1,`d-inline-block`,3,`isCurrency`,`locale`,`unit`,`value`],[1,`border-0`,`cursor-pointer`,`d-inline-block`,`font-weight-bold`,`safe-withdrawal-rate-select`,3,`formControl`],[3,`value`],[1,`d-inline-block`,3,`isPercent`,`locale`,`precision`,`value`]]},template:function(t,a){t&1&&(bs(0,`div`,5)(1,`div`,6)(2,`div`,7)(3,`h2`,8),Yb(4,0),Vu(),bs(5,`div`)(6,`h4`,9)(7,`span`),Yb(8,1),Vu(),nb(9,Ra,1,0,`gf-premium-indicator`,10),Vu(),bs(10,`gf-fire-calculator`,11),Uy(`annualInterestRateChanged`,function(i){return a.onAnnualInterestRateChange(i)})(`calculationCompleted`,function(i){return a.onCalculationComplete(i)})(`projectedTotalAmountChanged`,function(i){return a.onProjectedTotalAmountChange(i)})(`retirementDateChanged`,function(i){return a.onRetirementDateChange(i)})(`savingsRateChanged`,function(i){return a.onSavingsRateChange(i)}),Vu()()()(),bs(11,`div`)(12,`h4`,12)(13,`span`),Yb(14,2),Vu(),nb(15,Sa,1,0,`gf-premium-indicator`,10),Vu(),nb(16,Pa,3,4,`div`)(17,Ia,13,16,`div`,13),Vu()()),t&2&&(Bw(9),rb(a.user?.subscription?.type===`Basic`?9:-1),Bw(),ev(`opacity`,a.user?.subscription?.type===`Basic`?`0.67`:`initial`)(`pointer-events`,a.user?.subscription?.type===`Basic`?`none`:`initial`),yy(`annualInterestRate`,a.user?.settings?.annualInterestRate)(`colorScheme`,a.user?.settings?.colorScheme)(`currency`,a.user?.settings?.baseCurrency)(`deviceType`,a.deviceType())(`fireWealth`,a.fireWealth?.today.valueInBaseCurrency)(`hasPermissionToUpdateUserSettings`,!a.hasImpersonationId&&a.hasPermissionToUpdateUserSettings)(`locale`,a.user?.settings?.locale)(`projectedTotalAmount`,a.user?.settings?.projectedTotalAmount)(`retirementDate`,a.user?.settings?.retirementDate)(`savingsRate`,a.user?.settings?.savingsRate),Bw(5),rb(a.user?.subscription?.type===`Basic`?15:-1),Bw(),rb(a.isLoading?16:17))},dependencies:[lr,Jn,Xn,Yn,At$1,qn,$t,_i,rt,K,B,Qn,pn,ar],styles:[`[_nghost-%COMP%]{display:block}[_nghost-%COMP%]   .safe-withdrawal-rate-select[_ngcontent-%COMP%]{background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='rgba(0, 0, 0, 0.87)' height='6' width='10'><polygon points='0,0 10,0 5,6'/></svg>");appearance:none;background-color:transparent;background-position:right 0 center;background-repeat:no-repeat;color:rgb(var(--%NS%dark-primary-text));padding:0 .75rem 0 .25rem}[_nghost-%COMP%]   .safe-withdrawal-rate-select[_ngcontent-%COMP%]:focus{box-shadow:none;outline:0}.theme-dark[_nghost-%COMP%]   .safe-withdrawal-rate-select[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .safe-withdrawal-rate-select[_ngcontent-%COMP%]{background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='white' height='6' width='10'><polygon points='0,0 10,0 5,6'/></svg>");color:rgb(var(--%NS%light-primary-text))}.theme-dark[_nghost-%COMP%]   .safe-withdrawal-rate-select[_ngcontent-%COMP%]   option[_ngcontent-%COMP%], .theme-dark   [_nghost-%COMP%]   .safe-withdrawal-rate-select[_ngcontent-%COMP%]   option[_ngcontent-%COMP%]{color:rgb(var(--%NS%dark-primary-text))}`]})}}return n$1})()});var Li;A(()=>{M();Vt();Li=[{canActivate:[Z$1],component:xt,path:``,title:`FIRE`}]})();export{Li as routes};

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.