@riverbankcms/sdk 0.85.0 → 0.88.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/{PreviewEditorSidebar-4PH35ZIE.mjs → PreviewEditorSidebar-EVRS3C7T.mjs} +3 -3
  2. package/dist/{PreviewEditorUI-WHMCRJGM.mjs → PreviewEditorUI-54WD4IGE.mjs} +3 -3
  3. package/dist/SdkPreviewModeRuntime-ZALZDJEK.mjs +8 -0
  4. package/dist/_dts/api/src/endpoints.d.ts +58 -14
  5. package/dist/_dts/api/src/index.d.ts +3 -0
  6. package/dist/_dts/api/src/launchReadiness.d.ts +3 -3
  7. package/dist/_dts/api/src/mailchimpIntegration.d.ts +215 -0
  8. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +35 -15
  9. package/dist/_dts/api/src/siteInfrastructure.d.ts +0 -14
  10. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -13
  11. package/dist/_dts/api/src/types.d.ts +6 -3
  12. package/dist/_dts/blocks/src/PageRenderer.d.ts +1 -0
  13. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -0
  14. package/dist/_dts/blocks/src/index.d.ts +2 -1
  15. package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +288 -288
  16. package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +288 -288
  17. package/dist/_dts/blocks/src/system/blocks/cart.d.ts +288 -288
  18. package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +288 -288
  19. package/dist/_dts/blocks/src/system/blocks/collection.d.ts +288 -288
  20. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +42 -0
  21. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -0
  22. package/dist/_dts/blocks/src/system/blocks/faq.d.ts +288 -288
  23. package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +288 -288
  24. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +1 -1
  25. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +42 -42
  26. package/dist/_dts/blocks/src/system/blocks/newsletter-signup-destination.d.ts +300 -0
  27. package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +63 -3
  28. package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +288 -288
  29. package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +288 -288
  30. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +288 -288
  31. package/dist/_dts/blocks/src/system/fragments/library/newsletterForm.d.ts +53 -1
  32. package/dist/_dts/blocks/src/system/manifest/richTextSchema.d.ts +27 -0
  33. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +23 -23
  34. package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +10 -2
  35. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +24 -0
  36. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +12 -0
  37. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +1 -0
  38. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +4 -0
  39. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +1 -1
  40. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +11 -1
  41. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +15 -0
  42. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.server.d.ts +1 -1
  43. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.submission.d.ts +32 -0
  44. package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +5 -1
  45. package/dist/_dts/blocks/src/system/runtime/shared/components/ModalShell.d.ts +5 -1
  46. package/dist/_dts/blocks/src/system/runtime/shared/utils/formatting.d.ts +1 -1
  47. package/dist/_dts/content-model/src/referenceFields.d.ts +1 -1
  48. package/dist/_dts/core/src/currency-format.d.ts +37 -2
  49. package/dist/_dts/core/src/event-pricing.d.ts +24 -0
  50. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +549 -18
  51. package/dist/_dts/editor-blocks/src/widgets/reference/loaders.d.ts +3 -1
  52. package/dist/_dts/sdk/src/client/types.d.ts +9 -0
  53. package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
  54. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +3 -0
  55. package/dist/_dts/sdk/src/data/prefetchBlockData.d.ts +3 -9
  56. package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +1 -1
  57. package/dist/_dts/sdk/src/manifest/three-pass-converter.d.ts +7 -18
  58. package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
  59. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -1
  60. package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +7 -3
  61. package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +4 -24
  62. package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +45 -0
  63. package/dist/_dts/sdk/src/version.d.ts +1 -1
  64. package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
  65. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +9 -9
  66. package/dist/_dts/theme-core/src/schema.d.ts +11 -11
  67. package/dist/{chunk-ZR2GQK2A.mjs → chunk-7KOO7RPP.mjs} +953 -315
  68. package/dist/{chunk-OCGTXHSO.mjs → chunk-ER4UIW4X.mjs} +7 -7
  69. package/dist/{chunk-WFPYN7KA.mjs → chunk-HVOBXA3Y.mjs} +2 -2
  70. package/dist/{chunk-NFWGLRZZ.mjs → chunk-K3JWH6HE.mjs} +37 -3
  71. package/dist/{chunk-4QNLOTES.mjs → chunk-O4LVYUVH.mjs} +58 -14
  72. package/dist/{chunk-PYDHOMEO.mjs → chunk-YDMBIIS5.mjs} +1 -1
  73. package/dist/cli/index.mjs +408 -109
  74. package/dist/client/{accordion-2UZPBMYM.mjs → accordion-PT5CGW5N.mjs} +2 -2
  75. package/dist/client/{bookingForm-36CWQUMV.mjs → bookingForm-2HLRTEYS.mjs} +7 -7
  76. package/dist/client/bookings.mjs +51 -6
  77. package/dist/client/{carousel-QH77HR6X.mjs → carousel-Z2LKYSWA.mjs} +3 -3
  78. package/dist/client/cart-ND5IK4A6.mjs +18 -0
  79. package/dist/client/checkout-EYUSGAY7.mjs +18 -0
  80. package/dist/client/{chunk-SYIJ5JO2.mjs → chunk-6DVPO44G.mjs} +1 -1
  81. package/dist/client/{chunk-3C2VTPWI.mjs → chunk-BAWHZ5GM.mjs} +176 -13
  82. package/dist/client/{chunk-52CGCQ7B.mjs → chunk-BL66UWGD.mjs} +10 -80
  83. package/dist/client/{chunk-VGDBVNOO.mjs → chunk-DIRW2LNG.mjs} +241 -210
  84. package/dist/client/{chunk-UDNSI5PY.mjs → chunk-GOFO7HRH.mjs} +1 -2
  85. package/dist/client/{chunk-ZKUO52W3.mjs → chunk-H4MHEXYS.mjs} +1 -1
  86. package/dist/client/{chunk-ZE5G642V.mjs → chunk-LI2C6M5O.mjs} +75 -1
  87. package/dist/client/{chunk-3DTWLTXM.mjs → chunk-MHBEWDT7.mjs} +117 -3
  88. package/dist/client/{chunk-4OXKTA3D.mjs → chunk-O5JNI3E4.mjs} +2 -2
  89. package/dist/client/{chunk-XSV6KW4D.mjs → chunk-S4G65LGR.mjs} +1 -1
  90. package/dist/client/{chunk-DVNUDUVT.mjs → chunk-WBQG7VJA.mjs} +4 -1
  91. package/dist/client/{chunk-F5VRX5Y6.mjs → chunk-WCVK4MBJ.mjs} +1 -1
  92. package/dist/client/{chunk-7UCLJ5SP.mjs → chunk-X7GVFB7Y.mjs} +4 -7
  93. package/dist/client/client.mjs +2125 -1403
  94. package/dist/client/{courseRegistration-TMKU6ABO.mjs → courseRegistration-H3AZBUEG.mjs} +7 -7
  95. package/dist/client/{eventCalendar-G6TI32X6.mjs → eventCalendar-FPKJGLGS.mjs} +10 -11
  96. package/dist/client/{eventCombined-SCKEMNAR.mjs → eventCombined-QCGIZBUY.mjs} +10 -11
  97. package/dist/client/{eventDetails-XPIFXXPK.mjs → eventDetails-HIT3BJWU.mjs} +10 -11
  98. package/dist/client/{eventListing-7QFMEMGT.mjs → eventListing-R4HNWJDN.mjs} +10 -11
  99. package/dist/client/{eventRegistration-TOODSZUI.mjs → eventRegistration-Q7BYY5HF.mjs} +10 -11
  100. package/dist/client/{form-MTCMVCZT.mjs → form-NI6YOG6S.mjs} +3 -3
  101. package/dist/client/{headerSection-Y5TMR3TW.mjs → headerSection-SDYGII36.mjs} +4 -4
  102. package/dist/client/hooks.mjs +1682 -1412
  103. package/dist/client/{locationMap-RH2LG7FZ.mjs → locationMap-BDETEUQD.mjs} +3 -4
  104. package/dist/client/{newsletterForm-PCAIPFMA.mjs → newsletterForm-EKYIU67X.mjs} +70 -22
  105. package/dist/client/{productDetail-OIGDR4YE.mjs → productDetail-5UTGNN76.mjs} +8 -9
  106. package/dist/client/{productList-4MA5S2CX.mjs → productList-7YA5KXZQ.mjs} +8 -9
  107. package/dist/client/rendering/client.mjs +753 -329
  108. package/dist/client/rendering/islands.mjs +19 -19
  109. package/dist/client/rendering.mjs +3786 -3034
  110. package/dist/client/shop-AIMUMZYC.mjs +20 -0
  111. package/dist/preview-next/before-render.mjs +58 -14
  112. package/dist/preview-next/client/runtime.mjs +5 -5
  113. package/dist/preview-next/editor-chrome.css +56 -9
  114. package/dist/preview-next/middleware.mjs +58 -14
  115. package/dist/{sdk-runtime-QLOCYKVU.mjs → sdk-runtime-NW472WNT.mjs} +6 -6
  116. package/dist/server/components.mjs +1518 -1015
  117. package/dist/server/config-validation.mjs +1719 -1461
  118. package/dist/server/config.mjs +1719 -1461
  119. package/dist/server/data.mjs +1683 -1413
  120. package/dist/server/index.mjs +79 -17
  121. package/dist/server/next.mjs +1902 -1311
  122. package/dist/server/page-converter.mjs +2193 -1169
  123. package/dist/server/prebuild.mjs +1 -1
  124. package/dist/server/rendering/server.mjs +1709 -1209
  125. package/dist/server/rendering.mjs +1894 -1347
  126. package/dist/server/routing.mjs +1872 -1499
  127. package/dist/server/server.mjs +1571 -1264
  128. package/dist/server/theme-bridge.mjs +234 -0
  129. package/dist/styles/index.css +232 -0
  130. package/package.json +1 -1
  131. package/dist/SdkPreviewModeRuntime-4FGSVUYI.mjs +0 -8
  132. package/dist/client/cart-X4YK4FTW.mjs +0 -19
  133. package/dist/client/checkout-OM2BEPWD.mjs +0 -19
  134. package/dist/client/chunk-I2MMZO53.mjs +0 -6
  135. package/dist/client/shop-WXSYV5QO.mjs +0 -21
@@ -124,6 +124,48 @@ function err(error) {
124
124
  // ../core/src/branded.ts
125
125
  var unsafeAsMediaAssetId = (id) => id;
126
126
 
127
+ // ../core/src/assert-never.ts
128
+ function assertNever(value, message = "Unexpected variant") {
129
+ throw new Error(`${message}: ${String(value)}`);
130
+ }
131
+
132
+ // ../core/src/currency-format.ts
133
+ var CURRENCY_LOCALE_BY_CODE = {
134
+ USD: "en-US",
135
+ GBP: "en-GB",
136
+ EUR: "de-DE",
137
+ AUD: "en-AU",
138
+ CAD: "en-CA",
139
+ NZD: "en-NZ",
140
+ JPY: "ja-JP",
141
+ CNY: "zh-CN",
142
+ CHF: "de-CH"
143
+ };
144
+ function resolveCurrencyLocale(currencyCode, override) {
145
+ return override ?? CURRENCY_LOCALE_BY_CODE[currencyCode] ?? "en";
146
+ }
147
+ function formatCurrencyAmount(amountCents, currency, options) {
148
+ const currencyCode = currency.toUpperCase();
149
+ const locale = resolveCurrencyLocale(currencyCode, options?.locale);
150
+ try {
151
+ const exactFormatter = new Intl.NumberFormat(locale, {
152
+ style: "currency",
153
+ currency: currencyCode
154
+ });
155
+ const fractionDigits = options?.decimals === "auto" ? {
156
+ minimumFractionDigits: 0,
157
+ maximumFractionDigits: exactFormatter.resolvedOptions().maximumFractionDigits
158
+ } : {};
159
+ return new Intl.NumberFormat(locale, {
160
+ style: "currency",
161
+ currency: currencyCode,
162
+ ...fractionDigits
163
+ }).format(amountCents / 100);
164
+ } catch {
165
+ return `${(amountCents / 100).toFixed(2)} ${currencyCode}`;
166
+ }
167
+ }
168
+
127
169
  // ../core/src/event-pricing.ts
128
170
  function publicEventPricingDisplay(pricing) {
129
171
  return pricing.display;
@@ -158,11 +200,48 @@ function isFreePublicEventPriceDisplay(display) {
158
200
  return display.display.kind === "free";
159
201
  case "exact":
160
202
  case "from":
203
+ case "range":
161
204
  case "mixed":
162
205
  case "unavailable":
163
206
  return false;
164
207
  }
165
208
  }
209
+ function formatCoursePriceDisplayLabel(display, options) {
210
+ switch (display.kind) {
211
+ case "free":
212
+ case "unavailable":
213
+ return "Course";
214
+ case "exact":
215
+ return `Course (${formatCurrencyAmount(display.amount, display.currency, options)})`;
216
+ case "from":
217
+ return `Course (From ${formatCurrencyAmount(display.amount, display.currency, options)})`;
218
+ default:
219
+ return assertNever(display);
220
+ }
221
+ }
222
+ function formatBookingPriceDisplay(display, options = {}) {
223
+ switch (display.kind) {
224
+ case "free":
225
+ return "Free";
226
+ case "exact":
227
+ return formatCurrencyAmount(display.amount, display.currency, options);
228
+ case "from":
229
+ return `From ${formatCurrencyAmount(display.amount, display.currency, options)}`;
230
+ case "range":
231
+ return `${formatCurrencyAmount(display.minAmount, display.currency, options)} - ${formatCurrencyAmount(display.maxAmount, display.currency, options)}`;
232
+ case "mixed":
233
+ return display.paidToAmount > display.paidFromAmount ? `Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)} - ${formatCurrencyAmount(display.paidToAmount, display.currency, options)}` : `Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)}`;
234
+ case "unavailable":
235
+ return "Pricing unavailable";
236
+ case "course":
237
+ return formatCoursePriceDisplayLabel(display.display, options);
238
+ default:
239
+ return assertNever(display);
240
+ }
241
+ }
242
+ function formatEventPricing(pricing, options = {}) {
243
+ return formatBookingPriceDisplay(publicEventPricingDisplay(pricing), options);
244
+ }
166
245
 
167
246
  // ../core/src/booking-date-time.ts
168
247
  var DEFAULT_LOCALE = "en-US";
@@ -408,11 +487,6 @@ function toLocationCoordinates(value) {
408
487
  };
409
488
  }
410
489
 
411
- // ../core/src/assert-never.ts
412
- function assertNever(value, message = "Unexpected variant") {
413
- throw new Error(`${message}: ${String(value)}`);
414
- }
415
-
416
490
  // ../core/src/planner.ts
