@planetaexo/design-system 0.37.2 → 0.37.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var React8 = require('react');
3
+ var React28 = 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 React8__namespace = /*#__PURE__*/_interopNamespace(React8);
40
+ var React28__namespace = /*#__PURE__*/_interopNamespace(React28);
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 = React8__namespace.forwardRef(
105
+ var Button = React28__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(
@@ -186,6 +186,10 @@ function Dialog(_a) {
186
186
  var props = __objRest(_a, []);
187
187
  return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Root, __spreadValues({ "data-slot": "dialog" }, props));
188
188
  }
189
+ function DialogTrigger(_a) {
190
+ var props = __objRest(_a, []);
191
+ return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Trigger, __spreadValues({ "data-slot": "dialog-trigger" }, props));
192
+ }
189
193
  function DialogPortal(_a) {
190
194
  var props = __objRest(_a, []);
191
195
  return /* @__PURE__ */ jsxRuntime.jsx(dialog.Dialog.Portal, __spreadValues({ "data-slot": "dialog-portal" }, props));
@@ -323,10 +327,10 @@ function DialogDescription(_a) {
323
327
  }, props)
324
328
  );
325
329
  }
326
- var FloatingInput = React8__namespace.forwardRef(
330
+ var FloatingInput = React28__namespace.forwardRef(
327
331
  (_a, ref) => {
328
332
  var _b = _a, { label, error, id, className, required } = _b, props = __objRest(_b, ["label", "error", "id", "className", "required"]);
329
- const inputId = id != null ? id : React8__namespace.useId();
333
+ const inputId = id != null ? id : React28__namespace.useId();
330
334
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
331
335
  /* @__PURE__ */ jsxRuntime.jsx(
332
336
  "input",
@@ -366,10 +370,10 @@ var FloatingInput = React8__namespace.forwardRef(
366
370
  }
367
371
  );
368
372
  FloatingInput.displayName = "FloatingInput";
369
- var FloatingSelect = React8__namespace.forwardRef(
373
+ var FloatingSelect = React28__namespace.forwardRef(
370
374
  (_a, ref) => {
371
375
  var _b = _a, { label, error, id, className, required, children, value } = _b, props = __objRest(_b, ["label", "error", "id", "className", "required", "children", "value"]);
372
- const inputId = id != null ? id : React8__namespace.useId();
376
+ const inputId = id != null ? id : React28__namespace.useId();
373
377
  const hasValue = typeof value === "string" ? value !== "" : value !== void 0 && value !== null;
374
378
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
375
379
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -633,11 +637,11 @@ function PhoneCountrySelect({
633
637
  disabled
634
638
  }) {
635
639
  var _a;
636
- const [open, setOpen] = React8__namespace.useState(false);
637
- const containerRef = React8__namespace.useRef(null);
638
- const listRef = React8__namespace.useRef(null);
640
+ const [open, setOpen] = React28__namespace.useState(false);
641
+ const containerRef = React28__namespace.useRef(null);
642
+ const listRef = React28__namespace.useRef(null);
639
643
  const selected = (_a = PHONE_COUNTRIES.find((c) => c.code === value)) != null ? _a : PHONE_COUNTRIES[0];
640
- React8__namespace.useEffect(() => {
644
+ React28__namespace.useEffect(() => {
641
645
  if (!open) return;
642
646
  const handler = (e) => {
643
647
  var _a2;
@@ -648,7 +652,7 @@ function PhoneCountrySelect({
648
652
  document.addEventListener("mousedown", handler);
649
653
  return () => document.removeEventListener("mousedown", handler);
650
654
  }, [open]);
651
- React8__namespace.useEffect(() => {
655
+ React28__namespace.useEffect(() => {
652
656
  if (!open || !listRef.current) return;
653
657
  const activeEl = listRef.current.querySelector("[data-selected=true]");
654
658
  activeEl == null ? void 0 : activeEl.scrollIntoView({ block: "nearest" });
@@ -918,8 +922,8 @@ function CalendarDayButton(_a) {
918
922
  "locale"
919
923
  ]);
920
924
  const defaultClassNames = reactDayPicker.getDefaultClassNames();
921
- const ref = React8__namespace.useRef(null);
922
- React8__namespace.useEffect(() => {
925
+ const ref = React28__namespace.useRef(null);
926
+ React28__namespace.useEffect(() => {
923
927
  var _a2;
924
928
  if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
925
929
  }, [modifiers.focused]);
@@ -950,16 +954,16 @@ function BirthDateField({
950
954
  className,
951
955
  disabled
952
956
  }) {
953
- const [open, setOpen] = React8__namespace.useState(false);
954
- const [text, setText] = React8__namespace.useState(
957
+ const [open, setOpen] = React28__namespace.useState(false);
958
+ const [text, setText] = React28__namespace.useState(
955
959
  value ? dateFns.format(value, "dd/MM/yyyy") : ""
956
960
  );
957
- const containerRef = React8__namespace.useRef(null);
958
- const inputId = React8__namespace.useId();
959
- React8__namespace.useEffect(() => {
961
+ const containerRef = React28__namespace.useRef(null);
962
+ const inputId = React28__namespace.useId();
963
+ React28__namespace.useEffect(() => {
960
964
  setText(value ? dateFns.format(value, "dd/MM/yyyy") : "");
961
965
  }, [value]);
962
- React8__namespace.useEffect(() => {
966
+ React28__namespace.useEffect(() => {
963
967
  if (!open) return;
964
968
  const handler = (e) => {
965
969
  var _a;
@@ -1168,14 +1172,14 @@ function CountrySearchField({
1168
1172
  }) {
1169
1173
  var _a;
1170
1174
  const list = countries != null ? countries : COUNTRIES;
1171
- const [query, setQuery] = React8__namespace.useState("");
1172
- const [open, setOpen] = React8__namespace.useState(false);
1173
- const containerRef = React8__namespace.useRef(null);
1174
- const searchRef = React8__namespace.useRef(null);
1175
+ const [query, setQuery] = React28__namespace.useState("");
1176
+ const [open, setOpen] = React28__namespace.useState(false);
1177
+ const containerRef = React28__namespace.useRef(null);
1178
+ const searchRef = React28__namespace.useRef(null);
1175
1179
  const selected = list.find((c) => c.code === value);
1176
1180
  const isFloated = open || !!selected;
1177
1181
  const filtered = query.trim() ? list.filter((c) => c.name.toLowerCase().includes(query.toLowerCase())) : list;
1178
- React8__namespace.useEffect(() => {
1182
+ React28__namespace.useEffect(() => {
1179
1183
  if (!open) return;
1180
1184
  const handler = (e) => {
1181
1185
  var _a2;
@@ -1289,7 +1293,7 @@ function AdventureCard({
1289
1293
  }) {
1290
1294
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
1291
1295
  const isControlled = (_b = (_a = adventure.optionals) == null ? void 0 : _a.some((o) => o.onCheckedChange !== void 0)) != null ? _b : false;
1292
- const [checkedInternal, setCheckedInternal] = React8__namespace.useState(
1296
+ const [checkedInternal, setCheckedInternal] = React28__namespace.useState(
1293
1297
  new Set((_d = (_c = adventure.optionals) == null ? void 0 : _c.filter((o) => o.defaultChecked).map((o) => o.id)) != null ? _d : [])
1294
1298
  );
1295
1299
  const isChecked = (opt) => {
@@ -1687,7 +1691,7 @@ function BookingShell({
1687
1691
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card overflow-hidden", children: [
1688
1692
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-border px-5 py-4 bg-muted/20", children: [
1689
1693
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-bold text-foreground font-heading mb-2", children: title }),
1690
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: steps.map((label, i) => /* @__PURE__ */ jsxRuntime.jsxs(React8__namespace.Fragment, { children: [
1694
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: steps.map((label, i) => /* @__PURE__ */ jsxRuntime.jsxs(React28__namespace.Fragment, { children: [
1691
1695
  /* @__PURE__ */ jsxRuntime.jsx(
1692
1696
  "span",
1693
1697
  {
@@ -1886,7 +1890,7 @@ function TermsSection({
1886
1890
  termsContent
1887
1891
  }) {
1888
1892
  var _a;
1889
- const [modalOpen, setModalOpen] = React8__namespace.useState(false);
1893
+ const [modalOpen, setModalOpen] = React28__namespace.useState(false);
1890
1894
  const i18n = (_a = TERMS_I18N[locale]) != null ? _a : TERMS_I18N.en;
1891
1895
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-border p-4 flex flex-col gap-3", children: [
1892
1896
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: title }),
@@ -2024,9 +2028,9 @@ function BookingWizard({
2024
2028
  }) {
2025
2029
  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;
2026
2030
  const wizardSteps = WIZARD_STEPS_FN(labels);
2027
- const [step, setStep] = React8__namespace.useState("responsible");
2028
- const [error, setError] = React8__namespace.useState(null);
2029
- const [responsible, setResponsible] = React8__namespace.useState({
2031
+ const [step, setStep] = React28__namespace.useState("responsible");
2032
+ const [error, setError] = React28__namespace.useState(null);
2033
+ const [responsible, setResponsible] = React28__namespace.useState({
2030
2034
  firstName: "",
2031
2035
  lastName: "",
2032
2036
  email: "",
@@ -2045,7 +2049,7 @@ function BookingWizard({
2045
2049
  return s + ((_b2 = (_a2 = a.slots) == null ? void 0 : _a2.children) != null ? _b2 : 0);
2046
2050
  }, 0);
2047
2051
  const totalPax = totalAdults + totalChildren;
2048
- const [travellers, setTravellers] = React8__namespace.useState(
2052
+ const [travellers, setTravellers] = React28__namespace.useState(
2049
2053
  Array.from({ length: Math.max(totalPax, 1) }, () => ({
2050
2054
  firstName: "",
2051
2055
  lastName: "",
@@ -2053,9 +2057,9 @@ function BookingWizard({
2053
2057
  email: ""
2054
2058
  }))
2055
2059
  );
2056
- const [payAmount, setPayAmount] = React8__namespace.useState("full");
2057
- const [payMethod, setPayMethod] = React8__namespace.useState("stripe");
2058
- const [termsAccepted, setTermsAccepted] = React8__namespace.useState(false);
2060
+ const [payAmount, setPayAmount] = React28__namespace.useState("full");
2061
+ const [payMethod, setPayMethod] = React28__namespace.useState("stripe");
2062
+ const [termsAccepted, setTermsAccepted] = React28__namespace.useState(false);
2059
2063
  const setR = (k, v) => setResponsible((p) => __spreadProps(__spreadValues({}, p), { [k]: v }));
2060
2064
  const setT = (i, k, v) => setTravellers((prev) => prev.map((t, idx) => idx === i ? __spreadProps(__spreadValues({}, t), { [k]: v }) : t));
2061
2065
  const setTDob = (i, v) => setTravellers((prev) => prev.map((t, idx) => idx === i ? __spreadProps(__spreadValues({}, t), { dateOfBirth: v }) : t));
@@ -2279,13 +2283,16 @@ function Offer({
2279
2283
  labels,
2280
2284
  confirmedState,
2281
2285
  interactionsDisabled,
2286
+ internalDemoCheckout = false,
2282
2287
  className
2283
2288
  }) {
2284
2289
  var _a, _b, _c;
2285
- const [showBooking, setShowBooking] = React8__namespace.useState(false);
2286
- const isShowingCheckout = !confirmedState && (!!checkoutSlot || showBooking);
2290
+ const [showBooking, setShowBooking] = React28__namespace.useState(false);
2291
+ const isShowingCheckout = !confirmedState && (!!checkoutSlot || internalDemoCheckout && showBooking);
2287
2292
  const handleBook = () => {
2288
- if (!checkoutSlot && !externalBookingFlow) setShowBooking(true);
2293
+ if (!checkoutSlot && !externalBookingFlow && internalDemoCheckout) {
2294
+ setShowBooking(true);
2295
+ }
2289
2296
  onContinue == null ? void 0 : onContinue();
2290
2297
  };
2291
2298
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("w-full max-w-5xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col gap-6 pb-20 lg:pb-12", className), children: [
@@ -2330,7 +2337,7 @@ function Offer({
2330
2337
  labels
2331
2338
  }
2332
2339
  ),
2333
- isShowingCheckout && (checkoutSlot != null ? checkoutSlot : /* @__PURE__ */ jsxRuntime.jsx(
2340
+ isShowingCheckout && (checkoutSlot != null ? checkoutSlot : internalDemoCheckout ? /* @__PURE__ */ jsxRuntime.jsx(
2334
2341
  BookingWizard,
2335
2342
  {
2336
2343
  adventures,
@@ -2339,7 +2346,7 @@ function Offer({
2339
2346
  onCancel: () => setShowBooking(false),
2340
2347
  labels
2341
2348
  }
2342
- ))
2349
+ ) : null)
2343
2350
  ] }) }),
2344
2351
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:sticky lg:top-8", children: /* @__PURE__ */ jsxRuntime.jsx(
2345
2352
  OfferSidebar,
@@ -2647,7 +2654,7 @@ function AdventureSection({
2647
2654
  labels
2648
2655
  }) {
2649
2656
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r;
2650
- const [detailsOpen, setDetailsOpen] = React8__namespace.useState(false);
2657
+ const [detailsOpen, setDetailsOpen] = React28__namespace.useState(false);
2651
2658
  const handleCopyUrl = (url) => {
2652
2659
  if (onCopyFormLink) {
2653
2660
  onCopyFormLink(url);
@@ -3159,8 +3166,8 @@ function AddTravellerDialog({
3159
3166
  errorMessage
3160
3167
  }) {
3161
3168
  var _a, _b, _c, _d, _e;
3162
- const [form, setForm] = React8__namespace.useState(() => createInitialAddFormData(config));
3163
- React8__namespace.useEffect(() => {
3169
+ const [form, setForm] = React28__namespace.useState(() => createInitialAddFormData(config));
3170
+ React28__namespace.useEffect(() => {
3164
3171
  if (open) {
3165
3172
  setForm(createInitialAddFormData(config));
3166
3173
  }
@@ -3220,7 +3227,7 @@ function EditTravellerDialog({
3220
3227
  errorMessage
3221
3228
  }) {
3222
3229
  var _a, _b, _c, _d, _e;
3223
- const [form, setForm] = React8__namespace.useState(() => ({
3230
+ const [form, setForm] = React28__namespace.useState(() => ({
3224
3231
  firstName: "",
3225
3232
  lastName: "",
3226
3233
  email: "",
@@ -3229,7 +3236,7 @@ function EditTravellerDialog({
3229
3236
  birthDate: "",
3230
3237
  personType: "ADULT"
3231
3238
  }));
3232
- React8__namespace.useEffect(() => {
3239
+ React28__namespace.useEffect(() => {
3233
3240
  var _a2, _b2, _c2, _d2, _e2, _f;
3234
3241
  if (open && traveller) {
3235
3242
  setForm({
@@ -3564,48 +3571,48 @@ function BookingDetails({
3564
3571
  const hasSubmitAddTraveller = !!onSubmitAddTraveller;
3565
3572
  const hasSubmitEditTraveller = !!onSubmitEditTraveller;
3566
3573
  const hasConfirmRemoveTraveller = !!onConfirmRemoveTraveller;
3567
- const [addModalState, setAddModalState] = React8__namespace.useState({
3574
+ const [addModalState, setAddModalState] = React28__namespace.useState({
3568
3575
  open: false,
3569
3576
  adventureId: null
3570
3577
  });
3571
- const [editModalState, setEditModalState] = React8__namespace.useState({ open: false, adventureId: null, traveller: null });
3572
- const [deleteModalState, setDeleteModalState] = React8__namespace.useState({ open: false, adventureId: null, traveller: null });
3573
- const [resendInviteDialogState, setResendInviteDialogState] = React8__namespace.useState({ open: false, traveller: null });
3574
- const handleRequestOpenAddModal = React8__namespace.useCallback((adventureId) => {
3578
+ const [editModalState, setEditModalState] = React28__namespace.useState({ open: false, adventureId: null, traveller: null });
3579
+ const [deleteModalState, setDeleteModalState] = React28__namespace.useState({ open: false, adventureId: null, traveller: null });
3580
+ const [resendInviteDialogState, setResendInviteDialogState] = React28__namespace.useState({ open: false, traveller: null });
3581
+ const handleRequestOpenAddModal = React28__namespace.useCallback((adventureId) => {
3575
3582
  setAddModalState({ open: true, adventureId });
3576
3583
  }, []);
3577
- const handleRequestOpenEditModal = React8__namespace.useCallback(
3584
+ const handleRequestOpenEditModal = React28__namespace.useCallback(
3578
3585
  (adventureId, traveller) => {
3579
3586
  setEditModalState({ open: true, adventureId, traveller });
3580
3587
  },
3581
3588
  []
3582
3589
  );
3583
- const handleRequestOpenDeleteModal = React8__namespace.useCallback(
3590
+ const handleRequestOpenDeleteModal = React28__namespace.useCallback(
3584
3591
  (adventureId, traveller) => {
3585
3592
  setDeleteModalState({ open: true, adventureId, traveller });
3586
3593
  },
3587
3594
  []
3588
3595
  );
3589
- const handleRequestOpenResendInviteDialog = React8__namespace.useCallback(
3596
+ const handleRequestOpenResendInviteDialog = React28__namespace.useCallback(
3590
3597
  (traveller) => {
3591
3598
  setResendInviteDialogState({ open: true, traveller });
3592
3599
  },
3593
3600
  []
3594
3601
  );
3595
- const closeAddModal = React8__namespace.useCallback(() => {
3602
+ const closeAddModal = React28__namespace.useCallback(() => {
3596
3603
  setAddModalState({ open: false, adventureId: null });
3597
3604
  }, []);
3598
- const closeEditModal = React8__namespace.useCallback(() => {
3605
+ const closeEditModal = React28__namespace.useCallback(() => {
3599
3606
  setEditModalState({ open: false, adventureId: null, traveller: null });
3600
3607
  }, []);
3601
- const closeDeleteModal = React8__namespace.useCallback(() => {
3608
+ const closeDeleteModal = React28__namespace.useCallback(() => {
3602
3609
  setDeleteModalState({ open: false, adventureId: null, traveller: null });
3603
3610
  }, []);
3604
- const closeResendInviteDialog = React8__namespace.useCallback(() => {
3611
+ const closeResendInviteDialog = React28__namespace.useCallback(() => {
3605
3612
  setResendInviteDialogState({ open: false, traveller: null });
3606
3613
  }, []);
3607
- const submitInFlightRef = React8__namespace.useRef(false);
3608
- const handleAddSubmit = React8__namespace.useCallback(
3614
+ const submitInFlightRef = React28__namespace.useRef(false);
3615
+ const handleAddSubmit = React28__namespace.useCallback(
3609
3616
  async (adventureId, data) => {
3610
3617
  if (!onSubmitAddTraveller) return;
3611
3618
  if (submitInFlightRef.current) return;
@@ -3620,7 +3627,7 @@ function BookingDetails({
3620
3627
  },
3621
3628
  [onSubmitAddTraveller, closeAddModal]
3622
3629
  );
3623
- const handleEditSubmit = React8__namespace.useCallback(
3630
+ const handleEditSubmit = React28__namespace.useCallback(
3624
3631
  async (adventureId, travellerId, data) => {
3625
3632
  if (!onSubmitEditTraveller) return;
3626
3633
  if (submitInFlightRef.current) return;
@@ -3635,7 +3642,7 @@ function BookingDetails({
3635
3642
  },
3636
3643
  [onSubmitEditTraveller, closeEditModal]
3637
3644
  );
3638
- const handleDeleteConfirm = React8__namespace.useCallback(
3645
+ const handleDeleteConfirm = React28__namespace.useCallback(
3639
3646
  async (adventureId, travellerId) => {
3640
3647
  if (!onConfirmRemoveTraveller) return;
3641
3648
  if (submitInFlightRef.current) return;
@@ -5109,7 +5116,7 @@ function BookingCreatedEmail({
5109
5116
  }, children: i + 1 }) }),
5110
5117
  /* @__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 }) })
5111
5118
  ] }) }) }, i)) }),
5112
- 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(React8__namespace.Fragment, { children: [
5119
+ 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(React28__namespace.Fragment, { children: [
5113
5120
  idx === 0 ? /* @__PURE__ */ jsxRuntime.jsx("strong", { children: line }) : line,
5114
5121
  idx < arr.length - 1 ? /* @__PURE__ */ jsxRuntime.jsx("br", {}) : null
5115
5122
  ] }, idx)) })
@@ -6478,11 +6485,11 @@ function DatePickerField({
6478
6485
  fromDate,
6479
6486
  className
6480
6487
  }) {
6481
- const [open, setOpen] = React8__namespace.useState(false);
6482
- const containerRef = React8__namespace.useRef(null);
6483
- const [calendarWidth, setCalendarWidth] = React8__namespace.useState();
6488
+ const [open, setOpen] = React28__namespace.useState(false);
6489
+ const containerRef = React28__namespace.useRef(null);
6490
+ const [calendarWidth, setCalendarWidth] = React28__namespace.useState();
6484
6491
  const hasValue = !!value;
6485
- React8__namespace.useEffect(() => {
6492
+ React28__namespace.useEffect(() => {
6486
6493
  if (!containerRef.current) return;
6487
6494
  const observer = new ResizeObserver(([entry]) => {
6488
6495
  setCalendarWidth(entry.contentRect.width);
@@ -6591,7 +6598,7 @@ function BookingForm({
6591
6598
  subtitle = "Free enquiry \u2013 no commitment",
6592
6599
  className
6593
6600
  }) {
6594
- const [values, setValues] = React8__namespace.useState(__spreadValues(__spreadValues({}, defaultInitial), defaultValues));
6601
+ const [values, setValues] = React28__namespace.useState(__spreadValues(__spreadValues({}, defaultInitial), defaultValues));
6595
6602
  const set = (key, value) => setValues((prev) => __spreadProps(__spreadValues({}, prev), { [key]: value }));
6596
6603
  const handleSubmit = (e) => {
6597
6604
  e.preventDefault();
@@ -7128,11 +7135,11 @@ function FloatingTextarea({
7128
7135
  }
7129
7136
  function SelectField({ field, value, onChange, error, disabled }) {
7130
7137
  var _a, _b, _c;
7131
- const [open, setOpen] = React8__namespace.useState(false);
7132
- const containerRef = React8__namespace.useRef(null);
7138
+ const [open, setOpen] = React28__namespace.useState(false);
7139
+ const containerRef = React28__namespace.useRef(null);
7133
7140
  const options = (_a = field.options) != null ? _a : [];
7134
7141
  const selectedOpt = (_b = options.find((o) => o.value === value)) != null ? _b : null;
7135
- React8__namespace.useEffect(() => {
7142
+ React28__namespace.useEffect(() => {
7136
7143
  if (!open) return;
7137
7144
  const handleOutside = (e) => {
7138
7145
  if (containerRef.current && !containerRef.current.contains(e.target)) {
@@ -7521,11 +7528,11 @@ function RegistrationForm({
7521
7528
  readOnly = false
7522
7529
  }) {
7523
7530
  var _a;
7524
- const L = React8__namespace.useMemo(
7531
+ const L = React28__namespace.useMemo(
7525
7532
  () => __spreadValues(__spreadValues({}, DEFAULT_LABELS9), labels != null ? labels : {}),
7526
7533
  [labels]
7527
7534
  );
7528
- const sortedFields = React8__namespace.useMemo(
7535
+ const sortedFields = React28__namespace.useMemo(
7529
7536
  () => [...fields].sort((a, b) => {
7530
7537
  var _a2, _b;
7531
7538
  return ((_a2 = a.order) != null ? _a2 : 0) - ((_b = b.order) != null ? _b : 0);
@@ -7533,7 +7540,7 @@ function RegistrationForm({
7533
7540
  [fields]
7534
7541
  );
7535
7542
  const isControlled = values !== void 0;
7536
- const [internal, setInternal] = React8__namespace.useState(
7543
+ const [internal, setInternal] = React28__namespace.useState(
7537
7544
  () => initializeValues(
7538
7545
  sortedFields,
7539
7546
  defaultValues != null ? defaultValues : {},
@@ -7541,9 +7548,9 @@ function RegistrationForm({
7541
7548
  includeTerms
7542
7549
  )
7543
7550
  );
7544
- const [submitAttempted, setSubmitAttempted] = React8__namespace.useState(false);
7545
- const [validationErrors, setValidationErrors] = React8__namespace.useState({});
7546
- React8__namespace.useEffect(() => {
7551
+ const [submitAttempted, setSubmitAttempted] = React28__namespace.useState(false);
7552
+ const [validationErrors, setValidationErrors] = React28__namespace.useState({});
7553
+ React28__namespace.useEffect(() => {
7547
7554
  if (isControlled) return;
7548
7555
  setInternal((prev) => {
7549
7556
  const next = initializeValues(
@@ -7600,7 +7607,7 @@ function RegistrationForm({
7600
7607
  const termsError = submitAttempted && termsEnabled && !termsAccepted;
7601
7608
  const firstErrorFieldId = Object.keys(fieldErrors)[0];
7602
7609
  const scrollTargetId = firstErrorFieldId ? `rf-${firstErrorFieldId}` : termsError ? "rf-terms" : null;
7603
- React8__namespace.useEffect(() => {
7610
+ React28__namespace.useEffect(() => {
7604
7611
  if (!submitAttempted || !scrollTargetId) return;
7605
7612
  const timer = setTimeout(() => {
7606
7613
  const elem = document.getElementById(scrollTargetId);
@@ -8062,10 +8069,10 @@ var OTPCodeInput = ({
8062
8069
  id,
8063
8070
  required
8064
8071
  }) => {
8065
- const baseId = id != null ? id : React8__namespace.useId();
8066
- const inputRef = React8__namespace.useRef(null);
8067
- const [focused, setFocused] = React8__namespace.useState(false);
8068
- const digits = React8__namespace.useMemo(() => {
8072
+ const baseId = id != null ? id : React28__namespace.useId();
8073
+ const inputRef = React28__namespace.useRef(null);
8074
+ const [focused, setFocused] = React28__namespace.useState(false);
8075
+ const digits = React28__namespace.useMemo(() => {
8069
8076
  const arr = value.split("").slice(0, length);
8070
8077
  while (arr.length < length) arr.push("");
8071
8078
  return arr;
@@ -8163,7 +8170,7 @@ function Checkbox(_a) {
8163
8170
  __spreadProps(__spreadValues({
8164
8171
  "data-slot": "checkbox",
8165
8172
  className: cn(
8166
- "peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
8173
+ "peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground dark:data-checked:bg-primary",
8167
8174
  className
8168
8175
  )
8169
8176
  }, props), {
@@ -8172,16 +8179,13 @@ function Checkbox(_a) {
8172
8179
  {
8173
8180
  "data-slot": "checkbox-indicator",
8174
8181
  className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
8175
- children: /* @__PURE__ */ jsxRuntime.jsx(
8176
- lucideReact.CheckIcon,
8177
- {}
8178
- )
8182
+ children: props.indeterminate ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MinusIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, {})
8179
8183
  }
8180
8184
  )
8181
8185
  })
8182
8186
  );
8183
8187
  }
8184
- var AccordionVariantContext = React8__namespace.createContext("default");
8188
+ var AccordionVariantContext = React28__namespace.createContext("default");
8185
8189
  function Accordion(_a) {
8186
8190
  var _b = _a, { className, variant = "default" } = _b, props = __objRest(_b, ["className", "variant"]);
8187
8191
  return /* @__PURE__ */ jsxRuntime.jsx(AccordionVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -8199,7 +8203,7 @@ function Accordion(_a) {
8199
8203
  }
8200
8204
  function AccordionItem(_a) {
8201
8205
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
8202
- const variant = React8__namespace.useContext(AccordionVariantContext);
8206
+ const variant = React28__namespace.useContext(AccordionVariantContext);
8203
8207
  return /* @__PURE__ */ jsxRuntime.jsx(
8204
8208
  accordion.Accordion.Item,
8205
8209
  __spreadValues({
@@ -8220,7 +8224,7 @@ function AccordionTrigger(_a) {
8220
8224
  "className",
8221
8225
  "children"
8222
8226
  ]);
8223
- const variant = React8__namespace.useContext(AccordionVariantContext);
8227
+ const variant = React28__namespace.useContext(AccordionVariantContext);
8224
8228
  return /* @__PURE__ */ jsxRuntime.jsx(accordion.Accordion.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
8225
8229
  accordion.Accordion.Trigger,
8226
8230
  __spreadProps(__spreadValues({
@@ -8274,7 +8278,7 @@ function AccordionContent(_a) {
8274
8278
  "className",
8275
8279
  "children"
8276
8280
  ]);
8277
- const variant = React8__namespace.useContext(AccordionVariantContext);
8281
+ const variant = React28__namespace.useContext(AccordionVariantContext);
8278
8282
  return /* @__PURE__ */ jsxRuntime.jsx(
8279
8283
  accordion.Accordion.Panel,
8280
8284
  __spreadProps(__spreadValues({
@@ -8297,6 +8301,187 @@ function AccordionContent(_a) {
8297
8301
  })
8298
8302
  );
8299
8303
  }
8304
+ function getLeafIds(item) {
8305
+ var _a;
8306
+ if (!((_a = item.children) == null ? void 0 : _a.length)) return [item.id];
8307
+ return item.children.flatMap(getLeafIds);
8308
+ }
8309
+ function getDefaultExpandedIds(items) {
8310
+ const out = [];
8311
+ const walk = (list) => {
8312
+ var _a;
8313
+ for (const i of list) {
8314
+ if ((_a = i.children) == null ? void 0 : _a.length) {
8315
+ if (i.defaultExpanded) out.push(i.id);
8316
+ walk(i.children);
8317
+ }
8318
+ }
8319
+ };
8320
+ walk(items);
8321
+ return out;
8322
+ }
8323
+ function getAllItemIds(items) {
8324
+ return items.flatMap(
8325
+ (i) => {
8326
+ var _a;
8327
+ return ((_a = i.children) == null ? void 0 : _a.length) ? [i.id, ...getAllItemIds(i.children)] : [i.id];
8328
+ }
8329
+ );
8330
+ }
8331
+ function findItemById(items, id) {
8332
+ var _a;
8333
+ for (const item of items) {
8334
+ if (item.id === id) return item;
8335
+ if ((_a = item.children) == null ? void 0 : _a.length) {
8336
+ const found = findItemById(item.children, id);
8337
+ if (found) return found;
8338
+ }
8339
+ }
8340
+ return void 0;
8341
+ }
8342
+ function resolveGroups(groups) {
8343
+ return groups.map((g) => {
8344
+ var _a;
8345
+ if (!g.scopeItemId) return g;
8346
+ const node = findItemById(g.items, g.scopeItemId);
8347
+ return __spreadProps(__spreadValues({}, g), { items: (_a = node == null ? void 0 : node.children) != null ? _a : [] });
8348
+ }).filter((g) => g.items.length > 0);
8349
+ }
8350
+ function FilterItemsList({
8351
+ items,
8352
+ groupId,
8353
+ groupSelected,
8354
+ onToggle,
8355
+ onBulkToggle,
8356
+ idPrefix,
8357
+ depth = 0,
8358
+ parentAsHeader = false,
8359
+ expandedItems,
8360
+ onToggleExpanded
8361
+ }) {
8362
+ return /* @__PURE__ */ jsxRuntime.jsx(
8363
+ "ul",
8364
+ {
8365
+ className: cn(
8366
+ "flex flex-col gap-0.5",
8367
+ !parentAsHeader && depth > 0 && "mt-0.5 ml-6 border-l border-border pl-3"
8368
+ ),
8369
+ children: items.map((item) => {
8370
+ var _a, _b;
8371
+ const isParent = !!((_a = item.children) == null ? void 0 : _a.length);
8372
+ const checkboxId = `${idPrefix}-${groupId}-${item.id}`;
8373
+ if (!isParent) {
8374
+ const checked = groupSelected.includes(item.id);
8375
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(
8376
+ "label",
8377
+ {
8378
+ htmlFor: checkboxId,
8379
+ className: "flex cursor-pointer items-center gap-3 rounded-md px-1 py-2 transition-colors hover:bg-muted/50",
8380
+ children: [
8381
+ /* @__PURE__ */ jsxRuntime.jsx(
8382
+ Checkbox,
8383
+ {
8384
+ id: checkboxId,
8385
+ checked,
8386
+ onCheckedChange: () => onToggle(item.id),
8387
+ className: "shrink-0"
8388
+ }
8389
+ ),
8390
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-sm text-foreground font-ui", children: item.label }),
8391
+ item.count !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-medium text-primary font-ui", children: [
8392
+ "(",
8393
+ item.count,
8394
+ ")"
8395
+ ] })
8396
+ ]
8397
+ }
8398
+ ) }, item.id);
8399
+ }
8400
+ if (parentAsHeader) {
8401
+ return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: cn(depth > 0 && "mt-1"), children: [
8402
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 pt-2 pb-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground", children: item.label }),
8403
+ /* @__PURE__ */ jsxRuntime.jsx(
8404
+ FilterItemsList,
8405
+ {
8406
+ items: item.children,
8407
+ groupId,
8408
+ groupSelected,
8409
+ onToggle,
8410
+ onBulkToggle,
8411
+ idPrefix,
8412
+ depth: depth + 1,
8413
+ parentAsHeader: true,
8414
+ expandedItems,
8415
+ onToggleExpanded
8416
+ }
8417
+ )
8418
+ ] }, item.id);
8419
+ }
8420
+ const leafIds = item.children.flatMap(getLeafIds);
8421
+ const selectedLeaves = leafIds.filter((id) => groupSelected.includes(id));
8422
+ const allSelected = leafIds.length > 0 && selectedLeaves.length === leafIds.length;
8423
+ const someSelected = selectedLeaves.length > 0 && !allSelected;
8424
+ const isExpanded = (_b = expandedItems == null ? void 0 : expandedItems.has(item.id)) != null ? _b : false;
8425
+ const panelId = `${checkboxId}-children`;
8426
+ return /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
8427
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "group/parent flex items-center gap-3 rounded-md px-1 py-2 transition-colors hover:bg-muted/50", children: [
8428
+ /* @__PURE__ */ jsxRuntime.jsx(
8429
+ Checkbox,
8430
+ {
8431
+ id: checkboxId,
8432
+ checked: allSelected,
8433
+ indeterminate: someSelected,
8434
+ onCheckedChange: () => onBulkToggle(leafIds, !allSelected),
8435
+ className: "shrink-0"
8436
+ }
8437
+ ),
8438
+ /* @__PURE__ */ jsxRuntime.jsxs(
8439
+ "button",
8440
+ {
8441
+ type: "button",
8442
+ onClick: () => onToggleExpanded == null ? void 0 : onToggleExpanded(item.id),
8443
+ "aria-expanded": isExpanded,
8444
+ "aria-controls": panelId,
8445
+ className: "flex flex-1 items-center gap-2 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring rounded-sm cursor-pointer",
8446
+ children: [
8447
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-sm font-bold text-foreground font-ui", children: item.label }),
8448
+ item.count !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-medium text-primary font-ui", children: [
8449
+ "(",
8450
+ item.count,
8451
+ ")"
8452
+ ] }),
8453
+ /* @__PURE__ */ jsxRuntime.jsx(
8454
+ lucideReact.ChevronDownIcon,
8455
+ {
8456
+ className: cn(
8457
+ "h-4 w-4 text-muted-foreground transition-transform",
8458
+ isExpanded && "rotate-180"
8459
+ )
8460
+ }
8461
+ )
8462
+ ]
8463
+ }
8464
+ )
8465
+ ] }),
8466
+ isExpanded && /* @__PURE__ */ jsxRuntime.jsx("div", { id: panelId, children: /* @__PURE__ */ jsxRuntime.jsx(
8467
+ FilterItemsList,
8468
+ {
8469
+ items: item.children,
8470
+ groupId,
8471
+ groupSelected,
8472
+ onToggle,
8473
+ onBulkToggle,
8474
+ idPrefix,
8475
+ depth: depth + 1,
8476
+ expandedItems,
8477
+ onToggleExpanded
8478
+ }
8479
+ ) })
8480
+ ] }, item.id);
8481
+ })
8482
+ }
8483
+ );
8484
+ }
8300
8485
  function FilterPanel({
8301
8486
  groups,
8302
8487
  value,
@@ -8304,15 +8489,32 @@ function FilterPanel({
8304
8489
  onClearAll,
8305
8490
  alwaysShowClear = false,
8306
8491
  title = "Filters",
8307
- className
8492
+ className,
8493
+ variant = "sidebar",
8494
+ sortOptions,
8495
+ sort,
8496
+ onSortChange
8308
8497
  }) {
8309
- const [internalValue, setInternalValue] = React8__namespace.useState(
8498
+ var _a, _b;
8499
+ const resolvedGroups = React28__namespace.useMemo(() => resolveGroups(groups), [groups]);
8500
+ const [internalValue, setInternalValue] = React28__namespace.useState(
8310
8501
  () => Object.fromEntries(groups.map((g) => [g.id, []]))
8311
8502
  );
8312
8503
  const selected = value != null ? value : internalValue;
8504
+ const [expandedItems, setExpandedItems] = React28__namespace.useState(
8505
+ () => new Set(groups.flatMap((g) => getDefaultExpandedIds(g.items)))
8506
+ );
8507
+ const toggleExpanded = React28__namespace.useCallback((id) => {
8508
+ setExpandedItems((prev) => {
8509
+ const next = new Set(prev);
8510
+ if (next.has(id)) next.delete(id);
8511
+ else next.add(id);
8512
+ return next;
8513
+ });
8514
+ }, []);
8313
8515
  const handleToggle = (groupId, itemId) => {
8314
- var _a;
8315
- const current = (_a = selected[groupId]) != null ? _a : [];
8516
+ var _a2;
8517
+ const current = (_a2 = selected[groupId]) != null ? _a2 : [];
8316
8518
  const next = current.includes(itemId) ? current.filter((id) => id !== itemId) : [...current, itemId];
8317
8519
  const nextValue = __spreadProps(__spreadValues({}, selected), { [groupId]: next });
8318
8520
  if (onChange) {
@@ -8321,8 +8523,24 @@ function FilterPanel({
8321
8523
  setInternalValue(nextValue);
8322
8524
  }
8323
8525
  };
8526
+ const handleBulkToggle = (groupId, itemIds, select) => {
8527
+ var _a2;
8528
+ const current = (_a2 = selected[groupId]) != null ? _a2 : [];
8529
+ const next = select ? Array.from(/* @__PURE__ */ new Set([...current, ...itemIds])) : current.filter((id) => !itemIds.includes(id));
8530
+ const nextValue = __spreadProps(__spreadValues({}, selected), { [groupId]: next });
8531
+ if (onChange) {
8532
+ onChange(nextValue);
8533
+ } else {
8534
+ setInternalValue(nextValue);
8535
+ }
8536
+ };
8324
8537
  const handleClearAll = () => {
8325
- const cleared = Object.fromEntries(groups.map((g) => [g.id, []]));
8538
+ var _a2;
8539
+ const cleared = __spreadValues({}, selected);
8540
+ for (const g of resolvedGroups) {
8541
+ const visible = new Set(getAllItemIds(g.items));
8542
+ cleared[g.id] = ((_a2 = selected[g.id]) != null ? _a2 : []).filter((id) => !visible.has(id));
8543
+ }
8326
8544
  if (onChange) {
8327
8545
  onChange(cleared);
8328
8546
  } else {
@@ -8330,9 +8548,289 @@ function FilterPanel({
8330
8548
  }
8331
8549
  onClearAll == null ? void 0 : onClearAll();
8332
8550
  };
8333
- const totalSelected = Object.values(selected).flat().length;
8551
+ const totalSelected = resolvedGroups.reduce((sum, g) => {
8552
+ var _a2;
8553
+ const visible = new Set(getAllItemIds(g.items));
8554
+ return sum + ((_a2 = selected[g.id]) != null ? _a2 : []).filter((id) => visible.has(id)).length;
8555
+ }, 0);
8334
8556
  const showClear = alwaysShowClear || totalSelected > 0;
8335
- const defaultOpenValues = groups.filter((g) => g.defaultOpen).map((g) => g.id);
8557
+ const defaultOpenValues = resolvedGroups.filter((g) => g.defaultOpen).map((g) => g.id);
8558
+ if (resolvedGroups.length === 0) return null;
8559
+ if (variant === "horizontal") {
8560
+ const activeSort = (_a = sortOptions == null ? void 0 : sortOptions.find((o) => o.id === sort)) != null ? _a : sortOptions == null ? void 0 : sortOptions[0];
8561
+ const drawerGroups = /* @__PURE__ */ jsxRuntime.jsx(Accordion, { defaultValue: defaultOpenValues, className: "flex flex-col gap-2", children: resolvedGroups.map((group) => {
8562
+ var _a2;
8563
+ const groupSelected = (_a2 = selected[group.id]) != null ? _a2 : [];
8564
+ return /* @__PURE__ */ jsxRuntime.jsxs(
8565
+ AccordionItem,
8566
+ {
8567
+ value: group.id,
8568
+ className: "border-0 border-b border-border last:border-b-0",
8569
+ children: [
8570
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "px-0 py-3.5 hover:no-underline transition-colors", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2.5", children: [
8571
+ group.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary shrink-0", children: group.icon }),
8572
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold text-foreground font-ui", children: group.label }),
8573
+ groupSelected.length > 0 && /* @__PURE__ */ jsxRuntime.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 })
8574
+ ] }) }),
8575
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "px-4 pb-3 pt-1", children: /* @__PURE__ */ jsxRuntime.jsx(
8576
+ FilterItemsList,
8577
+ {
8578
+ items: group.items,
8579
+ groupId: group.id,
8580
+ groupSelected,
8581
+ onToggle: (id) => handleToggle(group.id, id),
8582
+ onBulkToggle: (ids, select) => handleBulkToggle(group.id, ids, select),
8583
+ idPrefix: "mobile-filter",
8584
+ expandedItems,
8585
+ onToggleExpanded: toggleExpanded
8586
+ }
8587
+ ) })
8588
+ ]
8589
+ },
8590
+ group.id
8591
+ );
8592
+ }) });
8593
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("contents", className), children: [
8594
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex sm:hidden items-center gap-2", children: [
8595
+ /* @__PURE__ */ jsxRuntime.jsxs(Dialog, { children: [
8596
+ /* @__PURE__ */ jsxRuntime.jsxs(
8597
+ DialogTrigger,
8598
+ {
8599
+ render: /* @__PURE__ */ jsxRuntime.jsx(
8600
+ "button",
8601
+ {
8602
+ type: "button",
8603
+ className: cn(
8604
+ "flex-1 inline-flex items-center justify-between gap-2 rounded-xl border-2 border-foreground bg-background px-4 py-3",
8605
+ "text-sm font-ui font-bold text-foreground transition-colors hover:bg-muted",
8606
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
8607
+ )
8608
+ }
8609
+ ),
8610
+ children: [
8611
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
8612
+ title,
8613
+ totalSelected > 0 && /* @__PURE__ */ jsxRuntime.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 })
8614
+ ] }),
8615
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SlidersHorizontalIcon, { className: "h-4 w-4 text-foreground" })
8616
+ ]
8617
+ }
8618
+ ),
8619
+ /* @__PURE__ */ jsxRuntime.jsx(
8620
+ DialogContent,
8621
+ {
8622
+ className: cn(
8623
+ "p-0 sm:max-w-md",
8624
+ "max-w-none w-screen h-screen sm:h-auto sm:max-h-[90vh] rounded-none sm:rounded-2xl"
8625
+ ),
8626
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-full max-h-[90vh]", children: [
8627
+ /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "px-5 py-4 text-lg font-bold font-heading border-b border-border", children: title }),
8628
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-y-auto px-5 py-3", children: drawerGroups }),
8629
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-3 px-5 py-4 border-t border-border", children: [
8630
+ /* @__PURE__ */ jsxRuntime.jsx(
8631
+ "button",
8632
+ {
8633
+ type: "button",
8634
+ onClick: handleClearAll,
8635
+ className: "text-sm font-ui font-semibold text-muted-foreground underline underline-offset-2 hover:text-foreground",
8636
+ children: "Clear all"
8637
+ }
8638
+ ),
8639
+ /* @__PURE__ */ jsxRuntime.jsxs(
8640
+ DialogClose,
8641
+ {
8642
+ render: /* @__PURE__ */ jsxRuntime.jsx(
8643
+ "button",
8644
+ {
8645
+ type: "button",
8646
+ className: "inline-flex items-center justify-center rounded-full bg-foreground text-background px-6 py-2.5 text-sm font-ui font-bold hover:bg-foreground/90 transition-colors"
8647
+ }
8648
+ ),
8649
+ children: [
8650
+ "Show ",
8651
+ totalSelected > 0 ? `(${totalSelected})` : "",
8652
+ " results"
8653
+ ]
8654
+ }
8655
+ )
8656
+ ] })
8657
+ ] })
8658
+ }
8659
+ )
8660
+ ] }),
8661
+ sortOptions && sortOptions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
8662
+ /* @__PURE__ */ jsxRuntime.jsxs(
8663
+ PopoverTrigger,
8664
+ {
8665
+ render: /* @__PURE__ */ jsxRuntime.jsx(
8666
+ "button",
8667
+ {
8668
+ type: "button",
8669
+ className: cn(
8670
+ "inline-flex items-center gap-1.5 rounded-xl border border-border bg-background px-4 py-3",
8671
+ "text-sm font-ui font-bold text-foreground transition-colors hover:bg-muted",
8672
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
8673
+ )
8674
+ }
8675
+ ),
8676
+ children: [
8677
+ "Sort",
8678
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "h-4 w-4 text-muted-foreground" })
8679
+ ]
8680
+ }
8681
+ ),
8682
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { align: "end", sideOffset: 6, className: "w-52", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-0.5 p-0.5", children: sortOptions.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(
8683
+ "button",
8684
+ {
8685
+ type: "button",
8686
+ onClick: () => onSortChange == null ? void 0 : onSortChange(opt.id),
8687
+ className: cn(
8688
+ "flex items-center px-2 py-1.5 rounded-md text-sm text-left",
8689
+ opt.id === (activeSort == null ? void 0 : activeSort.id) ? "bg-muted text-foreground font-semibold" : "text-foreground/80 hover:bg-muted"
8690
+ ),
8691
+ children: opt.label
8692
+ },
8693
+ opt.id
8694
+ )) }) })
8695
+ ] })
8696
+ ] }),
8697
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden sm:flex items-center gap-2 flex-wrap", children: [
8698
+ resolvedGroups.map((group) => {
8699
+ var _a2, _b2;
8700
+ const selectedCount = ((_a2 = selected[group.id]) != null ? _a2 : []).length;
8701
+ const isActive = selectedCount > 0;
8702
+ return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
8703
+ /* @__PURE__ */ jsxRuntime.jsxs(
8704
+ PopoverTrigger,
8705
+ {
8706
+ render: /* @__PURE__ */ jsxRuntime.jsx(
8707
+ "button",
8708
+ {
8709
+ type: "button",
8710
+ className: cn(
8711
+ "inline-flex items-center gap-1.5 rounded-full border px-3.5 py-1.5",
8712
+ "text-sm font-ui font-semibold transition-colors",
8713
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
8714
+ isActive ? "border-foreground bg-foreground text-background" : "border-border bg-background text-foreground hover:bg-muted"
8715
+ )
8716
+ }
8717
+ ),
8718
+ children: [
8719
+ group.icon && /* @__PURE__ */ jsxRuntime.jsx(
8720
+ "span",
8721
+ {
8722
+ className: cn(
8723
+ "[&>svg]:h-3.5 [&>svg]:w-3.5",
8724
+ isActive ? "" : "text-muted-foreground"
8725
+ ),
8726
+ children: group.icon
8727
+ }
8728
+ ),
8729
+ group.label,
8730
+ selectedCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(
8731
+ "span",
8732
+ {
8733
+ className: cn(
8734
+ "inline-flex items-center justify-center rounded-full text-[10px] font-bold px-1.5 min-w-[18px] h-[18px]",
8735
+ isActive ? "bg-background text-foreground" : "bg-foreground text-background"
8736
+ ),
8737
+ children: selectedCount
8738
+ }
8739
+ ),
8740
+ /* @__PURE__ */ jsxRuntime.jsx(
8741
+ lucideReact.ChevronDownIcon,
8742
+ {
8743
+ className: cn(
8744
+ "h-3.5 w-3.5",
8745
+ isActive ? "text-background/70" : "text-muted-foreground"
8746
+ )
8747
+ }
8748
+ )
8749
+ ]
8750
+ }
8751
+ ),
8752
+ /* @__PURE__ */ jsxRuntime.jsx(
8753
+ PopoverContent,
8754
+ {
8755
+ align: "start",
8756
+ sideOffset: 6,
8757
+ className: "w-72 max-h-[60vh] overflow-y-auto",
8758
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5 p-2", children: [
8759
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 py-1 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground", children: group.label }),
8760
+ /* @__PURE__ */ jsxRuntime.jsx(
8761
+ FilterItemsList,
8762
+ {
8763
+ items: group.items,
8764
+ groupId: group.id,
8765
+ groupSelected: (_b2 = selected[group.id]) != null ? _b2 : [],
8766
+ onToggle: (id) => handleToggle(group.id, id),
8767
+ onBulkToggle: (ids, select) => handleBulkToggle(group.id, ids, select),
8768
+ idPrefix: "popover-filter",
8769
+ parentAsHeader: true,
8770
+ expandedItems,
8771
+ onToggleExpanded: toggleExpanded
8772
+ }
8773
+ )
8774
+ ] })
8775
+ }
8776
+ )
8777
+ ] }, group.id);
8778
+ }),
8779
+ totalSelected > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
8780
+ "button",
8781
+ {
8782
+ type: "button",
8783
+ onClick: handleClearAll,
8784
+ className: "inline-flex items-center gap-1 rounded-full px-3 py-1.5 text-xs font-ui font-semibold text-muted-foreground hover:text-foreground transition-colors",
8785
+ children: [
8786
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { className: "h-3 w-3" }),
8787
+ "Clear all (",
8788
+ totalSelected,
8789
+ ")"
8790
+ ]
8791
+ }
8792
+ ),
8793
+ sortOptions && sortOptions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-auto flex items-center gap-2", children: [
8794
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground font-ui hidden sm:inline", children: "Sort by" }),
8795
+ /* @__PURE__ */ jsxRuntime.jsxs(Popover, { children: [
8796
+ /* @__PURE__ */ jsxRuntime.jsxs(
8797
+ PopoverTrigger,
8798
+ {
8799
+ render: /* @__PURE__ */ jsxRuntime.jsx(
8800
+ "button",
8801
+ {
8802
+ type: "button",
8803
+ className: cn(
8804
+ "inline-flex items-center gap-1.5 rounded-full border border-border bg-background px-3.5 py-1.5",
8805
+ "text-sm font-ui font-semibold text-foreground hover:bg-muted transition-colors",
8806
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
8807
+ )
8808
+ }
8809
+ ),
8810
+ children: [
8811
+ (_b = activeSort == null ? void 0 : activeSort.label) != null ? _b : "Default",
8812
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "h-3.5 w-3.5 text-muted-foreground" })
8813
+ ]
8814
+ }
8815
+ ),
8816
+ /* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { align: "end", sideOffset: 6, className: "w-52", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-0.5 p-0.5", children: sortOptions.map((opt) => /* @__PURE__ */ jsxRuntime.jsx(
8817
+ "button",
8818
+ {
8819
+ type: "button",
8820
+ onClick: () => onSortChange == null ? void 0 : onSortChange(opt.id),
8821
+ className: cn(
8822
+ "flex items-center px-2 py-1.5 rounded-md text-sm text-left",
8823
+ opt.id === (activeSort == null ? void 0 : activeSort.id) ? "bg-muted text-foreground font-semibold" : "text-foreground/80 hover:bg-muted"
8824
+ ),
8825
+ children: opt.label
8826
+ },
8827
+ opt.id
8828
+ )) }) })
8829
+ ] })
8830
+ ] })
8831
+ ] })
8832
+ ] });
8833
+ }
8336
8834
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-4", className), children: [
8337
8835
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
8338
8836
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-bold text-foreground font-ui", children: title }),
@@ -8343,9 +8841,9 @@ function FilterPanel({
8343
8841
  {
8344
8842
  defaultValue: defaultOpenValues,
8345
8843
  className: "flex flex-col gap-2",
8346
- children: groups.map((group) => {
8347
- var _a;
8348
- const groupSelected = (_a = selected[group.id]) != null ? _a : [];
8844
+ children: resolvedGroups.map((group) => {
8845
+ var _a2;
8846
+ const groupSelected = (_a2 = selected[group.id]) != null ? _a2 : [];
8349
8847
  return /* @__PURE__ */ jsxRuntime.jsxs(
8350
8848
  AccordionItem,
8351
8849
  {
@@ -8357,34 +8855,19 @@ function FilterPanel({
8357
8855
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold text-foreground font-ui", children: group.label }),
8358
8856
  groupSelected.length > 0 && /* @__PURE__ */ jsxRuntime.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 })
8359
8857
  ] }) }),
8360
- /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "px-4 pb-3 pt-1", children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-0.5", children: group.items.map((item) => {
8361
- const checked = groupSelected.includes(item.id);
8362
- const checkboxId = `filter-${group.id}-${item.id}`;
8363
- return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(
8364
- "label",
8365
- {
8366
- htmlFor: checkboxId,
8367
- className: "flex cursor-pointer items-center gap-3 rounded-md px-1 py-2 transition-colors hover:bg-muted/50",
8368
- children: [
8369
- /* @__PURE__ */ jsxRuntime.jsx(
8370
- Checkbox,
8371
- {
8372
- id: checkboxId,
8373
- checked,
8374
- onCheckedChange: () => handleToggle(group.id, item.id),
8375
- className: "shrink-0"
8376
- }
8377
- ),
8378
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-sm text-foreground font-ui", children: item.label }),
8379
- item.count !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-medium text-primary font-ui", children: [
8380
- "(",
8381
- item.count,
8382
- ")"
8383
- ] })
8384
- ]
8385
- }
8386
- ) }, item.id);
8387
- }) }) })
8858
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "px-4 pb-3 pt-1", children: /* @__PURE__ */ jsxRuntime.jsx(
8859
+ FilterItemsList,
8860
+ {
8861
+ items: group.items,
8862
+ groupId: group.id,
8863
+ groupSelected,
8864
+ onToggle: (id) => handleToggle(group.id, id),
8865
+ onBulkToggle: (ids, select) => handleBulkToggle(group.id, ids, select),
8866
+ idPrefix: "filter",
8867
+ expandedItems,
8868
+ onToggleExpanded: toggleExpanded
8869
+ }
8870
+ ) })
8388
8871
  ]
8389
8872
  },
8390
8873
  group.id
@@ -8405,70 +8888,182 @@ function FilterPanel({
8405
8888
  var TRUSTPILOT_SCRIPT_SRC = "https://widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js";
8406
8889
  function TrustpilotEmbed({ config }) {
8407
8890
  var _a, _b, _c, _d, _e, _f;
8408
- const ref = React8__namespace.useRef(null);
8409
- React8__namespace.useEffect(() => {
8891
+ const ref = React28__namespace.useRef(null);
8892
+ const [widgetReady, setWidgetReady] = React28__namespace.useState(false);
8893
+ const [delayPassed, setDelayPassed] = React28__namespace.useState(false);
8894
+ const showFallback = delayPassed && !widgetReady;
8895
+ React28__namespace.useEffect(() => {
8896
+ var _a2;
8410
8897
  if (typeof document === "undefined" || !ref.current) return;
8898
+ const node = ref.current;
8411
8899
  let cancelled = false;
8900
+ const checkRendered = () => {
8901
+ if (!node) return false;
8902
+ if (node.querySelector("iframe")) return true;
8903
+ if (node.innerHTML.length > 200) return true;
8904
+ return false;
8905
+ };
8906
+ const observer = new MutationObserver(() => {
8907
+ if (cancelled) return;
8908
+ if (checkRendered()) setWidgetReady(true);
8909
+ });
8910
+ observer.observe(node, { childList: true, subtree: true });
8911
+ if (checkRendered()) setWidgetReady(true);
8412
8912
  const initWidget = () => {
8413
- if (cancelled || !ref.current) return;
8913
+ if (cancelled || !node) return;
8414
8914
  const tp = window.Trustpilot;
8415
8915
  if (tp == null ? void 0 : tp.loadFromElement) {
8416
- tp.loadFromElement(ref.current, true);
8916
+ tp.loadFromElement(node, true);
8417
8917
  }
8418
8918
  };
8419
8919
  const existing = document.querySelector(
8420
8920
  `script[src="${TRUSTPILOT_SCRIPT_SRC}"]`
8421
8921
  );
8922
+ let cleanupScriptListener;
8422
8923
  if (existing) {
8423
8924
  const tp = window.Trustpilot;
8424
8925
  if (tp == null ? void 0 : tp.loadFromElement) {
8425
8926
  initWidget();
8426
8927
  } else {
8427
8928
  existing.addEventListener("load", initWidget, { once: true });
8929
+ cleanupScriptListener = () => existing.removeEventListener("load", initWidget);
8428
8930
  }
8429
- return () => {
8430
- cancelled = true;
8431
- existing.removeEventListener("load", initWidget);
8432
- };
8931
+ } else {
8932
+ const s = document.createElement("script");
8933
+ s.src = TRUSTPILOT_SCRIPT_SRC;
8934
+ s.async = true;
8935
+ s.addEventListener("load", initWidget, { once: true });
8936
+ document.body.appendChild(s);
8937
+ cleanupScriptListener = () => s.removeEventListener("load", initWidget);
8433
8938
  }
8434
- const s = document.createElement("script");
8435
- s.src = TRUSTPILOT_SCRIPT_SRC;
8436
- s.async = true;
8437
- s.addEventListener("load", initWidget, { once: true });
8438
- document.body.appendChild(s);
8939
+ const delay = (_a2 = config.fallbackDelayMs) != null ? _a2 : 3e3;
8940
+ const timeout = setTimeout(() => {
8941
+ if (!cancelled) setDelayPassed(true);
8942
+ }, delay);
8439
8943
  return () => {
8440
8944
  cancelled = true;
8441
- s.removeEventListener("load", initWidget);
8945
+ clearTimeout(timeout);
8946
+ observer.disconnect();
8947
+ cleanupScriptListener == null ? void 0 : cleanupScriptListener();
8442
8948
  };
8443
8949
  }, [config]);
8444
8950
  const sku = Array.isArray(config.sku) ? config.sku.join(",") : config.sku;
8951
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
8952
+ /* @__PURE__ */ jsxRuntime.jsx(
8953
+ "div",
8954
+ {
8955
+ ref,
8956
+ className: "trustpilot-widget",
8957
+ "data-locale": (_a = config.locale) != null ? _a : "en-US",
8958
+ "data-template-id": (_b = config.templateId) != null ? _b : "5763bccae0a06d08e809ecbb",
8959
+ "data-businessunit-id": config.businessUnitId,
8960
+ "data-style-height": (_c = config.styleHeight) != null ? _c : "700px",
8961
+ "data-style-width": (_d = config.styleWidth) != null ? _d : "100%",
8962
+ "data-sku": sku,
8963
+ "data-no-reviews": (_e = config.noReviews) != null ? _e : "hide",
8964
+ "data-fullwidth": "true",
8965
+ "data-theme": config.theme,
8966
+ "data-token": config.token,
8967
+ "data-scroll-to-list": config.scrollToList ? "true" : void 0,
8968
+ "data-style-alignment": config.styleAlignment,
8969
+ "data-star-color": config.starColor,
8970
+ children: /* @__PURE__ */ jsxRuntime.jsx(
8971
+ "a",
8972
+ {
8973
+ href: (_f = config.fallbackHref) != null ? _f : "https://www.trustpilot.com/",
8974
+ target: "_blank",
8975
+ rel: "noopener noreferrer",
8976
+ children: "Trustpilot"
8977
+ }
8978
+ )
8979
+ }
8980
+ ),
8981
+ showFallback && /* @__PURE__ */ jsxRuntime.jsx(TrustpilotFallback, { config })
8982
+ ] });
8983
+ }
8984
+ function FallbackStar({ filled, className }) {
8445
8985
  return /* @__PURE__ */ jsxRuntime.jsx(
8446
- "div",
8986
+ "span",
8447
8987
  {
8448
- ref,
8449
- className: "trustpilot-widget",
8450
- "data-locale": (_a = config.locale) != null ? _a : "en-US",
8451
- "data-template-id": (_b = config.templateId) != null ? _b : "5763bccae0a06d08e809ecbb",
8452
- "data-businessunit-id": config.businessUnitId,
8453
- "data-style-height": (_c = config.styleHeight) != null ? _c : "700px",
8454
- "data-style-width": (_d = config.styleWidth) != null ? _d : "100%",
8455
- "data-sku": sku,
8456
- "data-no-reviews": (_e = config.noReviews) != null ? _e : "hide",
8457
- "data-fullwidth": "true",
8458
- "data-theme": config.theme,
8459
- "data-token": config.token,
8460
- "data-scroll-to-list": config.scrollToList ? "true" : void 0,
8461
- "data-style-alignment": config.styleAlignment,
8462
- "data-star-color": config.starColor,
8463
- children: /* @__PURE__ */ jsxRuntime.jsx(
8464
- "a",
8465
- {
8466
- href: (_f = config.fallbackHref) != null ? _f : "https://www.trustpilot.com/",
8467
- target: "_blank",
8468
- rel: "noopener noreferrer",
8469
- children: "Trustpilot"
8470
- }
8471
- )
8988
+ "aria-hidden": true,
8989
+ className: cn(
8990
+ "inline-flex items-center justify-center",
8991
+ filled ? "bg-[#00b67a] text-white" : "bg-muted text-muted-foreground",
8992
+ className
8993
+ ),
8994
+ children: /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", className: "h-[60%] w-[60%]", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z" }) })
8995
+ }
8996
+ );
8997
+ }
8998
+ function TrustpilotFallback({ config }) {
8999
+ var _a, _b, _c, _d, _e, _f;
9000
+ const score = (_a = config.fallbackScore) != null ? _a : 4.8;
9001
+ const count = (_b = config.fallbackCount) != null ? _b : 0;
9002
+ const label = (_c = config.fallbackLabel) != null ? _c : "Excellent";
9003
+ const href = (_d = config.fallbackHref) != null ? _d : "https://www.trustpilot.com/";
9004
+ const isDark = config.theme === "dark";
9005
+ const styleHeightPx = parseInt((_e = config.styleHeight) != null ? _e : "", 10);
9006
+ const autoVariant = Number.isFinite(styleHeightPx) && styleHeightPx > 0 && styleHeightPx < 120 ? "mini" : "card";
9007
+ const variant = (_f = config.fallbackVariant) != null ? _f : autoVariant;
9008
+ const filledStars = Math.round(score);
9009
+ if (variant === "mini") {
9010
+ return /* @__PURE__ */ jsxRuntime.jsxs(
9011
+ "a",
9012
+ {
9013
+ href,
9014
+ target: "_blank",
9015
+ rel: "noopener noreferrer",
9016
+ className: cn(
9017
+ "inline-flex items-center gap-2 text-sm font-ui no-underline hover:opacity-80 transition-opacity",
9018
+ isDark ? "text-white" : "text-foreground"
9019
+ ),
9020
+ children: [
9021
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-0.5", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(FallbackStar, { filled: i < filledStars, className: "h-4 w-4 rounded-[2px]" }, i)) }),
9022
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold", children: score.toFixed(1) }),
9023
+ count > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9024
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(isDark ? "text-white/60" : "text-muted-foreground"), children: "\xB7" }),
9025
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("text-xs", isDark ? "text-white/80" : "text-muted-foreground"), children: [
9026
+ count.toLocaleString(),
9027
+ " reviews"
9028
+ ] })
9029
+ ] }),
9030
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-xs", isDark ? "text-white/60" : "text-muted-foreground"), children: "on Trustpilot" })
9031
+ ]
9032
+ }
9033
+ );
9034
+ }
9035
+ return /* @__PURE__ */ jsxRuntime.jsxs(
9036
+ "a",
9037
+ {
9038
+ href,
9039
+ target: "_blank",
9040
+ rel: "noopener noreferrer",
9041
+ className: "block max-w-md mx-auto rounded-2xl border border-border bg-card p-8 text-center no-underline shadow-sm hover:shadow-md transition-shadow",
9042
+ children: [
9043
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center items-center gap-1 mb-3", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(FallbackStar, { filled: i < filledStars, className: "h-7 w-7 rounded-[3px]" }, i)) }),
9044
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-2xl font-bold text-foreground font-heading", children: [
9045
+ label,
9046
+ " ",
9047
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground font-normal", children: [
9048
+ "\xB7 ",
9049
+ score.toFixed(1),
9050
+ " / 5"
9051
+ ] })
9052
+ ] }),
9053
+ count > 0 && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm text-muted-foreground mt-2", children: [
9054
+ "Based on ",
9055
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-foreground", children: count.toLocaleString() }),
9056
+ " reviews"
9057
+ ] }),
9058
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground mt-4", children: "Reviews powered by Trustpilot" }),
9059
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "mt-5 inline-flex items-center gap-1.5 text-sm font-semibold text-primary border-b border-primary/40 pb-0.5", children: [
9060
+ "Read all reviews on Trustpilot",
9061
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { className: "h-3.5 w-3.5", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: [
9062
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
9063
+ /* @__PURE__ */ jsxRuntime.jsx("polyline", { points: "12 5 19 12 12 19" })
9064
+ ] })
9065
+ ] })
9066
+ ]
8472
9067
  }
8473
9068
  );
8474
9069
  }
@@ -8538,11 +9133,11 @@ function ItineraryModal({
8538
9133
  onNext
8539
9134
  }) {
8540
9135
  var _a, _b, _c;
8541
- const [imgIndex, setImgIndex] = React8__namespace.useState(0);
9136
+ const [imgIndex, setImgIndex] = React28__namespace.useState(0);
8542
9137
  const images = stop ? [stop.coverImage, ...(_a = stop.images) != null ? _a : []] : [];
8543
9138
  const isFirst = (stop == null ? void 0 : stop.dayNumber) === ((_b = allStops[0]) == null ? void 0 : _b.dayNumber);
8544
9139
  const isLast = (stop == null ? void 0 : stop.dayNumber) === ((_c = allStops[allStops.length - 1]) == null ? void 0 : _c.dayNumber);
8545
- React8__namespace.useEffect(() => {
9140
+ React28__namespace.useEffect(() => {
8546
9141
  setImgIndex(0);
8547
9142
  }, [stop == null ? void 0 : stop.dayNumber]);
8548
9143
  if (!stop) return null;
@@ -8669,8 +9264,8 @@ function ItineraryModal({
8669
9264
  ) });
8670
9265
  }
8671
9266
  function Itinerary({ title, subtitle, stops, className }) {
8672
- const [activeIndex, setActiveIndex] = React8__namespace.useState(null);
8673
- const scrollRef = React8__namespace.useRef(null);
9267
+ const [activeIndex, setActiveIndex] = React28__namespace.useState(null);
9268
+ const scrollRef = React28__namespace.useRef(null);
8674
9269
  const activeStop = activeIndex !== null ? stops[activeIndex] : null;
8675
9270
  const scrollBy = (dir) => {
8676
9271
  if (!scrollRef.current) return;
@@ -8762,18 +9357,18 @@ function Lightbox({
8762
9357
  onClose
8763
9358
  }) {
8764
9359
  var _a;
8765
- const [index, setIndex] = React8__namespace.useState(initialIndex);
9360
+ const [index, setIndex] = React28__namespace.useState(initialIndex);
8766
9361
  const total = photos.length;
8767
9362
  const photo = photos[index];
8768
- const prev = React8__namespace.useCallback(
9363
+ const prev = React28__namespace.useCallback(
8769
9364
  () => setIndex((i) => (i - 1 + total) % total),
8770
9365
  [total]
8771
9366
  );
8772
- const next = React8__namespace.useCallback(
9367
+ const next = React28__namespace.useCallback(
8773
9368
  () => setIndex((i) => (i + 1) % total),
8774
9369
  [total]
8775
9370
  );
8776
- React8__namespace.useEffect(() => {
9371
+ React28__namespace.useEffect(() => {
8777
9372
  const onKey = (e) => {
8778
9373
  if (e.key === "Escape") onClose();
8779
9374
  if (e.key === "ArrowLeft") prev();
@@ -8939,7 +9534,7 @@ function GridGallery({
8939
9534
  initialVisible,
8940
9535
  onOpen
8941
9536
  }) {
8942
- const [expanded, setExpanded] = React8__namespace.useState(false);
9537
+ const [expanded, setExpanded] = React28__namespace.useState(false);
8943
9538
  const cols = gridCols(photos.length);
8944
9539
  const hasMore = photos.length > initialVisible;
8945
9540
  const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
@@ -8964,12 +9559,41 @@ function GridGallery({
8964
9559
  )
8965
9560
  ] });
8966
9561
  }
9562
+ function CompactGridGallery({
9563
+ photos,
9564
+ initialVisible,
9565
+ onOpen
9566
+ }) {
9567
+ const [expanded, setExpanded] = React28__namespace.useState(false);
9568
+ const hasMore = photos.length > initialVisible;
9569
+ const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
9570
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
9571
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-2 lg:grid-cols-4", children: visible.map((p, i) => /* @__PURE__ */ jsxRuntime.jsx(
9572
+ PhotoTile,
9573
+ {
9574
+ photo: p,
9575
+ index: i,
9576
+ className: "aspect-[4/3]",
9577
+ onClick: () => onOpen(i)
9578
+ },
9579
+ i
9580
+ )) }),
9581
+ hasMore && /* @__PURE__ */ jsxRuntime.jsx(
9582
+ ShowMoreButton,
9583
+ {
9584
+ count: photos.length - initialVisible,
9585
+ expanded,
9586
+ onClick: () => setExpanded((v) => !v)
9587
+ }
9588
+ )
9589
+ ] });
9590
+ }
8967
9591
  function MasonryGallery({
8968
9592
  photos,
8969
9593
  initialVisible,
8970
9594
  onOpen
8971
9595
  }) {
8972
- const [expanded, setExpanded] = React8__namespace.useState(false);
9596
+ const [expanded, setExpanded] = React28__namespace.useState(false);
8973
9597
  const hasMore = photos.length > initialVisible;
8974
9598
  const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
8975
9599
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -9042,7 +9666,7 @@ function FeaturedGallery({
9042
9666
  photos,
9043
9667
  onOpen
9044
9668
  }) {
9045
- const [expanded, setExpanded] = React8__namespace.useState(false);
9669
+ const [expanded, setExpanded] = React28__namespace.useState(false);
9046
9670
  const featured = photos.slice(0, 3);
9047
9671
  const extra = photos.slice(3);
9048
9672
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -9209,9 +9833,9 @@ function PhotoGallery({
9209
9833
  onPhotoClick,
9210
9834
  className
9211
9835
  }) {
9212
- const [lightboxIndex, setLightboxIndex] = React8__namespace.useState(null);
9213
- const [carouselIndex, setCarouselIndex] = React8__namespace.useState(0);
9214
- const normalised = React8__namespace.useMemo(() => photos.map(normalise), [photos]);
9836
+ const [lightboxIndex, setLightboxIndex] = React28__namespace.useState(null);
9837
+ const [carouselIndex, setCarouselIndex] = React28__namespace.useState(0);
9838
+ const normalised = React28__namespace.useMemo(() => photos.map(normalise), [photos]);
9215
9839
  const handleOpen = (index) => {
9216
9840
  setLightboxIndex(index);
9217
9841
  onPhotoClick == null ? void 0 : onPhotoClick(normalised[index].src, index);
@@ -9253,6 +9877,14 @@ function PhotoGallery({
9253
9877
  onOpen: handleOpen
9254
9878
  }
9255
9879
  ),
9880
+ variant === "gridCompact" && /* @__PURE__ */ jsxRuntime.jsx(
9881
+ CompactGridGallery,
9882
+ {
9883
+ photos: normalised,
9884
+ initialVisible,
9885
+ onOpen: handleOpen
9886
+ }
9887
+ ),
9256
9888
  variant === "masonry" && /* @__PURE__ */ jsxRuntime.jsx(
9257
9889
  MasonryGallery,
9258
9890
  {
@@ -9287,7 +9919,7 @@ function ItineraryDay({
9287
9919
  photoLayout = "rounded",
9288
9920
  className
9289
9921
  }) {
9290
- const photoList = React8__namespace.useMemo(() => normalisePhotos(photos), [photos]);
9922
+ const photoList = React28__namespace.useMemo(() => normalisePhotos(photos), [photos]);
9291
9923
  const isFullBleed = photoLayout === "fullBleed" || photoLayout === "fullBleedBottom";
9292
9924
  const photoPosition = photoLayout === "fullBleedBottom" ? "bottom" : "top";
9293
9925
  const gallery = photoList.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
@@ -9306,13 +9938,16 @@ function ItineraryDay({
9306
9938
  specs && specs.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-3 sm:gap-2.5", children: specs.map((spec, i) => /* @__PURE__ */ jsxRuntime.jsxs(
9307
9939
  "li",
9308
9940
  {
9309
- className: "flex flex-col text-base text-foreground font-ui",
9941
+ className: "flex items-start gap-3 text-base text-foreground font-ui",
9310
9942
  children: [
9311
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-baseline gap-x-2", children: [
9312
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: spec.label }),
9313
- spec.detail && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: spec.detail })
9314
- ] }),
9315
- spec.subdetail && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: spec.subdetail })
9943
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-0.5 shrink-0 text-foreground", "aria-hidden": true, children: spec.icon }),
9944
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
9945
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-baseline gap-x-2", children: [
9946
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold", children: spec.label }),
9947
+ spec.detail && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: spec.detail })
9948
+ ] }),
9949
+ spec.subdetail && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: spec.subdetail })
9950
+ ] })
9316
9951
  ]
9317
9952
  },
9318
9953
  i
@@ -9339,8 +9974,8 @@ function MenuTrip({
9339
9974
  bold = true,
9340
9975
  className
9341
9976
  }) {
9342
- const scrollRef = React8__namespace.useRef(null);
9343
- React8__namespace.useEffect(() => {
9977
+ const scrollRef = React28__namespace.useRef(null);
9978
+ React28__namespace.useEffect(() => {
9344
9979
  if (!scrollRef.current || !activeSection) return;
9345
9980
  const container = scrollRef.current;
9346
9981
  const btn = container.querySelector(
@@ -9531,8 +10166,8 @@ function PricingTrip({
9531
10166
  className
9532
10167
  }) {
9533
10168
  const rOuter = sharp ? "rounded-none" : "rounded-2xl";
9534
- const [showEstimates, setShowEstimates] = React8__namespace.useState(false);
9535
- const [showPriceInfo, setShowPriceInfo] = React8__namespace.useState(false);
10169
+ const [showEstimates, setShowEstimates] = React28__namespace.useState(false);
10170
+ const [showPriceInfo, setShowPriceInfo] = React28__namespace.useState(false);
9536
10171
  if (variant === "compact") {
9537
10172
  const showOverlay = showPriceInfo && (!!priceInfo || !!currencyEstimates && currencyEstimates.length > 0);
9538
10173
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
@@ -9816,8 +10451,7 @@ var VARIANT = {
9816
10451
  mobileLink: "text-white hover:text-primary-400 border-b border-white/10",
9817
10452
  mobileSub: "text-white/70 font-bold hover:text-primary-400 border-b border-white/8",
9818
10453
  mobileLangActive: "text-primary-400 font-semibold",
9819
- mobileLangIdle: "text-white/40 hover:text-primary-400",
9820
- logoBlend: "mix-blend-screen"
10454
+ mobileLangIdle: "text-white/40 hover:text-primary-400"
9821
10455
  },
9822
10456
  white: {
9823
10457
  header: "bg-white border-b border-border shadow-sm",
@@ -9833,8 +10467,7 @@ var VARIANT = {
9833
10467
  mobileLink: "text-foreground/80 hover:text-foreground border-b border-border",
9834
10468
  mobileSub: "text-foreground/50 font-bold hover:text-foreground border-b border-border/40",
9835
10469
  mobileLangActive: "text-primary font-semibold",
9836
- mobileLangIdle: "text-muted-foreground hover:text-foreground",
9837
- logoBlend: "invert mix-blend-multiply"
10470
+ mobileLangIdle: "text-muted-foreground hover:text-foreground"
9838
10471
  },
9839
10472
  dark: {
9840
10473
  header: "bg-neutral-950 border-b border-white/10",
@@ -9850,8 +10483,7 @@ var VARIANT = {
9850
10483
  mobileLink: "text-white/80 hover:text-white border-b border-white/8",
9851
10484
  mobileSub: "text-white/45 font-bold hover:text-white border-b border-white/5",
9852
10485
  mobileLangActive: "text-white font-semibold",
9853
- mobileLangIdle: "text-white/35 hover:text-white/60",
9854
- logoBlend: "mix-blend-screen"
10486
+ mobileLangIdle: "text-white/35 hover:text-white/60"
9855
10487
  }
9856
10488
  };
9857
10489
  var DEFAULT_HEADER_LINKS = [
@@ -9961,7 +10593,9 @@ function LangDropdown({
9961
10593
  function SiteHeader({
9962
10594
  variant = "transparent",
9963
10595
  links = DEFAULT_HEADER_LINKS,
9964
- logoSrc = "/logo-planetaexo.png",
10596
+ logoSrcLight = "/logo-planetaexo-white.png",
10597
+ logoSrcDark = "/logo-planetaexo-green.png",
10598
+ logoSrc,
9965
10599
  logoAlt = "Planeta Exo",
9966
10600
  languages = DEFAULT_LANGUAGES,
9967
10601
  currentLanguage = "EN",
@@ -9972,14 +10606,15 @@ function SiteHeader({
9972
10606
  className
9973
10607
  }) {
9974
10608
  const t = VARIANT[variant];
9975
- const [openMenu, setOpenMenu] = React8__namespace.useState(null);
9976
- const [langOpen, setLangOpen] = React8__namespace.useState(false);
9977
- const [mobileOpen, setMobileOpen] = React8__namespace.useState(false);
9978
- const [openMobileSection, setOpenMobileSection] = React8__namespace.useState(null);
9979
- const [activeLang, setActiveLang] = React8__namespace.useState(currentLanguage);
10609
+ const resolvedLogo = logoSrc != null ? logoSrc : variant === "white" ? logoSrcDark : logoSrcLight;
10610
+ const [openMenu, setOpenMenu] = React28__namespace.useState(null);
10611
+ const [langOpen, setLangOpen] = React28__namespace.useState(false);
10612
+ const [mobileOpen, setMobileOpen] = React28__namespace.useState(false);
10613
+ const [openMobileSection, setOpenMobileSection] = React28__namespace.useState(null);
10614
+ const [activeLang, setActiveLang] = React28__namespace.useState(currentLanguage);
9980
10615
  const toggleMobileSection = (label) => setOpenMobileSection((prev) => prev === label ? null : label);
9981
- const menuCloseTimer = React8__namespace.useRef(void 0);
9982
- const langCloseTimer = React8__namespace.useRef(void 0);
10616
+ const menuCloseTimer = React28__namespace.useRef(void 0);
10617
+ const langCloseTimer = React28__namespace.useRef(void 0);
9983
10618
  const handleMenuEnter = (label) => {
9984
10619
  clearTimeout(menuCloseTimer.current);
9985
10620
  setOpenMenu(label);
@@ -10000,7 +10635,7 @@ function SiteHeader({
10000
10635
  setOpenMenu(null);
10001
10636
  setLangOpen(false);
10002
10637
  };
10003
- React8__namespace.useEffect(() => () => {
10638
+ React28__namespace.useEffect(() => () => {
10004
10639
  clearTimeout(menuCloseTimer.current);
10005
10640
  clearTimeout(langCloseTimer.current);
10006
10641
  }, []);
@@ -10020,17 +10655,41 @@ function SiteHeader({
10020
10655
  className
10021
10656
  ),
10022
10657
  children: [
10023
- variant === "transparent" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-x-0 top-0 h-52 bg-gradient-to-b from-black/55 via-black/20 to-transparent pointer-events-none" }),
10658
+ variant === "transparent" && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-x-0 top-0 h-52 bg-gradient-to-b from-black/70 via-black/30 to-transparent pointer-events-none" }),
10024
10659
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center gap-2 px-6 sm:px-10 h-[72px]", children: [
10025
- /* @__PURE__ */ jsxRuntime.jsx("a", { href: "#", className: "shrink-0 flex items-center mr-4", children: /* @__PURE__ */ jsxRuntime.jsx(
10026
- "img",
10660
+ /* @__PURE__ */ jsxRuntime.jsx(
10661
+ "button",
10027
10662
  {
10028
- src: logoSrc,
10029
- alt: logoAlt,
10030
- className: cn("h-11 w-auto select-none", t.logoBlend),
10031
- draggable: false
10663
+ type: "button",
10664
+ onClick: () => setMobileOpen(true),
10665
+ "aria-label": "Open menu",
10666
+ className: cn(
10667
+ "flex lg:hidden h-9 w-9 items-center justify-center rounded-full transition-colors -ml-1.5",
10668
+ t.mobileTrigger
10669
+ ),
10670
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MenuIcon, { className: "h-[18px] w-[18px]" })
10032
10671
  }
10033
- ) }),
10672
+ ),
10673
+ /* @__PURE__ */ jsxRuntime.jsx(
10674
+ "a",
10675
+ {
10676
+ href: "#",
10677
+ className: cn(
10678
+ "shrink-0 flex items-center",
10679
+ "absolute left-1/2 -translate-x-1/2",
10680
+ "lg:static lg:translate-x-0 lg:mr-4"
10681
+ ),
10682
+ children: /* @__PURE__ */ jsxRuntime.jsx(
10683
+ "img",
10684
+ {
10685
+ src: resolvedLogo,
10686
+ alt: logoAlt,
10687
+ className: "h-14 w-auto select-none",
10688
+ draggable: false
10689
+ }
10690
+ )
10691
+ }
10692
+ ),
10034
10693
  /* @__PURE__ */ jsxRuntime.jsx("nav", { className: "hidden lg:flex items-center gap-0.5 mx-auto", children: links.map((link) => {
10035
10694
  var _a, _b;
10036
10695
  const hasDropdown = !!((_a = link.items) == null ? void 0 : _a.length);
@@ -10154,19 +10813,6 @@ function SiteHeader({
10154
10813
  ),
10155
10814
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserIcon, { className: "h-[18px] w-[18px]" })
10156
10815
  }
10157
- ),
10158
- /* @__PURE__ */ jsxRuntime.jsx(
10159
- "button",
10160
- {
10161
- type: "button",
10162
- onClick: () => setMobileOpen(true),
10163
- "aria-label": "Open menu",
10164
- className: cn(
10165
- "flex lg:hidden h-9 w-9 items-center justify-center rounded-full transition-colors ml-0.5",
10166
- t.mobileTrigger
10167
- ),
10168
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MenuIcon, { className: "h-[18px] w-[18px]" })
10169
- }
10170
10816
  )
10171
10817
  ] })
10172
10818
  ] }),
@@ -10182,9 +10828,9 @@ function SiteHeader({
10182
10828
  /* @__PURE__ */ jsxRuntime.jsx("a", { href: "#", className: "shrink-0 flex items-center", onClick: () => setMobileOpen(false), children: /* @__PURE__ */ jsxRuntime.jsx(
10183
10829
  "img",
10184
10830
  {
10185
- src: logoSrc,
10831
+ src: resolvedLogo,
10186
10832
  alt: logoAlt,
10187
- className: cn("h-11 w-auto select-none", t.logoBlend),
10833
+ className: "h-14 w-auto select-none",
10188
10834
  draggable: false
10189
10835
  }
10190
10836
  ) }),
@@ -10265,7 +10911,7 @@ function SiteHeader({
10265
10911
  ), children: [
10266
10912
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: languages.map((lang, i) => {
10267
10913
  const isActive = lang.code === activeLang;
10268
- return /* @__PURE__ */ jsxRuntime.jsxs(React8__namespace.Fragment, { children: [
10914
+ return /* @__PURE__ */ jsxRuntime.jsxs(React28__namespace.Fragment, { children: [
10269
10915
  i > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
10270
10916
  "text-xs select-none",
10271
10917
  variant === "white" ? "text-border" : "text-white/15"
@@ -10327,8 +10973,8 @@ function SiteHeader({
10327
10973
  );
10328
10974
  }
10329
10975
  function ThemeToggle({ className }) {
10330
- const [dark, setDark] = React8__namespace.useState(false);
10331
- React8__namespace.useEffect(() => {
10976
+ const [dark, setDark] = React28__namespace.useState(false);
10977
+ React28__namespace.useEffect(() => {
10332
10978
  const saved = localStorage.getItem("theme");
10333
10979
  const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
10334
10980
  const isDark = saved === "dark" || !saved && prefersDark;
@@ -10357,6 +11003,44 @@ function ThemeToggle({ className }) {
10357
11003
  }
10358
11004
  );
10359
11005
  }
11006
+ var chipVariants = classVarianceAuthority.cva(
11007
+ "inline-flex items-center rounded-full font-ui font-medium transition-colors whitespace-nowrap",
11008
+ {
11009
+ variants: {
11010
+ variant: {
11011
+ glass: "border border-white/15 bg-black/30 text-white/85 backdrop-blur-sm hover:bg-white/10 hover:border-white/50 hover:text-white",
11012
+ solid: "bg-muted text-foreground/80 hover:bg-primary hover:text-primary-foreground",
11013
+ outline: "border border-border text-foreground/80 hover:bg-primary hover:border-primary hover:text-primary-foreground"
11014
+ },
11015
+ size: {
11016
+ sm: "px-2.5 py-0.5 text-[11px] leading-5",
11017
+ md: "px-3 py-1 text-xs leading-5",
11018
+ lg: "px-4 py-1.5 text-sm leading-5"
11019
+ }
11020
+ },
11021
+ defaultVariants: {
11022
+ variant: "glass",
11023
+ size: "sm"
11024
+ }
11025
+ }
11026
+ );
11027
+ var Chip = React28__namespace.forwardRef(function Chip2(_a, ref) {
11028
+ var _b = _a, { className, variant, size, href, children } = _b, props = __objRest(_b, ["className", "variant", "size", "href", "children"]);
11029
+ const classes = cn(chipVariants({ variant, size }), className);
11030
+ if (href) {
11031
+ return /* @__PURE__ */ jsxRuntime.jsx(
11032
+ "a",
11033
+ __spreadProps(__spreadValues({
11034
+ ref,
11035
+ href,
11036
+ className: classes
11037
+ }, props), {
11038
+ children
11039
+ })
11040
+ );
11041
+ }
11042
+ return /* @__PURE__ */ jsxRuntime.jsx("span", __spreadProps(__spreadValues({ ref, className: classes }, props), { children }));
11043
+ });
10360
11044
  function CalendarIcon6() {
10361
11045
  return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "13", height: "13", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", children: [
10362
11046
  /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }),
@@ -10407,19 +11091,125 @@ var statusConfig = {
10407
11091
  icon: /* @__PURE__ */ jsxRuntime.jsx(TrendingIcon, {})
10408
11092
  }
10409
11093
  };
10410
- function TripCard({
10411
- image,
10412
- imageAlt = "",
10413
- status,
10414
- nights,
10415
- period,
10416
- title,
10417
- description,
10418
- cta,
10419
- price,
10420
- size = "md",
10421
- className
10422
- }) {
11094
+ function HeartIcon({ filled = false }) {
11095
+ return /* @__PURE__ */ jsxRuntime.jsx(
11096
+ "svg",
11097
+ {
11098
+ width: "16",
11099
+ height: "16",
11100
+ viewBox: "0 0 24 24",
11101
+ fill: filled ? "currentColor" : "none",
11102
+ stroke: "currentColor",
11103
+ strokeWidth: "2",
11104
+ strokeLinecap: "round",
11105
+ strokeLinejoin: "round",
11106
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" })
11107
+ }
11108
+ );
11109
+ }
11110
+ function TripCardEditorial(props) {
11111
+ const {
11112
+ image,
11113
+ imageAlt = "",
11114
+ title,
11115
+ description,
11116
+ nights,
11117
+ price,
11118
+ href,
11119
+ className,
11120
+ favoritable,
11121
+ favorited: favoritedProp,
11122
+ onFavoriteToggle,
11123
+ location,
11124
+ difficulty,
11125
+ tag
11126
+ } = props;
11127
+ const [internalFav, setInternalFav] = React28__namespace.useState(false);
11128
+ const favorited = favoritedProp != null ? favoritedProp : internalFav;
11129
+ const handleFav = (e) => {
11130
+ e.preventDefault();
11131
+ e.stopPropagation();
11132
+ const next = !favorited;
11133
+ if (favoritedProp === void 0) setInternalFav(next);
11134
+ onFavoriteToggle == null ? void 0 : onFavoriteToggle(next);
11135
+ };
11136
+ const body = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11137
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative aspect-[4/3] overflow-hidden bg-muted", children: [
11138
+ /* @__PURE__ */ jsxRuntime.jsx(
11139
+ "img",
11140
+ {
11141
+ src: image,
11142
+ alt: imageAlt,
11143
+ loading: "lazy",
11144
+ className: "absolute inset-0 h-full w-full object-cover transition-transform duration-500 group-hover:scale-105"
11145
+ }
11146
+ ),
11147
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 bg-gradient-to-t from-black/85 via-black/20 to-transparent" }),
11148
+ tag && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-3 left-3 z-10 max-w-[calc(100%-4.5rem)]", children: /* @__PURE__ */ jsxRuntime.jsx(Chip, { variant: "glass", size: "sm", children: tag }) }),
11149
+ favoritable && /* @__PURE__ */ jsxRuntime.jsx(
11150
+ "button",
11151
+ {
11152
+ type: "button",
11153
+ "aria-label": favorited ? "Remove from favorites" : "Add to favorites",
11154
+ "aria-pressed": favorited,
11155
+ onClick: handleFav,
11156
+ className: cn(
11157
+ "absolute top-3 right-3 flex h-9 w-9 items-center justify-center rounded-full",
11158
+ "border border-white/15 bg-black/30 backdrop-blur-sm",
11159
+ "transition-colors hover:bg-white/10 hover:border-white/50",
11160
+ favorited ? "text-white" : "text-white/85 hover:text-white"
11161
+ ),
11162
+ children: /* @__PURE__ */ jsxRuntime.jsx(HeartIcon, { filled: favorited })
11163
+ }
11164
+ ),
11165
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-x-0 bottom-0 p-5 text-white", children: /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg sm:text-xl font-bold font-heading leading-tight", children: title }) })
11166
+ ] }),
11167
+ (description || price || nights || location || difficulty) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 bg-card p-6", children: [
11168
+ (location || difficulty) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
11169
+ location ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 text-foreground/85", children: [
11170
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MapPinIcon, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
11171
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-ui font-semibold", children: location })
11172
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("span", {}),
11173
+ difficulty && /* @__PURE__ */ jsxRuntime.jsx(Chip, { variant: "outline", size: "sm", className: "capitalize text-muted-foreground", children: difficulty })
11174
+ ] }),
11175
+ description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground leading-relaxed line-clamp-3", children: description }),
11176
+ (nights || price) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-auto flex items-center justify-between gap-3", children: [
11177
+ nights ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5 text-foreground/80", children: [
11178
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoonIcon, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
11179
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-ui font-semibold", children: [
11180
+ nights,
11181
+ " ",
11182
+ nights === 1 ? "night" : "nights"
11183
+ ] })
11184
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("span", {}),
11185
+ price && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base font-bold text-foreground font-ui", children: price })
11186
+ ] })
11187
+ ] })
11188
+ ] });
11189
+ const baseClasses = cn(
11190
+ "group relative flex flex-col overflow-hidden rounded-2xl bg-card border border-border/50",
11191
+ "shadow-md transition-shadow duration-300 hover:shadow-xl",
11192
+ className
11193
+ );
11194
+ return href ? /* @__PURE__ */ jsxRuntime.jsx("a", { href, className: baseClasses, "aria-label": title, children: body }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: baseClasses, children: body });
11195
+ }
11196
+ function TripCard(props) {
11197
+ if (props.variant === "editorial") {
11198
+ return /* @__PURE__ */ jsxRuntime.jsx(TripCardEditorial, __spreadValues({}, props));
11199
+ }
11200
+ const {
11201
+ image,
11202
+ imageAlt = "",
11203
+ status,
11204
+ nights,
11205
+ period,
11206
+ title,
11207
+ description,
11208
+ cta,
11209
+ price,
11210
+ size = "md",
11211
+ className
11212
+ } = props;
10423
11213
  const s = sizeConfig[size];
10424
11214
  const statusInfo = status ? statusConfig[status] : null;
10425
11215
  const meta = [
@@ -10479,7 +11269,7 @@ function TripCard({
10479
11269
  );
10480
11270
  }
10481
11271
  function useHlsVideo(videoRef, src) {
10482
- React8__namespace.useEffect(() => {
11272
+ React28__namespace.useEffect(() => {
10483
11273
  if (!src || !videoRef.current) return;
10484
11274
  const video = videoRef.current;
10485
11275
  if (!src.includes(".m3u8")) return;
@@ -10516,17 +11306,18 @@ function TripHeader({
10516
11306
  destination,
10517
11307
  duration,
10518
11308
  tagline,
11309
+ chips,
10519
11310
  belowMeta,
10520
11311
  siteHeader,
10521
11312
  uiVariant = "v1",
10522
11313
  className
10523
11314
  }) {
10524
11315
  var _a;
10525
- const [heroIndex, setHeroIndex] = React8__namespace.useState(0);
10526
- const [videoReady, setVideoReady] = React8__namespace.useState(false);
10527
- const videoRef = React8__namespace.useRef(null);
11316
+ const [heroIndex, setHeroIndex] = React28__namespace.useState(0);
11317
+ const [videoReady, setVideoReady] = React28__namespace.useState(false);
11318
+ const videoRef = React28__namespace.useRef(null);
10528
11319
  const isHls = !!(videoUrl == null ? void 0 : videoUrl.includes(".m3u8"));
10529
- const validImages = React8__namespace.useMemo(
11320
+ const validImages = React28__namespace.useMemo(
10530
11321
  () => images.map((u) => u == null ? void 0 : u.trim()).filter(Boolean),
10531
11322
  [images]
10532
11323
  );
@@ -10541,7 +11332,7 @@ function TripHeader({
10541
11332
  const nights = duration ? (_a = duration.nights) != null ? _a : Math.max(duration.days - 1, 1) : null;
10542
11333
  const hasMeta = !!(destination || duration);
10543
11334
  useHlsVideo(videoRef, isHls ? videoUrl : void 0);
10544
- React8__namespace.useEffect(() => {
11335
+ React28__namespace.useEffect(() => {
10545
11336
  if (!videoUrl) return;
10546
11337
  const el = videoRef.current;
10547
11338
  if (!el) return;
@@ -10675,15 +11466,15 @@ function TripHeader({
10675
11466
  ]
10676
11467
  }
10677
11468
  ),
10678
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto w-full max-w-5xl px-4 sm:px-6", children: /* @__PURE__ */ jsxRuntime.jsxs(
11469
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto w-full max-w-6xl px-6 sm:px-8", children: /* @__PURE__ */ jsxRuntime.jsxs(
10679
11470
  "div",
10680
11471
  {
10681
11472
  className: cn(
10682
11473
  "relative z-10 pb-10",
10683
- siteHeader ? "-mt-44" : "-mt-36"
11474
+ chips && chips.length > 0 ? siteHeader ? "-mt-[200px] sm:-mt-[214px]" : "-mt-[168px] sm:-mt-[182px]" : siteHeader ? "-mt-44" : "-mt-36"
10684
11475
  ),
10685
11476
  children: [
10686
- 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(React8__namespace.Fragment, { children: [
11477
+ 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(React28__namespace.Fragment, { children: [
10687
11478
  i > 0 && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "h-3 w-3 text-white/50 shrink-0" }),
10688
11479
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-white/70 font-ui hover:text-white/90 cursor-default", children: crumb.label })
10689
11480
  ] }, i)) }),
@@ -10709,6 +11500,7 @@ function TripHeader({
10709
11500
  ] })
10710
11501
  ] })
10711
11502
  ] }) : tagline ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm sm:text-base text-white/80 font-ui", children: tagline }) : null,
11503
+ chips && chips.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3 flex flex-wrap items-center gap-1.5", children: chips.map((chip, i) => /* @__PURE__ */ jsxRuntime.jsx(Chip, { href: chip.href, children: chip.label }, i)) }),
10712
11504
  belowMeta && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-3", children: belowMeta })
10713
11505
  ]
10714
11506
  }
@@ -10717,6 +11509,427 @@ function TripHeader({
10717
11509
  }
10718
11510
  );
10719
11511
  }
11512
+ var VARIANT2 = {
11513
+ light: {
11514
+ footer: "bg-primary-50 text-foreground",
11515
+ heading: "text-foreground",
11516
+ body: "text-foreground/75",
11517
+ muted: "text-foreground/60",
11518
+ link: "text-foreground/85 hover:text-primary-800 underline decoration-foreground/25 underline-offset-4 hover:decoration-primary-800",
11519
+ badgeStroke: "text-foreground/80",
11520
+ /** Inverts white logos so they read on the light background. */
11521
+ badgeFilter: "[filter:invert(1)_brightness(0.2)]",
11522
+ socialBtn: "bg-foreground text-white hover:bg-primary-800",
11523
+ langTrigger: "text-foreground hover:bg-white",
11524
+ langOpen: "text-foreground bg-white",
11525
+ langChevron: "text-foreground/40",
11526
+ bottomBar: "border-t border-foreground/10",
11527
+ bottomText: "text-foreground/60",
11528
+ bottomLink: "text-foreground/80 hover:text-foreground underline decoration-foreground/20 underline-offset-4 hover:decoration-foreground"
11529
+ },
11530
+ dark: {
11531
+ footer: "bg-brand-charcoal text-white",
11532
+ heading: "text-white",
11533
+ body: "text-white/75",
11534
+ muted: "text-white/55",
11535
+ link: "text-white/85 hover:text-primary-400 underline decoration-white/20 underline-offset-4 hover:decoration-primary-400",
11536
+ badgeStroke: "text-white",
11537
+ badgeFilter: "",
11538
+ socialBtn: "bg-white/10 text-white hover:bg-primary-400 hover:text-primary-900",
11539
+ langTrigger: "text-white/85 hover:bg-white/10",
11540
+ langOpen: "text-white bg-white/10",
11541
+ langChevron: "text-white/40",
11542
+ bottomBar: "border-t border-white/10",
11543
+ bottomText: "text-white/55",
11544
+ bottomLink: "text-white/80 hover:text-white underline decoration-white/20 underline-offset-4 hover:decoration-white"
11545
+ }
11546
+ };
11547
+ var DEFAULT_FOOTER_THEMES = [
11548
+ { label: "Roadtrips", href: "#" },
11549
+ { label: "Saf\xE1ri", href: "#" },
11550
+ { label: "Trilhas", href: "#" },
11551
+ { label: "Caiaque & Canoa", href: "#" },
11552
+ { label: "Aurora boreal", href: "#" },
11553
+ { label: "Micro-aventuras", href: "#" },
11554
+ { label: "Packrafting", href: "#" },
11555
+ { label: "Glamping", href: "#" },
11556
+ { label: "Surf", href: "#" },
11557
+ { label: "Viagens em fam\xEDlia", href: "#" }
11558
+ ];
11559
+ var DEFAULT_FOOTER_DESTINATIONS = [
11560
+ { label: "Brasil", href: "#" },
11561
+ { label: "Patag\xF4nia", href: "#" },
11562
+ { label: "Argentina", href: "#" },
11563
+ { label: "Chile", href: "#" },
11564
+ { label: "Bol\xEDvia", href: "#" },
11565
+ { label: "Peru", href: "#" },
11566
+ { label: "Equador", href: "#" },
11567
+ { label: "Col\xF4mbia", href: "#" },
11568
+ { label: "Costa Rica", href: "#" },
11569
+ { label: "Filipinas", href: "#" }
11570
+ ];
11571
+ var DEFAULT_FOOTER_PAGES = [
11572
+ { label: "Contato", href: "#" },
11573
+ { label: "Pol\xEDtica de cookies", href: "#" },
11574
+ { label: "FAQ", href: "#" },
11575
+ { label: "Sobre n\xF3s", href: "#" }
11576
+ ];
11577
+ var DEFAULT_FOOTER_LEGAL = [
11578
+ { label: "Termos e condi\xE7\xF5es", href: "#" },
11579
+ { label: "Mapa do site", href: "#" }
11580
+ ];
11581
+ var DEFAULT_FOOTER_LANGUAGES = [
11582
+ { code: "PT", label: "Portugu\xEAs" },
11583
+ { code: "EN", label: "English" },
11584
+ { code: "NL", label: "Nederlands" },
11585
+ { code: "DE", label: "Deutsch" },
11586
+ { code: "FR", label: "Fran\xE7ais" },
11587
+ { code: "ES", label: "Espa\xF1ol" }
11588
+ ];
11589
+ var DEFAULT_FOOTER_SOCIALS = [
11590
+ { network: "facebook", href: "#" },
11591
+ { network: "instagram", href: "#" },
11592
+ { network: "linkedin", href: "#" }
11593
+ ];
11594
+ var DEFAULT_FOOTER_BADGES = [
11595
+ {
11596
+ src: "https://static.planetaexo.com/trips/wp-content/uploads/2025/04/member_of_TLR-white-1.png",
11597
+ alt: "Member of The Long Run",
11598
+ height: 80
11599
+ },
11600
+ {
11601
+ src: "https://static.planetaexo.com/trips/wp-content/uploads/2025/04/atta-member_white.png",
11602
+ alt: "Member \xB7 Adventure Travel Trade Association",
11603
+ height: 56
11604
+ }
11605
+ ];
11606
+ var SOCIAL_ICON = {
11607
+ facebook: lucideReact.FacebookIcon,
11608
+ instagram: lucideReact.InstagramIcon,
11609
+ linkedin: lucideReact.LinkedinIcon,
11610
+ youtube: lucideReact.YoutubeIcon,
11611
+ twitter: lucideReact.TwitterIcon
11612
+ };
11613
+ var SOCIAL_LABEL = {
11614
+ facebook: "Facebook",
11615
+ instagram: "Instagram",
11616
+ linkedin: "LinkedIn",
11617
+ youtube: "YouTube",
11618
+ twitter: "Twitter"
11619
+ };
11620
+ function ColumnHeading({
11621
+ children,
11622
+ className
11623
+ }) {
11624
+ return /* @__PURE__ */ jsxRuntime.jsx(
11625
+ "h3",
11626
+ {
11627
+ className: cn(
11628
+ "font-heading font-black text-base mb-5 tracking-tight",
11629
+ className
11630
+ ),
11631
+ children
11632
+ }
11633
+ );
11634
+ }
11635
+ function LanguagePicker({
11636
+ variant,
11637
+ languages,
11638
+ currentLanguage,
11639
+ onChange
11640
+ }) {
11641
+ var _a;
11642
+ const t = VARIANT2[variant];
11643
+ const [open, setOpen] = React28__namespace.useState(false);
11644
+ const ref = React28__namespace.useRef(null);
11645
+ const active = (_a = languages.find((l) => l.code === currentLanguage)) != null ? _a : languages[0];
11646
+ React28__namespace.useEffect(() => {
11647
+ if (!open) return;
11648
+ const onDocClick = (e) => {
11649
+ if (ref.current && !ref.current.contains(e.target)) {
11650
+ setOpen(false);
11651
+ }
11652
+ };
11653
+ document.addEventListener("mousedown", onDocClick);
11654
+ return () => document.removeEventListener("mousedown", onDocClick);
11655
+ }, [open]);
11656
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: "relative inline-block", children: [
11657
+ /* @__PURE__ */ jsxRuntime.jsxs(
11658
+ "button",
11659
+ {
11660
+ type: "button",
11661
+ onClick: () => setOpen((v) => !v),
11662
+ "aria-haspopup": "listbox",
11663
+ "aria-expanded": open,
11664
+ className: cn(
11665
+ "inline-flex items-center gap-1 px-3 py-1.5 rounded-full text-sm font-ui transition-colors",
11666
+ t.langTrigger,
11667
+ open && t.langOpen
11668
+ ),
11669
+ children: [
11670
+ active == null ? void 0 : active.code,
11671
+ /* @__PURE__ */ jsxRuntime.jsx(
11672
+ lucideReact.ChevronDownIcon,
11673
+ {
11674
+ className: cn(
11675
+ "h-3 w-3 transition-transform duration-150",
11676
+ t.langChevron,
11677
+ open && "rotate-180"
11678
+ )
11679
+ }
11680
+ )
11681
+ ]
11682
+ }
11683
+ ),
11684
+ open && /* @__PURE__ */ jsxRuntime.jsx(
11685
+ "div",
11686
+ {
11687
+ role: "listbox",
11688
+ className: "absolute left-0 bottom-[calc(100%+8px)] min-w-[180px] rounded-xl bg-white shadow-2xl border border-black/8 py-1.5 z-10",
11689
+ children: languages.map((lang) => {
11690
+ const isActive = lang.code === (active == null ? void 0 : active.code);
11691
+ return /* @__PURE__ */ jsxRuntime.jsxs(
11692
+ "button",
11693
+ {
11694
+ type: "button",
11695
+ role: "option",
11696
+ "aria-selected": isActive,
11697
+ onClick: () => {
11698
+ onChange == null ? void 0 : onChange(lang.code);
11699
+ setOpen(false);
11700
+ },
11701
+ className: cn(
11702
+ "flex items-center gap-3 w-full px-5 py-2.5 text-sm font-ui text-left transition-colors hover:bg-muted",
11703
+ isActive ? "text-primary font-semibold" : "text-foreground"
11704
+ ),
11705
+ children: [
11706
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold w-8 shrink-0", children: lang.code }),
11707
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: lang.label })
11708
+ ]
11709
+ },
11710
+ lang.code
11711
+ );
11712
+ })
11713
+ }
11714
+ )
11715
+ ] });
11716
+ }
11717
+ function SiteFooter({
11718
+ variant = "dark",
11719
+ brandTitle = "PlanetaEXO",
11720
+ logoSrcLight = "/logo-planetaexo-white.png",
11721
+ logoSrcDark = "/logo-planetaexo-green.png",
11722
+ logoSrc,
11723
+ logoAlt = "PlanetaEXO",
11724
+ logoHref = "#",
11725
+ brandDescription = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
11726
+ "A PlanetaEXO \xE9 uma ag\xEAncia brasileira especializada em viagens de ecoturismo e aventura. Operamos com guias locais credenciados e parceiros que respeitam comunidades e ecossistemas.",
11727
+ " ",
11728
+ /* @__PURE__ */ jsxRuntime.jsx(
11729
+ "a",
11730
+ {
11731
+ href: "#",
11732
+ className: "font-bold underline decoration-current/30 underline-offset-4 hover:decoration-current",
11733
+ children: "Pol\xEDtica de privacidade"
11734
+ }
11735
+ )
11736
+ ] }),
11737
+ badges = DEFAULT_FOOTER_BADGES,
11738
+ languages = DEFAULT_FOOTER_LANGUAGES,
11739
+ currentLanguage = "PT",
11740
+ onLanguageChange,
11741
+ address = {
11742
+ title: "Basecamp S\xE3o Paulo",
11743
+ lines: ["Av. Paulista, 1234", "01310-100 S\xE3o Paulo \xB7 Brasil"]
11744
+ },
11745
+ phone = "+55 11 9999-0000",
11746
+ email = "ola@planetaexo.com",
11747
+ socials = DEFAULT_FOOTER_SOCIALS,
11748
+ themesTitle = "Temas",
11749
+ themes = DEFAULT_FOOTER_THEMES,
11750
+ destinationsTitle = "Destinos",
11751
+ destinations = DEFAULT_FOOTER_DESTINATIONS,
11752
+ destinationsMore = { label: "Ver todos os destinos", href: "#" },
11753
+ pagesTitle = "P\xE1ginas",
11754
+ pages = DEFAULT_FOOTER_PAGES,
11755
+ cta = {
11756
+ title: "Colaborar?",
11757
+ label: "parceiros@planetaexo.com",
11758
+ href: "mailto:parceiros@planetaexo.com"
11759
+ },
11760
+ copyright,
11761
+ legalLinks = DEFAULT_FOOTER_LEGAL,
11762
+ className
11763
+ }) {
11764
+ const t = VARIANT2[variant];
11765
+ const resolvedLogo = logoSrc != null ? logoSrc : variant === "light" ? logoSrcDark : logoSrcLight;
11766
+ const year = (/* @__PURE__ */ new Date()).getFullYear();
11767
+ const copy = copyright != null ? copyright : `\xA9 ${year} ${brandTitle}. Todos os direitos reservados.`;
11768
+ return /* @__PURE__ */ jsxRuntime.jsxs("footer", { className: cn(t.footer, className), children: [
11769
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-7xl mx-auto px-6 sm:px-10 pt-16 pb-10", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-12 gap-x-8 gap-y-12", children: [
11770
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:col-span-4 space-y-6", children: [
11771
+ /* @__PURE__ */ jsxRuntime.jsx(
11772
+ "a",
11773
+ {
11774
+ href: logoHref,
11775
+ className: "inline-flex items-center",
11776
+ "aria-label": logoAlt,
11777
+ children: /* @__PURE__ */ jsxRuntime.jsx(
11778
+ "img",
11779
+ {
11780
+ src: resolvedLogo,
11781
+ alt: logoAlt,
11782
+ className: "h-16 w-auto select-none",
11783
+ draggable: false
11784
+ }
11785
+ )
11786
+ }
11787
+ ),
11788
+ brandDescription && /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("font-sans text-sm leading-relaxed", t.body), children: brandDescription }),
11789
+ address && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
11790
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { className: cn("font-heading font-black text-base", t.heading), children: address.title }),
11791
+ /* @__PURE__ */ jsxRuntime.jsx("address", { className: cn("not-italic text-sm leading-relaxed font-sans", t.body), children: address.lines.map((line, i) => /* @__PURE__ */ jsxRuntime.jsx("div", { children: line }, i)) })
11792
+ ] }),
11793
+ (phone || email) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5 text-sm font-ui font-bold", children: [
11794
+ phone && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: `tel:${phone.replace(/\s+/g, "")}`, className: t.link, children: phone }) }),
11795
+ email && /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: `mailto:${email}`, className: t.link, children: email }) })
11796
+ ] }),
11797
+ socials.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: socials.map((s) => {
11798
+ var _a;
11799
+ const Icon = SOCIAL_ICON[s.network];
11800
+ const label = (_a = s.label) != null ? _a : SOCIAL_LABEL[s.network];
11801
+ return /* @__PURE__ */ jsxRuntime.jsx(
11802
+ "a",
11803
+ {
11804
+ href: s.href,
11805
+ "aria-label": label,
11806
+ className: cn(
11807
+ "flex h-9 w-9 items-center justify-center rounded-full transition-colors",
11808
+ t.socialBtn
11809
+ ),
11810
+ children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "h-4 w-4", strokeWidth: 2.25 })
11811
+ },
11812
+ s.network + s.href
11813
+ );
11814
+ }) }),
11815
+ badges && badges.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap items-center gap-5 pt-2", children: badges.map((b, i) => {
11816
+ var _a, _b;
11817
+ const content = (_b = b.node) != null ? _b : /* @__PURE__ */ jsxRuntime.jsx(
11818
+ "img",
11819
+ {
11820
+ src: b.src,
11821
+ alt: b.alt,
11822
+ style: { height: (_a = b.height) != null ? _a : 56 },
11823
+ className: "block w-auto object-contain",
11824
+ draggable: false
11825
+ }
11826
+ );
11827
+ const wrapper = /* @__PURE__ */ jsxRuntime.jsx(
11828
+ "span",
11829
+ {
11830
+ className: cn(
11831
+ "inline-flex items-center",
11832
+ t.badgeStroke,
11833
+ t.badgeFilter
11834
+ ),
11835
+ children: content
11836
+ }
11837
+ );
11838
+ return b.href ? /* @__PURE__ */ jsxRuntime.jsx(
11839
+ "a",
11840
+ {
11841
+ href: b.href,
11842
+ "aria-label": b.alt,
11843
+ className: "hover:opacity-80 transition-opacity",
11844
+ children: wrapper
11845
+ },
11846
+ b.alt + i
11847
+ ) : /* @__PURE__ */ jsxRuntime.jsx(React28__namespace.Fragment, { children: wrapper }, b.alt + i);
11848
+ }) })
11849
+ ] }),
11850
+ themes.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:col-span-3", children: [
11851
+ /* @__PURE__ */ jsxRuntime.jsx(ColumnHeading, { className: t.heading, children: themesTitle }),
11852
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-2.5", children: themes.map((c) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
11853
+ "a",
11854
+ {
11855
+ href: c.href,
11856
+ className: cn("text-sm font-ui font-bold", t.link),
11857
+ children: c.label
11858
+ }
11859
+ ) }, c.label)) })
11860
+ ] }),
11861
+ destinations.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:col-span-3", children: [
11862
+ /* @__PURE__ */ jsxRuntime.jsx(ColumnHeading, { className: t.heading, children: destinationsTitle }),
11863
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-2.5", children: destinations.map((c) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
11864
+ "a",
11865
+ {
11866
+ href: c.href,
11867
+ className: cn("text-sm font-ui font-bold", t.link),
11868
+ children: c.label
11869
+ }
11870
+ ) }, c.label)) }),
11871
+ destinationsMore && /* @__PURE__ */ jsxRuntime.jsxs(
11872
+ "a",
11873
+ {
11874
+ href: destinationsMore.href,
11875
+ className: cn(
11876
+ "inline-flex items-center gap-1.5 mt-5 text-sm font-ui font-bold",
11877
+ t.link
11878
+ ),
11879
+ children: [
11880
+ destinationsMore.label,
11881
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRightIcon, { className: "h-3.5 w-3.5 no-underline" })
11882
+ ]
11883
+ }
11884
+ )
11885
+ ] }),
11886
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:col-span-2 space-y-8", children: [
11887
+ pages.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
11888
+ /* @__PURE__ */ jsxRuntime.jsx(ColumnHeading, { className: t.heading, children: pagesTitle }),
11889
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-2.5", children: pages.map((p) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
11890
+ "a",
11891
+ {
11892
+ href: p.href,
11893
+ className: cn("text-sm font-ui font-bold", t.link),
11894
+ children: p.label
11895
+ }
11896
+ ) }, p.label)) })
11897
+ ] }),
11898
+ cta && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
11899
+ /* @__PURE__ */ jsxRuntime.jsx(ColumnHeading, { className: t.heading, children: cta.title }),
11900
+ /* @__PURE__ */ jsxRuntime.jsx(
11901
+ "a",
11902
+ {
11903
+ href: cta.href,
11904
+ className: cn("text-sm font-ui font-bold break-all", t.link),
11905
+ children: cta.label
11906
+ }
11907
+ )
11908
+ ] })
11909
+ ] })
11910
+ ] }) }),
11911
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(t.bottomBar), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-w-7xl mx-auto px-6 sm:px-10 py-4 flex flex-wrap items-center gap-x-6 gap-y-3", children: [
11912
+ languages.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
11913
+ LanguagePicker,
11914
+ {
11915
+ variant,
11916
+ languages,
11917
+ currentLanguage,
11918
+ onChange: onLanguageChange
11919
+ }
11920
+ ),
11921
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: cn("text-xs font-ui", t.bottomText), children: copy }),
11922
+ legalLinks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-wrap items-center gap-x-6 gap-y-2", children: legalLinks.map((l) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
11923
+ "a",
11924
+ {
11925
+ href: l.href,
11926
+ className: cn("text-xs font-ui font-bold", t.bottomLink),
11927
+ children: l.label
11928
+ }
11929
+ ) }, l.label)) })
11930
+ ] }) })
11931
+ ] });
11932
+ }
10720
11933
  function Stars({ count = 5 }) {
10721
11934
  return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex gap-0.5", children: Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
10722
11935
  lucideReact.StarIcon,
@@ -10760,9 +11973,9 @@ function TripPage({
10760
11973
  images,
10761
11974
  videoUrl,
10762
11975
  breadcrumb,
11976
+ chips,
10763
11977
  highlights,
10764
- infoGroups,
10765
- keyInfo,
11978
+ howToGetThere,
10766
11979
  recommendedFor,
10767
11980
  overview,
10768
11981
  overviewHighlights,
@@ -10780,6 +11993,7 @@ function TripPage({
10780
11993
  meetingPoints,
10781
11994
  meetingPoint,
10782
11995
  faqs,
11996
+ faqInitialCount = 5,
10783
11997
  sectionIcons,
10784
11998
  reviews,
10785
11999
  trustpilot,
@@ -10799,11 +12013,12 @@ function TripPage({
10799
12013
  features,
10800
12014
  className
10801
12015
  }) {
10802
- const [activeSection, setActiveSection] = React8__namespace.useState("");
10803
- const [accordionValue, setAccordionValue] = React8__namespace.useState([]);
10804
- const accordionSectionIds = React8__namespace.useMemo(
12016
+ const [activeSection, setActiveSection] = React28__namespace.useState("");
12017
+ const [accordionValue, setAccordionValue] = React28__namespace.useState([]);
12018
+ const [faqsExpanded, setFaqsExpanded] = React28__namespace.useState(false);
12019
+ const accordionSectionIds = React28__namespace.useMemo(
10805
12020
  () => /* @__PURE__ */ new Set([
10806
- "key-info",
12021
+ "how-to-get-there",
10807
12022
  "what-to-bring",
10808
12023
  "weather",
10809
12024
  "optional-extras",
@@ -10814,18 +12029,18 @@ function TripPage({
10814
12029
  ]),
10815
12030
  []
10816
12031
  );
10817
- const [navFloating, setNavFloating] = React8__namespace.useState(false);
10818
- const [navHidden, setNavHidden] = React8__namespace.useState(false);
10819
- const [isFloating, setIsFloating] = React8__namespace.useState(false);
10820
- const [sidebarPos, setSidebarPos] = React8__namespace.useState(null);
10821
- const [pricingBarVisible, setPricingBarVisible] = React8__namespace.useState(false);
10822
- const navRef = React8__namespace.useRef(null);
10823
- const navSentinelRef = React8__namespace.useRef(null);
10824
- const sentinelRef = React8__namespace.useRef(null);
10825
- const sidebarPlaceholderRef = React8__namespace.useRef(null);
10826
- const pricingBarRef = React8__namespace.useRef(null);
10827
- const galleryRef = React8__namespace.useRef(null);
10828
- const sections = React8__namespace.useMemo(
12032
+ const [navFloating, setNavFloating] = React28__namespace.useState(false);
12033
+ const [navHidden, setNavHidden] = React28__namespace.useState(false);
12034
+ const [isFloating, setIsFloating] = React28__namespace.useState(false);
12035
+ const [sidebarPos, setSidebarPos] = React28__namespace.useState(null);
12036
+ const [pricingBarVisible, setPricingBarVisible] = React28__namespace.useState(false);
12037
+ const navRef = React28__namespace.useRef(null);
12038
+ const navSentinelRef = React28__namespace.useRef(null);
12039
+ const sentinelRef = React28__namespace.useRef(null);
12040
+ const sidebarPlaceholderRef = React28__namespace.useRef(null);
12041
+ const pricingBarRef = React28__namespace.useRef(null);
12042
+ const galleryRef = React28__namespace.useRef(null);
12043
+ const sections = React28__namespace.useMemo(
10829
12044
  () => [
10830
12045
  { id: "overview", label: "Overview", show: !!(overview || (overviewHighlights == null ? void 0 : overviewHighlights.length)) },
10831
12046
  {
@@ -10843,7 +12058,7 @@ function TripPage({
10843
12058
  // eslint-disable-next-line react-hooks/exhaustive-deps
10844
12059
  []
10845
12060
  );
10846
- React8__namespace.useEffect(() => {
12061
+ React28__namespace.useEffect(() => {
10847
12062
  const sentinel = navSentinelRef.current;
10848
12063
  if (!sentinel) return;
10849
12064
  const update = () => setNavFloating(sentinel.getBoundingClientRect().top < 1);
@@ -10851,7 +12066,7 @@ function TripPage({
10851
12066
  update();
10852
12067
  return () => document.removeEventListener("scroll", update, { capture: true });
10853
12068
  }, []);
10854
- React8__namespace.useEffect(() => {
12069
+ React28__namespace.useEffect(() => {
10855
12070
  const sentinel = sentinelRef.current;
10856
12071
  if (!sentinel) return;
10857
12072
  const update = () => setIsFloating(sentinel.getBoundingClientRect().top < 1);
@@ -10859,7 +12074,7 @@ function TripPage({
10859
12074
  update();
10860
12075
  return () => document.removeEventListener("scroll", update, { capture: true });
10861
12076
  }, []);
10862
- React8__namespace.useEffect(() => {
12077
+ React28__namespace.useEffect(() => {
10863
12078
  const measure = () => {
10864
12079
  if (!sidebarPlaceholderRef.current) return;
10865
12080
  const rect = sidebarPlaceholderRef.current.getBoundingClientRect();
@@ -10869,7 +12084,7 @@ function TripPage({
10869
12084
  window.addEventListener("resize", measure);
10870
12085
  return () => window.removeEventListener("resize", measure);
10871
12086
  }, [isFloating]);
10872
- React8__namespace.useEffect(() => {
12087
+ React28__namespace.useEffect(() => {
10873
12088
  const check = () => {
10874
12089
  var _a;
10875
12090
  const target = (_a = galleryRef.current) != null ? _a : pricingBarRef.current;
@@ -10880,7 +12095,7 @@ function TripPage({
10880
12095
  check();
10881
12096
  return () => document.removeEventListener("scroll", check, { capture: true });
10882
12097
  }, []);
10883
- React8__namespace.useEffect(() => {
12098
+ React28__namespace.useEffect(() => {
10884
12099
  const check = () => {
10885
12100
  if (!pricingBarRef.current) return;
10886
12101
  setNavHidden(pricingBarRef.current.getBoundingClientRect().top < window.innerHeight * 0.92);
@@ -10889,7 +12104,7 @@ function TripPage({
10889
12104
  check();
10890
12105
  return () => document.removeEventListener("scroll", check, { capture: true });
10891
12106
  }, []);
10892
- React8__namespace.useEffect(() => {
12107
+ React28__namespace.useEffect(() => {
10893
12108
  if (sections.length === 0) return;
10894
12109
  setActiveSection(sections[0].id);
10895
12110
  const update = () => {
@@ -10964,6 +12179,7 @@ function TripPage({
10964
12179
  destination,
10965
12180
  duration,
10966
12181
  tagline,
12182
+ chips,
10967
12183
  siteHeader,
10968
12184
  uiVariant,
10969
12185
  belowMeta: trustpilotHero ? /* @__PURE__ */ jsxRuntime.jsx(TrustpilotEmbed, { config: trustpilotHero }) : void 0
@@ -10997,10 +12213,7 @@ function TripPage({
10997
12213
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row gap-8 mt-4", children: [
10998
12214
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0 space-y-12 pb-12", children: [
10999
12215
  (overview || (overviewHighlights == null ? void 0 : overviewHighlights.length)) && /* @__PURE__ */ jsxRuntime.jsxs("section", { id: "trip-section-overview", className: "scroll-mt-20", children: [
11000
- /* @__PURE__ */ jsxRuntime.jsxs("h2", { className: "text-xl font-bold text-foreground font-heading mb-4 flex items-center gap-2", children: [
11001
- (sectionIcons == null ? void 0 : sectionIcons.overview) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.overview }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-5 w-5 text-primary" }),
11002
- "Overview"
11003
- ] }),
12216
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-bold text-foreground font-heading mb-4", children: "Overview" }),
11004
12217
  overview && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-lg text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: overview }),
11005
12218
  overviewHighlights && overviewHighlights.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("ul", { className: cn("flex flex-col gap-5", overview && "mt-8"), children: overviewHighlights.map((h, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-4", children: [
11006
12219
  h.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex h-10 w-10 shrink-0 items-center justify-center text-foreground [&_svg]:h-8 [&_svg]:w-8", children: h.icon }),
@@ -11047,7 +12260,7 @@ function TripPage({
11047
12260
  }
11048
12261
  )
11049
12262
  ] }),
11050
- ((infoGroups == null ? void 0 : infoGroups.length) || keyInfo || (whatToBring == null ? void 0 : whatToBring.length) || weather || optionalExtras || accommodation || food || (meetingPoints == null ? void 0 : meetingPoints.length) || meetingPoint || termsAndConditions) && /* @__PURE__ */ jsxRuntime.jsxs(
12263
+ (howToGetThere || (whatToBring == null ? void 0 : whatToBring.length) || weather || optionalExtras || accommodation || food || (meetingPoints == null ? void 0 : meetingPoints.length) || meetingPoint || termsAndConditions) && /* @__PURE__ */ jsxRuntime.jsxs(
11051
12264
  Accordion,
11052
12265
  {
11053
12266
  multiple: false,
@@ -11055,25 +12268,33 @@ function TripPage({
11055
12268
  onValueChange: setAccordionValue,
11056
12269
  className: "border-t border-border",
11057
12270
  children: [
11058
- (keyInfo || infoGroups && infoGroups.length > 0) && /* @__PURE__ */ jsxRuntime.jsxs(
12271
+ accommodation && /* @__PURE__ */ jsxRuntime.jsxs(
12272
+ AccordionItem,
12273
+ {
12274
+ value: "accommodation",
12275
+ id: "trip-section-accommodation",
12276
+ className: "scroll-mt-20 border-b border-border",
12277
+ children: [
12278
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "py-5 text-xl font-bold text-foreground font-heading hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
12279
+ (sectionIcons == null ? void 0 : sectionIcons.accommodation) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.accommodation }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BedDoubleIcon, { className: "h-5 w-5 text-primary" }),
12280
+ "Accommodation"
12281
+ ] }) }),
12282
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: accommodation }) })
12283
+ ]
12284
+ }
12285
+ ),
12286
+ food && /* @__PURE__ */ jsxRuntime.jsxs(
11059
12287
  AccordionItem,
11060
12288
  {
11061
- value: "key-info",
11062
- id: "trip-section-key-info",
12289
+ value: "food",
12290
+ id: "trip-section-food",
11063
12291
  className: "scroll-mt-20 border-b border-border",
11064
12292
  children: [
11065
12293
  /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "py-5 text-xl font-bold text-foreground font-heading hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
11066
- (sectionIcons == null ? void 0 : sectionIcons.keyInfo) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.keyInfo }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-5 w-5 text-primary" }),
11067
- "Key info"
12294
+ (sectionIcons == null ? void 0 : sectionIcons.food) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.food }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UtensilsIcon, { className: "h-5 w-5 text-primary" }),
12295
+ "Food"
11068
12296
  ] }) }),
11069
- /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: keyInfo ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: keyInfo }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-6", children: infoGroups.map((group, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
11070
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 mb-3", children: [
11071
- group.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: group.icon }),
11072
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-bold text-foreground font-heading", children: group.title })
11073
- ] }),
11074
- /* @__PURE__ */ jsxRuntime.jsx(Checklist, { items: group.items }),
11075
- i < infoGroups.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "mt-6" })
11076
- ] }, i)) }) })
12297
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: food }) })
11077
12298
  ]
11078
12299
  }
11079
12300
  ),
@@ -11099,78 +12320,63 @@ function TripPage({
11099
12320
  ]
11100
12321
  }
11101
12322
  ),
11102
- optionalExtras && /* @__PURE__ */ jsxRuntime.jsxs(
12323
+ howToGetThere && /* @__PURE__ */ jsxRuntime.jsxs(
11103
12324
  AccordionItem,
11104
12325
  {
11105
- value: "optional-extras",
11106
- id: "trip-section-optional-extras",
12326
+ value: "how-to-get-there",
12327
+ id: "trip-section-how-to-get-there",
11107
12328
  className: "scroll-mt-20 border-b border-border",
11108
12329
  children: [
11109
12330
  /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "py-5 text-xl font-bold text-foreground font-heading hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
11110
- (sectionIcons == null ? void 0 : sectionIcons.optionalExtras) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.optionalExtras }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SparklesIcon, { className: "h-5 w-5 text-primary" }),
11111
- "Optional extras"
12331
+ (sectionIcons == null ? void 0 : sectionIcons.howToGetThere) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.howToGetThere }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CompassIcon, { className: "h-5 w-5 text-primary" }),
12332
+ "How to get there"
11112
12333
  ] }) }),
11113
- /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: optionalExtras }) })
12334
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: howToGetThere }) })
11114
12335
  ]
