@riverbankcms/sdk 0.90.0 → 0.90.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/{PreviewEditorSidebar-KVXNF3VW.mjs → PreviewEditorSidebar-FNFRVSIM.mjs} +2 -2
  2. package/dist/{PreviewEditorUI-J3JN5Z7T.mjs → PreviewEditorUI-3WXJFQXG.mjs} +2 -2
  3. package/dist/SdkPreviewModeRuntime-2UCIMKUB.mjs +8 -0
  4. package/dist/_dts/api/src/bookingConfig.d.ts +3 -0
  5. package/dist/_dts/api/src/event-listing-destination.d.ts +59 -0
  6. package/dist/_dts/api/src/index.d.ts +4 -0
  7. package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +0 -1
  8. package/dist/_dts/api/src/navigation.d.ts +2 -0
  9. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +3 -1
  10. package/dist/_dts/api/src/settings/permissions.d.ts +273 -0
  11. package/dist/_dts/api/src/types.d.ts +1 -0
  12. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +60 -2
  13. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +12 -1
  14. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +9 -9
  15. package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +1 -1
  16. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +5 -0
  17. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +24 -0
  18. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/destination.d.ts +8 -0
  19. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/pricing.d.ts +3 -0
  20. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +7 -0
  21. package/dist/_dts/core/src/event-pricing.d.ts +12 -2
  22. package/dist/_dts/sdk/src/public-api/contracts.d.ts +11 -1
  23. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +11 -1
  24. package/dist/_dts/sdk/src/version.d.ts +1 -1
  25. package/dist/{chunk-PMBB6MQ7.mjs → chunk-CR2VX432.mjs} +297 -117
  26. package/dist/{chunk-AEOYWPE4.mjs → chunk-FA6LVZ7C.mjs} +5 -5
  27. package/dist/{chunk-RQ3XZ4SJ.mjs → chunk-H6TT5ZXI.mjs} +1 -1
  28. package/dist/{chunk-GSPFFUVB.mjs → chunk-SYYJZPKU.mjs} +1 -1
  29. package/dist/cli/index.mjs +160 -103
  30. package/dist/client/{accordion-GXQNWQ6O.mjs → accordion-4K7VGZ3I.mjs} +2 -2
  31. package/dist/client/{bookingForm-STLUJ36H.mjs → bookingForm-3QXA3CIS.mjs} +5 -5
  32. package/dist/client/bookings.mjs +1154 -556
  33. package/dist/client/{carousel-CVRN6EPP.mjs → carousel-BEJKNGQ7.mjs} +3 -3
  34. package/dist/client/{cart-IYIBA5CL.mjs → cart-44BBM6XG.mjs} +6 -6
  35. package/dist/client/{checkout-O3BGM4GS.mjs → checkout-THMHEYKF.mjs} +6 -6
  36. package/dist/client/{chunk-25W2EQUN.mjs → chunk-3H5CLFKT.mjs} +8 -0
  37. package/dist/client/{chunk-MFPKS6QS.mjs → chunk-4COPESPO.mjs} +5 -5
  38. package/dist/client/{chunk-4RTFGHZN.mjs → chunk-5AJIMWKS.mjs} +6 -3
  39. package/dist/client/{chunk-6DPXDOIL.mjs → chunk-B4H6QMPY.mjs} +93 -22
  40. package/dist/client/{chunk-VFHZLZAC.mjs → chunk-DQIRKNZE.mjs} +1 -1
  41. package/dist/client/{chunk-7DH35FGA.mjs → chunk-EJBHK74Y.mjs} +1 -1
  42. package/dist/client/{chunk-DAS5CIER.mjs → chunk-JV7ZNAOU.mjs} +118 -20
  43. package/dist/client/{chunk-FHU6PFPM.mjs → chunk-KNTLBQ3N.mjs} +1 -1
  44. package/dist/client/{chunk-Z62JYS5O.mjs → chunk-PEDNDLPB.mjs} +2 -2
  45. package/dist/client/{chunk-NBFRJ5NB.mjs → chunk-SLY6UDAS.mjs} +2 -2
  46. package/dist/client/{chunk-D3ETC2SU.mjs → chunk-ZIAF2DA4.mjs} +1 -1
  47. package/dist/client/client.mjs +272 -83
  48. package/dist/client/{courseRegistration-2D3ACMJR.mjs → courseRegistration-URX7RCCK.mjs} +5 -5
  49. package/dist/client/{eventCalendar-QY4UZUFF.mjs → eventCalendar-GTENOQCE.mjs} +8 -8
  50. package/dist/client/{eventCombined-RRCDKJC2.mjs → eventCombined-EZVB72MF.mjs} +8 -8
  51. package/dist/client/{eventDetails-YO335BUT.mjs → eventDetails-CH4BJR5Z.mjs} +8 -8
  52. package/dist/client/{eventListing-PXA6GFQ3.mjs → eventListing-4BVOI5HS.mjs} +8 -8
  53. package/dist/client/{eventRegistration-2ZHEDDXO.mjs → eventRegistration-37LPIKIE.mjs} +8 -8
  54. package/dist/client/{form-ZS6KX4U2.mjs → form-FX3Y54YK.mjs} +2 -2
  55. package/dist/client/{headerSection-QK5SLIIB.mjs → headerSection-UOZZGVYL.mjs} +3 -3
  56. package/dist/client/hooks.mjs +86 -35
  57. package/dist/client/{locationMap-GFNIUD2X.mjs → locationMap-VSIPKV35.mjs} +3 -3
  58. package/dist/client/{newsletterForm-PGLTTCUG.mjs → newsletterForm-6FRJKNAF.mjs} +2 -2
  59. package/dist/client/{productDetail-OPBE5ZPI.mjs → productDetail-6AHMLXCO.mjs} +6 -6
  60. package/dist/client/{productList-NI72Q62Z.mjs → productList-M2CYIZVH.mjs} +6 -6
  61. package/dist/client/rendering/client.mjs +231 -42
  62. package/dist/client/rendering/islands.mjs +19 -19
  63. package/dist/client/rendering.mjs +273 -84
  64. package/dist/client/{shop-3ZQPEWYI.mjs → shop-AUOT6GEX.mjs} +6 -6
  65. package/dist/preview-next/client/runtime.mjs +3 -3
  66. package/dist/{sdk-runtime-FSHXCWDS.mjs → sdk-runtime-6GPJNLU6.mjs} +4 -4
  67. package/dist/server/components.mjs +136 -58
  68. package/dist/server/config-validation.mjs +78 -27
  69. package/dist/server/config.mjs +78 -27
  70. package/dist/server/data.mjs +86 -35
  71. package/dist/server/index.mjs +1 -1
  72. package/dist/server/next.mjs +157 -79
  73. package/dist/server/page-converter.mjs +72 -21
  74. package/dist/server/prebuild.mjs +1 -1
  75. package/dist/server/rendering/server.mjs +148 -70
  76. package/dist/server/rendering.mjs +152 -74
  77. package/dist/server/routing.mjs +121 -44
  78. package/dist/server/server.mjs +95 -44
  79. package/package.json +2 -2
  80. package/dist/SdkPreviewModeRuntime-UBL6MSNP.mjs +0 -8
@@ -209,6 +209,8 @@ function publicEventPricingType(pricing) {
209
209
  case "ticket_types":
210
210
  case "course":
211
211
  return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
212
+ case "external":
213
+ return "external";
212
214
  }
213
215
  }
214
216
  function publicEventPricingCurrency(pricing) {
@@ -220,6 +222,8 @@ function publicEventPricingCurrency(pricing) {
220
222
  return pricing.currency;
221
223
  case "course":
222
224
  return pricing.display.display.currency;
225
+ case "external":
226
+ return null;
223
227
  }
224
228
  }
225
229
  function publicEventScalarPrice(pricing) {
@@ -234,6 +238,7 @@ function publicEventPricingMode(pricing) {
234
238
  return "ticket_types";
235
239
  case "drop_in":
236
240
  case "course":
241
+ case "external":
237
242
  return void 0;
238
243
  }
239
244
  }
@@ -251,6 +256,7 @@ function isFreePublicEventPriceDisplay(display) {
251
256
  case "range":
252
257
  case "mixed":
253
258
  case "unavailable":
259
+ case "external":
254
260
  return false;
255
261
  }
256
262
  }
