PageSourceSearch

https://ev.com/_next/static/chunks/pages/index-36108d4cb276191c.js

js ev.com collected 2026-09-24 18:47:21 UTC 59,649 bytes, 2 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="275f02dc-ac82-4df1-9547-296bf18ed75f",e._sentryDebugIdIdentifier="sentry-dbid-275f02dc-ac82-4df1-9547-296bf18ed75f")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1573,3332],{1011:(e,t,a)=>{"use strict";a.d(t,{g:()=>s,A:()=>r});var l=a(88017);a(44109);var s=function(e){return e.Text="text",e.Password="password",e.Email="email",e.Phone="phone",e.Number="number",e}({});let r=e=>{let{className:t="",id:a="",type:s="text",onChange:r=()=>{},onPaste:i,step:n,float:o=-1,onClick:c=()=>{},...d}=e;return(0,l.jsx)("input",{onClick:c,className:"input placeholder-neutral-600 ".concat(t),type:s,onChange:e=>{o>-1&&"number"===s?r(Number(e.currentTarget.value).toFixed(o)):r(e.currentTarget.value)},onPaste:i,step:n,id:a,...d})}},6179:(e,t,a)=>{"use strict";a.d(t,{HK:()=>i,OL:()=>s,OP:()=>l,y6:()=>r});var l=function(e){return e.Left="left",e.Right="right",e}({}),s=function(e){return e.Electric="Electric",e.Hybrid="Hybrid",e.Gasoline="Gasoline",e.Flex="Flex",e.Premium="Premium",e.Diesel="Diesel",e.Unknown="Unknown",e}({}),r=function(e){return e[e.Clear=0]="Clear",e[e.Empty=1]="Empty",e[e.INVALID_PHONE=2]="INVALID_PHONE",e[e.INVALID_EMAIL=3]="INVALID_EMAIL",e[e.MAXIMUM_LENGTH=4]="MAXIMUM_LENGTH",e[e.INVALID_DEALER_LICENSE=5]="INVALID_DEALER_LICENSE",e[e.INVALID_EXPIRATION_DATE=6]="INVALID_EXPIRATION_DATE",e}({});let i=e=>Object.values(e).every(e=>0===e)},9046:(e,t,a)=>{"use strict";a.d(t,{A:()=>i,y:()=>r});var l=a(88017),s=a(91294);a(44109);var r=function(e){return e.Default="Default",e.Secondary="Secondary",e.Destructive="Destructive",e}({});let i=e=>{let{children:t,icon:a,analyticsEvent:r,onClick:i=()=>{},size:n="default",variant:o="Default",...c}=e,{handleActionTracking:d}=(0,s.st)(),m="transition-colors duration-500 group relative flex flex-grow inline-flex text-body2Regular ".concat("small"===n?"px-[0px]":"px-xs"," py-s cursor-default");return m=c.disabled?"".concat(m," text-neutral-400"):"".concat(m," text-blue-medium hover:text-brandMidnight-hover cursor-pointer"),"Destructive"===o?(m="".concat(m," text-red-dark"),m=c.disabled?"".concat(m," opacity-[.3]"):"".concat(m," hover:text-red-medium ")):"Secondary"===o&&(m="".concat(m," text-neutral-0"),m=c.disabled?"".concat(m," opacity-[.3]"):"".concat(m," hover:text-neutral-200 ")),(0,l.jsx)("button",{className:m,onClick:e=>{r&&d(r),i(e)},...c,children:(0,l.jsxs)("div",{className:"flex w-full items-center justify-center gap-[6px] whitespace-nowrap",children:[a&&"left"===a.position&&a.icon,t,a&&"left"!==a.position&&a.icon]})})}},12020:(e,t,a)=>{"use strict";a.d(t,{M:()=>s});var l=a(14278);let s=(e,t)=>{let a=e||0;return 0===a?null!=t?t:l.OF:"$".concat(Math.round(a).toLocaleString())}},16770:(e,t,a)=>{"use strict";a.d(t,{K:()=>r});var l=a(88017),s=a(71623);let r=e=>{let{children:t,xs:a={marginLeft:!0,marginRight:!0},s:r={marginLeft:!0,marginRight:!0},m:i={marginLeft:!0,marginRight:!0},ml:n={marginLeft:!0,marginRight:!0},l:o={marginLeft:!0,marginRight:!0}}=e,c=e=>"fullWidth"in e?!e.fullWidth:!("marginRight"in e)||e.marginRight,d=e=>"fullWidth"in e?!e.fullWidth:!("marginLeft"in e)||e.marginLeft;return(0,l.jsx)("div",{className:(0,s.A)("w-full",{"pr-l":c(a),"pl-l":d(a),"pr-0":!c(a),"pl-0":!d(a),"s:pr-xl":c(r),"s:pl-xl":d(r),"s:pr-0":!c(r),"s:pl-0":!d(r),"m:pr-xl":c(i),"m:pl-xl":d(i),"m:pr-0":!c(i),"m:pl-0":!d(i),"ml:pr-3xl":c(n),"ml:pl-3xl":d(n),"ml:pr-0":!c(n),"ml:pl-0":!d(n),"l:pr-[max(64px,calc((100vw-1720px)/2))]":c(o),"l:pl-[max(64px,calc((100vw-1720px)/2))]":d(o),"l:pr-0":!c(o),"l:pl-0":!d(o)}),children:t})}},24686:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var l=a(88017),s=a(66751);a(44109);var r=a(9046);let i=e=>{let{href:t,variant:a=r.y.Default,children:i,target:n,...o}=e;return(0,l.jsx)(s.N,{"aria-label":"link to ".concat(t),href:t,target:n,rel:o.rel,children:(0,l.jsx)(r.A,{...o,variant:a,children:i})})}},24839:(e,t,a)=>{"use strict";a.d(t,{n:()=>n});var l=a(88017),s=a(88876),r=a(67642),i=a(75880);let n=e=>{var t;let{label:a,size:n}=e,{isMobile:o}=(0,i.A)(),{settings:c,handleSetEvSavings:d}=(0,r.u)(),m=null!=(t=null==c?void 0:c.evSavings)&&t;return(0,l.jsxs)("div",{className:"flex items-center gap-s",children:[a&&(0,l.jsx)("span",{className:"flex whitespace-nowrap text-body1Light",children:a}),(0,l.jsx)(s.A,{"aria-label":"EV Savings ".concat(m?"on":"off"),checked:m,size:null!=n?n:o?"default":"small",onCheckedChange:e=>{d(e)}})]})}},26652:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var l=a(88017),s=a(66751);a(44109);var r=a(15704);let i=e=>{let{href:t,variant:a=r.h.Primary,children:i,target:n,...o}=e;return(0,l.jsx)(s.N,{href:t,target:n,children:(0,l.jsx)(r.A,{...o,variant:a,children:i})})}},36332:(e,t,a)=>{"use strict";a.d(t,{Z:()=>s});var l=a(88017);a(44109);let s=e=>{let{active:t=!1,edge:a=!1,"aria-label":s,...r}=e;return(0,l.jsx)("button",{"aria-label":s,className:"h-[10px] w-[10px] rounded-full bg-neutral-300 bg-cover bg-center bg-no-repeat ".concat(t?"rounded-full bg-neutral-800":""," ").concat(a?"h-s w-s":""),type:"button",...r})}},40936:(e,t,a)=>{"use strict";a.d(t,{MY:()=>i,RY:()=>s,_b:()=>l,ho:()=>n});let l=(e,t,a,l)=>{let s,r=e/100;return s=e>0?Math.max(0,r/12*t/(1-(1+r/12)**-a)):Math.max(0,t/Number(a)),l&&(s-=l.fuelSavingsEstimate/(12*l.timePeriod)),Math.max(s,0)},s=(e,t,a,l,s,r,i)=>{let n=t/100,o=0,c=e;return i&&(c+=i.fuelSavingsEstimate/(12*i.timePeriod)),(t>0?Math.floor(Math.max(0,c*(1-(1+n/12)**-a)/(n/12))):Math.max(0,c*a))+l+s+(r||0)},r=e=>e/2400,i=e=>{let{apr:t,totalAfterDeductions:a,leaseTerm:l,residualValue:s,fuelSavings:i}=e,n=(a+s)*r(t),o=(a-s)/l+n;return i&&(o-=i.fuelSavingsEstimate/(12*i.timePeriod)),Math.max(o,0)},n=(e,t,a,l,s,i,n)=>{let o=e;return n&&(o+=n.fuelSavingsEstimate/(12*n.timePeriod)),(o*a+l)/(1+r(t)*a
1)+s+(i||0)}},43807:(e,t,a)=>{"use strict";a.d(t,{Dr:()=>h,GI:()=>d,K6:()=>m,QR:()=>p,au:()=>u,cA:()=>n,gS:()=>o,hH:()=>l,hh:()=>r,vt:()=>x});let l=e=>718===e.id,s=e=>666===e.id,r=e=>[666,718,394].includes(e.id),i=e=>232===e.id,n=e=>e.filter(e=>l(e)||s(e)||i(e)),o=e=>n(e).reduce((e,t)=>{var a;return e+((null==(a=t.evaluation)?void 0:a.amount_in_purchase)||0)},0),c=e=>{if("Federal"===e.grantor&&e.point_of_sale){var t;return(null==(t=e.evaluation)?void 0:t.amount_in_purchase)||0}return e.point_of_sale&&e.max_amount?e.max_amount:0},d=e=>e.reduce((e,t)=>e+c(t),0),m=e=>{var t,a;return"Federal"!==e.grantor||e.point_of_sale?!e.point_of_sale&&r(e)?(null==(a=e.evaluation)?void 0:a.amount_in_purchase)||0:!e.point_of_sale&&e.max_amount?e.max_amount:0:(null==(t=e.evaluation)?void 0:t.amount_in_purchase)||0},u=e=>e.reduce((e,t)=>e+m(t),0),x=(e,t)=>{var a;return null==(a=t.mutually_exclusive_programs)?void 0:a.some(t=>e.some(e=>e.id===parseInt(t,10)))},h=e=>e.reduce((e,t)=>(e.total+=1,t.max_amount&&t.point_of_sale||s(t)?e.monetaryIncentives.push(t):t.max_amount&&!t.point_of_sale?e.rebates.push(t):t.max_amount||e.nonMonetaryIncentives.push(t),e),{total:0,monetaryIncentives:[],rebates:[],nonMonetaryIncentives:[]}),p=(e,t)=>e.reduce((e,a)=>{var l,s;if(t.monetaryIncentives.some(e=>e.id===a.id)){let t=e.incentives+((r(a)?null==(l=a.evaluation)?void 0:l.amount_in_purchase:a.max_amount)||0);return{rebate:e.rebate,incentives:t}}return t.rebates.some(e=>e.id===a.id)?{rebate:e.rebate+((r(a)?null==(s=a.evaluation)?void 0:s.amount_in_purchase:a.max_amount)||0),incentives:e.incentives}:e},{rebate:0,incentives:0})},50455:(e,t,a)=>{"use strict";a.d(t,{O:()=>c,d:()=>d});var l=a(88017),s=a(66751),r=a(98605),i=a(71623),n=a(90786),o=a.n(n);function c(e){let{layout:t="column",size:a="medium"}=e,s="row"===t,n="aspect-[16/9]";return s&&(n="small"===a?"h-[122px]":"h-[190px]"),(0,l.jsxs)("div",{className:(0,i.A)("w-full overflow-hidden rounded-large bg-white",s&&"small"===a&&"h-[122px]",s&&"medium"===a&&"h-[190px]",s?"grid grid-cols-1 md:grid-cols-2":"flex flex-col gap-4"),children:[(0,l.jsx)("div",{className:(0,i.A)("".concat(n," relative overflow-hidden"),s?"w-full md:w-auto":"aspect-[16/9] min-h-[180px] md:min-h-[220px]"),children:(0,l.jsx)(r.E,{className:"h-full w-full"})}),(0,l.jsxs)("div",{className:(0,i.A)("flex flex-col justify-center",s&&"small"===a&&"p-3",s&&"medium"===a&&"p-4",!s&&"gap-2 p-4"),children:[(0,l.jsx)(r.E,{className:(0,i.A)("h-4 w-16",s&&"small"===a&&"mb-1 h-3 w-12",s&&"medium"===a&&"mb-2 w-14",!s&&"mb-2")}),(0,l.jsxs)("div",{className:(0,i.A)("space-y-2",s&&"small"===a&&"space-y-1"),children:[(0,l.jsx)(r.E,{className:(0,i.A)("h-6 w-full",s&&"small"===a&&"h-4",s&&"medium"===a&&"h-5",!s&&"h-7")}),(0,l.jsx)(r.E,{className:(0,i.A)("h-6 w-4/5",s&&"small"===a&&"h-4",s&&"medium"===a&&"h-5",!s&&"h-7")})]}),"medium"===a&&(0,l.jsxs)("div",{className:(0,i.A)("mt-2 space-y-2",s&&"medium"===a&&"mt-2",!s&&"mt-3"),children:[(0,l.jsx)(r.E,{className:(0,i.A)("h-4 w-full",s&&"medium"===a&&"h-3")}),(0,l.jsx)(r.E,{className:(0,i.A)("h-4 w-4/5",s&&"medium"===a&&"h-3")})]})]})]})}function d(e){let{layout:t="column",size:a="medium",article:r}=e,{excerpt:n,title:c,categories:d,image:m,slug:u}=r,x="row"===t,h="aspect-[16/9]";x&&(h="small"===a?"h-[122px]":"h-[190px]");let p="medium"===a&&!!n;return(0,l.jsxs)(s.N,{href:"/news/".concat(u),className:(0,i.A)("group relative w-full overflow-hidden rounded-lg bg-white",x?"grid grid-cols-1 md:grid-cols-2":"flex flex-col"),children:[!!m&&(0,l.jsx)("div",{className:(0,i.A)("".concat(h," relative overflow-hidden"),x?"w-full md:w-auto":"aspect-[16/9] min-h-[180px] md:min-h-[220px]"),children:(0,l.jsx)(o(),{src:m,alt:"Article image",fill:!0,className:"object-cover",sizes:x?"(max-width: 768px) 100vw, 50vw":"(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw"})}),(0,l.jsxs)("div",{className:"flex flex-col p-l",children:[d.length>0&&(0,l.jsx)("div",{children:(0,l.jsx)("span",{className:"text-body1Light uppercase text-neutral-800",children:d.join(", ")})}),(0,l.jsx)("p",{className:(0,i.A)("text-h5Medium text-black group-hover:text-blue-medium",{"line-clamp-3":"small"===a,"line-clamp-4 text-h5Medium":"medium"===a,"mb-s":p}),children:c}),p&&(0,l.jsx)("p",{className:"line-clamp-2 text-h5Light text-black group-hover:text-blue-dark",children:n})]})]})}},52144:e=>{e.exports={style:{fontFamily:"'Saira', 'Saira Fallback'",fontWeight:700,fontStyle:"normal"},className:"__className_b53c7c"}},53198:e=>{e.exports={style:{fontFamily:"'Saira', 'Saira Fallback'",fontWeight:700,fontStyle:"normal"},className:"__className_b53c7c"}},53935:(e,t,a)=>{"use strict";a.d(t,{o:()=>n});var l=a(88017),s=a(6179),r=a(22760),i=a(88801);a(44109);let n=e=>{let{direction:t,className:a="",...n}=e;return(0,l.jsx)("button",{className:"flex size-2xl items-center justify-center rounded-full border-[1px] border-neutral-0 bg-white/70 shadow-[0px_1.667px_3.33px_0px_rgba(64,64,75,0.1)] ".concat(a),type:"button","aria-label":t===s.OP.Right?"Select next":"Select previous",...n,children:t===s.OP.Right?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(r.A,{className:"text-neutral-800",width:18,height:18})}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(i.A,{className:"text-neutral-800",width:18,height:18})})})}},54056:(e,t,a)=>{"use strict";a.d(t,{A:()=>s});var l=a(44109);let s=l.forwardRef(function(e,t){let{title:a,titleId:s,...r}=e;return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
1currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":s},r),a?l.createElement("title",{id:s},a):null,l.createElement("path",{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.34l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z",clipRule:"evenodd"}))})},56229:(e,t,a)=>{"use strict";a.d(t,{Cr:()=>l});let l={homePage:{title:"EV | New & Used Electric Cars for Sale | EV.com",description:"EV for Sale | Shop new & used electric cars from trusted partners on EV.com. Save money, drive electric, and help the planet. Discover your perfect EV today!",h1Tag:"EV for\xa0All",h2Tag:"Shop electric cars from our trusted partners",imageAlt:"ev.com",keywords:"electric cars for sale"},buildPage:{title:"Build your $MAKE EV | EV.com",description:"Build your $MAKE EV on EV.com. Customize your $MAKE EV to fit your needs and preferences with our easy-to-use tools.",h1Tag:"Build your $MAKE EV",imageAlt:"build your $MAKE ev",keywords:"build $MAKE ev"},buildModelPage:{title:"Build your $YEAR $MAKE $MODEL EV | EV.com",description:"Build your $MAKE EV on EV.com. Customize your $YEAR $MAKE $MODEL EV to fit your needs and preferences with our easy-to-use tools.",h1Tag:"Choose Your $YEAR $MAKE $MODEL EV Trim",imageAlt:"build your $YEAR $MAKE $MODEL ev",keywords:"build $YEAR $MAKE $MODEL ev"},searchPage:{title:"EV | Electric Cars for Sale Near Me | EV.com",description:"Discover a variety of electric cars available for sale near you on EV.com. Use our search tool to find the best electric vehicles in your area.",h1Tag:"EV | Electric Cars For Sale Near Me",imageAlt:"ev cars for sale",ke
1ywords:"electric cars for sale near me"},seoPage:{title:"$CONDITION $YEAR $MAKE $MODEL Electric Cars For Sale $LOCATION | EV.com",description:"Discover a wide range of $CONDITION $YEAR $MAKE $MODEL for sale $LOCATION on EV.com. Find your perfect $CONDITION $YEAR $MAKE $MODEL from top brands, compare prices, read reviews, and get the best deals today!",h1Tag:"$CONDITION $YEAR $MAKE $MODEL Electric Cars For Sale $LOCATION",h2Tag:"Shop EVs from our trusted partners",imageAlt:"$CONDITION $YEAR $MAKE $MODEL for sale $LOCATION",keywords:"$CONDITION $YEAR $MAKE $MODEL for sale $LOCATION"},comparePage:{title:"Compare EV | Electric Vehicle | EV.com",description:"Effortlessly compare electric vehicles on EV.com to find the perfect match for your driving needs. Explore specs, range, and pricing today.",imageAlt:"compare evs",h1Tag:"Compare Electric Vehicles",keywords:"compare electric vehicles"},blogPage:{title:"EV News | Electric Cars Buying & Selling News | EV.com",description:"Stay ahead with the latest EV News on buying & selling electric cars at EV.com. Get insights, trends, and updates to make informed decisions.",h1Tag:"EV News",keywords:"ev news"},partnerPage:{title:"Partner with EV.com | EV.com",description:"Let's accelerate the transition towards zero-emission mobility together. Sell more EVs when you partner with us.",h1Tag:"Partner with EV.com",keywords:"partner with ev.com"},errorpage:{title:"Page Not Found | Shop new & used electric cars from trusted partners on EV.com.",description:"EV for Sale | Shop new & used electric cars from trusted partners on EV.com. Save money, drive electric, and help the planet. Discover your perfect EV today!",h1Tag:"Sorry we couldn't find the page you were looking for.",h2Tag:"To find your way to your next EV, try one of the option below.",keywords:"page not found"},faqPage:{title:"Frequently Asked Questions | Shop new & used electric cars from trusted partners on EV.com.",description:"EV for Sale | Shop new & used electric cars from trusted partners on EV.com. Save money, drive electric, and help the planet. Discover your perfect EV today!",h1Tag:"Frequently Asked Questions",h2Tag:"Everything you need to know about EV.com",keywords:"faq"},dealerPage:{title:"$DEALER electric cars for sale | EV.com",description:"Discover $DEALER electric cars for sale on EV.com. Get the best deals and newest models from your local dealer.",h1Tag:"$DEALER Electric Cars for Sale",keywords:"electric cars"},loginPage:{title:"Login | EV.com",description:"Login to your EV.com account to access personalized features and manage your electric vehicle preferences.",h1Tag:"Login to your account",keywords:"login"},accountSettings:{title:"My EVs | EV.com",description:"Manage your account on EV.com. Customize your experience and stay updated on the latest electric vehicle news.",h1Tag:"My EVs",keywords:"settings account"},generalModelSeoTemplate:{title:"Explore All Electric Vehicle Makes & Models | EV.com - Your Ultimate EV Resource",description:"Discover all electric vehicle makes and models on EV.com. Get the latest updates, reviews, and news to help you choose the perfect EV for your lifestyle and needs.",h1Tag:"",keywords:""}}},62526:(e,t,a)=>{"use strict";a.d(t,{S:()=>n});var l=a(88017),s=a(19259),r=a(71623);a(44109);var i=function(e){return e.Default="bg-brandMidnight",e.Turquoise="bg-brandElectric",e}(i||{});let n=e=>{let{checked:t=!1,onChange:a=()=>{},checkBoxVariant:i="bg-brandMidnight",size:n="default","aria-label":o,...c}=e;return(0,l.jsxs)("section",{"aria-label":o,className:(0,r.A)("flex items-center",{"cursor-pointer":!c.disabled}),onClick:()=>a(!t),children:[(0,l.jsx)("input",{className:"hidden",type:"checkbox",checked:t,onChange:e=>a(e.currentTarget.checked),...c}),(0,l.jsx)("div",{className:(0,r.A)("flex items-center justify-center rounded-xsmall border-2",{"border-transparent":t,[i]:t,"border-gray-300 bg-white":!t,"size-[20px]":"default"===n,"size-l":"small"===n}),children:(0,l.jsx)(s.A,{stroke:"white",width:26,height:26})})]})}},67461:(e,t,a)=>{"use strict";a.d(t,{l:()=>d});var l=a(88017),s=a(53935),r=a(36332),i=a(6179),n=a(71623),o=a(44109);a(39397),a(35189);var c=a(75435);let d=e=>{let{slides:t,selectedIndex:a,updateCurrentIndex:d=()=>{},slidesPerView:m=1,spaceBetween:u=0,centeredSlides:x=!1,loop:h=!1,navigationWrapper:p=(0,l.jsx)(l.Fragment,{}),navigation:f=!1,navigationVariant:g="bottom-right",dots:v=!1,dotAmount:b,allowTouchMove:w=!0}=e,y=(0,o.useRef)(null),j=b||t.length,N=(0,o.useCallback)(e=>{d(e.realIndex)},[d]),E=(0,o.useCallback)(()=>{y.current&&y.current.slideNext()},[]),k=(0,o.useCallback)(()=>{y.current&&y.current.slidePrev()},[]),A=(0,o.useCallback)(e=>{y.current&&(h?y.current.slideToLoop(e):y.current.slideTo(e))},[h]);return(0,o.useEffect)(()=>{y.current&&(y.current.allowTouchMove=w)},[w]),(0,l.jsxs)("div",{className:(0,n.A)("relative flex h-full w-full flex-col",{"pb-xl":f}),children:[(0,l.jsx)("div",{className:"flex h-full",children:(0,l.jsx)(c.RC,{loop:h,slidesPerView:m,spaceBetween:u,centeredSlides:x,initialSlide:a,onSlideChange:N,onSwiper:e=>{y.current=e},children:t.map((e,t)=>(0,l.jsx)(c.qr,{className:"flex w-full justify-center",children:e},"slide-".concat(t)))})}),(f&&"bottom-right"===g||v)&&o.cloneElement(p,{},(0,l.jsxs)("div",{className:"relative flex h-full pb-xl pt-l m:pb-l",children:[v&&(0,l.jsx)("div",{className:"absolute left-[50%] top-[45%] flex items-center justify-end space-x-[3px]",children:t.slice(0,j).map((e,t)=>(0,l.jsx)(r.Z,{edge:!0,active:a%j===t,"aria-label":"slide ".concat(t),onClick:()=>{a!==t&&A(t)}},"dot-".concat(t)))}),f&&"bottom-right"===g&&(0,l.jsxs)("div",{className:"flex h-full w-full items-center justify-end gap-m",children:[(0,l.jsx)("div",{className:"prev-arrow",onClick:k,children:(0,l.jsx)(s.o,{direction:i.OP.Left,onClick:()=>k()})}),(0,l.jsx)("div",{className:"next-arrow",onClick:()=>E(),children:(0,l.jsx)(s.o,{direction:i.OP.Right,onClick:()=>E()})})]})]})),f&&"between"===g&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:"prev-arrow absolute left-0 top-[50%] z-10 flex flex-grow translate-x-[-50%] translate-y-[-50%]",onClick:k,children:(0,l.jsx)(s.o,{direction:i.OP.Left,onClick:()=>k()})}),(0,l.jsx)("div",{className:"next-arrow absolute right-0 top-[50%] z-10 flex flex-grow translate-x-[50%] translate-y-[-50%]",onClick:()=>E(),children:(0,l.jsx)(s.o,{direction:i.OP.Right,onClick:()=>E()})})]})]})}},72764:(e,t,a)=>{"use strict";a.r(t),a.d(t,{__N_SSG:()=>ep,default:()=>ef});var l=a(88017),s=a(16770),r=a(75880),i=a(56229),n=a(90786),o=a.n(n),c=a(15704),d=a(61637),m=a(72023),u=a(69997),x=a(14278),h=a(81736),p=a(94002),f=a.n(p),g=a(44109);f()(()=>
1Promise.all([a.e(4747),a.e(8235),a.e(1203),a.e(8979)]).then(a.bind(a,73584)).then(e=>e.LocationPopOutModal),{loadableGenerated:{webpack:()=>[73584]},ssr:!1});let v=e=>{let{makes:t,models:a,placeholder:s}=e,[i,n]=(0,g.useState)(""),{mutateAsync:o}=(0,u.Vw)(),[p,f]=(0,g.useState)(!1),[v,b]=(0,g.useState)(!1),{preferredZip:w,userAddress:y,customAddress:j,customZip:N}=(0,m.g)(),{zip:E,city:k,state:A,country:S}=y||{},{isMobile:M}=(0,r.A)(),[C,_]=(0,g.useState)(!1);void 0!==k&&void 0!==A&&"".concat(k,", ").concat(A);let V=async e=>{await o(e),(0,h.CA)({input:e,zip:w})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"flex w-full flex-col",inert:p,children:[(0,l.jsxs)("div",{className:"mb-m flex flex-col md:w-full md:flex-row md:gap-l",children:[(0,l.jsx)("div",{className:"mb-s inline-flex h-[54px] w-full md:basis-7/10",children:(0,l.jsx)(d.x,{input:i,setInput:n,models:a,makes:t,handleVectorSearch:V,placeholder:s,setShowOptions:b,showOptions:v,onFocus:M?()=>{f(!0)}:void 0})}),(0,l.jsx)("div",{className:"flex h-[54px] w-full md:mb-0 md:basis-3/10 ml:h-full",children:(0,l.jsx)(c.A,{"aria-label":"Search EVs",variant:c.h.Tertiary,analyticsEvent:{...x.H.inventoryHomePageButton,pageTarget:"search"},onClick:()=>{M?f(!0):V(i)},children:"Search"})})]}),!1]}),p&&(0,l.jsx)("div",{className:"fixed inset-0 z-50 h-screen w-full bg-neutral-100",children:(0,l.jsx)(d.x,{input:i,limitSuggestions:!1,setInput:n,models:a,makes:t,handleVectorSearch:async e=>{await V(e),f(!1),n("")},setShowOptions:f,showOptions:p,searchBarVariant:"dialog"})})]})},b=e=>{let{isMobile:t,isTablet:a,isDesktop:s}=(0,r.A)();return(0,l.jsxs)("div",{className:"relative w-full",children:[(0,l.jsx)("div",{className:"absolute inset-0 z-0",children:a||s?(0,l.jsxs)("video",{autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:"h-full w-full rounded-medium object-cover","aria-label":"Home page hero video",poster:"https://ev-com-market-assets.s3.amazonaws.com/homepage-hero-videos/hero-poster-".concat(s?"desktop":"tablet","-2.webp"),children:[(0,l.jsx)("source",{src:"https://ev-com-market-assets.s3.amazonaws.com/homepage-hero-videos/hero-video-mobile-2.mp4",type:"video/mp4",media:"(max-width: 767px)"}),(0,l.jsx)("source",{src:"https://ev-com-market-assets.s3.amazonaws.com/homepage-hero-videos/hero-video-tablet-2.mp4",type:"video/mp4",media:"(max-width: 1023px)"}),(0,l.jsx)("source",{src:"https://ev-com-market-assets.s3.amazonaws.com/homepage-hero-videos/hero-video-desktop-2.mp4",type:"video/mp4",media:"(min-width: 1024px)"}),"Your browser does not support the video tag."]}):(0,l.jsx)(o(),{src:"https://ev-com-market-assets.s3.amazonaws.com/homepage-hero-videos/hero-poster-mobile-2.webp",alt:"Home page hero image",fill:!0,priority:!0,className:"rounded-medium object-cover"})}),(0,l.jsxs)("div",{className:"relative flex w-full flex-col items-center justify-center px-l py-[42px] md:items-start md:px-[40px] md:py-[58px]",children:[(0,l.jsx)("h1",{className:"mb-s text-center text-h2SemiBold text-white md:text-h1SemiBold",children:"EV for all"}),(0,l.jsx)("h2",{className:"mb-xl text-center text-body1Regular font-normal text-white md:mb-[52px] md:text-h2Regular",children:i.Cr.homePage.h2Tag}),(0,l.jsx)(v,{makes:e.makes,models:e.models,placeholder:t?"Search":"Search by make, model or keyword"})]})]})};var w=a(80478),y=a(209),j=a(67461),N=a(35863);let E={header:"Calculate your monthly vehicle payment",subHeader:"Discover hundreds of EVs for sale within your budget."},k={header:"EV vs Gas comparison",subHeader:"Find out why EV ownership has cheaper running costs than a gasoline-powered vehicle."},A=()=>{let{isMobile:e}=(0,r.A)(),[t,a]=(0,g.useState)(!0),[i,n]=(0,g.useState)(!0),[o,c]=(0,g.useState)(2),[d,m]=(0,g.useState)(4e4),u=[(0,l.jsx)("div",{className:"flex h-full ".concat(o%2==0?"opacity-100":"opacity-60"," px-s pb-xl transition-opacity duration-500 ease-in-out"),children:(0,l.jsx)(N.Z,{salePrice:d,setSalePrice:m,expanded:t,setExpanded:a,type:"homepage",initialMode:"Finance"})},"payment-calc"),(0,l.jsx)("div",{className:"flex h-full ".concat(o%2==1?"opacity-100":"opacity-60"," pb-xl transition-opacity duration-500 ease-in-out"),children:(0,l.jsx)(y.r,{expanded:t,setExpanded:a,variant:"homepage",setAllowTouchMove:n})},"gve-calc")];return(0,l.jsxs)("section",{className:"bg-gradient-to-r from-lightTheme-start to-lightTheme-end py-3xl m:pb-xl m:pt-[80px]",children:[(0,l.jsxs)("div",{className:"flex w-full flex-col gap-xl m:flex-row",children:[(0,l.jsx)(s.K,{children:(0,l.jsxs)("div",{className:"relative flex h-[80%] w-full flex-col items-center justify-center gap-s pb-m",children:[(0,l.jsxs)("div",{className:"absolute left-0 top-0 m:opacity-0",children:[(0,l.jsx)("div",{className:"flex w-full text-h2SemiBold text-brandMidnight",children:o%2==0?E.header:k.header}),(0,l.jsx)("div",{className:"flex w-full text-body1Regular text-brandMidnight",children:o%2==1?E.subHeader:k.subHeader})]}),(0,l.jsxs)("div",{className:"opacity-0 m:opacity-100",children:[(0,l.jsx)("div",{className:"flex w-full text-h2SemiBold text-brandMidnight",children:E.header}),(0,l.jsx)("div",{className:"flex w-full text-body1Regular text-brandMidnight",children:E.subHeader})]})]})}),(0,l.jsx)("div",{className:"flex w-full pb-xl m:w-8/12",children:(0,l.jsx)(j.l,{slidesPerView:e?1.12:1.15,spaceBetween:e?10:30,loop:!0,slides:u.concat(u),updateCurrentIndex:c,selectedIndex:o,centeredSlides:e,navigation:!e,allowTouchMove:i,navigationWrapper:(0,l.jsx)(w.H,{variant:"template",left:!1}),dots:!0,dotAmount:2})})]}),(0,l.jsx)(s.K,{children:(0,l.jsx)("span",{className:"flex text-microLight text-neutral-600",children:"The finance calculator estimates are for convenience only and are not a finance offer or credit guarantee. The estimate excludes taxes, title, registration, vehicle sale, and financing fees. Costs may vary within states. Comparison vehicles are based on average EV and gasoline consumption rates."})})]})};var S=a(70068),M=a.n(S),C=a(5252);let _=()=>{let{preferredZip:e}=(0,m.g)();return(0,l.jsxs)("div",{role:"button","aria-label":"Search EVs with incentives",onClick:()=>(0,h.CA)({input:"",zip:e}),className:"jsx-d79fdbf58b547f10 group flex w-full flex-col justify-between gap-s overflow-hidden rounded-small bg-blue-medium p-2xl",children:[(0,l.jsx)("div",{className:"jsx-d79fdbf58b547f10 flex text-h2SemiBold text-neutral-0",children:"Save up to $7,500 or more with incentives"}),(0,l.jsx)("div",{className:"jsx-d79fdbf58b547f10 text-body1Regular text-neutral-0",children:"Navigate federal incentives to maximize your savings"}),(0,l.jsx)("div",{className:"jsx-d79fdbf58b547f10 pointer-events-none relative flex h-[175px] justify-end ml:max-h-[200px]",children:(0,l.jsx)("div",{className:"jsx-d79fdbf58b547f10 absolute bottom-[-175px] right-[-135px] rotate-[15deg] group-hover:[animation:tiltedSpin_2s_linear_infinite] ml:right-[-25px] ml:top-[-30px]",children:(0,l.jsx)(C.GR,{})})}),(0,l.jsx)(M(),{id:"d79fdbf58b547f10",children:"@-webkit-keyframes tiltedSpin{0%{-webkit-transform:rotatex(15deg)rotatey(0deg)rotate(15deg);transform:rotatex(15deg)rotatey(0deg)rotate(15deg)}100%{-webkit-transform:rotatex(15deg)rotatey(360deg)rotate(15deg);transform:rotatex(15deg)rotatey(360deg)rotate(15deg)}}@-moz-keyframes tiltedSpin{0%{-moz-transform:rotatex(15deg)rotatey(0deg)rotate(15deg);transform:rotatex(15deg)rotatey(0deg)rotate(15deg)}100%{-moz-transform:rotatex(15deg)rotatey(360deg)rotate(15deg);transform:rotatex(15deg)rotatey(360deg)rotate(15deg)}}@-o-keyframes tiltedSpin{0%{-o-transform:rotatex(15deg)rotatey(0deg)rotate(15deg);transform:rotatex(15deg)rotatey(0deg)rotate(15deg)}100%{-o-transform:rotatex(15deg)rotatey(360deg)rotate(15deg);transform:rotatex(15deg)rotatey(360deg)rotate(15deg)}}@keyframes tiltedSpin{0%{-webkit-transform:rotatex(15deg)rotatey(0deg)rotate(15deg);-moz-transform:rotatex(15deg)rotatey(0deg)rotate(15deg);-o-transform:rotatex(15deg)rotatey(0deg)rotate(15deg);transform:rotatex(15deg)rotatey(0deg)rotate(15deg)}100%{-webkit-transform:rotatex(15deg)rotatey(360deg)rotate(15deg);-moz-transform:rotatex(15deg)rotatey(360deg)rotate(15deg);-o-transform:rotatex(15deg)rotatey(360deg)rotate(15deg);transform:rotatex(15deg)rotatey(360deg)rotate(15deg)}}"}),(0,l.jsx)("div",{className:"jsx-d79fdbf58b547f10 flex gap-s text-body1Medium text-neutral-0",children:(0,l.jsx)("div",{className:"jsx-d79fdbf58b547f10 flex",children:(0,l.jsx)(c.A,{variant:c.h.Primary,theme:"dark","aria-label":"Search EVs",children:"Search EVs"})})})]})};var V=a(26652);let I=e=>{let{variant:t}=e,a="used"===t?{title:"Shop pre-owned EVs",subtitle:"Used vehicles from trusted dealerships.",buttonLabel:"Shop used",buttonHref:"/used-cars",desktopImg:"/images/homepage/ListingCardsDesktop.webp",mobileImg:"/images/homepage/ListingCardsMobile.webp",alt:"Used EVs"}:{title:"Shop new EVs",subtitle:"Search new vehicles for sale",buttonLabel:"Shop new",buttonHref:"/new-cars",desktopImg:"/images/homepage/ShopNewCardsDesktop.webp",mobileImg:"/images/homepage/ShopNewCardsMobile.webp",alt:"New EVs"};return(0,l.jsxs)("div",{className:"relative flex min-h-[455px] w-full overflow-hidden rounded-medium border border-neutral-200 bg-gradient-to-br from-neutral-0 to-[#0edab533]",children:[(0,l.jsxs)("div",{className:"z-10 flex h-full w-full flex-col justify-between p-[32px]",children:[(0,l.jsxs)("div",{className:"flex w-full flex-col gap-s [@media(min-width:450px)_and_(max-width:540px)]:w-[220px] [@media(min-width:750px)_and_(max-width:1200px)]:w-[200px]",children:[(0,l.jsx)("div",{className:"flex text-h2SemiBold text-neutral-900",children:a.title}),(0,l.jsx)("div",{className:"text-body1Regular text-neutral-800",children:a.subtitle})]}),(0,l.jsx)("div",{className:"flex w-fit-content",children:(0,l.jsx)(V.A,{"aria-label":a.buttonLabel,theme:"dark",href:a.buttonHref,children:a.buttonLabel})})]}),(0,l.jsx)("div",{className:"pointer-events-none absolute top-[10px] z-0 hidden m:right-[-220px] m:flex ml:right-[-120px] ml:top-[10px] l:right-[-50px] [@media(min-width:1018px)_and_(max-width:1150px)]:right-[-200px] [@media(min-width:450px)_and_(max-width:510px)]:right-[-280px] [@media(min-width:450px)_and_(max-width:510px)]:scale-75 [@media(min-width:740px)_and_(max-width:910px)]:right-[-230px] [@media(min-width:740px)_and_(max-width:910px)]:scale-75",children:(0,l.jsx)(o(),{src:a.desktopImg,alt:a.alt,width:481,height:436,priority:!0})}),(0,l.jsx)("div",{className:"pointer-events-none absolute right-[-200px] top-[10px] z-0 flex scale-[55%] s:right-[-120px] s:scale-[75%] m:hidden [@media(min-width:450px)_and_(max-width:510px)]:scale-[45%]",children:(0,l.jsx)(o(),{src:a.mobileImg,alt:a.alt,width:481,height:436,priority:!0})})]})},L=()=>(0,l.jsxs)("section",{className:"flex w-full flex-col gap-l py-[64px]",children:[(0,l.jsxs)("div",{className:"flex w-full flex-col gap-l m:flex-row",children:[(0,l.jsx)("div",{className:"flex w-full m:w-1/2",children:(0,l.jsx)(I,{variant:"used"})}),(0,l.jsx)("div",{className:"flex w-full m:w-1/2",children:(0,l.jsx)(I,{variant:"new"})})]}),(0,l.jsx)("div",{className:"flex w-full",children:(0,l.jsx)(_,{})})]});var D=a(71623),R=a(30299);let O=e=>{let{bodyType:t,"aria-label":a,onClick:s,label:r}=e;return(0,l.jsxs)("div",{className:(0,D.A)("flex flex-col",{"cursor-pointer":s}),"aria-label":a,onClick:s,children:[(0,l.jsx)("div",{className:"relative flex",children:(0,l.jsx)(R.M,{bodyType:t})}),r&&(0,l.jsx)("div",{className:"flex w-full justify-center pt-s text-body1Medium text-neutral-800",children:r})]})},T=[{icon:"Sedan",label:"Sedan",value:"Sedan"},{icon:"Suv",label:"SUVs",value:"SUV"},{icon:"Hatchback",label:"Hatchbacks",value:"Hatchback"},{icon:"Minivan",label:"Mini van",value:"Minivan"},{icon:"Wagon",label:"Wagon",value:"Wagon"},{icon:"Truck",label:"Trucks",value:"Truck"}],P=e=>{let{onClick:t}=e;return(0,l.jsxs)("div",{className:"flex flex-col py-3xl m:py-[64px]",children:[(0,l.jsx)("div",{className:"flex justify-center pb-xl m:pb-[55px]",children:(0,l.jsx)("div",{className:"text-h2Regular text-neutral-900",children:"Shop by body type"})}),(0,l.jsx)("div",{className:"flex w-full justify-center",children:(0,l.jsx)("div",{className:"grid w-full grid-cols-2 gap-l m:flex m:w-fit-content m:justify-between m:gap-m",children:T.map(e=>(0,l.jsx)("div",{className:"flex justify-center p-l m:py-0",children:(0,l.jsx)(O,{label:e.label,bodyType:e.icon,"aria-label":"search for ".concat(e.value),onClick:()=>t(e.value)})},"".concat(e.value)))})})]})};var $=a(34875);let F=e=>{let{onClick:t,allMakes:a}=e,[s,r]=g.useState(!1),i=(0,g.useCallback)(()=>
1{if(s){r(!1);let e=document.getElementById("popular-makes-header");e&&setTimeout(()=>{let t=e.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:t-100,behavior:"smooth"})},50)}else r(!0)},[s]),n=x.QI.concat(a.filter(e=>!x.QI.includes(e)&&!x.LD.includes(e))),o=s?n:x.QI;return(0,l.jsxs)("div",{className:"flex flex-col gap-xl pb-3xl m:pb-[64px]",children:[(0,l.jsx)("div",{id:"popular-makes-header",className:"flex w-full justify-center text-h2Regular text-neutral-900",children:"Popular makes"}),(0,l.jsx)("div",{className:"flex w-full justify-center",children:(0,l.jsx)("div",{className:"grid w-full grid-cols-2 justify-center gap-3xl m:max-w-[1038px] m:grid-cols-6",children:o.map((e,a)=>(0,l.jsxs)("div",{onClick:()=>t(e),className:"flex cursor-pointer flex-col justify-center gap-s",children:[(0,l.jsx)($.E,{width:48,height:48,make:e,withOverlay:!0}),(0,l.jsx)("div",{className:"flex justify-center pt-[10px] text-body1Medium text-neutral-800",children:e})]},"popular-makes-".concat(e,"-").concat(a)))})}),(0,l.jsx)("div",{className:"flex w-full justify-center",children:(0,l.jsx)("div",{className:"flex w-fit-content",children:(0,l.jsx)(c.A,{"aria-label":"View all makes",variant:c.h.Secondary,onClick:i,children:s?"View less":"View all makes"})})})]})};var z=a(94056);let B=e=>{let{makes:t}=e,a=(0,z.useRouter)();return(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)(P,{onClick:e=>{a.push("/new-cars/".concat(e))}}),(0,l.jsx)(F,{onClick:e=>{a.push("/new-cars/".concat(e))},allMakes:t})]})};var K=a(25075),H=a(66751),W=a(46036);let Y=()=>{let{data:e}=(0,W.I)({queryKey:["youtubeDataKey"],queryFn:async()=>{let e=await fetch("/api/socials/get_youtube_data");if(!e.ok)throw Error();return await e.json()}});return(0,l.jsx)(H.N,{href:"".concat("https://www.youtube.com/@EVdotcom"),target:"_blank",children:(0,l.jsxs)("div",{className:"flex items-center gap-s",children:[(0,l.jsx)("div",{className:"flex",children:(0,l.jsx)(K.e,{size:40,imageIconSrc:"/images/socials/SocialsLogo.webp"})}),(0,l.jsxs)("div",{className:"flex flex-col",children:[(0,l.jsx)("div",{className:"text-body2Medium text-brandMidnight",children:"@EVcom"}),e&&(0,l.jsxs)("div",{className:"text-microMedium text-neutral-600",children:[function(e){return e>=1e6?"".concat((e/1e6).toFixed(1).replace(/\.0$/,""),"M"):e>=1e3?"".concat((e/1e3).toFixed(1).replace(/\.0$/,""),"K"):e.toString()}(Number(e.subscriberCount))," followers"]})]})]})})},G=["https://www.youtube.com/embed/MXcYGkDdQ90","https://www.youtube.com/embed/5ismagyq0-w","https://www.youtube.com/embed/fIDWSlR2vsI","https://www.youtube.com/embed/saMD0GHn2sY"].map((e,t)=>(0,l.jsx)("div",{className:"aspect-[0.57] w-[255px] overflow-hidden rounded-small",children:(0,l.jsx)("iframe",{width:"100%",height:"100%",src:e,title:"YouTube video player",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})},"youtube-short-".concat(t))),q=()=>{let e=(0,g.useRef)(null),[t,a]=(0,g.useState)(0),[s,r]=(0,g.useState)(4);(0,g.useEffect)(()=>{let t=()=>{var t;r(((null==(t=e.current)?void 0:t.offsetWidth)||0)/267)};return t(),window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[e]);let i=G.length>s;return(0,l.jsxs)("div",{className:"flex flex-col gap-m py-3xl",children:[(0,l.jsxs)("div",{className:"flex justify-between",children:[(0,l.jsx)("div",{className:"flex",children:(0,l.jsx)(Y,{})}),(0,l.jsx)("div",{className:"flex",children:(0,l.jsx)(V.A,{href:"".concat("https://www.youtube.com/@EVdotcom"),size:"small",variant:c.h.Secondary,"aria-label":"Subscribe to EV.com on Youtube",children:"Subscribe"})})]}),(0,l.jsx)("div",{className:"flex",ref:e,children:i?(0,l.jsx)(j.l,{slidesPerView:s,spaceBetween:12,slides:G,updateCurrentIndex:a,selectedIndex:t,navigation:!0,navigationVariant:"between"}):(0,l.jsx)("div",{className:"flex",style:{columnGap:"".concat(12,"px")},children:G})})]})};var U=a(53198),X=a.n(U),Q=a(72981),Z=a.n(Q),J=a(52144),ee=a.n(J),et=a(80991),ea=a.n(et);let el=e=>{let{onBookDemo:t}=e;return(0,l.jsxs)("section",{className:"relative w-full overflow-hidden bg-gradient-to-r from-[#2D1B69] to-[#4A2B8F] pb-[24px] pt-[40px]",children:[(0,l.jsx)("div",{className:"mx-auto w-full px-[16px]",children:(0,l.jsxs)("div",{className:"flex flex-col items-center gap-[24px]",children:[(0,l.jsx)("div",{className:"flex justify-center",children:(0,l.jsx)(o(),{src:"/images/caraibanner/logo.svg",alt:"CarAI Logo",width:180,height:60,className:"h-auto w-40",priority:!0})}),(0,l.jsx)("div",{className:"flex justify-center text-center",children:(0,l.jsx)("h2",{className:ee().className,style:{color:"#FFF",fontSize:"32px",fontWeight:700,lineHeight:"40px"},children:"AI Employee for Car Dealerships"})}),(0,l.jsx)("div",{className:"flex justify-center",children:(0,l.jsx)("button",{onClick:()=>{t?t():window.open("https://carai.com","_blank")},"aria-label":"Book a Demo",className:"cursor-pointer transition-transform hover:scale-105",children:(0,l.jsx)(o(),{src:"/images/caraibanner/bookademo.svg",alt:"Book a Demo",width:300,height:90,className:"h-auto w-[240px]",priority:!0})})}),(0,l.jsxs)("div",{className:"flex w-full items-center justify-between gap-[16px]",children:[(0,l.jsx)("div",{className:"flex flex-shrink-0 items-start",children:(0,l.jsx)("p",{className:ea().className,style:{color:"#F9BAFF",fontSize:"14px",fontWeight:600,lineHeight:"20px",textTransform:"capitalize",whiteSpace:"normal",wordWrap:"break-word",maxWidth:"140px"},children:"Results in 30 days - Or We'll Give You Your Money Back"})}),(0,l.jsxs)("div",{className:"relative flex h-[160px] flex-1 items-center justify-end overflow-visible",children:[(0,l.jsx)("div",{className:"absolute right-[-15px] top-[20px] z-10 w-[100%]",children:(0,l.jsx)(o(),{src:"/images/caraibanner/laptop.png",alt:"CarAI Dashboard on Laptop",width:800,height:500,className:"h-auto w-full drop-shadow-2xl",priority:!0})}),(0,l.jsx)("div",{className:"absolute left-[0px] top-[10%] z-20 w-[30%]",children:(0,l.jsx)(o(),{src:"/images/caraibanner/phone.png",alt:"CarAI App on Phone",width:300,height:600,className:"h-auto w-full drop-shadow-2xl",priority:!0})})]})]})]})}),(0,l.jsx)("div",{className:"absolute bottom-0 left-0 right-0 border-b-2 border-dotted border-white opacity-30"})]})},es=e=>{let{onBookDemo:t}=e,[a,s]=g.useState(!1);return(g.useEffect(()=>{let e=()=>{s(window.innerWidth<768)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),a)?(0,l.jsx)(el,{onBookDemo:t}):(0,l.jsxs)("section",{className:"relative w-full overflow-hidden bg-gradient-to-r from-[#2D1B69] to-[#4A2B8F] p-[16px] md:py-[24px]",children:[(0,l.jsx)("div",{className:"container mx-auto p-[16px]",children:(0,l.jsxs)("div",{className:"grid grid-cols-1 items-center gap-4 md:grid-cols-12",children:[(0,l.jsxs)("div",{className:"flex flex-col justify-center md:col-span-5",children:[(0,l.jsxs)("div",{className:"mb-[12px]",children:[(0,l.jsx)("div",{className:"mb-[12px]",children:(0,l.jsx)(o(),{src:"/images/caraibanner/logo.svg",alt:"CarAI Logo",width:180,height:60,className:"h-auto w-[144px] md:w-[176px]",priority:!0})}),(0,l.jsx)("h2",{className:"".concat(X().className," mb-[8px] mt-[24px]"),style:{color:"#FFF",fontSize:"50px",fontWeight:700,lineHeight:"62px",maxWidth:"450px"},children:"AI Employee for Car Dealerships"})]}),(0,l.jsx)("p",{className:Z().className,style:{color:"#F9BAFF",fontSize:"20px",fontWeight:600,lineHeight:"30px",textTransform:"capitalize",whiteSpace:"normal",wordWrap:"break-word"},children:"Results in 30 days - Or We'll Give You Your Money Back"})]}),(0,l.jsx)("div",{className:"flex items-center justify-center md:col-span-2",children:(0,l.jsx)("button",{onClick:()=>{t?t():window.open("https://carai.com","_blank")},"aria-label":"Book a Demo",className:"cursor-pointer transition-transform hover:scale-105",children:(0,l.jsx)(o(),{src:"/images/caraibanner/bookademo.svg",alt:"Book a Demo",width:500,height:150,className:"h-auto w-[300px] md:w-[400px]",priority:!0})})}),(0,l.jsx)("div",{className:"relative flex items-center justify-end md:col-span-5",children:(0,l.jsxs)("div",{className:"relative h-[220px] w-full overflow-visible md:h-[280px]",children:[(0,l.jsx)("div",{className:"absolute right-0 top-0 z-10 w-[120%] md:w-[95%]",children:(0,l.jsx)(o(),{src:"/images/caraibanner/laptop.png",alt:"CarAI Dashboard on Laptop",width:800,height:500,className:"h-auto w-full drop-shadow-2xl",priority:!0})}),(0,l.jsx)("div",{className:"absolute left-[0px] top-[8%] z-20 w-[28%] md:left-[0px] md:w-[25%]",children:(0,l.jsx)(o(),{src:"/images/caraibanner/phone.png",alt:"CarAI App on Phone",width:300,height:600,className:"h-auto w-full drop-shadow-2xl",priority:!0})})]})})]})}),(0,l.jsx)("div",{className:"absolute bottom-0 left-0 right-0 border-b-2 border-dotted border-white opacity-30"})]})};var er=a(47594),ei=a(3237);let en=e=>{let{condition:t="new"}=e,a="new"===t?"new-cars":"used-cars";return(0,l.jsx)(s.K,{children:(0,l.jsx)("div",{className:"mx-auto flex max-w-[980px] flex-col gap-xl py-[80px]",children:(0,l.jsx)("div",{className:"border-b border-neutral-200 pb-l",children:(0,l.jsx)(ei.A,{buttonClassName:"text-neutral-900 text-h4Regular",icon:{id:"chevron"},title:"Search popular EVs by model",children:(0,l.jsx)("div",{className:"columns-3 space-y-m py-s",children:x.d7.map(e=>{let t="/".concat(a,"/").concat(e.make,"/").concat(e.model);return(0,l.jsx)("div",{className:"text-body2Medium text-text-link-action",children:(0,l.jsx)("a",{href:(0,er.Yv)(t),children:e.displayName})},e.displayName)})})})})})})};var eo=a(50455),ec=a(87113),ed=a(24686);let em=()=>{let{ref:e,inView:t}=(0,ec.Wx)(),{isML:a}=(0,r.A)(),{data:i,isFetching:n,isError:o,isFetched:d}=function(e){let{limit:t=1,exclude:a,...l}=e,s=(0,g.useCallback)(async()=>{let e=new URLSearchParams({page:"1",per_page:t.toString(),...a?{exclude:a.join(",")}:{}}),l=await fetch("/api/articles?".concat(e));if(!l.ok)throw Error("There was a problem fetching the articles.");let{blogPosts:s}=await l.json();return s},[t,a]);return(0,W.I)({queryFn:s,refetchOnWindowFocus:!1,throwOnError:!1,retry:!1,...l})}({queryKey:["recentArticles"],limit:3,enabled:t});return(0,l.jsx)("div",{className:"bg-neutral-200 py-[80px] lg:py-[76px]",children:(0,l.jsx)(s.K,{children:(0,l.jsxs)("div",{className:"flex flex-col gap-[12px]",ref:d?void 0:e,children:[!
1o&&(0,l.jsxs)("div",{className:"flex justify-between",children:[(0,l.jsx)("h4",{className:"text-h4SemiBold text-brandMidnight",children:"Recent news"}),(0,l.jsx)("div",{className:"hidden ml:block",children:(0,l.jsx)(ed.A,{href:"/news","aria-label":"Read more articles",children:"Read more"})})]}),o?(0,l.jsx)("p",{className:"text-body1Light",children:"There was a problem showing articles. Please refresh and try again."}):n?(0,l.jsx)("div",{className:"flex flex-col gap-m bg-white p-l ml:flex-row",children:(0,l.jsx)("div",{className:"grid grid-cols-1 gap-l md:grid-cols-2 ml:grid-cols-3",children:[void 0,void 0,void 0].map((e,t)=>(0,l.jsx)(eo.O,{},t))})}):(0,l.jsx)("div",{className:"grid grid-cols-1 gap-l md:grid-cols-2 ml:grid-cols-3",children:i&&i.map(e=>(0,l.jsx)("div",{className:"flex flex-1",children:(0,l.jsx)(eo.d,{article:e,size:a?"medium":"small"})},e.id))}),d&&!!i&&(0,l.jsx)("div",{className:"block ml:hidden",children:(0,l.jsx)(V.A,{href:"/news",variant:c.h.Secondary,"aria-label":"Read more articles",children:"Read more"})})]})})})},eu=e=>{let{makes:t,models:a}=e;return(0,l.jsxs)("div",{className:"relative w-full",children:[(0,l.jsx)("section",{className:"bg-neutral-100 md:py-[36px]",children:(0,l.jsx)(s.K,{children:(0,l.jsx)(b,{makes:t,models:a})})}),(0,l.jsx)(s.K,{children:(0,l.jsx)(L,{})}),(0,l.jsx)(s.K,{children:(0,l.jsx)(B,{makes:t})}),(0,l.jsx)("div",{className:"pt-xl",children:(0,l.jsx)(A,{})}),(0,l.jsx)(em,{}),(0,l.jsx)(es,{}),(0,l.jsx)(s.K,{children:(0,l.jsx)(q,{})}),(0,l.jsx)(en,{condition:"new"})]})};var ex=a(73483),eh=a.n(ex),ep=!0;function ef(e){return(0,l.jsxs)("main",{children:[(0,l.jsx)(eh(),{children:(0,l.jsx)("script",{type:"application/ld+json",children:JSON.stringify({"@context":"https://schema.org","@type":"Organization",name:"EV.com",url:"https://ev.com/",logo:"https://ev.com/images/logo_us.svg",description:"Discover the perfect blend of innovation and sustainability with new & used electric cars for sale on EV.com. Drive into the future today",contactPoint:{"@type":"ContactPoint",telephone:"+1 647-321-1111",email:"[email protected]"},address:{"@type":"PostalAddress",streetAddress:"1317, 447 Broadway",addressLocality:"New York",addressRegion:"New York",postalCode:"10013",addressCountry:"US"},sameAs:["https://www.linkedin.com/company/ev-com/","https://twitter.com/EVcom","https://www.facebook.com/ev.com.official","https://www.youtube.com/@evdotcom","https://www.tiktok.com/@ev.com","https://www.instagram.com/evcom/"],foundingDate:"1994-07-26",founders:[{"@type":"Person",name:"Joel Li",url:"https://www.linkedin.com/in/joelli-ev-com/"}]})})}),(0,l.jsx)(eu,{...e})]})}},72981:e=>{e.exports={style:{fontFamily:"'IBM Plex Sans', 'IBM Plex Sans Fallback'",fontWeight:600,fontStyle:"normal"},className:"__className_5e6821"}},74229:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return a(72764)}])},80478:(e,t,a)=>{"use strict";a.d(t,{H:()=>s});var l=a(88017);let s=e=>{let{children:t,left:a=!0,right:s=!0,atBreakpoints:r={xs:!0,s:!0,m:!0,l:!0,xl:!0},variant:i="default"}=e,{xs:n=!0,s:o=!0,m:c=!0,l:d=!0,xl:m=!0}=r;return"template"===i?(0,l.jsx)("div",{className:"w-full ".concat(n&&a?"pl-[20px]":""," ").concat(n&&s?"pr-[20px]":""," ").concat(c&&a?"m:pl-[40px]":""," ").concat(c&&s?"m:pr-[40px]":""," ").concat(d&&a?"l:pl-[60px]":""," ").concat(d&&s?"l:pr-[60px]":""," ").concat(m&&a?"xl:pl-[100px]":""," ").concat(m&&s?"xl:pr-[100px]":""," "),children:t}):(0,l.jsx)("div",{className:"w-full ".concat(n&&a?"pl-[16px]":""," ").concat(n&&s?"pr-[16px]":""," ").concat(o&&a?"s:pl-[24px]":""," ").concat(o&&s?"s:pr-[24px]":""," ").concat(c&&a?"ml:pl-[40px]":""," ").concat(c&&s?"ml:pr-[40px]":""," ").concat(d&&a?"l:pl-[calc((100vw-1360px)/2)]":""," ").concat(d&&s?"l:pr-[calc((100vw-1360px)/2)]":""," "),children:t})}},80962:(e,t,a)=>{"use strict";a.d(t,{bL:()=>j,zi:()=>N});var l=a(44109),s=a(69730),r=a(60947),i=a(42789),n=a(84952),o=a(89932),c=a(51052),d=a(740),m=a(88017),u="Switch",[x,h]=(0,i.A)(u),[p,f]=x(u),g=l.forwardRef((e,t)=>{let{__scopeSwitch:a,name:i,checked:o,defaultChecked:c,required:u,disabled:x,value:h="on",onCheckedChange:f,form:g,...v}=e,[b,j]=l.useState(null),N=(0,r.s)(t,e=>j(e)),E=l.useRef(!1),k=!b||g||!!b.closest("form"),[A=!1,S]=(0,n.i)({prop:o,defaultProp:c,onChange:f});return(0,m.jsxs)(p,{scope:a,checked:A,disabled:x,children:[(0,m.jsx)(d.sG.button,{type:"button",role:"switch","aria-checked":A,"aria-required":u,"data-state":y(A),"data-disabled":x?"":void 0,disabled:x,value:h,...v,ref:N,onClick:(0,s.m)(e.onClick,e=>{S(e=>!e),k&&(E.current=e.isPropagationStopped(),E.current||e.stopPropagation())})}),k&&(0,m.jsx)(w,{control:b,bubbles:!E.current,name:i,value:h,checked:A,required:u,disabled:x,form:g,style:{transform:"translateX(-100%)"}})]})});g.displayName=u;var v="SwitchThumb",b=l.forwardRef((e,t)=>
1{let{__scopeSwitch:a,...l}=e,s=f(v,a);return(0,m.jsx)(d.sG.span,{"data-state":y(s.checked),"data-disabled":s.disabled?"":void 0,...l,ref:t})});b.displayName=v;var w=e=>{let{control:t,checked:a,bubbles:s=!0,...r}=e,i=l.useRef(null),n=(0,o.Z)(a),d=(0,c.X)(t);return l.useEffect(()=>{let e=i.current,t=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"checked").set;if(n!==a&&t){let l=new Event("click",{bubbles:s});t.call(e,a),e.dispatchEvent(l)}},[n,a,s]),(0,m.jsx)("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a,...r,tabIndex:-1,ref:i,style:{...e.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function y(e){return e?"checked":"unchecked"}var j=g,N=b},80991:e=>{e.exports={style:{fontFamily:"'IBM Plex Sans', 'IBM Plex Sans Fallback'",fontWeight:600,fontStyle:"normal"},className:"__className_5e6821"}},81171:(e,t,a)=>{"use strict";a.d(t,{B:()=>p});var l=a(88017),s=a(62526),r=a(63194),i=a(3237),n=a(24839),o=a(67642),c=a(43807),d=a(12020),m=a(71623),u=a(44109);let x=e=>{let{incentivesList:t,openIncentiveModal:a}=e;return(0,l.jsx)("div",{className:"flex flex-col gap-s",children:t.map((e,t)=>{var s;let r=(0,c.hh)(e)?(null==(s=e.evaluation)?void 0:s.amount_in_purchase)||
10:e.max_amount||0;return 0===r?null:(0,l.jsxs)("div",{"aria-label":a?"Open Incentive Modal":"",className:(0,m.A)("flex justify-between",{"cursor-pointer hover:text-blue-medium":a}),onClick:a,children:[(0,l.jsx)("div",{className:"text-body2Light text-neutral-800",children:e.name}),(0,l.jsxs)("div",{className:(0,m.A)("whitespace-nowrap text-body2Light",{"text-neutral-600 line-through":!e.selected,"text-neutral-800":e.selected}),children:["-",(0,d.M)(r)]})]},"".concat(e.id,"-").concat(t))})})},h=e=>{let{incentivesData:t,selectedIncentives:a,gasSavings:r,incentivesTotal:i=0,openIncentiveModal:n}=e,{settings:{displayFuelSavings:c},handleSetDisplayFuelSavings:h}=(0,o.u)(),p=r?Number(r.timePeriod):1,f=Number(null==r?void 0:r.fuelSavingsEstimate)/p||0,{rebates:g,incentives:v}=(0,u.useMemo)(()=>{let e=[(null==t?void 0:t.state)||[],(null==t?void 0:t.federal)||[],(null==t?void 0:t.local)||[]].flat();return(null==e?void 0:e.reduce((e,t)=>(null===t.max_amount||("Rebate"===t.type?e.rebates.push({...t,selected:!!(null==a?void 0:a.some(e=>e.id===t.id))}):e.incentives.push({...t,selected:!!(null==a?void 0:a.some(e=>e.id===t.id))})),e),{rebates:[],incentives:[]}))||{rebates:[],incentives:[]}},[t,a]),b=i+(c?f*p:0);return(0,l.jsxs)("div",{className:"flex flex-col gap-s bg-blue-light px-xl py-l ml:rounded-xsmall ml:p-s",children:[v.length>0&&(0,l.jsx)("div",{className:"flex flex-col",children:(0,l.jsx)(x,{openIncentiveModal:n,incentivesList:v})}),v.length>0&&g.length>0&&(0,l.jsx)("div",{className:"flex w-full border-b border-neutral-600"}),g.length>0&&(0,l.jsx)("div",{className:"flex flex-col",children:(0,l.jsx)(x,{openIncentiveModal:n,incentivesList:g})}),(v.length>0||g.length>0)&&(0,l.jsx)("div",{className:"flex w-full border-b border-neutral-600"}),(0,l.jsxs)("div",{className:"flex gap-s",children:[(0,l.jsx)(s.S,{"aria-label":"".concat(c?"Hide":"Show"," gas saving"),checked:c,onChange:h}),(0,l.jsxs)("div",{className:"flex w-full justify-between",children:[(0,l.jsxs)("div",{className:"cursor-pointer text-body2Light text-neutral-800",onClick:()=>h(!c),children:["Gas savings over ",p," year",p>1?"s":""," "]}),(0,l.jsxs)("div",{className:(0,m.A)("whitespace-nowrap text-body2Light text-neutral-800",{"!text-neutral-600 line-through":!c}),children:["-",(0,d.M)(f*p)]})]})]}),(0,l.jsx)("div",{className:"flex w-full border border-t-blue-dark"}),(0,l.jsxs)("div",{className:"flex justify-between text-body2Medium text-blue-dark",children:[(0,l.jsx)("div",{className:"",children:"Total Savings"}),(0,l.jsxs)("div",{children:["-$",Math.round(b).toLocaleString()]})]})]})},p=e=>{let{incentivesData:t,selectedIncentives:a,gasSavings:s,incentivesTotal:c=0,openIncentiveModal:d,variant:u="default"}=e,{settings:{evSavings:x}}=(0,o.u)();return(0,l.jsx)(i.A,{title:(0,l.jsxs)("div",{className:"flex w-full flex-col gap-l",children:[(0,l.jsxs)("div",{className:"flex w-full justify-between",children:[(0,l.jsx)("div",{className:(0,m.A)("text-h4Regular m:text-body1Medium",{"!text-body1Light":"calculator"===u}),children:"EV Savings"}),(0,l.jsx)(n.n,{})]}),(0,l.jsx)(r.D,{expanded:!x,duration:0,children:(0,l.jsx)("div",{className:"px-xl text-body2Light text-neutral-800 transition-opacity duration-250",style:{opacity:+!x},children:"Switch on to include incentives, rebates, and estimated gas savings."})})]}),icon:null,expanded:x,expandOnClick:!1,animationDelay:{onExpand:0,onCollapse:250},children:(0,l.jsx)("div",{className:(0,m.A)("flex flex-col gap-l transition-opacity duration-250",{"opacity-40":!x}),children:(0,l.jsx)(h,{incentivesData:t,selectedIncentives:a,incentivesTotal:c,openIncentiveModal:d,gasSavings:s})})})}},82565:(e,t,a)=>{"use strict";a.d(t,{A:()=>l.A,F:()=>l.F});var l=a(86281)},87113:(e,t,a)=>{"use strict";a.d(t,{Wx:()=>d});var l=a(44109),s=Object.defineProperty,r=(e,t,a)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,i=new Map,n=new WeakMap,o=0,c=void 0;function d({threshold:e,delay:t,trackVisibility:a,rootMargin:s,root:r,triggerOnce:m,skip:u,initialInView:x,fallbackInView:h,onChange:p}={}){var f;let[g,v]=l.useState(null),b=l.useRef(p),[w,y]=l.useState({inView:!!x,entry:void 0});b.current=p,l.useEffect(()=>{let l;if(!u&&g)return l=function(e,t,a={},l=c){if(void 0===window.IntersectionObserver&&void 0!==l){let s=e.getBoundingClientRect();return t(l,{isIntersecting:l,target:e,intersectionRatio:"number"==typeof a.threshold?a.threshold:0,time:0,boundingClientRect:s,intersectionRect:s,rootBounds:s}
1),()=>{}}let{id:s,observer:r,elements:d}=function(e){let t=Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{var a;return`${t}_${"root"===t?!(a=e.root)?"0":(n.has(a)||(o+=1,n.set(a,o.toString())),n.get(a)):e[t]}`}).toString(),a=i.get(t);if(!a){let l,s=new Map,r=new IntersectionObserver(t=>{t.forEach(t=>{var a;let r=t.isIntersecting&&l.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=r),null==(a=s.get(t.target))||a.forEach(e=>{e(r,t)})})},e);l=r.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),a={id:t,observer:r,elements:s},i.set(t,a)}return a}(a),m=d.get(e)||[];return d.has(e)||d.set(e,m),m.push(t),r.observe(e),function(){m.splice(m.indexOf(t),1),0===m.length&&(d.delete(e),r.unobserve(e)),0===d.size&&(r.disconnect(),i.delete(s))}}(g,(e,t)=>{y({inView:e,entry:t}),b.current&&b.current(e,t),t.isIntersecting&&m&&l&&(l(),l=void 0)},{root:r,rootMargin:s,threshold:e,trackVisibility:a,delay:t},h),()=>{l&&l()}},[Array.isArray(e)?e.toString():e,g,r,s,m,u,a,h,t]);let j=null==(f=w.entry)?void 0:f.target,N=l.useRef(void 0);g||!j||m||u||N.current===j||(N.current=j,y({inView:!!x,entry:void 0}));let E=[v,w.inView,w.entry];return E.ref=E[0],E.inView=E[1],E.entry=E[2],E}l.Component},88876:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var l=a(88017),s=a(80962),r=a(71623);a(44109);let i=e=>{let{size:t="default",checked:a,onCheckedChange:i,...n}=e;return(0,l.jsx)("form",{"aria-label":n["aria-label"],children:(0,l.jsxs)(s.bL,{className:(0,r.A)("relative flex cursor-pointer items-center rounded-full border-[.7px]",{"h-[32px] w-[60px]":"default"===t,"h-[26px] w-[54px]":"small"===t,"border-neutral-300 bg-neutral-200":!a,"border-brandMidnight bg-blue-light":a}),checked:a,onCheckedChange:i,children:[(0,l.jsx)("span",{className:(0,r.A)("left-[15%] text-captionLight",{hidden:!a,"absolute text-brandMidnight":a}),children:"ON"}),(0,l.jsx)("span",{className:(0,r.A)("right-[12%] text-captionLight",{"absolute text-gray-600":!a,hidden:a}),children:"OFF"}),(0,l.jsx)(s.zi,{className:(0,r.A)("inline-block transform rounded-full border transition-transform duration-200",{"h-[24px] w-[24px] translate-x-[4px] border-neutral-300 bg-neutral-0":!a&&"default"===t,"h-[18px] w-[18px] translate-x-[4px] border-neutral-300 bg-neutral-0":!a&&"small"===t,"h-[24px] w-[24px] translate-x-[30px] border-brandMidnight bg-brandMidnight":a&&"default"===t,"h-[18px] w-[18px] translate-x-[30px] border-brandMidnight bg-brandMidnight":a&&"small"===t})})]})})}},93442:(e,t,a)=>{"use strict";a.d(t,{A:()=>u});var l=a(88017),s=a(1011),r=a(11438),i=a(14278),n=a(94648),o=a(71623),c=a(44109),d=a(75880),m=a(82565);let u=e=>{let{className:t="",inputClassName:a="",dropDownMenuClassName:u="",label:x,disabled:h=!1,variant:p=r.O.MultiSelect,options:f,placeholder:g="",value:v=[],onChange:b=()=>{},showCount:w=!0,flexDirection:y="col",clearMenu:j,applyMenu:N,autoCompleteInput:E=!1,setAutoCompleteInput:k=()=>{},invalid:A=!1,step:S=1,float:M=0,onPaste:C,required:_=!1,...V}=e,{isMobile:I}=(0,d.A)(),[L,D]=c.useState(!1),R=c.useRef(null),O=c.useRef(null),T=c.useRef(null),[P,$]=c.useState(f),[F,z]=c.useState("");(0,c.useEffect)(()=>(I&&L&&(document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%",document.body.style.height="100%"),()=>{document.body.style.overflow="",document.documentElement.style.overflow="",document.body.style.position="",document.body.style.width="",document.body.style.height=""}),[I,L]);let B=(0,c.useMemo)(()=>(0,m.F)(P)?0===P.flatMap(e=>e.menuItems).length:0===P.length,[P]);(0,c.useEffect)(()=>{$(f)},[f]);let K=(0,c.useCallback)(()=>{N&&N(),z(""),D(!1)},[N]);c.useEffect(()=>{let e=e=>{var t;e.target&&R.current&&(T.current===e.target||(null==(t=T.current)?void 0:t.contains(e.target))?D(!L):R.current.contains(e.target)||(D(!1),z(""),$(f)))},t=e=>{"Enter"===e.key&&L&&(e.preventDefault(),K())};return document.addEventListener("keydown",t),document.addEventListener("click",e),()=>{document.removeEventListener("click",e),document.removeEventListener("keydown",t)}},[L,f,K,P]),(0,c.useEffect)(()=>
1{if(L&&E){var e,t;null==(t=O.current)||null==(e=t.querySelector("input"))||e.focus()}},[L,E,v]),(0,c.useEffect)(()=>{L||k(!0)},[L,k]);let H=(0,c.useCallback)(e=>{if(z(e),(0,m.F)(f)){let t=f.map(t=>({category:t.category,index:t.index,menuItems:t.menuItems.filter(t=>t.value.toLowerCase().startsWith(e.toLowerCase()))}));$(t.length>0?t:f)}else{let t=f.filter(t=>t.value.toLowerCase()===e.toLowerCase());$(t.length>0?t:f)}},[f,$]),W=(0,c.useCallback)(()=>{D(!1),z(""),$(f)},[f]);return(0,l.jsxs)("section",{className:"relative block ".concat(t),ref:R,children:[(0,l.jsxs)("div",{className:"flex flex-".concat(y),children:[x&&(0,l.jsx)("label",{className:"text-body2Regular text-neutral-800",children:(0,l.jsxs)("span",{className:"mb-s block",children:[x,!!_&&(0,l.jsx)("span",{className:"text-red-medium",children:" *"})]})}),(!E||!L)&&(0,l.jsxs)("button",{ref:T,className:"input ".concat(i.FD," justify-between text-left ").concat(L?"":"focus:border-neutral-400"," disabled:cursor-not-allowed disabled:opacity-50 peer-invalid:border-red-medium peer-invalid:bg-red-100 ").concat(a," "),disabled:h,children:[(0,l.jsx)("span",{className:"my-0 w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap py-0",children:v.map(e=>{var t;return null==(t=((0,m.F)(f)?f.map(e=>e.menuItems).flat():f).find(t=>t.value===e))?void 0:t.text}).join(", ")||g}),(0,l.jsx)(n.A,{className:(0,o.A)("size-l stroke-2 text-neutral-600 transition-transform",L&&"rotate-180")})]}),E&&L&&(0,l.jsx)("section",{className:"fixed inset-0 top-[56px] z-[50] bg-neutral-0 p-xl m:static m:z-auto m:bg-transparent m:p-0",ref:O,children:(0,l.jsx)(s.A,{className:"".concat(i.FD," ").concat(a," ").concat(B||A?"!border-red-medium":""," w-full m:h-full"),placeholder:g,onChange:e=>H(e),onPaste:C,float:M,type:s.g.Text,step:S,onClick:()=>{},value:F,...V})})]}),(0,l.jsx)(m.A,{className:"".concat(L?"":"hidden"," fixed inset-0 z-[50] m:w-full m:translate-y-[4px] ").concat(u),variant:p,value:v,options:P,noOptions:B,showCount:w,onChange:e=>{E&&k(!1),b(e)},clearAll:j,apply:N?()=>{H(""),K()}:void 0,title:I?x:void 0,onClose:W})]})}}},e=>{var t=t=>e(e.s=t);e.O(0,[4890,8620,470,5863,636,6593,8792],()=>t(74229)),_N_E=e.O()}]);
2//# sourceMappingURL=index-36108d4cb276191c.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.