@riverbankcms/sdk 0.78.0 → 0.78.2

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 (152) hide show
  1. package/README.md +45 -43
  2. package/dist/{PreviewEditorSidebar-RIKFQ72L.mjs → PreviewEditorSidebar-4DXLYX2V.mjs} +29 -21
  3. package/dist/{PreviewEditorUI-XO7TUWKK.mjs → PreviewEditorUI-CS5P4N3P.mjs} +4 -4
  4. package/dist/SdkPreviewModeRuntime-IJDHTW4W.mjs +8 -0
  5. package/dist/_dts/ai/src/contracts/proposals.d.ts +36 -0
  6. package/dist/_dts/api/src/contentRuntime.d.ts +1 -0
  7. package/dist/_dts/api/src/endpoints.d.ts +9 -0
  8. package/dist/_dts/api/src/index.d.ts +3 -3
  9. package/dist/_dts/api/src/public/types.d.ts +1 -1
  10. package/dist/_dts/api/src/request.d.ts +3 -11
  11. package/dist/_dts/api/src/sdkConfig/contracts.d.ts +1 -0
  12. package/dist/_dts/api/src/sdkContracts.d.ts +7 -1
  13. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +10 -0
  14. package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +1 -0
  15. package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +15 -19
  16. package/dist/_dts/api/src/types.d.ts +11 -26
  17. package/dist/_dts/block-form/src/fields/types.d.ts +6 -0
  18. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterList.d.ts +3 -2
  19. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRow.d.ts +6 -3
  20. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterRowActions.d.ts +8 -3
  21. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/index.d.ts +1 -1
  22. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useLinearRepeaterDnd.d.ts +1 -0
  23. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useRepeaterPointerDragCapability.d.ts +1 -0
  24. package/dist/_dts/block-form/src/widgets/RepeaterField/hooks/useResolvedItemLabel.d.ts +7 -0
  25. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/buildSummary.d.ts +1 -0
  26. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/index.d.ts +3 -1
  27. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterDndDomain.d.ts +1 -1
  28. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterLabelSource.d.ts +15 -0
  29. package/dist/_dts/block-form/src/widgets/RepeaterField/utils/repeaterRowActionsDomain.d.ts +50 -0
  30. package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +591 -0
  31. package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +591 -0
  32. package/dist/_dts/blocks/src/system/blocks/cart.d.ts +591 -0
  33. package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +591 -0
  34. package/dist/_dts/blocks/src/system/blocks/collection.d.ts +591 -0
  35. package/dist/_dts/blocks/src/system/blocks/faq.d.ts +591 -0
  36. package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +591 -0
  37. package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +2 -0
  38. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +47 -0
  39. package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +591 -0
  40. package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +591 -0
  41. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +591 -0
  42. package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +3 -0
  43. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +164 -0
  44. package/dist/_dts/blocks/src/system/runtime/hooks/useHeadlessBookingFlow.state.d.ts +1 -1
  45. package/dist/_dts/blocks/src/system/runtime/nodes/booking-form.headless.state.d.ts +1 -1
  46. package/dist/_dts/content-editor/src/index.d.ts +1 -1
  47. package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +2 -2
  48. package/dist/_dts/content-model/src/content-types/schema.d.ts +14 -0
  49. package/dist/_dts/content-model/src/templates/bindingTypeCompatibility.d.ts +3 -1
  50. package/dist/_dts/content-model/src/templates/bindingValidation.d.ts +10 -4
  51. package/dist/_dts/content-model/src/templates/fieldPaths.d.ts +20 -0
  52. package/dist/_dts/content-model/src/templates/manifestAdapter.d.ts +5 -2
  53. package/dist/_dts/core/src/branded.d.ts +108 -85
  54. package/dist/_dts/core/src/csv-types.d.ts +2 -2
  55. package/dist/_dts/core/src/editor-state.d.ts +7 -7
  56. package/dist/_dts/core/src/participants.d.ts +2 -2
  57. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +11 -0
  58. package/dist/_dts/editor-blocks/src/blockPayload.d.ts +1 -1
  59. package/dist/_dts/media-editor/src/MediaEditor.d.ts +3 -1
  60. package/dist/_dts/media-editor/src/MediaPreview.d.ts +3 -1
  61. package/dist/_dts/media-editor/src/fieldUi.d.ts +5 -0
  62. package/dist/_dts/media-editor/src/index.d.ts +1 -1
  63. package/dist/_dts/sdk/src/cli/commands/push/consts.d.ts +1 -1
  64. package/dist/_dts/sdk/src/cli/commands/push/metadata.d.ts +2 -0
  65. package/dist/_dts/sdk/src/cli/commands/push/stale.d.ts +3 -3
  66. package/dist/_dts/sdk/src/cli/commands/push-execute.d.ts +7 -0
  67. package/dist/_dts/sdk/src/cli/commands/push.d.ts +2 -0
  68. package/dist/_dts/sdk/src/cli/content/reader.d.ts +13 -0
  69. package/dist/_dts/sdk/src/cli/content/writer.d.ts +2 -1
  70. package/dist/_dts/sdk/src/cli/helpers.d.ts +2 -0
  71. package/dist/_dts/sdk/src/cli/site-commands/commandKeys.d.ts +6 -6
  72. package/dist/_dts/sdk/src/cli/site-commands/commandRuntime.d.ts +5 -0
  73. package/dist/_dts/sdk/src/cli/site-commands/commandSurfaceDispatch.d.ts +4 -0
  74. package/dist/_dts/sdk/src/cli/site-commands/pageCommands.d.ts +5 -2
  75. package/dist/_dts/sdk/src/cli/site-commands/pushExecution.d.ts +10 -1
  76. package/dist/_dts/sdk/src/cli/site-commands/pushExecutionTypes.d.ts +1 -1
  77. package/dist/_dts/sdk/src/client/management/types.d.ts +6 -0
  78. package/dist/_dts/sdk/src/client/types.d.ts +2 -2
  79. package/dist/_dts/sdk/src/config/content-types.d.ts +7 -0
  80. package/dist/_dts/sdk/src/config/field-definitions.d.ts +2 -0
  81. package/dist/_dts/sdk/src/version.d.ts +1 -1
  82. package/dist/_dts/site-commands/src/commands.d.ts +3 -0
  83. package/dist/{altcha-B5XGSXP5.mjs → altcha-EKUEQ4RP.mjs} +1 -1
  84. package/dist/{chunk-NIDXI46P.mjs → chunk-4QEGTLK6.mjs} +1 -1
  85. package/dist/{chunk-TXDES5P2.mjs → chunk-6HYXHRAI.mjs} +5 -5
  86. package/dist/{chunk-SVMMM2NA.mjs → chunk-CR5HKAGU.mjs} +24 -5
  87. package/dist/{chunk-OECWLDHN.mjs → chunk-MCRQMPET.mjs} +1030 -588
  88. package/dist/{chunk-SXOLGNMX.mjs → chunk-OKMBEAXY.mjs} +1 -1
  89. package/dist/{chunk-XGB3TDIC.mjs → chunk-R7POPVJR.mjs} +2 -8
  90. package/dist/{chunk-F7RTCZYN.mjs → chunk-RGTOD4AJ.mjs} +20 -14
  91. package/dist/cli/index.mjs +681 -225
  92. package/dist/cli/init-docs/content/cli-reference.md +3 -2
  93. package/dist/cli/init-docs/content/content-management.md +2 -2
  94. package/dist/cli/init-docs/content/workflow-preview-mode.md +68 -2
  95. package/dist/client/{accordion-EVDEOUPR.mjs → accordion-PLYNJIIM.mjs} +2 -2
  96. package/dist/client/analytics.mjs +1 -1
  97. package/dist/client/{bookingForm-DIHBLC64.mjs → bookingForm-BXAP6AO7.mjs} +55 -48
  98. package/dist/client/bookings.mjs +62 -55
  99. package/dist/client/{carousel-FEBQHIWI.mjs → carousel-TRBXDHGF.mjs} +3 -3
  100. package/dist/client/{cart-7CKSXAE4.mjs → cart-Z7H3HJRS.mjs} +7 -7
  101. package/dist/client/{checkout-WKYCANLV.mjs → checkout-WAFCUBIX.mjs} +7 -7
  102. package/dist/client/{chunk-OFMSCGNY.mjs → chunk-75OUS5MT.mjs} +2 -2
  103. package/dist/client/{chunk-IVNCUVAV.mjs → chunk-AUJ5DBZJ.mjs} +18 -18
  104. package/dist/client/{chunk-36WJCERQ.mjs → chunk-CE7IBGVW.mjs} +3 -1
  105. package/dist/client/{chunk-RZDWX7QW.mjs → chunk-CWGTG37I.mjs} +1 -1
  106. package/dist/client/{chunk-YDSEG6GZ.mjs → chunk-DNRGY432.mjs} +2 -2
  107. package/dist/client/{chunk-RV6FX7UH.mjs → chunk-FUXW6VW2.mjs} +9 -9
  108. package/dist/client/{chunk-65F47D7Y.mjs → chunk-JGXPTEI2.mjs} +43 -36
  109. package/dist/client/{chunk-GUK2FPXQ.mjs → chunk-JRDUHZCT.mjs} +37 -15
  110. package/dist/client/{chunk-VPPMNXCF.mjs → chunk-UVQEJJTN.mjs} +2 -2
  111. package/dist/client/{chunk-F7LHOKEH.mjs → chunk-XSV6KW4D.mjs} +1 -1
  112. package/dist/client/{chunk-PD6NBCEY.mjs → chunk-ZFHRN6W2.mjs} +1 -1
  113. package/dist/client/{chunk-2SAVKN2M.mjs → chunk-ZI3LLBPZ.mjs} +2 -2
  114. package/dist/client/client.mjs +249 -160
  115. package/dist/client/{courseRegistration-5QF2PHKM.mjs → courseRegistration-AHFQHWIJ.mjs} +10 -10
  116. package/dist/client/{eventCalendar-4ZOSETDU.mjs → eventCalendar-LDXTV5R7.mjs} +9 -9
  117. package/dist/client/{eventCombined-WQGU7JUX.mjs → eventCombined-A4JGTNJO.mjs} +9 -9
  118. package/dist/client/{eventDetails-AYWVUJ5Y.mjs → eventDetails-4YXTZ7EG.mjs} +9 -9
  119. package/dist/client/{eventListing-NT7C6UT5.mjs → eventListing-P72TPFFM.mjs} +9 -9
  120. package/dist/client/{eventRegistration-OH24F4ZJ.mjs → eventRegistration-LSYJHGMT.mjs} +9 -9
  121. package/dist/client/{form-7L42SRBB.mjs → form-AOPYOKOW.mjs} +6 -3
  122. package/dist/client/{headerSection-OZRZNZ52.mjs → headerSection-5TFYDFVQ.mjs} +3 -3
  123. package/dist/client/hooks.mjs +78 -48
  124. package/dist/client/{locationMap-ZBXRPQ7C.mjs → locationMap-QSZ3ZVAZ.mjs} +3 -3
  125. package/dist/client/{newsletterForm-SNAGFF2I.mjs → newsletterForm-KTRHZY52.mjs} +2 -2
  126. package/dist/client/{productDetail-I46BOFGV.mjs → productDetail-N4E775RG.mjs} +7 -7
  127. package/dist/client/{productList-BOYHTYI6.mjs → productList-UGUQ2S45.mjs} +7 -7
  128. package/dist/client/rendering/client.mjs +173 -131
  129. package/dist/client/rendering/islands.mjs +19 -19
  130. package/dist/client/rendering.mjs +230 -150
  131. package/dist/client/{shop-XTXPZTKR.mjs → shop-VHSZEEQ2.mjs} +7 -7
  132. package/dist/preview-next/before-render.mjs +10 -1
  133. package/dist/preview-next/client/runtime.mjs +6 -6
  134. package/dist/preview-next/middleware.mjs +10 -1
  135. package/dist/preview-next/tailwind-sources.css +1 -0
  136. package/dist/sdk-runtime-WHPJEF5G.mjs +8 -0
  137. package/dist/server/components.mjs +101 -54
  138. package/dist/server/config-template-validation.mjs +221 -15
  139. package/dist/server/config-validation.mjs +76 -42
  140. package/dist/server/config.mjs +76 -42
  141. package/dist/server/data.mjs +77 -47
  142. package/dist/server/index.mjs +31 -10
  143. package/dist/server/next.mjs +133 -71
  144. package/dist/server/page-converter.mjs +60 -40
  145. package/dist/server/prebuild.mjs +1 -1
  146. package/dist/server/rendering/server.mjs +107 -60
  147. package/dist/server/rendering.mjs +111 -61
  148. package/dist/server/routing.mjs +93 -63
  149. package/dist/server/server.mjs +102 -57
  150. package/package.json +1 -1
  151. package/dist/SdkPreviewModeRuntime-LAGYMPNF.mjs +0 -8
  152. package/dist/sdk-runtime-ZJLKC6DR.mjs +0 -8
