@flamingo-stack/openframe-frontend-core 0.0.596-2034.5669.1 → 0.0.596-2034.5671.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import type { Ref } from 'react';
1
+ import type { ReactNode, Ref } from 'react';
2
2
  import { type MeetingAvailability } from '../../schemas/meeting-booking-schema';
3
3
  /**
4
4
  * One field in a host-supplied row. `name` is a built-in (`email`, `firstName`,
@@ -10,6 +10,24 @@ export interface BookingFieldSlot {
10
10
  span?: 1 | 2 | 3 | 4;
11
11
  }
12
12
  export type BookingFieldRow = BookingFieldSlot[];
13
+ /**
14
+ * A HOST-supplied consent row — the block the waitlist form draws for its SMS
15
+ * consent, here for "I agree to the Privacy Policy and to be contacted". It is
16
+ * the host's copy and the host's link, so it is a prop, not HubSpot metadata;
17
+ * HubSpot's own `legalConsent` block (verbatim, declared on the link) renders
18
+ * alongside when the link carries one.
19
+ *
20
+ * A client-side gate, exactly like the waitlist's: Continue is refused until it
21
+ * is ticked, and the tick rides in the payload as `hostConsent` — which the
22
+ * host's book route strips as an undeclared key. It is not a HubSpot consent
23
+ * record; declare `legalConsent` on the link when one is required.
24
+ */
25
+ export interface BookingFormConsent {
26
+ label: ReactNode;
27
+ description?: ReactNode;
28
+ /** Shown under the row when Continue is pressed unticked. */
29
+ errorMessage?: string;
30
+ }
13
31
  /**
14
32
  * BookingForm — attendee details + the link's declared custom questions +
15
33
  * verbatim legal-consent copy. ContactForm's scaffolding (react-hook-form +
@@ -55,6 +73,8 @@ export interface BookingFormProps {
55
73
  * appended full width. Both are deliberate — see `slotNode`/`unplacedFields`.
56
74
  */
57
75
  fieldRows?: BookingFieldRow[];
76
+ /** Host-supplied consent row, rendered after the fields — see `BookingFormConsent`. */
77
+ consent?: BookingFormConsent;
58
78
  isSubmitting: boolean;
59
79
  onSubmit: (payload: Record<string, unknown>) => Promise<void>;
60
80
  /** From useHumanitySignals — parent owns the instance so it can resetSignals(). */
@@ -64,7 +84,7 @@ export interface BookingFormProps {
64
84
  };
65
85
  getSignals: () => Record<string, string | number>;
66
86
  }
67
- export declare function BookingForm({ availability, meetingId, startTimeMs, durationMs, timezone, deferSlot, initialValues, submitLabel, footerNote, fieldRows, isSubmitting, onSubmit, honeypotInputProps, getSignals, }: BookingFormProps): import("react").JSX.Element;
87
+ export declare function BookingForm({ availability, meetingId, startTimeMs, durationMs, timezone, deferSlot, initialValues, submitLabel, footerNote, fieldRows, consent, isSubmitting, onSubmit, honeypotInputProps, getSignals, }: BookingFormProps): import("react").JSX.Element;
68
88
  /**
69
89
  * Cold-start placeholder for `flow="details-first"`, where the FORM is the
70
90
  * first thing in the action panel.
@@ -1 +1 @@
1
- {"version":3,"file":"booking-form.d.ts","sourceRoot":"","sources":["../../../src/components/meeting-scheduler/booking-form.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAa,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAGL,KAAK,mBAAmB,EAGzB,MAAM,sCAAsC,CAAC;AAqB9C;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACtB;AAED,MAAM,MAAM,eAAe,GAAG,gBAAgB,EAAE,CAAC;AAcjD;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,mBAAmB,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;qEACiE;IACjE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6EAA6E;IAC7E,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,oEAAoE;IACpE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,eAAe,EAAE,CAAC;IAC9B,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,mFAAmF;IACnF,kBAAkB,EAAE;QAAE,GAAG,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACjE,UAAU,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;CACnD;AAED,wBAAgB,WAAW,CAAC,EAC1B,YAAY,EACZ,SAAS,EACT,WAAW,EACX,UAAU,EACV,QAAQ,EACR,SAAiB,EACjB,aAAa,EACb,WAAW,EACX,UAAU,EACV,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAClB,UAAU,GACX,EAAE,gBAAgB,+BAkXlB;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,gCAelC"}
1
+ {"version":3,"file":"booking-form.d.ts","sourceRoot":"","sources":["../../../src/components/meeting-scheduler/booking-form.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAa,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAGL,KAAK,mBAAmB,EAGzB,MAAM,sCAAsC,CAAC;AAqB9C;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,gFAAgF;IAChF,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;CACtB;AAED,MAAM,MAAM,eAAe,GAAG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EACV,QAAQ,EACR,SAAiB,EACjB,aAAa,EACb,WAAW,EACX,UAAU,EACV,SAAS,EACT,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAClB,UAAU,GACX,EAAE,gBAAgB,+BAgZlB;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,gCAelC"}
@@ -38,14 +38,6 @@ export interface SchedulerContextPanelProps {
38
38
  * states the length and a live selector beside a filled-in form invites a
39
39
  * change that would throw the form away. Going Back restores them. */
