@planetaexo/design-system 0.55.0 → 0.57.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.js CHANGED
@@ -1,4 +1,4 @@
1
- import * as React29 from 'react';
1
+ import * as React30 from 'react';
2
2
  import { useState, useRef, useCallback, useEffect, useId } from 'react';
3
3
  import { cva } from 'class-variance-authority';
4
4
  import { clsx } from 'clsx';
@@ -81,7 +81,7 @@ var buttonVariants = cva(
81
81
  }
82
82
  }
83
83
  );
84
- var Button = React29.forwardRef(
84
+ var Button = React30.forwardRef(
85
85
  (_a, ref) => {
86
86
  var _b = _a, { className, variant, size } = _b, props = __objRest(_b, ["className", "variant", "size"]);
87
87
  return /* @__PURE__ */ jsx(
@@ -310,10 +310,10 @@ function DialogDescription(_a) {
310
310
  }, props)
311
311
  );
312
312
  }
313
- var FloatingInput = React29.forwardRef(
313
+ var FloatingInput = React30.forwardRef(
314
314
  (_a, ref) => {
315
315
  var _b = _a, { label, error, id, className, required } = _b, props = __objRest(_b, ["label", "error", "id", "className", "required"]);
316
- const inputId = id != null ? id : React29.useId();
316
+ const inputId = id != null ? id : React30.useId();
317
317
  return /* @__PURE__ */ jsxs("div", { className: cn("relative", className), children: [
318
318
  /* @__PURE__ */ jsx(
319
319
  "input",
@@ -353,10 +353,10 @@ var FloatingInput = React29.forwardRef(
353
353
  }
354
354
  );
355
355
  FloatingInput.displayName = "FloatingInput";
356
- var FloatingSelect = React29.forwardRef(
356
+ var FloatingSelect = React30.forwardRef(
357
357
  (_a, ref) => {
358
358
  var _b = _a, { label, error, id, className, required, children, value } = _b, props = __objRest(_b, ["label", "error", "id", "className", "required", "children", "value"]);
359
- const inputId = id != null ? id : React29.useId();
359
+ const inputId = id != null ? id : React30.useId();
360
360
  const hasValue = typeof value === "string" ? value !== "" : value !== void 0 && value !== null;
361
361
  return /* @__PURE__ */ jsxs("div", { className: cn("relative", className), children: [
362
362
  /* @__PURE__ */ jsx(
@@ -620,11 +620,11 @@ function PhoneCountrySelect({
620
620
  disabled
621
621
  }) {
622
622
  var _a;
623
- const [open, setOpen] = React29.useState(false);
624
- const containerRef = React29.useRef(null);
625
- const listRef = React29.useRef(null);
623
+ const [open, setOpen] = React30.useState(false);
624
+ const containerRef = React30.useRef(null);
625
+ const listRef = React30.useRef(null);
626
626
  const selected = (_a = PHONE_COUNTRIES.find((c) => c.code === value)) != null ? _a : PHONE_COUNTRIES[0];
627
- React29.useEffect(() => {
627
+ React30.useEffect(() => {
628
628
  if (!open) return;
629
629
  const handler = (e) => {
630
630
  var _a2;
@@ -635,7 +635,7 @@ function PhoneCountrySelect({
635
635
  document.addEventListener("mousedown", handler);
636
636
  return () => document.removeEventListener("mousedown", handler);
637
637
  }, [open]);
638
- React29.useEffect(() => {
638
+ React30.useEffect(() => {
639
639
  if (!open || !listRef.current) return;
640
640
  const activeEl = listRef.current.querySelector("[data-selected=true]");
641
641
  activeEl == null ? void 0 : activeEl.scrollIntoView({ block: "nearest" });
@@ -905,8 +905,8 @@ function CalendarDayButton(_a) {
905
905
  "locale"
906
906
  ]);
907
907
  const defaultClassNames = getDefaultClassNames();
908
- const ref = React29.useRef(null);
909
- React29.useEffect(() => {
908
+ const ref = React30.useRef(null);
909
+ React30.useEffect(() => {
910
910
  var _a2;
911
911
  if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
912
912
  }, [modifiers.focused]);
@@ -937,16 +937,16 @@ function BirthDateField({
937
937
  className,
938
938
  disabled
939
939
  }) {
940
- const [open, setOpen] = React29.useState(false);
941
- const [text, setText] = React29.useState(
940
+ const [open, setOpen] = React30.useState(false);
941
+ const [text, setText] = React30.useState(
942
942
  value ? format(value, "dd/MM/yyyy") : ""
943
943
  );
944
- const containerRef = React29.useRef(null);
945
- const inputId = React29.useId();
946
- React29.useEffect(() => {
944
+ const containerRef = React30.useRef(null);
945
+ const inputId = React30.useId();
946
+ React30.useEffect(() => {
947
947
  setText(value ? format(value, "dd/MM/yyyy") : "");
948
948
  }, [value]);
949
- React29.useEffect(() => {
949
+ React30.useEffect(() => {
950
950
  if (!open) return;
951
951
  const handler = (e) => {
952
952
  var _a;
@@ -1155,14 +1155,14 @@ function CountrySearchField({
1155
1155
  }) {
1156
1156
  var _a;
1157
1157
  const list = countries != null ? countries : COUNTRIES;
1158
- const [query, setQuery] = React29.useState("");
1159
- const [open, setOpen] = React29.useState(false);
1160
- const containerRef = React29.useRef(null);
1161
- const searchRef = React29.useRef(null);
1158
+ const [query, setQuery] = React30.useState("");
1159
+ const [open, setOpen] = React30.useState(false);
1160
+ const containerRef = React30.useRef(null);
1161
+ const searchRef = React30.useRef(null);
1162
1162
  const selected = list.find((c) => c.code === value);
1163
1163
  const isFloated = open || !!selected;
1164
1164
  const filtered = query.trim() ? list.filter((c) => c.name.toLowerCase().includes(query.toLowerCase())) : list;
1165
- React29.useEffect(() => {
1165
+ React30.useEffect(() => {
1166
1166
  if (!open) return;
1167
1167
  const handler = (e) => {
1168
1168
  var _a2;
@@ -1307,10 +1307,10 @@ function AdventureCard({
1307
1307
  }) {
1308
1308
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
1309
1309
  const isControlled = (_b = (_a = adventure.optionals) == null ? void 0 : _a.some((o) => o.onCheckedChange !== void 0)) != null ? _b : false;
1310
- const [checkedInternal, setCheckedInternal] = React29.useState(
1310
+ const [checkedInternal, setCheckedInternal] = React30.useState(
1311
1311
  new Set((_d = (_c = adventure.optionals) == null ? void 0 : _c.filter((o) => o.defaultChecked).map((o) => o.id)) != null ? _d : [])
1312
1312
  );
1313
- const [openDescriptionId, setOpenDescriptionId] = React29.useState(null);
1313
+ const [openDescriptionId, setOpenDescriptionId] = React30.useState(null);
1314
1314
  const openDescriptionOptional = openDescriptionId ? (_e = adventure.optionals) == null ? void 0 : _e.find((o) => o.id === openDescriptionId) : void 0;
1315
1315
  const isChecked = (opt) => {
1316
1316
  var _a2;
@@ -1740,7 +1740,7 @@ function BookingShell({
1740
1740
  return /* @__PURE__ */ jsxs("div", { className: "rounded-2xl border border-border bg-card overflow-hidden", children: [
1741
1741
  /* @__PURE__ */ jsxs("div", { className: "border-b border-border px-5 py-4 bg-muted/20", children: [
1742
1742
  /* @__PURE__ */ jsx("h3", { className: "text-base font-bold text-foreground font-heading mb-2", children: title }),
1743
- /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: steps.map((label, i) => /* @__PURE__ */ jsxs(React29.Fragment, { children: [
1743
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: steps.map((label, i) => /* @__PURE__ */ jsxs(React30.Fragment, { children: [
1744
1744
  /* @__PURE__ */ jsx(
1745
1745
  "span",
1746
1746
  {
@@ -1939,7 +1939,7 @@ function TermsSection({
1939
1939
  termsContent
1940
1940
  }) {
1941
1941
  var _a;
1942
- const [modalOpen, setModalOpen] = React29.useState(false);
1942
+ const [modalOpen, setModalOpen] = React30.useState(false);
1943
1943
  const i18n = (_a = TERMS_I18N[locale]) != null ? _a : TERMS_I18N.en;
1944
1944
  return /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-border p-4 flex flex-col gap-3", children: [
1945
1945
  /* @__PURE__ */ jsx("p", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: title }),
@@ -2077,9 +2077,9 @@ function BookingWizard({
2077
2077
  }) {
2078
2078
  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;
2079
2079
  const wizardSteps = WIZARD_STEPS_FN(labels);
2080
- const [step, setStep] = React29.useState("responsible");
2081
- const [error, setError] = React29.useState(null);
2082
- const [responsible, setResponsible] = React29.useState({
2080
+ const [step, setStep] = React30.useState("responsible");
2081
+ const [error, setError] = React30.useState(null);
2082
+ const [responsible, setResponsible] = React30.useState({
2083
2083
  firstName: "",
2084
2084
  lastName: "",
2085
2085
  email: "",
@@ -2098,7 +2098,7 @@ function BookingWizard({
2098
2098
  return s + ((_b2 = (_a2 = a.slots) == null ? void 0 : _a2.children) != null ? _b2 : 0);
2099
2099
  }, 0);
2100
2100
  const totalPax = totalAdults + totalChildren;
2101
- const [travellers, setTravellers] = React29.useState(
2101
+ const [travellers, setTravellers] = React30.useState(
2102
2102
  Array.from({ length: Math.max(totalPax, 1) }, () => ({
2103
2103
  firstName: "",
2104
2104
  lastName: "",
@@ -2106,9 +2106,9 @@ function BookingWizard({
2106
2106
  email: ""
2107
2107
  }))
2108
2108
  );
2109
- const [payAmount, setPayAmount] = React29.useState("full");
2110
- const [payMethod, setPayMethod] = React29.useState("stripe");
2111
- const [termsAccepted, setTermsAccepted] = React29.useState(false);
2109
+ const [payAmount, setPayAmount] = React30.useState("full");
2110
+ const [payMethod, setPayMethod] = React30.useState("stripe");
2111
+ const [termsAccepted, setTermsAccepted] = React30.useState(false);
2112
2112
  const setR = (k, v) => setResponsible((p) => __spreadProps(__spreadValues({}, p), { [k]: v }));
2113
2113
  const setT = (i, k, v) => setTravellers((prev) => prev.map((t, idx) => idx === i ? __spreadProps(__spreadValues({}, t), { [k]: v }) : t));
2114
2114
  const setTDob = (i, v) => setTravellers((prev) => prev.map((t, idx) => idx === i ? __spreadProps(__spreadValues({}, t), { dateOfBirth: v }) : t));
@@ -2336,7 +2336,7 @@ function Offer({
2336
2336
  className
2337
2337
  }) {
2338
2338
  var _a, _b, _c;
2339
- const [showBooking, setShowBooking] = React29.useState(false);
2339
+ const [showBooking, setShowBooking] = React30.useState(false);
2340
2340
  const isShowingCheckout = !confirmedState && (!!checkoutSlot || internalDemoCheckout && showBooking);
2341
2341
  const handleBook = () => {
2342
2342
  if (!checkoutSlot && !externalBookingFlow && internalDemoCheckout) {
@@ -2703,7 +2703,7 @@ function AdventureSection({
2703
2703
  labels
2704
2704
  }) {
2705
2705
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
2706
- const [detailsOpen, setDetailsOpen] = React29.useState(false);
2706
+ const [detailsOpen, setDetailsOpen] = React30.useState(false);
2707
2707
  const handleCopyUrl = (url) => {
2708
2708
  if (onCopyFormLink) {
2709
2709
  onCopyFormLink(url);
@@ -3216,8 +3216,8 @@ function AddTravellerDialog({
3216
3216
  errorMessage
3217
3217
  }) {
3218
3218
  var _a, _b, _c, _d, _e;
3219
- const [form, setForm] = React29.useState(() => createInitialAddFormData(config));
3220
- React29.useEffect(() => {
3219
+ const [form, setForm] = React30.useState(() => createInitialAddFormData(config));
3220
+ React30.useEffect(() => {
3221
3221
  if (open) {
3222
3222
  setForm(createInitialAddFormData(config));
3223
3223
  }
@@ -3277,7 +3277,7 @@ function EditTravellerDialog({
3277
3277
  errorMessage
3278
3278
  }) {
3279
3279
  var _a, _b, _c, _d, _e;
3280
- const [form, setForm] = React29.useState(() => ({
3280
+ const [form, setForm] = React30.useState(() => ({
3281
3281
  firstName: "",
3282
3282
  lastName: "",
3283
3283
  email: "",
@@ -3286,7 +3286,7 @@ function EditTravellerDialog({
3286
3286
  birthDate: "",
3287
3287
  personType: "ADULT"
3288
3288
  }));
3289
- React29.useEffect(() => {
3289
+ React30.useEffect(() => {
3290
3290
  var _a2, _b2, _c2, _d2, _e2, _f;
3291
3291
  if (open && traveller) {
3292
3292
  setForm({
@@ -3622,48 +3622,48 @@ function BookingDetails({
3622
3622
  const hasSubmitAddTraveller = !!onSubmitAddTraveller;
3623
3623
  const hasSubmitEditTraveller = !!onSubmitEditTraveller;
3624
3624
  const hasConfirmRemoveTraveller = !!onConfirmRemoveTraveller;
3625
- const [addModalState, setAddModalState] = React29.useState({
3625
+ const [addModalState, setAddModalState] = React30.useState({
3626
3626
  open: false,
3627
3627
  adventureId: null
3628
3628
  });
3629
- const [editModalState, setEditModalState] = React29.useState({ open: false, adventureId: null, traveller: null });
3630
- const [deleteModalState, setDeleteModalState] = React29.useState({ open: false, adventureId: null, traveller: null });
3631
- const [resendInviteDialogState, setResendInviteDialogState] = React29.useState({ open: false, traveller: null });
3632
- const handleRequestOpenAddModal = React29.useCallback((adventureId) => {
3629
+ const [editModalState, setEditModalState] = React30.useState({ open: false, adventureId: null, traveller: null });
3630
+ const [deleteModalState, setDeleteModalState] = React30.useState({ open: false, adventureId: null, traveller: null });
3631
+ const [resendInviteDialogState, setResendInviteDialogState] = React30.useState({ open: false, traveller: null });
3632
+ const handleRequestOpenAddModal = React30.useCallback((adventureId) => {
3633
3633
  setAddModalState({ open: true, adventureId });
3634
3634
  }, []);
3635
- const handleRequestOpenEditModal = React29.useCallback(
3635
+ const handleRequestOpenEditModal = React30.useCallback(
3636
3636
  (adventureId, traveller) => {
3637
3637
  setEditModalState({ open: true, adventureId, traveller });
3638
3638
  },
3639
3639
  []
3640
3640
  );
3641
- const handleRequestOpenDeleteModal = React29.useCallback(
3641
+ const handleRequestOpenDeleteModal = React30.useCallback(
3642
3642
  (adventureId, traveller) => {
3643
3643
  setDeleteModalState({ open: true, adventureId, traveller });
3644
3644
  },
3645
3645
  []
3646
3646
  );
3647
- const handleRequestOpenResendInviteDialog = React29.useCallback(
3647
+ const handleRequestOpenResendInviteDialog = React30.useCallback(
3648
3648
  (traveller) => {
3649
3649
  setResendInviteDialogState({ open: true, traveller });
3650
3650
  },
3651
3651
  []
3652
3652
  );
3653
- const closeAddModal = React29.useCallback(() => {
3653
+ const closeAddModal = React30.useCallback(() => {
3654
3654
  setAddModalState({ open: false, adventureId: null });
3655
3655
  }, []);
3656
- const closeEditModal = React29.useCallback(() => {
3656
+ const closeEditModal = React30.useCallback(() => {
3657
3657
  setEditModalState({ open: false, adventureId: null, traveller: null });
3658
3658
  }, []);
3659
- const closeDeleteModal = React29.useCallback(() => {
3659
+ const closeDeleteModal = React30.useCallback(() => {
3660
3660
  setDeleteModalState({ open: false, adventureId: null, traveller: null });
3661
3661
  }, []);
3662
- const closeResendInviteDialog = React29.useCallback(() => {
3662
+ const closeResendInviteDialog = React30.useCallback(() => {
3663
3663
  setResendInviteDialogState({ open: false, traveller: null });
3664
3664
  }, []);
3665
- const submitInFlightRef = React29.useRef(false);
3666
- const handleAddSubmit = React29.useCallback(
3665
+ const submitInFlightRef = React30.useRef(false);
3666
+ const handleAddSubmit = React30.useCallback(
3667
3667
  async (adventureId, data) => {
3668
3668
  if (!onSubmitAddTraveller) return;
3669
3669
  if (submitInFlightRef.current) return;
@@ -3678,7 +3678,7 @@ function BookingDetails({
3678
3678
  },
3679
3679
  [onSubmitAddTraveller, closeAddModal]
3680
3680
  );
3681
- const handleEditSubmit = React29.useCallback(
3681
+ const handleEditSubmit = React30.useCallback(
3682
3682
  async (adventureId, travellerId, data) => {
3683
3683
  if (!onSubmitEditTraveller) return;
3684
3684
  if (submitInFlightRef.current) return;
@@ -3693,7 +3693,7 @@ function BookingDetails({
3693
3693
  },
3694
3694
  [onSubmitEditTraveller, closeEditModal]
3695
3695
  );
3696
- const handleDeleteConfirm = React29.useCallback(
3696
+ const handleDeleteConfirm = React30.useCallback(
3697
3697
  async (adventureId, travellerId) => {
3698
3698
  if (!onConfirmRemoveTraveller) return;
3699
3699
  if (submitInFlightRef.current) return;
@@ -5269,7 +5269,7 @@ function BookingCreatedEmail({
5269
5269
  }, children: i + 1 }) }),
5270
5270
  /* @__PURE__ */ jsx("td", { style: { verticalAlign: "top" }, children: /* @__PURE__ */ jsx("p", { style: { fontSize: "14px", color: emailTokens.bodyText, lineHeight: "1.6", margin: 0 }, children: step }) })
5271
5271
  ] }) }) }, i)) }),
5272
- nextStepsImportant && nextStepsImportant.trim().length > 0 && /* @__PURE__ */ jsx("p", { style: { marginBottom: "32px", fontSize: "14px", color: emailTokens.foreground, lineHeight: "1.6" }, children: nextStepsImportant.split("\n").map((line, idx, arr) => /* @__PURE__ */ jsxs(React29.Fragment, { children: [
5272
+ nextStepsImportant && nextStepsImportant.trim().length > 0 && /* @__PURE__ */ jsx("p", { style: { marginBottom: "32px", fontSize: "14px", color: emailTokens.foreground, lineHeight: "1.6" }, children: nextStepsImportant.split("\n").map((line, idx, arr) => /* @__PURE__ */ jsxs(React30.Fragment, { children: [
5273
5273
  idx === 0 ? /* @__PURE__ */ jsx("strong", { children: line }) : line,
5274
5274
  idx < arr.length - 1 ? /* @__PURE__ */ jsx("br", {}) : null
5275
5275
  ] }, idx)) })
@@ -7289,11 +7289,11 @@ function DatePickerField({
7289
7289
  fromDate,
7290
7290
  className
7291
7291
  }) {
7292
- const [open, setOpen] = React29.useState(false);
7293
- const containerRef = React29.useRef(null);
7294
- const [calendarWidth, setCalendarWidth] = React29.useState();
7292
+ const [open, setOpen] = React30.useState(false);
7293
+ const containerRef = React30.useRef(null);
7294
+ const [calendarWidth, setCalendarWidth] = React30.useState();
7295
7295
  const hasValue = !!value;
7296
- React29.useEffect(() => {
7296
+ React30.useEffect(() => {
7297
7297
  if (!containerRef.current) return;
7298
7298
  const observer = new ResizeObserver(([entry]) => {
7299
7299
  setCalendarWidth(entry.contentRect.width);
@@ -7402,7 +7402,7 @@ function BookingForm({
7402
7402
  subtitle = "Free enquiry \u2013 no commitment",
7403
7403
  className
7404
7404
  }) {
7405
- const [values, setValues] = React29.useState(__spreadValues(__spreadValues({}, defaultInitial), defaultValues));
7405
+ const [values, setValues] = React30.useState(__spreadValues(__spreadValues({}, defaultInitial), defaultValues));
7406
7406
  const set = (key, value) => setValues((prev) => __spreadProps(__spreadValues({}, prev), { [key]: value }));
7407
7407
  const handleSubmit = (e) => {
7408
7408
  e.preventDefault();
@@ -7970,11 +7970,11 @@ function FloatingTextarea({
7970
7970
  }
7971
7971
  function SelectField({ field, value, onChange, error, disabled }) {
7972
7972
  var _a, _b, _c;
7973
- const [open, setOpen] = React29.useState(false);
7974
- const containerRef = React29.useRef(null);
7973
+ const [open, setOpen] = React30.useState(false);
7974
+ const containerRef = React30.useRef(null);
7975
7975
  const options = (_a = field.options) != null ? _a : [];
7976
7976
  const selectedOpt = (_b = options.find((o) => o.value === value)) != null ? _b : null;
7977
- React29.useEffect(() => {
7977
+ React30.useEffect(() => {
7978
7978
  if (!open) return;
7979
7979
  const handleOutside = (e) => {
7980
7980
  if (containerRef.current && !containerRef.current.contains(e.target)) {
@@ -8439,11 +8439,11 @@ function RegistrationForm({
8439
8439
  readOnly = false
8440
8440
  }) {
8441
8441
  var _a;
8442
- const L = React29.useMemo(
8442
+ const L = React30.useMemo(
8443
8443
  () => __spreadValues(__spreadValues({}, DEFAULT_LABELS12), labels != null ? labels : {}),
8444
8444
  [labels]
8445
8445
  );
8446
- const sortedFields = React29.useMemo(
8446
+ const sortedFields = React30.useMemo(
8447
8447
  () => [...fields].sort((a, b) => {
8448
8448
  var _a2, _b;
8449
8449
  return ((_a2 = a.order) != null ? _a2 : 0) - ((_b = b.order) != null ? _b : 0);
@@ -8451,7 +8451,7 @@ function RegistrationForm({
8451
8451
  [fields]
8452
8452
  );
8453
8453
  const isControlled = values !== void 0;
8454
- const [internal, setInternal] = React29.useState(
8454
+ const [internal, setInternal] = React30.useState(
8455
8455
  () => initializeValues(
8456
8456
  sortedFields,
8457
8457
  defaultValues != null ? defaultValues : {},
@@ -8459,9 +8459,9 @@ function RegistrationForm({
8459
8459
  includeTerms
8460
8460
  )
8461
8461
  );
8462
- const [submitAttempted, setSubmitAttempted] = React29.useState(false);
8463
- const [validationErrors, setValidationErrors] = React29.useState({});
8464
- React29.useEffect(() => {
8462
+ const [submitAttempted, setSubmitAttempted] = React30.useState(false);
8463
+ const [validationErrors, setValidationErrors] = React30.useState({});
8464
+ React30.useEffect(() => {
8465
8465
  if (isControlled) return;
8466
8466
  setInternal((prev) => {
8467
8467
  const next = initializeValues(
@@ -8518,7 +8518,7 @@ function RegistrationForm({
8518
8518
  const termsError = submitAttempted && termsEnabled && !termsAccepted;
8519
8519
  const firstErrorFieldId = Object.keys(fieldErrors)[0];
8520
8520
  const scrollTargetId = firstErrorFieldId ? `rf-${firstErrorFieldId}` : termsError ? "rf-terms" : null;
8521
- React29.useEffect(() => {
8521
+ React30.useEffect(() => {
8522
8522
  if (!submitAttempted || !scrollTargetId) return;
8523
8523
  const timer = setTimeout(() => {
8524
8524
  const elem = document.getElementById(scrollTargetId);
@@ -8980,10 +8980,10 @@ var OTPCodeInput = ({
8980
8980
  id,
8981
8981
  required
8982
8982
  }) => {
8983
- const baseId = id != null ? id : React29.useId();
8984
- const inputRef = React29.useRef(null);
8985
- const [focused, setFocused] = React29.useState(false);
8986
- const digits = React29.useMemo(() => {
8983
+ const baseId = id != null ? id : React30.useId();
8984
+ const inputRef = React30.useRef(null);
8985
+ const [focused, setFocused] = React30.useState(false);
8986
+ const digits = React30.useMemo(() => {
8987
8987
  const arr = value.split("").slice(0, length);
8988
8988
  while (arr.length < length) arr.push("");
8989
8989
  return arr;
@@ -9096,7 +9096,7 @@ function Checkbox(_a) {
9096
9096
  })
9097
9097
  );
9098
9098
  }
9099
- var AccordionVariantContext = React29.createContext("default");
9099
+ var AccordionVariantContext = React30.createContext("default");
9100
9100
  function Accordion(_a) {
9101
9101
  var _b = _a, { className, variant = "default" } = _b, props = __objRest(_b, ["className", "variant"]);
9102
9102
  return /* @__PURE__ */ jsx(AccordionVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsx(
@@ -9114,7 +9114,7 @@ function Accordion(_a) {
9114
9114
  }
9115
9115
  function AccordionItem(_a) {
9116
9116
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
9117
- const variant = React29.useContext(AccordionVariantContext);
9117
+ const variant = React30.useContext(AccordionVariantContext);
9118
9118
  return /* @__PURE__ */ jsx(
9119
9119
  Accordion$1.Item,
9120
9120
  __spreadValues({
@@ -9135,7 +9135,7 @@ function AccordionTrigger(_a) {
9135
9135
  "className",
9136
9136
  "children"
9137
9137
  ]);
9138
- const variant = React29.useContext(AccordionVariantContext);
9138
+ const variant = React30.useContext(AccordionVariantContext);
9139
9139
  return /* @__PURE__ */ jsx(Accordion$1.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
9140
9140
  Accordion$1.Trigger,
9141
9141
  __spreadProps(__spreadValues({
@@ -9189,7 +9189,7 @@ function AccordionContent(_a) {
9189
9189
  "className",
9190
9190
  "children"
9191
9191
  ]);
9192
- const variant = React29.useContext(AccordionVariantContext);
9192
+ const variant = React30.useContext(AccordionVariantContext);
9193
9193
  return /* @__PURE__ */ jsx(
9194
9194
  Accordion$1.Panel,
9195
9195
  __spreadProps(__spreadValues({
@@ -9407,15 +9407,15 @@ function FilterPanel({
9407
9407
  onSortChange
9408
9408
  }) {
9409
9409
  var _a, _b;
9410
- const resolvedGroups = React29.useMemo(() => resolveGroups(groups), [groups]);
9411
- const [internalValue, setInternalValue] = React29.useState(
9410
+ const resolvedGroups = React30.useMemo(() => resolveGroups(groups), [groups]);
9411
+ const [internalValue, setInternalValue] = React30.useState(
9412
9412
  () => Object.fromEntries(groups.map((g) => [g.id, []]))
9413
9413
  );
9414
9414
  const selected = value != null ? value : internalValue;
9415
- const [expandedItems, setExpandedItems] = React29.useState(
9415
+ const [expandedItems, setExpandedItems] = React30.useState(
9416
9416
  () => new Set(groups.flatMap((g) => getDefaultExpandedIds(g.items)))
9417
9417
  );
9418
- const toggleExpanded = React29.useCallback((id) => {
9418
+ const toggleExpanded = React30.useCallback((id) => {
9419
9419
  setExpandedItems((prev) => {
9420
9420
  const next = new Set(prev);
9421
9421
  if (next.has(id)) next.delete(id);
@@ -9481,7 +9481,7 @@ function FilterPanel({
9481
9481
  /* @__PURE__ */ jsx(AccordionTrigger, { className: "px-0 py-3.5 hover:no-underline transition-colors", children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2.5", children: [
9482
9482
  group.icon && /* @__PURE__ */ jsx("span", { className: "text-primary shrink-0", children: group.icon }),
9483
9483
  /* @__PURE__ */ jsx("span", { className: "text-sm font-bold text-foreground font-ui", children: group.label }),
9484
- groupSelected.length > 0 && /* @__PURE__ */ jsx("span", { className: "ml-1 inline-flex h-4 w-4 items-center justify-center rounded-full bg-primary text-[9px] font-bold text-primary-foreground", children: groupSelected.length })
9484
+ groupSelected.length > 0 && /* @__PURE__ */ jsx("span", { className: "ml-1 inline-flex h-4 w-4 items-center justify-center rounded-full bg-primary text-[9px] font-bold leading-none text-primary-foreground", children: groupSelected.length })
9485
9485
  ] }) }),
9486
9486
  /* @__PURE__ */ jsx(AccordionContent, { className: "px-4 pb-3 pt-1", children: /* @__PURE__ */ jsx(
9487
9487
  FilterItemsList,
@@ -9521,7 +9521,7 @@ function FilterPanel({
9521
9521
  children: [
9522
9522
  /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
9523
9523
  title,
9524
- totalSelected > 0 && /* @__PURE__ */ jsx("span", { className: "inline-flex h-5 min-w-[20px] items-center justify-center rounded-full bg-primary px-1.5 text-[10px] font-bold text-primary-foreground", children: totalSelected })
9524
+ totalSelected > 0 && /* @__PURE__ */ jsx("span", { className: "inline-flex h-5 min-w-[20px] items-center justify-center rounded-full bg-primary px-1.5 text-[10px] font-bold leading-none text-primary-foreground", children: totalSelected })
9525
9525
  ] }),
9526
9526
  /* @__PURE__ */ jsx(SlidersHorizontalIcon, { className: "h-4 w-4 text-foreground" })
9527
9527
  ]
@@ -9642,7 +9642,7 @@ function FilterPanel({
9642
9642
  "span",
9643
9643
  {
9644
9644
  className: cn(
9645
- "inline-flex items-center justify-center rounded-full text-[10px] font-bold px-1.5 min-w-[18px] h-[18px]",
9645
+ "inline-flex items-center justify-center rounded-full text-[10px] font-bold leading-none px-1.5 min-w-[18px] h-[18px]",
9646
9646
  isActive ? "bg-background text-foreground" : "bg-foreground text-background"
9647
9647
  ),
9648
9648
  children: selectedCount
@@ -9745,7 +9745,7 @@ function FilterPanel({
9745
9745
  return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-4", className), children: [
9746
9746
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
9747
9747
  /* @__PURE__ */ jsx("h3", { className: "text-base font-bold text-foreground font-ui", children: title }),
9748
- totalSelected > 0 && /* @__PURE__ */ jsx("span", { className: "inline-flex h-5 w-5 items-center justify-center rounded-full bg-primary text-[10px] font-bold text-primary-foreground", children: totalSelected })
9748
+ totalSelected > 0 && /* @__PURE__ */ jsx("span", { className: "inline-flex h-5 w-5 items-center justify-center rounded-full bg-primary text-[10px] font-bold leading-none text-primary-foreground", children: totalSelected })
9749
9749
  ] }),
9750
9750
  /* @__PURE__ */ jsx(
9751
9751
  Accordion,
@@ -9764,7 +9764,7 @@ function FilterPanel({
9764
9764
  /* @__PURE__ */ jsx(AccordionTrigger, { className: "px-0 py-3.5 hover:no-underline transition-colors", children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2.5", children: [
9765
9765
  group.icon && /* @__PURE__ */ jsx("span", { className: "text-primary shrink-0", children: group.icon }),
9766
9766
  /* @__PURE__ */ jsx("span", { className: "text-sm font-bold text-foreground font-ui", children: group.label }),
9767
- groupSelected.length > 0 && /* @__PURE__ */ jsx("span", { className: "ml-1 inline-flex h-4 w-4 items-center justify-center rounded-full bg-primary text-[9px] font-bold text-primary-foreground", children: groupSelected.length })
9767
+ groupSelected.length > 0 && /* @__PURE__ */ jsx("span", { className: "ml-1 inline-flex h-4 w-4 items-center justify-center rounded-full bg-primary text-[9px] font-bold leading-none text-primary-foreground", children: groupSelected.length })
9768
9768
  ] }) }),
9769
9769
  /* @__PURE__ */ jsx(AccordionContent, { className: "px-4 pb-3 pt-1", children: /* @__PURE__ */ jsx(
9770
9770
  FilterItemsList,
@@ -9799,11 +9799,11 @@ function FilterPanel({
9799
9799
  var TRUSTPILOT_SCRIPT_SRC = "https://widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js";
9800
9800
  function TrustpilotEmbed({ config }) {
9801
9801
  var _a, _b, _c, _d, _e, _f;
9802
- const ref = React29.useRef(null);
9803
- const [widgetReady, setWidgetReady] = React29.useState(false);
9804
- const [delayPassed, setDelayPassed] = React29.useState(false);
9802
+ const ref = React30.useRef(null);
9803
+ const [widgetReady, setWidgetReady] = React30.useState(false);
9804
+ const [delayPassed, setDelayPassed] = React30.useState(false);
9805
9805
  const showFallback = delayPassed && !widgetReady;
9806
- React29.useEffect(() => {
9806
+ React30.useEffect(() => {
9807
9807
  var _a2;
9808
9808
  if (typeof document === "undefined" || !ref.current) return;
9809
9809
  const node = ref.current;
@@ -10007,9 +10007,9 @@ function Picture(_a) {
10007
10007
  "decoding",
10008
10008
  "loading"
10009
10009
  ]);
10010
- const ref = React29.useRef(null);
10011
- const [visible, setVisible] = React29.useState(eager);
10012
- React29.useEffect(() => {
10010
+ const ref = React30.useRef(null);
10011
+ const [visible, setVisible] = React30.useState(eager);
10012
+ React30.useEffect(() => {
10013
10013
  if (eager || visible) return;
10014
10014
  const el = ref.current;
10015
10015
  if (!el || typeof IntersectionObserver === "undefined") {
@@ -10125,11 +10125,11 @@ function ItineraryModal({
10125
10125
  onNext
10126
10126
  }) {
10127
10127
  var _a, _b, _c;
10128
- const [imgIndex, setImgIndex] = React29.useState(0);
10128
+ const [imgIndex, setImgIndex] = React30.useState(0);
10129
10129
  const images = stop ? [stop.coverImage, ...(_a = stop.images) != null ? _a : []] : [];
10130
10130
  const isFirst = (stop == null ? void 0 : stop.dayNumber) === ((_b = allStops[0]) == null ? void 0 : _b.dayNumber);
10131
10131
  const isLast = (stop == null ? void 0 : stop.dayNumber) === ((_c = allStops[allStops.length - 1]) == null ? void 0 : _c.dayNumber);
10132
- React29.useEffect(() => {
10132
+ React30.useEffect(() => {
10133
10133
  setImgIndex(0);
10134
10134
  }, [stop == null ? void 0 : stop.dayNumber]);
10135
10135
  if (!stop) return null;
@@ -10256,8 +10256,8 @@ function ItineraryModal({
10256
10256
  ) });
10257
10257
  }
10258
10258
  function Itinerary({ title, subtitle, stops, className }) {
10259
- const [activeIndex, setActiveIndex] = React29.useState(null);
10260
- const scrollRef = React29.useRef(null);
10259
+ const [activeIndex, setActiveIndex] = React30.useState(null);
10260
+ const scrollRef = React30.useRef(null);
10261
10261
  const activeStop = activeIndex !== null ? stops[activeIndex] : null;
10262
10262
  const scrollBy = (dir) => {
10263
10263
  if (!scrollRef.current) return;
@@ -10349,18 +10349,18 @@ function Lightbox({
10349
10349
  onClose
10350
10350
  }) {
10351
10351
  var _a;
10352
- const [index, setIndex] = React29.useState(initialIndex);
10352
+ const [index, setIndex] = React30.useState(initialIndex);
10353
10353
  const total = photos.length;
10354
10354
  const photo = photos[index];
10355
- const prev = React29.useCallback(
10355
+ const prev = React30.useCallback(
10356
10356
  () => setIndex((i) => (i - 1 + total) % total),
10357
10357
  [total]
10358
10358
  );
10359
- const next = React29.useCallback(
10359
+ const next = React30.useCallback(
10360
10360
  () => setIndex((i) => (i + 1) % total),
10361
10361
  [total]
10362
10362
  );
10363
- React29.useEffect(() => {
10363
+ React30.useEffect(() => {
10364
10364
  const onKey = (e) => {
10365
10365
  if (e.key === "Escape") onClose();
10366
10366
  if (e.key === "ArrowLeft") prev();
@@ -10526,7 +10526,7 @@ function GridGallery({
10526
10526
  initialVisible,
10527
10527
  onOpen
10528
10528
  }) {
10529
- const [expanded, setExpanded] = React29.useState(false);
10529
+ const [expanded, setExpanded] = React30.useState(false);
10530
10530
  const cols = gridCols(photos.length);
10531
10531
  const hasMore = photos.length > initialVisible;
10532
10532
  const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
@@ -10556,7 +10556,7 @@ function CompactGridGallery({
10556
10556
  initialVisible,
10557
10557
  onOpen
10558
10558
  }) {
10559
- const [expanded, setExpanded] = React29.useState(false);
10559
+ const [expanded, setExpanded] = React30.useState(false);
10560
10560
  const hasMore = photos.length > initialVisible;
10561
10561
  const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
10562
10562
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -10585,7 +10585,7 @@ function MasonryGallery({
10585
10585
  initialVisible,
10586
10586
  onOpen
10587
10587
  }) {
10588
- const [expanded, setExpanded] = React29.useState(false);
10588
+ const [expanded, setExpanded] = React30.useState(false);
10589
10589
  const hasMore = photos.length > initialVisible;
10590
10590
  const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
10591
10591
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -10658,7 +10658,7 @@ function FeaturedGallery({
10658
10658
  photos,
10659
10659
  onOpen
10660
10660
  }) {
10661
- const [expanded, setExpanded] = React29.useState(false);
10661
+ const [expanded, setExpanded] = React30.useState(false);
10662
10662
  const featured = photos.slice(0, 3);
10663
10663
  const extra = photos.slice(3);
10664
10664
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -10825,9 +10825,9 @@ function PhotoGallery({
10825
10825
  onPhotoClick,
10826
10826
  className
10827
10827
  }) {
10828
- const [lightboxIndex, setLightboxIndex] = React29.useState(null);
10829
- const [carouselIndex, setCarouselIndex] = React29.useState(0);
10830
- const normalised = React29.useMemo(() => photos.map(normalise), [photos]);
10828
+ const [lightboxIndex, setLightboxIndex] = React30.useState(null);
10829
+ const [carouselIndex, setCarouselIndex] = React30.useState(0);
10830
+ const normalised = React30.useMemo(() => photos.map(normalise), [photos]);
10831
10831
  const handleOpen = (index) => {
10832
10832
  setLightboxIndex(index);
10833
10833
  onPhotoClick == null ? void 0 : onPhotoClick(normalised[index].src, index);
@@ -10911,7 +10911,7 @@ function ItineraryDay({
10911
10911
  photoLayout = "rounded",
10912
10912
  className
10913
10913
  }) {
10914
- const photoList = React29.useMemo(() => normalisePhotos(photos), [photos]);
10914
+ const photoList = React30.useMemo(() => normalisePhotos(photos), [photos]);
10915
10915
  const isFullBleed = photoLayout === "fullBleed" || photoLayout === "fullBleedBottom";
10916
10916
  const photoPosition = photoLayout === "fullBleedBottom" ? "bottom" : "top";
10917
10917
  const gallery = photoList.length > 0 && /* @__PURE__ */ jsx(
@@ -10966,8 +10966,8 @@ function MenuTrip({
10966
10966
  bold = true,
10967
10967
  className
10968
10968
  }) {
10969
- const scrollRef = React29.useRef(null);
10970
- React29.useEffect(() => {
10969
+ const scrollRef = React30.useRef(null);
10970
+ React30.useEffect(() => {
10971
10971
  if (!scrollRef.current || !activeSection) return;
10972
10972
  const container = scrollRef.current;
10973
10973
  const btn = container.querySelector(
@@ -11163,8 +11163,8 @@ function PricingTrip({
11163
11163
  className
11164
11164
  }) {
11165
11165
  const rOuter = sharp ? "rounded-none" : "rounded-2xl";
11166
- const [showEstimates, setShowEstimates] = React29.useState(false);
11167
- const [showPriceInfo, setShowPriceInfo] = React29.useState(false);
11166
+ const [showEstimates, setShowEstimates] = React30.useState(false);
11167
+ const [showPriceInfo, setShowPriceInfo] = React30.useState(false);
11168
11168
  if (variant === "compact") {
11169
11169
  const showOverlay = showPriceInfo && (!!priceInfo || !!currencyEstimates && currencyEstimates.length > 0);
11170
11170
  return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
@@ -11604,14 +11604,14 @@ function SiteHeader({
11604
11604
  }) {
11605
11605
  const t = VARIANT[variant];
11606
11606
  const resolvedLogo = logoSrc != null ? logoSrc : variant === "white" ? logoSrcDark : logoSrcLight;
11607
- const [openMenu, setOpenMenu] = React29.useState(null);
11608
- const [langOpen, setLangOpen] = React29.useState(false);
11609
- const [mobileOpen, setMobileOpen] = React29.useState(false);
11610
- const [openMobileSection, setOpenMobileSection] = React29.useState(null);
11611
- const [activeLang, setActiveLang] = React29.useState(currentLanguage);
11607
+ const [openMenu, setOpenMenu] = React30.useState(null);
11608
+ const [langOpen, setLangOpen] = React30.useState(false);
11609
+ const [mobileOpen, setMobileOpen] = React30.useState(false);
11610
+ const [openMobileSection, setOpenMobileSection] = React30.useState(null);
11611
+ const [activeLang, setActiveLang] = React30.useState(currentLanguage);
11612
11612
  const toggleMobileSection = (label) => setOpenMobileSection((prev) => prev === label ? null : label);
11613
- const menuCloseTimer = React29.useRef(void 0);
11614
- const langCloseTimer = React29.useRef(void 0);
11613
+ const menuCloseTimer = React30.useRef(void 0);
11614
+ const langCloseTimer = React30.useRef(void 0);
11615
11615
  const handleMenuEnter = (label) => {
11616
11616
  clearTimeout(menuCloseTimer.current);
11617
11617
  setOpenMenu(label);
@@ -11632,7 +11632,7 @@ function SiteHeader({
11632
11632
  setOpenMenu(null);
11633
11633
  setLangOpen(false);
11634
11634
  };
11635
- React29.useEffect(() => () => {
11635
+ React30.useEffect(() => () => {
11636
11636
  clearTimeout(menuCloseTimer.current);
11637
11637
  clearTimeout(langCloseTimer.current);
11638
11638
  }, []);
@@ -11908,7 +11908,7 @@ function SiteHeader({
11908
11908
  ), children: [
11909
11909
  /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: languages.map((lang, i) => {
11910
11910
  const isActive = lang.code === activeLang;
11911
- return /* @__PURE__ */ jsxs(React29.Fragment, { children: [
11911
+ return /* @__PURE__ */ jsxs(React30.Fragment, { children: [
11912
11912
  i > 0 && /* @__PURE__ */ jsx("span", { className: cn(
11913
11913
  "text-xs select-none",
11914
11914
  variant === "white" ? "text-border" : "text-white/15"
@@ -11970,8 +11970,8 @@ function SiteHeader({
11970
11970
  );
11971
11971
  }
11972
11972
  function ThemeToggle({ className }) {
11973
- const [dark, setDark] = React29.useState(false);
11974
- React29.useEffect(() => {
11973
+ const [dark, setDark] = React30.useState(false);
11974
+ React30.useEffect(() => {
11975
11975
  const saved = localStorage.getItem("theme");
11976
11976
  const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
11977
11977
  const isDark = saved === "dark" || !saved && prefersDark;
@@ -12021,7 +12021,7 @@ var chipVariants = cva(
12021
12021
  }
12022
12022
  }
12023
12023
  );
12024
- var Chip = React29.forwardRef(function Chip2(_a, ref) {
12024
+ var Chip = React30.forwardRef(function Chip2(_a, ref) {
12025
12025
  var _b = _a, { className, variant, size, href, children } = _b, props = __objRest(_b, ["className", "variant", "size", "href", "children"]);
12026
12026
  const classes = cn(chipVariants({ variant, size }), className);
12027
12027
  if (href) {
@@ -12119,9 +12119,10 @@ function TripCardEditorial(props) {
12119
12119
  onFavoriteToggle,
12120
12120
  location,
12121
12121
  difficulty,
12122
- tag
12122
+ tag,
12123
+ tagHref
12123
12124
  } = props;
12124
- const [internalFav, setInternalFav] = React29.useState(false);
12125
+ const [internalFav, setInternalFav] = React30.useState(false);
12125
12126
  const favorited = favoritedProp != null ? favoritedProp : internalFav;
12126
12127
  const handleFav = (e) => {
12127
12128
  e.preventDefault();
@@ -12142,7 +12143,23 @@ function TripCardEditorial(props) {
12142
12143
  }
12143
12144
  ),
12144
12145
  /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/85 via-black/20 to-transparent" }),
12145
- tag && /* @__PURE__ */ jsx("div", { className: "absolute top-3 left-3 z-10 max-w-[calc(100%-4.5rem)]", children: /* @__PURE__ */ jsx(Chip, { variant: "glass", size: "sm", children: tag }) }),
12146
+ tag && /* @__PURE__ */ jsx("div", { className: "absolute top-3 left-3 z-20 max-w-[calc(100%-4.5rem)]", children: tagHref ? /* @__PURE__ */ jsx(
12147
+ "a",
12148
+ {
12149
+ href: tagHref,
12150
+ onClick: (e) => e.stopPropagation(),
12151
+ className: "inline-block rounded-full focus:outline-none focus-visible:ring-2 focus-visible:ring-white/70",
12152
+ children: /* @__PURE__ */ jsx(
12153
+ Chip,
12154
+ {
12155
+ variant: "glass",
12156
+ size: "sm",
12157
+ className: "cursor-pointer transition-colors hover:bg-white/25",
12158
+ children: tag
12159
+ }
12160
+ )
12161
+ }
12162
+ ) : /* @__PURE__ */ jsx(Chip, { variant: "glass", size: "sm", children: tag }) }),
12146
12163
  favoritable && /* @__PURE__ */ jsx(
12147
12164
  "button",
12148
12165
  {
@@ -12151,7 +12168,7 @@ function TripCardEditorial(props) {
12151
12168
  "aria-pressed": favorited,
12152
12169
  onClick: handleFav,
12153
12170
  className: cn(
12154
- "absolute top-3 right-3 flex h-9 w-9 items-center justify-center rounded-full",
12171
+ "absolute top-3 right-3 z-20 flex h-9 w-9 items-center justify-center rounded-full",
12155
12172
  "border border-white/15 bg-black/30 backdrop-blur-sm",
12156
12173
  "transition-colors hover:bg-white/10 hover:border-white/50",
12157
12174
  favorited ? "text-white" : "text-white/85 hover:text-white"
@@ -12188,7 +12205,17 @@ function TripCardEditorial(props) {
12188
12205
  "shadow-md transition-shadow duration-300 hover:shadow-xl",
12189
12206
  className
12190
12207
  );
12191
- return href ? /* @__PURE__ */ jsx("a", { href, className: baseClasses, "aria-label": title, children: body }) : /* @__PURE__ */ jsx("div", { className: baseClasses, children: body });
12208
+ return /* @__PURE__ */ jsxs("div", { className: baseClasses, children: [
12209
+ body,
12210
+ href && /* @__PURE__ */ jsx(
12211
+ "a",
12212
+ {
12213
+ href,
12214
+ "aria-label": title,
12215
+ className: "absolute inset-0 z-[1] rounded-2xl focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"
12216
+ }
12217
+ )
12218
+ ] });
12192
12219
  }
12193
12220
  function TripCard(props) {
12194
12221
  if (props.variant === "editorial") {
@@ -12266,7 +12293,7 @@ function TripCard(props) {
12266
12293
  );
12267
12294
  }
12268
12295
  function useHlsVideo(videoRef, src) {
12269
- React29.useEffect(() => {
12296
+ React30.useEffect(() => {
12270
12297
  if (!src || !videoRef.current) return;
12271
12298
  const video = videoRef.current;
12272
12299
  if (!src.includes(".m3u8")) return;
@@ -12310,11 +12337,11 @@ function TripHeader({
12310
12337
  className
12311
12338
  }) {
12312
12339
  var _a;
12313
- const [heroIndex, setHeroIndex] = React29.useState(0);
12314
- const [videoReady, setVideoReady] = React29.useState(false);
12315
- const videoRef = React29.useRef(null);
12340
+ const [heroIndex, setHeroIndex] = React30.useState(0);
12341
+ const [videoReady, setVideoReady] = React30.useState(false);
12342
+ const videoRef = React30.useRef(null);
12316
12343
  const isHls = !!(videoUrl == null ? void 0 : videoUrl.includes(".m3u8"));
12317
- const validImages = React29.useMemo(
12344
+ const validImages = React30.useMemo(
12318
12345
  () => images.map((u) => u == null ? void 0 : u.trim()).filter(Boolean),
12319
12346
  [images]
12320
12347
  );
@@ -12329,7 +12356,7 @@ function TripHeader({
12329
12356
  const nights = duration ? (_a = duration.nights) != null ? _a : Math.max(duration.days - 1, 1) : null;
12330
12357
  const hasMeta = !!(destination || duration);
12331
12358
  useHlsVideo(videoRef, isHls ? videoUrl : void 0);
12332
- React29.useEffect(() => {
12359
+ React30.useEffect(() => {
12333
12360
  if (!videoUrl) return;
12334
12361
  const el = videoRef.current;
12335
12362
  if (!el) return;
@@ -12472,7 +12499,7 @@ function TripHeader({
12472
12499
  chips && chips.length > 0 ? siteHeader ? "-mt-[200px] sm:-mt-[214px]" : "-mt-[168px] sm:-mt-[182px]" : siteHeader ? "-mt-44" : "-mt-36"
12473
12500
  ),
12474
12501
  children: [
12475
- breadcrumb && breadcrumb.length > 0 && /* @__PURE__ */ jsx("div", { className: "mb-3 flex items-center gap-1.5 flex-wrap", children: breadcrumb.map((crumb, i) => /* @__PURE__ */ jsxs(React29.Fragment, { children: [
12502
+ breadcrumb && breadcrumb.length > 0 && /* @__PURE__ */ jsx("div", { className: "mb-3 flex items-center gap-1.5 flex-wrap", children: breadcrumb.map((crumb, i) => /* @__PURE__ */ jsxs(React30.Fragment, { children: [
12476
12503
  i > 0 && /* @__PURE__ */ jsx(ChevronRightIcon, { className: "h-3 w-3 text-white/50 shrink-0" }),
12477
12504
  /* @__PURE__ */ jsx("span", { className: "text-xs text-white/70 font-ui hover:text-white/90 cursor-default", children: crumb.label })
12478
12505
  ] }, i)) }),
@@ -12638,10 +12665,10 @@ function LanguagePicker({
12638
12665
  }) {
12639
12666
  var _a;
12640
12667
  const t = VARIANT2[variant];
12641
- const [open, setOpen] = React29.useState(false);
12642
- const ref = React29.useRef(null);
12668
+ const [open, setOpen] = React30.useState(false);
12669
+ const ref = React30.useRef(null);
12643
12670
  const active = (_a = languages.find((l) => l.code === currentLanguage)) != null ? _a : languages[0];
12644
- React29.useEffect(() => {
12671
+ React30.useEffect(() => {
12645
12672
  if (!open) return;
12646
12673
  const onDocClick = (e) => {
12647
12674
  if (ref.current && !ref.current.contains(e.target)) {
@@ -12842,7 +12869,7 @@ function SiteFooter({
12842
12869
  children: wrapper
12843
12870
  },
12844
12871
  b.alt + i
12845
- ) : /* @__PURE__ */ jsx(React29.Fragment, { children: wrapper }, b.alt + i);
12872
+ ) : /* @__PURE__ */ jsx(React30.Fragment, { children: wrapper }, b.alt + i);
12846
12873
  }) })
12847
12874
  ] }),
12848
12875
  themes.length > 0 && /* @__PURE__ */ jsxs("div", { className: "lg:col-span-3", children: [
@@ -13017,10 +13044,10 @@ function TripPage({
13017
13044
  className
13018
13045
  }) {
13019
13046
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
13020
- const [activeSection, setActiveSection] = React29.useState("");
13021
- const [accordionValue, setAccordionValue] = React29.useState([]);
13022
- const [faqsExpanded, setFaqsExpanded] = React29.useState(false);
13023
- const accordionSectionIds = React29.useMemo(
13047
+ const [activeSection, setActiveSection] = React30.useState("");
13048
+ const [accordionValue, setAccordionValue] = React30.useState([]);
13049
+ const [faqsExpanded, setFaqsExpanded] = React30.useState(false);
13050
+ const accordionSectionIds = React30.useMemo(
13024
13051
  () => /* @__PURE__ */ new Set([
13025
13052
  "when-it-operates",
13026
13053
  "how-to-get-there",
@@ -13034,18 +13061,18 @@ function TripPage({
13034
13061
  ]),
13035
13062
  []
13036
13063
  );
13037
- const [navFloating, setNavFloating] = React29.useState(false);
13038
- const [navHidden, setNavHidden] = React29.useState(false);
13039
- const [isFloating, setIsFloating] = React29.useState(false);
13040
- const [sidebarPos, setSidebarPos] = React29.useState(null);
13041
- const [pricingBarVisible, setPricingBarVisible] = React29.useState(false);
13042
- const navRef = React29.useRef(null);
13043
- const navSentinelRef = React29.useRef(null);
13044
- const sentinelRef = React29.useRef(null);
13045
- const sidebarPlaceholderRef = React29.useRef(null);
13046
- const pricingBarRef = React29.useRef(null);
13047
- const galleryRef = React29.useRef(null);
13048
- const sections = React29.useMemo(
13064
+ const [navFloating, setNavFloating] = React30.useState(false);
13065
+ const [navHidden, setNavHidden] = React30.useState(false);
13066
+ const [isFloating, setIsFloating] = React30.useState(false);
13067
+ const [sidebarPos, setSidebarPos] = React30.useState(null);
13068
+ const [pricingBarVisible, setPricingBarVisible] = React30.useState(false);
13069
+ const navRef = React30.useRef(null);
13070
+ const navSentinelRef = React30.useRef(null);
13071
+ const sentinelRef = React30.useRef(null);
13072
+ const sidebarPlaceholderRef = React30.useRef(null);
13073
+ const pricingBarRef = React30.useRef(null);
13074
+ const galleryRef = React30.useRef(null);
13075
+ const sections = React30.useMemo(
13049
13076
  () => {
13050
13077
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2, _i2;
13051
13078
  return [
@@ -13067,7 +13094,7 @@ function TripPage({
13067
13094
  // eslint-disable-next-line react-hooks/exhaustive-deps
13068
13095
  []
13069
13096
  );
13070
- React29.useEffect(() => {
13097
+ React30.useEffect(() => {
13071
13098
  const sentinel = navSentinelRef.current;
13072
13099
  if (!sentinel) return;
13073
13100
  const update = () => setNavFloating(sentinel.getBoundingClientRect().top < 1);
@@ -13075,7 +13102,7 @@ function TripPage({
13075
13102
  update();
13076
13103
  return () => document.removeEventListener("scroll", update, { capture: true });
13077
13104
  }, []);
13078
- React29.useEffect(() => {
13105
+ React30.useEffect(() => {
13079
13106
  const sentinel = sentinelRef.current;
13080
13107
  if (!sentinel) return;
13081
13108
  const update = () => setIsFloating(sentinel.getBoundingClientRect().top < 1);
@@ -13083,7 +13110,7 @@ function TripPage({
13083
13110
  update();
13084
13111
  return () => document.removeEventListener("scroll", update, { capture: true });
13085
13112
  }, []);
13086
- React29.useEffect(() => {
13113
+ React30.useEffect(() => {
13087
13114
  const measure = () => {
13088
13115
  if (!sidebarPlaceholderRef.current) return;
13089
13116
  const rect = sidebarPlaceholderRef.current.getBoundingClientRect();
@@ -13093,7 +13120,7 @@ function TripPage({
13093
13120
  window.addEventListener("resize", measure);
13094
13121
  return () => window.removeEventListener("resize", measure);
13095
13122
  }, [isFloating]);
13096
- React29.useEffect(() => {
13123
+ React30.useEffect(() => {
13097
13124
  const check = () => {
13098
13125
  var _a2;
13099
13126
  const target = (_a2 = galleryRef.current) != null ? _a2 : pricingBarRef.current;
@@ -13104,7 +13131,7 @@ function TripPage({
13104
13131
  check();
13105
13132
  return () => document.removeEventListener("scroll", check, { capture: true });
13106
13133
  }, []);
13107
- React29.useEffect(() => {
13134
+ React30.useEffect(() => {
13108
13135
  const check = () => {
13109
13136
  if (!pricingBarRef.current) return;
13110
13137
  setNavHidden(pricingBarRef.current.getBoundingClientRect().top < window.innerHeight * 0.92);
@@ -13113,7 +13140,7 @@ function TripPage({
13113
13140
  check();
13114
13141
  return () => document.removeEventListener("scroll", check, { capture: true });
13115
13142
  }, []);
13116
- React29.useEffect(() => {
13143
+ React30.useEffect(() => {
13117
13144
  if (sections.length === 0) return;
13118
13145
  setActiveSection(sections[0].id);
13119
13146
  const update = () => {
@@ -13719,6 +13746,7 @@ function CategoryPage2({
13719
13746
  title,
13720
13747
  intro,
13721
13748
  heroImage,
13749
+ videoUrl,
13722
13750
  trustpilotMini,
13723
13751
  breadcrumb,
13724
13752
  siteHeader,
@@ -13751,13 +13779,32 @@ function CategoryPage2({
13751
13779
  className
13752
13780
  }) {
13753
13781
  var _a;
13754
- const [faqsExpanded, setFaqsExpanded] = React29.useState(false);
13755
- const [tripsExpanded, setTripsExpanded] = React29.useState(false);
13756
- const [filterValue, setFilterValue] = React29.useState({});
13757
- const [sort, setSort] = React29.useState(
13782
+ const [videoReady, setVideoReady] = React30.useState(false);
13783
+ const videoRef = React30.useRef(null);
13784
+ const isHls = !!(videoUrl == null ? void 0 : videoUrl.includes(".m3u8"));
13785
+ useHlsVideo(videoRef, isHls ? videoUrl : void 0);
13786
+ React30.useEffect(() => {
13787
+ if (!videoUrl) return;
13788
+ const el = videoRef.current;
13789
+ if (!el) return;
13790
+ const io = new IntersectionObserver(
13791
+ ([entry]) => {
13792
+ if (entry.isIntersecting) el.play().catch(() => {
13793
+ });
13794
+ else el.pause();
13795
+ },
13796
+ { threshold: 0.1 }
13797
+ );
13798
+ io.observe(el);
13799
+ return () => io.disconnect();
13800
+ }, [videoUrl]);
13801
+ const [faqsExpanded, setFaqsExpanded] = React30.useState(false);
13802
+ const [tripsExpanded, setTripsExpanded] = React30.useState(false);
13803
+ const [filterValue, setFilterValue] = React30.useState({});
13804
+ const [sort, setSort] = React30.useState(
13758
13805
  defaultSort != null ? defaultSort : (_a = sortOptions == null ? void 0 : sortOptions[0]) == null ? void 0 : _a.id
13759
13806
  );
13760
- const sortedTrips = React29.useMemo(() => {
13807
+ const sortedTrips = React30.useMemo(() => {
13761
13808
  const active = Object.entries(filterValue).filter(
13762
13809
  ([, vals]) => vals && vals.length > 0
13763
13810
  );
@@ -13818,15 +13865,36 @@ function CategoryPage2({
13818
13865
  !heroImage && "bg-gradient-to-br from-primary-900 via-primary-800 to-primary-950"
13819
13866
  ),
13820
13867
  children: [
13821
- heroImage && /* @__PURE__ */ jsxs("div", { className: "absolute inset-0 overflow-hidden", children: [
13822
- /* @__PURE__ */ jsx(
13868
+ (heroImage || videoUrl) && /* @__PURE__ */ jsxs("div", { className: "absolute inset-0 overflow-hidden", children: [
13869
+ heroImage && /* @__PURE__ */ jsx(
13823
13870
  "img",
13824
13871
  {
13825
13872
  src: heroImage,
13826
13873
  alt: "",
13827
13874
  "aria-hidden": true,
13828
13875
  fetchPriority: "high",
13829
- className: "absolute inset-0 h-full w-full object-cover"
13876
+ className: cn(
13877
+ "absolute inset-0 h-full w-full object-cover transition-opacity duration-700",
13878
+ videoUrl && videoReady ? "opacity-0" : "opacity-100"
13879
+ )
13880
+ }
13881
+ ),
13882
+ videoUrl && /* @__PURE__ */ jsx(
13883
+ "video",
13884
+ {
13885
+ ref: videoRef,
13886
+ src: isHls ? void 0 : videoUrl,
13887
+ autoPlay: true,
13888
+ muted: true,
13889
+ loop: true,
13890
+ playsInline: true,
13891
+ preload: "auto",
13892
+ poster: heroImage,
13893
+ onCanPlay: () => setVideoReady(true),
13894
+ className: cn(
13895
+ "absolute inset-0 h-full w-full object-cover transition-opacity duration-700",
13896
+ videoReady ? "opacity-100" : "opacity-0"
13897
+ )
13830
13898
  }
13831
13899
  ),
13832
13900
  /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-b from-black/55 via-black/40 to-black/65" })
@@ -13838,10 +13906,29 @@ function CategoryPage2({
13838
13906
  })
13839
13907
  ),
13840
13908
  /* @__PURE__ */ jsxs("div", { className: "relative mx-auto w-full max-w-6xl px-6 sm:px-8", children: [
13841
- breadcrumb && breadcrumb.length > 0 && /* @__PURE__ */ jsx("div", { className: "mb-3 flex items-center gap-1.5 flex-wrap", children: breadcrumb.map((crumb, i) => /* @__PURE__ */ jsxs(React29.Fragment, { children: [
13842
- i > 0 && /* @__PURE__ */ jsx(ChevronRightIcon, { className: "h-3 w-3 text-white/50 shrink-0" }),
13843
- /* @__PURE__ */ jsx("span", { className: "text-xs text-white/70 font-ui", children: crumb.label })
13844
- ] }, i)) }),
13909
+ breadcrumb && breadcrumb.length > 0 && /* @__PURE__ */ jsx("div", { className: "mb-3 flex items-center gap-1.5 flex-wrap", children: breadcrumb.map((crumb, i) => {
13910
+ const isLast = i === breadcrumb.length - 1;
13911
+ return /* @__PURE__ */ jsxs(React30.Fragment, { children: [
13912
+ i > 0 && /* @__PURE__ */ jsx(ChevronRightIcon, { className: "h-3 w-3 text-white/50 shrink-0" }),
13913
+ crumb.href && !isLast ? /* @__PURE__ */ jsx(
13914
+ "a",
13915
+ {
13916
+ href: crumb.href,
13917
+ className: "text-xs text-white/70 font-ui hover:text-white hover:underline transition-colors",
13918
+ children: crumb.label
13919
+ }
13920
+ ) : /* @__PURE__ */ jsx(
13921
+ "span",
13922
+ {
13923
+ className: cn(
13924
+ "text-xs font-ui",
13925
+ isLast ? "text-white" : "text-white/70"
13926
+ ),
13927
+ children: crumb.label
13928
+ }
13929
+ )
13930
+ ] }, i);
13931
+ }) }),
13845
13932
  /* @__PURE__ */ jsx("h1", { className: "text-3xl sm:text-5xl font-bold text-white font-heading leading-tight max-w-3xl", children: title }),
13846
13933
  intro && /* @__PURE__ */ jsx("div", { className: "mt-4 text-base sm:text-lg text-white/90 leading-relaxed max-w-2xl [&_strong]:font-semibold [&_a]:underline", children: intro }),
13847
13934
  trustpilotMini && /* @__PURE__ */ jsx("div", { className: "mt-5 max-w-sm", children: /* @__PURE__ */ jsx(TrustpilotEmbed, { config: trustpilotMini }) })
@@ -14108,12 +14195,12 @@ function Toast({
14108
14195
  duration = 6e3,
14109
14196
  className
14110
14197
  }) {
14111
- const [mounted, setMounted] = React29.useState(false);
14112
- const [visible, setVisible] = React29.useState(true);
14113
- React29.useEffect(() => {
14198
+ const [mounted, setMounted] = React30.useState(false);
14199
+ const [visible, setVisible] = React30.useState(true);
14200
+ React30.useEffect(() => {
14114
14201
  setMounted(true);
14115
14202
  }, []);
14116
- React29.useEffect(() => {
14203
+ React30.useEffect(() => {
14117
14204
  if (duration === 0) return;
14118
14205
  const t = setTimeout(() => {
14119
14206
  setVisible(false);
@@ -15615,8 +15702,8 @@ function ShareWidget({
15615
15702
  title = "Invite friends & lower the price",
15616
15703
  className
15617
15704
  }) {
15618
- const [copied, setCopied] = React29.useState(false);
15619
- const [showToast, setShowToast] = React29.useState(false);
15705
+ const [copied, setCopied] = React30.useState(false);
15706
+ const [showToast, setShowToast] = React30.useState(false);
15620
15707
  const encodedUrl = encodeURIComponent(url);
15621
15708
  const encodedMsg = encodeURIComponent(`${message} ${url}`);
15622
15709
  const channels = [