@planetaexo/design-system 0.3.14 → 0.3.16

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,15 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var React19 = require('react');
3
+ var React21 = require('react');
4
4
  var classVarianceAuthority = require('class-variance-authority');
5
5
  var clsx = require('clsx');
6
6
  var tailwindMerge = require('tailwind-merge');
7
7
  var jsxRuntime = require('react/jsx-runtime');
8
- var dateFns = require('date-fns');
9
8
  var lucideReact = require('lucide-react');
10
9
  var separator = require('@base-ui/react/separator');
11
10
  var dialog = require('@base-ui/react/dialog');
12
11
  var button = require('@base-ui/react/button');
12
+ var dateFns = require('date-fns');
13
13
  var reactDayPicker = require('react-day-picker');
14
14
  var popover = require('@base-ui/react/popover');
15
15
  var checkbox = require('@base-ui/react/checkbox');
@@ -36,7 +36,7 @@ function _interopNamespace(e) {
36
36
  return Object.freeze(n);
37
37
  }
38
38
 
39
- var React19__namespace = /*#__PURE__*/_interopNamespace(React19);
39
+ var React21__namespace = /*#__PURE__*/_interopNamespace(React21);
40
40
 
41
41
  var __defProp = Object.defineProperty;
42
42
  var __defProps = Object.defineProperties;
@@ -101,7 +101,7 @@ var buttonVariants = classVarianceAuthority.cva(
101
101
  }
102
102
  }
103
103
  );
104
- var Button = React19__namespace.forwardRef(
104
+ var Button = React21__namespace.forwardRef(
105
105
  (_a, ref) => {
106
106
  var _b = _a, { className, variant, size } = _b, props = __objRest(_b, ["className", "variant", "size"]);
107
107
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -296,201 +296,10 @@ function DialogDescription(_a) {
296
296
  }, props)
297
297
  );
298
298
  }
