@planetaexo/design-system 0.62.1 → 0.64.0
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 +532 -212
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +122 -4
- package/dist/index.d.ts +122 -4
- package/dist/index.js +502 -183
- 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 React32 = 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 React32__namespace = /*#__PURE__*/_interopNamespace(React32);
|
|
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 = React32__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 = React32__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 : React32__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 = React31__namespace.forwardRef(
|
|
|
374
374
|
}
|
|
375
375
|
);
|
|
376
376
|
FloatingInput.displayName = "FloatingInput";
|
|
377
|
-
var FloatingSelect =
|
|
377
|
+
var FloatingSelect = React32__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 : React32__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] = React32__namespace.useState(false);
|
|
645
|
+
const containerRef = React32__namespace.useRef(null);
|
|
646
|
+
const listRef = React32__namespace.useRef(null);
|
|
647
647
|
const selected = (_a = PHONE_COUNTRIES.find((c) => c.code === value)) != null ? _a : PHONE_COUNTRIES[0];
|
|
648
|
-
|
|
648
|
+
React32__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
|
+
React32__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 = React32__namespace.useRef(null);
|
|
930
|
+
React32__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] = React32__namespace.useState(false);
|
|
962
|
+
const [text, setText] = React32__namespace.useState(
|
|
963
963
|
value ? dateFns.format(value, "dd/MM/yyyy") : ""
|
|
964
964
|
);
|
|
965
|
-
const containerRef =
|
|
966
|
-
const inputId =
|
|
967
|
-
|
|
965
|
+
const containerRef = React32__namespace.useRef(null);
|
|
966
|
+
const inputId = React32__namespace.useId();
|
|
967
|
+
React32__namespace.useEffect(() => {
|
|
968
968
|
setText(value ? dateFns.format(value, "dd/MM/yyyy") : "");
|
|
969
969
|
}, [value]);
|
|
970
|
-
|
|
970
|
+
React32__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] = React32__namespace.useState("");
|
|
1180
|
+
const [open, setOpen] = React32__namespace.useState(false);
|
|
1181
|
+
const containerRef = React32__namespace.useRef(null);
|
|
1182
|
+
const searchRef = React32__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
|
+
React32__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, _s;
|
|
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] = React32__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] = React32__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;
|
|
@@ -1787,7 +1787,7 @@ function BookingShell({
|
|
|
1787
1787
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card overflow-hidden", children: [
|
|
1788
1788
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-border px-5 py-4 bg-muted/20", children: [
|
|
1789
1789
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-bold text-foreground font-heading mb-2", children: title }),
|
|
1790
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: steps.map((label, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1790
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: steps.map((label, i) => /* @__PURE__ */ jsxRuntime.jsxs(React32__namespace.Fragment, { children: [
|
|
1791
1791
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1792
1792
|
"span",
|
|
1793
1793
|
{
|
|
@@ -1986,7 +1986,7 @@ function TermsSection({
|
|
|
1986
1986
|
termsContent
|
|
1987
1987
|
}) {
|
|
1988
1988
|
var _a;
|
|
1989
|
-
const [modalOpen, setModalOpen] =
|
|
1989
|
+
const [modalOpen, setModalOpen] = React32__namespace.useState(false);
|
|
1990
1990
|
const i18n = (_a = TERMS_I18N[locale]) != null ? _a : TERMS_I18N.en;
|
|
1991
1991
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-border p-4 flex flex-col gap-3", children: [
|
|
1992
1992
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: title }),
|
|
@@ -2124,9 +2124,9 @@ function BookingWizard({
|
|
|
2124
2124
|
}) {
|
|
2125
2125
|
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;
|
|
2126
2126
|
const wizardSteps = WIZARD_STEPS_FN(labels);
|
|
2127
|
-
const [step, setStep] =
|
|
2128
|
-
const [error, setError] =
|
|
2129
|
-
const [responsible, setResponsible] =
|
|
2127
|
+
const [step, setStep] = React32__namespace.useState("responsible");
|
|
2128
|
+
const [error, setError] = React32__namespace.useState(null);
|
|
2129
|
+
const [responsible, setResponsible] = React32__namespace.useState({
|
|
2130
2130
|
firstName: "",
|
|
2131
2131
|
lastName: "",
|
|
2132
2132
|
email: "",
|
|
@@ -2145,7 +2145,7 @@ function BookingWizard({
|
|
|
2145
2145
|
return s + ((_b2 = (_a2 = a.slots) == null ? void 0 : _a2.children) != null ? _b2 : 0);
|
|
2146
2146
|
}, 0);
|
|
2147
2147
|
const totalPax = totalAdults + totalChildren;
|
|
2148
|
-
const [travellers, setTravellers] =
|
|
2148
|
+
const [travellers, setTravellers] = React32__namespace.useState(
|
|
2149
2149
|
Array.from({ length: Math.max(totalPax, 1) }, () => ({
|
|
2150
2150
|
firstName: "",
|
|
2151
2151
|
lastName: "",
|
|
@@ -2153,9 +2153,9 @@ function BookingWizard({
|
|
|
2153
2153
|
email: ""
|
|
2154
2154
|
}))
|
|
2155
2155
|
);
|
|
2156
|
-
const [payAmount, setPayAmount] =
|
|
2157
|
-
const [payMethod, setPayMethod] =
|
|
2158
|
-
const [termsAccepted, setTermsAccepted] =
|
|
2156
|
+
const [payAmount, setPayAmount] = React32__namespace.useState("full");
|
|
2157
|
+
const [payMethod, setPayMethod] = React32__namespace.useState("stripe");
|
|
2158
|
+
const [termsAccepted, setTermsAccepted] = React32__namespace.useState(false);
|
|
2159
2159
|
const setR = (k, v) => setResponsible((p) => __spreadProps(__spreadValues({}, p), { [k]: v }));
|
|
2160
2160
|
const setT = (i, k, v) => setTravellers((prev) => prev.map((t, idx) => idx === i ? __spreadProps(__spreadValues({}, t), { [k]: v }) : t));
|
|
2161
2161
|
const setTDob = (i, v) => setTravellers((prev) => prev.map((t, idx) => idx === i ? __spreadProps(__spreadValues({}, t), { dateOfBirth: v }) : t));
|
|
@@ -2383,7 +2383,7 @@ function Offer({
|
|
|
2383
2383
|
className
|
|
2384
2384
|
}) {
|
|
2385
2385
|
var _a, _b, _c;
|
|
2386
|
-
const [showBooking, setShowBooking] =
|
|
2386
|
+
const [showBooking, setShowBooking] = React32__namespace.useState(false);
|
|
2387
2387
|
const isShowingCheckout = !confirmedState && (!!checkoutSlot || internalDemoCheckout && showBooking);
|
|
2388
2388
|
const handleBook = () => {
|
|
2389
2389
|
if (!checkoutSlot && !externalBookingFlow && internalDemoCheckout) {
|
|
@@ -2750,7 +2750,7 @@ function AdventureSection({
|
|
|
2750
2750
|
labels
|
|
2751
2751
|
}) {
|
|
2752
2752
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s;
|
|
2753
|
-
const [detailsOpen, setDetailsOpen] =
|
|
2753
|
+
const [detailsOpen, setDetailsOpen] = React32__namespace.useState(false);
|
|
2754
2754
|
const handleCopyUrl = (url) => {
|
|
2755
2755
|
if (onCopyFormLink) {
|
|
2756
2756
|
onCopyFormLink(url);
|
|
@@ -3289,8 +3289,8 @@ function AddTravellerDialog({
|
|
|
3289
3289
|
errorMessage
|
|
3290
3290
|
}) {
|
|
3291
3291
|
var _a, _b, _c, _d, _e;
|
|
3292
|
-
const [form, setForm] =
|
|
3293
|
-
|
|
3292
|
+
const [form, setForm] = React32__namespace.useState(() => createInitialAddFormData(config));
|
|
3293
|
+
React32__namespace.useEffect(() => {
|
|
3294
3294
|
if (open) {
|
|
3295
3295
|
setForm(createInitialAddFormData(config));
|
|
3296
3296
|
}
|
|
@@ -3350,7 +3350,7 @@ function EditTravellerDialog({
|
|
|
3350
3350
|
errorMessage
|
|
3351
3351
|
}) {
|
|
3352
3352
|
var _a, _b, _c, _d, _e;
|
|
3353
|
-
const [form, setForm] =
|
|
3353
|
+
const [form, setForm] = React32__namespace.useState(() => ({
|
|
3354
3354
|
firstName: "",
|
|
3355
3355
|
lastName: "",
|
|
3356
3356
|
email: "",
|
|
@@ -3359,7 +3359,7 @@ function EditTravellerDialog({
|
|
|
3359
3359
|
birthDate: "",
|
|
3360
3360
|
personType: "ADULT"
|
|
3361
3361
|
}));
|
|
3362
|
-
|
|
3362
|
+
React32__namespace.useEffect(() => {
|
|
3363
3363
|
var _a2, _b2, _c2, _d2, _e2, _f;
|
|
3364
3364
|
if (open && traveller) {
|
|
3365
3365
|
setForm({
|
|
@@ -3695,48 +3695,48 @@ function BookingDetails({
|
|
|
3695
3695
|
const hasSubmitAddTraveller = !!onSubmitAddTraveller;
|
|
3696
3696
|
const hasSubmitEditTraveller = !!onSubmitEditTraveller;
|
|
3697
3697
|
const hasConfirmRemoveTraveller = !!onConfirmRemoveTraveller;
|
|
3698
|
-
const [addModalState, setAddModalState] =
|
|
3698
|
+
const [addModalState, setAddModalState] = React32__namespace.useState({
|
|
3699
3699
|
open: false,
|
|
3700
3700
|
adventureId: null
|
|
3701
3701
|
});
|
|
3702
|
-
const [editModalState, setEditModalState] =
|
|
3703
|
-
const [deleteModalState, setDeleteModalState] =
|
|
3704
|
-
const [resendInviteDialogState, setResendInviteDialogState] =
|
|
3705
|
-
const handleRequestOpenAddModal =
|
|
3702
|
+
const [editModalState, setEditModalState] = React32__namespace.useState({ open: false, adventureId: null, traveller: null });
|
|
3703
|
+
const [deleteModalState, setDeleteModalState] = React32__namespace.useState({ open: false, adventureId: null, traveller: null });
|
|
3704
|
+
const [resendInviteDialogState, setResendInviteDialogState] = React32__namespace.useState({ open: false, traveller: null });
|
|
3705
|
+
const handleRequestOpenAddModal = React32__namespace.useCallback((adventureId) => {
|
|
3706
3706
|
setAddModalState({ open: true, adventureId });
|
|
3707
3707
|
}, []);
|
|
3708
|
-
const handleRequestOpenEditModal =
|
|
3708
|
+
const handleRequestOpenEditModal = React32__namespace.useCallback(
|
|
3709
3709
|
(adventureId, traveller) => {
|
|
3710
3710
|
setEditModalState({ open: true, adventureId, traveller });
|
|
3711
3711
|
},
|
|
3712
3712
|
[]
|
|
3713
3713
|
);
|
|
3714
|
-
const handleRequestOpenDeleteModal =
|
|
3714
|
+
const handleRequestOpenDeleteModal = React32__namespace.useCallback(
|
|
3715
3715
|
(adventureId, traveller) => {
|
|
3716
3716
|
setDeleteModalState({ open: true, adventureId, traveller });
|
|
3717
3717
|
},
|
|
3718
3718
|
[]
|
|
3719
3719
|
);
|
|
3720
|
-
const handleRequestOpenResendInviteDialog =
|
|
3720
|
+
const handleRequestOpenResendInviteDialog = React32__namespace.useCallback(
|
|
3721
3721
|
(traveller) => {
|
|
3722
3722
|
setResendInviteDialogState({ open: true, traveller });
|
|
3723
3723
|
},
|
|
3724
3724
|
[]
|
|
3725
3725
|
);
|
|
3726
|
-
const closeAddModal =
|
|
3726
|
+
const closeAddModal = React32__namespace.useCallback(() => {
|
|
3727
3727
|
setAddModalState({ open: false, adventureId: null });
|
|
3728
3728
|
}, []);
|
|
3729
|
-
const closeEditModal =
|
|
3729
|
+
const closeEditModal = React32__namespace.useCallback(() => {
|
|
3730
3730
|
setEditModalState({ open: false, adventureId: null, traveller: null });
|
|
3731
3731
|
}, []);
|
|
3732
|
-
const closeDeleteModal =
|
|
3732
|
+
const closeDeleteModal = React32__namespace.useCallback(() => {
|
|
3733
3733
|
setDeleteModalState({ open: false, adventureId: null, traveller: null });
|
|
3734
3734
|
}, []);
|
|
3735
|
-
const closeResendInviteDialog =
|
|
3735
|
+
const closeResendInviteDialog = React32__namespace.useCallback(() => {
|
|
3736
3736
|
setResendInviteDialogState({ open: false, traveller: null });
|
|
3737
3737
|
}, []);
|
|
3738
|
-
const submitInFlightRef =
|
|
3739
|
-
const handleAddSubmit =
|
|
3738
|
+
const submitInFlightRef = React32__namespace.useRef(false);
|
|
3739
|
+
const handleAddSubmit = React32__namespace.useCallback(
|
|
3740
3740
|
async (adventureId, data) => {
|
|
3741
3741
|
if (!onSubmitAddTraveller) return;
|
|
3742
3742
|
if (submitInFlightRef.current) return;
|
|
@@ -3751,7 +3751,7 @@ function BookingDetails({
|
|
|
3751
3751
|
},
|
|
3752
3752
|
[onSubmitAddTraveller, closeAddModal]
|
|
3753
3753
|
);
|
|
3754
|
-
const handleEditSubmit =
|
|
3754
|
+
const handleEditSubmit = React32__namespace.useCallback(
|
|
3755
3755
|
async (adventureId, travellerId, data) => {
|
|
3756
3756
|
if (!onSubmitEditTraveller) return;
|
|
3757
3757
|
if (submitInFlightRef.current) return;
|
|
@@ -3766,7 +3766,7 @@ function BookingDetails({
|
|
|
3766
3766
|
},
|
|
3767
3767
|
[onSubmitEditTraveller, closeEditModal]
|
|
3768
3768
|
);
|
|
3769
|
-
const handleDeleteConfirm =
|
|
3769
|
+
const handleDeleteConfirm = React32__namespace.useCallback(
|
|
3770
3770
|
async (adventureId, travellerId) => {
|
|
3771
3771
|
if (!onConfirmRemoveTraveller) return;
|
|
3772
3772
|
if (submitInFlightRef.current) return;
|
|
@@ -4167,6 +4167,7 @@ function BookingAdventureCard({
|
|
|
4167
4167
|
imageAlt,
|
|
4168
4168
|
location,
|
|
4169
4169
|
destination,
|
|
4170
|
+
partner,
|
|
4170
4171
|
included,
|
|
4171
4172
|
notIncluded,
|
|
4172
4173
|
lineItems,
|
|
@@ -4425,6 +4426,39 @@ function BookingAdventureCard({
|
|
|
4425
4426
|
] }) })
|
|
4426
4427
|
}
|
|
4427
4428
|
),
|
|
4429
|
+
partner && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4430
|
+
"table",
|
|
4431
|
+
{
|
|
4432
|
+
cellPadding: 0,
|
|
4433
|
+
cellSpacing: 0,
|
|
4434
|
+
style: { borderCollapse: "collapse", marginBottom: "10px" },
|
|
4435
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
|
|
4436
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4437
|
+
"td",
|
|
4438
|
+
{
|
|
4439
|
+
style: {
|
|
4440
|
+
verticalAlign: "middle",
|
|
4441
|
+
paddingRight: "6px",
|
|
4442
|
+
width: "16px"
|
|
4443
|
+
},
|
|
4444
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: { display: "inline-block", fontSize: "14px", lineHeight: "1" }, children: "\u{1F91D}" })
|
|
4445
|
+
}
|
|
4446
|
+
),
|
|
4447
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4448
|
+
"td",
|
|
4449
|
+
{
|
|
4450
|
+
style: {
|
|
4451
|
+
verticalAlign: "middle",
|
|
4452
|
+
fontSize: "14px",
|
|
4453
|
+
color: emailTokens.mutedForeground,
|
|
4454
|
+
lineHeight: "1"
|
|
4455
|
+
},
|
|
4456
|
+
children: partner
|
|
4457
|
+
}
|
|
4458
|
+
)
|
|
4459
|
+
] }) })
|
|
4460
|
+
}
|
|
4461
|
+
),
|
|
4428
4462
|
hasTravellers && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { marginTop: "4px" }, children: [
|
|
4429
4463
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4430
4464
|
"hr",
|
|
@@ -5301,6 +5335,7 @@ function BookingPaymentConfirmationEmail({
|
|
|
5301
5335
|
imageAlt: adventure.imageAlt,
|
|
5302
5336
|
location: locationToPass,
|
|
5303
5337
|
destination: destinationToPass,
|
|
5338
|
+
partner: adventure.partnerName,
|
|
5304
5339
|
included: adventure.included,
|
|
5305
5340
|
notIncluded: adventure.notIncluded,
|
|
5306
5341
|
lineItems: lineItemsToPass,
|
|
@@ -5528,7 +5563,7 @@ function BookingCreatedEmail({
|
|
|
5528
5563
|
}, children: i + 1 }) }),
|
|
5529
5564
|
/* @__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 }) })
|
|
5530
5565
|
] }) }) }, i)) }),
|
|
5531
|
-
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(
|
|
5566
|
+
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(React32__namespace.Fragment, { children: [
|
|
5532
5567
|
idx === 0 ? /* @__PURE__ */ jsxRuntime.jsx("strong", { children: line }) : line,
|
|
5533
5568
|
idx < arr.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx("br", {}) : null
|
|
5534
5569
|
] }, idx)) })
|
|
@@ -6464,6 +6499,8 @@ var DEFAULT_LABELS8 = {
|
|
|
6464
6499
|
adventureLabel: "Adventure",
|
|
6465
6500
|
datesLabel: "Dates",
|
|
6466
6501
|
partnerLabel: "Partner",
|
|
6502
|
+
bookingPersonLabel: "Booking person",
|
|
6503
|
+
passportLabel: "Passport",
|
|
6467
6504
|
expectationsHeading: "Travellers Expectations",
|
|
6468
6505
|
expectationsEmptyNote: "No expectations were collected for this adventure.",
|
|
6469
6506
|
expectationsEmptyAnswer: "\u2014",
|
|
@@ -6491,6 +6528,8 @@ function PartnerRegistrationCompleteEmail({
|
|
|
6491
6528
|
bookingNumber,
|
|
6492
6529
|
adventureName,
|
|
6493
6530
|
dateRange,
|
|
6531
|
+
bookingPersonName,
|
|
6532
|
+
bookingPersonPassport,
|
|
6494
6533
|
travellersCount,
|
|
6495
6534
|
expectations,
|
|
6496
6535
|
pdfAttached,
|
|
@@ -6504,7 +6543,9 @@ function PartnerRegistrationCompleteEmail({
|
|
|
6504
6543
|
{ label: l.bookingNumberLabel, value: `#${bookingNumber}`, valueColor: emailTokens.primary },
|
|
6505
6544
|
{ label: l.adventureLabel, value: adventureName },
|
|
6506
6545
|
{ label: l.datesLabel, value: dateRange },
|
|
6507
|
-
{ label: l.partnerLabel, value: partnerName }
|
|
6546
|
+
{ label: l.partnerLabel, value: partnerName },
|
|
6547
|
+
...hasText4(bookingPersonName) ? [{ label: l.bookingPersonLabel, value: bookingPersonName }] : [],
|
|
6548
|
+
...hasText4(bookingPersonPassport) ? [{ label: l.passportLabel, value: bookingPersonPassport }] : []
|
|
6508
6549
|
];
|
|
6509
6550
|
const sectionDivider = /* @__PURE__ */ jsxRuntime.jsx(
|
|
6510
6551
|
"hr",
|
|
@@ -6820,6 +6861,7 @@ var DEFAULT_LABELS10 = {
|
|
|
6820
6861
|
interestSurchargeLabel: "Interest / surcharge",
|
|
6821
6862
|
statusLabel: "Status",
|
|
6822
6863
|
travellersLabel: "Travellers",
|
|
6864
|
+
passportLabel: "Passport",
|
|
6823
6865
|
summaryHeading: "Booking summary",
|
|
6824
6866
|
totalOrderLabel: "Total order",
|
|
6825
6867
|
totalPaidLabel: "Total paid",
|
|
@@ -6838,6 +6880,7 @@ function PaymentReceiptEmail({
|
|
|
6838
6880
|
chargedAmount,
|
|
6839
6881
|
statusLabel,
|
|
6840
6882
|
travellers,
|
|
6883
|
+
passport,
|
|
6841
6884
|
totalOrderAmount,
|
|
6842
6885
|
totalPaidCumulative,
|
|
6843
6886
|
remainingBalance,
|
|
@@ -6858,7 +6901,8 @@ function PaymentReceiptEmail({
|
|
|
6858
6901
|
{ label: l.amountLabel, value: amount },
|
|
6859
6902
|
...interestRow ? [{ label: l.chargedAmountLabel, value: chargedAmount }] : [],
|
|
6860
6903
|
{ label: l.statusLabel, value: statusLabel },
|
|
6861
|
-
...travellersLine.length > 0 ? [{ label: l.travellersLabel, value: travellersLine }] : []
|
|
6904
|
+
...travellersLine.length > 0 ? [{ label: l.travellersLabel, value: travellersLine }] : [],
|
|
6905
|
+
...passport && passport.trim().length > 0 ? [{ label: l.passportLabel, value: passport.trim() }] : []
|
|
6862
6906
|
];
|
|
6863
6907
|
const summaryRows = [
|
|
6864
6908
|
{ label: l.totalOrderLabel, value: totalOrderAmount },
|
|
@@ -7888,11 +7932,11 @@ function DatePickerField({
|
|
|
7888
7932
|
fromDate,
|
|
7889
7933
|
className
|
|
7890
7934
|
}) {
|
|
7891
|
-
const [open, setOpen] =
|
|
7892
|
-
const containerRef =
|
|
7893
|
-
const [calendarWidth, setCalendarWidth] =
|
|
7935
|
+
const [open, setOpen] = React32__namespace.useState(false);
|
|
7936
|
+
const containerRef = React32__namespace.useRef(null);
|
|
7937
|
+
const [calendarWidth, setCalendarWidth] = React32__namespace.useState();
|
|
7894
7938
|
const hasValue = !!value;
|
|
7895
|
-
|
|
7939
|
+
React32__namespace.useEffect(() => {
|
|
7896
7940
|
if (!containerRef.current) return;
|
|
7897
7941
|
const observer = new ResizeObserver(([entry]) => {
|
|
7898
7942
|
setCalendarWidth(entry.contentRect.width);
|
|
@@ -8001,7 +8045,7 @@ function BookingForm({
|
|
|
8001
8045
|
subtitle = "Free enquiry \u2013 no commitment",
|
|
8002
8046
|
className
|
|
8003
8047
|
}) {
|
|
8004
|
-
const [values, setValues] =
|
|
8048
|
+
const [values, setValues] = React32__namespace.useState(__spreadValues(__spreadValues({}, defaultInitial), defaultValues));
|
|
8005
8049
|
const set = (key, value) => setValues((prev) => __spreadProps(__spreadValues({}, prev), { [key]: value }));
|
|
8006
8050
|
const handleSubmit = (e) => {
|
|
8007
8051
|
e.preventDefault();
|
|
@@ -8569,11 +8613,11 @@ function FloatingTextarea({
|
|
|
8569
8613
|
}
|
|
8570
8614
|
function SelectField({ field, value, onChange, error, disabled }) {
|
|
8571
8615
|
var _a, _b, _c;
|
|
8572
|
-
const [open, setOpen] =
|
|
8573
|
-
const containerRef =
|
|
8616
|
+
const [open, setOpen] = React32__namespace.useState(false);
|
|
8617
|
+
const containerRef = React32__namespace.useRef(null);
|
|
8574
8618
|
const options = (_a = field.options) != null ? _a : [];
|
|
8575
8619
|
const selectedOpt = (_b = options.find((o) => o.value === value)) != null ? _b : null;
|
|
8576
|
-
|
|
8620
|
+
React32__namespace.useEffect(() => {
|
|
8577
8621
|
if (!open) return;
|
|
8578
8622
|
const handleOutside = (e) => {
|
|
8579
8623
|
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
@@ -9041,11 +9085,11 @@ function RegistrationForm({
|
|
|
9041
9085
|
readOnly = false
|
|
9042
9086
|
}) {
|
|
9043
9087
|
var _a;
|
|
9044
|
-
const L =
|
|
9088
|
+
const L = React32__namespace.useMemo(
|
|
9045
9089
|
() => __spreadValues(__spreadValues({}, DEFAULT_LABELS12), labels != null ? labels : {}),
|
|
9046
9090
|
[labels]
|
|
9047
9091
|
);
|
|
9048
|
-
const sortedFields =
|
|
9092
|
+
const sortedFields = React32__namespace.useMemo(
|
|
9049
9093
|
() => [...fields].sort((a, b) => {
|
|
9050
9094
|
var _a2, _b;
|
|
9051
9095
|
return ((_a2 = a.order) != null ? _a2 : 0) - ((_b = b.order) != null ? _b : 0);
|
|
@@ -9053,7 +9097,7 @@ function RegistrationForm({
|
|
|
9053
9097
|
[fields]
|
|
9054
9098
|
);
|
|
9055
9099
|
const isControlled = values !== void 0;
|
|
9056
|
-
const [internal, setInternal] =
|
|
9100
|
+
const [internal, setInternal] = React32__namespace.useState(
|
|
9057
9101
|
() => initializeValues(
|
|
9058
9102
|
sortedFields,
|
|
9059
9103
|
defaultValues != null ? defaultValues : {},
|
|
@@ -9061,9 +9105,9 @@ function RegistrationForm({
|
|
|
9061
9105
|
includeTerms
|
|
9062
9106
|
)
|
|
9063
9107
|
);
|
|
9064
|
-
const [submitAttempted, setSubmitAttempted] =
|
|
9065
|
-
const [validationErrors, setValidationErrors] =
|
|
9066
|
-
|
|
9108
|
+
const [submitAttempted, setSubmitAttempted] = React32__namespace.useState(false);
|
|
9109
|
+
const [validationErrors, setValidationErrors] = React32__namespace.useState({});
|
|
9110
|
+
React32__namespace.useEffect(() => {
|
|
9067
9111
|
if (isControlled) return;
|
|
9068
9112
|
setInternal((prev) => {
|
|
9069
9113
|
const next = initializeValues(
|
|
@@ -9120,7 +9164,7 @@ function RegistrationForm({
|
|
|
9120
9164
|
const termsError = submitAttempted && termsEnabled && !termsAccepted;
|
|
9121
9165
|
const firstErrorFieldId = Object.keys(fieldErrors)[0];
|
|
9122
9166
|
const scrollTargetId = firstErrorFieldId ? `rf-${firstErrorFieldId}` : termsError ? "rf-terms" : null;
|
|
9123
|
-
|
|
9167
|
+
React32__namespace.useEffect(() => {
|
|
9124
9168
|
if (!submitAttempted || !scrollTargetId) return;
|
|
9125
9169
|
const timer = setTimeout(() => {
|
|
9126
9170
|
const elem = document.getElementById(scrollTargetId);
|
|
@@ -9573,6 +9617,281 @@ function RegistrationSuccessCard({
|
|
|
9573
9617
|
}
|
|
9574
9618
|
);
|
|
9575
9619
|
}
|
|
9620
|
+
var OTHER = "OTHER";
|
|
9621
|
+
function SectionHeading({ children }) {
|
|
9622
|
+
return /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-lg font-heading font-bold text-foreground mb-3", children });
|
|
9623
|
+
}
|
|
9624
|
+
function FieldError({ children }) {
|
|
9625
|
+
if (!children) return null;
|
|
9626
|
+
return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-destructive font-ui", children });
|
|
9627
|
+
}
|
|
9628
|
+
function CancellationForm({
|
|
9629
|
+
adventures,
|
|
9630
|
+
identity,
|
|
9631
|
+
labels,
|
|
9632
|
+
onSubmit,
|
|
9633
|
+
submitting = false,
|
|
9634
|
+
error,
|
|
9635
|
+
className
|
|
9636
|
+
}) {
|
|
9637
|
+
var _a, _b, _c;
|
|
9638
|
+
const [selectedAdventureIds, setSelectedAdventureIds] = React32__namespace.useState(/* @__PURE__ */ new Set());
|
|
9639
|
+
const [participantsByAdventure, setParticipantsByAdventure] = React32__namespace.useState({});
|
|
9640
|
+
const [reasonCode, setReasonCode] = React32__namespace.useState("");
|
|
9641
|
+
const [reasonOther, setReasonOther] = React32__namespace.useState("");
|
|
9642
|
+
const [refundPreference, setRefundPreference] = React32__namespace.useState("");
|
|
9643
|
+
const [refundOther, setRefundOther] = React32__namespace.useState("");
|
|
9644
|
+
const [agreedToPolicy, setAgreedToPolicy] = React32__namespace.useState(false);
|
|
9645
|
+
const [contactName, setContactName] = React32__namespace.useState((_a = identity == null ? void 0 : identity.name) != null ? _a : "");
|
|
9646
|
+
const [contactEmail, setContactEmail] = React32__namespace.useState((_b = identity == null ? void 0 : identity.email) != null ? _b : "");
|
|
9647
|
+
const [contactPhone, setContactPhone] = React32__namespace.useState((_c = identity == null ? void 0 : identity.phone) != null ? _c : "");
|
|
9648
|
+
const [errors, setErrors] = React32__namespace.useState({});
|
|
9649
|
+
const allParticipantsOf = React32__namespace.useCallback(
|
|
9650
|
+
(advId) => {
|
|
9651
|
+
var _a2, _b2;
|
|
9652
|
+
return new Set(((_b2 = (_a2 = adventures.find((a) => a.id === advId)) == null ? void 0 : _a2.participants) != null ? _b2 : []).map((p) => p.id));
|
|
9653
|
+
},
|
|
9654
|
+
[adventures]
|
|
9655
|
+
);
|
|
9656
|
+
function toggleAdventure(advId, on) {
|
|
9657
|
+
setSelectedAdventureIds((prev) => {
|
|
9658
|
+
const next = new Set(prev);
|
|
9659
|
+
if (on) next.add(advId);
|
|
9660
|
+
else next.delete(advId);
|
|
9661
|
+
return next;
|
|
9662
|
+
});
|
|
9663
|
+
setParticipantsByAdventure((prev) => {
|
|
9664
|
+
const next = __spreadValues({}, prev);
|
|
9665
|
+
if (on) next[advId] = allParticipantsOf(advId);
|
|
9666
|
+
else delete next[advId];
|
|
9667
|
+
return next;
|
|
9668
|
+
});
|
|
9669
|
+
}
|
|
9670
|
+
function toggleParticipant(advId, travellerId, on) {
|
|
9671
|
+
setParticipantsByAdventure((prev) => {
|
|
9672
|
+
var _a2;
|
|
9673
|
+
const set = new Set((_a2 = prev[advId]) != null ? _a2 : []);
|
|
9674
|
+
if (on) set.add(travellerId);
|
|
9675
|
+
else set.delete(travellerId);
|
|
9676
|
+
return __spreadProps(__spreadValues({}, prev), { [advId]: set });
|
|
9677
|
+
});
|
|
9678
|
+
}
|
|
9679
|
+
function selectAll() {
|
|
9680
|
+
const allAdv = new Set(adventures.map((a) => a.id));
|
|
9681
|
+
const byAdv = {};
|
|
9682
|
+
for (const a of adventures) byAdv[a.id] = new Set(a.participants.map((p) => p.id));
|
|
9683
|
+
setSelectedAdventureIds(allAdv);
|
|
9684
|
+
setParticipantsByAdventure(byAdv);
|
|
9685
|
+
}
|
|
9686
|
+
const allSelected = adventures.length > 0 && adventures.every((a) => selectedAdventureIds.has(a.id));
|
|
9687
|
+
function validate() {
|
|
9688
|
+
var _a2;
|
|
9689
|
+
const next = {};
|
|
9690
|
+
const selAdvIds = adventures.filter((a) => selectedAdventureIds.has(a.id)).map((a) => a.id);
|
|
9691
|
+
if (selAdvIds.length === 0) next.adventures = labels.errorSelectAdventure;
|
|
9692
|
+
for (const advId of selAdvIds) {
|
|
9693
|
+
const set = participantsByAdventure[advId];
|
|
9694
|
+
if (!set || set.size === 0) next.participants = labels.errorSelectParticipants;
|
|
9695
|
+
}
|
|
9696
|
+
if (!reasonCode) next.reason = labels.errorReasonRequired;
|
|
9697
|
+
else if (reasonCode === OTHER && !reasonOther.trim()) next.reason = labels.errorReasonOtherRequired;
|
|
9698
|
+
if (!refundPreference) next.refund = labels.errorRefundRequired;
|
|
9699
|
+
else if (refundPreference === OTHER && !refundOther.trim())
|
|
9700
|
+
next.refund = labels.errorRefundOtherRequired;
|
|
9701
|
+
if (!agreedToPolicy) next.agreement = labels.errorAgreementRequired;
|
|
9702
|
+
setErrors(next);
|
|
9703
|
+
if (Object.keys(next).length > 0) return { ok: false };
|
|
9704
|
+
const travellerIds = /* @__PURE__ */ new Set();
|
|
9705
|
+
for (const advId of selAdvIds) {
|
|
9706
|
+
for (const tid of (_a2 = participantsByAdventure[advId]) != null ? _a2 : []) travellerIds.add(tid);
|
|
9707
|
+
}
|
|
9708
|
+
return {
|
|
9709
|
+
ok: true,
|
|
9710
|
+
values: {
|
|
9711
|
+
selectedBookingAdventureIds: selAdvIds,
|
|
9712
|
+
selectedTravellerIds: [...travellerIds],
|
|
9713
|
+
reasonCode,
|
|
9714
|
+
reasonOther: reasonCode === OTHER ? reasonOther.trim() : "",
|
|
9715
|
+
refundPreference,
|
|
9716
|
+
refundOther: refundPreference === OTHER ? refundOther.trim() : "",
|
|
9717
|
+
agreedToPolicy,
|
|
9718
|
+
contact: { name: contactName.trim(), email: contactEmail.trim(), phone: contactPhone.trim() }
|
|
9719
|
+
}
|
|
9720
|
+
};
|
|
9721
|
+
}
|
|
9722
|
+
function handleSubmit(e) {
|
|
9723
|
+
e.preventDefault();
|
|
9724
|
+
const r = validate();
|
|
9725
|
+
if (r.ok && r.values) void onSubmit(r.values);
|
|
9726
|
+
}
|
|
9727
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("form", { onSubmit: handleSubmit, className: cn("space-y-8", className), noValidate: true, children: [
|
|
9728
|
+
/* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
9729
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionHeading, { children: labels.identityHeading }),
|
|
9730
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 sm:grid-cols-3 gap-3", children: [
|
|
9731
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9732
|
+
FloatingInput,
|
|
9733
|
+
{
|
|
9734
|
+
label: labels.contactNameLabel,
|
|
9735
|
+
value: contactName,
|
|
9736
|
+
onChange: (e) => setContactName(e.target.value)
|
|
9737
|
+
}
|
|
9738
|
+
),
|
|
9739
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9740
|
+
FloatingInput,
|
|
9741
|
+
{
|
|
9742
|
+
label: labels.contactEmailLabel,
|
|
9743
|
+
type: "email",
|
|
9744
|
+
value: contactEmail,
|
|
9745
|
+
onChange: (e) => setContactEmail(e.target.value)
|
|
9746
|
+
}
|
|
9747
|
+
),
|
|
9748
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9749
|
+
FloatingInput,
|
|
9750
|
+
{
|
|
9751
|
+
label: labels.contactPhoneLabel,
|
|
9752
|
+
value: contactPhone,
|
|
9753
|
+
onChange: (e) => setContactPhone(e.target.value)
|
|
9754
|
+
}
|
|
9755
|
+
)
|
|
9756
|
+
] })
|
|
9757
|
+
] }),
|
|
9758
|
+
/* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
9759
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-3 mb-3", children: [
|
|
9760
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionHeading, { children: labels.adventuresHeading }),
|
|
9761
|
+
adventures.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", variant: "link", size: "sm", onClick: selectAll, disabled: allSelected, children: labels.selectAllLabel })
|
|
9762
|
+
] }),
|
|
9763
|
+
labels.adventuresHint && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground mb-3", children: labels.adventuresHint }),
|
|
9764
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-3", children: adventures.map((adv) => {
|
|
9765
|
+
var _a2;
|
|
9766
|
+
const selected = selectedAdventureIds.has(adv.id);
|
|
9767
|
+
const partSet = (_a2 = participantsByAdventure[adv.id]) != null ? _a2 : /* @__PURE__ */ new Set();
|
|
9768
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9769
|
+
"div",
|
|
9770
|
+
{
|
|
9771
|
+
className: cn(
|
|
9772
|
+
"rounded-lg border p-4 transition-colors",
|
|
9773
|
+
selected ? "border-primary bg-primary/5" : "border-border bg-card"
|
|
9774
|
+
),
|
|
9775
|
+
children: [
|
|
9776
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-start gap-3 cursor-pointer", children: [
|
|
9777
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9778
|
+
"input",
|
|
9779
|
+
{
|
|
9780
|
+
type: "checkbox",
|
|
9781
|
+
className: "mt-1 h-4 w-4 accent-primary",
|
|
9782
|
+
checked: selected,
|
|
9783
|
+
onChange: (e) => toggleAdventure(adv.id, e.target.checked)
|
|
9784
|
+
}
|
|
9785
|
+
),
|
|
9786
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex-1", children: [
|
|
9787
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "block font-ui font-medium text-foreground", children: adv.name }),
|
|
9788
|
+
adv.dateRange && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block text-sm text-muted-foreground", children: adv.dateRange })
|
|
9789
|
+
] })
|
|
9790
|
+
] }),
|
|
9791
|
+
selected && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4 pl-7 space-y-4", children: [
|
|
9792
|
+
adv.cancellationPolicy && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-md bg-muted/50 border border-border p-3", children: [
|
|
9793
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-ui font-semibold uppercase tracking-wide text-muted-foreground mb-1", children: labels.policyHeading }),
|
|
9794
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground whitespace-pre-line", children: adv.cancellationPolicy })
|
|
9795
|
+
] }),
|
|
9796
|
+
adv.participants.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
9797
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-ui font-semibold uppercase tracking-wide text-muted-foreground mb-2", children: labels.participantsHeading }),
|
|
9798
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-1.5", children: adv.participants.map((p) => /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 cursor-pointer", children: [
|
|
9799
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9800
|
+
"input",
|
|
9801
|
+
{
|
|
9802
|
+
type: "checkbox",
|
|
9803
|
+
className: "h-4 w-4 accent-primary",
|
|
9804
|
+
checked: partSet.has(p.id),
|
|
9805
|
+
onChange: (e) => toggleParticipant(adv.id, p.id, e.target.checked)
|
|
9806
|
+
}
|
|
9807
|
+
),
|
|
9808
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-foreground", children: p.name })
|
|
9809
|
+
] }, p.id)) })
|
|
9810
|
+
] })
|
|
9811
|
+
] })
|
|
9812
|
+
]
|
|
9813
|
+
},
|
|
9814
|
+
adv.id
|
|
9815
|
+
);
|
|
9816
|
+
}) }),
|
|
9817
|
+
/* @__PURE__ */ jsxRuntime.jsx(FieldError, { children: errors.adventures }),
|
|
9818
|
+
/* @__PURE__ */ jsxRuntime.jsx(FieldError, { children: errors.participants })
|
|
9819
|
+
] }),
|
|
9820
|
+
/* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
9821
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionHeading, { children: labels.reasonHeading }),
|
|
9822
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: labels.reasonOptions.map((opt) => /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 cursor-pointer", children: [
|
|
9823
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9824
|
+
"input",
|
|
9825
|
+
{
|
|
9826
|
+
type: "radio",
|
|
9827
|
+
name: "cancellation-reason",
|
|
9828
|
+
className: "h-4 w-4 accent-primary",
|
|
9829
|
+
checked: reasonCode === opt.value,
|
|
9830
|
+
onChange: () => setReasonCode(opt.value)
|
|
9831
|
+
}
|
|
9832
|
+
),
|
|
9833
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-foreground", children: opt.label })
|
|
9834
|
+
] }, opt.value)) }),
|
|
9835
|
+
reasonCode === OTHER && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9836
|
+
"textarea",
|
|
9837
|
+
{
|
|
9838
|
+
className: "mt-3 w-full rounded-lg border border-border bg-background px-3 py-2 text-base text-foreground font-ui focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",
|
|
9839
|
+
rows: 3,
|
|
9840
|
+
placeholder: labels.reasonOtherLabel,
|
|
9841
|
+
value: reasonOther,
|
|
9842
|
+
onChange: (e) => setReasonOther(e.target.value),
|
|
9843
|
+
maxLength: 1e3
|
|
9844
|
+
}
|
|
9845
|
+
),
|
|
9846
|
+
/* @__PURE__ */ jsxRuntime.jsx(FieldError, { children: errors.reason })
|
|
9847
|
+
] }),
|
|
9848
|
+
/* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
9849
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionHeading, { children: labels.refundHeading }),
|
|
9850
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: labels.refundOptions.map((opt) => /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 cursor-pointer", children: [
|
|
9851
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9852
|
+
"input",
|
|
9853
|
+
{
|
|
9854
|
+
type: "radio",
|
|
9855
|
+
name: "cancellation-refund",
|
|
9856
|
+
className: "h-4 w-4 accent-primary",
|
|
9857
|
+
checked: refundPreference === opt.value,
|
|
9858
|
+
onChange: () => setRefundPreference(opt.value)
|
|
9859
|
+
}
|
|
9860
|
+
),
|
|
9861
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-foreground", children: opt.label })
|
|
9862
|
+
] }, opt.value)) }),
|
|
9863
|
+
refundPreference === OTHER && /* @__PURE__ */ jsxRuntime.jsx(
|
|
9864
|
+
"textarea",
|
|
9865
|
+
{
|
|
9866
|
+
className: "mt-3 w-full rounded-lg border border-border bg-background px-3 py-2 text-base text-foreground font-ui focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",
|
|
9867
|
+
rows: 3,
|
|
9868
|
+
placeholder: labels.refundOtherLabel,
|
|
9869
|
+
value: refundOther,
|
|
9870
|
+
onChange: (e) => setRefundOther(e.target.value),
|
|
9871
|
+
maxLength: 1e3
|
|
9872
|
+
}
|
|
9873
|
+
),
|
|
9874
|
+
/* @__PURE__ */ jsxRuntime.jsx(FieldError, { children: errors.refund })
|
|
9875
|
+
] }),
|
|
9876
|
+
/* @__PURE__ */ jsxRuntime.jsxs("section", { children: [
|
|
9877
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-start gap-3 cursor-pointer", children: [
|
|
9878
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9879
|
+
"input",
|
|
9880
|
+
{
|
|
9881
|
+
type: "checkbox",
|
|
9882
|
+
className: "mt-1 h-4 w-4 accent-primary",
|
|
9883
|
+
checked: agreedToPolicy,
|
|
9884
|
+
onChange: (e) => setAgreedToPolicy(e.target.checked)
|
|
9885
|
+
}
|
|
9886
|
+
),
|
|
9887
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-foreground", children: labels.agreementLabel })
|
|
9888
|
+
] }),
|
|
9889
|
+
/* @__PURE__ */ jsxRuntime.jsx(FieldError, { children: errors.agreement })
|
|
9890
|
+
] }),
|
|
9891
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-destructive font-ui", role: "alert", children: error }),
|
|
9892
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { type: "submit", variant: "destructive", size: "lg", disabled: submitting, className: "w-full", children: submitting ? labels.submittingLabel : labels.submitLabel })
|
|
9893
|
+
] });
|
|
9894
|
+
}
|
|
9576
9895
|
var OTPCodeInput = ({
|
|
9577
9896
|
value,
|
|
9578
9897
|
onChange,
|
|
@@ -9584,10 +9903,10 @@ var OTPCodeInput = ({
|
|
|
9584
9903
|
id,
|
|
9585
9904
|
required
|
|
9586
9905
|
}) => {
|
|
9587
|
-
const baseId = id != null ? id :
|
|
9588
|
-
const inputRef =
|
|
9589
|
-
const [focused, setFocused] =
|
|
9590
|
-
const digits =
|
|
9906
|
+
const baseId = id != null ? id : React32__namespace.useId();
|
|
9907
|
+
const inputRef = React32__namespace.useRef(null);
|
|
9908
|
+
const [focused, setFocused] = React32__namespace.useState(false);
|
|
9909
|
+
const digits = React32__namespace.useMemo(() => {
|
|
9591
9910
|
const arr = value.split("").slice(0, length);
|
|
9592
9911
|
while (arr.length < length) arr.push("");
|
|
9593
9912
|
return arr;
|
|
@@ -9700,7 +10019,7 @@ function Checkbox(_a) {
|
|
|
9700
10019
|
})
|
|
9701
10020
|
);
|
|
9702
10021
|
}
|
|
9703
|
-
var AccordionVariantContext =
|
|
10022
|
+
var AccordionVariantContext = React32__namespace.createContext("default");
|
|
9704
10023
|
function Accordion(_a) {
|
|
9705
10024
|
var _b = _a, { className, variant = "default" } = _b, props = __objRest(_b, ["className", "variant"]);
|
|
9706
10025
|
return /* @__PURE__ */ jsxRuntime.jsx(AccordionVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -9718,7 +10037,7 @@ function Accordion(_a) {
|
|
|
9718
10037
|
}
|
|
9719
10038
|
function AccordionItem(_a) {
|
|
9720
10039
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
9721
|
-
const variant =
|
|
10040
|
+
const variant = React32__namespace.useContext(AccordionVariantContext);
|
|
9722
10041
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9723
10042
|
accordion.Accordion.Item,
|
|
9724
10043
|
__spreadValues({
|
|
@@ -9739,7 +10058,7 @@ function AccordionTrigger(_a) {
|
|
|
9739
10058
|
"className",
|
|
9740
10059
|
"children"
|
|
9741
10060
|
]);
|
|
9742
|
-
const variant =
|
|
10061
|
+
const variant = React32__namespace.useContext(AccordionVariantContext);
|
|
9743
10062
|
return /* @__PURE__ */ jsxRuntime.jsx(accordion.Accordion.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9744
10063
|
accordion.Accordion.Trigger,
|
|
9745
10064
|
__spreadProps(__spreadValues({
|
|
@@ -9793,7 +10112,7 @@ function AccordionContent(_a) {
|
|
|
9793
10112
|
"className",
|
|
9794
10113
|
"children"
|
|
9795
10114
|
]);
|
|
9796
|
-
const variant =
|
|
10115
|
+
const variant = React32__namespace.useContext(AccordionVariantContext);
|
|
9797
10116
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9798
10117
|
accordion.Accordion.Panel,
|
|
9799
10118
|
__spreadProps(__spreadValues({
|
|
@@ -10011,15 +10330,15 @@ function FilterPanel({
|
|
|
10011
10330
|
onSortChange
|
|
10012
10331
|
}) {
|
|
10013
10332
|
var _a, _b;
|
|
10014
|
-
const resolvedGroups =
|
|
10015
|
-
const [internalValue, setInternalValue] =
|
|
10333
|
+
const resolvedGroups = React32__namespace.useMemo(() => resolveGroups(groups), [groups]);
|
|
10334
|
+
const [internalValue, setInternalValue] = React32__namespace.useState(
|
|
10016
10335
|
() => Object.fromEntries(groups.map((g) => [g.id, []]))
|
|
10017
10336
|
);
|
|
10018
10337
|
const selected = value != null ? value : internalValue;
|
|
10019
|
-
const [expandedItems, setExpandedItems] =
|
|
10338
|
+
const [expandedItems, setExpandedItems] = React32__namespace.useState(
|
|
10020
10339
|
() => new Set(groups.flatMap((g) => getDefaultExpandedIds(g.items)))
|
|
10021
10340
|
);
|
|
10022
|
-
const toggleExpanded =
|
|
10341
|
+
const toggleExpanded = React32__namespace.useCallback((id) => {
|
|
10023
10342
|
setExpandedItems((prev) => {
|
|
10024
10343
|
const next = new Set(prev);
|
|
10025
10344
|
if (next.has(id)) next.delete(id);
|
|
@@ -10403,11 +10722,11 @@ function FilterPanel({
|
|
|
10403
10722
|
var TRUSTPILOT_SCRIPT_SRC = "https://widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js";
|
|
10404
10723
|
function TrustpilotEmbed({ config }) {
|
|
10405
10724
|
var _a, _b, _c, _d, _e, _f;
|
|
10406
|
-
const ref =
|
|
10407
|
-
const [widgetReady, setWidgetReady] =
|
|
10408
|
-
const [delayPassed, setDelayPassed] =
|
|
10725
|
+
const ref = React32__namespace.useRef(null);
|
|
10726
|
+
const [widgetReady, setWidgetReady] = React32__namespace.useState(false);
|
|
10727
|
+
const [delayPassed, setDelayPassed] = React32__namespace.useState(false);
|
|
10409
10728
|
const showFallback = delayPassed && !widgetReady;
|
|
10410
|
-
|
|
10729
|
+
React32__namespace.useEffect(() => {
|
|
10411
10730
|
var _a2;
|
|
10412
10731
|
if (typeof document === "undefined" || !ref.current) return;
|
|
10413
10732
|
const node = ref.current;
|
|
@@ -10595,7 +10914,7 @@ function webpVariantUrl(src) {
|
|
|
10595
10914
|
return `${withoutQuery}.webp${query}`;
|
|
10596
10915
|
}
|
|
10597
10916
|
function PictureLoader() {
|
|
10598
|
-
const gradientId =
|
|
10917
|
+
const gradientId = React32__namespace.useId();
|
|
10599
10918
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10600
10919
|
"span",
|
|
10601
10920
|
{
|
|
@@ -10665,10 +10984,10 @@ function Picture(_a) {
|
|
|
10665
10984
|
"onError"
|
|
10666
10985
|
]);
|
|
10667
10986
|
var _a2;
|
|
10668
|
-
const ref =
|
|
10669
|
-
const [visible, setVisible] =
|
|
10670
|
-
const [loaded, setLoaded] =
|
|
10671
|
-
|
|
10987
|
+
const ref = React32__namespace.useRef(null);
|
|
10988
|
+
const [visible, setVisible] = React32__namespace.useState(eager);
|
|
10989
|
+
const [loaded, setLoaded] = React32__namespace.useState(false);
|
|
10990
|
+
React32__namespace.useEffect(() => {
|
|
10672
10991
|
if (eager || visible) return;
|
|
10673
10992
|
const el = ref.current;
|
|
10674
10993
|
if (!el || typeof IntersectionObserver === "undefined") {
|
|
@@ -10687,7 +11006,7 @@ function Picture(_a) {
|
|
|
10687
11006
|
io.observe(el);
|
|
10688
11007
|
return () => io.disconnect();
|
|
10689
11008
|
}, [eager, visible, rootMargin]);
|
|
10690
|
-
|
|
11009
|
+
React32__namespace.useEffect(() => {
|
|
10691
11010
|
setLoaded(false);
|
|
10692
11011
|
}, [src]);
|
|
10693
11012
|
const webp = webpVariantUrl(src);
|
|
@@ -10815,11 +11134,11 @@ function ItineraryModal({
|
|
|
10815
11134
|
onNext
|
|
10816
11135
|
}) {
|
|
10817
11136
|
var _a, _b, _c;
|
|
10818
|
-
const [imgIndex, setImgIndex] =
|
|
11137
|
+
const [imgIndex, setImgIndex] = React32__namespace.useState(0);
|
|
10819
11138
|
const images = stop ? [stop.coverImage, ...(_a = stop.images) != null ? _a : []] : [];
|
|
10820
11139
|
const isFirst = (stop == null ? void 0 : stop.dayNumber) === ((_b = allStops[0]) == null ? void 0 : _b.dayNumber);
|
|
10821
11140
|
const isLast = (stop == null ? void 0 : stop.dayNumber) === ((_c = allStops[allStops.length - 1]) == null ? void 0 : _c.dayNumber);
|
|
10822
|
-
|
|
11141
|
+
React32__namespace.useEffect(() => {
|
|
10823
11142
|
setImgIndex(0);
|
|
10824
11143
|
}, [stop == null ? void 0 : stop.dayNumber]);
|
|
10825
11144
|
if (!stop) return null;
|
|
@@ -10946,8 +11265,8 @@ function ItineraryModal({
|
|
|
10946
11265
|
) });
|
|
10947
11266
|
}
|
|
10948
11267
|
function Itinerary({ title, subtitle, stops, className }) {
|
|
10949
|
-
const [activeIndex, setActiveIndex] =
|
|
10950
|
-
const scrollRef =
|
|
11268
|
+
const [activeIndex, setActiveIndex] = React32__namespace.useState(null);
|
|
11269
|
+
const scrollRef = React32__namespace.useRef(null);
|
|
10951
11270
|
const activeStop = activeIndex !== null ? stops[activeIndex] : null;
|
|
10952
11271
|
const scrollBy = (dir) => {
|
|
10953
11272
|
if (!scrollRef.current) return;
|
|
@@ -11039,18 +11358,18 @@ function Lightbox({
|
|
|
11039
11358
|
onClose
|
|
11040
11359
|
}) {
|
|
11041
11360
|
var _a;
|
|
11042
|
-
const [index, setIndex] =
|
|
11361
|
+
const [index, setIndex] = React32__namespace.useState(initialIndex);
|
|
11043
11362
|
const total = photos.length;
|
|
11044
11363
|
const photo = photos[index];
|
|
11045
|
-
const prev =
|
|
11364
|
+
const prev = React32__namespace.useCallback(
|
|
11046
11365
|
() => setIndex((i) => (i - 1 + total) % total),
|
|
11047
11366
|
[total]
|
|
11048
11367
|
);
|
|
11049
|
-
const next =
|
|
11368
|
+
const next = React32__namespace.useCallback(
|
|
11050
11369
|
() => setIndex((i) => (i + 1) % total),
|
|
11051
11370
|
[total]
|
|
11052
11371
|
);
|
|
11053
|
-
|
|
11372
|
+
React32__namespace.useEffect(() => {
|
|
11054
11373
|
const onKey = (e) => {
|
|
11055
11374
|
if (e.key === "Escape") onClose();
|
|
11056
11375
|
if (e.key === "ArrowLeft") prev();
|
|
@@ -11218,7 +11537,7 @@ function GridGallery({
|
|
|
11218
11537
|
initialVisible,
|
|
11219
11538
|
onOpen
|
|
11220
11539
|
}) {
|
|
11221
|
-
const [expanded, setExpanded] =
|
|
11540
|
+
const [expanded, setExpanded] = React32__namespace.useState(false);
|
|
11222
11541
|
const cols = gridCols(photos.length);
|
|
11223
11542
|
const hasMore = photos.length > initialVisible;
|
|
11224
11543
|
const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
|
|
@@ -11248,7 +11567,7 @@ function CompactGridGallery({
|
|
|
11248
11567
|
initialVisible,
|
|
11249
11568
|
onOpen
|
|
11250
11569
|
}) {
|
|
11251
|
-
const [expanded, setExpanded] =
|
|
11570
|
+
const [expanded, setExpanded] = React32__namespace.useState(false);
|
|
11252
11571
|
const hasMore = photos.length > initialVisible;
|
|
11253
11572
|
const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
|
|
11254
11573
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -11277,7 +11596,7 @@ function MasonryGallery({
|
|
|
11277
11596
|
initialVisible,
|
|
11278
11597
|
onOpen
|
|
11279
11598
|
}) {
|
|
11280
|
-
const [expanded, setExpanded] =
|
|
11599
|
+
const [expanded, setExpanded] = React32__namespace.useState(false);
|
|
11281
11600
|
const hasMore = photos.length > initialVisible;
|
|
11282
11601
|
const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
|
|
11283
11602
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -11350,7 +11669,7 @@ function FeaturedGallery({
|
|
|
11350
11669
|
photos,
|
|
11351
11670
|
onOpen
|
|
11352
11671
|
}) {
|
|
11353
|
-
const [expanded, setExpanded] =
|
|
11672
|
+
const [expanded, setExpanded] = React32__namespace.useState(false);
|
|
11354
11673
|
const featured = photos.slice(0, 3);
|
|
11355
11674
|
const extra = photos.slice(3);
|
|
11356
11675
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -11548,9 +11867,9 @@ function PhotoGallery({
|
|
|
11548
11867
|
onPhotoClick,
|
|
11549
11868
|
className
|
|
11550
11869
|
}) {
|
|
11551
|
-
const [lightboxIndex, setLightboxIndex] =
|
|
11552
|
-
const [carouselIndex, setCarouselIndex] =
|
|
11553
|
-
const normalised =
|
|
11870
|
+
const [lightboxIndex, setLightboxIndex] = React32__namespace.useState(null);
|
|
11871
|
+
const [carouselIndex, setCarouselIndex] = React32__namespace.useState(0);
|
|
11872
|
+
const normalised = React32__namespace.useMemo(() => photos.map(normalise), [photos]);
|
|
11554
11873
|
const handleOpen = (index) => {
|
|
11555
11874
|
setLightboxIndex(index);
|
|
11556
11875
|
onPhotoClick == null ? void 0 : onPhotoClick(normalised[index].src, index);
|
|
@@ -11636,7 +11955,7 @@ function ItineraryDay({
|
|
|
11636
11955
|
photoLayout = "rounded",
|
|
11637
11956
|
className
|
|
11638
11957
|
}) {
|
|
11639
|
-
const photoList =
|
|
11958
|
+
const photoList = React32__namespace.useMemo(() => normalisePhotos(photos), [photos]);
|
|
11640
11959
|
const isFullBleed = photoLayout === "fullBleed" || photoLayout === "fullBleedBottom";
|
|
11641
11960
|
const photoPosition = photoLayout === "fullBleedBottom" ? "bottom" : "top";
|
|
11642
11961
|
const gallery = photoList.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -11691,8 +12010,8 @@ function MenuTrip({
|
|
|
11691
12010
|
bold = true,
|
|
11692
12011
|
className
|
|
11693
12012
|
}) {
|
|
11694
|
-
const scrollRef =
|
|
11695
|
-
|
|
12013
|
+
const scrollRef = React32__namespace.useRef(null);
|
|
12014
|
+
React32__namespace.useEffect(() => {
|
|
11696
12015
|
if (!scrollRef.current || !activeSection) return;
|
|
11697
12016
|
const container = scrollRef.current;
|
|
11698
12017
|
const btn = container.querySelector(
|
|
@@ -11888,8 +12207,8 @@ function PricingTrip({
|
|
|
11888
12207
|
className
|
|
11889
12208
|
}) {
|
|
11890
12209
|
const rOuter = sharp ? "rounded-none" : "rounded-2xl";
|
|
11891
|
-
const [showEstimates, setShowEstimates] =
|
|
11892
|
-
const [showPriceInfo, setShowPriceInfo] =
|
|
12210
|
+
const [showEstimates, setShowEstimates] = React32__namespace.useState(false);
|
|
12211
|
+
const [showPriceInfo, setShowPriceInfo] = React32__namespace.useState(false);
|
|
11893
12212
|
if (variant === "compact") {
|
|
11894
12213
|
const showOverlay = showPriceInfo && (!!priceInfo || !!currencyEstimates && currencyEstimates.length > 0);
|
|
11895
12214
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
|
|
@@ -12329,14 +12648,14 @@ function SiteHeader({
|
|
|
12329
12648
|
}) {
|
|
12330
12649
|
const t = VARIANT[variant];
|
|
12331
12650
|
const resolvedLogo = logoSrc != null ? logoSrc : variant === "white" ? logoSrcDark : logoSrcLight;
|
|
12332
|
-
const [openMenu, setOpenMenu] =
|
|
12333
|
-
const [langOpen, setLangOpen] =
|
|
12334
|
-
const [mobileOpen, setMobileOpen] =
|
|
12335
|
-
const [openMobileSection, setOpenMobileSection] =
|
|
12336
|
-
const [activeLang, setActiveLang] =
|
|
12651
|
+
const [openMenu, setOpenMenu] = React32__namespace.useState(null);
|
|
12652
|
+
const [langOpen, setLangOpen] = React32__namespace.useState(false);
|
|
12653
|
+
const [mobileOpen, setMobileOpen] = React32__namespace.useState(false);
|
|
12654
|
+
const [openMobileSection, setOpenMobileSection] = React32__namespace.useState(null);
|
|
12655
|
+
const [activeLang, setActiveLang] = React32__namespace.useState(currentLanguage);
|
|
12337
12656
|
const toggleMobileSection = (label) => setOpenMobileSection((prev) => prev === label ? null : label);
|
|
12338
|
-
const menuCloseTimer =
|
|
12339
|
-
const langCloseTimer =
|
|
12657
|
+
const menuCloseTimer = React32__namespace.useRef(void 0);
|
|
12658
|
+
const langCloseTimer = React32__namespace.useRef(void 0);
|
|
12340
12659
|
const handleMenuEnter = (label) => {
|
|
12341
12660
|
clearTimeout(menuCloseTimer.current);
|
|
12342
12661
|
setOpenMenu(label);
|
|
@@ -12357,7 +12676,7 @@ function SiteHeader({
|
|
|
12357
12676
|
setOpenMenu(null);
|
|
12358
12677
|
setLangOpen(false);
|
|
12359
12678
|
};
|
|
12360
|
-
|
|
12679
|
+
React32__namespace.useEffect(() => () => {
|
|
12361
12680
|
clearTimeout(menuCloseTimer.current);
|
|
12362
12681
|
clearTimeout(langCloseTimer.current);
|
|
12363
12682
|
}, []);
|
|
@@ -12633,7 +12952,7 @@ function SiteHeader({
|
|
|
12633
12952
|
), children: [
|
|
12634
12953
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: languages.map((lang, i) => {
|
|
12635
12954
|
const isActive = lang.code === activeLang;
|
|
12636
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12955
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React32__namespace.Fragment, { children: [
|
|
12637
12956
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
|
|
12638
12957
|
"text-xs select-none",
|
|
12639
12958
|
variant === "white" ? "text-border" : "text-white/15"
|
|
@@ -12695,8 +13014,8 @@ function SiteHeader({
|
|
|
12695
13014
|
);
|
|
12696
13015
|
}
|
|
12697
13016
|
function ThemeToggle({ className }) {
|
|
12698
|
-
const [dark, setDark] =
|
|
12699
|
-
|
|
13017
|
+
const [dark, setDark] = React32__namespace.useState(false);
|
|
13018
|
+
React32__namespace.useEffect(() => {
|
|
12700
13019
|
const saved = localStorage.getItem("theme");
|
|
12701
13020
|
const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
12702
13021
|
const isDark = saved === "dark" || !saved && prefersDark;
|
|
@@ -12746,7 +13065,7 @@ var chipVariants = classVarianceAuthority.cva(
|
|
|
12746
13065
|
}
|
|
12747
13066
|
}
|
|
12748
13067
|
);
|
|
12749
|
-
var Chip =
|
|
13068
|
+
var Chip = React32__namespace.forwardRef(function Chip2(_a, ref) {
|
|
12750
13069
|
var _b = _a, { className, variant, size, href, children } = _b, props = __objRest(_b, ["className", "variant", "size", "href", "children"]);
|
|
12751
13070
|
const classes = cn(chipVariants({ variant, size }), className);
|
|
12752
13071
|
if (href) {
|
|
@@ -12848,7 +13167,7 @@ function TripCardEditorial(props) {
|
|
|
12848
13167
|
tag,
|
|
12849
13168
|
tagHref
|
|
12850
13169
|
} = props;
|
|
12851
|
-
const [internalFav, setInternalFav] =
|
|
13170
|
+
const [internalFav, setInternalFav] = React32__namespace.useState(false);
|
|
12852
13171
|
const favorited = favoritedProp != null ? favoritedProp : internalFav;
|
|
12853
13172
|
const handleFav = (e) => {
|
|
12854
13173
|
e.preventDefault();
|
|
@@ -13359,7 +13678,7 @@ function BlogPost({
|
|
|
13359
13678
|
) }),
|
|
13360
13679
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0 bg-gradient-to-t from-black/90 via-black/45 to-transparent" }),
|
|
13361
13680
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-x-0 bottom-0", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mx-auto w-full max-w-3xl px-6 sm:px-8 pb-9 sm:pb-11", children: [
|
|
13362
|
-
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(
|
|
13681
|
+
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(React32__namespace.Fragment, { children: [
|
|
13363
13682
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "h-3 w-3 text-white/50 shrink-0" }),
|
|
13364
13683
|
crumb.href ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
13365
13684
|
"a",
|
|
@@ -13413,7 +13732,7 @@ function BlogPost({
|
|
|
13413
13732
|
] });
|
|
13414
13733
|
}
|
|
13415
13734
|
function useHlsVideo(videoRef, src) {
|
|
13416
|
-
|
|
13735
|
+
React32__namespace.useEffect(() => {
|
|
13417
13736
|
if (!src || !videoRef.current) return;
|
|
13418
13737
|
const video = videoRef.current;
|
|
13419
13738
|
if (!src.includes(".m3u8")) return;
|
|
@@ -13457,11 +13776,11 @@ function TripHeader({
|
|
|
13457
13776
|
className
|
|
13458
13777
|
}) {
|
|
13459
13778
|
var _a;
|
|
13460
|
-
const [heroIndex, setHeroIndex] =
|
|
13461
|
-
const [videoReady, setVideoReady] =
|
|
13462
|
-
const videoRef =
|
|
13779
|
+
const [heroIndex, setHeroIndex] = React32__namespace.useState(0);
|
|
13780
|
+
const [videoReady, setVideoReady] = React32__namespace.useState(false);
|
|
13781
|
+
const videoRef = React32__namespace.useRef(null);
|
|
13463
13782
|
const isHls = !!(videoUrl == null ? void 0 : videoUrl.includes(".m3u8"));
|
|
13464
|
-
const validImages =
|
|
13783
|
+
const validImages = React32__namespace.useMemo(
|
|
13465
13784
|
() => images.map((u) => u == null ? void 0 : u.trim()).filter(Boolean),
|
|
13466
13785
|
[images]
|
|
13467
13786
|
);
|
|
@@ -13476,7 +13795,7 @@ function TripHeader({
|
|
|
13476
13795
|
const nights = duration ? (_a = duration.nights) != null ? _a : Math.max(duration.days - 1, 1) : null;
|
|
13477
13796
|
const hasMeta = !!(destination || duration);
|
|
13478
13797
|
useHlsVideo(videoRef, isHls ? videoUrl : void 0);
|
|
13479
|
-
|
|
13798
|
+
React32__namespace.useEffect(() => {
|
|
13480
13799
|
if (!videoUrl) return;
|
|
13481
13800
|
const el = videoRef.current;
|
|
13482
13801
|
if (!el) return;
|
|
@@ -13619,7 +13938,7 @@ function TripHeader({
|
|
|
13619
13938
|
chips && chips.length > 0 ? siteHeader ? "-mt-[200px] sm:-mt-[214px]" : "-mt-[168px] sm:-mt-[182px]" : siteHeader ? "-mt-44" : "-mt-36"
|
|
13620
13939
|
),
|
|
13621
13940
|
children: [
|
|
13622
|
-
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(
|
|
13941
|
+
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(React32__namespace.Fragment, { children: [
|
|
13623
13942
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "h-3 w-3 text-white/50 shrink-0" }),
|
|
13624
13943
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-white/70 font-ui hover:text-white/90 cursor-default", children: crumb.label })
|
|
13625
13944
|
] }, i)) }),
|
|
@@ -13785,10 +14104,10 @@ function LanguagePicker({
|
|
|
13785
14104
|
}) {
|
|
13786
14105
|
var _a;
|
|
13787
14106
|
const t = VARIANT2[variant];
|
|
13788
|
-
const [open, setOpen] =
|
|
13789
|
-
const ref =
|
|
14107
|
+
const [open, setOpen] = React32__namespace.useState(false);
|
|
14108
|
+
const ref = React32__namespace.useRef(null);
|
|
13790
14109
|
const active = (_a = languages.find((l) => l.code === currentLanguage)) != null ? _a : languages[0];
|
|
13791
|
-
|
|
14110
|
+
React32__namespace.useEffect(() => {
|
|
13792
14111
|
if (!open) return;
|
|
13793
14112
|
const onDocClick = (e) => {
|
|
13794
14113
|
if (ref.current && !ref.current.contains(e.target)) {
|
|
@@ -13989,7 +14308,7 @@ function SiteFooter({
|
|
|
13989
14308
|
children: wrapper
|
|
13990
14309
|
},
|
|
13991
14310
|
b.alt + i
|
|
13992
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
14311
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(React32__namespace.Fragment, { children: wrapper }, b.alt + i);
|
|
13993
14312
|
}) })
|
|
13994
14313
|
] }),
|
|
13995
14314
|
themes.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:col-span-3", children: [
|
|
@@ -14164,10 +14483,10 @@ function TripPage({
|
|
|
14164
14483
|
className
|
|
14165
14484
|
}) {
|
|
14166
14485
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
|
|
14167
|
-
const [activeSection, setActiveSection] =
|
|
14168
|
-
const [accordionValue, setAccordionValue] =
|
|
14169
|
-
const [faqsExpanded, setFaqsExpanded] =
|
|
14170
|
-
const accordionSectionIds =
|
|
14486
|
+
const [activeSection, setActiveSection] = React32__namespace.useState("");
|
|
14487
|
+
const [accordionValue, setAccordionValue] = React32__namespace.useState([]);
|
|
14488
|
+
const [faqsExpanded, setFaqsExpanded] = React32__namespace.useState(false);
|
|
14489
|
+
const accordionSectionIds = React32__namespace.useMemo(
|
|
14171
14490
|
() => /* @__PURE__ */ new Set([
|
|
14172
14491
|
"when-it-operates",
|
|
14173
14492
|
"how-to-get-there",
|
|
@@ -14181,18 +14500,18 @@ function TripPage({
|
|
|
14181
14500
|
]),
|
|
14182
14501
|
[]
|
|
14183
14502
|
);
|
|
14184
|
-
const [navFloating, setNavFloating] =
|
|
14185
|
-
const [navHidden, setNavHidden] =
|
|
14186
|
-
const [isFloating, setIsFloating] =
|
|
14187
|
-
const [sidebarPos, setSidebarPos] =
|
|
14188
|
-
const [pricingBarVisible, setPricingBarVisible] =
|
|
14189
|
-
const navRef =
|
|
14190
|
-
const navSentinelRef =
|
|
14191
|
-
const sentinelRef =
|
|
14192
|
-
const sidebarPlaceholderRef =
|
|
14193
|
-
const pricingBarRef =
|
|
14194
|
-
const galleryRef =
|
|
14195
|
-
const sections =
|
|
14503
|
+
const [navFloating, setNavFloating] = React32__namespace.useState(false);
|
|
14504
|
+
const [navHidden, setNavHidden] = React32__namespace.useState(false);
|
|
14505
|
+
const [isFloating, setIsFloating] = React32__namespace.useState(false);
|
|
14506
|
+
const [sidebarPos, setSidebarPos] = React32__namespace.useState(null);
|
|
14507
|
+
const [pricingBarVisible, setPricingBarVisible] = React32__namespace.useState(false);
|
|
14508
|
+
const navRef = React32__namespace.useRef(null);
|
|
14509
|
+
const navSentinelRef = React32__namespace.useRef(null);
|
|
14510
|
+
const sentinelRef = React32__namespace.useRef(null);
|
|
14511
|
+
const sidebarPlaceholderRef = React32__namespace.useRef(null);
|
|
14512
|
+
const pricingBarRef = React32__namespace.useRef(null);
|
|
14513
|
+
const galleryRef = React32__namespace.useRef(null);
|
|
14514
|
+
const sections = React32__namespace.useMemo(
|
|
14196
14515
|
() => {
|
|
14197
14516
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
|
|
14198
14517
|
return [
|
|
@@ -14214,7 +14533,7 @@ function TripPage({
|
|
|
14214
14533
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
14215
14534
|
[]
|
|
14216
14535
|
);
|
|
14217
|
-
|
|
14536
|
+
React32__namespace.useEffect(() => {
|
|
14218
14537
|
const sentinel = navSentinelRef.current;
|
|
14219
14538
|
if (!sentinel) return;
|
|
14220
14539
|
const update = () => setNavFloating(sentinel.getBoundingClientRect().top < 1);
|
|
@@ -14222,7 +14541,7 @@ function TripPage({
|
|
|
14222
14541
|
update();
|
|
14223
14542
|
return () => document.removeEventListener("scroll", update, { capture: true });
|
|
14224
14543
|
}, []);
|
|
14225
|
-
|
|
14544
|
+
React32__namespace.useEffect(() => {
|
|
14226
14545
|
const sentinel = sentinelRef.current;
|
|
14227
14546
|
if (!sentinel) return;
|
|
14228
14547
|
const update = () => setIsFloating(sentinel.getBoundingClientRect().top < 1);
|
|
@@ -14230,7 +14549,7 @@ function TripPage({
|
|
|
14230
14549
|
update();
|
|
14231
14550
|
return () => document.removeEventListener("scroll", update, { capture: true });
|
|
14232
14551
|
}, []);
|
|
14233
|
-
|
|
14552
|
+
React32__namespace.useEffect(() => {
|
|
14234
14553
|
const measure = () => {
|
|
14235
14554
|
if (!sidebarPlaceholderRef.current) return;
|
|
14236
14555
|
const rect = sidebarPlaceholderRef.current.getBoundingClientRect();
|
|
@@ -14240,7 +14559,7 @@ function TripPage({
|
|
|
14240
14559
|
window.addEventListener("resize", measure);
|
|
14241
14560
|
return () => window.removeEventListener("resize", measure);
|
|
14242
14561
|
}, [isFloating]);
|
|
14243
|
-
|
|
14562
|
+
React32__namespace.useEffect(() => {
|
|
14244
14563
|
const check = () => {
|
|
14245
14564
|
var _a2;
|
|
14246
14565
|
const target = (_a2 = galleryRef.current) != null ? _a2 : pricingBarRef.current;
|
|
@@ -14251,7 +14570,7 @@ function TripPage({
|
|
|
14251
14570
|
check();
|
|
14252
14571
|
return () => document.removeEventListener("scroll", check, { capture: true });
|
|
14253
14572
|
}, []);
|
|
14254
|
-
|
|
14573
|
+
React32__namespace.useEffect(() => {
|
|
14255
14574
|
const check = () => {
|
|
14256
14575
|
if (!pricingBarRef.current) return;
|
|
14257
14576
|
setNavHidden(pricingBarRef.current.getBoundingClientRect().top < window.innerHeight * 0.92);
|
|
@@ -14260,7 +14579,7 @@ function TripPage({
|
|
|
14260
14579
|
check();
|
|
14261
14580
|
return () => document.removeEventListener("scroll", check, { capture: true });
|
|
14262
14581
|
}, []);
|
|
14263
|
-
|
|
14582
|
+
React32__namespace.useEffect(() => {
|
|
14264
14583
|
if (sections.length === 0) return;
|
|
14265
14584
|
setActiveSection(sections[0].id);
|
|
14266
14585
|
const update = () => {
|
|
@@ -14735,7 +15054,7 @@ function TripPage({
|
|
|
14735
15054
|
}
|
|
14736
15055
|
);
|
|
14737
15056
|
}
|
|
14738
|
-
function
|
|
15057
|
+
function SectionHeading2({
|
|
14739
15058
|
eyebrow,
|
|
14740
15059
|
title,
|
|
14741
15060
|
rightSlot
|
|
@@ -14785,11 +15104,11 @@ function CategoryPage2({
|
|
|
14785
15104
|
className
|
|
14786
15105
|
}) {
|
|
14787
15106
|
var _a;
|
|
14788
|
-
const [videoReady, setVideoReady] =
|
|
14789
|
-
const videoRef =
|
|
15107
|
+
const [videoReady, setVideoReady] = React32__namespace.useState(false);
|
|
15108
|
+
const videoRef = React32__namespace.useRef(null);
|
|
14790
15109
|
const isHls = !!(videoUrl == null ? void 0 : videoUrl.includes(".m3u8"));
|
|
14791
15110
|
useHlsVideo(videoRef, isHls ? videoUrl : void 0);
|
|
14792
|
-
|
|
15111
|
+
React32__namespace.useEffect(() => {
|
|
14793
15112
|
if (!videoUrl) return;
|
|
14794
15113
|
const el = videoRef.current;
|
|
14795
15114
|
if (!el) return;
|
|
@@ -14804,13 +15123,13 @@ function CategoryPage2({
|
|
|
14804
15123
|
io.observe(el);
|
|
14805
15124
|
return () => io.disconnect();
|
|
14806
15125
|
}, [videoUrl]);
|
|
14807
|
-
const [faqsExpanded, setFaqsExpanded] =
|
|
14808
|
-
const [tripsExpanded, setTripsExpanded] =
|
|
14809
|
-
const [filterValue, setFilterValue] =
|
|
14810
|
-
const [sort, setSort] =
|
|
15126
|
+
const [faqsExpanded, setFaqsExpanded] = React32__namespace.useState(false);
|
|
15127
|
+
const [tripsExpanded, setTripsExpanded] = React32__namespace.useState(false);
|
|
15128
|
+
const [filterValue, setFilterValue] = React32__namespace.useState({});
|
|
15129
|
+
const [sort, setSort] = React32__namespace.useState(
|
|
14811
15130
|
defaultSort != null ? defaultSort : (_a = sortOptions == null ? void 0 : sortOptions[0]) == null ? void 0 : _a.id
|
|
14812
15131
|
);
|
|
14813
|
-
const sortedTrips =
|
|
15132
|
+
const sortedTrips = React32__namespace.useMemo(() => {
|
|
14814
15133
|
const active = Object.entries(filterValue).filter(
|
|
14815
15134
|
([, vals]) => vals && vals.length > 0
|
|
14816
15135
|
);
|
|
@@ -14914,7 +15233,7 @@ function CategoryPage2({
|
|
|
14914
15233
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative mx-auto w-full max-w-6xl px-6 sm:px-8", children: [
|
|
14915
15234
|
breadcrumb && breadcrumb.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-3 flex items-center gap-1.5 flex-wrap", children: breadcrumb.map((crumb, i) => {
|
|
14916
15235
|
const isLast = i === breadcrumb.length - 1;
|
|
14917
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15236
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React32__namespace.Fragment, { children: [
|
|
14918
15237
|
i > 0 && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "h-3 w-3 text-white/50 shrink-0" }),
|
|
14919
15238
|
crumb.href && !isLast ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
14920
15239
|
"a",
|
|
@@ -14944,7 +15263,7 @@ function CategoryPage2({
|
|
|
14944
15263
|
),
|
|
14945
15264
|
popularTours && popularTours.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "mx-auto w-full max-w-6xl px-6 sm:px-8 py-12", children: [
|
|
14946
15265
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
14947
|
-
|
|
15266
|
+
SectionHeading2,
|
|
14948
15267
|
{
|
|
14949
15268
|
eyebrow: popularToursEyebrow,
|
|
14950
15269
|
title: popularToursTitle
|
|
@@ -14964,7 +15283,7 @@ function CategoryPage2({
|
|
|
14964
15283
|
}) }) })
|
|
14965
15284
|
] }),
|
|
14966
15285
|
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "mx-auto w-full max-w-6xl px-6 sm:px-8 pt-6 sm:pt-8 pb-12", children: [
|
|
14967
|
-
(tripsTitle || tripsEyebrow) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
15286
|
+
(tripsTitle || tripsEyebrow) && /* @__PURE__ */ jsxRuntime.jsx(SectionHeading2, { eyebrow: tripsEyebrow, title: tripsTitle != null ? tripsTitle : "" }),
|
|
14968
15287
|
filterGroups && filterGroups.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-6", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
14969
15288
|
FilterPanel,
|
|
14970
15289
|
{
|
|
@@ -15202,12 +15521,12 @@ function Toast({
|
|
|
15202
15521
|
duration = 6e3,
|
|
15203
15522
|
className
|
|
15204
15523
|
}) {
|
|
15205
|
-
const [mounted, setMounted] =
|
|
15206
|
-
const [visible, setVisible] =
|
|
15207
|
-
|
|
15524
|
+
const [mounted, setMounted] = React32__namespace.useState(false);
|
|
15525
|
+
const [visible, setVisible] = React32__namespace.useState(true);
|
|
15526
|
+
React32__namespace.useEffect(() => {
|
|
15208
15527
|
setMounted(true);
|
|
15209
15528
|
}, []);
|
|
15210
|
-
|
|
15529
|
+
React32__namespace.useEffect(() => {
|
|
15211
15530
|
if (duration === 0) return;
|
|
15212
15531
|
const t = setTimeout(() => {
|
|
15213
15532
|
setVisible(false);
|
|
@@ -15614,21 +15933,21 @@ function LeadCapturePopup({
|
|
|
15614
15933
|
}) {
|
|
15615
15934
|
var _a;
|
|
15616
15935
|
const config = __spreadValues(__spreadValues({}, DEFAULTS), _config);
|
|
15617
|
-
const [open, setOpen] =
|
|
15618
|
-
const [closing, setClosing] =
|
|
15619
|
-
const [submitted, setSubmitted] =
|
|
15620
|
-
const [submitting, setSubmitting] =
|
|
15621
|
-
const [error, setError] =
|
|
15622
|
-
const [name, setName] =
|
|
15623
|
-
const [email, setEmail] =
|
|
15624
|
-
const [travelDate, setTravelDate] =
|
|
15625
|
-
const panelRef =
|
|
15626
|
-
const nameRef =
|
|
15627
|
-
const show =
|
|
15936
|
+
const [open, setOpen] = React32.useState(false);
|
|
15937
|
+
const [closing, setClosing] = React32.useState(false);
|
|
15938
|
+
const [submitted, setSubmitted] = React32.useState(false);
|
|
15939
|
+
const [submitting, setSubmitting] = React32.useState(false);
|
|
15940
|
+
const [error, setError] = React32.useState(null);
|
|
15941
|
+
const [name, setName] = React32.useState("");
|
|
15942
|
+
const [email, setEmail] = React32.useState("");
|
|
15943
|
+
const [travelDate, setTravelDate] = React32.useState("");
|
|
15944
|
+
const panelRef = React32.useRef(null);
|
|
15945
|
+
const nameRef = React32.useRef(null);
|
|
15946
|
+
const show = React32.useCallback(() => {
|
|
15628
15947
|
if (isDismissed()) return;
|
|
15629
15948
|
setOpen(true);
|
|
15630
15949
|
}, []);
|
|
15631
|
-
|
|
15950
|
+
React32.useEffect(() => {
|
|
15632
15951
|
var _a2;
|
|
15633
15952
|
if (isDismissed()) return;
|
|
15634
15953
|
if (config.trigger === "delay") {
|
|
@@ -15655,7 +15974,7 @@ function LeadCapturePopup({
|
|
|
15655
15974
|
return () => window.removeEventListener("scroll", handler);
|
|
15656
15975
|
}
|
|
15657
15976
|
}, [config.trigger, config.delaySeconds, config.scrollPercent, show]);
|
|
15658
|
-
|
|
15977
|
+
React32.useEffect(() => {
|
|
15659
15978
|
if (open && !submitted) {
|
|
15660
15979
|
requestAnimationFrame(() => {
|
|
15661
15980
|
var _a2;
|
|
@@ -15663,7 +15982,7 @@ function LeadCapturePopup({
|
|
|
15663
15982
|
});
|
|
15664
15983
|
}
|
|
15665
15984
|
}, [open, submitted]);
|
|
15666
|
-
const close =
|
|
15985
|
+
const close = React32.useCallback(() => {
|
|
15667
15986
|
setClosing(true);
|
|
15668
15987
|
setDismissed(config.dismissDays);
|
|
15669
15988
|
setTimeout(() => {
|
|
@@ -15671,7 +15990,7 @@ function LeadCapturePopup({
|
|
|
15671
15990
|
setClosing(false);
|
|
15672
15991
|
}, 250);
|
|
15673
15992
|
}, [config.dismissDays]);
|
|
15674
|
-
|
|
15993
|
+
React32.useEffect(() => {
|
|
15675
15994
|
if (!open) return;
|
|
15676
15995
|
const handler = (e) => {
|
|
15677
15996
|
if (e.key === "Escape") close();
|
|
@@ -15679,7 +15998,7 @@ function LeadCapturePopup({
|
|
|
15679
15998
|
document.addEventListener("keydown", handler);
|
|
15680
15999
|
return () => document.removeEventListener("keydown", handler);
|
|
15681
16000
|
}, [open, close]);
|
|
15682
|
-
const onOverlayClick =
|
|
16001
|
+
const onOverlayClick = React32.useCallback(
|
|
15683
16002
|
(e) => {
|
|
15684
16003
|
if (panelRef.current && !panelRef.current.contains(e.target)) {
|
|
15685
16004
|
close();
|
|
@@ -15917,11 +16236,11 @@ function ExoOrb({
|
|
|
15917
16236
|
trackCursor = true,
|
|
15918
16237
|
className
|
|
15919
16238
|
}) {
|
|
15920
|
-
const uid =
|
|
16239
|
+
const uid = React32.useId().replace(/:/g, "");
|
|
15921
16240
|
const id = (name) => `exo-orb-${uid}-${name}`;
|
|
15922
|
-
const rootRef =
|
|
15923
|
-
const pupilRef =
|
|
15924
|
-
|
|
16241
|
+
const rootRef = React32.useRef(null);
|
|
16242
|
+
const pupilRef = React32.useRef(null);
|
|
16243
|
+
React32.useEffect(() => {
|
|
15925
16244
|
if (!trackCursor) return;
|
|
15926
16245
|
if (typeof window === "undefined") return;
|
|
15927
16246
|
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
|
|
@@ -16117,13 +16436,13 @@ function AskExo({
|
|
|
16117
16436
|
teaserDelayMs = 2500,
|
|
16118
16437
|
teaserDurationMs = 6e3
|
|
16119
16438
|
}) {
|
|
16120
|
-
const [open, setOpen] =
|
|
16121
|
-
const [question, setQuestion] =
|
|
16122
|
-
const [teaserVisible, setTeaserVisible] =
|
|
16439
|
+
const [open, setOpen] = React32.useState(false);
|
|
16440
|
+
const [question, setQuestion] = React32.useState("");
|
|
16441
|
+
const [teaserVisible, setTeaserVisible] = React32.useState(false);
|
|
16123
16442
|
const teaserEnabled = !!teaser && teaser !== "";
|
|
16124
|
-
const inputRef =
|
|
16125
|
-
const textareaRef =
|
|
16126
|
-
|
|
16443
|
+
const inputRef = React32.useRef(null);
|
|
16444
|
+
const textareaRef = React32.useRef(null);
|
|
16445
|
+
React32.useEffect(() => {
|
|
16127
16446
|
if (!open) {
|
|
16128
16447
|
setQuestion("");
|
|
16129
16448
|
return;
|
|
@@ -16135,7 +16454,7 @@ function AskExo({
|
|
|
16135
16454
|
}, 200);
|
|
16136
16455
|
return () => clearTimeout(t);
|
|
16137
16456
|
}, [open, variant]);
|
|
16138
|
-
|
|
16457
|
+
React32.useEffect(() => {
|
|
16139
16458
|
if (!open) return;
|
|
16140
16459
|
const onKey = (e) => {
|
|
16141
16460
|
if (e.key === "Escape") setOpen(false);
|
|
@@ -16143,7 +16462,7 @@ function AskExo({
|
|
|
16143
16462
|
document.addEventListener("keydown", onKey);
|
|
16144
16463
|
return () => document.removeEventListener("keydown", onKey);
|
|
16145
16464
|
}, [open]);
|
|
16146
|
-
|
|
16465
|
+
React32.useEffect(() => {
|
|
16147
16466
|
if (!teaserEnabled || open) return;
|
|
16148
16467
|
if (typeof window === "undefined") return;
|
|
16149
16468
|
const showTimer = setTimeout(() => setTeaserVisible(true), teaserDelayMs);
|
|
@@ -16156,7 +16475,7 @@ function AskExo({
|
|
|
16156
16475
|
clearTimeout(hideTimer);
|
|
16157
16476
|
};
|
|
16158
16477
|
}, [teaserEnabled, teaserDelayMs, teaserDurationMs, open]);
|
|
16159
|
-
|
|
16478
|
+
React32.useEffect(() => {
|
|
16160
16479
|
if (open) setTeaserVisible(false);
|
|
16161
16480
|
}, [open]);
|
|
16162
16481
|
const askExo = (q) => {
|
|
@@ -16709,8 +17028,8 @@ function ShareWidget({
|
|
|
16709
17028
|
title = "Invite friends & lower the price",
|
|
16710
17029
|
className
|
|
16711
17030
|
}) {
|
|
16712
|
-
const [copied, setCopied] =
|
|
16713
|
-
const [showToast, setShowToast] =
|
|
17031
|
+
const [copied, setCopied] = React32__namespace.useState(false);
|
|
17032
|
+
const [showToast, setShowToast] = React32__namespace.useState(false);
|
|
16714
17033
|
const encodedUrl = encodeURIComponent(url);
|
|
16715
17034
|
const encodedMsg = encodeURIComponent(`${message} ${url}`);
|
|
16716
17035
|
const channels = [
|
|
@@ -16879,6 +17198,7 @@ exports.BookingShell = BookingShell;
|
|
|
16879
17198
|
exports.BookingSummary = BookingSummary;
|
|
16880
17199
|
exports.Button = Button;
|
|
16881
17200
|
exports.COUNTRIES = COUNTRIES;
|
|
17201
|
+
exports.CancellationForm = CancellationForm;
|
|
16882
17202
|
exports.CategoryPage2 = CategoryPage2;
|
|
16883
17203
|
exports.CounterField = CounterField;
|
|
16884
17204
|
exports.CountrySearchField = CountrySearchField;
|