11115
12336
  }
11116
12337
  ),
11117
- whatToBring && whatToBring.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
11118
- AccordionItem,
11119
- {
11120
- value: "what-to-bring",
11121
- id: "trip-section-what-to-bring",
11122
- className: "scroll-mt-20 border-b border-border",
11123
- children: [
11124
- /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "py-5 text-xl font-bold text-foreground font-heading hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
11125
- (sectionIcons == null ? void 0 : sectionIcons.whatToBring) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.whatToBring }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BackpackIcon, { className: "h-5 w-5 text-primary" }),
11126
- "What to bring"
11127
- ] }) }),
11128
- /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx(Checklist, { items: whatToBring, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4" }) }) })
11129
- ]
11130
- }
11131
- ),
11132
- accommodation && /* @__PURE__ */ jsxRuntime.jsxs(
12338
+ weather && /* @__PURE__ */ jsxRuntime.jsxs(
11133
12339
  AccordionItem,
11134
12340
  {
11135
- value: "accommodation",
11136
- id: "trip-section-accommodation",
12341
+ value: "weather",
12342
+ id: "trip-section-weather",
11137
12343
  className: "scroll-mt-20 border-b border-border",
11138
12344
  children: [
11139
12345
  /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "py-5 text-xl font-bold text-foreground font-heading hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
11140
- (sectionIcons == null ? void 0 : sectionIcons.accommodation) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.accommodation }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BedDoubleIcon, { className: "h-5 w-5 text-primary" }),
11141
- "Accommodation"
12346
+ (sectionIcons == null ? void 0 : sectionIcons.weather) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.weather }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SunIcon, { className: "h-5 w-5 text-primary" }),
12347
+ "Weather"
11142
12348
  ] }) }),