299
- function Calendar(_a) {
300
- var _b = _a, {
301
- className,
302
- classNames,
303
- showOutsideDays = true,
304
- captionLayout = "label",
305
- buttonVariant = "ghost",
306
- locale,
307
- formatters,
308
- components
309
- } = _b, props = __objRest(_b, [
310
- "className",
311
- "classNames",
312
- "showOutsideDays",
313
- "captionLayout",
314
- "buttonVariant",
315
- "locale",
316
- "formatters",
317
- "components"
318
- ]);
319
- const defaultClassNames = reactDayPicker.getDefaultClassNames();
320
- return /* @__PURE__ */ jsxRuntime.jsx(
321
- reactDayPicker.DayPicker,
322
- __spreadValues({
323
- showOutsideDays,
324
- className: cn(
325
- "group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",
326
- String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
327
- String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
328
- className
329
- ),
330
- captionLayout,
331
- locale,
332
- formatters: __spreadValues({
333
- formatMonthDropdown: (date) => date.toLocaleString(locale == null ? void 0 : locale.code, { month: "short" })
334
- }, formatters),
335
- classNames: __spreadValues({
336
- root: cn("w-fit", defaultClassNames.root),
337
- months: cn(
338
- "relative flex flex-col gap-4 md:flex-row",
339
- defaultClassNames.months
340
- ),
341
- month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
342
- nav: cn(
343
- "absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
344
- defaultClassNames.nav
345
- ),
346
- button_previous: cn(
347
- buttonVariants2({ variant: buttonVariant }),
348
- "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
349
- defaultClassNames.button_previous
350
- ),
351
- button_next: cn(
352
- buttonVariants2({ variant: buttonVariant }),
353
- "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
354
- defaultClassNames.button_next
355
- ),
356
- month_caption: cn(
357
- "flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
358
- defaultClassNames.month_caption
359
- ),
360
- dropdowns: cn(
361
- "flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
362
- defaultClassNames.dropdowns
363
- ),
364
- dropdown_root: cn(
365
- "relative rounded-(--cell-radius)",
366
- defaultClassNames.dropdown_root
367
- ),
368
- dropdown: cn(
369
- "absolute inset-0 bg-popover opacity-0",
370
- defaultClassNames.dropdown
371
- ),
372
- caption_label: cn(
373
- "font-medium select-none",
374
- captionLayout === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
375
- defaultClassNames.caption_label
376
- ),
377
- table: "w-full border-collapse",
378
- weekdays: cn("flex", defaultClassNames.weekdays),
379
- weekday: cn(
380
- "flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none",
381
- defaultClassNames.weekday
382
- ),
383
- week: cn("mt-2 flex w-full", defaultClassNames.week),
384
- week_number_header: cn(
385
- "w-(--cell-size) select-none",
386
- defaultClassNames.week_number_header
387
- ),
388
- week_number: cn(
389
- "text-[0.8rem] text-muted-foreground select-none",
390
- defaultClassNames.week_number
391
- ),
392
- day: cn(
393
- "group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)",
394
- props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",
395
- defaultClassNames.day
396
- ),
397
- range_start: cn(
398
- "relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted",
399
- defaultClassNames.range_start
400
- ),
401
- range_middle: cn("rounded-none", defaultClassNames.range_middle),
402
- range_end: cn(
403
- "relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted",
404
- defaultClassNames.range_end
405
- ),
406
- today: cn(
407
- "rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none",
408
- defaultClassNames.today
409
- ),
410
- outside: cn(
411
- "text-muted-foreground aria-selected:text-muted-foreground",
412
- defaultClassNames.outside
413
- ),
414
- disabled: cn(
415
- "text-muted-foreground opacity-50",
416
- defaultClassNames.disabled
417
- ),
418
- hidden: cn("invisible", defaultClassNames.hidden)
419
- }, classNames),
420
- components: __spreadValues({
421
- Root: (_a2) => {
422
- var _b2 = _a2, { className: className2, rootRef } = _b2, props2 = __objRest(_b2, ["className", "rootRef"]);
423
- return /* @__PURE__ */ jsxRuntime.jsx(
424
- "div",
425
- __spreadValues({
426
- "data-slot": "calendar",
427
- ref: rootRef,
428
- className: cn(className2)
429
- }, props2)
430
- );
431
- },
432
- Chevron: (_c) => {
433
- var _d = _c, { className: className2, orientation } = _d, props2 = __objRest(_d, ["className", "orientation"]);
434
- if (orientation === "left") {
435
- return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeftIcon, __spreadValues({ className: cn("size-4", className2) }, props2));
436
- }
437
- if (orientation === "right") {
438
- return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, __spreadValues({ className: cn("size-4", className2) }, props2));
439
- }
440
- return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, __spreadValues({ className: cn("size-4", className2) }, props2));
441
- },
442
- DayButton: (_e) => {
443
- var props2 = __objRest(_e, []);
444
- return /* @__PURE__ */ jsxRuntime.jsx(CalendarDayButton, __spreadValues({ locale }, props2));
445
- },
446
- WeekNumber: (_f) => {
447
- var _g = _f, { children } = _g, props2 = __objRest(_g, ["children"]);
448
- return /* @__PURE__ */ jsxRuntime.jsx("td", __spreadProps(__spreadValues({}, props2), { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) }));
449
- }
450
- }, components)
451
- }, props)
452
- );
453
- }
454
- function CalendarDayButton(_a) {
455
- var _b = _a, {
456
- className,
457
- day,
458
- modifiers,
459
- locale
460
- } = _b, props = __objRest(_b, [
461
- "className",
462
- "day",
463
- "modifiers",
464
- "locale"
465
- ]);
466
- const defaultClassNames = reactDayPicker.getDefaultClassNames();
467
- const ref = React19__namespace.useRef(null);
468
- React19__namespace.useEffect(() => {
469
- var _a2;
470
- if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
471
- }, [modifiers.focused]);
472
- return /* @__PURE__ */ jsxRuntime.jsx(
473
- Button2,
474
- __spreadValues({
475
- variant: "ghost",
476
- size: "icon",
477
- "data-day": day.date.toLocaleDateString(locale == null ? void 0 : locale.code),
478
- "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
479
- "data-range-start": modifiers.range_start,
480
- "data-range-end": modifiers.range_end,
481
- "data-range-middle": modifiers.range_middle,
482
- className: cn(
483
- "relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70",
484
- defaultClassNames.day,
485
- className
486
- )
487
- }, props)
488
- );
489
- }
490
- var FloatingInput = React19__namespace.forwardRef(
299
+ var FloatingInput = React21__namespace.forwardRef(
491
300
  (_a, ref) => {
492
301
  var _b = _a, { label, error, id, className, required } = _b, props = __objRest(_b, ["label", "error", "id", "className", "required"]);
493
- const inputId = id != null ? id : React19__namespace.useId();
302
+ const inputId = id != null ? id : React21__namespace.useId();
494
303
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
495
304
  /* @__PURE__ */ jsxRuntime.jsx(
496
305
  "input",
@@ -530,10 +339,10 @@ var FloatingInput = React19__namespace.forwardRef(
530
339
  }
531
340
  );
532
341
  FloatingInput.displayName = "FloatingInput";
533
- var FloatingSelect = React19__namespace.forwardRef(
342
+ var FloatingSelect = React21__namespace.forwardRef(
534
343
  (_a, ref) => {
535
344
  var _b = _a, { label, error, id, className, required, children } = _b, props = __objRest(_b, ["label", "error", "id", "className", "required", "children"]);
536
- const inputId = id != null ? id : React19__namespace.useId();
345
+ const inputId = id != null ? id : React21__namespace.useId();
537
346
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
538
347
  /* @__PURE__ */ jsxRuntime.jsx(
539
348
  "select",
@@ -794,11 +603,11 @@ function PhoneCountrySelect({
794
603
  className
795
604
  }) {
796
605
  var _a;
797
- const [open, setOpen] = React19__namespace.useState(false);
798
- const containerRef = React19__namespace.useRef(null);
799
- const listRef = React19__namespace.useRef(null);
606
+ const [open, setOpen] = React21__namespace.useState(false);
607
+ const containerRef = React21__namespace.useRef(null);
608
+ const listRef = React21__namespace.useRef(null);
800
609
  const selected = (_a = PHONE_COUNTRIES.find((c) => c.code === value)) != null ? _a : PHONE_COUNTRIES[0];
801
- React19__namespace.useEffect(() => {
610
+ React21__namespace.useEffect(() => {
802
611
  if (!open) return;
803
612
  const handler = (e) => {
804
613
  var _a2;
@@ -809,7 +618,7 @@ function PhoneCountrySelect({
809
618
  document.addEventListener("mousedown", handler);
810
619
  return () => document.removeEventListener("mousedown", handler);
811
620
  }, [open]);
812
- React19__namespace.useEffect(() => {
621
+ React21__namespace.useEffect(() => {
813
622
  if (!open || !listRef.current) return;
814
623
  const activeEl = listRef.current.querySelector("[data-selected=true]");
815
624
  activeEl == null ? void 0 : activeEl.scrollIntoView({ block: "nearest" });
@@ -905,145 +714,442 @@ function PhoneCountrySelect({
905
714
  )
906
715
  ] });
907
716
  }
908
- var COUNTRIES = [
909
- { code: "AF", name: "Afghanistan" },
910
- { code: "AL", name: "Albania" },
911
- { code: "DZ", name: "Algeria" },
912
- { code: "AO", name: "Angola" },
913
- { code: "AR", name: "Argentina" },
914
- { code: "AM", name: "Armenia" },
915
- { code: "AU", name: "Australia" },
916
- { code: "AT", name: "Austria" },
917
- { code: "AZ", name: "Azerbaijan" },
918
- { code: "BE", name: "Belgium" },
919
- { code: "BO", name: "Bolivia" },
920
- { code: "BA", name: "Bosnia" },
921
- { code: "BR", name: "Brazil" },
922
- { code: "BG", name: "Bulgaria" },
923
- { code: "KH", name: "Cambodia" },
924
- { code: "CA", name: "Canada" },
925
- { code: "CL", name: "Chile" },
926
- { code: "CN", name: "China" },
927
- { code: "CO", name: "Colombia" },
928
- { code: "CR", name: "Costa Rica" },
929
- { code: "HR", name: "Croatia" },
930
- { code: "CU", name: "Cuba" },
931
- { code: "CZ", name: "Czech Republic" },
932
- { code: "DK", name: "Denmark" },
933
- { code: "DO", name: "Dominican Republic" },
934
- { code: "EC", name: "Ecuador" },
935
- { code: "EG", name: "Egypt" },
936
- { code: "SV", name: "El Salvador" },
937
- { code: "ET", name: "Ethiopia" },
938
- { code: "FI", name: "Finland" },
939
- { code: "FR", name: "France" },
940
- { code: "GE", name: "Georgia" },
941
- { code: "DE", name: "Germany" },
942
- { code: "GH", name: "Ghana" },
943
- { code: "GR", name: "Greece" },
944
- { code: "GT", name: "Guatemala" },
945
- { code: "HN", name: "Honduras" },
946
- { code: "HK", name: "Hong Kong" },
947
- { code: "HU", name: "Hungary" },
948
- { code: "IS", name: "Iceland" },
949
- { code: "IN", name: "India" },
950
- { code: "ID", name: "Indonesia" },
951
- { code: "IR", name: "Iran" },
952
- { code: "IQ", name: "Iraq" },
953
- { code: "IE", name: "Ireland" },
954
- { code: "IL", name: "Israel" },
955
- { code: "IT", name: "Italy" },
956
- { code: "JM", name: "Jamaica" },
957
- { code: "JP", name: "Japan" },
958
- { code: "JO", name: "Jordan" },
959
- { code: "KZ", name: "Kazakhstan" },
960
- { code: "KE", name: "Kenya" },
961
- { code: "KW", name: "Kuwait" },
962
- { code: "LB", name: "Lebanon" },
963
- { code: "LY", name: "Libya" },
964
- { code: "MY", name: "Malaysia" },
965
- { code: "MX", name: "Mexico" },
966
- { code: "MA", name: "Morocco" },
967
- { code: "MZ", name: "Mozambique" },
968
- { code: "NP", name: "Nepal" },
969
- { code: "NL", name: "Netherlands" },
970
- { code: "NZ", name: "New Zealand" },
971
- { code: "NI", name: "Nicaragua" },
972
- { code: "NG", name: "Nigeria" },
973
- { code: "NO", name: "Norway" },
974
- { code: "PK", name: "Pakistan" },
975
- { code: "PA", name: "Panama" },
976
- { code: "PY", name: "Paraguay" },
977
- { code: "PE", name: "Peru" },
978
- { code: "PH", name: "Philippines" },
979
- { code: "PL", name: "Poland" },
980
- { code: "PT", name: "Portugal" },
981
- { code: "QA", name: "Qatar" },
982
- { code: "RO", name: "Romania" },
983
- { code: "RU", name: "Russia" },
984
- { code: "SA", name: "Saudi Arabia" },
985
- { code: "SN", name: "Senegal" },
986
- { code: "RS", name: "Serbia" },
987
- { code: "SG", name: "Singapore" },
988
- { code: "ZA", name: "South Africa" },
989
- { code: "KR", name: "South Korea" },
990
- { code: "ES", name: "Spain" },
991
- { code: "LK", name: "Sri Lanka" },
992
- { code: "SE", name: "Sweden" },
993
- { code: "CH", name: "Switzerland" },
994
- { code: "TW", name: "Taiwan" },
995
- { code: "TZ", name: "Tanzania" },
996
- { code: "TH", name: "Thailand" },
997
- { code: "TN", name: "Tunisia" },
998
- { code: "TR", name: "Turkey" },
999
- { code: "UA", name: "Ukraine" },
1000
- { code: "AE", name: "United Arab Emirates" },
1001
- { code: "GB", name: "United Kingdom" },
1002
- { code: "US", name: "United States" },
1003
- { code: "UY", name: "Uruguay" },
1004
- { code: "UZ", name: "Uzbekistan" },
1005
- { code: "VE", name: "Venezuela" },
1006
- { code: "VN", name: "Vietnam" },
1007
- { code: "YE", name: "Yemen" },
1008
- { code: "ZW", name: "Zimbabwe" }
1009
- ];
1010
- function CountrySearchField({
717
+ function Calendar(_a) {
718
+ var _b = _a, {
719
+ className,
720
+ classNames,
721
+ showOutsideDays = true,
722
+ captionLayout = "label",
723
+ buttonVariant = "ghost",
724
+ locale,
725
+ formatters,
726
+ components
727
+ } = _b, props = __objRest(_b, [
728
+ "className",
729
+ "classNames",
730
+ "showOutsideDays",
731
+ "captionLayout",
732
+ "buttonVariant",
733
+ "locale",
734
+ "formatters",
735
+ "components"
736
+ ]);
737
+ const defaultClassNames = reactDayPicker.getDefaultClassNames();
738
+ return /* @__PURE__ */ jsxRuntime.jsx(
739
+ reactDayPicker.DayPicker,
740
+ __spreadValues({
741
+ showOutsideDays,
742
+ className: cn(
743
+ "group/calendar bg-background p-2 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(7)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent",
744
+ String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
745
+ String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
746
+ className
747
+ ),
748
+ captionLayout,
749
+ locale,
750
+ formatters: __spreadValues({
751
+ formatMonthDropdown: (date) => date.toLocaleString(locale == null ? void 0 : locale.code, { month: "short" })
752
+ }, formatters),
753
+ classNames: __spreadValues({
754
+ root: cn("w-fit", defaultClassNames.root),
755
+ months: cn(
756
+ "relative flex flex-col gap-4 md:flex-row",
757
+ defaultClassNames.months
758
+ ),
759
+ month: cn("flex w-full flex-col gap-4", defaultClassNames.month),
760
+ nav: cn(
761
+ "absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",
762
+ defaultClassNames.nav
763
+ ),
764
+ button_previous: cn(
765
+ buttonVariants2({ variant: buttonVariant }),
766
+ "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
767
+ defaultClassNames.button_previous
768
+ ),
769
+ button_next: cn(
770
+ buttonVariants2({ variant: buttonVariant }),
771
+ "size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
772
+ defaultClassNames.button_next
773
+ ),
774
+ month_caption: cn(
775
+ "flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)",
776
+ defaultClassNames.month_caption
777
+ ),
778
+ dropdowns: cn(
779
+ "flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium",
780
+ defaultClassNames.dropdowns
781
+ ),
782
+ dropdown_root: cn(
783
+ "relative rounded-(--cell-radius)",
784
+ defaultClassNames.dropdown_root
785
+ ),
786
+ dropdown: cn(
787
+ "absolute inset-0 bg-popover opacity-0",
788
+ defaultClassNames.dropdown
789
+ ),
790
+ caption_label: cn(
791
+ "font-medium select-none",
792
+ captionLayout === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground",
793
+ defaultClassNames.caption_label
794
+ ),
795
+ table: "w-full border-collapse",
796
+ weekdays: cn("flex", defaultClassNames.weekdays),
797
+ weekday: cn(
798
+ "flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none",
799
+ defaultClassNames.weekday
800
+ ),
801
+ week: cn("mt-2 flex w-full", defaultClassNames.week),
802
+ week_number_header: cn(
803
+ "w-(--cell-size) select-none",
804
+ defaultClassNames.week_number_header
805
+ ),
806
+ week_number: cn(
807
+ "text-[0.8rem] text-muted-foreground select-none",
808
+ defaultClassNames.week_number
809
+ ),
810
+ day: cn(
811
+ "group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)",
812
+ props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)",
813
+ defaultClassNames.day
814
+ ),
815
+ range_start: cn(
816
+ "relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted",
817
+ defaultClassNames.range_start
818
+ ),
819
+ range_middle: cn("rounded-none", defaultClassNames.range_middle),
820
+ range_end: cn(
821
+ "relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted",
822
+ defaultClassNames.range_end
823
+ ),
824
+ today: cn(
825
+ "rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none",
826
+ defaultClassNames.today
827
+ ),
828
+ outside: cn(
829
+ "text-muted-foreground aria-selected:text-muted-foreground",
830
+ defaultClassNames.outside
831
+ ),
832
+ disabled: cn(
833
+ "text-muted-foreground opacity-50",
834
+ defaultClassNames.disabled
835
+ ),
836
+ hidden: cn("invisible", defaultClassNames.hidden)
837
+ }, classNames),
838
+ components: __spreadValues({
839
+ Root: (_a2) => {
840
+ var _b2 = _a2, { className: className2, rootRef } = _b2, props2 = __objRest(_b2, ["className", "rootRef"]);
841
+ return /* @__PURE__ */ jsxRuntime.jsx(
842
+ "div",
843
+ __spreadValues({
844
+ "data-slot": "calendar",
845
+ ref: rootRef,
846
+ className: cn(className2)
847
+ }, props2)
848
+ );
849
+ },
850
+ Chevron: (_c) => {
851
+ var _d = _c, { className: className2, orientation } = _d, props2 = __objRest(_d, ["className", "orientation"]);
852
+ if (orientation === "left") {
853
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeftIcon, __spreadValues({ className: cn("size-4", className2) }, props2));
854
+ }
855
+ if (orientation === "right") {
856
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, __spreadValues({ className: cn("size-4", className2) }, props2));
857
+ }
858
+ return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, __spreadValues({ className: cn("size-4", className2) }, props2));
859
+ },
860
+ DayButton: (_e) => {
861
+ var props2 = __objRest(_e, []);
862
+ return /* @__PURE__ */ jsxRuntime.jsx(CalendarDayButton, __spreadValues({ locale }, props2));
863
+ },
864
+ WeekNumber: (_f) => {
865
+ var _g = _f, { children } = _g, props2 = __objRest(_g, ["children"]);
866
+ return /* @__PURE__ */ jsxRuntime.jsx("td", __spreadProps(__spreadValues({}, props2), { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) }));
867
+ }
868
+ }, components)
869
+ }, props)
870
+ );
871
+ }
872
+ function CalendarDayButton(_a) {
873
+ var _b = _a, {
874
+ className,
875
+ day,
876
+ modifiers,
877
+ locale
878
+ } = _b, props = __objRest(_b, [
879
+ "className",
880
+ "day",
881
+ "modifiers",
882
+ "locale"
883
+ ]);
884
+ const defaultClassNames = reactDayPicker.getDefaultClassNames();
885
+ const ref = React21__namespace.useRef(null);
886
+ React21__namespace.useEffect(() => {
887
+ var _a2;
888
+ if (modifiers.focused) (_a2 = ref.current) == null ? void 0 : _a2.focus();
889
+ }, [modifiers.focused]);
890
+ return /* @__PURE__ */ jsxRuntime.jsx(
891
+ Button2,
892
+ __spreadValues({
893
+ variant: "ghost",
894
+ size: "icon",
895
+ "data-day": day.date.toLocaleDateString(locale == null ? void 0 : locale.code),
896
+ "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
897
+ "data-range-start": modifiers.range_start,
898
+ "data-range-end": modifiers.range_end,
899
+ "data-range-middle": modifiers.range_middle,
900
+ className: cn(
901
+ "relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70",
902
+ defaultClassNames.day,
903
+ className
904
+ )
905
+ }, props)
906
+ );
907
+ }
908
+ function BirthDateField({
909
+ label,
910
+ required,
1011
911
  value,
1012
912
  onChange,
1013
- required,
1014
- label = "Country",
1015
- countries,
1016
- placeholder = "Search country\u2026",
1017
913
  className
1018
914
  }) {
1019
- var _a;
1020
- const list = countries != null ? countries : COUNTRIES;
1021
- const [query, setQuery] = React19__namespace.useState("");
1022
- const [open, setOpen] = React19__namespace.useState(false);
1023
- const containerRef = React19__namespace.useRef(null);
1024
- const searchRef = React19__namespace.useRef(null);
1025
- const selected = list.find((c) => c.code === value);
1026
- const isFloated = open || !!selected;
1027
- const filtered = query.trim() ? list.filter((c) => c.name.toLowerCase().includes(query.toLowerCase())) : list;
1028
- React19__namespace.useEffect(() => {
915
+ const [open, setOpen] = React21__namespace.useState(false);
916
+ const [text, setText] = React21__namespace.useState(
917
+ value ? dateFns.format(value, "dd/MM/yyyy") : ""
918
+ );
919
+ const containerRef = React21__namespace.useRef(null);
920
+ const inputId = React21__namespace.useId();
921
+ React21__namespace.useEffect(() => {
922
+ setText(value ? dateFns.format(value, "dd/MM/yyyy") : "");
923
+ }, [value]);
924
+ React21__namespace.useEffect(() => {
1029
925
  if (!open) return;
1030
926
  const handler = (e) => {
1031
- var _a2;
1032
- if (!((_a2 = containerRef.current) == null ? void 0 : _a2.contains(e.target))) {
1033
- setOpen(false);
1034
- setQuery("");
1035
- }
927
+ var _a;
928
+ if (!((_a = containerRef.current) == null ? void 0 : _a.contains(e.target))) setOpen(false);
1036
929
  };
1037
930
  document.addEventListener("mousedown", handler);
1038
931
  return () => document.removeEventListener("mousedown", handler);
1039
932
  }, [open]);
1040
- const handleOpen = () => {
1041
- setOpen(true);
1042
- setQuery("");
1043
- setTimeout(() => {
1044
- var _a2;
1045
- return (_a2 = searchRef.current) == null ? void 0 : _a2.focus();
1046
- }, 0);
933
+ const handleTextChange = (e) => {
934
+ const digits = e.target.value.replace(/\D/g, "").slice(0, 8);
935
+ let formatted = digits.slice(0, 2);
936
+ if (digits.length > 2) formatted += "/" + digits.slice(2, 4);
937
+ if (digits.length > 4) formatted += "/" + digits.slice(4, 8);
938
+ setText(formatted);
939
+ if (formatted.length === 10) {
940
+ const [dd, mm, yyyy] = formatted.split("/").map(Number);
941
+ const d = new Date(yyyy, mm - 1, dd);
942
+ if (!isNaN(d.getTime()) && d.getFullYear() === yyyy && d <= /* @__PURE__ */ new Date()) {
943
+ onChange(d);
944
+ return;
945
+ }
946
+ }
947
+ onChange(void 0);
948
+ };
949
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: cn("relative w-full", className), children: [
950
+ /* @__PURE__ */ jsxRuntime.jsxs(
951
+ "div",
952
+ {
953
+ className: cn(
954
+ "flex items-center rounded-lg border border-border bg-background h-14 transition-colors",
955
+ open ? "border-primary ring-1 ring-primary" : "focus-within:border-primary focus-within:ring-1 focus-within:ring-primary"
956
+ ),
957
+ children: [
958
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1 h-full", children: [
959
+ /* @__PURE__ */ jsxRuntime.jsxs(
960
+ "label",
961
+ {
962
+ htmlFor: inputId,
963
+ className: "pointer-events-none absolute left-3 top-2 text-xs text-muted-foreground font-ui",
964
+ children: [
965
+ label,
966
+ required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary ml-0.5", children: "*" })
967
+ ]
968
+ }
969
+ ),
970
+ /* @__PURE__ */ jsxRuntime.jsx(
971
+ "input",
972
+ {
973
+ id: inputId,
974
+ type: "text",
975
+ inputMode: "numeric",
976
+ value: text,
977
+ onChange: handleTextChange,
978
+ placeholder: "dd/mm/yyyy",
979
+ className: "block h-full w-full bg-transparent px-3 pt-5 pb-2 text-base text-foreground font-ui focus:outline-none placeholder:text-muted-foreground/50"
980
+ }
981
+ )
982
+ ] }),
983
+ /* @__PURE__ */ jsxRuntime.jsx(
984
+ "button",
985
+ {
986
+ type: "button",
987
+ onClick: () => setOpen((v) => !v),
988
+ tabIndex: -1,
989
+ "aria-label": "Open calendar",
990
+ className: "px-3 h-full flex items-center text-muted-foreground hover:text-primary transition-colors focus:outline-none",
991
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, { className: "h-4 w-4" })
992
+ }
993
+ )
994
+ ]
995
+ }
996
+ ),
997
+ open && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-[calc(100%+4px)] left-0 right-0 z-50 rounded-xl border border-border bg-background shadow-lg overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
998
+ Calendar,
999
+ {
1000
+ mode: "single",
1001
+ selected: value,
1002
+ onSelect: (date) => {
1003
+ onChange(date);
1004
+ setOpen(false);
1005
+ },
1006
+ defaultMonth: value != null ? value : new Date(1990, 0, 1),
1007
+ disabled: { after: /* @__PURE__ */ new Date() },
1008
+ className: "font-ui w-full",
1009
+ autoFocus: true
1010
+ }
1011
+ ) })
1012
+ ] });
1013
+ }
1014
+ var COUNTRIES = [
1015
+ { code: "AF", name: "Afghanistan" },
1016
+ { code: "AL", name: "Albania" },
1017
+ { code: "DZ", name: "Algeria" },
1018
+ { code: "AO", name: "Angola" },
1019
+ { code: "AR", name: "Argentina" },
1020
+ { code: "AM", name: "Armenia" },
1021
+ { code: "AU", name: "Australia" },
1022
+ { code: "AT", name: "Austria" },
1023
+ { code: "AZ", name: "Azerbaijan" },
1024
+ { code: "BE", name: "Belgium" },
1025
+ { code: "BO", name: "Bolivia" },
1026
+ { code: "BA", name: "Bosnia" },
1027
+ { code: "BR", name: "Brazil" },
1028
+ { code: "BG", name: "Bulgaria" },
1029
+ { code: "KH", name: "Cambodia" },
1030
+ { code: "CA", name: "Canada" },
1031
+ { code: "CL", name: "Chile" },
1032
+ { code: "CN", name: "China" },
1033
+ { code: "CO", name: "Colombia" },
1034
+ { code: "CR", name: "Costa Rica" },
1035
+ { code: "HR", name: "Croatia" },
1036
+ { code: "CU", name: "Cuba" },
1037
+ { code: "CZ", name: "Czech Republic" },
1038
+ { code: "DK", name: "Denmark" },
1039
+ { code: "DO", name: "Dominican Republic" },
1040
+ { code: "EC", name: "Ecuador" },
1041
+ { code: "EG", name: "Egypt" },
1042
+ { code: "SV", name: "El Salvador" },
1043
+ { code: "ET", name: "Ethiopia" },
1044
+ { code: "FI", name: "Finland" },
1045
+ { code: "FR", name: "France" },
1046
+ { code: "GE", name: "Georgia" },
1047
+ { code: "DE", name: "Germany" },
1048
+ { code: "GH", name: "Ghana" },
1049
+ { code: "GR", name: "Greece" },
1050
+ { code: "GT", name: "Guatemala" },
1051
+ { code: "HN", name: "Honduras" },
1052
+ { code: "HK", name: "Hong Kong" },
1053
+ { code: "HU", name: "Hungary" },
1054
+ { code: "IS", name: "Iceland" },
1055
+ { code: "IN", name: "India" },
1056
+ { code: "ID", name: "Indonesia" },
1057
+ { code: "IR", name: "Iran" },
1058
+ { code: "IQ", name: "Iraq" },
1059
+ { code: "IE", name: "Ireland" },
1060
+ { code: "IL", name: "Israel" },
1061
+ { code: "IT", name: "Italy" },
1062
+ { code: "JM", name: "Jamaica" },
1063
+ { code: "JP", name: "Japan" },
1064
+ { code: "JO", name: "Jordan" },
1065
+ { code: "KZ", name: "Kazakhstan" },
1066
+ { code: "KE", name: "Kenya" },
1067
+ { code: "KW", name: "Kuwait" },
1068
+ { code: "LB", name: "Lebanon" },
1069
+ { code: "LY", name: "Libya" },
1070
+ { code: "MY", name: "Malaysia" },
1071
+ { code: "MX", name: "Mexico" },
1072
+ { code: "MA", name: "Morocco" },
1073
+ { code: "MZ", name: "Mozambique" },
1074
+ { code: "NP", name: "Nepal" },
1075
+ { code: "NL", name: "Netherlands" },
1076
+ { code: "NZ", name: "New Zealand" },
1077
+ { code: "NI", name: "Nicaragua" },
1078
+ { code: "NG", name: "Nigeria" },
1079
+ { code: "NO", name: "Norway" },
1080
+ { code: "PK", name: "Pakistan" },
1081
+ { code: "PA", name: "Panama" },
1082
+ { code: "PY", name: "Paraguay" },
1083
+ { code: "PE", name: "Peru" },
1084
+ { code: "PH", name: "Philippines" },
1085
+ { code: "PL", name: "Poland" },
1086
+ { code: "PT", name: "Portugal" },
1087
+ { code: "QA", name: "Qatar" },
1088
+ { code: "RO", name: "Romania" },
1089
+ { code: "RU", name: "Russia" },
1090
+ { code: "SA", name: "Saudi Arabia" },
1091
+ { code: "SN", name: "Senegal" },
1092
+ { code: "RS", name: "Serbia" },
1093
+ { code: "SG", name: "Singapore" },
1094
+ { code: "ZA", name: "South Africa" },
1095
+ { code: "KR", name: "South Korea" },
1096
+ { code: "ES", name: "Spain" },
1097
+ { code: "LK", name: "Sri Lanka" },
1098
+ { code: "SE", name: "Sweden" },
1099
+ { code: "CH", name: "Switzerland" },
1100
+ { code: "TW", name: "Taiwan" },
1101
+ { code: "TZ", name: "Tanzania" },
1102
+ { code: "TH", name: "Thailand" },
1103
+ { code: "TN", name: "Tunisia" },
1104
+ { code: "TR", name: "Turkey" },
1105
+ { code: "UA", name: "Ukraine" },
1106
+ { code: "AE", name: "United Arab Emirates" },
1107
+ { code: "GB", name: "United Kingdom" },
1108
+ { code: "US", name: "United States" },
1109
+ { code: "UY", name: "Uruguay" },
1110
+ { code: "UZ", name: "Uzbekistan" },
1111
+ { code: "VE", name: "Venezuela" },
1112
+ { code: "VN", name: "Vietnam" },
1113
+ { code: "YE", name: "Yemen" },
1114
+ { code: "ZW", name: "Zimbabwe" }
1115
+ ];
1116
+ function CountrySearchField({
1117
+ value,
1118
+ onChange,
1119
+ required,
1120
+ label = "Country",
1121
+ countries,
1122
+ placeholder = "Search country\u2026",
1123
+ className
1124
+ }) {
1125
+ var _a;
1126
+ const list = countries != null ? countries : COUNTRIES;
1127
+ const [query, setQuery] = React21__namespace.useState("");
1128
+ const [open, setOpen] = React21__namespace.useState(false);
1129
+ const containerRef = React21__namespace.useRef(null);
1130
+ const searchRef = React21__namespace.useRef(null);
1131
+ const selected = list.find((c) => c.code === value);
1132
+ const isFloated = open || !!selected;
1133
+ const filtered = query.trim() ? list.filter((c) => c.name.toLowerCase().includes(query.toLowerCase())) : list;
1134
+ React21__namespace.useEffect(() => {
1135
+ if (!open) return;
1136
+ const handler = (e) => {
1137
+ var _a2;
1138
+ if (!((_a2 = containerRef.current) == null ? void 0 : _a2.contains(e.target))) {
1139
+ setOpen(false);
1140
+ setQuery("");
1141
+ }
1142
+ };
1143
+ document.addEventListener("mousedown", handler);
1144
+ return () => document.removeEventListener("mousedown", handler);
1145
+ }, [open]);
1146
+ const handleOpen = () => {
1147
+ setOpen(true);
1148
+ setQuery("");
1149
+ setTimeout(() => {
1150
+ var _a2;
1151
+ return (_a2 = searchRef.current) == null ? void 0 : _a2.focus();
1152
+ }, 0);
1047
1153
  };
1048
1154
  const handleSelect = (code) => {
1049
1155
  onChange(code);
@@ -1132,7 +1238,7 @@ function Alert({ variant = "info", children, className }) {
1132
1238
  function AdventureCard({ adventure }) {
1133
1239
  var _a, _b, _c, _d, _e, _f;
1134
1240
  const isControlled = (_b = (_a = adventure.optionals) == null ? void 0 : _a.some((o) => o.onCheckedChange !== void 0)) != null ? _b : false;
1135
- const [checkedInternal, setCheckedInternal] = React19__namespace.useState(
1241
+ const [checkedInternal, setCheckedInternal] = React21__namespace.useState(
1136
1242
  new Set((_d = (_c = adventure.optionals) == null ? void 0 : _c.filter((o) => o.defaultChecked).map((o) => o.id)) != null ? _d : [])
1137
1243
  );
1138
1244
  const isChecked = (opt) => {
@@ -1450,129 +1556,26 @@ function OfferSummarySection({
1450
1556
  )
1451
1557
  ] });
1452
1558
  }
1453
- function BirthDateField({
1454
- label,
1455
- required,
1456
- value,
1457
- onChange
1458
- }) {
1459
- const [open, setOpen] = React19__namespace.useState(false);
1460
- const [text, setText] = React19__namespace.useState(value ? dateFns.format(value, "dd/MM/yyyy") : "");
1461
- const containerRef = React19__namespace.useRef(null);
1462
- const inputId = React19__namespace.useId();
1463
- React19__namespace.useEffect(() => {
1464
- setText(value ? dateFns.format(value, "dd/MM/yyyy") : "");
1465
- }, [value]);
1466
- React19__namespace.useEffect(() => {
1467
- if (!open) return;
1468
- const handler = (e) => {
1469
- var _a;
1470
- if (!((_a = containerRef.current) == null ? void 0 : _a.contains(e.target))) setOpen(false);
1471
- };
1472
- document.addEventListener("mousedown", handler);
1473
- return () => document.removeEventListener("mousedown", handler);
1474
- }, [open]);
1475
- const handleTextChange = (e) => {
1476
- const digits = e.target.value.replace(/\D/g, "").slice(0, 8);
1477
- let formatted = digits.slice(0, 2);
1478
- if (digits.length > 2) formatted += "/" + digits.slice(2, 4);
1479
- if (digits.length > 4) formatted += "/" + digits.slice(4, 8);
1480
- setText(formatted);
1481
- if (formatted.length === 10) {
1482
- const [dd, mm, yyyy] = formatted.split("/").map(Number);
1483
- const d = new Date(yyyy, mm - 1, dd);
1484
- if (!isNaN(d.getTime()) && d.getFullYear() === yyyy && d <= /* @__PURE__ */ new Date()) {
1485
- onChange(d);
1486
- return;
1487
- }
1488
- }
1489
- onChange(void 0);
1490
- };
1491
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: "relative w-full", children: [
1492
- /* @__PURE__ */ jsxRuntime.jsxs(
1493
- "div",
1494
- {
1495
- className: cn(
1496
- "flex items-center rounded-lg border border-border bg-background h-14 transition-colors",
1497
- open ? "border-primary ring-1 ring-primary" : "focus-within:border-primary focus-within:ring-1 focus-within:ring-primary"
1498
- ),
1499
- children: [
1500
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1 h-full", children: [
1501
- /* @__PURE__ */ jsxRuntime.jsxs(
1502
- "label",
1503
- {
1504
- htmlFor: inputId,
1505
- className: "pointer-events-none absolute left-3 top-2 text-xs text-muted-foreground font-ui",
1506
- children: [
1507
- label,
1508
- required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary ml-0.5", children: "*" })
1509
- ]
1510
- }
1511
- ),
1512
- /* @__PURE__ */ jsxRuntime.jsx(
1513
- "input",
1514
- {
1515
- id: inputId,
1516
- type: "text",
1517
- inputMode: "numeric",
1518
- value: text,
1519
- onChange: handleTextChange,
1520
- placeholder: "dd/mm/yyyy",
1521
- className: "block h-full w-full bg-transparent px-3 pt-5 pb-2 text-base text-foreground font-ui focus:outline-none placeholder:text-muted-foreground/50"
1522
- }
1523
- )
1524
- ] }),
1525
- /* @__PURE__ */ jsxRuntime.jsx(
1526
- "button",
1527
- {
1528
- type: "button",
1529
- onClick: () => setOpen((v) => !v),
1530
- tabIndex: -1,
1531
- "aria-label": "Open calendar",
1532
- className: "px-3 h-full flex items-center text-muted-foreground hover:text-primary transition-colors focus:outline-none",
1533
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, { className: "h-4 w-4" })
1534
- }
1535
- )
1536
- ]
1537
- }
1538
- ),
1539
- open && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-[calc(100%+4px)] left-0 right-0 z-50 rounded-xl border border-border bg-background shadow-lg overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
1540
- Calendar,
1541
- {
1542
- mode: "single",
1543
- selected: value,
1544
- onSelect: (date) => {
1545
- onChange(date);
1546
- setOpen(false);
1547
- },
1548
- defaultMonth: value != null ? value : new Date(1990, 0, 1),
1549
- disabled: { after: /* @__PURE__ */ new Date() },
1550
- className: "font-ui w-full",
1551
- autoFocus: true
1552
- }
1553
- ) })
1554
- ] });
1555
- }
1556
- function BookingShell({
1557
- steps,
1558
- currentStep,
1559
- title = "Booking details",
1560
- children,
1561
- onNext,
1562
- onBack,
1563
- onCancel,
1564
- nextLabel = "Next",
1565
- backLabel = "Back",
1566
- cancelLabel = "Cancel",
1567
- nextDisabled,
1568
- nextBlockedMessage,
1569
- error,
1570
- successMessage
1559
+ function BookingShell({
1560
+ steps,
1561
+ currentStep,
1562
+ title = "Booking details",
1563
+ children,
1564
+ onNext,
1565
+ onBack,
1566
+ onCancel,
1567
+ nextLabel = "Next",
1568
+ backLabel = "Back",
1569
+ cancelLabel = "Cancel",
1570
+ nextDisabled,
1571
+ nextBlockedMessage,
1572
+ error,
1573
+ successMessage
1571
1574
  }) {
1572
1575
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card overflow-hidden", children: [
1573
1576
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-border px-5 py-4 bg-muted/20", children: [
1574
1577
  /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-bold text-foreground font-heading mb-2", children: title }),
1575
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: steps.map((label, i) => /* @__PURE__ */ jsxRuntime.jsxs(React19__namespace.Fragment, { children: [
1578
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: steps.map((label, i) => /* @__PURE__ */ jsxRuntime.jsxs(React21__namespace.Fragment, { children: [
1576
1579
  /* @__PURE__ */ jsxRuntime.jsx(
1577
1580
  "span",
1578
1581
  {
@@ -1707,73 +1710,71 @@ function PaymentMethodSelector({
1707
1710
  )) })
1708
1711
  ] });
1709
1712
  }
1710
- var TERMS_CONTENT = [
1711
- {
1712
- heading: "1. Introdu\xE7\xE3o",
1713
- body: "Bem-vindo \xE0 PlanetaEXO. Ao acessar nosso site ou realizar uma reserva, voc\xEA concorda com estes Termos e Condi\xE7\xF5es. Por favor, leia-os atentamente antes de efetuar qualquer compra ou reserva."
1714
- },
1715
- {
1716
- heading: "2. Defini\xE7\xF5es",
1717
- body: '"PlanetaEXO" refere-se \xE0 empresa organizadora de viagens e experi\xEAncias. "Cliente" refere-se \xE0 pessoa que realiza a reserva. "Servi\xE7o" refere-se a qualquer pacote de viagem, aventura, passeio ou experi\xEAncia oferecida pela PlanetaEXO.'
1718
- },
1719
- {
1720
- heading: "3. Reservas e Confirma\xE7\xE3o",
1721
- body: "Uma reserva \xE9 considerada confirmada somente ap\xF3s o recebimento do pagamento (total ou dep\xF3sito conforme aplic\xE1vel) e o envio de confirma\xE7\xE3o por escrito pela PlanetaEXO. A PlanetaEXO reserva-se o direito de recusar ou cancelar reservas a seu crit\xE9rio."
1722
- },
1723
- {
1724
- heading: "4. Pre\xE7os e Pagamento",
1725
- body: "Todos os pre\xE7os s\xE3o expressos na moeda indicada na proposta e podem estar sujeitos a varia\xE7\xE3o cambial. O pagamento do dep\xF3sito ou valor total deve ser realizado nos prazos estipulados na proposta. A PlanetaEXO n\xE3o se responsabiliza por flutua\xE7\xF5es cambiais ap\xF3s a confirma\xE7\xE3o da reserva."
1726
- },
1727
- {
1728
- heading: "5. Pol\xEDtica de Cancelamento",
1729
- body: "Cancelamentos devem ser comunicados por escrito \xE0 PlanetaEXO. As penalidades de cancelamento variam conforme o prazo de anteced\xEAncia: cancelamentos com mais de 30 dias de anteced\xEAncia incorrem em perda do dep\xF3sito; cancelamentos com menos de 30 dias incorrem em perda de 50% do valor total; cancelamentos com menos de 15 dias incorrem em perda de 100% do valor total. Casos especiais (for\xE7a maior, emerg\xEAncias m\xE9dicas comprovadas) ser\xE3o avaliados individualmente."
1730
- },
1731
- {
1732
- heading: "6. Altera\xE7\xF5es de Itiner\xE1rio",
1733
- body: "A PlanetaEXO reserva-se o direito de modificar itiner\xE1rios, acomoda\xE7\xF5es ou atividades por raz\xF5es de seguran\xE7a, condi\xE7\xF5es clim\xE1ticas, for\xE7a maior ou outras circunst\xE2ncias fora de seu controle, sem que isso implique em responsabilidade por perdas ou danos. Em caso de altera\xE7\xF5es significativas, o cliente ser\xE1 notificado o mais brevemente poss\xEDvel."
1713
+ var TERMS_I18N = {
1714
+ en: {
1715
+ before: "I have read and accept the ",
1716
+ link: "terms and conditions",
1717
+ after: " of the reservation.",
1718
+ modalTitle: "Terms and Conditions",
1719
+ closeLabel: "Close"
1734
1720
  },
1735
- {
1736
- heading: "7. Responsabilidades do Cliente",
1737
- body: "O cliente \xE9 respons\xE1vel por: (a) garantir que possui documenta\xE7\xE3o v\xE1lida (passaporte, vistos, vacinas) para os destinos da viagem; (b) contratar seguro de viagem adequado; (c) informar eventuais condi\xE7\xF5es m\xE9dicas ou restri\xE7\xF5es alimentares relevantes; (d) cumprir as leis e regulamentos locais dos destinos visitados."
1721
+ pt: {
1722
+ before: "Li e aceito os ",
1723
+ link: "termos e condi\xE7\xF5es",
1724
+ after: " da reserva.",
1725
+ modalTitle: "Termos e Condi\xE7\xF5es",
1726
+ closeLabel: "Fechar"
1738
1727
  },
1739
- {
1740
- heading: "8. Seguro de Viagem",
1741
- body: "Recomendamos fortemente a contrata\xE7\xE3o de seguro de viagem abrangente que cubra cancelamento, emerg\xEAncias m\xE9dicas, evacua\xE7\xE3o e bagagem. A PlanetaEXO n\xE3o se responsabiliza por despesas resultantes de situa\xE7\xF5es cobertas por seguro que o cliente tenha optado por n\xE3o contratar."
1728
+ fr: {
1729
+ before: "J'ai lu et j'accepte les ",
1730
+ link: "conditions g\xE9n\xE9rales",
1731
+ after: " de la r\xE9servation.",
1732
+ modalTitle: "Conditions G\xE9n\xE9rales",
1733
+ closeLabel: "Fermer"
1742
1734
  },
1735
+ de: {
1736
+ before: "Ich habe die ",
1737
+ link: "Allgemeinen Gesch\xE4ftsbedingungen",
1738
+ after: " gelesen und akzeptiere sie.",
1739
+ modalTitle: "Allgemeine Gesch\xE4ftsbedingungen",
1740
+ closeLabel: "Schlie\xDFen"
1741
+ }
1742
+ };
1743
+ var TERMS_CONTENT = [
1743
1744
  {
1744
- heading: "9. Limita\xE7\xE3o de Responsabilidade",
1745
- body: "A responsabilidade da PlanetaEXO limita-se ao valor total pago pelo cliente. A PlanetaEXO n\xE3o se responsabiliza por danos indiretos, perdas de receita, danos morais ou outras consequ\xEAncias decorrentes de falhas em servi\xE7os de terceiros (companhias a\xE9reas, hot\xE9is, operadores locais) ou eventos de for\xE7a maior."
1745
+ body: "These Terms and Conditions govern your booking with PlanetaEXO. By making a reservation, you agree to the following terms. Please read them carefully before confirming your booking."
1746
1746
  },
1747
1747
  {
1748
- heading: "10. Sa\xFAde e Seguran\xE7a",
1749
- body: "Algumas atividades oferecidas pela PlanetaEXO podem envolver riscos f\xEDsicos. O cliente deve avaliar sua condi\xE7\xE3o de sa\xFAde e aptid\xE3o f\xEDsica antes de confirmar a reserva. A PlanetaEXO pode recusar a participa\xE7\xE3o de clientes que n\xE3o atendam aos requisitos m\xEDnimos de sa\xFAde e seguran\xE7a de uma atividade."
1748
+ heading: "1. Bookings and payments",
1749
+ body: "A booking is confirmed only upon receipt of the required deposit or full payment as specified in your proposal. Prices are quoted in the currency indicated in your proposal. Full payment is due prior to departure on the date stipulated in your booking confirmation. PlanetaEXO reserves the right to cancel unconfirmed reservations and is not responsible for exchange rate fluctuations after payment is received."
1750
1750
  },
1751
1751
  {
1752
- heading: "11. Privacidade e Dados Pessoais",
1753
- body: "As informa\xE7\xF5es fornecidas pelo cliente ser\xE3o utilizadas exclusivamente para a presta\xE7\xE3o dos servi\xE7os contratados e para fins operacionais relacionados. A PlanetaEXO compromete-se a proteger os dados pessoais dos clientes conforme a legisla\xE7\xE3o aplic\xE1vel (LGPD no Brasil). Os dados n\xE3o ser\xE3o vendidos ou compartilhados com terceiros, exceto fornecedores necess\xE1rios para a execu\xE7\xE3o dos servi\xE7os."
1752
+ heading: "2. Cancellation policy",
1753
+ body: "All cancellations must be submitted in writing. The following fees apply: more than 30 days before departure \u2014 loss of deposit; 15\u201330 days before departure \u2014 50% of the total cost; fewer than 15 days before departure \u2014 100% of the total cost. Cases involving force majeure or documented medical emergencies will be evaluated individually."
1754
1754
  },
1755
1755
  {
1756
- heading: "12. Propriedade Intelectual",
1757
- body: "Todo o conte\xFAdo do site e dos materiais da PlanetaEXO (textos, imagens, logotipos, itiner\xE1rios) \xE9 protegido por direitos autorais. \xC9 proibida a reprodu\xE7\xE3o, distribui\xE7\xE3o ou uso comercial sem autoriza\xE7\xE3o pr\xE9via e expressa da PlanetaEXO."
1756
+ heading: "3. Changes and modifications",
1757
+ body: "PlanetaEXO reserves the right to modify itineraries, accommodations, or activities for reasons of safety, weather conditions, force majeure, or other circumstances beyond our control. You will be notified of any significant changes as promptly as possible. Minor adjustments do not entitle the traveller to a refund or compensation."
1758
1758
  },
1759
1759
  {
1760
- heading: "13. Resolu\xE7\xE3o de Disputas",
1761
- body: "Eventuais disputas ser\xE3o resolvidas preferencialmente por media\xE7\xE3o. Caso n\xE3o haja acordo, as partes elegem o foro da Comarca de S\xE3o Paulo, Brasil, para dirimir quaisquer controv\xE9rsias decorrentes destes Termos, com ren\xFAncia de qualquer outro, por mais privilegiado que seja."
1760
+ heading: "4. Travel insurance",
1761
+ body: "We strongly recommend that all travellers obtain comprehensive travel insurance covering trip cancellation, medical emergencies, evacuation, and baggage loss prior to departure. PlanetaEXO is not liable for costs or losses that would have been covered by adequate travel insurance."
1762
1762
  },
1763
1763
  {
1764
- heading: "14. Aceita\xE7\xE3o dos Termos",
1765
- body: "Ao realizar uma reserva com a PlanetaEXO, o cliente declara ter lido, compreendido e concordado com todos estes Termos e Condi\xE7\xF5es. Estes termos podem ser atualizados periodicamente; a vers\xE3o vigente estar\xE1 sempre dispon\xEDvel no site oficial da PlanetaEXO."
1764
+ heading: "5. Liability",
1765
+ body: "PlanetaEXO's liability is limited to the total amount paid by the client for the services in question. We are not responsible for indirect losses, consequential damages, or service failures caused by third-party providers (airlines, hotels, local operators) or force majeure events. Participation in adventure activities carries inherent risks; travellers acknowledge and accept these risks by confirming their booking."
1766
1766
  }
1767
1767
  ];
1768
1768
  function TermsSection({
1769
1769
  title = "Terms and conditions",
1770
1770
  checked,
1771
1771
  onChange,
1772
- label,
1773
1772
  warningMessage,
1774
- viewTermsLabel = "Ver termos e condi\xE7\xF5es completos"
1773
+ locale = "en"
1775
1774
  }) {
1776
- const [modalOpen, setModalOpen] = React19__namespace.useState(false);
1775
+ var _a;
1776
+ const [modalOpen, setModalOpen] = React21__namespace.useState(false);
1777
+ const i18n = (_a = TERMS_I18N[locale]) != null ? _a : TERMS_I18N.en;
1777
1778
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-border p-4 flex flex-col gap-3", children: [
1778
1779
  /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest", children: title }),
1779
1780
  /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-start gap-2.5 cursor-pointer", children: [
@@ -1786,34 +1787,69 @@ function TermsSection({
1786
1787
  className: "h-4 w-4 shrink-0 mt-0.5 rounded border-border accent-primary cursor-pointer"
1787
1788
  }
1788
1789
  ),
1789
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-sans text-foreground/80 leading-snug", children: label })
1790
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-sans text-foreground/80 leading-snug", children: [
1791
+ i18n.before,
1792
+ /* @__PURE__ */ jsxRuntime.jsx(
1793
+ "button",
1794
+ {
1795
+ type: "button",
1796
+ onClick: () => setModalOpen(true),
1797
+ className: "text-primary underline underline-offset-2 hover:text-primary/80 transition-colors",
1798
+ children: i18n.link
1799
+ }
1800
+ ),
1801
+ i18n.after
1802
+ ] })
1790
1803
  ] }),
1791
- /* @__PURE__ */ jsxRuntime.jsx(
1792
- "button",
1793
- {
1794
- type: "button",
1795
- onClick: () => setModalOpen(true),
1796
- className: "self-start text-xs text-primary underline underline-offset-2 font-sans hover:text-primary/80 transition-colors",
1797
- children: viewTermsLabel
1798
- }
1799
- ),
1800
1804
  !checked && warningMessage && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-amber-400 flex items-center gap-1", children: warningMessage }),
1801
1805
  /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: modalOpen, onOpenChange: setModalOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "max-w-2xl w-full max-h-[80vh] overflow-y-auto", children: [
1802
- /* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "font-heading text-xl", children: "Termos e Condi\xE7\xF5es \u2014 PlanetaEXO" }) }),
1803
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 space-y-5 text-sm font-sans text-foreground/80 leading-relaxed", children: TERMS_CONTENT.map((section) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1804
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-bold text-foreground font-heading mb-1", children: section.heading }),
1806
+ /* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsxs(DialogTitle, { className: "font-heading text-xl", children: [
1807
+ i18n.modalTitle,
1808
+ " \u2014 PlanetaEXO"
1809
+ ] }) }),
1810
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-4 space-y-5 text-sm font-sans text-foreground/80 leading-relaxed", children: TERMS_CONTENT.map((section, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1811
+ section.heading && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-bold text-foreground font-heading mb-1", children: section.heading }),
1805
1812
  /* @__PURE__ */ jsxRuntime.jsx("p", { children: section.body })
1806
- ] }, section.heading)) }),
1813
+ ] }, i)) }),
1807
1814
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-6 flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
1808
1815
  DialogClose,
