@vehiclehistory/property-lib 0.0.993 → 0.0.994
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/main.es.js
CHANGED
|
@@ -627,14 +627,14 @@ const W = {
|
|
|
627
627
|
iconColor: "text-yellow-500",
|
|
628
628
|
styles: "bg-yellow-50 border-yellow-300 text-yellow-700"
|
|
629
629
|
}
|
|
630
|
-
}, { icon: o, iconColor:
|
|
630
|
+
}, { icon: o, iconColor: p, styles: u } = l[i];
|
|
631
631
|
return /* @__PURE__ */ c(
|
|
632
632
|
"div",
|
|
633
633
|
{
|
|
634
634
|
id: i,
|
|
635
635
|
className: m(
|
|
636
636
|
"rounded w-full py-2 px-4 mb-4 border",
|
|
637
|
-
|
|
637
|
+
u,
|
|
638
638
|
e
|
|
639
639
|
),
|
|
640
640
|
...r,
|
|
@@ -644,7 +644,7 @@ const W = {
|
|
|
644
644
|
{
|
|
645
645
|
name: o,
|
|
646
646
|
viewBox: "0 0 24 24",
|
|
647
|
-
className:
|
|
647
|
+
className: p,
|
|
648
648
|
size: "xSmall"
|
|
649
649
|
}
|
|
650
650
|
) }),
|
|
@@ -677,8 +677,8 @@ const W = {
|
|
|
677
677
|
leftIcon: i = "homeSearch",
|
|
678
678
|
mobileBackdrop: l = !1,
|
|
679
679
|
name: o = "",
|
|
680
|
-
options:
|
|
681
|
-
parentProps:
|
|
680
|
+
options: p = [],
|
|
681
|
+
parentProps: u = {},
|
|
682
682
|
placeholder: V = "",
|
|
683
683
|
props: C = {},
|
|
684
684
|
rightIcon: f = "",
|
|
@@ -702,7 +702,7 @@ const W = {
|
|
|
702
702
|
"data-use-google": j,
|
|
703
703
|
className: m("Autocomplete", e),
|
|
704
704
|
style: w ? { ...w } : null,
|
|
705
|
-
...
|
|
705
|
+
...u,
|
|
706
706
|
children: [
|
|
707
707
|
A && /* @__PURE__ */ M(
|
|
708
708
|
"span",
|
|
@@ -831,7 +831,7 @@ const W = {
|
|
|
831
831
|
"data-title": g,
|
|
832
832
|
"aria-labelledby": "Label",
|
|
833
833
|
"aria-activedescendant": "search-item-0",
|
|
834
|
-
children:
|
|
834
|
+
children: p.length > 0 ? p.map((k, z) => /* @__PURE__ */ c(
|
|
835
835
|
"li",
|
|
836
836
|
{
|
|
837
837
|
id: `search-item-${z}`,
|
|
@@ -881,8 +881,8 @@ const W = {
|
|
|
881
881
|
outline: i = !1,
|
|
882
882
|
props: l = {},
|
|
883
883
|
rightIcon: o,
|
|
884
|
-
rightIconProps:
|
|
885
|
-
rounded:
|
|
884
|
+
rightIconProps: p = {},
|
|
885
|
+
rounded: u = !1,
|
|
886
886
|
size: V = "md",
|
|
887
887
|
type: C = "button",
|
|
888
888
|
uppercase: f = !1,
|
|
@@ -898,7 +898,7 @@ const W = {
|
|
|
898
898
|
{
|
|
899
899
|
[`button--${v}`]: v,
|
|
900
900
|
[`button--${V}`]: V,
|
|
901
|
-
"button--rounded":
|
|
901
|
+
"button--rounded": u,
|
|
902
902
|
"button--disabled": s,
|
|
903
903
|
"button--outline": i,
|
|
904
904
|
"button--custom-link": r,
|
|
@@ -927,7 +927,7 @@ const W = {
|
|
|
927
927
|
name: o,
|
|
928
928
|
size: V === "md" ? "small" : "xSmall",
|
|
929
929
|
viewBox: "0 0 24 24",
|
|
930
|
-
...
|
|
930
|
+
...p
|
|
931
931
|
}
|
|
932
932
|
)
|
|
933
933
|
]
|
|
@@ -944,11 +944,11 @@ const W = {
|
|
|
944
944
|
name: i = "",
|
|
945
945
|
props: l = {},
|
|
946
946
|
variation: o = "primary",
|
|
947
|
-
value:
|
|
947
|
+
value: p = ""
|
|
948
948
|
}) => {
|
|
949
|
-
const
|
|
949
|
+
const u = r ? "div" : "label", V = u === "label" ? { htmlFor: s } : {};
|
|
950
950
|
return /* @__PURE__ */ M(
|
|
951
|
-
|
|
951
|
+
u,
|
|
952
952
|
{
|
|
953
953
|
className: m("checkbox flex items-center", o, t),
|
|
954
954
|
...V,
|
|
@@ -967,7 +967,7 @@ const W = {
|
|
|
967
967
|
id: s,
|
|
968
968
|
name: i,
|
|
969
969
|
type: "checkbox",
|
|
970
|
-
value:
|
|
970
|
+
value: p,
|
|
971
971
|
...l
|
|
972
972
|
}
|
|
973
973
|
),
|
|
@@ -986,8 +986,8 @@ const W = {
|
|
|
986
986
|
disableClose: i = !1,
|
|
987
987
|
footer: l,
|
|
988
988
|
fullMobile: o = !0,
|
|
989
|
-
headerClass:
|
|
990
|
-
hideClose:
|
|
989
|
+
headerClass: p,
|
|
990
|
+
hideClose: u = !1,
|
|
991
991
|
iconSize: V = "medium",
|
|
992
992
|
preventPageScroll: C = !0,
|
|
993
993
|
sheet: f = !1,
|
|
@@ -1033,11 +1033,11 @@ const W = {
|
|
|
1033
1033
|
"!pb-0 border-0 justify-end": !h,
|
|
1034
1034
|
"justify-between border-b": h
|
|
1035
1035
|
},
|
|
1036
|
-
|
|
1036
|
+
p
|
|
1037
1037
|
),
|
|
1038
1038
|
children: [
|
|
1039
1039
|
h && /* @__PURE__ */ c("h3", { id: `${e}-dialog-title`, className: b, children: h }),
|
|
1040
|
-
!
|
|
1040
|
+
!u && /* @__PURE__ */ c(
|
|
1041
1041
|
"button",
|
|
1042
1042
|
{
|
|
1043
1043
|
type: "button",
|
|
@@ -1102,15 +1102,15 @@ const W = {
|
|
|
1102
1102
|
`.loading-bar__inner${a ? `.${a}` : ""}`
|
|
1103
1103
|
);
|
|
1104
1104
|
if (!o) return;
|
|
1105
|
-
let
|
|
1105
|
+
let p, u, V = !1;
|
|
1106
1106
|
function C(f) {
|
|
1107
|
-
|
|
1108
|
-
const v = f -
|
|
1109
|
-
if (
|
|
1107
|
+
p === void 0 && (p = f);
|
|
1108
|
+
const v = f - p;
|
|
1109
|
+
if (u !== f) {
|
|
1110
1110
|
const A = v / s * 101;
|
|
1111
1111
|
o.style.width = `${A}%`, e && e({ elapsed: v, percentage: A }), A >= 101 && (l && l(), V = !0, window.cancelAnimationFrame(f));
|
|
1112
1112
|
}
|
|
1113
|
-
v < s && (
|
|
1113
|
+
v < s && (u = f, V || window.requestAnimationFrame(C));
|
|
1114
1114
|
}
|
|
1115
1115
|
window.requestAnimationFrame(C);
|
|
1116
1116
|
}
|
|
@@ -1197,7 +1197,7 @@ const W = {
|
|
|
1197
1197
|
rounded: l = !0,
|
|
1198
1198
|
showLabel: o = !1
|
|
1199
1199
|
}) => {
|
|
1200
|
-
const
|
|
1200
|
+
const u = ((V, C) => {
|
|
1201
1201
|
if (V) {
|
|
1202
1202
|
const f = Number(C) / V;
|
|
1203
1203
|
return f > 1 ? 100 : f * 100;
|
|
@@ -1224,7 +1224,7 @@ const W = {
|
|
|
1224
1224
|
"h-full text-right flex items-center justify-end rounded-full",
|
|
1225
1225
|
t
|
|
1226
1226
|
),
|
|
1227
|
-
style: { width: `${
|
|
1227
|
+
style: { width: `${u}%` },
|
|
1228
1228
|
children: o && /* @__PURE__ */ c(
|
|
1229
1229
|
"span",
|
|
1230
1230
|
{
|
|
@@ -1232,7 +1232,7 @@ const W = {
|
|
|
1232
1232
|
"font-bold text-white text-xs mr-2",
|
|
1233
1233
|
r
|
|
1234
1234
|
),
|
|
1235
|
-
children: s || Math.round(
|
|
1235
|
+
children: s || Math.round(u)
|
|
1236
1236
|
}
|
|
1237
1237
|
)
|
|
1238
1238
|
}
|
|
@@ -1251,12 +1251,12 @@ const W = {
|
|
|
1251
1251
|
variation: l = "primary",
|
|
1252
1252
|
value: o = ""
|
|
1253
1253
|
}) => {
|
|
1254
|
-
const
|
|
1254
|
+
const p = s ? "div" : "label", u = p === "label" ? { htmlFor: a } : {};
|
|
1255
1255
|
return /* @__PURE__ */ M(
|
|
1256
|
-
|
|
1256
|
+
p,
|
|
1257
1257
|
{
|
|
1258
1258
|
className: m("radio flex items-center", t),
|
|
1259
|
-
...
|
|
1259
|
+
...u,
|
|
1260
1260
|
children: [
|
|
1261
1261
|
/* @__PURE__ */ c(
|
|
1262
1262
|
"input",
|
|
@@ -1291,16 +1291,16 @@ const W = {
|
|
|
1291
1291
|
placeholder: i = "",
|
|
1292
1292
|
props: l = {},
|
|
1293
1293
|
selectClass: o = "",
|
|
1294
|
-
styles:
|
|
1295
|
-
variation:
|
|
1294
|
+
styles: p = null,
|
|
1295
|
+
variation: u = "primary",
|
|
1296
1296
|
value: V
|
|
1297
1297
|
}) => {
|
|
1298
1298
|
const C = i ? { defaultValue: "" } : {};
|
|
1299
1299
|
return /* @__PURE__ */ M(
|
|
1300
1300
|
"label",
|
|
1301
1301
|
{
|
|
1302
|
-
className: m("relative select", d,
|
|
1303
|
-
style:
|
|
1302
|
+
className: m("relative select", d, u),
|
|
1303
|
+
style: p ? { ...p } : null,
|
|
1304
1304
|
children: [
|
|
1305
1305
|
n,
|
|
1306
1306
|
/* @__PURE__ */ M(
|
|
@@ -1309,9 +1309,12 @@ const W = {
|
|
|
1309
1309
|
className: m(
|
|
1310
1310
|
"form-select relative bg-white pl-3 pr-10 text-left cursor-default",
|
|
1311
1311
|
{
|
|
1312
|
-
"!border-red-500
|
|
1312
|
+
"!border-red-500 focus:!ring-red-500 focus:!border-red-500": e
|
|
1313
1313
|
},
|
|
1314
|
-
|
|
1314
|
+
{ "!bg-red/500/10 !text-red-700": e && u !== "blue" },
|
|
1315
|
+
{ "!text-black-900": e && u === "blue" },
|
|
1316
|
+
o,
|
|
1317
|
+
u
|
|
1315
1318
|
),
|
|
1316
1319
|
id: a,
|
|
1317
1320
|
name: s,
|
|
@@ -1419,8 +1422,8 @@ const W = {
|
|
|
1419
1422
|
placeholder: i = "",
|
|
1420
1423
|
props: l = {},
|
|
1421
1424
|
rows: o = 4,
|
|
1422
|
-
variation:
|
|
1423
|
-
}) => /* @__PURE__ */ M("div", { className: m("relative textarea",
|
|
1425
|
+
variation: p = "primary"
|
|
1426
|
+
}) => /* @__PURE__ */ M("div", { className: m("relative textarea", p, d), children: [
|
|
1424
1427
|
/* @__PURE__ */ c(
|
|
1425
1428
|
"textarea",
|
|
1426
1429
|
{
|
|
@@ -1466,15 +1469,15 @@ const W = {
|
|
|
1466
1469
|
name: i = "",
|
|
1467
1470
|
placeholder: l = "",
|
|
1468
1471
|
props: o = {},
|
|
1469
|
-
styles:
|
|
1470
|
-
type:
|
|
1472
|
+
styles: p = null,
|
|
1473
|
+
type: u = "text",
|
|
1471
1474
|
value: V,
|
|
1472
1475
|
variation: C = "primary"
|
|
1473
1476
|
}) => /* @__PURE__ */ M(
|
|
1474
1477
|
"div",
|
|
1475
1478
|
{
|
|
1476
1479
|
className: m("relative textbox", C, d),
|
|
1477
|
-
style:
|
|
1480
|
+
style: p ? { ...p } : null,
|
|
1478
1481
|
children: [
|
|
1479
1482
|
n && /* @__PURE__ */ c("div", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center px-2", children: /* @__PURE__ */ c(
|
|
1480
1483
|
x,
|
|
@@ -1491,7 +1494,7 @@ const W = {
|
|
|
1491
1494
|
placeholder: l,
|
|
1492
1495
|
id: s,
|
|
1493
1496
|
name: i,
|
|
1494
|
-
type:
|
|
1497
|
+
type: u,
|
|
1495
1498
|
value: V,
|
|
1496
1499
|
autoComplete: "off",
|
|
1497
1500
|
className: m(
|
|
@@ -1499,10 +1502,14 @@ const W = {
|
|
|
1499
1502
|
e ? "pr-10" : "pr-4",
|
|
1500
1503
|
n ? "pl-8" : "pl-4",
|
|
1501
1504
|
{
|
|
1502
|
-
"!border-red-500
|
|
1505
|
+
"!border-red-500 focus:!ring-red-500 focus:!border-red-500": t
|
|
1503
1506
|
},
|
|
1504
1507
|
o.inputClass ?? "",
|
|
1505
|
-
r
|
|
1508
|
+
r,
|
|
1509
|
+
{ "placeholder:!text-black-900": t && C === "blue" },
|
|
1510
|
+
{
|
|
1511
|
+
"!bg-red-500/10 placeholder:!text-red-700": t && C !== "blue"
|
|
1512
|
+
}
|
|
1506
1513
|
),
|
|
1507
1514
|
...o
|
|
1508
1515
|
}
|
|
@@ -1656,23 +1663,23 @@ const W = {
|
|
|
1656
1663
|
headerClass: i,
|
|
1657
1664
|
list: l = !1,
|
|
1658
1665
|
props: o = {},
|
|
1659
|
-
variation:
|
|
1666
|
+
variation: p = "primary"
|
|
1660
1667
|
}) => {
|
|
1661
|
-
const
|
|
1668
|
+
const u = l ? "ul" : "div";
|
|
1662
1669
|
return /* @__PURE__ */ M(
|
|
1663
1670
|
"div",
|
|
1664
1671
|
{
|
|
1665
1672
|
className: m(
|
|
1666
1673
|
"content-card",
|
|
1667
1674
|
{ "content-card--block": d },
|
|
1668
|
-
`content-card--${
|
|
1675
|
+
`content-card--${p}`,
|
|
1669
1676
|
t
|
|
1670
1677
|
),
|
|
1671
1678
|
...o,
|
|
1672
1679
|
children: [
|
|
1673
1680
|
r && /* @__PURE__ */ c("div", { className: m("content-card__header", i), children: typeof r == "string" ? /* @__PURE__ */ c("h3", { children: r }) : r }),
|
|
1674
1681
|
/* @__PURE__ */ c(
|
|
1675
|
-
|
|
1682
|
+
u,
|
|
1676
1683
|
{
|
|
1677
1684
|
className: m("content-card__content", a),
|
|
1678
1685
|
role: l ? "list" : null,
|
|
@@ -1694,7 +1701,7 @@ const W = {
|
|
|
1694
1701
|
rowGap: i = 1,
|
|
1695
1702
|
value: l,
|
|
1696
1703
|
valueClass: o,
|
|
1697
|
-
wrap:
|
|
1704
|
+
wrap: p = !1
|
|
1698
1705
|
}) => /* @__PURE__ */ M(
|
|
1699
1706
|
"div",
|
|
1700
1707
|
{
|
|
@@ -1703,7 +1710,7 @@ const W = {
|
|
|
1703
1710
|
{
|
|
1704
1711
|
"flex-col items-start": a === "col",
|
|
1705
1712
|
"flex-row items-center": a === "row",
|
|
1706
|
-
"flex-wrap":
|
|
1713
|
+
"flex-wrap": p
|
|
1707
1714
|
},
|
|
1708
1715
|
e
|
|
1709
1716
|
),
|
|
@@ -2115,18 +2122,18 @@ const W = {
|
|
|
2115
2122
|
weightProps: i = null
|
|
2116
2123
|
}) => {
|
|
2117
2124
|
const l = {};
|
|
2118
|
-
Object.entries(s).forEach(([o,
|
|
2119
|
-
const
|
|
2120
|
-
"font-size":
|
|
2125
|
+
Object.entries(s).forEach(([o, p]) => {
|
|
2126
|
+
const u = {
|
|
2127
|
+
"font-size": p,
|
|
2121
2128
|
...a
|
|
2122
|
-
}, V = `.${e(`${t}-${o}`)}`, C = n ? n({ sizeKey: o, sizeValue:
|
|
2129
|
+
}, V = `.${e(`${t}-${o}`)}`, C = n ? n({ sizeKey: o, sizeValue: p }) : {};
|
|
2123
2130
|
l[V] = {
|
|
2124
|
-
...
|
|
2131
|
+
...u,
|
|
2125
2132
|
...C
|
|
2126
2133
|
}, Object.entries(r).forEach(([f, v]) => {
|
|
2127
|
-
const A = `.${e(`${t}-${o}-${f}`)}`, h = i ? i({ sizeKey: o, sizeValue:
|
|
2134
|
+
const A = `.${e(`${t}-${o}-${f}`)}`, h = i ? i({ sizeKey: o, sizeValue: p, weightKey: f, weightValue: v }) : {};
|
|
2128
2135
|
l[A] = {
|
|
2129
|
-
...
|
|
2136
|
+
...u,
|
|
2130
2137
|
"font-weight": v,
|
|
2131
2138
|
...h
|
|
2132
2139
|
};
|
|
@@ -2273,11 +2280,11 @@ function o2(d, e = []) {
|
|
|
2273
2280
|
function c2({ cb: d, form: e, formData: t, validations: a, reactive: n = !1 }) {
|
|
2274
2281
|
let s = !0;
|
|
2275
2282
|
for (const [r, i] of t.entries()) {
|
|
2276
|
-
const l = e.querySelector(`[name="${r}"]`), o = a[r],
|
|
2277
|
-
o.forEach((
|
|
2278
|
-
|
|
2279
|
-
}),
|
|
2280
|
-
|
|
2283
|
+
const l = e.querySelector(`[name="${r}"]`), o = a[r], p = [];
|
|
2284
|
+
o.forEach((u) => {
|
|
2285
|
+
u.isValid(i) || p.push(u.message);
|
|
2286
|
+
}), p.length ? (s = !1, l.classList.add("field-error"), d && d({ isValid: s, field: l, validations: a })) : (l.classList.remove("field-error"), d && d({ isValid: !0, field: l, validations: a })), n && (l == null || l.addEventListener("input", (u) => {
|
|
2287
|
+
u.preventDefault(), l.classList.contains("field-error") && l.classList.remove("field-error");
|
|
2281
2288
|
}));
|
|
2282
2289
|
}
|
|
2283
2290
|
return s;
|
|
@@ -2431,12 +2438,12 @@ class H {
|
|
|
2431
2438
|
const {
|
|
2432
2439
|
isHeads: l = null,
|
|
2433
2440
|
isLoggedIn: o = null,
|
|
2434
|
-
url:
|
|
2435
|
-
ip:
|
|
2441
|
+
url: p = null,
|
|
2442
|
+
ip: u = null,
|
|
2436
2443
|
sessionId: V = null,
|
|
2437
2444
|
user: C = null
|
|
2438
2445
|
} = (window == null ? void 0 : window.options) ?? {}, { id: f = null } = C ?? {};
|
|
2439
|
-
t.userId = s ?? f, t.isHeads = l, t.isLoggedIn = o, t.url =
|
|
2446
|
+
t.userId = s ?? f, t.isHeads = l, t.isLoggedIn = o, t.url = p, await H.createData(
|
|
2440
2447
|
"/api/event",
|
|
2441
2448
|
{
|
|
2442
2449
|
payload: {
|
|
@@ -2445,7 +2452,7 @@ class H {
|
|
|
2445
2452
|
name: n,
|
|
2446
2453
|
userId: s ?? f,
|
|
2447
2454
|
url: window.location.href,
|
|
2448
|
-
ip:
|
|
2455
|
+
ip: u,
|
|
2449
2456
|
sessionId: V,
|
|
2450
2457
|
siteMarker: r ?? i
|
|
2451
2458
|
}
|
|
@@ -2541,8 +2548,8 @@ class H {
|
|
|
2541
2548
|
try {
|
|
2542
2549
|
const l = await fetch(i, { method: "GET" });
|
|
2543
2550
|
if (t === !0) {
|
|
2544
|
-
const
|
|
2545
|
-
return
|
|
2551
|
+
const p = await l.text();
|
|
2552
|
+
return p ? p.replace("__next", "") : null;
|
|
2546
2553
|
}
|
|
2547
2554
|
const o = l.headers.get("content-type");
|
|
2548
2555
|
return o && o.indexOf("application/json") !== -1 ? l.json() : null;
|
|
@@ -2625,7 +2632,7 @@ class H {
|
|
|
2625
2632
|
if ((o = window == null ? void 0 : window.options) != null && o.isPdf)
|
|
2626
2633
|
return i;
|
|
2627
2634
|
try {
|
|
2628
|
-
const
|
|
2635
|
+
const u = await (await fetch("/api/client-headers")).json(), V = (u == null ? void 0 : u.sessionId) ?? "noSessionId", C = (u == null ? void 0 : u.ip) ?? null, f = e * 1e3;
|
|
2629
2636
|
return localStorage.setItem(
|
|
2630
2637
|
l,
|
|
2631
2638
|
JSON.stringify({
|
|
@@ -2634,8 +2641,8 @@ class H {
|
|
|
2634
2641
|
expire: (/* @__PURE__ */ new Date()).getTime() + f
|
|
2635
2642
|
})
|
|
2636
2643
|
), { tolken: V, ip: C, userAgent: a, platform: r };
|
|
2637
|
-
} catch (
|
|
2638
|
-
console.error("getHeaders",
|
|
2644
|
+
} catch (p) {
|
|
2645
|
+
console.error("getHeaders", p);
|
|
2639
2646
|
}
|
|
2640
2647
|
return i;
|
|
2641
2648
|
}
|
|
@@ -2650,11 +2657,11 @@ class H {
|
|
|
2650
2657
|
return await H.fetchData("/api/client?query=" + r);
|
|
2651
2658
|
}
|
|
2652
2659
|
static getReportUrl(e, t = null) {
|
|
2653
|
-
var l, o,
|
|
2654
|
-
const a = ((l = e == null ? void 0 : e.state) == null ? void 0 : l.slug) ?? null, n = ((o = e == null ? void 0 : e.city) == null ? void 0 : o.slug) ?? null, s = ((
|
|
2660
|
+
var l, o, p;
|
|
2661
|
+
const a = ((l = e == null ? void 0 : e.state) == null ? void 0 : l.slug) ?? null, n = ((o = e == null ? void 0 : e.city) == null ? void 0 : o.slug) ?? null, s = ((p = e == null ? void 0 : e.name) == null ? void 0 : p.slug) ?? null, r = (e == null ? void 0 : e.zip) ?? null;
|
|
2655
2662
|
t = t || ((e == null ? void 0 : e.id) ?? null);
|
|
2656
|
-
const i = [r, "-piq", t].filter((
|
|
2657
|
-
return "/" + [a, n, s].filter((
|
|
2663
|
+
const i = [r, "-piq", t].filter((u) => u).join("");
|
|
2664
|
+
return "/" + [a, n, s].filter((u) => u).map((u) => H.toSlug(u)).join("/") + "/" + i;
|
|
2658
2665
|
}
|
|
2659
2666
|
static async getSearchValue(e = "recsSearchValue") {
|
|
2660
2667
|
try {
|
|
@@ -2864,7 +2871,7 @@ class H {
|
|
|
2864
2871
|
selfClose: r = !1,
|
|
2865
2872
|
target: i = null
|
|
2866
2873
|
}) {
|
|
2867
|
-
const l = i ? document.querySelectorAll(i) : [], o = document.getElementById(`${t}-dialog`),
|
|
2874
|
+
const l = i ? document.querySelectorAll(i) : [], o = document.getElementById(`${t}-dialog`), p = r ? o == null ? void 0 : o.querySelectorAll("[data-dialog-close]") : document.querySelectorAll("[data-dialog-close]"), u = [
|
|
2868
2875
|
"closing",
|
|
2869
2876
|
"closed",
|
|
2870
2877
|
"opening",
|
|
@@ -2882,13 +2889,13 @@ class H {
|
|
|
2882
2889
|
if (w.attributeName === "open") {
|
|
2883
2890
|
const g = w.target;
|
|
2884
2891
|
if (!(g == null ? void 0 : g.hasAttribute("open"))) return;
|
|
2885
|
-
g == null || g.removeAttribute("inert"), g == null || g.dispatchEvent(
|
|
2892
|
+
g == null || g.removeAttribute("inert"), g == null || g.dispatchEvent(u.opening), g && await A(g), g == null || g.dispatchEvent(u.opened);
|
|
2886
2893
|
}
|
|
2887
2894
|
});
|
|
2888
2895
|
}), C = new MutationObserver((h, b) => {
|
|
2889
2896
|
h.forEach((w) => {
|
|
2890
2897
|
w.removedNodes.forEach((g) => {
|
|
2891
|
-
g.nodeName === "DIALOG" && (g.removeEventListener("click", v), g.removeEventListener("close", f), g.dispatchEvent(
|
|
2898
|
+
g.nodeName === "DIALOG" && (g.removeEventListener("click", v), g.removeEventListener("close", f), g.dispatchEvent(u.removed), C == null || C.disconnect(), V == null || V.disconnect());
|
|
2892
2899
|
});
|
|
2893
2900
|
});
|
|
2894
2901
|
});
|
|
@@ -2900,9 +2907,9 @@ class H {
|
|
|
2900
2907
|
childList: !0
|
|
2901
2908
|
}));
|
|
2902
2909
|
const f = async ({ target: h }) => {
|
|
2903
|
-
h == null || h.classList.add("closing"), h == null || h.setAttribute("inert", ""), h == null || h.dispatchEvent(
|
|
2910
|
+
h == null || h.classList.add("closing"), h == null || h.setAttribute("inert", ""), h == null || h.dispatchEvent(u.closing), h && await A(h), h == null || h.classList.remove("closing"), h == null || h.dispatchEvent(u.closed);
|
|
2904
2911
|
}, v = async ({ target: h }) => {
|
|
2905
|
-
(h == null ? void 0 : h.nodeName) === "DIALOG" && (h == null || h.dispatchEvent(
|
|
2912
|
+
(h == null ? void 0 : h.nodeName) === "DIALOG" && (h == null || h.dispatchEvent(u.outside), o == null || o.close("outside"));
|
|
2906
2913
|
}, A = (h) => Promise.allSettled(
|
|
2907
2914
|
h == null ? void 0 : h.getAnimations().map((b) => b == null ? void 0 : b.finished)
|
|
2908
2915
|
);
|
|
@@ -2918,7 +2925,7 @@ class H {
|
|
|
2918
2925
|
h.addEventListener("click", (b) => {
|
|
2919
2926
|
o == null || o.showModal(), s && s(b, o);
|
|
2920
2927
|
});
|
|
2921
|
-
}),
|
|
2928
|
+
}), p == null || p.forEach((h) => {
|
|
2922
2929
|
h.addEventListener("click", async (b) => {
|
|
2923
2930
|
o == null || o.close("close");
|
|
2924
2931
|
});
|
|
@@ -3066,13 +3073,13 @@ class H {
|
|
|
3066
3073
|
max: i = null,
|
|
3067
3074
|
city: l = null,
|
|
3068
3075
|
state: o = null,
|
|
3069
|
-
vin:
|
|
3070
|
-
license:
|
|
3076
|
+
vin: p = null,
|
|
3077
|
+
license: u = null,
|
|
3071
3078
|
token: V = null,
|
|
3072
3079
|
phone: C = null
|
|
3073
3080
|
} = e || {}, f = t && t !== "", v = r && r !== "" && r !== "18", A = i && i !== "" && r !== "99";
|
|
3074
3081
|
let h = [];
|
|
3075
|
-
return t && t !== "" && h.push("name=" + t), f || (a && a !== "" && h.push("first=" + a), n && n !== "" && h.push("middle=" + n), s && s !== "" && h.push("last=" + s)), v && A ? parseInt(r) > parseInt(i) ? (h.push("min=" + i), h.push("max=" + r)) : (h.push("min=" + r), h.push("max=" + i)) : (v && h.push("min=" + r), A && h.push("max=" + i)), C && C !== "" && h.push("phone=" + C), l && l !== "" && h.push("city=" + l),
|
|
3082
|
+
return t && t !== "" && h.push("name=" + t), f || (a && a !== "" && h.push("first=" + a), n && n !== "" && h.push("middle=" + n), s && s !== "" && h.push("last=" + s)), v && A ? parseInt(r) > parseInt(i) ? (h.push("min=" + i), h.push("max=" + r)) : (h.push("min=" + r), h.push("max=" + i)) : (v && h.push("min=" + r), A && h.push("max=" + i)), C && C !== "" && h.push("phone=" + C), l && l !== "" && h.push("city=" + l), u && u !== "" && h.push("license=" + u), p && p !== "" && h.push("vin=" + p), o && o !== "" && h.push("state=" + o), V && V !== "" && h.push("token=" + V), h.join("&");
|
|
3076
3083
|
}
|
|
3077
3084
|
static padTo2Digits(e) {
|
|
3078
3085
|
return e.toString().padStart(2, "0");
|
|
@@ -3090,8 +3097,8 @@ class H {
|
|
|
3090
3097
|
useLocation: i = !0,
|
|
3091
3098
|
state: l = "",
|
|
3092
3099
|
useGoogle: o = !1,
|
|
3093
|
-
useGoogleOverride:
|
|
3094
|
-
useAmazonOverride:
|
|
3100
|
+
useGoogleOverride: p = !1,
|
|
3101
|
+
useAmazonOverride: u = !1,
|
|
3095
3102
|
isSandboxAccount: V = !1,
|
|
3096
3103
|
isOptOutSearch: C = !1
|
|
3097
3104
|
} = t ?? {}, { tolken: f = null, ip: v = null } = await H.getHeaders(), h = [
|
|
@@ -3102,8 +3109,8 @@ class H {
|
|
|
3102
3109
|
"useCityStateSearch=" + s,
|
|
3103
3110
|
"useLocation=" + i,
|
|
3104
3111
|
"useGoogle=" + o,
|
|
3105
|
-
"useGoogleOverride=" +
|
|
3106
|
-
"useAmazonOverride=" +
|
|
3112
|
+
"useGoogleOverride=" + p,
|
|
3113
|
+
"useAmazonOverride=" + u,
|
|
3107
3114
|
"isSandboxAccount=" + V,
|
|
3108
3115
|
"isOptOutSearch=" + C
|
|
3109
3116
|
];
|
|
@@ -3170,9 +3177,9 @@ class H {
|
|
|
3170
3177
|
static async setRandomFileNameVersion(e, t = "scripts") {
|
|
3171
3178
|
const a = Date.now(), n = typeof window < "u" ? window.location.origin : "", s = t ? `/${t}/` : "/";
|
|
3172
3179
|
try {
|
|
3173
|
-
const r = e.map(({ fileName: o, initFunctionName:
|
|
3174
|
-
i.forEach((o,
|
|
3175
|
-
o && typeof o[e[
|
|
3180
|
+
const r = e.map(({ fileName: o, initFunctionName: p }) => import(`${n}${s}${o}?v=${a}`)), i = await Promise.all(r), l = [];
|
|
3181
|
+
i.forEach((o, p) => {
|
|
3182
|
+
o && typeof o[e[p].initFunctionName] == "function" ? l.push(o[e[p].initFunctionName]()) : console.error(`error loading ${e[p].initFunctionName}()`);
|
|
3176
3183
|
}), l.length > 0 && await Promise.all(l);
|
|
3177
3184
|
} catch (r) {
|
|
3178
3185
|
console.error("Failed to load one or more search modules:", r);
|