40
40
  locked?: boolean;
41
- /**
42
- * The link's length is not the visitor's to choose here: the static duration
43
- * line renders and the chips never do, at every step. `flow="details-first"`
44
- * sets it — the mock draws "30 min call" beside the host on the calendar step
45
- * and offers no selector — and unlike `locked` it has NO effect on the
46
- * timezone picker, which on that step is the only control the visitor has.
47
- */
48
- fixedDuration?: boolean;
49
41
  /** Whether the timezone picker renders. Default true: the zone governs every
50
42
  * time on screen, the form's summary line included, so it stays reachable
51
43
  * right up to the confirmation — where there is nothing left to re-read. */
@@ -62,5 +54,5 @@ export declare function ContextPanelSkeleton({ className, onBack, backLabel, }:
62
54
  onBack?: () => void;
63
55
  backLabel?: string;
64
56
  }): import("react").JSX.Element;
65
- export declare function SchedulerContextPanel({ hosts, title, description, durationsMs, selectedDurationMs, onSelectDuration, timezone, onTimezoneChange, onBack, backLabel, locked, fixedDuration, showTimezone, className, }: SchedulerContextPanelProps): import("react").JSX.Element;
57
+ export declare function SchedulerContextPanel({ hosts, title, description, durationsMs, selectedDurationMs, onSelectDuration, timezone, onTimezoneChange, onBack, backLabel, locked, showTimezone, className, }: SchedulerContextPanelProps): import("react").JSX.Element;
66
58
  //# sourceMappingURL=context-panel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context-panel.d.ts","sourceRoot":"","sources":["../../../src/components/meeting-scheduler/context-panel.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAMxE;;;;;;;;;;;;;;;;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,+BAuH5B"}