1809
1816
  {
1810
1817
  className: "px-4 py-2 rounded-lg bg-primary text-white text-sm font-heading font-semibold hover:bg-primary/90 transition-colors",
1811
- children: "Fechar"
1818
+ children: i18n.closeLabel
1812
1819
  }
1813
1820
  ) })
1814
1821
  ] }) })
1815
1822
  ] });
1816
1823
  }
1824
+ function BookingConfirmedCard({
1825
+ title = "Booking confirmed!",
1826
+ email,
1827
+ message,
1828
+ onBack,
1829
+ backLabel = "Back to offer"
1830
+ }) {
1831
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card p-8 flex flex-col items-center gap-6 text-center", children: [
1832
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-20 w-20 items-center justify-center rounded-full bg-primary/10", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2Icon, { className: "w-10 h-10 text-primary" }) }),
1833
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1834
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-2xl font-black text-foreground font-heading", children: title }),
1835
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-sm text-muted-foreground font-sans max-w-sm mx-auto leading-relaxed", children: message != null ? message : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1836
+ "A confirmation email has been sent to",
1837
+ " ",
1838
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-foreground", children: email || "your email" }),
1839
+ ". Our team will be in touch shortly."
1840
+ ] }) })
1841
+ ] }),
1842
+ onBack && /* @__PURE__ */ jsxRuntime.jsx(
1843
+ "button",
1844
+ {
1845
+ type: "button",
1846
+ onClick: onBack,
1847
+ className: "rounded-full border border-primary px-6 py-2.5 text-sm font-bold text-primary font-heading hover:bg-primary/10 transition-colors",
1848
+ children: backLabel
1849
+ }
1850
+ )
1851
+ ] });
1852
+ }
1817
1853
  var WIZARD_STEPS = [
1818
1854
  { id: "responsible", label: "Responsible party details" },
1819
1855
  { id: "travellers", label: "Travellers" },
@@ -1825,9 +1861,9 @@ function BookingWizard({
1825
1861
  depositInfo,
1826
1862
  onCancel
1827
1863
  }) {
1828
- const [step, setStep] = React19__namespace.useState("responsible");
1829
- const [error, setError] = React19__namespace.useState(null);
1830
- const [responsible, setResponsible] = React19__namespace.useState({
1864
+ const [step, setStep] = React21__namespace.useState("responsible");
1865
+ const [error, setError] = React21__namespace.useState(null);
1866
+ const [responsible, setResponsible] = React21__namespace.useState({
1831
1867
  firstName: "",
1832
1868
  lastName: "",
1833
1869
  email: "",
@@ -1846,7 +1882,7 @@ function BookingWizard({
1846
1882
  return s + ((_b = (_a = a.slots) == null ? void 0 : _a.children) != null ? _b : 0);
1847
1883
  }, 0);
1848
1884
  const totalPax = totalAdults + totalChildren;
1849
- const [travellers, setTravellers] = React19__namespace.useState(
1885
+ const [travellers, setTravellers] = React21__namespace.useState(
1850
1886
  Array.from({ length: Math.max(totalPax, 1) }, () => ({
1851
1887
  firstName: "",
1852
1888
  lastName: "",
@@ -1854,10 +1890,9 @@ function BookingWizard({
1854
1890
  email: ""
1855
1891
  }))
1856
1892
  );
1857
- const [payAmount, setPayAmount] = React19__namespace.useState("full");
1858
- const [payMethod, setPayMethod] = React19__namespace.useState("stripe");
1859
- const [termsAccepted, setTermsAccepted] = React19__namespace.useState(false);
1860
- const [termsModalOpen, setTermsModalOpen] = React19__namespace.useState(false);
1893
+ const [payAmount, setPayAmount] = React21__namespace.useState("full");
1894
+ const [payMethod, setPayMethod] = React21__namespace.useState("stripe");
1895
+ const [termsAccepted, setTermsAccepted] = React21__namespace.useState(false);
1861
1896
  const setR = (k, v) => setResponsible((p) => __spreadProps(__spreadValues({}, p), { [k]: v }));
1862
1897
  const setT = (i, k, v) => setTravellers((prev) => prev.map((t, idx) => idx === i ? __spreadProps(__spreadValues({}, t), { [k]: v }) : t));
1863
1898
  const setTDob = (i, v) => setTravellers((prev) => prev.map((t, idx) => idx === i ? __spreadProps(__spreadValues({}, t), { dateOfBirth: v }) : t));
@@ -1897,34 +1932,7 @@ function BookingWizard({
1897
1932
  const depositLabel = depositInfo ? `Pay deposit (${depositInfo.depositPercent}%) \u2014 ${depositInfo.depositAmount}` : "Pay deposit";
1898
1933
  const fullLabel = `Pay full amount \u2014 ${total}`;
1899
1934
  if (step === "confirmed") {
1900
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card p-8 flex flex-col items-center gap-6 text-center", children: [
1901
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-20 w-20 items-center justify-center rounded-full bg-primary/10", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2Icon, { className: "w-10 h-10 text-primary" }) }),
1902
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1903
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-2xl font-black text-foreground font-heading", children: "Booking confirmed!" }),
1904
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mt-2 text-sm text-muted-foreground font-sans max-w-sm mx-auto leading-relaxed", children: [
1905
- "A confirmation email has been sent to",
1906
- " ",
1907
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-foreground", children: responsible.email || "your email" }),
1908
- ". Our team will be in touch shortly."
1909
- ] })
1910
- ] }),
1911
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-border bg-muted/30 px-6 py-4 w-full max-w-xs", children: [
1912
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground font-sans uppercase tracking-wider", children: "Booking reference" }),
1913
- /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-lg font-black text-primary font-heading mt-1", children: [
1914
- "PEX-",
1915
- Math.random().toString(36).slice(2, 8).toUpperCase()
1916
- ] })
1917
- ] }),
1918
- /* @__PURE__ */ jsxRuntime.jsx(
1919
- "button",
1920
- {
1921
- type: "button",
1922
- onClick: onCancel,
1923
- className: "rounded-full border border-primary px-6 py-2.5 text-sm font-bold text-primary font-heading hover:bg-primary/10 transition-colors",
1924
- children: "Back to offer"
1925
- }
1926
- )
1927
- ] });
1935
+ return /* @__PURE__ */ jsxRuntime.jsx(BookingConfirmedCard, { email: responsible.email, onBack: onCancel });
1928
1936
  }
