1import{j as e}from"./motion-DVJTqFDH.js";import{r as i}from"./vendor-OXzYy3Vh.js";const Q={Acura:["ILX","Integra","MDX","NSX","RDX","RLX","TLX","TSX","ZDX"],"Alfa Romeo":["147","156","159","4C","8C","Giulia (952)","Giulietta (940)","GT","MiTo","Spider","Stelvio (949)","Tonale","Brera"],"Aston Martin":["DB9","DB11","DB12","DBS","DBX","Rapide","Vantage","Vanquish","Valhalla","Valkyrie"],Audi:["A1 (8X)","A1 (GB)","A1 Sportback (8X)","A2","A3 (8L)","A3 (8P)","A3 (8V)","A3 (8Y)","A3 Cabriolet","A3 Sportback","A3 Limousine","A4 (B5)","A4 (B6/B7)","A4 (B8)","A4 (B9)","A4 allroad","A4 Avant","A4 Cabriolet","A5 (8T)","A5 (F5)","A5 Cabriolet","A5 Coupé","A5 Sportback","A6 (C4)","A6 (C5)","A6 (C6)","A6 (C7)","A6 (C8)","A6 allroad","A6 Avant","A6 Cabriolet","A7 (4G)","A7 (4K)","A7 Sportback","A8 (D2)","A8 (D3)","A8 (D4)","A8 (D5)","A8 L","Q2","Q2L","Q3 (8U)","Q3 (F3)","Q3 Sportback","Q4 e-tron","Q4 Sportback e-tron","Q5 (8R)","Q5 (FY)","Q5 Sportback","Q6","Q7 (4L)","Q7 (4M)","Q7 e-tron","Q8","Q8 e-tron","Q8 Sportback e-tron","R8 (42)","R8 (4S)","R8 Spyder","RS3","RS4","RS5","RS6","RS7","RS Q3","RS Q8","S3","S4","S5","S6","S7","S8","SQ5","SQ7","SQ8","TT (8J)","TT (8S)","TT RS","TT S","e-tron","e-tron S","e-tron GT","e-tron Sportback"],Bentley:["Arnage","Azure","Bentayga","Brooklands","Continental GT","Flying Spur","Mulsanne"],BMW:["1 Series (E81/E82/E87/E88)","1 Series (F20/F21)","1 Series (F40)","1 Series (F52)","2 Series (F22/F23)","2 Series Active Tourer (F45/F46)","2 Series Gran Coupe (F44)","2 Series (G42)","2 Series Gran Tourer (F46)","3 Series (E46)","3 Series (E90/E91/E92/E93)","3 Series (F30/F31/F35)","3 Series GT (F34)","3 Series (G20/G21)","3 Series Touring (G21)","4 Series (F32/F33)","4 Series Gran Coupe (F36)","4 Series (G22/G23)","4 Series Gran Coupe (G26)","4 Series Convertible (G23)","5 Series (E39)","5 Series (E60/E61)","5 Series (F10/F11)","5 Series GT (F07)","5 Series (G30/G31)","5 Series (G60)","5 Series Touring (G31)","6 Series (E63/E64)","6 Series (F12/F13)","6 Series Gran Coupe (F06)","6 Series GT (G32)","6 Series Gran Turismo (G32)","7 Series (E65/E66)","7 Series (F01/F02)","7 Series (G11/G12)","7 Series (G70)","7 Series Protection (G70)","8 Series (G14/G15/G16)","8 Series Gran Coupe (G16)","8 Series Convertible (G15)","M2","M3","M4","M5","M6","M8","X2 M35i","X3 M","X4 M","X5 M","X6 M","X1 (E84)","X1 (F48)","X1 (U11)","X2 (F39)","X2 (U10)","X3 (E83)","X3 (F25)","X3 (G01)","X3 M (G01)","X4 (F26)","X4 (G02)","X4 M (G02)","X5 (E53)","X5 (E70)","X5 (F15)","X5 (G05)","X5 M (G05)","X6 (E71)","X6 (F16)","X6 (G06)","X6 M (G06)","X7 (G07)","XM (G09)","Z3","Z4 (E85/E86)","Z4 (E89)","Z4 (G29)","Z4 M40i","i3","i4","i7","i8","iX","iX1","iX3","iX xDrive50"],Buick:["Enclave","Encore","Encore GX","Envision","Envista","LaCrosse","Regal","Verano"],Cadillac:["ATS","CT4","CT5","CT6","CTS","DTS","Escalade","ELR","Lyriq","SRX","STS","XT4","XT5","XT6","XTS"],Chevrolet:["Avalanche","Aveo","Blazer","Bolt EV","Bolt EUV","Camaro (Gen 5)","Camaro (Gen 6)","Captiva","Cobalt","Colorado","Corvette (C6)","Corvette (C7)","Corvette (C8)","Cruze","Equinox","Express","HHR","Impala","Malibu","Monte Carlo","Orlando","Silverado 1500","Silverado 2500/3500","Sonic","Spark","Suburban","Tahoe","Trailblazer","Traverse","Trax","Volt"],Chrysler:["200","300","300C","Aspen","Pacifica","PT Cruiser","Sebring","Town & Country","Voyager"],Citroën:["Berlingo","C1","C2","C3","C3 Aircross","C3 Picasso","C4","C4 Cactus","C4 Picasso","C4 SpaceTourer","C4 X","C5","C5 Aircross","C5 X","C6","C8","DS3","DS4","DS5","Jumper","Jumpy","Nemo","Oltcit","Xsara Picasso"],Cupra:["Ateca","Born","Formentor","Leon","Tavascan"],Dacia:["1100","1200","1210","1300","1301","1302","1304","1305","1307","1308","1309","1310","1410","1420","2000","Dokker","Dokker Express","Dokker Stepway","Dokker Van","Duster I","Duster II","Duster III","Duster Laureate","Duster Prestige","Duster Black Touch","Jogger","Jogger Extreme","Jogger Expression","Jogger Essential","Lodgy","Lodgy Stepway","Logan I","Logan II","Logan III","Logan MCV I","Logan MCV II","Logan Pick-Up","Nova","Pick-Up","Sandero I","Sandero II","Sandero III","Sandero Stepway","Solenza","Spring","Spring Comfort","Spring Expression","Spring Extreme","SuperNova"],Dodge:["Avenger","Caliber","Challenger","Charger","Dakota","Dart","Durango","Grand Caravan","Hornet","Journey","Magnum","Nitro","Ram
11500 (Pre-2010)","Viper"],Ferrari:["360 Modena","430 Scuderia","458 Italia","488 GTB","599 GTB","812 Superfast","California","F12berlinetta","F430","F8 Tributo","GTC4Lusso","Portofino","Roma","SF90 Stradale","296 GTB","Purosangue"],Fiat:["124 Spider","500","500L","500X","500e","Bravo","Doblo","Ducato","Fiorino","Freemont","Fullback","Grande Punto","Panda","Punto","Punto Evo","Qubo","Talento","Tipo"],Ford:["B-MAX","Bronco","Bronco Sport","C-MAX","EcoSport","Edge","Escape","Expedition","Explorer","F-150","F-250 Super Duty","F-350 Super Duty","Fiesta (Mk6)","Fiesta (Mk7)","Flex","Focus (Mk2)","Focus (Mk3)","Focus (Mk4)","Fusion (USA)","Galaxy","Ka+","Kuga (Mk1)","Kuga (Mk2)","Kuga (Mk3)","Maverick","Mondeo (Mk4)","Mondeo (Mk5)","Mustang (S197)","Mustang (S550)","Mustang (S650)","Mustang Mach-E","Puma","Ranger","S-MAX","Taurus","Tourneo Connect","Tourneo Custom","Transit","Transit Connect","Transit Custom"],Genesis:["G70","G80","G90","GV60","GV70","GV80"],GMC:["Acadia","Canyon","Envoy","Hummer EV","Savana","Sierra 1500","Sierra 2500/3500","Terrain","Yukon","Yukon XL"],Honda:["Accord","Accord Hybrid","Airwave","Avancier","Breeze","Capo","City","City Turbo II","Civic","Civic Coupe","Civic Hatchback","Civic Hybrid","Civic Si","Civic Type R","Clarity","Concerto","CR-V","CR-V Hybrid","CR-Z","Crossroad","Crosstour","Domani","Element","Elysion","Fit / Jazz","Fit Hybrid","FR-V","Freed","Grace","HR-V","Insight","Inspire","Integra","Jade","Jazz","Legend","Life","Logo","Mobilio","Mobilio Spike","N-BOX","N-One","N-WGN","NSX","Odyssey","Orthia","Partner","Passport","Pilot","Prelude","Ridgeline","S-MX","S2000","S660","Saber","Shuttle","Stepwgn","Stream","Torneo","Vamos","Vezel","WR-V","XR-V","Z","ZR-V","e:Ny1"],Hyundai:["Accent","Azera","Bayon","Elantra","Equus","Genesis","Genesis Coupe","Ioniq","Ioniq 5","Ioniq 6","Kona","Palisade","Santa Cruz","Santa Fe","Sonata","Staria","Tucson","Veloster","Venue","Veracruz","i10","i20","i30","i40","ix20","ix35"],Infiniti:["EX","FX","G35","G37","JX","M","Q40","Q50","Q60","Q70","QX30","QX4","QX50","QX55","QX56","QX60","QX70","QX80"],Jaguar:["E-PACE","F-PACE","F-TYPE","I-PACE","S-Type","X-Type","XE","XF","XJ (X350)","XJ (X351)","XK"],Jeep:["Cherokee (KL)","Commander","Compass","Gladiator","Grand Cherokee (WK2)","Grand Cherokee (WL)","Grand Wagoneer","Liberty","Patriot","Renegade","Wrangler (JK)","Wrangler (JL)"],Kia:["Cadenza","Carnival","Ceed","EV6","EV9","Forte","K5","K900","Niro","Optima","Picanto","Rio","Rondo","Sedona","Seltos","Sephia","Sorento","Soul","Spectra","Sportage","Stinger","Telluride","XCeed"],Lamborghini:["Aventador","Gallardo","Huracán","Murciélago","Revuelto","Urus"],"Land Rover":["Defender (L663)","Discovery 3 (LR3)","Discovery 4 (LR4)","Discovery 5","Discovery Sport","Freelander 2","Range Rover (L322)","Range Rover (L405)","Range Rover (L460)","Range Rover Evoque","Range Rover Sport (L320)","Range Rover Sport (L494)","Range Rover Sport (L461)","Range Rover Velar"],Lexus:["CT","ES","GS","GX","HS","IS","LC","LFA","LS","LX","NX","RC","RX","RZ","SC","UX","LBX","TX"],Lincoln:["Aviator","Continental","Corsair","MKC","MKS","MKT","MKX","MKZ","Nautilus","Navigator","Town Car"],Maserati:["Ghibli","GranCabrio","GranTurismo","Grecale","Levante","MC20","Quattroporte"],Mazda:["CX-3","CX-30","CX-5","CX-50","CX-60","CX-7","CX-9","CX-90","Mazda2","Mazda3","Mazda5","Mazda6","MX-30","MX-5 Miata","RX-8"],McLaren:["570S","600LT","650S","675LT","720S","765LT","Artura","GT","MP4-12C","P1","Senna"],"Mercedes-Benz":["A-Class (W168)","A-Class (W169)","A-Class (W176)","A-Class (W177)","A-Class (V177)","B-Class (W245)","B-Class (W246)","B-Class (W247)","C-Class (W202)","C-Class (W203)","C-Class (W204)","C-Class (W205)","C-Class (W206)","C-Class (S206)","CLA (C117)","CLA (C118)","CLA (H118)","CLC","CLK (W208)","CLK (W209)","CLS (C219)","CLS (C218)","CLS (C257)","CLS (X257)","E-Class (W123)","E-Class (W124)","E-Class (W210)","E-Class (W211)","E-Class (W212)","E-Class (W213)","E-Class (W214)","E-Class (V214)","E-Class Cabriolet","E-Class Coupé","E-Class Estate","G-Class (W460)","G-Class (W461)","G-Class (W463)","G-Class (W464)","GL-Class","GLA (X156)","GLA (H247)","GLB (X247)","GLC (X253)","GLC (X254)","GLC Coupé","GLE (W166)","GLE (V167)","GLE Coupé","GLK (X204)","GLS (X166)","GLS (X167)","M-Class (W163)","M-Class (W164)","M-Class (W166)","R-Class (W251)","S-Class (W126)","S-Class (W140)","S-Class (W220)","S-Class (W221)","S-Class (W222)","S-Class (W223)","S-Class (V223)","S-Class Cabriolet","S-Class Coupé","S-Class Pullman","SL (R129)","SL (R230)","SL (R231)","SL (R232)","SLC (R172)","SLK (R170)","SLK (R171)","SLK (R172)","AMG GT (C190)","AMG GT (X290)","AMG GT 4-Door Coupé","AMG GT R","AMG GT S","AMG A-Class","AMG C-Class","AMG CLA","AMG CLS","AMG E-Class","AMG G-Class","AMG GLA","AMG GLC","AMG GLE","AMG GLS","AMG GT","AMG S-Class","AMG SL","AMG SLC","EQA","
1EQB","EQC","EQE","EQS","EQS SUV","Sprinter (W901-W905)","V-Class (W447)","Vito (W447)","Viano","Metris","Citan"],Mini:["Clubman","Convertible","Cooper (R50/R53)","Cooper (R56)","Cooper (F55/F56)","Countryman (R60)","Countryman (F60)","Paceman","Roadster","Coupe"],Mitsubishi:["3000GT","ASX","Eclipse","Eclipse Cross","Endeavor","Galant","Lancer","Lancer Evolution","Mirage","Montero / Pajero","Outlander","Outlander Sport","Raider","L200 / Triton"],Nissan:["350Z","370Z","Altima","Armada","Cube","Frontier","GT-R","Juke","Kicks","Leaf","Maxima","Micra","Murano","NV200","Navara","Note","Pathfinder","Patrol","Pulsar","Qashqai (J10)","Qashqai (J11)","Qashqai (J12)","Quest","Rogue","Sentra","Titan","Versa","X-Trail","Xterra","Z"],Opel:["Adam","Agila","Antara","Astra H","Astra J","Astra K","Astra L","Cascada","Combo","Corsa D","Corsa E","Corsa F","Crossland","Grandland","Insignia A","Insignia B","Meriva A","Meriva B","Mokka","Mokka X","Movano","Omega","Vectra C","Vivaro","Zafira B","Zafira C"],Peugeot:["1007","106","107","108","205","206","206+","207","207 CC","208 I","208 II","208 e-208","2008 I","2008 II","2008 e-2008","201","202","203","204","205","206","207","208","3008 I","3008 II","3008 Hybrid","301","304","305","306","307","307 CC","308 I","308 II","308 III","308 Hybrid","4007","4008","4008 Hybrid","401","403","404","405","406","407","408","5008 I","5008 II","5008 Hybrid","504","505","508 I","508 II","508 Hybrid","508 Peugeot Sport Engineered","604","605","607","806","807","Bipper","Boxer","e-Bipper","e-Boxer","Expert","e-Expert","Partner","e-Partner","RCZ","Rifter","Traveller","iOn"],Porsche:["718 Boxster","718 Cayman","911 (996)","911 (997)","911 (991)","911 (992)","Boxster (986)","Boxster (987)","Boxster (981)","Cayenne (9PA)","Cayenne (958)","Cayenne (E3)","Cayman (987)","Cayman (981)","Macan","Panamera (970)","Panamera (971)","Taycan"],Ram:["1500","2500","3500","Dakota","ProMaster","ProMaster City"],Renault:["Alaskan","Arkana","Austral","Avantime","Captur I","Captur II","Clio I","Clio II","Clio III","Clio IV","Clio V","Clio E-Tech","Dokker","Duster I","Duster II","Duster III","Espace III","Espace IV","Espace V","Espace VI","Express","Fluence","Fuego","Grand Espace","Grand Modus","Grand Scenic","Kadjar","Kangoo I","Kangoo II","Kangoo III","Koleos I","Koleos II","Laguna I","Laguna II","Laguna III","Latitude","Lodgy","Logan I","Logan II","Master II","Master III","Megane I","Megane II","Megane III","Megane IV","Megane E-Tech","Modus","Safrane","Sandero I","Sandero II","Sandero III","Scenic I","Scenic II","Scenic III","Scenic IV","Symbol I","Symbol II","Talisman","Thalia","Trafic II","Trafic III","Twingo I","Twingo II","Twingo III","Vel Satis","Wind","Zoe"],"Rolls-Royce":["Cullinan","Dawn","Ghost","Phantom","Spectre","Wraith"],Saab:["9-2X","9-3","9-4X","9-5","9-7X"],Seat:["Alhambra","Altea","Arona","Ateca","Exeo","Ibiza (6J)","Ibiza (6F)","Leon (1P)","Leon (5F)","Leon (KL)","Mii","Tarraco","Toledo"],Skoda:["Citigo","Enyaq","Fabia II","Fabia III","Fabia IV","Kamiq","Karoq","Kodiaq","Octavia II","Octavia III","Octavia IV","Rapid","Roomster","Scala","Superb II","Superb III","Superb IV","Yeti"],Smart:["Fortwo (451)","Fortwo (453)","Forfour (454)","Forfour (453)","Roadster","#1","#3"],Subaru:["Ascent","B9 Tribeca","BRZ","Baja","Crosstrek","Forester","Impreza","Legacy","Levorg","Outback","Solterra","Tribeca","WRX","WRX STI","XV"],Tesla:["Model 3","Model S","Model X","Model Y","Cybertruck","Roadster"],Toyota:["4Runner (N210)","4Runner (N280)","4Runner (N300)","86","Allex","Allion","Alphard","Alphard Hybrid","Altezza","Aristo","Auris","Avalon","Avensis","Aygo","Aygo X","bB","bZ4X","C-HR","Caldina","Camry","Camry Hybrid","Carina","Celica","Century","Chaser","Corolla","Corolla Cross","Corolla Hatchback","Corolla Sedan","Corolla Touring Sports","Corolla Verso","Corona","Cresta","Crown","Crown Majesta","Echo","Esquire","Estima","FJ Cruiser","Fortuner","Funcargo","GR86","GR Corolla","GR Supra","GR Yaris","Harrier","Highlander","Highlander Hybrid","Hilux","Innova","iQ","Ist","Kluger","Land Cruiser (J40)","Land Cruiser (J70)","Land Cruiser (J100)","Land Cruiser (J200)","Land Cruiser (J300)","Land Cruiser Prado","Lite Ace","Mark II","Mark X","Matr
1ix","Mirai","MR2","MR-S","Noah","Opa","Passo","Pixis","Platz","Porte","Premio","Prius","Prius c","Prius v","Prius Prime","Prius Plug-in","Proace","Proace City","Probox","Ractis","RAV4","RAV4 Hybrid","Roomy","Rush","Sai","Scepter","Sequoia","Sienna","Sienta","Solara","Spade","Sprinter","Starlet","Succeed","Supra","Tacoma","Tank","Tundra","Vellfire","Venza","Verossa","Verso","Verso-S","Vista","Vitz","Voltz","Will","Windom","Wish","Yaris","Yaris Cross","Yaris Hatchback"],Volkswagen:["Amarok","Arteon","Atlas","Atlas Cross Sport","Beetle (A4)","Beetle (A5)","Bora (1J)","Caddy (Mk1)","Caddy (Mk2)","Caddy (Mk3)","Caddy (Mk4)","Caddy (Mk5)","California","Caravelle","CC","Corrado","Crafter","Derby","Eos","Fox","Golf (Mk1)","Golf (Mk2)","Golf (Mk3)","Golf (Mk4)","Golf (Mk5)","Golf (Mk6)","Golf (Mk7)","Golf (Mk8)","Golf Cabriolet","Golf Plus","Golf SportWagen","Golf Alltrack","Golf GTD","Golf GTI","Golf R","Golf Variant","ID.3","ID.4","ID.5","ID.6","ID.7","ID.Buzz","ID.Buzz Cargo","Jetta (Mk1)","Jetta (Mk2)","Jetta (Mk3)","Jetta (Mk4)","Jetta (Mk5)","Jetta (Mk6)","Jetta (Mk7)","LT","Lupo","Multivan (T5)","Multivan (T6)","Multivan (T7)","Parati","Passat (B1)","Passat (B2)","Passat (B3)","Passat (B4)","Passat (B5)","Passat (B6)","Passat (B7)","Passat (B8)","Passat (B9/NMS)","Passat CC","Passat Variant","Phaeton","Pointer","Polo (Mk1)","Polo (Mk2)","Polo (Mk3)","Polo (Mk4)","Polo (Mk5)","Polo (Mk6)","Polo GTI","Quantum","Santana","Saveiro","Scirocco (Mk1)","Scirocco (Mk2)","Scirocco (Mk3)","Sharan (Mk1)","Sharan (Mk2)","Suran","T-Cross","T-Roc","Taigo","Taos","Teramont","Tiguan (Mk1)","Tiguan (Mk2)","Tiguan (Mk3)","Touareg (7L)","Touareg (7P)","Touareg (CR)","Touran (Mk1)","Touran (Mk2)","Transporter (T1)","Transporter (T2)","Transporter (T3)","Transporter (T4)","Transporter (T5)","Transporter (T6)","Up!","Vento"],Volvo:["C30","C40 Recharge","C70","EX30","EX90","S40","S60","S80","S90","V40","V50","V60","V70","V90","XC40","XC60","XC70","XC90"]},Ge=Object.keys(Q).sort(),ne={BenzinÄ:8,MotorinÄ:9,GPL:3.8,Electric:1.2,Hybrid:8},ie={BenzinÄ:7.5,MotorinÄ:6,GPL:9.5,Electric:18,Hybrid:5},Y={electric:{label:"Electric (0 cm³)",rcaBase:1850},"sub1.0":{label:"Sub 1.0L",rcaBase:1850},"1.0-1.4":{label:"1.0 â 1.4L",rcaBase:1990},"1.4-1.6":{label:"1.4 â 1.6L",rcaBase:2200},"1.6-2.0":{label:"1.6 â 2.0L",rcaBase:2350},"2.0-2.5":{label:"2.0 â 2.5L",rcaBase:2510},"2.5-3.0":{label:"2.5 â 3.0L",rcaBase:3285},"peste3.0":{label:"Peste 3.0L",rcaBase:3380}},le={"E0-E3":"Non-Euro / Euro 1â3",E4:"Euro 4",E5:"Euro 5",E6:"Euro 6",Hybrid:"Hibrid (COâ ⤠50 g/km)"},Le={B1:{"E0-E3":19.5,E4:18.8,E5:17.6,E6:16.5,Hybrid:16.2},B2:{"E0-E3":29.7,E4:28.5,E5:26.7,E6:25.1,Hybrid:24.6},B3:{"E0-E3":92.2,E4:88.6,E5:82.8,E6:77.8,Hybrid:76.3},B4:{"E0-E3":182.9,E4:172.8,E5:154.1,E6:151.2,Hybrid:149.8},B5:{"E0-E3":319,E4:297.3,E5:294.4,E6:290,Hybrid:275.5}},Ne={"sub1.0":{cc:999,band:"B1"},"1.0-1.4":{cc:1200,band:"B1"},"1.4-1.6":{cc:1500,band:"B1"},"1.6-2.0":{cc:1800,band:"B2"},"2.0-2.5":{cc:2200,band:"B3"},"2.5-3.0":{cc:2700,band:"B4"},"peste3.0":{cc:3500,band:"B5"}},Te=(t,C)=>{if(t==="electric")return 40;const x=Ne[t];return x?Math.round(Math.ceil(x.cc/200)*Le[x.band][C]):0},ce={BMW:2,Audi:1.8,"Mercedes-Benz":1.5,Volkswagen:1.3,Subaru:1.4},de=t=>t>=2015?"E6":t>=2011?"E5":t>=2006?"E4":"E0-E3",ke=t=>{const C=["Porsche","Maserati","Ferrari","Lamborghini","Aston Martin","Bentley","Rolls-Royce","McLaren"],x=["BMW","Mercedes-Benz","Audi","Volvo","Lexus","Jaguar","Land Rover","Alfa Romeo","Infiniti","Acura","Genesis"],u=["Volkswagen","Subaru","Jeep","Mini","Honda","Toyota","Mazda","Ford","Nissan","Kia","Hyundai","Skoda","Seat"];return C.includes(t)?"Luxury":x.includes(t)?"Premium":u.includes(t)?"Mid":"Economy"}
1,H=(t,C,x=15e3)=>{let u=.08+.12*Math.max(0,1-C/10);t==="Mid"&&(u*=1.1),t==="Premium"&&(u*=1.25),t==="Luxury"&&(u*=1.4);const n=(x-15e3)/1e4,G=Math.max(.5,1+n*.15);return u*=G,u},Re={Economy:1500,Mid:2500,Premium:4e3,Luxury:8e3},Xe={Economy:1600,Mid:2400,Premium:4e3,Luxury:6e3},B=5,d=new Date().getFullYear();function Fe(){var O;const[t,C]=i.useState("Dacia"),[x,u]=i.useState("Logan I"),[n,G]=i.useState(!1),[y,ue]=i.useState(d-6),[b,pe]=i.useState(d-2),[S,xe]=i.useState("BenzinÄ"),[K,me]=i.useState("10000"),F=Math.max(0,Number(K)||0),[h,ge]=i.useState(""),[m,Ce]=i.useState(15e3),[D,J]=i.useState(ie.BenzinÄ),[L,be]=i.useState(!1),[A,V]=i.useState("1.4-1.6"),[N,W]=i.useState(de(d-6)),Se=a=>{xe(a),J(ie[a]||7),a==="Electric"?V("electric"):A==="electric"&&V("1.4-1.6"),a==="Hybrid"?W("Hybrid"):N==="Hybrid"&&W(de(y))},he=a=>{var s;C(a),u(((s=Q[a])==null?void 0:s[0])||"")},r=i.useMemo(()=>{const a=ke(t),v=Math.max(0,b-(n?b:y)),T=Math.max(0,d-b),k=T>=10?d:b,$=Math.max(0,k-b),z=$>=10?20:10;let f=F,p=v;for(let c=0;c<$;c++)f-=f*H(a,p,m),p++;const R=[];let Z=0,X=null;for(let c=1;c<=z;c++){const E=H(a,p,m),I=f*E,M=I*B;f-=I;const l=Math.pow(1.06,c-1),ye=p>7?Math.min(2.5,1.2+(p-7)*.05):1,P=Math.round(Re[a]*ye*l),Ae=m/4e4*Xe[a],ve=m/100*D*ne[S],Ee=Y[A].rcaBase,q=Math.round(Te(A,N)*l),Ie=255,_=a==="Economy"||a==="Mid"?165:210,ee=p<=3?0:p>12?Math.round(_*l):Math.round(_/2*l),w=Math.round(Ae*l),ae=Math.round(ve*l),re=Math.round(Ee*l),te=Math.round(Ie*l);let j=.04;a==="Mid"&&(j=.045),a==="Premium"&&(j=.06),a==="Luxury"&&(j=.07),ce[t]&&(j*=ce[t]);const je=Math.max((a==="Economy"?300:a==="Mid"?450:a==="Premium"?800:1200)*B,f*B*j),se=L&&p<=10?Math.round(je):0,oe=ae+P+w+te+re+se+ee+q;Z+=oe,X===null&&P+w>M&&(X=c),R.push({year:c,calendarYear:k+(c-1),carAge:p,residualValueRon:f*B,cumulativeCost:Z,isOptimalSell:X===c,totalCostIncDep:Math.round(oe+M),annualDepreciationLossRon:Math.round(M),annualMaintenanceTiresRon:P+w,futureFuel:ae,futureMaint:P,futureTires:w,futureRca:re,futureRovinieta:te,futureCasco:se,futureITP:ee,futureImpozit:q}),p++}const Me=Math.min(z-1,Math.max(0,d-k)),o=R[Me];let U=null;if(!n&&h&&!isNaN(Number(h))&&Number(h)>0){let E=Number(h);for(let l=0;l<v;l++)E-=E*H(a,l,m);const I=Math.round(E),M=I-F;U={fairMarketValueEur:I,diffEur:M,isGoodDeal:M>=0}}return{tier:a,dealAnalysis:U,projectionStartYear:k,depLossRon:R[0].annualDepreciationLossRon,itp:Math.round(o.futureITP),rovinieta:o.futureRovinieta,rca:o.futureRca,casco:o.futureCasco,impozit:o.futureImpozit,fuelCost:o.futureFuel,maintenanceCost:o.futureMaint,tireCostPerYear:o.futureTires,totalFixed:Math.round(o.futureITP+o.futureRca+o.futureRovinieta+o.futureCasco+o.futureImpozit),totalVariable:o.futureFuel+o.futureMaint+o.futureTires,totalAnnualCost:o.totalCostIncDep-o.annualDepreciationLossRon,totalOwnershipAnnual:o.totalCostIncDep,projection:R,projectionYears:z,yearsSincePurchase:T,optimalSellYear:X}},[t,n,y,b,F,h,m,D,S,L,A,N]),g=Math.max(...r.projection.map(a=>Math.max(a.annualDepreciationLossRon,a.annualMaintenanceTiresRon)))*1.1,fe=[g,g*.75,g*.5,g*.25,0];return e.jsxs("div",{className:"bg-gradient-to-br from-gray-900 to-gray-800 rounded-xl border border-gray-700 shadow-2xl overflow-hidden font-sans text-gray-200",children:[e.jsxs("div",{className:"bg-gradient-to-r from-blue-900/50 to-violet-900/50 p-6 border-b border-gray-700",children:[e.jsx("h3",{className:"text-xl font-bold text-white mb-2 tracking-wide uppercase",children:"ð Calculator Cost DeÈinere (România)"}),e.jsx("p",{className:"text-sm text-gray-400",children:"AflÄ cât te costÄ real maÈina ta pe lunÄ, plus momentul optim de vânzare."})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-0",children:[e.jsxs("div",{className:"lg:col-span-4 bg-gray-900/50 p-6 border-r border-gray-700 space-y-5",children:[e.jsxs("div",{className:"flex p-1 bg-gray-800 rounded-lg border border-gray-700",children:[e.jsx("button",{className:`flex-1 py-1.5 text-xs font-bold uppercase rounded-md transition-all ${n?"bg-blue-600 text-white shadow-md":"text-gray-400 hover:text-gray-200"}`,onClick:()=>G(!0),children:"MaÈinÄ NouÄ"}),e.jsx("button",{className:`flex-1 py-1.5 text-xs font-bold uppercase rounded-md transition-all ${n?"text-gray-400 hover:text-gray-200":"bg-violet-600 text-white shadow-md"}`,onClick:()=>G(!1),children:"Second-Hand"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-gray-500 uppercase tracking-wider mb-1 block",children:"Vehicul"}),e.jsx("select",{value:t,onChange:a=>he(a.target.value),className:"w-full bg-gray-800 border border-gray-600 rounded p-2 text-sm text-white mb-2 focus:ring-1 focus:ring-blue-500",children:Ge.map(a=>e.jsx("option",{children:a},a))}),e.jsx("select",{value:x,onChange:a=>u(a.target.value),className:"w-full bg-gray-800 border border-gray-600 rounded p-2 text-sm text-white focus:ring-1 focus:ring-blue-500",children:(O=Q[t])==null?void 0:O.map(a=>e.jsx("option",{children:a},a))})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[!n&&e.jsxs("div",{children:[e.jsx("label",{className:"text-[10px] text-gray-500 uppercase tracking-wider mb-1 block",children:"An FabricaÈie"}),e.jsx("input",{type:"number",min:2e3,max:d,value:y,onChange:a=>ue(Number(a.target.value)),className:"w-full bg-gray-800 border border-gray-600 rounded p-2 text-sm text-white focus:ring-1 focus:ring-blue-500"})]}),e.jsxs("div",{className:n?"col-span-2":"",children:[e.jsxs("label",{className:"text-[10px] text-gray-500 uppercase tracking-wider mb-1 block",children:["An AchiziÈie ",n?"(De Nou)":"SH"]}),e.jsx("input",{type:"number",min:n?2e3:y,max:d,value:b,onChange:a=>pe(Number(a.target.value)),className:"w-full bg-gray-800 border border-gray-600 rounded p-2 text-sm text-white focus:ring-1 focus:ring-blue-500"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:n?"col-span-2":"",children:[e.jsxs("label",{className:"text-xs text-gray-500 uppercase tracking-wider mb-1 block",children:["PreÈ AchiziÈie ",n?"de Nou":"SH","
1(â¬)"]}),e.jsx("input",{type:"number",step:500,value:K,onChange:a=>me(a.target.value),className:"w-full bg-gray-800 border border-gray-600 rounded p-2 text-sm text-white font-mono focus:ring-1 focus:ring-blue-500"})]}),!n&&e.jsxs("div",{children:[e.jsxs("label",{className:"text-[10px] text-gray-500 uppercase tracking-wider mb-1 block",children:["PreÈ de Nou (â¬) ",e.jsx("span",{className:"opacity-50",children:"(OpÈional)"})]}),e.jsx("input",{type:"number",step:500,value:h,onChange:a=>ge(a.target.value),placeholder:"ex: 25000",className:"w-full bg-gray-800 border border-gray-600 rounded p-2 text-sm text-white font-mono focus:ring-1 focus:ring-blue-500"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-gray-500 uppercase tracking-wider mb-1 block",children:"Combustibil"}),e.jsx("select",{value:S,onChange:a=>Se(a.target.value),className:"w-full bg-gray-800 border border-gray-600 rounded p-2 text-sm text-white focus:ring-1 focus:ring-blue-500",children:Object.keys(ne).map(a=>e.jsx("option",{children:a},a))})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"text-xs text-gray-500 uppercase tracking-wider mb-1 block",children:["Consum ",S==="Electric"?"(kWh)":"(L)","/100km"]}),e.jsx("input",{type:"number",step:.1,value:D,onChange:a=>J(Number(a.target.value)),className:"w-full bg-gray-800 border border-gray-600 rounded p-2 text-sm text-white font-mono text-blue-400 focus:ring-1 focus:ring-blue-500"})]})]}),S!=="Electric"&&e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsxs("label",{className:"text-xs text-gray-500 uppercase tracking-wider mb-1 block",children:["Motor ",e.jsx("span",{className:"opacity-50 normal-case",children:"â cilindree"})]}),e.jsx("select",{value:A,onChange:a=>V(a.target.value),className:"w-full bg-gray-800 border border-gray-600 rounded p-2 text-sm text-white focus:ring-1 focus:ring-blue-500",children:Object.keys(Y).filter(a=>a!=="electric").map(a=>e.jsx("option",{value:a,children:Y[a].label},a))})]}),e.jsxs("div",{children:[e.jsxs("label",{className:"text-xs text-gray-500 uppercase tracking-wider mb-1 block",children:["NormÄ Euro ",e.jsx("span",{className:"opacity-50 normal-case",children:"â impozit"})]}),e.jsx("select",{value:N,onChange:a=>W(a.target.value),className:"w-full bg-gray-800 border border-gray-600 rounded p-2 text-sm text-white focus:ring-1 focus:ring-blue-500",children:Object.keys(le).filter(a=>S==="Hybrid"?a==="Hybrid":a!=="Hybrid").map(a=>e.jsx("option",{value:a,children:le[a]},a))})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between mb-1",children:[e.jsx("label",{className:"text-xs text-gray-500 uppercase tracking-wider block",children:"Kilometri per an"}),e.jsxs("span",{className:"text-xs text-blue-400 font-mono font-bold",children:[m.toLocaleString()," km"]})]}),e.jsx("input",{type:"range",min:5e3,max:5e4,step:1e3,value:m,onChange:a=>Ce(Number(a.target.value)),className:"w-full accent-blue-500"})]}),e.jsx("div",{className:"flex items-center gap-3 pt-2",children:e.jsxs("label",{className:"relative inline-flex items-center cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:L,onChange:a=>be(a.target.checked),className:"sr-only peer"}),e.jsx("div",{className:"w-9 h-5 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-violet-500"}),e.jsx("span",{className:"ml-3 text-sm text-gray-300",children:"Asigurare CASCO"})]})})]}),e.jsxs("div",{className:"lg:col-span-8 p-6",children:[r.dealAnalysis&&e.jsxs("div",{className:`mb-6 p-4 rounded-lg border flex items-start gap-4 ${r.dealAnalysis.isGoodDeal?"bg-green-900/20 border-green-500/30":"bg-red-900/20 border-red-500/30 shadow-inner"}`,children:[e.jsx("div",{className:"text-3xl",children:r.dealAnalysis.isGoodDeal?"ð¤":"â ï¸"}),e.jsxs("div",{children:[e.jsx("h4",{className:`text-sm font-bold uppercase tracking-wider mb-1 ${r.dealAnalysis.isGoodDeal?"text-green-400":"text-red-400"}`,children:"AnalizÄ TranzacÈie SH"}),e.jsxs("p",{className:"text-sm text-gray-300 leading-relaxed",children:["Conform curbei matematice de depreciere, valoarea corectÄ a maÈinii la data achiziÈiei era de ",e.jsxs("strong",{className:"text-white font-mono",children:[r.dealAnalysis.fairMarketValueEur.toLocaleStr
1ing()," â¬"]}),".",r.dealAnalysis.isGoodDeal?` Ai plÄtit cu ${r.dealAnalysis.diffEur.toLocaleString()} ⬠mai puÈin, ceea ce înseamnÄ cÄ ai fÄcut o afacere excelentÄ (Sub preÈul pieÈei)!`:` Ai plÄtit cu ${Math.abs(r.dealAnalysis.diffEur).toLocaleString()} ⬠peste valoarea ei teoreticÄ (Peste preÈul pieÈei).`]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[e.jsxs("div",{className:"bg-[#1e293b] rounded-lg p-3 border border-gray-700",children:[e.jsx("span",{className:"text-[10px] uppercase text-gray-500 font-bold tracking-wider",children:"Cost Total / An"}),e.jsxs("div",{className:"text-lg font-bold text-white mt-1 font-mono",children:[r.totalOwnershipAnnual.toLocaleString()," lei"]}),e.jsx("div",{className:"text-xs text-gray-400 mt-1",children:"Cost auto + depreciere"})]}),e.jsxs("div",{className:"bg-[#1e293b] rounded-lg p-3 border border-gray-700 border-l-4 border-l-blue-500",children:[e.jsx("span",{className:"text-[10px] uppercase text-gray-500 font-bold tracking-wider",children:"Buget Lunar (FÄrÄ Depreciere)"}),e.jsxs("div",{className:"text-lg font-bold text-blue-400 mt-1 font-mono",children:[Math.round(r.totalAnnualCost/12).toLocaleString()," lei"]}),e.jsx("div",{className:"text-xs text-gray-400 mt-1",children:"Suma de pus deoparte pentru facturi auto"})]}),e.jsxs("div",{className:"bg-[#1e293b] rounded-lg p-3 border border-gray-700",children:[e.jsxs("span",{className:"text-[10px] uppercase text-gray-500 font-bold tracking-wider",children:["Depreciere (",r.projectionStartYear,")"]}),e.jsxs("div",{className:"text-lg font-bold text-red-400 mt-1 font-mono",children:["-",r.depLossRon.toLocaleString()," lei"]}),e.jsx("div",{className:"text-xs text-gray-400 mt-1",children:"Bani pierduÈi invizibil"})]}),e.jsxs("div",{className:"bg-[#1e293b] rounded-lg p-3 border border-gray-700",children:[e.jsx("span",{className:"text-[10px] uppercase text-gray-500 font-bold tracking-wider",children:"Cost / KM"}),e.jsxs("div",{className:"text-lg font-bold text-green-400 mt-1 font-mono",children:[(r.totalAnnualCost/m).toFixed(2)," lei"]}),e.jsx("div",{className:"text-xs text-gray-400 mt-1",children:"FÄrÄ depreciere"})]})]}),e.jsxs("div",{className:"mb-8 space-y-2",children:[e.jsxs("div",{className:"bg-gray-800/50 rounded-lg px-4 py-3",children:[e.jsxs("div",{className:"flex justify-between items-center mb-1.5",children:[e.jsx("span",{className:"font-bold text-blue-300 text-sm",children:"â½ Variabile"}),e.jsxs("span",{className:"font-mono text-gray-200",children:[r.totalVariable.toLocaleString()," lei"]})]}),e.jsxs("div",{className:"text-xs text-gray-400 flex flex-wrap gap-x-4 gap-y-0.5",children:[e.jsxs("span",{children:["Combustibil: ",e.jsx("span",{className:"text-white",children:r.fuelCost.toLocaleString()})]}),e.jsxs("span",{children:["ÃntreÈinere: ",e.jsx("span",{className:"text-white",children:r.maintenanceCost.toLocaleString()})]}),e.jsxs("span",{children:["Anvelope: ",e.jsx("span",{className:"text-white",children:r.tireCostPerYear.toLocaleString()})]})]})]}),e.jsxs("div",{className:"bg-gray-800/50 rounded-lg px-4 py-3",children:[e.jsxs("div",{className:"flex justify-between items-center mb-1.5",children:[e.jsx("span",{className:"font-bold text-violet-300 text-sm",children:"ðï¸ Fixe / Taxe"}),e.jsxs("span",{className:"font-mono text-gray-200",children:[r.totalFixed.toLocaleString()," lei"]})]}),e.jsxs("div",{className:"text-xs text-gray-400 flex flex-wrap gap-x-4 gap-y-0.5",children:[e.jsxs("span",{children:["RCA: ",e.jsx("span",{className:"text-white",children:r.rca.toLocaleString()})]}),e.jsxs("span",{children:["Rovinieta: ",e.jsx("span",{className:"text-white",children:r.rovinieta})]}),e.jsxs("span",{children:["ITP: ",e.jsx("span",{className:"text-white",children:r.itp})]}),r.impozit>0&&e.jsxs("span",{children:["Impozit Auto: ",e.jsx("span",{className:"text-white",children:r.impozit.toLocaleString()})]}),L&&e.jsxs("span",{children:["CASCO: ",e.jsx("span",{className:"text-white",children:r.casco.toLocaleString()})]})]})]})]}),e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-bold text-gray-300 uppercase tracking-wide mb-4",children:["ð
1 ProiecÈie pe ",r.projectionYears," ani & Momentul optim de vânzare"]}),e.jsxs("div",{className:"relative h-64 w-full bg-[#0f172a] rounded-lg border border-gray-700 p-4",children:[e.jsx("div",{className:"absolute inset-0 p-4 pb-8 pl-12 flex flex-col justify-between pointer-events-none",children:fe.map((a,s)=>e.jsx("div",{className:"border-t border-gray-700/50 w-full flex items-center",children:e.jsx("span",{className:"absolute left-1 -translate-y-1/2 text-[9px] font-mono text-gray-500",children:a>=1e3?`${(a/1e3).toFixed(0)}k`:a})},s))}),e.jsxs("svg",{className:"absolute inset-0 h-full w-full p-4 pb-8 pl-12 pr-4 overflow-visible",preserveAspectRatio:"none",viewBox:"0 0 100 100",children:[r.optimalSellYear&&e.jsx("rect",{x:`${(r.optimalSellYear-1)/(r.projectionYears-1)*100}%`,y:"0",width:"15%",height:"100%",fill:"rgba(34, 197, 94, 0.1)",stroke:"#22c55e",strokeWidth:"1",strokeDasharray:"4"}),(()=>{const a=Math.min(r.projectionYears-1,Math.max(0,d-r.projectionStartYear))/(r.projectionYears-1)*100;return e.jsx("g",{stroke:"rgba(255,255,255,0.3)",strokeWidth:"1",strokeDasharray:"4",children:e.jsx("line",{x1:`${a}%`,y1:"0",x2:`${a}%`,y2:"100%",vectorEffect:"non-scaling-stroke"})})})(),e.jsx("polyline",{fill:"none",stroke:"#60a5fa",strokeWidth:"2.5",points:r.projection.map((a,s)=>`${s/(r.projectionYears-1)*100},${100-a.annualDepreciationLossRon/g*100}`).join(" ")}),r.projection.map((a,s)=>e.jsx("circle",{cx:`${s/(r.projectionYears-1)*100}%`,cy:`${100-a.annualDepreciationLossRon/g*100}%`,r:"3",fill:"#60a5fa"},`v-${s}`)),e.jsx("polyline",{fill:"none",stroke:"#f87171",strokeWidth:"2.5",points:r.projection.map((a,s)=>`${s/(r.projectionYears-1)*100},${100-a.annualMaintenanceTiresRon/g*100}`).join(" ")}),r.projection.map((a,s)=>e.jsx("circle",{cx:`${s/(r.projectionYears-1)*100}%`,cy:`${100-a.annualMaintenanceTiresRon/g*100}%`,r:"3",fill:"#f87171"},`c-${s}`)),r.optimalSellYear&&(()=>{const a=r.projection[r.optimalSellYear-1];return e.jsx("circle",{cx:`${(r.optimalSellYear-1)/(r.projectionYears-1)*100}%`,cy:`${100-a.annualDepreciationLossRon/g*100}%`,r:"5",fill:"#22c55e",className:"animate-pulse"})})()]}),e.jsx("div",{className:"absolute top-2 left-12 right-4 pointer-events-none",children:e.jsxs("div",{className:"absolute font-mono font-bold text-[10px] text-white bg-blue-600/90 backdrop-blur-sm px-2 py-0.5 rounded shadow-lg whitespace-nowrap transform -translate-x-1/2",style:{left:`${Math.min(r.projectionYears-1,Math.max(0,d-r.projectionStartYear))/(r.projectionYears-1)*100}%`},children:["ð Prezent (",d,")"]})}),e.jsx("div",{className:"absolute bottom-1 left-12 right-4 text-[10px] text-gray-500 font-mono",children:r.projection.map((a,s)=>{const v=r.projectionYears-1,T=Math.ceil(r.projectionYears/5);return s!==0&&s!==v&&s%T!==0?null:e.jsx("div",{className:"flex flex-col items-center absolute -translate-x-1/2",style:{left:`${s/v*100}%`},children:e.jsx("span",{children:a.calendarYear})},s)})})]}),e.jsxs("div",{className:"flex flex-wrap gap-4 mt-3 text-xs justify-center items-center",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"w-3 h-3 rounded-full bg-blue-400"}),e.jsx("span",{className:"text-gray-400",children:"Pierdere Depreciere / An"})]}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"w-3 h-3 rounded-full bg-red-400"}),e.jsx("span",{className:"text-gray-400",children:"Service + Anvelope / An"})]}),r.optimalSellYear&&e.jsxs("div",{className:"flex items-center gap-1.5 px-3 py-1 bg-green-900/30 border border-green-500/50 rounded-full text-green-400",children:[e.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500 animate-ping"}),"Vânzare idealÄ: ",r.projection[r.optimalSellYear-1].calendarYear," (Anul ",r.optimalSellYear,")"]})]}),r.optimalSellYear&&e.jsxs("p",{className:"text-[11px] text-gray-500 text-center mt-3 max-w-lg mx-auto leading-relaxed",children:["*Momentul de vânzare recomandat (",r.projection[r.optimalSellYear-1].calendarYear,') este punctul în care costurile anuale de întreÈinere Èi reparaÈii depÄÈesc pierderea prin depreciere din acel an. DupÄ acest moment, maÈina devine "o groapÄ de bani".']}
1)]})]})]})]})}export{Fe as default};
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.