PageSourceSearch

https://toolbreezy.com/_next/static/chunks/66849-ae7b50cb3696a831.js

js toolbreezy.com collected 2026-09-24 14:56:57 UTC 41,600 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[66849],{66849:(e,t,a)=>{a.r(t),a.d(t,{default:()=>z});var s=a(95155),n=a(12115),r=a(27784),l=a(33789),o=a(90235),i=a(97003),d=a(33534),c=a(25016),u=a(94117);let m=(0,u.Dl)(2),h=(0,u.Dl)(0);function p(e){return Number.isFinite(e)?m(e):NaN}function x(e){return Number.isFinite(e)?h(e):NaN}function f(e){return"monthly"===e||"monthly-plus-cap"===e}function g(e,t,a){if(!f(a))return e;let s=1+t;return s<=0?e:e/s}function y(e,t,a,s,n,r){if(s<=0)return null;let l=t+a;return 0===l?null:(g(e,n,r)-(t-a)/s)/l}function b(e,t){return Math.abs(x(e)-x(t))}var j=a(16110);let N="tb-car-lease",v="tb-car-lease-saved",w="flex items-baseline justify-between gap-4 py-1.5",k=[{value:"none",label:"No sales tax",blurb:"Nothing is added. Use this if you only want the base payment."},{value:"monthly",label:"Tax on each monthly payment",blurb:"Tax is charged on the monthly payment, so the payment you were quoted already includes it."},{value:"monthly-plus-cap",label:"Tax on each payment, plus on the money down",blurb:"Tax is charged on the monthly payment and again up front on your cap cost reduction, so the quoted payment includes it."},{value:"upfront-cap",label:"Tax up front on the capitalized cost",blurb:"Tax is a one-off charge at signing on the capitalized cost, so the monthly payment has no tax in it."},{value:"upfront-payments",label:"Tax up front on all the payments",blurb:"Tax is a one-off charge at signing on the sum of every payment, so the monthly payment itself has no tax in it."}],M=["24","27","36","39","48"];function C(e){if(""===e.trim())return null;let t=Number(e);return Number.isFinite(t)?t:null}function S(e){let t=C(e);return null!==t&&t>0?t:0}let T=(0,u.LN)(),$=(0,u.LN)({decimals:0});function F(e){return Number.isFinite(e)?e.toFixed(5):"-"}function q(e,t=2){return Number.isFinite(e)?`${e.toFixed(t)}%`:"-"}function R(e){let t=/\.(\d+)$/.exec(e.trim()),a=t?t[1]:void 0;return .5*Math.pow(10,-(a?a.length:0))}let P=["mode","solveFor","quoted","msrp","sellPrice","residualMode","residualValue","term","rateMode","rateValue","cashDown","tradeEquity","rebates","acqFee","acqCapped","docFee","docCapped","titleReg","taxMethod","taxRate","quotedDas","buyoutFee"],A={mode:"check",solveFor:"mf",quoted:"475",msrp:"40000",sellPrice:"37000",residualMode:"pct",residualValue:"57",term:"36",rateMode:"mf",rateValue:"0.00150",cashDown:"2000",taxMethod:"none"};
1function z(){let[e,t]=(0,n.useState)("check"),[a,u]=(0,n.useState)("mf"),[m,h]=(0,n.useState)(""),[z,D]=(0,n.useState)(""),[J,I]=(0,n.useState)(""),[L,E]=(0,n.useState)("pct"),[O,V]=(0,n.useState)(""),[Y,B]=(0,n.useState)(""),[U,W]=(0,n.useState)("mf"),[_,H]=(0,n.useState)(""),[Z,G]=(0,n.useState)(""),[K,Q]=(0,n.useState)(""),[X,ee]=(0,n.useState)(""),[et,ea]=(0,n.useState)(""),[es,en]=(0,n.useState)(!0),[er,el]=(0,n.useState)(""),[eo,ei]=(0,n.useState)(!1),[ed,ec]=(0,n.useState)(""),[eu,em]=(0,n.useState)("none"),[eh,ep]=(0,n.useState)(""),[ex,ef]=(0,n.useState)(""),[eg,ey]=(0,n.useState)(""),[eb,ej]=(0,n.useState)(!1),[eN,ev]=(0,n.useState)(!1),[ew,ek]=(0,n.useState)([]),[eM,eC]=(0,n.useState)(null),[eS,eT]=(0,n.useState)(null),e$=(0,n.useMemo)(()=>({mode:e=>{("check"===e||"build"===e||"buyout"===e)&&t(e)},solveFor:e=>{("mf"===e||"cap"===e)&&u(e)},quoted:h,msrp:D,sellPrice:I,residualMode:e=>{("pct"===e||"amt"===e)&&E(e)},residualValue:V,term:B,rateMode:e=>{("mf"===e||"apr"===e)&&W(e)},rateValue:H,cashDown:G,tradeEquity:Q,rebates:ee,acqFee:ea,acqCapped:e=>en("0"!==e),docFee:el,docCapped:e=>ei("0"!==e),titleReg:ec,taxMethod:e=>{k.some(t=>t.value===e)&&em(e)},taxRate:ep,quotedDas:ef,buyoutFee:ey}),[]);function eF(e){for(let t of P){let a=e[t];if("string"!=typeof a)continue;let s=e$[t];s&&s(a)}}(0,n.useEffect)(()=>{let e=!1;try{let t=new URLSearchParams(window.location.search);if(t.has("q")||t.has("sp")||t.has("rv")){let a={};for(let e of P){let s=t.get(e);null!==s&&(a[e]=s)}for(let[e,s]of Object.entries({q:"quoted",sp:"sellPrice",rv:"residualValue",n:"term"})){let n=t.get(e);null!==n&&(a[s]=n)}eF(a),e=!0}}catch{}if(!e)try{let e=localStorage.getItem(N);if(e){let t=JSON.parse(e);if(t&&"object"==typeof t){let e={};for(let a of P){let s=t[a];"string"==typeof s&&(e[a]=s)}eF(e)}}}catch{}try{let e=localStorage.getItem(v);if(e){let t=JSON.parse(e);Array.isArray(t)&&ek(t.filter(e=>!!e&&"object"==typeof e).slice(0,3))}}catch{}},[]);let eq=(0,n.useMemo)(()=>({mode:e,solveFor:a,quoted:m,msrp:z,sellPrice:J,residualMode:L,residualValue:O,term:Y,rateMode:U,rateValue:_,cashDown:Z,tradeEquity:K,rebates:X,acqFee:et,acqCapped:es?"1":"0",docFee:er,docCapped:eo?"1":"0",titleReg:ed,taxMethod:eu,taxRate:eh,quotedDas:ex,buyoutFee:eg}),[e,a,m,z,J,L,O,Y,U,_,Z,K,X,et,es,er,eo,ed,eu,eh,ex,eg]);(0,r.Vd)(N,()=>JSON.stringify(eq),[eq]);let eR=S(z),eP=C(J),eA=C(m),ez=C(Y),eD=null!==ez?Math.round(ez):null,eJ=null!==eD?Math.min(120,Math.max(6,eD)):null,eI=null!==eD&&null!==eJ&&eD!==eJ?`Term set to ${eJ} months. This calculator takes 6 to 120 months.`:null,eL=C(O),eE="pct"===L?null!==eL&&eR>0?eR*eL/100:null:eL,eO="pct"===L?eL:null!==eL&&eR>0?eL/eR*100:null,eV=C(_),eY=null===eV?null:"mf"===U?eV:eV/2400,eB=null===eV?null:"mf"===U?2400*eV:eV,eU=S(Z)+S(K)+S(X),eW=(es?S(et):0)+(eo?S(er):0),e_=(es?0:S(et))+(eo?0:S(er))+S(ed),eH=null!==eP?eP+eW-eU:null,eZ=S(eh)/100,eG=[];eI&&eG.push(eI);let eK=[];function eQ(e,t,a=$){let s=C(t);null!==s&&s<0&&eK.push(`${e} (${a(s)})`)}if(eQ("MSRP",z),eQ("the sales tax rate",eh,e=>q(e,2)),"buyout"===e?eQ("the purchase option fee",eg):(eQ("cash down",Z),eQ("trade equity",K),eQ("rebates",X),eQ("the acquisition fee",et),eQ("the dealer doc fee",er),eQ("title and registration",ed)),eK.length>0){let e=1===eK.length?eK[0]:`${eK.slice(0,-1).join(", ")} and ${eK[eK.length-1]}`;eG.push(`A negative entry is read as 0 here, so ${e} ${1===eK.length?"is":"are"} not in any of the figures below.`)}let eX=C(K);"buyout"!==e&&null!==eX&&eX<0&&eG.push("If you owe more on the trade than it is worth, that balance is rolled into the capitalized cost rather than taken off it. Add it to the negotiated selling price instead of typing it here as a negative, or the implied rate comes back higher than the deal really is."),"pct"===L&&null!==eL&&eL>100&&eG.push(`A residual of ${eL} is being read as a percent of MSRP. If you meant dollars, switch the box to $. If you meant ${(eL/10).toFixed(1)}%, retype it.`),null!==eP&&eR>0&&eP>eR&&eG.push("The negotiated price is above MSRP. That happens with dealer-added accessories or a model in short supply, so it is not an error, but check the sheet."),null!==eP&&eR>0&&eP>0&&eP<.7*eR&&eG.push("The negotiated price is more than 30% below MSRP, which is usually a typo. Worth a second look."),eR>0&&null!==eE&&eE>eR&&eG.push("The residual is higher than MSRP, which no lender writes. Check which box that number belongs in.");let e0=[];"check"===e?(null===eA&&e0.push("the monthly payment you were quoted"),"mf"===a&&null===eP&&e0.push("the negotiated selling price"),"cap"===a&&null===eY&&e0.push("mf"===U?"the money factor":"the APR"),null===eE&&e0.push("pct"===L?"MSRP and the residual percent":"the residual value"),null===eJ&&e0.push("the lease term in months")):"build"===e?(null===eP&&e0.push("the negotiated selling price"),null===eE&&e0.push("pct"===L?"MSRP and the residual percent":"the residual value"),null===eJ&&e0.push("the lease term in months"),null===eY&&e0.push("mf"===U?"the money factor":"the APR")):null===eE&&e0.push("pct"===L?"MSRP and the residual percent":"the residual value");let e1="check"===e&&"mf"===a&&null!==eA&&null!==eH&&null!==eE&&null!==eJ?y(eA,eH,eE,eJ,eZ,eu):null,e3=null===e1?null:2400*e1,e2="check"===e&&"cap"===a&&null!==eA&&null!==eY&&null!==eE&&null!==eJ?function(e,t,a,s,n,r){if(a<=0)return null;let l=1/a+s;return 0===l?null:(g(e,n,r)+t/a-t*s)/l}(eA,eE,eJ,eY,eZ,eu):null,e5="check"===e&&"mf"===a?e1:eY,e4="check"===e&&"cap"===a?e2:eH,e6=null!==e5&&null!==e4&&null!==eE&&null!==eJ&&"buyout"!==e?function(e,t,a,s,n,r,l){let o=p(a>0?(e-t)/a:NaN),i=p((e+t)*s),d=Number.isFinite(o)&&Number.isFinite(i)?o+i:NaN,c=0,u=0;"monthly"===r?c=p(d*n):"monthly-plus-cap"===r?(c=p(d*n),u=p(l*n)):"upfront-cap"===r?u=p(e*n):"upfront-payments"===r&&(u=p(d*a*n));let m=Number.isFinite(d)&&Number.isFinite(c)?d+c:NaN;return{depreciation:o,rent:i,base:d,monthlyTax:c,total:m,upfrontTax:u}}(e4,eE,eJ,e5,eZ,eu,eU):null,e7=null!==e1&&null!==e4&&null!==eE&&e4+eE!==0?g(R(m),eZ,eu)/(e4+eE):null,e8=null===e7?null:2400*e7,e9=null!==e5&&null!==e4&&null!==eE&&null!==eJ?function(e,t,a,s){let n=p(1e3/a+1e3*s),r=p((e+t)*1e-4);return{per1000Monthly:n,per1000Term:x(n*a),perMfMonthly:r,perMfTerm:x(r*a),perMfApr:.24000000000000002}}(e4,eE,eJ,e5):null,te=null!==e6?function(e,t,a){let s=e.total,n=p(t),r=p(a),l=p(e.upfrontTax);return{firstMonth:s,cashDown:n,fees:r,upfrontTax:l,total:p(s+n+r+l)}}(e6,S(Z),e_):null,tt=null!==te?te.total:null,ta=C(ex),ts=null!==te&&null!==ta?p(ta)-te.total:null,tn=null!==ta?ta:tt,tr=S(K),tl=null!==e6&&null!==eJ&&null!==tn?p((e6.total*(eJ-1)+tn+tr)/eJ):null,to="check"===e&&null!==eA&&null!==eE&&null!==eJ&&null===eP&&null===eY&&eR>0,ti=(0,n.useMemo)(()=>
1{if(!to||null===eA||null===eE||null===eJ||eR<=0)return[];let e=.8*eR,t=(1.05*eR-e)/8,a=[];for(let s=0;s<9;s++){let n=e+t*s,r=y(eA,n,eE,eJ,eZ,eu);null!==r&&a.push({cap:x(n),mf:r,apr:2400*r})}return a},[to,eA,eE,eJ,eR,eZ,eu]),td=(0,n.useMemo)(()=>e6&&null!==eJ?function(e,t){let a=[],s=0;for(let n=1;n<=t;n+=1)s+=e.total,a.push({idx:n,depreciation:e.depreciation,rent:e.rent,tax:e.monthlyTax,cumulative:s});return a}(e6,Math.min(120,eJ)):[],[e6,eJ]),tc="buyout"===e&&null!==eE?function(e,t,a,s){let n=p(e),r=p(t),l="none"===s?0:p((n+r)*a);return{residual:n,fee:r,tax:l,total:p(n+r+l)}}(eE,S(eg),eZ,eu):null,tu=null!==tc?tc.total:null,tm=k.find(e=>e.value===eu);function th(e){ek(e);try{localStorage.setItem(v,JSON.stringify(e)),eC(null)}catch{eC("Your browser is blocking storage, so these worksheets are kept only until you close the tab. The share link still works.")}}let tp=ew.length>1?Math.min(...ew.map(e=>e.effective)):null;return(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)("div",{className:"flex flex-wrap gap-1 rounded-md border border-input bg-background p-1",children:[{value:"check",label:"Check a quote"},{value:"build",label:"Build a payment"},{value:"buyout",label:"Lease buyout"}].map(a=>(0,s.jsx)("button",{type:"button",onClick:()=>t(a.value),"aria-pressed":e===a.value,className:(0,c.cn)("flex-1 rounded px-3 py-1.5 text-sm transition-colors",e===a.value?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-accent"),children:a.label},a.value))}),"check"===e&&(0,s.jsxs)("div",{className:"space-y-2 rounded-md border bg-muted/30 p-3",children:[(0,s.jsx)("p",{className:"text-sm text-foreground",children:"You have a payment and the worksheet is missing one number. Say which one and it gets solved exactly."}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>u("mf"),"aria-pressed":"mf"===a,className:(0,c.cn)("rounded-md border px-3 py-1.5 text-sm transition-colors","mf"===a?"border-primary bg-primary text-primary-foreground":"border-input bg-background text-muted-foreground hover:bg-accent"),children:"Find the money factor"}),(0,s.jsx)("button",{type:"button",onClick:()=>u("cap"),"aria-pressed":"cap"===a,className:(0,c.cn)("rounded-md border px-3 py-1.5 text-sm transition-colors","cap"===a?"border-primary bg-primary text-primary-foreground":"border-input bg-background text-muted-foreground hover:bg-accent"),children:"Find the capitalized cost"})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"One equation solves one unknown. If both the rate and the price are missing, you get every combination that fits instead of a made-up answer."})]}),"check"===e&&(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(o.J,{htmlFor:"quoted",children:"Monthly payment you were quoted ($)"}),(0,s.jsx)(l.p,{id:"quoted",type:"number",inputMode:"decimal",min:"0",step:"0.01",value:m,onChange:e=>h(e.target.value),placeholder:"the number circled on the worksheet"})]}),(0,s.jsxs)("div",{className:"space-y-1.5 rounded-md border bg-background p-3",children:[(0,s.jsxs)("div",{className:"grid gap-3 sm:grid-cols-[2fr_1fr]",children:[(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(o.J,{htmlFor:"taxmethod",children:"How sales tax is charged"}),(0,s.jsx)("select",{id:"taxmethod",className:"flex h-9 w-full rounded-md border border-input bg-background px-3 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",value:eu,onChange:e=>em(e.target.value),children:k.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(o.J,{htmlFor:"taxrate",children:"Sales tax rate (%)"}),(0,s.jsx)(l.p,{id:"taxrate",type:"number",inputMode:"decimal",min:"0",step:"0.01",value:eh,onChange:e=>ep(e.target.value),placeholder:"e.g. 7",disabled:"none"===eu})]})]}),tm&&(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:tm.blurb})]}),(0,s.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(o.J,{htmlFor:"msrp",children:"MSRP ($)"}),(0,s.jsx)(l.p,{id:"msrp",type:"number",inputMode:"decimal",min:"0",value:z,onChange:e=>D(e.target.value),placeholder:"sticker price"}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"The residual is set against this, not against what you pay."})]}),"buyout"!==e&&(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(o.J,{htmlFor:"sell",children:"Negotiated selling price ($)"}),(0,s.jsx)(l.p,{id:"sell",type:"number",inputMode:"decimal",min:"0",value:J,onChange:e=>I(e.target.value),placeholder:"the price you agreed"}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Negotiating this down cuts depreciation, never the residual."})]})]}),(0,s.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(o.J,{htmlFor:"residual",children:"Residual value"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.p,{id:"residual",type:"number",inputMode:"decimal",min:"0",step:"0.01",className:"flex-1",value:O,onChange:e=>
1V(e.target.value),placeholder:"pct"===L?"e.g. 57":"e.g. 22800"}),(0,s.jsxs)("div",{className:"flex shrink-0 overflow-hidden rounded-md border border-input",children:[(0,s.jsx)("button",{type:"button",onClick:()=>E("pct"),"aria-pressed":"pct"===L,className:(0,c.cn)("px-3 text-sm transition-colors","pct"===L?"bg-primary text-primary-foreground":"bg-background text-muted-foreground hover:bg-accent"),children:"%"}),(0,s.jsx)("button",{type:"button",onClick:()=>E("amt"),"aria-pressed":"amt"===L,className:(0,c.cn)("px-3 text-sm transition-colors","amt"===L?"bg-primary text-primary-foreground":"bg-background text-muted-foreground hover:bg-accent"),children:"$"})]})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"pct"===L?null!==eE?`That is ${T(eE)} of the MSRP you entered.`:"Enter MSRP too and the dollar figure appears here.":null!==eO?`That is ${q(eO,1)} of the MSRP you entered.`:"Enter MSRP too and the percent appears here."})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)(o.J,{htmlFor:"term",children:"Term (months)"}),(0,s.jsx)("div",{className:"flex gap-1",children:M.map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>B(e),"aria-pressed":Y===e,className:(0,c.cn)("rounded border px-1.5 py-0.5 text-xs transition-colors",Y===e?"border-primary bg-primary text-primary-foreground":"border-input bg-background text-muted-foreground hover:bg-accent"),children:e},e))})]}),(0,s.jsx)(l.p,{id:"term",type:"number",inputMode:"numeric",min:6,max:120,step:"1",value:Y,onChange:e=>B(e.target.value),placeholder:"e.g. 36"})]})]}),("check"!==e||"mf"!==a)&&"buyout"!==e&&(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(o.J,{htmlFor:"rate",children:"mf"===U?"Money factor":"APR (%)"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(l.p,{id:"rate",type:"number",inputMode:"decimal",min:"0",step:"mf"===U?"0.00001":"0.01",className:"flex-1",value:_,onChange:e=>H(e.target.value),placeholder:"mf"===U?"e.g. 0.00150":"e.g. 3.6"}),(0,s.jsxs)("div",{className:"flex shrink-0 overflow-hidden rounded-md border border-input",children:[(0,s.jsx)("button",{type:"button",onClick:()=>W("mf"),"aria-pressed":"mf"===U,className:(0,c.cn)("px-3 text-sm transition-colors","mf"===U?"bg-primary text-primary-foreground":"bg-background text-muted-foreground hover:bg-accent"),children:"MF"}),(0,s.jsx)("button",{type:"button",onClick:()=>W("apr"),"aria-pressed":"apr"===U,className:(0,c.cn)("px-3 text-sm transition-colors","apr"===U?"bg-primary text-primary-foreground":"bg-background text-muted-foreground hover:bg-accent"),children:"APR"})]})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:null===eV?"Pick which one you are typing. Nothing is converted for you until you say.":"mf"===U?`A money factor of ${F(eY??0)} is ${q(eB??0)} APR.`:`An APR of ${q(eB??0)} is a money factor of ${F(eY??0)}.`})]}
1),"buyout"===e&&(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(o.J,{htmlFor:"buyoutfee",children:"Purchase option fee ($)"}),(0,s.jsx)(l.p,{id:"buyoutfee",type:"number",inputMode:"decimal",min:"0",value:eg,onChange:e=>ey(e.target.value),placeholder:"check your contract"}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Written into your lease agreement, usually a few hundred dollars. Leave it blank if your contract has none."})]}),"buyout"!==e&&(0,s.jsxs)("details",{className:"rounded-md border bg-background",children:[(0,s.jsxs)("summary",{className:"cursor-pointer select-none px-4 py-2.5 text-sm font-medium text-foreground",children:["Money down and rebates ",eU>0?`(${$(eU)})`:"(optional)"]}),(0,s.jsxs)("div",{className:"space-y-4 border-t px-4 py-4",children:[(0,s.jsxs)("div",{className:"grid gap-4 sm:grid-cols-3",children:[(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(o.J,{htmlFor:"cashdown",children:"Cash down ($)"}),(0,s.jsx)(l.p,{id:"cashdown",type:"number",inputMode:"decimal",min:"0",value:Z,onChange:e=>G(e.target.value),placeholder:"0"})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(o.J,{htmlFor:"trade",children:"Trade equity ($)"}),(0,s.jsx)(l.p,{id:"trade",type:"number",inputMode:"decimal",min:"0",value:K,onChange:e=>Q(e.target.value),placeholder:"0"})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(o.J,{htmlFor:"rebates",children:"Rebates ($)"}),(0,s.jsx)(l.p,{id:"rebates",type:"number",inputMode:"decimal",min:"0",value:X,onChange:e=>ee(e.target.value),placeholder:"0"})]})]}),(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:["All three come off the capitalized cost and add to ",$(eU),". Only the cash down is money you hand over at signing, so only that is counted in the due at signing check below."]})]})]}),"buyout"!==e&&(0,s.jsxs)("details",{className:"rounded-md border bg-background",children:[(0,s.jsxs)("summary",{className:"cursor-pointer select-none px-4 py-2.5 text-sm font-medium text-foreground",children:["Fees and due at signing ",e_+eW>0?`(${$(e_+eW)})`:"(optional)"]}),(0,s.jsxs)("div",{className:"space-y-4 border-t px-4 py-4",children:[(0,s.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(o.J,{htmlFor:"acq",children:"Acquisition fee ($)"}),(0,s.jsx)(l.p,{id:"acq",type:"number",inputMode:"decimal",min:"0",value:et,onChange:e=>ea(e.target.value),placeholder:"from your worksheet"}),(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 text-sm text-foreground",children:[(0,s.jsx)("input",{type:"checkbox",checked:es,onChange:e=>en(e.target.checked),className:"h-4 w-4 accent-[hsl(var(--primary))]"}),"Rolled into the capitalized cost"]})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(o.J,{htmlFor:"doc",children:"Dealer doc fee ($)"}),(0,s.jsx)(l.p,{id:"doc",type:"number",inputMode:"decimal",min:"0",value:er,onChange:e=>el(e.target.value),placeholder:"from your worksheet"}),(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 text-sm text-foreground",children:[(0,s.jsx)("input",{type:"checkbox",checked:eo,onChange:e=>ei(e.target.checked),className:"h-4 w-4 accent-[hsl(var(--primary))]"}),"Rolled into the capitalized cost"]})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(o.J,{htmlFor:"titlereg",children:"Title and registration ($)"}),(0,s.jsx)(l.p,{id:"titlereg",type:"number",inputMode:"decimal",min:"0",value:ed,onChange:e=>ec(e.target.value),placeholder:"0"})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(o.J,{htmlFor:"das",children:"Due at signing you were quoted ($)"}),(0,s.jsx)(l.p,{id:"das",type:"number",inputMode:"decimal",min:"0",value:ex,onChange:e=>ef(e.target.value),placeholder:"the dealer's figure"})]})]}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Every fee here comes off your own worksheet. Nothing is filled in from a table of typical charges, because a plausible-looking guess is the last thing you want to repeat to a finance manager."})]})]}),eG.length>0&&(0,s.jsx)("div",{className:"space-y-1 rounded-md border border-amber-500/40 bg-amber-500/10 p-3",children:eG.map(e=>(0,s.jsx)("p",{className:"text-sm text-foreground",children:e},e))}),(0,s.jsxs)("div",{"aria-live":"polite",className:"space-y-4",children:[to&&ti.length>0&&(0,s.jsxs)("div",{className:"space-y-3 rounded-lg border bg-muted/40 p-4",children:[(0,s.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Two numbers are missing, so there is no single answer."}),(0,s.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Your payment of ",T(eA??0)," is consistent with every row below. The worksheet has to tell you which one is yours. Fill in the negotiated selling price or the money factor and this collapses to one exact answer."]}
1),(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Sampled from ",$(.8*eR)," to ",$(1.05*eR)," of capitalized cost, which is 80 to 105 percent of the ",$(eR)," MSRP. A deal outside that range is possible and is not on this table."]}),(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"w-full min-w-[380px] text-sm",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"border-b text-left text-xs uppercase text-muted-foreground",children:[(0,s.jsx)("th",{className:"py-2 pr-3 font-medium",children:"Capitalized cost"}),(0,s.jsx)("th",{className:"py-2 pr-3 font-medium",children:"Money factor"}),(0,s.jsx)("th",{className:"py-2 font-medium",children:"APR"})]})}),(0,s.jsx)("tbody",{children:ti.map(e=>(0,s.jsxs)("tr",{className:"border-b border-border/50",children:[(0,s.jsx)("td",{className:"py-1.5 pr-3 tabular-nums",children:$(e.cap)}),(0,s.jsx)("td",{className:"py-1.5 pr-3 tabular-nums",children:F(e.mf)}),(0,s.jsx)("td",{className:"py-1.5 tabular-nums",children:q(e.apr)})]},e.cap))})]})})]}),!to&&e0.length>0&&(0,s.jsxs)("div",{className:"rounded-lg border bg-muted/40 p-4 text-sm text-muted-foreground",children:["Still need ",1===e0.length?"":"these: ",e0.join(", "),"."]}),null!==e1&&null!==e3&&(0,s.jsxs)("div",{className:"space-y-3 rounded-lg border bg-muted/40 p-4",children:[(0,s.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs uppercase text-muted-foreground",children:"Money factor their payment implies"}),(0,s.jsx)("div",{className:"text-3xl font-semibold tabular-nums text-foreground",children:F(e1)})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs uppercase text-muted-foreground",children:"Same thing as an APR"}),(0,s.jsxs)("div",{className:"text-3xl font-semibold tabular-nums text-foreground",children:[q(e3),null!==e8&&e8>.005&&(0,s.jsxs)("span",{className:"ml-1 text-base font-normal text-muted-foreground",children:["\xb1",e8.toFixed(2)]})]})]})]}),(0,s.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Worked from a ",T(eA??0)," payment against a ",$(e4??0)," capitalized cost, a"," ",$(eE??0)," residual and ",eJ," months",f(eu)&&eZ>0?`, treating that payment as including ${q(100*eZ,2)} tax, so the base payment is ${T(g(eA??0,eZ,eu))}.`:", with no tax inside the payment."]}),null!==e8&&e8>.005&&(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:["You typed the payment to the nearest ",.5===R(m)?"dollar":"cent",", so the true rate sits within about ",e8.toFixed(2)," points of that. Type the exact cents and the band shrinks."]}),e1<0&&(0,s.jsx)("p",{className:"text-sm text-foreground",children:"That is a negative money factor, which means the payment is below pure depreciation. It happens on a subsidized deal where the manufacturer is covering part of the cost. It is not an error, but it is worth confirming the numbers on the sheet are the ones the payment was built from."}),0===e1&&(0,s.jsx)("p",{className:"text-sm text-foreground",children:"Zero money factor, so there is no rent charge at all. That is a genuine 0% promotion if the sheet says so."})]}),null!==e2&&(0,s.jsxs)("div",{className:"space-y-3 rounded-lg border bg-muted/40 p-4",children:[(0,s.jsx)("div",{className:"text-xs uppercase text-muted-foreground",children:"Capitalized cost their payment implies"}),(0,s.jsx)("div",{className:"text-3xl font-semibold tabular-nums text-foreground",children:$(x(e2))}),(0,s.jsxs)("p",{className:"text-sm text-muted-foreground",children:["At a ",F(eY??0)," money factor, a ",T(eA??0)," payment over ",eJ," months against a"," ",$(eE??0)," residual can only come from this capitalized cost."]}),null!==eH&&b(e2,eH)>=1&&(0,s.jsxs)("p",{className:"text-sm text-foreground",children:["You entered numbers that come to ",$(x(eH))," after money down, so the payment carries ",$(b(e2,eH))," ",e2>eH?"more":"less"," than you thought.",e2>eH?" Ask what that is. It might be a fee that belongs there, and it might not.":" Something in your favor is in the payment that is not on your sheet."]})]}),null!==e6&&(0,s.jsxs)("div",{className:"space-y-2 rounded-lg border bg-background p-4",children:[(0,s.jsx)("div",{className:"text-xs uppercase text-muted-foreground",children:"build"===e?"Monthly payment":"Payment checked back the other way"}),(0,s.jsx)("div",{className:"text-3xl font-semibold tabular-nums text-foreground",children:T(e6.total)}),(0,s.jsxs)("div",{className:"pt-2 text-sm",children:[(0,s.jsxs)("div",{className:w,children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Depreciation"}),(0,s.jsx)("span",{className:"tabular-nums text-foreground",children:T(e6.depreciation)})]}),(0,s.jsxs)("div",{className:w,children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Rent charge"}),(0,s.jsx)("span",{className:"tabular-nums text-foreground",children:T(e6.rent)})]}
1),(0,s.jsxs)("div",{className:(0,c.cn)(w,"border-t"),children:[(0,s.jsx)("span",{className:"text-foreground",children:"Base payment"}),(0,s.jsx)("span",{className:"tabular-nums font-medium text-foreground",children:T(e6.base)})]}),e6.monthlyTax>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:w,children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Sales tax"}),(0,s.jsx)("span",{className:"tabular-nums text-foreground",children:T(e6.monthlyTax)})]}),(0,s.jsxs)("div",{className:(0,c.cn)(w,"border-t"),children:[(0,s.jsx)("span",{className:"text-foreground",children:"Total monthly"}),(0,s.jsx)("span",{className:"tabular-nums font-medium text-foreground",children:T(e6.total)})]})]})]}),e6.depreciation<0&&(0,s.jsx)("p",{className:"text-sm text-foreground",children:"Depreciation is negative here, because the capitalized cost is below the residual. That shows up on heavily subsidized leases and on deals with a lot of money down. The arithmetic still holds."}),e6.base>0&&e6.rent>0&&(0,s.jsxs)("p",{className:"text-sm text-muted-foreground",children:[q(e6.rent/e6.base*100,0)," of your base payment is rent charge, which is the part the money factor controls. The rest is paying for the value the car loses while you have it."]}),e6.upfrontTax>0&&(0,s.jsxs)("p",{className:"text-sm text-muted-foreground",children:["This tax method also charges ",T(e6.upfrontTax)," once at signing, which is not in the monthly figure above."]})]}),null!==e9&&null!==e6&&(0,s.jsxs)("div",{className:"space-y-2 rounded-lg border bg-background p-4",children:[(0,s.jsx)("div",{className:"text-xs uppercase text-muted-foreground",children:"What each lever is worth"}),(0,s.jsxs)("div",{className:"text-sm",children:[(0,s.jsxs)("div",{className:w,children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"$1,000 off the price"}),(0,s.jsxs)("span",{className:"tabular-nums text-foreground",children:[T(e9.per1000Monthly)," a month, ",$(e9.per1000Term)," over the term"]})]}),(0,s.jsxs)("div",{className:w,children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"0.0001 off the money factor"}),(0,s.jsxs)("span",{className:"tabular-nums text-foreground",children:[T(e9.perMfMonthly)," a month, ",$(e9.perMfTerm)," over the term"]})]})]}),(0,s.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Cutting ",$(1e3)," off the price saves you ",$(e9.per1000Term)," across the lease, which is more than the ",$(1e3)," itself, because you stop paying rent charge on it too. That 0.0001 of money factor is ",q(e9.perMfApr,2)," of APR. An extra ",$(1e3)," of cash down does exactly the same job as ",$(1e3)," off the price, except you pay it today and you generally do not get it back if the car is written off early."]})]}),null!==te&&null!==e6&&(0,s.jsxs)("div",{className:"space-y-2 rounded-lg border bg-background p-4",children:[(0,s.jsx)("div",{className:"text-xs uppercase text-muted-foreground",children:"Due at signing"}),(0,s.jsxs)("div",{className:"text-sm",children:[(0,s.jsxs)("div",{className:w,children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"First month"}),(0,s.jsx)("span",{className:"tabular-nums text-foreground",children:T(te.firstMonth)})]}),te.cashDown>0&&(0,s.jsxs)("div",{className:w,children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Cash down"}),(0,s.jsx)("span",{className:"tabular-nums text-foreground",children:T(te.cashDown)})]}),te.fees>0&&(0,s.jsxs)("div",{className:w,children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Fees paid up front"}),(0,s.jsx)("span",{className:"tabular-nums text-foreground",children:T(te.fees)})]}),0!==te.upfrontTax&&(0,s.jsxs)("div",{className:w,children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Tax paid up front"}),(0,s.jsx)("span",{className:"tabular-nums text-foreground",children:T(te.upfrontTax)})]}),(0,s.jsxs)("div",{className:(0,c.cn)(w,"border-t"),children:[(0,s.jsx)("span",{className:"text-foreground",children:"Your lines add to"}),(0,s.jsx)("span",{className:"tabular-nums font-medium text-foreground",children:T(te.total)})]})]}),null!==ts&&Math.abs(ts)>=1&&(0,s.jsxs)("p",{className:"text-sm text-foreground",children:["You were quoted ",T(ta??0),", and the lines you entered add to ",T(te.total),", so"," ",T(Math.abs(ts))," is ",ts>0?"unexplained":"missing from your entries",". Unexplained does not mean improper. It means ask what it is."]}),null!==ts&&1>Math.abs(ts)&&(0,s.jsxs)("p",{className:"text-sm text-muted-foreground",children:["That matches the ",T(ta??0)," you were quoted, so every dollar at signing is accounted for."]}),null!==tl&&(0,s.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Spread everything across the term and the deal costs ",T(tl)," a month. That is a comparison number for putting two quotes side by side, not the payment you will be making. It does not subtract refundable deposits.",tr>0&&(0,s.jsxs)(s.Fragment,{children:[" ","It includes the ",T(tr)," of trade equity you put in, which the dealer due-at-signing figure does not show."]})]})]}),null!==tu&&null!==tc&&(0,s.jsxs)("div",{className:"space-y-2 rounded-lg border bg-muted/40 p-4",children:[(0,s.jsx)("div",{className:"text-xs uppercase text-muted-foreground",children:"Cost to buy the car at lease end"}),(0,s.jsx)("div",{className:"text-3xl font-semibold tabular-nums text-foreground",children:T(tu)}),(0,s.jsxs)("div",{className:"pt-2 text-sm",children:[(0,s.jsxs)("div",{className:w,children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Residual"}),(0,s.jsx)("span",{className:"tabular-nums text-foreground",children:T(tc.residual)})]}),tc.fee>0&&(0,s.jsxs)("div",{className:w,children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Purchase option fee"}),(0,s.jsx)("span",{className:"tabular-nums text-foreground",children:T(tc.fee)})]}),"none"!==eu&&eZ>0&&(0,s.jsxs)("div",{className:w,children:[(0,s.jsx)("span",{className:"text-muted-foreground",children:"Sales tax"}),(0,s.jsx)("span",{className:"tabular-nums text-foreground",children:T(tc.tax)})]})]}),(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"This is the end-of-lease figure, the one your contract fixed on day one. Buying out part way through is a different number that only your lender can give you, because it involves unwinding rent charge you have not paid yet. Ask them for a payoff quote rather than working it out here."}
1),"none"!==eu&&eZ>0&&(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"A buyout is taxed as a vehicle purchase, so the rate above is applied to the whole amount here rather than to a monthly payment. Which method you picked makes no difference in this mode."})]}),null!==e6&&null!==eJ&&(0,s.jsxs)("div",{children:[(0,s.jsx)(i.$,{variant:"outline",size:"sm",onClick:()=>ej(e=>!e),children:eb?"Hide the month by month":"Show the month by month"}),eb&&td.length>0&&(0,s.jsxs)("div",{className:"mt-3 space-y-2",children:[(0,s.jsx)("p",{className:"text-sm text-muted-foreground",children:"Depreciation and rent charge are the same every single month on a lease. There is no amortization curve here, which is one of the real differences between leasing and a loan."}),(0,s.jsx)("div",{className:"max-h-96 overflow-auto rounded-md border",children:(0,s.jsxs)("table",{className:"w-full min-w-[420px] text-sm",children:[(0,s.jsx)("thead",{className:"sticky top-0 bg-background",children:(0,s.jsxs)("tr",{className:"border-b text-left text-xs uppercase text-muted-foreground",children:[(0,s.jsx)("th",{className:"px-3 py-2 font-medium",children:"Month"}),(0,s.jsx)("th",{className:"px-3 py-2 font-medium",children:"Depreciation"}),(0,s.jsx)("th",{className:"px-3 py-2 font-medium",children:"Rent"}),e6.monthlyTax>0&&(0,s.jsx)("th",{className:"px-3 py-2 font-medium",children:"Tax"}),(0,s.jsx)("th",{className:"px-3 py-2 font-medium",children:"Paid so far"})]})}),(0,s.jsx)("tbody",{children:td.map(e=>(0,s.jsxs)("tr",{className:"border-b border-border/50",children:[(0,s.jsx)("td",{className:"px-3 py-1.5 tabular-nums",children:e.idx}),(0,s.jsx)("td",{className:"px-3 py-1.5 tabular-nums",children:T(e.depreciation)}),(0,s.jsx)("td",{className:"px-3 py-1.5 tabular-nums",children:T(e.rent)}),e6.monthlyTax>0&&(0,s.jsx)("td",{className:"px-3 py-1.5 tabular-nums",children:T(e.tax)}),(0,s.jsx)("td",{className:"px-3 py-1.5 tabular-nums",children:T(e.cumulative)})]},e.idx))})]})})]})]})]}),(0,s.jsxs)("div",{className:"space-y-3 rounded-md border bg-background p-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)(i.$,{variant:"outline",size:"sm",onClick:function(){if(null===e6||null===eJ)return;let e=null!==eP?`${$(eP)} for ${eJ} months`:`${eJ} month lease`,t=[{id:`${Date.now()}`,label:e,monthly:e6.total,driveOff:tn??0,term:eJ,effective:tl??e6.total,apr:(e5??0)*2400,state:eq},...ew];t.length>3?(t.length=3,eT("Only the 3 most recent worksheets are kept, so the oldest one was dropped.")):eT(null),th(t)},disabled:null===e6,children:"Save this worksheet"}),(0,s.jsx)(j.i,{value:function(){if("buyout"===e&&null!==tu)return`Lease buyout: residual ${T(tc?.residual??0)} plus a ${T(tc?.fee??0)} purchase option fee comes to ${T(tu)}. - ToolBreezy Car Lease Calculator`;let t=[];return(null!==e1&&null!==e3&&t.push(`A quoted payment of ${T(eA??0)} on a ${$(e4??0)} cap cost, ${$(eE??0)} residual and ${eJ} months implies a money factor of ${F(e1)}, which is ${q(e3)} APR.`),null!==e2&&t.push(`A quoted payment of ${T(eA??0)} at a ${F(eY??0)} money factor implies a capitalized cost of ${$(e2)}.`),e6&&t.push(`Payment breaks down as ${T(e6.depreciation)} depreciation plus ${T(e6.rent)} rent charge${e6.monthlyTax>0?` plus ${T(e6.monthlyTax)} tax`:""}, so ${T(e6.total)} a month.`),t.length)?`${t.join(" ")} - ToolBreezy Car Lease Calculator`:"Car lease worksheet - ToolBreezy Car Lease Calculator"}(),label:"Copy summary",copiedLabel:"Copied!",variant:"outline",size:"sm"}),(0,s.jsx)(i.$,{variant:"ghost",size:"sm",onClick:function(){eF(A),ev(!0),eT(null)},children:"Load an example"}),(0,s.jsx)(i.$,{variant:"ghost",size:"sm",onClick:function(){h(""),D(""),I(""),V(""),B(""),H(""),G(""),Q(""),ee(""),ea(""),el(""),ec(""),ep(""),em("none"),ef(""),ey(""),ev(!1),eT(null)},children:"Clear"})]}),eN&&(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Those numbers are an illustration, not a real offer or a typical rate. Replace every one of them with what is on your own worksheet."}),eM&&(0,s.jsx)("p",{className:"text-xs text-foreground",children:eM}),eS&&(0,s.jsx)("p",{className:"text-xs text-foreground",children:eS}),ew.length>0?(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"text-xs uppercase text-muted-foreground",children:["Saved worksheets (",ew.length," of ",3,")"]}),(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"w-full min-w-[460px] text-sm",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"border-b text-left text-xs uppercase text-muted-foreground",children:[(0,s.jsx)("th",{className:"py-2 pr-3 font-medium",children:"Deal"}),(0,s.jsx)("th",{className:"py-2 pr-3 font-medium",children:"Monthly"}),(0,s.jsx)("th",{className:"py-2 pr-3 font-medium",children:"At signing"}),(0,s.jsx)("th",{className:"py-2 pr-3 font-medium",children:"Cost per month"}),(0,s.jsx)("th",{className:"py-2 font-medium",children:(0,s.jsx)("span",{className:"sr-only",children:"Actions"})})]})}),(0,s.jsx)("tbody",{children:ew.map(e=>(0,s.jsxs)("tr",{className:"border-b border-border/50",children:[(0,s.jsxs)("td",{className:"py-1.5 pr-3",children:[e.label,null!==tp&&e.effective===tp&&(0,s.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:"cheapest"})]}),(0,s.jsx)("td",{className:"py-1.5 pr-3 tabular-nums",children:T(e.monthly)}),(0,s.jsx)("td",{className:"py-1.5 pr-3 tabular-nums",children:$(e.driveOff)}),(0,s.jsx)("td",{className:"py-1.5 pr-3 tabular-nums",children:T(e.effective)}),(0,s.jsxs)("td",{className:"py-1.5 text-right",children:[(0,s.jsx)("button",{type:"button",onClick:()=>{eF(e.state),ev(!1),eT(null)},className:"mr-2 text-xs text-primary underline-offset-2 hover:underline",children:"Load"}),(0,s.jsx)("button",{type:"button",onClick:()=>{var t;return t=e.id,void(th(ew.filter(e=>e.id!==t)),eT(null))},className:"text-xs text-muted-foreground underline-offset-2 hover:underline",children:"Remove"})]})]},e.id))})]})}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"Cost per month 
1spreads the money at signing plus any trade equity across the whole term, so two quotes with different amounts down can be compared fairly."})]}):(0,s.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Save a worksheet from each dealer and they line up here for comparison. Up to ",3," are kept, on this device only."]})]}),(0,s.jsx)(d.ToolActions,{getParams:function(){let t=new URLSearchParams;return t.set("mode",e),"check"===e&&t.set("solveFor",a),m.trim()&&t.set("q",m.trim()),z.trim()&&t.set("msrp",z.trim()),J.trim()&&t.set("sp",J.trim()),t.set("residualMode",L),O.trim()&&t.set("rv",O.trim()),Y.trim()&&t.set("n",Y.trim()),t.set("rateMode",U),_.trim()&&t.set("rateValue",_.trim()),Z.trim()&&t.set("cashDown",Z.trim()),K.trim()&&t.set("tradeEquity",K.trim()),X.trim()&&t.set("rebates",X.trim()),et.trim()&&(t.set("acqFee",et.trim()),t.set("acqCapped",es?"1":"0")),er.trim()&&(t.set("docFee",er.trim()),t.set("docCapped",eo?"1":"0")),ed.trim()&&t.set("titleReg",ed.trim()),"none"!==eu&&(t.set("taxMethod",eu),eh.trim()&&t.set("taxRate",eh.trim())),ex.trim()&&t.set("quotedDas",ex.trim()),eg.trim()&&t.set("buyoutFee",eg.trim()),t},title:"Car Lease Calculator"}),(0,s.jsx)("p",{className:"text-xs text-muted-foreground",children:"The money factor and residual percent are set by the lender, are not published, and change month to month, so this tool cannot tell you what yours should be. It audits the arithmetic of the worksheet in front of you. Multiplying a money factor by 2400 is the standard industry conversion and it is exact for this formula, but it is not identical to a loan APR, so treat a comparison against a loan quote as rough. Mileage limits, disposition fees, wear charges and early termination are contract terms rather than payment math, and they are where a cheap lease often gets expensive. Everything runs in your browser, so nothing you type is uploaded. Not financial advice."})]})}}}]);

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.