1929
1937
  return /* @__PURE__ */ jsxRuntime.jsx(
1930
1938
  BookingShell,
@@ -2055,53 +2063,9 @@ function BookingWizard({
2055
2063
  TermsSection,
2056
2064
  {
2057
2065
  checked: termsAccepted,
2058
- onChange: setTermsAccepted,
2059
- label: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2060
- "I have read and accept the",
2061
- " ",
2062
- /* @__PURE__ */ jsxRuntime.jsx(
2063
- "button",
2064
- {
2065
- type: "button",
2066
- onClick: () => setTermsModalOpen(true),
2067
- className: "underline underline-offset-2 text-primary hover:text-primary/80 transition-colors font-semibold",
2068
- children: "terms and conditions"
2069
- }
2070
- ),
2071
- " ",
2072
- "of the reservation."
2073
- ] })
2066
+ onChange: setTermsAccepted
2074
2067
  }
2075
- ),
2076
- /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: termsModalOpen, onOpenChange: setTermsModalOpen, children: /* @__PURE__ */ jsxRuntime.jsxs(DialogContent, { className: "!max-w-[80vw] w-[80vw] max-h-[85vh] overflow-y-auto", children: [
2077
- /* @__PURE__ */ jsxRuntime.jsx(DialogHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "font-heading text-xl", children: "Terms and Conditions" }) }),
2078
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 text-sm font-sans text-foreground/80 leading-relaxed", children: [
2079
- /* @__PURE__ */ jsxRuntime.jsx("p", { children: 'These terms and conditions ("Terms") govern the booking of travel experiences offered through Planeta EXO ("Company"). By confirming a booking, you agree to these Terms in full.' }),
2080
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-bold text-foreground font-heading text-base", children: "1. Bookings and payments" }),
2081
- /* @__PURE__ */ jsxRuntime.jsx("p", { children: "A booking is confirmed upon receipt of the required deposit or full payment. The deposit amount is specified in your offer. The remaining balance must be paid by the balance due date stated in your offer." }),
2082
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-bold text-foreground font-heading text-base", children: "2. Cancellation policy" }),
2083
- /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Cancellations made more than 60 days before departure are eligible for a full refund of the deposit. Cancellations between 30 and 60 days forfeit 50% of the deposit. Cancellations within 30 days of departure are non-refundable." }),
2084
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-bold text-foreground font-heading text-base", children: "3. Changes and modifications" }),
2085
- /* @__PURE__ */ jsxRuntime.jsx("p", { children: "The Company reserves the right to modify itineraries due to weather, safety, or operational reasons. Equivalent alternatives will be offered wherever possible." }),
2086
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-bold text-foreground font-heading text-base", children: "4. Travel insurance" }),
2087
- /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Comprehensive travel insurance is strongly recommended. The Company is not liable for costs arising from trip interruption, medical emergencies, or personal loss." }),
2088
- /* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-bold text-foreground font-heading text-base", children: "5. Liability" }),
2089
- /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Participation in adventure activities carries inherent risk. By booking, you acknowledge and accept these risks. The Company's liability is limited to the total booking amount." }),
2090
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pt-2", children: /* @__PURE__ */ jsxRuntime.jsx(
2091
- DialogClose,
2092
- {
2093
- render: /* @__PURE__ */ jsxRuntime.jsx(
2094
- "button",
2095
- {
2096
- type: "button",
2097
- className: "rounded-full bg-primary px-6 py-2.5 text-sm font-bold text-primary-foreground font-heading hover:bg-primary/90 transition-colors"
2098
- }
2099
- ),
2100
- children: "Close"
2101
- }
2102
- ) })
2103
- ] })
2104
- ] }) })
2068
+ )
2105
2069
  ] })
2106
2070
  ] })
2107
2071
  }
@@ -2129,7 +2093,7 @@ function Offer({
2129
2093
  continueDisabled,
2130
2094
  className
2131
2095
  }) {
2132
- const [showBooking, setShowBooking] = React19__namespace.useState(false);
2096
+ const [showBooking, setShowBooking] = React21__namespace.useState(false);
2133
2097
  const isShowingCheckout = !!checkoutSlot || showBooking;
2134
2098
  const handleBook = () => {
2135
2099
  if (!checkoutSlot && !externalBookingFlow) setShowBooking(true);
@@ -2251,9 +2215,9 @@ function AdventureSection({
2251
2215
  onAddSuggestedTraveller
2252
2216
  }) {
2253
2217
  var _a, _b, _c;
2254
- const [detailsOpen, setDetailsOpen] = React19__namespace.useState(false);
2255
- const [addModalOpen, setAddModalOpen] = React19__namespace.useState(false);
2256
- const [newTraveller, setNewTraveller] = React19__namespace.useState({
2218
+ const [detailsOpen, setDetailsOpen] = React21__namespace.useState(false);
2219
+ const [addModalOpen, setAddModalOpen] = React21__namespace.useState(false);
2220
+ const [newTraveller, setNewTraveller] = React21__namespace.useState({
2257
2221
  firstName: "",
2258
2222
  lastName: "",
2259
2223
  passport: "",
@@ -3373,465 +3337,1208 @@ function BookingConfirmationEmail({
3373
3337
  /* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 pr-4 text-muted-foreground font-ui", children: l.hostLabel }),
3374
3338
  /* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-1 font-medium text-foreground", children: host })
3375
3339
  ] })
3376
- ] }) }),
3377
- /* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-t border-border mb-8" }),
3378
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-4", children: l.postCtaMessage }),
3379
- /* @__PURE__ */ jsxRuntime.jsx("p", { children: l.closingMessage })
3380
- ]
3381
- }
3382
- );
3383
- }
3384
- function CounterField({
3385
- label,
3386
- sublabel,
3387
- required,
3388
- value,
3389
- min = 0,
3390
- max = 99,
3391
- onChange,
3392
- className
3393
- }) {
3394
- const decrement = () => {
3395
- if (value > min) onChange(value - 1);
3396
- };
3397
- const increment = () => {
3398
- if (value < max) onChange(value + 1);
3399
- };
3400
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
3401
- /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "text-sm font-ui text-foreground", children: [
3402
- label,
3403
- sublabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground font-normal ml-1", children: sublabel }),
3404
- required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary ml-0.5", children: "*" })
3405
- ] }),
3406
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between rounded-lg border border-border bg-background px-4 py-3 h-14", children: [
3407
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xl font-semibold text-foreground tabular-nums w-8 font-ui", children: value }),
3408
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
3409
- /* @__PURE__ */ jsxRuntime.jsx(
3410
- "button",
3411
- {
3412
- type: "button",
3413
- onClick: decrement,
3414
- disabled: value <= min,
3415
- "aria-label": `Diminuir ${label}`,
3416
- className: cn(
3417
- "inline-flex h-8 w-8 items-center justify-center rounded-full border border-border",
3418
- "text-foreground transition-colors",
3419
- "hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3420
- "disabled:pointer-events-none disabled:opacity-30"
3421
- ),
3422
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MinusIcon, { className: "h-3.5 w-3.5" })
3423
- }
3424
- ),
3425
- /* @__PURE__ */ jsxRuntime.jsx(
3340
+ ] }) }),
3341
+ /* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-t border-border mb-8" }),
3342
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-4", children: l.postCtaMessage }),
3343
+ /* @__PURE__ */ jsxRuntime.jsx("p", { children: l.closingMessage })
3344
+ ]
3345
+ }
3346
+ );
3347
+ }
3348
+ function CounterField({
3349
+ label,
3350
+ sublabel,
3351
+ required,
3352
+ value,
3353
+ min = 0,
3354
+ max = 99,
3355
+ onChange,
3356
+ className
3357
+ }) {
3358
+ const decrement = () => {
3359
+ if (value > min) onChange(value - 1);
3360
+ };
3361
+ const increment = () => {
3362
+ if (value < max) onChange(value + 1);
3363
+ };
3364
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
3365
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "text-sm font-ui text-foreground", children: [
3366
+ label,
3367
+ sublabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground font-normal ml-1", children: sublabel }),
3368
+ required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary ml-0.5", children: "*" })
3369
+ ] }),
3370
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between rounded-lg border border-border bg-background px-4 py-3 h-14", children: [
3371
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xl font-semibold text-foreground tabular-nums w-8 font-ui", children: value }),
3372
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
3373
+ /* @__PURE__ */ jsxRuntime.jsx(
3374
+ "button",
3375
+ {
3376
+ type: "button",
3377
+ onClick: decrement,
3378
+ disabled: value <= min,
3379
+ "aria-label": `Diminuir ${label}`,
3380
+ className: cn(
3381
+ "inline-flex h-8 w-8 items-center justify-center rounded-full border border-border",
3382
+ "text-foreground transition-colors",
3383
+ "hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3384
+ "disabled:pointer-events-none disabled:opacity-30"
3385
+ ),
3386
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MinusIcon, { className: "h-3.5 w-3.5" })
3387
+ }
3388
+ ),
3389
+ /* @__PURE__ */ jsxRuntime.jsx(
3390
+ "button",
3391
+ {
3392
+ type: "button",
3393
+ onClick: increment,
3394
+ disabled: value >= max,
3395
+ "aria-label": `Aumentar ${label}`,
3396
+ className: cn(
3397
+ "inline-flex h-8 w-8 items-center justify-center rounded-full border border-border",
3398
+ "text-foreground transition-colors",
3399
+ "hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3400
+ "disabled:pointer-events-none disabled:opacity-30"
3401
+ ),
3402
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PlusIcon, { className: "h-3.5 w-3.5" })
3403
+ }
3404
+ )
3405
+ ] })
3406
+ ] })
3407
+ ] });
3408
+ }
3409
+ function Popover(_a) {
3410
+ var props = __objRest(_a, []);
3411
+ return /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Root, __spreadValues({ "data-slot": "popover" }, props));
3412
+ }
3413
+ function PopoverTrigger(_a) {
3414
+ var props = __objRest(_a, []);
3415
+ return /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Trigger, __spreadValues({ "data-slot": "popover-trigger" }, props));
3416
+ }
3417
+ function PopoverContent(_a) {
3418
+ var _b = _a, {
3419
+ className,
3420
+ align = "center",
3421
+ alignOffset = 0,
3422
+ side = "bottom",
3423
+ sideOffset = 4
3424
+ } = _b, props = __objRest(_b, [
3425
+ "className",
3426
+ "align",
3427
+ "alignOffset",
3428
+ "side",
3429
+ "sideOffset"
3430
+ ]);
3431
+ return /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
3432
+ popover.Popover.Positioner,
3433
+ {
3434
+ align,
3435
+ alignOffset,
3436
+ side,
3437
+ sideOffset,
3438
+ className: "isolate z-50",
3439
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3440
+ popover.Popover.Popup,
3441
+ __spreadValues({
3442
+ "data-slot": "popover-content",
3443
+ className: cn(
3444
+ "z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
3445
+ className
3446
+ )
3447
+ }, props)
3448
+ )
3449
+ }
3450
+ ) });
3451
+ }
3452
+ function DatePickerField({
3453
+ label,
3454
+ required,
3455
+ value,
3456
+ onChange,
3457
+ placeholder = "Select a date",
3458
+ disabled,
3459
+ fromDate,
3460
+ className
3461
+ }) {
3462
+ const [open, setOpen] = React21__namespace.useState(false);
3463
+ const containerRef = React21__namespace.useRef(null);
3464
+ const [calendarWidth, setCalendarWidth] = React21__namespace.useState();
3465
+ const hasValue = !!value;
3466
+ React21__namespace.useEffect(() => {
3467
+ if (!containerRef.current) return;
3468
+ const observer = new ResizeObserver(([entry]) => {
3469
+ setCalendarWidth(entry.contentRect.width);
3470
+ });
3471
+ observer.observe(containerRef.current);
3472
+ return () => observer.disconnect();
3473
+ }, []);
3474
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: containerRef, className: cn("w-full", className), children: /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: setOpen, children: [
3475
+ /* @__PURE__ */ jsxRuntime.jsxs(
3476
+ PopoverTrigger,
3477
+ {
3478
+ disabled,
3479
+ className: cn(
3480
+ "relative flex w-full items-center rounded-lg border border-border bg-background",
3481
+ "px-3 text-left text-base font-ui transition-colors h-14",
3482
+ "focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",
3483
+ "disabled:pointer-events-none disabled:opacity-50",
3484
+ open && "border-primary ring-1 ring-primary"
3485
+ ),
3486
+ children: [
3487
+ /* @__PURE__ */ jsxRuntime.jsxs(
3488
+ "span",
3489
+ {
3490
+ className: cn(
3491
+ "pointer-events-none absolute left-3 transition-all duration-150 font-ui",
3492
+ hasValue || open ? "top-2 text-xs text-primary" : "top-1/2 -translate-y-1/2 text-base text-muted-foreground"
3493
+ ),
3494
+ children: [
3495
+ label,
3496
+ required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary ml-0.5", children: "*" })
3497
+ ]
3498
+ }
3499
+ ),
3500
+ /* @__PURE__ */ jsxRuntime.jsx(
3501
+ "span",
3502
+ {
3503
+ className: cn(
3504
+ "flex-1 truncate mt-3",
3505
+ hasValue ? "text-foreground" : "invisible"
3506
+ ),
3507
+ children: hasValue ? dateFns.format(value, "dd MMM yyyy") : placeholder
3508
+ }
3509
+ ),
3510
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, { className: "ml-2 h-4 w-4 shrink-0 text-muted-foreground" })
3511
+ ]
3512
+ }
3513
+ ),
3514
+ /* @__PURE__ */ jsxRuntime.jsx(
3515
+ PopoverContent,
3516
+ {
3517
+ className: "p-0",
3518
+ align: "start",
3519
+ style: calendarWidth ? { width: calendarWidth } : void 0,
3520
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3521
+ Calendar,
3522
+ {
3523
+ mode: "single",
3524
+ selected: value,
3525
+ onSelect: (date) => {
3526
+ onChange == null ? void 0 : onChange(date);
3527
+ setOpen(false);
3528
+ },
3529
+ fromDate: fromDate != null ? fromDate : /* @__PURE__ */ new Date(),
3530
+ className: "font-ui w-full",
3531
+ autoFocus: true
3532
+ }
3533
+ )
3534
+ }
3535
+ )
3536
+ ] }) });
3537
+ }
3538
+ function FormSection({
3539
+ title,
3540
+ children,
3541
+ className
3542
+ }) {
3543
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-5", className), children: [
3544
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
3545
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-bold text-foreground whitespace-nowrap font-heading", children: title }),
3546
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-px flex-1 bg-border" })
3547
+ ] }),
3548
+ children
3549
+ ] });
3550
+ }
3551
+ var defaultInitial = {
3552
+ adults: 2,
3553
+ children: 0,
3554
+ travelDate: void 0,
3555
+ budget: "",
3556
+ project: "",
3557
+ civility: "",
3558
+ phoneCountry: "BR",
3559
+ lastName: "",
3560
+ firstName: "",
3561
+ country: "France",
3562
+ phone: "",
3563
+ email: ""
3564
+ };
3565
+ function BookingForm({
3566
+ defaultValues,
3567
+ onSubmit,
3568
+ submitLabel = "Send my request",
3569
+ loading = false,
3570
+ showHeader = true,
3571
+ title = "Check availability for your trip",
3572
+ subtitle = "Free enquiry \u2013 no commitment",
3573
+ className
3574
+ }) {
3575
+ const [values, setValues] = React21__namespace.useState(__spreadValues(__spreadValues({}, defaultInitial), defaultValues));
3576
+ const set = (key, value) => setValues((prev) => __spreadProps(__spreadValues({}, prev), { [key]: value }));
3577
+ const handleSubmit = (e) => {
3578
+ e.preventDefault();
3579
+ onSubmit == null ? void 0 : onSubmit(values);
3580
+ };
3581
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3582
+ "form",
3583
+ {
3584
+ onSubmit: handleSubmit,
3585
+ className: cn("flex flex-col gap-10", className),
3586
+ noValidate: true,
3587
+ children: [
3588
+ showHeader && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
3589
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-black uppercase tracking-wide text-foreground font-heading leading-tight", children: title }),
3590
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1.5 text-sm text-muted-foreground font-ui", children: subtitle })
3591
+ ] }),
3592
+ /* @__PURE__ */ jsxRuntime.jsx(FormSection, { title: "Who's joining the adventure?", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
3593
+ /* @__PURE__ */ jsxRuntime.jsx(
3594
+ CounterField,
3595
+ {
3596
+ label: "Adults",
3597
+ required: true,
3598
+ value: values.adults,
3599
+ min: 1,
3600
+ onChange: (v) => set("adults", v)
3601
+ }
3602
+ ),
3603
+ /* @__PURE__ */ jsxRuntime.jsx(
3604
+ CounterField,
3605
+ {
3606
+ label: "Children",
3607
+ sublabel: "(under 12)",
3608
+ value: values.children,
3609
+ min: 0,
3610
+ onChange: (v) => set("children", v)
3611
+ }
3612
+ )
3613
+ ] }) }),
3614
+ /* @__PURE__ */ jsxRuntime.jsx(FormSection, { title: "Your next trip", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
3615
+ /* @__PURE__ */ jsxRuntime.jsx(
3616
+ DatePickerField,
3617
+ {
3618
+ label: "Travel date",
3619
+ required: true,
3620
+ value: values.travelDate,
3621
+ onChange: (d) => set("travelDate", d),
3622
+ placeholder: "Pick a date"
3623
+ }
3624
+ ),
3625
+ /* @__PURE__ */ jsxRuntime.jsx(
3626
+ FloatingInput,
3627
+ {
3628
+ label: "Budget (per person)",
3629
+ required: true,
3630
+ type: "number",
3631
+ min: 0,
3632
+ value: values.budget,
3633
+ onChange: (e) => set("budget", e.target.value)
3634
+ }
3635
+ )
3636
+ ] }) }),
3637
+ /* @__PURE__ */ jsxRuntime.jsx(FormSection, { title: "Tell us about your trip", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
3638
+ /* @__PURE__ */ jsxRuntime.jsx(
3639
+ "textarea",
3640
+ {
3641
+ id: "project",
3642
+ placeholder: " ",
3643
+ rows: 5,
3644
+ value: values.project,
3645
+ onChange: (e) => set("project", e.target.value),
3646
+ className: cn(
3647
+ "peer block w-full resize-none rounded-lg border border-border bg-background",
3648
+ "px-3 pt-6 pb-3 text-base text-foreground font-ui",
3649
+ "transition-colors placeholder-transparent",
3650
+ "focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary"
3651
+ )
3652
+ }
3653
+ ),
3654
+ /* @__PURE__ */ jsxRuntime.jsxs(
3655
+ "label",
3656
+ {
3657
+ htmlFor: "project",
3658
+ className: cn(
3659
+ "pointer-events-none absolute left-3 top-4",
3660
+ "text-base text-muted-foreground font-ui transition-all duration-150",
3661
+ "peer-focus:top-2 peer-focus:text-xs peer-focus:text-primary",
3662
+ "peer-not-placeholder-shown:top-2 peer-not-placeholder-shown:text-xs peer-not-placeholder-shown:text-muted-foreground"
3663
+ ),
3664
+ children: [
3665
+ "Your trip in a few words",
3666
+ " ",
3667
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground font-normal", children: "(optional)" })
3668
+ ]
3669
+ }
3670
+ )
3671
+ ] }) }),
3672
+ /* @__PURE__ */ jsxRuntime.jsxs(FormSection, { title: "Contact details", children: [
3673
+ /* @__PURE__ */ jsxRuntime.jsx(
3674
+ "div",
3675
+ {
3676
+ role: "radiogroup",
3677
+ "aria-label": "Title",
3678
+ className: "flex flex-wrap items-center gap-x-6 gap-y-3",
3679
+ children: ["ms", "mr"].map((c) => /* @__PURE__ */ jsxRuntime.jsxs(
3680
+ "label",
3681
+ {
3682
+ className: "flex min-h-9 cursor-pointer items-center gap-2.5 font-ui text-sm text-foreground",
3683
+ children: [
3684
+ /* @__PURE__ */ jsxRuntime.jsx(
3685
+ "input",
3686
+ {
3687
+ type: "radio",
3688
+ name: "civility",
3689
+ value: c,
3690
+ checked: values.civility === c,
3691
+ onChange: () => set("civility", c),
3692
+ className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
3693
+ }
3694
+ ),
3695
+ c === "ms" ? "Ms." : "Mr."
3696
+ ]
3697
+ },
3698
+ c
3699
+ ))
3700
+ }
3701
+ ),
3702
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 min-w-0", children: [
3703
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx(
3704
+ FloatingInput,
3705
+ {
3706
+ label: "Last name",
3707
+ required: true,
3708
+ value: values.lastName,
3709
+ onChange: (e) => set("lastName", e.target.value)
3710
+ }
3711
+ ) }),
3712
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx(
3713
+ FloatingInput,
3714
+ {
3715
+ label: "First name",
3716
+ required: true,
3717
+ value: values.firstName,
3718
+ onChange: (e) => set("firstName", e.target.value)
3719
+ }
3720
+ ) }),
3721
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 sm:col-span-2 lg:col-span-1", children: /* @__PURE__ */ jsxRuntime.jsxs(
3722
+ FloatingSelect,
3723
+ {
3724
+ label: "Country of residence",
3725
+ required: true,
3726
+ value: values.country,
3727
+ onChange: (e) => set("country", e.target.value),
3728
+ children: [
3729
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", disabled: true, hidden: true }),
3730
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "France", children: "France" }),
3731
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "Belgium", children: "Belgium" }),
3732
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "Switzerland", children: "Switzerland" }),
3733
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "Canada", children: "Canada" }),
3734
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "Luxembourg", children: "Luxembourg" }),
3735
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "United Kingdom", children: "United Kingdom" }),
3736
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "United States", children: "United States" }),
3737
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "Other", children: "Other" })
3738
+ ]
3739
+ }
3740
+ ) })
3741
+ ] }),
3742
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4 lg:grid-cols-2", children: [
3743
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full min-w-0", children: [
3744
+ /* @__PURE__ */ jsxRuntime.jsx(
3745
+ PhoneCountrySelect,
3746
+ {
3747
+ value: values.phoneCountry,
3748
+ onChange: (code) => set("phoneCountry", code),
3749
+ className: "shrink-0"
3750
+ }
3751
+ ),
3752
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative min-w-0 flex-1", children: [
3753
+ /* @__PURE__ */ jsxRuntime.jsx(
3754
+ "input",
3755
+ {
3756
+ id: "phone",
3757
+ type: "tel",
3758
+ placeholder: " ",
3759
+ value: values.phone,
3760
+ onChange: (e) => set("phone", e.target.value),
3761
+ className: cn(
3762
+ "peer block h-14 w-full rounded-r-lg border border-border bg-background",
3763
+ "px-3 pt-5 pb-2 text-base text-foreground font-ui",
3764
+ "transition-colors placeholder-transparent",
3765
+ "focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary"
3766
+ )
3767
+ }
3768
+ ),
3769
+ /* @__PURE__ */ jsxRuntime.jsxs(
3770
+ "label",
3771
+ {
3772
+ htmlFor: "phone",
3773
+ className: cn(
3774
+ "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2",
3775
+ "text-base text-muted-foreground font-ui transition-all duration-150",
3776
+ "peer-focus:top-3 peer-focus:translate-y-0 peer-focus:text-xs peer-focus:text-primary",
3777
+ "peer-not-placeholder-shown:top-3 peer-not-placeholder-shown:translate-y-0 peer-not-placeholder-shown:text-xs peer-not-placeholder-shown:text-muted-foreground"
3778
+ ),
3779
+ children: [
3780
+ "Phone ",
3781
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: "*" })
3782
+ ]
3783
+ }
3784
+ )
3785
+ ] })
3786
+ ] }),
3787
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx(
3788
+ FloatingInput,
3789
+ {
3790
+ label: "Email",
3791
+ required: true,
3792
+ type: "email",
3793
+ value: values.email,
3794
+ onChange: (e) => set("email", e.target.value)
3795
+ }
3796
+ ) })
3797
+ ] })
3798
+ ] }),
3799
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center pt-2", children: /* @__PURE__ */ jsxRuntime.jsx(
3426
3800
  "button",