@@ -281,6 +287,8 @@ function formatBookingPriceDisplay(display, options = {}) {
281
287
  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)}`;
282
288
  case "unavailable":
283
289
  return "Pricing unavailable";
290
+ case "external":
291
+ return display.label;
284
292
  case "course":
285
293
  return formatCoursePriceDisplayLabel(display.display, options);
286
294
  default:
@@ -60154,6 +60162,18 @@ var publicCoursesArraySchema = z.array(publicCourseSchema);
60154
60162
  var eventPresetSchema = z.enum(["event", "class", "workshop", "retreat", "performance"]);
60155
60163
  var eventScheduleScopeSchema = z.enum(["recurring", "oneOff"]);
60156
60164
  var eventDestinationModeSchema = z.enum(["cms-managed", "system-managed"]);
60165
+ var publicEventDestinationSchema = z.discriminatedUnion("kind", [
60166
+ z.object({
60167
+ kind: z.literal("native"),
60168
+ mode: eventDestinationModeSchema,
60169
+ path: z.string()
60170
+ }),
60171
+ z.object({
60172
+ kind: z.literal("external"),
60173
+ url: z.string(),
60174
+ label: z.string()
60175
+ })
60176
+ ]);
60157
60177
  var eventVenueSchema = z.object({
60158
60178
  id: z.string(),
60159
60179
  name: z.string(),
@@ -60168,7 +60188,7 @@ var eventCategorySchema = z.object({
60168
60188
  name: z.string(),
60169
60189
  color: z.string().nullable()
60170
60190
  });
60171
- z.enum(["free", "paid"]);
60191
+ z.enum(["free", "paid", "external"]);
60172
60192
  var accessRestrictionSchema = z.enum(["none", "category"]);
60173
60193
  z.enum(["single", "ticket_types"]);
60174
60194
  var publicCoursePriceDisplaySchema = z.discriminatedUnion("kind", [
@@ -60189,6 +60209,7 @@ z.discriminatedUnion("kind", [
60189
60209
  currency: z.string()
60190
60210
  }),
60191
60211
  z.object({ kind: z.literal("unavailable"), currency: z.string() }),
60212
+ z.object({ kind: z.literal("external"), label: z.string() }),
60192
60213
  z.object({ kind: z.literal("course"), display: publicCoursePriceDisplaySchema })
60193
60214
  ]);
60194
60215
  var publicEventTicketTypePriceDisplaySchema = z.union([
@@ -60267,6 +60288,10 @@ var publicEventPricingSchema = z.discriminatedUnion("kind", [
60267
60288
  z.object({
60268
60289
  kind: z.literal("course"),
60269
60290
  display: z.object({ kind: z.literal("course"), display: publicCoursePriceDisplaySchema })
60291
+ }),
60292
+ z.object({
60293
+ kind: z.literal("external"),
60294
+ display: z.object({ kind: z.literal("external"), label: z.string() })
60270
60295
  })
60271
60296
  ]);
60272
60297
  var publicTeamMemberSummarySchema = z.object({
@@ -60295,7 +60320,8 @@ var publicEventSchema = z.object({
60295
60320
  image: mediaSchema2.nullable().optional()
60296
60321
  }).optional(),
60297
60322
  slug: z.string(),
60298
- path: z.string(),
60323
+ path: z.string().nullable(),
60324
+ destination: publicEventDestinationSchema,
60299
60325
  requiresRegistration: z.boolean(),
60300
60326
  deliveryMode: z.enum(["in_person", "online", "hybrid"]),
60301
60327
  attendanceModes: z.array(publicEventAttendanceModeAvailabilitySchema),
@@ -60591,12 +60617,41 @@ function isEventContentType(slug) {
60591
60617
  return EVENT_CONTENT_TYPE_SLUGS.includes(slug);
60592
60618
  }
60593
60619
 
60620
+ // ../blocks/src/system/runtime/nodes/events/shared/destination.ts
60621
+ function isRecord6(value) {
60622
+ return typeof value === "object" && value !== null && !Array.isArray(value);
60623
+ }
60624
+ function isRuntimeEventDestination(value) {
60625
+ if (!isRecord6(value) || typeof value.kind !== "string") return false;
60626
+ if (value.kind === "native") {
60627
+ return (value.mode === "cms-managed" || value.mode === "system-managed") && typeof value.path === "string";
60628
+ }
60629
+ return value.kind === "external" && typeof value.url === "string" && typeof value.label === "string";
60630
+ }
60631
+ function resolveRuntimeEventDestination(event) {
60632
+ if (isRuntimeEventDestination(event.destination)) {
60633
+ return event.destination;
60634
+ }
60635
+ return {
60636
+ kind: "native",
60637
+ mode: event.eventDestinationMode === "system-managed" ? "system-managed" : "cms-managed",
60638
+ path: typeof event.path === "string" ? event.path : ""
60639
+ };
60640
+ }
60641
+
60594
60642
  // ../blocks/src/system/runtime/nodes/events/shared/pricing.ts
60595
60643
  var DEFAULT_EVENT_CURRENCY = "USD";
60596
60644
  function resolveRuntimeEventPricing(event) {
60597
60645
  if (isPublicEventPricing(event.pricing)) {
60598
60646
  return event.pricing;
60599
60647
  }
60648
+ const destination = resolveRuntimeEventDestination(event);
60649
+ if (destination.kind === "external") {
60650
+ return {
60651
+ kind: "external",
60652
+ display: { kind: "external", label: "External registration" }
60653
+ };
60654
+ }
60600
60655
  const legacy = event;
60601
60656
  const currency = readCurrency(legacy.currency);
60602
60657
  if (event.requiresRegistration === false) {
@@ -60633,22 +60688,22 @@ function resolveRuntimeEventPricing(event) {
60633
60688
  function readCurrency(value) {
60634
60689
  return typeof value === "string" && value.trim().length > 0 ? value : DEFAULT_EVENT_CURRENCY;
60635
60690
  }
60636
- function isRecord6(value) {
60691
+ function isRecord7(value) {
60637
60692
  return typeof value === "object" && value !== null && !Array.isArray(value);
60638
60693
  }
60639
60694
  function isPublicEventPricing(value) {
60640
- if (!isRecord6(value) || typeof value.kind !== "string") return false;
60641
- return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course";
60695
+ if (!isRecord7(value) || typeof value.kind !== "string") return false;
60696
+ return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course" || value.kind === "external";
60642
60697
  }
60643
60698
  function isPublicEventTicketType(value) {
60644
- return isRecord6(value) && typeof value.id === "string";
60699
+ return isRecord7(value) && typeof value.id === "string";
60645
60700
  }
60646
60701
  function readTicketTypePriceDisplay(value, currency) {
60647
60702
  const display = readLegacyPriceDisplay(value, currency);
60648
- return display.kind === "course" ? { kind: "unavailable", currency } : display;
60703
+ return display.kind === "course" || display.kind === "external" ? { kind: "unavailable", currency } : display;
60649
60704
  }
60650
60705
  function readLegacyPriceDisplay(value, currency) {
60651
- if (!isRecord6(value) || typeof value.kind !== "string") {
60706
+ if (!isRecord7(value) || typeof value.kind !== "string") {
60652
60707
  return { kind: "unavailable", currency };
60653
60708
  }
60654
60709
  const displayCurrency = readCurrency(value.currency);
@@ -60687,7 +60742,7 @@ function readLegacyPriceDisplay(value, currency) {
60687
60742
  case "unavailable":
60688
60743
  return { kind: "unavailable", currency: displayCurrency };
60689
60744
  case "course":
60690
- return isRecord6(value.display) ? {
60745
+ return isRecord7(value.display) ? {
60691
60746
  kind: "course",
60692
60747
  display: readCoursePriceDisplay(value.display, displayCurrency)
60693
60748
  } : {
@@ -60794,7 +60849,7 @@ function resolveEventRequiresPayment(input) {
60794
60849
  if (!input.event) {
60795
60850
  return false;
60796
60851
  }
60797
- return publicEventPricingType(resolveRuntimeEventPricing(input.event)) !== "free";
60852
+ return publicEventPricingType(resolveRuntimeEventPricing(input.event)) === "paid";
60798
60853
  }
60799
60854
  function resolveDiscountContext(input) {
60800
60855
  const selection = input.paymentSelection.method ? input.paymentSelection : null;
@@ -61008,15 +61063,16 @@ var eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
61008
61063
  })
61009
61064
  });
61010
61065
  function normalizeEventRegistrationEventInput(value) {
61011
- if (!isRecord7(value)) {
61066
+ if (!isRecord8(value)) {
61012
61067
  return value;
61013
61068
  }
61014
61069
  return {
61015
61070
  ...value,
61071
+ destination: resolveRuntimeEventDestination(value),
61016
61072
  pricing: resolveRuntimeEventPricing(value)
61017
61073
  };
61018
61074
  }
61019
- function isRecord7(value) {
61075
+ function isRecord8(value) {
61020
61076
  return typeof value === "object" && value !== null && !Array.isArray(value);
61021
61077
  }
61022
61078
  function buildEventRegistrationInteractiveIslandProps(props2) {
@@ -62806,16 +62862,28 @@ function formatEventPrice(event) {
62806
62862
  function formatEventPriceDisplay(pricing) {
62807
62863
  return formatEventPricing(pricing, { decimals: "auto" });
62808
62864
  }
62865
+ function resolveEventHref(event) {
62866
+ const destination = resolveRuntimeEventDestination(event);
62867
+ return destination.kind === "external" ? destination.url : destination.path;
62868
+ }
62869
+ function resolveEventLinkProps(event) {
62870
+ const href = resolveEventHref(event);
62871
+ const destination = resolveRuntimeEventDestination(event);
62872
+ return destination.kind === "external" ? { href, target: "_blank", rel: "noopener noreferrer" } : { href };
62873
+ }
62809
62874
  function resolveEventCta(event, buttonText) {
62810
62875
  const { isFull: isSoldOut } = getEventAvailability(event);
62811
- const defaultButtonText = event.kind === "course_session" ? "Book course" : "Book";
62876
+ const destination = resolveRuntimeEventDestination(event);
62877
+ const isExternal = destination.kind === "external";
62878
+ const defaultButtonText = isExternal ? destination.label : event.kind === "course_session" ? "Book course" : "Book";
62812
62879
  const effectiveButtonText = buttonText ?? defaultButtonText;
62813
- if (isSoldOut) {
62814
- return { label: "Sold out", href: event.path, hidden: true };
62880
+ const href = resolveEventHref(event);
62881
+ if (!isExternal && isSoldOut) {
62882
+ return { label: "Sold out", href, external: false, hidden: true };
62815
62883
  }
62816
62884
  const enrollmentOpen = event.kind === "course_session" ? event.course?.enrollmentOpen !== false : true;
62817
62885
  const label = !enrollmentOpen ? "Registration closed" : effectiveButtonText;
62818
- return { label, href: event.path, hidden: false };
62886
+ return { label, href, external: isExternal, hidden: false };
62819
62887
  }
62820
62888
 
62821
62889
  // ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
@@ -64234,6 +64302,8 @@ var EventCard = ({
64234
64302
  "a",
64235
64303
  {
64236
64304
  href: cta.href,
64305
+ target: cta.external ? "_blank" : void 0,
64306
+ rel: cta.external ? "noopener noreferrer" : void 0,
64237
64307
  className: `${buttonClass} event-card-cta`,
64238
64308
  children: cta.label
64239
64309
  }
@@ -64320,10 +64390,19 @@ var EventCompactRow = ({
64320
64390
  formattedTime,
64321
64391
  /* @__PURE__ */ jsx("span", { className: "event-compact-row-action-price", children: price })
64322
64392
  ] }),
64323
- cta.hidden ? /* @__PURE__ */ jsx("span", { className: "event-compact-row-status", children: cta.label }) : /* @__PURE__ */ jsxs("a", { href: cta.href, className: `${buttonClass} event-compact-row-cta`, children: [
64324
- /* @__PURE__ */ jsx("span", { children: cta.label }),
64325
- /* @__PURE__ */ jsx(ArrowRightIcon, { "aria-hidden": "true" })
64326
- ] })
64393
+ cta.hidden ? /* @__PURE__ */ jsx("span", { className: "event-compact-row-status", children: cta.label }) : /* @__PURE__ */ jsxs(
64394
+ "a",
64395
+ {
64396
+ href: cta.href,
64397
+ target: cta.external ? "_blank" : void 0,
64398
+ rel: cta.external ? "noopener noreferrer" : void 0,
64399
+ className: `${buttonClass} event-compact-row-cta`,
64400
+ children: [
64401
+ /* @__PURE__ */ jsx("span", { children: cta.label }),
64402
+ /* @__PURE__ */ jsx(ArrowRightIcon, { "aria-hidden": "true" })
64403
+ ]
64404
+ }
64405
+ )
64327
64406
  ] })
64328
64407
  ] })
64329
64408
  ] });
@@ -65927,7 +66006,7 @@ function inferLegacyOfferingsPreviewGroupOrder(overrides) {
65927
66006
  return keys2.length >= 2 ? keys2 : [];
65928
66007
  }
65929
66008
  function normalizeOfferingsPreviewContentForWrite(value) {
65930
- if (!isRecord8(value)) return null;
66009
+ if (!isRecord9(value)) return null;
65931
66010
  const groupOrderValue = value.groupOrder;
65932
66011
  if (Array.isArray(groupOrderValue)) {
65933
66012
  const normalized = normalizeOfferingsPreviewGroupOrder(groupOrderValue);
@@ -65940,7 +66019,7 @@ function normalizeOfferingsPreviewContentForWrite(value) {
65940
66019
  return { ...value, groupOrder: [] };
65941
66020
  }
65942
66021
  const legacyOrder = inferLegacyOfferingsPreviewGroupOrder(
65943
- Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord8) : []
66022
+ Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord9) : []
65944
66023
  );
65945
66024
  return legacyOrder.length > 0 ? { ...value, groupOrder: legacyOrder } : value;
65946
66025
  }
@@ -65994,7 +66073,7 @@ function uniqueOfferingsPreviewSourceKeys(values) {
65994
66073
  }
65995
66074
  return keys2;
65996
66075
  }
65997
- function isRecord8(value) {
66076
+ function isRecord9(value) {
65998
66077
  return typeof value === "object" && value !== null && !Array.isArray(value);
65999
66078
  }
66000
66079
  function mergeOrderedKeysWithDefaults(orderedKeys, defaultKeys) {
@@ -66456,7 +66535,7 @@ function isOfferingsPreviewItemLimit(value) {
66456
66535
  return value === "1" || value === "2" || value === "3" || value === "4" || value === "5" || value === "6" || value === null;
66457
66536
  }
66458
66537
  function normalizeOfferingsPreviewGroupOverride(value) {
66459
- if (!isRecord9(value)) return [];
66538
+ if (!isRecord10(value)) return [];
66460
66539
  const override = {};
66461
66540
  if (isOfferingsPreviewSourceKey(value.sourceKey) || value.sourceKey === null) {
66462
66541
  override.sourceKey = value.sourceKey;
@@ -66488,12 +66567,12 @@ function isButtonVariant(value) {
66488
66567
  return value === "primary" || value === "secondary" || value === "outline" || value === "link" || value === null;
66489
66568
  }
66490
66569
  function normalizeCardStylesContent(value) {
66491
- return isRecord9(value) || value === null ? value : void 0;
66570
+ return isRecord10(value) || value === null ? value : void 0;
66492
66571
  }
66493
66572
  function normalizeSectionStylesContent(value) {
66494
- return isRecord9(value) || value === null ? value : void 0;
66573
+ return isRecord10(value) || value === null ? value : void 0;
66495
66574
  }
66496
- function isRecord9(value) {
66575
+ function isRecord10(value) {
66497
66576
  return typeof value === "object" && value !== null && !Array.isArray(value);
66498
66577
  }
66499
66578
  var embedFields = [
@@ -71916,7 +71995,7 @@ var defaultTransforms = createTransformRegistry(builtinTransformDefinitions);
71916
71995
  // ../blocks/src/system/data/linkedContentEntries.ts
71917
71996
  var LINKED_CONTENT_ENTRY_META_KEY = "__rbLinkedContentEntry";
71918
71997
  function coerceLinkedContentEntriesPayload(payload) {
71919
- if (!isRecord10(payload)) return payload;
71998
+ if (!isRecord11(payload)) return payload;
71920
71999
  const response = payload;
71921
72000
  if (!Array.isArray(response.entries)) return payload;
71922
72001
  const contentType = parsePublicContentTypeMeta(response.contentType);
@@ -71924,16 +72003,16 @@ function coerceLinkedContentEntriesPayload(payload) {
71924
72003
  return response.entries.map((entry) => enrichLinkedContentEntry(entry, contentType));
71925
72004
  }
71926
72005
  function getLinkedContentEntryMeta(value) {
71927
- if (!isRecord10(value)) return null;
72006
+ if (!isRecord11(value)) return null;
71928
72007
  const candidate = value[LINKED_CONTENT_ENTRY_META_KEY];
71929
72008
  return isLinkedContentEntryMeta(candidate) ? candidate : null;
71930
72009
  }
71931
72010
  function buildLinkedContentEditTarget(input) {
71932
72011
  const { entry, sourceBlockId, sourceBlockKind, itemIndex } = input;
71933
- if (!isRecord10(entry)) return null;
72012
+ if (!isRecord11(entry)) return null;
71934
72013
  const meta = getLinkedContentEntryMeta(entry);
71935
72014
  if (!meta || meta.support.kind !== "supported") return null;
71936
- const content = isRecord10(entry.content) ? entry.content : {};
72015
+ const content = isRecord11(entry.content) ? entry.content : {};
71937
72016
  return {
71938
72017
  kind: "linked-content-entry",
71939
72018
  entryId: meta.entryId,
@@ -71983,12 +72062,12 @@ function resolveLinkedEntryInlineFieldEligibility(input) {
71983
72062
  };
71984
72063
  }
71985
72064
  function enrichLinkedContentEntry(entry, contentType) {
71986
- if (!isRecord10(entry)) return entry;
72065
+ if (!isRecord11(entry)) return entry;
71987
72066
  const entryId = typeof entry.id === "string" ? entry.id : null;
71988
72067
  if (!entryId) return entry;
71989
72068
  const title = typeof entry.title === "string" && entry.title.trim().length > 0 ? entry.title : entryId;
71990
72069
  const optimisticHash = typeof entry.optimisticHash === "string" && entry.optimisticHash.length > 0 ? entry.optimisticHash : null;
71991
- const content = isRecord10(entry.content) ? entry.content : {};
72070
+ const content = isRecord11(entry.content) ? entry.content : {};
71992
72071
  const meta = {
71993
72072
  kind: "linked-content-entry",
71994
72073
  entryId,
@@ -72084,7 +72163,7 @@ function capitalize(value) {
72084
72163
  return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
72085
72164
  }
72086
72165
  function parsePublicContentTypeMeta(value) {
72087
- if (!isRecord10(value)) return null;
72166
+ if (!isRecord11(value)) return null;
72088
72167
  if (typeof value.key !== "string" || value.key.trim().length === 0) return null;
72089
72168
  return {
72090
72169
  key: value.key,
@@ -72094,7 +72173,7 @@ function parsePublicContentTypeMeta(value) {
72094
72173
  };
72095
72174
  }
72096
72175
  function parsePublicContentTypeLinkedEntryEditing(value) {
72097
- if (!isRecord10(value) || typeof value.kind !== "string") return null;
72176
+ if (!isRecord11(value) || typeof value.kind !== "string") return null;
72098
72177
  switch (value.kind) {
72099
72178
  case "generic":
72100
72179
  return { kind: "generic" };
@@ -72108,7 +72187,7 @@ function parsePublicContentTypeLinkedEntryEditing(value) {
72108
72187
  }
72109
72188
  }
72110
72189
  function parsePublicContentTypeFieldMeta(value) {
72111
- if (!isRecord10(value)) return [];
72190
+ if (!isRecord11(value)) return [];
72112
72191
  if (typeof value.id !== "string" || typeof value.type !== "string") return [];
72113
72192
  return [{
72114
72193
  id: value.id,
@@ -72123,14 +72202,14 @@ function parseStringArray(value) {
72123
72202
  return value.filter((item) => typeof item === "string");
72124
72203
  }
72125
72204
  function isLinkedContentEntryMeta(value) {
72126
- if (!isRecord10(value)) return false;
72205
+ if (!isRecord11(value)) return false;
72127
72206
  if (value.kind !== "linked-content-entry") return false;
72128
72207
  if (typeof value.entryId !== "string") return false;
72129
72208
  if (typeof value.contentTypeKey !== "string") return false;
72130
72209
  if (typeof value.contentTypeLabel !== "string") return false;
72131
72210
  if (typeof value.title !== "string") return false;
72132
72211
  if (!(value.optimisticHash === null || typeof value.optimisticHash === "string")) return false;
72133
- if (!isRecord10(value.contentType)) return false;
72212
+ if (!isRecord11(value.contentType)) return false;
72134
72213
  if (!isLinkedEntryFieldSourceArray(value.fieldSources)) return false;
72135
72214
  return isLinkedContentEditSupport(value.support);
72136
72215
  }
@@ -72138,7 +72217,7 @@ function isLinkedEntryFieldSourceArray(value) {
72138
72217
  return Array.isArray(value) && value.every(isLinkedEntryFieldSource);
72139
72218
  }
72140
72219
  function isLinkedEntryFieldSource(value) {
72141
- if (!isRecord10(value)) return false;
72220
+ if (!isRecord11(value)) return false;
72142
72221
  if (typeof value.displayPath !== "string") return false;
72143
72222
  switch (value.kind) {
72144
72223
  case "content-field":
@@ -72164,7 +72243,7 @@ function isLinkedEntryInlineFieldReadOnlyReason(value) {
72164
72243
  }
72165
72244
  }
72166
72245
  function isLinkedContentEditSupport(value) {
72167
- if (!isRecord10(value) || typeof value.kind !== "string") return false;
72246
+ if (!isRecord11(value) || typeof value.kind !== "string") return false;
72168
72247
  switch (value.kind) {
72169
72248
  case "supported":
72170
72249
  return true;
@@ -72176,7 +72255,7 @@ function isLinkedContentEditSupport(value) {
72176
72255
  return false;
72177
72256
  }
72178
72257
  }
72179
- function isRecord10(value) {
72258
+ function isRecord11(value) {
72180
72259
  return typeof value === "object" && value !== null && !Array.isArray(value);
72181
72260
  }
72182
72261
  var Section2 = forwardRef(function Section3({
@@ -73780,12 +73859,12 @@ function resolveBookingSiteId(siteId, form2) {
73780
73859
  return siteId || form2?.siteId || "";
73781
73860
  }
73782
73861
  function normalizeBookingFormConfig(form2) {
73783
- if (!isRecord11(form2)) return null;
73862
+ if (!isRecord12(form2)) return null;
73784
73863
  const id = readNonEmptyString(form2.id);
73785
73864
  const name = readNonEmptyString(form2.name);
73786
73865
  if (!id || !name) return null;
73787
- const schemaSource = isRecord11(form2.schema) ? form2.schema : isRecord11(form2.schemaJson) ? form2.schemaJson : null;
73788
- const settingsSource = isRecord11(form2.settings) ? form2.settings : isRecord11(form2.settingsJson) ? form2.settingsJson : null;
73866
+ const schemaSource = isRecord12(form2.schema) ? form2.schema : isRecord12(form2.schemaJson) ? form2.schemaJson : null;
73867
+ const settingsSource = isRecord12(form2.settings) ? form2.settings : isRecord12(form2.settingsJson) ? form2.settingsJson : null;
73789
73868
  return {
73790
73869
  id,
73791
73870
  name,
@@ -73809,10 +73888,10 @@ function normalizeBookingServices(services) {
73809
73888
  if (Array.isArray(services)) {
73810
73889
  return services.filter(isBookingFormService).map(normalizeService);
73811
73890
  }
73812
- if (isRecord11(services) && "services" in services) {
73891
+ if (isRecord12(services) && "services" in services) {
73813
73892
  return Array.isArray(services.services) ? services.services.filter(isBookingFormService).map(normalizeService) : [];
73814
73893
  }
73815
- return isRecord11(services) ? Object.values(services).filter(isBookingFormService).map(normalizeService) : [];
73894
+ return isRecord12(services) ? Object.values(services).filter(isBookingFormService).map(normalizeService) : [];
73816
73895
  }
73817
73896
  function normalizeBookingSchema(value) {
73818
73897
  if (!value) return void 0;
@@ -73824,7 +73903,7 @@ function normalizeBookingSchema(value) {
73824
73903
  };
73825
73904
  }
73826
73905
  function readBookingFormField(value) {
73827
- if (!isRecord11(value)) return null;
73906
+ if (!isRecord12(value)) return null;
73828
73907
  const id = readNonEmptyString(value.id);
73829
73908
  const label = readNonEmptyString(value.label);
73830
73909
  const type = readBookingFieldType(value.type);
@@ -73870,7 +73949,7 @@ function readBookingFieldOptions(value) {
73870
73949
  return options.length > 0 ? options : void 0;
73871
73950
  }
73872
73951
  function readBookingFieldOption(value) {
73873
- if (!isRecord11(value)) return null;
73952
+ if (!isRecord12(value)) return null;
73874
73953
  const optionValue = readNonEmptyString(value.value);
73875
73954
  const label = readNonEmptyString(value.label);
73876
73955
  return optionValue && label ? { value: optionValue, label } : null;
@@ -73887,7 +73966,7 @@ function normalizeBookingSettings(value) {
73887
73966
  };
73888
73967
  }
73889
73968
  function isBookingFormService(value) {
73890
- return isRecord11(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string";
73969
+ return isRecord12(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string";
73891
73970
  }
73892
73971
  function collectBookingCustomFields(data) {
73893
73972
  const customFields = {};
@@ -73917,7 +73996,7 @@ function readStringArray(value) {
73917
73996
  const strings = value.filter((item) => typeof item === "string");
73918
73997
  return strings.length > 0 ? strings : void 0;
73919
73998
  }
73920
- function isRecord11(value) {
73999
+ function isRecord12(value) {
73921
74000
  return typeof value === "object" && value !== null;
73922
74001
  }
73923
74002
  function getBookingServicePaymentSelectionMode(service) {
@@ -74691,7 +74770,7 @@ function EventDetailsView({
74691
74770
  "a",
74692
74771
  {
74693
74772
  className: "rb-tile rb-tile--interactive",
74694
- href: e3.path,
74773
+ ...resolveEventLinkProps(e3),
74695
74774
  children: /* @__PURE__ */ jsx(
74696
74775
  DateTimeTile,
74697
74776
  {
@@ -76305,7 +76384,7 @@ var AgendaEventCard = ({
76305
76384
  showCapacity,
76306
76385
  onClick
76307
76386
  }) => {
76308
- const eventUrl = event.path;
76387
+ const eventLinkProps = resolveEventLinkProps(event);
76309
76388
  const categoryColor = event.eventCategory?.color || "rgb(var(--tb-accent))";
76310
76389
  const price = formatEventPrice(event);
76311
76390
  const { available, isFull } = getEventAvailability(event);
@@ -76366,7 +76445,7 @@ var AgendaEventCard = ({
76366
76445
  }
76367
76446
  );
76368
76447
  }
76369
- return /* @__PURE__ */ jsx("a", { href: eventUrl, className: "event-agenda-card", children: cardContent });
76448
+ return /* @__PURE__ */ jsx("a", { ...eventLinkProps, className: "event-agenda-card", children: cardContent });
76370
76449
  };
76371
76450
  var FULL_DAY_NAMES = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
76372
76451
  function formatAgendaDayHeader(date) {
@@ -76603,7 +76682,7 @@ function renderCalendarSsr(display) {
76603
76682
  dayEvents.slice(0, MAX_EVENTS_PER_DAY).map((event) => /* @__PURE__ */ jsxs(
76604
76683
  "a",
76605
76684
  {
76606
- href: event.path,
76685
+ ...resolveEventLinkProps(event),
76607
76686
  className: "event-calendar-event",
76608
76687
  title: `${event.title} at ${formatTime(event.startsAt, { timeZone: getEventTimeZone(event) })}`,
76609
76688
  children: [
@@ -76731,7 +76810,7 @@ function renderTimetableSsr(display) {
76731
76810
  day.events.length === 0 ? /* @__PURE__ */ jsx("p", { className: "event-timetable-day-empty", children: "No classes" }) : day.events.map((cell) => /* @__PURE__ */ jsxs(
76732
76811
  "a",
76733
76812
  {
76734
- href: cell.event.path,
76813
+ ...resolveEventLinkProps(cell.event),
76735
76814
  className: "event-timetable-event",
76736
76815
  title: `${cell.event.title}, ${cell.timeLabel}`,
76737
76816
  style: {
@@ -77524,14 +77603,14 @@ function isDecoratedHeadingBlockKind(blockKind) {
77524
77603
  return blockKind === "block.intro" || blockKind === "block.feature-cards" || blockKind === "block.testimonials" || blockKind === "block.faq";
77525
77604
  }
77526
77605
  function readVariant(blockContent) {
77527
- if (!isRecord12(blockContent)) return void 0;
77606
+ if (!isRecord13(blockContent)) return void 0;
77528
77607
  const variant = blockContent.variant;
77529
77608
  return typeof variant === "string" ? variant : void 0;
77530
77609
  }
77531
77610
  function isFaqDecoratedVariant(variant) {
77532
77611
  return variant === "default" || variant === "question-columns";
77533
77612
  }
77534
- function isRecord12(value) {
77613
+ function isRecord13(value) {
77535
77614
  return typeof value === "object" && value !== null && !Array.isArray(value);
77536
77615
  }
77537
77616
  function buildHeadingDecorationWrapperClassName(className) {
@@ -95146,14 +95225,14 @@ function backgroundCapabilityFromModes(modeCapabilities) {
95146
95225
  };
95147
95226
  }
95148
95227
  function parseBackgroundOverrideFromContent(content) {
95149
- const sectionStyles = isRecord13(content._sectionStyles) ? content._sectionStyles : null;
95228
+ const sectionStyles = isRecord14(content._sectionStyles) ? content._sectionStyles : null;
95150
95229
  return parseBackgroundOverride(sectionStyles?.background);
95151
95230
  }
95152
95231
  function parseBackgroundOverride(value) {
95153
95232
  if (value === null || value === void 0) {
95154
95233
  return { kind: "supported", override: DEFAULT_BACKGROUND_OVERRIDE };
95155
95234
  }
95156
- if (!isRecord13(value)) {
95235
+ if (!isRecord14(value)) {
95157
95236
  return { kind: "legacy", reason: "unsupported-shape", background: {} };
95158
95237
  }
95159
95238
  if (Object.keys(value).length === 0) {
@@ -95234,7 +95313,7 @@ function serializeBackgroundOverride(override) {
95234
95313
  }
95235
95314
  }
95236
95315
  function applyBackgroundOverrideContentPatch(content, override) {
95237
- const sectionStyles = isRecord13(content._sectionStyles) ? content._sectionStyles : {};
95316
+ const sectionStyles = isRecord14(content._sectionStyles) ? content._sectionStyles : {};
95238
95317
  const serialized = serializeBackgroundOverride(override);
95239
95318
  if (serialized === null) {
95240
95319
  const nextSectionStyles = omitRecordKey2(sectionStyles, "background");
@@ -95436,7 +95515,7 @@ function imageAllowed(mediaId, pool) {
95436
95515
  return pool?.some((item) => item.mediaId === mediaId) ?? false;
95437
95516
  }
95438
95517
  function parseImageMediaAssetId(value) {
95439
- if (!isRecord13(value)) return { kind: "missing" };
95518
+ if (!isRecord14(value)) return { kind: "missing" };
95440
95519
  if (value.type !== void 0 && value.type !== "image") return { kind: "missing" };
95441
95520
  const parsed = parseMediaAssetId(value.assetId);
95442
95521
  if (!parsed.ok) {
@@ -95484,18 +95563,18 @@ function omitRecordKey2(content, key) {
95484
95563
  Object.entries(content).filter(([entryKey]) => entryKey !== key)
95485
95564
  );
95486
95565
  }
95487
- function isRecord13(value) {
95566
+ function isRecord14(value) {
95488
95567
  return typeof value === "object" && value !== null && !Array.isArray(value);
95489
95568
  }
95490
95569
 
95491
95570
  // ../path-utils/src/index.ts
95492
95571
  var PATH_SEPARATOR_REGEX2 = /\./g;
95493
95572
  var BRACKET_ACCESS_REGEX2 = /\[([^\]]+)\]/g;
95494
- function isRecord14(value) {
95573
+ function isRecord15(value) {
95495
95574
  return typeof value === "object" && value !== null && !Array.isArray(value);
95496
95575
  }
95497
95576
  function isPathContainer(value) {
95498
- return Array.isArray(value) || isRecord14(value);
95577
+ return Array.isArray(value) || isRecord15(value);
95499
95578
  }
95500
95579
  function createPathContainer(nextIsIndex) {
95501
95580
  return nextIsIndex ? [] : {};
@@ -98546,16 +98625,16 @@ function unwrapResponse(result) {
98546
98625
  }
98547
98626
 
98548
98627
  // ../api/src/utils/isRecord.ts
98549
- function isRecord15(value) {
98628
+ function isRecord16(value) {
98550
98629
  return typeof value === "object" && value !== null && !Array.isArray(value);
98551
98630
  }
98552
98631
 
98553
98632
  // ../api/src/utils/error-propagation.ts
98554
98633
  function extractApiErrorMessage(body) {
98555
- if (!isRecord15(body)) {
98634
+ if (!isRecord16(body)) {
98556
98635
  return null;
98557
98636
  }
98558
- if (isRecord15(body.error)) {
98637
+ if (isRecord16(body.error)) {
98559
98638
  if (typeof body.error.message === "string" && body.error.message.trim().length > 0) {
98560
98639
  return body.error.message;
98561
98640
  }
@@ -113455,7 +113534,7 @@ ColorPicker.displayName = "ColorPicker";
113455
113534
  function isObject2(subject) {
113456
113535
  return Object.prototype.toString.call(subject) === "[object Object]";
113457
113536
  }
113458
- function isRecord16(subject) {
113537
+ function isRecord17(subject) {
113459
113538
  return isObject2(subject) || Array.isArray(subject);
113460
113539
  }
113461
113540
  function canUseDOM2() {
@@ -113472,7 +113551,7 @@ function areOptionsEqual(optionsA, optionsB) {
113472
113551
  const valueA = optionsA[key];
113473
113552
  const valueB = optionsB[key];
113474
113553
  if (typeof valueA === "function") return `${valueA}` === `${valueB}`;
113475
- if (!isRecord16(valueA) || !isRecord16(valueB)) return valueA === valueB;
113554
+ if (!isRecord17(valueA) || !isRecord17(valueB)) return valueA === valueB;
113476
113555
  return areOptionsEqual(valueA, valueB);
113477
113556
  });
113478
113557
  }
@@ -123315,7 +123394,7 @@ function ResizableSplitPane({
123315
123394
  }
123316
123395
 
123317
123396
  // ../block-form/src/utils/typeGuards.ts
123318
- function isRecord17(value) {
123397
+ function isRecord18(value) {
123319
123398
  return typeof value === "object" && value !== null && !Array.isArray(value);
123320
123399
  }
123321
123400
  function isObjectRecord3(value) {
@@ -123573,9 +123652,9 @@ function createStoreBackend(options) {
123573
123652
  },
123574
123653
  reset: (values) => {
123575
123654
  if (scope === "blocks") {
123576
- getBlocksSlice().updateBlockBaseline?.(getBlockId(), isRecord17(values) ? values : null);
123655
+ getBlocksSlice().updateBlockBaseline?.(getBlockId(), isRecord18(values) ? values : null);
123577
123656
  } else {
123578
- const recordValues = isRecord17(values) ? values : null;
123657
+ const recordValues = isRecord18(values) ? values : null;
123579
123658
  getRootSlice().hydrate?.(recordValues, recordValues);
123580
123659
  }
123581
123660
  },
@@ -125542,7 +125621,7 @@ function useRepeaterRowErrors(field, index2, backend, basePath) {
125542
125621
  const rowErrorNode = getErrorAtPath(errorsRoot, rowPath);
125543
125622
  if (!rowErrorNode) return [];
125544
125623
  const rowValues = backend.getValue(rowPath);
125545
- const valueContext = isRecord17(rowValues) ? rowValues : {};
125624
+ const valueContext = isRecord18(rowValues) ? rowValues : {};
125546
125625
  const baseSegments = rowPath.split(".").filter((s2) => s2.length > 0);
125547
125626
  const results = [];
125548
125627
  let fieldsToTraverse = [];
@@ -125581,7 +125660,7 @@ function useRepeaterRowErrors(field, index2, backend, basePath) {
125581
125660
  const itemError = errorArray[itemIndex];
125582
125661
  let nestedFields = [];
125583
125662
  if (childRepeater.polymorphic && childRepeater.itemTypes) {
125584
- const itemType = isRecord17(itemValue) && typeof itemValue._type === "string" ? itemValue._type : Object.keys(childRepeater.itemTypes)[0] ?? "";
125663
+ const itemType = isRecord18(itemValue) && typeof itemValue._type === "string" ? itemValue._type : Object.keys(childRepeater.itemTypes)[0] ?? "";
125585
125664
  const typeSchema = itemType ? childRepeater.itemTypes[itemType] : void 0;
125586
125665
  if (typeSchema) {
125587
125666
  nestedFields = typeSchema.fields;
@@ -125613,13 +125692,13 @@ function getErrorAtPath(errors, path) {
125613
125692
  const segments = path.split(".").filter((s2) => s2.length > 0);
125614
125693
  let current = errors;
125615
125694
  for (const segment of segments) {
125616
- if (!isRecord17(current)) return void 0;
125695
+ if (!isRecord18(current)) return void 0;
125617
125696
  current = current[segment];
125618
125697
  }
125619
125698
  return current;
125620
125699
  }
125621
125700
  function getChildValue(node, key) {
125622
- if (isRecord17(node)) {
125701
+ if (isRecord18(node)) {
125623
125702
  return node[key];
125624
125703
  }
125625
125704
  return void 0;
@@ -125634,7 +125713,7 @@ function extractMessage(error) {
125634
125713
  }
125635
125714
  return void 0;
125636
125715
  }
125637
- if (isRecord17(error) && typeof error.message === "string") {
125716
+ if (isRecord18(error) && typeof error.message === "string") {
125638
125717
  return error.message;
125639
125718
  }
125640
125719
  return void 0;
@@ -126097,7 +126176,7 @@ var BlockApiError = class extends Error {
126097
126176
  this.name = "BlockApiError";
126098
126177
  }
126099
126178
  };
126100
- function isRecord18(value) {
126179
+ function isRecord19(value) {
126101
126180
  return typeof value === "object" && value !== null;
126102
126181
  }
126103
126182
  function isJsonResponseContentType(contentType) {
@@ -126120,10 +126199,10 @@ async function parseJsonBody(response) {
126120
126199
  }
126121
126200
  }
126122
126201
  function getBlockApiErrorDetails(data) {
126123
- if (!isRecord18(data)) {
126202
+ if (!isRecord19(data)) {
126124
126203
  return {};
126125
126204
  }
126126
- const nestedError = isRecord18(data.error) ? data.error : void 0;
126205
+ const nestedError = isRecord19(data.error) ? data.error : void 0;
126127
126206
  const message2 = typeof nestedError?.message === "string" ? nestedError.message : typeof data.message === "string" ? data.message : void 0;
126128
126207
  const code = typeof nestedError?.code === "string" ? nestedError.code : typeof data.code === "string" ? data.code : void 0;
126129
126208
  return { message: message2, code };
@@ -127726,8 +127805,10 @@ function buildBookingPaymentOptionViewModel(input) {
127726
127805
  totalAmountCents: input.totalCents,
127727
127806
  config: input.option.config
127728
127807
  });
127808
+ const remainingBalance = Math.max(0, input.totalCents - dueToday);
127729
127809
  const formattedTotal = formatPrice(input.totalCents, input.currency, input.locale);
127730
127810
  const formattedDueToday = formatPrice(dueToday, input.currency, input.locale);
127811
+ const formattedRemainingBalance = formatPrice(remainingBalance, input.currency, input.locale);
127731
127812
  const dueAt = resolveFlexibleBalanceDueAt({
127732
127813
  bookingStartAt: input.bookingStartAt ?? (/* @__PURE__ */ new Date()).toISOString(),
127733
127814
  dueDateRule: input.option.config.dueDateRule
@@ -127744,6 +127825,7 @@ function buildBookingPaymentOptionViewModel(input) {
127744
127825
  summaryRows: [
127745
127826
  { label: "Total", value: formattedTotal },
127746
127827
  { label: "Due today", value: formattedDueToday },
127828
+ { label: "Remaining balance", value: formattedRemainingBalance },
127747
127829
  { label: "Balance due by", value: formatScheduleDate(dueAt, input.locale) },
127748
127830
  {
127749
127831
  label: "Deposit policy",
@@ -132385,6 +132467,33 @@ function toEventDirectPaymentOption(option, mode) {
132385
132467
  );
132386
132468
  }
132387
132469
  }
132470
+ function resolveEventRegistrationDirectPaymentSelection(input) {
132471
+ if (input.selection.method !== "stripe") {
132472
+ return { kind: "not-stripe" };
132473
+ }
132474
+ const fallbackOption = input.options[0];
132475
+ if (!fallbackOption) {
132476
+ return { kind: "unavailable" };
132477
+ }
132478
+ const requestedKind = input.selection.collectionOptionKind;
132479
+ const selectedOption = requestedKind == null ? input.options.find((option) => option.kind === "upfront") : input.options.find((option) => option.kind === requestedKind);
132480
+ if (selectedOption) {
132481
+ return {
132482
+ kind: "valid",
132483
+ selection: {
132484
+ method: "stripe",
132485
+ collectionOptionKind: selectedOption.kind
132486
+ }
132487
+ };
132488
+ }
132489
+ return {
132490
+ kind: "invalid",
132491
+ fallbackSelection: {
132492
+ method: "stripe",
132493
+ collectionOptionKind: fallbackOption.kind
132494
+ }
132495
+ };
132496
+ }
132388
132497
  function PaymentCheckIcon() {
132389
132498
  return /* @__PURE__ */ jsx("div", { className: "er-check", children: /* @__PURE__ */ jsx(CheckIcon2, {}) });
132390
132499
  }
@@ -132430,6 +132539,9 @@ function formatDirectPaymentOptionDetail(option) {
132430
132539
  balanceDueBy ? `Balance due by: ${balanceDueBy.value}` : null
132431
132540
  ].filter((part) => Boolean(part)).join(" \xB7 ");
132432
132541
  }
132542
+ function isDirectPaymentOptionSelected(option, selectionState) {
132543
+ return selectionState.kind === "valid" && selectionState.selection.collectionOptionKind === option.kind;
132544
+ }
132433
132545
  var PaymentSelectionStep = ({
132434
132546
  event,
132435
132547
  occurrenceContext,
@@ -132446,8 +132558,28 @@ var PaymentSelectionStep = ({
132446
132558
  }) => {
132447
132559
  const occurrenceId = occurrenceContext?.id ?? event?.registrationOccurrenceId;
132448
132560
  const selectedMethod = selectedSelection.method;
132561
+ const totalPrice = eligibility?.price ? eligibility.price * ticketsCount : 0;
132562
+ const canShowDirectPaymentOptions = Boolean(
132563
+ eligibility?.eligible && eligibility.canPayDirectly && eligibility.price
132564
+ );
132565
+ const directPaymentOptions = eligibility && canShowDirectPaymentOptions ? buildEventRegistrationPaymentOptionsViewModel({
132566
+ eventTitle: event?.title ?? "Event",
132567
+ paymentTerms: event?.paymentTerms,
132568
+ totalPriceCents: totalPrice,
132569
+ currency: eligibility.currency,
132570
+ startsAt: occurrenceContext?.startsAt ?? event?.startsAt
132571
+ }).options : [];
132572
+ const directPaymentSelectionState = resolveEventRegistrationDirectPaymentSelection({
132573
+ options: directPaymentOptions,
132574
+ selection: selectedSelection
132575
+ });
132576
+ const directPaymentFallbackSelection = directPaymentSelectionState.kind === "invalid" ? directPaymentSelectionState.fallbackSelection : null;
132577
+ const directPaymentFallbackKind = directPaymentFallbackSelection?.collectionOptionKind;
132449
132578
  const canContinue = (() => {
132450
132579
  if (!selectedMethod) return false;
132580
+ if (selectedMethod === "stripe") {
132581
+ return directPaymentSelectionState.kind === "valid";
132582
+ }
132451
132583
  if (selectedMethod === "pass") return Boolean(selectedSelection.passId);
132452
132584
  if (selectedMethod === "membership")
132453
132585
  return Boolean(selectedSelection.membershipId);
@@ -132457,6 +132589,13 @@ var PaymentSelectionStep = ({
132457
132589
  return Boolean(selectedSelection.bundleMembershipId);
132458
132590
  return true;
132459
132591
  })();
132592
+ useEffect(() => {
132593
+ if (!directPaymentFallbackKind) return;
132594
+ onSelectionChange({
132595
+ method: "stripe",
132596
+ collectionOptionKind: directPaymentFallbackKind
132597
+ });
132598
+ }, [directPaymentFallbackKind, onSelectionChange]);
132460
132599
  const getButtonText = useCallback(() => {
132461
132600
  if (selectedMethod === "stripe") return "Continue to Payment";
132462
132601
  if (selectedMethod === "pass_bundle" || selectedMethod === "membership_bundle") {
@@ -132556,25 +132695,20 @@ var PaymentSelectionStep = ({
132556
132695
  ] }) })
132557
132696
  ] });
132558
132697
  }
132559
- const totalPrice = eligibility.price ? eligibility.price * ticketsCount : 0;
132560
- const directPaymentOptions = buildEventRegistrationPaymentOptionsViewModel({
132561
- eventTitle: event?.title ?? "Event",
132562
- paymentTerms: event?.paymentTerms,
132563
- totalPriceCents: totalPrice,
132564
- currency: eligibility.currency,
132565
- startsAt: occurrenceContext?.startsAt ?? event?.startsAt
132566
- }).options;
132567
132698
  const isMultiTicket = areEntitlementsDisabledForTicketCount(ticketsCount);
132568
132699
  return /* @__PURE__ */ jsxs("div", { className: "er-stack", children: [
132569
132700
  /* @__PURE__ */ jsx("h3", { className: "er-title", children: "Payment Options" }),
132570
132701
  /* @__PURE__ */ jsxs("div", { className: "er-payment-tiles", children: [
132571
- eligibility.canPayDirectly && eligibility.price && /* @__PURE__ */ jsx(Fragment, { children: directPaymentOptions.map((option) => /* @__PURE__ */ jsx(
132702
+ canShowDirectPaymentOptions && /* @__PURE__ */ jsx(Fragment, { children: directPaymentOptions.map((option) => /* @__PURE__ */ jsx(
132572
132703
  PaymentTile,
132573
132704
  {
132574
132705
  icon: /* @__PURE__ */ jsx(CreditCard, { size: 24, "aria-hidden": "true" }),
132575
132706
  label: option.label,
132576
132707
  detail: formatDirectPaymentOptionDetail(option),
132577
- selected: selectedMethod === "stripe" && (selectedSelection.collectionOptionKind ?? "upfront") === option.kind,
132708
+ selected: isDirectPaymentOptionSelected(
132709
+ option,
132710
+ directPaymentSelectionState
132711
+ ),
132578
132712
  onClick: () => onSelectionChange({
132579
132713
  method: "stripe",
132580
132714
  collectionOptionKind: option.kind
@@ -132994,6 +133128,24 @@ function EventRegistrationWizardActions(props2) {
132994
133128
  function isProductMethod(method) {
132995
133129
  return method !== null && ["pass", "membership", "pass_bundle", "membership_bundle"].includes(method);
132996
133130
  }
133131
+ function getSummaryRow(option, label) {
133132
+ return option.summaryRows.find((row) => row.label === label)?.value ?? null;
133133
+ }
133134
+ function getSelectedDirectPaymentOption(input) {
133135
+ const summaryEvent = input.wizard.selectedEvent ?? input.wizard.preSelectedEvent;
133136
+ if (!summaryEvent || input.wizard.paymentSelection.method !== "stripe") {
133137
+ return null;
133138
+ }
133139
+ const options = buildEventRegistrationPaymentOptionsViewModel({
133140
+ eventTitle: summaryEvent.title,
133141
+ paymentTerms: summaryEvent.paymentTerms,
133142
+ totalPriceCents: input.totalCents,
133143
+ currency: input.currency,
133144
+ startsAt: input.wizard.occurrenceContext?.startsAt ?? summaryEvent.startsAt
133145
+ }).options;
133146
+ const requestedKind = input.wizard.paymentSelection.collectionOptionKind ?? "upfront";
133147
+ return options.find((option) => option.kind === requestedKind) ?? options.find((option) => option.kind === "upfront") ?? options[0] ?? null;
133148
+ }
132997
133149
  function EventRegistrationSummaryBar(props2) {
132998
133150
  const { wizard } = props2;
132999
133151
  const summaryEvent = wizard.selectedEvent ?? wizard.preSelectedEvent;
@@ -133008,6 +133160,18 @@ function EventRegistrationSummaryBar(props2) {
133008
133160
  const autoAppliedDiscount = wizard.discountCode.trim().length > 0 ? null : wizard.autoAppliedDiscount;
133009
133161
  const autoAppliedDiscountCents = Math.max(0, autoAppliedDiscount?.computedAmountCents ?? 0);
133010
133162
  const discountedTotalCents = Math.max(0, subtotalCents - autoAppliedDiscountCents);
133163
+ const selectedDirectPaymentOption = getSelectedDirectPaymentOption({
133164
+ wizard,
133165
+ totalCents: discountedTotalCents,
133166
+ currency: summaryCurrency
133167
+ });
133168
+ const flexibleBalanceSummary = selectedDirectPaymentOption?.kind === "flexible_balance" ? {
133169
+ total: getSummaryRow(selectedDirectPaymentOption, "Total"),
133170
+ dueToday: getSummaryRow(selectedDirectPaymentOption, "Due today"),
133171
+ remainingBalance: getSummaryRow(selectedDirectPaymentOption, "Remaining balance"),
133172
+ balanceDueBy: getSummaryRow(selectedDirectPaymentOption, "Balance due by"),
133173
+ depositPolicy: getSummaryRow(selectedDirectPaymentOption, "Deposit policy")
133174
+ } : null;
133011
133175
  if (!summaryTitle) return null;
133012
133176
  const productMethod = isProductMethod(wizard.paymentSelection.method);
133013
133177
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -133051,6 +133215,22 @@ function EventRegistrationSummaryBar(props2) {
133051
133215
  summaryPrice > 0 && /* @__PURE__ */ jsx("div", { className: "er-summary-bar-pricing", children: productMethod ? /* @__PURE__ */ jsxs(Fragment, { children: [
133052
133216
  /* @__PURE__ */ jsx("span", { className: "er-summary-bar-price er-summary-bar-price--struck", children: formatPrice(summaryPrice * wizard.ticketsCount, summaryCurrency) }),
133053
133217
  /* @__PURE__ */ jsx("div", { className: "er-summary-bar-included", children: wizard.paymentSelection.method === "pass" || wizard.paymentSelection.method === "pass_bundle" ? "1 pass credit" : "Included in membership" })
133218
+ ] }) : flexibleBalanceSummary ? /* @__PURE__ */ jsxs(Fragment, { children: [
133219
+ flexibleBalanceSummary.total ? /* @__PURE__ */ jsxs("div", { className: "er-summary-bar-product-detail", children: [
133220
+ "Total: ",
133221
+ flexibleBalanceSummary.total
133222
+ ] }) : null,
133223
+ /* @__PURE__ */ jsx("div", { className: "er-summary-bar-price", children: flexibleBalanceSummary.dueToday ?? formatPrice(discountedTotalCents, summaryCurrency) }),
133224
+ /* @__PURE__ */ jsx("div", { className: "er-summary-bar-included", children: "Payable now" }),
133225
+ flexibleBalanceSummary.remainingBalance ? /* @__PURE__ */ jsxs("div", { className: "er-summary-bar-product-detail", children: [
133226
+ "Remaining balance: ",
133227
+ flexibleBalanceSummary.remainingBalance,
133228
+ flexibleBalanceSummary.balanceDueBy ? ` due by ${flexibleBalanceSummary.balanceDueBy}` : ""
133229
+ ] }) : null,
133230
+ flexibleBalanceSummary.depositPolicy ? /* @__PURE__ */ jsxs("div", { className: "er-summary-bar-product-detail", children: [
133231
+ "Deposit: ",
133232
+ flexibleBalanceSummary.depositPolicy
133233
+ ] }) : null
133054
133234
  ] }) : autoAppliedDiscount && autoAppliedDiscountCents > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
133055
133235
  /* @__PURE__ */ jsx("span", { className: "er-summary-bar-price er-summary-bar-price--struck", children: formatPrice(subtotalCents, summaryCurrency) }),
133056
133236
  /* @__PURE__ */ jsx("div", { className: "er-summary-bar-price", children: formatPrice(discountedTotalCents, summaryCurrency) }),
@@ -142540,7 +142720,7 @@ function NewsletterFormClient({
142540
142720
  var newsletter_form_client_default = NewsletterFormClient;
142541
142721
 
142542
142722
  // ../blocks/src/system/runtime/components/registry.client.tsx
142543
- function isRecord19(value) {
142723
+ function isRecord20(value) {
142544
142724
  return typeof value === "object" && value !== null;
142545
142725
  }
142546
142726
  function buildRenderFromLooseProps(runtime, mode, props2) {
@@ -142560,14 +142740,14 @@ function withRuntimeBackedEnvelope(source, runtime, render) {
142560
142740
  function normalizeLegacyInteractiveRenderProps(runtime, mode, props2) {
142561
142741
  const source = props2;
142562
142742
  const render = props2["render"];
142563
- if (!isRecord19(render)) {
142743
+ if (!isRecord20(render)) {
142564
142744
  return withRuntimeBackedEnvelope(
142565
142745
  source,
142566
142746
  runtime,
142567
142747
  buildRenderFromLooseProps(runtime, mode, props2)
142568
142748
  );
142569
142749
  }
142570
- if (isRecord19(render["hydration"])) {
142750
+ if (isRecord20(render["hydration"])) {
142571
142751
  return withRuntimeBackedEnvelope(
142572
142752
  source,
142573
142753
  runtime,
@@ -142577,7 +142757,7 @@ function normalizeLegacyInteractiveRenderProps(runtime, mode, props2) {
142577
142757
  }
142578
142758
  );
142579
142759
  }
142580
- if (!isRecord19(render["display"])) {
142760
+ if (!isRecord20(render["display"])) {
142581
142761
  return withRuntimeBackedEnvelope(
142582
142762
  source,
142583
142763
  runtime,
@@ -148834,7 +149014,7 @@ function sanitizeMarks(marks) {
148834
149014
  if (mark.type === "bold" || mark.type === "strong" || mark.type === "italic" || mark.type === "em") {
148835
149015
  return [{ type: mark.type }];
148836
149016
  }
148837
- if (mark.type === "link" && isRecord15(mark.attrs) && typeof mark.attrs.href === "string") {
149017
+ if (mark.type === "link" && isRecord16(mark.attrs) && typeof mark.attrs.href === "string") {
148838
149018
  const attrs = { href: mark.attrs.href };
148839
149019
  if (typeof mark.attrs.target === "string" && mark.attrs.target.trim().length > 0) {
148840
149020
  attrs.target = mark.attrs.target;
@@ -148849,10 +149029,10 @@ function sanitizeMarks(marks) {
148849
149029
  return sanitized.length > 0 ? sanitized : void 0;
148850
149030
  }
148851
149031
  function unwrapRichTextValue(value) {
148852
- if (isRecord15(value) && isRecord15(value.doc)) {
149032
+ if (isRecord16(value) && isRecord16(value.doc)) {
148853
149033
  return unwrapRichTextValue(value.doc);
148854
149034
  }
148855
- if (isRecord15(value) && value.type === "doc") {
149035
+ if (isRecord16(value) && value.type === "doc") {
148856
149036
  return {
148857
149037
  type: "doc",
148858
149038
  content: Array.isArray(value.content) ? value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) : []
@@ -148861,7 +149041,7 @@ function unwrapRichTextValue(value) {
148861
149041
  return EMPTY_SITE_BANNER_BODY;
148862
149042
  }
148863
149043
  function isTipTapNodeLike(value) {
148864
- return isRecord15(value) && typeof value.type === "string";
149044
+ return isRecord16(value) && typeof value.type === "string";
148865
149045
  }
148866
149046
  function coerceTipTapNode(value) {
148867
149047
  return {
@@ -148869,9 +149049,9 @@ function coerceTipTapNode(value) {
148869
149049
  ...Array.isArray(value.content) ? { content: value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) } : {},
148870
149050
  ...typeof value.text === "string" ? { text: value.text } : {},
148871
149051
  ...Array.isArray(value.marks) ? {
148872
- marks: value.marks.filter((mark) => isRecord15(mark) && typeof mark.type === "string").map((mark) => ({
149052
+ marks: value.marks.filter((mark) => isRecord16(mark) && typeof mark.type === "string").map((mark) => ({
148873
149053
  type: mark.type,
148874
- ...isRecord15(mark.attrs) ? { attrs: mark.attrs } : {}
149054
+ ...isRecord16(mark.attrs) ? { attrs: mark.attrs } : {}
148875
149055
  }))
148876
149056
  } : {}
148877
149057
  };
@@ -149411,7 +149591,7 @@ function asPositiveSeconds(value) {
149411
149591
  if (!Number.isSafeInteger(value) || value <= 0) return err3("not-positive-seconds");
149412
149592
  return ok$1(value);
149413
149593
  }
149414
- function isRecord20(value) {
149594
+ function isRecord21(value) {
149415
149595
  return Boolean(value) && typeof value === "object" && !Array.isArray(value);
149416
149596
  }
149417
149597
  function parseFileKindJson(value) {
@@ -149636,7 +149816,7 @@ function parseEntitledCustomerAccessScopeJson(value) {
149636
149816
  }
149637
149817
  }
149638
149818
  function requireRecord(value) {
149639
- if (!isRecord20(value)) return err3("expected-object");
149819
+ if (!isRecord21(value)) return err3("expected-object");
149640
149820
  return ok$1(value);
149641
149821
  }
149642
149822
  function requireString(value) {
@@ -157408,7 +157588,7 @@ var DEFAULT_MESSAGES = {
157408
157588
  update: "Failed to update media asset",
157409
157589
  delete: "Failed to delete media asset"
157410
157590
  };
157411
- function isRecord21(value) {
157591
+ function isRecord22(value) {
157412
157592
  return typeof value === "object" && value !== null;
157413
157593
  }
157414
157594
  var normalizeLabels = (labels) => labels && labels.length ? labels.map((label) => label.trim()).filter(Boolean).join(",") : void 0;
@@ -157446,7 +157626,7 @@ var filterUpdatePayload = (input) => {
157446
157626
  return payload;
157447
157627
  };
157448
157628
  var extractErrorMessage = (body) => {
157449
- if (!isRecord21(body)) return typeof body === "string" && body.trim().length > 0 ? body : null;
157629
+ if (!isRecord22(body)) return typeof body === "string" && body.trim().length > 0 ? body : null;
157450
157630
  for (const key of [
157451
157631
  "error",
157452
157632
  "message",
@@ -157459,11 +157639,11 @@ var extractErrorMessage = (body) => {
157459
157639
  const details = body.details;
157460
157640
  if (Array.isArray(details)) for (const entry of details) {
157461
157641
  if (typeof entry === "string" && entry.trim().length > 0) return entry;
157462
- if (isRecord21(entry) && typeof entry.message === "string" && entry.message.trim().length > 0) return entry.message;
157642
+ if (isRecord22(entry) && typeof entry.message === "string" && entry.message.trim().length > 0) return entry.message;
157463
157643
  }
157464
157644
  const errors = body.errors;
157465
157645
  if (Array.isArray(errors)) {
157466
- for (const entry of errors) if (isRecord21(entry) && typeof entry.message === "string" && entry.message.trim().length > 0) return entry.message;
157646
+ for (const entry of errors) if (isRecord22(entry) && typeof entry.message === "string" && entry.message.trim().length > 0) return entry.message;
157467
157647
  }
157468
157648
  return null;
157469
157649
  };
@@ -159990,7 +160170,7 @@ function sanitizeSlugInput(value, maxLength) {
159990
160170
  }
159991
160171
 
159992
160172
  // ../block-form/src/widgets/SlugField/utils/slugUtils.ts
159993
- function isRecord22(value) {
160173
+ function isRecord23(value) {
159994
160174
  return typeof value === "object" && value !== null && !Array.isArray(value);
159995
160175
  }
159996
160176
  function isUnknownArray6(value) {
@@ -160006,7 +160186,7 @@ function ensureUniqueSlug(candidate, backend, collectionPath, currentIndex, fiel
160006
160186
  for (let i2 = 0; i2 < items.length; i2 += 1) {
160007
160187
  if (i2 === currentIndex) continue;
160008
160188
  const item = items[i2];
160009
- if (isRecord22(item)) {
160189
+ if (isRecord23(item)) {
160010
160190
  const value = item[fieldId];
160011
160191
  if (typeof value === "string") {
160012
160192
  const normalized = normalize2(value.trim());
@@ -182929,7 +183109,7 @@ function normaliseDoc(doc3) {
182929
183109
  }
182930
183110
 
182931
183111
  // ../editor/src/primitives/rich-text/sanitize.ts
182932
- function isRecord23(value) {
183112
+ function isRecord24(value) {
182933
183113
  return typeof value === "object" && value !== null;
182934
183114
  }
182935
183115
  function getFromMapLike(mapLike, name) {
@@ -182954,7 +183134,7 @@ function parentInlineContent(parentType) {
182954
183134
  return Boolean(p2?.inlineContent);
182955
183135
  }
182956
183136
  function extractText(nodeJson) {
182957
- if (!isRecord23(nodeJson)) return "";
183137
+ if (!isRecord24(nodeJson)) return "";
182958
183138
  if (nodeJson.type === "text" && typeof nodeJson.text === "string") {
182959
183139
  return nodeJson.text;
182960
183140
  }
@@ -182965,13 +183145,13 @@ function sanitizeMarksJson(schema, marks, unsupported) {
182965
183145
  if (!Array.isArray(marks)) return void 0;
182966
183146
  const out = [];
182967
183147
  for (const markJson of marks) {
182968
- if (!isRecord23(markJson) || typeof markJson.type !== "string") continue;
183148
+ if (!isRecord24(markJson) || typeof markJson.type !== "string") continue;
182969
183149
  if (!schemaHasMark(schema, markJson.type)) {
182970
183150
  unsupported.marks.add(markJson.type);
182971
183151
  continue;
182972
183152
  }
182973
183153
  const next = { type: markJson.type };
182974
- if (isRecord23(markJson.attrs)) next.attrs = markJson.attrs;
183154
+ if (isRecord24(markJson.attrs)) next.attrs = markJson.attrs;
182975
183155
  out.push(next);
182976
183156
  }
182977
183157
  return out.length > 0 ? out : void 0;
@@ -182980,7 +183160,7 @@ function coerceChildrenForParentJson(schema, parentType, children) {
182980
183160
  if (parentInlineContent(parentType)) {
182981
183161
  const inlines = [];
182982
183162
  for (const child of children) {
182983
- if (isRecord23(child) && typeof child.type === "string" && nodeTypeIsInline(schema, child.type)) {
183163
+ if (isRecord24(child) && typeof child.type === "string" && nodeTypeIsInline(schema, child.type)) {
182984
183164
  inlines.push(child);
182985
183165
  continue;
182986
183166
  }
@@ -183003,7 +183183,7 @@ function coerceChildrenForParentJson(schema, parentType, children) {
183003
183183
  inlineBuffer = [];
183004
183184
  };
183005
183185
  for (const child of children) {
183006
- if (isRecord23(child) && typeof child.type === "string" && nodeTypeIsInline(schema, child.type)) {
183186
+ if (isRecord24(child) && typeof child.type === "string" && nodeTypeIsInline(schema, child.type)) {
183007
183187
  inlineBuffer.push(child);
183008
183188
  continue;
183009
183189
  }
@@ -183014,7 +183194,7 @@ function coerceChildrenForParentJson(schema, parentType, children) {
183014
183194
  return blocks;
183015
183195
  }
183016
183196
  function sanitizeNodeJson(schema, nodeJson, parentType, unsupported) {
183017
- if (!isRecord23(nodeJson) || typeof nodeJson.type !== "string") return [];
183197
+ if (!isRecord24(nodeJson) || typeof nodeJson.type !== "string") return [];
183018
183198
  const type = nodeJson.type;
183019
183199
  if (type === "text") {
183020
183200
  const text2 = typeof nodeJson.text === "string" ? nodeJson.text : "";
@@ -183035,7 +183215,7 @@ function sanitizeNodeJson(schema, nodeJson, parentType, unsupported) {
183035
183215
  const coercedChildren = coerceChildrenForParentJson(schema, nodeType, sanitizedChildren);
183036
183216
  const marks = sanitizeMarksJson(schema, nodeJson.marks, unsupported);
183037
183217
  const next = { type };
183038
- if (isRecord23(nodeJson.attrs)) next.attrs = nodeJson.attrs;
183218
+ if (isRecord24(nodeJson.attrs)) next.attrs = nodeJson.attrs;
183039
183219
  if (marks) next.marks = marks;
183040
183220
  if (hasRawChildren || coercedChildren.length > 0) next.content = coercedChildren;
183041
183221
  return [next];
@@ -183055,7 +183235,7 @@ function sanitizeRichTextContentForSchema(schema, content) {
183055
183235
  const coerced = coerceChildrenForParentJson(schema, topType, children);
183056
183236
  const out = { type: "doc", content: coerced };
183057
183237
  const maybeAttrs = docJson.attrs;
183058
- if (isRecord23(maybeAttrs)) {
183238
+ if (isRecord24(maybeAttrs)) {
183059
183239
  out.attrs = maybeAttrs;
183060
183240
  }
183061
183241
  return {