@cartbot/vehicle-search-beta 3.0.35 → 3.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/js/vehicle-search.es.js +698 -682
- package/dist/js/vehicle-search.js +18 -18
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { Combobox as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { MeiliSearch as
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
const Qt = `@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap";/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{*,:before,:after,::backdrop{--tw-space-x-reverse:0;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-border-style:solid}vehicle-search,vehicle-search *,vehicle-search:before,vehicle-search:after,vehicle-search::backdrop{--tw-space-x-reverse:0;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-border-style:solid}:host,:host *,:host:before,:host:after,:host::backdrop{--tw-space-x-reverse:0;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-border-style:solid}}@layer theme{:root,:host{--vs-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--vs-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--vs-color-red-300:oklch(80.8% .114 19.571);--vs-color-red-500:oklch(63.7% .237 25.331);--vs-color-stone-200:oklch(92.3% .003 48.717);--vs-color-stone-400:oklch(70.9% .01 56.259);--vs-color-stone-600:oklch(44.4% .011 73.639);--vs-color-stone-900:oklch(21.6% .006 56.043);--vs-color-black:#000;--vs-color-white:#fff;--vs-spacing:.25rem;--vs-text-base:1rem;--vs-text-base--line-height: 1.5 ;--vs-font-weight-normal:400;--vs-font-weight-medium:500;--vs-font-weight-semibold:600;--vs-font-weight-bold:700;--vs-leading-normal:1.5;--vs-animate-spin:spin 1s linear infinite;--vs-default-transition-duration:.15s;--vs-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--vs-default-font-family:var(--vs-font-sans);--vs-default-mono-font-family:var(--vs-font-mono)}vehicle-search,:host{--vs-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--vs-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--vs-color-red-300:oklch(80.8% .114 19.571);--vs-color-red-500:oklch(63.7% .237 25.331);--vs-color-stone-200:oklch(92.3% .003 48.717);--vs-color-stone-400:oklch(70.9% .01 56.259);--vs-color-stone-600:oklch(44.4% .011 73.639);--vs-color-stone-900:oklch(21.6% .006 56.043);--vs-color-black:#000;--vs-color-white:#fff;--vs-spacing:.25rem;--vs-text-base:1rem;--vs-text-base--line-height: 1.5 ;--vs-font-weight-normal:400;--vs-font-weight-medium:500;--vs-font-weight-semibold:600;--vs-font-weight-bold:700;--vs-leading-normal:1.5;--vs-animate-spin:spin 1s linear infinite;--vs-default-transition-duration:.15s;--vs-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--vs-default-font-family:var(--vs-font-sans);--vs-default-mono-font-family:var(--vs-font-mono)}:host{--vs-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--vs-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--vs-color-red-300:oklch(80.8% .114 19.571);--vs-color-red-500:oklch(63.7% .237 25.331);--vs-color-stone-200:oklch(92.3% .003 48.717);--vs-color-stone-400:oklch(70.9% .01 56.259);--vs-color-stone-600:oklch(44.4% .011 73.639);--vs-color-stone-900:oklch(21.6% .006 56.043);--vs-color-black:#000;--vs-color-white:#fff;--vs-spacing:.25rem;--vs-text-base:1rem;--vs-text-base--line-height: 1.5 ;--vs-font-weight-normal:400;--vs-font-weight-medium:500;--vs-font-weight-semibold:600;--vs-font-weight-bold:700;--vs-leading-normal:1.5;--vs-animate-spin:spin 1s linear infinite;--vs-default-transition-duration:.15s;--vs-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--vs-default-font-family:var(--vs-font-sans);--vs-default-mono-font-family:var(--vs-font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--vs-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--vs-default-font-feature-settings,normal);font-variation-settings:var(--vs-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--vs-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--vs-default-mono-font-feature-settings,normal);font-variation-settings:var(--vs-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}.partbot-mmyvs-container{--partbot-theme:0 188 125;--partbot-button-color:0 153 102;--partbot-button-hover-color:0 188 125;--partbot-button-label-color:255 255 255;--partbot-button-hover-label-color:255 255 255;--partbot-mobile-background-color:12 24 39;--partbot-button-border-radius:.375rem;--partbot-font-size:.875rem;--partbot-font-family:"Partbot","Inter",Helvetica,sans-serif;--partbot-padding:.5rem;--partbot-input-shadow:0 1px 2px 0 #0000000d;--partbot-input-border-color:229 231 235;--partbot-input-border-width:1px}[class*="vs:"]:before,[class*="vs:"]:after,[class^=vehicle-search-]:before,[class^=vehicle-search-]:after{box-sizing:border-box;--tw-content:"";border:0 solid}[class*="vs:"],[class^=vehicle-search-]{box-sizing:border-box;border:0 solid}.vehicle-search-select{text-transform:none;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}.partbot-mmyvs-container{top:calc(var(--vs-spacing)*0);right:calc(var(--vs-spacing)*0);left:calc(var(--vs-spacing)*0);z-index:10000;background-color:rgb(var(--partbot-mobile-background-color));padding:calc(var(--vs-spacing)*8);--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--vs-default-transition-timing-function));transition-duration:var(--tw-duration,var(--vs-default-transition-duration));--tw-duration:.5s;transition-duration:.5s;position:fixed}@media (min-width:48rem){.partbot-mmyvs-container{z-index:10;padding:calc(var(--vs-spacing)*0);--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);background-color:#0000;position:relative;top:auto;left:auto;right:auto}}.partbot-mmyvs-container{transform:translateY(-100vh)}@media (min-width:768px){.partbot-mmyvs-container{transform:translateY(0)}}.partbot-mmyvs-container.active{transform:translateY(0)}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;--tw-shadow:0 0 #0000;background-color:#fff;border-width:1px;border-color:#6a7282;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem}:is([type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#155dfc;outline:2px solid #0000}input::placeholder,textarea::placeholder{color:#6a7282;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}::-webkit-date-and-time-value{text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-year-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-month-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-day-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-hour-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-minute-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-second-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-millisecond-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{-webkit-print-color-adjust:exact;print-color-adjust:exact;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='oklch(55.1%25 0.027 264.364)' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;-webkit-print-color-adjust:unset;print-color-adjust:unset;padding-right:.75rem}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;print-color-adjust:exact;vertical-align:middle;-webkit-user-select:none;user-select:none;color:#155dfc;--tw-shadow:0 0 #0000;background-color:#fff;background-origin:border-box;border-width:1px;border-color:#6a7282;flex-shrink:0;width:1rem;height:1rem;padding:0;display:inline-block}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors:active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors:active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{background-color:currentColor;border-color:#0000}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}@media (forced-colors:active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{background-color:currentColor;border-color:#0000}[type=file]{background:unset;border-color:inherit;font-size:unset;line-height:inherit;border-width:0;border-radius:0;padding:0}[type=file]:focus{outline:1px solid buttontext;outline:1px auto -webkit-focus-ring-color}}@layer components;@layer utilities{.vs\\:pointer-events-auto{pointer-events:auto}.vs\\:pointer-events-none{pointer-events:none}.vs\\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.vs\\:absolute{position:absolute}.vs\\:fixed{position:fixed}.vs\\:relative{position:relative}.vs\\:inset-0{inset:calc(var(--vs-spacing)*0)}.vs\\:inset-y-0{inset-block:calc(var(--vs-spacing)*0)}.vs\\:right-0{right:calc(var(--vs-spacing)*0)}.vs\\:right-\\[calc\\(var\\(--partbot-font-size\\)\\*1\\.95\\)\\]{right:calc(var(--partbot-font-size)*1.95)}.vs\\:z-10{z-index:10}.vs\\:z-99999\\!{z-index:99999!important}.vs\\:m-0{margin:calc(var(--vs-spacing)*0)}.vs\\:mt-2{margin-top:calc(var(--vs-spacing)*2)}.vs\\:mt-4{margin-top:calc(var(--vs-spacing)*4)}.vs\\:mb-1{margin-bottom:calc(var(--vs-spacing)*1)}.vs\\:block{display:block}.vs\\:flex{display:flex}.vs\\:flex\\!{display:flex!important}.vs\\:grid{display:grid}.vs\\:inline-flex{display:inline-flex}.vs\\:inline-flex\\!{display:inline-flex!important}.vs\\:h-5{height:calc(var(--vs-spacing)*5)}.vs\\:h-\\[13px\\]{height:13px}.vs\\:h-\\[calc\\(var\\(--partbot-font-size\\)\\*0\\.9\\)\\]\\!{height:calc(var(--partbot-font-size)*.9)!important}.vs\\:h-full{height:100%}.vs\\:max-h-60\\!{max-height:calc(var(--vs-spacing)*60)!important}.vs\\:w-\\(--input-width\\){width:var(--input-width)}.vs\\:w-5{width:calc(var(--vs-spacing)*5)}.vs\\:w-\\[calc\\(var\\(--partbot-font-size\\)\\*0\\.9\\)\\]\\!{width:calc(var(--partbot-font-size)*.9)!important}.vs\\:w-auto\\!{width:auto!important}.vs\\:w-full{width:100%}.vs\\:w-full\\!{width:100%!important}.vs\\:shrink\\!{flex-shrink:1!important}.vs\\:shrink-0\\!{flex-shrink:0!important}.vs\\:animate-spin{animation:var(--vs-animate-spin)}.vs\\:cursor-default{cursor:default}.vs\\:cursor-pointer{cursor:pointer}.vs\\:appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.vs\\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.vs\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.vs\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.vs\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.vs\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.vs\\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.vs\\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.vs\\:flex-col{flex-direction:column}.vs\\:items-center{align-items:center}.vs\\:justify-between{justify-content:space-between}.vs\\:justify-center{justify-content:center}.vs\\:justify-end{justify-content:flex-end}.vs\\:gap-3{gap:calc(var(--vs-spacing)*3)}:where(.vs\\:space-x-1\\.5>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--vs-spacing)*1.5)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--vs-spacing)*1.5)*calc(1 - var(--tw-space-x-reverse)))}:where(.vs\\:space-x-\\[calc\\(var\\(--partbot-padding\\)\\*0\\.25\\)\\]>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--partbot-padding)*.25)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--partbot-padding)*.25)*calc(1 - var(--tw-space-x-reverse)))}.vs\\:overflow-auto{overflow:auto}.vs\\:overflow-hidden{overflow:hidden}.vs\\:rounded-\\(--partbot-button-border-radius\\){border-radius:var(--partbot-button-border-radius)}.vs\\:rounded-\\[min\\(var\\(--partbot-button-border-radius\\)\\,0\\.89rem\\)\\]{border-radius:min(var(--partbot-button-border-radius),.89rem)}.vs\\:border-none{--tw-border-style:none;border-style:none}.vs\\:bg-\\[rgb\\(var\\(--partbot-theme\\)\\)\\]{background-color:rgb(var(--partbot-theme))}.vs\\:bg-stone-900{background-color:var(--vs-color-stone-900)}.vs\\:bg-transparent{background-color:#0000}.vs\\:bg-white{background-color:var(--vs-color-white)}.vs\\:p-\\(--partbot-padding\\){padding:var(--partbot-padding)}.vs\\:p-2{padding:calc(var(--vs-spacing)*2)}.vs\\:px-1\\.5{padding-inline:calc(var(--vs-spacing)*1.5)}.vs\\:px-\\[calc\\(var\\(--partbot-padding\\)\\*1\\.3\\)\\]{padding-inline:calc(var(--partbot-padding)*1.3)}.vs\\:py-\\(--partbot-padding\\){padding-block:var(--partbot-padding)}.vs\\:py-1{padding-block:calc(var(--vs-spacing)*1)}.vs\\:pr-\\(--partbot-padding\\){padding-right:var(--partbot-padding)}.vs\\:pr-2{padding-right:calc(var(--vs-spacing)*2)}.vs\\:pr-10{padding-right:calc(var(--vs-spacing)*10)}.vs\\:pr-\\[calc\\(var\\(--partbot-padding\\)\\*1\\.3\\)\\]{padding-right:calc(var(--partbot-padding)*1.3)}.vs\\:pb-4{padding-bottom:calc(var(--vs-spacing)*4)}.vs\\:pl-\\[calc\\(var\\(--partbot-padding\\)\\*1\\.3\\)\\]{padding-left:calc(var(--partbot-padding)*1.3)}.vs\\:text-center{text-align:center}.vs\\:text-left{text-align:left}.vs\\:font-\\(family-name\\:--partbot-font-family\\){font-family:var(--partbot-font-family)}.vs\\:font-sans{font-family:var(--vs-font-sans)}.vs\\:text-base{font-size:var(--vs-text-base);line-height:var(--tw-leading,var(--vs-text-base--line-height))}.vs\\:text-\\(length\\:--partbot-font-size\\){font-size:var(--partbot-font-size)}.vs\\:text-\\[10px\\]{font-size:10px}.vs\\:leading-\\[calc\\(var\\(--partbot-font-size\\)\\*1\\.5\\)\\]{--tw-leading:calc(var(--partbot-font-size)*1.5);line-height:calc(var(--partbot-font-size)*1.5)}.vs\\:leading-none{--tw-leading:1;line-height:1}.vs\\:leading-normal{--tw-leading:var(--vs-leading-normal);line-height:var(--vs-leading-normal)}.vs\\:font-bold{--tw-font-weight:var(--vs-font-weight-bold);font-weight:var(--vs-font-weight-bold)}.vs\\:font-bold\\!{--tw-font-weight:var(--vs-font-weight-bold)!important;font-weight:var(--vs-font-weight-bold)!important}.vs\\:font-medium{--tw-font-weight:var(--vs-font-weight-medium);font-weight:var(--vs-font-weight-medium)}.vs\\:font-normal{--tw-font-weight:var(--vs-font-weight-normal);font-weight:var(--vs-font-weight-normal)}.vs\\:font-semibold{--tw-font-weight:var(--vs-font-weight-semibold);font-weight:var(--vs-font-weight-semibold)}.vs\\:whitespace-pre-wrap{white-space:pre-wrap}.vs\\:text-\\[rgb\\(var\\(--partbot-button-label-color\\)\\)\\]{color:rgb(var(--partbot-button-label-color))}.vs\\:text-\\[rgb\\(var\\(--partbot-theme\\)\\)\\]{color:rgb(var(--partbot-theme))}.vs\\:text-\\[rgb\\(var\\(--partbot-theme\\)\\)\\]\\!{color:rgb(var(--partbot-theme))!important}.vs\\:text-black{color:var(--vs-color-black)}.vs\\:text-red-300{color:var(--vs-color-red-300)}.vs\\:text-red-300\\!{color:var(--vs-color-red-300)!important}.vs\\:text-stone-400{color:var(--vs-color-stone-400)}.vs\\:text-stone-900{color:var(--vs-color-stone-900)}.vs\\:text-white{color:var(--vs-color-white)}.vs\\:no-underline{text-decoration-line:none}.vs\\:opacity-0{opacity:0}.vs\\:opacity-75{opacity:.75}.vs\\:shadow-\\(--partbot-input-shadow\\){--tw-shadow:var(--partbot-input-shadow);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.vs\\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.vs\\:ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.vs\\:ring-stone-200{--tw-ring-color:var(--vs-color-stone-200)}.vs\\:transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--vs-default-transition-timing-function));transition-duration:var(--tw-duration,var(--vs-default-transition-duration))}.vs\\:transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--vs-default-transition-timing-function));transition-duration:var(--tw-duration,var(--vs-default-transition-duration))}.vs\\:duration-300{--tw-duration:.3s;transition-duration:.3s}.vs\\:outline-none{--tw-outline-style:none;outline-style:none}.vs\\:placeholder\\:text-stone-600::placeholder{color:var(--vs-color-stone-600)}@media (hover:hover){.vs\\:hover\\:border-none:hover{--tw-border-style:none;border-style:none}.vs\\:hover\\:bg-theme:hover{background-color:oklch(from rgb(var(--partbot-theme))l c h/<alpha-value>)}.vs\\:hover\\:text-button-label:hover{color:oklch(from rgb(var(--partbot-button-label-color))l c h/<alpha-value>)}.vs\\:hover\\:text-red-500:hover{color:var(--vs-color-red-500)}.vs\\:hover\\:opacity-100:hover{opacity:1}.vs\\:hover\\:outline-none:hover{--tw-outline-style:none;outline-style:none}}.vs\\:focus\\:border-\\[rgb\\(var\\(--partbot-theme\\)\\)\\]:focus{border-color:rgb(var(--partbot-theme))}.vs\\:focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.vs\\:focus\\:ring-\\[rgb\\(var\\(--partbot-theme\\)\\)\\]:focus{--tw-ring-color:rgb(var(--partbot-theme))}.vs\\:focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.vs\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.vs\\:disabled\\:text-stone-400\\!:disabled{color:var(--vs-color-stone-400)!important}.vs\\:disabled\\:opacity-100\\!:disabled{opacity:1!important}.vs\\:disabled\\:placeholder\\:text-stone-400:disabled::placeholder{color:var(--vs-color-stone-400)}@media (min-width:40rem){.vs\\:sm\\:text-\\(length\\:--partbot-font-size\\){font-size:var(--partbot-font-size)}}@media (min-width:48rem){.vs\\:md\\:col-span-3{grid-column:span 3/span 3}.vs\\:md\\:mt-3{margin-top:calc(var(--vs-spacing)*3)}.vs\\:md\\:hidden{display:none}.vs\\:md\\:hidden\\!{display:none!important}.vs\\:md\\:max-w-\\[400px\\]{max-width:400px}.vs\\:md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.vs\\:md\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.vs\\:md\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.vs\\:md\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.vs\\:md\\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.vs\\:md\\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.vs\\:md\\:items-end{align-items:flex-end}.vs\\:md\\:justify-center{justify-content:center}.vs\\:md\\:justify-end{justify-content:flex-end}.vs\\:md\\:gap-5{gap:calc(var(--vs-spacing)*5)}.vs\\:md\\:pr-1\\.5{padding-right:calc(var(--vs-spacing)*1.5)}}@media (min-width:64rem){.vs\\:lg\\:col-span-1{grid-column:span 1/span 1}.vs\\:lg\\:mx-auto{margin-inline:auto}.vs\\:lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.vs\\:lg\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.vs\\:lg\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.vs\\:lg\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.vs\\:lg\\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.vs\\:lg\\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}}.vehicle-search-btn{cursor:pointer;justify-content:center;align-items:center;display:inline-flex;position:relative!important}:where(.vehicle-search-btn>:not(:last-child)){--tw-space-x-reverse:0!important;margin-inline-start:calc(calc(var(--vs-spacing)*2)*var(--tw-space-x-reverse))!important;margin-inline-end:calc(calc(var(--vs-spacing)*2)*calc(1 - var(--tw-space-x-reverse)))!important}.vehicle-search-btn{border-radius:var(--partbot-button-border-radius);border-style:var(--tw-border-style);background-color:rgb(var(--partbot-button-color));padding-inline:var(--partbot-padding);padding-block:var(--partbot-padding);font-family:var(--partbot-font-family);font-size:var(--partbot-font-size);--tw-leading:calc(var(--partbot-font-size)*1.5);line-height:calc(var(--partbot-font-size)*1.5);--tw-font-weight:var(--vs-font-weight-medium);font-weight:var(--vs-font-weight-medium);white-space:nowrap;color:rgb(var(--partbot-button-label-color));--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--vs-default-transition-timing-function));transition-duration:var(--tw-duration,var(--vs-default-transition-duration));border-width:1px;border-color:#0000;text-decoration-line:none}@media (hover:hover){.vehicle-search-btn:hover{background-color:rgb(var(--partbot-button-hover-color));color:rgb(var(--partbot-button-hover-label-color))}}.vehicle-search-btn:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color:rgb(var(--partbot-theme));--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-outline-style:none;outline-style:none}.vehicle-search-btn:disabled{pointer-events:none;opacity:.5}.vehicle-search-btn>*{pointer-events:none}.partbot-input-border{border-width:var(--partbot-input-border-width);border-color:rgb(var(--partbot-input-border-color));border-style:solid}}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@keyframes spin{to{transform:rotate(360deg)}}`;
|
|
14
|
-
function
|
|
15
|
-
return /* @__PURE__ */ a("span", { className:
|
|
1
|
+
import { jsx as a, jsxs as I, Fragment as Ue } from "react/jsx-runtime";
|
|
2
|
+
import { useState as N, useEffect as P, useRef as W, useMemo as qe, useCallback as F } from "react";
|
|
3
|
+
import Pt from "react-dom";
|
|
4
|
+
import It from "js-cookie";
|
|
5
|
+
import { Combobox as Lt, ComboboxInput as Vt, ComboboxButton as Dt, ComboboxOptions as Ft, ComboboxOption as Ot } from "@headlessui/react";
|
|
6
|
+
import Ut from "fuzzysearch";
|
|
7
|
+
import ft from "pluralize";
|
|
8
|
+
import me from "clsx";
|
|
9
|
+
import { MeiliSearch as mt } from "meilisearch";
|
|
10
|
+
import Tt from "lodash/debounce.js";
|
|
11
|
+
import Rt from "tinycolor2";
|
|
12
|
+
import Qe from "posthog-js";
|
|
13
|
+
const Yt = `@import"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap";/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */@layer properties{*,:before,:after,::backdrop{--tw-space-x-reverse:0;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-border-style:solid}vehicle-search,vehicle-search *,vehicle-search:before,vehicle-search:after,vehicle-search::backdrop{--tw-space-x-reverse:0;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-border-style:solid}:host,:host *,:host:before,:host:after,:host::backdrop{--tw-space-x-reverse:0;--tw-leading:initial;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-border-style:solid}}@layer theme{:root,:host{--vs-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--vs-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--vs-color-red-300:oklch(80.8% .114 19.571);--vs-color-red-500:oklch(63.7% .237 25.331);--vs-color-stone-200:oklch(92.3% .003 48.717);--vs-color-stone-400:oklch(70.9% .01 56.259);--vs-color-stone-600:oklch(44.4% .011 73.639);--vs-color-stone-900:oklch(21.6% .006 56.043);--vs-color-black:#000;--vs-color-white:#fff;--vs-spacing:.25rem;--vs-text-base:1rem;--vs-text-base--line-height: 1.5 ;--vs-font-weight-normal:400;--vs-font-weight-medium:500;--vs-font-weight-semibold:600;--vs-font-weight-bold:700;--vs-leading-normal:1.5;--vs-animate-spin:spin 1s linear infinite;--vs-default-transition-duration:.15s;--vs-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--vs-default-font-family:var(--vs-font-sans);--vs-default-mono-font-family:var(--vs-font-mono)}vehicle-search,:host{--vs-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--vs-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--vs-color-red-300:oklch(80.8% .114 19.571);--vs-color-red-500:oklch(63.7% .237 25.331);--vs-color-stone-200:oklch(92.3% .003 48.717);--vs-color-stone-400:oklch(70.9% .01 56.259);--vs-color-stone-600:oklch(44.4% .011 73.639);--vs-color-stone-900:oklch(21.6% .006 56.043);--vs-color-black:#000;--vs-color-white:#fff;--vs-spacing:.25rem;--vs-text-base:1rem;--vs-text-base--line-height: 1.5 ;--vs-font-weight-normal:400;--vs-font-weight-medium:500;--vs-font-weight-semibold:600;--vs-font-weight-bold:700;--vs-leading-normal:1.5;--vs-animate-spin:spin 1s linear infinite;--vs-default-transition-duration:.15s;--vs-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--vs-default-font-family:var(--vs-font-sans);--vs-default-mono-font-family:var(--vs-font-mono)}:host{--vs-font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--vs-font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--vs-color-red-300:oklch(80.8% .114 19.571);--vs-color-red-500:oklch(63.7% .237 25.331);--vs-color-stone-200:oklch(92.3% .003 48.717);--vs-color-stone-400:oklch(70.9% .01 56.259);--vs-color-stone-600:oklch(44.4% .011 73.639);--vs-color-stone-900:oklch(21.6% .006 56.043);--vs-color-black:#000;--vs-color-white:#fff;--vs-spacing:.25rem;--vs-text-base:1rem;--vs-text-base--line-height: 1.5 ;--vs-font-weight-normal:400;--vs-font-weight-medium:500;--vs-font-weight-semibold:600;--vs-font-weight-bold:700;--vs-leading-normal:1.5;--vs-animate-spin:spin 1s linear infinite;--vs-default-transition-duration:.15s;--vs-default-transition-timing-function:cubic-bezier(.4,0,.2,1);--vs-default-font-family:var(--vs-font-sans);--vs-default-mono-font-family:var(--vs-font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--vs-default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--vs-default-font-feature-settings,normal);font-variation-settings:var(--vs-default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--vs-default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--vs-default-mono-font-feature-settings,normal);font-variation-settings:var(--vs-default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}.partbot-mmyvs-container{--partbot-theme:0 188 125;--partbot-button-color:0 153 102;--partbot-button-hover-color:0 188 125;--partbot-button-label-color:255 255 255;--partbot-button-hover-label-color:255 255 255;--partbot-mobile-background-color:12 24 39;--partbot-button-border-radius:.375rem;--partbot-font-size:.875rem;--partbot-font-family:"Partbot","Inter",Helvetica,sans-serif;--partbot-padding:.5rem;--partbot-input-shadow:0 1px 2px 0 #0000000d;--partbot-input-border-color:229 231 235;--partbot-input-border-width:1px}[class*="vs:"]:before,[class*="vs:"]:after,[class^=vehicle-search-]:before,[class^=vehicle-search-]:after{box-sizing:border-box;--tw-content:"";border:0 solid}[class*="vs:"],[class^=vehicle-search-]{box-sizing:border-box;border:0 solid}.vehicle-search-select{text-transform:none;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}.partbot-mmyvs-container{top:calc(var(--vs-spacing)*0);right:calc(var(--vs-spacing)*0);left:calc(var(--vs-spacing)*0);z-index:10000;background-color:rgb(var(--partbot-mobile-background-color));padding:calc(var(--vs-spacing)*8);--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--vs-default-transition-timing-function));transition-duration:var(--tw-duration,var(--vs-default-transition-duration));--tw-duration:.5s;transition-duration:.5s;position:fixed}@media (min-width:48rem){.partbot-mmyvs-container{z-index:10;padding:calc(var(--vs-spacing)*0);--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);background-color:#0000;position:relative;top:auto;left:auto;right:auto}}.partbot-mmyvs-container{transform:translateY(-100vh)}@media (min-width:768px){.partbot-mmyvs-container{transform:translateY(0)}}.partbot-mmyvs-container.active{transform:translateY(0)}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;--tw-shadow:0 0 #0000;background-color:#fff;border-width:1px;border-color:#6a7282;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem}:is([type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#155dfc;outline:2px solid #0000}input::placeholder,textarea::placeholder{color:#6a7282;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em}::-webkit-date-and-time-value{text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-year-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-month-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-day-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-hour-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-minute-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-second-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-millisecond-field{padding-top:0;padding-bottom:0}::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{-webkit-print-color-adjust:exact;print-color-adjust:exact;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='oklch(55.1%25 0.027 264.364)' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;-webkit-print-color-adjust:unset;print-color-adjust:unset;padding-right:.75rem}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;print-color-adjust:exact;vertical-align:middle;-webkit-user-select:none;user-select:none;color:#155dfc;--tw-shadow:0 0 #0000;background-color:#fff;background-origin:border-box;border-width:1px;border-color:#6a7282;flex-shrink:0;width:1rem;height:1rem;padding:0;display:inline-block}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors:active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors:active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{background-color:currentColor;border-color:#0000}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}@media (forced-colors:active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{background-color:currentColor;border-color:#0000}[type=file]{background:unset;border-color:inherit;font-size:unset;line-height:inherit;border-width:0;border-radius:0;padding:0}[type=file]:focus{outline:1px solid buttontext;outline:1px auto -webkit-focus-ring-color}}@layer components;@layer utilities{.vs\\:pointer-events-auto{pointer-events:auto}.vs\\:pointer-events-none{pointer-events:none}.vs\\:sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.vs\\:absolute{position:absolute}.vs\\:fixed{position:fixed}.vs\\:relative{position:relative}.vs\\:inset-0{inset:calc(var(--vs-spacing)*0)}.vs\\:inset-y-0{inset-block:calc(var(--vs-spacing)*0)}.vs\\:right-0{right:calc(var(--vs-spacing)*0)}.vs\\:right-\\[calc\\(var\\(--partbot-font-size\\)\\*1\\.95\\)\\]{right:calc(var(--partbot-font-size)*1.95)}.vs\\:z-10{z-index:10}.vs\\:z-99999\\!{z-index:99999!important}.vs\\:m-0{margin:calc(var(--vs-spacing)*0)}.vs\\:mt-2{margin-top:calc(var(--vs-spacing)*2)}.vs\\:mt-4{margin-top:calc(var(--vs-spacing)*4)}.vs\\:mb-1{margin-bottom:calc(var(--vs-spacing)*1)}.vs\\:block{display:block}.vs\\:flex{display:flex}.vs\\:flex\\!{display:flex!important}.vs\\:grid{display:grid}.vs\\:inline-flex{display:inline-flex}.vs\\:inline-flex\\!{display:inline-flex!important}.vs\\:h-5{height:calc(var(--vs-spacing)*5)}.vs\\:h-\\[13px\\]{height:13px}.vs\\:h-\\[calc\\(var\\(--partbot-font-size\\)\\*0\\.9\\)\\]\\!{height:calc(var(--partbot-font-size)*.9)!important}.vs\\:h-full{height:100%}.vs\\:max-h-60\\!{max-height:calc(var(--vs-spacing)*60)!important}.vs\\:w-\\(--input-width\\){width:var(--input-width)}.vs\\:w-5{width:calc(var(--vs-spacing)*5)}.vs\\:w-\\[calc\\(var\\(--partbot-font-size\\)\\*0\\.9\\)\\]\\!{width:calc(var(--partbot-font-size)*.9)!important}.vs\\:w-auto\\!{width:auto!important}.vs\\:w-full{width:100%}.vs\\:w-full\\!{width:100%!important}.vs\\:shrink\\!{flex-shrink:1!important}.vs\\:shrink-0\\!{flex-shrink:0!important}.vs\\:animate-spin{animation:var(--vs-animate-spin)}.vs\\:cursor-default{cursor:default}.vs\\:cursor-pointer{cursor:pointer}.vs\\:appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.vs\\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.vs\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.vs\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.vs\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.vs\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.vs\\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.vs\\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.vs\\:flex-col{flex-direction:column}.vs\\:items-center{align-items:center}.vs\\:justify-between{justify-content:space-between}.vs\\:justify-center{justify-content:center}.vs\\:justify-end{justify-content:flex-end}.vs\\:gap-3{gap:calc(var(--vs-spacing)*3)}:where(.vs\\:space-x-1\\.5>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--vs-spacing)*1.5)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--vs-spacing)*1.5)*calc(1 - var(--tw-space-x-reverse)))}:where(.vs\\:space-x-\\[calc\\(var\\(--partbot-padding\\)\\*0\\.25\\)\\]>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--partbot-padding)*.25)*var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--partbot-padding)*.25)*calc(1 - var(--tw-space-x-reverse)))}.vs\\:overflow-auto{overflow:auto}.vs\\:overflow-hidden{overflow:hidden}.vs\\:rounded-\\(--partbot-button-border-radius\\){border-radius:var(--partbot-button-border-radius)}.vs\\:rounded-\\[min\\(var\\(--partbot-button-border-radius\\)\\,0\\.89rem\\)\\]{border-radius:min(var(--partbot-button-border-radius),.89rem)}.vs\\:border-none{--tw-border-style:none;border-style:none}.vs\\:bg-\\[rgb\\(var\\(--partbot-theme\\)\\)\\]{background-color:rgb(var(--partbot-theme))}.vs\\:bg-stone-900{background-color:var(--vs-color-stone-900)}.vs\\:bg-transparent{background-color:#0000}.vs\\:bg-white{background-color:var(--vs-color-white)}.vs\\:p-\\(--partbot-padding\\){padding:var(--partbot-padding)}.vs\\:p-2{padding:calc(var(--vs-spacing)*2)}.vs\\:px-1\\.5{padding-inline:calc(var(--vs-spacing)*1.5)}.vs\\:px-\\[calc\\(var\\(--partbot-padding\\)\\*1\\.3\\)\\]{padding-inline:calc(var(--partbot-padding)*1.3)}.vs\\:py-\\(--partbot-padding\\){padding-block:var(--partbot-padding)}.vs\\:py-1{padding-block:calc(var(--vs-spacing)*1)}.vs\\:pr-\\(--partbot-padding\\){padding-right:var(--partbot-padding)}.vs\\:pr-2{padding-right:calc(var(--vs-spacing)*2)}.vs\\:pr-10{padding-right:calc(var(--vs-spacing)*10)}.vs\\:pr-\\[calc\\(var\\(--partbot-padding\\)\\*1\\.3\\)\\]{padding-right:calc(var(--partbot-padding)*1.3)}.vs\\:pb-4{padding-bottom:calc(var(--vs-spacing)*4)}.vs\\:pl-\\[calc\\(var\\(--partbot-padding\\)\\*1\\.3\\)\\]{padding-left:calc(var(--partbot-padding)*1.3)}.vs\\:text-center{text-align:center}.vs\\:text-left{text-align:left}.vs\\:font-\\(family-name\\:--partbot-font-family\\){font-family:var(--partbot-font-family)}.vs\\:font-sans{font-family:var(--vs-font-sans)}.vs\\:text-base{font-size:var(--vs-text-base);line-height:var(--tw-leading,var(--vs-text-base--line-height))}.vs\\:text-\\(length\\:--partbot-font-size\\){font-size:var(--partbot-font-size)}.vs\\:text-\\[10px\\]{font-size:10px}.vs\\:leading-\\[calc\\(var\\(--partbot-font-size\\)\\*1\\.5\\)\\]{--tw-leading:calc(var(--partbot-font-size)*1.5);line-height:calc(var(--partbot-font-size)*1.5)}.vs\\:leading-none{--tw-leading:1;line-height:1}.vs\\:leading-normal{--tw-leading:var(--vs-leading-normal);line-height:var(--vs-leading-normal)}.vs\\:font-bold{--tw-font-weight:var(--vs-font-weight-bold);font-weight:var(--vs-font-weight-bold)}.vs\\:font-bold\\!{--tw-font-weight:var(--vs-font-weight-bold)!important;font-weight:var(--vs-font-weight-bold)!important}.vs\\:font-medium{--tw-font-weight:var(--vs-font-weight-medium);font-weight:var(--vs-font-weight-medium)}.vs\\:font-normal{--tw-font-weight:var(--vs-font-weight-normal);font-weight:var(--vs-font-weight-normal)}.vs\\:font-semibold{--tw-font-weight:var(--vs-font-weight-semibold);font-weight:var(--vs-font-weight-semibold)}.vs\\:whitespace-pre-wrap{white-space:pre-wrap}.vs\\:text-\\[rgb\\(var\\(--partbot-button-label-color\\)\\)\\]{color:rgb(var(--partbot-button-label-color))}.vs\\:text-\\[rgb\\(var\\(--partbot-theme\\)\\)\\]{color:rgb(var(--partbot-theme))}.vs\\:text-\\[rgb\\(var\\(--partbot-theme\\)\\)\\]\\!{color:rgb(var(--partbot-theme))!important}.vs\\:text-black{color:var(--vs-color-black)}.vs\\:text-red-300{color:var(--vs-color-red-300)}.vs\\:text-red-300\\!{color:var(--vs-color-red-300)!important}.vs\\:text-stone-400{color:var(--vs-color-stone-400)}.vs\\:text-stone-900{color:var(--vs-color-stone-900)}.vs\\:text-white{color:var(--vs-color-white)}.vs\\:no-underline{text-decoration-line:none}.vs\\:opacity-0{opacity:0}.vs\\:opacity-75{opacity:.75}.vs\\:shadow-\\(--partbot-input-shadow\\){--tw-shadow:var(--partbot-input-shadow);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.vs\\:shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.vs\\:ring-1{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.vs\\:ring-stone-200{--tw-ring-color:var(--vs-color-stone-200)}.vs\\:transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--vs-default-transition-timing-function));transition-duration:var(--tw-duration,var(--vs-default-transition-duration))}.vs\\:transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--vs-default-transition-timing-function));transition-duration:var(--tw-duration,var(--vs-default-transition-duration))}.vs\\:duration-300{--tw-duration:.3s;transition-duration:.3s}.vs\\:outline-none{--tw-outline-style:none;outline-style:none}.vs\\:placeholder\\:text-stone-600::placeholder{color:var(--vs-color-stone-600)}@media (hover:hover){.vs\\:hover\\:border-none:hover{--tw-border-style:none;border-style:none}.vs\\:hover\\:bg-theme:hover{background-color:oklch(from rgb(var(--partbot-theme))l c h/<alpha-value>)}.vs\\:hover\\:text-button-label:hover{color:oklch(from rgb(var(--partbot-button-label-color))l c h/<alpha-value>)}.vs\\:hover\\:text-red-500:hover{color:var(--vs-color-red-500)}.vs\\:hover\\:opacity-100:hover{opacity:1}.vs\\:hover\\:outline-none:hover{--tw-outline-style:none;outline-style:none}}.vs\\:focus\\:border-\\[rgb\\(var\\(--partbot-theme\\)\\)\\]:focus{border-color:rgb(var(--partbot-theme))}.vs\\:focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.vs\\:focus\\:ring-\\[rgb\\(var\\(--partbot-theme\\)\\)\\]:focus{--tw-ring-color:rgb(var(--partbot-theme))}.vs\\:focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.vs\\:disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.vs\\:disabled\\:text-stone-400\\!:disabled{color:var(--vs-color-stone-400)!important}.vs\\:disabled\\:opacity-100\\!:disabled{opacity:1!important}.vs\\:disabled\\:placeholder\\:text-stone-400:disabled::placeholder{color:var(--vs-color-stone-400)}@media (min-width:40rem){.vs\\:sm\\:text-\\(length\\:--partbot-font-size\\){font-size:var(--partbot-font-size)}}@media (min-width:48rem){.vs\\:md\\:col-span-3{grid-column:span 3/span 3}.vs\\:md\\:mt-3{margin-top:calc(var(--vs-spacing)*3)}.vs\\:md\\:hidden{display:none}.vs\\:md\\:hidden\\!{display:none!important}.vs\\:md\\:max-w-\\[400px\\]{max-width:400px}.vs\\:md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.vs\\:md\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.vs\\:md\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.vs\\:md\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.vs\\:md\\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.vs\\:md\\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.vs\\:md\\:items-end{align-items:flex-end}.vs\\:md\\:justify-center{justify-content:center}.vs\\:md\\:justify-end{justify-content:flex-end}.vs\\:md\\:gap-5{gap:calc(var(--vs-spacing)*5)}.vs\\:md\\:pr-1\\.5{padding-right:calc(var(--vs-spacing)*1.5)}}@media (min-width:64rem){.vs\\:lg\\:col-span-1{grid-column:span 1/span 1}.vs\\:lg\\:mx-auto{margin-inline:auto}.vs\\:lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.vs\\:lg\\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.vs\\:lg\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.vs\\:lg\\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.vs\\:lg\\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.vs\\:lg\\:grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}}.vehicle-search-btn{cursor:pointer;justify-content:center;align-items:center;display:inline-flex;position:relative!important}:where(.vehicle-search-btn>:not(:last-child)){--tw-space-x-reverse:0!important;margin-inline-start:calc(calc(var(--vs-spacing)*2)*var(--tw-space-x-reverse))!important;margin-inline-end:calc(calc(var(--vs-spacing)*2)*calc(1 - var(--tw-space-x-reverse)))!important}.vehicle-search-btn{border-radius:var(--partbot-button-border-radius);border-style:var(--tw-border-style);background-color:rgb(var(--partbot-button-color));padding-inline:var(--partbot-padding);padding-block:var(--partbot-padding);font-family:var(--partbot-font-family);font-size:var(--partbot-font-size);--tw-leading:calc(var(--partbot-font-size)*1.5);line-height:calc(var(--partbot-font-size)*1.5);--tw-font-weight:var(--vs-font-weight-medium);font-weight:var(--vs-font-weight-medium);white-space:nowrap;color:rgb(var(--partbot-button-label-color));--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--vs-default-transition-timing-function));transition-duration:var(--tw-duration,var(--vs-default-transition-duration));border-width:1px;border-color:#0000;text-decoration-line:none}@media (hover:hover){.vehicle-search-btn:hover{background-color:rgb(var(--partbot-button-hover-color));color:rgb(var(--partbot-button-hover-label-color))}}.vehicle-search-btn:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);--tw-ring-color:rgb(var(--partbot-theme));--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-outline-style:none;outline-style:none}.vehicle-search-btn:disabled{pointer-events:none;opacity:.5}.vehicle-search-btn>*{pointer-events:none}.partbot-input-border{border-width:var(--partbot-input-border-width);border-color:rgb(var(--partbot-input-border-color));border-style:solid}}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@keyframes spin{to{transform:rotate(360deg)}}`;
|
|
14
|
+
function Zt({ className: h }) {
|
|
15
|
+
return /* @__PURE__ */ a("span", { className: h, children: /* @__PURE__ */ a(
|
|
16
16
|
"svg",
|
|
17
17
|
{
|
|
18
18
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -23,7 +23,7 @@ function Wt({ className: u }) {
|
|
|
23
23
|
width: "auto",
|
|
24
24
|
height: "100%"
|
|
25
25
|
},
|
|
26
|
-
children: /* @__PURE__ */
|
|
26
|
+
children: /* @__PURE__ */ I("g", { children: [
|
|
27
27
|
/* @__PURE__ */ a(
|
|
28
28
|
"rect",
|
|
29
29
|
{
|
|
@@ -99,11 +99,11 @@ function Wt({ className: u }) {
|
|
|
99
99
|
}
|
|
100
100
|
) });
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function Je({ className: h = "" }) {
|
|
103
103
|
return /* @__PURE__ */ a(
|
|
104
104
|
"svg",
|
|
105
105
|
{
|
|
106
|
-
className:
|
|
106
|
+
className: h,
|
|
107
107
|
xmlns: "http://www.w3.org/2000/svg",
|
|
108
108
|
width: "32",
|
|
109
109
|
height: "32",
|
|
@@ -113,85 +113,85 @@ function at({ className: u = "" }) {
|
|
|
113
113
|
}
|
|
114
114
|
);
|
|
115
115
|
}
|
|
116
|
-
function
|
|
117
|
-
label:
|
|
118
|
-
items:
|
|
119
|
-
selected:
|
|
120
|
-
refine:
|
|
121
|
-
showPopular:
|
|
122
|
-
bgDark:
|
|
123
|
-
sortOptions:
|
|
124
|
-
showLabel:
|
|
116
|
+
function oe({
|
|
117
|
+
label: h,
|
|
118
|
+
items: f,
|
|
119
|
+
selected: p,
|
|
120
|
+
refine: J,
|
|
121
|
+
showPopular: L,
|
|
122
|
+
bgDark: X,
|
|
123
|
+
sortOptions: Y = !0,
|
|
124
|
+
showLabel: T = !1,
|
|
125
125
|
isMobile: K = !1,
|
|
126
126
|
loading: Z = !1,
|
|
127
|
-
shouldBeActive:
|
|
127
|
+
shouldBeActive: B = !1
|
|
128
128
|
// True when parent fields are selected and this field tried to load
|
|
129
129
|
}) {
|
|
130
|
-
const [
|
|
131
|
-
S(
|
|
132
|
-
},
|
|
133
|
-
|
|
130
|
+
const [pe, m] = N(""), [_, S] = N(p || null), ve = (l) => {
|
|
131
|
+
S(l), m(""), !(l && l.value === (p == null ? void 0 : p.value)) && J(l);
|
|
132
|
+
}, ne = (l) => {
|
|
133
|
+
l.preventDefault(), l.stopPropagation(), m(""), S(null), J("");
|
|
134
134
|
};
|
|
135
|
-
|
|
136
|
-
m(""), S(
|
|
137
|
-
}, [
|
|
138
|
-
let
|
|
139
|
-
|
|
140
|
-
String(
|
|
141
|
-
|
|
142
|
-
...
|
|
143
|
-
value:
|
|
144
|
-
refinement:
|
|
135
|
+
P(() => {
|
|
136
|
+
m(""), S(p || null);
|
|
137
|
+
}, [p, f]);
|
|
138
|
+
let ie = /* @__PURE__ */ new Set(), w = [];
|
|
139
|
+
f && (f.forEach((l) => {
|
|
140
|
+
String(l.value).split(/,(?![^(]*\))/).forEach((j) => {
|
|
141
|
+
j = j.trim(), j && Ut(pe, j.toLowerCase()) && !ie.has(j.toLowerCase()) && (ie.add(j.toLowerCase()), w.push({
|
|
142
|
+
...l,
|
|
143
|
+
value: j,
|
|
144
|
+
refinement: l.value
|
|
145
145
|
}));
|
|
146
146
|
});
|
|
147
|
-
}),
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
(
|
|
151
|
-
),
|
|
152
|
-
(
|
|
153
|
-
),
|
|
154
|
-
const
|
|
155
|
-
return /* @__PURE__ */
|
|
156
|
-
|
|
147
|
+
}), w.length === 0 && (w = f));
|
|
148
|
+
const V = w.filter((l) => l.popularity > 0).slice(0, 11);
|
|
149
|
+
Y && (w = w.filter(
|
|
150
|
+
(l) => !V.includes(l)
|
|
151
|
+
), w.sort(
|
|
152
|
+
(l, g) => l.value.localeCompare(g.value, "en", { numeric: !0 })
|
|
153
|
+
), w = V.concat(w));
|
|
154
|
+
const be = !w || w.length === 0;
|
|
155
|
+
return /* @__PURE__ */ I("div", { className: "vs:relative vs:flex vs:flex-col", children: [
|
|
156
|
+
T && /* @__PURE__ */ a(
|
|
157
157
|
"span",
|
|
158
158
|
{
|
|
159
|
-
className: `${
|
|
160
|
-
children:
|
|
159
|
+
className: `${X ? "vs:text-white" : "vs:text-black"} vs:mb-1 vs:block vs:text-(length:--partbot-font-size) vs:leading-[calc(var(--partbot-font-size)*1.5)] vs:font-medium vs:font-(family-name:--partbot-font-family)`,
|
|
160
|
+
children: h
|
|
161
161
|
}
|
|
162
162
|
),
|
|
163
|
-
K && /* @__PURE__ */
|
|
164
|
-
/* @__PURE__ */
|
|
163
|
+
K && /* @__PURE__ */ I("div", { className: "vs:relative vs:flex vs:flex-col", children: [
|
|
164
|
+
/* @__PURE__ */ I(
|
|
165
165
|
"select",
|
|
166
166
|
{
|
|
167
|
-
onChange: (
|
|
168
|
-
const g =
|
|
169
|
-
(
|
|
167
|
+
onChange: (l) => {
|
|
168
|
+
const g = w.find(
|
|
169
|
+
(j) => j.value.toString() === l.target.value.toString()
|
|
170
170
|
);
|
|
171
|
-
g &&
|
|
171
|
+
g && ve(g);
|
|
172
172
|
},
|
|
173
173
|
className: "vehicle-search-select vs:relative vs:w-full vs:cursor-default vs:overflow-hidden vs:rounded-(--partbot-button-border-radius) partbot-input-border vs:bg-white vs:py-(--partbot-padding) vs:pl-[calc(var(--partbot-padding)*1.3)] vs:pr-10 vs:text-left vs:shadow-(--partbot-input-shadow) vs:focus:border-[rgb(var(--partbot-theme))] vs:focus:outline-none vs:focus:ring-1 vs:focus:ring-[rgb(var(--partbot-theme))] vs:disabled:opacity-100! vs:disabled:text-stone-400! vs:sm:text-(length:--partbot-font-size) vs:font-(family-name:--partbot-font-family) vs:text-(length:--partbot-font-size) vs:leading-[calc(var(--partbot-font-size)*1.5)]",
|
|
174
174
|
tabIndex: -1,
|
|
175
|
-
disabled: !(
|
|
175
|
+
disabled: !(w && w.length),
|
|
176
176
|
value: _ ? _.value : "",
|
|
177
177
|
children: [
|
|
178
|
-
/* @__PURE__ */ a("option", { value: "", disabled: !0, children:
|
|
179
|
-
|
|
180
|
-
/* @__PURE__ */ a("optgroup", { label: `Popular ${
|
|
181
|
-
/* @__PURE__ */ a("optgroup", { label: `All ${
|
|
182
|
-
(
|
|
183
|
-
(g) => g.value ===
|
|
178
|
+
/* @__PURE__ */ a("option", { value: "", disabled: !0, children: h }),
|
|
179
|
+
V.length > 0 ? /* @__PURE__ */ I(Ue, { children: [
|
|
180
|
+
/* @__PURE__ */ a("optgroup", { label: `Popular ${ft(h)}`, children: V.map((l) => /* @__PURE__ */ a("option", { value: l.refinement, children: l.value }, l.value)) }),
|
|
181
|
+
/* @__PURE__ */ a("optgroup", { label: `All ${ft(h)}`, children: w.filter(
|
|
182
|
+
(l) => !V.some(
|
|
183
|
+
(g) => g.value === l.value
|
|
184
184
|
)
|
|
185
|
-
).map((
|
|
186
|
-
] }) :
|
|
185
|
+
).map((l) => /* @__PURE__ */ a("option", { value: l.refinement, children: l.value }, l.value)) })
|
|
186
|
+
] }) : w.map((l) => /* @__PURE__ */ a("option", { value: l.refinement, children: l.value }, l.value))
|
|
187
187
|
]
|
|
188
188
|
}
|
|
189
189
|
),
|
|
190
|
-
Z && /* @__PURE__ */ a("div", { className: "vs:absolute vs:inset-y-0 vs:right-[calc(var(--partbot-font-size)*1.95)] vs:items-center vs:pr-(--partbot-padding) vs:text-[rgb(var(--partbot-theme))]! vs:pointer-events-none vs:flex vs:justify-center", children: /* @__PURE__ */ a(
|
|
190
|
+
Z && /* @__PURE__ */ a("div", { className: "vs:absolute vs:inset-y-0 vs:right-[calc(var(--partbot-font-size)*1.95)] vs:items-center vs:pr-(--partbot-padding) vs:text-[rgb(var(--partbot-theme))]! vs:pointer-events-none vs:flex vs:justify-center", children: /* @__PURE__ */ a(Je, { className: "vs:h-[calc(var(--partbot-font-size)*0.9)]! vs:w-[calc(var(--partbot-font-size)*0.9)]! vs:animate-spin vs:text-[rgb(var(--partbot-theme))]!" }) }),
|
|
191
191
|
!Z && (_ == null ? void 0 : _.value) && /* @__PURE__ */ a(
|
|
192
192
|
"button",
|
|
193
193
|
{
|
|
194
|
-
onClick:
|
|
194
|
+
onClick: ne,
|
|
195
195
|
tabIndex: -1,
|
|
196
196
|
className: "vs:absolute vs:inset-y-0 vs:right-[calc(var(--partbot-font-size)*1.95)] vs:items-center vs:pr-(--partbot-padding) vs:text-red-300 vs:hover:text-red-500 vs:bg-transparent vs:border-none vs:outline-none vs:p-(--partbot-padding) vs:text-(length:--partbot-font-size) vs:leading-[calc(var(--partbot-font-size)*1.5)] vs:font-medium vs:transition vs:pointer-events-auto vs:flex vs:justify-center",
|
|
197
197
|
children: /* @__PURE__ */ a(
|
|
@@ -209,33 +209,33 @@ function ne({
|
|
|
209
209
|
}
|
|
210
210
|
)
|
|
211
211
|
] }),
|
|
212
|
-
!K && /* @__PURE__ */
|
|
213
|
-
|
|
212
|
+
!K && /* @__PURE__ */ I(
|
|
213
|
+
Lt,
|
|
214
214
|
{
|
|
215
215
|
value: _ || null,
|
|
216
|
-
onChange:
|
|
217
|
-
virtual: { options:
|
|
218
|
-
disabled:
|
|
216
|
+
onChange: ve,
|
|
217
|
+
virtual: { options: w },
|
|
218
|
+
disabled: be,
|
|
219
219
|
immediate: !0,
|
|
220
220
|
children: [
|
|
221
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ I("div", { className: "vs:flex vs:h-full", children: [
|
|
222
222
|
/* @__PURE__ */ a(
|
|
223
|
-
|
|
223
|
+
Vt,
|
|
224
224
|
{
|
|
225
225
|
autoComplete: "off",
|
|
226
226
|
spellCheck: "false",
|
|
227
|
-
placeholder:
|
|
227
|
+
placeholder: be && B && !Z ? "N/A" : h,
|
|
228
228
|
className: "vs:w-full vs:cursor-default vs:rounded-(--partbot-button-border-radius) partbot-input-border vs:bg-white vs:py-(--partbot-padding) vs:pl-[calc(var(--partbot-padding)*1.3)] vs:pr-10 vs:text-left vs:shadow-(--partbot-input-shadow) vs:focus:border-[rgb(var(--partbot-theme))] vs:focus:outline-none vs:focus:ring-1 vs:focus:ring-[rgb(var(--partbot-theme))] vs:text-(length:--partbot-font-size) vs:leading-[calc(var(--partbot-font-size)*1.5)] vs:font-(family-name:--partbot-font-family) vs:text-stone-900 vs:placeholder:text-stone-600 vs:disabled:placeholder:text-stone-400 vs:disabled:cursor-not-allowed",
|
|
229
|
-
displayValue: (
|
|
230
|
-
onChange: (
|
|
231
|
-
title:
|
|
229
|
+
displayValue: (l) => (l == null ? void 0 : l.value) || "",
|
|
230
|
+
onChange: (l) => m(l.target.value),
|
|
231
|
+
title: h
|
|
232
232
|
}
|
|
233
233
|
),
|
|
234
|
-
/* @__PURE__ */
|
|
234
|
+
/* @__PURE__ */ I("div", { className: "vs:absolute vs:pointer-events-none vs:h-full vs:right-0 vs:flex vs:space-x-[calc(var(--partbot-padding)*0.25)] vs:items-center", children: [
|
|
235
235
|
(_ == null ? void 0 : _.value) && /* @__PURE__ */ a(
|
|
236
236
|
"button",
|
|
237
237
|
{
|
|
238
|
-
onClick:
|
|
238
|
+
onClick: ne,
|
|
239
239
|
tabIndex: -1,
|
|
240
240
|
className: "vs:inset-y-0 vs:pr-2 vs:text-red-300 vs:hover:text-red-500 vs:bg-transparent vs:border-none vs:outline-none vs:p-2 vs:text-(length:--partbot-font-size) vs:leading-[calc(var(--partbot-font-size)*1.5)] vs:font-medium vs:transition vs:pointer-events-auto vs:flex vs:items-center vs:justify-center vs:cursor-pointer",
|
|
241
241
|
children: /* @__PURE__ */ a(
|
|
@@ -252,7 +252,7 @@ function ne({
|
|
|
252
252
|
)
|
|
253
253
|
}
|
|
254
254
|
),
|
|
255
|
-
/* @__PURE__ */ a(
|
|
255
|
+
/* @__PURE__ */ a(Dt, { className: "vs:inset-y-0 vs:flex vs:items-center vs:pr-[calc(var(--partbot-padding)*1.3)] vs:pointer-events-auto vs:bg-transparent vs:border-none vs:outline-none", children: Z ? /* @__PURE__ */ a(Je, { className: "vs:h-[calc(var(--partbot-font-size)*0.9)]! vs:w-[calc(var(--partbot-font-size)*0.9)]! vs:text-stone-400 vs:animate-spin" }) : /* @__PURE__ */ a(
|
|
256
256
|
"svg",
|
|
257
257
|
{
|
|
258
258
|
className: "vs:h-[calc(var(--partbot-font-size)*0.9)]! vs:w-[calc(var(--partbot-font-size)*0.9)]! vs:text-stone-400",
|
|
@@ -267,39 +267,39 @@ function ne({
|
|
|
267
267
|
] })
|
|
268
268
|
] }),
|
|
269
269
|
/* @__PURE__ */ a(
|
|
270
|
-
|
|
270
|
+
Ft,
|
|
271
271
|
{
|
|
272
272
|
portal: !0,
|
|
273
273
|
anchor: "bottom start",
|
|
274
274
|
className: "vs:w-(--input-width) vs:z-99999! vs:max-h-60! vs:overflow-auto vs:rounded-[min(var(--partbot-button-border-radius),0.89rem)] vs:bg-white vs:py-1 vs:text-base vs:shadow-lg vs:ring-1 vs:ring-stone-200 vs:focus:outline-none vs:sm:text-(length:--partbot-font-size) empty:vs:invisible vs:mt-2",
|
|
275
|
-
children: ({ option:
|
|
276
|
-
const g =
|
|
277
|
-
(
|
|
275
|
+
children: ({ option: l }) => {
|
|
276
|
+
const g = l && V.some(
|
|
277
|
+
(j) => j.value === l.value
|
|
278
278
|
);
|
|
279
279
|
return /* @__PURE__ */ a(
|
|
280
|
-
|
|
280
|
+
Ot,
|
|
281
281
|
{
|
|
282
|
-
value:
|
|
283
|
-
className: ({ focus:
|
|
282
|
+
value: l,
|
|
283
|
+
className: ({ focus: j }) => me(
|
|
284
284
|
"vs:group vs:relative vs:w-full vs:cursor-default vs:py-(--partbot-padding) vs:px-[calc(var(--partbot-padding)*1.3)] vs:text-left vs:border-none",
|
|
285
|
-
|
|
285
|
+
j ? "vs:bg-[rgb(var(--partbot-theme))] vs:text-[rgb(var(--partbot-button-label-color))]" : "vs:bg-white vs:text-stone-900 vs:hover:bg-theme vs:hover:text-button-label",
|
|
286
286
|
g && "vs:font-bold!"
|
|
287
287
|
),
|
|
288
|
-
children: ({ selected:
|
|
288
|
+
children: ({ selected: j }) => /* @__PURE__ */ I("div", { className: "vs:flex vs:w-full vs:items-center vs:justify-between", children: [
|
|
289
289
|
/* @__PURE__ */ a(
|
|
290
290
|
"span",
|
|
291
291
|
{
|
|
292
|
-
className:
|
|
293
|
-
|
|
292
|
+
className: me(
|
|
293
|
+
l.value === (p == null ? void 0 : p.value) ? "vs:font-semibold" : "vs:font-normal",
|
|
294
294
|
"vs:block vs:font-(family-name:--partbot-font-family) vs:whitespace-pre-wrap vs:text-left vs:text-(length:--partbot-font-size) vs:leading-none"
|
|
295
295
|
),
|
|
296
|
-
children:
|
|
296
|
+
children: l.value
|
|
297
297
|
}
|
|
298
298
|
),
|
|
299
|
-
|
|
299
|
+
l.value === (p == null ? void 0 : p.value) && /* @__PURE__ */ a(
|
|
300
300
|
"span",
|
|
301
301
|
{
|
|
302
|
-
className:
|
|
302
|
+
className: me(
|
|
303
303
|
"vs:text-[rgb(var(--partbot-theme))]",
|
|
304
304
|
"vs:flex vs:items-center group-vs:hover:text-white"
|
|
305
305
|
),
|
|
@@ -328,71 +328,71 @@ function ne({
|
|
|
328
328
|
)
|
|
329
329
|
] });
|
|
330
330
|
}
|
|
331
|
-
const
|
|
331
|
+
const Ht = "3.0.37";
|
|
332
332
|
console.info(
|
|
333
|
-
`Vehicle Search v${
|
|
333
|
+
`Vehicle Search v${Ht} powered by Partbot https://mmyvs.partbot.io`
|
|
334
334
|
);
|
|
335
|
-
function
|
|
336
|
-
const
|
|
337
|
-
return
|
|
338
|
-
const [
|
|
339
|
-
if (
|
|
340
|
-
const
|
|
341
|
-
if (
|
|
342
|
-
const Z =
|
|
343
|
-
|
|
335
|
+
function Oe(h = [], f = []) {
|
|
336
|
+
const p = [];
|
|
337
|
+
return h.forEach((J) => {
|
|
338
|
+
const [L, ...X] = J.split(":"), Y = X.join(":");
|
|
339
|
+
if (Y.includes(" > ")) {
|
|
340
|
+
const T = Y.split(" > "), K = T[T.length - 1].trim();
|
|
341
|
+
if (L !== "make" && T.length >= 2) {
|
|
342
|
+
const Z = T[0].trim();
|
|
343
|
+
p.push(`make = "${Z}"`);
|
|
344
344
|
}
|
|
345
|
-
|
|
345
|
+
p.push(`${L} = "${K}"`);
|
|
346
346
|
} else
|
|
347
|
-
|
|
348
|
-
}),
|
|
349
|
-
|
|
350
|
-
}),
|
|
347
|
+
p.push(`${L} = "${Y}"`);
|
|
348
|
+
}), f.forEach((J) => {
|
|
349
|
+
p.push(J);
|
|
350
|
+
}), p.length > 0 ? p.join(" AND ") : null;
|
|
351
351
|
}
|
|
352
|
-
function
|
|
353
|
-
return String(
|
|
352
|
+
function O(h) {
|
|
353
|
+
return String(h || "").normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toUpperCase().trim().replace(/\s+/g, " ");
|
|
354
354
|
}
|
|
355
|
-
function
|
|
356
|
-
return String(
|
|
355
|
+
function xe(h) {
|
|
356
|
+
return String(h || "").split(">").pop().trim();
|
|
357
357
|
}
|
|
358
|
-
function
|
|
359
|
-
return !
|
|
360
|
-
(
|
|
361
|
-
) ?
|
|
362
|
-
(
|
|
358
|
+
function We(h, f, p) {
|
|
359
|
+
return !p || p.size === 0 || !Array.isArray(h) || !h.some(
|
|
360
|
+
(L) => p.has(O(f(L)))
|
|
361
|
+
) ? h : h.filter(
|
|
362
|
+
(L) => p.has(O(f(L)))
|
|
363
363
|
);
|
|
364
364
|
}
|
|
365
|
-
function
|
|
366
|
-
apiKey:
|
|
367
|
-
makes:
|
|
368
|
-
models:
|
|
369
|
-
vehicleScopeTokens:
|
|
370
|
-
yearTokens:
|
|
371
|
-
callbackUrl:
|
|
372
|
-
layout:
|
|
373
|
-
fields:
|
|
365
|
+
function Kt({
|
|
366
|
+
apiKey: h,
|
|
367
|
+
makes: f = "",
|
|
368
|
+
models: p = "",
|
|
369
|
+
vehicleScopeTokens: J = "",
|
|
370
|
+
yearTokens: L = "",
|
|
371
|
+
callbackUrl: X = "",
|
|
372
|
+
layout: Y = "row",
|
|
373
|
+
fields: T,
|
|
374
374
|
fieldPrefix: K = "",
|
|
375
375
|
showBranding: Z = !0,
|
|
376
|
-
showLabels:
|
|
377
|
-
mobileFullWidthButton:
|
|
376
|
+
showLabels: B = !1,
|
|
377
|
+
mobileFullWidthButton: pe = !0,
|
|
378
378
|
mobileDrawer: m = !0,
|
|
379
379
|
modifyQueryString: _ = !0,
|
|
380
380
|
onChange: S,
|
|
381
|
-
buttonLabel:
|
|
382
|
-
showButton:
|
|
383
|
-
onSubmit:
|
|
384
|
-
store:
|
|
385
|
-
useStoreVehicles:
|
|
386
|
-
fieldOrder:
|
|
381
|
+
buttonLabel: ve = "Search",
|
|
382
|
+
showButton: ne = !0,
|
|
383
|
+
onSubmit: ie,
|
|
384
|
+
store: w,
|
|
385
|
+
useStoreVehicles: V = !0,
|
|
386
|
+
fieldOrder: be = "MMY",
|
|
387
387
|
// "MMY" (Make→Model→Year) or "YMM" (Year→Make→Model)
|
|
388
|
-
enableFeatureFlags:
|
|
388
|
+
enableFeatureFlags: l = !1,
|
|
389
389
|
// Use api.cartbot.io instead of api.partbot.io
|
|
390
390
|
yearOptional: g = !1,
|
|
391
391
|
// Make year selection optional, only requiring make + model
|
|
392
|
-
mobileButtonLabel:
|
|
392
|
+
mobileButtonLabel: j = "Select Vehicle"
|
|
393
393
|
// Label for mobile drawer trigger button
|
|
394
394
|
}) {
|
|
395
|
-
const
|
|
395
|
+
const ke = W(null), Ce = W(null), we = W(null), y = W(null), D = W(null), ee = W(null), te = W(null), k = W(null), _e = W(null), R = W(!1), M = be === "YMM", [Ee, Te] = N([]), [je, se] = N([]), [ye, Me] = N([]), [Xe, Ne] = N([]), [Ge, Be] = N([]), [et, Pe] = N([]), [tt, Ie] = N([]), [rt, Le] = N([]), bt = W([]), [ge, ze] = N([]), [e, q] = N({
|
|
396
396
|
make: null,
|
|
397
397
|
model: null,
|
|
398
398
|
year: null,
|
|
@@ -401,41 +401,34 @@ function Xt({
|
|
|
401
401
|
variant: null,
|
|
402
402
|
engine: null,
|
|
403
403
|
engine_capacity: null
|
|
404
|
-
}), [
|
|
404
|
+
}), [wt, Re] = N(!1), ot = W([
|
|
405
405
|
"body",
|
|
406
406
|
"series",
|
|
407
407
|
"variant",
|
|
408
408
|
"engine",
|
|
409
409
|
"engine_capacity"
|
|
410
|
-
]),
|
|
411
|
-
|
|
410
|
+
]), Ve = W(
|
|
411
|
+
T && T.length && ot.current ? T.split(",").filter((t) => {
|
|
412
412
|
var r;
|
|
413
|
-
return (r =
|
|
413
|
+
return (r = ot.current) == null ? void 0 : r.includes(t);
|
|
414
414
|
}) : null
|
|
415
|
-
), [
|
|
416
|
-
|
|
417
|
-
),
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
}
|
|
427
|
-
}), { byMake: t, byMakeYear: r });
|
|
428
|
-
}, [Te]), Ce = He(
|
|
429
|
-
() => new Set(Array.from(fe.byMake.keys())),
|
|
430
|
-
[fe]
|
|
431
|
-
), [te, Mt] = z(!1);
|
|
432
|
-
j(() => {
|
|
415
|
+
), [at, Se] = N({}), ae = qe(() => !f || typeof f != "string" ? /* @__PURE__ */ new Set() : new Set(
|
|
416
|
+
f.trim().split(",").map((t) => O(t)).filter(Boolean)
|
|
417
|
+
), [f]), le = qe(
|
|
418
|
+
() => new Set(
|
|
419
|
+
Object.keys(at || {}).map(
|
|
420
|
+
(t) => O(t)
|
|
421
|
+
)
|
|
422
|
+
),
|
|
423
|
+
[at]
|
|
424
|
+
), [re, yt] = N(!1);
|
|
425
|
+
P(() => {
|
|
433
426
|
const t = navigator.userAgent;
|
|
434
|
-
|
|
427
|
+
yt(
|
|
435
428
|
/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
436
429
|
t
|
|
437
430
|
)
|
|
438
|
-
),
|
|
431
|
+
), Qe.__loaded || Qe.init("phc_mLZkVvweXDfwCPYS7kSCxoAxgQUkw8fgyDiplKnleGw", {
|
|
439
432
|
api_host: "https://app.posthog.com",
|
|
440
433
|
autocapture: !1,
|
|
441
434
|
capture_pageview: !1,
|
|
@@ -443,21 +436,21 @@ function Xt({
|
|
|
443
436
|
disable_session_recording: !1
|
|
444
437
|
});
|
|
445
438
|
}, []);
|
|
446
|
-
const [
|
|
447
|
-
if (!
|
|
439
|
+
const [ue, xt] = N({}), [Jt, kt] = N(""), nt = F(async () => {
|
|
440
|
+
if (!h)
|
|
448
441
|
return;
|
|
449
|
-
const r = `${
|
|
442
|
+
const r = `${l ? "https://api.cartbot.io" : "https://api.partbot.io"}/v1/vehicles/auth`;
|
|
450
443
|
try {
|
|
451
444
|
const n = await fetch(r, {
|
|
452
445
|
method: "POST",
|
|
453
446
|
headers: {
|
|
454
447
|
"Content-Type": "application/json",
|
|
455
|
-
Authorization: `Bearer ${
|
|
448
|
+
Authorization: `Bearer ${h}`
|
|
456
449
|
},
|
|
457
450
|
body: JSON.stringify(
|
|
458
451
|
(() => {
|
|
459
|
-
const
|
|
460
|
-
return
|
|
452
|
+
const u = { use_store_vehicles: V };
|
|
453
|
+
return w && (u.store = w), u;
|
|
461
454
|
})()
|
|
462
455
|
)
|
|
463
456
|
});
|
|
@@ -467,82 +460,78 @@ function Xt({
|
|
|
467
460
|
merchant: o,
|
|
468
461
|
vehicle_makes: d,
|
|
469
462
|
vehicle_models: i,
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
vehicle_scope_source: k,
|
|
474
|
-
meilisearch_search_key: b,
|
|
475
|
-
meilisearch_index_name: T,
|
|
476
|
-
algolia_search_key: X,
|
|
463
|
+
meilisearch_search_key: c,
|
|
464
|
+
meilisearch_index_name: s,
|
|
465
|
+
algolia_search_key: v,
|
|
477
466
|
// Fallback for backward compatibility
|
|
478
|
-
algolia_index_name:
|
|
467
|
+
algolia_index_name: z,
|
|
479
468
|
// Fallback for backward compatibility
|
|
480
|
-
store_index_name:
|
|
481
|
-
store_popular_makes:
|
|
469
|
+
store_index_name: b,
|
|
470
|
+
store_popular_makes: $,
|
|
482
471
|
// Array of popular make values for this store (from PostHog)
|
|
483
|
-
store_popular_models:
|
|
472
|
+
store_popular_models: C
|
|
484
473
|
// Object mapping makes to popular models: { "TOYOTA": ["HILUX", "LANDCRUISER"], ... }
|
|
485
|
-
} = await n.json(),
|
|
486
|
-
|
|
487
|
-
...
|
|
488
|
-
refinement:
|
|
489
|
-
})),
|
|
474
|
+
} = await n.json(), A = d || [], E = i;
|
|
475
|
+
Ce.current = o, we.current = A.map((u) => ({
|
|
476
|
+
...u,
|
|
477
|
+
refinement: u.value
|
|
478
|
+
})), V && E ? typeof E == "object" && !Array.isArray(E) ? (y.current = E, Se(E)) : Array.isArray(E) ? (y.current = E.map((u) => u && u.value ? String(u.value).trim() : "").filter(Boolean), Se({})) : (y.current = [], Se({})) : (y.current = [], Se({})), D.current = Array.isArray($) ? $.map((u) => String(u).trim().toUpperCase()) : null, ee.current = C || null, xt({
|
|
490
479
|
searchKey: "eeace38b64f52bf56ebb4fe8bd5837b3cd6c0ff9d7e272f76449d94b80cba86b",
|
|
491
480
|
indexName: "otto_v1_vehicles_production"
|
|
492
481
|
});
|
|
493
482
|
} catch (n) {
|
|
494
|
-
console.error("[VehicleSearch] Auth failed:", n),
|
|
483
|
+
console.error("[VehicleSearch] Auth failed:", n), kt(n), Se({});
|
|
495
484
|
}
|
|
496
485
|
}, [
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
486
|
+
h,
|
|
487
|
+
w,
|
|
488
|
+
V,
|
|
489
|
+
l
|
|
501
490
|
]);
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
}, [
|
|
505
|
-
if (
|
|
491
|
+
P(() => {
|
|
492
|
+
nt();
|
|
493
|
+
}, [nt]), P(() => {
|
|
494
|
+
if (ue.searchKey) {
|
|
506
495
|
try {
|
|
507
|
-
|
|
496
|
+
te.current = new mt({
|
|
508
497
|
host: "https://search.partbot.io",
|
|
509
|
-
apiKey:
|
|
510
|
-
}),
|
|
511
|
-
const t = new
|
|
498
|
+
apiKey: ue.searchKey
|
|
499
|
+
}), k.current = te.current.index(ue.indexName);
|
|
500
|
+
const t = new mt({
|
|
512
501
|
host: "https://partbot-meilisearch-cache.partbot.workers.dev",
|
|
513
502
|
// Cloudflare Worker endpoint
|
|
514
|
-
apiKey:
|
|
503
|
+
apiKey: ue.searchKey
|
|
515
504
|
});
|
|
516
|
-
|
|
505
|
+
_e.current = t.index("otto_v1_vehicle_mmy");
|
|
517
506
|
} catch (t) {
|
|
518
507
|
console.error("[VehicleSearch] Failed to initialize Meilisearch:", t);
|
|
519
508
|
}
|
|
520
509
|
return () => {
|
|
521
|
-
|
|
510
|
+
te.current = null;
|
|
522
511
|
};
|
|
523
512
|
}
|
|
524
|
-
}, [
|
|
525
|
-
const [
|
|
513
|
+
}, [ue.searchKey, h]);
|
|
514
|
+
const [G, Ct] = N(!1), it = F(() => {
|
|
526
515
|
function t(i) {
|
|
527
516
|
if (!i) return "rgba(0,0,0,1)";
|
|
528
|
-
var
|
|
529
|
-
return
|
|
517
|
+
var c = r(), s = window.getComputedStyle(i).backgroundColor;
|
|
518
|
+
return s !== c ? s : i.parentElement ? t(i.parentElement) : "rgba(255,255,255,1)";
|
|
530
519
|
}
|
|
531
520
|
function r() {
|
|
532
521
|
var i = document.createElement("div");
|
|
533
522
|
document.head.appendChild(i);
|
|
534
|
-
var
|
|
535
|
-
return document.head.removeChild(i),
|
|
523
|
+
var c = window.getComputedStyle(i).backgroundColor;
|
|
524
|
+
return document.head.removeChild(i), c;
|
|
536
525
|
}
|
|
537
526
|
const n = document.querySelector("vehicle-search");
|
|
538
527
|
let o;
|
|
539
|
-
n ? o = t(n) : o = t(
|
|
540
|
-
const d =
|
|
541
|
-
|
|
528
|
+
n ? o = t(n) : o = t(ke.current);
|
|
529
|
+
const d = Rt(o).isDark();
|
|
530
|
+
Ct(d);
|
|
542
531
|
}, []);
|
|
543
|
-
|
|
532
|
+
P(() => {
|
|
544
533
|
async function t() {
|
|
545
|
-
if (!e.make || !
|
|
534
|
+
if (!e.make || !k.current)
|
|
546
535
|
return;
|
|
547
536
|
let r = [], n = [];
|
|
548
537
|
e.make && r.push(`make:${e.make.refinement}`), e.model && r.push(
|
|
@@ -555,24 +544,24 @@ function Xt({
|
|
|
555
544
|
), e.series && r.push(`series:${e.series.refinement}`), e.engine && r.push(`engine:${e.engine.refinement}`), e.engine_capacity && r.push(
|
|
556
545
|
`engine_capacity:${e.engine_capacity.refinement}`
|
|
557
546
|
);
|
|
558
|
-
let d = (await
|
|
559
|
-
filter:
|
|
547
|
+
let d = (await k.current.search("", {
|
|
548
|
+
filter: Oe(r, n),
|
|
560
549
|
attributesToRetrieve: ["otto_id"],
|
|
561
550
|
limit: 500
|
|
562
551
|
// Reduced from 1000 for faster queries
|
|
563
|
-
})).hits.map((
|
|
564
|
-
|
|
565
|
-
let
|
|
552
|
+
})).hits.map((s) => s.otto_id);
|
|
553
|
+
ze(d);
|
|
554
|
+
let c = {
|
|
566
555
|
...Object.fromEntries(
|
|
567
|
-
Object.entries(e || {}).map(([
|
|
556
|
+
Object.entries(e || {}).map(([s, v]) => [s, v && v.value || null]).filter(([s, v]) => v !== null)
|
|
568
557
|
),
|
|
569
|
-
merchant:
|
|
558
|
+
merchant: Ce.current
|
|
570
559
|
};
|
|
571
|
-
|
|
560
|
+
Qe.capture("vehicle select", c);
|
|
572
561
|
}
|
|
573
562
|
t();
|
|
574
|
-
}, [e,
|
|
575
|
-
const
|
|
563
|
+
}, [e, k, g]);
|
|
564
|
+
const Ye = (t) => K ? `${K}${t}` : t, _t = (t) => K ? t.replace(new RegExp(`^${K}`), "") : t, st = F(() => {
|
|
576
565
|
const t = new URL(window.location.href).searchParams, r = [
|
|
577
566
|
"make",
|
|
578
567
|
"model",
|
|
@@ -581,61 +570,61 @@ function Xt({
|
|
|
581
570
|
"series",
|
|
582
571
|
"engine",
|
|
583
572
|
"engine_capacity"
|
|
584
|
-
], n = r.map(
|
|
585
|
-
for (const [
|
|
586
|
-
const
|
|
587
|
-
if (
|
|
588
|
-
const
|
|
589
|
-
if (
|
|
590
|
-
const
|
|
591
|
-
if (
|
|
592
|
-
const
|
|
593
|
-
/^\d{4}$/.test(
|
|
573
|
+
], n = r.map(Ye), o = {}, d = /^filter\.p\.m\.app--\d+--partbot\.vehicle_(\w+)$/;
|
|
574
|
+
for (const [c, s] of t.entries()) {
|
|
575
|
+
const v = c.match(d);
|
|
576
|
+
if (v) {
|
|
577
|
+
const z = v[1];
|
|
578
|
+
if (z === "year_tokens" && s) {
|
|
579
|
+
const $ = s.split("|");
|
|
580
|
+
if ($.length >= 3) {
|
|
581
|
+
const C = $[2].trim();
|
|
582
|
+
/^\d{4}$/.test(C) && (o.year = C);
|
|
594
583
|
}
|
|
595
584
|
continue;
|
|
596
585
|
}
|
|
597
|
-
let b =
|
|
598
|
-
b === "engine_capacitie" && (b = "engine_capacity"), b === "bodie" && (b = "body"), b === "serie" && (b = "series"), r.includes(b) && (o[b] =
|
|
586
|
+
let b = z.replace(/s$/, "");
|
|
587
|
+
b === "engine_capacitie" && (b = "engine_capacity"), b === "bodie" && (b = "body"), b === "serie" && (b = "series"), r.includes(b) && (o[b] = s);
|
|
599
588
|
}
|
|
600
589
|
}
|
|
601
590
|
const i = Object.fromEntries(
|
|
602
|
-
[...t.entries()].filter(([
|
|
603
|
-
const
|
|
604
|
-
if (
|
|
605
|
-
const
|
|
606
|
-
return [
|
|
591
|
+
[...t.entries()].filter(([c]) => n.includes(c)).map(([c, s]) => {
|
|
592
|
+
const v = _t(c);
|
|
593
|
+
if (v === "year" && s && /^\d{4}$/.test(s)) {
|
|
594
|
+
const z = parseInt(s, 10);
|
|
595
|
+
return [v, { value: z, refinement: z }];
|
|
607
596
|
}
|
|
608
|
-
return [
|
|
597
|
+
return [v, { value: s, refinement: s }];
|
|
609
598
|
})
|
|
610
599
|
);
|
|
611
|
-
for (const [
|
|
612
|
-
if (
|
|
613
|
-
if (
|
|
614
|
-
const
|
|
615
|
-
i[
|
|
600
|
+
for (const [c, s] of Object.entries(o))
|
|
601
|
+
if (s && s !== "[object Object]" && !i[c])
|
|
602
|
+
if (c === "year" && /^\d{4}$/.test(s)) {
|
|
603
|
+
const v = parseInt(s, 10);
|
|
604
|
+
i[c] = { value: v, refinement: v };
|
|
616
605
|
} else
|
|
617
|
-
i[
|
|
606
|
+
i[c] = { value: s, refinement: s };
|
|
618
607
|
if (Object.keys(i).length === 0)
|
|
619
608
|
try {
|
|
620
|
-
const
|
|
621
|
-
if (
|
|
622
|
-
const
|
|
623
|
-
if (
|
|
624
|
-
const
|
|
625
|
-
for (const
|
|
626
|
-
const b =
|
|
609
|
+
const c = localStorage.getItem("partbot_selected_vehicle");
|
|
610
|
+
if (c) {
|
|
611
|
+
const s = JSON.parse(c);
|
|
612
|
+
if (s != null && s.vehicle) {
|
|
613
|
+
const v = s.vehicle;
|
|
614
|
+
for (const z of r) {
|
|
615
|
+
const b = v[z];
|
|
627
616
|
if (b && typeof b == "string" && b.trim())
|
|
628
|
-
if (
|
|
629
|
-
const
|
|
630
|
-
i[
|
|
617
|
+
if (z === "year" && /^\d{4}$/.test(b)) {
|
|
618
|
+
const $ = parseInt(b, 10);
|
|
619
|
+
i[z] = { value: $, refinement: $ };
|
|
631
620
|
} else
|
|
632
|
-
i[
|
|
621
|
+
i[z] = { value: b, refinement: b };
|
|
633
622
|
else if (b != null && b.value && typeof b.value == "string")
|
|
634
|
-
if (
|
|
635
|
-
const
|
|
636
|
-
i[
|
|
623
|
+
if (z === "year" && /^\d{4}$/.test(b.value)) {
|
|
624
|
+
const $ = parseInt(b.value, 10);
|
|
625
|
+
i[z] = { value: $, refinement: $ };
|
|
637
626
|
} else
|
|
638
|
-
i[
|
|
627
|
+
i[z] = {
|
|
639
628
|
value: b.value,
|
|
640
629
|
refinement: b.value
|
|
641
630
|
};
|
|
@@ -645,68 +634,68 @@ function Xt({
|
|
|
645
634
|
} catch {
|
|
646
635
|
}
|
|
647
636
|
q(i);
|
|
648
|
-
}, []),
|
|
637
|
+
}, []), U = F(({ query: t, value: r, remove: n }) => {
|
|
649
638
|
if (_ && "URLSearchParams" in window) {
|
|
650
639
|
let o = new URLSearchParams(window.location.search);
|
|
651
|
-
t =
|
|
652
|
-
i =
|
|
640
|
+
t = Ye(t), t && r && o.set(t, r), t && !r && o.delete(t), n && n.forEach((i) => {
|
|
641
|
+
i = Ye(i), o.delete(i);
|
|
653
642
|
});
|
|
654
643
|
const d = window.location.pathname + "?" + o.toString();
|
|
655
644
|
window.history.pushState(null, "", d);
|
|
656
645
|
}
|
|
657
|
-
}, []),
|
|
646
|
+
}, []), Mt = F(() => {
|
|
658
647
|
var n;
|
|
659
648
|
const t = {
|
|
660
|
-
vehicle_ids:
|
|
649
|
+
vehicle_ids: ge,
|
|
661
650
|
vehicle: (n = e == null ? void 0 : e.make) != null && n.value ? e : {}
|
|
662
651
|
};
|
|
663
|
-
|
|
652
|
+
ie && ie(t);
|
|
664
653
|
const r = new CustomEvent("vehicle-search-submit", {
|
|
665
654
|
detail: t
|
|
666
655
|
});
|
|
667
656
|
window.dispatchEvent(r), document.dispatchEvent(r), setTimeout(() => {
|
|
668
|
-
|
|
657
|
+
Re(!1);
|
|
669
658
|
}, 900);
|
|
670
|
-
}, [
|
|
671
|
-
var n, o, d, i,
|
|
659
|
+
}, [ge, ie]), lt = F(() => {
|
|
660
|
+
var n, o, d, i, c, s, v, z, b;
|
|
672
661
|
const t = {
|
|
673
|
-
vehicle_ids:
|
|
662
|
+
vehicle_ids: ge,
|
|
674
663
|
vehicle: (n = e == null ? void 0 : e.make) != null && n.value ? e : {},
|
|
675
|
-
userSelected:
|
|
664
|
+
userSelected: R.current
|
|
676
665
|
// Flag to indicate if user actively selected
|
|
677
666
|
};
|
|
678
667
|
S && S(t);
|
|
679
668
|
const r = new CustomEvent("vehicle-search-change", {
|
|
680
669
|
detail: t
|
|
681
670
|
});
|
|
682
|
-
if (
|
|
671
|
+
if (R.current === !0) {
|
|
683
672
|
localStorage.removeItem("partbot_plate_details");
|
|
684
|
-
const
|
|
685
|
-
description: `${((o = e.make) == null ? void 0 : o.value) || ""} ${((d = e.model) == null ? void 0 : d.value) || ""} ${((i = e.year) == null ? void 0 : i.value) || ""} ${((
|
|
686
|
-
vehicle_ids:
|
|
687
|
-
vehicle: e ? Object.entries(e).reduce((
|
|
673
|
+
const $ = JSON.stringify({
|
|
674
|
+
description: `${((o = e.make) == null ? void 0 : o.value) || ""} ${((d = e.model) == null ? void 0 : d.value) || ""} ${((i = e.year) == null ? void 0 : i.value) || ""} ${((c = e.body) == null ? void 0 : c.value) || ""} ${((s = e.series) == null ? void 0 : s.value) || ""} ${((v = e.variant) == null ? void 0 : v.value) || ""} ${((z = e.engine) == null ? void 0 : z.value) || ""} ${((b = e.engine_capacity) == null ? void 0 : b.value) || ""}`.trim(),
|
|
675
|
+
vehicle_ids: ge,
|
|
676
|
+
vehicle: e ? Object.entries(e).reduce((C, [A, E]) => (C[A] = E != null && E.value ? E.value : {}, C), {}) : {}
|
|
688
677
|
});
|
|
689
678
|
localStorage.setItem(
|
|
690
679
|
"partbot_selected_vehicle",
|
|
691
|
-
|
|
692
|
-
),
|
|
680
|
+
$
|
|
681
|
+
), It.set("partbot_selected_vehicle", $, {
|
|
693
682
|
secure: !0
|
|
694
683
|
});
|
|
695
684
|
}
|
|
696
|
-
window.dispatchEvent(r),
|
|
697
|
-
|
|
685
|
+
window.dispatchEvent(r), R.current && document.dispatchEvent(r), bt.current = ge, setTimeout(() => {
|
|
686
|
+
Re(!1);
|
|
698
687
|
}, 900);
|
|
699
|
-
}, [
|
|
700
|
-
() =>
|
|
701
|
-
[
|
|
688
|
+
}, [ge, S]), he = qe(
|
|
689
|
+
() => Tt(lt, 100),
|
|
690
|
+
[lt]
|
|
702
691
|
);
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
}, [
|
|
706
|
-
|
|
707
|
-
}, [
|
|
692
|
+
P(() => {
|
|
693
|
+
he();
|
|
694
|
+
}, [ge, he]), P(() => () => {
|
|
695
|
+
he.cancel();
|
|
696
|
+
}, [he]), P(() => {
|
|
708
697
|
const t = () => {
|
|
709
|
-
|
|
698
|
+
R.current = !1, he.cancel(), q({
|
|
710
699
|
make: null,
|
|
711
700
|
model: null,
|
|
712
701
|
year: null,
|
|
@@ -715,7 +704,7 @@ function Xt({
|
|
|
715
704
|
variant: null,
|
|
716
705
|
engine: null,
|
|
717
706
|
engine_capacity: null
|
|
718
|
-
}),
|
|
707
|
+
}), ze([]);
|
|
719
708
|
};
|
|
720
709
|
return window.addEventListener("plate-search-change", t), () => {
|
|
721
710
|
window.removeEventListener(
|
|
@@ -723,9 +712,9 @@ function Xt({
|
|
|
723
712
|
t
|
|
724
713
|
);
|
|
725
714
|
};
|
|
726
|
-
}, [
|
|
715
|
+
}, [he]), P(() => {
|
|
727
716
|
const t = () => {
|
|
728
|
-
|
|
717
|
+
R.current = !1, he.cancel(), q({
|
|
729
718
|
make: null,
|
|
730
719
|
model: null,
|
|
731
720
|
year: null,
|
|
@@ -734,35 +723,35 @@ function Xt({
|
|
|
734
723
|
variant: null,
|
|
735
724
|
engine: null,
|
|
736
725
|
engine_capacity: null
|
|
737
|
-
}),
|
|
726
|
+
}), ze([]);
|
|
738
727
|
};
|
|
739
728
|
return document.addEventListener("partbot-clear-vehicle", t), () => {
|
|
740
729
|
document.removeEventListener("partbot-clear-vehicle", t);
|
|
741
730
|
};
|
|
742
|
-
}, [
|
|
743
|
-
|
|
744
|
-
}, [
|
|
745
|
-
M &&
|
|
731
|
+
}, [he]), P(() => {
|
|
732
|
+
ue.searchKey && (M || jt(), st());
|
|
733
|
+
}, [ue.searchKey, M, st]), P(() => {
|
|
734
|
+
M && k.current && ye.length === 0 && !e.year && k.current.search("", {
|
|
746
735
|
attributesToRetrieve: ["year_from", "year_to"],
|
|
747
736
|
limit: 1e4
|
|
748
737
|
}).then(({ hits: t }) => {
|
|
749
|
-
const r = t.map((
|
|
738
|
+
const r = t.map((c) => c.year_from).filter(Boolean), n = t.map((c) => c.year_to).filter(Boolean), o = Math.min(...r), d = Math.max(...n), i = Array.from(
|
|
750
739
|
{ length: d - o + 1 },
|
|
751
|
-
(
|
|
740
|
+
(c, s) => ({ value: o + s, refinement: o + s })
|
|
752
741
|
).reverse();
|
|
753
|
-
|
|
742
|
+
Me(i);
|
|
754
743
|
}).catch((t) => {
|
|
755
744
|
console.error("[VehicleSearch] Error loading year range:", t);
|
|
756
745
|
});
|
|
757
|
-
}, [M,
|
|
758
|
-
typeof document > "u" ||
|
|
759
|
-
}, [
|
|
760
|
-
const
|
|
746
|
+
}, [M, ue.searchKey, ye.length, e.year]), P(() => {
|
|
747
|
+
typeof document > "u" || it();
|
|
748
|
+
}, [it]);
|
|
749
|
+
const ct = F(
|
|
761
750
|
(t) => {
|
|
762
|
-
|
|
751
|
+
R.current = !0, se([]), !M && !g && Me([]), Ne([]), Be([]), Pe([]), Le([]), Ie([]), q((r) => ({
|
|
763
752
|
make: t,
|
|
764
753
|
year: M || g ? r.year : null
|
|
765
|
-
})),
|
|
754
|
+
})), U({
|
|
766
755
|
query: "make",
|
|
767
756
|
value: (t == null ? void 0 : t.value) ?? "",
|
|
768
757
|
remove: M ? ["model", "body", "series", "engine", "variant", "engine_capacity"] : g ? [
|
|
@@ -781,12 +770,12 @@ function Xt({
|
|
|
781
770
|
"variant",
|
|
782
771
|
"engine_capacity"
|
|
783
772
|
]
|
|
784
|
-
}), t ||
|
|
773
|
+
}), t || ze([]);
|
|
785
774
|
},
|
|
786
|
-
[
|
|
787
|
-
),
|
|
775
|
+
[U, M, g]
|
|
776
|
+
), dt = F(
|
|
788
777
|
(t) => {
|
|
789
|
-
|
|
778
|
+
R.current = !0, q((r) => ({
|
|
790
779
|
...r,
|
|
791
780
|
model: t !== "" ? t : null,
|
|
792
781
|
year: M || g ? r.year : null,
|
|
@@ -796,7 +785,7 @@ function Xt({
|
|
|
796
785
|
variant: null,
|
|
797
786
|
engine: null,
|
|
798
787
|
engine_capacity: null
|
|
799
|
-
})), !M && !g &&
|
|
788
|
+
})), !M && !g && Me([]), Ne([]), Be([]), Pe([]), Le([]), Ie([]), U({
|
|
800
789
|
query: "model",
|
|
801
790
|
value: (t == null ? void 0 : t.value) ?? "",
|
|
802
791
|
remove: M ? ["body", "series", "engine", "variant", "engine_capacity"] : g ? ["body", "series", "engine", "variant", "engine_capacity"] : [
|
|
@@ -809,12 +798,12 @@ function Xt({
|
|
|
809
798
|
]
|
|
810
799
|
});
|
|
811
800
|
},
|
|
812
|
-
[
|
|
813
|
-
),
|
|
801
|
+
[U, M, g]
|
|
802
|
+
), pt = F(
|
|
814
803
|
(t) => {
|
|
815
|
-
|
|
804
|
+
R.current = !0, M ? (Te([]), se([]), q({
|
|
816
805
|
year: t !== "" ? t : null
|
|
817
|
-
}), (!t || t === "") &&
|
|
806
|
+
}), (!t || t === "") && Me([])) : q(g ? (r) => ({
|
|
818
807
|
...r,
|
|
819
808
|
year: t !== "" ? t : null
|
|
820
809
|
}) : (r) => ({
|
|
@@ -825,7 +814,7 @@ function Xt({
|
|
|
825
814
|
variant: null,
|
|
826
815
|
engine: null,
|
|
827
816
|
engine_capacity: null
|
|
828
|
-
})), g || (
|
|
817
|
+
})), g || (Ne([]), Be([]), Pe([]), Le([]), Ie([])), U({
|
|
829
818
|
query: "year",
|
|
830
819
|
value: (t == null ? void 0 : t.value) ?? "",
|
|
831
820
|
remove: M ? [
|
|
@@ -837,69 +826,69 @@ function Xt({
|
|
|
837
826
|
"engine",
|
|
838
827
|
"engine_capacity"
|
|
839
828
|
] : g ? [] : ["body", "series", "variant", "engine", "engine_capacity"]
|
|
840
|
-
}), !g && (!t || t === "") &&
|
|
829
|
+
}), !g && (!t || t === "") && ze([]);
|
|
841
830
|
},
|
|
842
|
-
[
|
|
843
|
-
),
|
|
831
|
+
[U, M, g]
|
|
832
|
+
), zt = F(
|
|
844
833
|
(t) => {
|
|
845
|
-
|
|
834
|
+
R.current = !0, q((r) => ({
|
|
846
835
|
...r,
|
|
847
836
|
body: t !== "" ? t : null
|
|
848
|
-
})),
|
|
837
|
+
})), U({
|
|
849
838
|
query: "body",
|
|
850
839
|
value: (t == null ? void 0 : t.value) ?? ""
|
|
851
840
|
});
|
|
852
841
|
},
|
|
853
|
-
[
|
|
854
|
-
),
|
|
842
|
+
[U]
|
|
843
|
+
), St = F(
|
|
855
844
|
(t) => {
|
|
856
|
-
|
|
845
|
+
R.current = !0, q((r) => ({
|
|
857
846
|
...r,
|
|
858
847
|
series: t !== "" ? t : null
|
|
859
|
-
})),
|
|
848
|
+
})), U({
|
|
860
849
|
query: "series",
|
|
861
850
|
value: (t == null ? void 0 : t.value) ?? ""
|
|
862
851
|
});
|
|
863
852
|
},
|
|
864
|
-
[
|
|
865
|
-
),
|
|
853
|
+
[U]
|
|
854
|
+
), $t = F(
|
|
866
855
|
(t) => {
|
|
867
|
-
|
|
856
|
+
R.current = !0, q((r) => ({
|
|
868
857
|
...r,
|
|
869
858
|
variant: t !== "" ? t : null
|
|
870
|
-
})),
|
|
859
|
+
})), U({
|
|
871
860
|
query: "variant",
|
|
872
861
|
value: (t == null ? void 0 : t.value) ?? ""
|
|
873
862
|
});
|
|
874
863
|
},
|
|
875
|
-
[
|
|
876
|
-
),
|
|
864
|
+
[U]
|
|
865
|
+
), At = F(
|
|
877
866
|
(t) => {
|
|
878
|
-
|
|
867
|
+
R.current = !0, q((r) => ({
|
|
879
868
|
...r,
|
|
880
869
|
engine: t !== "" ? t : null
|
|
881
|
-
})),
|
|
870
|
+
})), U({
|
|
882
871
|
query: "engine",
|
|
883
872
|
value: (t == null ? void 0 : t.value) ?? ""
|
|
884
873
|
});
|
|
885
874
|
},
|
|
886
|
-
[
|
|
887
|
-
),
|
|
875
|
+
[U]
|
|
876
|
+
), Et = F(
|
|
888
877
|
(t) => {
|
|
889
|
-
|
|
878
|
+
R.current = !0, q((r) => ({
|
|
890
879
|
...r,
|
|
891
880
|
engine_capacity: t !== "" ? t : null
|
|
892
|
-
})),
|
|
881
|
+
})), U({
|
|
893
882
|
query: "engine_capacity",
|
|
894
883
|
value: (t == null ? void 0 : t.value) ?? ""
|
|
895
884
|
});
|
|
896
885
|
},
|
|
897
|
-
[
|
|
886
|
+
[U]
|
|
898
887
|
);
|
|
899
|
-
|
|
900
|
-
M && e.year &&
|
|
888
|
+
P(() => {
|
|
889
|
+
M && e.year && k.current && (async () => {
|
|
901
890
|
try {
|
|
902
|
-
const r = await
|
|
891
|
+
const r = await k.current.search("", {
|
|
903
892
|
filter: `year_from <= ${e.year.value} AND year_to >= ${e.year.value}`,
|
|
904
893
|
attributesToRetrieve: ["make", "make_popularity"],
|
|
905
894
|
limit: 1e4
|
|
@@ -912,33 +901,35 @@ function Xt({
|
|
|
912
901
|
});
|
|
913
902
|
});
|
|
914
903
|
let o = Array.from(n.values());
|
|
915
|
-
|
|
916
|
-
(i) =>
|
|
917
|
-
|
|
904
|
+
ae.size > 0 ? o = o.filter(
|
|
905
|
+
(i) => ae.has(
|
|
906
|
+
O(i.value)
|
|
907
|
+
)
|
|
908
|
+
) : le.size > 0 && (o = o.filter(
|
|
909
|
+
(i) => le.has(
|
|
910
|
+
O(i.value)
|
|
918
911
|
)
|
|
919
|
-
) : Ce.size > 0 && (o = o.filter(
|
|
920
|
-
(i) => Ce.has(F(i.value))
|
|
921
912
|
));
|
|
922
|
-
const d = new Set(
|
|
923
|
-
d.size > 0 ? o.sort((i,
|
|
924
|
-
const
|
|
925
|
-
return
|
|
913
|
+
const d = new Set(D.current || []);
|
|
914
|
+
d.size > 0 ? o.sort((i, c) => {
|
|
915
|
+
const s = d.has(i.value), v = d.has(c.value);
|
|
916
|
+
return s && !v ? -1 : !s && v ? 1 : s && v ? D.current.indexOf(i.value) - D.current.indexOf(c.value) : i.value.localeCompare(c.value);
|
|
926
917
|
}) : o.sort(
|
|
927
|
-
(i,
|
|
928
|
-
),
|
|
918
|
+
(i, c) => c.popularity === i.popularity ? i.value.localeCompare(c.value) : c.popularity - i.popularity
|
|
919
|
+
), Te(o);
|
|
929
920
|
} catch (r) {
|
|
930
921
|
console.error("[VehicleSearch] Error loading makes for year:", r);
|
|
931
922
|
}
|
|
932
923
|
})();
|
|
933
|
-
}, [M, e.year,
|
|
934
|
-
const
|
|
924
|
+
}, [M, e.year, ae, le]);
|
|
925
|
+
const jt = F(() => {
|
|
935
926
|
(async () => {
|
|
936
927
|
let r = [];
|
|
937
|
-
if (
|
|
938
|
-
r =
|
|
939
|
-
else if (
|
|
928
|
+
if (we.current && we.current.length)
|
|
929
|
+
r = we.current;
|
|
930
|
+
else if (k.current)
|
|
940
931
|
try {
|
|
941
|
-
const n = await
|
|
932
|
+
const n = await k.current.search("", {
|
|
942
933
|
attributesToRetrieve: ["make", "make_popularity"],
|
|
943
934
|
limit: 1e3
|
|
944
935
|
}), o = /* @__PURE__ */ new Map();
|
|
@@ -952,159 +943,184 @@ function Xt({
|
|
|
952
943
|
} catch (n) {
|
|
953
944
|
console.error("[VehicleSearch] Error loading makes:", n);
|
|
954
945
|
}
|
|
955
|
-
if (
|
|
956
|
-
(n) =>
|
|
957
|
-
)),
|
|
958
|
-
(n) =>
|
|
959
|
-
|
|
960
|
-
|
|
946
|
+
if (ae.size > 0 && r.length && (r = r.filter(
|
|
947
|
+
(n) => ae.has(O(n.value))
|
|
948
|
+
)), ae.size === 0 && le.size > 0 && (r = r.filter(
|
|
949
|
+
(n) => le.has(
|
|
950
|
+
O(n.value)
|
|
951
|
+
)
|
|
952
|
+
)), D.current && D.current.length > 0) {
|
|
953
|
+
const n = new Set(D.current);
|
|
961
954
|
r.sort((o, d) => {
|
|
962
|
-
const i = n.has(o.value),
|
|
963
|
-
return i && !
|
|
955
|
+
const i = n.has(o.value), c = n.has(d.value);
|
|
956
|
+
return i && !c ? -1 : !i && c ? 1 : i && c ? D.current.indexOf(o.value) - D.current.indexOf(d.value) : o.value.localeCompare(d.value);
|
|
964
957
|
});
|
|
965
958
|
} else
|
|
966
959
|
r.sort((n, o) => n.popularity === o.popularity ? n.value.localeCompare(o.value) : o.popularity - n.popularity);
|
|
967
|
-
|
|
960
|
+
Te(r);
|
|
968
961
|
})();
|
|
969
|
-
}, [
|
|
970
|
-
|
|
971
|
-
var t
|
|
962
|
+
}, [ae, le]);
|
|
963
|
+
P(() => {
|
|
964
|
+
var t;
|
|
972
965
|
if (e.make && e.make.refinement) {
|
|
973
|
-
const
|
|
974
|
-
if (
|
|
975
|
-
|
|
966
|
+
const r = e.make.refinement, n = O(r), o = ae.size > 0, d = le.size > 0;
|
|
967
|
+
if (o && !ae.has(n)) {
|
|
968
|
+
se([]);
|
|
976
969
|
return;
|
|
977
970
|
}
|
|
978
|
-
if (!
|
|
979
|
-
|
|
971
|
+
if (!o && d && !le.has(n)) {
|
|
972
|
+
se([]);
|
|
980
973
|
return;
|
|
981
974
|
}
|
|
982
|
-
const
|
|
983
|
-
|
|
984
|
-
),
|
|
985
|
-
|
|
986
|
-
)
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
975
|
+
const i = p ? p.trim().split(",").map((C) => C.trim()).filter(Boolean) : [], c = new Set(
|
|
976
|
+
i.map((C) => O(C))
|
|
977
|
+
), s = typeof y.current == "object" && !Array.isArray(y.current) && y.current !== null ? y.current : null;
|
|
978
|
+
let v = [];
|
|
979
|
+
if (s && (v = s[r] || [], Array.isArray(v) || (v = []), v.length === 0)) {
|
|
980
|
+
const C = Object.keys(s).find(
|
|
981
|
+
(A) => O(A) === n
|
|
982
|
+
);
|
|
983
|
+
if (C) {
|
|
984
|
+
const A = s[C];
|
|
985
|
+
v = Array.isArray(A) ? A : [];
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
const z = new Set(
|
|
989
|
+
v.map(
|
|
990
|
+
(C) => O(C)
|
|
991
|
+
)
|
|
992
|
+
), b = z.size > 0 ? z : null;
|
|
993
|
+
let $ = c;
|
|
994
|
+
if (c.size > 0 && z.size > 0 && ($ = new Set(
|
|
995
|
+
Array.from(c).filter(
|
|
996
|
+
(C) => z.has(C)
|
|
997
|
+
)
|
|
998
|
+
)), c.size > 0 && $.size === 0) {
|
|
999
|
+
se([]);
|
|
1000
|
+
return;
|
|
1001
|
+
}
|
|
1002
|
+
if (V && v.length > 0) {
|
|
1003
|
+
let A = v.map(
|
|
1004
|
+
(u) => ({
|
|
1005
|
+
value: u,
|
|
1006
|
+
refinement: u,
|
|
992
1007
|
popularity: 0
|
|
993
1008
|
// Popularity will be used from PostHog for sorting
|
|
994
1009
|
})
|
|
995
1010
|
);
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
(
|
|
999
|
-
|
|
1000
|
-
),
|
|
1001
|
-
|
|
1002
|
-
(
|
|
1011
|
+
A = We(
|
|
1012
|
+
A,
|
|
1013
|
+
(u) => u.value,
|
|
1014
|
+
$
|
|
1015
|
+
), A = We(
|
|
1016
|
+
A,
|
|
1017
|
+
(u) => u.value,
|
|
1003
1018
|
b
|
|
1004
1019
|
);
|
|
1005
|
-
const
|
|
1006
|
-
if (
|
|
1007
|
-
const
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1020
|
+
const E = (t = ee.current) == null ? void 0 : t[r];
|
|
1021
|
+
if (E && Array.isArray(E)) {
|
|
1022
|
+
const u = new Map(
|
|
1023
|
+
E.map((Q, ce) => [
|
|
1024
|
+
Q.toUpperCase(),
|
|
1025
|
+
E.length - ce
|
|
1011
1026
|
])
|
|
1012
1027
|
);
|
|
1013
|
-
|
|
1014
|
-
const
|
|
1015
|
-
return
|
|
1028
|
+
A.sort((Q, ce) => {
|
|
1029
|
+
const Fe = u.get(Q.value.toUpperCase()) || 0, fe = u.get(ce.value.toUpperCase()) || 0;
|
|
1030
|
+
return Fe !== fe ? fe - Fe : Q.value.localeCompare(ce.value);
|
|
1016
1031
|
});
|
|
1017
1032
|
} else
|
|
1018
|
-
|
|
1019
|
-
|
|
1033
|
+
A.sort((u, Q) => u.value.localeCompare(Q.value));
|
|
1034
|
+
se(A);
|
|
1020
1035
|
return;
|
|
1021
1036
|
}
|
|
1022
|
-
if (!
|
|
1037
|
+
if (!_e.current || !h)
|
|
1023
1038
|
return;
|
|
1024
|
-
|
|
1039
|
+
_e.current.search("", {
|
|
1025
1040
|
filter: `make = "${e.make.refinement}"`,
|
|
1026
1041
|
limit: 1
|
|
1027
1042
|
// Only one document per make
|
|
1028
|
-
}).then((
|
|
1029
|
-
var
|
|
1030
|
-
const { hits:
|
|
1031
|
-
let
|
|
1032
|
-
|
|
1033
|
-
let
|
|
1034
|
-
model: `${e.make.refinement} > ${
|
|
1035
|
-
model_popularity:
|
|
1036
|
-
})),
|
|
1037
|
-
Array.isArray(
|
|
1038
|
-
let
|
|
1039
|
-
if (
|
|
1040
|
-
(
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1043
|
+
}).then((C) => {
|
|
1044
|
+
var vt, ut;
|
|
1045
|
+
const { hits: A } = C;
|
|
1046
|
+
let E = [];
|
|
1047
|
+
A.length > 0 && A[0].models && (E = A[0].models);
|
|
1048
|
+
let u = E.map((x) => ({
|
|
1049
|
+
model: `${e.make.refinement} > ${x.name}`,
|
|
1050
|
+
model_popularity: x.popularity || 0
|
|
1051
|
+
})), Q = [];
|
|
1052
|
+
Array.isArray(y.current) ? Q = y.current : typeof y.current == "object" && y.current !== null ? Q = v : typeof y.current == "string" && y.current.length && (Q = y.current.split(",").map((x) => x.trim()).filter(Boolean));
|
|
1053
|
+
let ce = Q;
|
|
1054
|
+
if ($.size > 0 && (ce = Q.length ? Q.filter(
|
|
1055
|
+
(x) => $.has(
|
|
1056
|
+
O(x)
|
|
1057
|
+
)
|
|
1058
|
+
) : i, u = u.filter(
|
|
1059
|
+
(x) => $.has(
|
|
1060
|
+
O(xe(x.model))
|
|
1044
1061
|
)
|
|
1045
|
-
)),
|
|
1046
|
-
const
|
|
1047
|
-
|
|
1062
|
+
)), ce && ce.length > 0) {
|
|
1063
|
+
const x = new Set(
|
|
1064
|
+
ce.map((de) => O(de))
|
|
1048
1065
|
);
|
|
1049
|
-
|
|
1050
|
-
(
|
|
1051
|
-
|
|
1066
|
+
u.some(
|
|
1067
|
+
(de) => x.has(
|
|
1068
|
+
O(xe(de.model))
|
|
1052
1069
|
)
|
|
1053
|
-
) && (
|
|
1054
|
-
(
|
|
1055
|
-
|
|
1070
|
+
) && (u = u.filter(
|
|
1071
|
+
(de) => x.has(
|
|
1072
|
+
O(xe(de.model))
|
|
1056
1073
|
)
|
|
1057
1074
|
));
|
|
1058
1075
|
}
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
(
|
|
1076
|
+
u = We(
|
|
1077
|
+
u,
|
|
1078
|
+
(x) => xe(x.model),
|
|
1062
1079
|
b
|
|
1063
|
-
),
|
|
1064
|
-
const H =
|
|
1080
|
+
), u = u.filter((x) => xe(x.model) !== "").map((x) => {
|
|
1081
|
+
const H = xe(x.model);
|
|
1065
1082
|
return {
|
|
1066
1083
|
value: H,
|
|
1067
1084
|
refinement: H,
|
|
1068
|
-
popularity:
|
|
1085
|
+
popularity: x.model_popularity
|
|
1069
1086
|
};
|
|
1070
1087
|
});
|
|
1071
|
-
const
|
|
1072
|
-
if (
|
|
1073
|
-
const
|
|
1074
|
-
|
|
1088
|
+
const Fe = (vt = e.make) == null ? void 0 : vt.refinement, fe = (ut = ee.current) == null ? void 0 : ut[Fe];
|
|
1089
|
+
if (fe && Array.isArray(fe) && fe.length > 0) {
|
|
1090
|
+
const x = new Set(
|
|
1091
|
+
fe.map((H) => String(H).trim().toUpperCase())
|
|
1075
1092
|
);
|
|
1076
|
-
|
|
1077
|
-
const
|
|
1078
|
-
if (
|
|
1079
|
-
if (!
|
|
1080
|
-
if (
|
|
1081
|
-
const
|
|
1082
|
-
(
|
|
1093
|
+
u.sort((H, de) => {
|
|
1094
|
+
const He = x.has(H.value), Ke = x.has(de.value);
|
|
1095
|
+
if (He && !Ke) return -1;
|
|
1096
|
+
if (!He && Ke) return 1;
|
|
1097
|
+
if (He && Ke) {
|
|
1098
|
+
const ht = fe.map(
|
|
1099
|
+
(Bt) => String(Bt).trim().toUpperCase()
|
|
1083
1100
|
);
|
|
1084
|
-
return
|
|
1101
|
+
return ht.indexOf(H.value) - ht.indexOf(de.value);
|
|
1085
1102
|
}
|
|
1086
|
-
return H.value.localeCompare(
|
|
1103
|
+
return H.value.localeCompare(de.value);
|
|
1087
1104
|
});
|
|
1088
1105
|
} else
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
}).catch((
|
|
1092
|
-
console.error("[VehicleSearch] Error loading models:",
|
|
1106
|
+
u.sort((x, H) => x.popularity === H.popularity ? x.value.localeCompare(H.value) : H.popularity - x.popularity);
|
|
1107
|
+
se(u);
|
|
1108
|
+
}).catch((C) => {
|
|
1109
|
+
console.error("[VehicleSearch] Error loading models:", C), se([]);
|
|
1093
1110
|
});
|
|
1094
1111
|
} else
|
|
1095
|
-
|
|
1112
|
+
se([]);
|
|
1096
1113
|
}, [
|
|
1097
1114
|
e.make,
|
|
1098
|
-
|
|
1099
|
-
|
|
1115
|
+
p,
|
|
1116
|
+
h,
|
|
1100
1117
|
M,
|
|
1101
1118
|
e.year,
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
if (C.current && e.make && e.model) {
|
|
1119
|
+
V,
|
|
1120
|
+
ae,
|
|
1121
|
+
le
|
|
1122
|
+
]), P(() => {
|
|
1123
|
+
if (k.current && e.make && e.model) {
|
|
1108
1124
|
let t = [
|
|
1109
1125
|
`model:${e.make.refinement} > ${e.model.refinement}`
|
|
1110
1126
|
];
|
|
@@ -1112,19 +1128,19 @@ function Xt({
|
|
|
1112
1128
|
`body:${e.make.refinement} > ${e.model.refinement} > ${e.body.refinement}`
|
|
1113
1129
|
), e.series && t.push(`series:${e.series.refinement}`), e.engine && t.push(`engine:${e.engine.refinement}`), e.engine_capacity && t.push(
|
|
1114
1130
|
`engine_capacity:${e.engine_capacity.refinement}`
|
|
1115
|
-
)),
|
|
1116
|
-
filter:
|
|
1131
|
+
)), k.current.search("", {
|
|
1132
|
+
filter: Oe(t, []),
|
|
1117
1133
|
attributesToRetrieve: ["year_from", "year_to", "otto_id"],
|
|
1118
1134
|
limit: 200
|
|
1119
1135
|
// Reduced from 1000 for faster queries
|
|
1120
1136
|
}).then(({ hits: r }) => {
|
|
1121
|
-
const n = r.map((
|
|
1122
|
-
let
|
|
1137
|
+
const n = r.map((s) => s.year_from), o = Math.min(...n), d = r.map((s) => s.year_to), i = Math.max(...d);
|
|
1138
|
+
let c = Array.apply(null, {
|
|
1123
1139
|
length: i + 1 - o
|
|
1124
|
-
}).map(function(
|
|
1125
|
-
return
|
|
1140
|
+
}).map(function(s, v) {
|
|
1141
|
+
return v + o;
|
|
1126
1142
|
});
|
|
1127
|
-
|
|
1143
|
+
c = c.reverse().map((s) => ({ value: s, refinement: s })), Me(c);
|
|
1128
1144
|
}).catch((r) => {
|
|
1129
1145
|
console.error("[VehicleSearch] Error fetching years:", r);
|
|
1130
1146
|
});
|
|
@@ -1138,15 +1154,15 @@ function Xt({
|
|
|
1138
1154
|
e.series,
|
|
1139
1155
|
e.engine,
|
|
1140
1156
|
e.engine_capacity
|
|
1141
|
-
]),
|
|
1157
|
+
]), P(() => {
|
|
1142
1158
|
const t = g ? e.make && e.model : e.year && e.make && e.model;
|
|
1143
|
-
if (
|
|
1159
|
+
if (k.current && t) {
|
|
1144
1160
|
const r = e.year ? [
|
|
1145
1161
|
`year_from <= ${e.year.value}`,
|
|
1146
1162
|
`year_to >= ${e.year.value}`
|
|
1147
1163
|
] : [];
|
|
1148
|
-
|
|
1149
|
-
filter:
|
|
1164
|
+
k.current.search("", {
|
|
1165
|
+
filter: Oe(
|
|
1150
1166
|
[`model:${e.make.refinement} > ${e.model.refinement}`],
|
|
1151
1167
|
r
|
|
1152
1168
|
),
|
|
@@ -1156,11 +1172,11 @@ function Xt({
|
|
|
1156
1172
|
n = [...new Map(n.map((o) => [o.body, o])).values()].map((o) => ({
|
|
1157
1173
|
value: o.body.match(/[^>]*$/)[0].trim(),
|
|
1158
1174
|
refinement: o.body.match(/[^>]*$/)[0].trim()
|
|
1159
|
-
})).filter((o) => o.value),
|
|
1175
|
+
})).filter((o) => o.value), Ne(n);
|
|
1160
1176
|
});
|
|
1161
1177
|
}
|
|
1162
1178
|
}, [e.year, e.make, e.model, g]);
|
|
1163
|
-
const
|
|
1179
|
+
const $e = F(({ hits: t, attribute: r, stateCallback: n }) => {
|
|
1164
1180
|
let o = [
|
|
1165
1181
|
...new Map(t.map((d) => [d[r], d])).values()
|
|
1166
1182
|
].map((d) => ({
|
|
@@ -1168,13 +1184,13 @@ function Xt({
|
|
|
1168
1184
|
refinement: d[r].match(/[^|]*$/)[0].trim()
|
|
1169
1185
|
})).filter((d) => d.refinement);
|
|
1170
1186
|
n(o);
|
|
1171
|
-
}, []),
|
|
1172
|
-
const t =
|
|
1187
|
+
}, []), Nt = F(() => {
|
|
1188
|
+
const t = Ve.current ? Ve.current.length + 3 : 3, r = ne ? t + 1 : t;
|
|
1173
1189
|
return `vs:lg:grid-cols-${r > 8 ? 8 : r}`;
|
|
1174
|
-
}, [
|
|
1175
|
-
|
|
1190
|
+
}, [ne]);
|
|
1191
|
+
P(() => {
|
|
1176
1192
|
const t = g ? e.make && e.model : e.make && e.model && e.year;
|
|
1177
|
-
if (
|
|
1193
|
+
if (k.current && t) {
|
|
1178
1194
|
let r = [
|
|
1179
1195
|
`make:${e.make.refinement}`,
|
|
1180
1196
|
`model:${e.make.refinement} > ${e.model.refinement}`,
|
|
@@ -1188,8 +1204,8 @@ function Xt({
|
|
|
1188
1204
|
`year_from <= ${e.year.value}`,
|
|
1189
1205
|
`year_to >= ${e.year.value}`
|
|
1190
1206
|
] : [];
|
|
1191
|
-
|
|
1192
|
-
filter:
|
|
1207
|
+
k.current.search("", {
|
|
1208
|
+
filter: Oe(r, n),
|
|
1193
1209
|
attributesToRetrieve: [
|
|
1194
1210
|
"series",
|
|
1195
1211
|
"engine_capacity",
|
|
@@ -1200,22 +1216,22 @@ function Xt({
|
|
|
1200
1216
|
],
|
|
1201
1217
|
limit: 1e3
|
|
1202
1218
|
}).then(({ hits: o }) => {
|
|
1203
|
-
|
|
1219
|
+
$e({
|
|
1204
1220
|
hits: o,
|
|
1205
1221
|
attribute: "series",
|
|
1206
|
-
stateCallback:
|
|
1207
|
-
}),
|
|
1222
|
+
stateCallback: Be
|
|
1223
|
+
}), $e({
|
|
1208
1224
|
hits: o,
|
|
1209
1225
|
attribute: "variant",
|
|
1210
|
-
stateCallback:
|
|
1211
|
-
}),
|
|
1226
|
+
stateCallback: Pe
|
|
1227
|
+
}), $e({
|
|
1212
1228
|
hits: o,
|
|
1213
1229
|
attribute: "engine",
|
|
1214
|
-
stateCallback:
|
|
1215
|
-
}),
|
|
1230
|
+
stateCallback: Ie
|
|
1231
|
+
}), $e({
|
|
1216
1232
|
hits: o,
|
|
1217
1233
|
attribute: "engine_capacity",
|
|
1218
|
-
stateCallback:
|
|
1234
|
+
stateCallback: Le
|
|
1219
1235
|
});
|
|
1220
1236
|
});
|
|
1221
1237
|
}
|
|
@@ -1225,56 +1241,56 @@ function Xt({
|
|
|
1225
1241
|
e.variant,
|
|
1226
1242
|
e.engine,
|
|
1227
1243
|
e.engine_capacity,
|
|
1228
|
-
|
|
1244
|
+
$e,
|
|
1229
1245
|
e.make,
|
|
1230
1246
|
e.model,
|
|
1231
1247
|
e.year,
|
|
1232
1248
|
g
|
|
1233
1249
|
]);
|
|
1234
|
-
const [
|
|
1235
|
-
return
|
|
1250
|
+
const [De, Ze] = N(!1);
|
|
1251
|
+
return P(() => {
|
|
1236
1252
|
if (m)
|
|
1237
|
-
return
|
|
1253
|
+
return De ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
1238
1254
|
document.body.style.overflow = "";
|
|
1239
1255
|
};
|
|
1240
|
-
}, [
|
|
1256
|
+
}, [De, m]), /* @__PURE__ */ I(Ue, { children: [
|
|
1241
1257
|
m && /* @__PURE__ */ a(
|
|
1242
1258
|
"button",
|
|
1243
1259
|
{
|
|
1244
|
-
onClick: () =>
|
|
1260
|
+
onClick: () => Ze(!0),
|
|
1245
1261
|
type: "button",
|
|
1246
|
-
className:
|
|
1262
|
+
className: me(
|
|
1247
1263
|
"vehicle-search-btn vs:md:hidden!",
|
|
1248
|
-
|
|
1264
|
+
pe ? "vs:w-full! vs:flex! vs:shrink-0!" : "vs:w-auto! vs:inline-flex! vs:shrink!"
|
|
1249
1265
|
),
|
|
1250
|
-
children: /* @__PURE__ */ a("span", { children:
|
|
1266
|
+
children: /* @__PURE__ */ a("span", { children: j })
|
|
1251
1267
|
}
|
|
1252
1268
|
),
|
|
1253
1269
|
m && /* @__PURE__ */ a(
|
|
1254
1270
|
"div",
|
|
1255
1271
|
{
|
|
1256
|
-
onClick: () =>
|
|
1257
|
-
className:
|
|
1272
|
+
onClick: () => Ze(!1),
|
|
1273
|
+
className: me(
|
|
1258
1274
|
"vs:z-10 vs:fixed vs:inset-0 vs:bg-stone-900 vs:transition-all vs:duration-300",
|
|
1259
|
-
|
|
1275
|
+
De ? "vs:opacity-75" : "vs:pointer-events-none vs:opacity-0"
|
|
1260
1276
|
)
|
|
1261
1277
|
}
|
|
1262
1278
|
),
|
|
1263
|
-
/* @__PURE__ */
|
|
1279
|
+
/* @__PURE__ */ I(
|
|
1264
1280
|
"div",
|
|
1265
1281
|
{
|
|
1266
|
-
className:
|
|
1282
|
+
className: me(
|
|
1267
1283
|
"partbot-mmyvs-container",
|
|
1268
|
-
m &&
|
|
1284
|
+
m && De && "active",
|
|
1269
1285
|
"w-full"
|
|
1270
1286
|
),
|
|
1271
1287
|
children: [
|
|
1272
|
-
m && /* @__PURE__ */
|
|
1288
|
+
m && /* @__PURE__ */ I("div", { className: "vs:flex vs:justify-between vs:items-center vs:pb-4 vs:font-bold vs:text-white vs:md:hidden", children: [
|
|
1273
1289
|
/* @__PURE__ */ a("span", { children: "Select Vehicle" }),
|
|
1274
|
-
/* @__PURE__ */
|
|
1290
|
+
/* @__PURE__ */ I(
|
|
1275
1291
|
"button",
|
|
1276
1292
|
{
|
|
1277
|
-
onClick: () =>
|
|
1293
|
+
onClick: () => Ze(!1),
|
|
1278
1294
|
type: "button",
|
|
1279
1295
|
className: "vs:appearance-none vs:bg-transparent vs:border-none vs:ring-none vs:outline-none vs:hover:border-none vs:hover:ring-none vs:hover:outline-none",
|
|
1280
1296
|
children: [
|
|
@@ -1293,128 +1309,128 @@ function Xt({
|
|
|
1293
1309
|
}
|
|
1294
1310
|
)
|
|
1295
1311
|
] }),
|
|
1296
|
-
/* @__PURE__ */
|
|
1312
|
+
/* @__PURE__ */ I(
|
|
1297
1313
|
"div",
|
|
1298
1314
|
{
|
|
1299
|
-
ref:
|
|
1300
|
-
className:
|
|
1315
|
+
ref: ke,
|
|
1316
|
+
className: me(
|
|
1301
1317
|
"vs:grid vs:gap-3",
|
|
1302
|
-
|
|
1318
|
+
Y === "row" ? `${Nt()} vs:grid-cols-1 vs:md:grid-cols-3` : "vs:grid-cols-1 vs:md:max-w-[400px] vs:md:gap-5",
|
|
1303
1319
|
"vs:w-full vs:transition vs:lg:mx-auto"
|
|
1304
1320
|
),
|
|
1305
1321
|
children: [
|
|
1306
|
-
M ? /* @__PURE__ */
|
|
1322
|
+
M ? /* @__PURE__ */ I(Ue, { children: [
|
|
1307
1323
|
/* @__PURE__ */ a(
|
|
1308
|
-
|
|
1324
|
+
oe,
|
|
1309
1325
|
{
|
|
1310
1326
|
label: "Year",
|
|
1311
|
-
items:
|
|
1312
|
-
refine:
|
|
1327
|
+
items: ye,
|
|
1328
|
+
refine: pt,
|
|
1313
1329
|
selected: e.year,
|
|
1314
|
-
bgDark:
|
|
1315
|
-
showLabel:
|
|
1316
|
-
isMobile:
|
|
1330
|
+
bgDark: G,
|
|
1331
|
+
showLabel: B,
|
|
1332
|
+
isMobile: re,
|
|
1317
1333
|
sortOptions: !1,
|
|
1318
|
-
loading:
|
|
1334
|
+
loading: ye.length === 0,
|
|
1319
1335
|
shouldBeActive: !0
|
|
1320
1336
|
}
|
|
1321
1337
|
),
|
|
1322
1338
|
/* @__PURE__ */ a(
|
|
1323
|
-
|
|
1339
|
+
oe,
|
|
1324
1340
|
{
|
|
1325
1341
|
label: "Make",
|
|
1326
|
-
items:
|
|
1327
|
-
refine:
|
|
1342
|
+
items: Ee,
|
|
1343
|
+
refine: ct,
|
|
1328
1344
|
selected: e.make,
|
|
1329
1345
|
showPopular: !0,
|
|
1330
|
-
bgDark:
|
|
1331
|
-
showLabel:
|
|
1332
|
-
isMobile:
|
|
1346
|
+
bgDark: G,
|
|
1347
|
+
showLabel: B,
|
|
1348
|
+
isMobile: re,
|
|
1333
1349
|
sortOptions: !1,
|
|
1334
|
-
loading: e.year &&
|
|
1350
|
+
loading: e.year && Ee.length === 0,
|
|
1335
1351
|
shouldBeActive: !!e.year
|
|
1336
1352
|
}
|
|
1337
1353
|
),
|
|
1338
1354
|
/* @__PURE__ */ a(
|
|
1339
|
-
|
|
1355
|
+
oe,
|
|
1340
1356
|
{
|
|
1341
1357
|
label: "Model",
|
|
1342
|
-
items:
|
|
1343
|
-
refine:
|
|
1358
|
+
items: je,
|
|
1359
|
+
refine: dt,
|
|
1344
1360
|
selected: e.model,
|
|
1345
1361
|
showPopular: !0,
|
|
1346
|
-
bgDark:
|
|
1347
|
-
showLabel:
|
|
1348
|
-
isMobile:
|
|
1362
|
+
bgDark: G,
|
|
1363
|
+
showLabel: B,
|
|
1364
|
+
isMobile: re,
|
|
1349
1365
|
sortOptions: !1,
|
|
1350
|
-
loading: e.make &&
|
|
1366
|
+
loading: e.make && je.length === 0,
|
|
1351
1367
|
shouldBeActive: !!e.make
|
|
1352
1368
|
}
|
|
1353
1369
|
)
|
|
1354
|
-
] }) : /* @__PURE__ */
|
|
1370
|
+
] }) : /* @__PURE__ */ I(Ue, { children: [
|
|
1355
1371
|
/* @__PURE__ */ a(
|
|
1356
|
-
|
|
1372
|
+
oe,
|
|
1357
1373
|
{
|
|
1358
1374
|
label: "Make",
|
|
1359
|
-
items:
|
|
1360
|
-
refine:
|
|
1375
|
+
items: Ee,
|
|
1376
|
+
refine: ct,
|
|
1361
1377
|
selected: e.make,
|
|
1362
1378
|
showPopular: !0,
|
|
1363
|
-
bgDark:
|
|
1364
|
-
showLabel:
|
|
1365
|
-
isMobile:
|
|
1379
|
+
bgDark: G,
|
|
1380
|
+
showLabel: B,
|
|
1381
|
+
isMobile: re,
|
|
1366
1382
|
sortOptions: !1,
|
|
1367
|
-
loading:
|
|
1383
|
+
loading: Ee.length === 0,
|
|
1368
1384
|
shouldBeActive: !0
|
|
1369
1385
|
}
|
|
1370
1386
|
),
|
|
1371
1387
|
/* @__PURE__ */ a(
|
|
1372
|
-
|
|
1388
|
+
oe,
|
|
1373
1389
|
{
|
|
1374
1390
|
label: "Model",
|
|
1375
|
-
items:
|
|
1376
|
-
refine:
|
|
1391
|
+
items: je,
|
|
1392
|
+
refine: dt,
|
|
1377
1393
|
selected: e.model,
|
|
1378
1394
|
showPopular: !0,
|
|
1379
|
-
bgDark:
|
|
1380
|
-
showLabel:
|
|
1381
|
-
isMobile:
|
|
1395
|
+
bgDark: G,
|
|
1396
|
+
showLabel: B,
|
|
1397
|
+
isMobile: re,
|
|
1382
1398
|
sortOptions: !1,
|
|
1383
|
-
loading: e.make &&
|
|
1399
|
+
loading: e.make && je.length === 0,
|
|
1384
1400
|
shouldBeActive: !!e.make
|
|
1385
1401
|
}
|
|
1386
1402
|
),
|
|
1387
1403
|
/* @__PURE__ */ a(
|
|
1388
|
-
|
|
1404
|
+
oe,
|
|
1389
1405
|
{
|
|
1390
1406
|
label: "Year",
|
|
1391
|
-
items:
|
|
1392
|
-
refine:
|
|
1407
|
+
items: ye,
|
|
1408
|
+
refine: pt,
|
|
1393
1409
|
selected: e.year,
|
|
1394
|
-
bgDark:
|
|
1395
|
-
showLabel:
|
|
1396
|
-
isMobile:
|
|
1410
|
+
bgDark: G,
|
|
1411
|
+
showLabel: B,
|
|
1412
|
+
isMobile: re,
|
|
1397
1413
|
sortOptions: !1,
|
|
1398
|
-
loading: e.model &&
|
|
1414
|
+
loading: e.model && ye.length === 0,
|
|
1399
1415
|
shouldBeActive: !!e.model
|
|
1400
1416
|
}
|
|
1401
1417
|
)
|
|
1402
1418
|
] }),
|
|
1403
|
-
|
|
1419
|
+
Ve.current && Ve.current.map((t) => {
|
|
1404
1420
|
let r = null;
|
|
1405
1421
|
switch (t) {
|
|
1406
1422
|
case "body":
|
|
1407
1423
|
r = /* @__PURE__ */ a(
|
|
1408
|
-
|
|
1424
|
+
oe,
|
|
1409
1425
|
{
|
|
1410
1426
|
label: "Body",
|
|
1411
|
-
items:
|
|
1412
|
-
refine:
|
|
1427
|
+
items: Xe,
|
|
1428
|
+
refine: zt,
|
|
1413
1429
|
selected: e.body,
|
|
1414
|
-
bgDark:
|
|
1415
|
-
showLabel:
|
|
1416
|
-
isMobile:
|
|
1417
|
-
loading: !!(e.make && e.model && e.year) &&
|
|
1430
|
+
bgDark: G,
|
|
1431
|
+
showLabel: B,
|
|
1432
|
+
isMobile: re,
|
|
1433
|
+
loading: !!(e.make && e.model && e.year) && Xe.length === 0,
|
|
1418
1434
|
shouldBeActive: !!(e.make && e.model && e.year)
|
|
1419
1435
|
},
|
|
1420
1436
|
"body"
|
|
@@ -1422,16 +1438,16 @@ function Xt({
|
|
|
1422
1438
|
break;
|
|
1423
1439
|
case "series":
|
|
1424
1440
|
r = /* @__PURE__ */ a(
|
|
1425
|
-
|
|
1441
|
+
oe,
|
|
1426
1442
|
{
|
|
1427
1443
|
label: "Series",
|
|
1428
|
-
items:
|
|
1429
|
-
refine:
|
|
1444
|
+
items: Ge,
|
|
1445
|
+
refine: St,
|
|
1430
1446
|
selected: e.series,
|
|
1431
|
-
bgDark:
|
|
1432
|
-
showLabel:
|
|
1433
|
-
isMobile:
|
|
1434
|
-
loading: !!(e.make && e.model && e.year) &&
|
|
1447
|
+
bgDark: G,
|
|
1448
|
+
showLabel: B,
|
|
1449
|
+
isMobile: re,
|
|
1450
|
+
loading: !!(e.make && e.model && e.year) && Ge.length === 0,
|
|
1435
1451
|
shouldBeActive: !!(e.make && e.model && e.year)
|
|
1436
1452
|
},
|
|
1437
1453
|
"series"
|
|
@@ -1439,16 +1455,16 @@ function Xt({
|
|
|
1439
1455
|
break;
|
|
1440
1456
|
case "variant":
|
|
1441
1457
|
r = /* @__PURE__ */ a(
|
|
1442
|
-
|
|
1458
|
+
oe,
|
|
1443
1459
|
{
|
|
1444
1460
|
label: "Variant",
|
|
1445
|
-
items:
|
|
1446
|
-
refine:
|
|
1461
|
+
items: et,
|
|
1462
|
+
refine: $t,
|
|
1447
1463
|
selected: e.variant,
|
|
1448
|
-
bgDark:
|
|
1449
|
-
showLabel:
|
|
1450
|
-
isMobile:
|
|
1451
|
-
loading: !!(e.make && e.model && e.year) &&
|
|
1464
|
+
bgDark: G,
|
|
1465
|
+
showLabel: B,
|
|
1466
|
+
isMobile: re,
|
|
1467
|
+
loading: !!(e.make && e.model && e.year) && et.length === 0,
|
|
1452
1468
|
shouldBeActive: !!(e.make && e.model && e.year)
|
|
1453
1469
|
},
|
|
1454
1470
|
"variant"
|
|
@@ -1456,16 +1472,16 @@ function Xt({
|
|
|
1456
1472
|
break;
|
|
1457
1473
|
case "engine_capacity":
|
|
1458
1474
|
r = /* @__PURE__ */ a(
|
|
1459
|
-
|
|
1475
|
+
oe,
|
|
1460
1476
|
{
|
|
1461
1477
|
label: "Engine Capacity",
|
|
1462
|
-
items:
|
|
1463
|
-
refine:
|
|
1478
|
+
items: rt,
|
|
1479
|
+
refine: Et,
|
|
1464
1480
|
selected: e.engine_capacity,
|
|
1465
|
-
bgDark:
|
|
1466
|
-
showLabel:
|
|
1467
|
-
isMobile:
|
|
1468
|
-
loading: !!(e.make && e.model && e.year) &&
|
|
1481
|
+
bgDark: G,
|
|
1482
|
+
showLabel: B,
|
|
1483
|
+
isMobile: re,
|
|
1484
|
+
loading: !!(e.make && e.model && e.year) && rt.length === 0,
|
|
1469
1485
|
shouldBeActive: !!(e.make && e.model && e.year)
|
|
1470
1486
|
},
|
|
1471
1487
|
"engine_capacity"
|
|
@@ -1473,16 +1489,16 @@ function Xt({
|
|
|
1473
1489
|
break;
|
|
1474
1490
|
case "engine":
|
|
1475
1491
|
r = /* @__PURE__ */ a(
|
|
1476
|
-
|
|
1492
|
+
oe,
|
|
1477
1493
|
{
|
|
1478
1494
|
label: "Engine",
|
|
1479
|
-
items:
|
|
1480
|
-
refine:
|
|
1495
|
+
items: tt,
|
|
1496
|
+
refine: At,
|
|
1481
1497
|
selected: e.engine,
|
|
1482
|
-
bgDark:
|
|
1483
|
-
showLabel:
|
|
1484
|
-
isMobile:
|
|
1485
|
-
loading: !!(e.make && e.model && e.year) &&
|
|
1498
|
+
bgDark: G,
|
|
1499
|
+
showLabel: B,
|
|
1500
|
+
isMobile: re,
|
|
1501
|
+
loading: !!(e.make && e.model && e.year) && tt.length === 0,
|
|
1486
1502
|
shouldBeActive: !!(e.make && e.model && e.year)
|
|
1487
1503
|
},
|
|
1488
1504
|
"engine"
|
|
@@ -1491,16 +1507,16 @@ function Xt({
|
|
|
1491
1507
|
}
|
|
1492
1508
|
return r;
|
|
1493
1509
|
}),
|
|
1494
|
-
|
|
1510
|
+
ne && /* @__PURE__ */ a("div", { className: "vs:flex vs:h-full vs:flex-col vs:justify-end vs:md:col-span-3 vs:lg:col-span-1", children: /* @__PURE__ */ I(
|
|
1495
1511
|
"button",
|
|
1496
1512
|
{
|
|
1497
1513
|
className: "vehicle-search-btn",
|
|
1498
1514
|
onClick: () => {
|
|
1499
|
-
|
|
1515
|
+
Re(!0), X && !ie ? window.location.href = X + window.location.search : Mt();
|
|
1500
1516
|
},
|
|
1501
1517
|
children: [
|
|
1502
|
-
/* @__PURE__ */ a("span", { children:
|
|
1503
|
-
|
|
1518
|
+
/* @__PURE__ */ a("span", { children: ve }),
|
|
1519
|
+
wt && /* @__PURE__ */ a(Je, { className: "vs:w-[calc(var(--partbot-font-size)*0.9)]! vs:h-[calc(var(--partbot-font-size)*0.9)]! vs:animate-spin" })
|
|
1504
1520
|
]
|
|
1505
1521
|
}
|
|
1506
1522
|
) })
|
|
@@ -1510,22 +1526,22 @@ function Xt({
|
|
|
1510
1526
|
Z && /* @__PURE__ */ a(
|
|
1511
1527
|
"div",
|
|
1512
1528
|
{
|
|
1513
|
-
className:
|
|
1529
|
+
className: me(
|
|
1514
1530
|
"vs:flex vs:w-full vs:justify-center vs:items-center",
|
|
1515
|
-
|
|
1531
|
+
Y === "row" ? "vs:md:items-end vs:md:justify-end" : "vs:md:justify-center",
|
|
1516
1532
|
"vs:mt-4 vs:md:mt-3 vs:md:pr-1.5"
|
|
1517
1533
|
),
|
|
1518
|
-
children: /* @__PURE__ */
|
|
1534
|
+
children: /* @__PURE__ */ I(
|
|
1519
1535
|
"a",
|
|
1520
1536
|
{
|
|
1521
1537
|
href: `https://use.partbot.io/?ref=${// append referrer to url, just the top level domain
|
|
1522
1538
|
typeof window < "u" ? window.location.href.split("/")[2] : "unknown"}&utm_source=vehicle-select&utm_medium=referral&utm_campaign=powered-by`,
|
|
1523
1539
|
target: "_blank",
|
|
1524
1540
|
rel: "noreferrer",
|
|
1525
|
-
className: `${
|
|
1541
|
+
className: `${G ? "vs:text-white" : "vs:text-black"} vs:flex vs:items-center vs:space-x-1.5 vs:px-1.5 vs:text-center vs:leading-normal vs:text-[10px] vs:opacity-75 vs:transition vs:hover:opacity-100 vs:font-sans vs:no-underline vs:m-0 pb-1.5`,
|
|
1526
1542
|
children: [
|
|
1527
1543
|
/* @__PURE__ */ a("span", { children: "Powered by" }),
|
|
1528
|
-
/* @__PURE__ */ a(
|
|
1544
|
+
/* @__PURE__ */ a(Zt, { className: "vs:inline-flex vs:h-[13px]" })
|
|
1529
1545
|
]
|
|
1530
1546
|
}
|
|
1531
1547
|
)
|
|
@@ -1536,29 +1552,29 @@ function Xt({
|
|
|
1536
1552
|
)
|
|
1537
1553
|
] });
|
|
1538
1554
|
}
|
|
1539
|
-
let
|
|
1540
|
-
function
|
|
1541
|
-
var
|
|
1542
|
-
const
|
|
1543
|
-
if (!
|
|
1555
|
+
let gt = !1, Ae = !1;
|
|
1556
|
+
function qt(h) {
|
|
1557
|
+
var B, pe;
|
|
1558
|
+
const f = h.shadowRoot;
|
|
1559
|
+
if (!f) {
|
|
1544
1560
|
console.error("[ShadowDOMPatch] No shadow root found");
|
|
1545
1561
|
return;
|
|
1546
1562
|
}
|
|
1547
|
-
const
|
|
1548
|
-
if (!
|
|
1563
|
+
const p = f.children[1];
|
|
1564
|
+
if (!p) {
|
|
1549
1565
|
console.error("[ShadowDOMPatch] No mount point found in shadow root");
|
|
1550
1566
|
return;
|
|
1551
1567
|
}
|
|
1552
1568
|
if (new MutationObserver((m) => {
|
|
1553
1569
|
m.forEach((_) => {
|
|
1554
1570
|
_.addedNodes.forEach((S) => {
|
|
1555
|
-
S.nodeType === 1 && S.id === "headlessui-portal-root" && (
|
|
1571
|
+
S.nodeType === 1 && S.id === "headlessui-portal-root" && (p.appendChild(S), Ae = !0);
|
|
1556
1572
|
});
|
|
1557
1573
|
}), m.forEach((_) => {
|
|
1558
1574
|
_.removedNodes.forEach((S) => {
|
|
1559
|
-
S.nodeType === 1 && S.id === "headlessui-portal-root" && (
|
|
1575
|
+
S.nodeType === 1 && S.id === "headlessui-portal-root" && (p.querySelector(
|
|
1560
1576
|
"#headlessui-portal-root"
|
|
1561
|
-
) || (
|
|
1577
|
+
) || (Ae = !1));
|
|
1562
1578
|
});
|
|
1563
1579
|
});
|
|
1564
1580
|
}).observe(document.body, {
|
|
@@ -1566,35 +1582,35 @@ function Gt(u) {
|
|
|
1566
1582
|
}), new MutationObserver((m) => {
|
|
1567
1583
|
m.forEach((_) => {
|
|
1568
1584
|
_.removedNodes.forEach((S) => {
|
|
1569
|
-
S.nodeType === 1 && S.id === "headlessui-portal-root" && (
|
|
1585
|
+
S.nodeType === 1 && S.id === "headlessui-portal-root" && (Ae = !1);
|
|
1570
1586
|
});
|
|
1571
1587
|
});
|
|
1572
|
-
}).observe(
|
|
1588
|
+
}).observe(p, {
|
|
1573
1589
|
childList: !0,
|
|
1574
1590
|
subtree: !0
|
|
1575
|
-
}),
|
|
1591
|
+
}), gt)
|
|
1576
1592
|
return;
|
|
1577
|
-
const
|
|
1593
|
+
const X = (B = Object.getOwnPropertyDescriptor(
|
|
1578
1594
|
Document.prototype,
|
|
1579
1595
|
"activeElement"
|
|
1580
|
-
)) == null ? void 0 :
|
|
1596
|
+
)) == null ? void 0 : B.get;
|
|
1581
1597
|
Object.defineProperty(Document.prototype, "activeElement", {
|
|
1582
1598
|
get: function() {
|
|
1583
|
-
const m =
|
|
1584
|
-
return m ===
|
|
1599
|
+
const m = X == null ? void 0 : X.call(this);
|
|
1600
|
+
return m === h ? f.activeElement : m;
|
|
1585
1601
|
}
|
|
1586
1602
|
});
|
|
1587
|
-
const
|
|
1603
|
+
const Y = (pe = Object.getOwnPropertyDescriptor(
|
|
1588
1604
|
Event.prototype,
|
|
1589
1605
|
"target"
|
|
1590
|
-
)) == null ? void 0 :
|
|
1606
|
+
)) == null ? void 0 : pe.get;
|
|
1591
1607
|
Object.defineProperty(Event.prototype, "target", {
|
|
1592
1608
|
get: function() {
|
|
1593
|
-
const m =
|
|
1594
|
-
return m ===
|
|
1609
|
+
const m = Y == null ? void 0 : Y.call(this);
|
|
1610
|
+
return m === h ? this.composedPath()[0] : m;
|
|
1595
1611
|
}
|
|
1596
1612
|
});
|
|
1597
|
-
const
|
|
1613
|
+
const T = (m) => {
|
|
1598
1614
|
try {
|
|
1599
1615
|
return document.body && m === document.body.style;
|
|
1600
1616
|
} catch {
|
|
@@ -1602,7 +1618,7 @@ function Gt(u) {
|
|
|
1602
1618
|
}
|
|
1603
1619
|
}, K = CSSStyleDeclaration.prototype.setProperty;
|
|
1604
1620
|
CSSStyleDeclaration.prototype.setProperty = function(m, _, S) {
|
|
1605
|
-
if (!(
|
|
1621
|
+
if (!(T(this) && m === "overflow" && _ === "hidden" && Ae))
|
|
1606
1622
|
return K.call(this, m, _, S);
|
|
1607
1623
|
};
|
|
1608
1624
|
const Z = Object.getOwnPropertyDescriptor(
|
|
@@ -1614,90 +1630,90 @@ function Gt(u) {
|
|
|
1614
1630
|
return Z.get.call(this);
|
|
1615
1631
|
},
|
|
1616
1632
|
set: function(m) {
|
|
1617
|
-
if (!(
|
|
1633
|
+
if (!(T(this) && m === "hidden" && Ae))
|
|
1618
1634
|
return Z.set.call(this, m);
|
|
1619
1635
|
}
|
|
1620
|
-
}),
|
|
1636
|
+
}), gt = !0;
|
|
1621
1637
|
}
|
|
1622
|
-
const
|
|
1623
|
-
class
|
|
1638
|
+
const Qt = "/css/vehicle-search.css", dr = Qt;
|
|
1639
|
+
class Wt extends HTMLElement {
|
|
1624
1640
|
connectedCallback() {
|
|
1625
1641
|
if (!document.getElementById("vehicle-search-inter-font")) {
|
|
1626
|
-
const
|
|
1627
|
-
|
|
1642
|
+
const y = document.createElement("link");
|
|
1643
|
+
y.id = "vehicle-search-inter-font", y.rel = "stylesheet", y.href = "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap", document.head.appendChild(y);
|
|
1628
1644
|
}
|
|
1629
|
-
let
|
|
1630
|
-
|
|
1631
|
-
const
|
|
1632
|
-
let
|
|
1633
|
-
if (this.hasAttribute(
|
|
1634
|
-
const
|
|
1635
|
-
if (/^#[0-9A-F]{6}$/i.test(
|
|
1636
|
-
const
|
|
1637
|
-
|
|
1645
|
+
let f = document.createElement("style");
|
|
1646
|
+
f.textContent = Yt;
|
|
1647
|
+
const p = document.createElement("div"), J = this.attachShadow({ mode: "open" }), L = (y, D, ee) => {
|
|
1648
|
+
let te;
|
|
1649
|
+
if (this.hasAttribute(D)) {
|
|
1650
|
+
const k = this.getAttribute(D);
|
|
1651
|
+
if (/^#[0-9A-F]{6}$/i.test(k)) {
|
|
1652
|
+
const _e = parseInt(k.slice(1, 3), 16), R = parseInt(k.slice(3, 5), 16), M = parseInt(k.slice(5, 7), 16);
|
|
1653
|
+
te = `${_e} ${R} ${M}`;
|
|
1638
1654
|
}
|
|
1639
1655
|
}
|
|
1640
|
-
return
|
|
1656
|
+
return te = te || ee, `:host { --${y}: ${te}; } .partbot-mmyvs-container { --${y}: ${te}; }`;
|
|
1641
1657
|
};
|
|
1642
|
-
let
|
|
1658
|
+
let X = L(
|
|
1643
1659
|
"partbot-theme",
|
|
1644
1660
|
"data-button-color",
|
|
1645
1661
|
"0 0 0"
|
|
1646
|
-
),
|
|
1662
|
+
), Y = L(
|
|
1647
1663
|
"partbot-button-color",
|
|
1648
1664
|
"data-button-color",
|
|
1649
1665
|
"0 0 0"
|
|
1650
|
-
),
|
|
1666
|
+
), T = L(
|
|
1651
1667
|
"partbot-button-hover-color",
|
|
1652
1668
|
"data-button-hover-color",
|
|
1653
1669
|
"0 0 0"
|
|
1654
|
-
), K =
|
|
1670
|
+
), K = L(
|
|
1655
1671
|
"partbot-button-label-color",
|
|
1656
1672
|
"data-button-label-color",
|
|
1657
1673
|
"255 255 255"
|
|
1658
|
-
), Z =
|
|
1674
|
+
), Z = L(
|
|
1659
1675
|
"partbot-button-hover-label-color",
|
|
1660
1676
|
"data-button-hover-label-color",
|
|
1661
1677
|
"255 255 255"
|
|
1662
|
-
),
|
|
1678
|
+
), B = L(
|
|
1663
1679
|
"partbot-mobile-background-color",
|
|
1664
1680
|
"data-mobile-background-color",
|
|
1665
1681
|
"0 0 0"
|
|
1666
|
-
),
|
|
1667
|
-
const
|
|
1668
|
-
let
|
|
1669
|
-
const
|
|
1670
|
-
let
|
|
1671
|
-
if (
|
|
1672
|
-
if (/^#[0-9A-F]{6}$/i.test(
|
|
1673
|
-
const
|
|
1674
|
-
|
|
1675
|
-
} else /^\d+\s+\d+\s+\d+$/.test(
|
|
1676
|
-
let
|
|
1677
|
-
const
|
|
1678
|
-
let g = `:host { --partbot-input-border-width: ${
|
|
1679
|
-
|
|
1680
|
-
const
|
|
1681
|
-
if (
|
|
1682
|
-
console.warn("Missing attributes: " + (
|
|
1682
|
+
), pe = `:host { --partbot-button-border-radius: ${this.getAttribute("data-button-border-radius") || "0.375rem"}; } .partbot-mmyvs-container { --partbot-button-border-radius: ${this.getAttribute("data-button-border-radius") || "0.375rem"}; }`, m = `:host { --partbot-font-size: ${this.getAttribute("data-font-size") || "0.875rem"}; } .partbot-mmyvs-container { --partbot-font-size: ${this.getAttribute("data-font-size") || "0.875rem"}; }`, _ = `:host { --partbot-font-family: ${(this.getAttribute("data-font-family") || this.getAttribute("data-font")) && (this.getAttribute("data-font-family") || this.getAttribute("data-font")).trim() !== "" ? this.getAttribute("data-font-family") || this.getAttribute("data-font") : '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif'}; } .partbot-mmyvs-container { --partbot-font-family: ${(this.getAttribute("data-font-family") || this.getAttribute("data-font")) && (this.getAttribute("data-font-family") || this.getAttribute("data-font")).trim() !== "" ? this.getAttribute("data-font-family") || this.getAttribute("data-font") : '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif'}; }`, S = `:host { --partbot-padding: ${this.getAttribute("data-padding") || "0.5rem"}; } .partbot-mmyvs-container { --partbot-padding: ${this.getAttribute("data-padding") || "0.5rem"}; }`;
|
|
1683
|
+
const ve = this.getAttribute("data-input-shadow"), ne = ve === "none" ? "none" : ve || "0 1px 2px 0 rgb(0 0 0 / 0.05)";
|
|
1684
|
+
let ie = `:host { --partbot-input-shadow: ${ne}; } .partbot-mmyvs-container { --partbot-input-shadow: ${ne}; }`;
|
|
1685
|
+
const w = this.getAttribute("data-input-border-color");
|
|
1686
|
+
let V = "229 231 235";
|
|
1687
|
+
if (w)
|
|
1688
|
+
if (/^#[0-9A-F]{6}$/i.test(w)) {
|
|
1689
|
+
const y = parseInt(w.slice(1, 3), 16), D = parseInt(w.slice(3, 5), 16), ee = parseInt(w.slice(5, 7), 16);
|
|
1690
|
+
V = `${y} ${D} ${ee}`;
|
|
1691
|
+
} else /^\d+\s+\d+\s+\d+$/.test(w) && (V = w);
|
|
1692
|
+
let be = `:host { --partbot-input-border-color: ${V}; } .partbot-mmyvs-container { --partbot-input-border-color: ${V}; }`;
|
|
1693
|
+
const l = this.getAttribute("data-input-border-width") || "1px";
|
|
1694
|
+
let g = `:host { --partbot-input-border-width: ${l}; } .partbot-mmyvs-container { --partbot-input-border-width: ${l}; }`;
|
|
1695
|
+
f.textContent += X, f.textContent += Y, f.textContent += T, f.textContent += K, f.textContent += Z, f.textContent += B, f.textContent += pe, f.textContent += m, f.textContent += _, f.textContent += S, f.textContent += ie, f.textContent += be, f.textContent += g, J.appendChild(f), J.appendChild(p);
|
|
1696
|
+
const j = this.getAttribute("data-api-key");
|
|
1697
|
+
if (!j) {
|
|
1698
|
+
console.warn("Missing attributes: " + (j ? "" : "data-api-key "));
|
|
1683
1699
|
return;
|
|
1684
1700
|
}
|
|
1685
|
-
const
|
|
1686
|
-
for (let
|
|
1687
|
-
const { name:
|
|
1688
|
-
if (
|
|
1689
|
-
const
|
|
1690
|
-
|
|
1701
|
+
const ke = this.attributes, Ce = {};
|
|
1702
|
+
for (let y = 0; y < ke.length; y++) {
|
|
1703
|
+
const { name: D, value: ee } = ke[y];
|
|
1704
|
+
if (D.startsWith("data-")) {
|
|
1705
|
+
const te = D.slice(5).replace(/-([a-z])/g, (k) => k[1].toUpperCase());
|
|
1706
|
+
Ce[te] = ee === "true" ? !0 : ee === "false" ? !1 : ee;
|
|
1691
1707
|
}
|
|
1692
1708
|
}
|
|
1693
|
-
|
|
1694
|
-
const
|
|
1695
|
-
|
|
1709
|
+
qt(this);
|
|
1710
|
+
const we = /* @__PURE__ */ a(Kt, { ...Ce });
|
|
1711
|
+
Pt.render(we, p);
|
|
1696
1712
|
}
|
|
1697
1713
|
}
|
|
1698
|
-
customElements.define("vehicle-search",
|
|
1714
|
+
customElements.define("vehicle-search", Wt);
|
|
1699
1715
|
export {
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1716
|
+
Kt as VehicleSearch,
|
|
1717
|
+
Kt as default,
|
|
1718
|
+
dr as vehicleSearchCssUrl
|
|
1703
1719
|
};
|