11143
- /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: accommodation }) })
12349
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start gap-3 rounded-xl bg-muted/60 border border-border p-5", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-2 [&_strong]:font-semibold", children: weather }) }) })
11144
12350
  ]
11145
12351
  }
11146
12352
  ),
11147
- food && /* @__PURE__ */ jsxRuntime.jsxs(
12353
+ whatToBring && whatToBring.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
11148
12354
  AccordionItem,
11149
12355
  {
11150
- value: "food",
11151
- id: "trip-section-food",
12356
+ value: "what-to-bring",
12357
+ id: "trip-section-what-to-bring",
11152
12358
  className: "scroll-mt-20 border-b border-border",
11153
12359
  children: [
11154
12360
  /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "py-5 text-xl font-bold text-foreground font-heading hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
11155
- (sectionIcons == null ? void 0 : sectionIcons.food) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.food }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UtensilsIcon, { className: "h-5 w-5 text-primary" }),
11156
- "Food"
12361
+ (sectionIcons == null ? void 0 : sectionIcons.whatToBring) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.whatToBring }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BackpackIcon, { className: "h-5 w-5 text-primary" }),
12362
+ "What to bring"
11157
12363
  ] }) }),
11158
- /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: food }) })
12364
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx(Checklist, { items: whatToBring, icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.InfoIcon, { className: "h-4 w-4" }) }) })
11159
12365
  ]