3427
3801
  {
3428
- type: "button",
3429
- onClick: increment,
3430
- disabled: value >= max,
3431
- "aria-label": `Aumentar ${label}`,
3802
+ type: "submit",
3803
+ disabled: loading,
3432
3804
  className: cn(
3433
- "inline-flex h-8 w-8 items-center justify-center rounded-full border border-border",
3434
- "text-foreground transition-colors",
3435
- "hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3436
- "disabled:pointer-events-none disabled:opacity-30"
3805
+ "inline-flex items-center justify-center gap-2 rounded-full px-10 py-3.5",
3806
+ "bg-primary text-primary-foreground font-ui font-semibold text-sm",
3807
+ "transition-colors hover:bg-primary/90 focus-visible:outline-none",
3808
+ "focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
3809
+ "disabled:pointer-events-none disabled:opacity-60"
3437
3810
  ),
3438
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PlusIcon, { className: "h-3.5 w-3.5" })
3811
+ children: loading ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3812
+ /* @__PURE__ */ jsxRuntime.jsxs("svg", { className: "h-4 w-4 animate-spin", viewBox: "0 0 24 24", fill: "none", children: [
3813
+ /* @__PURE__ */ jsxRuntime.jsx(
3814
+ "circle",
3815
+ {
3816
+ className: "opacity-25",
3817
+ cx: "12",
3818
+ cy: "12",
3819
+ r: "10",
3820
+ stroke: "currentColor",
3821
+ strokeWidth: "4"
3822
+ }
3823
+ ),
3824
+ /* @__PURE__ */ jsxRuntime.jsx(
3825
+ "path",
3826
+ {
3827
+ className: "opacity-75",
3828
+ fill: "currentColor",
3829
+ d: "M4 12a8 8 0 018-8v4l3-3-3-3v4a8 8 0 00-8 8h4z"
3830
+ }
3831
+ )
3832
+ ] }),
3833
+ "Sending\u2026"
3834
+ ] }) : submitLabel
3439
3835
  }
3440
- )
3441
- ] })
3442
- ] })
3443
- ] });
3836
+ ) })
3837
+ ]
3838
+ }
3839
+ );
3444
3840
  }
3445
- function Popover(_a) {
3446
- var props = __objRest(_a, []);
3447
- return /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Root, __spreadValues({ "data-slot": "popover" }, props));
3841
+ var DEFAULT_LABELS3 = {
3842
+ formSubtitle: "Free enquiry \u2013 no commitment",
3843
+ detailsSectionTitle: "Your details",
3844
+ tripInfoSectionTitle: "Trip info",
3845
+ termsSectionTitle: "Terms & conditions",
3846
+ termsAccept: "I read and accept the terms",
3847
+ termsDecline: "I decline",
3848
+ submitButton: "Submit answers",
3849
+ submitting: "Sending\u2026",
3850
+ adventureLabel: "Adventure",
3851
+ bookingLabel: "Booking",
3852
+ partnerLabel: "Partner",
3853
+ travellerLabel: "Traveller",
3854
+ firstNameLabel: "First name",
3855
+ lastNameLabel: "Last name",
3856
+ phoneLabel: "Phone",
3857
+ emergencyContactFirstName: "Contact first name",
3858
+ emergencyContactLastName: "Contact last name",
3859
+ emergencyContactPhoneLabel: "Contact phone",
3860
+ nationalityLabel: "Nationality",
3861
+ selectPlaceholder: "Select an option\u2026",
3862
+ optionalLabel: "(optional)"
3863
+ };
3864
+ var TERMS_ACCEPT_KEY = "__registrationTermsAccepted";
3865
+ function emptyName() {
3866
+ return { firstName: "", lastName: "" };
3448
3867
  }
3449
- function PopoverTrigger(_a) {
3450
- var props = __objRest(_a, []);
3451
- return /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Trigger, __spreadValues({ "data-slot": "popover-trigger" }, props));
3868
+ function emptyPhone(country) {
3869
+ return { country, nationalNumber: "" };
3452
3870
  }
3453
- function PopoverContent(_a) {
3454
- var _b = _a, {
3455
- className,
3456
- align = "center",
3457
- alignOffset = 0,
3458
- side = "bottom",
3459
- sideOffset = 4
3460
- } = _b, props = __objRest(_b, [
3461
- "className",
3462
- "align",
3463
- "alignOffset",
3464
- "side",
3465
- "sideOffset"
3466
- ]);
3467
- return /* @__PURE__ */ jsxRuntime.jsx(popover.Popover.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
3468
- popover.Popover.Positioner,
3469
- {
3470
- align,
3471
- alignOffset,
3472
- side,
3473
- sideOffset,
3474
- className: "isolate z-50",
3475
- children: /* @__PURE__ */ jsxRuntime.jsx(
3476
- popover.Popover.Popup,
3477
- __spreadValues({
3478
- "data-slot": "popover-content",
3479
- className: cn(
3480
- "z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
3481
- className
3482
- )
3483
- }, props)
3484
- )
3871
+ function emptyEmergency(country) {
3872
+ return { contactName: emptyName(), phone: emptyPhone(country) };
3873
+ }
3874
+ function asName(v) {
3875
+ if (v && typeof v === "object" && "firstName" in v && "lastName" in v) {
3876
+ const o = v;
3877
+ return {
3878
+ firstName: typeof o.firstName === "string" ? o.firstName : "",
3879
+ lastName: typeof o.lastName === "string" ? o.lastName : ""
3880
+ };
3881
+ }
3882
+ return emptyName();
3883
+ }
3884
+ function asPhone(v, defaultCountry) {
3885
+ if (v && typeof v === "object" && "country" in v && "nationalNumber" in v) {
3886
+ const o = v;
3887
+ return {
3888
+ country: typeof o.country === "string" ? o.country : defaultCountry,
3889
+ nationalNumber: typeof o.nationalNumber === "string" ? o.nationalNumber : ""
3890
+ };
3891
+ }
3892
+ return emptyPhone(defaultCountry);
3893
+ }
3894
+ function asEmergency(v, defaultCountry) {
3895
+ if (v && typeof v === "object" && "contactName" in v && "phone" in v) {
3896
+ const o = v;
3897
+ return {
3898
+ contactName: asName(o.contactName),
3899
+ phone: asPhone(o.phone, defaultCountry)
3900
+ };
3901
+ }
3902
+ return emptyEmergency(defaultCountry);
3903
+ }
3904
+ function asDate(v) {
3905
+ if (v instanceof Date && !Number.isNaN(v.getTime())) return v;
3906
+ if (typeof v === "string" && v.trim()) {
3907
+ const parsed = new Date(v);
3908
+ if (!Number.isNaN(parsed.getTime())) return parsed;
3909
+ }
3910
+ return void 0;
3911
+ }
3912
+ function initializeValues(fields, seed, defaultCountry, includeTerms) {
3913
+ var _a, _b;
3914
+ const next = {};
3915
+ for (const f of fields) {
3916
+ if (Object.prototype.hasOwnProperty.call(seed, f.id)) {
3917
+ next[f.id] = seed[f.id];
3918
+ continue;
3485
3919
  }
3486
- ) });
3920
+ switch (f.type) {
3921
+ case "name":
3922
+ next[f.id] = emptyName();
3923
+ break;
3924
+ case "phone":
3925
+ next[f.id] = emptyPhone(defaultCountry);
3926
+ break;
3927
+ case "emergencyContact":
3928
+ next[f.id] = emptyEmergency(defaultCountry);
3929
+ break;
3930
+ case "checkbox":
3931
+ next[f.id] = ((_b = (_a = f.options) == null ? void 0 : _a.length) != null ? _b : 0) > 0 ? [] : false;
3932
+ break;
3933
+ case "date":
3934
+ case "birthDate":
3935
+ next[f.id] = void 0;
3936
+ break;
3937
+ default:
3938
+ next[f.id] = "";
3939
+ }
3940
+ }
3941
+ if (includeTerms) next[TERMS_ACCEPT_KEY] = false;
3942
+ return next;
3487
3943
  }
3488
- function DatePickerField({
3489
- label,
3490
- required,
3491
- value,
3492
- onChange,
3493
- placeholder = "Select a date",
3494
- disabled,
3495
- fromDate,
3944
+ function formatDateRange(adventure, fmt) {
3945
+ var _a, _b;
3946
+ if (!(adventure == null ? void 0 : adventure.startDate) && !(adventure == null ? void 0 : adventure.endDate)) return null;
3947
+ const start = fmt ? fmt(adventure.startDate) : (_a = adventure.startDate) != null ? _a : "";
3948
+ const end = fmt ? fmt(adventure.endDate) : (_b = adventure.endDate) != null ? _b : "";
3949
+ if (start && end) return `${start} \u2014 ${end}`;
3950
+ return start || end || null;
3951
+ }
3952
+ function FormSection2({
3953
+ title,
3954
+ children,
3496
3955
  className
3497
3956
  }) {
3498
- const [open, setOpen] = React19__namespace.useState(false);
3499
- const containerRef = React19__namespace.useRef(null);
3500
- const [calendarWidth, setCalendarWidth] = React19__namespace.useState();
3501
- const hasValue = !!value;
3502
- React19__namespace.useEffect(() => {
3503
- if (!containerRef.current) return;
3504
- const observer = new ResizeObserver(([entry]) => {
3505
- setCalendarWidth(entry.contentRect.width);
3506
- });
3507
- observer.observe(containerRef.current);
3508
- return () => observer.disconnect();
3509
- }, []);
3510
- return /* @__PURE__ */ jsxRuntime.jsx("div", { ref: containerRef, className: cn("w-full", className), children: /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: setOpen, children: [
3511
- /* @__PURE__ */ jsxRuntime.jsxs(
3512
- PopoverTrigger,
3957
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-5", className), children: [
3958
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
3959
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-bold text-foreground whitespace-nowrap font-heading", children: title }),
3960
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-px flex-1 bg-border" })
3961
+ ] }),
3962
+ children
3963
+ ] });
3964
+ }
3965
+ function PhoneInput({ id, label, required, value, onChange }) {
3966
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full min-w-0", children: [
3967
+ /* @__PURE__ */ jsxRuntime.jsx(
3968
+ PhoneCountrySelect,
3513
3969
  {
3514
- disabled,
3515
- className: cn(
3516
- "relative flex w-full items-center rounded-lg border border-border bg-background",
3517
- "px-3 text-left text-base font-ui transition-colors h-14",
3518
- "focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",
3519
- "disabled:pointer-events-none disabled:opacity-50",
3520
- open && "border-primary ring-1 ring-primary"
3521
- ),
3522
- children: [
3523
- /* @__PURE__ */ jsxRuntime.jsxs(
3524
- "span",
3525
- {
3526
- className: cn(
3527
- "pointer-events-none absolute left-3 transition-all duration-150 font-ui",
3528
- hasValue || open ? "top-2 text-xs text-primary" : "top-1/2 -translate-y-1/2 text-base text-muted-foreground"
3529
- ),
3530
- children: [
3531
- label,
3532
- required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary ml-0.5", children: "*" })
3533
- ]
3534
- }
3535
- ),
3536
- /* @__PURE__ */ jsxRuntime.jsx(
3537
- "span",
3538
- {
3539
- className: cn(
3540
- "flex-1 truncate mt-3",
3541
- hasValue ? "text-foreground" : "invisible"
3542
- ),
3543
- children: hasValue ? dateFns.format(value, "dd MMM yyyy") : placeholder
3544
- }
3545
- ),
3546
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, { className: "ml-2 h-4 w-4 shrink-0 text-muted-foreground" })
3547
- ]
3970
+ value: value.country,
3971
+ onChange: (country) => onChange(__spreadProps(__spreadValues({}, value), { country })),
3972
+ className: "shrink-0"
3548
3973
  }
3549
3974
  ),
3975
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative min-w-0 flex-1", children: [
3976
+ /* @__PURE__ */ jsxRuntime.jsx(
3977
+ "input",
3978
+ {
3979
+ id,
3980
+ type: "tel",
3981
+ placeholder: " ",
3982
+ value: value.nationalNumber,
3983
+ required,
3984
+ onChange: (e) => onChange(__spreadProps(__spreadValues({}, value), { nationalNumber: e.target.value })),
3985
+ className: cn(
3986
+ "peer block h-14 w-full rounded-r-lg border border-border bg-background",
3987
+ "px-3 pt-5 pb-2 text-base text-foreground font-ui",
3988
+ "transition-colors placeholder-transparent",
3989
+ "focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary"
3990
+ )
3991
+ }
3992
+ ),
3993
+ /* @__PURE__ */ jsxRuntime.jsxs(
3994
+ "label",
3995
+ {
3996
+ htmlFor: id,
3997
+ className: cn(
3998
+ "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2",
3999
+ "text-base text-muted-foreground font-ui transition-all duration-150",
4000
+ "peer-focus:top-3 peer-focus:translate-y-0 peer-focus:text-xs peer-focus:text-primary",
4001
+ "peer-not-placeholder-shown:top-3 peer-not-placeholder-shown:translate-y-0 peer-not-placeholder-shown:text-xs peer-not-placeholder-shown:text-muted-foreground"
4002
+ ),
4003
+ children: [
4004
+ label,
4005
+ required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary ml-0.5", children: "*" })
4006
+ ]
4007
+ }
4008
+ )
4009
+ ] })
4010
+ ] });
4011
+ }
4012
+ function FloatingTextarea({
4013
+ id,
4014
+ label,
4015
+ required,
4016
+ optionalHint,
4017
+ value,
4018
+ onChange
4019
+ }) {
4020
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
3550
4021
  /* @__PURE__ */ jsxRuntime.jsx(
3551
- PopoverContent,
4022
+ "textarea",
3552
4023
  {
3553
- className: "p-0",
3554
- align: "start",
3555
- style: calendarWidth ? { width: calendarWidth } : void 0,
3556
- children: /* @__PURE__ */ jsxRuntime.jsx(
3557
- Calendar,
3558
- {
3559
- mode: "single",
3560
- selected: value,
3561
- onSelect: (date) => {
3562
- onChange == null ? void 0 : onChange(date);
3563
- setOpen(false);
3564
- },
3565
- fromDate: fromDate != null ? fromDate : /* @__PURE__ */ new Date(),
3566
- className: "font-ui w-full",
3567
- autoFocus: true
3568
- }
4024
+ id,
4025
+ placeholder: " ",
4026
+ rows: 5,
4027
+ value,
4028
+ required,
4029
+ onChange: (e) => onChange(e.target.value),
4030
+ className: cn(
4031
+ "peer block w-full resize-none rounded-lg border border-border bg-background",
4032
+ "px-3 pt-6 pb-3 text-base text-foreground font-ui",
4033
+ "transition-colors placeholder-transparent",
4034
+ "focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary"
3569
4035
  )
3570
4036
  }
4037
+ ),
4038
+ /* @__PURE__ */ jsxRuntime.jsxs(
4039
+ "label",
4040
+ {
4041
+ htmlFor: id,
4042
+ className: cn(
4043
+ "pointer-events-none absolute left-3 top-4",
4044
+ "text-base text-muted-foreground font-ui transition-all duration-150",
4045
+ "peer-focus:top-2 peer-focus:text-xs peer-focus:text-primary",
4046
+ "peer-not-placeholder-shown:top-2 peer-not-placeholder-shown:text-xs peer-not-placeholder-shown:text-muted-foreground"
4047
+ ),
4048
+ children: [
4049
+ label,
4050
+ required ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary ml-0.5", children: "*" }) : optionalHint ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1 text-muted-foreground font-normal", children: optionalHint }) : null
4051
+ ]
4052
+ }
3571
4053
  )