@@ -9,20 +9,33 @@ var __export = (target, all) => {
9
9
  __defProp(target, name, { get: all[name], enumerable: true });
10
10
  };
11
11
 
12
+ // ../core/src/result.ts
13
+ function ok(value) {
14
+ return { ok: true, value };
15
+ }
16
+ function err(error) {
17
+ return { ok: false, error };
18
+ }
19
+ var init_result = __esm({
20
+ "../core/src/result.ts"() {
21
+ "use strict";
22
+ }
23
+ });
24
+
12
25
  // ../core/src/branded.ts
13
- var asMediaAssetId, asStorageBucketName, unsafeAsPositiveByteCount, unsafeAsPositiveSeconds, asFormId, asPassId, asCustomerPassId, asAppointmentServiceId, asAppointmentResourceId;
26
+ var unsafeAsMediaAssetId, unsafeAsStorageBucketName, unsafeAsPositiveByteCount, unsafeAsPositiveSeconds, unsafeAsFormId, unsafeAsPassId, unsafeAsCustomerPassId, unsafeAsAppointmentServiceId, unsafeAsAppointmentResourceId;
14
27
  var init_branded = __esm({
15
28
  "../core/src/branded.ts"() {
16
29
  "use strict";
17
- asMediaAssetId = (id) => id;
18
- asStorageBucketName = (value) => value;
30
+ unsafeAsMediaAssetId = (id) => id;
31
+ unsafeAsStorageBucketName = (value) => value;
19
32
  unsafeAsPositiveByteCount = (value) => value;
20
33
  unsafeAsPositiveSeconds = (value) => value;
21
- asFormId = (id) => id;
22
- asPassId = (id) => id;
23
- asCustomerPassId = (id) => id;
24
- asAppointmentServiceId = (id) => id;
25
- asAppointmentResourceId = (id) => id;
34
+ unsafeAsFormId = (id) => id;
35
+ unsafeAsPassId = (id) => id;
36
+ unsafeAsCustomerPassId = (id) => id;
37
+ unsafeAsAppointmentServiceId = (id) => id;
38
+ unsafeAsAppointmentResourceId = (id) => id;
26
39
  }
27
40
  });
28
41
 
@@ -247,19 +260,6 @@ var init_booking_instalments = __esm({
247
260
  }
248
261
  });
249
262
 
250
- // ../core/src/result.ts
251
- function ok(value) {
252
- return { ok: true, value };
253
- }
254
- function err(error) {
255
- return { ok: false, error };
256
- }
257
- var init_result = __esm({
258
- "../core/src/result.ts"() {
259
- "use strict";
260
- }
261
- });
262
-
263
263
  // ../core/src/booking-date-time.ts
