@odla-ai/chapter 0.41.0 → 0.41.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.
@@ -27,7 +27,12 @@ function dayLabel(ms, tz) {
27
27
  return new Date(ms).toLocaleDateString(void 0, { timeZone: tz, weekday: "short", month: "short", day: "numeric" });
28
28
  }
29
29
  function timeLabel(ms, tz) {
30
- return new Date(ms).toLocaleTimeString(void 0, { timeZone: tz, hour: "numeric", minute: "2-digit" });
30
+ return new Date(ms).toLocaleTimeString(void 0, {
31
+ timeZone: tz,
32
+ hour: "numeric",
33
+ minute: "2-digit",
34
+ timeZoneName: "short"
35
+ });
31
36
  }
32
37
  function fullLabel(ms, tz) {
33
38
  return new Date(ms).toLocaleString(void 0, {
@@ -211,7 +216,20 @@ function GiftOfferCards(props) {
211
216
  // src/ui/gift-code-redeemer.tsx
212
217
  import { InlineActionField } from "@odla-ai/ui/components";
213
218
  import { useState as useState3 } from "preact/hooks";
214
- import { jsx as jsx4 } from "preact/jsx-runtime";
219
+ import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs4 } from "preact/jsx-runtime";
220
+ var GIFT_CODE_REDEEMER_CSS = `
221
+ .gift-code-redeemer{container-type:inline-size;display:grid;gap:var(--ui-space-1,.35rem);margin:0}
222
+ .gift-code-redeemer .inline-action-field-label{display:block;color:var(--ui-text-muted,#66777f);font-size:var(--ui-text-xs,.72rem);font-weight:var(--ui-weight-strong,700);letter-spacing:var(--ui-tracking-caps,.08em);text-transform:uppercase}
223
+ .gift-code-redeemer .inline-action-field-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--ui-space-2,.65rem);align-items:stretch}
224
+ .gift-code-redeemer .inline-action-field-input,.gift-code-redeemer .inline-action-field-action{min-height:var(--ui-inline-action-control-height,38px)}
225
+ .gift-code-redeemer .inline-action-field-input.code{font-family:var(--ui-font-mono,ui-monospace,monospace);font-variant-ligatures:none;letter-spacing:var(--ui-tracking-wide,.04em)}
226
+ .gift-code-redeemer .inline-action-field-input:focus-visible{outline:none;border-color:var(--ui-accent,#168c84);box-shadow:var(--ui-focus,0 0 0 3px rgb(22 140 132 / .18))}
227
+ .gift-code-redeemer .inline-action-field-action{white-space:nowrap}
228
+ .gift-code-redeemer .inline-action-field-status{display:block;min-block-size:1.4em;margin:0;color:var(--ui-text-muted,#66777f);font-size:var(--ui-text-sm,.8rem);line-height:1.4}
229
+ .gift-code-redeemer .inline-action-field-status.success{color:var(--ui-good,#1f7a52)}
230
+ .gift-code-redeemer .inline-action-field-status.error{color:var(--ui-danger,#b42318)}
231
+ @container (max-width:26rem){.gift-code-redeemer .inline-action-field-row{grid-template-columns:minmax(0,1fr)}.gift-code-redeemer .inline-action-field-action{width:100%}}
232
+ `;
215
233
  function GiftCodeRedeemer({ api, copy, id, onRedeemed }) {
216
234
  const [code, setCode] = useState3("");
217
235
  const [loading, setLoading] = useState3(false);
@@ -243,43 +261,46 @@ function GiftCodeRedeemer({ api, copy, id, onRedeemed }) {
243
261
  setLoading(false);
244
262
  }
245
263
  };
246
- return /* @__PURE__ */ jsx4(
247
- InlineActionField,
248
- {
249
- id,
250
- className: "gift-code-redeemer",
251
- label: copy.code,
252
- value: code,
253
- code: true,
254
- actionLabel: copy.redeem,
255
- loadingLabel: `${copy.redeem}\u2026`,
256
- loading,
257
- actionDisabled: !normalizedCode,
258
- message,
259
- messageTone,
260
- inputProps: {
261
- name: "giftCode",
262
- maxLength: 64,
263
- autoComplete: "one-time-code",
264
- autoCapitalize: "none",
265
- autocorrect: "off",
266
- spellcheck: false
267
- },
268
- onValueChange: (value) => {
269
- setCode(value);
270
- if (message) {
271
- setMessage("");
272
- setMessageTone("neutral");
273
- }
274
- },
275
- onAction: () => void redeem()
276
- }
277
- );
264
+ return /* @__PURE__ */ jsxs4(Fragment2, { children: [
265
+ /* @__PURE__ */ jsx4("style", { children: GIFT_CODE_REDEEMER_CSS }),
266
+ /* @__PURE__ */ jsx4(
267
+ InlineActionField,
268
+ {
269
+ id,
270
+ className: "gift-code-redeemer",
271
+ label: copy.code,
272
+ value: code,
273
+ code: true,
274
+ actionLabel: copy.redeem,
275
+ loadingLabel: `${copy.redeem}\u2026`,
276
+ loading,
277
+ actionDisabled: !normalizedCode,
278
+ message,
279
+ messageTone,
280
+ inputProps: {
281
+ name: "giftCode",
282
+ maxLength: 64,
283
+ autoComplete: "one-time-code",
284
+ autoCapitalize: "none",
285
+ autocorrect: "off",
286
+ spellcheck: false
287
+ },
288
+ onValueChange: (value) => {
289
+ setCode(value);
290
+ if (message) {
291
+ setMessage("");
292
+ setMessageTone("neutral");
293
+ }
294
+ },
295
+ onAction: () => void redeem()
296
+ }
297
+ )
298
+ ] });
278
299
  }
279
300
 
280
301
  // src/ui/payment-step.tsx
281
302
  import { useRef, useState as useState4 } from "preact/hooks";
282
- import { jsx as jsx5, jsxs as jsxs4 } from "preact/jsx-runtime";
303
+ import { jsx as jsx5, jsxs as jsxs5 } from "preact/jsx-runtime";
283
304
  var loader = null;
284
305
  function loadStripe() {
285
306
  const existing = globalThis.Stripe;
@@ -389,11 +410,11 @@ function PaymentStep(props) {
389
410
  setStatus("ready");
390
411
  }
391
412
  };
392
- return /* @__PURE__ */ jsxs4("div", { className: "join-pay", children: [
393
- /* @__PURE__ */ jsxs4("div", { className: "compliance-box", children: [
413
+ return /* @__PURE__ */ jsxs5("div", { className: "join-pay", children: [
414
+ /* @__PURE__ */ jsxs5("div", { className: "compliance-box", children: [
394
415
  merchantDisclosureText ? /* @__PURE__ */ jsx5("p", { className: "compliance-merchant", children: merchantDisclosureText }) : null,
395
416
  /* @__PURE__ */ jsx5("p", { className: "compliance-policy", children: refundPolicyText }),
396
- /* @__PURE__ */ jsxs4("label", { className: "compliance-check", children: [
417
+ /* @__PURE__ */ jsxs5("label", { className: "compliance-check", children: [
397
418
  /* @__PURE__ */ jsx5(
398
419
  "input",
399
420
  {
@@ -410,17 +431,17 @@ function PaymentStep(props) {
410
431
  status === "loading" ? /* @__PURE__ */ jsx5("p", { className: "pay-status", children: copy.preparing }) : null,
411
432
  lineItems && renderPriceLines ? renderPriceLines(lineItems) : null,
412
433
  children,
413
- simulation && (status === "ready" || status === "confirming") ? /* @__PURE__ */ jsxs4("fieldset", { className: "join-pay-simulation", children: [
434
+ simulation && (status === "ready" || status === "confirming") ? /* @__PURE__ */ jsxs5("fieldset", { className: "join-pay-simulation", children: [
414
435
  /* @__PURE__ */ jsx5("legend", { children: "Payment details" }),
415
- /* @__PURE__ */ jsxs4("label", { children: [
436
+ /* @__PURE__ */ jsxs5("label", { children: [
416
437
  "Card number",
417
438
  /* @__PURE__ */ jsx5("input", { name: "simulationCardNumber", inputMode: "numeric", autoComplete: "off", defaultValue: "4242 4242 4242 4242" })
418
439
  ] }),
419
- /* @__PURE__ */ jsxs4("label", { children: [
440
+ /* @__PURE__ */ jsxs5("label", { children: [
420
441
  "Expiration",
421
442
  /* @__PURE__ */ jsx5("input", { name: "simulationCardExpiry", inputMode: "numeric", autoComplete: "off", defaultValue: "12 / 34" })
422
443
  ] }),
423
- /* @__PURE__ */ jsxs4("label", { children: [
444
+ /* @__PURE__ */ jsxs5("label", { children: [
424
445
  "Security code",
425
446
  /* @__PURE__ */ jsx5("input", { name: "simulationCardCvc", inputMode: "numeric", autoComplete: "off", defaultValue: "123" })
426
447
  ] }),
@@ -433,7 +454,7 @@ function PaymentStep(props) {
433
454
  }
434
455
 
435
456
  // src/ui/member-gifts.tsx
436
- import { jsx as jsx6, jsxs as jsxs5 } from "preact/jsx-runtime";
457
+ import { jsx as jsx6, jsxs as jsxs6 } from "preact/jsx-runtime";
437
458
  function MemberGifts(props) {
438
459
  const [data, setData] = useState5(null);
439
460
  const [selected, setSelected] = useState5(null);
@@ -455,8 +476,8 @@ function MemberGifts(props) {
455
476
  };
456
477
  if (!data) return null;
457
478
  const offer = data.offers.find((item) => item.id === selected);
458
- return /* @__PURE__ */ jsxs5("section", { className: "member-gifts", children: [
459
- /* @__PURE__ */ jsxs5("div", { className: "card", children: [
479
+ return /* @__PURE__ */ jsxs6("section", { className: "member-gifts", children: [
480
+ /* @__PURE__ */ jsxs6("div", { className: "card", children: [
460
481
  /* @__PURE__ */ jsx6("div", { className: "card-label", children: props.copy.title }),
461
482
  /* @__PURE__ */ jsx6("p", { children: props.copy.body }),
462
483
  data.offers.length ? /* @__PURE__ */ jsx6(GiftOfferCards, { offers: data.offers, mode: "select", selectedOfferId: selected, onSelect: (id) => {
@@ -484,20 +505,20 @@ function MemberGifts(props) {
484
505
  }
485
506
  }
486
507
  ) : null,
487
- code ? /* @__PURE__ */ jsxs5("div", { className: "gift-code-once", children: [
508
+ code ? /* @__PURE__ */ jsxs6("div", { className: "gift-code-once", children: [
488
509
  /* @__PURE__ */ jsx6("output", { children: code }),
489
510
  /* @__PURE__ */ jsx6("p", { children: props.copy.saveCode })
490
511
  ] }) : null
491
512
  ] }),
492
- /* @__PURE__ */ jsxs5("div", { className: "card", children: [
513
+ /* @__PURE__ */ jsxs6("div", { className: "card", children: [
493
514
  /* @__PURE__ */ jsx6("div", { className: "card-label", children: props.copy.purchases }),
494
- data.claims.length ? data.claims.map((claim) => /* @__PURE__ */ jsxs5("div", { className: "member-row", children: [
515
+ data.claims.length ? data.claims.map((claim) => /* @__PURE__ */ jsxs6("div", { className: "member-row", children: [
495
516
  /* @__PURE__ */ jsx6("span", { children: claim.offerId }),
496
517
  /* @__PURE__ */ jsx6("span", { children: props.copy[claim.status] }),
497
518
  claim.status === "pending" ? /* @__PURE__ */ jsx6("button", { className: "btn secondary mini", onClick: () => void rotate(claim.id), children: props.copy.rotate }) : null
498
519
  ] }, claim.id)) : /* @__PURE__ */ jsx6("p", { children: props.copy.noPurchases })
499
520
  ] }),
500
- /* @__PURE__ */ jsxs5("div", { className: "card", children: [
521
+ /* @__PURE__ */ jsxs6("div", { className: "card", children: [
501
522
  /* @__PURE__ */ jsx6("div", { className: "card-label", children: props.copy.redeemTitle }),
502
523
  /* @__PURE__ */ jsx6(GiftCodeRedeemer, { api: props.api, copy: props.copy, onRedeemed: load }),
503
524
  message ? /* @__PURE__ */ jsx6("p", { role: "status", children: message }) : null
@@ -508,7 +529,7 @@ function MemberGifts(props) {
508
529
  // src/ui/member-content.tsx
509
530
  import { useEffect as useEffect2, useMemo as useMemo2, useState as useState6 } from "preact/hooks";
510
531
  import { Markdown } from "@odla-ai/ui/components";
511
- import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs6 } from "preact/jsx-runtime";
532
+ import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs7 } from "preact/jsx-runtime";
512
533
  var pageLabel = (page) => `${page.title}${page.access === "locked" ? " \xB7 Locked" : ""}`;
513
534
  function MemberContentArea(props) {
514
535
  const {
@@ -546,16 +567,16 @@ function MemberContentArea(props) {
546
567
  }
547
568
  return [...result.entries()];
548
569
  }, [data]);
549
- if (error) return /* @__PURE__ */ jsxs6("p", { className: "meeting-note", role: "alert", children: [
570
+ if (error) return /* @__PURE__ */ jsxs7("p", { className: "meeting-note", role: "alert", children: [
550
571
  "Member pages could not be loaded: ",
551
572
  error
552
573
  ] });
553
- if (!data) return /* @__PURE__ */ jsx7(Fragment2, { children: loadingContent });
554
- if (data.pages.length === 0) return /* @__PURE__ */ jsx7(Fragment2, { children: emptyContent });
574
+ if (!data) return /* @__PURE__ */ jsx7(Fragment3, { children: loadingContent });
575
+ if (data.pages.length === 0) return /* @__PURE__ */ jsx7(Fragment3, { children: emptyContent });
555
576
  const selected = data.pages.find((page) => page.id === selectedId) ?? data.pages[0];
556
577
  const href = selected.upsell && upsellHref ? upsellHref(selected.upsell.tierId, selected) : void 0;
557
- return /* @__PURE__ */ jsxs6("div", { className: "chapter-member-content", "data-member-content": true, children: [
558
- /* @__PURE__ */ jsx7("nav", { className: "chapter-member-content-nav", "aria-label": "Member pages", children: sections.map(([section, pages]) => /* @__PURE__ */ jsxs6("section", { className: "chapter-member-content-section", children: [
578
+ return /* @__PURE__ */ jsxs7("div", { className: "chapter-member-content", "data-member-content": true, children: [
579
+ /* @__PURE__ */ jsx7("nav", { className: "chapter-member-content-nav", "aria-label": "Member pages", children: sections.map(([section, pages]) => /* @__PURE__ */ jsxs7("section", { className: "chapter-member-content-section", children: [
559
580
  /* @__PURE__ */ jsx7("h2", { children: section }),
560
581
  /* @__PURE__ */ jsx7("ul", { children: pages.map((page) => /* @__PURE__ */ jsx7("li", { "data-parent-page": page.navigation.parentId ?? void 0, children: /* @__PURE__ */ jsx7(
561
582
  "button",
@@ -567,9 +588,9 @@ function MemberContentArea(props) {
567
588
  }
568
589
  ) }, page.id)) })
569
590
  ] }, section)) }),
570
- /* @__PURE__ */ jsxs6("article", { className: "chapter-member-content-page", "data-access": selected.access, children: [
571
- /* @__PURE__ */ jsxs6("header", { children: [
572
- /* @__PURE__ */ jsxs6("div", { className: "card-label", children: [
591
+ /* @__PURE__ */ jsxs7("article", { className: "chapter-member-content-page", "data-access": selected.access, children: [
592
+ /* @__PURE__ */ jsxs7("header", { children: [
593
+ /* @__PURE__ */ jsxs7("div", { className: "card-label", children: [
573
594
  selected.source.type === "parent" ? "Parent" : "Chapter",
574
595
  " \xB7 ",
575
596
  selected.access
@@ -577,9 +598,9 @@ function MemberContentArea(props) {
577
598
  /* @__PURE__ */ jsx7("h1", { children: selected.title }),
578
599
  selected.summary ? /* @__PURE__ */ jsx7("p", { children: selected.summary }) : null
579
600
  ] }),
580
- selected.access === "allowed" && selected.bodyMarkdown ? /* @__PURE__ */ jsx7(Markdown, { source: selected.bodyMarkdown }) : /* @__PURE__ */ jsxs6("div", { className: "chapter-member-content-locked", children: [
601
+ selected.access === "allowed" && selected.bodyMarkdown ? /* @__PURE__ */ jsx7(Markdown, { source: selected.bodyMarkdown }) : /* @__PURE__ */ jsxs7("div", { className: "chapter-member-content-locked", children: [
581
602
  selected.teaserMarkdown ? /* @__PURE__ */ jsx7(Markdown, { source: selected.teaserMarkdown }) : /* @__PURE__ */ jsx7("p", { children: "This page is not included in your current membership." }),
582
- selected.upsell ? /* @__PURE__ */ jsxs6("aside", { className: "chapter-member-content-upsell", "aria-label": selected.upsell.label ?? "Membership option", children: [
603
+ selected.upsell ? /* @__PURE__ */ jsxs7("aside", { className: "chapter-member-content-upsell", "aria-label": selected.upsell.label ?? "Membership option", children: [
583
604
  /* @__PURE__ */ jsx7("h2", { children: selected.upsell.label ?? selected.upsell.tierName }),
584
605
  /* @__PURE__ */ jsx7("p", { children: fmtMoney(selected.upsell.priceCents) }),
585
606
  selected.upsell.bodyMarkdown ? /* @__PURE__ */ jsx7(Markdown, { source: selected.upsell.bodyMarkdown }) : null,
@@ -591,11 +612,11 @@ function MemberContentArea(props) {
591
612
  }
592
613
 
593
614
  // src/ui/members.tsx
594
- import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs7 } from "preact/jsx-runtime";
615
+ import { Fragment as Fragment4, jsx as jsx8, jsxs as jsxs8 } from "preact/jsx-runtime";
595
616
  function card(copy, kicker, body) {
596
- return /* @__PURE__ */ jsxs7("div", { className: "card", children: [
617
+ return /* @__PURE__ */ jsxs8("div", { className: "card", children: [
597
618
  /* @__PURE__ */ jsx8("div", { className: "card-label", children: copy.provisional.cardLabel }),
598
- /* @__PURE__ */ jsxs7("div", { className: "meeting-block", children: [
619
+ /* @__PURE__ */ jsxs8("div", { className: "meeting-block", children: [
599
620
  /* @__PURE__ */ jsx8("div", { className: "meeting-kicker", children: kicker }),
600
621
  body
601
622
  ] })
@@ -607,7 +628,7 @@ function ProvisionalCard(props) {
607
628
  return card(
608
629
  copy,
609
630
  copy.provisional.applicationNeeded,
610
- /* @__PURE__ */ jsxs7(Fragment3, { children: [
631
+ /* @__PURE__ */ jsxs8(Fragment4, { children: [
611
632
  /* @__PURE__ */ jsx8("div", { className: "meeting-note", children: copy.provisional.applicationNeededBody }),
612
633
  /* @__PURE__ */ jsx8("a", { className: "apply-link", href: applyHref, children: copy.provisional.apply })
613
634
  ] })
@@ -625,7 +646,7 @@ function ProvisionalCard(props) {
625
646
  return card(
626
647
  copy,
627
648
  copy.provisional.introductionCall,
628
- /* @__PURE__ */ jsxs7(Fragment3, { children: [
649
+ /* @__PURE__ */ jsxs8(Fragment4, { children: [
629
650
  /* @__PURE__ */ jsx8("div", { className: "meeting-date", children: fullLabel(application.meetingAt, application.timezone) }),
630
651
  /* @__PURE__ */ jsx8("div", { className: "meeting-note", children: copy.provisional.calendarInvite }),
631
652
  application.meetUrl ? /* @__PURE__ */ jsx8("div", { className: "meeting-note", children: /* @__PURE__ */ jsx8("a", { href: application.meetUrl, target: "_blank", rel: "noopener", children: copy.provisional.joinCall }) }) : null,
@@ -646,7 +667,7 @@ function ProvisionalCard(props) {
646
667
  return card(
647
668
  copy,
648
669
  copy.provisional.bookCall,
649
- /* @__PURE__ */ jsxs7(Fragment3, { children: [
670
+ /* @__PURE__ */ jsxs8(Fragment4, { children: [
650
671
  /* @__PURE__ */ jsx8("div", { className: "meeting-note", children: copy.provisional.bookCallBody }),
651
672
  /* @__PURE__ */ jsx8(
652
673
  Rescheduler,
@@ -690,13 +711,13 @@ function MembersArea(props) {
690
711
  if (error) return /* @__PURE__ */ jsx8("p", { className: "meeting-note", children: copy.loadFailed });
691
712
  if (!me) return /* @__PURE__ */ jsx8("p", { className: "meeting-note", children: inheritedCopy.common.loading });
692
713
  const role = me.role || "provisional";
693
- return /* @__PURE__ */ jsxs7(Fragment3, { children: [
694
- /* @__PURE__ */ jsxs7("div", { className: "card", children: [
695
- /* @__PURE__ */ jsxs7("div", { className: "member-row", children: [
714
+ return /* @__PURE__ */ jsxs8(Fragment4, { children: [
715
+ /* @__PURE__ */ jsxs8("div", { className: "card", children: [
716
+ /* @__PURE__ */ jsxs8("div", { className: "member-row", children: [
696
717
  /* @__PURE__ */ jsx8("span", { className: "member-email", children: me.email }),
697
718
  /* @__PURE__ */ jsx8("span", { className: "role-badge " + role, children: role })
698
719
  ] }),
699
- /* @__PURE__ */ jsxs7("div", { className: "account-actions", children: [
720
+ /* @__PURE__ */ jsxs8("div", { className: "account-actions", children: [
700
721
  /* @__PURE__ */ jsx8("button", { className: "btn secondary mini", onClick: signOut, children: copy.account.signOut }),
701
722
  role === "admin" ? /* @__PURE__ */ jsx8("a", { className: "admin-console-link", href: adminHref, children: copy.account.adminConsole }) : null
702
723
  ] })
@@ -735,7 +756,7 @@ import { useEffect as useEffect5, useRef as useRef3, useState as useState11 } fr
735
756
 
736
757
  // src/ui/join-booking.tsx
737
758
  import { useEffect as useEffect4, useState as useState8 } from "preact/hooks";
738
- import { jsx as jsx9, jsxs as jsxs8 } from "preact/jsx-runtime";
759
+ import { jsx as jsx9, jsxs as jsxs9 } from "preact/jsx-runtime";
739
760
  function JoinBooking(props) {
740
761
  const { applicationId, copy, onBooked, simulation } = props;
741
762
  const [state, setState] = useState8(null);
@@ -799,7 +820,7 @@ function JoinBooking(props) {
799
820
  }
800
821
  };
801
822
  if (!state) return /* @__PURE__ */ jsx9("p", { className: "slots-status", children: msg ?? copy.loading });
802
- return /* @__PURE__ */ jsxs8("div", { className: "join-book", children: [
823
+ return /* @__PURE__ */ jsxs9("div", { className: "join-book", children: [
803
824
  /* @__PURE__ */ jsx9(
804
825
  SlotPicker,
805
826
  {
@@ -810,7 +831,7 @@ function JoinBooking(props) {
810
831
  onDayChange: () => setSelected(null)
811
832
  }
812
833
  ),
813
- /* @__PURE__ */ jsxs8("div", { className: "slot-confirm", hidden: !selected, children: [
834
+ /* @__PURE__ */ jsxs9("div", { className: "slot-confirm", hidden: !selected, children: [
814
835
  /* @__PURE__ */ jsx9("button", { className: "submit-btn", disabled: busy, onClick: () => void book(), children: busy ? copy.booking : copy.book }),
815
836
  msg ? /* @__PURE__ */ jsx9("p", { className: "step2-note", children: msg }) : null
816
837
  ] })
@@ -818,9 +839,9 @@ function JoinBooking(props) {
818
839
  }
819
840
 
820
841
  // src/ui/join-accepted.tsx
821
- import { jsx as jsx10, jsxs as jsxs9 } from "preact/jsx-runtime";
842
+ import { jsx as jsx10, jsxs as jsxs10 } from "preact/jsx-runtime";
822
843
  function JoinAccepted(props) {
823
- return /* @__PURE__ */ jsxs9("div", { className: "join-done card", children: [
844
+ return /* @__PURE__ */ jsxs10("div", { className: "join-done card", children: [
824
845
  /* @__PURE__ */ jsx10("div", { className: "card-label", children: props.copy.accepted.label }),
825
846
  /* @__PURE__ */ jsx10("p", { className: "meeting-note", children: props.copy.accepted.body }),
826
847
  /* @__PURE__ */ jsx10("a", { className: "apply-link", href: props.membersHref, children: props.copy.done.memberArea })
@@ -829,7 +850,7 @@ function JoinAccepted(props) {
829
850
 
830
851
  // src/ui/gift-claim-card.tsx
831
852
  import { useState as useState9 } from "preact/hooks";
832
- import { Fragment as Fragment4, jsx as jsx11, jsxs as jsxs10 } from "preact/jsx-runtime";
853
+ import { Fragment as Fragment5, jsx as jsx11, jsxs as jsxs11 } from "preact/jsx-runtime";
833
854
  function GiftClaimCard(props) {
834
855
  const [code, setCode] = useState9(props.initialCode ?? "");
835
856
  const [error, setError] = useState9(false);
@@ -845,10 +866,10 @@ function GiftClaimCard(props) {
845
866
  if (response.ok && body.code) setCode(body.code);
846
867
  else setError(true);
847
868
  };
848
- return /* @__PURE__ */ jsxs10("div", { className: "join-done card", children: [
869
+ return /* @__PURE__ */ jsxs11("div", { className: "join-done card", children: [
849
870
  /* @__PURE__ */ jsx11("div", { className: "card-label", children: props.copy.label }),
850
871
  /* @__PURE__ */ jsx11("p", { className: "meeting-note", children: props.copy.body }),
851
- code ? /* @__PURE__ */ jsxs10(Fragment4, { children: [
872
+ code ? /* @__PURE__ */ jsxs11(Fragment5, { children: [
852
873
  /* @__PURE__ */ jsx11("output", { className: "gift-code", children: code }),
853
874
  /* @__PURE__ */ jsx11("p", { children: props.copy.save })
854
875
  ] }) : null,
@@ -859,7 +880,7 @@ function GiftClaimCard(props) {
859
880
 
860
881
  // src/ui/join-tiers.tsx
861
882
  import { useState as useState10 } from "preact/hooks";
862
- import { jsx as jsx12, jsxs as jsxs11 } from "preact/jsx-runtime";
883
+ import { jsx as jsx12, jsxs as jsxs12 } from "preact/jsx-runtime";
863
884
  function useTierSelection(tiers, initialTierId) {
864
885
  const [selectedTierId, setSelectedTierId] = useState10(() => {
865
886
  const preset = tiers.find((tier) => tier.id === initialTierId);
@@ -876,9 +897,9 @@ function useTierSelection(tiers, initialTierId) {
876
897
  };
877
898
  }
878
899
  function TierPlaceholder(context) {
879
- return /* @__PURE__ */ jsxs11("fieldset", { "data-chapter-placeholder": "tiers", children: [
900
+ return /* @__PURE__ */ jsxs12("fieldset", { "data-chapter-placeholder": "tiers", children: [
880
901
  /* @__PURE__ */ jsx12("legend", { children: "Membership (placeholder \u2014 pass renderTiers to style this)" }),
881
- context.tiers.map((tier) => /* @__PURE__ */ jsxs11("label", { children: [
902
+ context.tiers.map((tier) => /* @__PURE__ */ jsxs12("label", { children: [
882
903
  /* @__PURE__ */ jsx12(
883
904
  "input",
884
905
  {
@@ -911,7 +932,7 @@ async function loadJoinResume(applicationId, fetcher = fetch) {
911
932
  }
912
933
 
913
934
  // src/ui/join.tsx
914
- import { Fragment as Fragment5, jsx as jsx13, jsxs as jsxs12 } from "preact/jsx-runtime";
935
+ import { Fragment as Fragment6, jsx as jsx13, jsxs as jsxs13 } from "preact/jsx-runtime";
915
936
  function JoinIsland(props) {
916
937
  const inheritedCopy = useChapterCopy();
917
938
  const {
@@ -1031,33 +1052,33 @@ function JoinIsland(props) {
1031
1052
  ..."applicationId" in state ? { applicationId: state.applicationId } : {}
1032
1053
  });
1033
1054
  if (state.step === "done") {
1034
- const body = renderDone?.({ ...state, membersHref }) ?? /* @__PURE__ */ jsxs12("div", { className: "join-done card", children: [
1055
+ const body = renderDone?.({ ...state, membersHref }) ?? /* @__PURE__ */ jsxs13("div", { className: "join-done card", children: [
1035
1056
  /* @__PURE__ */ jsx13("div", { className: "card-label", children: copy.done.label }),
1036
1057
  /* @__PURE__ */ jsx13("p", { className: "meeting-date", children: fullLabel(state.booked.startAt, state.booked.timezone) }),
1037
1058
  /* @__PURE__ */ jsx13("p", { className: "meeting-note", children: copy.done.calendarInvite }),
1038
1059
  /* @__PURE__ */ jsx13("a", { className: "apply-link", href: membersHref, children: copy.done.memberArea })
1039
1060
  ] });
1040
- return /* @__PURE__ */ jsxs12(Fragment5, { children: [
1061
+ return /* @__PURE__ */ jsxs13(Fragment6, { children: [
1041
1062
  header,
1042
1063
  body
1043
1064
  ] });
1044
1065
  }
1045
1066
  if (state.step === "accepted") {
1046
1067
  const body = renderAccepted?.({ ...state, membersHref }) ?? /* @__PURE__ */ jsx13(JoinAccepted, { copy, membersHref });
1047
- return /* @__PURE__ */ jsxs12(Fragment5, { children: [
1068
+ return /* @__PURE__ */ jsxs13(Fragment6, { children: [
1048
1069
  header,
1049
1070
  body
1050
1071
  ] });
1051
1072
  }
1052
1073
  if (state.step === "gift") {
1053
1074
  const body = renderGift?.(state) ?? /* @__PURE__ */ jsx13(GiftClaimCard, { applicationId: state.applicationId, claimId: state.claimId, initialCode: state.code, copy: copy.gift });
1054
- return /* @__PURE__ */ jsxs12(Fragment5, { children: [
1075
+ return /* @__PURE__ */ jsxs13(Fragment6, { children: [
1055
1076
  header,
1056
1077
  body
1057
1078
  ] });
1058
1079
  }
1059
1080
  if (state.step === "booking") {
1060
- return /* @__PURE__ */ jsxs12(Fragment5, { children: [
1081
+ return /* @__PURE__ */ jsxs13(Fragment6, { children: [
1061
1082
  header,
1062
1083
  /* @__PURE__ */ jsx13(
1063
1084
  JoinBooking,
@@ -1073,7 +1094,7 @@ function JoinIsland(props) {
1073
1094
  ] });
1074
1095
  }
1075
1096
  if (state.step === "payment") {
1076
- return /* @__PURE__ */ jsxs12(Fragment5, { children: [
1097
+ return /* @__PURE__ */ jsxs13(Fragment6, { children: [
1077
1098
  header,
1078
1099
  /* @__PURE__ */ jsx13(
1079
1100
  PaymentStep,
@@ -1103,17 +1124,17 @@ function JoinIsland(props) {
1103
1124
  ] });
1104
1125
  }
1105
1126
  if (state.step === "paymentPending") {
1106
- return /* @__PURE__ */ jsxs12(Fragment5, { children: [
1127
+ return /* @__PURE__ */ jsxs13(Fragment6, { children: [
1107
1128
  header,
1108
1129
  /* @__PURE__ */ jsx13("p", { className: "pay-status", role: "status", children: copy.payment.pending })
1109
1130
  ] });
1110
1131
  }
1111
1132
  const submitDisabled = submitting || props.submitDisabled === true;
1112
1133
  const tierChooser = tiers.length > 1 ? props.renderTiers?.(tierSelection) ?? TierPlaceholder(tierSelection) : null;
1113
- return /* @__PURE__ */ jsxs12(Fragment5, { children: [
1134
+ return /* @__PURE__ */ jsxs13(Fragment6, { children: [
1114
1135
  header,
1115
- /* @__PURE__ */ jsxs12("form", { className: "join-form", onSubmit: (e) => void submit(e), children: [
1116
- (config.giftOffers?.length ?? 0) > 0 ? /* @__PURE__ */ jsxs12("fieldset", { children: [
1136
+ /* @__PURE__ */ jsxs13("form", { className: "join-form", onSubmit: (e) => void submit(e), children: [
1137
+ (config.giftOffers?.length ?? 0) > 0 ? /* @__PURE__ */ jsxs13("fieldset", { children: [
1117
1138
  /* @__PURE__ */ jsx13("legend", { children: copy.gift.optionsLabel }),
1118
1139
  /* @__PURE__ */ jsx13("button", { type: "button", className: "btn secondary", "aria-pressed": !giftOfferId, onClick: () => setGiftOfferId(null), children: copy.gift.chooseSelf }),
1119
1140
  /* @__PURE__ */ jsx13(GiftOfferCards, { offers: config.giftOffers ?? [], mode: "select", selectedOfferId: giftOfferId, onSelect: setGiftOfferId })
@@ -1298,7 +1319,7 @@ function membershipPageDocument(input, options = {}) {
1298
1319
  }
1299
1320
 
1300
1321
  // src/ui/membership-cards.tsx
1301
- import { jsx as jsx14, jsxs as jsxs13 } from "preact/jsx-runtime";
1322
+ import { jsx as jsx14, jsxs as jsxs14 } from "preact/jsx-runtime";
1302
1323
  var MEMBERSHIP_CARD_TOKEN_DEFAULTS = Object.freeze({
1303
1324
  "--ui-membership-grid-gap": "1.4rem",
1304
1325
  "--ui-membership-card-padding": "2rem 1.7rem 1.8rem",
@@ -1367,18 +1388,18 @@ function membershipApplicationHref(applicationPath, tierId) {
1367
1388
  }
1368
1389
  function TierAction(props) {
1369
1390
  if (props.mode === "select") {
1370
- return /* @__PURE__ */ jsxs13("button", { type: "button", className: "chapter-membership-action", "aria-current": props.selected ? "true" : void 0, onClick: () => props.onSelectTier?.(props.tierId), children: [
1391
+ return /* @__PURE__ */ jsxs14("button", { type: "button", className: "chapter-membership-action", "aria-current": props.selected ? "true" : void 0, onClick: () => props.onSelectTier?.(props.tierId), children: [
1371
1392
  props.label,
1372
1393
  /* @__PURE__ */ jsx14("span", { "aria-hidden": "true", children: "\u2192" })
1373
1394
  ] });
1374
1395
  }
1375
1396
  if (props.mode === "preview") {
1376
- return /* @__PURE__ */ jsxs13("span", { className: "chapter-membership-action", "aria-disabled": "true", children: [
1397
+ return /* @__PURE__ */ jsxs14("span", { className: "chapter-membership-action", "aria-disabled": "true", children: [
1377
1398
  props.label,
1378
1399
  /* @__PURE__ */ jsx14("span", { "aria-hidden": "true", children: "\u2192" })
1379
1400
  ] });
1380
1401
  }
1381
- return /* @__PURE__ */ jsxs13("a", { className: "chapter-membership-action", href: membershipApplicationHref(props.applicationPath, props.tierId), children: [
1402
+ return /* @__PURE__ */ jsxs14("a", { className: "chapter-membership-action", href: membershipApplicationHref(props.applicationPath, props.tierId), children: [
1382
1403
  props.label,
1383
1404
  /* @__PURE__ */ jsx14("span", { "aria-hidden": "true", children: "\u2192" })
1384
1405
  ] });
@@ -1387,17 +1408,17 @@ function TierCard(props) {
1387
1408
  const { tier, presentation } = props;
1388
1409
  const summary = presentation.summaryMarkdown ?? tier.blurb;
1389
1410
  const action = presentation.ctaLabel ?? (tier.free ? "Join for free" : `Choose ${tier.name}`);
1390
- return /* @__PURE__ */ jsxs13("article", { className: "chapter-membership-card", "data-tier-id": tier.id, "data-variant": presentation.variant ?? "standard", children: [
1411
+ return /* @__PURE__ */ jsxs14("article", { className: "chapter-membership-card", "data-tier-id": tier.id, "data-variant": presentation.variant ?? "standard", children: [
1391
1412
  presentation.badge ? /* @__PURE__ */ jsx14("div", { className: "chapter-membership-badge", children: presentation.badge }) : null,
1392
1413
  /* @__PURE__ */ jsx14("h3", { className: "chapter-membership-name", children: tier.name }),
1393
- /* @__PURE__ */ jsxs13("div", { className: "chapter-membership-offer", "data-with-capacity": presentation.capacity ? "true" : void 0, children: [
1394
- presentation.capacity ? /* @__PURE__ */ jsxs13("div", { className: "chapter-membership-capacity", "aria-label": `${presentation.capacity.total} ${presentation.capacity.label ?? "available"}`, children: [
1414
+ /* @__PURE__ */ jsxs14("div", { className: "chapter-membership-offer", "data-with-capacity": presentation.capacity ? "true" : void 0, children: [
1415
+ presentation.capacity ? /* @__PURE__ */ jsxs14("div", { className: "chapter-membership-capacity", "aria-label": `${presentation.capacity.total} ${presentation.capacity.label ?? "available"}`, children: [
1395
1416
  /* @__PURE__ */ jsx14("strong", { children: presentation.capacity.total.toLocaleString("en-US") }),
1396
1417
  /* @__PURE__ */ jsx14("small", { children: presentation.capacity.label ?? "available" })
1397
1418
  ] }) : null,
1398
- /* @__PURE__ */ jsxs13("div", { className: "chapter-membership-price-stack", children: [
1419
+ /* @__PURE__ */ jsxs14("div", { className: "chapter-membership-price-stack", children: [
1399
1420
  presentation.priceEyebrow ? /* @__PURE__ */ jsx14("p", { className: "chapter-membership-price-eyebrow", children: presentation.priceEyebrow }) : null,
1400
- /* @__PURE__ */ jsxs13("div", { className: "chapter-membership-price-row", children: [
1421
+ /* @__PURE__ */ jsxs14("div", { className: "chapter-membership-price-row", children: [
1401
1422
  presentation.compareAtPriceCents !== void 0 ? /* @__PURE__ */ jsx14("span", { className: "chapter-membership-compare", children: fmtMoney(presentation.compareAtPriceCents) }) : null,
1402
1423
  /* @__PURE__ */ jsx14("span", { className: "chapter-membership-price", children: tier.free ? "Free" : fmtMoney(tier.priceCents) }),
1403
1424
  !tier.free && presentation.billingLabel ? /* @__PURE__ */ jsx14("span", { className: "chapter-membership-billing", children: presentation.billingLabel }) : null
@@ -1406,11 +1427,11 @@ function TierCard(props) {
1406
1427
  ] }),
1407
1428
  presentation.priceNoteMarkdown ? /* @__PURE__ */ jsx14(Markdown2, { className: "chapter-membership-price-note", source: presentation.priceNoteMarkdown }) : null,
1408
1429
  summary ? /* @__PURE__ */ jsx14(Markdown2, { className: "chapter-membership-summary", source: summary }) : null,
1409
- presentation.benefits?.length ? /* @__PURE__ */ jsx14("ul", { className: "chapter-membership-benefits", children: presentation.benefits.map((benefit, index) => /* @__PURE__ */ jsxs13("li", { children: [
1430
+ presentation.benefits?.length ? /* @__PURE__ */ jsx14("ul", { className: "chapter-membership-benefits", children: presentation.benefits.map((benefit, index) => /* @__PURE__ */ jsxs14("li", { children: [
1410
1431
  /* @__PURE__ */ jsx14("span", { className: "chapter-membership-check", "aria-hidden": "true", children: "\u2713" }),
1411
1432
  /* @__PURE__ */ jsx14(Markdown2, { className: "chapter-membership-benefit", source: benefit })
1412
1433
  ] }, `${tier.id}-benefit-${index}`)) }) : null,
1413
- presentation.callout ? /* @__PURE__ */ jsxs13("aside", { className: "chapter-membership-callout", children: [
1434
+ presentation.callout ? /* @__PURE__ */ jsxs14("aside", { className: "chapter-membership-callout", children: [
1414
1435
  presentation.callout.label ? /* @__PURE__ */ jsx14("p", { className: "chapter-membership-callout-label", children: presentation.callout.label }) : null,
1415
1436
  /* @__PURE__ */ jsx14(Markdown2, { source: presentation.callout.bodyMarkdown })
1416
1437
  ] }) : null,
@@ -1421,7 +1442,7 @@ function MembershipCards(props) {
1421
1442
  const document2 = membershipPageDocument(props.document, { tiers: props.tiers });
1422
1443
  const byId = new Map(props.tiers.map((tier) => [tier.id, tier]));
1423
1444
  const mode = props.mode ?? "link";
1424
- return /* @__PURE__ */ jsxs13("section", { className: ["chapter-membership", props.className].filter(Boolean).join(" "), "data-chapter-membership": MEMBERSHIP_PAGE_RENDERER, "aria-label": props.ariaLabel ?? "Membership options", children: [
1445
+ return /* @__PURE__ */ jsxs14("section", { className: ["chapter-membership", props.className].filter(Boolean).join(" "), "data-chapter-membership": MEMBERSHIP_PAGE_RENDERER, "aria-label": props.ariaLabel ?? "Membership options", children: [
1425
1446
  /* @__PURE__ */ jsx14("style", { children: MEMBERSHIP_CARDS_CSS }),
1426
1447
  /* @__PURE__ */ jsx14("div", { className: "chapter-membership-grid", style: { "--chapter-membership-columns": String(Math.min(document2.tiers.length, 3)) }, children: document2.tiers.map((presentation) => {
1427
1448
  const tier = byId.get(presentation.tierId);
@@ -1457,4 +1478,4 @@ export {
1457
1478
  membershipApplicationHref,
1458
1479
  MembershipCards
1459
1480
  };
1460
- //# sourceMappingURL=chunk-JLLRZO7B.js.map
1481
+ //# sourceMappingURL=chunk-PCRYLPMQ.js.map