@planetaexo/design-system 0.54.0 → 0.54.1
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/index.cjs +260 -201
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -7
- package/dist/index.d.ts +41 -7
- package/dist/index.js +230 -171
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React29 = require('react');
|
|
4
4
|
var classVarianceAuthority = require('class-variance-authority');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
@@ -37,7 +37,7 @@ function _interopNamespace(e) {
|
|
|
37
37
|
return Object.freeze(n);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var React29__namespace = /*#__PURE__*/_interopNamespace(React29);
|
|
41
41
|
|
|
42
42
|
var __defProp = Object.defineProperty;
|
|
43
43
|
var __defProps = Object.defineProperties;
|
|
@@ -102,7 +102,7 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
);
|
|
105
|
-
var Button =
|
|
105
|
+
var Button = React29__namespace.forwardRef(
|
|
106
106
|
(_a, ref) => {
|
|
107
107
|
var _b = _a, { className, variant, size } = _b, props = __objRest(_b, ["className", "variant", "size"]);
|
|
108
108
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -331,10 +331,10 @@ function DialogDescription(_a) {
|
|
|
331
331
|
}, props)
|
|
332
332
|
);
|
|
333
333
|
}
|
|
334
|
-
var FloatingInput =
|
|
334
|
+
var FloatingInput = React29__namespace.forwardRef(
|
|
335
335
|
(_a, ref) => {
|
|
336
336
|
var _b = _a, { label, error, id, className, required } = _b, props = __objRest(_b, ["label", "error", "id", "className", "required"]);
|
|
337
|
-
const inputId = id != null ? id :
|
|
337
|
+
const inputId = id != null ? id : React29__namespace.useId();
|
|
338
338
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
|
|
339
339
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
340
340
|
"input",
|
|
@@ -374,10 +374,10 @@ var FloatingInput = React28__namespace.forwardRef(
|
|
|
374
374
|
}
|
|
375
375
|
);
|
|
376
376
|
FloatingInput.displayName = "FloatingInput";
|
|
377
|
-
var FloatingSelect =
|
|
377
|
+
var FloatingSelect = React29__namespace.forwardRef(
|
|
378
378
|
(_a, ref) => {
|
|
379
379
|
var _b = _a, { label, error, id, className, required, children, value } = _b, props = __objRest(_b, ["label", "error", "id", "className", "required", "children", "value"]);
|
|
380
|
-
const inputId = id != null ? id :
|
|
380
|
+
const inputId = id != null ? id : React29__namespace.useId();
|
|
381
381
|
const hasValue = typeof value === "string" ? value !== "" : value !== void 0 && value !== null;
|
|
382
382
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
|
|
383
383
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -641,11 +641,11 @@ function PhoneCountrySelect({
|
|
|
641
641
|
disabled
|
|
642
642
|
}) {
|
|
643
643
|
var _a;
|
|
644
|
-
const [open, setOpen] =
|
|
645
|
-
const containerRef =
|
|
646
|
-
const listRef =
|
|
644
|
+
const [open, setOpen] = React29__namespace.useState(false);
|
|
645
|
+
const containerRef = React29__namespace.useRef(null);
|
|
646
|
+
const listRef = React29__namespace.useRef(null);
|
|
647
647
|
const selected = (_a = PHONE_COUNTRIES.find((c) => c.code === value)) != null ? _a : PHONE_COUNTRIES[0];
|
|
648
|
-
|
|
648
|
+
React29__namespace.useEffect(() => {
|
|
649
649
|
if (!open) return;
|
|
650
650
|
const handler = (e) => {
|
|
651
651
|
var _a2;
|
|
@@ -656,7 +656,7 @@ function PhoneCountrySelect({
|
|
|
656
656
|
document.addEventListener("mousedown", handler);
|
|
657
657
|
return () => document.removeEventListener("mousedown", handler);
|
|
658
658
|
}, [open]);
|
|
659
|
-
|
|
659
|
+
React29__namespace.useEffect(() => {
|
|
660
660
|
if (!open || !listRef.current) return;
|
|
661
661
|
const activeEl = listRef.current.querySelector("[data-selected=true]");
|
|
662
662
|
activeEl == null ? void 0 : activeEl.scrollIntoView({ block: "nearest" });
|
|
@@ -926,8 +926,8 @@ function CalendarDayButton(_a) {
|
|
|
926
926
|
"locale"
|
|
927
927
|
]);
|
|
928
928
|
const defaultClassNames = reactDayPicker.getDefaultClassNames();
|
|
929
|
-
const ref =
|
|
930
|
-
|
|
929
|
+
const ref = React29__namespace.useRef(null);
|
|
930
|
+
React29__namespace.useEffect(() => {
|
|
931
931
|
var _a2;
|
|
932
932
|
if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
|
|
933
933
|
}, [modifiers.focused]);
|
|
@@ -958,16 +958,16 @@ function BirthDateField({
|
|
|
958
958
|
className,
|
|
959
959
|
disabled
|
|
960
960
|
}) {
|
|
961
|
-
const [open, setOpen] =
|
|
962
|
-
const [text, setText] =
|
|
961
|
+
const [open, setOpen] = React29__namespace.useState(false);
|
|
962
|
+
const [text, setText] = React29__namespace.useState(
|
|
963
963
|
value ? dateFns.format(value, "dd/MM/yyyy") : ""
|
|
964
964
|
);
|
|
965
|
-
const containerRef =
|
|
966
|
-
const inputId =
|
|
967
|
-
|
|
965
|
+
const containerRef = React29__namespace.useRef(null);
|
|
966
|
+
const inputId = React29__namespace.useId();
|
|
967
|
+
React29__namespace.useEffect(() => {
|
|
968
968
|
setText(value ? dateFns.format(value, "dd/MM/yyyy") : "");
|
|
969
969
|
}, [value]);
|
|
970
|
-
|
|
970
|
+
React29__namespace.useEffect(() => {
|
|
971
971
|
if (!open) return;
|
|
972
972
|
const handler = (e) => {
|
|
973
973
|
var _a;
|
|
@@ -1176,14 +1176,14 @@ function CountrySearchField({
|
|
|
1176
1176
|
}) {
|
|
1177
1177
|
var _a;
|
|
1178
1178
|
const list = countries != null ? countries : COUNTRIES;
|
|
1179
|
-
const [query, setQuery] =
|
|
1180
|
-
const [open, setOpen] =
|
|
1181
|
-
const containerRef =
|
|
1182
|
-
const searchRef =
|
|
1179
|
+
const [query, setQuery] = React29__namespace.useState("");
|
|
1180
|
+
const [open, setOpen] = React29__namespace.useState(false);
|
|
1181
|
+
const containerRef = React29__namespace.useRef(null);
|
|
1182
|
+
const searchRef = React29__namespace.useRef(null);
|
|
1183
1183
|
const selected = list.find((c) => c.code === value);
|
|
1184
1184
|
const isFloated = open || !!selected;
|
|
1185
1185
|
const filtered = query.trim() ? list.filter((c) => c.name.toLowerCase().includes(query.toLowerCase())) : list;
|
|
1186
|
-
|
|
1186
|
+
React29__namespace.useEffect(() => {
|
|
1187
1187
|
if (!open) return;
|
|
1188
1188
|
const handler = (e) => {
|
|
1189
1189
|
var _a2;
|
|
@@ -1328,10 +1328,10 @@ function AdventureCard({
|
|
|
1328
1328
|
}) {
|
|
1329
1329
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
1330
1330
|
const isControlled = (_b = (_a = adventure.optionals) == null ? void 0 : _a.some((o) => o.onCheckedChange !== void 0)) != null ? _b : false;
|
|
1331
|
-
const [checkedInternal, setCheckedInternal] =
|
|
1331
|
+
const [checkedInternal, setCheckedInternal] = React29__namespace.useState(
|
|
1332
1332
|
new Set((_d = (_c = adventure.optionals) == null ? void 0 : _c.filter((o) => o.defaultChecked).map((o) => o.id)) != null ? _d : [])
|
|
1333
1333
|
);
|
|
1334
|
-
const [openDescriptionId, setOpenDescriptionId] =
|
|
1334
|
+
const [openDescriptionId, setOpenDescriptionId] = React29__namespace.useState(null);
|
|
1335
1335
|
const openDescriptionOptional = openDescriptionId ? (_e = adventure.optionals) == null ? void 0 : _e.find((o) => o.id === openDescriptionId) : void 0;
|
|
1336
1336
|
const isChecked = (opt) => {
|
|
1337
1337
|
var _a2;
|
|
@@ -1761,7 +1761,7 @@ function BookingShell({
|
|
|
1761
1761
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card overflow-hidden", children: [
|
|
1762
1762
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-border px-5 py-4 bg-muted/20", children: [
|
|
1763
1763
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-bold text-foreground font-heading mb-2", children: title }),
|
|
1764
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: steps.map((label, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1764
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: steps.map((label, i) => /* @__PURE__ */ jsxRuntime.jsxs(React29__namespace.Fragment, { children: [
|
|
1765
1765
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1766
1766
|
"span",
|
|
1767
1767
|
{
|
|
@@ -1960,7 +1960,7 @@ function TermsSection({
|
|
|
1960
1960
|
termsContent
|
|
1961
1961
|
}) {
|
|
1962
1962
|
var _a;
|
|
1963
|
-
const [modalOpen, setModalOpen] =
|
|
1963
|
+
const [modalOpen, setModalOpen] = React29__namespace.useState(false);
|
|
1964
1964
|
const i18n = (_a = TERMS_I18N[locale]) != null ? _a : TERMS_I18N.en;
|
|
1965
1965
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-border p-4 flex flex-col gap-3", children: [
|
|
1966
1966
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: title }),
|
|
@@ -2098,9 +2098,9 @@ function BookingWizard({
|
|
|
2098
2098
|
}) {
|
|
2099
2099
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T;
|
|
2100
2100
|
const wizardSteps = WIZARD_STEPS_FN(labels);
|
|
2101
|
-
const [step, setStep] =
|
|
2102
|
-
const [error, setError] =
|
|
2103
|
-
const [responsible, setResponsible] =
|
|
2101
|
+
const [step, setStep] = React29__namespace.useState("responsible");
|
|
2102
|
+
const [error, setError] = React29__namespace.useState(null);
|
|
2103
|
+
const [responsible, setResponsible] = React29__namespace.useState({
|
|
2104
2104
|
firstName: "",
|
|
2105
2105
|
lastName: "",
|
|
2106
2106
|
email: "",
|
|
@@ -2119,7 +2119,7 @@ function BookingWizard({
|
|
|
2119
2119
|
return s + ((_b2 = (_a2 = a.slots) == null ? void 0 : _a2.children) != null ? _b2 : 0);
|
|
2120
2120
|
}, 0);
|
|
2121
2121
|
const totalPax = totalAdults + totalChildren;
|
|
2122
|
-
const [travellers, setTravellers] =
|
|
2122
|
+
const [travellers, setTravellers] = React29__namespace.useState(
|
|
2123
2123
|
Array.from({ length: Math.max(totalPax, 1) }, () => ({
|
|
2124
2124
|
firstName: "",
|
|
2125
2125
|
lastName: "",
|
|
@@ -2127,9 +2127,9 @@ function BookingWizard({
|
|
|
2127
2127
|
email: ""
|
|
2128
2128
|
}))
|
|
2129
2129
|
);
|
|
2130
|
-
const [payAmount, setPayAmount] =
|
|
2131
|
-
const [payMethod, setPayMethod] =
|
|
2132
|
-
const [termsAccepted, setTermsAccepted] =
|
|
2130
|
+
const [payAmount, setPayAmount] = React29__namespace.useState("full");
|
|
2131
|
+
const [payMethod, setPayMethod] = React29__namespace.useState("stripe");
|
|
2132
|
+
const [termsAccepted, setTermsAccepted] = React29__namespace.useState(false);
|
|
2133
2133
|
const setR = (k, v) => setResponsible((p) => __spreadProps(__spreadValues({}, p), { [k]: v }));
|
|
2134
2134
|
const setT = (i, k, v) => setTravellers((prev) => prev.map((t, idx) => idx === i ? __spreadProps(__spreadValues({}, t), { [k]: v }) : t));
|
|
2135
2135
|
const setTDob = (i, v) => setTravellers((prev) => prev.map((t, idx) => idx === i ? __spreadProps(__spreadValues({}, t), { dateOfBirth: v }) : t));
|
|
@@ -2357,7 +2357,7 @@ function Offer({
|
|
|
2357
2357
|
className
|
|
2358
2358
|
}) {
|
|
2359
2359
|
var _a, _b, _c;
|
|
2360
|
-
const [showBooking, setShowBooking] =
|
|
2360
|
+
const [showBooking, setShowBooking] = React29__namespace.useState(false);
|
|
2361
2361
|
const isShowingCheckout = !confirmedState && (!!checkoutSlot || internalDemoCheckout && showBooking);
|
|
2362
2362
|
const handleBook = () => {
|
|
2363
2363
|
if (!checkoutSlot && !externalBookingFlow && internalDemoCheckout) {
|
|
@@ -2724,7 +2724,7 @@ function AdventureSection({
|
|
|
2724
2724
|
labels
|
|
2725
2725
|
}) {
|
|
2726
2726
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
|
|
2727
|
-
const [detailsOpen, setDetailsOpen] =
|
|
2727
|
+
const [detailsOpen, setDetailsOpen] = React29__namespace.useState(false);
|
|
2728
2728
|
const handleCopyUrl = (url) => {
|
|
2729
2729
|
if (onCopyFormLink) {
|
|
2730
2730
|
onCopyFormLink(url);
|
|
@@ -3237,8 +3237,8 @@ function AddTravellerDialog({
|
|
|
3237
3237
|
errorMessage
|
|
3238
3238
|
}) {
|
|
3239
3239
|
var _a, _b, _c, _d, _e;
|
|
3240
|
-
const [form, setForm] =
|
|
3241
|
-
|
|
3240
|
+
const [form, setForm] = React29__namespace.useState(() => createInitialAddFormData(config));
|
|
3241
|
+
React29__namespace.useEffect(() => {
|
|
3242
3242
|
if (open) {
|
|
3243
3243
|
setForm(createInitialAddFormData(config));
|
|
3244
3244
|
}
|
|
@@ -3298,7 +3298,7 @@ function EditTravellerDialog({
|
|
|
3298
3298
|
errorMessage
|
|
3299
3299
|
}) {
|
|
3300
3300
|
var _a, _b, _c, _d, _e;
|
|
3301
|
-
const [form, setForm] =
|
|
3301
|
+
const [form, setForm] = React29__namespace.useState(() => ({
|
|
3302
3302
|
firstName: "",
|
|
3303
3303
|
lastName: "",
|
|
3304
3304
|
email: "",
|
|
@@ -3307,7 +3307,7 @@ function EditTravellerDialog({
|
|
|
3307
3307
|
birthDate: "",
|
|
3308
3308
|
personType: "ADULT"
|
|
3309
3309
|
}));
|
|
3310
|
-
|
|
3310
|
+
React29__namespace.useEffect(() => {
|
|
3311
3311
|
var _a2, _b2, _c2, _d2, _e2, _f;
|
|
3312
3312
|
if (open && traveller) {
|
|
3313
3313
|
setForm({
|
|
@@ -3643,48 +3643,48 @@ function BookingDetails({
|
|
|
3643
3643
|
const hasSubmitAddTraveller = !!onSubmitAddTraveller;
|
|
3644
3644
|
const hasSubmitEditTraveller = !!onSubmitEditTraveller;
|
|
3645
3645
|
const hasConfirmRemoveTraveller = !!onConfirmRemoveTraveller;
|
|
3646
|
-
const [addModalState, setAddModalState] =
|
|
3646
|
+
const [addModalState, setAddModalState] = React29__namespace.useState({
|
|
3647
3647
|
open: false,
|
|
3648
3648
|
adventureId: null
|
|
3649
3649
|
});
|
|
3650
|
-
const [editModalState, setEditModalState] =
|
|
3651
|
-
const [deleteModalState, setDeleteModalState] =
|
|
3652
|
-
const [resendInviteDialogState, setResendInviteDialogState] =
|
|
3653
|
-
const handleRequestOpenAddModal =
|
|
3650
|
+
const [editModalState, setEditModalState] = React29__namespace.useState({ open: false, adventureId: null, traveller: null });
|
|
3651
|
+
const [deleteModalState, setDeleteModalState] = React29__namespace.useState({ open: false, adventureId: null, traveller: null });
|
|
3652
|
+
const [resendInviteDialogState, setResendInviteDialogState] = React29__namespace.useState({ open: false, traveller: null });
|
|
3653
|
+
const handleRequestOpenAddModal = React29__namespace.useCallback((adventureId) => {
|
|
3654
3654
|
setAddModalState({ open: true, adventureId });
|
|
3655
3655
|
}, []);
|
|
3656
|
-
const handleRequestOpenEditModal =
|
|
3656
|
+
const handleRequestOpenEditModal = React29__namespace.useCallback(
|
|
3657
3657
|
(adventureId, traveller) => {
|
|
3658
3658
|
setEditModalState({ open: true, adventureId, traveller });
|
|
3659
3659
|
},
|
|
3660
3660
|
[]
|
|
3661
3661
|
);
|
|
3662
|
-
const handleRequestOpenDeleteModal =
|
|
3662
|
+
const handleRequestOpenDeleteModal = React29__namespace.useCallback(
|
|
3663
3663
|
(adventureId, traveller) => {
|
|
3664
3664
|
setDeleteModalState({ open: true, adventureId, traveller });
|
|
3665
3665
|
},
|
|
3666
3666
|
[]
|
|
3667
3667
|
);
|
|
3668
|
-
const handleRequestOpenResendInviteDialog =
|
|
3668
|
+
const handleRequestOpenResendInviteDialog = React29__namespace.useCallback(
|
|
3669
3669
|
(traveller) => {
|
|
3670
3670
|
setResendInviteDialogState({ open: true, traveller });
|
|
3671
3671
|
},
|
|
3672
3672
|
[]
|
|
3673
3673
|
);
|
|
3674
|
-
const closeAddModal =
|
|
3674
|
+
const closeAddModal = React29__namespace.useCallback(() => {
|
|
3675
3675
|
setAddModalState({ open: false, adventureId: null });
|
|
3676
3676
|
}, []);
|
|
3677
|
-
const closeEditModal =
|
|
3677
|
+
const closeEditModal = React29__namespace.useCallback(() => {
|
|
3678
3678
|
setEditModalState({ open: false, adventureId: null, traveller: null });
|
|
3679
3679
|
}, []);
|
|
3680
|
-
const closeDeleteModal =
|
|
3680
|
+
const closeDeleteModal = React29__namespace.useCallback(() => {
|
|
3681
3681
|
setDeleteModalState({ open: false, adventureId: null, traveller: null });
|
|
3682
3682
|
}, []);
|
|
3683
|
-
const closeResendInviteDialog =
|
|
3683
|
+
const closeResendInviteDialog = React29__namespace.useCallback(() => {
|
|
3684
3684
|
setResendInviteDialogState({ open: false, traveller: null });
|
|
3685
3685
|
}, []);
|
|
3686
|
-
const submitInFlightRef =
|
|
3687
|
-
const handleAddSubmit =
|
|
3686
|
+
const submitInFlightRef = React29__namespace.useRef(false);
|
|
3687
|
+
const handleAddSubmit = React29__namespace.useCallback(
|
|
3688
3688
|
async (adventureId, data) => {
|
|
3689
3689
|
if (!onSubmitAddTraveller) return;
|
|
3690
3690
|
if (submitInFlightRef.current) return;
|
|
@@ -3699,7 +3699,7 @@ function BookingDetails({
|
|
|
3699
3699
|
},
|
|
3700
3700
|
[onSubmitAddTraveller, closeAddModal]
|
|
3701
3701
|
);
|
|
3702
|
-
const handleEditSubmit =
|
|
3702
|
+
const handleEditSubmit = React29__namespace.useCallback(
|
|
3703
3703
|
async (adventureId, travellerId, data) => {
|
|
3704
3704
|
if (!onSubmitEditTraveller) return;
|
|
3705
3705
|
if (submitInFlightRef.current) return;
|
|
@@ -3714,7 +3714,7 @@ function BookingDetails({
|
|
|
3714
3714
|
},
|
|
3715
3715
|
[onSubmitEditTraveller, closeEditModal]
|
|
3716
3716
|
);
|
|
3717
|
-
const handleDeleteConfirm =
|
|
3717
|
+
const handleDeleteConfirm = React29__namespace.useCallback(
|
|
3718
3718
|
async (adventureId, travellerId) => {
|
|
3719
3719
|
if (!onConfirmRemoveTraveller) return;
|
|
3720
3720
|
if (submitInFlightRef.current) return;
|
|
@@ -5290,7 +5290,7 @@ function BookingCreatedEmail({
|
|
|
5290
5290
|
}, children: i + 1 }) }),
|
|
5291
5291
|
/* @__PURE__ */ jsxRuntime.jsx("td", { style: { verticalAlign: "top" }, children: /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "14px", color: emailTokens.bodyText, lineHeight: "1.6", margin: 0 }, children: step }) })
|
|
5292
5292
|
] }) }) }, i)) }),
|
|
5293
|
-
nextStepsImportant && nextStepsImportant.trim().length > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "32px", fontSize: "14px", color: emailTokens.foreground, lineHeight: "1.6" }, children: nextStepsImportant.split("\n").map((line, idx, arr) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5293
|
+
nextStepsImportant && nextStepsImportant.trim().length > 0 && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { marginBottom: "32px", fontSize: "14px", color: emailTokens.foreground, lineHeight: "1.6" }, children: nextStepsImportant.split("\n").map((line, idx, arr) => /* @__PURE__ */ jsxRuntime.jsxs(React29__namespace.Fragment, { children: [
|
|
5294
5294
|
idx === 0 ? /* @__PURE__ */ jsxRuntime.jsx("strong", { children: line }) : line,
|
|
5295
5295
|
idx < arr.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx("br", {}) : null
|
|
5296
5296
|
] }, idx)) })
|
|
@@ -7310,11 +7310,11 @@ function DatePickerField({
|
|
|
7310
7310
|
fromDate,
|
|
7311
7311
|
className
|
|
7312
7312
|
}) {
|
|
7313
|
-
const [open, setOpen] =
|
|
7314
|
-
const containerRef =
|
|
7315
|
-
const [calendarWidth, setCalendarWidth] =
|
|
7313
|
+
const [open, setOpen] = React29__namespace.useState(false);
|
|
7314
|
+
const containerRef = React29__namespace.useRef(null);
|
|
7315
|
+
const [calendarWidth, setCalendarWidth] = React29__namespace.useState();
|
|
7316
7316
|
const hasValue = !!value;
|
|
7317
|
-
|
|
7317
|
+
React29__namespace.useEffect(() => {
|
|
7318
7318
|
if (!containerRef.current) return;
|
|
7319
7319
|
const observer = new ResizeObserver(([entry]) => {
|
|
7320
7320
|
setCalendarWidth(entry.contentRect.width);
|
|
@@ -7423,7 +7423,7 @@ function BookingForm({
|
|
|
7423
7423
|
subtitle = "Free enquiry \u2013 no commitment",
|
|
7424
7424
|
className
|
|
7425
7425
|
}) {
|
|
7426
|
-
const [values, setValues] =
|
|
7426
|
+
const [values, setValues] = React29__namespace.useState(__spreadValues(__spreadValues({}, defaultInitial), defaultValues));
|
|
7427
7427
|
const set = (key, value) => setValues((prev) => __spreadProps(__spreadValues({}, prev), { [key]: value }));
|
|
7428
7428
|
const handleSubmit = (e) => {
|
|
7429
7429
|
e.preventDefault();
|
|
@@ -7991,11 +7991,11 @@ function FloatingTextarea({
|
|
|
7991
7991
|
}
|
|
7992
7992
|
function SelectField({ field, value, onChange, error, disabled }) {
|
|
7993
7993
|
var _a, _b, _c;
|
|
7994
|
-
const [open, setOpen] =
|
|
7995
|
-
const containerRef =
|
|
7994
|
+
const [open, setOpen] = React29__namespace.useState(false);
|
|
7995
|
+
const containerRef = React29__namespace.useRef(null);
|
|
7996
7996
|
const options = (_a = field.options) != null ? _a : [];
|
|
7997
7997
|
const selectedOpt = (_b = options.find((o) => o.value === value)) != null ? _b : null;
|
|
7998
|
-
|
|
7998
|
+
React29__namespace.useEffect(() => {
|
|
7999
7999
|
if (!open) return;
|
|
8000
8000
|
const handleOutside = (e) => {
|
|
8001
8001
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
@@ -8460,11 +8460,11 @@ function RegistrationForm({
|
|
|
8460
8460
|
readOnly = false
|
|
8461
8461
|
}) {
|
|
8462
8462
|
var _a;
|
|
8463
|
-
const L =
|
|
8463
|
+
const L = React29__namespace.useMemo(
|
|
8464
8464
|
() => __spreadValues(__spreadValues({}, DEFAULT_LABELS12), labels != null ? labels : {}),
|
|
8465
8465
|
[labels]
|
|
8466
8466
|
);
|
|
8467
|
-
const sortedFields =
|
|
8467
|
+
const sortedFields = React29__namespace.useMemo(
|
|
8468
8468
|
() => [...fields].sort((a, b) => {
|
|
8469
8469
|
var _a2, _b;
|
|
8470
8470
|
return ((_a2 = a.order) != null ? _a2 : 0) - ((_b = b.order) != null ? _b : 0);
|
|
@@ -8472,7 +8472,7 @@ function RegistrationForm({
|
|
|
8472
8472
|
[fields]
|
|
8473
8473
|
);
|
|
8474
8474
|
const isControlled = values !== void 0;
|
|
8475
|
-
const [internal, setInternal] =
|
|
8475
|
+
const [internal, setInternal] = React29__namespace.useState(
|
|
8476
8476
|
() => initializeValues(
|
|
8477
8477
|
sortedFields,
|
|
8478
8478
|
defaultValues != null ? defaultValues : {},
|
|
@@ -8480,9 +8480,9 @@ function RegistrationForm({
|
|
|
8480
8480
|
includeTerms
|
|
8481
8481
|
)
|
|
8482
8482
|
);
|
|
8483
|
-
const [submitAttempted, setSubmitAttempted] =
|
|
8484
|
-
const [validationErrors, setValidationErrors] =
|
|
8485
|
-
|
|
8483
|
+
const [submitAttempted, setSubmitAttempted] = React29__namespace.useState(false);
|
|
8484
|
+
const [validationErrors, setValidationErrors] = React29__namespace.useState({});
|
|
8485
|
+
React29__namespace.useEffect(() => {
|
|
8486
8486
|
if (isControlled) return;
|
|
8487
8487
|
setInternal((prev) => {
|
|
8488
8488
|
const next = initializeValues(
|
|
@@ -8539,7 +8539,7 @@ function RegistrationForm({
|
|
|
8539
8539
|
const termsError = submitAttempted && termsEnabled && !termsAccepted;
|
|
8540
8540
|
const firstErrorFieldId = Object.keys(fieldErrors)[0];
|
|
8541
8541
|
const scrollTargetId = firstErrorFieldId ? `rf-${firstErrorFieldId}` : termsError ? "rf-terms" : null;
|
|
8542
|
-
|
|
8542
|
+
React29__namespace.useEffect(() => {
|
|
8543
8543
|
if (!submitAttempted || !scrollTargetId) return;
|
|
8544
8544
|
const timer = setTimeout(() => {
|
|
8545
8545
|
const elem = document.getElementById(scrollTargetId);
|
|
@@ -9001,10 +9001,10 @@ var OTPCodeInput = ({
|
|
|
9001
9001
|
id,
|
|
9002
9002
|
required
|
|
9003
9003
|
}) => {
|
|
9004
|
-
const baseId = id != null ? id :
|
|
9005
|
-
const inputRef =
|
|
9006
|
-
const [focused, setFocused] =
|
|
9007
|
-
const digits =
|
|
9004
|
+
const baseId = id != null ? id : React29__namespace.useId();
|
|
9005
|
+
const inputRef = React29__namespace.useRef(null);
|
|
9006
|
+
const [focused, setFocused] = React29__namespace.useState(false);
|
|
9007
|
+
const digits = React29__namespace.useMemo(() => {
|
|
9008
9008
|
const arr = value.split("").slice(0, length);
|
|
9009
9009
|
while (arr.length < length) arr.push("");
|
|
9010
9010
|
return arr;
|
|
@@ -9117,7 +9117,7 @@ function Checkbox(_a) {
|
|
|
9117
9117
|
})
|
|
9118
9118
|
);
|
|
9119
9119
|
}
|
|
9120
|
-
var AccordionVariantContext =
|
|
9120
|
+
var AccordionVariantContext = React29__namespace.createContext("default");
|
|
9121
9121
|
function Accordion(_a) {
|
|
9122
9122
|
var _b = _a, { className, variant = "default" } = _b, props = __objRest(_b, ["className", "variant"]);
|
|
9123
9123
|
return /* @__PURE__ */ jsxRuntime.jsx(AccordionVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9135,7 +9135,7 @@ function Accordion(_a) {
|
|
|
9135
9135
|
}
|
|
9136
9136
|
function AccordionItem(_a) {
|
|
9137
9137
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
9138
|
-
const variant =
|
|
9138
|
+
const variant = React29__namespace.useContext(AccordionVariantContext);
|
|
9139
9139
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9140
9140
|
accordion.Accordion.Item,
|
|
9141
9141
|
__spreadValues({
|
|
@@ -9156,7 +9156,7 @@ function AccordionTrigger(_a) {
|
|
|
9156
9156
|
"className",
|
|
9157
9157
|
"children"
|
|
9158
9158
|
]);
|
|
9159
|
-
const variant =
|
|
9159
|
+
const variant = React29__namespace.useContext(AccordionVariantContext);
|
|
9160
9160
|
return /* @__PURE__ */ jsxRuntime.jsx(accordion.Accordion.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9161
9161
|
accordion.Accordion.Trigger,
|
|
9162
9162
|
__spreadProps(__spreadValues({
|
|
@@ -9210,7 +9210,7 @@ function AccordionContent(_a) {
|
|
|
9210
9210
|
"className",
|
|
9211
9211
|
"children"
|
|
9212
9212
|
]);
|
|
9213
|
-
const variant =
|
|
9213
|
+
const variant = React29__namespace.useContext(AccordionVariantContext);
|
|
9214
9214
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9215
9215
|
accordion.Accordion.Panel,
|
|
9216
9216
|
__spreadProps(__spreadValues({
|
|
@@ -9428,15 +9428,15 @@ function FilterPanel({
|
|
|
9428
9428
|
onSortChange
|
|
9429
9429
|
}) {
|
|
9430
9430
|
var _a, _b;
|
|
9431
|
-
const resolvedGroups =
|
|
9432
|
-
const [internalValue, setInternalValue] =
|
|
9431
|
+
const resolvedGroups = React29__namespace.useMemo(() => resolveGroups(groups), [groups]);
|
|
9432
|
+
const [internalValue, setInternalValue] = React29__namespace.useState(
|
|
9433
9433
|
() => Object.fromEntries(groups.map((g) => [g.id, []]))
|
|
9434
9434
|
);
|
|
9435
9435
|
const selected = value != null ? value : internalValue;
|
|
9436
|
-
const [expandedItems, setExpandedItems] =
|
|
9436
|
+
const [expandedItems, setExpandedItems] = React29__namespace.useState(
|
|
9437
9437
|
() => new Set(groups.flatMap((g) => getDefaultExpandedIds(g.items)))
|
|
9438
9438
|
);
|
|
9439
|
-
const toggleExpanded =
|
|
9439
|
+
const toggleExpanded = React29__namespace.useCallback((id) => {
|
|
9440
9440
|
setExpandedItems((prev) => {
|
|
9441
9441
|
const next = new Set(prev);
|
|
9442
9442
|
if (next.has(id)) next.delete(id);
|
|
@@ -9820,11 +9820,11 @@ function FilterPanel({
|
|
|
9820
9820
|
var TRUSTPILOT_SCRIPT_SRC = "https://widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js";
|
|
9821
9821
|
function TrustpilotEmbed({ config }) {
|
|
9822
9822
|
var _a, _b, _c, _d, _e, _f;
|
|
9823
|
-
const ref =
|
|
9824
|
-
const [widgetReady, setWidgetReady] =
|
|
9825
|
-
const [delayPassed, setDelayPassed] =
|
|
9823
|
+
const ref = React29__namespace.useRef(null);
|
|
9824
|
+
const [widgetReady, setWidgetReady] = React29__namespace.useState(false);
|
|
9825
|
+
const [delayPassed, setDelayPassed] = React29__namespace.useState(false);
|
|
9826
9826
|
const showFallback = delayPassed && !widgetReady;
|
|
9827
|
-
|
|
9827
|
+
React29__namespace.useEffect(() => {
|
|
9828
9828
|
var _a2;
|
|
9829
9829
|
if (typeof document === "undefined" || !ref.current) return;
|
|
9830
9830
|
const node = ref.current;
|
|
@@ -10011,16 +10011,73 @@ function webpVariantUrl(src) {
|
|
|
10011
10011
|
const withoutQuery = query ? src.slice(0, -query.length) : src;
|
|
10012
10012
|
return `${withoutQuery}.webp${query}`;
|
|
10013
10013
|
}
|
|
10014
|
+
var PLACEHOLDER_SRC = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
|
|
10014
10015
|
function Picture(_a) {
|
|
10015
|
-
var _b = _a, {
|
|
10016
|
+
var _b = _a, {
|
|
10017
|
+
src,
|
|
10018
|
+
extraSources,
|
|
10019
|
+
eager = false,
|
|
10020
|
+
rootMargin = "200px",
|
|
10021
|
+
decoding,
|
|
10022
|
+
loading
|
|
10023
|
+
} = _b, imgProps = __objRest(_b, [
|
|
10024
|
+
"src",
|
|
10025
|
+
"extraSources",
|
|
10026
|
+
"eager",
|
|
10027
|
+
"rootMargin",
|
|
10028
|
+
"decoding",
|
|
10029
|
+
"loading"
|
|
10030
|
+
]);
|
|
10031
|
+
const ref = React29__namespace.useRef(null);
|
|
10032
|
+
const [visible, setVisible] = React29__namespace.useState(eager);
|
|
10033
|
+
React29__namespace.useEffect(() => {
|
|
10034
|
+
if (eager || visible) return;
|
|
10035
|
+
const el = ref.current;
|
|
10036
|
+
if (!el || typeof IntersectionObserver === "undefined") {
|
|
10037
|
+
setVisible(true);
|
|
10038
|
+
return;
|
|
10039
|
+
}
|
|
10040
|
+
const io = new IntersectionObserver(
|
|
10041
|
+
(entries) => {
|
|
10042
|
+
if (entries.some((e) => e.isIntersecting)) {
|
|
10043
|
+
setVisible(true);
|
|
10044
|
+
io.disconnect();
|
|
10045
|
+
}
|
|
10046
|
+
},
|
|
10047
|
+
{ rootMargin }
|
|
10048
|
+
);
|
|
10049
|
+
io.observe(el);
|
|
10050
|
+
return () => io.disconnect();
|
|
10051
|
+
}, [eager, visible, rootMargin]);
|
|
10016
10052
|
const webp = webpVariantUrl(src);
|
|
10053
|
+
const realSrc = visible ? src : PLACEHOLDER_SRC;
|
|
10054
|
+
const decodingResolved = decoding != null ? decoding : eager ? void 0 : "async";
|
|
10017
10055
|
if (!webp) {
|
|
10018
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10056
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10057
|
+
"img",
|
|
10058
|
+
__spreadValues({
|
|
10059
|
+
ref,
|
|
10060
|
+
src: realSrc,
|
|
10061
|
+
"data-src": visible ? void 0 : src,
|
|
10062
|
+
decoding: decodingResolved,
|
|
10063
|
+
loading: loading != null ? loading : eager ? void 0 : "lazy"
|
|
10064
|
+
}, imgProps)
|
|
10065
|
+
);
|
|
10019
10066
|
}
|
|
10020
10067
|
return /* @__PURE__ */ jsxRuntime.jsxs("picture", { style: { display: "contents" }, children: [
|
|
10021
|
-
/* @__PURE__ */ jsxRuntime.jsx("source", { srcSet: webp, type: "image/webp" }),
|
|
10068
|
+
visible && /* @__PURE__ */ jsxRuntime.jsx("source", { srcSet: webp, type: "image/webp" }),
|
|
10022
10069
|
extraSources,
|
|
10023
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10070
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10071
|
+
"img",
|
|
10072
|
+
__spreadValues({
|
|
10073
|
+
ref,
|
|
10074
|
+
src: realSrc,
|
|
10075
|
+
"data-src": visible ? void 0 : src,
|
|
10076
|
+
"data-srcset-webp": visible ? void 0 : webp,
|
|
10077
|
+
decoding: decodingResolved,
|
|
10078
|
+
loading: loading != null ? loading : eager ? void 0 : "lazy"
|
|
10079
|
+
}, imgProps)
|
|
10080
|
+
)
|
|
10024
10081
|
] });
|
|
10025
10082
|
}
|
|
10026
10083
|
function ItineraryDayCard({
|
|
@@ -10089,11 +10146,11 @@ function ItineraryModal({
|
|
|
10089
10146
|
onNext
|
|
10090
10147
|
}) {
|
|
10091
10148
|
var _a, _b, _c;
|
|
10092
|
-
const [imgIndex, setImgIndex] =
|
|
10149
|
+
const [imgIndex, setImgIndex] = React29__namespace.useState(0);
|
|
10093
10150
|
const images = stop ? [stop.coverImage, ...(_a = stop.images) != null ? _a : []] : [];
|
|
10094
10151
|
const isFirst = (stop == null ? void 0 : stop.dayNumber) === ((_b = allStops[0]) == null ? void 0 : _b.dayNumber);
|
|
10095
10152
|
const isLast = (stop == null ? void 0 : stop.dayNumber) === ((_c = allStops[allStops.length - 1]) == null ? void 0 : _c.dayNumber);
|
|
10096
|
-
|
|
10153
|
+
React29__namespace.useEffect(() => {
|
|
10097
10154
|
setImgIndex(0);
|
|
10098
10155
|
}, [stop == null ? void 0 : stop.dayNumber]);
|
|
10099
10156
|
if (!stop) return null;
|
|
@@ -10220,8 +10277,8 @@ function ItineraryModal({
|
|
|
10220
10277
|
) });
|
|
10221
10278
|
}
|
|
10222
10279
|
function Itinerary({ title, subtitle, stops, className }) {
|
|
10223
|
-
const [activeIndex, setActiveIndex] =
|
|
10224
|
-
const scrollRef =
|
|
10280
|
+
const [activeIndex, setActiveIndex] = React29__namespace.useState(null);
|
|
10281
|
+
const scrollRef = React29__namespace.useRef(null);
|
|
10225
10282
|
const activeStop = activeIndex !== null ? stops[activeIndex] : null;
|
|
10226
10283
|
const scrollBy = (dir) => {
|
|
10227
10284
|
if (!scrollRef.current) return;
|
|
@@ -10313,18 +10370,18 @@ function Lightbox({
|
|
|
10313
10370
|
onClose
|
|
10314
10371
|
}) {
|
|
10315
10372
|
var _a;
|
|
10316
|
-
const [index, setIndex] =
|
|
10373
|
+
const [index, setIndex] = React29__namespace.useState(initialIndex);
|
|
10317
10374
|
const total = photos.length;
|
|
10318
10375
|
const photo = photos[index];
|
|
10319
|
-
const prev =
|
|
10376
|
+
const prev = React29__namespace.useCallback(
|
|
10320
10377
|
() => setIndex((i) => (i - 1 + total) % total),
|
|
10321
10378
|
[total]
|
|
10322
10379
|
);
|
|
10323
|
-
const next =
|
|
10380
|
+
const next = React29__namespace.useCallback(
|
|
10324
10381
|
() => setIndex((i) => (i + 1) % total),
|
|
10325
10382
|
[total]
|
|
10326
10383
|
);
|
|
10327
|
-
|
|
10384
|
+
React29__namespace.useEffect(() => {
|
|
10328
10385
|
const onKey = (e) => {
|
|
10329
10386
|
if (e.key === "Escape") onClose();
|
|
10330
10387
|
if (e.key === "ArrowLeft") prev();
|
|
@@ -10490,7 +10547,7 @@ function GridGallery({
|
|
|
10490
10547
|
initialVisible,
|
|
10491
10548
|
onOpen
|
|
10492
10549
|
}) {
|
|
10493
|
-
const [expanded, setExpanded] =
|
|
10550
|
+
const [expanded, setExpanded] = React29__namespace.useState(false);
|
|
10494
10551
|
const cols = gridCols(photos.length);
|
|
10495
10552
|
const hasMore = photos.length > initialVisible;
|
|
10496
10553
|
const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
|
|
@@ -10520,7 +10577,7 @@ function CompactGridGallery({
|
|
|
10520
10577
|
initialVisible,
|
|
10521
10578
|
onOpen
|
|
10522
10579
|
}) {
|
|
10523
|
-
const [expanded, setExpanded] =
|
|
10580
|
+
const [expanded, setExpanded] = React29__namespace.useState(false);
|
|
10524
10581
|
const hasMore = photos.length > initialVisible;
|
|
10525
10582
|
const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
|
|
10526
10583
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -10549,7 +10606,7 @@ function MasonryGallery({
|
|
|
10549
10606
|
initialVisible,
|
|
10550
10607
|
onOpen
|
|
10551
10608
|
}) {
|
|
10552
|
-
const [expanded, setExpanded] =
|
|
10609
|
+
const [expanded, setExpanded] = React29__namespace.useState(false);
|
|
10553
10610
|
const hasMore = photos.length > initialVisible;
|
|
10554
10611
|
const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
|
|
10555
10612
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -10622,7 +10679,7 @@ function FeaturedGallery({
|
|
|
10622
10679
|
photos,
|
|
10623
10680
|
onOpen
|
|
10624
10681
|
}) {
|
|
10625
|
-
const [expanded, setExpanded] =
|
|
10682
|
+
const [expanded, setExpanded] = React29__namespace.useState(false);
|
|
10626
10683
|
const featured = photos.slice(0, 3);
|
|
10627
10684
|
const extra = photos.slice(3);
|
|
10628
10685
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -10789,9 +10846,9 @@ function PhotoGallery({
|
|
|
10789
10846
|
onPhotoClick,
|
|
10790
10847
|
className
|
|
10791
10848
|
}) {
|
|
10792
|
-
const [lightboxIndex, setLightboxIndex] =
|
|
10793
|
-
const [carouselIndex, setCarouselIndex] =
|
|
10794
|
-
const normalised =
|
|
10849
|
+
const [lightboxIndex, setLightboxIndex] = React29__namespace.useState(null);
|
|
10850
|
+
const [carouselIndex, setCarouselIndex] = React29__namespace.useState(0);
|
|
10851
|
+
const normalised = React29__namespace.useMemo(() => photos.map(normalise), [photos]);
|
|
10795
10852
|
const handleOpen = (index) => {
|
|
10796
10853
|
setLightboxIndex(index);
|
|
10797
10854
|
onPhotoClick == null ? void 0 : onPhotoClick(normalised[index].src, index);
|
|
@@ -10875,7 +10932,7 @@ function ItineraryDay({
|
|
|
10875
10932
|
photoLayout = "rounded",
|
|
10876
10933
|
className
|
|
10877
10934
|
}) {
|
|
10878
|
-
const photoList =
|
|
10935
|
+
const photoList = React29__namespace.useMemo(() => normalisePhotos(photos), [photos]);
|
|
10879
10936
|
const isFullBleed = photoLayout === "fullBleed" || photoLayout === "fullBleedBottom";
|
|
10880
10937
|
const photoPosition = photoLayout === "fullBleedBottom" ? "bottom" : "top";
|
|
10881
10938
|
const gallery = photoList.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10930,8 +10987,8 @@ function MenuTrip({
|
|
|
10930
10987
|
bold = true,
|
|
10931
10988
|
className
|
|
10932
10989
|
}) {
|
|
10933
|
-
const scrollRef =
|
|
10934
|
-
|
|
10990
|
+
const scrollRef = React29__namespace.useRef(null);
|
|
10991
|
+
React29__namespace.useEffect(() => {
|
|
10935
10992
|
if (!scrollRef.current || !activeSection) return;
|
|
10936
10993
|
const container = scrollRef.current;
|
|
10937
10994
|
const btn = container.querySelector(
|
|
@@ -11127,8 +11184,8 @@ function PricingTrip({
|
|
|
11127
11184
|
className
|
|
11128
11185
|
}) {
|
|
11129
11186
|
const rOuter = sharp ? "rounded-none" : "rounded-2xl";
|
|
11130
|
-
const [showEstimates, setShowEstimates] =
|
|
11131
|
-
const [showPriceInfo, setShowPriceInfo] =
|
|
11187
|
+
const [showEstimates, setShowEstimates] = React29__namespace.useState(false);
|
|
11188
|
+
const [showPriceInfo, setShowPriceInfo] = React29__namespace.useState(false);
|
|
11132
11189
|
if (variant === "compact") {
|
|
11133
11190
|
const showOverlay = showPriceInfo && (!!priceInfo || !!currencyEstimates && currencyEstimates.length > 0);
|
|
11134
11191
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
|
|
@@ -11568,14 +11625,14 @@ function SiteHeader({
|
|
|
11568
11625
|
}) {
|
|
11569
11626
|
const t = VARIANT[variant];
|
|
11570
11627
|
const resolvedLogo = logoSrc != null ? logoSrc : variant === "white" ? logoSrcDark : logoSrcLight;
|
|
11571
|
-
const [openMenu, setOpenMenu] =
|
|
11572
|
-
const [langOpen, setLangOpen] =
|
|
11573
|
-
const [mobileOpen, setMobileOpen] =
|
|
11574
|
-
const [openMobileSection, setOpenMobileSection] =
|
|
11575
|
-
const [activeLang, setActiveLang] =
|
|
11628
|
+
const [openMenu, setOpenMenu] = React29__namespace.useState(null);
|
|
11629
|
+
const [langOpen, setLangOpen] = React29__namespace.useState(false);
|
|
11630
|
+
const [mobileOpen, setMobileOpen] = React29__namespace.useState(false);
|
|
11631
|
+
const [openMobileSection, setOpenMobileSection] = React29__namespace.useState(null);
|
|
11632
|
+
const [activeLang, setActiveLang] = React29__namespace.useState(currentLanguage);
|
|
11576
11633
|
const toggleMobileSection = (label) => setOpenMobileSection((prev) => prev === label ? null : label);
|
|
11577
|
-
const menuCloseTimer =
|
|
11578
|
-
const langCloseTimer =
|
|
11634
|
+
const menuCloseTimer = React29__namespace.useRef(void 0);
|
|
11635
|
+
const langCloseTimer = React29__namespace.useRef(void 0);
|
|
11579
11636
|
const handleMenuEnter = (label) => {
|
|
11580
11637
|
clearTimeout(menuCloseTimer.current);
|
|
11581
11638
|
setOpenMenu(label);
|
|
@@ -11596,7 +11653,7 @@ function SiteHeader({
|
|
|
11596
11653
|
setOpenMenu(null);
|
|
11597
11654
|
setLangOpen(false);
|
|
11598
11655
|
};
|
|
11599
|
-
|
|
11656
|
+
React29__namespace.useEffect(() => () => {
|
|
11600
11657
|
clearTimeout(menuCloseTimer.current);
|
|
11601
11658
|
clearTimeout(langCloseTimer.current);
|
|
11602
11659
|
}, []);
|
|
@@ -11872,7 +11929,7 @@ function SiteHeader({
|
|
|
11872
11929
|
), children: [
|
|
11873
11930
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: languages.map((lang, i) => {
|
|
11874
11931
|
const isActive = lang.code === activeLang;
|
|
11875
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11932
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React29__namespace.Fragment, { children: [
|
|
11876
11933
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
|
|
11877
11934
|
"text-xs select-none",
|
|
11878
11935
|
variant === "white" ? "text-border" : "text-white/15"
|
|
@@ -11934,8 +11991,8 @@ function SiteHeader({
|
|
|
11934
11991
|
);
|
|
11935
11992
|
}
|
|
11936
11993
|
function ThemeToggle({ className }) {
|
|
11937
|
-
const [dark, setDark] =
|
|
11938
|
-
|
|
11994
|
+
const [dark, setDark] = React29__namespace.useState(false);
|
|
11995
|
+
React29__namespace.useEffect(() => {
|
|
11939
11996
|
const saved = localStorage.getItem("theme");
|
|
11940
11997
|
const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
11941
11998
|
const isDark = saved === "dark" || !saved && prefersDark;
|
|
@@ -11985,7 +12042,7 @@ var chipVariants = classVarianceAuthority.cva(
|
|
|
11985
12042
|
}
|
|
11986
12043
|
}
|
|
11987
12044
|
);
|
|
11988
|
-
var Chip =
|
|
12045
|
+
var Chip = React29__namespace.forwardRef(function Chip2(_a, ref) {
|
|
11989
12046
|
var _b = _a, { className, variant, size, href, children } = _b, props = __objRest(_b, ["className", "variant", "size", "href", "children"]);
|
|
11990
12047
|
const classes = cn(chipVariants({ variant, size }), className);
|
|
11991
12048
|
if (href) {
|
|
@@ -12085,7 +12142,7 @@ function TripCardEditorial(props) {
|
|
|
12085
12142
|
difficulty,
|
|
12086
12143
|
tag
|
|
12087
12144
|
} = props;
|
|
12088
|
-
const [internalFav, setInternalFav] =
|
|
12145
|
+
const [internalFav, setInternalFav] = React29__namespace.useState(false);
|
|
12089
12146
|
const favorited = favoritedProp != null ? favoritedProp : internalFav;
|
|
12090
12147
|
const handleFav = (e) => {
|
|
12091
12148
|
e.preventDefault();
|
|
@@ -12230,7 +12287,7 @@ function TripCard(props) {
|
|
|
12230
12287
|
);
|
|
12231
12288
|
}
|
|
12232
12289
|
function useHlsVideo(videoRef, src) {
|
|
12233
|
-
|
|
12290
|
+
React29__namespace.useEffect(() => {
|
|
12234
12291
|
if (!src || !videoRef.current) return;
|
|
12235
12292
|
const video = videoRef.current;
|
|
12236
12293
|
if (!src.includes(".m3u8")) return;
|
|
@@ -12274,11 +12331,11 @@ function TripHeader({
|
|
|
12274
12331
|
className
|
|
12275
12332
|
}) {
|
|
12276
12333
|
var _a;
|
|
12277
|
-
const [heroIndex, setHeroIndex] =
|
|
12278
|
-
const [videoReady, setVideoReady] =
|
|
12279
|
-
const videoRef =
|
|
12334
|
+
const [heroIndex, setHeroIndex] = React29__namespace.useState(0);
|
|
12335
|
+
const [videoReady, setVideoReady] = React29__namespace.useState(false);
|
|
12336
|
+
const videoRef = React29__namespace.useRef(null);
|
|
12280
12337
|
const isHls = !!(videoUrl == null ? void 0 : videoUrl.includes(".m3u8"));
|
|
12281
|
-
const validImages =
|
|
12338
|
+
const validImages = React29__namespace.useMemo(
|
|
12282
12339
|
() => images.map((u) => u == null ? void 0 : u.trim()).filter(Boolean),
|
|
12283
12340
|
[images]
|
|
12284
12341
|
);
|
|
@@ -12293,7 +12350,7 @@ function TripHeader({
|
|
|
12293
12350
|
const nights = duration ? (_a = duration.nights) != null ? _a : Math.max(duration.days - 1, 1) : null;
|
|
12294
12351
|
const hasMeta = !!(destination || duration);
|
|
12295
12352
|
useHlsVideo(videoRef, isHls ? videoUrl : void 0);
|
|
12296
|
-
|
|
12353
|
+
React29__namespace.useEffect(() => {
|
|
12297
12354
|
if (!videoUrl) return;
|
|
12298
12355
|
const el = videoRef.current;
|
|
12299
12356
|
if (!el) return;
|
|
@@ -12341,6 +12398,7 @@ function TripHeader({
|
|
|
12341
12398
|
alt: "",
|
|
12342
12399
|
"aria-hidden": true,
|
|
12343
12400
|
fetchPriority: "high",
|
|
12401
|
+
eager: true,
|
|
12344
12402
|
className: cn(
|
|
12345
12403
|
"absolute inset-0 h-full w-full object-cover transition-opacity duration-700",
|
|
12346
12404
|
videoReady ? "opacity-0 pointer-events-none" : "opacity-100"
|
|
@@ -12377,6 +12435,7 @@ function TripHeader({
|
|
|
12377
12435
|
src: currentSrc,
|
|
12378
12436
|
alt: title,
|
|
12379
12437
|
fetchPriority: safeIndex === 0 ? "high" : "auto",
|
|
12438
|
+
eager: safeIndex === 0,
|
|
12380
12439
|
className: "absolute inset-0 h-full w-full object-cover transition-opacity duration-700"
|
|
12381
12440
|
}
|
|
12382
12441
|
) : null,
|
|
@@ -12434,7 +12493,7 @@ function TripHeader({
|
|
|
12434
12493
|
chips && chips.length > 0 ? siteHeader ? "-mt-[200px] sm:-mt-[214px]" : "-mt-[168px] sm:-mt-[182px]" : siteHeader ? "-mt-44" : "-mt-36"
|
|
12435
12494
|
),
|
|
12436
12495
|
children: [
|
|
12437
|
-
breadcrumb && breadcrumb.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-3 flex items-center gap-1.5 flex-wrap", children: breadcrumb.map((crumb, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12496
|
+
breadcrumb && breadcrumb.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-3 flex items-center gap-1.5 flex-wrap", children: breadcrumb.map((crumb, i) => /* @__PURE__ */ jsxRuntime.jsxs(React29__namespace.Fragment, { children: [
|
|
12438
12497
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "h-3 w-3 text-white/50 shrink-0" }),
|
|
12439
12498
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-white/70 font-ui hover:text-white/90 cursor-default", children: crumb.label })
|
|
12440
12499
|
] }, i)) }),
|
|
@@ -12600,10 +12659,10 @@ function LanguagePicker({
|
|
|
12600
12659
|
}) {
|
|
12601
12660
|
var _a;
|
|
12602
12661
|
const t = VARIANT2[variant];
|
|
12603
|
-
const [open, setOpen] =
|
|
12604
|
-
const ref =
|
|
12662
|
+
const [open, setOpen] = React29__namespace.useState(false);
|
|
12663
|
+
const ref = React29__namespace.useRef(null);
|
|
12605
12664
|
const active = (_a = languages.find((l) => l.code === currentLanguage)) != null ? _a : languages[0];
|
|
12606
|
-
|
|
12665
|
+
React29__namespace.useEffect(() => {
|
|
12607
12666
|
if (!open) return;
|
|
12608
12667
|
const onDocClick = (e) => {
|
|
12609
12668
|
if (ref.current && !ref.current.contains(e.target)) {
|
|
@@ -12804,7 +12863,7 @@ function SiteFooter({
|
|
|
12804
12863
|
children: wrapper
|
|
12805
12864
|
},
|
|
12806
12865
|
b.alt + i
|
|
12807
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
12866
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(React29__namespace.Fragment, { children: wrapper }, b.alt + i);
|
|
12808
12867
|
}) })
|
|
12809
12868
|
] }),
|
|
12810
12869
|
themes.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:col-span-3", children: [
|
|
@@ -12979,10 +13038,10 @@ function TripPage({
|
|
|
12979
13038
|
className
|
|
12980
13039
|
}) {
|
|
12981
13040
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
12982
|
-
const [activeSection, setActiveSection] =
|
|
12983
|
-
const [accordionValue, setAccordionValue] =
|
|
12984
|
-
const [faqsExpanded, setFaqsExpanded] =
|
|
12985
|
-
const accordionSectionIds =
|
|
13041
|
+
const [activeSection, setActiveSection] = React29__namespace.useState("");
|
|
13042
|
+
const [accordionValue, setAccordionValue] = React29__namespace.useState([]);
|
|
13043
|
+
const [faqsExpanded, setFaqsExpanded] = React29__namespace.useState(false);
|
|
13044
|
+
const accordionSectionIds = React29__namespace.useMemo(
|
|
12986
13045
|
() => /* @__PURE__ */ new Set([
|
|
12987
13046
|
"when-it-operates",
|
|
12988
13047
|
"how-to-get-there",
|
|
@@ -12996,18 +13055,18 @@ function TripPage({
|
|
|
12996
13055
|
]),
|
|
12997
13056
|
[]
|
|
12998
13057
|
);
|
|
12999
|
-
const [navFloating, setNavFloating] =
|
|
13000
|
-
const [navHidden, setNavHidden] =
|
|
13001
|
-
const [isFloating, setIsFloating] =
|
|
13002
|
-
const [sidebarPos, setSidebarPos] =
|
|
13003
|
-
const [pricingBarVisible, setPricingBarVisible] =
|
|
13004
|
-
const navRef =
|
|
13005
|
-
const navSentinelRef =
|
|
13006
|
-
const sentinelRef =
|
|
13007
|
-
const sidebarPlaceholderRef =
|
|
13008
|
-
const pricingBarRef =
|
|
13009
|
-
const galleryRef =
|
|
13010
|
-
const sections =
|
|
13058
|
+
const [navFloating, setNavFloating] = React29__namespace.useState(false);
|
|
13059
|
+
const [navHidden, setNavHidden] = React29__namespace.useState(false);
|
|
13060
|
+
const [isFloating, setIsFloating] = React29__namespace.useState(false);
|
|
13061
|
+
const [sidebarPos, setSidebarPos] = React29__namespace.useState(null);
|
|
13062
|
+
const [pricingBarVisible, setPricingBarVisible] = React29__namespace.useState(false);
|
|
13063
|
+
const navRef = React29__namespace.useRef(null);
|
|
13064
|
+
const navSentinelRef = React29__namespace.useRef(null);
|
|
13065
|
+
const sentinelRef = React29__namespace.useRef(null);
|
|
13066
|
+
const sidebarPlaceholderRef = React29__namespace.useRef(null);
|
|
13067
|
+
const pricingBarRef = React29__namespace.useRef(null);
|
|
13068
|
+
const galleryRef = React29__namespace.useRef(null);
|
|
13069
|
+
const sections = React29__namespace.useMemo(
|
|
13011
13070
|
() => {
|
|
13012
13071
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
13013
13072
|
return [
|
|
@@ -13029,7 +13088,7 @@ function TripPage({
|
|
|
13029
13088
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
13030
13089
|
[]
|
|
13031
13090
|
);
|
|
13032
|
-
|
|
13091
|
+
React29__namespace.useEffect(() => {
|
|
13033
13092
|
const sentinel = navSentinelRef.current;
|
|
13034
13093
|
if (!sentinel) return;
|
|
13035
13094
|
const update = () => setNavFloating(sentinel.getBoundingClientRect().top < 1);
|
|
@@ -13037,7 +13096,7 @@ function TripPage({
|
|
|
13037
13096
|
update();
|
|
13038
13097
|
return () => document.removeEventListener("scroll", update, { capture: true });
|
|
13039
13098
|
}, []);
|
|
13040
|
-
|
|
13099
|
+
React29__namespace.useEffect(() => {
|
|
13041
13100
|
const sentinel = sentinelRef.current;
|
|
13042
13101
|
if (!sentinel) return;
|
|
13043
13102
|
const update = () => setIsFloating(sentinel.getBoundingClientRect().top < 1);
|
|
@@ -13045,7 +13104,7 @@ function TripPage({
|
|
|
13045
13104
|
update();
|
|
13046
13105
|
return () => document.removeEventListener("scroll", update, { capture: true });
|
|
13047
13106
|
}, []);
|
|
13048
|
-
|
|
13107
|
+
React29__namespace.useEffect(() => {
|
|
13049
13108
|
const measure = () => {
|
|
13050
13109
|
if (!sidebarPlaceholderRef.current) return;
|
|
13051
13110
|
const rect = sidebarPlaceholderRef.current.getBoundingClientRect();
|
|
@@ -13055,7 +13114,7 @@ function TripPage({
|
|
|
13055
13114
|
window.addEventListener("resize", measure);
|
|
13056
13115
|
return () => window.removeEventListener("resize", measure);
|
|
13057
13116
|
}, [isFloating]);
|
|
13058
|
-
|
|
13117
|
+
React29__namespace.useEffect(() => {
|
|
13059
13118
|
const check = () => {
|
|
13060
13119
|
var _a2;
|
|
13061
13120
|
const target = (_a2 = galleryRef.current) != null ? _a2 : pricingBarRef.current;
|
|
@@ -13066,7 +13125,7 @@ function TripPage({
|
|
|
13066
13125
|
check();
|
|
13067
13126
|
return () => document.removeEventListener("scroll", check, { capture: true });
|
|
13068
13127
|
}, []);
|
|
13069
|
-
|
|
13128
|
+
React29__namespace.useEffect(() => {
|
|
13070
13129
|
const check = () => {
|
|
13071
13130
|
if (!pricingBarRef.current) return;
|
|
13072
13131
|
setNavHidden(pricingBarRef.current.getBoundingClientRect().top < window.innerHeight * 0.92);
|
|
@@ -13075,7 +13134,7 @@ function TripPage({
|
|
|
13075
13134
|
check();
|
|
13076
13135
|
return () => document.removeEventListener("scroll", check, { capture: true });
|
|
13077
13136
|
}, []);
|
|
13078
|
-
|
|
13137
|
+
React29__namespace.useEffect(() => {
|
|
13079
13138
|
if (sections.length === 0) return;
|
|
13080
13139
|
setActiveSection(sections[0].id);
|
|
13081
13140
|
const update = () => {
|
|
@@ -13713,13 +13772,13 @@ function CategoryPage2({
|
|
|
13713
13772
|
className
|
|
13714
13773
|
}) {
|
|
13715
13774
|
var _a;
|
|
13716
|
-
const [faqsExpanded, setFaqsExpanded] =
|
|
13717
|
-
const [tripsExpanded, setTripsExpanded] =
|
|
13718
|
-
const [filterValue, setFilterValue] =
|
|
13719
|
-
const [sort, setSort] =
|
|
13775
|
+
const [faqsExpanded, setFaqsExpanded] = React29__namespace.useState(false);
|
|
13776
|
+
const [tripsExpanded, setTripsExpanded] = React29__namespace.useState(false);
|
|
13777
|
+
const [filterValue, setFilterValue] = React29__namespace.useState({});
|
|
13778
|
+
const [sort, setSort] = React29__namespace.useState(
|
|
13720
13779
|
defaultSort != null ? defaultSort : (_a = sortOptions == null ? void 0 : sortOptions[0]) == null ? void 0 : _a.id
|
|
13721
13780
|
);
|
|
13722
|
-
const sortedTrips =
|
|
13781
|
+
const sortedTrips = React29__namespace.useMemo(
|
|
13723
13782
|
() => [...trips].sort((a, b) => {
|
|
13724
13783
|
const af = a.featured ? 1 : 0;
|
|
13725
13784
|
const bf = b.featured ? 1 : 0;
|
|
@@ -13759,7 +13818,7 @@ function CategoryPage2({
|
|
|
13759
13818
|
}
|
|
13760
13819
|
),
|
|
13761
13820
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative mx-auto w-full max-w-6xl px-6 sm:px-8", children: [
|
|
13762
|
-
breadcrumb && breadcrumb.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-3 flex items-center gap-1.5 flex-wrap", children: breadcrumb.map((crumb, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
13821
|
+
breadcrumb && breadcrumb.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-3 flex items-center gap-1.5 flex-wrap", children: breadcrumb.map((crumb, i) => /* @__PURE__ */ jsxRuntime.jsxs(React29__namespace.Fragment, { children: [
|
|
13763
13822
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "h-3 w-3 text-white/50 shrink-0" }),
|
|
13764
13823
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-white/70 font-ui", children: crumb.label })
|
|
13765
13824
|
] }, i)) }),
|
|
@@ -14029,12 +14088,12 @@ function Toast({
|
|
|
14029
14088
|
duration = 6e3,
|
|
14030
14089
|
className
|
|
14031
14090
|
}) {
|
|
14032
|
-
const [mounted, setMounted] =
|
|
14033
|
-
const [visible, setVisible] =
|
|
14034
|
-
|
|
14091
|
+
const [mounted, setMounted] = React29__namespace.useState(false);
|
|
14092
|
+
const [visible, setVisible] = React29__namespace.useState(true);
|
|
14093
|
+
React29__namespace.useEffect(() => {
|
|
14035
14094
|
setMounted(true);
|
|
14036
14095
|
}, []);
|
|
14037
|
-
|
|
14096
|
+
React29__namespace.useEffect(() => {
|
|
14038
14097
|
if (duration === 0) return;
|
|
14039
14098
|
const t = setTimeout(() => {
|
|
14040
14099
|
setVisible(false);
|
|
@@ -14441,21 +14500,21 @@ function LeadCapturePopup({
|
|
|
14441
14500
|
}) {
|
|
14442
14501
|
var _a;
|
|
14443
14502
|
const config = __spreadValues(__spreadValues({}, DEFAULTS), _config);
|
|
14444
|
-
const [open, setOpen] =
|
|
14445
|
-
const [closing, setClosing] =
|
|
14446
|
-
const [submitted, setSubmitted] =
|
|
14447
|
-
const [submitting, setSubmitting] =
|
|
14448
|
-
const [error, setError] =
|
|
14449
|
-
const [name, setName] =
|
|
14450
|
-
const [email, setEmail] =
|
|
14451
|
-
const [travelDate, setTravelDate] =
|
|
14452
|
-
const panelRef =
|
|
14453
|
-
const nameRef =
|
|
14454
|
-
const show =
|
|
14503
|
+
const [open, setOpen] = React29.useState(false);
|
|
14504
|
+
const [closing, setClosing] = React29.useState(false);
|
|
14505
|
+
const [submitted, setSubmitted] = React29.useState(false);
|
|
14506
|
+
const [submitting, setSubmitting] = React29.useState(false);
|
|
14507
|
+
const [error, setError] = React29.useState(null);
|
|
14508
|
+
const [name, setName] = React29.useState("");
|
|
14509
|
+
const [email, setEmail] = React29.useState("");
|
|
14510
|
+
const [travelDate, setTravelDate] = React29.useState("");
|
|
14511
|
+
const panelRef = React29.useRef(null);
|
|
14512
|
+
const nameRef = React29.useRef(null);
|
|
14513
|
+
const show = React29.useCallback(() => {
|
|
14455
14514
|
if (isDismissed()) return;
|
|
14456
14515
|
setOpen(true);
|
|
14457
14516
|
}, []);
|
|
14458
|
-
|
|
14517
|
+
React29.useEffect(() => {
|
|
14459
14518
|
var _a2;
|
|
14460
14519
|
if (isDismissed()) return;
|
|
14461
14520
|
if (config.trigger === "delay") {
|
|
@@ -14482,7 +14541,7 @@ function LeadCapturePopup({
|
|
|
14482
14541
|
return () => window.removeEventListener("scroll", handler);
|
|
14483
14542
|
}
|
|
14484
14543
|
}, [config.trigger, config.delaySeconds, config.scrollPercent, show]);
|
|
14485
|
-
|
|
14544
|
+
React29.useEffect(() => {
|
|
14486
14545
|
if (open && !submitted) {
|
|
14487
14546
|
requestAnimationFrame(() => {
|
|
14488
14547
|
var _a2;
|
|
@@ -14490,7 +14549,7 @@ function LeadCapturePopup({
|
|
|
14490
14549
|
});
|
|
14491
14550
|
}
|
|
14492
14551
|
}, [open, submitted]);
|
|
14493
|
-
const close =
|
|
14552
|
+
const close = React29.useCallback(() => {
|
|
14494
14553
|
setClosing(true);
|
|
14495
14554
|
setDismissed(config.dismissDays);
|
|
14496
14555
|
setTimeout(() => {
|
|
@@ -14498,7 +14557,7 @@ function LeadCapturePopup({
|
|
|
14498
14557
|
setClosing(false);
|
|
14499
14558
|
}, 250);
|
|
14500
14559
|
}, [config.dismissDays]);
|
|
14501
|
-
|
|
14560
|
+
React29.useEffect(() => {
|
|
14502
14561
|
if (!open) return;
|
|
14503
14562
|
const handler = (e) => {
|
|
14504
14563
|
if (e.key === "Escape") close();
|
|
@@ -14506,7 +14565,7 @@ function LeadCapturePopup({
|
|
|
14506
14565
|
document.addEventListener("keydown", handler);
|
|
14507
14566
|
return () => document.removeEventListener("keydown", handler);
|
|
14508
14567
|
}, [open, close]);
|
|
14509
|
-
const onOverlayClick =
|
|
14568
|
+
const onOverlayClick = React29.useCallback(
|
|
14510
14569
|
(e) => {
|
|
14511
14570
|
if (panelRef.current && !panelRef.current.contains(e.target)) {
|
|
14512
14571
|
close();
|
|
@@ -14744,11 +14803,11 @@ function ExoOrb({
|
|
|
14744
14803
|
trackCursor = true,
|
|
14745
14804
|
className
|
|
14746
14805
|
}) {
|
|
14747
|
-
const uid =
|
|
14806
|
+
const uid = React29.useId().replace(/:/g, "");
|
|
14748
14807
|
const id = (name) => `exo-orb-${uid}-${name}`;
|
|
14749
|
-
const rootRef =
|
|
14750
|
-
const pupilRef =
|
|
14751
|
-
|
|
14808
|
+
const rootRef = React29.useRef(null);
|
|
14809
|
+
const pupilRef = React29.useRef(null);
|
|
14810
|
+
React29.useEffect(() => {
|
|
14752
14811
|
if (!trackCursor) return;
|
|
14753
14812
|
if (typeof window === "undefined") return;
|
|
14754
14813
|
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
|
|
@@ -14944,13 +15003,13 @@ function AskExo({
|
|
|
14944
15003
|
teaserDelayMs = 2500,
|
|
14945
15004
|
teaserDurationMs = 6e3
|
|
14946
15005
|
}) {
|
|
14947
|
-
const [open, setOpen] =
|
|
14948
|
-
const [question, setQuestion] =
|
|
14949
|
-
const [teaserVisible, setTeaserVisible] =
|
|
15006
|
+
const [open, setOpen] = React29.useState(false);
|
|
15007
|
+
const [question, setQuestion] = React29.useState("");
|
|
15008
|
+
const [teaserVisible, setTeaserVisible] = React29.useState(false);
|
|
14950
15009
|
const teaserEnabled = !!teaser && teaser !== "";
|
|
14951
|
-
const inputRef =
|
|
14952
|
-
const textareaRef =
|
|
14953
|
-
|
|
15010
|
+
const inputRef = React29.useRef(null);
|
|
15011
|
+
const textareaRef = React29.useRef(null);
|
|
15012
|
+
React29.useEffect(() => {
|
|
14954
15013
|
if (!open) {
|
|
14955
15014
|
setQuestion("");
|
|
14956
15015
|
return;
|
|
@@ -14962,7 +15021,7 @@ function AskExo({
|
|
|
14962
15021
|
}, 200);
|
|
14963
15022
|
return () => clearTimeout(t);
|
|
14964
15023
|
}, [open, variant]);
|
|
14965
|
-
|
|
15024
|
+
React29.useEffect(() => {
|
|
14966
15025
|
if (!open) return;
|
|
14967
15026
|
const onKey = (e) => {
|
|
14968
15027
|
if (e.key === "Escape") setOpen(false);
|
|
@@ -14970,7 +15029,7 @@ function AskExo({
|
|
|
14970
15029
|
document.addEventListener("keydown", onKey);
|
|
14971
15030
|
return () => document.removeEventListener("keydown", onKey);
|
|
14972
15031
|
}, [open]);
|
|
14973
|
-
|
|
15032
|
+
React29.useEffect(() => {
|
|
14974
15033
|
if (!teaserEnabled || open) return;
|
|
14975
15034
|
if (typeof window === "undefined") return;
|
|
14976
15035
|
const showTimer = setTimeout(() => setTeaserVisible(true), teaserDelayMs);
|
|
@@ -14983,7 +15042,7 @@ function AskExo({
|
|
|
14983
15042
|
clearTimeout(hideTimer);
|
|
14984
15043
|
};
|
|
14985
15044
|
}, [teaserEnabled, teaserDelayMs, teaserDurationMs, open]);
|
|
14986
|
-
|
|
15045
|
+
React29.useEffect(() => {
|
|
14987
15046
|
if (open) setTeaserVisible(false);
|
|
14988
15047
|
}, [open]);
|
|
14989
15048
|
const askExo = (q) => {
|
|
@@ -15536,8 +15595,8 @@ function ShareWidget({
|
|
|
15536
15595
|
title = "Invite friends & lower the price",
|
|
15537
15596
|
className
|
|
15538
15597
|
}) {
|
|
15539
|
-
const [copied, setCopied] =
|
|
15540
|
-
const [showToast, setShowToast] =
|
|
15598
|
+
const [copied, setCopied] = React29__namespace.useState(false);
|
|
15599
|
+
const [showToast, setShowToast] = React29__namespace.useState(false);
|
|
15541
15600
|
const encodedUrl = encodeURIComponent(url);
|
|
15542
15601
|
const encodedMsg = encodeURIComponent(`${message} ${url}`);
|
|
15543
15602
|
const channels = [
|