11160
12366
  }
11161
12367
  ),
11162
- weather && /* @__PURE__ */ jsxRuntime.jsxs(
12368
+ optionalExtras && /* @__PURE__ */ jsxRuntime.jsxs(
11163
12369
  AccordionItem,
11164
12370
  {
11165
- value: "weather",
11166
- id: "trip-section-weather",
12371
+ value: "optional-extras",
12372
+ id: "trip-section-optional-extras",
11167
12373
  className: "scroll-mt-20 border-b border-border",
11168
12374
  children: [
11169
12375
  /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { className: "py-5 text-xl font-bold text-foreground font-heading hover:no-underline", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2", children: [
11170
- (sectionIcons == null ? void 0 : sectionIcons.weather) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.weather }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SunIcon, { className: "h-5 w-5 text-primary" }),
11171
- "Weather"
12376
+ (sectionIcons == null ? void 0 : sectionIcons.optionalExtras) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary [&>svg]:h-5 [&>svg]:w-5", children: sectionIcons.optionalExtras }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CherryIcon, { className: "h-5 w-5 text-primary" }),
12377
+ "Optional extras"
11172
12378
  ] }) }),
11173
- /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-start gap-3 rounded-xl bg-muted/60 border border-border p-5", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-2 [&_strong]:font-semibold", children: weather }) }) })
12379
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { className: "pb-6", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-base text-foreground leading-relaxed space-y-3 [&_strong]:font-semibold [&_a]:text-primary [&_a]:underline", children: optionalExtras }) })
11174
12380
  ]