3572
- ] }) });
3573
- }
3574
- function FormSection({
3575
- title,
3576
- children,
3577
- className
3578
- }) {
3579
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-5", className), children: [
3580
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-4", children: [
3581
- /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-bold text-foreground whitespace-nowrap font-heading", children: title }),
3582
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-px flex-1 bg-border" })
3583
- ] }),
3584
- children
3585
4054
  ] });
3586
4055
  }
3587
- var defaultInitial = {
3588
- adults: 2,
3589
- children: 0,
3590
- travelDate: void 0,
3591
- budget: "",
3592
- project: "",
3593
- civility: "",
3594
- phoneCountry: "BR",
3595
- lastName: "",
3596
- firstName: "",
3597
- country: "France",
3598
- phone: "",
3599
- email: ""
3600
- };
3601
- function BookingForm({
3602
- defaultValues,
3603
- onSubmit,
3604
- submitLabel = "Send my request",
3605
- loading = false,
3606
- showHeader = true,
3607
- title = "Check availability for your trip",
3608
- subtitle = "Free enquiry \u2013 no commitment",
3609
- className
4056
+ function FieldRenderer({
4057
+ field,
4058
+ value,
4059
+ onChange,
4060
+ defaultPhoneCountry,
4061
+ labels
3610
4062
  }) {
3611
- const [values, setValues] = React19__namespace.useState(__spreadValues(__spreadValues({}, defaultInitial), defaultValues));
3612
- const set = (key, value) => setValues((prev) => __spreadProps(__spreadValues({}, prev), { [key]: value }));
3613
- const handleSubmit = (e) => {
3614
- e.preventDefault();
3615
- onSubmit == null ? void 0 : onSubmit(values);
3616
- };
3617
- return /* @__PURE__ */ jsxRuntime.jsxs(
3618
- "form",
3619
- {
3620
- onSubmit: handleSubmit,
3621
- className: cn("flex flex-col gap-10", className),
3622
- noValidate: true,
3623
- children: [
3624
- showHeader && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
3625
- /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-black uppercase tracking-wide text-foreground font-heading leading-tight", children: title }),
3626
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1.5 text-sm text-muted-foreground font-ui", children: subtitle })
3627
- ] }),
3628
- /* @__PURE__ */ jsxRuntime.jsx(FormSection, { title: "Who's joining the adventure?", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
3629
- /* @__PURE__ */ jsxRuntime.jsx(
3630
- CounterField,
3631
- {
3632
- label: "Adults",
3633
- required: true,
3634
- value: values.adults,
3635
- min: 1,
3636
- onChange: (v) => set("adults", v)
3637
- }
3638
- ),
3639
- /* @__PURE__ */ jsxRuntime.jsx(
3640
- CounterField,
3641
- {
3642
- label: "Children",
3643
- sublabel: "(under 12)",
3644
- value: values.children,
3645
- min: 0,
3646
- onChange: (v) => set("children", v)
3647
- }
3648
- )
3649
- ] }) }),
3650
- /* @__PURE__ */ jsxRuntime.jsx(FormSection, { title: "Your next trip", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
4063
+ var _a, _b, _c;
4064
+ const fieldId = `rf-${field.id}`;
4065
+ if (field.type === "name") {
4066
+ const v = asName(value);
4067
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
4068
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mb-3 text-sm font-ui font-medium text-foreground", children: [
4069
+ field.label,
4070
+ field.required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary ml-0.5", children: "*" })
4071
+ ] }),
4072
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
4073
+ /* @__PURE__ */ jsxRuntime.jsx(
4074
+ FloatingInput,
4075
+ {
4076
+ label: labels.firstNameLabel,
4077
+ required: field.required,
4078
+ value: v.firstName,
4079
+ onChange: (e) => onChange(__spreadProps(__spreadValues({}, v), { firstName: e.target.value }))
4080
+ }
4081
+ ),
4082
+ /* @__PURE__ */ jsxRuntime.jsx(
4083
+ FloatingInput,
4084
+ {
4085
+ label: labels.lastNameLabel,
4086
+ required: field.required,
4087
+ value: v.lastName,
4088
+ onChange: (e) => onChange(__spreadProps(__spreadValues({}, v), { lastName: e.target.value }))
4089
+ }
4090
+ )
4091
+ ] })
4092
+ ] });
4093
+ }
4094
+ if (field.type === "phone") {
4095
+ const v = asPhone(value, defaultPhoneCountry);
4096
+ return /* @__PURE__ */ jsxRuntime.jsx(
4097
+ PhoneInput,
4098
+ {
4099
+ id: fieldId,
4100
+ label: field.label,
4101
+ required: field.required,
4102
+ value: v,
4103
+ onChange
4104
+ }
4105
+ );
4106
+ }
4107
+ if (field.type === "emergencyContact") {
4108
+ const v = asEmergency(value, defaultPhoneCountry);
4109
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
4110
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mb-3 text-sm font-ui font-medium text-foreground", children: [
4111
+ field.label,
4112
+ field.required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary ml-0.5", children: "*" })
4113
+ ] }),
4114
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4", children: [
4115
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
3651
4116
  /* @__PURE__ */ jsxRuntime.jsx(
3652
- DatePickerField,
4117
+ FloatingInput,
3653
4118
  {
3654
- label: "Travel date",
3655
- required: true,
3656
- value: values.travelDate,
3657
- onChange: (d) => set("travelDate", d),
3658
- placeholder: "Pick a date"
4119
+ label: labels.emergencyContactFirstName,
4120
+ required: field.required,
4121
+ value: v.contactName.firstName,
4122
+ onChange: (e) => onChange(__spreadProps(__spreadValues({}, v), {
4123
+ contactName: __spreadProps(__spreadValues({}, v.contactName), {
4124
+ firstName: e.target.value
4125
+ })
4126
+ }))
3659
4127
  }
3660
4128
  ),
3661
4129
  /* @__PURE__ */ jsxRuntime.jsx(
3662
4130
  FloatingInput,
3663
4131
  {
3664
- label: "Budget (per person)",
3665
- required: true,
3666
- type: "number",
3667
- min: 0,
3668
- value: values.budget,
3669
- onChange: (e) => set("budget", e.target.value)
4132
+ label: labels.emergencyContactLastName,
4133
+ required: field.required,
4134
+ value: v.contactName.lastName,
4135
+ onChange: (e) => onChange(__spreadProps(__spreadValues({}, v), {
4136
+ contactName: __spreadProps(__spreadValues({}, v.contactName), {
4137
+ lastName: e.target.value
4138
+ })
4139
+ }))
3670
4140
  }
3671
4141
  )
3672
- ] }) }),
3673
- /* @__PURE__ */ jsxRuntime.jsx(FormSection, { title: "Tell us about your trip", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
3674
- /* @__PURE__ */ jsxRuntime.jsx(
3675
- "textarea",
3676
- {
3677
- id: "project",
3678
- placeholder: " ",
3679
- rows: 5,
3680
- value: values.project,
3681
- onChange: (e) => set("project", e.target.value),
3682
- className: cn(
3683
- "peer block w-full resize-none rounded-lg border border-border bg-background",
3684
- "px-3 pt-6 pb-3 text-base text-foreground font-ui",
3685
- "transition-colors placeholder-transparent",
3686
- "focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary"
3687
- )
3688
- }
3689
- ),
3690
- /* @__PURE__ */ jsxRuntime.jsxs(
4142
+ ] }),
4143
+ /* @__PURE__ */ jsxRuntime.jsx(
4144
+ PhoneInput,
4145
+ {
4146
+ id: `${fieldId}-phone`,
4147
+ label: labels.emergencyContactPhoneLabel,
4148
+ required: field.required,
4149
+ value: v.phone,
4150
+ onChange: (phone) => onChange(__spreadProps(__spreadValues({}, v), { phone }))
4151
+ }
4152
+ )
4153
+ ] })
4154
+ ] });
4155
+ }
4156
+ if (field.type === "textarea") {
4157
+ return /* @__PURE__ */ jsxRuntime.jsx(
4158
+ FloatingTextarea,
4159
+ {
4160
+ id: fieldId,
4161
+ label: field.label,
4162
+ required: field.required,
4163
+ optionalHint: !field.required ? labels.optionalLabel : void 0,
4164
+ value: typeof value === "string" ? value : "",
4165
+ onChange
4166
+ }
4167
+ );
4168
+ }
4169
+ if (field.type === "select") {
4170
+ const options = (_a = field.options) != null ? _a : [];
4171
+ return /* @__PURE__ */ jsxRuntime.jsxs(
4172
+ FloatingSelect,
4173
+ {
4174
+ label: field.label,
4175
+ required: field.required,
4176
+ value: typeof value === "string" ? value : "",
4177
+ onChange: (e) => onChange(e.target.value),
4178
+ children: [
4179
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", disabled: true, hidden: true }),
4180
+ options.map((opt) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: opt.value, children: opt.label }, opt.value))
4181
+ ]
4182
+ }
4183
+ );
4184
+ }
4185
+ if (field.type === "radio") {
4186
+ const options = (_b = field.options) != null ? _b : [];
4187
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
4188
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mb-3 text-sm font-ui font-medium text-foreground", children: [
4189
+ field.label,
4190
+ field.required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary ml-0.5", children: "*" })
4191
+ ] }),
4192
+ /* @__PURE__ */ jsxRuntime.jsx(
4193
+ "div",
4194
+ {
4195
+ role: "radiogroup",
4196
+ "aria-label": field.label,
4197
+ className: "flex flex-wrap items-center gap-x-6 gap-y-3",
4198
+ children: options.map((opt) => /* @__PURE__ */ jsxRuntime.jsxs(
3691
4199
  "label",
3692
4200
  {
3693
- htmlFor: "project",
3694
- className: cn(
3695
- "pointer-events-none absolute left-3 top-4",
3696
- "text-base text-muted-foreground font-ui transition-all duration-150",
3697
- "peer-focus:top-2 peer-focus:text-xs peer-focus:text-primary",
3698
- "peer-not-placeholder-shown:top-2 peer-not-placeholder-shown:text-xs peer-not-placeholder-shown:text-muted-foreground"
3699
- ),
4201
+ className: "flex min-h-9 cursor-pointer items-center gap-2.5 font-ui text-sm text-foreground",
3700
4202
  children: [
3701
- "Your trip in a few words",
3702
- " ",
3703
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground font-normal", children: "(optional)" })
4203
+ /* @__PURE__ */ jsxRuntime.jsx(
4204
+ "input",
4205
+ {
4206
+ type: "radio",
4207
+ name: field.id,
4208
+ value: opt.value,
4209
+ checked: value === opt.value,
4210
+ required: field.required,
4211
+ onChange: () => onChange(opt.value),
4212
+ className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
4213
+ }
4214
+ ),
4215
+ opt.label
3704
4216
  ]
3705
- }
3706
- )
3707
- ] }) }),
3708
- /* @__PURE__ */ jsxRuntime.jsxs(FormSection, { title: "Contact details", children: [
3709
- /* @__PURE__ */ jsxRuntime.jsx(
3710
- "div",
3711
- {
3712
- role: "radiogroup",
3713
- "aria-label": "Title",
3714
- className: "flex flex-wrap items-center gap-x-6 gap-y-3",
3715
- children: ["ms", "mr"].map((c) => /* @__PURE__ */ jsxRuntime.jsxs(
3716
- "label",
3717
- {
3718
- className: "flex min-h-9 cursor-pointer items-center gap-2.5 font-ui text-sm text-foreground",
3719
- children: [
3720
- /* @__PURE__ */ jsxRuntime.jsx(
3721
- "input",
3722
- {
3723
- type: "radio",
3724
- name: "civility",
3725
- value: c,
3726
- checked: values.civility === c,
3727
- onChange: () => set("civility", c),
3728
- className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
3729
- }
3730
- ),
3731
- c === "ms" ? "Ms." : "Mr."
3732
- ]
3733
- },
3734
- c
3735
- ))
3736
- }
3737
- ),
3738
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 min-w-0", children: [
3739
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx(
3740
- FloatingInput,
4217
+ },
4218
+ opt.value
4219
+ ))
4220
+ }
4221
+ )
4222
+ ] });
4223
+ }
4224
+ if (field.type === "checkbox") {
4225
+ const options = (_c = field.options) != null ? _c : [];
4226
+ if (options.length === 0) {
4227
+ return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex min-h-9 cursor-pointer items-center gap-2.5 font-ui text-sm text-foreground", children: [
4228
+ /* @__PURE__ */ jsxRuntime.jsx(
4229
+ "input",
4230
+ {
4231
+ type: "checkbox",
4232
+ checked: value === true,
4233
+ onChange: (e) => onChange(e.target.checked),
4234
+ className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
4235
+ }
4236
+ ),
4237
+ field.label
4238
+ ] });
4239
+ }
4240
+ const selected = Array.isArray(value) ? value : [];
4241
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
4242
+ /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mb-3 text-sm font-ui font-medium text-foreground", children: [
4243
+ field.label,
4244
+ field.required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary ml-0.5", children: "*" })
4245
+ ] }),
4246
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-3", children: options.map((opt) => {
4247
+ const checked = selected.includes(opt.value);
4248
+ return /* @__PURE__ */ jsxRuntime.jsxs(
4249
+ "label",
4250
+ {
4251
+ className: "flex min-h-9 cursor-pointer items-center gap-2.5 font-ui text-sm text-foreground",
4252
+ children: [
4253
+ /* @__PURE__ */ jsxRuntime.jsx(
4254
+ "input",
4255
+ {
4256
+ type: "checkbox",
4257
+ checked,
4258
+ onChange: (e) => onChange(
4259
+ e.target.checked ? [...selected, opt.value] : selected.filter((x) => x !== opt.value)
4260
+ ),
4261
+ className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
4262
+ }
4263
+ ),
4264
+ opt.label
4265
+ ]
4266
+ },
4267
+ opt.value
4268
+ );
4269
+ }) })
4270
+ ] });
4271
+ }
4272
+ if (field.type === "nationality") {
4273
+ return /* @__PURE__ */ jsxRuntime.jsx(
4274
+ CountrySearchField,
4275
+ {
4276
+ label: field.label,
4277
+ required: field.required,
4278
+ value: typeof value === "string" ? value : "",
4279
+ onChange: (code) => onChange(code)
4280
+ }
4281
+ );
4282
+ }
4283
+ if (field.type === "date") {
4284
+ return /* @__PURE__ */ jsxRuntime.jsx(
4285
+ DatePickerField,
4286
+ {
4287
+ label: field.label,
4288
+ required: field.required,
4289
+ value: asDate(value),
4290
+ onChange: (d) => onChange(d)
4291
+ }
4292
+ );
4293
+ }
4294
+ if (field.type === "birthDate") {
4295
+ return /* @__PURE__ */ jsxRuntime.jsx(
4296
+ BirthDateField,
4297
+ {
4298
+ label: field.label,
4299
+ required: field.required,
4300
+ value: asDate(value),
4301
+ onChange: (d) => onChange(d)
4302
+ }
4303
+ );
4304
+ }
4305
+ if (field.type === "number") {
4306
+ return /* @__PURE__ */ jsxRuntime.jsx(
4307
+ FloatingInput,
4308
+ {
4309
+ label: field.label,
4310
+ required: field.required,
4311
+ type: "number",
4312
+ value: value == null ? "" : String(value),
4313
+ onChange: (e) => onChange(e.target.value)
4314
+ }
4315
+ );
4316
+ }
4317
+ const htmlType = field.label.toLowerCase().includes("mail") ? "email" : "text";
4318
+ return /* @__PURE__ */ jsxRuntime.jsx(
4319
+ FloatingInput,
4320
+ {
4321
+ label: field.label,
4322
+ required: field.required,
4323
+ type: htmlType,
4324
+ value: typeof value === "string" ? value : "",
4325
+ onChange: (e) => onChange(e.target.value)
4326
+ }
4327
+ );
4328
+ }
4329
+ function RegistrationForm({
4330
+ logo = "/logo-planetaexo.png",
4331
+ logoAlt = "Planeta EXO",
4332
+ heroImage,
4333
+ heroImageAlt = "",
4334
+ title,
4335
+ subtitle,
4336
+ adventure,
4337
+ booking,
4338
+ traveller,
4339
+ fields,
4340
+ values,
4341
+ defaultValues,
4342
+ onChange,
4343
+ onSubmit,
4344
+ terms,
4345
+ includeTerms = false,
4346
+ loading = false,
4347
+ error,
4348
+ defaultPhoneCountry = "BR",
4349
+ dateFormatter,
4350
+ labels,
4351
+ className
4352
+ }) {
4353
+ var _a;
4354
+ const L = React21__namespace.useMemo(
4355
+ () => __spreadValues(__spreadValues({}, DEFAULT_LABELS3), labels != null ? labels : {}),
4356
+ [labels]
4357
+ );
4358
+ const sortedFields = React21__namespace.useMemo(
4359
+ () => [...fields].sort((a, b) => {
4360
+ var _a2, _b;
4361
+ return ((_a2 = a.order) != null ? _a2 : 0) - ((_b = b.order) != null ? _b : 0);
4362
+ }),
4363
+ [fields]
4364
+ );
4365
+ const isControlled = values !== void 0;
4366
+ const [internal, setInternal] = React21__namespace.useState(
4367
+ () => initializeValues(
4368
+ sortedFields,
4369
+ defaultValues != null ? defaultValues : {},
4370
+ defaultPhoneCountry,
4371
+ includeTerms
4372
+ )
4373
+ );
4374
+ React21__namespace.useEffect(() => {
4375
+ if (isControlled) return;
4376
+ setInternal((prev) => {
4377
+ const next = initializeValues(
4378
+ sortedFields,
4379
+ defaultValues != null ? defaultValues : {},
4380
+ defaultPhoneCountry,
4381
+ includeTerms
4382
+ );
4383
+ for (const k of Object.keys(prev)) {
4384
+ if (Object.prototype.hasOwnProperty.call(next, k)) next[k] = prev[k];
4385
+ }
4386
+ return next;
4387
+ });
4388
+ }, [sortedFields.length, includeTerms]);
4389
+ const current = isControlled ? values : internal;
4390
+ const setField = (id, value) => {
4391
+ const next = __spreadProps(__spreadValues({}, current), { [id]: value });
4392
+ if (!isControlled) setInternal(next);
4393
+ onChange == null ? void 0 : onChange(next);
4394
+ };
4395
+ const handleSubmit = (e) => {
4396
+ e.preventDefault();
4397
+ onSubmit == null ? void 0 : onSubmit(current);
4398
+ };
4399
+ const termsAccepted = current[TERMS_ACCEPT_KEY] === true;
4400
+ const termsEnabled = includeTerms && !!terms;
4401
+ const acceptControl = (_a = terms == null ? void 0 : terms.acceptControl) != null ? _a : "checkbox";
4402
+ const dateRange = formatDateRange(adventure, dateFormatter);
4403
+ const hasTripInfo = !!adventure || !!booking || !!traveller;
4404
+ return /* @__PURE__ */ jsxRuntime.jsxs(
4405
+ "form",
4406
+ {
4407
+ onSubmit: handleSubmit,
4408
+ noValidate: true,
4409
+ className: cn("flex flex-col gap-10", className),
4410
+ children: [
4411
+ heroImage ? (
4412
+ /* ── Hero image (full-width) with centered white logo ─────────── */
4413
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
4414
+ /* @__PURE__ */ jsxRuntime.jsx(
4415
+ "img",
3741
4416
  {
3742
- label: "Last name",
3743
- required: true,
3744
- value: values.lastName,
3745
- onChange: (e) => set("lastName", e.target.value)
4417
+ src: heroImage,
4418
+ alt: heroImageAlt,
4419
+ className: "block h-[190px] w-full object-cover sm:h-[220px]"
3746
4420
  }
3747
- ) }),
3748
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx(
3749
- FloatingInput,
4421
+ ),
4422
+ /* @__PURE__ */ jsxRuntime.jsx(
4423
+ "div",
3750
4424
  {
3751
- label: "First name",
3752
- required: true,
3753
- value: values.firstName,
3754
- onChange: (e) => set("firstName", e.target.value)
4425
+ "aria-hidden": true,
4426
+ className: "absolute inset-0 bg-black/25"
3755
4427
  }
3756
- ) }),
3757
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 sm:col-span-2 lg:col-span-1", children: /* @__PURE__ */ jsxRuntime.jsxs(
3758
- FloatingSelect,
4428
+ ),
4429
+ logo && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
4430
+ "img",
3759
4431
  {
3760
- label: "Country of residence",
3761
- required: true,
3762
- value: values.country,
3763
- onChange: (e) => set("country", e.target.value),
3764
- children: [
3765
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", disabled: true, hidden: true }),
3766
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "France", children: "France" }),
3767
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "Belgium", children: "Belgium" }),
3768
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "Switzerland", children: "Switzerland" }),
3769
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "Canada", children: "Canada" }),
3770
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "Luxembourg", children: "Luxembourg" }),
3771
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "United Kingdom", children: "United Kingdom" }),
3772
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "United States", children: "United States" }),
3773
- /* @__PURE__ */ jsxRuntime.jsx("option", { value: "Other", children: "Other" })
3774
- ]
4432
+ src: logo,
4433
+ alt: logoAlt,
4434
+ className: "block h-auto w-[120px] object-contain brightness-0 invert"
3775
4435
  }
