@vehiclehistory/property-lib 0.0.30 → 0.0.32
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/README.md +11 -1
- package/dist/components/ui/Checkbox/Checkbox.d.ts +1 -0
- package/dist/main.js +227 -217
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/main.js
CHANGED
|
@@ -473,19 +473,19 @@ const F = {
|
|
|
473
473
|
chatBubble: {
|
|
474
474
|
path: '<path d="M12,3C17.5,3 22,6.58 22,11C22,15.42 17.5,19 12,19C10.76,19 9.57,18.82 8.47,18.5C5.55,21 2,21 2,21C4.33,18.67 4.7,17.1 4.75,16.5C3.05,15.07 2,13.13 2,11C2,6.58 6.5,3 12,3Z" />'
|
|
475
475
|
}
|
|
476
|
-
}, j = (
|
|
477
|
-
color:
|
|
476
|
+
}, j = (h) => q[h], P = ({
|
|
477
|
+
color: h = "text-current",
|
|
478
478
|
className: e,
|
|
479
479
|
name: t,
|
|
480
480
|
size: a = "medium",
|
|
481
481
|
viewBox: n = "0 0 20 20"
|
|
482
482
|
}) => {
|
|
483
|
-
const l = j(t), [r, s] = Z(
|
|
483
|
+
const l = j(t), [r, s] = Z(h), [i, c] = Z(l);
|
|
484
484
|
return k(() => {
|
|
485
485
|
c(l);
|
|
486
486
|
}, [l]), k(() => {
|
|
487
|
-
s(
|
|
488
|
-
}, [
|
|
487
|
+
s(h);
|
|
488
|
+
}, [h]), !l && console.error("Icon does not exist", t), /* @__PURE__ */ o(
|
|
489
489
|
"svg",
|
|
490
490
|
{
|
|
491
491
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -499,7 +499,7 @@ const F = {
|
|
|
499
499
|
}
|
|
500
500
|
);
|
|
501
501
|
}, b = y(P), W = ({
|
|
502
|
-
children:
|
|
502
|
+
children: h,
|
|
503
503
|
className: e,
|
|
504
504
|
clickHandler: t,
|
|
505
505
|
panelClass: a,
|
|
@@ -544,7 +544,7 @@ const F = {
|
|
|
544
544
|
"acc-p p-4 border-x border-b rounded-bl-lg rounded-br-lg border-gray-200 relative",
|
|
545
545
|
a
|
|
546
546
|
),
|
|
547
|
-
children:
|
|
547
|
+
children: h
|
|
548
548
|
}
|
|
549
549
|
),
|
|
550
550
|
!l && /* @__PURE__ */ o(
|
|
@@ -555,12 +555,12 @@ const F = {
|
|
|
555
555
|
a,
|
|
556
556
|
{ hidden: !s }
|
|
557
557
|
),
|
|
558
|
-
children:
|
|
558
|
+
children: h
|
|
559
559
|
}
|
|
560
560
|
)
|
|
561
561
|
] }) });
|
|
562
562
|
}, f1 = y(W), R = ({
|
|
563
|
-
children:
|
|
563
|
+
children: h,
|
|
564
564
|
className: e = "",
|
|
565
565
|
messages: t = [],
|
|
566
566
|
title: a = "",
|
|
@@ -589,14 +589,14 @@ const F = {
|
|
|
589
589
|
iconColor: "text-yellow-500",
|
|
590
590
|
styles: "bg-yellow-50 border-yellow-300 text-yellow-700"
|
|
591
591
|
}
|
|
592
|
-
}, { icon: i, iconColor: c, styles:
|
|
592
|
+
}, { icon: i, iconColor: c, styles: d } = s[r];
|
|
593
593
|
return /* @__PURE__ */ o(
|
|
594
594
|
"div",
|
|
595
595
|
{
|
|
596
596
|
id: r,
|
|
597
597
|
className: m(
|
|
598
598
|
"rounded w-full py-2 px-4 mb-4 border",
|
|
599
|
-
|
|
599
|
+
d,
|
|
600
600
|
e
|
|
601
601
|
),
|
|
602
602
|
...l,
|
|
@@ -612,13 +612,13 @@ const F = {
|
|
|
612
612
|
) }),
|
|
613
613
|
/* @__PURE__ */ g("div", { className: "ml-3", children: [
|
|
614
614
|
/* @__PURE__ */ o("div", { className: m("font-medium text-sm", n), children: a }),
|
|
615
|
-
t.length > 0 ? /* @__PURE__ */ o("div", { className: "mt-2 text-xs", children: /* @__PURE__ */ o("ul", { role: "list", className: "list-disc space-y-1 pl-5", children: t.map((u,
|
|
615
|
+
t.length > 0 ? /* @__PURE__ */ o("div", { className: "mt-2 text-xs", children: /* @__PURE__ */ o("ul", { role: "list", className: "list-disc space-y-1 pl-5", children: t.map((u, V) => /* @__PURE__ */ o("li", { children: u }, V)) }) }) : ""
|
|
616
616
|
] })
|
|
617
617
|
] })
|
|
618
618
|
}
|
|
619
619
|
);
|
|
620
620
|
}, M1 = y(R), U = ({
|
|
621
|
-
autoFocus:
|
|
621
|
+
autoFocus: h = !1,
|
|
622
622
|
required: e = !1,
|
|
623
623
|
className: t = "",
|
|
624
624
|
defaultValue: a = "",
|
|
@@ -628,14 +628,14 @@ const F = {
|
|
|
628
628
|
inputClass: s = "",
|
|
629
629
|
leftIcon: i = "homeSearch",
|
|
630
630
|
mobileBackdrop: c = !1,
|
|
631
|
-
showSearchIcon:
|
|
631
|
+
showSearchIcon: d = !0,
|
|
632
632
|
options: u = [],
|
|
633
|
-
name:
|
|
633
|
+
name: V = "",
|
|
634
634
|
placeholder: M = "",
|
|
635
635
|
props: A = {},
|
|
636
|
-
size:
|
|
636
|
+
size: C = "medium",
|
|
637
637
|
styles: p = null,
|
|
638
|
-
title:
|
|
638
|
+
title: H = ""
|
|
639
639
|
}) => /* @__PURE__ */ g(
|
|
640
640
|
"div",
|
|
641
641
|
{
|
|
@@ -645,7 +645,7 @@ const F = {
|
|
|
645
645
|
className: m("Autocomplete", t),
|
|
646
646
|
style: p ? { ...p } : null,
|
|
647
647
|
children: [
|
|
648
|
-
|
|
648
|
+
d && /* @__PURE__ */ g(
|
|
649
649
|
"span",
|
|
650
650
|
{
|
|
651
651
|
className: m(
|
|
@@ -660,7 +660,7 @@ const F = {
|
|
|
660
660
|
{
|
|
661
661
|
className: "home-search select-none text-gray-500",
|
|
662
662
|
name: i,
|
|
663
|
-
size:
|
|
663
|
+
size: C === "xLarge" ? "small" : "xSmall",
|
|
664
664
|
viewBox: "0 0 24 24"
|
|
665
665
|
}
|
|
666
666
|
),
|
|
@@ -669,7 +669,7 @@ const F = {
|
|
|
669
669
|
{
|
|
670
670
|
className: "arrow-left select-none text-gray-500 hidden",
|
|
671
671
|
name: "arrowLeft",
|
|
672
|
-
size:
|
|
672
|
+
size: C === "xLarge" ? "small" : "xSmall",
|
|
673
673
|
viewBox: "0 0 24 24"
|
|
674
674
|
}
|
|
675
675
|
)
|
|
@@ -680,14 +680,14 @@ const F = {
|
|
|
680
680
|
"input",
|
|
681
681
|
{
|
|
682
682
|
"data-lpignore": "true",
|
|
683
|
-
autoFocus:
|
|
683
|
+
autoFocus: h,
|
|
684
684
|
className: m(
|
|
685
685
|
"w-full bg-white placeholder:bg-white rounded border border-gray-300 py-2 pr-8 shadow-sm focus:outline-none sm-max:text-sm placeholder:text-gray-500 sm-max:placeholder:text-sm placeholder-shown:text-ellipsis truncate",
|
|
686
686
|
{
|
|
687
|
-
"pl-8":
|
|
688
|
-
"px-3 h-10":
|
|
689
|
-
"px-4 h-12":
|
|
690
|
-
"px-5 h-[60px] sm:!text-base":
|
|
687
|
+
"pl-8": d === !0,
|
|
688
|
+
"px-3 h-10": C === "medium",
|
|
689
|
+
"px-4 h-12": C === "large",
|
|
690
|
+
"px-5 h-[60px] sm:!text-base": C === "xLarge",
|
|
691
691
|
peer: r
|
|
692
692
|
},
|
|
693
693
|
s
|
|
@@ -697,7 +697,7 @@ const F = {
|
|
|
697
697
|
value: a,
|
|
698
698
|
placeholder: !M && r ? " " : M,
|
|
699
699
|
type: "search",
|
|
700
|
-
name:
|
|
700
|
+
name: V || "search-input",
|
|
701
701
|
"data-id": "search-input",
|
|
702
702
|
...A
|
|
703
703
|
}
|
|
@@ -708,10 +708,10 @@ const F = {
|
|
|
708
708
|
className: m(
|
|
709
709
|
"floating-label absolute text-sm !normal-case text-gray-500 duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-focus:text-[#222] peer-focus:px-2 peer-focus:bg-white peer-placeholder-shown:bg-white peer-placeholder-shown:scale-100 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:top-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 start-1 pointer-events-none",
|
|
710
710
|
{
|
|
711
|
-
"!left-7":
|
|
712
|
-
"left-2":
|
|
713
|
-
"left-3":
|
|
714
|
-
"left-4":
|
|
711
|
+
"!left-7": d === !0,
|
|
712
|
+
"left-2": C === "medium",
|
|
713
|
+
"left-3": C === "large",
|
|
714
|
+
"left-4": C === "xLarge"
|
|
715
715
|
}
|
|
716
716
|
),
|
|
717
717
|
children: r
|
|
@@ -761,7 +761,7 @@ const F = {
|
|
|
761
761
|
{
|
|
762
762
|
"data-id": "search-dropdown-body",
|
|
763
763
|
role: "listbox",
|
|
764
|
-
"data-title":
|
|
764
|
+
"data-title": H,
|
|
765
765
|
"aria-labelledby": "Label",
|
|
766
766
|
"aria-activedescendant": "search-item-0",
|
|
767
767
|
children: u.length > 0 ? u.map((w, v) => /* @__PURE__ */ o(
|
|
@@ -784,7 +784,7 @@ const F = {
|
|
|
784
784
|
]
|
|
785
785
|
}
|
|
786
786
|
), g1 = U, Q = ({
|
|
787
|
-
children:
|
|
787
|
+
children: h,
|
|
788
788
|
className: e,
|
|
789
789
|
size: t = "sm",
|
|
790
790
|
tag: a = "span"
|
|
@@ -800,10 +800,10 @@ const F = {
|
|
|
800
800
|
},
|
|
801
801
|
e
|
|
802
802
|
),
|
|
803
|
-
children:
|
|
803
|
+
children: h
|
|
804
804
|
}
|
|
805
805
|
), v1 = Q, G = ({
|
|
806
|
-
borderless:
|
|
806
|
+
borderless: h = !1,
|
|
807
807
|
leftIcon: e,
|
|
808
808
|
leftIconProps: t = {},
|
|
809
809
|
children: a,
|
|
@@ -813,27 +813,27 @@ const F = {
|
|
|
813
813
|
props: s = {},
|
|
814
814
|
rightIcon: i,
|
|
815
815
|
rightIconProps: c = {},
|
|
816
|
-
rounded:
|
|
816
|
+
rounded: d = !1,
|
|
817
817
|
size: u = "md",
|
|
818
|
-
type:
|
|
818
|
+
type: V = "button",
|
|
819
819
|
uppercase: M = !1,
|
|
820
820
|
variation: A = "primary"
|
|
821
821
|
}) => {
|
|
822
|
-
const
|
|
822
|
+
const C = r ? "a" : "button";
|
|
823
823
|
return /* @__PURE__ */ g(
|
|
824
|
-
|
|
824
|
+
C,
|
|
825
825
|
{
|
|
826
|
-
type:
|
|
826
|
+
type: C !== "a" ? V : null,
|
|
827
827
|
className: m(
|
|
828
828
|
"Button",
|
|
829
829
|
{
|
|
830
830
|
[`Button--${A}`]: A,
|
|
831
831
|
[`Button--${u}`]: u,
|
|
832
|
-
"Button--rounded":
|
|
832
|
+
"Button--rounded": d,
|
|
833
833
|
"Button--disabled": l,
|
|
834
834
|
"Button--custom-link": r,
|
|
835
835
|
"Button--uppercase": M,
|
|
836
|
-
"Button--borderless":
|
|
836
|
+
"Button--borderless": h || A === "link"
|
|
837
837
|
},
|
|
838
838
|
n
|
|
839
839
|
),
|
|
@@ -863,8 +863,8 @@ const F = {
|
|
|
863
863
|
]
|
|
864
864
|
}
|
|
865
865
|
);
|
|
866
|
-
}, A1 = y(G), J = ({ children:
|
|
867
|
-
block:
|
|
866
|
+
}, A1 = y(G), J = ({ children: h, className: e }) => /* @__PURE__ */ o("div", { className: m("flex md:max-w-min border border-gray-300 divide-x divide-gray-200 rounded-lg", e), children: h }), y1 = J, K = ({
|
|
867
|
+
block: h = !1,
|
|
868
868
|
borderless: e = !1,
|
|
869
869
|
children: t,
|
|
870
870
|
className: a = "",
|
|
@@ -879,7 +879,7 @@ const F = {
|
|
|
879
879
|
"bg-white",
|
|
880
880
|
{
|
|
881
881
|
f1: !e,
|
|
882
|
-
f2:
|
|
882
|
+
f2: h,
|
|
883
883
|
f3: n,
|
|
884
884
|
f4: l
|
|
885
885
|
},
|
|
@@ -890,43 +890,48 @@ const F = {
|
|
|
890
890
|
children: t
|
|
891
891
|
}
|
|
892
892
|
), b1 = K, Y = ({
|
|
893
|
-
checked:
|
|
893
|
+
checked: h = !1,
|
|
894
894
|
children: e,
|
|
895
895
|
className: t = "",
|
|
896
896
|
error: a = !1,
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
897
|
+
inputClass: n,
|
|
898
|
+
id: l = "",
|
|
899
|
+
label: r = "",
|
|
900
|
+
name: s = "",
|
|
901
|
+
props: i = {},
|
|
902
|
+
variation: c = "primary",
|
|
903
|
+
value: d = ""
|
|
903
904
|
}) => {
|
|
904
|
-
const
|
|
905
|
+
const u = r ? "div" : "label", V = u === "label" ? { htmlFor: l } : {};
|
|
905
906
|
return /* @__PURE__ */ g(
|
|
906
|
-
|
|
907
|
+
u,
|
|
907
908
|
{
|
|
908
|
-
className: m("checkbox flex items-center",
|
|
909
|
-
...
|
|
909
|
+
className: m("checkbox flex items-center", c, t),
|
|
910
|
+
...V,
|
|
910
911
|
children: [
|
|
911
912
|
/* @__PURE__ */ o(
|
|
912
913
|
"input",
|
|
913
914
|
{
|
|
914
|
-
checked:
|
|
915
|
-
className: m(
|
|
916
|
-
"
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
915
|
+
checked: h,
|
|
916
|
+
className: m(
|
|
917
|
+
"form-checkbox ",
|
|
918
|
+
{
|
|
919
|
+
"!border-red-500 !bg-red-500 focus:!ring-red-500 focus:!border-red-500": a
|
|
920
|
+
},
|
|
921
|
+
n
|
|
922
|
+
),
|
|
923
|
+
id: l,
|
|
924
|
+
name: s,
|
|
920
925
|
type: "checkbox",
|
|
921
|
-
value:
|
|
922
|
-
...
|
|
926
|
+
value: d,
|
|
927
|
+
...i
|
|
923
928
|
}
|
|
924
929
|
),
|
|
925
930
|
e
|
|
926
931
|
]
|
|
927
932
|
}
|
|
928
933
|
);
|
|
929
|
-
}, w1 = y(Y), X = ({ children:
|
|
934
|
+
}, w1 = y(Y), X = ({ children: h, aside: e, direction: t = "right" }) => /* @__PURE__ */ g("div", { className: "flex flex-col lg:flex-row lg:p-0 max-w-screen-lg", children: [
|
|
930
935
|
/* @__PURE__ */ o(
|
|
931
936
|
"main",
|
|
932
937
|
{
|
|
@@ -936,7 +941,7 @@ const F = {
|
|
|
936
941
|
"lg:order-2": t === "left"
|
|
937
942
|
}
|
|
938
943
|
),
|
|
939
|
-
children:
|
|
944
|
+
children: h
|
|
940
945
|
}
|
|
941
946
|
),
|
|
942
947
|
/* @__PURE__ */ o(
|
|
@@ -953,7 +958,7 @@ const F = {
|
|
|
953
958
|
}
|
|
954
959
|
)
|
|
955
960
|
] }), x1 = y(X), _ = ({
|
|
956
|
-
activator:
|
|
961
|
+
activator: h,
|
|
957
962
|
id: e = "",
|
|
958
963
|
children: t,
|
|
959
964
|
className: a = "",
|
|
@@ -963,13 +968,13 @@ const F = {
|
|
|
963
968
|
fullMobile: s = !0,
|
|
964
969
|
headerClass: i = "",
|
|
965
970
|
hideClose: c = !1,
|
|
966
|
-
iconSize:
|
|
971
|
+
iconSize: d = "medium",
|
|
967
972
|
preventPageScroll: u = !0,
|
|
968
|
-
stickyHeader:
|
|
973
|
+
stickyHeader: V = !1,
|
|
969
974
|
title: M = "",
|
|
970
975
|
titleClass: A = ""
|
|
971
976
|
}) => /* @__PURE__ */ g(z, { children: [
|
|
972
|
-
|
|
977
|
+
h && /* @__PURE__ */ o("span", { id: `${e}-dialog-activator`, children: h }),
|
|
973
978
|
/* @__PURE__ */ o(
|
|
974
979
|
"dialog",
|
|
975
980
|
{
|
|
@@ -991,7 +996,7 @@ const F = {
|
|
|
991
996
|
className: m(
|
|
992
997
|
"dialog-header flex items-center p-4",
|
|
993
998
|
{
|
|
994
|
-
"sticky top-0 bg-white z-10":
|
|
999
|
+
"sticky top-0 bg-white z-10": V,
|
|
995
1000
|
"!pb-0 border-0 justify-end": !M,
|
|
996
1001
|
"justify-between border-b": M
|
|
997
1002
|
},
|
|
@@ -1011,7 +1016,7 @@ const F = {
|
|
|
1011
1016
|
b,
|
|
1012
1017
|
{
|
|
1013
1018
|
name: "close",
|
|
1014
|
-
size:
|
|
1019
|
+
size: d,
|
|
1015
1020
|
className: "pointer-events-none"
|
|
1016
1021
|
}
|
|
1017
1022
|
)
|
|
@@ -1033,7 +1038,7 @@ const F = {
|
|
|
1033
1038
|
}
|
|
1034
1039
|
)
|
|
1035
1040
|
] }), S1 = y(_), e1 = ({
|
|
1036
|
-
activator:
|
|
1041
|
+
activator: h,
|
|
1037
1042
|
id: e = "",
|
|
1038
1043
|
children: t,
|
|
1039
1044
|
className: a = "",
|
|
@@ -1043,38 +1048,38 @@ const F = {
|
|
|
1043
1048
|
footer: s,
|
|
1044
1049
|
fullMobile: i = !0,
|
|
1045
1050
|
headerClass: c = "",
|
|
1046
|
-
hideClose:
|
|
1051
|
+
hideClose: d = !1,
|
|
1047
1052
|
iconSize: u = "medium",
|
|
1048
|
-
isOpen:
|
|
1053
|
+
isOpen: V = !1,
|
|
1049
1054
|
setDialogOpen: M,
|
|
1050
1055
|
stickyHeader: A = !1,
|
|
1051
|
-
title:
|
|
1056
|
+
title: C = "",
|
|
1052
1057
|
titleClass: p = ""
|
|
1053
1058
|
}) => {
|
|
1054
|
-
const
|
|
1055
|
-
|
|
1059
|
+
const H = I(null), w = async () => {
|
|
1060
|
+
H.current.classList.add("closing"), await B(H.current), H.current.classList.remove("closing"), l && l(), M(!1);
|
|
1056
1061
|
}, v = async (x) => {
|
|
1057
1062
|
x.key === "Escape" && await w();
|
|
1058
1063
|
}, N = async ({ clientX: x, clientY: S, target: D }) => {
|
|
1059
|
-
const { left: E, right: T, top: $, bottom: O } =
|
|
1060
|
-
(!
|
|
1064
|
+
const { left: E, right: T, top: $, bottom: O } = H.current.getBoundingClientRect() ?? {};
|
|
1065
|
+
(!H.current.contains(D) || x < E || x > T || S < $ || S > O) && await w();
|
|
1061
1066
|
}, B = (x) => Promise.allSettled(
|
|
1062
1067
|
x.getAnimations().map((S) => S.finished)
|
|
1063
1068
|
);
|
|
1064
1069
|
return k(() => {
|
|
1065
|
-
const x =
|
|
1066
|
-
x && (
|
|
1067
|
-
}, [
|
|
1068
|
-
|
|
1070
|
+
const x = H.current;
|
|
1071
|
+
x && (V ? x.showModal() : typeof x.close == "function" && x.close());
|
|
1072
|
+
}, [V]), /* @__PURE__ */ g(z, { children: [
|
|
1073
|
+
h && /* @__PURE__ */ o("span", { id: `${e}-dialog-activator`, onClick: () => M(!0), children: h }),
|
|
1069
1074
|
/* @__PURE__ */ g(
|
|
1070
1075
|
"dialog",
|
|
1071
1076
|
{
|
|
1072
|
-
ref:
|
|
1077
|
+
ref: H,
|
|
1073
1078
|
id: `${e}-dialog`,
|
|
1074
1079
|
className: m(
|
|
1075
1080
|
"dialog",
|
|
1076
1081
|
{
|
|
1077
|
-
hidden: !
|
|
1082
|
+
hidden: !V,
|
|
1078
1083
|
"xs-max:h-full xs-max:max-h-full": i
|
|
1079
1084
|
},
|
|
1080
1085
|
a
|
|
@@ -1091,8 +1096,8 @@ const F = {
|
|
|
1091
1096
|
c
|
|
1092
1097
|
),
|
|
1093
1098
|
children: [
|
|
1094
|
-
/* @__PURE__ */ o("h3", { id: `${e}-dialog-title`, className: p, children:
|
|
1095
|
-
!
|
|
1099
|
+
/* @__PURE__ */ o("h3", { id: `${e}-dialog-title`, className: p, children: C || "" }),
|
|
1100
|
+
!d && /* @__PURE__ */ o(
|
|
1096
1101
|
"button",
|
|
1097
1102
|
{
|
|
1098
1103
|
type: "button",
|
|
@@ -1133,7 +1138,7 @@ const F = {
|
|
|
1133
1138
|
}
|
|
1134
1139
|
)
|
|
1135
1140
|
] });
|
|
1136
|
-
}, k1 = y(e1), t1 = ({ className:
|
|
1141
|
+
}, k1 = y(e1), t1 = ({ className: h = "" }) => /* @__PURE__ */ g("div", { id: "dots", className: m("mx-auto", h), children: [
|
|
1137
1142
|
/* @__PURE__ */ o("span", { style: { animationDelay: "0.1s" } }),
|
|
1138
1143
|
/* @__PURE__ */ o("span", { style: { animationDelay: "0.2s" } }),
|
|
1139
1144
|
/* @__PURE__ */ o("span", { style: { animationDelay: "0.3s" } }),
|
|
@@ -1143,7 +1148,7 @@ const F = {
|
|
|
1143
1148
|
/* @__PURE__ */ o("span", { style: { animationDelay: "0.7s" } }),
|
|
1144
1149
|
/* @__PURE__ */ o("span", { style: { animationDelay: "0.8s" } })
|
|
1145
1150
|
] }), z1 = t1, a1 = ({
|
|
1146
|
-
cb:
|
|
1151
|
+
cb: h,
|
|
1147
1152
|
className: e = "",
|
|
1148
1153
|
size: t = "md",
|
|
1149
1154
|
timeout: a = 1e4,
|
|
@@ -1152,20 +1157,20 @@ const F = {
|
|
|
1152
1157
|
function l({ cb: r }) {
|
|
1153
1158
|
const s = document.querySelector(".loading-bar__inner");
|
|
1154
1159
|
if (!s) return;
|
|
1155
|
-
let i, c,
|
|
1156
|
-
function u(
|
|
1157
|
-
i === void 0 && (i =
|
|
1158
|
-
const M =
|
|
1159
|
-
if (c !==
|
|
1160
|
+
let i, c, d = !1;
|
|
1161
|
+
function u(V) {
|
|
1162
|
+
i === void 0 && (i = V);
|
|
1163
|
+
const M = V - i;
|
|
1164
|
+
if (c !== V) {
|
|
1160
1165
|
const A = M / a * 101;
|
|
1161
|
-
s.style.width = `${A}%`, A >= 101 && (r && r(),
|
|
1166
|
+
s.style.width = `${A}%`, A >= 101 && (r && r(), d = !0, window.cancelAnimationFrame(V));
|
|
1162
1167
|
}
|
|
1163
|
-
M < a && (c =
|
|
1168
|
+
M < a && (c = V, d || window.requestAnimationFrame(u));
|
|
1164
1169
|
}
|
|
1165
1170
|
window.requestAnimationFrame(u);
|
|
1166
1171
|
}
|
|
1167
1172
|
return k(() => {
|
|
1168
|
-
l({ cb:
|
|
1173
|
+
l({ cb: h });
|
|
1169
1174
|
}, []), /* @__PURE__ */ o(
|
|
1170
1175
|
"div",
|
|
1171
1176
|
{
|
|
@@ -1187,15 +1192,15 @@ const F = {
|
|
|
1187
1192
|
name: "spinnerDark",
|
|
1188
1193
|
color: "text-teal-700",
|
|
1189
1194
|
viewBox: "0 0 24 24"
|
|
1190
|
-
}, l1 = ({ className:
|
|
1195
|
+
}, l1 = ({ className: h = "" }) => /* @__PURE__ */ o("div", { className: "rounded-r-md px-2 focus:outline-none", children: /* @__PURE__ */ o(
|
|
1191
1196
|
b,
|
|
1192
1197
|
{
|
|
1193
1198
|
size: "xSmall",
|
|
1194
1199
|
...n1,
|
|
1195
|
-
className: `animate-spin ${
|
|
1200
|
+
className: `animate-spin ${h}`
|
|
1196
1201
|
}
|
|
1197
1202
|
) }), N1 = y(l1), s1 = ({
|
|
1198
|
-
activator:
|
|
1203
|
+
activator: h,
|
|
1199
1204
|
activatorClass: e = "",
|
|
1200
1205
|
attrs: t = {},
|
|
1201
1206
|
options: a = {},
|
|
@@ -1242,11 +1247,11 @@ const F = {
|
|
|
1242
1247
|
),
|
|
1243
1248
|
...t,
|
|
1244
1249
|
"data-options": JSON.stringify(a),
|
|
1245
|
-
children:
|
|
1250
|
+
children: h
|
|
1246
1251
|
}
|
|
1247
1252
|
)
|
|
1248
1253
|
] }), B1 = s1, r1 = ({
|
|
1249
|
-
ariaValuemax:
|
|
1254
|
+
ariaValuemax: h = 100,
|
|
1250
1255
|
ariaValuemin: e = 0,
|
|
1251
1256
|
bgColor: t = "bg-orange-500",
|
|
1252
1257
|
className: a,
|
|
@@ -1255,10 +1260,10 @@ const F = {
|
|
|
1255
1260
|
rounded: r = !0,
|
|
1256
1261
|
showLabel: s = !1
|
|
1257
1262
|
}) => {
|
|
1258
|
-
const c = ((
|
|
1259
|
-
if (
|
|
1260
|
-
const
|
|
1261
|
-
return
|
|
1263
|
+
const c = ((d, u) => {
|
|
1264
|
+
if (d) {
|
|
1265
|
+
const V = Number(u) / d;
|
|
1266
|
+
return V > 1 ? 100 : V * 100;
|
|
1262
1267
|
}
|
|
1263
1268
|
return n;
|
|
1264
1269
|
})(l, n);
|
|
@@ -1274,7 +1279,7 @@ const F = {
|
|
|
1274
1279
|
"aria-label": "Progress Bar",
|
|
1275
1280
|
"aria-valuenow": n,
|
|
1276
1281
|
"aria-valuemin": e,
|
|
1277
|
-
"aria-valuemax":
|
|
1282
|
+
"aria-valuemax": h,
|
|
1278
1283
|
children: /* @__PURE__ */ o(
|
|
1279
1284
|
"div",
|
|
1280
1285
|
{
|
|
@@ -1289,7 +1294,7 @@ const F = {
|
|
|
1289
1294
|
}
|
|
1290
1295
|
);
|
|
1291
1296
|
}, D1 = y(r1), i1 = ({
|
|
1292
|
-
checked:
|
|
1297
|
+
checked: h = !1,
|
|
1293
1298
|
children: e,
|
|
1294
1299
|
className: t = "",
|
|
1295
1300
|
id: a = "",
|
|
@@ -1299,17 +1304,17 @@ const F = {
|
|
|
1299
1304
|
variation: s = "primary",
|
|
1300
1305
|
value: i = ""
|
|
1301
1306
|
}) => {
|
|
1302
|
-
const c = n ? "div" : "label",
|
|
1307
|
+
const c = n ? "div" : "label", d = c === "label" ? { htmlFor: a } : {};
|
|
1303
1308
|
return /* @__PURE__ */ g(
|
|
1304
1309
|
c,
|
|
1305
1310
|
{
|
|
1306
1311
|
className: m("radio flex items-center", t),
|
|
1307
|
-
...
|
|
1312
|
+
...d,
|
|
1308
1313
|
children: [
|
|
1309
1314
|
/* @__PURE__ */ o(
|
|
1310
1315
|
"input",
|
|
1311
1316
|
{
|
|
1312
|
-
checked:
|
|
1317
|
+
checked: h,
|
|
1313
1318
|
className: m(
|
|
1314
1319
|
"form-radio focus:ring-2 focus:ring-offset-2 focus-within:outline-none",
|
|
1315
1320
|
{
|
|
@@ -1328,7 +1333,7 @@ const F = {
|
|
|
1328
1333
|
}
|
|
1329
1334
|
);
|
|
1330
1335
|
}, E1 = y(i1), o1 = ({
|
|
1331
|
-
children:
|
|
1336
|
+
children: h,
|
|
1332
1337
|
className: e = "",
|
|
1333
1338
|
error: t = !1,
|
|
1334
1339
|
errorMessage: a = "",
|
|
@@ -1338,16 +1343,16 @@ const F = {
|
|
|
1338
1343
|
options: s = [],
|
|
1339
1344
|
placeholder: i = "",
|
|
1340
1345
|
props: c = {},
|
|
1341
|
-
selectClass:
|
|
1346
|
+
selectClass: d = "",
|
|
1342
1347
|
styles: u = null,
|
|
1343
|
-
variation:
|
|
1348
|
+
variation: V = "primary",
|
|
1344
1349
|
value: M
|
|
1345
1350
|
}) => {
|
|
1346
1351
|
const A = i ? { defaultValue: "" } : {};
|
|
1347
1352
|
return /* @__PURE__ */ g(
|
|
1348
1353
|
"label",
|
|
1349
1354
|
{
|
|
1350
|
-
className: m("relative select", e,
|
|
1355
|
+
className: m("relative select", e, V),
|
|
1351
1356
|
style: u ? { ...u } : null,
|
|
1352
1357
|
children: [
|
|
1353
1358
|
l,
|
|
@@ -1357,7 +1362,7 @@ const F = {
|
|
|
1357
1362
|
className: m(
|
|
1358
1363
|
"form-select relative bg-white pl-3 pr-10 text-left cursor-default",
|
|
1359
1364
|
t ? "!border-red-500 !bg-red-500/10 !text-red-700 focus:!ring-red-500 focus:!border-red-500" : "",
|
|
1360
|
-
|
|
1365
|
+
d
|
|
1361
1366
|
),
|
|
1362
1367
|
id: n,
|
|
1363
1368
|
name: r,
|
|
@@ -1366,13 +1371,13 @@ const F = {
|
|
|
1366
1371
|
...c,
|
|
1367
1372
|
children: [
|
|
1368
1373
|
i && /* @__PURE__ */ o("option", { hidden: !0, value: "", children: i }),
|
|
1369
|
-
s.map((
|
|
1374
|
+
s.map((C, p) => /* @__PURE__ */ o(
|
|
1370
1375
|
"option",
|
|
1371
1376
|
{
|
|
1372
|
-
value: (
|
|
1373
|
-
children: (
|
|
1377
|
+
value: (C == null ? void 0 : C.id) || (C == null ? void 0 : C.value) || C,
|
|
1378
|
+
children: (C == null ? void 0 : C.name) || C
|
|
1374
1379
|
},
|
|
1375
|
-
(
|
|
1380
|
+
(C == null ? void 0 : C.name) || C
|
|
1376
1381
|
))
|
|
1377
1382
|
]
|
|
1378
1383
|
}
|
|
@@ -1381,12 +1386,12 @@ const F = {
|
|
|
1381
1386
|
]
|
|
1382
1387
|
}
|
|
1383
1388
|
);
|
|
1384
|
-
}, T1 = y(o1), c1 = ({ className:
|
|
1389
|
+
}, T1 = y(o1), c1 = ({ className: h = "" }) => /* @__PURE__ */ g(
|
|
1385
1390
|
"div",
|
|
1386
1391
|
{
|
|
1387
1392
|
className: m(
|
|
1388
1393
|
"flex justify-center items-center bg-gray-200 rounded-lg animate-pulse",
|
|
1389
|
-
|
|
1394
|
+
h
|
|
1390
1395
|
),
|
|
1391
1396
|
children: [
|
|
1392
1397
|
/* @__PURE__ */ o(b, { size: "xLarge", name: "map", className: "mx-auto" }),
|
|
@@ -1394,7 +1399,7 @@ const F = {
|
|
|
1394
1399
|
]
|
|
1395
1400
|
}
|
|
1396
1401
|
), $1 = y(c1), d1 = ({
|
|
1397
|
-
placeholderClass:
|
|
1402
|
+
placeholderClass: h = "",
|
|
1398
1403
|
children: e,
|
|
1399
1404
|
className: t = "",
|
|
1400
1405
|
id: a = 1,
|
|
@@ -1413,7 +1418,7 @@ const F = {
|
|
|
1413
1418
|
/* @__PURE__ */ o("div", { id: `slider-container-${a}`, className: "slider-container", children: Array.from({ length: 4 }, (l, r) => /* @__PURE__ */ o(
|
|
1414
1419
|
"div",
|
|
1415
1420
|
{
|
|
1416
|
-
className: `slider-card bg-gray-200 animate-pulse ${
|
|
1421
|
+
className: `slider-card bg-gray-200 animate-pulse ${h}`,
|
|
1417
1422
|
children: /* @__PURE__ */ o("div", { className: `slider-card-action ${n ? "p-4" : ""}`, children: e })
|
|
1418
1423
|
},
|
|
1419
1424
|
r
|
|
@@ -1429,7 +1434,7 @@ const F = {
|
|
|
1429
1434
|
}
|
|
1430
1435
|
)
|
|
1431
1436
|
] }), O1 = y(d1), h1 = ({
|
|
1432
|
-
className:
|
|
1437
|
+
className: h = "",
|
|
1433
1438
|
value: e
|
|
1434
1439
|
}) => {
|
|
1435
1440
|
const t = {
|
|
@@ -1440,13 +1445,13 @@ const F = {
|
|
|
1440
1445
|
{
|
|
1441
1446
|
className: m(
|
|
1442
1447
|
'Stars inline-block leading-none font-sans text-base before:content-["★★★★★"]',
|
|
1443
|
-
|
|
1448
|
+
h
|
|
1444
1449
|
),
|
|
1445
1450
|
style: t
|
|
1446
1451
|
}
|
|
1447
1452
|
);
|
|
1448
1453
|
}, I1 = h1, u1 = ({
|
|
1449
|
-
className:
|
|
1454
|
+
className: h = "",
|
|
1450
1455
|
clear: e = !1,
|
|
1451
1456
|
error: t = !1,
|
|
1452
1457
|
errorMessage: a = "",
|
|
@@ -1456,8 +1461,8 @@ const F = {
|
|
|
1456
1461
|
placeholder: s = "",
|
|
1457
1462
|
props: i = {},
|
|
1458
1463
|
rows: c = 4,
|
|
1459
|
-
variation:
|
|
1460
|
-
}) => /* @__PURE__ */ g("div", { className: m("relative textarea",
|
|
1464
|
+
variation: d = "primary"
|
|
1465
|
+
}) => /* @__PURE__ */ g("div", { className: m("relative textarea", d, h), children: [
|
|
1461
1466
|
/* @__PURE__ */ o(
|
|
1462
1467
|
"textarea",
|
|
1463
1468
|
{
|
|
@@ -1491,7 +1496,7 @@ const F = {
|
|
|
1491
1496
|
),
|
|
1492
1497
|
a && /* @__PURE__ */ o("span", { className: "relative flex mt-0.5 text-red-700 text-xs text-left", children: a })
|
|
1493
1498
|
] }), F1 = y(u1), p1 = ({
|
|
1494
|
-
className:
|
|
1499
|
+
className: h = "",
|
|
1495
1500
|
clear: e = !1,
|
|
1496
1501
|
error: t = !1,
|
|
1497
1502
|
errorMessage: a = "",
|
|
@@ -1501,15 +1506,15 @@ const F = {
|
|
|
1501
1506
|
name: s = "",
|
|
1502
1507
|
placeholder: i = "",
|
|
1503
1508
|
props: c = {},
|
|
1504
|
-
styles:
|
|
1509
|
+
styles: d = null,
|
|
1505
1510
|
type: u = "text",
|
|
1506
|
-
value:
|
|
1511
|
+
value: V,
|
|
1507
1512
|
variation: M = "primary"
|
|
1508
1513
|
}) => /* @__PURE__ */ g(
|
|
1509
1514
|
"div",
|
|
1510
1515
|
{
|
|
1511
|
-
className: m("relative textbox", M,
|
|
1512
|
-
style:
|
|
1516
|
+
className: m("relative textbox", M, h),
|
|
1517
|
+
style: d ? { ...d } : null,
|
|
1513
1518
|
children: [
|
|
1514
1519
|
n && /* @__PURE__ */ o("div", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center px-2", children: /* @__PURE__ */ o(
|
|
1515
1520
|
b,
|
|
@@ -1527,7 +1532,7 @@ const F = {
|
|
|
1527
1532
|
id: l,
|
|
1528
1533
|
name: s,
|
|
1529
1534
|
type: u,
|
|
1530
|
-
value:
|
|
1535
|
+
value: V,
|
|
1531
1536
|
autoComplete: "off",
|
|
1532
1537
|
className: m(
|
|
1533
1538
|
"form-input",
|
|
@@ -1560,20 +1565,20 @@ const F = {
|
|
|
1560
1565
|
a && /* @__PURE__ */ o("span", { className: "relative flex mt-0.5 text-red-700 text-xs text-left", children: a })
|
|
1561
1566
|
]
|
|
1562
1567
|
}
|
|
1563
|
-
), q1 = y(p1), m1 = ({ children:
|
|
1568
|
+
), q1 = y(p1), m1 = ({ children: h, className: e = "", tag: t = "h1", title: a }) => /* @__PURE__ */ o(
|
|
1564
1569
|
t,
|
|
1565
1570
|
{
|
|
1566
1571
|
className: m(
|
|
1567
1572
|
"!text-xl text-center mb-6 flex items-center justify-center",
|
|
1568
1573
|
e
|
|
1569
1574
|
),
|
|
1570
|
-
children: a ||
|
|
1575
|
+
children: a || h
|
|
1571
1576
|
}
|
|
1572
1577
|
), j1 = y(m1);
|
|
1573
|
-
class
|
|
1578
|
+
class f {
|
|
1574
1579
|
static calcCrow(e, t, a, n) {
|
|
1575
|
-
const r =
|
|
1576
|
-
e =
|
|
1580
|
+
const r = f.toRad(a - e), s = f.toRad(n - t);
|
|
1581
|
+
e = f.toRad(e), a = f.toRad(a);
|
|
1577
1582
|
const i = Math.sin(r / 2) * Math.sin(r / 2) + Math.sin(s / 2) * Math.sin(s / 2) * Math.cos(e) * Math.cos(a);
|
|
1578
1583
|
return 6371 * (2 * Math.atan2(Math.sqrt(i), Math.sqrt(1 - i)));
|
|
1579
1584
|
}
|
|
@@ -1588,9 +1593,9 @@ class C {
|
|
|
1588
1593
|
return;
|
|
1589
1594
|
window.dataLayer = window.dataLayer || [];
|
|
1590
1595
|
const t = document.querySelectorAll("[data-div-track]");
|
|
1591
|
-
typeof
|
|
1596
|
+
typeof f == "function" && t.forEach((a) => {
|
|
1592
1597
|
a.addEventListener("click", () => {
|
|
1593
|
-
|
|
1598
|
+
f.clickTrackEvent(a.dataset.divTrack);
|
|
1594
1599
|
});
|
|
1595
1600
|
});
|
|
1596
1601
|
}
|
|
@@ -1600,20 +1605,19 @@ class C {
|
|
|
1600
1605
|
click_value: e
|
|
1601
1606
|
});
|
|
1602
1607
|
}
|
|
1603
|
-
/* TODO: Not sure if this or PRECS is more correct */
|
|
1604
1608
|
static async createData(e, t = null, a = !0) {
|
|
1605
|
-
if (options.isBot || !t)
|
|
1609
|
+
if (window.options.isBot || !t)
|
|
1606
1610
|
return null;
|
|
1607
|
-
const { tolken: n = null, ip: l = null } = await
|
|
1611
|
+
const { tolken: n = null, ip: l = null } = await f.getHeaders(), r = a === !1 ? "" : "&tolken=" + n + "&ip=" + l, s = e + r, i = typeof t == "string" ? t : JSON.stringify(t);
|
|
1608
1612
|
try {
|
|
1609
1613
|
const c = await fetch(s, {
|
|
1610
1614
|
method: "POST",
|
|
1611
1615
|
body: i === "null" ? null : i,
|
|
1612
1616
|
headers: {
|
|
1613
|
-
website:
|
|
1617
|
+
website: f.getWebsiteHeaderName()
|
|
1614
1618
|
}
|
|
1615
|
-
}),
|
|
1616
|
-
if (
|
|
1619
|
+
}), d = c.headers.get("content-type");
|
|
1620
|
+
if (d && d.indexOf("application/json") !== -1)
|
|
1617
1621
|
return c.json();
|
|
1618
1622
|
const u = await c.text();
|
|
1619
1623
|
return u ? u.replace("__next", "") : null;
|
|
@@ -1627,7 +1631,7 @@ class C {
|
|
|
1627
1631
|
}
|
|
1628
1632
|
static async deleteSearchValue(e = "recsSearchValue") {
|
|
1629
1633
|
try {
|
|
1630
|
-
return await
|
|
1634
|
+
return await f.createData(`/api/cookie/remove?name=${e}`);
|
|
1631
1635
|
} catch (t) {
|
|
1632
1636
|
console.error("deleteSearchValue", t.message);
|
|
1633
1637
|
}
|
|
@@ -1678,12 +1682,12 @@ class C {
|
|
|
1678
1682
|
static async fetchData(e, t = !1, a = !0) {
|
|
1679
1683
|
if (options.isBot)
|
|
1680
1684
|
return null;
|
|
1681
|
-
const { tolken: n = null, ip: l = null } = await
|
|
1685
|
+
const { tolken: n = null, ip: l = null } = await f.getHeaders(), s = e.replace("#", "").replace("%23", "") + "&tolken=" + n + "&ip=" + l;
|
|
1682
1686
|
try {
|
|
1683
1687
|
const i = await fetch(s, { method: "GET" });
|
|
1684
1688
|
if (t === !0) {
|
|
1685
|
-
const
|
|
1686
|
-
return
|
|
1689
|
+
const d = await i.text();
|
|
1690
|
+
return d ? d.replace("__next", "") : null;
|
|
1687
1691
|
}
|
|
1688
1692
|
const c = i.headers.get("content-type");
|
|
1689
1693
|
return c && c.indexOf("application/json") !== -1 ? i.json() : null;
|
|
@@ -1698,8 +1702,8 @@ class C {
|
|
|
1698
1702
|
}
|
|
1699
1703
|
static formatDate(e = null) {
|
|
1700
1704
|
return e ? (e = new Date(e), [
|
|
1701
|
-
|
|
1702
|
-
|
|
1705
|
+
f.padTo2Digits(e.getMonth() + 1),
|
|
1706
|
+
f.padTo2Digits(e.getDate()),
|
|
1703
1707
|
e.getFullYear()
|
|
1704
1708
|
].join("-")) : null;
|
|
1705
1709
|
}
|
|
@@ -1749,6 +1753,7 @@ class C {
|
|
|
1749
1753
|
return "/report/license-plate";
|
|
1750
1754
|
}
|
|
1751
1755
|
static async getHeaders(e = 300) {
|
|
1756
|
+
var i;
|
|
1752
1757
|
const {
|
|
1753
1758
|
userAgent: t = null,
|
|
1754
1759
|
userAgentData: a = null,
|
|
@@ -1763,26 +1768,28 @@ class C {
|
|
|
1763
1768
|
return r;
|
|
1764
1769
|
const s = localStorage.getItem("headerTolken");
|
|
1765
1770
|
if (s) {
|
|
1766
|
-
const
|
|
1767
|
-
return
|
|
1768
|
-
tolken:
|
|
1769
|
-
ip:
|
|
1771
|
+
const c = JSON.parse(s), d = (/* @__PURE__ */ new Date()).getTime();
|
|
1772
|
+
return c.expire - d < 0 && localStorage.removeItem("headerTolken"), {
|
|
1773
|
+
tolken: c.tolken,
|
|
1774
|
+
ip: c.ip,
|
|
1770
1775
|
userAgent: t,
|
|
1771
1776
|
platform: l
|
|
1772
1777
|
};
|
|
1773
1778
|
}
|
|
1779
|
+
if ((i = window == null ? void 0 : window.options) != null && i.isPdf)
|
|
1780
|
+
return r;
|
|
1774
1781
|
try {
|
|
1775
|
-
const
|
|
1782
|
+
const d = await (await fetch("/api/headers")).json(), u = (d == null ? void 0 : d.token) ?? null, V = (d == null ? void 0 : d.ip) ?? null;
|
|
1776
1783
|
return localStorage.setItem(
|
|
1777
1784
|
"headerTolken",
|
|
1778
1785
|
JSON.stringify({
|
|
1779
|
-
tolken:
|
|
1780
|
-
ip:
|
|
1786
|
+
tolken: u,
|
|
1787
|
+
ip: V,
|
|
1781
1788
|
expire: (/* @__PURE__ */ new Date()).getTime() + e * 1e3
|
|
1782
1789
|
})
|
|
1783
|
-
), { tolken:
|
|
1784
|
-
} catch (
|
|
1785
|
-
console.error("getHeaders",
|
|
1790
|
+
), { tolken: u, ip: V, userAgent: t, platform: l };
|
|
1791
|
+
} catch (c) {
|
|
1792
|
+
console.error("getHeaders", c);
|
|
1786
1793
|
}
|
|
1787
1794
|
return r;
|
|
1788
1795
|
}
|
|
@@ -1793,19 +1800,19 @@ class C {
|
|
|
1793
1800
|
}[e];
|
|
1794
1801
|
}
|
|
1795
1802
|
static async getLocationData(e) {
|
|
1796
|
-
const { swLat: t, neLng: a, neLat: n, swLng: l } =
|
|
1797
|
-
return await
|
|
1803
|
+
const { swLat: t, neLng: a, neLat: n, swLng: l } = f.getBounds(e, 3, 0.05), r = "zip-location&swLat=" + t + "&neLng=" + a + "&neLat=" + n + "&swLng=" + l;
|
|
1804
|
+
return await f.fetchData("/api/client?query=" + r);
|
|
1798
1805
|
}
|
|
1799
1806
|
static getReportUrl(e, t = null) {
|
|
1800
|
-
var i, c,
|
|
1801
|
-
const a = ((i = e == null ? void 0 : e.state) == null ? void 0 : i.slug) ?? null, n = ((c = e == null ? void 0 : e.city) == null ? void 0 : c.slug) ?? null, l = ((
|
|
1807
|
+
var i, c, d;
|
|
1808
|
+
const a = ((i = e == null ? void 0 : e.state) == null ? void 0 : i.slug) ?? null, n = ((c = e == null ? void 0 : e.city) == null ? void 0 : c.slug) ?? null, l = ((d = e == null ? void 0 : e.name) == null ? void 0 : d.slug) ?? null, r = (e == null ? void 0 : e.zip) ?? null;
|
|
1802
1809
|
t = t || ((e == null ? void 0 : e.id) ?? null);
|
|
1803
1810
|
const s = [r, "-piq", t].filter((u) => u).join("");
|
|
1804
|
-
return "/" + [a, n, l].filter((u) => u).map((u) =>
|
|
1811
|
+
return "/" + [a, n, l].filter((u) => u).map((u) => f.toSlug(u)).join("/") + "/" + s;
|
|
1805
1812
|
}
|
|
1806
1813
|
static async getSearchValue(e = "recsSearchValue") {
|
|
1807
1814
|
try {
|
|
1808
|
-
return await
|
|
1815
|
+
return await f.createData(`/api/cookie/fetch?name=${e}`);
|
|
1809
1816
|
} catch (t) {
|
|
1810
1817
|
console.error("getSearchValue", t.message);
|
|
1811
1818
|
}
|
|
@@ -1924,15 +1931,18 @@ class C {
|
|
|
1924
1931
|
};
|
|
1925
1932
|
}
|
|
1926
1933
|
static async getUser() {
|
|
1934
|
+
var e;
|
|
1927
1935
|
if (typeof window < "u") {
|
|
1928
|
-
const { user:
|
|
1929
|
-
if (
|
|
1930
|
-
return
|
|
1936
|
+
const { user: t = null } = (window == null ? void 0 : window.options) ?? {};
|
|
1937
|
+
if (t)
|
|
1938
|
+
return t;
|
|
1931
1939
|
}
|
|
1940
|
+
if ((e = window == null ? void 0 : window.options) != null && e.isPdf)
|
|
1941
|
+
return null;
|
|
1932
1942
|
try {
|
|
1933
|
-
return await
|
|
1934
|
-
} catch (
|
|
1935
|
-
console.error("getUser",
|
|
1943
|
+
return await f.createData("/api/cookie/fetch?name=odrUser");
|
|
1944
|
+
} catch (t) {
|
|
1945
|
+
console.error("getUser", t.message);
|
|
1936
1946
|
}
|
|
1937
1947
|
return null;
|
|
1938
1948
|
}
|
|
@@ -1946,7 +1956,7 @@ class C {
|
|
|
1946
1956
|
uuid: t
|
|
1947
1957
|
}
|
|
1948
1958
|
});
|
|
1949
|
-
return await
|
|
1959
|
+
return await f.makeSearchFetchCall(
|
|
1950
1960
|
`/api/client?query=user-get-history&filter=${a}`
|
|
1951
1961
|
);
|
|
1952
1962
|
}
|
|
@@ -2005,59 +2015,59 @@ class C {
|
|
|
2005
2015
|
disableOutsideClick: l = !1
|
|
2006
2016
|
}) {
|
|
2007
2017
|
const r = e ? document.querySelectorAll(e) : [], s = document.getElementById(t + "-dialog"), i = document.querySelectorAll("[data-dialog-close]"), c = ["closing", "closed", "opening", "opened", "removed"].reduce(
|
|
2008
|
-
(p,
|
|
2018
|
+
(p, H) => ({
|
|
2009
2019
|
...p,
|
|
2010
|
-
[
|
|
2020
|
+
[H]: new Event(H)
|
|
2011
2021
|
}),
|
|
2012
2022
|
{}
|
|
2013
|
-
),
|
|
2023
|
+
), d = new MutationObserver((p, H) => {
|
|
2014
2024
|
p.forEach(async (w) => {
|
|
2015
2025
|
if (w.attributeName === "open") {
|
|
2016
2026
|
const v = w.target;
|
|
2017
2027
|
if (!(v == null ? void 0 : v.hasAttribute("open"))) return;
|
|
2018
|
-
v == null || v.removeAttribute("inert"), v == null || v.dispatchEvent(c.opening), v && await
|
|
2028
|
+
v == null || v.removeAttribute("inert"), v == null || v.dispatchEvent(c.opening), v && await C(v), v == null || v.dispatchEvent(c.opened);
|
|
2019
2029
|
}
|
|
2020
2030
|
});
|
|
2021
|
-
}), u = new MutationObserver((p,
|
|
2031
|
+
}), u = new MutationObserver((p, H) => {
|
|
2022
2032
|
p.forEach((w) => {
|
|
2023
2033
|
w.removedNodes.forEach((v) => {
|
|
2024
|
-
v.nodeName === "DIALOG" && (v.removeEventListener("click", A), v.removeEventListener("close", M), v.dispatchEvent(c.removed), u == null || u.disconnect(),
|
|
2034
|
+
v.nodeName === "DIALOG" && (v.removeEventListener("click", A), v.removeEventListener("close", M), v.dispatchEvent(c.removed), u == null || u.disconnect(), d == null || d.disconnect());
|
|
2025
2035
|
});
|
|
2026
2036
|
});
|
|
2027
2037
|
});
|
|
2028
|
-
s && (
|
|
2038
|
+
s && (d.observe(s, {
|
|
2029
2039
|
attributes: !0
|
|
2030
2040
|
}), u.observe(document.body, {
|
|
2031
2041
|
attributes: !1,
|
|
2032
2042
|
subtree: !1,
|
|
2033
2043
|
childList: !0
|
|
2034
2044
|
}));
|
|
2035
|
-
const
|
|
2045
|
+
const V = () => {
|
|
2036
2046
|
s == null || s.showModal();
|
|
2037
2047
|
}, M = async ({ target: p }) => {
|
|
2038
|
-
p == null || p.classList.add("closing"), p == null || p.setAttribute("inert", ""), p == null || p.dispatchEvent(c.closing), p && await
|
|
2048
|
+
p == null || p.classList.add("closing"), p == null || p.setAttribute("inert", ""), p == null || p.dispatchEvent(c.closing), p && await C(p), p == null || p.classList.remove("closing"), p == null || p.dispatchEvent(c.closed);
|
|
2039
2049
|
}, A = async ({ target: p }) => {
|
|
2040
2050
|
(p == null ? void 0 : p.nodeName) === "DIALOG" && (s == null || s.close("outside"));
|
|
2041
|
-
},
|
|
2042
|
-
p == null ? void 0 : p.getAnimations().map((
|
|
2051
|
+
}, C = (p) => Promise.allSettled(
|
|
2052
|
+
p == null ? void 0 : p.getAnimations().map((H) => H == null ? void 0 : H.finished)
|
|
2043
2053
|
);
|
|
2044
2054
|
return !l && (s == null || s.addEventListener("click", A)), s == null || s.addEventListener("close", M), r == null || r.forEach((p) => {
|
|
2045
|
-
p.addEventListener("click", (
|
|
2046
|
-
|
|
2055
|
+
p.addEventListener("click", (H) => {
|
|
2056
|
+
V(), a && a(H, s);
|
|
2047
2057
|
});
|
|
2048
2058
|
}), i == null || i.forEach((p) => {
|
|
2049
|
-
p.addEventListener("click", async (
|
|
2050
|
-
s == null || s.close("close"), n && n(
|
|
2059
|
+
p.addEventListener("click", async (H) => {
|
|
2060
|
+
s == null || s.close("close"), n && n(H, s);
|
|
2051
2061
|
});
|
|
2052
2062
|
}), {
|
|
2053
2063
|
activators: r,
|
|
2054
2064
|
ref: s,
|
|
2055
|
-
handleOpen:
|
|
2065
|
+
handleOpen: V,
|
|
2056
2066
|
handleClose: M
|
|
2057
2067
|
};
|
|
2058
2068
|
}
|
|
2059
2069
|
static hasBoundsEntry(e, t = "bounds") {
|
|
2060
|
-
return
|
|
2070
|
+
return f.getBoundsEntries(t).includes(e);
|
|
2061
2071
|
}
|
|
2062
2072
|
static initObserver(e, t, a = null) {
|
|
2063
2073
|
if (!e)
|
|
@@ -2116,7 +2126,7 @@ class C {
|
|
|
2116
2126
|
url: n,
|
|
2117
2127
|
data: l
|
|
2118
2128
|
};
|
|
2119
|
-
return await
|
|
2129
|
+
return await f.createData("/api/client?query=log/save&method=POST", r), null;
|
|
2120
2130
|
}
|
|
2121
2131
|
static loadAds() {
|
|
2122
2132
|
window.dataLayer = window.dataLayer || [];
|
|
@@ -2133,7 +2143,7 @@ class C {
|
|
|
2133
2143
|
if (e) {
|
|
2134
2144
|
const n = "/scripts/" + e + ".js?v=100.0.5";
|
|
2135
2145
|
try {
|
|
2136
|
-
return await
|
|
2146
|
+
return await f.injectScript({
|
|
2137
2147
|
src: n,
|
|
2138
2148
|
id: t || e,
|
|
2139
2149
|
async: !1,
|
|
@@ -2149,11 +2159,11 @@ class C {
|
|
|
2149
2159
|
if (window.options.googleMapsLoaded === !0)
|
|
2150
2160
|
return;
|
|
2151
2161
|
const e = "https://maps.googleapis.com/maps/api/js", t = window.options.googleApiKey, a = e + "?key=" + t + "&libraries=marker&v=beta&callback=mapCb";
|
|
2152
|
-
await
|
|
2162
|
+
await f.injectScript({ src: a, id: "googleapis", async: !1 });
|
|
2153
2163
|
}
|
|
2154
2164
|
static async loadLeafletApi() {
|
|
2155
2165
|
const e = "https://unpkg.com/leaflet@1.9.3/dist", t = e + "/leaflet.js", a = e + "/leaflet.css", n = "//unpkg.com/leaflet-gesture-handling", l = "//unpkg.com/leaflet-gesture-handling/dist/leaflet-gesture-handling.min.css";
|
|
2156
|
-
await
|
|
2166
|
+
await f.injectLink({ href: a, id: "leafletCss" }), await f.injectLink({ href: l, id: "gestureCss" }), await f.injectScript({ src: t, id: "leafletJs", async: !1 }), await f.injectScript({
|
|
2157
2167
|
src: n,
|
|
2158
2168
|
id: "gestureJs",
|
|
2159
2169
|
async: !1
|
|
@@ -2168,7 +2178,7 @@ class C {
|
|
|
2168
2178
|
}
|
|
2169
2179
|
static async loadSwiper() {
|
|
2170
2180
|
const e = "https://cdn.jsdelivr.net/npm", t = `${e}/swiper@9/swiper-bundle.min.js`, a = `${e}/swiper@9/swiper-bundle.min.css`;
|
|
2171
|
-
await
|
|
2181
|
+
await f.injectLink({ href: a, id: "swiperCss" }), await f.injectScript({ src: t, id: "swiperJs", async: !1 });
|
|
2172
2182
|
}
|
|
2173
2183
|
static async makeSearchFetchCall(e) {
|
|
2174
2184
|
try {
|
|
@@ -2205,13 +2215,13 @@ class C {
|
|
|
2205
2215
|
max: s = null,
|
|
2206
2216
|
city: i = null,
|
|
2207
2217
|
state: c = null,
|
|
2208
|
-
vin:
|
|
2218
|
+
vin: d = null,
|
|
2209
2219
|
license: u = null,
|
|
2210
|
-
token:
|
|
2220
|
+
token: V = null,
|
|
2211
2221
|
phone: M = null
|
|
2212
|
-
} = e || {}, A = t && t !== "",
|
|
2213
|
-
let
|
|
2214
|
-
return t && t !== "" &&
|
|
2222
|
+
} = e || {}, A = t && t !== "", C = r && r !== "" && r !== "18", p = s && s !== "" && r !== "99";
|
|
2223
|
+
let H = [];
|
|
2224
|
+
return t && t !== "" && H.push("name=" + t), A || (a && a !== "" && H.push("first=" + a), n && n !== "" && H.push("middle=" + n), l && l !== "" && H.push("last=" + l)), C && p ? parseInt(r) > parseInt(s) ? (H.push("min=" + s), H.push("max=" + r)) : (H.push("min=" + r), H.push("max=" + s)) : (C && H.push("min=" + r), p && H.push("max=" + s)), M && M !== "" && H.push("phone=" + M), i && i !== "" && H.push("city=" + i), u && u !== "" && H.push("license=" + u), d && d !== "" && H.push("vin=" + d), c && c !== "" && H.push("state=" + c), V && V !== "" && H.push("token=" + V), H.join("&");
|
|
2215
2225
|
}
|
|
2216
2226
|
static padTo2Digits(e) {
|
|
2217
2227
|
return e.toString().padStart(2, "0");
|
|
@@ -2228,7 +2238,7 @@ class C {
|
|
|
2228
2238
|
useSearch: r = !1,
|
|
2229
2239
|
useLocation: s = !0,
|
|
2230
2240
|
state: i = ""
|
|
2231
|
-
} = t ?? {}, { tolken: c = null, ip:
|
|
2241
|
+
} = t ?? {}, { tolken: c = null, ip: d = null } = await f.getHeaders(), V = [
|
|
2232
2242
|
"query=" + encodeURIComponent(this.cleanupAddress(e)),
|
|
2233
2243
|
"addressesOnly=" + a,
|
|
2234
2244
|
"useSearch=" + r,
|
|
@@ -2236,9 +2246,9 @@ class C {
|
|
|
2236
2246
|
"useCityStateSearch=" + l,
|
|
2237
2247
|
"useLocation=" + s
|
|
2238
2248
|
];
|
|
2239
|
-
i && i !== "" && !l &&
|
|
2240
|
-
const M =
|
|
2241
|
-
return await
|
|
2249
|
+
i && i !== "" && !l && V.push("state=" + i), c && c !== "" && V.push("tolken=" + c), d && d !== "" && V.push("ip=" + d);
|
|
2250
|
+
const M = V.join("&"), C = (n || l ? "/api/autocomplete-city" : "/api/autocomplete") + "?" + M;
|
|
2251
|
+
return await f.makeSearchFetchCall(C);
|
|
2242
2252
|
}
|
|
2243
2253
|
static removeElements(e) {
|
|
2244
2254
|
document.querySelectorAll(e).forEach((t) => t == null ? void 0 : t.remove());
|
|
@@ -2257,7 +2267,7 @@ class C {
|
|
|
2257
2267
|
});
|
|
2258
2268
|
}
|
|
2259
2269
|
static searchInStates(e) {
|
|
2260
|
-
const t =
|
|
2270
|
+
const t = f.getStates(), a = e.toLowerCase();
|
|
2261
2271
|
let n = t.find((l) => l.short.toLowerCase() === a) ?? null;
|
|
2262
2272
|
return n || (n = t.find((l) => l.name.toLowerCase() === a) ?? null), n;
|
|
2263
2273
|
}
|
|
@@ -2265,7 +2275,7 @@ class C {
|
|
|
2265
2275
|
typeof woopra == "object" && woopra.track(e, t);
|
|
2266
2276
|
}
|
|
2267
2277
|
static setBoundsEntries(e, t = "bounds") {
|
|
2268
|
-
const a =
|
|
2278
|
+
const a = f.getBoundsEntries(t);
|
|
2269
2279
|
a.push(e), localStorage.setItem(t, JSON.stringify(a));
|
|
2270
2280
|
}
|
|
2271
2281
|
static async setCityState(e = null) {
|
|
@@ -2274,7 +2284,7 @@ class C {
|
|
|
2274
2284
|
return e;
|
|
2275
2285
|
t = t.toLowerCase().replace(" usa", "").replace("city or state", "").replace(" state", "").trim();
|
|
2276
2286
|
let [a = null, n = null] = t.split(",").map((l) => l.trim());
|
|
2277
|
-
if (
|
|
2287
|
+
if (f.getStates(), a && !n) {
|
|
2278
2288
|
const l = this.searchInStates(a);
|
|
2279
2289
|
l && (a = null, n = l.short);
|
|
2280
2290
|
}
|
|
@@ -2292,7 +2302,7 @@ class C {
|
|
|
2292
2302
|
return a && n && a.toLowerCase() === n.toLowerCase() && (a = null), e.city = a, e.state = n ? n.toUpperCase() : null, e;
|
|
2293
2303
|
}
|
|
2294
2304
|
static async setSearchValueClient(e, t = "recsSearchValue") {
|
|
2295
|
-
localStorage.setItem(t, JSON.stringify(e)), await
|
|
2305
|
+
localStorage.setItem(t, JSON.stringify(e)), await f.createData(`/api/cookie/create?name=${t}`, e);
|
|
2296
2306
|
}
|
|
2297
2307
|
static stickyHeader(e = ".nav") {
|
|
2298
2308
|
const t = document.querySelector(e);
|
|
@@ -2319,7 +2329,7 @@ class C {
|
|
|
2319
2329
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
2320
2330
|
}
|
|
2321
2331
|
static useLayerTitle(e, t) {
|
|
2322
|
-
const a =
|
|
2332
|
+
const a = f.getLayerTitle(e);
|
|
2323
2333
|
L.tileLayer(a, {
|
|
2324
2334
|
maxNativeZoom: 19,
|
|
2325
2335
|
maxZoom: 25,
|
|
@@ -2328,11 +2338,11 @@ class C {
|
|
|
2328
2338
|
}).addTo(t);
|
|
2329
2339
|
}
|
|
2330
2340
|
static ucWords(e) {
|
|
2331
|
-
return e ? e.toString().split(" ").map((t) =>
|
|
2341
|
+
return e ? e.toString().split(" ").map((t) => f.ucFirst(t)).join(" ") : null;
|
|
2332
2342
|
}
|
|
2333
2343
|
}
|
|
2334
|
-
function V1(
|
|
2335
|
-
return new Proxy(
|
|
2344
|
+
function V1(h, e = []) {
|
|
2345
|
+
return new Proxy(h, {
|
|
2336
2346
|
get: function(t, a) {
|
|
2337
2347
|
return t[a];
|
|
2338
2348
|
},
|
|
@@ -2441,7 +2451,7 @@ export {
|
|
|
2441
2451
|
b1 as Card,
|
|
2442
2452
|
P1 as CardSlider,
|
|
2443
2453
|
w1 as Checkbox,
|
|
2444
|
-
|
|
2454
|
+
f as Common,
|
|
2445
2455
|
x1 as Container,
|
|
2446
2456
|
S1 as Dialog,
|
|
2447
2457
|
k1 as DialogOld,
|
package/package.json
CHANGED