417
491
  var systemPlanningClock = {
418
492
  now: () => Date.now()
@@ -20418,15 +20492,53 @@ var newsletterFormFragment = defineFragment({
20418
20492
  title: "Newsletter Form",
20419
20493
  description: "Newsletter subscription form with preset field configurations.",
20420
20494
  fields: [
20495
+ {
20496
+ id: "destinationProvider",
20497
+ type: "select",
20498
+ label: "Send signups to",
20499
+ description: "Choose where new subscribers from this form should go.",
20500
+ defaultValue: "riverbank",
20501
+ required: true,
20502
+ ui: { intent: "behavior" },
20503
+ options: [
20504
+ { value: "riverbank", label: "Riverbank newsletter" }
20505
+ ]
20506
+ },
20421
20507
  {
20422
20508
  id: "listId",
20423
20509
  type: "reference",
20424
20510
  label: "Newsletter list",
20425
20511
  description: "Select the list new subscribers should be added to.",
20426
- required: true,
20512
+ required: false,
20427
20513
  referenceKind: "newsletterList",
20428
20514
  allowManualEntry: false,
20429
- ui: { intent: "behavior" }
20515
+ ui: {
20516
+ intent: "behavior",
20517
+ visibleWhen: { field: "destinationProvider", equals: "riverbank" }
20518
+ }
20519
+ },
20520
+ {
20521
+ id: "mailchimpAudienceId",
20522
+ type: "reference",
20523
+ label: "Mailchimp audience",
20524
+ description: "Choose the Mailchimp audience for new subscribers.",
20525
+ required: false,
20526
+ referenceKind: "mailchimpAudience",
20527
+ allowManualEntry: false,
20528
+ ui: {
20529
+ intent: "behavior",
20530
+ visibleWhen: { field: "destinationProvider", equals: "mailchimp" }
20531
+ }
20532
+ },
20533
+ {
20534
+ id: "mailchimpTags",
20535
+ type: "text",
20536
+ label: "Mailchimp tags",
20537
+ description: "Optional tags to apply in Mailchimp, separated by commas or semicolons.",
20538
+ ui: {
20539
+ intent: "behavior",
20540
+ visibleWhen: { field: "destinationProvider", equals: "mailchimp" }
20541
+ }
20430
20542
  },
20431
20543
  {
20432
20544
  id: "preset",
@@ -20473,13 +20585,18 @@ var newsletterFormFragment = defineFragment({
20473
20585
  id: "tags",
20474
20586
  type: "text",
20475
20587
  label: "Tags (optional)",
20476
- description: "Optional tags to apply on subscribe (comma or semicolon separated)."
20588
+ description: "Optional tags to apply on subscribe (comma or semicolon separated).",
20589
+ ui: {
20590
+ intent: "behavior",
20591
+ visibleWhen: { field: "destinationProvider", equals: "riverbank" }
20592
+ }
20477
20593
  }
20478
20594
  ],
20479
20595
  layout: [
20480
20596
  el(
20481
20597
  "newsletter-form",
20482
20598
  withApiBindings({
20599
+ destinationProvider: { $bind: { from: "destinationProvider" } },
20483
20600
  listId: { $bind: { from: "listId" } },
20484
20601
  preset: { $bind: { from: "preset" } },
20485
20602
  includePhone: { $bind: { from: "includePhone" } },
@@ -26402,10 +26519,10 @@ var appointmentBookingBlockDefinition = {
26402
26519
  };
26403
26520
 
26404
26521
  // ../blocks/src/system/blocks/event-registration.ts
26405
- import { z as z47 } from "zod";
26522
+ import { z as z48 } from "zod";
26406
26523
 
26407
26524
  // ../blocks/src/system/blocks/events/shared/schemas.ts
26408
- import { z as z43 } from "zod";
26525
+ import { z as z44 } from "zod";
26409
26526
 
26410
26527
  // ../blocks/src/lib/media.ts
26411
26528
  import z40 from "zod";
@@ -26483,296 +26600,393 @@ var mediaSchema2 = z40.discriminatedUnion("type", [
26483
26600
  archiveMediaSchema
26484
26601
  ]);
26485
26602
 
26486
- // ../blocks/src/system/blocks/shared/bookingPaymentTerms.ts
26603
+ // ../blocks/src/system/manifest/richTextSchema.ts
26487
26604
  import { z as z41 } from "zod";
26488
- var bookingDepositRefundPolicySchema = z41.enum([
26605
+ var TipTapMarkSchema = z41.object({
26606
+ type: z41.string(),
26607
+ attrs: z41.record(z41.string(), z41.unknown()).optional()
26608
+ });
26609
+ var TipTapNodeSchema = z41.lazy(
26610
+ () => z41.object({
26611
+ type: z41.string(),
26612
+ content: z41.array(TipTapNodeSchema).optional(),
26613
+ text: z41.string().optional(),
26614
+ attrs: z41.record(z41.string(), z41.unknown()).optional(),
26615
+ marks: z41.array(TipTapMarkSchema).optional()
26616
+ })
26617
+ );
26618
+ var RichTextValueSchema = z41.union([
26619
+ // Canonical: TipTap document directly
26620
+ TipTapNodeSchema,
26621
+ // Legacy (read-tolerance only): wrapped in { doc: {...} }
26622
+ z41.object({
26623
+ doc: TipTapNodeSchema
26624
+ })
26625
+ ]);
26626
+ var RichTextDocSchema = z41.object({
26627
+ type: z41.literal("doc"),
26628
+ content: z41.array(TipTapNodeSchema)
26629
+ });
26630
+ function unwrapRichTextRoot(value) {
26631
+ if (!isRecord4(value)) return value;
26632
+ if (!("doc" in value)) return value;
26633
+ const inner = value.doc;
26634
+ if (isRecord4(inner) && inner.type === "doc") return inner;
26635
+ return value;
26636
+ }
26637
+ function createHardBreakNode() {
26638
+ return { type: "hardBreak" };
26639
+ }
26640
+ function parseRichTextInlineMarkdown(text2) {
26641
+ const out = [];
26642
+ const pushText = (value, marks) => {
26643
+ if (!value) return;
26644
+ out.push(
26645
+ marks && marks.length > 0 ? { type: "text", text: value, marks } : { type: "text", text: value }
26646
+ );
26647
+ };
26648
+ let rest = text2;
26649
+ while (rest.length > 0) {
26650
+ const start = rest.indexOf("**");
26651
+ if (start === -1) {
26652
+ pushText(rest);
26653
+ break;
26654
+ }
26655
+ const end = rest.indexOf("**", start + 2);
26656
+ if (end === -1) {
26657
+ pushText(rest);
26658
+ break;
26659
+ }
26660
+ pushText(rest.slice(0, start));
26661
+ pushText(rest.slice(start + 2, end), [{ type: "bold" }]);
26662
+ rest = rest.slice(end + 2);
26663
+ }
26664
+ return out;
26665
+ }
26666
+ function parseRichTextParagraphInlineMarkdown(text2) {
26667
+ return text2.split("\n").flatMap((line, index) => {
26668
+ const lineNodes = parseRichTextInlineMarkdown(line.trim());
26669
+ return index === 0 ? lineNodes : [createHardBreakNode(), ...lineNodes];
26670
+ });
26671
+ }
26672
+ function createRichTextDocFromMarkdown(markdown) {
26673
+ const normalized = markdown.replace(/\r\n/g, "\n").trim();
26674
+ if (!normalized) return { type: "doc", content: [] };
26675
+ const paragraphs = normalized.split(/\n{2,}/).map((paragraph) => paragraph.trim()).filter(Boolean);
26676
+ return {
26677
+ type: "doc",
26678
+ content: paragraphs.map((paragraph) => {
26679
+ const inline2 = parseRichTextParagraphInlineMarkdown(paragraph);
26680
+ return inline2.length > 0 ? { type: "paragraph", content: inline2 } : { type: "paragraph" };
26681
+ })
26682
+ };
26683
+ }
26684
+
26685
+ // ../blocks/src/system/blocks/shared/bookingPaymentTerms.ts
26686
+ import { z as z42 } from "zod";
26687
+ var bookingDepositRefundPolicySchema = z42.enum([
26489
26688
  "refundable",
26490
26689
  "non_refundable"
26491
26690
  ]);
26492
- var bookingInstalmentPlanSchema = z41.union([
26493
- z41.object({
26494
- kind: z41.literal("deposit_plus_one_remainder"),
26495
- depositAmountCents: z41.number().int().min(0),
26691
+ var bookingInstalmentPlanSchema = z42.union([
26692
+ z42.object({
26693
+ kind: z42.literal("deposit_plus_one_remainder"),
26694
+ depositAmountCents: z42.number().int().min(0),
26496
26695
  depositRefundability: bookingDepositRefundPolicySchema,
26497
- remainderDueCount: z41.number().int().positive(),
26498
- intervalUnit: z41.enum(["day", "week", "month"])
26696
+ remainderDueCount: z42.number().int().positive(),
26697
+ intervalUnit: z42.enum(["day", "week", "month"])
26499
26698
  }),
26500
- z41.object({
26501
- kind: z41.literal("deposit_plus_scheduled_instalments"),
26502
- depositAmountCents: z41.number().int().min(0),
26699
+ z42.object({
26700
+ kind: z42.literal("deposit_plus_scheduled_instalments"),
26701
+ depositAmountCents: z42.number().int().min(0),
26503
26702
  depositRefundability: bookingDepositRefundPolicySchema,
26504
- instalmentCount: z41.number().int().positive(),
26505
- intervalCount: z41.number().int().positive(),
26506
- intervalUnit: z41.enum(["day", "week", "month"])
26703
+ instalmentCount: z42.number().int().positive(),
26704
+ intervalCount: z42.number().int().positive(),
26705
+ intervalUnit: z42.enum(["day", "week", "month"])
26507
26706
  }),
26508
- z41.object({
26509
- kind: z41.literal("equal_scheduled_instalments"),
26510
- instalmentCount: z41.number().int().positive(),
26511
- intervalCount: z41.number().int().positive(),
26512
- intervalUnit: z41.enum(["day", "week", "month"])
26707
+ z42.object({
26708
+ kind: z42.literal("equal_scheduled_instalments"),
26709
+ instalmentCount: z42.number().int().positive(),
26710
+ intervalCount: z42.number().int().positive(),
26711
+ intervalUnit: z42.enum(["day", "week", "month"])
26513
26712
  })
26514
26713
  ]);
26515
- var bookingFlexibleBalanceDueDateRuleSchema = z41.union([
26516
- z41.object({
26517
- kind: z41.literal("relative_to_start_date"),
26518
- daysBeforeStart: z41.number().int().positive()
26714
+ var bookingFlexibleBalanceDueDateRuleSchema = z42.union([
26715
+ z42.object({
26716
+ kind: z42.literal("relative_to_start_date"),
26717
+ daysBeforeStart: z42.number().int().positive()
26519
26718
  }),
26520
- z41.object({
26521
- kind: z41.literal("fixed_calendar_date"),
26522
- dueAt: z41.string().datetime()
26719
+ z42.object({
26720
+ kind: z42.literal("fixed_calendar_date"),
26721
+ dueAt: z42.string().datetime()
26523
26722
  })
26524
26723
  ]);
26525
- var bookingFlexibleBalanceConfigSchema = z41.object({
26526
- upfrontAmountCents: z41.number().int().min(0),
26724
+ var bookingFlexibleBalanceConfigSchema = z42.object({
26725
+ upfrontAmountCents: z42.number().int().min(0),
26527
26726
  dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
26528
26727
  depositRefundability: bookingDepositRefundPolicySchema
26529
26728
  });
26530
- var blockBookingPaymentCollectionOptionSchema = z41.union([
26531
- z41.object({
26532
- kind: z41.literal("upfront")
26729
+ var blockBookingPaymentCollectionOptionSchema = z42.union([
26730
+ z42.object({
26731
+ kind: z42.literal("upfront")
26533
26732
  }),
26534
- z41.object({
26535
- kind: z41.literal("deferred_manual")
26733
+ z42.object({
26734
+ kind: z42.literal("deferred_manual")
26536
26735
  }),
26537
- z41.object({
26538
- kind: z41.literal("instalment_plan"),
26736
+ z42.object({
26737
+ kind: z42.literal("instalment_plan"),
26539
26738
  plan: bookingInstalmentPlanSchema
26540
26739
  }),
26541
- z41.object({
26542
- kind: z41.literal("flexible_balance"),
26740
+ z42.object({
26741
+ kind: z42.literal("flexible_balance"),
26543
26742
  config: bookingFlexibleBalanceConfigSchema
26544
26743
  })
26545
26744
  ]);
26546
- var blockBookingPaymentTermsSchema = z41.object({
26547
- allowedOptions: z41.array(blockBookingPaymentCollectionOptionSchema).min(1)
26745
+ var blockBookingPaymentTermsSchema = z42.object({
26746
+ allowedOptions: z42.array(blockBookingPaymentCollectionOptionSchema).min(1)
26548
26747
  });
26549
26748
 
26550
26749
  // ../blocks/src/system/blocks/courses/shared/schemas.ts
26551
- import { z as z42 } from "zod";
26552
- var courseVenueSchema = z42.object({
26553
- id: z42.string(),
26554
- name: z42.string(),
26555
- address: z42.string().nullable()
26750
+ import { z as z43 } from "zod";
26751
+ var courseVenueSchema = z43.object({
26752
+ id: z43.string(),
26753
+ name: z43.string(),
26754
+ address: z43.string().nullable()
26556
26755
  });
26557
- var courseSessionSchema = z42.object({
26558
- id: z42.string(),
26559
- startsAt: z42.string(),
26560
- endsAt: z42.string(),
26561
- timeZone: z42.string(),
26562
- capacityOverride: z42.number().nullable().optional(),
26563
- overrides: z42.record(z42.string(), z42.unknown()).nullable().optional()
26756
+ var courseSessionSchema = z43.object({
26757
+ id: z43.string(),
26758
+ startsAt: z43.string(),
26759
+ endsAt: z43.string(),
26760
+ timeZone: z43.string(),
26761
+ capacityOverride: z43.number().nullable().optional(),
26762
+ overrides: z43.record(z43.string(), z43.unknown()).nullable().optional()
26564
26763
  });
26565
- var courseTeamMemberSummarySchema = z42.object({
26566
- id: z42.string(),
26567
- name: z42.string(),
26568
- roleLabel: z42.string().nullable(),
26569
- summary: z42.string().nullable(),
26570
- profilePath: z42.string().nullable()
26764
+ var courseTeamMemberSummarySchema = z43.object({
26765
+ id: z43.string(),
26766
+ name: z43.string(),
26767
+ roleLabel: z43.string().nullable(),
26768
+ summary: z43.string().nullable(),
26769
+ profilePath: z43.string().nullable()
26571
26770
  });
26572
- var coursePricingOptionSchema = z42.object({
26573
- id: z42.string(),
26574
- name: z42.string(),
26575
- description: z42.string().nullable(),
26576
- priceAmount: z42.number(),
26577
- isActive: z42.boolean(),
26578
- sortOrder: z42.number(),
26579
- capacityLimit: z42.number().nullable(),
26580
- saleStartsAt: z42.string().nullable(),
26581
- saleEndsAt: z42.string().nullable(),
26582
- attendanceScope: z42.enum(["in_person", "online", "both"]).nullable().optional()
26771
+ var coursePricingOptionSchema = z43.object({
26772
+ id: z43.string(),
26773
+ name: z43.string(),
26774
+ description: z43.string().nullable(),
26775
+ priceAmount: z43.number(),
26776
+ isActive: z43.boolean(),
26777
+ sortOrder: z43.number(),
26778
+ capacityLimit: z43.number().nullable(),
26779
+ saleStartsAt: z43.string().nullable(),
26780
+ saleEndsAt: z43.string().nullable(),
26781
+ attendanceScope: z43.enum(["in_person", "online", "both"]).nullable().optional()
26583
26782
  });
26584
- var coursePricingSchema = z42.object({
26585
- bookingRequirement: z42.enum(["none", "required"]),
26586
- pricingStrategy: z42.enum(["free", "single", "tiered"]),
26587
- currency: z42.string(),
26588
- singlePriceAmount: z42.number().nullable(),
26783
+ var coursePricingSchema = z43.object({
26784
+ bookingRequirement: z43.enum(["none", "required"]),
26785
+ pricingStrategy: z43.enum(["free", "single", "tiered"]),
26786
+ currency: z43.string(),
26787
+ singlePriceAmount: z43.number().nullable(),
26589
26788
  paymentTerms: blockBookingPaymentTermsSchema,
26590
- options: z42.array(coursePricingOptionSchema)
26789
+ options: z43.array(coursePricingOptionSchema)
26591
26790
  });
26592
- var publicCourseSchema = z42.object({
26593
- id: z42.string(),
26594
- title: z42.string(),
26595
- slug: z42.string(),
26596
- description: z42.unknown().nullable(),
26597
- teamMembers: z42.array(courseTeamMemberSummarySchema).optional(),
26598
- enrollmentOpen: z42.boolean(),
26791
+ var publicCourseSchema = z43.object({
26792
+ id: z43.string(),
26793
+ title: z43.string(),
26794
+ slug: z43.string(),
26795
+ description: z43.unknown().nullable(),
26796
+ teamMembers: z43.array(courseTeamMemberSummarySchema).optional(),
26797
+ enrollmentOpen: z43.boolean(),
26599
26798
  pricing: coursePricingSchema.optional(),
26600
- priceCents: z42.number().nullable(),
26601
- currency: z42.string(),
26799
+ priceCents: z43.number().nullable(),
26800
+ currency: z43.string(),
26602
26801
  paymentTerms: blockBookingPaymentTermsSchema,
26603
- enrollmentCapacity: z42.number().nullable(),
26604
- acceptsMemberships: z42.boolean(),
26605
- status: z42.enum(["active", "draft", "cancelled"]),
26606
- sessionsCount: z42.number(),
26607
- enrolledCount: z42.number(),
26608
- availableSpots: z42.number().nullable(),
26609
- sessions: z42.array(courseSessionSchema),
26802
+ enrollmentCapacity: z43.number().nullable(),
26803
+ acceptsMemberships: z43.boolean(),
26804
+ status: z43.enum(["active", "draft", "cancelled"]),
26805
+ sessionsCount: z43.number(),
26806
+ enrolledCount: z43.number(),
26807
+ availableSpots: z43.number().nullable(),
26808
+ sessions: z43.array(courseSessionSchema),
26610
26809
  venue: courseVenueSchema.nullable(),
26611
- contentEntryId: z42.string().nullable()
26810
+ contentEntryId: z43.string().nullable()
26612
26811
  });
26613
- var publicCoursesArraySchema = z42.array(publicCourseSchema);
26812
+ var publicCoursesArraySchema = z43.array(publicCourseSchema);
26614
26813
 
26615
26814
  // ../blocks/src/system/blocks/events/shared/schemas.ts
26616
- var eventPresetSchema = z43.enum(["event", "class", "workshop", "retreat", "performance"]);
26617
- var eventScheduleScopeSchema = z43.enum(["recurring", "oneOff"]);
26618
- var eventDestinationModeSchema = z43.enum(["cms-managed", "system-managed"]);
26619
- var eventVenueSchema = z43.object({
26620
- id: z43.string(),
26621
- name: z43.string(),
26622
- address: z43.string().nullable(),
26623
- location: z43.object({
26624
- lat: z43.number(),
26625
- lng: z43.number()
26815
+ var eventPresetSchema = z44.enum(["event", "class", "workshop", "retreat", "performance"]);
26816
+ var eventScheduleScopeSchema = z44.enum(["recurring", "oneOff"]);
26817
+ var eventDestinationModeSchema = z44.enum(["cms-managed", "system-managed"]);
26818
+ var eventVenueSchema = z44.object({
26819
+ id: z44.string(),
26820
+ name: z44.string(),
26821
+ address: z44.string().nullable(),
26822
+ location: z44.object({
26823
+ lat: z44.number(),
26824
+ lng: z44.number()
26626
26825
  }).nullable()
26627
26826
  });
26628
- var eventCategorySchema = z43.object({
26629
- id: z43.string(),
26630
- name: z43.string(),
26631
- color: z43.string().nullable()
26827
+ var eventCategorySchema = z44.object({
26828
+ id: z44.string(),
26829
+ name: z44.string(),
26830
+ color: z44.string().nullable()
26632
26831
  });
26633
- var pricingTypeSchema = z43.enum(["free", "paid"]);
26634
- var accessRestrictionSchema = z43.enum(["none", "category"]);
26635
- var eventPricingModeSchema = z43.enum(["single", "ticket_types"]);
26636
- var publicCoursePriceDisplaySchema = z43.discriminatedUnion("kind", [
26637
- z43.object({ kind: z43.literal("free"), currency: z43.string() }),
26638
- z43.object({ kind: z43.literal("exact"), amount: z43.number(), currency: z43.string() }),
26639
- z43.object({ kind: z43.literal("from"), amount: z43.number(), currency: z43.string() }),
26640
- z43.object({ kind: z43.literal("unavailable"), currency: z43.string() })
26832
+ var pricingTypeSchema = z44.enum(["free", "paid"]);
26833
+ var accessRestrictionSchema = z44.enum(["none", "category"]);
26834
+ var eventPricingModeSchema = z44.enum(["single", "ticket_types"]);
26835
+ var publicCoursePriceDisplaySchema = z44.discriminatedUnion("kind", [
26836
+ z44.object({ kind: z44.literal("free"), currency: z44.string() }),
26837
+ z44.object({ kind: z44.literal("exact"), amount: z44.number(), currency: z44.string() }),
26838
+ z44.object({ kind: z44.literal("from"), amount: z44.number(), currency: z44.string() }),
26839
+ z44.object({ kind: z44.literal("unavailable"), currency: z44.string() })
26641
26840
  ]);
26642
- var publicEventPriceDisplaySchema = z43.discriminatedUnion("kind", [
26643
- z43.object({ kind: z43.literal("free"), currency: z43.string() }),
26644
- z43.object({ kind: z43.literal("exact"), amount: z43.number(), currency: z43.string() }),
26645
- z43.object({ kind: z43.literal("from"), amount: z43.number(), currency: z43.string() }),
26646
- z43.object({ kind: z43.literal("mixed"), paidFromAmount: z43.number(), currency: z43.string() }),
26647
- z43.object({ kind: z43.literal("unavailable"), currency: z43.string() }),
26648
- z43.object({ kind: z43.literal("course"), display: publicCoursePriceDisplaySchema })
26841
+ var publicEventPriceDisplaySchema = z44.discriminatedUnion("kind", [
26842
+ z44.object({ kind: z44.literal("free"), currency: z44.string() }),
26843
+ z44.object({ kind: z44.literal("exact"), amount: z44.number(), currency: z44.string() }),
26844
+ z44.object({ kind: z44.literal("from"), amount: z44.number(), currency: z44.string() }),
26845
+ z44.object({ kind: z44.literal("range"), minAmount: z44.number(), maxAmount: z44.number(), currency: z44.string() }),
26846
+ z44.object({
26847
+ kind: z44.literal("mixed"),
26848
+ paidFromAmount: z44.number(),
26849
+ paidToAmount: z44.number(),
26850
+ currency: z44.string()
26851
+ }),
26852
+ z44.object({ kind: z44.literal("unavailable"), currency: z44.string() }),
26853
+ z44.object({ kind: z44.literal("course"), display: publicCoursePriceDisplaySchema })
26649
26854
  ]);
26650
- var publicEventTicketTypePriceDisplaySchema = z43.union([
26651
- z43.object({ kind: z43.literal("free"), currency: z43.string() }),
26652
- z43.object({ kind: z43.literal("exact"), amount: z43.number(), currency: z43.string() }),
26653
- z43.object({ kind: z43.literal("from"), amount: z43.number(), currency: z43.string() }),
26654
- z43.object({ kind: z43.literal("mixed"), paidFromAmount: z43.number(), currency: z43.string() }),
26655
- z43.object({ kind: z43.literal("unavailable"), currency: z43.string() })
26855
+ var publicEventTicketTypePriceDisplaySchema = z44.union([
26856
+ z44.object({ kind: z44.literal("free"), currency: z44.string() }),
26857
+ z44.object({ kind: z44.literal("exact"), amount: z44.number(), currency: z44.string() }),
26858
+ z44.object({ kind: z44.literal("from"), amount: z44.number(), currency: z44.string() }),
26859
+ z44.object({ kind: z44.literal("range"), minAmount: z44.number(), maxAmount: z44.number(), currency: z44.string() }),
26860
+ z44.object({
26861
+ kind: z44.literal("mixed"),
26862
+ paidFromAmount: z44.number(),
26863
+ paidToAmount: z44.number(),
26864
+ currency: z44.string()
26865
+ }),
26866
+ z44.object({ kind: z44.literal("unavailable"), currency: z44.string() })
26656
26867
  ]);
26657
- var publicEventAttendanceModeSchema = z43.enum(["in_person", "online"]);
26658
- var publicEventAttendanceModeAvailabilitySchema = z43.object({
26868
+ var publicEventAttendanceModeSchema = z44.enum(["in_person", "online"]);
26869
+ var publicEventAttendanceModeAvailabilitySchema = z44.object({
26659
26870
  mode: publicEventAttendanceModeSchema,
26660
- capacity: z43.number().nullable(),
26661
- registeredCount: z43.number(),
26662
- availableSpots: z43.number().nullable(),
26663
- waitlistEnabled: z43.boolean()
26871
+ capacity: z44.number().nullable(),
26872
+ registeredCount: z44.number(),
26873
+ availableSpots: z44.number().nullable(),
26874
+ waitlistEnabled: z44.boolean()
26664
26875
  });
26665
- var publicEventTicketTypeAvailabilitySchema = z43.union([
26666
- z43.object({
26667
- kind: z43.literal("available"),
26668
- remainingCapacity: z43.number().nullable()
26876
+ var publicEventTicketTypeAvailabilitySchema = z44.union([
26877
+ z44.object({
26878
+ kind: z44.literal("available"),
26879
+ remainingCapacity: z44.number().nullable()
26669
26880
  }),
26670
- z43.object({
26671
- kind: z43.literal("unavailable"),
26672
- reason: z43.enum(["inactive", "not_on_sale_yet", "sale_ended", "sold_out", "event_sold_out"]),
26673
- remainingCapacity: z43.number().nullable()
26881
+ z44.object({
26882
+ kind: z44.literal("unavailable"),
26883
+ reason: z44.enum(["inactive", "not_on_sale_yet", "sale_ended", "sold_out", "event_sold_out"]),
26884
+ remainingCapacity: z44.number().nullable()
26674
26885
  })
26675
26886
  ]);
26676
- var publicEventTicketTypeSchema = z43.object({
26677
- id: z43.string(),
26678
- siteId: z43.string(),
26679
- eventSeriesId: z43.string(),
26680
- name: z43.string(),
26681
- description: z43.string().nullable(),
26682
- priceAmount: z43.number(),
26683
- isActive: z43.boolean(),
26684
- sortOrder: z43.number(),
26685
- capacityMode: z43.enum(["limited", "unlimited"]),
26686
- capacityLimit: z43.number().nullable(),
26687
- attendanceScope: z43.enum(["in_person", "online", "both"]).optional(),
26688
- saleStartsAt: z43.string().nullable(),
26689
- saleEndsAt: z43.string().nullable(),
26887
+ var publicEventTicketTypeSchema = z44.object({
26888
+ id: z44.string(),
26889
+ siteId: z44.string(),
26890
+ eventSeriesId: z44.string(),
26891
+ name: z44.string(),
26892
+ description: z44.string().nullable(),
26893
+ priceAmount: z44.number(),
26894
+ isActive: z44.boolean(),
26895
+ sortOrder: z44.number(),
26896
+ capacityMode: z44.enum(["limited", "unlimited"]),
26897
+ capacityLimit: z44.number().nullable(),
26898
+ attendanceScope: z44.enum(["in_person", "online", "both"]).optional(),
26899
+ saleStartsAt: z44.string().nullable(),
26900
+ saleEndsAt: z44.string().nullable(),
26690
26901
  availability: publicEventTicketTypeAvailabilitySchema,
26691
- createdAt: z43.string(),
26692
- updatedAt: z43.string()
26902
+ createdAt: z44.string(),
26903
+ updatedAt: z44.string()
26693
26904
  });
26694
- var publicEventPricingSchema = z43.discriminatedUnion("kind", [
26695
- z43.object({
26696
- kind: z43.literal("drop_in"),
26697
- currency: z43.string(),
26698
- display: z43.object({ kind: z43.literal("free"), currency: z43.string() })
26905
+ var publicEventPricingSchema = z44.discriminatedUnion("kind", [
26906
+ z44.object({
26907
+ kind: z44.literal("drop_in"),
26908
+ currency: z44.string(),
26909
+ display: z44.object({ kind: z44.literal("free"), currency: z44.string() })
26699
26910
  }),
26700
- z43.object({
26701
- kind: z43.literal("free_registration"),
26702
- currency: z43.string(),
26703
- display: z43.object({ kind: z43.literal("free"), currency: z43.string() })
26911
+ z44.object({
26912
+ kind: z44.literal("free_registration"),
26913
+ currency: z44.string(),
26914
+ display: z44.object({ kind: z44.literal("free"), currency: z44.string() })
26704
26915
  }),
26705
- z43.object({
26706
- kind: z43.literal("single_paid"),
26707
- amount: z43.number(),
26708
- currency: z43.string(),
26709
- display: z43.object({ kind: z43.literal("exact"), amount: z43.number(), currency: z43.string() })
26916
+ z44.object({
26917
+ kind: z44.literal("single_paid"),
26918
+ amount: z44.number(),
26919
+ currency: z44.string(),
26920
+ display: z44.object({ kind: z44.literal("exact"), amount: z44.number(), currency: z44.string() })
26710
26921
  }),
26711
- z43.object({
26712
- kind: z43.literal("ticket_types"),
26713
- currency: z43.string(),
26714
- ticketTypes: z43.array(publicEventTicketTypeSchema),
26922
+ z44.object({
26923
+ kind: z44.literal("ticket_types"),
26924
+ currency: z44.string(),
26925
+ ticketTypes: z44.array(publicEventTicketTypeSchema),
26715
26926
  display: publicEventTicketTypePriceDisplaySchema
26716
26927
  }),
26717
- z43.object({
26718
- kind: z43.literal("course"),
26719
- display: z43.object({ kind: z43.literal("course"), display: publicCoursePriceDisplaySchema })
26928
+ z44.object({
26929
+ kind: z44.literal("course"),
26930
+ display: z44.object({ kind: z44.literal("course"), display: publicCoursePriceDisplaySchema })
26720
26931
  })
26721
26932
  ]);
26722
- var publicTeamMemberSummarySchema = z43.object({
26723
- id: z43.string(),
26724
- name: z43.string(),
26725
- roleLabel: z43.string().nullable(),
26726
- summary: z43.string().nullable(),
26727
- profilePath: z43.string().nullable()
26933
+ var publicTeamMemberSummarySchema = z44.object({
26934
+ id: z44.string(),
26935
+ name: z44.string(),
26936
+ roleLabel: z44.string().nullable(),
26937
+ summary: z44.string().nullable(),
26938
+ profilePath: z44.string().nullable()
26728
26939
  });
26729
- var publicEventSchema = z43.object({
26730
- kind: z43.enum(["event", "course_session"]).optional(),
26940
+ var publicEventSchema = z44.object({
26941
+ kind: z44.enum(["event", "course_session"]).optional(),
26731
26942
  eventPreset: eventPresetSchema.optional(),
26732
26943
  eventDestinationMode: eventDestinationModeSchema.optional(),
26733
26944
  scheduleScope: eventScheduleScopeSchema.optional(),
26734
- id: z43.string(),
26735
- occurrenceId: z43.string(),
26736
- seriesId: z43.string(),
26737
- title: z43.string(),
26738
- description: z43.string().nullable(),
26739
- presentation: z43.object({
26740
- cardTitleOverride: z43.string().nullable().optional(),
26741
- summary: z43.string().nullable().optional(),
26945
+ id: z44.string(),
26946
+ occurrenceId: z44.string(),
26947
+ seriesId: z44.string(),
26948
+ title: z44.string(),
26949
+ description: z44.string().nullable(),
26950
+ content: z44.object({
26951
+ body: RichTextDocSchema.nullable().optional()
26952
+ }).optional(),
26953
+ presentation: z44.object({
26954
+ cardTitleOverride: z44.string().nullable().optional(),
26955
+ summary: z44.string().nullable().optional(),
26742
26956
  image: mediaSchema2.nullable().optional()
26743
26957
  }).optional(),
26744
- slug: z43.string(),
26745
- path: z43.string(),
26746
- requiresRegistration: z43.boolean(),
26747
- deliveryMode: z43.enum(["in_person", "online", "hybrid"]),
26748
- attendanceModes: z43.array(publicEventAttendanceModeAvailabilitySchema),
26749
- startsAt: z43.string(),
26750
- endsAt: z43.string(),
26751
- capacity: z43.number().nullable(),
26752
- registeredCount: z43.number(),
26753
- availableSpots: z43.number().nullable(),
26754
- waitlistEnabled: z43.boolean(),
26958
+ slug: z44.string(),
26959
+ path: z44.string(),
26960
+ requiresRegistration: z44.boolean(),
26961
+ deliveryMode: z44.enum(["in_person", "online", "hybrid"]),
26962
+ attendanceModes: z44.array(publicEventAttendanceModeAvailabilitySchema),
26963
+ startsAt: z44.string(),
26964
+ endsAt: z44.string(),
26965
+ capacity: z44.number().nullable(),
26966
+ registeredCount: z44.number(),
26967
+ availableSpots: z44.number().nullable(),
26968
+ waitlistEnabled: z44.boolean(),
26755
26969
  venue: eventVenueSchema.nullable(),
26756
26970
  eventCategory: eventCategorySchema.nullable(),
26757
- teamMembers: z43.array(publicTeamMemberSummarySchema).optional(),
26758
- status: z43.enum(["active", "draft", "archived"]).optional(),
26759
- timeZone: z43.string(),
26971
+ teamMembers: z44.array(publicTeamMemberSummarySchema).optional(),
26972
+ status: z44.enum(["active", "draft", "archived"]).optional(),
26973
+ timeZone: z44.string(),
26760
26974
  pricing: publicEventPricingSchema,
26761
26975
  paymentTerms: blockBookingPaymentTermsSchema,
26762
26976
  accessRestriction: accessRestrictionSchema,
26763
- allowedCategoryIds: z43.array(z43.string()),
26764
- requireGuestDetails: z43.boolean().optional(),
26765
- acceptsPasses: z43.boolean().optional(),
26766
- acceptsMemberships: z43.boolean().optional(),
26767
- course: z43.object({
26768
- id: z43.string(),
26977
+ allowedCategoryIds: z44.array(z44.string()),
26978
+ requireGuestDetails: z44.boolean().optional(),
26979
+ acceptsPasses: z44.boolean().optional(),
26980
+ acceptsMemberships: z44.boolean().optional(),
26981
+ course: z44.object({
26982
+ id: z44.string(),
26769
26983
  pricing: coursePricingSchema.optional(),
26770
- priceCents: z43.number().nullable(),
26771
- currency: z43.string(),
26772
- enrollmentOpen: z43.boolean()
26984
+ priceCents: z44.number().nullable(),
26985
+ currency: z44.string(),
26986
+ enrollmentOpen: z44.boolean()
26773
26987
  }).nullable().optional()
26774
26988
  });
26775
- var publicEventsArraySchema = z43.array(publicEventSchema);
26989
+ var publicEventsArraySchema = z44.array(publicEventSchema);
26776
26990
 
26777
26991
  // ../blocks/src/system/blocks/events/shared/fields.ts
26778
26992
  var cardVariantOptions2 = cardVariantRoleValues.map((value) => ({
@@ -26976,19 +27190,19 @@ function normalizeEventStaffMemberId(value) {
26976
27190
  }
26977
27191
 
26978
27192
  // ../blocks/src/system/blocks/event-registration.shared.ts
26979
- import { z as z44 } from "zod";
26980
- var occurrenceContextSchema = z44.object({
26981
- id: z44.string(),
26982
- seriesId: z44.string(),
26983
- startsAt: z44.string(),
26984
- endsAt: z44.string(),
26985
- timeZone: z44.string(),
26986
- capacityOverride: z44.number().nullable().optional(),
26987
- overrides: z44.record(z44.string(), z44.unknown()).nullable().optional()
27193
+ import { z as z45 } from "zod";
27194
+ var occurrenceContextSchema = z45.object({
27195
+ id: z45.string(),
27196
+ seriesId: z45.string(),
27197
+ startsAt: z45.string(),
27198
+ endsAt: z45.string(),
27199
+ timeZone: z45.string(),
27200
+ capacityOverride: z45.number().nullable().optional(),
27201
+ overrides: z45.record(z45.string(), z45.unknown()).nullable().optional()
26988
27202
  }).nullable();
26989
27203
 
26990
27204
  // ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
26991
- import { z as z46 } from "zod";
27205
+ import { z as z47 } from "zod";
26992
27206
 
26993
27207
  // ../blocks/src/system/constants/events.ts
26994
27208
  var EVENT_CONTENT_TYPE_SLUGS = ["event", "events"];
@@ -27086,10 +27300,21 @@ function readLegacyPriceDisplay(value, currency) {
27086
27300
  amount: readAmount(value.amount) ?? 0,
27087
27301
  currency: displayCurrency
27088
27302
  } : { kind: "unavailable", currency };
27303
+ case "range": {
27304
+ const minAmount = readAmount(value.minAmount);
27305
+ const maxAmount = readAmount(value.maxAmount);
27306
+ return minAmount !== null && maxAmount !== null ? {
27307
+ kind: "range",
27308
+ minAmount,
27309
+ maxAmount,
27310
+ currency: displayCurrency
27311
+ } : { kind: "unavailable", currency };
27312
+ }
27089
27313
  case "mixed":
27090
27314
  return readAmount(value.paidFromAmount) !== null ? {
27091
27315
  kind: "mixed",
27092
27316
  paidFromAmount: readAmount(value.paidFromAmount) ?? 0,
27317
+ paidToAmount: readAmount(value.paidToAmount) ?? readAmount(value.paidFromAmount) ?? 0,
27093
27318
  currency: displayCurrency
27094
27319
  } : { kind: "unavailable", currency };
27095
27320
  case "unavailable":
@@ -27131,16 +27356,16 @@ function readAmount(value) {
27131
27356
  }
27132
27357
 
27133
27358
  // ../blocks/src/system/runtime/nodes/shared/contract-schemas.ts
27134
- import { z as z45 } from "zod";
27135
- var previewStageSchema = z45.enum(["preview", "published"]);
27136
- var registrationButtonVariantSchema = z45.enum(["primary", "secondary", "outline"]);
27137
- var eventButtonVariantSchema = z45.enum(["primary", "secondary", "outline", "link"]);
27138
- var eventLayoutSchema = z45.enum(eventCalendarListLayoutValues);
27139
- var eventCalendarDisplayModeSchema = z45.enum(eventCalendarDisplayModeValues);
27140
- var columnOptionSchema = z45.enum(["2", "3", "4"]);
27141
- var weekStartSchema = z45.enum(["sunday", "monday"]);
27142
- var filterAutoShowSchema = z45.enum(["auto", "always", "never"]);
27143
- var calendarTabViewsSchema = z45.enum(["both", "month", "week"]);
27359
+ import { z as z46 } from "zod";
27360
+ var previewStageSchema = z46.enum(["preview", "published"]);
27361
+ var registrationButtonVariantSchema = z46.enum(["primary", "secondary", "outline"]);
27362
+ var eventButtonVariantSchema = z46.enum(["primary", "secondary", "outline", "link"]);
27363
+ var eventLayoutSchema = z46.enum(eventCalendarListLayoutValues);
27364
+ var eventCalendarDisplayModeSchema = z46.enum(eventCalendarDisplayModeValues);
27365
+ var columnOptionSchema = z46.enum(["2", "3", "4"]);
27366
+ var weekStartSchema = z46.enum(["sunday", "monday"]);
27367
+ var filterAutoShowSchema = z46.enum(["auto", "always", "never"]);
27368
+ var calendarTabViewsSchema = z46.enum(["both", "month", "week"]);
27144
27369
 
27145
27370
  // ../blocks/src/system/runtime/nodes/event-registration/wizardSteps.ts
27146
27371
  function getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep) {
@@ -27200,66 +27425,68 @@ function toRegistrationEvents(events) {
27200
27425
  // ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
27201
27426
  var EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS = ["Date", "Tickets", "Details"];
27202
27427
  var EVENT_REGISTRATION_SHELL_STEP_LABELS = ["Event", "Date", "Tickets", "Details", "Payment"];
27203
- var contentEntrySchema = z46.object({
27204
- id: z46.string(),
27205
- slug: z46.string(),
27206
- contentTypeSlug: z46.string()
27428
+ var contentEntrySchema = z47.object({
27429
+ id: z47.string(),
27430
+ slug: z47.string(),
27431
+ contentTypeSlug: z47.string()
27207
27432
  });
27208
- var eventRegistrationPublicEventSchema = z46.preprocess(
27433
+ var eventRegistrationPublicEventSchema = z47.preprocess(
27209
27434
  normalizeEventRegistrationEventInput,
27210
27435
  publicEventSchema
27211
27436
  );
27212
- var eventRegistrationSourceSchema = z46.object({
27213
- siteId: z46.string().optional(),
27214
- apiBaseUrl: z46.string().optional(),
27215
- portalToken: z46.string().nullable().optional(),
27216
- previewToken: z46.string().nullable().optional(),
27437
+ var eventRegistrationSourceSchema = z47.object({
27438
+ siteId: z47.string().optional(),
27439
+ apiBaseUrl: z47.string().optional(),
27440
+ portalToken: z47.string().nullable().optional(),
27441
+ previewToken: z47.string().nullable().optional(),
27217
27442
  occurrenceContext: occurrenceContextSchema.optional(),
27218
27443
  contentEntry: contentEntrySchema.nullable().optional(),
27219
- events: z46.array(eventRegistrationPublicEventSchema).nullable().optional(),
27220
- className: z46.string().nullable().optional(),
27221
- buttonText: z46.string().nullable().optional(),
27222
- maxTickets: z46.string().nullable().optional(),
27223
- showVenue: z46.boolean().optional(),
27224
- showCapacity: z46.boolean().optional(),
27225
- successMessage: z46.string().optional(),
27226
- waitlistMessage: z46.string().optional(),
27444
+ events: z47.array(eventRegistrationPublicEventSchema).nullable().optional(),
27445
+ className: z47.string().nullable().optional(),
27446
+ buttonText: z47.string().nullable().optional(),
27447
+ maxTickets: z47.string().nullable().optional(),
27448
+ showVenue: z47.boolean().optional(),
27449
+ showCapacity: z47.boolean().optional(),
27450
+ successMessage: z47.string().optional(),
27451
+ waitlistMessage: z47.string().optional(),
27227
27452
  buttonVariant: registrationButtonVariantSchema.optional(),
27228
- spamProtectionEnabled: z46.boolean().optional(),
27453
+ overlayEnabled: z47.boolean().optional(),
27454
+ spamProtectionEnabled: z47.boolean().optional(),
27229
27455
  stage: previewStageSchema.optional(),
27230
- supportEmail: z46.string().optional()
27456
+ supportEmail: z47.string().optional()
27231
27457
  });
27232
- var eventRegistrationDisplaySchema = z46.object({
27233
- kind: z46.literal("event-registration"),
27234
- state: z46.literal("generic-shell"),
27235
- className: z46.string().nullable(),
27236
- titleText: z46.string(),
27237
- bodyText: z46.string(),
27238
- stepLabels: z46.array(z46.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
27239
- summaryButtonText: z46.string()
27458
+ var eventRegistrationDisplaySchema = z47.object({
27459
+ kind: z47.literal("event-registration"),
27460
+ state: z47.literal("generic-shell"),
27461
+ className: z47.string().nullable(),
27462
+ titleText: z47.string(),
27463
+ bodyText: z47.string(),
27464
+ stepLabels: z47.array(z47.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
27465
+ summaryButtonText: z47.string()
27240
27466
  });
27241
- var eventRegistrationHydrationSchema = z46.object({
27467
+ var eventRegistrationHydrationSchema = z47.object({
27242
27468
  occurrenceContext: occurrenceContextSchema.optional(),
27243
27469
  contentEntry: contentEntrySchema.nullable().optional(),
27244
- events: z46.array(eventRegistrationPublicEventSchema).nullable().optional(),
27245
- maxTickets: z46.string().optional(),
27246
- showVenue: z46.boolean().optional(),
27247
- showCapacity: z46.boolean().optional(),
27248
- successMessage: z46.string().optional(),
27249
- waitlistMessage: z46.string().optional(),
27470
+ events: z47.array(eventRegistrationPublicEventSchema).nullable().optional(),
27471
+ maxTickets: z47.string().optional(),
27472
+ showVenue: z47.boolean().optional(),
27473
+ showCapacity: z47.boolean().optional(),
27474
+ successMessage: z47.string().optional(),
27475
+ waitlistMessage: z47.string().optional(),
27250
27476
  buttonVariant: registrationButtonVariantSchema.optional(),
27251
- spamProtectionEnabled: z46.boolean().optional(),
27252
- supportEmail: z46.string().optional()
27477
+ overlayEnabled: z47.boolean().optional(),
27478
+ spamProtectionEnabled: z47.boolean().optional(),
27479
+ supportEmail: z47.string().optional()
27253
27480
  });
27254
- var eventRegistrationRenderSchema = z46.object({
27481
+ var eventRegistrationRenderSchema = z47.object({
27255
27482
  display: eventRegistrationDisplaySchema,
27256
27483
  hydration: eventRegistrationHydrationSchema
27257
27484
  });
27258
- var eventRegistrationIslandMetaCodec = createZodCodec(z46.object({
27259
- siteId: z46.string().optional(),
27260
- apiBaseUrl: z46.string().optional(),
27261
- portalToken: z46.string().nullable().optional(),
27262
- previewToken: z46.string().nullable().optional(),
27485
+ var eventRegistrationIslandMetaCodec = createZodCodec(z47.object({
27486
+ siteId: z47.string().optional(),
27487
+ apiBaseUrl: z47.string().optional(),
27488
+ portalToken: z47.string().nullable().optional(),
27489
+ previewToken: z47.string().nullable().optional(),
27263
27490
  stage: previewStageSchema.optional()
27264
27491
  }));
27265
27492
  var eventRegistrationIslandMetaKeys = defineInteractiveIslandMetaKeys(
@@ -27363,6 +27590,7 @@ var eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
27363
27590
  successMessage: source.successMessage,
27364
27591
  waitlistMessage: source.waitlistMessage,
27365
27592
  buttonVariant: source.buttonVariant,
27593
+ overlayEnabled: source.overlayEnabled,
27366
27594
  spamProtectionEnabled: source.spamProtectionEnabled,
27367
27595
  supportEmail: source.supportEmail
27368
27596
  }
@@ -27552,6 +27780,12 @@ var eventRegistrationManifest = createBlockManifest({
27552
27780
  buttonVariant: {
27553
27781
  $bind: { from: "content.buttonVariant", fallback: "primary" }
27554
27782
  },
27783
+ overlayEnabled: {
27784
+ $bind: {
27785
+ from: "$root.eventRegistrationOverlayEnabled",
27786
+ fallback: false
27787
+ }
27788
+ },
27555
27789
  // Event data from loader
27556
27790
  events: { $bind: { from: "data.events" } },
27557
27791
  // Stage for preview mode (allows registering for draft events)
@@ -27572,7 +27806,7 @@ var eventRegistrationBlockDefinition = {
27572
27806
  manifest: eventRegistrationManifest,
27573
27807
  runtime: eventRegistrationBlockRuntime,
27574
27808
  dataSchemas: {
27575
- events: z47.array(publicEventSchema).optional(),
27809
+ events: z48.array(publicEventSchema).optional(),
27576
27810
  occurrenceContext: occurrenceContextSchema.optional()
27577
27811
  },
27578
27812
  dataLoaders: {
@@ -27699,29 +27933,7 @@ function resolveCoursePricingState(course, selectedPricingOptionId, nowInput = {
27699
27933
  }
27700
27934
  }
27701
27935
  function formatCoursePriceDisplay(display, locale) {
27702
- switch (display.kind) {
27703
- case "free":
27704
- return "Free";
27705
- case "unavailable":
27706
- return "Pricing unavailable";
27707
- case "exact":
27708
- return formatCourseCurrencyAmount(display.amount, display.currency, { locale });
27709
- case "from":
27710
- return `From ${formatCourseCurrencyAmount(display.amount, display.currency, { locale })}`;
27711
- }
27712
- }
27713
- function formatCourseCurrencyAmount(amount, currency, options) {
27714
- const {
27715
- locale = "en-US",
27716
- minimumFractionDigits,
27717
- maximumFractionDigits
27718
- } = options ?? {};
27719
- return new Intl.NumberFormat(locale, {
27720
- style: "currency",
27721
- currency: currency.toUpperCase(),
27722
- ...minimumFractionDigits === void 0 ? {} : { minimumFractionDigits },
27723
- ...maximumFractionDigits === void 0 ? {} : { maximumFractionDigits }
27724
- }).format(amount / 100);
27936
+ return formatBookingPriceDisplay(display, { decimals: "exact", locale });
27725
27937
  }
27726
27938
  function formatCoursePriceAmount(amount, currency, locale) {
27727
27939
  return formatCoursePriceDisplay(
@@ -27731,73 +27943,73 @@ function formatCoursePriceAmount(amount, currency, locale) {
27731
27943
  }
27732
27944
 
27733
27945
  // ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
27734
- import { z as z48 } from "zod";
27735
- var contentEntrySchema2 = z48.object({
27736
- id: z48.string(),
27737
- slug: z48.string(),
27738
- contentTypeSlug: z48.string()
27946
+ import { z as z49 } from "zod";
27947
+ var contentEntrySchema2 = z49.object({
27948
+ id: z49.string(),
27949
+ slug: z49.string(),
27950
+ contentTypeSlug: z49.string()
27739
27951
  });
27740
- var courseEntrySubrouteContextSchema = z48.union([
27741
- z48.object({
27742
- kind: z48.literal("course-run"),
27743
- run: z48.object({
27744
- courseId: z48.string(),
27745
- seriesId: z48.string(),
27746
- runSlug: z48.string(),
27747
- runName: z48.string().nullable()
27952
+ var courseEntrySubrouteContextSchema = z49.union([
27953
+ z49.object({
27954
+ kind: z49.literal("course-run"),
27955
+ run: z49.object({
27956
+ courseId: z49.string(),
27957
+ seriesId: z49.string(),
27958
+ runSlug: z49.string(),
27959
+ runName: z49.string().nullable()
27748
27960
  })
27749
27961
  }),
27750
- z48.object({
27751
- kind: z48.literal("event-occurrence"),
27962
+ z49.object({
27963
+ kind: z49.literal("event-occurrence"),
27752
27964
  occurrence: occurrenceContextSchema
27753
27965
  })
27754
27966
  ]);
27755
- var courseRegistrationSourceSchema = z48.object({
27756
- siteId: z48.string().optional(),
27757
- apiBaseUrl: z48.string().optional(),
27758
- portalToken: z48.string().nullable().optional(),
27967
+ var courseRegistrationSourceSchema = z49.object({
27968
+ siteId: z49.string().optional(),
27969
+ apiBaseUrl: z49.string().optional(),
27970
+ portalToken: z49.string().nullable().optional(),
27759
27971
  contentEntry: contentEntrySchema2.nullable().optional(),
27760
27972
  entrySubrouteContext: courseEntrySubrouteContextSchema.nullable().optional(),
27761
- courses: z48.array(publicCourseSchema).nullable().optional(),
27762
- className: z48.string().nullable().optional(),
27763
- showSessions: z48.boolean().optional(),
27764
- showPrice: z48.boolean().optional(),
27765
- showCapacity: z48.boolean().optional(),
27766
- showVenue: z48.boolean().optional(),
27767
- successMessage: z48.string().optional(),
27768
- waitlistMessage: z48.string().optional(),
27769
- membershipMessage: z48.string().optional(),
27770
- buttonText: z48.string().nullable().optional(),
27973
+ courses: z49.array(publicCourseSchema).nullable().optional(),
27974
+ className: z49.string().nullable().optional(),
27975
+ showSessions: z49.boolean().optional(),
27976
+ showPrice: z49.boolean().optional(),
27977
+ showCapacity: z49.boolean().optional(),
27978
+ showVenue: z49.boolean().optional(),
27979
+ successMessage: z49.string().optional(),
27980
+ waitlistMessage: z49.string().optional(),
27981
+ membershipMessage: z49.string().optional(),
27982
+ buttonText: z49.string().nullable().optional(),
27771
27983
  buttonVariant: registrationButtonVariantSchema.optional(),
27772
27984
  stage: previewStageSchema.optional()
27773
27985
  });
27774
- var courseRegistrationDisplaySchema = z48.object({
27775
- kind: z48.literal("course-registration"),
27776
- state: z48.literal("shell"),
27777
- className: z48.string().nullable(),
27778
- summaryButtonText: z48.string()
27986
+ var courseRegistrationDisplaySchema = z49.object({
27987
+ kind: z49.literal("course-registration"),
27988
+ state: z49.literal("shell"),
27989
+ className: z49.string().nullable(),
27990
+ summaryButtonText: z49.string()
27779
27991
  });
27780
- var courseRegistrationHydrationSchema = z48.object({
27992
+ var courseRegistrationHydrationSchema = z49.object({
27781
27993
  contentEntry: contentEntrySchema2.nullable().optional(),
27782
27994
  entrySubrouteContext: courseEntrySubrouteContextSchema.nullable().optional(),
27783
- courses: z48.array(publicCourseSchema).nullable().optional(),
27784
- showSessions: z48.boolean().optional(),
27785
- showPrice: z48.boolean().optional(),
27786
- showCapacity: z48.boolean().optional(),
27787
- showVenue: z48.boolean().optional(),
27788
- successMessage: z48.string().optional(),
27789
- waitlistMessage: z48.string().optional(),
27790
- membershipMessage: z48.string().optional(),
27995
+ courses: z49.array(publicCourseSchema).nullable().optional(),
27996
+ showSessions: z49.boolean().optional(),
27997
+ showPrice: z49.boolean().optional(),
27998
+ showCapacity: z49.boolean().optional(),
27999
+ showVenue: z49.boolean().optional(),
28000
+ successMessage: z49.string().optional(),
28001
+ waitlistMessage: z49.string().optional(),
28002
+ membershipMessage: z49.string().optional(),
27791
28003
  buttonVariant: registrationButtonVariantSchema.optional()
27792
28004
  });
27793
- var courseRegistrationRenderSchema = z48.object({
28005
+ var courseRegistrationRenderSchema = z49.object({
27794
28006
  display: courseRegistrationDisplaySchema,
27795
28007
  hydration: courseRegistrationHydrationSchema
27796
28008
  });
27797
- var courseRegistrationIslandMetaCodec = createZodCodec(z48.object({
27798
- siteId: z48.string().optional(),
27799
- apiBaseUrl: z48.string().optional(),
27800
- portalToken: z48.string().nullable().optional(),
28009
+ var courseRegistrationIslandMetaCodec = createZodCodec(z49.object({
28010
+ siteId: z49.string().optional(),
28011
+ apiBaseUrl: z49.string().optional(),
28012
+ portalToken: z49.string().nullable().optional(),
27801
28013
  stage: previewStageSchema.optional()
27802
28014
  }));
27803
28015
  var courseRegistrationIslandMetaKeys = defineInteractiveIslandMetaKeys(
@@ -28070,32 +28282,32 @@ var courseRegistrationBlockDefinition = {
28070
28282
  };
28071
28283
 
28072
28284
  // ../blocks/src/system/blocks/event-details.ts
28073
- import { z as z50 } from "zod";
28285
+ import { z as z51 } from "zod";
28074
28286
 
28075
28287
  // ../blocks/src/system/blocks/shop.shared.ts
28076
- import { z as z49 } from "zod";
28077
- var publicPassProductSchema = z49.object({
28078
- id: z49.string(),
28079
- productUseCase: z49.enum(["event_pass", "appointment_package"]).default("event_pass"),
28080
- name: z49.string(),
28081
- description: z49.string().nullable(),
28082
- price: z49.number(),
28083
- currency: z49.string(),
28084
- creditsTotal: z49.number(),
28085
- pricePerCredit: z49.number(),
28086
- validDays: z49.number().nullable(),
28087
- eligibleCategoryIds: z49.array(z49.string()),
28088
- eligibleCategoryNames: z49.array(z49.string())
28288
+ import { z as z50 } from "zod";
28289
+ var publicPassProductSchema = z50.object({
28290
+ id: z50.string(),
28291
+ productUseCase: z50.enum(["event_pass", "appointment_package"]).default("event_pass"),
28292
+ name: z50.string(),
28293
+ description: z50.string().nullable(),
28294
+ price: z50.number(),
28295
+ currency: z50.string(),
28296
+ creditsTotal: z50.number(),
28297
+ pricePerCredit: z50.number(),
28298
+ validDays: z50.number().nullable(),
28299
+ eligibleCategoryIds: z50.array(z50.string()),
28300
+ eligibleCategoryNames: z50.array(z50.string())
28089
28301
  });
28090
- var publicMembershipProductSchema = z49.object({
28091
- id: z49.string(),
28092
- name: z49.string(),
28093
- description: z49.string().nullable(),
28094
- price: z49.number(),
28095
- currency: z49.string(),
28096
- billingInterval: z49.enum(["month", "year"]),
28097
- eligibleCategoryIds: z49.array(z49.string()),
28098
- eligibleCategoryNames: z49.array(z49.string())
28302
+ var publicMembershipProductSchema = z50.object({
28303
+ id: z50.string(),
28304
+ name: z50.string(),
28305
+ description: z50.string().nullable(),
28306
+ price: z50.number(),
28307
+ currency: z50.string(),
28308
+ billingInterval: z50.enum(["month", "year"]),
28309
+ eligibleCategoryIds: z50.array(z50.string()),
28310
+ eligibleCategoryNames: z50.array(z50.string())
28099
28311
  });
28100
28312
 
28101
28313
  // ../blocks/src/system/blocks/event-details.ts
@@ -28230,40 +28442,40 @@ var eventDetailsManifest = createBlockManifest({
28230
28442
  })
28231
28443
  ]
28232
28444
  });
28233
- var occurrenceContextSchema2 = z50.object({
28234
- id: z50.string(),
28235
- seriesId: z50.string(),
28236
- startsAt: z50.string(),
28237
- endsAt: z50.string(),
28238
- timeZone: z50.string(),
28239
- capacityOverride: z50.number().nullable().optional(),
28240
- overrides: z50.record(z50.string(), z50.unknown()).nullable().optional()
28445
+ var occurrenceContextSchema2 = z51.object({
28446
+ id: z51.string(),
28447
+ seriesId: z51.string(),
28448
+ startsAt: z51.string(),
28449
+ endsAt: z51.string(),
28450
+ timeZone: z51.string(),
28451
+ capacityOverride: z51.number().nullable().optional(),
28452
+ overrides: z51.record(z51.string(), z51.unknown()).nullable().optional()
28241
28453
  }).nullable();
28242
- var eventAutoApplyDiscountPreviewBaseSchema = z50.object({
28243
- id: z50.string(),
28244
- publicLabel: z50.string(),
28245
- description: z50.string().nullable(),
28246
- minTicketsRequired: z50.number().nullable()
28454
+ var eventAutoApplyDiscountPreviewBaseSchema = z51.object({
28455
+ id: z51.string(),
28456
+ publicLabel: z51.string(),
28457
+ description: z51.string().nullable(),
28458
+ minTicketsRequired: z51.number().nullable()
28247
28459
  });
28248
- var eventAutoApplyDiscountPreviewSchema = z50.discriminatedUnion("discountType", [
28460
+ var eventAutoApplyDiscountPreviewSchema = z51.discriminatedUnion("discountType", [
28249
28461
  eventAutoApplyDiscountPreviewBaseSchema.extend({
28250
- discountType: z50.literal("percent"),
28251
- discountPercent: z50.number(),
28252
- discountAmountCents: z50.null()
28462
+ discountType: z51.literal("percent"),
28463
+ discountPercent: z51.number(),
28464
+ discountAmountCents: z51.null()
28253
28465
  }),
28254
28466
  eventAutoApplyDiscountPreviewBaseSchema.extend({
28255
- discountType: z50.literal("fixed"),
28256
- discountPercent: z50.null(),
28257
- discountAmountCents: z50.number()
28467
+ discountType: z51.literal("fixed"),
28468
+ discountPercent: z51.null(),
28469
+ discountAmountCents: z51.number()
28258
28470
  })
28259
28471
  ]);
28260
28472
  var eventDetailsBlockDefinition = {
28261
28473
  manifest: eventDetailsManifest,
28262
28474
  dataSchemas: {
28263
- eventDetailsData: z50.object({
28475
+ eventDetailsData: z51.object({
28264
28476
  events: publicEventsArraySchema,
28265
- sitePasses: z50.object({ passes: z50.array(publicPassProductSchema) }),
28266
- siteMemberships: z50.object({ memberships: z50.array(publicMembershipProductSchema) }),
28477
+ sitePasses: z51.object({ passes: z51.array(publicPassProductSchema) }),
28478
+ siteMemberships: z51.object({ memberships: z51.array(publicMembershipProductSchema) }),
28267
28479
  autoApplyDiscount: eventAutoApplyDiscountPreviewSchema.nullable().optional().default(null)
28268
28480
  }).optional(),
28269
28481
  occurrenceContext: occurrenceContextSchema2.optional()
@@ -28587,7 +28799,7 @@ var eventSpotlightBlockDefinition = {
28587
28799
  };
28588
28800
 
28589
28801
  // ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
28590
- import { z as z52 } from "zod";
28802
+ import { z as z53 } from "zod";
28591
28803
 
28592
28804
  // ../calendar/src/grid.ts
28593
28805
  var DAY_NAMES = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
@@ -28753,15 +28965,15 @@ function getLocalMinuteOfDay(isoTimestamp, timeZone) {
28753
28965
  const date = new Date(isoTimestamp);
28754
28966
  if (Number.isNaN(date.getTime())) return NaN;
28755
28967
  if (!isValidTimeZone2(timeZone)) return NaN;
28756
- const parts = new Intl.DateTimeFormat("en-US", {
28968
+ const parts = new Intl.DateTimeFormat("en-GB", {
28757
28969
  timeZone,
28758
28970
  hour: "2-digit",
28759
28971
  minute: "2-digit",
28760
- hour12: false,
28761
28972
  hourCycle: "h23"
28762
28973
  }).formatToParts(date);
28763
- const hour = Number(parts.find((part) => part.type === "hour")?.value);
28974
+ const hourPart = Number(parts.find((part) => part.type === "hour")?.value);
28764
28975
  const minute = Number(parts.find((part) => part.type === "minute")?.value);
28976
+ const hour = hourPart === 24 ? 0 : hourPart;
28765
28977
  if (Number.isNaN(hour) || Number.isNaN(minute)) return NaN;
28766
28978
  return hour * MINUTES_PER_HOUR + minute;
28767
28979
  }
@@ -29193,45 +29405,8 @@ function groupEventsByDate(events) {
29193
29405
  }
29194
29406
  return map;
29195
29407
  }
29196
- function formatCompactCurrencyAmount(amount, currency) {
29197
- return formatCourseCurrencyAmount(amount, currency, {
29198
- minimumFractionDigits: 0,
29199
- maximumFractionDigits: 2
29200
- });
29201
- }
29202
- function formatCourseEventPriceDisplay(display) {
29203
- if (display.kind !== "course") {
29204
- return "Course";
29205
- }
29206
- if (display.display.kind === "exact" || display.display.kind === "from") {
29207
- const amountLabel = formatCompactCurrencyAmount(
29208
- display.display.amount,
29209
- display.display.currency
29210
- );
29211
- return display.display.kind === "from" ? `Course (From ${amountLabel})` : `Course (${amountLabel})`;
29212
- }
29213
- return "Course";
29214
- }
29215
- function formatPublicEventPriceDisplay(display) {
29216
- switch (display.kind) {
29217
- case "free":
29218
- return "Free";
29219
- case "exact":
29220
- return formatCompactCurrencyAmount(display.amount, display.currency);
29221
- case "from":
29222
- return `From ${formatCompactCurrencyAmount(display.amount, display.currency)}`;
29223
- case "mixed":
29224
- return `Free / From ${formatCompactCurrencyAmount(display.paidFromAmount, display.currency)}`;
29225
- case "unavailable":
29226
- return "Pricing unavailable";
29227
- case "course":
29228
- return formatCourseEventPriceDisplay(display);
29229
- }
29230
- }
29231
29408
  function formatEventPrice(event) {
29232
- return formatPublicEventPriceDisplay(
29233
- publicEventPricingDisplay(resolveRuntimeEventPricing(event))
29234
- );
29409
+ return formatEventPricing(resolveRuntimeEventPricing(event), { decimals: "auto" });
29235
29410
  }
29236
29411
  function resolveEventCta(event, buttonText) {
29237
29412
  const { isFull: isSoldOut } = getEventAvailability(event);
@@ -30809,16 +30984,16 @@ function DateTimeTile({ startsAt, endsAt, timeZone }) {
30809
30984
  }
30810
30985
 
30811
30986
  // ../blocks/src/system/runtime/nodes/events/shared/listOptions.ts
30812
- import { z as z51 } from "zod";
30987
+ import { z as z52 } from "zod";
30813
30988
  var eventPageSizeValues = [3, 6, 10, 12, 20, 24, 30];
30814
- var eventPageSizeSchema = z51.union([
30815
- z51.literal(3),
30816
- z51.literal(6),
30817
- z51.literal(10),
30818
- z51.literal(12),
30819
- z51.literal(20),
30820
- z51.literal(24),
30821
- z51.literal(30)
30989
+ var eventPageSizeSchema = z52.union([
30990
+ z52.literal(3),
30991
+ z52.literal(6),
30992
+ z52.literal(10),
30993
+ z52.literal(12),
30994
+ z52.literal(20),
30995
+ z52.literal(24),
30996
+ z52.literal(30)
30822
30997
  ]);
30823
30998
  var eventPageSizeSet = new Set(eventPageSizeValues);
30824
30999
  function resolveEventPageSize(value, fallback2 = 12) {
@@ -30828,15 +31003,15 @@ function resolveEventPageSize(value, fallback2 = 12) {
30828
31003
  function resolveEventCalendarListPageSize(input) {
30829
31004
  return resolveEventPageSize(input.eventsPerPage);
30830
31005
  }
30831
- var eventListPaginationActionSchema = z51.discriminatedUnion("kind", [
30832
- z51.object({
30833
- kind: z51.literal("loadMore"),
30834
- label: z51.string()
31006
+ var eventListPaginationActionSchema = z52.discriminatedUnion("kind", [
31007
+ z52.object({
31008
+ kind: z52.literal("loadMore"),
31009
+ label: z52.string()
30835
31010
  }),
30836
- z51.object({
30837
- kind: z51.literal("seeAllLink"),
30838
- label: z51.string(),
30839
- href: z51.string()
31011
+ z52.object({
31012
+ kind: z52.literal("seeAllLink"),
31013
+ label: z52.string(),
31014
+ href: z52.string()
30840
31015
  })
30841
31016
  ]);
30842
31017
  function resolveEventListPaginationAction(input) {
@@ -30849,89 +31024,89 @@ function resolveEventListPaginationAction(input) {
30849
31024
  }
30850
31025
 
30851
31026
  // ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
30852
- var legacyEventCardVariantSchema = z52.enum(["variant1", "variant2"]);
30853
- var eventCardVariantInputSchema = z52.union([
31027
+ var legacyEventCardVariantSchema = z53.enum(["variant1", "variant2"]);
31028
+ var eventCardVariantInputSchema = z53.union([
30854
31029
  cardVariantRoleSchema,
30855
31030
  legacyEventCardVariantSchema
30856
31031
  ]);
30857
- var cardOrientationSchema = z52.enum(["vertical", "horizontal"]);
30858
- var eventBlockKindSchema = z52.enum(eventBlockKindValues);
30859
- var eventSurfaceScopeSchema = z52.enum(eventSurfaceScopeValues);
30860
- var eventScheduleScopeSchema2 = z52.enum(eventScheduleScopeValues);
30861
- var eventListingSourceSchema = z52.object({
30862
- events: z52.array(publicEventSchema).nullable().optional(),
30863
- siteId: z52.string(),
30864
- apiBaseUrl: z52.string().optional(),
31032
+ var cardOrientationSchema = z53.enum(["vertical", "horizontal"]);
31033
+ var eventBlockKindSchema = z53.enum(eventBlockKindValues);
31034
+ var eventSurfaceScopeSchema = z53.enum(eventSurfaceScopeValues);
31035
+ var eventScheduleScopeSchema2 = z53.enum(eventScheduleScopeValues);
31036
+ var eventListingSourceSchema = z53.object({
31037
+ events: z53.array(publicEventSchema).nullable().optional(),
31038
+ siteId: z53.string(),
31039
+ apiBaseUrl: z53.string().optional(),
30865
31040
  stage: previewStageSchema.optional(),
30866
31041
  layout: eventLayoutSchema.optional(),
30867
31042
  columns: columnOptionSchema.optional(),
30868
- eventsPerPage: z52.string().optional(),
30869
- paginationMode: z52.enum(["loadMore", "seeAllLink"]).optional(),
30870
- seeAllUrl: z52.string().optional(),
30871
- loadMoreText: z52.string().optional(),
31043
+ eventsPerPage: z53.string().optional(),
31044
+ paginationMode: z53.enum(["loadMore", "seeAllLink"]).optional(),
31045
+ seeAllUrl: z53.string().optional(),
31046
+ loadMoreText: z53.string().optional(),
30872
31047
  cardVariant: eventCardVariantInputSchema.optional(),
30873
31048
  buttonVariant: eventButtonVariantSchema.optional(),
30874
- buttonText: z52.string().optional(),
30875
- showVenue: z52.boolean().optional(),
30876
- showMap: z52.boolean().optional(),
30877
- showCapacity: z52.boolean().optional(),
30878
- emptyMessage: z52.string().optional(),
30879
- className: z52.string().optional(),
30880
- showFilters: z52.boolean().nullable().optional(),
31049
+ buttonText: z53.string().optional(),
31050
+ showVenue: z53.boolean().optional(),
31051
+ showMap: z53.boolean().optional(),
31052
+ showCapacity: z53.boolean().optional(),
31053
+ emptyMessage: z53.string().optional(),
31054
+ className: z53.string().optional(),
31055
+ showFilters: z53.boolean().nullable().optional(),
30881
31056
  showCategoryFilter: filterAutoShowSchema.optional(),
30882
- showVenueFilter: z52.boolean().nullable().optional(),
30883
- showStaffFilter: z52.boolean().nullable().optional(),
31057
+ showVenueFilter: z53.boolean().nullable().optional(),
31058
+ showStaffFilter: z53.boolean().nullable().optional(),
30884
31059
  eventKind: eventBlockKindSchema.nullable().optional(),
30885
31060
  eventSurface: eventSurfaceScopeSchema.nullable().optional(),
30886
- filterEventPresets: z52.union([z52.string(), z52.array(z52.string())]).nullable().optional(),
31061
+ filterEventPresets: z53.union([z53.string(), z53.array(z53.string())]).nullable().optional(),
30887
31062
  scheduleScope: eventScheduleScopeSchema2.nullable().optional(),
30888
- filterCategoryIds: z52.string().nullable().optional(),
30889
- filterStaffMemberId: z52.string().nullable().optional(),
30890
- filterVenueId: z52.string().nullable().optional()
31063
+ filterCategoryIds: z53.string().nullable().optional(),
31064
+ filterStaffMemberId: z53.string().nullable().optional(),
31065
+ filterVenueId: z53.string().nullable().optional()
30891
31066
  });
30892
- var eventListingDisplaySchema = z52.object({
30893
- kind: z52.literal("event-listing"),
30894
- state: z52.enum(["loading", "empty", "ready"]),
31067
+ var eventListingDisplaySchema = z53.object({
31068
+ kind: z53.literal("event-listing"),
31069
+ state: z53.enum(["loading", "empty", "ready"]),
30895
31070
  listLayout: eventLayoutSchema,
30896
- className: z52.string().nullable(),
30897
- emptyMessage: z52.string(),
30898
- loadingMessage: z52.string(),
30899
- containerClass: z52.string(),
31071
+ className: z53.string().nullable(),
31072
+ emptyMessage: z53.string(),
31073
+ loadingMessage: z53.string(),
31074
+ containerClass: z53.string(),
30900
31075
  cardVariant: cardVariantRoleSchema,
30901
31076
  buttonVariant: eventButtonVariantSchema,
30902
- buttonText: z52.string(),
30903
- showVenue: z52.boolean(),
30904
- showMap: z52.boolean(),
30905
- showCapacity: z52.boolean(),
31077
+ buttonText: z53.string(),
31078
+ showVenue: z53.boolean(),
31079
+ showMap: z53.boolean(),
31080
+ showCapacity: z53.boolean(),
30906
31081
  orientation: cardOrientationSchema,
30907
- events: z52.array(publicEventSchema)
31082
+ events: z53.array(publicEventSchema)
30908
31083
  });
30909
- var eventListingHydrationSchema = z52.object({
30910
- siteId: z52.string(),
31084
+ var eventListingHydrationSchema = z53.object({
31085
+ siteId: z53.string(),
30911
31086
  stage: previewStageSchema.optional(),
30912
31087
  eventsPerPage: eventPageSizeSchema,
30913
31088
  paginationAction: eventListPaginationActionSchema,
30914
- showFilters: z52.boolean(),
31089
+ showFilters: z53.boolean(),
30915
31090
  showCategoryFilter: filterAutoShowSchema,
30916
- showVenueFilter: z52.boolean(),
30917
- showStaffFilter: z52.boolean(),
31091
+ showVenueFilter: z53.boolean(),
31092
+ showStaffFilter: z53.boolean(),
30918
31093
  eventKind: eventBlockKindSchema,
30919
31094
  eventSurface: eventSurfaceScopeSchema,
30920
- filterEventPresets: z52.string().nullable(),
31095
+ filterEventPresets: z53.string().nullable(),
30921
31096
  scheduleScope: eventScheduleScopeSchema2,
30922
- filterCategoryIds: z52.string().nullable().optional(),
30923
- filterStaffMemberId: z52.string().nullable().optional(),
30924
- filterVenueId: z52.string().nullable().optional(),
30925
- fetchInitialEventsOnMount: z52.boolean()
31097
+ filterCategoryIds: z53.string().nullable().optional(),
31098
+ filterStaffMemberId: z53.string().nullable().optional(),
31099
+ filterVenueId: z53.string().nullable().optional(),
31100
+ fetchInitialEventsOnMount: z53.boolean()
30926
31101
  });
30927
- var eventListingRenderSchema = z52.object({
31102
+ var eventListingRenderSchema = z53.object({
30928
31103
  display: eventListingDisplaySchema,
30929
31104
  hydration: eventListingHydrationSchema
30930
31105
  });
30931
31106
  var eventListingIslandMetaCodec = createZodCodec(
30932
- z52.object({
30933
- siteId: z52.string(),
30934
- apiBaseUrl: z52.string().optional(),
31107
+ z53.object({
31108
+ siteId: z53.string(),
31109
+ apiBaseUrl: z53.string().optional(),
30935
31110
  stage: previewStageSchema.optional()
30936
31111
  })
30937
31112
  );
@@ -31310,15 +31485,15 @@ var eventListingBlockDefinition = {
31310
31485
  };
31311
31486
 
31312
31487
  // ../blocks/src/system/runtime/nodes/events/EventCalendar.interactive.ts
31313
- import { z as z53 } from "zod";
31314
- var eventBlockKindSchema2 = z53.enum(eventBlockKindValues);
31315
- var eventSurfaceScopeSchema2 = z53.enum(eventSurfaceScopeValues);
31316
- var eventScheduleScopeSchema3 = z53.enum(eventScheduleScopeValues);
31317
- var eventCalendarSourceSchema = z53.object(
31488
+ import { z as z54 } from "zod";
31489
+ var eventBlockKindSchema2 = z54.enum(eventBlockKindValues);
31490
+ var eventSurfaceScopeSchema2 = z54.enum(eventSurfaceScopeValues);
31491
+ var eventScheduleScopeSchema3 = z54.enum(eventScheduleScopeValues);
31492
+ var eventCalendarSourceSchema = z54.object(
31318
31493
  {
31319
- events: z53.array(publicEventSchema).nullable().optional(),
31320
- siteId: z53.string(),
31321
- apiBaseUrl: z53.string().optional(),
31494
+ events: z54.array(publicEventSchema).nullable().optional(),
31495
+ siteId: z54.string(),
31496
+ apiBaseUrl: z54.string().optional(),
31322
31497
  stage: previewStageSchema.optional(),
31323
31498
  variant: eventCalendarDisplayModeSchema.nullable().optional(),
31324
31499
  displayMode: eventCalendarDisplayModeSchema.nullable().optional(),
@@ -31326,78 +31501,78 @@ var eventCalendarSourceSchema = z53.object(
31326
31501
  listColumns: columnOptionSchema.optional(),
31327
31502
  layout: eventLayoutSchema.optional(),
31328
31503
  columns: columnOptionSchema.optional(),
31329
- eventsPerPage: z53.string().optional(),
31330
- paginationMode: z53.enum(["loadMore", "seeAllLink"]).optional(),
31331
- seeAllUrl: z53.string().optional(),
31332
- loadMoreText: z53.string().optional(),
31504
+ eventsPerPage: z54.string().optional(),
31505
+ paginationMode: z54.enum(["loadMore", "seeAllLink"]).optional(),
31506
+ seeAllUrl: z54.string().optional(),
31507
+ loadMoreText: z54.string().optional(),
31333
31508
  startOfWeek: weekStartSchema.optional(),
31334
31509
  calendarTabViews: calendarTabViewsSchema.optional(),
31335
- showFilters: z53.boolean().nullable().optional(),
31510
+ showFilters: z54.boolean().nullable().optional(),
31336
31511
  showCategoryFilter: filterAutoShowSchema.optional(),
31337
- showVenueFilter: z53.boolean().nullable().optional(),
31338
- showStaffFilter: z53.boolean().nullable().optional(),
31512
+ showVenueFilter: z54.boolean().nullable().optional(),
31513
+ showStaffFilter: z54.boolean().nullable().optional(),
31339
31514
  kind: eventBlockKindSchema2.nullable().optional(),
31340
31515
  eventSurface: eventSurfaceScopeSchema2.nullable().optional(),
31341
- filterEventPresets: z53.union([z53.string(), z53.array(z53.string())]).nullable().optional(),
31516
+ filterEventPresets: z54.union([z54.string(), z54.array(z54.string())]).nullable().optional(),
31342
31517
  scheduleScope: eventScheduleScopeSchema3.nullable().optional(),
31343
- filterCategoryIds: z53.union([z53.string(), z53.array(z53.string())]).nullable().optional(),
31344
- filterStaffMemberId: z53.string().nullable().optional(),
31345
- filterVenueId: z53.string().nullable().optional(),
31518
+ filterCategoryIds: z54.union([z54.string(), z54.array(z54.string())]).nullable().optional(),
31519
+ filterStaffMemberId: z54.string().nullable().optional(),
31520
+ filterVenueId: z54.string().nullable().optional(),
31346
31521
  buttonVariant: eventButtonVariantSchema.optional(),
31347
- buttonText: z53.string().optional(),
31348
- showVenue: z53.boolean().nullable().optional(),
31349
- showMap: z53.boolean().nullable().optional(),
31350
- showCapacity: z53.boolean().nullable().optional(),
31351
- emptyMessage: z53.string().optional(),
31352
- className: z53.string().optional()
31522
+ buttonText: z54.string().optional(),
31523
+ showVenue: z54.boolean().nullable().optional(),
31524
+ showMap: z54.boolean().nullable().optional(),
31525
+ showCapacity: z54.boolean().nullable().optional(),
31526
+ emptyMessage: z54.string().optional(),
31527
+ className: z54.string().optional()
31353
31528
  }
31354
31529
  );
31355
- var eventCalendarDisplaySchema = z53.object({
31356
- kind: z53.literal("event-calendar"),
31530
+ var eventCalendarDisplaySchema = z54.object({
31531
+ kind: z54.literal("event-calendar"),
31357
31532
  displayMode: eventCalendarDisplayModeSchema,
31358
- className: z53.string().nullable(),
31359
- events: z53.array(publicEventSchema),
31533
+ className: z54.string().nullable(),
31534
+ events: z54.array(publicEventSchema),
31360
31535
  listLayout: eventLayoutSchema,
31361
31536
  listColumns: columnOptionSchema,
31362
31537
  eventsPerPage: eventPageSizeSchema,
31363
31538
  paginationAction: eventListPaginationActionSchema,
31364
31539
  startOfWeek: weekStartSchema,
31365
31540
  calendarTabViews: calendarTabViewsSchema,
31366
- showFilters: z53.boolean(),
31541
+ showFilters: z54.boolean(),
31367
31542
  showCategoryFilter: filterAutoShowSchema,
31368
- showVenueFilter: z53.boolean(),
31369
- showStaffFilter: z53.boolean(),
31543
+ showVenueFilter: z54.boolean(),
31544
+ showStaffFilter: z54.boolean(),
31370
31545
  eventKind: eventBlockKindSchema2,
31371
31546
  eventSurface: eventSurfaceScopeSchema2,
31372
- filterEventPresets: z53.string().nullable(),
31547
+ filterEventPresets: z54.string().nullable(),
31373
31548
  scheduleScope: eventScheduleScopeSchema3,
31374
- filterCategoryIds: z53.string().nullable(),
31375
- filterStaffMemberId: z53.string().nullable(),
31376
- filterVenueId: z53.string().nullable(),
31549
+ filterCategoryIds: z54.string().nullable(),
31550
+ filterStaffMemberId: z54.string().nullable(),
31551
+ filterVenueId: z54.string().nullable(),
31377
31552
  buttonVariant: eventButtonVariantSchema,
31378
- buttonText: z53.string(),
31379
- showVenue: z53.boolean(),
31380
- showMap: z53.boolean(),
31381
- showCapacity: z53.boolean(),
31382
- emptyMessage: z53.string()
31553
+ buttonText: z54.string(),
31554
+ showVenue: z54.boolean(),
31555
+ showMap: z54.boolean(),
31556
+ showCapacity: z54.boolean(),
31557
+ emptyMessage: z54.string()
31383
31558
  });
31384
- var eventCalendarHydrationSchema = z53.object({
31385
- siteId: z53.string(),
31559
+ var eventCalendarHydrationSchema = z54.object({
31560
+ siteId: z54.string(),
31386
31561
  stage: previewStageSchema.optional(),
31387
- prefetchedEvents: z53.boolean(),
31562
+ prefetchedEvents: z54.boolean(),
31388
31563
  eventKind: eventBlockKindSchema2,
31389
31564
  eventSurface: eventSurfaceScopeSchema2,
31390
- filterEventPresets: z53.string().nullable(),
31565
+ filterEventPresets: z54.string().nullable(),
31391
31566
  scheduleScope: eventScheduleScopeSchema3
31392
31567
  });
31393
- var eventCalendarRenderSchema = z53.object({
31568
+ var eventCalendarRenderSchema = z54.object({
31394
31569
  display: eventCalendarDisplaySchema,
31395
31570
  hydration: eventCalendarHydrationSchema
31396
31571
  });
31397
31572
  var eventCalendarIslandMetaCodec = createZodCodec(
31398
- z53.object({
31399
- siteId: z53.string(),
31400
- apiBaseUrl: z53.string().optional(),
31573
+ z54.object({
31574
+ siteId: z54.string(),
31575
+ apiBaseUrl: z54.string().optional(),
31401
31576
  stage: previewStageSchema.optional()
31402
31577
  })
31403
31578
  );
@@ -32139,7 +32314,7 @@ var eventCalendarBlockDefinition = {
32139
32314
  };
32140
32315
 
32141
32316
  // ../blocks/src/system/blocks/offerings-preview/index.ts
32142
- import { z as z54 } from "zod";
32317
+ import { z as z55 } from "zod";
32143
32318
 
32144
32319
  // ../blocks/src/system/blocks/offerings-preview/model.ts
32145
32320
  var OFFERINGS_PREVIEW_DEFAULT_ITEM_LIMIT = "3";
@@ -32461,13 +32636,13 @@ function normalizeTextOverride(value) {
32461
32636
  }
32462
32637
 
32463
32638
  // ../blocks/src/system/blocks/offerings-preview/index.ts
32464
- var publicRouteCandidatesSchema = z54.object({
32465
- routes: z54.array(z54.object({
32466
- entityId: z54.string(),
32467
- path: z54.string(),
32468
- title: z54.string(),
32469
- kind: z54.enum(["page", "content"]),
32470
- contentTypeKey: z54.string().nullable().optional()
32639
+ var publicRouteCandidatesSchema = z55.object({
32640
+ routes: z55.array(z55.object({
32641
+ entityId: z55.string(),
32642
+ path: z55.string(),
32643
+ title: z55.string(),
32644
+ kind: z55.enum(["page", "content"]),
32645
+ contentTypeKey: z55.string().nullable().optional()
32471
32646
  }))
32472
32647
  });
32473
32648
  var groupOverrideFields = [
@@ -32865,7 +33040,7 @@ function isRecord8(value) {
32865
33040
  }
32866
33041
 
32867
33042
  // ../blocks/src/system/blocks/embed.ts
32868
- import { z as z55 } from "zod";
33043
+ import { z as z56 } from "zod";
32869
33044
  var embedFields = [
32870
33045
  // Section heading
32871
33046
  parseFieldDefinition({
@@ -33096,18 +33271,18 @@ var embedManifest = createBlockManifest({
33096
33271
  spacing: "lg"
33097
33272
  }
33098
33273
  });
33099
- var embedEntrySchema = z55.object({
33100
- id: z55.string(),
33101
- identifier: z55.string(),
33102
- title: z55.string(),
33103
- slug: z55.string().nullable().optional(),
33104
- content: z55.record(z55.string(), z55.unknown()).optional(),
33105
- publishedAt: z55.string().nullable().optional()
33274
+ var embedEntrySchema = z56.object({
33275
+ id: z56.string(),
33276
+ identifier: z56.string(),
33277
+ title: z56.string(),
33278
+ slug: z56.string().nullable().optional(),
33279
+ content: z56.record(z56.string(), z56.unknown()).optional(),
33280
+ publishedAt: z56.string().nullable().optional()
33106
33281
  });
33107
33282
  var embedBlockDefinition = {
33108
33283
  manifest: embedManifest,
33109
33284
  dataSchemas: {
33110
- entries: z55.array(embedEntrySchema).optional()
33285
+ entries: z56.array(embedEntrySchema).optional()
33111
33286
  },
33112
33287
  dataLoaders: {
33113
33288
  entries: {
@@ -34291,52 +34466,52 @@ var fileDownloadBlockDefinition = {
34291
34466
  };
34292
34467
 
34293
34468
  // ../blocks/src/system/blocks/shop.ts
34294
- import { z as z59 } from "zod";
34469
+ import { z as z60 } from "zod";
34295
34470
 
34296
34471
  // ../blocks/src/system/runtime/nodes/shop.interactive.ts
34297
- import { z as z58 } from "zod";
34472
+ import { z as z59 } from "zod";
34298
34473
 
34299
34474
  // ../blocks/src/system/blocks/products/shared.ts
34300
- import { z as z56 } from "zod";
34301
- var publicProductVariantSchema = z56.object({
34302
- id: z56.string(),
34303
- title: z56.string(),
34304
- sku: z56.string().nullable(),
34305
- priceCents: z56.number(),
34306
- stockQuantity: z56.number().nullable(),
34307
- soldOut: z56.boolean()
34475
+ import { z as z57 } from "zod";
34476
+ var publicProductVariantSchema = z57.object({
34477
+ id: z57.string(),
34478
+ title: z57.string(),
34479
+ sku: z57.string().nullable(),
34480
+ priceCents: z57.number(),
34481
+ stockQuantity: z57.number().nullable(),
34482
+ soldOut: z57.boolean()
34308
34483
  });
34309
- var publicProductSchema = z56.object({
34310
- id: z56.string(),
34311
- contentEntryId: z56.string().nullable(),
34312
- title: z56.string(),
34313
- slug: z56.string(),
34314
- path: z56.string().nullable(),
34315
- status: z56.enum(["draft", "active"]),
34316
- priceCents: z56.number(),
34317
- currency: z56.string(),
34318
- productType: z56.enum(["physical", "digital"]),
34319
- requiresShipping: z56.boolean(),
34320
- hasVariants: z56.boolean(),
34321
- trackInventory: z56.boolean(),
34322
- soldOut: z56.boolean(),
34323
- category: z56.object({
34324
- id: z56.string(),
34325
- name: z56.string(),
34326
- slug: z56.string()
34484
+ var publicProductSchema = z57.object({
34485
+ id: z57.string(),
34486
+ contentEntryId: z57.string().nullable(),
34487
+ title: z57.string(),
34488
+ slug: z57.string(),
34489
+ path: z57.string().nullable(),
34490
+ status: z57.enum(["draft", "active"]),
34491
+ priceCents: z57.number(),
34492
+ currency: z57.string(),
34493
+ productType: z57.enum(["physical", "digital"]),
34494
+ requiresShipping: z57.boolean(),
34495
+ hasVariants: z57.boolean(),
34496
+ trackInventory: z57.boolean(),
34497
+ soldOut: z57.boolean(),
34498
+ category: z57.object({
34499
+ id: z57.string(),
34500
+ name: z57.string(),
34501
+ slug: z57.string()
34327
34502
  }).nullable(),
34328
- summary: z56.string().nullable(),
34329
- body: z56.unknown().nullable(),
34330
- gallery: z56.array(
34331
- z56.object({
34332
- url: z56.string(),
34333
- alt: z56.string().nullable()
34503
+ summary: z57.string().nullable(),
34504
+ body: z57.unknown().nullable(),
34505
+ gallery: z57.array(
34506
+ z57.object({
34507
+ url: z57.string(),
34508
+ alt: z57.string().nullable()
34334
34509
  })
34335
34510
  ),
34336
- variants: z56.array(publicProductVariantSchema)
34511
+ variants: z57.array(publicProductVariantSchema)
34337
34512
  });
34338
- var publicProductsResponseSchema = z56.object({
34339
- products: z56.array(publicProductSchema)
34513
+ var publicProductsResponseSchema = z57.object({
34514
+ products: z57.array(publicProductSchema)
34340
34515
  });
34341
34516
 
34342
34517
  // ../blocks/src/system/runtime/api/creditProducts.ts
@@ -34400,27 +34575,27 @@ function deriveCreditProductLabels(products, options = {}) {
34400
34575
  }
34401
34576
 
34402
34577
  // ../blocks/src/system/runtime/nodes/shop-commerce.shared.ts
34403
- import { z as z57 } from "zod";
34404
- var storedProductCartItemSchema = z57.object({
34405
- kind: z57.literal("product"),
34406
- productId: z57.string().min(1),
34407
- productCategoryId: z57.string().min(1).optional().nullable(),
34408
- variantId: z57.string().min(1).optional().nullable(),
34409
- title: z57.string().min(1),
34410
- variantTitle: z57.string().optional().nullable(),
34411
- quantity: z57.number().finite(),
34412
- unitPriceCents: z57.number().finite(),
34413
- currency: z57.string().min(1),
34414
- imageUrl: z57.string().optional().nullable(),
34415
- soldOut: z57.boolean().optional()
34578
+ import { z as z58 } from "zod";
34579
+ var storedProductCartItemSchema = z58.object({
34580
+ kind: z58.literal("product"),
34581
+ productId: z58.string().min(1),
34582
+ productCategoryId: z58.string().min(1).optional().nullable(),
34583
+ variantId: z58.string().min(1).optional().nullable(),
34584
+ title: z58.string().min(1),
34585
+ variantTitle: z58.string().optional().nullable(),
34586
+ quantity: z58.number().finite(),
34587
+ unitPriceCents: z58.number().finite(),
34588
+ currency: z58.string().min(1),
34589
+ imageUrl: z58.string().optional().nullable(),
34590
+ soldOut: z58.boolean().optional()
34416
34591
  });
34417
- var storedPassCartItemSchema = z57.object({
34418
- kind: z57.literal("pass"),
34419
- passId: z57.string().min(1),
34420
- title: z57.string().min(1),
34421
- quantity: z57.number().finite().optional(),
34422
- unitPriceCents: z57.number().finite(),
34423
- currency: z57.string().min(1)
34592
+ var storedPassCartItemSchema = z58.object({
34593
+ kind: z58.literal("pass"),
34594
+ passId: z58.string().min(1),
34595
+ title: z58.string().min(1),
34596
+ quantity: z58.number().finite().optional(),
34597
+ unitPriceCents: z58.number().finite(),
34598
+ currency: z58.string().min(1)
34424
34599
  });
34425
34600
  function deriveCommerceCheckoutState(state) {
34426
34601
  if (state.items.length === 0) {
@@ -34459,10 +34634,7 @@ function resolveSelectedProduct(products, contentEntry, productSlug) {
34459
34634
 
34460
34635
  // ../blocks/src/system/runtime/nodes/commerce/shared/display.ts
34461
34636
  function formatCommercePrice(cents, currency) {
34462
- return new Intl.NumberFormat("en-US", {
34463
- style: "currency",
34464
- currency: currency.toUpperCase()
34465
- }).format(cents / 100);
34637
+ return formatCurrencyAmount(cents, currency);
34466
34638
  }
34467
34639
  function getPassesHeading(passes, explicitHeading) {
34468
34640
  if (explicitHeading) return explicitHeading;
@@ -34657,214 +34829,214 @@ function formatValidity(days) {
34657
34829
  }
34658
34830
 
34659
34831
  // ../blocks/src/system/runtime/nodes/shop.interactive.ts
34660
- var shopModeSchema = z58.enum(["passes-memberships", "product-list", "product-detail", "cart", "checkout"]);
34661
- var contentEntrySchema3 = z58.object({
34662
- id: z58.string().nullable().optional(),
34663
- slug: z58.string().nullable().optional()
34832
+ var shopModeSchema = z59.enum(["passes-memberships", "product-list", "product-detail", "cart", "checkout"]);
34833
+ var contentEntrySchema3 = z59.object({
34834
+ id: z59.string().nullable().optional(),
34835
+ slug: z59.string().nullable().optional()
34664
34836
  }).nullable();
34665
- var shopSourceSchema = z58.object({
34666
- className: z58.string().nullable().optional(),
34837
+ var shopSourceSchema = z59.object({
34838
+ className: z59.string().nullable().optional(),
34667
34839
  mode: shopModeSchema.optional(),
34668
- heading: z58.string().nullable().optional(),
34669
- productSlug: z58.string().nullable().optional(),
34670
- showPasses: z58.boolean().optional(),
34671
- showMemberships: z58.boolean().optional(),
34672
- layout: z58.enum(["grid", "list"]).optional(),
34673
- columns: z58.string().optional(),
34674
- showDescriptions: z58.boolean().optional(),
34675
- showSummary: z58.boolean().optional(),
34676
- showBody: z58.boolean().optional(),
34677
- showPrices: z58.boolean().optional(),
34678
- showValidityPeriod: z58.boolean().optional(),
34679
- showPricePerCredit: z58.boolean().nullable().optional(),
34680
- passesHeading: z58.string().optional(),
34681
- membershipsHeading: z58.string().optional(),
34682
- buyButtonText: z58.string().optional(),
34683
- addButtonText: z58.string().optional(),
34684
- passPurchaseMode: z58.enum(["add_to_cart", "buy_now"]).optional(),
34685
- subscribeButtonText: z58.string().optional(),
34686
- emptyStateText: z58.string().optional(),
34687
- checkoutButtonText: z58.string().optional(),
34688
- clearButtonText: z58.string().optional(),
34689
- submitButtonText: z58.string().optional(),
34840
+ heading: z59.string().nullable().optional(),
34841
+ productSlug: z59.string().nullable().optional(),
34842
+ showPasses: z59.boolean().optional(),
34843
+ showMemberships: z59.boolean().optional(),
34844
+ layout: z59.enum(["grid", "list"]).optional(),
34845
+ columns: z59.string().optional(),
34846
+ showDescriptions: z59.boolean().optional(),
34847
+ showSummary: z59.boolean().optional(),
34848
+ showBody: z59.boolean().optional(),
34849
+ showPrices: z59.boolean().optional(),
34850
+ showValidityPeriod: z59.boolean().optional(),
34851
+ showPricePerCredit: z59.boolean().nullable().optional(),
34852
+ passesHeading: z59.string().optional(),
34853
+ membershipsHeading: z59.string().optional(),
34854
+ buyButtonText: z59.string().optional(),
34855
+ addButtonText: z59.string().optional(),
34856
+ passPurchaseMode: z59.enum(["add_to_cart", "buy_now"]).optional(),
34857
+ subscribeButtonText: z59.string().optional(),
34858
+ emptyStateText: z59.string().optional(),
34859
+ checkoutButtonText: z59.string().optional(),
34860
+ clearButtonText: z59.string().optional(),
34861
+ submitButtonText: z59.string().optional(),
34690
34862
  contentEntry: contentEntrySchema3.optional(),
34691
- passes: z58.array(publicPassProductSchema).nullable().optional(),
34692
- memberships: z58.array(publicMembershipProductSchema).nullable().optional(),
34693
- products: z58.array(publicProductSchema).nullable().optional(),
34694
- siteId: z58.string().optional(),
34695
- apiBaseUrl: z58.string().optional(),
34863
+ passes: z59.array(publicPassProductSchema).nullable().optional(),
34864
+ memberships: z59.array(publicMembershipProductSchema).nullable().optional(),
34865
+ products: z59.array(publicProductSchema).nullable().optional(),
34866
+ siteId: z59.string().optional(),
34867
+ apiBaseUrl: z59.string().optional(),
34696
34868
  stage: previewStageSchema.optional()
34697
34869
  });
34698
- var productVariantOptionDisplaySchema = z58.object({
34699
- id: z58.string(),
34700
- label: z58.string(),
34701
- soldOut: z58.boolean()
34870
+ var productVariantOptionDisplaySchema = z59.object({
34871
+ id: z59.string(),
34872
+ label: z59.string(),
34873
+ soldOut: z59.boolean()
34702
34874
  });
34703
- var productCardDisplaySchema = z58.object({
34704
- productId: z58.string(),
34705
- title: z58.string(),
34706
- path: z58.string().nullable(),
34707
- summary: z58.string().nullable(),
34708
- priceLabel: z58.string().nullable(),
34709
- image: z58.object({
34710
- url: z58.string(),
34711
- alt: z58.string().nullable()
34875
+ var productCardDisplaySchema = z59.object({
34876
+ productId: z59.string(),
34877
+ title: z59.string(),
34878
+ path: z59.string().nullable(),
34879
+ summary: z59.string().nullable(),
34880
+ priceLabel: z59.string().nullable(),
34881
+ image: z59.object({
34882
+ url: z59.string(),
34883
+ alt: z59.string().nullable()
34712
34884
  }).nullable(),
34713
- variantOptions: z58.array(productVariantOptionDisplaySchema),
34714
- selectedVariantId: z58.string().nullable(),
34715
- selectionLabel: z58.string(),
34716
- actionLabel: z58.string(),
34717
- soldOut: z58.boolean()
34885
+ variantOptions: z59.array(productVariantOptionDisplaySchema),
34886
+ selectedVariantId: z59.string().nullable(),
34887
+ selectionLabel: z59.string(),
34888
+ actionLabel: z59.string(),
34889
+ soldOut: z59.boolean()
34718
34890
  });
34719
- var productListDisplaySchema = z58.object({
34720
- kind: z58.literal("product-list"),
34721
- state: z58.enum(["empty", "ready"]),
34722
- heading: z58.string().nullable(),
34723
- className: z58.string().nullable(),
34724
- layout: z58.enum(["grid", "list"]),
34725
- columns: z58.string(),
34726
- emptyMessage: z58.string(),
34727
- cards: z58.array(productCardDisplaySchema)
34891
+ var productListDisplaySchema = z59.object({
34892
+ kind: z59.literal("product-list"),
34893
+ state: z59.enum(["empty", "ready"]),
34894
+ heading: z59.string().nullable(),
34895
+ className: z59.string().nullable(),
34896
+ layout: z59.enum(["grid", "list"]),
34897
+ columns: z59.string(),
34898
+ emptyMessage: z59.string(),
34899
+ cards: z59.array(productCardDisplaySchema)
34728
34900
  });
34729
- var productDetailDisplaySchema = z58.discriminatedUnion("state", [
34730
- z58.object({
34731
- kind: z58.literal("product-detail"),
34732
- state: z58.literal("empty"),
34733
- heading: z58.string().nullable(),
34734
- className: z58.string().nullable(),
34735
- emptyMessage: z58.string()
34901
+ var productDetailDisplaySchema = z59.discriminatedUnion("state", [
34902
+ z59.object({
34903
+ kind: z59.literal("product-detail"),
34904
+ state: z59.literal("empty"),
34905
+ heading: z59.string().nullable(),
34906
+ className: z59.string().nullable(),
34907
+ emptyMessage: z59.string()
34736
34908
  }),
34737
- z58.object({
34738
- kind: z58.literal("product-detail"),
34739
- state: z58.literal("ready"),
34740
- heading: z58.string().nullable(),
34741
- className: z58.string().nullable(),
34742
- title: z58.string(),
34743
- priceLabel: z58.string(),
34744
- summary: z58.string().nullable(),
34745
- categoryLabel: z58.string().nullable(),
34746
- gallery: z58.array(z58.object({
34747
- url: z58.string(),
34748
- alt: z58.string().nullable()
34909
+ z59.object({
34910
+ kind: z59.literal("product-detail"),
34911
+ state: z59.literal("ready"),
34912
+ heading: z59.string().nullable(),
34913
+ className: z59.string().nullable(),
34914
+ title: z59.string(),
34915
+ priceLabel: z59.string(),
34916
+ summary: z59.string().nullable(),
34917
+ categoryLabel: z59.string().nullable(),
34918
+ gallery: z59.array(z59.object({
34919
+ url: z59.string(),
34920
+ alt: z59.string().nullable()
34749
34921
  })),
34750
- variantOptions: z58.array(productVariantOptionDisplaySchema),
34751
- selectedVariantId: z58.string().nullable(),
34752
- selectionLabel: z58.string(),
34753
- actionLabel: z58.string(),
34754
- soldOut: z58.boolean(),
34755
- body: z58.unknown().nullable()
34922
+ variantOptions: z59.array(productVariantOptionDisplaySchema),
34923
+ selectedVariantId: z59.string().nullable(),
34924
+ selectionLabel: z59.string(),
34925
+ actionLabel: z59.string(),
34926
+ soldOut: z59.boolean(),
34927
+ body: z59.unknown().nullable()
34756
34928
  })
34757
34929
  ]);
34758
- var passCardDisplaySchema = z58.object({
34759
- id: z58.string(),
34760
- title: z58.string(),
34761
- description: z58.string().nullable(),
34762
- priceLabel: z58.string(),
34763
- creditsLabel: z58.string(),
34764
- perCreditLabel: z58.string().nullable(),
34765
- validityLabel: z58.string().nullable(),
34766
- actionLabel: z58.string()
34930
+ var passCardDisplaySchema = z59.object({
34931
+ id: z59.string(),
34932
+ title: z59.string(),
34933
+ description: z59.string().nullable(),
34934
+ priceLabel: z59.string(),
34935
+ creditsLabel: z59.string(),
34936
+ perCreditLabel: z59.string().nullable(),
34937
+ validityLabel: z59.string().nullable(),
34938
+ actionLabel: z59.string()
34767
34939
  });
34768
- var membershipCardDisplaySchema = z58.object({
34769
- id: z58.string(),
34770
- title: z58.string(),
34771
- description: z58.string().nullable(),
34772
- priceLabel: z58.string(),
34773
- intervalLabel: z58.string(),
34774
- actionLabel: z58.string()
34940
+ var membershipCardDisplaySchema = z59.object({
34941
+ id: z59.string(),
34942
+ title: z59.string(),
34943
+ description: z59.string().nullable(),
34944
+ priceLabel: z59.string(),
34945
+ intervalLabel: z59.string(),
34946
+ actionLabel: z59.string()
34775
34947
  });
34776
- var passesMembershipsDisplaySchema = z58.object({
34777
- kind: z58.literal("passes-memberships"),
34778
- state: z58.enum(["empty", "ready"]),
34779
- className: z58.string().nullable(),
34780
- layout: z58.enum(["grid", "list"]),
34781
- columns: z58.string(),
34782
- emptyMessage: z58.string(),
34783
- passesHeading: z58.string(),
34784
- membershipsHeading: z58.string(),
34785
- passes: z58.array(passCardDisplaySchema),
34786
- memberships: z58.array(membershipCardDisplaySchema)
34948
+ var passesMembershipsDisplaySchema = z59.object({
34949
+ kind: z59.literal("passes-memberships"),
34950
+ state: z59.enum(["empty", "ready"]),
34951
+ className: z59.string().nullable(),
34952
+ layout: z59.enum(["grid", "list"]),
34953
+ columns: z59.string(),
34954
+ emptyMessage: z59.string(),
34955
+ passesHeading: z59.string(),
34956
+ membershipsHeading: z59.string(),
34957
+ passes: z59.array(passCardDisplaySchema),
34958
+ memberships: z59.array(membershipCardDisplaySchema)
34787
34959
  });
34788
- var cartLineDisplaySchema = z58.object({
34789
- key: z58.string(),
34790
- title: z58.string(),
34791
- priceLabel: z58.string(),
34792
- quantity: z58.number(),
34793
- quantityEditable: z58.boolean()
34960
+ var cartLineDisplaySchema = z59.object({
34961
+ key: z59.string(),
34962
+ title: z59.string(),
34963
+ priceLabel: z59.string(),
34964
+ quantity: z59.number(),
34965
+ quantityEditable: z59.boolean()
34794
34966
  });
34795
- var cartDisplaySchema = z58.object({
34796
- kind: z58.literal("cart"),
34797
- state: z58.enum(["empty", "ready"]),
34798
- heading: z58.string().nullable(),
34799
- className: z58.string().nullable(),
34800
- emptyMessage: z58.string(),
34801
- supportText: z58.string().nullable(),
34802
- items: z58.array(cartLineDisplaySchema),
34803
- subtotalLabel: z58.string().nullable(),
34804
- checkoutButtonText: z58.string(),
34805
- clearButtonText: z58.string()
34967
+ var cartDisplaySchema = z59.object({
34968
+ kind: z59.literal("cart"),
34969
+ state: z59.enum(["empty", "ready"]),
34970
+ heading: z59.string().nullable(),
34971
+ className: z59.string().nullable(),
34972
+ emptyMessage: z59.string(),
34973
+ supportText: z59.string().nullable(),
34974
+ items: z59.array(cartLineDisplaySchema),
34975
+ subtotalLabel: z59.string().nullable(),
34976
+ checkoutButtonText: z59.string(),
34977
+ clearButtonText: z59.string()
34806
34978
  });
34807
- var checkoutDisplaySchema = z58.object({
34808
- kind: z58.literal("checkout"),
34809
- state: z58.enum(["empty", "blocked", "ready"]),
34810
- heading: z58.string().nullable(),
34811
- className: z58.string().nullable(),
34812
- message: z58.string().nullable(),
34813
- submitButtonText: z58.string()
34979
+ var checkoutDisplaySchema = z59.object({
34980
+ kind: z59.literal("checkout"),
34981
+ state: z59.enum(["empty", "blocked", "ready"]),
34982
+ heading: z59.string().nullable(),
34983
+ className: z59.string().nullable(),
34984
+ message: z59.string().nullable(),
34985
+ submitButtonText: z59.string()
34814
34986
  });
34815
- var passesMembershipsHydrationSchema = z58.object({
34816
- passes: z58.array(publicPassProductSchema),
34817
- memberships: z58.array(publicMembershipProductSchema),
34818
- passPurchaseMode: z58.enum(["add_to_cart", "buy_now"])
34987
+ var passesMembershipsHydrationSchema = z59.object({
34988
+ passes: z59.array(publicPassProductSchema),
34989
+ memberships: z59.array(publicMembershipProductSchema),
34990
+ passPurchaseMode: z59.enum(["add_to_cart", "buy_now"])
34819
34991
  });
34820
- var productListHydrationSchema = z58.object({
34821
- products: z58.array(publicProductSchema),
34822
- showSummary: z58.boolean(),
34823
- showPrices: z58.boolean(),
34824
- addButtonText: z58.string()
34992
+ var productListHydrationSchema = z59.object({
34993
+ products: z59.array(publicProductSchema),
34994
+ showSummary: z59.boolean(),
34995
+ showPrices: z59.boolean(),
34996
+ addButtonText: z59.string()
34825
34997
  });
34826
- var productDetailHydrationSchema = z58.object({
34827
- products: z58.array(publicProductSchema),
34828
- productId: z58.string().nullable(),
34829
- showSummary: z58.boolean(),
34830
- showBody: z58.boolean(),
34831
- addButtonText: z58.string()
34998
+ var productDetailHydrationSchema = z59.object({
34999
+ products: z59.array(publicProductSchema),
35000
+ productId: z59.string().nullable(),
35001
+ showSummary: z59.boolean(),
35002
+ showBody: z59.boolean(),
35003
+ addButtonText: z59.string()
34832
35004
  });
34833
- var cartHydrationSchema = z58.object({
34834
- emptyStateText: z58.string(),
34835
- checkoutButtonText: z58.string(),
34836
- clearButtonText: z58.string()
35005
+ var cartHydrationSchema = z59.object({
35006
+ emptyStateText: z59.string(),
35007
+ checkoutButtonText: z59.string(),
35008
+ clearButtonText: z59.string()
34837
35009
  });
34838
- var checkoutHydrationSchema = z58.object({
34839
- emptyStateText: z58.string(),
34840
- submitButtonText: z58.string()
35010
+ var checkoutHydrationSchema = z59.object({
35011
+ emptyStateText: z59.string(),
35012
+ submitButtonText: z59.string()
34841
35013
  });
34842
- var passesMembershipsRenderSchema = z58.object({
35014
+ var passesMembershipsRenderSchema = z59.object({
34843
35015
  display: passesMembershipsDisplaySchema,
34844
35016
  hydration: passesMembershipsHydrationSchema
34845
35017
  });
34846
- var productListRenderSchema = z58.object({
35018
+ var productListRenderSchema = z59.object({
34847
35019
  display: productListDisplaySchema,
34848
35020
  hydration: productListHydrationSchema
34849
35021
  });
34850
- var productDetailRenderSchema = z58.object({
35022
+ var productDetailRenderSchema = z59.object({
34851
35023
  display: productDetailDisplaySchema,
34852
35024
  hydration: productDetailHydrationSchema
34853
35025
  });
34854
- var cartRenderSchema = z58.object({
35026
+ var cartRenderSchema = z59.object({
34855
35027
  display: cartDisplaySchema,
34856
35028
  hydration: cartHydrationSchema
34857
35029
  });
34858
- var checkoutRenderSchema = z58.object({
35030
+ var checkoutRenderSchema = z59.object({
34859
35031
  display: checkoutDisplaySchema,
34860
35032
  hydration: checkoutHydrationSchema
34861
35033
  });
34862
35034
  function resolveShowPricePerCredit(source) {
34863
35035
  return source.showPricePerCredit ?? true;
34864
35036
  }
34865
- var shopIslandMetaCodec = createZodCodec(z58.object({
34866
- siteId: z58.string().optional(),
34867
- apiBaseUrl: z58.string().optional(),
35037
+ var shopIslandMetaCodec = createZodCodec(z59.object({
35038
+ siteId: z59.string().optional(),
35039
+ apiBaseUrl: z59.string().optional(),
34868
35040
  stage: previewStageSchema.optional()
34869
35041
  }));
34870
35042
  var shopIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "stage");
@@ -35317,9 +35489,9 @@ var shopBlockDefinition = {
35317
35489
  runtime: shopBlockRuntime,
35318
35490
  dataSchemas: {
35319
35491
  // listPublicPasses returns { passes: [...] }
35320
- passes: z59.object({ passes: z59.array(publicPassProductSchema) }).optional(),
35492
+ passes: z60.object({ passes: z60.array(publicPassProductSchema) }).optional(),
35321
35493
  // listPublicMemberships returns { memberships: [...] }
35322
- memberships: z59.object({ memberships: z59.array(publicMembershipProductSchema) }).optional()
35494
+ memberships: z60.object({ memberships: z60.array(publicMembershipProductSchema) }).optional()
35323
35495
  },
35324
35496
  dataLoaders: {
35325
35497
  // Load passes for display
@@ -35342,7 +35514,7 @@ var shopBlockDefinition = {
35342
35514
  };
35343
35515
 
35344
35516
  // ../blocks/src/system/blocks/product-list.ts
35345
- import { z as z60 } from "zod";
35517
+ import { z as z61 } from "zod";
35346
35518
  var productListManifest = createBlockManifest({
35347
35519
  id: "block.product-list",
35348
35520
  version: "1.0.0",
@@ -35475,7 +35647,7 @@ var productListBlockDefinition = {
35475
35647
  }
35476
35648
  }
35477
35649
  };
35478
- var productListDataSchema = z60.object({
35650
+ var productListDataSchema = z61.object({
35479
35651
  products: publicProductsResponseSchema.optional()
35480
35652
  });
35481
35653
 
@@ -35736,72 +35908,72 @@ var checkoutBlockDefinition = {
35736
35908
  };
35737
35909
 
35738
35910
  // ../blocks/src/system/runtime/nodes/gifting.interactive.ts
35739
- import { z as z61 } from "zod";
35740
- var publicGiftCardOfferSchema = z61.object({
35741
- id: z61.string(),
35742
- kind: z61.literal("gift_card"),
35743
- title: z61.string(),
35744
- description: z61.string().nullable(),
35745
- sortOrder: z61.number().int(),
35746
- giftCard: z61.object({
35747
- fixedDenominations: z61.array(z61.number().int().positive()),
35748
- customAmountEnabled: z61.boolean(),
35749
- customAmountMinCents: z61.number().int().positive(),
35750
- customAmountMaxCents: z61.number().int().positive()
35911
+ import { z as z62 } from "zod";
35912
+ var publicGiftCardOfferSchema = z62.object({
35913
+ id: z62.string(),
35914
+ kind: z62.literal("gift_card"),
35915
+ title: z62.string(),
35916
+ description: z62.string().nullable(),
35917
+ sortOrder: z62.number().int(),
35918
+ giftCard: z62.object({
35919
+ fixedDenominations: z62.array(z62.number().int().positive()),
35920
+ customAmountEnabled: z62.boolean(),
35921
+ customAmountMinCents: z62.number().int().positive(),
35922
+ customAmountMaxCents: z62.number().int().positive()
35751
35923
  }),
35752
- voucher: z61.null()
35924
+ voucher: z62.null()
35753
35925
  });
35754
- var publicVoucherOfferSchema = z61.object({
35755
- id: z61.string(),
35756
- kind: z61.literal("voucher"),
35757
- title: z61.string(),
35758
- description: z61.string().nullable(),
35759
- sortOrder: z61.number().int(),
35760
- giftCard: z61.null(),
35761
- voucher: z61.object({
35762
- purchaseAmountCents: z61.number().int().positive()
35926
+ var publicVoucherOfferSchema = z62.object({
35927
+ id: z62.string(),
35928
+ kind: z62.literal("voucher"),
35929
+ title: z62.string(),
35930
+ description: z62.string().nullable(),
35931
+ sortOrder: z62.number().int(),
35932
+ giftCard: z62.null(),
35933
+ voucher: z62.object({
35934
+ purchaseAmountCents: z62.number().int().positive()
35763
35935
  })
35764
35936
  });
35765
- var publicGiftingOffersResponseSchema = z61.object({
35766
- currency: z61.string(),
35767
- giftCards: z61.array(publicGiftCardOfferSchema),
35768
- vouchers: z61.array(publicVoucherOfferSchema)
35937
+ var publicGiftingOffersResponseSchema = z62.object({
35938
+ currency: z62.string(),
35939
+ giftCards: z62.array(publicGiftCardOfferSchema),
35940
+ vouchers: z62.array(publicVoucherOfferSchema)
35769
35941
  });
35770
- var giftingSourceSchema = z61.object({
35771
- siteId: z61.string().optional(),
35772
- apiBaseUrl: z61.string().optional(),
35942
+ var giftingSourceSchema = z62.object({
35943
+ siteId: z62.string().optional(),
35944
+ apiBaseUrl: z62.string().optional(),
35773
35945
  offers: publicGiftingOffersResponseSchema.nullable().optional(),
35774
- className: z61.string().nullable().optional(),
35775
- heading: z61.string().nullable().optional(),
35776
- intro: z61.string().nullable().optional(),
35777
- giftCardsHeading: z61.string().nullable().optional(),
35778
- vouchersHeading: z61.string().nullable().optional(),
35779
- emptyStateText: z61.string().nullable().optional(),
35780
- checkoutButtonText: z61.string().nullable().optional(),
35781
- successMessage: z61.string().nullable().optional()
35946
+ className: z62.string().nullable().optional(),
35947
+ heading: z62.string().nullable().optional(),
35948
+ intro: z62.string().nullable().optional(),
35949
+ giftCardsHeading: z62.string().nullable().optional(),
35950
+ vouchersHeading: z62.string().nullable().optional(),
35951
+ emptyStateText: z62.string().nullable().optional(),
35952
+ checkoutButtonText: z62.string().nullable().optional(),
35953
+ successMessage: z62.string().nullable().optional()
35782
35954
  });
35783
- var giftingDisplaySchema = z61.object({
35784
- kind: z61.literal("gifting"),
35785
- state: z61.literal("ready"),
35786
- className: z61.string().nullable(),
35787
- heading: z61.string(),
35788
- intro: z61.string().nullable(),
35789
- giftCardsHeading: z61.string(),
35790
- vouchersHeading: z61.string(),
35791
- emptyStateText: z61.string()
35955
+ var giftingDisplaySchema = z62.object({
35956
+ kind: z62.literal("gifting"),
35957
+ state: z62.literal("ready"),
35958
+ className: z62.string().nullable(),
35959
+ heading: z62.string(),
35960
+ intro: z62.string().nullable(),
35961
+ giftCardsHeading: z62.string(),
35962
+ vouchersHeading: z62.string(),
35963
+ emptyStateText: z62.string()
35792
35964
  });
35793
- var giftingHydrationSchema = z61.object({
35965
+ var giftingHydrationSchema = z62.object({
35794
35966
  offers: publicGiftingOffersResponseSchema.nullable(),
35795
- checkoutButtonText: z61.string(),
35796
- successMessage: z61.string()
35967
+ checkoutButtonText: z62.string(),
35968
+ successMessage: z62.string()
35797
35969
  });
35798
- var giftingRenderSchema = z61.object({
35970
+ var giftingRenderSchema = z62.object({
35799
35971
  display: giftingDisplaySchema,
35800
35972
  hydration: giftingHydrationSchema
35801
35973
  });
35802
- var giftingIslandMetaCodec = createZodCodec(z61.object({
35803
- siteId: z61.string().optional(),
35804
- apiBaseUrl: z61.string().optional()
35974
+ var giftingIslandMetaCodec = createZodCodec(z62.object({
35975
+ siteId: z62.string().optional(),
35976
+ apiBaseUrl: z62.string().optional()
35805
35977
  }));
35806
35978
  var giftingIslandMetaKeys = defineInteractiveIslandMetaKeys(
35807
35979
  "siteId",
@@ -35983,7 +36155,61 @@ var giftingBlockDefinition = {
35983
36155
  };
35984
36156
 
35985
36157
  // ../blocks/src/system/runtime/nodes/newsletter-form.interactive.ts
35986
- import { z as z62 } from "zod";
36158
+ import { z as z63 } from "zod";
36159
+
36160
+ // ../blocks/src/system/blocks/newsletter-signup-destination.ts
36161
+ function parseNewsletterSignupBlockId(value) {
36162
+ const trimmed = parseTrimmedString(value);
36163
+ return trimmed && BLOCK_ID_PATTERN.test(trimmed) ? trimmed : null;
36164
+ }
36165
+ function parseSignedNewsletterDestinationRef(value) {
36166
+ const trimmed = parseTrimmedString(value);
36167
+ return trimmed && SIGNED_DESTINATION_REF_PATTERN.test(trimmed) ? trimmed : null;
36168
+ }
36169
+ function parseNewsletterSignupDestinationProvider(value) {
36170
+ return value === "riverbank" || value === "mailchimp" ? value : null;
36171
+ }
36172
+ function buildNewsletterSignupBlockRef(blockId) {
36173
+ const parsed = parseNewsletterSignupBlockId(blockId);
36174
+ return parsed ? { tag: "block_ref", blockId: parsed } : null;
36175
+ }
36176
+ function normalizeNewsletterSignupEditorValuesForDestination(values) {
36177
+ const destinationProvider = parseNewsletterSignupDestinationProvider(values.destinationProvider) ?? "riverbank";
36178
+ if (destinationProvider === "mailchimp") {
36179
+ return {
36180
+ destinationProvider,
36181
+ mailchimpAudienceId: values.mailchimpAudienceId,
36182
+ mailchimpTags: values.mailchimpTags
36183
+ };
36184
+ }
36185
+ return {
36186
+ destinationProvider,
36187
+ listId: values.listId,
36188
+ tags: values.tags
36189
+ };
36190
+ }
36191
+ function deriveNewsletterSignupRuntimeSource(values) {
36192
+ const normalized = normalizeNewsletterSignupEditorValuesForDestination(values);
36193
+ if (normalized.destinationProvider === "mailchimp") {
36194
+ return {
36195
+ destinationProvider: "mailchimp",
36196
+ listId: null,
36197
+ tags: null
36198
+ };
36199
+ }
36200
+ return {
36201
+ destinationProvider: "riverbank",
36202
+ listId: parseTrimmedString(normalized.listId),
36203
+ tags: parseTrimmedString(normalized.tags)
36204
+ };
36205
+ }
36206
+ var BLOCK_ID_PATTERN = /^[A-Za-z0-9._:-]{1,200}$/;
36207
+ var SIGNED_DESTINATION_REF_PATTERN = /^[A-Za-z0-9._~-]{16,1000}$/;
36208
+ function parseTrimmedString(value) {
36209
+ if (typeof value !== "string") return null;
36210
+ const trimmed = value.trim();
36211
+ return trimmed.length > 0 ? trimmed : null;
36212
+ }
35987
36213
 
35988
36214
  // ../blocks/src/system/runtime/nodes/newsletter-form.types.ts
35989
36215
  function getPresetFields(preset2, options) {
@@ -36036,49 +36262,65 @@ function withOptionalPhone(fields3, includePhone) {
36036
36262
  }
36037
36263
 
36038
36264
  // ../blocks/src/system/runtime/nodes/newsletter-form.interactive.ts
36039
- var newsletterPresetSchema = z62.enum(["emailOnly", "emailName", "emailFirstLast", "emailNameCompany"]);
36040
- var newsletterFieldSchema = z62.object({
36041
- id: z62.string(),
36042
- type: z62.enum(["email", "text"]),
36043
- label: z62.string(),
36044
- required: z62.boolean(),
36045
- placeholder: z62.string().optional()
36265
+ var newsletterPresetSchema = z63.enum(["emailOnly", "emailName", "emailFirstLast", "emailNameCompany"]);
36266
+ var newsletterDestinationProviderSchema = z63.enum(["riverbank", "mailchimp"]);
36267
+ var newsletterFieldSchema = z63.object({
36268
+ id: z63.string(),
36269
+ type: z63.enum(["email", "text"]),
36270
+ label: z63.string(),
36271
+ required: z63.boolean(),
36272
+ placeholder: z63.string().optional()
36046
36273
  });
36047
- var newsletterSourceSchema = z62.object({
36048
- siteId: z62.string().optional(),
36049
- apiBaseUrl: z62.string().optional(),
36050
- listId: z62.string().nullable().optional(),
36274
+ var newsletterSignupBlockIdSchema = z63.string().trim().min(1).transform(parseRequiredNewsletterSignupBlockId);
36275
+ var signedNewsletterDestinationRefSchema = z63.string().trim().min(1).transform(parseRequiredSignedNewsletterDestinationRef);
36276
+ var newsletterPublicDestinationRefSchema = z63.discriminatedUnion("tag", [
36277
+ z63.object({
36278
+ tag: z63.literal("block_ref"),
36279
+ blockId: newsletterSignupBlockIdSchema
36280
+ }),
36281
+ z63.object({
36282
+ tag: z63.literal("signed_destination_ref"),
36283
+ token: signedNewsletterDestinationRefSchema
36284
+ })
36285
+ ]);
36286
+ var newsletterSourceSchema = z63.object({
36287
+ blockId: z63.string().nullable().optional(),
36288
+ siteId: z63.string().optional(),
36289
+ apiBaseUrl: z63.string().optional(),
36290
+ listId: z63.string().nullable().optional(),
36291
+ destinationProvider: newsletterDestinationProviderSchema.nullable().optional(),
36051
36292
  preset: newsletterPresetSchema.optional(),
36052
- includePhone: z62.boolean().optional(),
36053
- buttonLabel: z62.string().nullable().optional(),
36054
- successMessage: z62.string().nullable().optional(),
36055
- privacyNote: z62.string().nullable().optional(),
36056
- tags: z62.string().nullable().optional(),
36057
- spamProtectionEnabled: z62.boolean().optional(),
36058
- className: z62.string().nullable().optional()
36293
+ includePhone: z63.boolean().optional(),
36294
+ buttonLabel: z63.string().nullable().optional(),
36295
+ successMessage: z63.string().nullable().optional(),
36296
+ privacyNote: z63.string().nullable().optional(),
36297
+ tags: z63.string().nullable().optional(),
36298
+ spamProtectionEnabled: z63.boolean().optional(),
36299
+ className: z63.string().nullable().optional()
36059
36300
  });
36060
- var newsletterDisplaySchema = z62.object({
36061
- kind: z62.literal("newsletter-form"),
36062
- className: z62.string().nullable(),
36063
- buttonLabel: z62.string(),
36064
- successMessage: z62.string().nullable(),
36065
- privacyNote: z62.string().nullable(),
36066
- fields: z62.array(newsletterFieldSchema)
36301
+ var newsletterDisplaySchema = z63.object({
36302
+ kind: z63.literal("newsletter-form"),
36303
+ className: z63.string().nullable(),
36304
+ buttonLabel: z63.string(),
36305
+ successMessage: z63.string().nullable(),
36306
+ privacyNote: z63.string().nullable(),
36307
+ fields: z63.array(newsletterFieldSchema)
36067
36308
  });
36068
- var newsletterHydrationSchema = z62.object({
36069
- listId: z62.string().nullable().optional(),
36309
+ var newsletterHydrationSchema = z63.object({
36310
+ destinationRef: newsletterPublicDestinationRefSchema.nullable().optional(),
36311
+ listId: z63.string().nullable().optional(),
36070
36312
  preset: newsletterPresetSchema,
36071
- includePhone: z62.boolean(),
36072
- tags: z62.string().nullable().optional(),
36073
- spamProtectionEnabled: z62.boolean().optional()
36313
+ includePhone: z63.boolean(),
36314
+ tags: z63.string().nullable().optional(),
36315
+ spamProtectionEnabled: z63.boolean().optional()
36074
36316
  });
36075
- var newsletterRenderSchema = z62.object({
36317
+ var newsletterRenderSchema = z63.object({
36076
36318
  display: newsletterDisplaySchema,
36077
36319
  hydration: newsletterHydrationSchema
36078
36320
  });
36079
- var newsletterIslandMetaCodec = createZodCodec(z62.object({
36080
- siteId: z62.string().optional(),
36081
- apiBaseUrl: z62.string().optional()
36321
+ var newsletterIslandMetaCodec = createZodCodec(z63.object({
36322
+ siteId: z63.string().optional(),
36323
+ apiBaseUrl: z63.string().optional()
36082
36324
  }));
36083
36325
  var newsletterIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl");
36084
36326
  function buildNewsletterDisplay(source) {
@@ -36099,16 +36341,20 @@ var newsletterFormBlockRuntime = defineProgressiveBlockRuntime({
36099
36341
  source: createZodCodec(newsletterSourceSchema),
36100
36342
  render: createZodCodec(newsletterRenderSchema)
36101
36343
  },
36102
- buildRender: (source) => ({
36103
- display: buildNewsletterDisplay(source),
36104
- hydration: {
36105
- listId: source.listId,
36106
- preset: source.preset ?? "emailOnly",
36107
- includePhone: source.includePhone ?? false,
36108
- tags: source.tags ?? null,
36109
- spamProtectionEnabled: source.spamProtectionEnabled
36110
- }
36111
- })
36344
+ buildRender: (source) => {
36345
+ const runtimeSource = deriveNewsletterSignupRuntimeSource(source);
36346
+ return {
36347
+ display: buildNewsletterDisplay(source),
36348
+ hydration: {
36349
+ destinationRef: buildNewsletterSignupBlockRef(source.blockId),
36350
+ listId: runtimeSource.listId,
36351
+ preset: source.preset ?? "emailOnly",
36352
+ includePhone: source.includePhone ?? false,
36353
+ tags: runtimeSource.tags,
36354
+ spamProtectionEnabled: source.spamProtectionEnabled
36355
+ }
36356
+ };
36357
+ }
36112
36358
  });
36113
36359
  var newsletterFormInteractiveIslandPropsCodec = createInteractiveIslandCodec({
36114
36360
  runtime: newsletterFormBlockRuntime,
@@ -36131,6 +36377,20 @@ function buildNewsletterFormInteractiveIslandProps(props2) {
36131
36377
  source: props2
36132
36378
  });
36133
36379
  }
36380
+ function parseRequiredNewsletterSignupBlockId(value) {
36381
+ const parsed = parseNewsletterSignupBlockId(value);
36382
+ if (!parsed) {
36383
+ throw new Error("Newsletter signup block destination ref requires blockId");
36384
+ }
36385
+ return parsed;
36386
+ }
36387
+ function parseRequiredSignedNewsletterDestinationRef(value) {
36388
+ const parsed = parseSignedNewsletterDestinationRef(value);
36389
+ if (!parsed) {
36390
+ throw new Error("Newsletter signup signed destination ref requires token");
36391
+ }
36392
+ return parsed;
36393
+ }
36134
36394
 
36135
36395
  // ../blocks/src/system/blocks/newsletter-signup.ts
36136
36396
  var stackedComposition = composeFragments([
@@ -36210,23 +36470,23 @@ var newsletterSignupBlockDefinition = {
36210
36470
  };
36211
36471
 
36212
36472
  // ../blocks/src/system/blocks/team-members.ts
36213
- import { z as z63 } from "zod";
36473
+ import { z as z64 } from "zod";
36214
36474
  var ITEM_NAME2 = "member";
36215
36475
  var teamMemberPhotoSchema = mediaSchema2.refine((media2) => media2.type === "image", {
36216
36476
  message: "Team member photos must be image media"
36217
36477
  }).nullable();
36218
- var teamMemberDataSchema = z63.object({
36219
- _type: z63.literal("teamMember"),
36220
- id: z63.string(),
36221
- name: z63.string(),
36222
- role: z63.string().nullable(),
36223
- roleLabel: z63.string().nullable(),
36224
- bio: z63.string().nullable(),
36225
- summary: z63.string().nullable(),
36478
+ var teamMemberDataSchema = z64.object({
36479
+ _type: z64.literal("teamMember"),
36480
+ id: z64.string(),
36481
+ name: z64.string(),
36482
+ role: z64.string().nullable(),
36483
+ roleLabel: z64.string().nullable(),
36484
+ bio: z64.string().nullable(),
36485
+ summary: z64.string().nullable(),
36226
36486
  photo: teamMemberPhotoSchema,
36227
- profilePath: z63.string().nullable()
36487
+ profilePath: z64.string().nullable()
36228
36488
  });
36229
- var teamMembersDataSchema = z63.array(teamMemberDataSchema);
36489
+ var teamMembersDataSchema = z64.array(teamMemberDataSchema);
36230
36490
  var dynamicSourceWhen = { equals: "site_staff" };
36231
36491
  var manualSourceWhen = { equals: "site_staff", not: true };
36232
36492
  var headingNode = text(
@@ -38756,6 +39016,8 @@ function renderDoc(node, key, imageResolveContext) {
38756
39016
  return /* @__PURE__ */ jsx15("blockquote", { children }, key);
38757
39017
  case "horizontalRule":
38758
39018
  return /* @__PURE__ */ jsx15("hr", {}, key);
39019
+ case "hardBreak":
39020
+ return /* @__PURE__ */ jsx15("br", {}, key);
38759
39021
  case "image": {
38760
39022
  const attrs = node.attrs ?? {};
38761
39023
  const src = typeof attrs.src === "string" ? attrs.src.trim() : "";
@@ -38812,84 +39074,11 @@ function Text({
38812
39074
  return /* @__PURE__ */ jsx16(Comp, { className, ...dataAttributes, children });
38813
39075
  }
38814
39076
 
38815
- // ../blocks/src/system/manifest/richTextSchema.ts
38816
- import { z as z64 } from "zod";
38817
- var TipTapMarkSchema = z64.object({
38818
- type: z64.string(),
38819
- attrs: z64.record(z64.string(), z64.unknown()).optional()
38820
- });
38821
- var TipTapNodeSchema = z64.lazy(
38822
- () => z64.object({
38823
- type: z64.string(),
38824
- content: z64.array(TipTapNodeSchema).optional(),
38825
- text: z64.string().optional(),
38826
- attrs: z64.record(z64.string(), z64.unknown()).optional(),
38827
- marks: z64.array(TipTapMarkSchema).optional()
38828
- })
38829
- );
38830
- var RichTextValueSchema = z64.union([
38831
- // Canonical: TipTap document directly
38832
- TipTapNodeSchema,
38833
- // Legacy (read-tolerance only): wrapped in { doc: {...} }
38834
- z64.object({
38835
- doc: TipTapNodeSchema
38836
- })
38837
- ]);
38838
- var RichTextDocSchema = z64.object({
38839
- type: z64.literal("doc"),
38840
- content: z64.array(TipTapNodeSchema)
38841
- });
38842
- function unwrapRichTextRoot(value) {
38843
- if (!isRecord4(value)) return value;
38844
- if (!("doc" in value)) return value;
38845
- const inner = value.doc;
38846
- if (isRecord4(inner) && inner.type === "doc") return inner;
38847
- return value;
38848
- }
38849
-
38850
39077
  // ../blocks/src/system/runtime/nodes/richText-coerce.ts
38851
- function parseInlineMarkdown(text2) {
38852
- const out = [];
38853
- const pushText = (value, marks) => {
38854
- if (!value) return;
38855
- out.push(
38856
- marks && marks.length > 0 ? { type: "text", text: value, marks } : { type: "text", text: value }
38857
- );
38858
- };
38859
- let rest = text2;
38860
- while (rest.length > 0) {
38861
- const start = rest.indexOf("**");
38862
- if (start === -1) {
38863
- pushText(rest);
38864
- break;
38865
- }
38866
- const end = rest.indexOf("**", start + 2);
38867
- if (end === -1) {
38868
- pushText(rest);
38869
- break;
38870
- }
38871
- pushText(rest.slice(0, start));
38872
- pushText(rest.slice(start + 2, end), [{ type: "bold" }]);
38873
- rest = rest.slice(end + 2);
38874
- }
38875
- return out;
38876
- }
38877
- function markdownToTipTapDoc(markdown) {
38878
- const normalized = markdown.replace(/\r\n/g, "\n").trim();
38879
- if (!normalized) return { type: "doc", content: [] };
38880
- const paragraphs = normalized.split(/\n{2,}/).map((p) => p.trim()).filter(Boolean);
38881
- return {
38882
- type: "doc",
38883
- content: paragraphs.map((p) => {
38884
- const inline2 = parseInlineMarkdown(p);
38885
- return inline2.length > 0 ? { type: "paragraph", content: inline2 } : { type: "paragraph" };
38886
- })
38887
- };
38888
- }
38889
39078
  function coerceRichTextDoc(value) {
38890
39079
  const raw = unwrapRichTextRoot(value);
38891
39080
  if (typeof raw === "string") {
38892
- return markdownToTipTapDoc(raw);
39081
+ return createRichTextDocFromMarkdown(raw);
38893
39082
  }
38894
39083
  if (isRecord4(raw) && typeof raw.type === "string") {
38895
39084
  return raw;
@@ -40497,6 +40686,32 @@ function TeamMemberName({
40497
40686
  }) {
40498
40687
  return profilePath ? /* @__PURE__ */ jsx29("a", { href: profilePath, className: "rb-hover-opacity-80", children: /* @__PURE__ */ jsx29("strong", { children: name }) }) : /* @__PURE__ */ jsx29("strong", { children: name });
40499
40688
  }
40689
+ function formatTicketTypePrice(ticketType, currency) {
40690
+ return formatCurrencyAmount(ticketType.priceAmount, currency, { decimals: "auto" });
40691
+ }
40692
+ function getActiveTicketTypes(event) {
40693
+ return event.pricing.kind === "ticket_types" ? event.pricing.ticketTypes.filter((ticketType) => ticketType.isActive).sort((left, right) => left.sortOrder - right.sortOrder) : [];
40694
+ }
40695
+ function TicketTypePriceList({
40696
+ ticketTypes,
40697
+ currency
40698
+ }) {
40699
+ if (ticketTypes.length === 0) return null;
40700
+ return /* @__PURE__ */ jsx29("div", { className: "rb-mt-3 rb-flex rb-flex-col rb-gap-2", children: ticketTypes.map((ticketType) => /* @__PURE__ */ jsxs16(
40701
+ "div",
40702
+ {
40703
+ className: "rb-flex rb-items-start rb-justify-between rb-gap-4",
40704
+ children: [
40705
+ /* @__PURE__ */ jsxs16("div", { children: [
40706
+ /* @__PURE__ */ jsx29("p", { children: ticketType.name }),
40707
+ ticketType.description ? /* @__PURE__ */ jsx29("p", { className: "rb-caption status-muted", children: ticketType.description }) : null
40708
+ ] }),
40709
+ /* @__PURE__ */ jsx29("p", { children: /* @__PURE__ */ jsx29("strong", { children: formatTicketTypePrice(ticketType, currency) }) })
40710
+ ]
40711
+ },
40712
+ ticketType.id
40713
+ )) });
40714
+ }
40500
40715
  function EventDetailsView({
40501
40716
  selection,
40502
40717
  showVenue,
@@ -40531,6 +40746,7 @@ function EventDetailsView({
40531
40746
  const shouldShowCoursePricing = showCost && !isDropIn && coursePricing !== null;
40532
40747
  const shouldShowEventCost = showCost && isPaid && !isDropIn && coursePricing === null;
40533
40748
  const eventCostLabel = shouldShowEventCost ? formatEventPrice(selected) : null;
40749
+ const ticketTypes = shouldShowEventCost ? getActiveTicketTypes(selected) : [];
40534
40750
  const acceptedItems = [];
40535
40751
  if (showAcceptedPasses) {
40536
40752
  acceptedItems.push(...applicablePasses.map((p) => p.name));
@@ -40587,6 +40803,7 @@ function EventDetailsView({
40587
40803
  /* @__PURE__ */ jsx29("div", { className: "rb-label rb-mb-2", children: "Cost" }),
40588
40804
  /* @__PURE__ */ jsx29("p", { children: /* @__PURE__ */ jsx29("strong", { children: eventCostLabel }) }),
40589
40805
  autoApplyDiscount ? /* @__PURE__ */ jsx29("p", { className: "rb-caption rb-mt-1", children: formatAutoApplyDiscountLine(autoApplyDiscount, eventPricingCurrency) }) : null,
40806
+ /* @__PURE__ */ jsx29(TicketTypePriceList, { ticketTypes, currency: eventPricingCurrency }),
40590
40807
  hasAcceptedItems ? /* @__PURE__ */ jsxs16("p", { className: "rb-caption rb-mt-1", children: [
40591
40808
  "You can also attend with: ",
40592
40809
  acceptedItems.join(", ")
@@ -42717,6 +42934,7 @@ function EventRegistrationSSR({
42717
42934
  successMessage,
42718
42935
  waitlistMessage,
42719
42936
  buttonVariant,
42937
+ overlayEnabled,
42720
42938
  spamProtectionEnabled,
42721
42939
  stage,
42722
42940
  supportEmail,
@@ -42738,6 +42956,7 @@ function EventRegistrationSSR({
42738
42956
  successMessage,
42739
42957
  waitlistMessage,
42740
42958
  buttonVariant,
42959
+ overlayEnabled,
42741
42960
  spamProtectionEnabled,
42742
42961
  stage,
42743
42962
  supportEmail
@@ -43002,6 +43221,7 @@ function NewsletterFormSSR({
43002
43221
  siteId,
43003
43222
  apiBaseUrl,
43004
43223
  listId,
43224
+ destinationProvider,
43005
43225
  preset: preset2 = "emailOnly",
43006
43226
  includePhone,
43007
43227
  buttonLabel = "Subscribe",
@@ -43012,9 +43232,11 @@ function NewsletterFormSSR({
43012
43232
  className
43013
43233
  }) {
43014
43234
  const islandProps = buildNewsletterFormInteractiveIslandProps({
43235
+ blockId,
43015
43236
  siteId,
43016
43237
  apiBaseUrl,
43017
43238
  listId,
43239
+ destinationProvider,
43018
43240
  preset: preset2,
43019
43241
  includePhone,
43020
43242
  buttonLabel,
@@ -48822,6 +49044,7 @@ var MemoBlockSection = React6.memo(
48822
49044
  apiBaseUrl: dataContext?.apiBaseUrl ?? null,
48823
49045
  portalToken: dataContext?.portalToken ?? null,
48824
49046
  bookingOfferingPresets: dataContext?.bookingOfferingPresets ?? [],
49047
+ eventRegistrationOverlayEnabled: dataContext?.eventRegistrationOverlayEnabled ?? false,
48825
49048
  ...routes ? { routes } : {},
48826
49049
  // Identifier maps for CTA link resolution at render time
48827
49050
  ...dataContext?.pagesByIdentifier ? { pagesByIdentifier: dataContext.pagesByIdentifier } : {},
@@ -52202,6 +52425,7 @@ var containerResponsiveThemeCss = `/*
52202
52425
  */
52203
52426
 
52204
52427
  :where(.theme-scope) :where([data-block="event-registration"]) {
52428
+ --rb-modal-overlay-bg: rgb(var(--tb-text, 0 0 0) / 0.6);
52205
52429
  --rb-event-tile-bg: var(--er-event-card-bg);
52206
52430
  --rb-event-tile-border: var(--er-border);
52207
52431
  --rb-event-tile-border-width: var(--er-event-card-border-width);
@@ -53871,6 +54095,239 @@ var containerResponsiveThemeCss = `/*
53871
54095
  background: rgba(var(--tb-text), 0.05);
53872
54096
  }
53873
54097
 
54098
+ /* In-flow booking teaser (sits at the block's position in the page) */
54099
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser {
54100
+ display: flex;
54101
+ flex-wrap: wrap;
54102
+ align-items: center;
54103
+ justify-content: space-between;
54104
+ gap: 1rem 1.5rem;
54105
+ padding: 1.25rem 1.5rem;
54106
+ border: 1px solid var(--er-border);
54107
+ border-radius: var(--rb-block-radius);
54108
+ background: var(--er-event-card-bg);
54109
+ color: var(--er-on-surface);
54110
+ }
54111
+
54112
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser__info {
54113
+ display: flex;
54114
+ flex-direction: column;
54115
+ gap: 0.25rem;
54116
+ min-width: 0;
54117
+ }
54118
+
54119
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser__title {
54120
+ font-size: 1.0625rem;
54121
+ font-weight: 700;
54122
+ line-height: 1.2;
54123
+ }
54124
+
54125
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser__meta {
54126
+ font-size: 0.9375rem;
54127
+ line-height: 1.3;
54128
+ opacity: 0.75;
54129
+ }
54130
+
54131
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser__tickets {
54132
+ display: flex;
54133
+ flex-direction: column;
54134
+ gap: 0.375rem;
54135
+ margin-top: 0.5rem;
54136
+ padding-top: 0.625rem;
54137
+ border-top: 1px solid var(--er-border);
54138
+ }
54139
+
54140
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser__ticket {
54141
+ display: flex;
54142
+ align-items: baseline;
54143
+ justify-content: space-between;
54144
+ gap: 1rem;
54145
+ font-size: 0.9375rem;
54146
+ line-height: 1.35;
54147
+ }
54148
+
54149
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser__ticket-name {
54150
+ min-width: 0;
54151
+ }
54152
+
54153
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser__cta {
54154
+ flex: 0 0 auto;
54155
+ }
54156
+
54157
+ /* Fixed, full-width sticky booking bar (content-agnostic; sits above page flow) */
54158
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-booking-bar {
54159
+ position: fixed;
54160
+ left: 0;
54161
+ right: 0;
54162
+ bottom: 0;
54163
+ z-index: 12000;
54164
+ padding: 0.75rem max(1rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
54165
+ background: rgb(var(--tb-background));
54166
+ border-top: 1px solid var(--er-border);
54167
+ box-shadow: 0 -10px 30px rgba(var(--tb-shadow), 0.16);
54168
+ }
54169
+
54170
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-booking-bar__inner {
54171
+ display: flex;
54172
+ align-items: center;
54173
+ justify-content: space-between;
54174
+ gap: 1rem;
54175
+ width: 100%;
54176
+ max-width: 72rem;
54177
+ margin-inline: auto;
54178
+ }
54179
+
54180
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-booking-bar__info {
54181
+ display: flex;
54182
+ flex-direction: column;
54183
+ gap: 0.125rem;
54184
+ min-width: 0;
54185
+ }
54186
+
54187
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-booking-bar__title {
54188
+ font-size: 0.95rem;
54189
+ font-weight: 700;
54190
+ line-height: 1.2;
54191
+ white-space: nowrap;
54192
+ overflow: hidden;
54193
+ text-overflow: ellipsis;
54194
+ }
54195
+
54196
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-booking-bar__meta {
54197
+ font-size: 0.8125rem;
54198
+ line-height: 1.25;
54199
+ opacity: 0.75;
54200
+ white-space: nowrap;
54201
+ overflow: hidden;
54202
+ text-overflow: ellipsis;
54203
+ }
54204
+
54205
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-booking-bar__cta {
54206
+ flex: 0 0 auto;
54207
+ }
54208
+
54209
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-booking-overlay {
54210
+ position: fixed;
54211
+ inset: 0;
54212
+ height: 100dvh;
54213
+ z-index: 14000;
54214
+ display: flex;
54215
+ align-items: stretch;
54216
+ justify-content: stretch;
54217
+ background: var(--rb-modal-overlay-bg);
54218
+ }
54219
+
54220
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-booking-overlay__panel {
54221
+ position: relative;
54222
+ z-index: 1;
54223
+ display: flex;
54224
+ flex-direction: column;
54225
+ width: 100%;
54226
+ height: 100dvh;
54227
+ min-height: 0;
54228
+ overflow: hidden;
54229
+ background: rgb(var(--tb-background));
54230
+ color: var(--er-on-surface);
54231
+ }
54232
+
54233
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-booking-overlay__header {
54234
+ flex: 0 0 auto;
54235
+ z-index: 2;
54236
+ display: flex;
54237
+ align-items: center;
54238
+ justify-content: space-between;
54239
+ gap: 1rem;
54240
+ padding: 1rem;
54241
+ background: rgb(var(--tb-background));
54242
+ border-bottom: 1px solid var(--er-border);
54243
+ }
54244
+
54245
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-booking-overlay__title {
54246
+ margin: 0;
54247
+ font-size: 1rem;
54248
+ line-height: 1.25;
54249
+ font-weight: 700;
54250
+ }
54251
+
54252
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-booking-overlay__close {
54253
+ width: 2rem;
54254
+ height: 2rem;
54255
+ display: inline-flex;
54256
+ align-items: center;
54257
+ justify-content: center;
54258
+ border: 1px solid var(--er-border);
54259
+ border-radius: 999px;
54260
+ background: transparent;
54261
+ color: rgb(var(--tb-text));
54262
+ font-size: 1.25rem;
54263
+ line-height: 1;
54264
+ cursor: pointer;
54265
+ }
54266
+
54267
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-container--overlay {
54268
+ max-width: none;
54269
+ border: 0;
54270
+ border-radius: 0;
54271
+ padding: 0;
54272
+ background: transparent;
54273
+ display: flex;
54274
+ flex: 1 1 auto;
54275
+ min-height: 0;
54276
+ overflow: hidden;
54277
+ }
54278
+
54279
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-container--overlay .er-payment-layout {
54280
+ flex: 1 1 auto;
54281
+ min-height: 0;
54282
+ height: 100%;
54283
+ gap: 0;
54284
+ grid-template-rows: minmax(0, 1fr) auto;
54285
+ grid-template-areas:
54286
+ "main"
54287
+ "footer";
54288
+ }
54289
+
54290
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-container--overlay .er-payment-layout-main {
54291
+ min-height: 0;
54292
+ overflow: auto;
54293
+ padding: 1rem;
54294
+ }
54295
+
54296
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-container--overlay .er-payment-layout-footer {
54297
+ position: relative;
54298
+ z-index: 3;
54299
+ padding: 0.875rem 1rem max(0.875rem, env(safe-area-inset-bottom));
54300
+ background: rgb(var(--tb-background));
54301
+ border-top: 1px solid var(--er-border);
54302
+ box-shadow: 0 -12px 26px rgba(var(--tb-shadow), 0.12);
54303
+ }
54304
+
54305
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-container--overlay .er-actions {
54306
+ margin-top: 0;
54307
+ }
54308
+
54309
+ @container rb-site (min-width: 768px) {
54310
+ @scope ([data-rb-responsive-mode="container"]) to (:scope [data-rb-responsive-mode]) {
54311
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-booking-overlay {
54312
+ justify-content: flex-end;
54313
+ }
54314
+
54315
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-booking-overlay__panel {
54316
+ width: min(32rem, 100vw);
54317
+ min-height: 100%;
54318
+ box-shadow: -16px 0 40px rgba(var(--tb-shadow), 0.22);
54319
+ }
54320
+
54321
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-container--overlay .er-payment-layout-main {
54322
+ padding: 1.25rem;
54323
+ }
54324
+
54325
+ :where(.theme-scope) :where([data-block="event-registration"]) .er-container--overlay .er-payment-layout-footer {
54326
+ padding: 0.875rem 1.25rem max(0.875rem, env(safe-area-inset-bottom));
54327
+ }
54328
+ }
54329
+ }
54330
+
53874
54331
  /* Magic Link Form */
53875
54332
  :where(.theme-scope) :where([data-block="event-registration"]) .er-magic-link-form {
53876
54333
  display: flex;
@@ -59877,6 +60334,7 @@ function PageContent({
59877
60334
  themeTokens: providedTokens,
59878
60335
  siteId,
59879
60336
  resolvedData,
60337
+ bookingOfferingPresets,
59880
60338
  routeMap,
59881
60339
  pagesByIdentifier,
59882
60340
  entriesByIdentifier,
@@ -59909,6 +60367,7 @@ function PageContent({
59909
60367
  portalToken,
59910
60368
  previewToken,
59911
60369
  resolvedData,
60370
+ bookingOfferingPresets: bookingOfferingPresets ?? [],
59912
60371
  routes: routeMap,
59913
60372
  pagesByIdentifier,
59914
60373
  entriesByIdentifier,
@@ -61647,6 +62106,64 @@ var ENDPOINT_DEFINITIONS = {
61647
62106
  auth: "user",
61648
62107
  responseKind: "json"
61649
62108
  },
62109
+ listMailchimpAudiences: {
62110
+ path: "/sites/{siteId}/integrations/mailchimp/audiences",
62111
+ method: "GET",
62112
+ tags: [TAG_TEMPLATES.site],
62113
+ auth: "user",
62114
+ responseKind: "json",
62115
+ errors: ["auth:forbidden", "server:internal_error"]
62116
+ },
62117
+ getMailchimpSignupSyncHealth: {
62118
+ path: "/sites/{siteId}/integrations/mailchimp/signup-sync-health",
62119
+ method: "GET",
62120
+ tags: [TAG_TEMPLATES.site],
62121
+ auth: "user",
62122
+ responseKind: "json",
62123
+ errors: ["auth:forbidden", "server:internal_error"]
62124
+ },
62125
+ getMailchimpConnection: {
62126
+ path: "/sites/{siteId}/integrations/mailchimp/connection",
62127
+ method: "GET",
62128
+ tags: [TAG_TEMPLATES.site],
62129
+ auth: "user",
62130
+ responseKind: "json",
62131
+ errors: ["auth:forbidden", "server:internal_error"]
62132
+ },
62133
+ startMailchimpOAuth: {
62134
+ path: "/sites/{siteId}/integrations/mailchimp/oauth/start",
62135
+ method: "POST",
62136
+ tags: [TAG_TEMPLATES.site],
62137
+ auth: "user",
62138
+ responseKind: "json",
62139
+ demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
62140
+ errors: ["auth:forbidden", "validation:invalid_input", "server:internal_error"]
62141
+ },
62142
+ refreshMailchimpAudiences: {
62143
+ path: "/sites/{siteId}/integrations/mailchimp/audiences/refresh",
62144
+ method: "POST",
62145
+ tags: [TAG_TEMPLATES.site],
62146
+ auth: "user",
62147
+ responseKind: "json",
62148
+ demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
62149
+ errors: ["auth:forbidden", "server:internal_error"]
62150
+ },
62151
+ disconnectMailchimp: {
62152
+ path: "/sites/{siteId}/integrations/mailchimp/disconnect",
62153
+ method: "POST",
62154
+ tags: [TAG_TEMPLATES.site],
62155
+ auth: "user",
62156
+ responseKind: "json",
62157
+ demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
62158
+ errors: ["auth:forbidden", "server:internal_error"]
62159
+ },
62160
+ mailchimpOAuthCallback: {
62161
+ path: "/auth/mailchimp/callback",
62162
+ method: "GET",
62163
+ auth: "public",
62164
+ responseKind: "void",
62165
+ errors: []
62166
+ },
61650
62167
  createNewsletterList: {
61651
62168
  path: "/sites/{siteId}/newsletter/lists",
61652
62169
  method: "POST",
@@ -63871,20 +64388,6 @@ var ENDPOINT_DEFINITIONS = {
63871
64388
  auth: "user",
63872
64389
  responseKind: "json"
63873
64390
  },
63874
- instagramUploadZip: {
63875
- path: "/instagram/upload-zip",
63876
- method: "POST",
63877
- tags: ["instagram-import"],
63878
- auth: "user",
63879
- responseKind: "json"
63880
- },
63881
- createInstagramZipUploadUrl: {
63882
- path: "/instagram/upload-zip-url",
63883
- method: "POST",
63884
- tags: ["instagram-import"],
63885
- auth: "user",
63886
- responseKind: "json"
63887
- },
63888
64391
  getAnalyticsReport: {
63889
64392
  path: "/sites/{siteId}/analytics/report",
63890
64393
  method: "GET",
@@ -68506,21 +69009,8 @@ var MultiPageUpdateResponse = z76.object({
68506
69009
  });
68507
69010
 
68508
69011
  // src/data/prefetchBlockData.ts
68509
- var SUPPORTED_LOADER_ENDPOINTS2 = [
68510
- "listPublishedEntries",
68511
- "getPublishedEntryPreview",
68512
- "listPublicEvents",
68513
- "listPublicCourses",
68514
- "listPublicTeamMembers",
68515
- "listPublicProducts",
68516
- "listPublicPasses",
68517
- "listPublicMemberships",
68518
- "getPublicFormById",
68519
- "getPublicBookingServices",
68520
- "getPublicEventDetails"
68521
- ];
68522
69012
  function isSupportedLoaderEndpoint2(endpoint) {
68523
- return SUPPORTED_LOADER_ENDPOINTS2.includes(endpoint);
69013
+ return SUPPORTED_LOADER_ENDPOINTS.includes(endpoint);
68524
69014
  }
68525
69015
  var ENTRY_REF_KEYS = [
68526
69016
  "identifier",
@@ -68585,6 +69075,194 @@ function parseManualEntryRefs(...values) {
68585
69075
  }
68586
69076
  return void 0;
68587
69077
  }
69078
+ var loaderAdapters = {
69079
+ listPublishedEntries: listPublishedEntries2,
69080
+ getPublishedEntryPreview,
69081
+ listPublicEvents,
69082
+ getPublicEventDetails,
69083
+ listPublicCourses,
69084
+ listPublicRouteCandidates,
69085
+ listPublicTeamMembers,
69086
+ listPublicProducts,
69087
+ listPublicPasses,
69088
+ listPublicMemberships,
69089
+ getPublicFormById,
69090
+ getPublicBookingServices
69091
+ };
69092
+ function readStringParam(params, key) {
69093
+ const value = params[key];
69094
+ return value && value.length > 0 ? value : void 0;
69095
+ }
69096
+ function requireStringParam(params, key, endpoint) {
69097
+ const value = readStringParam(params, key);
69098
+ if (!value) {
69099
+ throw new Error(`${endpoint} requires ${key} param`);
69100
+ }
69101
+ return value;
69102
+ }
69103
+ function parsePositiveIntegerParam(params, key) {
69104
+ const value = params[key];
69105
+ const parsed = value === void 0 ? void 0 : Number.parseInt(value, 10);
69106
+ return typeof parsed === "number" && Number.isInteger(parsed) && parsed > 0 ? parsed : void 0;
69107
+ }
69108
+ function parseEntryOrder(value) {
69109
+ if (value === void 0) return void 0;
69110
+ switch (value) {
69111
+ case "order":
69112
+ return "manual";
69113
+ case "newest":
69114
+ case "oldest":
69115
+ case "title":
69116
+ return value;
69117
+ default:
69118
+ return void 0;
69119
+ }
69120
+ }
69121
+ function parsePublicEventKind(value) {
69122
+ if (value === void 0) return void 0;
69123
+ switch (value) {
69124
+ case "all":
69125
+ case "courses":
69126
+ case "events":
69127
+ return value;
69128
+ default:
69129
+ return void 0;
69130
+ }
69131
+ }
69132
+ async function listPublishedEntries2({ client, params }) {
69133
+ const siteId = requireStringParam(params, "siteId", "listPublishedEntries");
69134
+ const type = requireStringParam(params, "type", "listPublishedEntries");
69135
+ const stage = readStringParam(params, "stage");
69136
+ const mode = readStringParam(params, "mode");
69137
+ const parsedEntryRefs = mode === "manual" ? parseManualEntryRefs(params.identifiers, params.entryRefs, params.entryIds) : void 0;
69138
+ if (mode === "manual" && (!parsedEntryRefs || parsedEntryRefs.length === 0)) {
69139
+ return { entries: [] };
69140
+ }
69141
+ if (mode === "manual" && parsedEntryRefs) {
69142
+ return await client.getEntriesByIdentifiers({
69143
+ siteId,
69144
+ contentType: type,
69145
+ identifiers: parsedEntryRefs,
69146
+ preview: stage === "preview"
69147
+ });
69148
+ }
69149
+ return await client.getEntries({
69150
+ siteId,
69151
+ contentType: type,
69152
+ limit: parsePositiveIntegerParam(params, "limit"),
69153
+ order: parseEntryOrder(readStringParam(params, "orderBy")),
69154
+ preview: stage === "preview"
69155
+ });
69156
+ }
69157
+ async function getPublishedEntryPreview({ client, params }) {
69158
+ return await client.getEntry({
69159
+ siteId: requireStringParam(params, "siteId", "getPublishedEntryPreview"),
69160
+ contentType: requireStringParam(params, "type", "getPublishedEntryPreview"),
69161
+ slug: requireStringParam(params, "slug", "getPublishedEntryPreview")
69162
+ });
69163
+ }
69164
+ async function listPublicEvents({ client, params }) {
69165
+ return await client.listPublicEvents({
69166
+ siteId: requireStringParam(params, "siteId", "listPublicEvents"),
69167
+ limit: parsePositiveIntegerParam(params, "limit"),
69168
+ from: readStringParam(params, "from"),
69169
+ to: readStringParam(params, "to"),
69170
+ afterStartsAt: readStringParam(params, "afterStartsAt"),
69171
+ afterId: readStringParam(params, "afterId"),
69172
+ stage: readStringParam(params, "stage"),
69173
+ categoryIds: readStringParam(params, "categoryIds"),
69174
+ venueId: readStringParam(params, "venueId"),
69175
+ staffMemberId: readStringParam(params, "staffMemberId"),
69176
+ kind: parsePublicEventKind(readStringParam(params, "kind")),
69177
+ eventSurface: readStringParam(params, "eventSurface"),
69178
+ eventPresets: readStringParam(params, "eventPresets"),
69179
+ scheduleScope: readStringParam(params, "scheduleScope"),
69180
+ entryId: readStringParam(params, "entryId"),
69181
+ seriesId: readStringParam(params, "seriesId"),
69182
+ includeOccurrenceId: readStringParam(params, "includeOccurrenceId")
69183
+ });
69184
+ }
69185
+ async function getPublicEventDetails({ client, params }) {
69186
+ return await client.getPublicEventDetails({
69187
+ siteId: requireStringParam(params, "siteId", "getPublicEventDetails"),
69188
+ limit: parsePositiveIntegerParam(params, "limit"),
69189
+ from: readStringParam(params, "from"),
69190
+ to: readStringParam(params, "to"),
69191
+ afterStartsAt: readStringParam(params, "afterStartsAt"),
69192
+ afterId: readStringParam(params, "afterId"),
69193
+ stage: readStringParam(params, "stage"),
69194
+ categoryIds: readStringParam(params, "categoryIds"),
69195
+ venueId: readStringParam(params, "venueId"),
69196
+ staffMemberId: readStringParam(params, "staffMemberId"),
69197
+ kind: readStringParam(params, "kind"),
69198
+ eventSurface: readStringParam(params, "eventSurface"),
69199
+ eventPresets: readStringParam(params, "eventPresets"),
69200
+ scheduleScope: readStringParam(params, "scheduleScope"),
69201
+ entryId: readStringParam(params, "entryId"),
69202
+ seriesId: readStringParam(params, "seriesId"),
69203
+ includeOccurrenceId: readStringParam(params, "includeOccurrenceId")
69204
+ });
69205
+ }
69206
+ async function listPublicCourses({ client, params }) {
69207
+ return await client.listPublicCourses({
69208
+ siteId: requireStringParam(params, "siteId", "listPublicCourses"),
69209
+ limit: parsePositiveIntegerParam(params, "limit"),
69210
+ stage: readStringParam(params, "stage")
69211
+ });
69212
+ }
69213
+ async function listPublicRouteCandidates({ client, params }) {
69214
+ const siteId = requireStringParam(params, "siteId", "listPublicRouteCandidates");
69215
+ const response = await client.getAllPublishedRoutes({ siteId });
69216
+ return {
69217
+ routes: response.items.flatMap((item) => {
69218
+ if (!item.path) return [];
69219
+ return [{
69220
+ entityId: item.entityId,
69221
+ path: item.path,
69222
+ title: item.title,
69223
+ kind: item.entityType,
69224
+ contentTypeKey: item.contentTypeKey ?? null
69225
+ }];
69226
+ })
69227
+ };
69228
+ }
69229
+ async function listPublicTeamMembers({ client, params }) {
69230
+ return await client.listPublicTeamMembers({
69231
+ siteId: requireStringParam(params, "siteId", "listPublicTeamMembers"),
69232
+ stage: readStringParam(params, "stage")
69233
+ });
69234
+ }
69235
+ async function listPublicProducts({ client, params }) {
69236
+ return await client.listPublicProducts({
69237
+ siteId: requireStringParam(params, "siteId", "listPublicProducts"),
69238
+ stage: readStringParam(params, "stage") === "preview" ? "preview" : "published",
69239
+ categorySelector: parsePublicProductCategorySelector(params.categorySelector)
69240
+ });
69241
+ }
69242
+ async function listPublicPasses({ client, params }) {
69243
+ return await client.listPublicPasses({
69244
+ siteId: requireStringParam(params, "siteId", "listPublicPasses"),
69245
+ categories: readStringParam(params, "categories")
69246
+ });
69247
+ }
69248
+ async function listPublicMemberships({ client, params }) {
69249
+ return await client.listPublicMemberships({
69250
+ siteId: requireStringParam(params, "siteId", "listPublicMemberships"),
69251
+ categories: readStringParam(params, "categories")
69252
+ });
69253
+ }
69254
+ async function getPublicFormById({ client, params }) {
69255
+ return await client.getPublicFormById({
69256
+ formId: requireStringParam(params, "formId", "getPublicFormById"),
69257
+ siteId: requireStringParam(params, "siteId", "getPublicFormById")
69258
+ });
69259
+ }
69260
+ async function getPublicBookingServices({ client, params }) {
69261
+ return await client.getPublicBookingServices({
69262
+ siteId: requireStringParam(params, "siteId", "getPublicBookingServices"),
69263
+ ids: readStringParam(params, "ids")
69264
+ });
69265
+ }
68588
69266
  async function prefetchBlockData2(page, context, client, options) {
68589
69267
  const { customBlocks } = options ?? {};
68590
69268
  const customBlockMap = new Map(
@@ -68594,189 +69272,11 @@ async function prefetchBlockData2(page, context, client, options) {
68594
69272
  apiClient: async ({ endpoint, params }) => {
68595
69273
  if (!isSupportedLoaderEndpoint2(endpoint)) {
68596
69274
  throw new Error(
68597
- `Unsupported loader endpoint: ${endpoint}. SDK only supports: ${SUPPORTED_LOADER_ENDPOINTS2.join(", ")}`
69275
+ `Unsupported loader endpoint: ${endpoint}. SDK only supports: ${SUPPORTED_LOADER_ENDPOINTS.join(", ")}`
68598
69276
  );
68599
69277
  }
68600
69278
  const resolvedParams = normalizeLoaderParams(endpoint, params, context);
68601
- switch (endpoint) {
68602
- case "listPublishedEntries": {
68603
- const {
68604
- siteId,
68605
- type,
68606
- orderBy,
68607
- limit,
68608
- stage,
68609
- mode,
68610
- entryIds,
68611
- identifiers,
68612
- entryRefs
68613
- } = resolvedParams ?? {};
68614
- if (!siteId || !type) {
68615
- throw new Error("listPublishedEntries requires siteId and type params");
68616
- }
68617
- const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
68618
- const order = orderBy === "order" ? "manual" : orderBy === "newest" || orderBy === "oldest" || orderBy === "title" ? orderBy : void 0;
68619
- const parsedEntryRefs = mode === "manual" ? parseManualEntryRefs(identifiers, entryRefs, entryIds) : void 0;
68620
- if (mode === "manual" && (!parsedEntryRefs || parsedEntryRefs.length === 0)) {
68621
- return { entries: [] };
68622
- }
68623
- if (mode === "manual" && parsedEntryRefs) {
68624
- return await client.getEntriesByIdentifiers({
68625
- siteId,
68626
- contentType: type,
68627
- identifiers: parsedEntryRefs,
68628
- preview: stage === "preview"
68629
- });
68630
- }
68631
- return await client.getEntries({
68632
- siteId,
68633
- contentType: type,
68634
- limit: parsedLimit,
68635
- order,
68636
- preview: stage === "preview"
68637
- });
68638
- }
68639
- case "getPublishedEntryPreview": {
68640
- const { siteId, type, slug } = resolvedParams ?? {};
68641
- if (!siteId || !type || !slug) {
68642
- throw new Error("getPublishedEntryPreview requires siteId, type, and slug params");
68643
- }
68644
- return await client.getEntry({ siteId, contentType: type, slug });
68645
- }
68646
- case "listPublicEvents": {
68647
- const {
68648
- siteId,
68649
- limit,
68650
- from,
68651
- to,
68652
- stage,
68653
- categoryIds,
68654
- venueId,
68655
- kind,
68656
- entryId,
68657
- seriesId,
68658
- includeOccurrenceId
68659
- } = resolvedParams ?? {};
68660
- if (!siteId) {
68661
- throw new Error("listPublicEvents requires siteId param");
68662
- }
68663
- const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
68664
- return await client.listPublicEvents({
68665
- siteId,
68666
- limit: parsedLimit,
68667
- from,
68668
- to,
68669
- stage,
68670
- categoryIds: typeof categoryIds === "string" ? categoryIds : void 0,
68671
- venueId: typeof venueId === "string" ? venueId : void 0,
68672
- kind: kind === "all" || kind === "courses" || kind === "events" ? kind : void 0,
68673
- entryId: typeof entryId === "string" ? entryId : void 0,
68674
- seriesId: typeof seriesId === "string" ? seriesId : void 0,
68675
- includeOccurrenceId: typeof includeOccurrenceId === "string" ? includeOccurrenceId : void 0
68676
- });
68677
- }
68678
- case "getPublicEventDetails": {
68679
- const {
68680
- siteId,
68681
- limit,
68682
- from,
68683
- to,
68684
- afterStartsAt,
68685
- afterId,
68686
- stage,
68687
- categoryIds,
68688
- venueId,
68689
- staffMemberId,
68690
- kind,
68691
- entryId,
68692
- seriesId,
68693
- includeOccurrenceId
68694
- } = resolvedParams ?? {};
68695
- if (!siteId) {
68696
- throw new Error("getPublicEventDetails requires siteId param");
68697
- }
68698
- const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
68699
- return await client.getPublicEventDetails({
68700
- siteId,
68701
- limit: parsedLimit,
68702
- from: typeof from === "string" ? from : void 0,
68703
- to: typeof to === "string" ? to : void 0,
68704
- afterStartsAt: typeof afterStartsAt === "string" ? afterStartsAt : void 0,
68705
- afterId: typeof afterId === "string" ? afterId : void 0,
68706
- stage: typeof stage === "string" ? stage : void 0,
68707
- categoryIds: typeof categoryIds === "string" ? categoryIds : void 0,
68708
- venueId: typeof venueId === "string" ? venueId : void 0,
68709
- staffMemberId: typeof staffMemberId === "string" ? staffMemberId : void 0,
68710
- kind: typeof kind === "string" ? kind : void 0,
68711
- entryId: typeof entryId === "string" ? entryId : void 0,
68712
- seriesId: typeof seriesId === "string" ? seriesId : void 0,
68713
- includeOccurrenceId: typeof includeOccurrenceId === "string" ? includeOccurrenceId : void 0
68714
- });
68715
- }
68716
- case "listPublicCourses": {
68717
- const { siteId, limit, stage } = resolvedParams ?? {};
68718
- if (!siteId) {
68719
- throw new Error("listPublicCourses requires siteId param");
68720
- }
68721
- const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
68722
- return await client.listPublicCourses({ siteId, limit: parsedLimit, stage });
68723
- }
68724
- case "listPublicTeamMembers": {
68725
- const { siteId, stage } = resolvedParams ?? {};
68726
- if (!siteId) {
68727
- throw new Error("listPublicTeamMembers requires siteId param");
68728
- }
68729
- return await client.listPublicTeamMembers({
68730
- siteId,
68731
- stage: typeof stage === "string" ? stage : void 0
68732
- });
68733
- }
68734
- case "listPublicProducts": {
68735
- const { siteId, stage, categorySelector } = resolvedParams ?? {};
68736
- if (!siteId) {
68737
- throw new Error("listPublicProducts requires siteId param");
68738
- }
68739
- return await client.listPublicProducts({
68740
- siteId,
68741
- stage: stage === "preview" ? "preview" : "published",
68742
- categorySelector: parsePublicProductCategorySelector(categorySelector)
68743
- });
68744
- }
68745
- case "getPublicFormById": {
68746
- const { formId, siteId } = resolvedParams ?? {};
68747
- if (!formId) {
68748
- throw new Error("getPublicFormById requires formId param");
68749
- }
68750
- if (!siteId) {
68751
- throw new Error("getPublicFormById requires siteId param");
68752
- }
68753
- return await client.getPublicFormById({ formId, siteId });
68754
- }
68755
- case "getPublicBookingServices": {
68756
- const { siteId, ids } = resolvedParams ?? {};
68757
- if (!siteId) {
68758
- throw new Error("getPublicBookingServices requires siteId param");
68759
- }
68760
- return await client.getPublicBookingServices({ siteId, ids });
68761
- }
68762
- case "listPublicPasses": {
68763
- const { siteId, categories } = resolvedParams ?? {};
68764
- if (!siteId) {
68765
- throw new Error("listPublicPasses requires siteId param");
68766
- }
68767
- return await client.listPublicPasses({ siteId, categories });
68768
- }
68769
- case "listPublicMemberships": {
68770
- const { siteId, categories } = resolvedParams ?? {};
68771
- if (!siteId) {
68772
- throw new Error("listPublicMemberships requires siteId param");
68773
- }
68774
- return await client.listPublicMemberships({ siteId, categories });
68775
- }
68776
- default: {
68777
- throw new Error("Unhandled endpoint");
68778
- }
68779
- }
69279
+ return await loaderAdapters[endpoint]({ client, params: resolvedParams });
68780
69280
  },
68781
69281
  isValidEndpoint: isSupportedLoaderEndpoint2,
68782
69282
  onError: (error, { block, loader }) => {