3776
4436
  ) })
4437
+ ] })
4438
+ ) : logo && /* eslint-disable-next-line @next/next/no-img-element */
4439
+ /* @__PURE__ */ jsxRuntime.jsx(
4440
+ "img",
4441
+ {
4442
+ src: logo,
4443
+ alt: logoAlt,
4444
+ className: "mx-auto block h-auto w-[150px] object-contain"
4445
+ }
4446
+ ),
4447
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
4448
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-black uppercase tracking-wide text-foreground font-heading leading-tight", children: title }),
4449
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1.5 text-sm text-muted-foreground font-ui", children: subtitle != null ? subtitle : L.formSubtitle })
4450
+ ] }),
4451
+ hasTripInfo && /* @__PURE__ */ jsxRuntime.jsx(FormSection2, { title: L.tripInfoSectionTitle, children: /* @__PURE__ */ jsxRuntime.jsxs("dl", { className: "grid grid-cols-1 gap-x-6 gap-y-3 text-sm font-ui sm:grid-cols-[max-content_1fr]", children: [
4452
+ adventure && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4453
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: L.adventureLabel }),
4454
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground font-medium", children: adventure.name })
3777
4455
  ] }),
3778
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4 lg:grid-cols-2", children: [
3779
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full min-w-0", children: [
3780
- /* @__PURE__ */ jsxRuntime.jsx(
3781
- PhoneCountrySelect,
3782
- {
3783
- value: values.phoneCountry,
3784
- onChange: (code) => set("phoneCountry", code),
3785
- className: "shrink-0"
3786
- }
3787
- ),
3788
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative min-w-0 flex-1", children: [
3789
- /* @__PURE__ */ jsxRuntime.jsx(
3790
- "input",
3791
- {
3792
- id: "phone",
3793
- type: "tel",
3794
- placeholder: " ",
3795
- value: values.phone,
3796
- onChange: (e) => set("phone", e.target.value),
3797
- className: cn(
3798
- "peer block h-14 w-full rounded-r-lg border border-border bg-background",
3799
- "px-3 pt-5 pb-2 text-base text-foreground font-ui",
3800
- "transition-colors placeholder-transparent",
3801
- "focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary"
3802
- )
3803
- }
3804
- ),
3805
- /* @__PURE__ */ jsxRuntime.jsxs(
3806
- "label",
3807
- {
3808
- htmlFor: "phone",
3809
- className: cn(
3810
- "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2",
3811
- "text-base text-muted-foreground font-ui transition-all duration-150",
3812
- "peer-focus:top-3 peer-focus:translate-y-0 peer-focus:text-xs peer-focus:text-primary",
3813
- "peer-not-placeholder-shown:top-3 peer-not-placeholder-shown:translate-y-0 peer-not-placeholder-shown:text-xs peer-not-placeholder-shown:text-muted-foreground"
3814
- ),
3815
- children: [
3816
- "Phone ",
3817
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: "*" })
3818
- ]
3819
- }
3820
- )
3821
- ] })
3822
- ] }),
3823
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx(
3824
- FloatingInput,
4456
+ dateRange && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4457
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: (adventure == null ? void 0 : adventure.startDate) && (adventure == null ? void 0 : adventure.endDate) ? "Dates" : "Date" }),
4458
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground", children: dateRange })
4459
+ ] }),
4460
+ (adventure == null ? void 0 : adventure.partnerName) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4461
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: L.partnerLabel }),
4462
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground", children: adventure.partnerName })
4463
+ ] }),
4464
+ booking && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4465
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: L.bookingLabel }),
4466
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground font-mono tabular-nums", children: booking.id })
4467
+ ] }),
4468
+ traveller && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4469
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: L.travellerLabel }),
4470
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground font-medium", children: traveller.fullName })
4471
+ ] })
4472
+ ] }) }),
4473
+ /* @__PURE__ */ jsxRuntime.jsx(FormSection2, { title: L.detailsSectionTitle, children: sortedFields.map((field) => {
4474
+ var _a2;
4475
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5", children: [
4476
+ /* @__PURE__ */ jsxRuntime.jsx(
4477
+ FieldRenderer,
3825
4478
  {
3826
- label: "Email",
4479
+ field,
4480
+ value: current[field.id],
4481
+ onChange: (v) => setField(field.id, v),
4482
+ defaultPhoneCountry,
4483
+ labels: L
4484
+ }
4485
+ ),
4486
+ ((_a2 = field.helpText) == null ? void 0 : _a2.trim()) && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground font-ui leading-relaxed", children: field.helpText.trim() })
4487
+ ] }, field.id);
4488
+ }) }),
4489
+ termsEnabled && terms && /* @__PURE__ */ jsxRuntime.jsxs(FormSection2, { title: L.termsSectionTitle, children: [
4490
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-72 overflow-y-auto rounded-lg border border-border bg-muted/30 p-4", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "whitespace-pre-wrap text-sm leading-relaxed text-foreground font-ui", children: terms.markdown }) }),
4491
+ acceptControl === "checkbox" ? /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex cursor-pointer items-start gap-2.5 font-ui text-sm text-foreground", children: [
4492
+ /* @__PURE__ */ jsxRuntime.jsx(
4493
+ "input",
4494
+ {
4495
+ type: "checkbox",
4496
+ checked: termsAccepted,
3827
4497
  required: true,
3828
- type: "email",
3829
- value: values.email,
3830
- onChange: (e) => set("email", e.target.value)
4498
+ onChange: (e) => setField(TERMS_ACCEPT_KEY, e.target.checked),
4499
+ className: "mt-0.5 h-4 w-4 shrink-0 accent-primary cursor-pointer"
3831
4500
  }
3832
- ) })
3833
- ] })
4501
+ ),
4502
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: L.termsAccept })
4503
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(
4504
+ "div",
4505
+ {
4506
+ role: "radiogroup",
4507
+ "aria-label": L.termsSectionTitle,
4508
+ className: "flex flex-wrap items-center gap-x-6 gap-y-3",
4509
+ children: [
4510
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex min-h-9 cursor-pointer items-center gap-2.5 font-ui text-sm text-foreground", children: [
4511
+ /* @__PURE__ */ jsxRuntime.jsx(
4512
+ "input",
4513
+ {
4514
+ type: "radio",
4515
+ name: "registration-terms-accept",
4516
+ checked: termsAccepted,
4517
+ required: true,
4518
+ onChange: () => setField(TERMS_ACCEPT_KEY, true),
4519
+ className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
4520
+ }
4521
+ ),
4522
+ L.termsAccept
4523
+ ] }),
4524
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex min-h-9 cursor-pointer items-center gap-2.5 font-ui text-sm text-muted-foreground", children: [
4525
+ /* @__PURE__ */ jsxRuntime.jsx(
4526
+ "input",
4527
+ {
4528
+ type: "radio",
4529
+ name: "registration-terms-accept",
4530
+ checked: current[TERMS_ACCEPT_KEY] === false,
4531
+ onChange: () => setField(TERMS_ACCEPT_KEY, false),
4532
+ className: "h-4 w-4 shrink-0 accent-primary cursor-pointer"
4533
+ }
4534
+ ),
4535
+ L.termsDecline
4536
+ ] })
4537
+ ]
4538
+ }
4539
+ )
3834
4540
  ] }),
4541
+ error && /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "text-sm text-destructive font-ui", children: error }),
3835
4542
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center pt-2", children: /* @__PURE__ */ jsxRuntime.jsx(
3836
4543
  "button",
3837
4544
  {
@@ -3845,35 +4552,121 @@ function BookingForm({
3845
4552
  "disabled:pointer-events-none disabled:opacity-60"
3846
4553
  ),
3847
4554
  children: loading ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3848
- /* @__PURE__ */ jsxRuntime.jsxs("svg", { className: "h-4 w-4 animate-spin", viewBox: "0 0 24 24", fill: "none", children: [
3849
- /* @__PURE__ */ jsxRuntime.jsx(
3850
- "circle",
3851
- {
3852
- className: "opacity-25",
3853
- cx: "12",
3854
- cy: "12",
3855
- r: "10",
3856
- stroke: "currentColor",
3857
- strokeWidth: "4"
3858
- }
3859
- ),
3860
- /* @__PURE__ */ jsxRuntime.jsx(
3861
- "path",
3862
- {
3863
- className: "opacity-75",
3864
- fill: "currentColor",
3865
- d: "M4 12a8 8 0 018-8v4l3-3-3-3v4a8 8 0 00-8 8h4z"
3866
- }
3867
- )
3868
- ] }),
3869
- "Sending\u2026"
3870
- ] }) : submitLabel
4555
+ /* @__PURE__ */ jsxRuntime.jsxs(
4556
+ "svg",
4557
+ {
4558
+ className: "h-4 w-4 animate-spin",
4559
+ viewBox: "0 0 24 24",
4560
+ fill: "none",
4561
+ children: [
4562
+ /* @__PURE__ */ jsxRuntime.jsx(
4563
+ "circle",
4564
+ {
4565
+ className: "opacity-25",
4566
+ cx: "12",
4567
+ cy: "12",
4568
+ r: "10",
4569
+ stroke: "currentColor",
4570
+ strokeWidth: "4"
4571
+ }
4572
+ ),
4573
+ /* @__PURE__ */ jsxRuntime.jsx(
4574
+ "path",
4575
+ {
4576
+ className: "opacity-75",
4577
+ fill: "currentColor",
4578
+ d: "M4 12a8 8 0 018-8v4l3-3-3-3v4a8 8 0 00-8 8h4z"
4579
+ }
4580
+ )
4581
+ ]
4582
+ }
4583
+ ),
4584
+ L.submitting
4585
+ ] }) : L.submitButton
3871
4586
  }
3872
4587
  ) })
3873
4588
  ]
3874
4589
  }
3875
4590
  );
3876
4591
  }
4592
+ function phoneCountryDial(code) {
4593
+ var _a, _b;
4594
+ return (_b = (_a = PHONE_COUNTRIES.find((c) => c.code === code)) == null ? void 0 : _a.dial) != null ? _b : code;
4595
+ }
4596
+ function defaultFormatAnswer(field, value, fmtDate) {
4597
+ var _a, _b, _c, _d, _e, _f;
4598
+ if (value == null || value === "") return "\u2014";
4599
+ if (value instanceof Date) return fmtDate(value);
4600
+ if (Array.isArray(value)) {
4601
+ if (field.type === "checkbox" && field.options) {
4602
+ return field.options.filter((o) => value.includes(o.value)).map((o) => o.label).join(", ") || "\u2014";
4603
+ }
4604
+ return value.filter(Boolean).join(", ") || "\u2014";
4605
+ }
4606
+ if (typeof value === "boolean") return value ? "Yes" : "No";
4607
+ if (typeof value === "object") {
4608
+ if ("contactName" in value) {
4609
+ const ec = value;
4610
+ const name = [ec.contactName.firstName, ec.contactName.lastName].filter(Boolean).join(" ");
4611
+ const phone = [phoneCountryDial(ec.phone.country), ec.phone.nationalNumber].filter(Boolean).join(" ");
4612
+ return [name, phone].filter(Boolean).join(" \xB7 ") || "\u2014";
4613
+ }
4614
+ if ("firstName" in value || "lastName" in value) {
4615
+ const n = value;
4616
+ return [n.firstName, n.lastName].filter(Boolean).join(" ") || "\u2014";
4617
+ }
4618
+ if ("country" in value && "nationalNumber" in value) {
4619
+ const p = value;
4620
+ return [phoneCountryDial(p.country), p.nationalNumber].filter(Boolean).join(" ") || "\u2014";
4621
+ }
4622
+ }
4623
+ if (field.type === "nationality" && typeof value === "string") {
4624
+ return (_b = (_a = COUNTRIES.find((c) => c.code === value)) == null ? void 0 : _a.name) != null ? _b : value;
4625
+ }
4626
+ if (field.type === "select" && field.options) {
4627
+ return (_d = (_c = field.options.find((o) => o.value === value)) == null ? void 0 : _c.label) != null ? _d : String(value);
4628
+ }
4629
+ if (field.type === "radio" && field.options) {
4630
+ return (_f = (_e = field.options.find((o) => o.value === value)) == null ? void 0 : _e.label) != null ? _f : String(value);
4631
+ }
4632
+ if (field.type === "date" && typeof value === "string") return fmtDate(value);
4633
+ return String(value);
4634
+ }
4635
+ function isoOrDateToString(v) {
4636
+ if (!v) return "\u2014";
4637
+ const d = v instanceof Date ? v : new Date(v);
4638
+ if (Number.isNaN(d.getTime())) return typeof v === "string" ? v : "\u2014";
4639
+ return d.toISOString().slice(0, 10);
4640
+ }
4641
+ function RegistrationSuccessCard({
4642
+ title = "Thanks \u2014 your answers have been received.",
4643
+ message = "We'll get in touch if anything else is needed.",
4644
+ answersTitle = "Your submitted answers",
4645
+ fields,
4646
+ answers,
4647
+ dateFormatter = isoOrDateToString,
4648
+ formatAnswer,
4649
+ className
4650
+ }) {
4651
+ const sorted = [...fields].sort((a, b) => {
4652
+ var _a, _b;
4653
+ return ((_a = a.order) != null ? _a : 0) - ((_b = b.order) != null ? _b : 0);
4654
+ }).filter((f) => Object.prototype.hasOwnProperty.call(answers, f.id));
4655
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-10", className), children: [
4656
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-3 text-center", children: [
4657
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "inline-flex h-14 w-14 items-center justify-center rounded-full bg-primary/10 text-primary", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleCheckIcon, { size: 28 }) }),
4658
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "text-2xl font-black uppercase tracking-wide text-foreground font-heading leading-tight", children: title }),
4659
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground font-ui", children: message })
4660
+ ] }),
4661
+ sorted.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(FormSection2, { title: answersTitle, children: /* @__PURE__ */ jsxRuntime.jsx("dl", { className: "grid grid-cols-1 gap-x-6 gap-y-3 text-sm font-ui sm:grid-cols-[max-content_1fr]", children: sorted.map((f) => /* @__PURE__ */ jsxRuntime.jsxs(React21__namespace.Fragment, { children: [
4662
+ /* @__PURE__ */ jsxRuntime.jsx("dt", { className: "text-muted-foreground", children: f.label }),
4663
+ /* @__PURE__ */ jsxRuntime.jsx("dd", { className: "text-foreground", children: (formatAnswer != null ? formatAnswer : ((field, v) => defaultFormatAnswer(field, v, dateFormatter)))(
4664
+ f,
4665
+ answers[f.id]
4666
+ ) })
4667
+ ] }, f.id)) }) })
4668
+ ] });
4669
+ }
3877
4670
  function Checkbox(_a) {
3878
4671
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3879
4672
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -3899,7 +4692,7 @@ function Checkbox(_a) {
3899
4692
  })
3900
4693
  );
3901
4694
  }
