PageSourceSearch

https://www.moneygeek.com/_next/static/chunks/6480.4823cbcdc4ec2687.js

js moneygeek.com collected 2026-09-24 08:42:09 UTC 30,421 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6480],{46480:(e,a,s)=>{"use strict";s.r(a),s.d(a,{default:()=>F,motageTermList:()=>_});var l=s(95155),n=s(19749);s(42672);var i=s(12115),t=s(62561),r=s(17617),o=s(80683);let c=["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"],d=()=>{let e,a=(0,n.c)(1);return a[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,l.jsxs)("svg",{width:"16",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,l.jsx)("path",{d:"M5.94,4a2,2,0,1,0,2,2,2,2,0,0,0-2-2Zm0,3A1,1,0,0,1,5,6.37,1,1,0,0,1,6.32,5.06,1,1,0,0,1,5.94,7Z",transform:"translate(2)",fill:"#1f1b50",fillRule:"evenodd"}),(0,l.jsx)("path",{d:"M11.34,5.42A5.44,5.44,0,1,0,1.39,9V9l3.78,5.8a.93.93,0,0,0,1.55,0h0L10.49,9a5.38,5.38,0,0,0,.88-3,5.49,5.49,0,0,0,0-.58v0Zm-1.69,3L5.94,14.11,2.22,8.4a4.43,4.43,0,1,1,7.43,0Z",transform:"translate(2)",fill:"#1f1b50",fillRule:"evenodd"})]}),a[0]=e):e=a[0],e};var h=s(29071);let m=(0,h.default)(()=>Promise.all([s.e(8910),s.e(7020),s.e(7753)]).then(s.bind(s,97753)).then(e=>e.SemicircleGraph),{loadableGenerated:{webpack:()=>[97753]},ssr:!1}),x=(0,h.default)(()=>Promise.all([s.e(6414),s.e(8910),s.e(9408),s.e(5950)]).then(s.bind(s,65950)).then(e=>e.YearChart),{loadableGenerated:{webpack:()=>[65950]},ssr:!1}),u=(0,h.default)(()=>Promise.all([s.e(8910),s.e(4439)]).then(s.bind(s,46820)).then(e=>e.PaymentDonut),{loadableGenerated:{webpack:()=>[46820]},ssr:!1}),p=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:0}),j=({isMobile:e,isTablet:a,pie:s,mortageData:n,mortageExtras:t,totalMonthlyPayment:r,monthlyPayment:o,tabsChange:c,debtRatio:d})=>{let[h,j]=(0,i.useState)(""),v=[["Principal & Interest",o],["Property tax",t.propertyTax],["Homeowner's insurance",t.homeownerInsurance],["PMI",t.PMI],["HOA Fees",t.HOA]],g=n?.homePrice-n?.downPayment,f=n?.interestRate,b=n?.loanTerm,N=Date.now(),[y,w]=(0,i.useState)(I(g,f,b,new Date(N)));function I(e,a,s,l){let n=a/100/12,i=12*s,t=e*n/(1-Math.pow(1+n,-i)),r=e,o=0,c=0,d=[],h=[],m=[],x=new Date(l);for(let e=0;e<i;e++){let e=r*n;o+=e,m.push([x.getTime(),o]),c+=t-e,h.push([x.getTime(),c]),r-=t-e,d.push([x.getTime(),r]),x.setMonth(x.getMonth()+1)}return[{name:"Principal Paid",data:h},{name:"Interest Paid",data:m},{name:"Loan balance",data:d}]}return(0,i.useEffect)(()=>{n.homePrice>=n.downPayment&&w(I(g,f,b,new Date(N)))},[n]),(0,l.jsxs)(l.Fragment,{children:[0===c&&(0,l.jsx)("div",{className:"donut-container",children:(0,l.jsx)(u,{data:v,height:e?s?.mobile||300:a?s?.tablet||300:s?.default||230,width:e?s?.mobile||300:a?s?.tablet||300:s?.default||230,pieSize:e?"85%":"100%",totalMonthlyPayment:r})}),1===c&&(0,l.jsx)(m,{height:e?160:a?180:200,width:e?300:240,tickLength:e?38:a?44:49,debtRatio:d}),2===c&&(0,l.jsxs)("div",{className:"graph-container",children:[(0,l.jsx)(x,{data:y,height:e?190:270,width:e?330:a?350:300,isMobile:e,setYearChart:j,isVisible:!0}),(0,l.jsx)("div",{className:"graph-info",children:(0,l.jsxs)("div",{className:"graph-info-container",children:[(0,l.jsxs)("div",{className:"row",children:[(0,l.jsxs)("div",{className:"graph-color",children:[(0,l.jsx)("div",{className:"circle blue"}),(0,l.jsx)("p",{children:"Principal paid"})]}),(0,l.jsx)("p",{children:(0,l.jsx)("b",{children:p.format(h?.[0]?.y)})})]}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsxs)("div",{className:"graph-color",children:[(0,l.jsx)("div",{className:"circle green"}),(0,l.jsx)("p",{children:"Interest paid"})]}),(0,l.jsx)("p",{children:(0,l.jsx)("b",{children:p.format(h?.[1]?.y)})})]}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsxs)("div",{className:"graph-color",children:[(0,l.jsx)("div",{className:"circle blue-dark"}),(0,l.jsx)("p",{children:"Loan balance"})]}),(0,l.jsx)("p",{children:(0,l.jsx)("b",{children:p.format(h?.[2]?.y)})})]})]})})]})]})};var v=s(89036),g=s(85453);let f=["Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","N
1orth Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"];var b=s(79542),N=s(82743),y=s(40628),w=s(31331),I=s(59853),P=s.n(I),C=s(24148),M=s(9675),A=s(94223),S=s(85296),T=s(53755),k=s(98375),D=s(29358),$=s(50489),O=s(71373);let R={control:e=>({...e,"&:hover":{borderColor:"#292929"},border:"1px solid #9a9999",boxShadow:"none"}),valueContainer:e=>({...e,height:"48px",borderRadius:"6px",input:{display:"none"}}),indicatorSeparator:e=>({...e,opacity:"0"})},_=[{value:30,label:"30-Year Fixed"},{value:20,label:"20-Year Fixed"},{value:15,label:"15-Year Fixed"},{value:10,label:"10-Year Fixed"}],V=({item:e,kevelData:a,trackingComponentName:s="",trackingComponentTitle:n=""})=>{var h,m,x,u,p;let I,P,V,F,H,E,L,z,U,[W,Y]=(0,r.d)(),[B,G]=(0,i.useState)(0),[Z,J]=(0,i.useState)(0),{ipInfo:K}=(0,i.useContext)(o.qv),[q,Q]=(0,i.useState)(K?.zipcode),[X,ee]=(0,i.useState)(K.state),[ea,es]=(0,i.useState)(null),[el,en]=(0,i.useState)(0),[ei,et]=(0,i.useState)(!0),[er,eo]=(0,i.useState)(!1),[ec]=(0,i.useState)(!1),[ed,eh]=(0,i.useState)(!1),[em,ex]=(0,i.useState)(!1),[eu,ep]=(0,i.useState)(!1),[ej,ev]=(0,i.useState)({homePrice:25e4,downPayment:5e4,percentage:20,loanTerm:30,interestRate:7,monthlyIncome:6e3,monthlyDebt:0,zipCode:0}),[eg,ef]=(0,i.useState)(0),[eb,eN]=(0,i.useState)(0),[ey,ew]=(0,i.useState)({propertyTax:.0076*ej.homePrice/12,homeownerInsurance:165,PMI:0,HOA:0}),[eI,eP]=(0,i.useState)({propertyTax:ej?.homePrice*.0076,homeownerInsurance:ey?.homeownerInsurance*12,PMI:ey?.PMI*12,HOA:ey?.HOA*12}),eC=a?.keywords?.length>0,eM=a?.envVars?.calculatorTypeId,eA=$.ny.find(e=>e.label===X)?.value,eS=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:0}),eT=(0,i.useContext)(o.Hq);(0,i.useEffect)(()=>{eT({type:"IPINFO_NEED_ZIPCODE"})},[eT]);let ek=""===q||q?.length<4||!c?.includes(X),eD=ej.downPayment>=ej.homePrice,e$=ej.downPayment>.9*ej.homePrice||ej.percentage>=90;function eO(e){Q(e.target.value),clearTimeout(ea),es(setTimeout(()=>{let a;ee(e.target.value.length>=4?(a=parseInt(e.target.value,10))>=35e3&&a<=36999?"Alabama":a>=99500&&a<=99999?"Alaska":a>=85e3&&a<=86999?"Arizona":a>=71600&&a<=72999?"Arkansas":a>=9e4&&a<=96699?"California":a>=8e4&&a<=81999?"Colorado":a>=6e3&&a<=6389||a>=6391&&a<=6999?"Connecticut":a>=19700&&a<=19999?"Delaware":a>=32e3&&a<=34999?"Florida":a>=3e4&&a<=31999||a>=39800&&a<=39999?"Georgia":a>=96700&&a<=96999?"Hawaii":a>=83200&&a<=83999&&83414!=a?"Idaho":a>=6e4&&a<=62999?"Illinois":a>=46e3&&a<=47999?"Indiana":a>=5e4&&a<=52999?"Iowa":a>=66e3&&a<=67999?"Kansas":a>=4e4&&a<=42999?"Kentucky":a>=7e4&&a<=71599?"Louisiana":a>=3900&&a<=4999?"Maine":a>=20600&&a<=21999?"Maryland":a>=1e3&&a<=2799||5501==a||5544==a?"Massachusetts":a>=48e3&&a<=49999?"Michigan":a>=55e3&&a<=56899?"Minnesota":a>=38600&&a<=39999?"Mississippi":a>=63e3&&a<=65999?"Missouri":a>=59e3&&a<=59999?"Montana":a>=27e3&&a<=28999?"North Carolina":a>=58e3&&a<=58999?"North Dakota":a>=68e3&&a<=69999?"Nebraska":a>=88900&&a<=89999?"Nevada":a>=3e3&&a<=3899?"New Hampshire":a>=7e3&&a<=8999?"New Jersey":a>=87e3&&a<=88499?"New Mexico":a>=1e4&&a<=14999||6390==a||501==a||544==a?"New York":a>=43e3&&a<=45999?"Ohio":a>=73e3&&a<=73199||a>=73400&&a<=74999?"Oklahoma":a>=97e3&&a<=97999?"Oregon":a>=15e3&&a<=19699?"Pennsylvania":a>=300&&a<=999?"Puerto Rico":a>=2800&&a<=2999?"Rhode Island":a>=29e3&&a<=29999?"South Carolina":a>=57e3&&a<=57999?"South Dakota":a>=37e3&&a<=38599?"Tennessee":a>=75e3&&a<=79999||a>=73301&&a<=73399||a>=88500&&a<=88599?"Texas":a>=84e3&&a<=84999?"Utah":a>=5e3&&a<=5999?"Vermont":a>=20100&&a<=20199||a>=22e3&&a<=24699||20598==a?"Virginia":a>=2e4&&a<=20099||a>=20200&&a<=20599||a>=56900&&a<=56999?"Washington DC":a>=98e3&&a<=99499?"Washington":a>=24700&&a<=26999?"West Virginia":a>=53e3&&a<=54999?"Wisconsin":a>=82e3&&a<=83199||83414==a?"Wyoming":"none":null)},500))}let eR=(e,a)=>{"loanTerm"===a&&ev({...ej,[a]:e.value}),"loanTerm"!==a&&ev({...ej,[a]:e.floatValue||null})},e_=(e,a)=>{ew({...ey,[a]:e.floatValue||null}),eP({...eI,[a]:12*e.floatValue||null})},eV=(e,a)=>{eP({...eI,[a]:e.floatValue||null}),ew({...ey,[a]:Math.round(e.floatValue/12)||null})};(0,i.useEffect)(()=>{ej.homePrice>=ej.downPayment&&(ev({...ej,percentage:Math.round(ej.downPayment/ej.homePrice*100)}),ew({...ey,propertyTax:.0076*ej.homePrice/12}))},[ej.homePrice]),(0,i.useEffect)(()=>{ej.downPayment<=ej.homePrice&&ev({...ej,percentage:ej.downPayment/ej.homePrice*100}),ej.downPayment>ej.homePrice&&ev({...ej,percentage:100})},[ej.downPayment]),(0,i.useEffect)(()=>{ej.downPayment<=ej.homePrice&&ev({...ej,downPayment:ej.homePrice*ej.percentage/100})},[ej?.percentage]),(0,i.useEffect)(()=>{e?.state?(Q(0),ee(e?.state)):K?.zipcode&&(K?.zipcode&&f?.includes(K?.state)?(Q(K?.zipcode),ee(K?.state)):K?.zipcode&&!f?.includes(K?.state)&&(Q(90011),ee("California")))},[K]);let eF=e=>{let a;eh(!ed),ex(!em),!e&&(a="u">typeof document?document.getElementById("right"):null)&&a.scrollIntoView({behavior:"smooth"})};(0,i.useEffect)(()=>{let a;if(e?.state===null)return K&&K?.zipcode||(a=setTimeout(()=>{eo(!0)},3e3)),()=>{clearTimeout(a)}},[K]),(0,i.useEffect)(()=>{er&&(ev({...ej,zipCode:90011}),ee("California"))},[er]),(0,i.useEffect)(()=>
1{if("u">typeof document){let e=document.querySelector("html");e&&(e.style.overflow=ed?"hidden":"auto")}},[ed]),(0,i.useEffect)(()=>{let e,a,s;ej.homePrice>=ej.downPayment&&ej.interestRate>0&&(e=ej?.homePrice-ej?.downPayment,a=ej?.interestRate/1200,s=ej?.loanTerm*12,ef(Math.round(+(e*a/(1-(1+a)**-s))))),en(eS.format(Math.round(eg+ey.propertyTax+ey.homeownerInsurance+ey.PMI+ey.HOA+ej.monthlyDebt))),eN(Math.round((eg+ey.propertyTax+ey.homeownerInsurance+ey.PMI+ey.HOA+ej.monthlyDebt)/ej.monthlyIncome*100))},[ej,ey,eg]);let eH=(0,i.useRef)(null),eE=((e,a)=>{let[s,l]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let s=new IntersectionObserver(([e])=>{e.isIntersecting?l(e.isIntersecting):l(!1)},{rootMargin:a});return e.current&&s.observe(e.current),()=>{s.unobserve(e.current)}},[]),s})(eH,"-150px"),eL=()=>(0,l.jsxs)("div",{className:"left",children:[(0,l.jsxs)("div",{className:`row ${e?.state?"no-show":""}`,children:[(0,l.jsx)("label",{className:"label",children:"Your Zip Code"}),(0,l.jsxs)(M.MJ,{isInvalid:ek,className:"flex hover:border-mg-text-dark focus-within:border-black border-1 rounded-[6px] mb-5 border-mg-gray-medium",children:[(0,l.jsx)("input",{className:"m-0 text-black h-[50px]",type:"text",autoComplete:"off",pattern:"^[0-9]+$",name:"zipCode",onChange:eO,title:"Five numbers zip code",placeholder:"Zip Code",maxLength:5,value:q||null,onMouseEnter:()=>et(!1),onMouseLeave:()=>et(!0),style:{border:"0px",marginBottom:"0px",width:"100px"}}),(0,l.jsx)("div",{className:`flex justify-end leading-[18.4px] p-[15px] flex-grow ${ei?"flex-input":"flex-input-no-show"} `,children:X?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{className:"mb-0",children:eA??X}),(0,l.jsx)(d,{})]}):(0,l.jsx)(C.A,{className:"spinner"})})]}),ek?(0,l.jsx)(M.Wt,{children:"Please enter a valid US Zip Code"}):null]}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("label",{className:"label",children:"Home Price"}),(0,l.jsxs)(M.MJ,{isInvalid:eD,children:[(0,l.jsx)(y.A,{prefix:"$ ",className:`${eD?"error":""}`,placeholder:"$ 250,000",thousandSeparator:!0,allowNegative:!1,decimalScale:0,onValueChange:e=>{eR(e,"homePrice")},value:ej.homePrice}),eD?(0,l.jsx)(M.Wt,{children:"The home price must be greater than the down payment."}):null]})]}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsxs)("label",{className:"label mc-flex mb-2",children:["Down Payment (20%)"," ",(0,l.jsx)(S.A,{id:"downpayment-disclaimer",withInfoIcon:!0,content:(0,l.jsx)("div",{children:(0,l.jsx)("p",{children:"The initial cash amount you pay when purchasing a home, usually a percentage of the total price."})})})]}),(0,l.jsxs)(M.MJ,{isInvalid:e$,children:[(0,l.jsxs)("div",{className:"row-double",children:[(0,l.jsx)("div",{className:"payment",children:(0,l.jsx)(y.A,{prefix:"$ ",className:`${e$?"error":""}`,placeholder:"$ 50,000",thousandSeparator:!0,allowNegative:!1,decimalScale:0,onValueChange:e=>{eR(e,"downPayment")},value:ej.downPayment})}),(0,l.jsx)("div",{className:"percentage",children:(0,l.jsx)(y.A,{isAllowed:e=>{let{formattedValue:a,floatValue:s}=e;return""===a||90>=(s||0)},suffix:" %",className:`${e$?"error":""}`,allowNegative:!1,placeholder:"20 %",decimalScale:0,onValueChange:e=>{eR(e,"percentage")},value:ej.percentage})})]}),e$?(0,l.jsx)(M.Wt,{children:"Down payment should be less than home price"}):null]})]}),(0,l.jsxs)("div",{className:"row-double",children:[(0,l.jsxs)("div",{className:"terms",children:[(0,l.jsxs)("label",{className:"label mc-flex mb-2",children:["Loan Terms"," ",(0,l.jsx)(S.A,{id:"loanTerms-disclaimer",withInfoIcon:!0,content:(0,l.jsx)("div",{children:(0,l.jsx)("p",{children:"The duration of time you have to repay a new loan, typically measured in years."})})})]}),(0,l.jsx)(t.Ay,{isSearchable:!W,onChange:e=>eR(e,"loanTerm"),options:_,value:_?.filter(e=>e.value===ej.loanTerm),styles:R,instanceId:`mortgage-calculator-${e?.id??"loanTerm"}`,inputId:`mortgage-calculator-${e?.id??"loanTerm"}-input`})]}),(0,l.jsxs)("div",{className:"interest",children:[(0,l.jsx)("label",{className:"label",children:"Interest Rate"}),(0,l.jsx)(y.A,{isAllowed:e=>{let{formattedValue:a,floatValue:s}=e;return""===a||100>=(s||0)},suffix:" %",placeholder:"7 %",allowNegative:!1,decimalScale:1,onValueChange:e=>{eR(e,"interestRate")},value:ej.interestRate})]})]}),(0,l.jsxs)("div",{className:em?"extra-fees fee-show":"extra-fees",children:[(0,l.jsx)("div",{className:"click",onClick:()=>ep(!eu),children:(0,l.jsxs)("p",{children:["Optional: add taxes, insurance, HOA Fees"," ",(0,l.jsx)(b.g,{icon:eu?N.w2A:N.Jt$})]})}),eu?(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{children:"Add Fees"}),(0,l.jsxs)("div",{className:"bloc",children:[(0,l.jsxs)("div",{className:"bloc-tabs",children:[(0,l.jsx)("div",{"aria-hidden":!0,
1className:0===Z?"tabs active-tabs":"tabs",onClick:()=>void J(0),children:(0,l.jsx)("p",{children:"Monthly"})}),(0,l.jsx)("div",{"aria-hidden":!0,className:1===Z?"tabs active-tabs":"tabs",onClick:()=>void J(1),children:(0,l.jsx)("p",{children:"Annualy"})})]}),(0,l.jsx)("div",{className:"or"})]}),(0,l.jsxs)("div",{className:"row-double",children:[(0,l.jsxs)("div",{className:"other",children:[(0,l.jsxs)("label",{className:"label mc-flex mb-2",children:["Property Tax"," ",(0,l.jsx)(S.A,{id:"propertyTax-disclaimer",withInfoIcon:!0,content:(0,l.jsx)("div",{children:(0,l.jsx)("p",{children:"Any tax on real estate or certain other forms of property."})})})]}),(0,l.jsx)(y.A,{prefix:"$ ",thousandSeparator:!0,placeholder:"$ 158",allowNegative:!1,decimalScale:0,onValueChange:0===Z?e=>e_(e,"propertyTax"):e=>eV(e,"propertyTax"),value:0===Z?Math.round(ey.propertyTax):Math.round(eI.propertyTax)})]}),(0,l.jsxs)("div",{className:"other",children:[(0,l.jsxs)("label",{className:"label mc-flex flex-wrap",children:["Homeowner's Insurance"," ",(0,l.jsx)(S.A,{id:"Homeowne-ins-disclaimer",withInfoIcon:!0,content:(0,l.jsx)("div",{children:(0,l.jsx)("p",{children:"A type of insurance that provides financial protection against losses resulting from covered events that damage your home, such as fire or theft."})})})]}),(0,l.jsx)(y.A,{prefix:"$ ",thousandSeparator:!0,placeholder:"$ 165",allowNegative:!1,decimalScale:0,onValueChange:0===Z?e=>e_(e,"homeownerInsurance"):e=>eV(e,"homeownerInsurance"),value:0===Z?ey.homeownerInsurance:eI.homeownerInsurance})]})]}),(0,l.jsxs)("div",{className:"row-double",children:[(0,l.jsxs)("div",{className:"other",children:[(0,l.jsxs)("label",{className:"label flex",children:["PMI"," ",(0,l.jsx)(S.A,{id:"pmi-disclaimer",withInfoIcon:!0,content:(0,l.jsx)("div",{children:(0,l.jsx)("p",{children:"Private mortgage insurance (PMI) is a type of insurance that protects lenders in case you default on your mortgage loan."})})})]}),(0,l.jsx)(y.A,{prefix:"$ ",thousandSeparator:!0,placeholder:"$ 0",allowNegative:!1,decimalScale:0,onValueChange:0===Z?e=>e_(e,"PMI"):e=>eV(e,"PMI"),value:0===Z?ey.PMI:eI.PMI})]}),(0,l.jsxs)("div",{className:"other",children:[(0,l.jsxs)("label",{className:"label flex",children:["HOA Fees"," ",(0,l.jsx)(S.A,{id:"hoa-disclaimer",withInfoIcon:!0,content:(0,l.jsx)("div",{children:(0,l.jsx)("p",{children:"A recurring fee charged by the homeowners association (HOA) to cover the cost of services and amenities provided to homeowners in the community."})})})]}),(0,l.jsx)(y.A,{prefix:"$ ",thousandSeparator:!0,placeholder:"$ 0",allowNegative:!1,decimalScale:0,onValueChange:0===Z?e=>e_(e,"HOA"):e=>eV(e,"HOA"),value:0===Z?ey.HOA:eI.HOA})]})]})]}):null]}),em?(0,l.jsx)(M.$n,{size:"medium",color:"blue",className:"w-full mt-5",onClick:()=>eF(!0),children:"APPLY"}):null]}),ez={year:"numeric",month:"short",day:"numeric",timeZone:"UTC"},eU=new Date().toLocaleDateString("en-US",ez),eW=new Date(e?.update_date),eY=new Date(eW.getTime()+Math.abs(6e4*eW.getTimezoneOffset())).toLocaleDateString("en-US",ez);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(M.$n,{className:`!rounded-full h-[48px] fixed bottom-[30px] left-[50%] translate-x-[-50%] z-[10] transition-opacity duration-300 ease-in-out
2      ${eE?"fade-in-filter":"fade-out-filter"}`,color:"blue",size:"medium",onClick:()=>eF(!1),children:"REFINE RESULTS"}),(0,l.jsxs)("section",{className:"mortage-calculator-container",id:"mortage-calculator",children:[(0,l.jsxs)("div",{className:"title",children:[(0,l.jsx)("h2",{children:"Mortgage Calculator"}),(0,l.jsx)("p",{className:"subtitle",children:e?.subtitle||"Simply Estimate Your Loan Payments, Taxes & PMI."}),(0,l.jsxs)("p",{className:"updated",children:["Updated: ",(0,l.jsx)("b",{children:e?.update_date?eY:eU})]}),(0,l.jsxs)("div",{className:"mc-flex",children:[(0,l.jsxs)("p",{className:"label",children:[(0,l.jsx)(b.g,{className:"check-icon",icon:N.e68}),"Fact Checked"]}),(0,l.jsx)(A.A,{expert:e?.by_author,hasDefaultComponent:!1})]})]}),(0,l.jsxs)("div",{className:"mg-container",children:[em?(0,l.jsx)("div",{className:"blur-overlay"}):null,(0,l.jsxs)("div",{className:em?"show-widget":"no-show",children:[(0,l.jsx)("div",{className:em?"show-close-button":"close-buton",onClick:()=>eF(!0),children:(0,l.jsx)(b.g,{className:"close-icon",icon:N.QLR})}),(0,l.jsx)("div",{className:"show-widget-container",children:em?eL():null})]}),eL(),(0,l.jsxs)("div",{className:"right",id:"right",ref:eH,children:[(0,l.jsxs)("div",{className:"bloc-tabs",children:[(0,l.jsx)("div",{"aria-hidden":!0,
2className:0===B?"tabs active-tabs":"tabs",onClick:()=>void G(0),children:(0,l.jsx)("p",{children:"Monthly Payment"})}),(0,l.jsx)("div",{"aria-hidden":!0,className:1===B?"tabs active-tabs":"tabs",onClick:()=>void G(1),children:(0,l.jsx)("p",{children:"Affordability"})}),(0,l.jsx)("div",{"aria-hidden":!0,className:2===B?"tabs active-tabs":"tabs",onClick:()=>void G(2),children:(0,l.jsx)("p",{children:"Amortization"})})]}),(0,l.jsxs)("div",{className:`fade-wrapper ${ec?"fade-out":"fade-in"}`,children:[0===B&&(0,l.jsxs)("div",{className:"mg-container-right",children:[(0,l.jsx)(j,{isMobile:W,isTablet:Y,pie:!0,totalMonthlyPayment:el,monthlyPayment:eg,mortageData:ej,mortageExtras:ey,tabsChange:B,debtRatio:eb}),(0,l.jsxs)("div",{className:"first-form",children:[(0,l.jsxs)("div",{className:"row",children:[(0,l.jsxs)("div",{className:"mc-flex",children:[(0,l.jsx)("div",{className:"circle-container",children:(0,l.jsx)("div",{className:"circle blue"})}),(0,l.jsx)("label",{className:"label",children:"Principal & interest"})]}),(0,l.jsx)("p",{children:(0,l.jsx)("b",{children:eS.format(eg)})})]}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsxs)("div",{className:"mc-flex",children:[(0,l.jsx)("div",{className:"circle-container",children:(0,l.jsx)("div",{className:"circle black"})}),(0,l.jsxs)("label",{className:"label mc-flex mb-2",children:["Property tax"," ",(0,l.jsx)(S.A,{id:"property-tax-disclaimer-1",withInfoIcon:!0,content:(0,l.jsx)("div",{children:(0,l.jsx)("p",{children:"Any tax on real estate or certain other forms of property."})})})]})]}),(0,l.jsxs)("div",{className:"mc-flex",children:[(0,l.jsx)("p",{children:(0,l.jsx)("b",{children:"+"})}),(0,l.jsx)(y.A,{prefix:"$ ",thousandSeparator:!0,placeholder:"$ 158",allowNegative:!1,decimalScale:0,onValueChange:e=>e_(e,"propertyTax"),value:Math.round(ey.propertyTax)})]})]}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsxs)("div",{className:"mc-flex",children:[(0,l.jsx)("div",{className:"circle-container",children:(0,l.jsx)("div",{className:"circle green"})}),(0,l.jsxs)("label",{className:"label mc-flex flex-wrap mb-2",children:["Homeowner's insurance"," ",(0,l.jsx)(S.A,{id:"Homeowner-ins-disclaimer-2",withInfoIcon:!0,content:(0,l.jsx)("div",{children:(0,l.jsx)("p",{children:"A type of insurance that provides financial protection against losses resulting from covered events that damage your home, such as fire or theft."})})})]})]}),(0,l.jsxs)("div",{className:"mc-flex",children:[(0,l.jsx)("p",{children:(0,l.jsx)("b",{children:"+"})}),(0,l.jsx)(y.A,{prefix:"$ ",thousandSeparator:!0,placeholder:"$ 165",allowNegative:!1,decimalScale:0,onValueChange:e=>e_(e,"homeownerInsurance"),value:ey.homeownerInsurance})]})]}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsxs)("div",{className:"mc-flex",children:[(0,l.jsx)("div",{className:"circle-container",children:(0,l.jsx)("div",{className:"circle purple"})}),(0,l.jsxs)("label",{className:"label mc-flex mb-2",children:["PMI"," ",(0,l.jsx)(S.A,{id:"pmi-disclaimer-2",withInfoIcon:!0,content:(0,l.jsx)("div",{children:(0,l.jsx)("p",{children:"Private mortgage insurance (PMI) is a type of insurance that protects lenders in case you default on your mortgage loan."})})})]})]}),(0,l.jsxs)("div",{className:"mc-flex",children:[(0,l.jsx)("p",{children:(0,l.jsx)("b",{children:"+"})}),(0,l.jsx)(y.A,{prefix:"$ ",thousandSeparator:!0,placeholder:"$ 0",allowNegative:!1,decimalScale:0,onValueChange:e=>e_(e,"PMI"),value:ey.PMI})]})]}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsxs)("div",{className:"mc-flex",children:[(0,l.jsx)("div",{className:"circle-container",children:(0,l.jsx)("div",{className:"circle yellow"})}),(0,l.jsxs)("label",{className:"label mc-flex mb-2",children:["HOA fees"," ",(0,l.jsx)(S.A,{id:"hoa-disclaimer-2",withInfoIcon:!0,content:(0,l.jsx)("div",{children:(0,l.jsx)("p",{children:"A recurring fee charged by the homeowners association (HOA) to cover the cost of services and amenities provided to homeowners in the community."})})})]})]}),(0,l.jsxs)("div",{className:"mc-flex",children:[(0,l.jsx)("p",{children:(0,l.jsx)("b",{children:"+"})}),(0,l.jsx)(y.A,{prefix:"$ ",thousandSeparator:!0,placeholder:"$ 0",allowNegative:!1,decimalScale:0,onValueChange:e=>e_(e,"HOA"),value:ey.HOA})]})]}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("div",{className:"mc-flex",children:(0,l.jsx)("label",{className:"label",children:(0,l.jsx)("b",{children:"Total monthly payment"})})}),(0,l.jsxs)("div",{className:"mc-flex",children:[(0,l.jsx)("p",{children:"="}),(0,l.jsx)("p",{children:(0,l.jsx)("b",{children:el})})]})]})]})]}),1===B&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"input-row",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"label",children:"Total Monthly Income"}),(0,l.jsx)(y.A,{prefix:"$ ",thousandSeparator:!0,placeholder:"$ 6,000",allowNegative:!1,decimalScale:0,onValueChange:e=>{eR(e,"monthlyIncome")},value:ej.monthlyIncome})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"label",children:"Other Monthly Debts"}),(0,l.jsx)(y.A,{prefix:"$ ",thousandSeparator:!0,placeholder:"$ 0",allowNegative:!1,decimalScale:0,onValueChange:e=>{eR(e,"monthlyDebt")},value:ej.monthlyDebt})]})]}),(0,l.jsxs)("div",{className:"mg-container-right",children:[(0,l.jsx)(j,{isMobile:W,isTablet:Y,pie:!0,totalMonthlyPayment:el,mortageData:ej,mortageExtras:ey,debtRatio:eb,tabsChange:B,monthlyPayment:0}
2),(0,l.jsxs)("div",{className:"second-form",children:[(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("p",{children:"Your maximum mortgage payment can be:"}),(0,l.jsx)("p",{children:(0,l.jsx)("b",{className:`bg ${eb<29?"green":eb>28&&eb<=36?"yellow":eb>36?"red":void 0}`,children:eS.format(.36*ej.monthlyIncome-ej.monthlyDebt)})})]}),(0,l.jsxs)("div",{className:"mc-flex",children:[eb<29?(0,l.jsx)("div",{className:"circle green"}):eb>28&&eb<=36?(0,l.jsx)("div",{className:"circle yellow"}):eb>36?(0,l.jsx)("div",{className:"circle  red"}):void 0,(0,l.jsx)("p",{children:eb<=36?"This loan is within your budget.":"This loan exceeds your budget."})]}),(0,l.jsxs)("div",{className:"row",children:[(0,l.jsx)("p",{children:"Monthly Payment"}),(0,l.jsx)("p",{children:(0,l.jsx)("b",{children:el})})]}),(0,l.jsx)("div",{className:"link",children:(0,l.jsx)("a",{target:"_blank",rel:"noopener noreferrer",href:`${(0,w.getBaseURL)()}/mortgage/dti-calculator/`,"aria-label":"Debt-income",children:"Read more about debt-to-income ratios"})})]})]})]}),2===B&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"amortization-row",children:(h=E=ej?.homePrice-ej?.downPayment,m=ej?.interestRate,x=ej?.loanTerm,z=E+(L=Math.round(h*(I=m/12/100)/(1-Math.pow(1+I,-(P=12*x)))*P-h)),u=new Date,p=ej?.loanTerm,(V=new Date(u)).setFullYear(V.getFullYear()+p),F=V.toLocaleString("en-US",{month:"long",timeZone:"UTC"}),H=V.getFullYear(),U=`${F} ${H}`,(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{children:"Loan Amount"}),(0,l.jsx)("p",{className:"number",children:(0,l.jsx)("b",{children:eS.format(E)})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{children:"Total Interest Paid"}),(0,l.jsx)("p",{className:"number",children:(0,l.jsx)("b",{children:eS.format(L)})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{children:"Total Cost of Loan"}),(0,l.jsx)("p",{className:"number",children:(0,l.jsx)("b",{children:eS.format(z)})})]}),(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{children:"Payoff Date"}),(0,l.jsx)("p",{className:"number",children:(0,l.jsx)("b",{children:U})})]})]}))}),(0,l.jsx)("div",{className:"grid-right",children:(0,l.jsx)(j,{isMobile:W,isTablet:Y,pie:!0,totalMonthlyPayment:eg,mortageData:ej,mortageExtras:ey,tabsChange:B,monthlyPayment:0,debtRatio:eb})})]})]})]})]}),(e?.monetization_button===!0||e?.monetization_button===null||e?.monetization_button===void 0)&&(0,l.jsxs)("div",{className:"next-step-container",children:[(0,l.jsxs)("div",{className:"left",children:[(0,l.jsxs)("div",{className:"top",children:[(0,l.jsx)(g.A,{className:"icon",name:"barChart",size:"20px",altText:"Bar Chart Icon"}),(0,l.jsx)("h2",{children:"Next Steps"})]}),(0,l.jsx)("div",{className:"bottom",children:(0,l.jsxs)("p",{children:["Get personalized mortgage rates from"," ",e.state?e.state:f?.includes(K?.state)?K?.state:"California","."]})})]}),(0,l.jsx)("div",{className:"right",children:eC?(0,l.jsx)(T.A,{text:"SEE LATEST MORTGAGE RATES",className:"cursor-pointer hover: button-link h-auto",id:k.Am.mortgage.calculator.button+(e?.id?`_${e?.id}`:""),adTypeId:eM,widgetIdentifier:k.kS.companyScoreWidget,quoteType:D.N2.mortgageCalculator,formClassName:"",componentName:O.dK.dbMortageCalculator,trackingComponentName:s,trackingComponentTitle:n}):null})]}),(0,l.jsxs)("div",{className:"trust",children:[(0,l.jsxs)("div",{className:"first",children:[(0,l.jsx)(g.A,{className:"icon",name:"shield",size:"13px",altText:"Shield Insurance"}),(0,l.jsx)("p",{children:"Why You Can Trust MoneyGeek"})]}),(0,l.jsx)("div",{className:"second",children:(0,w.getRichText)(e?.why_you_can_trust_text)?(0,l.jsx)(v.default,{children:(0,w.getRichText)(e.why_you_can_trust_text)}):(0,l.jsxs)("p",{children:["Although MoneyGeek partners with some of the companies we recommend, our content is written and reviewed by an independent team of writers, editors and licensed agents. Learn more about our \xa0",(0,l.jsx)("a",{href:`${(0,w.getBaseURL)()}/editorial-policy/`,children:"editorial policies"}),"\xa0 and \xa0",(0,l.jsx)("a",{href:`${(0,w.getBaseURL)()}/editorial/`,children:"expert editorial team"}),"."]})})]})]})]})},F=e=>{let a,s=(0,n.c)(5),{item:i,kevelData:t,trackingComponentName:r,trackingComponentTitle:o}=e,c=void 0===r?"":r,d=void 0===o?"":o;return s[0]!==i||s[1]!==t||s[2]!==c||s[3]!==d?(a=(0,l.jsx)("div",{className:P().DBMortageCalculatorContainer,children:(0,l.jsx)(V,{item:i,kevelData:t,trackingComponentName:c,trackingComponentTitle:d})}),s[0]=i,s[1]=t,s[2]=c,s[3]=d,s[4]=a):a=s[4],a}
2},59853:e=>{e.exports={DBMortageCalculatorContainer:"style_DBMortageCalculatorContainer__cflDp"}},94223:(e,a,s)=>{"use strict";s.d(a,{A:()=>r});var l=s(95155),n=s(19749);s(12115);var i=s(64848),t=s(31331);let r=e=>{let a,s,r,o,c=(0,n.c)(9),{expert:d,hasDefaultComponent:h}=e,m=void 0===d?null:d,x=void 0===h||h;if(!m){let e;return c[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,l.jsx)(l.Fragment,{}),c[0]=e):e=c[0],e}c[1]!==m||c[2]!==x?(a=()=>{let{permalink:e,title:a,publish:s}=m;return x&&!e?(0,l.jsx)("a",{target:"_blank",rel:"noopener noreferrer","aria-label":"Author",href:`${(0,t.getBaseURL)()}/editorial/mandy-sleight-licensed-insurance-agent/`,children:"Mandy Sleight"}):e&&s?(0,l.jsx)("a",{target:"_blank",rel:"noopener noreferrer","aria-label":"Author",href:`${(0,t.getBaseURL)()}${(0,i.hg)(e)}`,children:a}):a},c[1]=m,c[2]=x,c[3]=a):a=c[3];let u=a;return c[4]!==u?(s=u(),c[4]=u,c[5]=s):s=c[5],c[6]===Symbol.for("react.memo_cache_sentinel")?(r=(0,l.jsx)("i",{children:"Licensed Insurance Agent"}),c[6]=r):r=c[6],c[7]!==s?(o=(0,l.jsxs)("p",{className:"author",children:["By ",s,", ",r]}),c[7]=s,c[8]=o):o=c[8],o}}}]);

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.