@@ -297,6 +297,7 @@ function BookingForm({
297
297
  submitLabel,
298
298
  footerNote,
299
299
  fieldRows,
300
+ consent,
300
301
  isSubmitting,
301
302
  onSubmit,
302
303
  honeypotInputProps,
@@ -340,31 +341,39 @@ function BookingForm({
340
341
  }
341
342
  });
342
343
  const priorConsents = _optionalChain([initialValues, 'optionalAccess', _6 => _6.legalConsentResponses]);
344
+ const [consented, setConsented] = _react.useState.call(void 0, _optionalChain([initialValues, 'optionalAccess', _7 => _7.hostConsent]) === true);
345
+ const [consentError, setConsentError] = _react.useState.call(void 0, null);
346
+ const consentMissing = Boolean(consent) && !consented;
343
347
  _react.useEffect.call(void 0, () => {
344
348
  setValue(
345
349
  "legalConsentResponses",
346
350
  consentDefaults.map((next) => ({
347
351
  ...next,
348
- consented: _nullishCoalesce(_optionalChain([priorConsents, 'optionalAccess', _7 => _7.find, 'call', _8 => _8((r) => r.communicationTypeId === next.communicationTypeId), 'optionalAccess', _9 => _9.consented]), () => ( false))
352
+ consented: _nullishCoalesce(_optionalChain([priorConsents, 'optionalAccess', _8 => _8.find, 'call', _9 => _9((r) => r.communicationTypeId === next.communicationTypeId), 'optionalAccess', _10 => _10.consented]), () => ( false))
349
353
  })),
350
354
  { shouldDirty: false }
351
355
  );
352
356
  }, [consentDefaults, priorConsents, setValue]);
353
- const submit = handleSubmit(async (data) => {
357
+ const submitValid = handleSubmit(async (data) => {
358
+ if (consentMissing) return;
354
359
  if (deferSlot) {
355
- await onSubmit({ ...data, meetingId });
360
+ await onSubmit({ ...data, meetingId, hostConsent: consented });
356
361
  return;
357
362
  }
358
- await onSubmit({ ...data, meetingId, startTimeMs, durationMs, timezone, ...getSignals() });
363
+ await onSubmit({ ...data, meetingId, hostConsent: consented, startTimeMs, durationMs, timezone, ...getSignals() });
359
364
  });
365
+ const submit = (event) => {
366
+ if (consentMissing) setConsentError(_nullishCoalesce(_optionalChain([consent, 'optionalAccess', _11 => _11.errorMessage]), () => ( "Please agree to continue.")));
367
+ return submitValid(event);
368
+ };
360
369
  const fieldError = (name) => {
361
- const err = _optionalChain([errors, 'access', _10 => _10.formFields, 'optionalAccess', _11 => _11[name]]);
362
- return _optionalChain([err, 'optionalAccess', _12 => _12.message]);
370
+ const err = _optionalChain([errors, 'access', _12 => _12.formFields, 'optionalAccess', _13 => _13[name]]);
371
+ return _optionalChain([err, 'optionalAccess', _14 => _14.message]);
363
372
  };
364
373
  const inputClass = "bg-ods-card border-ods-border text-ods-text-primary placeholder-ods-text-secondary px-3 h-11 md:h-12";
365
374
  const FORM_STACK = "flex flex-col gap-[var(--spacing-system-l)]";
366
375
  const builtInFields = {
367
- email: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7ITKISQcjs.FieldWrapper, { label: "Email", htmlFor: "ms-email", error: _optionalChain([errors, 'access', _13 => _13.email, 'optionalAccess', _14 => _14.message]), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
376
+ email: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7ITKISQcjs.FieldWrapper, { label: "Email", htmlFor: "ms-email", error: _optionalChain([errors, 'access', _15 => _15.email, 'optionalAccess', _16 => _16.message]), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
368
377
  _chunkY7ITKISQcjs.Input,
369
378
  {
370
379
  id: "ms-email",
@@ -377,7 +386,7 @@ function BookingForm({
377
386
  ...register("email")
378
387
  }
379
388
  ) }),
380
- firstName: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7ITKISQcjs.FieldWrapper, { label: "First Name", htmlFor: "ms-first-name", error: _optionalChain([errors, 'access', _15 => _15.firstName, 'optionalAccess', _16 => _16.message]), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
389
+ firstName: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7ITKISQcjs.FieldWrapper, { label: "First Name", htmlFor: "ms-first-name", error: _optionalChain([errors, 'access', _17 => _17.firstName, 'optionalAccess', _18 => _18.message]), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
381
390
  _chunkY7ITKISQcjs.Input,
382
391
  {
383
392
  id: "ms-first-name",
@@ -389,7 +398,7 @@ function BookingForm({
389
398
  ...register("firstName")
390
399
  }
391
400
  ) }),
392
- lastName: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7ITKISQcjs.FieldWrapper, { label: "Last Name", htmlFor: "ms-last-name", error: _optionalChain([errors, 'access', _17 => _17.lastName, 'optionalAccess', _18 => _18.message]), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
401
+ lastName: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7ITKISQcjs.FieldWrapper, { label: "Last Name", htmlFor: "ms-last-name", error: _optionalChain([errors, 'access', _19 => _19.lastName, 'optionalAccess', _20 => _20.message]), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
393
402
  _chunkY7ITKISQcjs.Input,
394
403
  {
395
404
  id: "ms-last-name",
@@ -508,11 +517,26 @@ function BookingForm({
508
517
  ] }),
509
518
  supportedFields.map((field) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Fragment, { children: renderDeclaredField(field) }, field.name))
510
519
  ] }),
520
+ consent && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
521
+ _chunkQW663C35cjs.CheckboxBlock,
522
+ {
523
+ id: "ms-host-consent",
524
+ checked: consented,
525
+ onCheckedChange: (v) => {
526
+ setConsented(v);
527
+ if (v) setConsentError(null);
528
+ },
529
+ disabled: isSubmitting,
530
+ error: _nullishCoalesce(consentError, () => ( void 0)),
531
+ label: consent.label,
532
+ description: consent.description
533
+ }
534
+ ),
511
535
  legalConsent && // Same out-of-flow message as the fields above, so a missed consent
512
536
  // box doesn't shove the submit button down the card. With no error the
513
537
  // wrapper is `display:contents` and the panel below is the flex item,
514
538
  // exactly as it was.
515
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7ITKISQcjs.FieldWrapper, { error: _optionalChain([errors, 'access', _19 => _19.legalConsentResponses, 'optionalAccess', _20 => _20.message]), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-[var(--spacing-system-xs)]", children: [
539
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkY7ITKISQcjs.FieldWrapper, { error: _optionalChain([errors, 'access', _21 => _21.legalConsentResponses, 'optionalAccess', _22 => _22.message]), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-[var(--spacing-system-xs)]", children: [
516
540
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
517
541
  _reacthookform.Controller,
518
542
  {
@@ -532,7 +556,7 @@ function BookingForm({
532
556
  _chunkQW663C35cjs.CheckboxBlock,
533
557
  {
534
558
  id: `ms-consent-${box.communicationTypeId}`,
535
- checked: _nullishCoalesce(_optionalChain([current, 'optionalAccess', _21 => _21.consented]), () => ( false)),
559
+ checked: _nullishCoalesce(_optionalChain([current, 'optionalAccess', _23 => _23.consented]), () => ( false)),
536
560
  onCheckedChange: (v) => rhf.onChange(
537
561
  responses.map(
538
562
  (r) => r.communicationTypeId === box.communicationTypeId ? { ...r, consented: v } : r
@@ -610,7 +634,7 @@ function zoneLabel(tz) {
610
634
  timeZone: tz,
611
635
  timeZoneName: "shortOffset"
612
636
  }).formatToParts(/* @__PURE__ */ new Date());
613
- const offset = _nullishCoalesce(_optionalChain([parts, 'access', _22 => _22.find, 'call', _23 => _23((p) => p.type === "timeZoneName"), 'optionalAccess', _24 => _24.value]), () => ( ""));
637
+ const offset = _nullishCoalesce(_optionalChain([parts, 'access', _24 => _24.find, 'call', _25 => _25((p) => p.type === "timeZoneName"), 'optionalAccess', _26 => _26.value]), () => ( ""));
614
638
  return offset ? `${tz.replace(/_/g, " ")} (${offset})` : tz.replace(/_/g, " ");
615
639
  } catch (e4) {
616
640
  return tz.replace(/_/g, " ");
@@ -653,7 +677,6 @@ function SchedulerContextPanel({
653
677
  onBack,
654
678
  backLabel = "Back",
655
679
  locked = false,
656
- fixedDuration = false,
657
680
  showTimezone = true,
658
681
  className
659
682
  }) {
@@ -697,9 +720,8 @@ function SchedulerContextPanel({
697
720
  " hosts on this calendar"
698
721
  ] })
699
722
  ] }),
700
- locked || fixedDuration || durationsMs.length <= 1 ? (
701
- // Post-selection, a fixed-length flow, or a link that offers one
702
- // length: a static line,
723
+ locked || durationsMs.length <= 1 ? (
724
+ // Post-selection, or a link that offers one length: a static line,
703
725
  // which is what sits beside the host on the header-strip layouts.
704
726
  selectedDurationMs != null && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "shrink-0 text-ods-text-secondary text-h6", children: [
705
727
  _chunkWCBRZCU4cjs.formatDurationCompact.call(void 0, selectedDurationMs / 1e3),
@@ -709,7 +731,7 @@ function SchedulerContextPanel({
709
731
  ] }),
710
732
  title && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-primary text-h3", children: title }),
711
733
  description && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-ods-text-secondary text-h6", children: description }),
712
- !locked && !fixedDuration && durationsMs.length > 1 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-[var(--spacing-system-xxs)]", children: [
734
+ !locked && durationsMs.length > 1 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-[var(--spacing-system-xxs)]", children: [
713
735
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: FIELD_LABEL_CLASS, children: "Duration" }),
714
736
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-wrap gap-[var(--spacing-system-xs)]", children: durationsMs.map((ms) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
715
737
  _chunkCJBSU3XBcjs.Button,
@@ -736,7 +758,7 @@ function SchedulerContextPanel({
736
758
  {
737
759
  value: timezone,
738
760
  onChange: (tz) => {
739
- if (tz) _optionalChain([onTimezoneChange, 'optionalCall', _25 => _25(tz)]);
761
+ if (tz) _optionalChain([onTimezoneChange, 'optionalCall', _27 => _27(tz)]);
740
762
  },
741
763
  options: zoneOptions,
742
764
  placeholder: "Search timezone\u2026",
@@ -820,7 +842,7 @@ function DayCalendar({ monthOffset, onMonthOffsetChange, selectedDay, onSelectDa
820
842
  const startMonth = new Date(now.getFullYear(), now.getMonth(), 1);
821
843
  const endMonth = new Date(now.getFullYear(), now.getMonth() + _chunkQW663C35cjs.MAX_MONTH_OFFSET + 1, 0);
822
844
  const visibleMonth = new Date(now.getFullYear(), now.getMonth() + monthOffset, 1);
823
- const dayHasNoSlots = _react.useCallback.call(void 0, (day) => !_optionalChain([slotsByDay, 'optionalAccess', _26 => _26.has, 'call', _27 => _27(calendarDayKey(day))]), [slotsByDay]);
845
+ const dayHasNoSlots = _react.useCallback.call(void 0, (day) => !_optionalChain([slotsByDay, 'optionalAccess', _28 => _28.has, 'call', _29 => _29(calendarDayKey(day))]), [slotsByDay]);
824
846
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex min-h-0 flex-1 flex-col", "aria-busy": slotsByDay === null, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
825
847
  _chunkQW663C35cjs.DatePickerCalendar,
826
848
  {
@@ -838,7 +860,7 @@ function DayCalendar({ monthOffset, onMonthOffsetChange, selectedDay, onSelectDa
838
860
  const day = value;
839
861
  if (!day) return;
840
862
  const key = calendarDayKey(day);
841
- if (_optionalChain([slotsByDay, 'optionalAccess', _28 => _28.has, 'call', _29 => _29(key)])) onSelectDay(key);
863
+ if (_optionalChain([slotsByDay, 'optionalAccess', _30 => _30.has, 'call', _31 => _31(key)])) onSelectDay(key);
842
864
  },
843
865
  disabledDays: slotsByDay === null ? DISABLE_EVERY_DAY : dayHasNoSlots
844
866
  }
@@ -1076,7 +1098,7 @@ function MeetingSchedulerDirectory({
1076
1098
  };
1077
1099
  }, [initialData, includeAll, apiBaseUrl]);
1078
1100
  const rows = _react.useMemo.call(void 0, () => {
1079
- const purposes = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _30 => _30.purposes]), () => ( []));
1101
+ const purposes = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _32 => _32.purposes]), () => ( []));
1080
1102
  return purposes.flatMap((p) => p.links.map((link) => ({ link, audienceLabel: p.label })));
1081
1103
  }, [data]);
1082
1104
  const totalPages = _chunkH64ZHSYRcjs.pageCount.call(void 0, rows.length, pageSize);
@@ -1223,8 +1245,8 @@ function HubSpotMeetingScheduler({
1223
1245
  _react.useEffect.call(void 0, () => {
1224
1246
  autoAdvanceCount.current = 0;
1225
1247
  }, [meetingId]);
1226
- const durations = _react.useMemo.call(void 0, () => _nullishCoalesce(_optionalChain([availability, 'optionalAccess', _31 => _31.durationsMs]), () => ( [])), [_optionalChain([availability, 'optionalAccess', _32 => _32.durationsMs])]);
1227
- const shownHosts = _nullishCoalesce(_nullishCoalesce(hosts, () => ( _optionalChain([availability, 'optionalAccess', _33 => _33.hosts]))), () => ( []));
1248
+ const durations = _react.useMemo.call(void 0, () => _nullishCoalesce(_optionalChain([availability, 'optionalAccess', _33 => _33.durationsMs]), () => ( [])), [_optionalChain([availability, 'optionalAccess', _34 => _34.durationsMs])]);
1249
+ const shownHosts = _nullishCoalesce(_nullishCoalesce(hosts, () => ( _optionalChain([availability, 'optionalAccess', _35 => _35.hosts]))), () => ( []));
1228
1250
  const durationMs = _nullishCoalesce(_nullishCoalesce(pickedDurationMs, () => ( durations[0])), () => ( null));
1229
1251
  const slots = _react.useMemo.call(void 0, () => {
1230
1252
  if (!availability || durationMs == null) return [];
@@ -1280,7 +1302,7 @@ function HubSpotMeetingScheduler({
1280
1302
  if (result.ok && result.confirmation) {
1281
1303
  setConfirmation(result.confirmation);
1282
1304
  setStep("confirmed");
1283
- _optionalChain([onBooked, 'optionalCall', _34 => _34(result.confirmation)]);
1305
+ _optionalChain([onBooked, 'optionalCall', _36 => _36(result.confirmation)]);
1284
1306
  return;
1285
1307
  }
1286
1308
  const code = _nullishCoalesce(result.code, () => ( "TEMPORARILY_UNAVAILABLE"));
@@ -1343,7 +1365,6 @@ function HubSpotMeetingScheduler({
1343
1365
  onBack: detailsFirst ? step === "slot" ? backToDetails : onBack : step === "details" ? backToSlot : onBack,
1344
1366
  locked: detailsFirst ? step === "confirmed" || isSubmitting : step !== "slot",
1345
1367
  showTimezone: step !== "confirmed",
1346
- fixedDuration: detailsFirst,
1347
1368
  className: CONTEXT_PANEL_CLASS
1348
1369
  }
1349
1370
  ),
@@ -1378,7 +1399,7 @@ function HubSpotMeetingScheduler({
1378
1399
  deferSlot: detailsFirst,
1379
1400
  submitLabel: detailsFirst ? "Continue" : void 0,
1380
1401
  footerNote: detailsFirst ? "Next step: pick a slot that works. Calendar invite lands right after." : void 0,
1381
- initialValues: detailsFirst ? _optionalChain([stash, 'optionalAccess', _35 => _35.payload]) : void 0,
1402
+ initialValues: detailsFirst ? _optionalChain([stash, 'optionalAccess', _37 => _37.payload]) : void 0,
1382
1403
  isSubmitting,
1383
1404
  onSubmit: detailsFirst ? stashDetails : handleSubmit,
1384
1405
  honeypotInputProps,