11175
12381
  }
11176
12382
  ),
@@ -11192,13 +12398,39 @@ function TripPage({
11192
12398
  ]
11193
12399
  }
11194
12400
  ),
11195
- faqs && faqs.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("section", { id: "trip-section-faq", className: "scroll-mt-20", children: [
11196
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-bold text-foreground font-heading mb-6", children: "FAQ" }),
11197
- /* @__PURE__ */ jsxRuntime.jsx(Accordion, { variant: "faq", children: faqs.map((faq, i) => /* @__PURE__ */ jsxRuntime.jsxs(AccordionItem, { value: `faq-${i}`, children: [
11198
- /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { children: faq.question }),
11199
- /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { children: faq.answer })
11200
- ] }, i)) })
11201
- ] }),
12401
+ faqs && faqs.length > 0 && (() => {
12402
+ const visibleFaqs = faqsExpanded ? faqs : faqs.slice(0, faqInitialCount);
12403
+ const hiddenCount = faqs.length - visibleFaqs.length;
12404
+ return /* @__PURE__ */ jsxRuntime.jsxs("section", { id: "trip-section-faq", className: "scroll-mt-20", children: [
12405
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-bold text-foreground font-heading mb-6", children: "FAQ" }),
12406
+ /* @__PURE__ */ jsxRuntime.jsx(Accordion, { variant: "faq", children: visibleFaqs.map((faq, i) => /* @__PURE__ */ jsxRuntime.jsxs(AccordionItem, { value: `faq-${i}`, children: [
12407
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionTrigger, { children: faq.question }),
12408
+ /* @__PURE__ */ jsxRuntime.jsx(AccordionContent, { children: faq.answer })
12409
+ ] }, i)) }),
12410
+ faqs.length > faqInitialCount && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-5 flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
12411
+ "button",
12412
+ {
12413
+ type: "button",
12414
+ onClick: () => setFaqsExpanded((v) => !v),
12415
+ className: cn(
12416
+ "inline-flex items-center gap-2 rounded-full border border-border bg-background px-5 py-2.5",
12417
+ "text-sm font-semibold text-foreground shadow-sm",
12418
+ "hover:bg-muted transition-colors duration-150",
12419
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
12420
+ ),
12421
+ children: faqsExpanded ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
12422
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUpIcon, { className: "h-4 w-4 text-muted-foreground" }),
12423
+ "Show less"
12424
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
12425
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "h-4 w-4 text-muted-foreground" }),
12426
+ "See more (",
12427
+ hiddenCount,
12428
+ ")"
12429
+ ] })
12430
+ }
12431
+ ) })
12432
+ ] });
12433
+ })(),
11202
12434
  trustpilot ? /* @__PURE__ */ jsxRuntime.jsxs("section", { id: "trip-section-reviews", className: "scroll-mt-20", children: [
11203
12435
  /* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "mb-10" }),
11204
12436
  /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-xl font-bold text-foreground font-heading mb-5", children: "What our guests think" }),
@@ -11287,8 +12519,8 @@ function TripPage({
11287
12519
  PhotoGallery,
11288
12520
  {
11289
12521
  photos: gallery,
11290
- variant: "grid",
11291
- initialVisible: 6
12522
+ variant: "gridCompact",
12523
+ initialVisible: 8
11292
12524
  }
11293
12525
  ) }),
11294
12526
  gallery && gallery.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { ref: pricingBarRef, className: "mx-auto w-full max-w-6xl px-6 sm:px-8 py-12", children: /* @__PURE__ */ jsxRuntime.jsx("div", { id: "trip-booking-form", className: "rounded-2xl border border-border bg-card p-8 shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsx(BookingForm, { onSubmit: onBook ? (values) => onBook() : void 0 }) }) }),
@@ -11305,7 +12537,8 @@ function TripPage({
11305
12537
  currencyEstimates
11306
12538
  }
11307
12539
  ) }),
11308
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-20 lg:hidden" })
12540
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-20 lg:hidden" }),
12541
+ /* @__PURE__ */ jsxRuntime.jsx(SiteFooter, {})
11309
12542
  ]
11310
12543
  }
11311
12544
  );
