1import{r as i,j as e,u as pe,ah as es,ai as U,aj as ss,g as me,ak as c,al as we,am as ne,w as q,an as as,ao as Ie,a as rs,f as ts,ap as Ae,aq as Ne,z as ns,p as os,C as Y,c as ls,D as is,b as cs,m as ke,A as Re,e as Se,d as de,ar as ds,as as us,at as Fe,y as ue,M as hs,au as ps,s as ms,av as fs,h as xs,aw as vs,ax as gs,ay as Z,L as js}from"./index-BUm1srQw.js";import{u as bs,P as B,c as A,a as fe,b as Pe,d as ys}from"./index-CxhHXqoB.js";import{u as X}from"./index-CJSKqn58.js";import{c as ws,u as Ee}from"./index-DlcKCjGm.js";import{u as Ns}from"./dialog-C7_cYwC8.js";import{a as ks,t as F,u as Rs,M as Ss,S as Fs,C as Cs}from"./analytics-DG-bZwHl.js";import{L as Is}from"./LeadCaptureForm-B5Fq3GQz.js";import{A as As}from"./arrow-up-right-jtilL_sv.js";import{C as oe}from"./chevron-down-CLEFmASG.js";import{A as Ps}from"./arrow-down-DW4IIIyX.js";import{A as J}from"./arrow-right-eoTIPIjS.js";import{C as Es}from"./check-D-GJdVN-.js";import"./utils-BQHNewu7.js";import"./index-DOT2LqR4.js";import"./search-DosPd7MY.js";import"./visitor-context-CZy3ifRV.js";import"./leads-CKyiNgYF.js";var le="rovingFocusGroup.onEntryFocus",_s={bubbles:!1,cancelable:!0},K="RovingFocusGroup",[he,_e,Ts]=ws(K),[Ls,Te]=fe(K,[Ts]),[$s,Ms]=Ls(K),Le=i.forwardRef((s,r)=>e.jsx(he.Provider,{scope:s.__scopeRovingFocusGroup,children:e.jsx(he.Slot,{scope:s.__scopeRovingFocusGroup,children:e.jsx(Bs,{...s,ref:r})})}));Le.displayName=K;var Bs=i.forwardRef((s,r)=>{const{__scopeRovingFocusGroup:n,orientation:a,loop:o=!1,dir:d,currentTabStopId:l,defaultCurrentTabStopId:p,onCurrentTabStopIdChange:f,onEntryFocus:g,preventScrollOnEntryFocus:u=!1,...b}=s,x=i.useRef(null),j=X(r,x),m=Ee(d),[w,h]=Pe({prop:l,defaultProp:p??null,onChange:f,caller:K}),[k,P]=i.useState(!1),y=Ns(g),R=_e(n),D=i.useRef(!1),[se,z]=i.useState(0);return i.useEffect(()=>{const v=x.current;if(v)return v.addEventListener(le,y),()=>v.removeEventListener(le,y)},[y]),e.jsx($s,{scope:n,orientation:a,dir:m,loop:o,currentTabStopId:w,onItemFocus:i.useCallback(v=>h(v),[h]),onItemShiftTab:i.useCallback(()=>P(!0),[]),onFocusableItemAdd:i.useCallback(()=>z(v=>v+1),[]),onFocusableItemRemove:i.useCallback(()=>z(v=>v-1),[]),children:e.jsx(B.div,{tabIndex:k||se===0?-1:0,"data-orientation":a,...b,ref:j,style:{outline:"none",...s.style},onMouseDown:A(s.onMouseDown,()=>{D.current=!0}),onFocus:A(s.onFocus,v=>{const T=!D.current;if(v.target===v.currentTarget&&T&&!k){const W=new CustomEvent(le,_s);if(v.currentTarget.dispatchEvent(W),!W.defaultPrevented){const O=R().filter(I=>I.focusable),V=O.find(I=>I.active),ae=O.find(I=>I.id===w),re=[V,ae,...O].filter(Boolean).map(I=>I.ref.current);Be(re,u)}}D.current=!1}),onBlur:A(s.onBlur,()=>P(!1))})})}),$e="RovingFocusGroupItem",Me=i.forwardRef((s,r)=>{const{__scopeRovingFocusGroup:n,focusable:a=!0,active:o=!1,tabStopId:d,children:l,...p}=s,f=bs(),g=d||f,u=Ms($e,n),b=u.currentTabStopId===g,x=_e(n),{onFocusableItemAdd:j,onFocusableItemRemove:m,currentTabStopId:w}=u;return i.useEffect(()=>{if(a)return j(),()=>m()},[a,j,m]),e.jsx(he.ItemSlot,{scope:n,id:g,focusable:a,active:o,children:e.jsx(B.span,{tabIndex:b?0:-1,"data-orientation":u.orientation,...p,ref:r,onMouseDown:A(s.onMouseDown,h=>{a?u.onItemFocus(g):h.preventDefault()}),onFocus:A(s.onFocus,()=>u.onItemFocus(g)),onKeyDown:A(s.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){u.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const k=Os(h,u.orientation,u.dir);if(k!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let y=x().filter(R=>R.focusable).map(R=>R.ref.current);if(k==="last")y.reverse();else if(k==="prev"||k==="next"){k==="prev"&&y.reverse();const R=y.indexOf(h.currentTarget);y=u.loop?Gs(y,R+1):y.slice(R+1)}setTimeout(()=>Be(y))}}),children:typeof l=="function"?l({isCurrentTabStop:b,hasTabStop:w!=null}):l})})});Me.displayName=$e;var Ds={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function zs(s,r){return r!=="rtl"?s:s==="ArrowLeft"?"ArrowRight":s==="ArrowRight"?"ArrowLeft":s}function Os(s,r,n){const a=zs(s.key,n);if(!(r==="vertical"&&["ArrowLeft","ArrowRight"].includes(a))&&!(r==="horizontal"&&["ArrowUp","ArrowDown"].includes(a)))return Ds[a]}function Be(s,r=!1){const n=document.activeElement;for(const a of s)if(a===n||(a.focus({preventScroll:r}),document.activeElement!==n))return}function Gs(s,r){return s.map((n,a)=>s[(r+a)%s.length])}var Us=Le,Ys=Me;function qs(s){const r=i.useRef({value:s,previous:s});return i.useMemo(()=>(r.current.value!==s&&(r.current.previous=r.current.value,r.current.value=s),r.current.previous),[s])}var xe="Radio",[Ks,De]=fe(xe),[Ws,Vs]=Ks(xe),ze=i.forwardRef((s,r)=>{const{__scopeRadio:n,name:a,checked:o=!1,required:d,disabled:l,value:p="on",onCheck:f,form:g,...u}=s,[b,x]=i.useState(null),j=X(r,h=>x(h)),m=i.useRef(!1),w=b?g||!!b.closest("form"):!0;return e.jsxs(Ws,{scope:n,checked:o,disabled:l,children:[e.jsx(B.button,{type:"button",role:"radio","aria-checked":o,"data-state":Ye(o),"data-disabled":l?"":void 0,disabled:l,value:p,...u,ref:j,onClick:A(s.onClick,h=>{o||f?.(),w&&(m.current=h.isPropagationStopped(),m.current||h.stopPropagation())})}),w&&e.jsx(Ue,{control:b,bubbles:!m.current,name:a,value:p,checked:o,required:d,disabled:l,form:g,style:{transform:"translateX(-100%)"}})]})});ze.displayName=xe;var Oe="RadioIndicator",Ge=i.forwardRef((s,r)=>{const{__scopeRadio:n,forceMount:a,...o}=s,d=Vs(Oe,n);return e.jsx(ys,{present:a||d.checked,children:e.jsx(B.span,{"data-state":Ye(d.checked),"data-disabled":d.disabled?"":void 0,...o,ref:r})})});Ge.displayName=Oe;var Hs="RadioBubbleInput",Ue=i.forwardRef(({__scopeRadio:s,control:r,checked:n,bubbles:a=!0,...o},d)=>{const l=i.useRef(null),p=X(l,d),f=qs(n),g=ks(r);return i.useEffect(()=>{const u=l.current;if(!u)return;const b=window.HTMLInputElement.prototype,j=Object.getOwnPropertyDescriptor(b,"checked").set;if(f!==n&&j){const m=new Event("click",{bubbles:a});j.call(u,n),u.dispatchEvent(m)}},[f,n,a]),e.jsx(B.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:p,style:{...o.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ue.displayName=Hs;function Ye(s){return s?"checked":"unchecked"}var Zs=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ee="RadioGroup",[Js]=fe(ee,[Te,De]),qe=Te(),Ke=De(),[Qs,Xs]=Js(ee),We=i.forwardRef((s,r)=>{const{__scopeRadioGroup:n,name:a,defaultValue:o,value:d,required:l=!1,disabled:p=!1,orientation:f,dir:g,loop:u=!0,onValueChange:b,...x}=s,j=qe(n),m=Ee(g),[w,h]=Pe({prop:d,defaultProp:o??null,onChange:b,caller:ee});return e.jsx(Qs,{scope:n,name:a,required:l,disabled:p,value:w,onValueChange:h,children:e.jsx(Us,{asChild:!0,...j,orientation:f,dir:m,loop:u,children:e.jsx(B.div,{role:"radiogroup","aria-required":l,"aria-orientation":f,"data-disabled":p?"":void 0,dir:m,...x,ref:r})})})});We.displayName=ee;var Ve="RadioGroupItem",He=i.forwardRef((s,r)=>{const{__scopeRadioGroup:n,disabled:a,...o}=s,d=Xs(Ve,n),l=d.disabled||a,p=qe(n),f=Ke(n),g=i.useRef(null),u=X(r,g),b=d.value===o.value,x=i.useRef(!1);return i.useEffect(()=>{const j=w=>{Zs.includes(w.key)&&(x.current=!0)},m=()=>x.current=!1;return document.addEventListener("keydown",j),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",j),document.removeEventListener("keyup",m)}},[]),e.jsx(Ys,{asChild:!0,...p,focusable:!l,active:b,children:e.jsx(ze,{disabled:l,required:d.required,
1checked:b,...f,...o,name:d.name,ref:u,onCheck:()=>d.onValueChange(o.value),onKeyDown:A(j=>{j.key==="Enter"&&j.preventDefault()}),onFocus:A(o.onFocus,()=>{x.current&&g.current?.click()})})})});He.displayName=Ve;var ea="RadioGroupIndicator",sa=i.forwardRef((s,r)=>{const{__scopeRadioGroup:n,...a}=s,o=Ke(n);return e.jsx(Ge,{...o,...a,ref:r})});sa.displayName=ea;var aa=We,ra=He;const ta=[{title:"Buying assumptions",body:"The purchase price is Black Book wholesale value plus the fleet's average retail markup, then sales tax and modeled dealer charges: documentation, title, registration, inspection, and prep fees at each market's typical amounts, plus modeled dealer add-ons (an extended warranty, tire-and-wheel protection, and GAP coverage) and a loan origination fee. Skip the add-ons and buying costs less than shown. Financing assumes a {term}-month loan with {down}% down at {apr}% APR for your credit band. Monthly costs add full-coverage insurance estimated from the vehicle's insurance profile and your age band, market, and credit band, per-mile maintenance for the vehicle and your mileage, registration and inspection renewals, excise tax where it applies, and a roadside plan. Your purchase terms may differ.",sources:[{label:"Black Book vehicle values",href:"https://www.blackbook.com/vehicle-values/"},{label:"CarEdge: dealer fees",href:"https://caredge.com/guides/understanding-car-dealer-fees"},{label:"Bankrate: insurance by credit",href:"https://www.bankrate.com/insurance/car/rates-by-credit-score/"},{label:"CarEdge: maintenance",href:"https://caredge.com/maintenance"},{label:"AAA: driving costs",href:"https://www.aaa.com/autorepair/drivingcosts"}]},{title:"Flexcar assumptions",body:"Uses today's average price for the plan that matches your mileage, with Essential protection, and assumes you keep the same car for the whole period. The ${membership} annual membership (plus sales tax) is paid upfront and renews each year; it covers routine maintenance, covered repairs, and roadside assistance. After years two and four the vehicle price steps down toward a forecast base, each step capped at 20%, the way the calculator on every vehicle page models it. Future prices are estimates.",sources:[{label:"Flexcar membership",href:"https://www.flexcar.com/membership"},{label:"How swaps work",href:"https://www.flexcar.com/how-swaps-work"}]},{title:"What can change your actual cost",body:"Fuel, tolls, and parking are excluded from both sides. Additional mileage, swaps, damage, and other applicable charges are not modeled. Insurance and protection terms differ by person and plan. Buying credits the forecast Black Book trade-in value for your mileage after any remaining loan is paid off; if the car is worth less than the loan balance, the difference is added to the cost. Model figures are pooled fleet averages, not local availability, and models with limited data aren't listed.",sources:[{label:"Membership Agreement",href:"https://www.flexcar.com/membershipagreement"}]}],M=U.years,_={upfrontBuy:"Upfront, buying",upfrontFlex:"Upfront, flexing",monthlyBuy:"Monthly, buying",monthlyFlex:"Monthly, flexing",termBuy:`${M} yrs, buying, after resale`,termFlex:`${M} yrs, flexing`,saves:"Flexing saves"};function L({label:s,value:r}){return e.jsxs("td",{className:"sc-corpus-num",children:[e.jsx("span",{className:"sc-corpus-celllabel","aria-hidden":!0,children:s}),c(r)]})}function na({row:s,href:r}){const n=Ie(s.difference);return e.jsxs("tr",{children:[e.jsx("th",{scope:"row",className:"sc-corpus-model",children:s.carsPath?e.jsxs("a",{href:r(s.carsPath),onClick:()=>F({event:"calculator_corpus_model_click",model:s.id}),children:[s.label,e.jsx(As,{size:13,"aria-hidden":!0})]}):e.jsx("span",{children:s.label})}),e.jsx(L,{label:_.upfrontBuy,value:s.upfrontBuy}),e.jsx(L,{label:_.upfrontFlex,value:s.upfrontFlex}),e.jsx(L,{label:_.monthlyBuy,value:s.monthlyBuy}),e.jsx(L,{label:_.monthlyFlex,value:s.monthlyFlex}),e.jsx(L,{label:_.termBuy,value:s.buyAfterSale}),e.jsx(L,{label:_.termFlex,value:s.flexTotal}),e.jsxs("td",{className:`sc-corpus-num sc-corpus-delta is-${n}`,children:[e.jsx("span",{className:"sc-corpus-celllabel","aria-hidden":!0,
1children:_.saves}),n==="tie"?"About the same":n==="flex"?c(s.difference):e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":!0,children:"â"}),c(Math.abs(s.difference)),e.jsx("span",{className:"sr-only",children:" (buying costs less)"})]})]})]})}function oa(){return e.jsxs("thead",{children:[e.jsxs("tr",{children:[e.jsx("th",{scope:"col",rowSpan:2,children:"Model"}),e.jsx("th",{scope:"colgroup",colSpan:2,children:"Upfront"}),e.jsx("th",{scope:"colgroup",colSpan:2,children:"Monthly"}),e.jsxs("th",{scope:"colgroup",colSpan:2,children:["After ",M," years",e.jsx("span",{children:"buying after resale"})]}),e.jsxs("th",{scope:"col",rowSpan:2,className:"sc-corpus-num",children:["Flexing saves",e.jsxs("span",{children:[M," yrs, after resale"]})]})]}),e.jsxs("tr",{children:[e.jsx("th",{scope:"col",className:"sc-corpus-num",children:"Buying"}),e.jsx("th",{scope:"col",className:"sc-corpus-num",children:"Flexing"}),e.jsx("th",{scope:"col",className:"sc-corpus-num",children:"Buying"}),e.jsx("th",{scope:"col",className:"sc-corpus-num",children:"Flexing"}),e.jsx("th",{scope:"col",className:"sc-corpus-num",children:"Buying"}),e.jsx("th",{scope:"col",className:"sc-corpus-num",children:"Flexing"})]})]})}function Ce({caption:s,rows:r,href:n}){return e.jsx("div",{className:"sc-corpus-scroll",children:e.jsxs("table",{className:"sc-corpus-table",children:[e.jsx("caption",{className:"sc-corpus-caption",children:s}),e.jsx(oa,{}),e.jsx("tbody",{children:r.map(a=>e.jsx(na,{row:a,href:n},a.id))})]})})}function la(){const s=pe(),r=l=>s(q(as(l))),{models:n,cheaperToFlex:a,medianDifference:o}=es,d=n-a;return e.jsxs("section",{id:"all-models",className:"lp-shell lp-section sc-corpus","aria-labelledby":"corpus-title",children:[e.jsxs("h2",{id:"corpus-title",className:"sc-h2",children:["Flexing vs. buying across ",n," models"]}),e.jsxs("p",{className:"sc-corpus-intro",children:["One fixed scenario for every model: a ",U.ageLabel," driver with"," ",U.creditLabel.toLowerCase()," credit, ",U.mileageLabel,", the same car for ",M," years with ",U.protectionLabel.toLowerCase(),", averaged across Flexcarâs ",ss.length," markets as of ",me(),". Buying is counted after selling the car at its forecast trade-in value. Flexing costs less on"," ",e.jsxs("strong",{children:[a," of ",n]})," ","models, by a median of ",e.jsx("strong",{children:c(o)})," over ",M," years",d>0?`; buying comes out ahead on the other ${d}`:"",". Pooled fleet averages, not quotes. ",e.jsx("a",{href:"#assumptions",children:"What this assumes"})]}),e.jsx(Ce,{caption:`The ${we.length} most-stocked models`,rows:we,href:r}),e.jsxs("details",{className:"sc-corpus-all",onToggle:l=>{l.currentTarget.open&&F({event:"calculator_corpus_expand"})},children:[e.jsxs("summary",{children:["See the other ",ne.length," models"]}),e.jsx(Ce,{caption:`The other ${ne.length} models, A to Z`,rows:ne,href:r})]})]})}const ia="flex-vs-buy-savings-calculator_page",ca=xs("/flex-vs-buy-savings-calculator");function da(){const s=ca.useSearch(),r=rs({from:"/flex-vs-buy-savings-calculator"}),n=Rs(s),{profile:a,vehicleId:o,customized:d,zipAdjustment:l,location:p,marketSource:f,cartProfile:g}=n,u=ts(o),b=pe(),x=(t,N)=>(F({event:"calculator_change",control:N,market:t.market??a.market,...N==="car"&&t.vehicleId?{from_model:o,to_model:t.vehicleId}:{}}),r({search:C=>({...C,...vs(t)}),replace:!0,resetScroll:!1})),j=()=>(F({event:"calculator_change",control:"zip"}),w(""),y(null),r({search:t=>({...t,market:a.market,zipadj:void 0}),replace:!0,resetScroll:!1}));i.useEffect(()=>{F({event:"calculator_view",customized:d,car:o,market:a.market});const t=()=>F({event:"calculator_lead_submitted"});return window.addEventListener("flx:lead-submitted",t),()=>window.removeEventListener("flx:lead-submitted",t)},[]);const[m,w]=i.useState(""),[h,k]=i.useState(!1),[P,y]=i.useState(null),R=i.useRef(!1);i.useEffect(()=>{if(R.current||!p?.zip)return;R.current=!0;const t=p.zip;a.market===p.market&&(!Ae(a.market)||l===Ne(a.market,t))&&w(C=>C||t)},[p,a.market,l]);const D=i.useRef(null),se=i.useRef(null),z=ns(l,os(Y,a.age,a.credit)),v=i.useMemo(()=>ls(Y,u,a,is,z),[u,a,z]),T=cs(v),[W,O]=i.useState(!1),[V,ae]=i.useState(0);function H(t="button"){F({event:"calculator_launch_request",reason:t}),O(!0),ae(N=>N+1)}function re(t){const N=t.replace(/\D/g,"").slice(0,5);if(w(N),N.length<5){k(!1),y(null),l&&x({market:a.market,zipAdjustment:null},"zip");return}const C=gs(N);if(C.kind==="served"){k(!1),y(C.comingSoon??null),x({market:C.market,zipAdjustment:Ne(C.market,N)},"zip");return}k(!0),y(C.kind==="unserved"?C.comingSoon??null:null)}const I=Ie(T.savingsAfterSale),E=ke(a.market),ve=E,ge=Re.find(t=>
1t.id===a.age)?.label??"",je=Se.find(t=>t.id===a.credit)?.label.toLowerCase()??"",G=[];f==="cart"&&G.push(p?.zip&&m===p.zip?`ZIP ${m}`:E),s.age===void 0&&g.age&&G.push(`age ${ge}`),s.credit===void 0&&g.credit&&G.push(`${je} credit`);const Ze=de.find(t=>t.plan===a.plan),be=b(q(ds(a.market,u))),Je=b(q(us(a.market))),ye=`Browse ${Fe(u)}`,te=W;i.useEffect(()=>{if(V===0||!te)return;const t=document.getElementById("notify-me");t?.scrollIntoView({behavior:"smooth",block:"center"}),t?.querySelector("input")?.focus({preventScroll:!0})},[V,te]);const Qe=Fe(u,{article:!0}),Xe=ue(a.years);return e.jsxs(e.Fragment,{children:[e.jsxs("section",{className:"lp-shell sc-calc","aria-labelledby":"sc-title",children:[e.jsx("header",{className:"sc-calc-head",children:e.jsx("h1",{id:"sc-title",children:"Flexing vs Buying"})}),e.jsx("div",{className:"sc-calc-panel",children:e.jsx("form",{className:"sc-controls","aria-label":"Comparison settings",onSubmit:t=>t.preventDefault(),children:e.jsxs("div",{className:"sc-result-primary",children:[e.jsxs("div",{className:"sc-result-main",children:[e.jsx($,{label:"Choose your Flexcar",title:!0,children:e.jsx(Ss,{vehicle:u,onPick:t=>x({vehicleId:t},"car")})}),e.jsx(Fs,{upfront:T.upfrontDiff,monthly:T.monthlyDiff}),e.jsxs("details",{className:"sc-personalize",ref:D,children:[e.jsxs("summary",{children:[e.jsxs("span",{className:"sc-personalize-title",children:["Personalize your estimate ",e.jsx(oe,{size:18,"aria-hidden":!0})]}),e.jsxs("span",{className:"sc-personalize-sub",children:[E,m.length===5&&!h?` (${m})`:"",","," ",Ze.label.toLowerCase()," driving, ",Xe,", age ",ge,", ",je," ","credit"]})]}),e.jsxs("div",{className:"sc-personalize-fields",children:[G.length>0&&e.jsxs("p",{className:"sc-hint sc-hint-note sc-prefilled",role:"status",children:["From your flexcar.com visit: ",ha(G),". Change anything below."]}),e.jsx($,{label:"Where youâd drive",after:h?e.jsxs("p",{className:"sc-hint sc-hint-note",role:"status",children:[P?`Flexcar isnât in ${P} yet, so this shows ${ve}.`:`We couldnât match that ZIP to a Flexcar market, so this shows ${ve}.`,e.jsxs(e.Fragment,{children:[" ",e.jsx("button",{type:"button",className:"sc-hint-link",onClick:()=>H("unmatched_zip"),children:"Get launch updates for your area"})]})]}):P?e.jsxs("p",{className:"sc-hint sc-hint-note",role:"status",children:["Flexcar is coming to ",P,". Until then, ",E," is your nearest market.",e.jsxs(e.Fragment,{children:[" ",e.jsx("button",{type:"button",className:"sc-hint-link",onClick:()=>H(),children:"Get launch updates"})]})]}):l?e.jsxs("p",{className:"sc-hint sc-hint-note",role:"status",children:["Includes this areaâs protection pricing adjustment."," ",e.jsxs("button",{type:"button",className:"sc-hint-link",onClick:j,children:["Use ",E," averages instead"]})]}):f==="ip"?e.jsxs("p",{className:"sc-hint sc-hint-note",role:"status",children:["Showing ",E," based on your location.",e.jsxs(e.Fragment,{children:[" ",e.jsx("button",{type:"button",className:"sc-hint-link",onClick:()=>H(),children:"Looking for another location? Get launch updates"})]})]}):null,children:e.jsxs("div",{className:"sc-where",children:[e.jsxs("label",{className:"sc-zip",children:[e.jsx(hs,{size:15,"aria-hidden":!0}),e.jsx("input",{ref:se,inputMode:"numeric",autoComplete:"postal-code",placeholder:"ZIP",value:m,onChange:t=>re(t.target.value),"aria-label":"ZIP code, optional, picks the nearest market"})]}),e.jsx("select",{value:a.market,onChange:t=>{k(!1),y(null),w(""),x({market:t.target.value,zipAdjustment:null},"market")},"aria-label":"Comparison market",children:Object.keys(Y.markets).map(t=>e.jsx("option",{value:t,children:ke(t)},t))})]})}),e.jsx($,{label:"About how much do you drive?",children:e.jsx(Q,{ariaLabel:"How much you drive",value:String(a.plan),onChange:t=>x({plan:Number(t)},"driving"),columns:3,options:de.map(t=>({value:String(t.plan),label:t.label,detail:t.range}))})}),e.jsx($,{label:"How long would you keep the same car?",children:e.jsx(Q,{ariaLabel:"Years you would keep the car",value:String(a.years),onChange:t=>x({years:Number(t)},"years"),columns:3,options:ps.map(t=>({value:String(t.years),label:t.label}))})}),e.jsx($,{label:"Your age",children:e.jsx(Q,{ariaLabel:"Age band",value:a.age,onChange:t=>x({age:t},"age"),columns:4,options:Re.map(t=>({value:t.id,label:t.label}))})}),e.jsx($,{label:"Your credit",children:e.jsx(Q,{ariaLabel:"Credit band",value:a.credit,onChange:t=>x({credit:t},"credit"),columns:4,options:Se.map(t=>
1({value:t.id,label:t.label,detail:t.range}))})})]})]}),e.jsxs("div",{className:"sc-result-actions",children:[e.jsxs("a",{href:"#receipt",className:"lp-button sc-button-outline",onClick:()=>F({event:"calculator_math_click",car:o,market:a.market}),children:["See the breakdown ",e.jsx(Ps,{size:18,"aria-hidden":!0})]}),e.jsxs("a",{href:be,className:"lp-button",onClick:()=>F({event:"calculator_inventory_click",placement:"results",car:o,market:a.market}),children:[ye," ",e.jsx(J,{size:18,"aria-hidden":!0})]})]})]}),e.jsx(Cs,{vehicle:u,priority:!0})]})})})]}),e.jsxs("section",{id:"receipt",className:"lp-shell lp-section","aria-labelledby":"receipt-title",children:[e.jsx("h2",{id:"receipt-title",className:"sc-h2",children:"Savings breakdown"}),e.jsx(pa,{c:v,p:T,vehicle:u,zip:m}),e.jsxs("div",{className:"sc-beyond",children:[e.jsxs("div",{children:[e.jsx("h3",{children:I==="flex"?"Saving money is the start.":"Cost is only part of it."}),e.jsx("p",{children:"The bigger difference is what a loan locks you into."})]}),e.jsxs("ul",{children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Change cars when life changes."})," Swap into a different Flexcar, or return it when you donât need one. Leave a ",v.loanTermMonths,"-month loan early and you have to sell the car and settle whatever is left on the loan."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Nothing to manage."})," Insurance, routine maintenance, covered repairs, and roadside are in the price. No shopping for coverage, no repair shop."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Minutes, not a Saturday."})," Order online, pick up at a hub or get delivery where available. No dealership."]})]}),e.jsxs("a",{className:"lp-text-link",href:q(ms("/why-flex",n)),children:["Why people flex ",e.jsx(J,{size:16,"aria-hidden":!0})]})]})]}),e.jsxs("section",{id:"assumptions",className:"lp-shell lp-section sc-assume","aria-labelledby":"assume-title",children:[e.jsxs("div",{children:[e.jsx("h2",{id:"assume-title",className:"sc-h2",children:"What this estimate assumes"}),e.jsxs("p",{className:"sc-assume-intro",children:["Fleet averages as of ",me(),", using the same calculation model as Flexcarâs vehicle pages."]})]}),e.jsx("div",{className:"sc-assume-rows",children:ta.map(t=>e.jsxs("details",{className:"sc-assume-row",children:[e.jsxs("summary",{children:[t.title," ",e.jsx(oe,{size:18,"aria-hidden":!0})]}),e.jsx("p",{children:t.body.replace("{term}",String(v.loanTermMonths)).replace("{down}",String(v.downPaymentPct)).replace("{apr}",v.interestRatePct.toFixed(2)).replace("{membership}",String(Y.membership_usd))}),e.jsx("ul",{children:t.sources.map(N=>e.jsx("li",{children:e.jsx("a",{href:N.href,target:"_blank",rel:"noopener noreferrer",children:N.label})},N.href))})]},t.title))})]}),e.jsxs("section",{className:"lp-shell lp-section sc-faq","aria-labelledby":"sc-faq-title",children:[e.jsx("h2",{id:"sc-faq-title",className:"sc-h2",children:"Common questions"}),e.jsx("div",{className:"sc-faq-list",children:fs.map(({q:t,a:N})=>e.jsxs("details",{className:"sc-faq-row",children:[e.jsxs("summary",{className:"sc-faq-trigger",children:[t," ",e.jsx(oe,{size:18,"aria-hidden":!0})]}),e.jsx("p",{className:"sc-faq-answer",children:N})]},t))})]}),e.jsx("section",{className:"lp-shell lp-section","aria-labelledby":"sc-cta-title",children:e.jsxs("div",{className:"sc-final",children:[e.jsx("h2",{id:"sc-cta-title",children:"See the estimate for an actual car."}),e.jsxs("p",{children:["Open ",Qe," in ",E," to see this same comparison on its own price."]}),e.jsxs("div",{className:"sc-result-actions",children:[e.jsxs("a",{href:be,className:"lp-button",onClick:()=>F({event:"calculator_inventory_click",placement:"footer",car:o,market:a.market}),children:[ye," ",e.jsx(J,{size:18,"aria-hidden":!0})]}),e.jsxs("a",{href:Je,className:"lp-button sc-button-outline",onClick:()=>F({event:"calculator_inventory_click",placement:"footer-all",car:o,market:a.market}),children:["Browse all cars ",e.jsx(J,{size:18,"aria-hidden":!0})]})]})]})}),e.jsx(la,{}),te&&e.jsx(Is,{variant:"compact",source:ia,title:"Hear when Flexcar opens near you.",body:"Enter your email and ZIP for launch updates.",buttonLabel:"Email me launch updates",initialLocation:h?m:void 0})]})}function ua(){const s=pe();return e.jsxs("p",{children:["Estimates, not quotes. Figures use fleet-average prices as of ",me(),", forecast resale values and Flexcar prices, and the ",e.jsx("a",{href:"#assumptions",children:"assumptions above"}),"; your actual costs, terms, and availability will differ, and savings arenât guaranteed. They include sales tax but not extra mileage, swaps, damage, fuel, tolls, or parking. Insurance limits, deductibles, and exclusions apply. Terms vary by plan and state; see the"," ",e.jsx("a",{href:s(q("https://www.flexcar.com/membershipagreement")),children:"Membership Agreement"}),"."]})}function ha(s){return s.length<=1?s.join(""):s.length===2?`${s[0]} and ${s[1]}`:`${s.slice(0,-1).join(", ")}, and ${s[s.length-1]}`}function $({label:s,hint:r,after:n,title:a,children:o}){const d=i.useId();return e.jsxs("div",{className:"sc-control",role:"group","aria-labelledby":`${d}-label`,"aria-describedby":r?`${d}-hint`:void 0,children:[a?e.jsx("h2",{className:"sc-control-label sc-control-title",id:`${d}-label`,children:s}):e.jsx("div",{className:"sc-control-label",id:`${d}-label`,children:s}),o,r&&e.jsx("p",{className:"sc-hint",id:`${d}-hint`,children:r}),n]})}function Q({ariaLabel:s,value:r,onChange:n,options:a,columns:o,dark:d}){return e.jsx(aa,{value:r,onValueChange:n,"aria-label":s,className:`sc-segments sc-cols-${o}${d?" sc-segments-dark":""}
1`,children:a.map(l=>e.jsxs(ra,{value:l.value,className:"sc-seg",children:[e.jsx("span",{children:l.label}),l.detail&&e.jsx("small",{children:l.detail})]},l.value))})}function pa({c:s,p:r,vehicle:n,zip:a}){const o=s.profile.years,d=de.find(f=>f.plan===s.profile.plan),l=[{label:o===1?"Year 1":"Years 1â2",value:s.flexcarYearOneAndTwo}];o>=3&&l.push({label:o===3?"Year 3":"Years 3â4",value:s.flexcarYearThreeAndFour}),o>=5&&l.push({label:"Year 5",value:s.flexcarYearFive});const p=s.termCarSaleProceeds;return e.jsxs("div",{className:"sc-receipt",children:[e.jsxs("div",{className:"sc-receipt-cols","aria-hidden":!0,children:[e.jsx("span",{}),e.jsx("span",{children:"Buying"}),e.jsx("span",{children:"Flexing"})]}),e.jsxs(ie,{title:"Upfront",children:[e.jsx(S,{label:"Purchase price",note:e.jsxs("details",{className:"sc-breakdown",children:[e.jsx("summary",{children:"See purchase-price breakdown"}),e.jsxs("dl",{children:[e.jsxs("div",{className:"is-strong",children:[e.jsx("dt",{children:"Dealer advertised price"}),e.jsx("dd",{children:c(s.upfrontAdvertisedPrice)})]}),e.jsxs("div",{className:"is-sub",children:[e.jsx("dt",{children:"Black Book wholesale value"}),e.jsx("dd",{children:c(s.upfrontWholesalePrice)})]}),e.jsxs("div",{className:"is-sub",children:[e.jsx("dt",{children:"+ retail markup"}),e.jsx("dd",{children:c(s.upfrontRetailMarkup)})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Documentation, title, registration, inspection, prep"}),e.jsx("dd",{children:c(s.upfrontDocumentationFees+s.upfrontTitleRegistrationInspection+s.upfrontVehiclePrepFee)})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Extended warranty, tire & wheel protection"}),e.jsx("dd",{children:c(s.upfrontExtendedWarranty+s.upfrontTireAndWheel)})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Origination fee, GAP coverage"}),e.jsx("dd",{children:c(s.upfrontFinancingFees)})]}),e.jsxs("div",{children:[e.jsxs("dt",{children:["Sales tax (",s.salesTaxPct,"%)"]}),e.jsx("dd",{children:c(s.upfrontSalesTax)})]}),e.jsxs("div",{className:"is-total",children:[e.jsx("dt",{children:"Total purchase price"}),e.jsx("dd",{children:c(s.upfrontTotalPurchasePrice)})]}),e.jsxs("div",{className:"is-loss",children:[e.jsx("dt",{children:"Lost the moment you drive off"}),e.jsxs("dd",{children:["â",c(s.upfrontDayOneLoss)]})]})]}),e.jsxs("p",{className:"sc-loss-note",children:["You paid ",c(s.upfrontTotalPurchasePrice)," for a car worth"," ",c(s.upfrontWholesalePrice)," wholesale (Black Book) that same day. The gap is the markup, taxes, fees, and add-ons."]})]}),buy:c(s.upfrontTotalPurchasePrice),flex:e.jsx("span",{className:"sc-na",children:"No purchase"})}),e.jsx(S,{label:"Paid upfront",note:`Buying: ${s.downPaymentPct}% down payment. Flexcar: $${Y.membership_usd} annual membership plus ${s.salesTaxPct}% sales tax.`,buy:c(s.upfrontDownPayment),flex:c(r.flexUpfront),total:!0})]}),r.upfrontDiff>0&&e.jsxs("div",{className:"sc-upfront-callout",children:[e.jsx("span",{className:"sc-upfront-label",children:"Upfront Savings"}),e.jsxs("strong",{className:"sc-upfront-amount",children:[e.jsx("span",{className:"sr-only",children:"about "}),e.jsx("span",{className:"sc-upfront-approx","aria-hidden":!0,children:"~"}),Z(r.upfrontDiff)]})]}),e.jsxs(ie,{title:"Monthly",aside:`Buying assumes a ${s.loanTermMonths}-month loan, ${s.downPaymentPct}% down, at ${s.interestRatePct.toFixed(2)}% APR. Flexcar uses the ${d.planName} plan with Essential protection.`,children:[e.jsx(S,{label:"Car",note:`Buying: loan payment on ${c(s.monthlyTotalFinanced)} financed, for ${s.loanTermMonths} months. Flexcar: vehicle price for your age and credit band, modeled to step down after years two and four.`,buy:`${c(s.monthlyVehiclePayment)}/mo`,flex:l.length===1?`${c(l[0].value)}/mo`:e.jsx("span",{className:"sc-schedule",children:l.map(f=>e.jsxs("span",{children:[e.jsxs("b",{children:[c(f.value),"/mo"]}),e.jsx("small",{children:f.label})]},f.label))})}),e.jsx(S,{label:"Insurance / protection",note:`Buying: full coverage for your age, market, and credit. Flexcar: Essential protection, priced for your age and credit band.${s.zipAdder!==0?` Includes a ${s.zipAdder>0?"+":"â"}${c(Math.abs(s.zipAdder))}/mo adjustment for ZIP ${a}.`:Ae(s.profile.market)?" Some ZIP codes in this market adjust protection up or down; enter yours above for the exact figure.":""}`,buy:`${c(s.monthlyInsurance)}/mo`,flex:`${c(s.flexcarMonthlyInsurance)}/mo`}),e.jsx(S,{label:"Maintenance & repairs",note:`${s.annualMiles.toLocaleStr
1ing("en-US")} miles a year. Covered by the Flexcar membership.`,buy:`${c(s.monthlyMaintenance)}/mo`,flex:e.jsx(ce,{})}),e.jsx(S,{label:"Registration & fees",note:s.monthlyExciseTax>0?"Registration, inspection, excise tax.":"Registration, inspection.",buy:`${c(s.monthlyRegulatoryFees)}/mo`,flex:e.jsx(ce,{})}),e.jsx(S,{label:"Roadside assistance",buy:`${c(s.monthlyRoadside)}/mo`,flex:e.jsx(ce,{})}),e.jsx(S,{label:"Every month",note:`Flexcar averaged over ${ue(o)}, including membership renewals and tax.`,buy:`${c(s.monthlyBuyingCost)}/mo`,flex:`${c(s.monthlyFlexcarCost)}/mo`,total:!0})]}),r.monthlyDiff>0&&e.jsxs("div",{className:"sc-upfront-callout",children:[e.jsx("span",{className:"sc-upfront-label",children:"Additional Monthly Savings"}),e.jsxs("strong",{className:"sc-upfront-amount",children:[e.jsx("span",{className:"sr-only",children:"about "}),e.jsx("span",{className:"sc-upfront-approx","aria-hidden":!0,children:"~"}),Z(r.monthlyDiff,!0)]})]}),e.jsxs(ie,{title:`After ${ue(o)}`,children:[e.jsx(S,{label:"Paid, all in",note:"Upfront plus every monthly cost.",buy:c(s.termBuyingCost),flex:c(s.termFlexcarCost),total:!0}),r.termDiff>0&&e.jsxs("div",{className:"sc-upfront-callout sc-in-group",children:[e.jsx("span",{className:"sc-upfront-label",children:"Total Cash Savings"}),e.jsxs("strong",{className:"sc-upfront-amount",children:[e.jsx("span",{className:"sr-only",children:"about "}),e.jsx("span",{className:"sc-upfront-approx","aria-hidden":!0,children:"~"}),Z(r.termDiff)]})]}),e.jsx(S,{label:"Buyer sells the car",note:s.termRemainingLoanBalance>0?`${c(s.termTradeInValue)} Black Book trade-in forecast, minus ${c(s.termRemainingLoanBalance)} still owed on the loan.`:`${c(s.termTradeInValue)} Black Book trade-in forecast; the loan is paid off.`,buy:e.jsxs("span",{className:p>=0?"sc-back":"sc-owed",children:[p>=0?null:"â ",c(Math.abs(p)),e.jsx("small",{children:p>=0?"back to the buyer":"still owed"})]}),flex:e.jsx("span",{className:"sc-na",children:"Nothing to sell"})}),e.jsx(S,{label:"Net cost after the sale",buy:c(r.buyAfterSale),flex:c(s.termFlexcarCost),total:!0}),r.savingsAfterSale!==0&&e.jsxs("div",{className:"sc-upfront-callout sc-in-group sc-callout-last",children:[e.jsx("span",{className:"sc-upfront-label",children:r.savingsAfterSale>0?"Flexcar Savings Even After Car Sale":"Flexcar Costs More After Car Sale"}),e.jsxs("strong",{className:"sc-upfront-amount",children:[e.jsx("span",{className:"sr-only",children:"about "}),r.savingsAfterSale<0&&e.jsx("span",{"aria-hidden":!0,children:"â"}),e.jsx("span",{className:"sc-upfront-approx","aria-hidden":!0,children:"~"}),Z(r.savingsAfterSale)]})]})]})]})}function ie({title:s,aside:r,children:n}){return e.jsxs("section",{className:"sc-group","aria-label":s,children:[e.jsxs("header",{children:[e.jsx("h3",{children:s}),r&&e.jsx("p",{children:r})]}),n]})}function S({label:s,note:r,buy:n,flex:a,total:o}){return e.jsxs("div",{className:`sc-row${o?" is-total":""}`,children:[e.jsxs("div",{className:"sc-row-label",children:[e.jsx("span",{children:s}),r&&e.jsx("div",{className:"sc-row-note",children:r})]}),e.jsxs("div",{className:"sc-row-val",children:[e.jsx("small",{children:"Buying"}),e.jsx("strong",{children:n})]}),e.jsxs("div",{className:"sc-row-val sc-row-flex",children:[e.jsx("small",{children:"Flexing"}),e.jsx("strong",{children:a})]})]})}function ce(){return e.jsxs("span",{className:"sc-included",children:[e.jsx(Es,{size:14,"aria-hidden":!0})," Included"]})}
1function Pa(){return e.jsx(js,{mainClassName:"lp sc",footer:"legal",footerNote:e.jsx(ua,{}),children:e.jsx(da,{})})}export{Pa as component};
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.