3902
- var AccordionVariantContext = React19__namespace.createContext("default");
4695
+ var AccordionVariantContext = React21__namespace.createContext("default");
3903
4696
  function Accordion(_a) {
3904
4697
  var _b = _a, { className, variant = "default" } = _b, props = __objRest(_b, ["className", "variant"]);
3905
4698
  return /* @__PURE__ */ jsxRuntime.jsx(AccordionVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -3917,7 +4710,7 @@ function Accordion(_a) {
3917
4710
  }
3918
4711
  function AccordionItem(_a) {
3919
4712
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
3920
- const variant = React19__namespace.useContext(AccordionVariantContext);
4713
+ const variant = React21__namespace.useContext(AccordionVariantContext);
3921
4714
  return /* @__PURE__ */ jsxRuntime.jsx(
3922
4715
  accordion.Accordion.Item,
3923
4716
  __spreadValues({
@@ -3938,7 +4731,7 @@ function AccordionTrigger(_a) {
3938
4731
  "className",
3939
4732
  "children"
3940
4733
  ]);
3941
- const variant = React19__namespace.useContext(AccordionVariantContext);
4734
+ const variant = React21__namespace.useContext(AccordionVariantContext);
3942
4735
  return /* @__PURE__ */ jsxRuntime.jsx(accordion.Accordion.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
3943
4736
  accordion.Accordion.Trigger,
3944
4737
  __spreadProps(__spreadValues({
@@ -3992,7 +4785,7 @@ function AccordionContent(_a) {
3992
4785
  "className",
3993
4786
  "children"
3994
4787
  ]);
3995
- const variant = React19__namespace.useContext(AccordionVariantContext);
4788
+ const variant = React21__namespace.useContext(AccordionVariantContext);
3996
4789
  return /* @__PURE__ */ jsxRuntime.jsx(
3997
4790
  accordion.Accordion.Panel,
3998
4791
  __spreadProps(__spreadValues({
@@ -4024,7 +4817,7 @@ function FilterPanel({
4024
4817
  title = "Filters",
4025
4818
  className
4026
4819
  }) {
4027
- const [internalValue, setInternalValue] = React19__namespace.useState(
4820
+ const [internalValue, setInternalValue] = React21__namespace.useState(
4028
4821
  () => Object.fromEntries(groups.map((g) => [g.id, []]))
4029
4822
  );
4030
4823
  const selected = value != null ? value : internalValue;
@@ -4186,11 +4979,11 @@ function ItineraryModal({
4186
4979
  onNext
4187
4980
  }) {
4188
4981
  var _a, _b, _c;
4189
- const [imgIndex, setImgIndex] = React19__namespace.useState(0);
4982
+ const [imgIndex, setImgIndex] = React21__namespace.useState(0);
4190
4983
  const images = stop ? [stop.coverImage, ...(_a = stop.images) != null ? _a : []] : [];
4191
4984
  const isFirst = (stop == null ? void 0 : stop.dayNumber) === ((_b = allStops[0]) == null ? void 0 : _b.dayNumber);
4192
4985
  const isLast = (stop == null ? void 0 : stop.dayNumber) === ((_c = allStops[allStops.length - 1]) == null ? void 0 : _c.dayNumber);
4193
- React19__namespace.useEffect(() => {
4986
+ React21__namespace.useEffect(() => {
4194
4987
  setImgIndex(0);
4195
4988
  }, [stop == null ? void 0 : stop.dayNumber]);
4196
4989
  if (!stop) return null;
@@ -4317,8 +5110,8 @@ function ItineraryModal({
4317
5110
  ) });
4318
5111
  }
4319
5112
  function Itinerary({ title, subtitle, stops, className }) {
4320
- const [activeIndex, setActiveIndex] = React19__namespace.useState(null);
4321
- const scrollRef = React19__namespace.useRef(null);
5113
+ const [activeIndex, setActiveIndex] = React21__namespace.useState(null);
5114
+ const scrollRef = React21__namespace.useRef(null);
4322
5115
  const activeStop = activeIndex !== null ? stops[activeIndex] : null;
4323
5116
  const scrollBy = (dir) => {
4324
5117
  if (!scrollRef.current) return;
@@ -4404,8 +5197,8 @@ function MenuTrip({
4404
5197
  bold = true,
4405
5198
  className
4406
5199
  }) {
4407
- const scrollRef = React19__namespace.useRef(null);
4408
- React19__namespace.useEffect(() => {
5200
+ const scrollRef = React21__namespace.useRef(null);
5201
+ React21__namespace.useEffect(() => {
4409
5202
  if (!scrollRef.current || !activeSection) return;
4410
5203
  const container = scrollRef.current;
4411
5204
  const btn = container.querySelector(
@@ -4551,18 +5344,18 @@ function Lightbox({
4551
5344
  onClose
4552
5345
  }) {
4553
5346
  var _a;
4554
- const [index, setIndex] = React19__namespace.useState(initialIndex);
5347
+ const [index, setIndex] = React21__namespace.useState(initialIndex);
4555
5348
  const total = photos.length;
4556
5349
  const photo = photos[index];
4557
- const prev = React19__namespace.useCallback(
5350
+ const prev = React21__namespace.useCallback(
4558
5351
  () => setIndex((i) => (i - 1 + total) % total),
4559
5352
  [total]
4560
5353
  );
4561
- const next = React19__namespace.useCallback(
5354
+ const next = React21__namespace.useCallback(
4562
5355
  () => setIndex((i) => (i + 1) % total),
4563
5356
  [total]
4564
5357
  );
4565
- React19__namespace.useEffect(() => {
5358
+ React21__namespace.useEffect(() => {
4566
5359
  const onKey = (e) => {
4567
5360
  if (e.key === "Escape") onClose();
4568
5361
  if (e.key === "ArrowLeft") prev();
@@ -4756,7 +5549,7 @@ function GridGallery({
4756
5549
  initialVisible,
4757
5550
  onOpen
4758
5551
  }) {
4759
- const [expanded, setExpanded] = React19__namespace.useState(false);
5552
+ const [expanded, setExpanded] = React21__namespace.useState(false);
4760
5553
  const cols = gridCols(photos.length);
4761
5554
  const hasMore = photos.length > initialVisible;
4762
5555
  const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
@@ -4786,7 +5579,7 @@ function MasonryGallery({
4786
5579
  initialVisible,
4787
5580
  onOpen
4788
5581
  }) {
4789
- const [expanded, setExpanded] = React19__namespace.useState(false);
5582
+ const [expanded, setExpanded] = React21__namespace.useState(false);
4790
5583
  const hasMore = photos.length > initialVisible;
4791
5584
  const visible = expanded || !hasMore ? photos : photos.slice(0, initialVisible);
4792
5585
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -4859,7 +5652,7 @@ function FeaturedGallery({
4859
5652
  photos,
4860
5653
  onOpen
4861
5654
  }) {
4862
- const [expanded, setExpanded] = React19__namespace.useState(false);
5655
+ const [expanded, setExpanded] = React21__namespace.useState(false);
4863
5656
  const featured = photos.slice(0, 3);
4864
5657
  const extra = photos.slice(3);
4865
5658
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
@@ -4936,8 +5729,8 @@ function PhotoGallery({
4936
5729
  onPhotoClick,
4937
5730
  className
4938
5731
  }) {
4939
- const [lightboxIndex, setLightboxIndex] = React19__namespace.useState(null);
4940
- const normalised = React19__namespace.useMemo(() => photos.map(normalise), [photos]);
5732
+ const [lightboxIndex, setLightboxIndex] = React21__namespace.useState(null);
5733
+ const normalised = React21__namespace.useMemo(() => photos.map(normalise), [photos]);
4941
5734
  const handleOpen = (index) => {
4942
5735
  setLightboxIndex(index);
4943
5736
  onPhotoClick == null ? void 0 : onPhotoClick(normalised[index].src, index);
@@ -5026,7 +5819,7 @@ function PricingTrip({
5026
5819
  variant = "card",
5027
5820
  className
5028
5821
  }) {
5029
- const [showPricing, setShowPricing] = React19__namespace.useState(false);
5822
+ const [showPricing, setShowPricing] = React21__namespace.useState(false);
5030
5823
  if (variant === "compact") {
5031
5824
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex items-center gap-3", className), children: [
5032
5825
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
@@ -5349,14 +6142,14 @@ function SiteHeader({
5349
6142
  className
5350
6143
  }) {
5351
6144
  const t = VARIANT[variant];
5352
- const [openMenu, setOpenMenu] = React19__namespace.useState(null);
5353
- const [langOpen, setLangOpen] = React19__namespace.useState(false);
5354
- const [mobileOpen, setMobileOpen] = React19__namespace.useState(false);
5355
- const [openMobileSection, setOpenMobileSection] = React19__namespace.useState(null);
5356
- const [activeLang, setActiveLang] = React19__namespace.useState(currentLanguage);
6145
+ const [openMenu, setOpenMenu] = React21__namespace.useState(null);
6146
+ const [langOpen, setLangOpen] = React21__namespace.useState(false);
6147
+ const [mobileOpen, setMobileOpen] = React21__namespace.useState(false);
6148
+ const [openMobileSection, setOpenMobileSection] = React21__namespace.useState(null);
6149
+ const [activeLang, setActiveLang] = React21__namespace.useState(currentLanguage);
5357
6150
  const toggleMobileSection = (label) => setOpenMobileSection((prev) => prev === label ? null : label);
5358
- const menuCloseTimer = React19__namespace.useRef(void 0);
5359
- const langCloseTimer = React19__namespace.useRef(void 0);
6151
+ const menuCloseTimer = React21__namespace.useRef(void 0);
6152
+ const langCloseTimer = React21__namespace.useRef(void 0);
5360
6153
  const handleMenuEnter = (label) => {
5361
6154
  clearTimeout(menuCloseTimer.current);
5362
6155
  setOpenMenu(label);
@@ -5377,7 +6170,7 @@ function SiteHeader({
5377
6170
  setOpenMenu(null);
5378
6171
  setLangOpen(false);
5379
6172
  };
5380
- React19__namespace.useEffect(() => () => {
6173
+ React21__namespace.useEffect(() => () => {
5381
6174
  clearTimeout(menuCloseTimer.current);
5382
6175
  clearTimeout(langCloseTimer.current);
5383
6176
  }, []);
@@ -5642,7 +6435,7 @@ function SiteHeader({
5642
6435
  ), children: [
5643
6436
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: languages.map((lang, i) => {
5644
6437
  const isActive = lang.code === activeLang;
5645
- return /* @__PURE__ */ jsxRuntime.jsxs(React19__namespace.Fragment, { children: [
6438
+ return /* @__PURE__ */ jsxRuntime.jsxs(React21__namespace.Fragment, { children: [
5646
6439
  i > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
5647
6440
  "text-xs select-none",
5648
6441
  variant === "white" ? "text-border" : "text-white/15"
@@ -5704,8 +6497,8 @@ function SiteHeader({
5704
6497
  );
5705
6498
  }
5706
6499
  function ThemeToggle({ className }) {
5707
- const [dark, setDark] = React19__namespace.useState(false);
5708
- React19__namespace.useEffect(() => {
6500
+ const [dark, setDark] = React21__namespace.useState(false);
6501
+ React21__namespace.useEffect(() => {
5709
6502
  const saved = localStorage.getItem("theme");
5710
6503
  const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
5711
6504
  const isDark = saved === "dark" || !saved && prefersDark;
@@ -5734,7 +6527,7 @@ function ThemeToggle({ className }) {
5734
6527
  }
5735
6528
  );
5736
6529
  }
5737
- function CalendarIcon5() {
6530
+ function CalendarIcon6() {
5738
6531
  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: [
5739
6532
  /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2" }),
5740
6533
  /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "16", y1: "2", x2: "16", y2: "6" }),
@@ -5777,7 +6570,7 @@ var sizeConfig = {
5777
6570
  var statusConfig = {
5778
6571
  "sold-out": {
5779
6572
  label: "All seats taken",
5780
- icon: /* @__PURE__ */ jsxRuntime.jsx(CalendarIcon5, {})
6573
+ icon: /* @__PURE__ */ jsxRuntime.jsx(CalendarIcon6, {})
5781
6574
  },
5782
6575
  trending: {
5783
6576
  label: "Trending",
@@ -5856,7 +6649,7 @@ function TripCard({
5856
6649
  );
5857
6650
  }
5858
6651
  function useHlsVideo(videoRef, src) {
5859
- React19__namespace.useEffect(() => {
6652
+ React21__namespace.useEffect(() => {
5860
6653
  if (!src || !videoRef.current) return;
5861
6654
  const video = videoRef.current;
5862
6655
  if (!src.includes(".m3u8")) return;
@@ -5898,11 +6691,11 @@ function TripHeader({
5898
6691
  className
5899
6692
  }) {
5900
6693
  var _a;
5901
- const [heroIndex, setHeroIndex] = React19__namespace.useState(0);
5902
- const [videoReady, setVideoReady] = React19__namespace.useState(false);
5903
- const videoRef = React19__namespace.useRef(null);
6694
+ const [heroIndex, setHeroIndex] = React21__namespace.useState(0);
6695
+ const [videoReady, setVideoReady] = React21__namespace.useState(false);
6696
+ const videoRef = React21__namespace.useRef(null);
5904
6697
  const isHls = !!(videoUrl == null ? void 0 : videoUrl.includes(".m3u8"));
5905
- const validImages = React19__namespace.useMemo(
6698
+ const validImages = React21__namespace.useMemo(
5906
6699
  () => images.map((u) => u == null ? void 0 : u.trim()).filter(Boolean),
5907
6700
  [images]
5908
6701
  );
@@ -5917,7 +6710,7 @@ function TripHeader({
5917
6710
  const nights = duration ? (_a = duration.nights) != null ? _a : Math.max(duration.days - 1, 1) : null;
5918
6711
  const hasMeta = !!(destination || duration);
5919
6712
  useHlsVideo(videoRef, isHls ? videoUrl : void 0);
5920
- React19__namespace.useEffect(() => {
6713
+ React21__namespace.useEffect(() => {
5921
6714
  if (!videoUrl) return;
5922
6715
  const el = videoRef.current;
5923
6716
  if (!el) return;
@@ -6059,7 +6852,7 @@ function TripHeader({
6059
6852
  siteHeader ? "-mt-44" : "-mt-36"
6060
6853
  ),
6061
6854
  children: [
6062
- 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(React19__namespace.Fragment, { children: [
6855
+ 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(React21__namespace.Fragment, { children: [
6063
6856
  i > 0 && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "h-3 w-3 text-white/50 shrink-0" }),
6064
6857
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-white/70 font-ui hover:text-white/90 cursor-default", children: crumb.label })
6065
6858
  ] }, i)) }),
@@ -6159,19 +6952,19 @@ function TripPage({
6159
6952
  features,
6160
6953
  className
6161
6954
  }) {
6162
- const [activeSection, setActiveSection] = React19__namespace.useState("");
6163
- const [navFloating, setNavFloating] = React19__namespace.useState(false);
6164
- const [navHidden, setNavHidden] = React19__namespace.useState(false);
6165
- const [isFloating, setIsFloating] = React19__namespace.useState(false);
6166
- const [sidebarPos, setSidebarPos] = React19__namespace.useState(null);
6167
- const [pricingBarVisible, setPricingBarVisible] = React19__namespace.useState(false);
6168
- const navRef = React19__namespace.useRef(null);
6169
- const navSentinelRef = React19__namespace.useRef(null);
6170
- const sentinelRef = React19__namespace.useRef(null);
6171
- const sidebarPlaceholderRef = React19__namespace.useRef(null);
6172
- const pricingBarRef = React19__namespace.useRef(null);
6173
- const galleryRef = React19__namespace.useRef(null);
6174
- const sections = React19__namespace.useMemo(
6955
+ const [activeSection, setActiveSection] = React21__namespace.useState("");
6956
+ const [navFloating, setNavFloating] = React21__namespace.useState(false);
6957
+ const [navHidden, setNavHidden] = React21__namespace.useState(false);
6958
+ const [isFloating, setIsFloating] = React21__namespace.useState(false);
6959
+ const [sidebarPos, setSidebarPos] = React21__namespace.useState(null);
6960
+ const [pricingBarVisible, setPricingBarVisible] = React21__namespace.useState(false);
6961
+ const navRef = React21__namespace.useRef(null);
6962
+ const navSentinelRef = React21__namespace.useRef(null);
6963
+ const sentinelRef = React21__namespace.useRef(null);
6964
+ const sidebarPlaceholderRef = React21__namespace.useRef(null);
6965
+ const pricingBarRef = React21__namespace.useRef(null);
6966
+ const galleryRef = React21__namespace.useRef(null);
6967
+ const sections = React21__namespace.useMemo(
6175
6968
  () => [
6176
6969
  { id: "key-info", label: "Key info", show: !!(infoGroups == null ? void 0 : infoGroups.length) },
6177
6970
  { id: "overview", label: "Overview", show: !!overview },
@@ -6186,7 +6979,7 @@ function TripPage({
6186
6979
  // eslint-disable-next-line react-hooks/exhaustive-deps
6187
6980
  []
6188
6981
  );
6189
- React19__namespace.useEffect(() => {
6982
+ React21__namespace.useEffect(() => {
6190
6983
  const sentinel = navSentinelRef.current;
6191
6984
  if (!sentinel) return;
6192
6985
  const update = () => setNavFloating(sentinel.getBoundingClientRect().top < 1);
@@ -6194,7 +6987,7 @@ function TripPage({
6194
6987
  update();
6195
6988
  return () => document.removeEventListener("scroll", update, { capture: true });
6196
6989
  }, []);
6197
- React19__namespace.useEffect(() => {
6990
+ React21__namespace.useEffect(() => {
6198
6991
  const sentinel = sentinelRef.current;
6199
6992
  if (!sentinel) return;
6200
6993
  const update = () => setIsFloating(sentinel.getBoundingClientRect().top < 1);
@@ -6202,7 +6995,7 @@ function TripPage({
6202
6995
  update();
6203
6996
  return () => document.removeEventListener("scroll", update, { capture: true });
6204
6997
  }, []);
6205
- React19__namespace.useEffect(() => {
6998
+ React21__namespace.useEffect(() => {
6206
6999
  const measure = () => {
6207
7000
  if (!sidebarPlaceholderRef.current) return;
6208
7001
  const rect = sidebarPlaceholderRef.current.getBoundingClientRect();
@@ -6212,7 +7005,7 @@ function TripPage({
6212
7005
  window.addEventListener("resize", measure);
6213
7006
  return () => window.removeEventListener("resize", measure);
6214
7007
  }, [isFloating]);
6215
- React19__namespace.useEffect(() => {
7008
+ React21__namespace.useEffect(() => {
6216
7009
  const check = () => {
6217
7010
  var _a;
6218
7011
  const target = (_a = galleryRef.current) != null ? _a : pricingBarRef.current;
@@ -6223,7 +7016,7 @@ function TripPage({
6223
7016
  check();
6224
7017
  return () => document.removeEventListener("scroll", check, { capture: true });
6225
7018
  }, []);
6226
- React19__namespace.useEffect(() => {
7019
+ React21__namespace.useEffect(() => {
6227
7020
  const check = () => {
6228
7021
  if (!pricingBarRef.current) return;
6229
7022
  setNavHidden(pricingBarRef.current.getBoundingClientRect().top < window.innerHeight * 0.92);
@@ -6232,7 +7025,7 @@ function TripPage({
6232
7025
  check();
6233
7026
  return () => document.removeEventListener("scroll", check, { capture: true });
6234
7027
  }, []);
6235
- React19__namespace.useEffect(() => {
7028
+ React21__namespace.useEffect(() => {
6236
7029
  if (sections.length === 0) return;
6237
7030
  setActiveSection(sections[0].id);
6238
7031
  const update = () => {
@@ -6949,21 +7742,21 @@ function LeadCapturePopup({
6949
7742
  }) {
6950
7743
  var _a;
6951
7744
  const config = __spreadValues(__spreadValues({}, DEFAULTS), _config);
6952
- const [open, setOpen] = React19.useState(false);
6953
- const [closing, setClosing] = React19.useState(false);
6954
- const [submitted, setSubmitted] = React19.useState(false);
6955
- const [submitting, setSubmitting] = React19.useState(false);
6956
- const [error, setError] = React19.useState(null);
6957
- const [name, setName] = React19.useState("");
6958
- const [email, setEmail] = React19.useState("");
6959
- const [travelDate, setTravelDate] = React19.useState("");
6960
- const panelRef = React19.useRef(null);
6961
- const nameRef = React19.useRef(null);
6962
- const show = React19.useCallback(() => {
7745
+ const [open, setOpen] = React21.useState(false);
7746
+ const [closing, setClosing] = React21.useState(false);
7747
+ const [submitted, setSubmitted] = React21.useState(false);
7748
+ const [submitting, setSubmitting] = React21.useState(false);
7749
+ const [error, setError] = React21.useState(null);
7750
+ const [name, setName] = React21.useState("");
7751
+ const [email, setEmail] = React21.useState("");
7752
+ const [travelDate, setTravelDate] = React21.useState("");
7753
+ const panelRef = React21.useRef(null);
7754
+ const nameRef = React21.useRef(null);
7755
+ const show = React21.useCallback(() => {
6963
7756
  if (isDismissed()) return;
6964
7757
  setOpen(true);
6965
7758
  }, []);
6966
- React19.useEffect(() => {
7759
+ React21.useEffect(() => {
6967
7760
  var _a2;
6968
7761
  if (isDismissed()) return;
6969
7762
  if (config.trigger === "delay") {
@@ -6990,7 +7783,7 @@ function LeadCapturePopup({
6990
7783
  return () => window.removeEventListener("scroll", handler);
6991
7784
  }
6992
7785
  }, [config.trigger, config.delaySeconds, config.scrollPercent, show]);
6993
- React19.useEffect(() => {
7786
+ React21.useEffect(() => {
6994
7787
  if (open && !submitted) {
6995
7788
  requestAnimationFrame(() => {
6996
7789
  var _a2;
@@ -6998,7 +7791,7 @@ function LeadCapturePopup({
6998
7791
  });
6999
7792
  }
7000
7793
  }, [open, submitted]);
7001
- const close = React19.useCallback(() => {
7794
+ const close = React21.useCallback(() => {
7002
7795
  setClosing(true);
7003
7796
  setDismissed(config.dismissDays);
7004
7797
  setTimeout(() => {
@@ -7006,7 +7799,7 @@ function LeadCapturePopup({
7006
7799
  setClosing(false);
7007
7800
  }, 250);
7008
7801
  }, [config.dismissDays]);
7009
- React19.useEffect(() => {
7802
+ React21.useEffect(() => {
7010
7803
  if (!open) return;
7011
7804
  const handler = (e) => {
7012
7805
  if (e.key === "Escape") close();
@@ -7014,7 +7807,7 @@ function LeadCapturePopup({
7014
7807
  document.addEventListener("keydown", handler);
7015
7808
  return () => document.removeEventListener("keydown", handler);
7016
7809
  }, [open, close]);
7017
- const onOverlayClick = React19.useCallback(
7810
+ const onOverlayClick = React21.useCallback(
7018
7811
  (e) => {
7019
7812
  if (panelRef.current && !panelRef.current.contains(e.target)) {
7020
7813
  close();
@@ -7248,8 +8041,10 @@ function LeadCapturePopup({
7248
8041
 
7249
8042
  exports.ActivityCard = ActivityCard;
7250
8043
  exports.Alert = Alert;
8044
+ exports.BirthDateField = BirthDateField;
7251
8045
  exports.BookingConfirmation = BookingConfirmation;
7252
8046
  exports.BookingConfirmationEmail = BookingConfirmationEmail;
8047
+ exports.BookingConfirmedCard = BookingConfirmedCard;
7253
8048
  exports.BookingDetails = BookingDetails;
7254
8049
  exports.BookingForm = BookingForm;
7255
8050
  exports.BookingShell = BookingShell;
@@ -7274,6 +8069,8 @@ exports.PaymentModalShell = PaymentModalShell;
7274
8069
  exports.PhoneCountrySelect = PhoneCountrySelect;
7275
8070
  exports.PhotoGallery = PhotoGallery;
7276
8071
  exports.PricingTrip = PricingTrip;
8072
+ exports.RegistrationForm = RegistrationForm;
8073
+ exports.RegistrationSuccessCard = RegistrationSuccessCard;
7277
8074
  exports.SiteHeader = SiteHeader;
7278
8075
  exports.TermsSection = TermsSection;
7279
8076
  exports.ThemeToggle = ThemeToggle;