@@ -11411,12 +12644,12 @@ function Toast({
11411
12644
  duration = 6e3,
11412
12645
  className
11413
12646
  }) {
11414
- const [mounted, setMounted] = React8__namespace.useState(false);
11415
- const [visible, setVisible] = React8__namespace.useState(true);
11416
- React8__namespace.useEffect(() => {
12647
+ const [mounted, setMounted] = React28__namespace.useState(false);
12648
+ const [visible, setVisible] = React28__namespace.useState(true);
12649
+ React28__namespace.useEffect(() => {
11417
12650
  setMounted(true);
11418
12651
  }, []);
11419
- React8__namespace.useEffect(() => {
12652
+ React28__namespace.useEffect(() => {
11420
12653
  if (duration === 0) return;
11421
12654
  const t = setTimeout(() => {
11422
12655
  setVisible(false);
@@ -11823,21 +13056,21 @@ function LeadCapturePopup({
11823
13056
  }) {
11824
13057
  var _a;
11825
13058
  const config = __spreadValues(__spreadValues({}, DEFAULTS), _config);
11826
- const [open, setOpen] = React8.useState(false);
11827
- const [closing, setClosing] = React8.useState(false);
11828
- const [submitted, setSubmitted] = React8.useState(false);
11829
- const [submitting, setSubmitting] = React8.useState(false);
11830
- const [error, setError] = React8.useState(null);
11831
- const [name, setName] = React8.useState("");
11832
- const [email, setEmail] = React8.useState("");
11833
- const [travelDate, setTravelDate] = React8.useState("");
11834
- const panelRef = React8.useRef(null);
11835
- const nameRef = React8.useRef(null);
11836
- const show = React8.useCallback(() => {
13059
+ const [open, setOpen] = React28.useState(false);
13060
+ const [closing, setClosing] = React28.useState(false);
13061
+ const [submitted, setSubmitted] = React28.useState(false);
13062
+ const [submitting, setSubmitting] = React28.useState(false);
13063
+ const [error, setError] = React28.useState(null);
13064
+ const [name, setName] = React28.useState("");
13065
+ const [email, setEmail] = React28.useState("");
13066
+ const [travelDate, setTravelDate] = React28.useState("");
13067
+ const panelRef = React28.useRef(null);
13068
+ const nameRef = React28.useRef(null);
13069
+ const show = React28.useCallback(() => {
11837
13070
  if (isDismissed()) return;
11838
13071
  setOpen(true);
11839
13072
  }, []);
11840
- React8.useEffect(() => {
13073
+ React28.useEffect(() => {
11841
13074
  var _a2;
11842
13075
  if (isDismissed()) return;
11843
13076
  if (config.trigger === "delay") {
@@ -11864,7 +13097,7 @@ function LeadCapturePopup({
11864
13097
  return () => window.removeEventListener("scroll", handler);
11865
13098
  }
11866
13099
  }, [config.trigger, config.delaySeconds, config.scrollPercent, show]);
11867
- React8.useEffect(() => {
13100
+ React28.useEffect(() => {
11868
13101
  if (open && !submitted) {
11869
13102
  requestAnimationFrame(() => {
11870
13103
  var _a2;
@@ -11872,7 +13105,7 @@ function LeadCapturePopup({
11872
13105
  });
11873
13106
  }
11874
13107
  }, [open, submitted]);
11875
- const close = React8.useCallback(() => {
13108
+ const close = React28.useCallback(() => {
11876
13109
  setClosing(true);
11877
13110
  setDismissed(config.dismissDays);
11878
13111
  setTimeout(() => {
@@ -11880,7 +13113,7 @@ function LeadCapturePopup({
11880
13113
  setClosing(false);
11881
13114
  }, 250);
11882
13115
  }, [config.dismissDays]);
11883
- React8.useEffect(() => {
13116
+ React28.useEffect(() => {
11884
13117
  if (!open) return;
11885
13118
  const handler = (e) => {
11886
13119
  if (e.key === "Escape") close();
@@ -11888,7 +13121,7 @@ function LeadCapturePopup({
11888
13121
  document.addEventListener("keydown", handler);
11889
13122
  return () => document.removeEventListener("keydown", handler);
11890
13123
  }, [open, close]);
11891
- const onOverlayClick = React8.useCallback(
13124
+ const onOverlayClick = React28.useCallback(
11892
13125
  (e) => {
11893
13126
  if (panelRef.current && !panelRef.current.contains(e.target)) {
11894
13127
  close();