264
264
  function isValidTimeZone(timeZone) {
265
265
  try {
@@ -919,15 +919,15 @@ var init_fileStorage = __esm({
919
919
  "use strict";
920
920
  init_src();
921
921
  FILE_STORAGE_BUCKETS = {
922
- publicSite: asStorageBucketName("media"),
923
- privateSite: asStorageBucketName("site-files-private"),
924
- temporary: asStorageBucketName("temp-uploads")
922
+ publicSite: unsafeAsStorageBucketName("media"),
923
+ privateSite: unsafeAsStorageBucketName("site-files-private"),
924
+ temporary: unsafeAsStorageBucketName("temp-uploads")
925
925
  };
926
926
  PUBLIC_SITE_FILE_STORAGE_BUCKETS = [
927
927
  FILE_STORAGE_BUCKETS.publicSite,
928
928
  // Existing site logo and font uploads predate the unified file buckets.
929
- asStorageBucketName("site-assets"),
930
- asStorageBucketName("site-fonts")
929
+ unsafeAsStorageBucketName("site-assets"),
930
+ unsafeAsStorageBucketName("site-fonts")
931
931
  ];
932
932
  PRIVATE_SITE_FILE_BUCKET_MIME_TYPES = [
933
933
  "application/pdf",
@@ -1428,14 +1428,14 @@ function rotateNormalizedPoint(point, rotation) {
1428
1428
  const x = point.x;
1429
1429
  const y = point.y;
1430
1430
  switch (rotation) {
1431
+ case 0:
1432
+ return { x, y };
1431
1433
  case 90:
1432
1434
  return { x: 1 - y, y: x };
1433
1435
  case 180:
1434
1436
  return { x: 1 - x, y: 1 - y };
1435
1437
  case 270:
1436
1438
  return { x: y, y: 1 - x };
1437
- default:
1438
- return { x, y };
1439
1439
  }
1440
1440
  }
1441
1441
  var init_rotation = __esm({
@@ -1928,6 +1928,8 @@ var init_schema2 = __esm({
1928
1928
  mediaPickerAutoOpen: z5.boolean().optional(),
1929
1929
  showMediaPreview: z5.boolean().optional(),
1930
1930
  showMediaOverlayActions: z5.boolean().optional(),
1931
+ mediaPreviewMaxWidth: z5.enum(["xs", "sm", "md", "none"]).optional(),
1932
+ preventMediaPreviewUpscale: z5.boolean().optional(),
1931
1933
  mediaDelivery: mediaDeliverySchema.optional(),
1932
1934
  mediaDeliveryByVariant: z5.record(z5.string(), mediaDeliverySchema).optional(),
1933
1935
  // Optional input hints for validators/widgets
@@ -2177,6 +2179,9 @@ var init_schema2 = __esm({
2177
2179
  type: z5.literal("repeater"),
2178
2180
  itemLabel: z5.string().default("Item"),
2179
2181
  itemLabelSource: z5.string().optional(),
2182
+ showSummary: z5.boolean().optional(),
2183
+ summaryFields: z5.string().array().optional(),
2184
+ summaryMaxChars: z5.number().int().positive().optional(),
2180
2185
  minItems: z5.number().int().min(0).default(0),
2181
2186
  maxItems: z5.number().int().positive().optional(),
2182
2187
  // Monomorphic mode
@@ -6382,13 +6387,13 @@ function generateShadowValue(elevation, softness, position = "bottom") {
6382
6387
  const xOffset = position === "bottom-right" ? config.offset : 0;
6383
6388
  const yOffset = config.offset;
6384
6389
  switch (softness) {
6390
+ case null:
6391
+ case "soft":
6392
+ return `${xOffset}px ${yOffset}px ${config.blur}px ${config.spread}px rgb(0 0 0 / 0.3)`;
6385
6393
  case "hard":
6386
6394
  return `${xOffset}px ${yOffset}px 0 0 rgb(0 0 0 / 1)`;
6387
6395
  case "crisp":
6388
6396
  return `${xOffset}px ${yOffset}px ${config.offset}px ${config.spread}px rgb(0 0 0 / 0.4)`;
6389
- case "soft":
6390
- default:
6391
- return `${xOffset}px ${yOffset}px ${config.blur}px ${config.spread}px rgb(0 0 0 / 0.3)`;
6392
6397
  }
6393
6398
  }
6394
6399
  var GRADIENT_DIRECTION_MAP, BORDER_RADIUS_MAP, BORDER_WIDTH_MAP, FONT_SIZE_MAP, DEFAULT_BUTTON_SIZES;
@@ -14648,47 +14653,48 @@ function validateFieldDefinitions(fields3, fragmentId) {
14648
14653
  function prefixFieldId(field, scope) {
14649
14654
  const cloned = cloneFieldDefinition2(field);
14650
14655
  cloned.id = `${scope}.${field.id}`;
14651
- cloned.defaultValue = cloneUnknown(cloned.defaultValue);
14656
+ const defaultValue = cloned.defaultValue;
14657
+ cloned.defaultValue = cloneUnknown(defaultValue);
14652
14658
  cloned.visibleRoles = cloned.visibleRoles ? [...cloned.visibleRoles] : void 0;
14653
14659
  cloned.ui = cloneUnknown(cloned.ui);
14654
14660
  return cloned;
14655
14661
  }
14656
14662
  function cloneFieldDefinition2(field) {
14657
- switch (field.type) {
14658
- case "repeater":
14659
- if (field.polymorphic && field.itemTypes) {
14660
- return {
14661
- ...field,
14662
- polymorphic: true,
14663
- itemTypes: Object.fromEntries(
14664
- Object.entries(field.itemTypes).map(([key, itemType]) => [
14665
- key,
14666
- {
14667
- ...itemType,
14668
- fields: itemType.fields.map(cloneFieldDefinition2)
14669
- }
14670
- ])
14671
- )
14672
- };
14673
- } else if (field.schema) {
14674
- return {
14675
- ...field,
14676
- schema: {
14677
- fields: field.schema.fields.map(cloneFieldDefinition2)
14678
- }
14679
- };
14680
- }
14681
- return { ...field };
14682
- case "group":
14663
+ if (field.type === "repeater") {
14664
+ if (field.polymorphic && field.itemTypes) {
14665
+ return {
14666
+ ...field,
14667
+ polymorphic: true,
14668
+ itemTypes: Object.fromEntries(
14669
+ Object.entries(field.itemTypes).map(([key, itemType]) => [
14670
+ key,
14671
+ {
14672
+ ...itemType,
14673
+ fields: itemType.fields.map(cloneFieldDefinition2)
14674
+ }
14675
+ ])
14676
+ )
14677
+ };
14678
+ }
14679
+ if (field.schema) {
14683
14680
  return {
14684
14681
  ...field,
14685
14682
  schema: {
14686
14683
  fields: field.schema.fields.map(cloneFieldDefinition2)
14687
14684
  }
14688
14685
  };
14689
- default:
14690
- return { ...field };
14686
+ }
14687
+ return { ...field };
14688
+ }
14689
+ if (field.type === "group") {
14690
+ return {
14691
+ ...field,
14692
+ schema: {
14693
+ fields: field.schema.fields.map(cloneFieldDefinition2)
14694
+ }
14695
+ };
14691
14696
  }
14697
+ return { ...field };
14692
14698
  }
14693
14699
  function cloneUnknown(value) {
14694
14700
  if (value == null || typeof value !== "object") {
@@ -17720,7 +17726,8 @@ function createBlockManifestWithContentShape(config, _contentShape) {
17720
17726
  return createBlockManifest(config);
17721
17727
  }
17722
17728
  function normalizeBlockLayout(layout) {
17723
- return Array.isArray(layout) ? [...layout] : layout;
17729
+ const rawLayout = layout;
17730
+ return Array.isArray(rawLayout) ? rawLayout : rawLayout;
17724
17731
  }
17725
17732
  function deriveComponentName(id) {
17726
17733
  const base = id.replace(/^block\./, "");
@@ -18602,10 +18609,10 @@ function normalizeEventCategoryIds(value) {
18602
18609
  if (Array.isArray(value)) {
18603
18610
  return normalizeIdList(
18604
18611
  value.filter((entry) => typeof entry === "string")
18605
- ).map(asEventCategoryId);
18612
+ ).map(unsafeAsEventCategoryId);
18606
18613
  }
18607
18614
  if (typeof value === "string") {
18608
- return normalizeIdList(value.split(",")).map(asEventCategoryId);
18615
+ return normalizeIdList(value.split(",")).map(unsafeAsEventCategoryId);
18609
18616
  }
18610
18617
  return [];
18611
18618
  }
@@ -18618,7 +18625,7 @@ function normalizeEventVenueId(value) {
18618
18625
  return null;
18619
18626
  }
18620
18627
  const trimmed = value.trim();
18621
- return trimmed ? asVenueId(trimmed) : null;
18628
+ return trimmed ? unsafeAsVenueId(trimmed) : null;
18622
18629
  }
18623
18630
  function normalizeEventStaffMemberId(value) {
18624
18631
  if (typeof value !== "string") {
@@ -18627,7 +18634,7 @@ function normalizeEventStaffMemberId(value) {
18627
18634
  const trimmed = value.trim();
18628
18635
  return trimmed ? trimmed : null;
18629
18636
  }
18630
- var eventBlockKindValues, eventSurfacePresetValues, eventSurfaceScopeValues, eventScheduleScopeValues, asEventCategoryId, asVenueId;
18637
+ var eventBlockKindValues, eventSurfacePresetValues, eventSurfaceScopeValues, eventScheduleScopeValues, unsafeAsEventCategoryId, unsafeAsVenueId;
18631
18638
  var init_filtering = __esm({
18632
18639
  "../blocks/src/system/blocks/events/shared/filtering.ts"() {
18633
18640
  "use strict";
@@ -18646,8 +18653,8 @@ var init_filtering = __esm({
18646
18653
  "custom"
18647
18654
  ];
18648
18655
  eventScheduleScopeValues = ["any", "recurring", "oneOff"];
18649
- asEventCategoryId = (value) => value;
18650
- asVenueId = (value) => value;
18656
+ unsafeAsEventCategoryId = (value) => value;
18657
+ unsafeAsVenueId = (value) => value;
18651
18658
  }
18652
18659
  });
18653
18660
 
@@ -20699,7 +20706,7 @@ function getProxyImageUrl(value, options, transformAspectRatio, resolved) {
20699
20706
  if (!shouldUseExplicitRectProxy(value, options, resolvedTransform, sourceWidth, sourceHeight)) return void 0;
20700
20707
  const params = buildProxyTransformParams(options, resolvedTransform);
20701
20708
  const proxyBasePath = getImageProxyBasePath();
20702
- const proxyUrl = getImageUrl({ id: asMediaAssetId(value.assetId) }, params, proxyBasePath);
20709
+ const proxyUrl = getImageUrl({ id: unsafeAsMediaAssetId(value.assetId) }, params, proxyBasePath);
20703
20710
  debugMediaNodeLog("resolve:proxy-img", { assetId: value.assetId, params, proxyBasePath, proxyUrl });
20704
20711
  return proxyUrl;
20705
20712
  }
@@ -24585,6 +24592,8 @@ var init_carousel_shared = __esm({
24585
24592
  import { jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
24586
24593
  function resolveColorStyle(color) {
24587
24594
  switch (color) {
24595
+ case void 0:
24596
+ return void 0;
24588
24597
  case "inherit":
24589
24598
  return { color: "inherit" };
24590
24599
  case "foreground":
@@ -34205,6 +34214,9 @@ var init_useFormSubmission = __esm({
34205
34214
  // ../blocks/src/system/runtime/nodes/form.client.tsx
34206
34215
  import { useState as useState6 } from "react";
34207
34216
  import { jsx as jsx66, jsxs as jsxs48 } from "react/jsx-runtime";
34217
+ function isUnknownArray4(value) {
34218
+ return Array.isArray(value);
34219
+ }
34208
34220
  var FormNodeClient;
34209
34221
  var init_form_client = __esm({
34210
34222
  "../blocks/src/system/runtime/nodes/form.client.tsx"() {
@@ -34330,7 +34342,7 @@ var init_form_client = __esm({
34330
34342
  if (key === "company" || key === "altcha-solution") continue;
34331
34343
  if (key in data) {
34332
34344
  const existing = data[key];
34333
- data[key] = Array.isArray(existing) ? [...existing, fieldValue] : [existing, fieldValue];
34345
+ data[key] = isUnknownArray4(existing) ? [...existing, fieldValue] : [existing, fieldValue];
34334
34346
  } else {
34335
34347
  data[key] = fieldValue;
34336
34348
  }
@@ -34725,7 +34737,7 @@ function useAvailableDates({
34725
34737
  const endDate = formatLocalScheduleDate(
34726
34738
  addLocalScheduleDays(parseBookingLocalDate(today), initialDays)
34727
34739
  );
34728
- fetchDates(today, endDate, false);
34740
+ void fetchDates(today, endDate, false);
34729
34741
  }, [serviceId, fetchDates, initialDays]);
34730
34742
  useVisibleTabPolling({
34731
34743
  enabled: Boolean(serviceId && loadedRange),
@@ -34745,7 +34757,7 @@ function useAvailableDates({
34745
34757
  BOOKING_FETCH_CHUNK_DAYS
34746
34758
  )
34747
34759
  );
34748
- fetchDates(start, end, true);
34760
+ void fetchDates(start, end, true);
34749
34761
  }, [fetchDates, isLoading]);
34750
34762
  return {
34751
34763
  availableDates,
@@ -34818,7 +34830,7 @@ function useAvailableSlots({
34818
34830
  setSlots(
34819
34831
  result.slots.map((slot) => ({
34820
34832
  ...slot,
34821
- resourceId: asAppointmentResourceId(slot.resourceId)
34833
+ resourceId: unsafeAsAppointmentResourceId(slot.resourceId)
34822
34834
  }))
34823
34835
  );
34824
34836
  setHasLoaded(true);
@@ -35015,7 +35027,7 @@ function useDiscountCodeUi(options) {
35015
35027
  if (!cancelled) setDiscountsAvailableLoading(false);
35016
35028
  }
35017
35029
  }
35018
- checkDiscountAvailability();
35030
+ void checkDiscountAvailability();
35019
35031
  return () => {
35020
35032
  cancelled = true;
35021
35033
  };
@@ -35392,13 +35404,13 @@ function toOptionalBrandedId(value, brand) {
35392
35404
  return trimmed ? brand(trimmed) : void 0;
35393
35405
  }
35394
35406
  function toOptionalAppointmentServiceId(value) {
35395
- return toOptionalBrandedId(value, asAppointmentServiceId);
35407
+ return toOptionalBrandedId(value, unsafeAsAppointmentServiceId);
35396
35408
  }
35397
35409
  function toOptionalAppointmentResourceId(value) {
35398
- return toOptionalBrandedId(value, asAppointmentResourceId);
35410
+ return toOptionalBrandedId(value, unsafeAsAppointmentResourceId);
35399
35411
  }
35400
35412
  function toOptionalCustomerPassId(value) {
35401
- return toOptionalBrandedId(value, asCustomerPassId);
35413
+ return toOptionalBrandedId(value, unsafeAsCustomerPassId);
35402
35414
  }
35403
35415
  function isBookingFieldValue(value) {
35404
35416
  return value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean" || Array.isArray(value) && value.every((item) => typeof item === "string");
@@ -35552,7 +35564,7 @@ function toBookingSlotView(slot) {
35552
35564
  key: `${slot.startAt}|${slot.endAt}|${slot.resourceId}`,
35553
35565
  startAt: slot.startAt,
35554
35566
  endAt: slot.endAt,
35555
- resourceId: asAppointmentResourceId(slot.resourceId),
35567
+ resourceId: unsafeAsAppointmentResourceId(slot.resourceId),
35556
35568
  ...slot.resourceName ? { resourceName: slot.resourceName } : {},
35557
35569
  ...slot.label ? { label: slot.label } : {}
35558
35570
  };
@@ -35674,31 +35686,30 @@ function validateBookingField(field, value) {
35674
35686
  }
35675
35687
  if (isBlankFieldValue(value)) return null;
35676
35688
  const strValue = typeof value === "string" ? value : String(value);
35677
- switch (field.type) {
35678
- case "email":
35679
- return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(strValue) ? null : "Please enter a valid email address";
35680
- case "url":
35681
- try {
35682
- new URL(strValue);
35683
- return null;
35684
- } catch {
35685
- return "Please enter a valid URL";
35686
- }
35687
- case "tel":
35688
- return /^[+\d\s\-()]+$/.test(strValue) ? null : "Please enter a valid phone number";
35689
- case "number": {
35690
- const num = Number(value);
35691
- if (Number.isNaN(num)) return "Please enter a valid number";
35692
- if (field.min !== void 0 && num < field.min) {
35693
- return `Value must be at least ${field.min}`;
35694
- }
35695
- if (field.max !== void 0 && num > field.max) {
35696
- return `Value must be at most ${field.max}`;
35697
- }
35689
+ if (field.type === "email") {
35690
+ return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(strValue) ? null : "Please enter a valid email address";
35691
+ }
35692
+ if (field.type === "url") {
35693
+ try {
35694
+ new URL(strValue);
35698
35695
  return null;
35696
+ } catch {
35697
+ return "Please enter a valid URL";
35699
35698
  }
35700
- default:
35701
- break;
35699
+ }
35700
+ if (field.type === "tel") {
35701
+ return /^[+\d\s\-()]+$/.test(strValue) ? null : "Please enter a valid phone number";
35702
+ }
35703
+ if (field.type === "number") {
35704
+ const num = Number(value);
35705
+ if (Number.isNaN(num)) return "Please enter a valid number";
35706
+ if (field.min !== void 0 && num < field.min) {
35707
+ return `Value must be at least ${field.min}`;
35708
+ }
35709
+ if (field.max !== void 0 && num > field.max) {
35710
+ return `Value must be at most ${field.max}`;
35711
+ }
35712
+ return null;
35702
35713
  }
35703
35714
  if (typeof value === "string") {
35704
35715
  if (field.minLength && value.length < field.minLength) {
@@ -35798,7 +35809,7 @@ function buildBookingAvailabilityQuery(input) {
35798
35809
  }
35799
35810
  function deriveBookingFieldViews(input) {
35800
35811
  return (input.form?.schema?.fields ?? []).map((field) => {
35801
- const fieldId = asBookingFieldId(field.id);
35812
+ const fieldId = unsafeAsBookingFieldId(field.id);
35802
35813
  const inputId = `${input.idPrefix}-${fieldId}`;
35803
35814
  const helpTextId = field.helpText ? `${inputId}-help` : null;
35804
35815
  const fieldValue = input.values[field.id] ?? null;
@@ -35955,8 +35966,8 @@ function resolveAppointmentPackagesModel(input) {
35955
35966
  function toHeadlessEligibleAppointmentPackage(appointmentPackage) {
35956
35967
  return {
35957
35968
  ...appointmentPackage,
35958
- customerPassId: asCustomerPassId(appointmentPackage.customerPassId),
35959
- passId: asPassId(appointmentPackage.passId)
35969
+ customerPassId: unsafeAsCustomerPassId(appointmentPackage.customerPassId),
35970
+ passId: unsafeAsPassId(appointmentPackage.passId)
35960
35971
  };
35961
35972
  }
35962
35973
  function resolveHeadlessBookingStatus(input) {
@@ -36012,14 +36023,14 @@ function omitRecordKey(record, key) {
36012
36023
  const { [key]: _removed, ...rest } = record;
36013
36024
  return rest;
36014
36025
  }
36015
- var asBookingFieldId;
36026
+ var unsafeAsBookingFieldId;
36016
36027
  var init_booking_form_headless_state = __esm({
36017
36028
  "../blocks/src/system/runtime/nodes/booking-form.headless.state.ts"() {
36018
36029
  "use strict";
36019
36030
  init_src();
36020
36031
  init_dist();
36021
36032
  init_booking_form_state();
36022
- asBookingFieldId = (id) => id;
36033
+ unsafeAsBookingFieldId = (id) => id;
36023
36034
  }
36024
36035
  });
36025
36036
 
@@ -36043,7 +36054,7 @@ import React15, {
36043
36054
  } from "react";
36044
36055
  function useHeadlessBookingFlow(options) {
36045
36056
  const viewerTimeZone = options.viewerTimeZone ?? getRuntimeTimeZone();
36046
- const formKey = asFormId(options.formId);
36057
+ const formKey = unsafeAsFormId(options.formId);
36047
36058
  const defaultServiceId = toOptionalAppointmentServiceId(
36048
36059
  options.initialServiceId ?? resolveDefaultBookingServiceId(options.form, options.services) ?? void 0
36049
36060
  );
@@ -36209,7 +36220,7 @@ function useHeadlessBookingFlow(options) {
36209
36220
  setResourcesState({
36210
36221
  tag: "loaded",
36211
36222
  value: (result.options ?? []).map((option) => ({
36212
- id: asAppointmentResourceId(option.id),
36223
+ id: unsafeAsAppointmentResourceId(option.id),
36213
36224
  label: option.label
36214
36225
  }))
36215
36226
  });
@@ -36425,11 +36436,11 @@ function useHeadlessBookingFlow(options) {
36425
36436
  () => ({
36426
36437
  selectService: (serviceId) => dispatch({
36427
36438
  type: "service-selected",
36428
- serviceId: asAppointmentServiceId(serviceId)
36439
+ serviceId: unsafeAsAppointmentServiceId(serviceId)
36429
36440
  }),
36430
36441
  selectResource: (resourceId) => dispatch({
36431
36442
  type: "resource-selected",
36432
- resourceId: resourceId ? asAppointmentResourceId(resourceId) : null
36443
+ resourceId: resourceId ? unsafeAsAppointmentResourceId(resourceId) : null
36433
36444
  }),
36434
36445
  selectDate: (date) => dispatch({ type: "date-selected", date }),
36435
36446
  selectSlot: (slot) => dispatch({
@@ -36438,14 +36449,14 @@ function useHeadlessBookingFlow(options) {
36438
36449
  }),
36439
36450
  updateField: (fieldId, value) => dispatch({
36440
36451
  type: "field-updated",
36441
- fieldId: asBookingFieldId(fieldId),
36452
+ fieldId: unsafeAsBookingFieldId(fieldId),
36442
36453
  value
36443
36454
  }),
36444
- markFieldTouched: (fieldId) => dispatch({ type: "field-touched", fieldId: asBookingFieldId(fieldId) }),
36455
+ markFieldTouched: (fieldId) => dispatch({ type: "field-touched", fieldId: unsafeAsBookingFieldId(fieldId) }),
36445
36456
  selectPaymentOption: (kind) => dispatch({ type: "payment-option-selected", kind }),
36446
36457
  selectAppointmentPackage: (packageId) => dispatch({
36447
36458
  type: "appointment-package-selected",
36448
- packageId: packageId ? asCustomerPassId(packageId) : null
36459
+ packageId: packageId ? unsafeAsCustomerPassId(packageId) : null
36449
36460
  }),
36450
36461
  setDiscountCode: (code) => {
36451
36462
  dispatch({ type: "discount-code-changed", code });
@@ -36805,7 +36816,7 @@ function usePolling(config) {
36805
36816
  timeoutRef.current = setTimeout(doPoll, pollInterval);
36806
36817
  }
36807
36818
  };
36808
- doPoll();
36819
+ void doPoll();
36809
36820
  }, [poll]);
36810
36821
  useEffect11(() => {
36811
36822
  if (!config) {
@@ -37689,7 +37700,7 @@ function DefaultFieldInput({
37689
37700
  ] }, option.value)) });
37690
37701
  case "checkbox":
37691
37702
  if (field.field.options && field.field.options.length > 1) {
37692
- const checkedValues = Array.isArray(value) ? value : [];
37703
+ const checkedValues = toStringArray(value);
37693
37704
  return /* @__PURE__ */ jsx73("div", { className: "rb-space-y-2", children: field.field.options.map((option) => /* @__PURE__ */ jsxs53("label", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer", children: [
37694
37705
  /* @__PURE__ */ jsx73(
37695
37706
  "input",
@@ -37784,7 +37795,10 @@ function DefaultFieldInput({
37784
37795
  className: "form-input"
37785
37796
  }
37786
37797
  );
37787
- default:
37798
+ case "text":
37799
+ case "email":
37800
+ case "tel":
37801
+ case "url":
37788
37802
  return /* @__PURE__ */ jsx73(
37789
37803
  "input",
37790
37804
  {
@@ -37801,6 +37815,9 @@ function DefaultFieldInput({
37801
37815
  );
37802
37816
  }
37803
37817
  }
37818
+ function toStringArray(value) {
37819
+ return Array.isArray(value) ? value.filter((item) => typeof item === "string") : [];
37820
+ }
37804
37821
  function DefaultBookingDiscount({
37805
37822
  booking
37806
37823
  }) {
@@ -37892,7 +37909,7 @@ function collapseHeadlessSlotsForDisplay(input) {
37892
37909
  visibleSlots.push({
37893
37910
  startAt: slot.startAt,
37894
37911
  endAt: slot.endAt,
37895
- resourceId: asAppointmentResourceId(slot.resourceId)
37912
+ resourceId: unsafeAsAppointmentResourceId(slot.resourceId)
37896
37913
  });
37897
37914
  }
37898
37915
  return visibleSlots;
@@ -39109,7 +39126,7 @@ function usePortalAuth() {
39109
39126
  setProfile(null);
39110
39127
  }
39111
39128
  }
39112
- checkPortalAuth();
39129
+ void checkPortalAuth();
39113
39130
  return () => {
39114
39131
  cancelled = true;
39115
39132
  };
@@ -39173,7 +39190,7 @@ function useEligibility(params) {
39173
39190
  });
39174
39191
  }
39175
39192
  }
39176
- fetchEligibility();
39193
+ void fetchEligibility();
39177
39194
  return () => {
39178
39195
  cancelled = true;
39179
39196
  };
@@ -39218,7 +39235,7 @@ function useExistingEventRegistration({
39218
39235
  dispatch({ type: "resolved", registration: null });
39219
39236
  }
39220
39237
  }
39221
- fetchExistingRegistration();
39238
+ void fetchExistingRegistration();
39222
39239
  return () => {
39223
39240
  cancelled = true;
39224
39241
  };
@@ -40466,6 +40483,14 @@ function EventRegistrationWizardContent(props2) {
40466
40483
  const { wizard } = props2;
40467
40484
  const showSpamProtection = props2.showSpamProtection ?? isSpamProtectionEnabled();
40468
40485
  switch (wizard.step) {
40486
+ case "error":
40487
+ case "success":
40488
+ case "submitting":
40489
+ case "redirecting":
40490
+ case "verifying-payment":
40491
+ case "verifying-timeout":
40492
+ case "payment-failed":
40493
+ return null;
40469
40494
  case "select-event":
40470
40495
  return /* @__PURE__ */ jsx99(
40471
40496
  EventSelectionStep,
@@ -40615,6 +40640,14 @@ function EventRegistrationWizardActions(props2) {
40615
40640
  return wizard.eventRequiresPayment ? "Continue to Payment" : props2.buttonText;
40616
40641
  };
40617
40642
  switch (wizard.step) {
40643
+ case "error":
40644
+ case "success":
40645
+ case "submitting":
40646
+ case "redirecting":
40647
+ case "verifying-payment":
40648
+ case "verifying-timeout":
40649
+ case "payment-failed":
40650
+ return null;
40618
40651
  case "select-event":
40619
40652
  return null;
40620
40653
  case "select-tickets": {
@@ -40666,10 +40699,10 @@ function EventRegistrationWizardActions(props2) {
40666
40699
  const handlePaymentContinue = () => {
40667
40700
  if (!selection.method) return;
40668
40701
  if (selection.method === "free") {
40669
- wizard.handlePaymentSelect("free");
40702
+ void wizard.handlePaymentSelect("free");
40670
40703
  return;
40671
40704
  }
40672
- wizard.handlePaymentSelect(
40705
+ void wizard.handlePaymentSelect(
40673
40706
  selection.method,
40674
40707
  selection.passId ?? selection.bundlePassId,
40675
40708
  selection.membershipId ?? selection.bundleMembershipId
@@ -40902,7 +40935,7 @@ function useWaitlistClaim() {
40902
40935
  }
40903
40936
  }
40904
40937
  }
40905
- resolveClaim();
40938
+ void resolveClaim();
40906
40939
  return () => {
40907
40940
  cancelled = true;
40908
40941
  };
@@ -41928,7 +41961,13 @@ function EventRegistrationWizard(props2) {
41928
41961
  return "Details";
41929
41962
  case "select-payment":
41930
41963
  return "Payment";
41931
- default:
41964
+ case "error":
41965
+ case "success":
41966
+ case "submitting":
41967
+ case "redirecting":
41968
+ case "verifying-payment":
41969
+ case "verifying-timeout":
41970
+ case "payment-failed":
41932
41971
  return "";
41933
41972
  }
41934
41973
  });
@@ -42230,7 +42269,7 @@ var init_LeafletStaticMap = __esm({
42230
42269
  }
42231
42270
  }
42232
42271
  }
42233
- initMap();
42272
+ void initMap();
42234
42273
  return () => {
42235
42274
  mounted = false;
42236
42275
  if (mapRef.current) {
@@ -43449,7 +43488,7 @@ function useCalendarEvents({
43449
43488
  );
43450
43489
  if (unloadedMonths.length > 0) {
43451
43490
  const range = getThreeMonthRange(date);
43452
- fetchEventsForRange(range.from, range.to, unloadedMonths);
43491
+ void fetchEventsForRange(range.from, range.to, unloadedMonths);
43453
43492
  }
43454
43493
  }, [preloadMonths, fetchEventsForRange]);
43455
43494
  useEffect22(() => {
@@ -45964,7 +46003,7 @@ function useCourseRegistrationWizard(props2) {
45964
46003
  setPortalAuthState("unauthenticated");
45965
46004
  }
45966
46005
  }
45967
- checkPortalAuth();
46006
+ void checkPortalAuth();
45968
46007
  return () => {
45969
46008
  cancelled = true;
45970
46009
  };
@@ -46049,7 +46088,7 @@ function useCourseRegistrationWizard(props2) {
46049
46088
  if (!cancelled) setEligibilityLoading(false);
46050
46089
  }
46051
46090
  }
46052
- fetchEligibility();
46091
+ void fetchEligibility();
46053
46092
  return () => {
46054
46093
  cancelled = true;
46055
46094
  };
@@ -46108,7 +46147,7 @@ function useCourseRegistrationWizard(props2) {
46108
46147
  await new Promise((r2) => setTimeout(r2, 1500));
46109
46148
  }
46110
46149
  }
46111
- verifyAfterCheckout();
46150
+ void verifyAfterCheckout();
46112
46151
  return () => {
46113
46152
  cancelled = true;
46114
46153
  };
@@ -46377,7 +46416,7 @@ function useCourseRegistrationWizard(props2) {
46377
46416
  if (!cancelled) setDiscountsAvailableLoading(false);
46378
46417
  }
46379
46418
  }
46380
- checkDiscountAvailability();
46419
+ void checkDiscountAvailability();
46381
46420
  return () => {
46382
46421
  cancelled = true;
46383
46422
  };
@@ -46640,7 +46679,7 @@ function CourseRegistrationWizard(props2) {
46640
46679
  className: "cr-form",
46641
46680
  onSubmit: (e) => {
46642
46681
  e.preventDefault();
46643
- handleSubmit();
46682
+ void handleSubmit();
46644
46683
  },
46645
46684
  children: [
46646
46685
  /* @__PURE__ */ jsx138(
@@ -47423,7 +47462,7 @@ function useCartDiscountUiState(api, plan) {
47423
47462
  }
47424
47463
  }
47425
47464
  }
47426
- loadCartDiscountAvailability();
47465
+ void loadCartDiscountAvailability();
47427
47466
  return () => {
47428
47467
  cancelled = true;
47429
47468
  };
@@ -48376,10 +48415,10 @@ function PassesMembershipsController({ render }) {
48376
48415
  });
48377
48416
  const handleFormSubmit = useCallback14((event) => {
48378
48417
  event.preventDefault();
48379
- submitCheckout(false);
48418
+ void submitCheckout(false);
48380
48419
  }, [submitCheckout]);
48381
48420
  const handleConfirmDuplicate = useCallback14(() => {
48382
- submitCheckout(true);
48421
+ void submitCheckout(true);
48383
48422
  }, [submitCheckout]);
48384
48423
  return /* @__PURE__ */ jsxs96(Fragment28, { children: [
48385
48424
  /* @__PURE__ */ jsx150("div", { ref: shopRootRef, children: /* @__PURE__ */ jsx150(
@@ -50787,7 +50826,16 @@ var ENDPOINT_DEFINITIONS = {
50787
50826
  revalidate: 60,
50788
50827
  tags: ["site-{siteId}", "content-{siteId}-{type}"],
50789
50828
  auth: "user",
50790
- responseKind: "json"
50829
+ responseKind: "json",
50830
+ errors: ["validation:invalid_input", "resource:not_found", "resource:conflict", "server:internal_error"]
50831
+ },
50832
+ reorderContentEntries: {
50833
+ path: "/sites/{siteId}/content/{type}/order",
50834
+ method: "POST",
50835
+ tags: ["site-{siteId}", "content-{siteId}-{type}"],
50836
+ auth: "user",
50837
+ responseKind: "json",
50838
+ errors: ["validation:invalid_input", "resource:not_found", "resource:conflict", "server:internal_error"]
50791
50839
  },
50792
50840
  getContentTemplate: {
50793
50841
  path: "/sites/{siteId}/content/types/{type}/template",
@@ -55751,7 +55799,7 @@ function normalizeStoredObjectChildren(children, value, ctx) {
55751
55799
  return normalized;
55752
55800
  }
55753
55801
  function normalizeStoredRepeaterItems(plan, value, ctx) {
55754
- if (!Array.isArray(value)) {
55802
+ if (!isUnknownArray(value)) {
55755
55803
  return value;
55756
55804
  }
55757
55805
  return value.map((item) => {
@@ -55798,7 +55846,7 @@ function normalizeObjectChildren(children, value, ctx) {
55798
55846
  return normalized;
55799
55847
  }
55800
55848
  function normalizeRepeaterItems(plan, value, ctx) {
55801
- if (!Array.isArray(value)) return value;
55849
+ if (!isUnknownArray(value)) return value;
55802
55850
  return value.map((item) => {
55803
55851
  if (!item || typeof item !== "object" || Array.isArray(item)) return item;
55804
55852
  const itemRecord = item;
@@ -56185,6 +56233,9 @@ function isEmptyValue(value) {
56185
56233
  function isPlainObject(value) {
56186
56234
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
56187
56235
  }
56236
+ function isUnknownArray(value) {
56237
+ return Array.isArray(value);
56238
+ }
56188
56239
  function isValidRichTextDoc(value) {
56189
56240
  const doc = richTextDoc(value);
56190
56241
  return Boolean(isPlainObject(doc) && doc.type === "doc");
@@ -57617,16 +57668,20 @@ var marqueeLoopTransform = {
57617
57668
  summary: "Repeat an array to a minimum length, then duplicate it for seamless marquee looping",
57618
57669
  schema: marqueeLoopOptionsSchema,
57619
57670
  run: (value, options) => {
57620
- if (!Array.isArray(value) || value.length === 0) return [];
57671
+ const items = toUnknownArray(value);
57672
+ if (items.length === 0) return [];
57621
57673
  const minItems = options?.minItems ?? 10;
57622
57674
  const base = [];
57623
57675
  while (base.length < minItems) {
57624
- base.push(...value);
57676
+ base.push(...items);
57625
57677
  if (base.length > 1e3) break;
57626
57678
  }
57627
57679
  return [...base, ...base];
57628
57680
  }
57629
57681
  };
57682
+ function toUnknownArray(value) {
57683
+ return Array.isArray(value) ? value : [];
57684
+ }
57630
57685
  var formattingTransforms = [
57631
57686
  uppercaseTransform,
57632
57687
  fallbackTransform,
@@ -69965,14 +70020,23 @@ function injectMediaSlotPath(props2, node, parsedBinding, context) {
69965
70020
  }
69966
70021
  function resolveChildren(nodes, context) {
69967
70022
  if (!nodes?.length) return [];
69968
- return nodes.flatMap((child, index) => {
70023
+ const children = [];
70024
+ nodes.forEach((child, index) => {
69969
70025
  const childContext = { ...context, scopes: [...context.scopes] };
69970
70026
  const resolved = resolveNode2(child, childContext, index);
69971
70027
  if (Array.isArray(resolved)) {
69972
- return resolved.filter((item) => item !== null && item !== void 0);
70028
+ for (const item of resolved) {
70029
+ const childNode = item;
70030
+ if (isReactNode(childNode)) children.push(childNode);
70031
+ }
70032
+ return;
69973
70033
  }
69974
- return resolved !== null && resolved !== void 0 ? [resolved] : [];
70034
+ if (isReactNode(resolved)) children.push(resolved);
69975
70035
  });
70036
+ return children;
70037
+ }
70038
+ function isReactNode(value) {
70039
+ return value !== null && value !== void 0;
69976
70040
  }
69977
70041
  function resolveNode2(node, context, indexFallback) {
69978
70042
  if (!shouldRenderNode(node, context)) {
@@ -70186,8 +70250,11 @@ var BLOCK_PREFIX = "block.";
70186
70250
  function isPlainObject4(value) {
70187
70251
  return typeof value === "object" && value !== null && !Array.isArray(value);
70188
70252
  }
70253
+ function isUnknownArray2(value) {
70254
+ return Array.isArray(value);
70255
+ }
70189
70256
  function cloneValue(value) {
70190
- if (Array.isArray(value)) {
70257
+ if (isUnknownArray2(value)) {
70191
70258
  return value.map((item) => cloneValue(item));
70192
70259
  }
70193
70260
  if (isPlainObject4(value)) {
@@ -85757,11 +85824,11 @@ function normalizeContent(block) {
85757
85824
  }
85758
85825
  function normalizeParams(input) {
85759
85826
  if (!input || typeof input !== "object") return {};
85760
- const entries = Object.entries(input).map(([key, value]) => [
85761
- key,
85762
- coerceToString(value)
85763
- ]);
85764
- return Object.fromEntries(entries);
85827
+ const output = {};
85828
+ for (const [key, value] of Object.entries(input)) {
85829
+ output[key] = coerceToString(value);
85830
+ }
85831
+ return output;
85765
85832
  }
85766
85833
  function isNonArrayObject(value) {
85767
85834
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -85981,10 +86048,16 @@ var dashboardConfigSchema = z68.object({
85981
86048
  var fieldDefinitionInputSchema = unsafeRetypeZodSchema(fieldSchema);
85982
86049
  var nodeDefinitionSchema = unsafeRetypeZodSchema(NodeSchema);
85983
86050
  var sdkLoaderEndpointSchema = z68.enum(SUPPORTED_LOADER_ENDPOINTS);
86051
+ var loaderFallbackScalarSchema = z68.union([
86052
+ z68.string(),
86053
+ z68.number(),
86054
+ z68.boolean(),
86055
+ z68.null()
86056
+ ]);
85984
86057
  var loaderParamBindingSchema = z68.object({
85985
86058
  $bind: z68.object({
85986
86059
  from: z68.string().min(1, "Binding path is required"),
85987
- fallback: z68.string().optional()
86060
+ fallback: loaderFallbackScalarSchema.optional()
85988
86061
  })
85989
86062
  });
85990
86063
  var loaderParamValueSchema = z68.union([
@@ -86130,9 +86203,13 @@ var sdkBlockFieldOptionsMapSchema = z68.record(
86130
86203
  var sdkContentTypeTemplateConfigSchema = z68.object({
86131
86204
  blocks: z68.array(z68.unknown())
86132
86205
  }).passthrough();
86206
+ var sdkContentTypeOrderingConfigSchema = z68.object({
86207
+ mode: z68.enum(["default", "manual"]).optional()
86208
+ }).optional();
86133
86209
  var sdkContentTypeConfigSchema = z68.object({
86134
86210
  key: z68.string().min(1),
86135
86211
  fields: z68.array(z68.unknown()),
86212
+ ordering: sdkContentTypeOrderingConfigSchema,
86136
86213
  template: sdkContentTypeTemplateConfigSchema.nullable().optional()
86137
86214
  }).passthrough();
86138
86215
  var sdkContentConfigSchema = z68.object({
@@ -86402,18 +86479,21 @@ function buildEndpointURL(baseURL, endpoint) {
86402
86479
  function isFormDataBody(value) {
86403
86480
  return typeof FormData !== "undefined" && value instanceof FormData;
86404
86481
  }
86482
+ function isUnknownArray3(value) {
86483
+ return Array.isArray(value);
86484
+ }
86405
86485
  function appendQueryParam(queryParams, key, value) {
86406
86486
  if (value === void 0 || value === null) {
86407
86487
  return;
86408
86488
  }
86409
- if (Array.isArray(value)) {
86489
+ if (isUnknownArray3(value)) {
86410
86490
  const stack2 = [...value].reverse();
86411
86491
  while (stack2.length > 0) {
86412
86492
  const item = stack2.pop();
86413
86493
  if (item === void 0 || item === null) {
86414
86494
  continue;
86415
86495
  }
86416
- if (Array.isArray(item)) {
86496
+ if (isUnknownArray3(item)) {
86417
86497
  stack2.push(...[...item].reverse());
86418
86498
  continue;
86419
86499
  }
@@ -86423,6 +86503,12 @@ function appendQueryParam(queryParams, key, value) {
86423
86503
  }
86424
86504
  queryParams.append(key, String(value));
86425
86505
  }
86506
+ function serializePathParam(endpoint, key, value) {
86507
+ if (typeof value === "string") {
86508
+ return value;
86509
+ }
86510
+ throw new Error(`Invalid path param for endpoint ${String(endpoint)}: ${key} must be a string`);
86511
+ }
86426
86512
  function invalidateCacheTags(tags2, params) {
86427
86513
  const resolved = getRevalidateTag();
86428
86514
  if (typeof window !== "undefined" || !resolved || !tags2) return;
@@ -86561,8 +86647,9 @@ function createRawCMSClient(headers = {}, baseUrl) {
86561
86647
  const bracePlaceholder = `{${key}}`;
86562
86648
  const colonPlaceholder = `:${key}`;
86563
86649
  if (originalPath.includes(bracePlaceholder) || originalPath.includes(colonPlaceholder)) {
86564
- url = url.replace(bracePlaceholder, value);
86565
- url = url.replace(colonPlaceholder, value);
86650
+ const stringValue = serializePathParam(endpoint, key, value);
86651
+ url = url.replace(bracePlaceholder, stringValue);
86652
+ url = url.replace(colonPlaceholder, stringValue);
86566
86653
  } else {
86567
86654
  unusedParams[key] = value;
86568
86655
  }
@@ -87576,7 +87663,7 @@ async function prefetchBlockData2(page, context, client, options) {
87576
87663
  throw new Error("listPublishedEntries requires siteId and type params");
87577
87664
  }
87578
87665
  const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
87579
- const order = orderBy === "newest" || orderBy === "oldest" || orderBy === "title" || orderBy === "order" ? orderBy : void 0;
87666
+ const order = orderBy === "order" ? "manual" : orderBy === "newest" || orderBy === "oldest" || orderBy === "title" ? orderBy : void 0;
87580
87667
  const parsedEntryIds = mode === "manual" ? parseManualEntryIds(entryIds) : void 0;
87581
87668
  if (mode === "manual" && (!parsedEntryIds || parsedEntryIds.length === 0)) {
87582
87669
  return { entries: [] };
@@ -87849,7 +87936,7 @@ function usePage(params) {
87849
87936
  });
87850
87937
  }
87851
87938
  }
87852
- fetchPage();
87939
+ void fetchPage();
87853
87940
  return () => {
87854
87941
  cancelled = true;
87855
87942
  };
@@ -87987,7 +88074,7 @@ function useContent(params) {
87987
88074
  });
87988
88075
  }
87989
88076
  }
87990
- fetchContent();
88077
+ void fetchContent();
87991
88078
  return () => {
87992
88079
  cancelled = true;
87993
88080
  };
@@ -88603,7 +88690,7 @@ var SimpleCache = class {
88603
88690
  };
88604
88691
 
88605
88692
  // src/version.ts
88606
- var SDK_VERSION = "0.78.0";
88693
+ var SDK_VERSION = "0.78.2";
88607
88694
 
88608
88695
  // src/client/error.ts
88609
88696
  var RiverbankApiError = class _RiverbankApiError extends Error {
@@ -89016,9 +89103,10 @@ var CircuitOpenError = class extends Error {
89016
89103
  var prebuildModule = null;
89017
89104
  function tryRequire(modulePath) {
89018
89105
  try {
89019
- const req = Function(
89106
+ const getRequire = new Function(
89020
89107
  'return typeof require === "function" ? require : null'
89021
- )();
89108
+ );
89109
+ const req = getRequire();
89022
89110
  return req ? req(modulePath) : null;
89023
89111
  } catch {
89024
89112
  return null;
@@ -89531,8 +89619,7 @@ function createRiverbankClient(config) {
89531
89619
  async (sig) => {
89532
89620
  return await apiClient({
89533
89621
  endpoint: "getContentByPath",
89534
- params: { siteId },
89535
- body: { path, preview },
89622
+ params: { siteId, path, preview: String(preview) },
89536
89623
  options: { signal: sig }
89537
89624
  });
89538
89625
  },
@@ -89582,6 +89669,8 @@ function createRiverbankClient(config) {
89582
89669
  orderParam = "published_at.asc";
89583
89670
  } else if (order === "title") {
89584
89671
  orderParam = "title.asc";
89672
+ } else if (order === "manual") {
89673
+ orderParam = "manual.asc";
89585
89674
  }
89586
89675
  const apiParams = {
89587
89676
  siteId,