@riverbankcms/sdk 0.89.1 → 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 (178) hide show
  1. package/README.md +27 -4
  2. package/dist/{PreviewEditorSidebar-JDR64FEC.mjs → PreviewEditorSidebar-FNFRVSIM.mjs} +3 -3
  3. package/dist/{PreviewEditorUI-67TMJMAF.mjs → PreviewEditorUI-3WXJFQXG.mjs} +3 -3
  4. package/dist/SdkPreviewModeRuntime-2UCIMKUB.mjs +8 -0
  5. package/dist/_dts/ai/src/contracts/proposals.d.ts +216 -0
  6. package/dist/_dts/altcha/src/AltchaWidget.d.ts +1 -1
  7. package/dist/_dts/api/src/bookingConfig.d.ts +3 -0
  8. package/dist/_dts/api/src/bookingOperations.d.ts +2 -0
  9. package/dist/_dts/api/src/bookingRecords.d.ts +4 -2
  10. package/dist/_dts/api/src/bookings.d.ts +3 -1
  11. package/dist/_dts/api/src/event-listing-destination.d.ts +59 -0
  12. package/dist/_dts/api/src/index.d.ts +10 -5
  13. package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +0 -1
  14. package/dist/_dts/api/src/navigation.d.ts +2 -0
  15. package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +18 -6
  16. package/dist/_dts/api/src/request.d.ts +21 -0
  17. package/dist/_dts/api/src/sdk-event-upsert.d.ts +3 -1
  18. package/dist/_dts/api/src/sdkContracts.d.ts +2 -0
  19. package/dist/_dts/api/src/settings/permissions.d.ts +273 -0
  20. package/dist/_dts/api/src/types.d.ts +4 -1
  21. package/dist/_dts/api/src/url.d.ts +6 -3
  22. package/dist/_dts/block-form/src/utils/visibleWhen.d.ts +1 -0
  23. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterThumbnailCard.d.ts +5 -1
  24. package/dist/_dts/block-form/src/widgets/RepeaterField/components/RepeaterThumbnailGrid.d.ts +9 -1
  25. package/dist/_dts/block-form/src/widgets/RepeaterField/components/index.d.ts +1 -0
  26. package/dist/_dts/blocks/src/contracts/non-block-islands.d.ts +7 -11
  27. package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +6 -0
  28. package/dist/_dts/blocks/src/index.d.ts +2 -1
  29. package/dist/_dts/blocks/src/system/blocks/events/event-calendar.d.ts +14 -6
  30. package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +60 -2
  31. package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +16 -5
  32. package/dist/_dts/blocks/src/system/blocks/hero.d.ts +0 -2
  33. package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +9 -9
  34. package/dist/_dts/blocks/src/system/blocks/shop.d.ts +3 -3
  35. package/dist/_dts/blocks/src/system/blocks/shop.shared.d.ts +8 -0
  36. package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +1 -1
  37. package/dist/_dts/blocks/src/system/constants/events.d.ts +4 -1
  38. package/dist/_dts/blocks/src/system/manifest/schema.d.ts +3 -1
  39. package/dist/_dts/blocks/src/system/runtime/api/index.d.ts +1 -0
  40. package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +17 -5
  41. package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +51 -6
  42. package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +24 -0
  43. package/dist/_dts/blocks/src/system/runtime/nodes/course-registration/useCourseRegistrationWizard.d.ts +2 -2
  44. package/dist/_dts/blocks/src/system/runtime/nodes/event-details/logic.d.ts +1 -17
  45. package/dist/_dts/blocks/src/system/runtime/nodes/event-details.client.d.ts +5 -9
  46. package/dist/_dts/blocks/src/system/runtime/nodes/event-details.server.d.ts +5 -9
  47. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +7 -1
  48. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +48 -0
  49. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +5 -0
  50. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.d.ts +4 -4
  51. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.state.d.ts +50 -0
  52. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.d.ts +2 -2
  53. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +21 -0
  54. package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +1 -1
  55. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCalendar.interactive.d.ts +11 -1
  56. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.client.d.ts +2 -1
  57. package/dist/_dts/blocks/src/system/runtime/nodes/events/EventCombined.interactive.d.ts +11 -1
  58. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/calendarViewOptions.d.ts +10 -0
  59. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/destination.d.ts +8 -0
  60. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/eventProductEligibility.d.ts +24 -0
  61. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/pricing.d.ts +3 -0
  62. package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +7 -0
  63. package/dist/_dts/blocks/src/system/runtime/nodes/shared/contract-schemas.d.ts +5 -2
  64. package/dist/_dts/blocks/src/system/runtime/nodes/shop-checkout-form.d.ts +2 -2
  65. package/dist/_dts/content-model/src/entry-slots/index.d.ts +1 -0
  66. package/dist/_dts/content-model/src/entry-slots/sdkBlocks.d.ts +21 -0
  67. package/dist/_dts/content-model/src/entry-slots/types.d.ts +7 -0
  68. package/dist/_dts/core/src/event-pricing.d.ts +12 -2
  69. package/dist/_dts/core/src/money-input.d.ts +18 -0
  70. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +50 -0
  71. package/dist/_dts/media-editor/src/MediaEditor.d.ts +2 -1
  72. package/dist/_dts/media-editor/src/fieldUi.d.ts +6 -0
  73. package/dist/_dts/media-editor/src/index.d.ts +1 -1
  74. package/dist/_dts/preview-next/src/client/index.d.ts +1 -0
  75. package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +3 -2
  76. package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +3 -2
  77. package/dist/_dts/preview-next/src/client/preview/PreviewThemedSiteDocument.d.ts +3 -2
  78. package/dist/_dts/preview-next/src/client/preview/SiteChromeEditableSurface.d.ts +2 -2
  79. package/dist/_dts/preview-next/src/client/preview/themeRuntime.d.ts +6 -0
  80. package/dist/_dts/preview-next/src/client/sdk/SdkPreviewMode.d.ts +2 -1
  81. package/dist/_dts/sdk/src/cli/commands/pull-dated-offering-scope.d.ts +10 -0
  82. package/dist/_dts/sdk/src/cli/content/reader.d.ts +12 -5
  83. package/dist/_dts/sdk/src/client/management/types.d.ts +6 -55
  84. package/dist/_dts/sdk/src/components.d.ts +1 -0
  85. package/dist/_dts/sdk/src/config/field-definitions.d.ts +3 -1
  86. package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +3 -1
  87. package/dist/_dts/sdk/src/next/types.d.ts +8 -11
  88. package/dist/_dts/sdk/src/preview-next/client/index.d.ts +1 -1
  89. package/dist/_dts/sdk/src/public-api/contracts.d.ts +11 -1
  90. package/dist/_dts/sdk/src/rendering/blocks-theme-scope.d.ts +2 -1
  91. package/dist/_dts/sdk/src/rendering/components/Layout.d.ts +8 -7
  92. package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +5 -6
  93. package/dist/_dts/sdk/src/rendering/index.d.ts +1 -0
  94. package/dist/_dts/sdk/src/rendering/islands/types.d.ts +11 -1
  95. package/dist/_dts/sdk/src/rendering/server.d.ts +1 -0
  96. package/dist/_dts/sdk/src/rendering/themeRuntime.d.ts +26 -0
  97. package/dist/_dts/sdk/src/version.d.ts +1 -1
  98. package/dist/_dts/site-commands/src/commands.d.ts +18 -0
  99. package/dist/_dts/theme-core/src/ResponsiveScope.d.ts +12 -0
  100. package/dist/_dts/theme-core/src/accordions/types.d.ts +1 -1
  101. package/dist/_dts/theme-core/src/buttons/personalities/types.d.ts +2 -2
  102. package/dist/_dts/theme-core/src/buttons/types.d.ts +5 -5
  103. package/dist/_dts/theme-core/src/cards/types.d.ts +2 -2
  104. package/dist/_dts/theme-core/src/index.d.ts +2 -0
  105. package/dist/_dts/theme-core/src/mock-themes/all.d.ts +21 -21
  106. package/dist/_dts/theme-core/src/schema.d.ts +18 -18
  107. package/dist/_dts/theme-core/src/site-styles/designState.d.ts +2 -2
  108. package/dist/_dts/theme-core/src/site-styles/generatedSchemas.d.ts +2 -2
  109. package/dist/_dts/theme-core/src/site-styles/logoBranding.d.ts +4 -4
  110. package/dist/_dts/theme-core/src/themeRuntime.d.ts +11 -0
  111. package/dist/{chunk-F645A5UV.mjs → chunk-BOQXMCSP.mjs} +129 -101
  112. package/dist/{chunk-7YUAXONX.mjs → chunk-CR2VX432.mjs} +1563 -877
  113. package/dist/{chunk-HKJQERFR.mjs → chunk-FA6LVZ7C.mjs} +91 -55
  114. package/dist/{chunk-TGBJWKMP.mjs → chunk-H6TT5ZXI.mjs} +9 -1
  115. package/dist/{chunk-ZQRBLCW5.mjs → chunk-SYYJZPKU.mjs} +2 -2
  116. package/dist/{chunk-7N46MZHI.mjs → chunk-UG7I7S7W.mjs} +1 -1
  117. package/dist/cli/index.mjs +1057 -632
  118. package/dist/cli/init-docs/content/cli-reference.md +6 -1
  119. package/dist/cli/init-docs/content/content-management.md +27 -0
  120. package/dist/client/{accordion-MUCVNGQ7.mjs → accordion-4K7VGZ3I.mjs} +2 -2
  121. package/dist/client/{bookingForm-PKD6EFIE.mjs → bookingForm-3QXA3CIS.mjs} +26 -271
  122. package/dist/client/bookings.mjs +1586 -825
  123. package/dist/client/{carousel-3TKQSNJC.mjs → carousel-BEJKNGQ7.mjs} +3 -3
  124. package/dist/client/{cart-6XHSZK23.mjs → cart-44BBM6XG.mjs} +7 -8
  125. package/dist/client/{checkout-FVSPM6FI.mjs → checkout-THMHEYKF.mjs} +7 -8
  126. package/dist/client/{chunk-25W2EQUN.mjs → chunk-3H5CLFKT.mjs} +8 -0
  127. package/dist/client/{chunk-ZJZZA5EP.mjs → chunk-4COPESPO.mjs} +13 -16
  128. package/dist/client/chunk-5AJIMWKS.mjs +436 -0
  129. package/dist/client/{chunk-UQFY4AHX.mjs → chunk-B4H6QMPY.mjs} +157 -49
  130. package/dist/client/{chunk-VGLXACVK.mjs → chunk-DQIRKNZE.mjs} +1 -1
  131. package/dist/client/{chunk-7DH35FGA.mjs → chunk-EJBHK74Y.mjs} +1 -1
  132. package/dist/client/{chunk-SDIYSQAY.mjs → chunk-HIHOQGIP.mjs} +2 -3
  133. package/dist/client/{chunk-CQKKFEQD.mjs → chunk-JV7ZNAOU.mjs} +378 -111
  134. package/dist/client/{chunk-FHU6PFPM.mjs → chunk-KNTLBQ3N.mjs} +1 -1
  135. package/dist/client/{chunk-RSQWWUAD.mjs → chunk-PEDNDLPB.mjs} +4 -4
  136. package/dist/client/{chunk-EY42X22F.mjs → chunk-SLY6UDAS.mjs} +157 -5
  137. package/dist/client/{chunk-STJ2NCQM.mjs → chunk-WHZQDPBZ.mjs} +19 -1
  138. package/dist/client/{chunk-ZT5XE7FK.mjs → chunk-ZIAF2DA4.mjs} +1 -1
  139. package/dist/client/client.mjs +3552 -2898
  140. package/dist/client/{courseRegistration-ATZSYDHM.mjs → courseRegistration-URX7RCCK.mjs} +20 -58
  141. package/dist/client/{eventCalendar-6T2UGKKP.mjs → eventCalendar-GTENOQCE.mjs} +10 -11
  142. package/dist/client/{eventCombined-Q4VANXVF.mjs → eventCombined-EZVB72MF.mjs} +10 -11
  143. package/dist/client/{eventDetails-DW37E7VW.mjs → eventDetails-CH4BJR5Z.mjs} +10 -11
  144. package/dist/client/{eventListing-XURTSAUW.mjs → eventListing-4BVOI5HS.mjs} +10 -11
  145. package/dist/client/{eventRegistration-MRKEVAXW.mjs → eventRegistration-37LPIKIE.mjs} +10 -11
  146. package/dist/client/{form-WZZFFGMU.mjs → form-FX3Y54YK.mjs} +7 -7
  147. package/dist/client/{headerSection-EQYVQBLM.mjs → headerSection-UOZZGVYL.mjs} +3 -3
  148. package/dist/client/hooks.mjs +1169 -1063
  149. package/dist/client/{locationMap-MFF5VAZR.mjs → locationMap-VSIPKV35.mjs} +3 -3
  150. package/dist/client/{newsletterForm-JQ77UYIE.mjs → newsletterForm-6FRJKNAF.mjs} +5 -5
  151. package/dist/client/{productDetail-25LMT3IZ.mjs → productDetail-6AHMLXCO.mjs} +7 -8
  152. package/dist/client/{productList-5ABEMKUG.mjs → productList-M2CYIZVH.mjs} +7 -8
  153. package/dist/client/rendering/client.mjs +2912 -2316
  154. package/dist/client/rendering/islands.mjs +19 -19
  155. package/dist/client/rendering.mjs +2874 -2230
  156. package/dist/client/{shop-OMMQZ6YO.mjs → shop-AUOT6GEX.mjs} +7 -8
  157. package/dist/client/spam-protection.mjs +4 -5
  158. package/dist/preview-next/before-render.mjs +2 -2
  159. package/dist/preview-next/client/runtime.mjs +5 -5
  160. package/dist/{sdk-runtime-WNLBZ3ZH.mjs → sdk-runtime-6GPJNLU6.mjs} +6 -6
  161. package/dist/server/components.mjs +1856 -1509
  162. package/dist/server/config-validation.mjs +1394 -1288
  163. package/dist/server/config.mjs +1394 -1288
  164. package/dist/server/data.mjs +1169 -1063
  165. package/dist/server/index.mjs +135 -100
  166. package/dist/server/navigation.mjs +20 -30
  167. package/dist/server/next.mjs +1936 -1576
  168. package/dist/server/page-converter.mjs +1081 -967
  169. package/dist/server/prebuild.mjs +1 -1
  170. package/dist/server/rendering/server.mjs +1868 -1521
  171. package/dist/server/rendering.mjs +1878 -1531
  172. package/dist/server/routing.mjs +1248 -1089
  173. package/dist/server/server.mjs +1312 -1171
  174. package/dist/server/theme-bridge.mjs +8 -5
  175. package/package.json +3 -3
  176. package/dist/SdkPreviewModeRuntime-ZBEMRV7N.mjs +0 -8
  177. package/dist/client/chunk-LQFDYWPJ.mjs +0 -184
  178. package/dist/client/chunk-ZFHRN6W2.mjs +0 -66
@@ -86,7 +86,7 @@ function ze() {
86
86
  /* @__PURE__ */ Te(P)
87
87
  );
88
88
  }
89
- function z20(e) {
89
+ function z25(e) {
90
90
  if (L) {
91
91
  if (/* @__PURE__ */ Te(P) !== null)
92
92
  throw Tt(), Je;
@@ -2115,12 +2115,12 @@ function ha(e, t) {
2115
2115
  var mt = we(Dr, 2);
2116
2116
  let Pr;
2117
2117
  var We = X(mt);
2118
- en(We), We.__change = ui, z20(mt);
2118
+ en(We), We.__change = ui, z25(mt);
2119
2119
  var Ut = we(mt, 2), wi = X(Ut);
2120
2120
  {
2121
2121
  var pi = (n) => {
2122
2122
  var u = na(), _ = Gr(u), y = X(_);
2123
- Ge(y, () => c(re).verified), z20(_);
2123
+ Ge(y, () => c(re).verified), z25(_);
2124
2124
  var T = we(_, 2);
2125
2125
  en(T), Pe(() => {
2126
2126
  se(T, "name", V()), jo(T, c(Le));
@@ -2129,10 +2129,10 @@ function ha(e, t) {
2129
2129
  {
2130
2130
  var _ = (T) => {
2131
2131
  var E = ia(), p = X(E);
2132
- Ge(p, () => c(re).verifying), z20(E), ne(T, E);
2132
+ Ge(p, () => c(re).verifying), z25(E), ne(T, E);
2133
2133
  }, y = (T) => {
2134
2134
  var E = oa(), p = X(E);
2135
- Ge(p, () => c(re).label), z20(E), Pe(() => se(E, "for", c(cr))), ne(T, E);
2135
+ Ge(p, () => c(re).label), z25(E), Pe(() => se(E, "for", c(cr))), ne(T, E);
2136
2136
  };
2137
2137
  $e(
2138
2138
  n,
@@ -2147,18 +2147,18 @@ function ha(e, t) {
2147
2147
  c(C) === b.VERIFIED ? n(pi) : n(bi, false);
2148
2148
  });
2149
2149
  }
2150
- z20(Ut);
2150
+ z25(Ut);
2151
2151
  var yi = we(Ut, 2);
2152
2152
  {
2153
2153
  var Ei = (n) => {
2154
2154
  var u = aa(), _ = X(u);
2155
- se(_, "href", sr), z20(u), Pe(() => se(_, "aria-label", c(re).ariaLinkLabel)), ne(n, u);
2155
+ se(_, "href", sr), z25(u), Pe(() => se(_, "aria-label", c(re).ariaLinkLabel)), ne(n, u);
2156
2156
  };
2157
2157
  $e(yi, (n) => {
2158
2158
  (N() !== true || c(Dt)) && n(Ei);
2159
2159
  });
2160
2160
  }
2161
- z20(Mt);
2161
+ z25(Mt);
2162
2162
  var Or = we(Mt, 2);
2163
2163
  {
2164
2164
  var xi = (n) => {
@@ -2166,16 +2166,16 @@ function ha(e, t) {
2166
2166
  {
2167
2167
  var y = (E) => {
2168
2168
  var p = la(), x = X(p);
2169
- Ge(x, () => c(re).expired), z20(p), Pe(() => se(p, "title", c(He))), ne(E, p);
2169
+ Ge(x, () => c(re).expired), z25(p), Pe(() => se(p, "title", c(He))), ne(E, p);
2170
2170
  }, T = (E) => {
2171
2171
  var p = sa(), x = X(p);
2172
- Ge(x, () => c(re).error), z20(p), Pe(() => se(p, "title", c(He))), ne(E, p);
2172
+ Ge(x, () => c(re).error), z25(p), Pe(() => se(p, "title", c(He))), ne(E, p);
2173
2173
  };
2174
2174
  $e(_, (E) => {
2175
2175
  c(C) === b.EXPIRED ? E(y) : E(T, false);
2176
2176
  });
2177
2177
  }
2178
- z20(u), ne(n, u);
2178
+ z25(u), ne(n, u);
2179
2179
  };
2180
2180
  $e(Or, (n) => {
2181
2181
  (c(He) || c(C) === b.EXPIRED) && n(xi);
@@ -2185,7 +2185,7 @@ function ha(e, t) {
2185
2185
  {
2186
2186
  var $i = (n) => {
2187
2187
  var u = ua(), _ = X(u), y = X(_);
2188
- Ge(y, () => c(re).footer), z20(_), z20(u), ne(n, u);
2188
+ Ge(y, () => c(re).footer), z25(_), z25(u), ne(n, u);
2189
2189
  };
2190
2190
  $e(Fr, (n) => {
2191
2191
  c(re).footer && (k() !== true || c(Dt)) && n($i);
@@ -2201,7 +2201,7 @@ function ha(e, t) {
2201
2201
  v() && n(Ci);
2202
2202
  });
2203
2203
  }
2204
- return z20(ot), nn(ot, (n) => D(B, n), () => c(B)), Pe(
2204
+ return z25(ot), nn(ot, (n) => D(B, n), () => c(B)), Pe(
2205
2205
  (n) => {
2206
2206
  se(ot, "data-state", c(C)), se(ot, "data-floating", v()), Pr = Fo(mt, 1, "altcha-checkbox", null, Pr, n), se(We, "id", c(cr)), We.required = r2() !== "onsubmit" && (!v() || r2() !== "off");
2207
2207
  },
@@ -3931,6 +3931,24 @@ function useBlockApi() {
3931
3931
  return client;
3932
3932
  }
3933
3933
 
3934
+ // ../blocks/src/system/runtime/api/types.ts
3935
+ function discountAvailabilityHasDiscounts(availability) {
3936
+ return availability.type !== "none";
3937
+ }
3938
+ function discountAvailabilityAllowsManualEntry(availability) {
3939
+ return "manualCodeEntryAllowed" in availability && availability.manualCodeEntryAllowed;
3940
+ }
3941
+ function getAutoAppliedDiscountPreview(availability) {
3942
+ switch (availability.type) {
3943
+ case "none":
3944
+ case "manual":
3945
+ return null;
3946
+ case "auto":
3947
+ case "auto_and_manual":
3948
+ return availability.autoAppliedDiscount;
3949
+ }
3950
+ }
3951
+
3934
3952
  // ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
3935
3953
  function r(e) {
3936
3954
  var t, f, n = "";
@@ -5271,6 +5289,8 @@ function publicEventPricingType(pricing) {
5271
5289
  case "ticket_types":
5272
5290
  case "course":
5273
5291
  return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
5292
+ case "external":
5293
+ return "external";
5274
5294
  }
5275
5295
  }
5276
5296
  function publicEventScalarPrice(pricing) {
@@ -5285,6 +5305,7 @@ function publicEventPricingMode(pricing) {
5285
5305
  return "ticket_types";
5286
5306
  case "drop_in":
5287
5307
  case "course":
5308
+ case "external":
5288
5309
  return void 0;
5289
5310
  }
5290
5311
  }
@@ -5302,6 +5323,7 @@ function isFreePublicEventPriceDisplay(display) {
5302
5323
  case "range":
5303
5324
  case "mixed":
5304
5325
  case "unavailable":
5326
+ case "external":
5305
5327
  return false;
5306
5328
  }
5307
5329
  }
@@ -5604,9 +5626,107 @@ function addLocalScheduleDays(date, days) {
5604
5626
  };
5605
5627
  }
5606
5628
 
5607
- // ../theme-core/src/accordions/types.ts
5629
+ // ../blocks/src/system/manifest/richTextSchema.ts
5608
5630
  import { z as z5 } from "zod";
5609
- var accordionIconSchema = z5.enum([
5631
+ var TipTapMarkSchema = z5.object({
5632
+ type: z5.string(),
5633
+ attrs: z5.record(z5.string(), z5.unknown()).optional()
5634
+ });
5635
+ var TipTapNodeSchema = z5.lazy(
5636
+ () => z5.object({
5637
+ type: z5.string(),
5638
+ content: z5.array(TipTapNodeSchema).optional(),
5639
+ text: z5.string().optional(),
5640
+ attrs: z5.record(z5.string(), z5.unknown()).optional(),
5641
+ marks: z5.array(TipTapMarkSchema).optional()
5642
+ })
5643
+ );
5644
+ var RichTextValueSchema = z5.union([
5645
+ // Canonical: TipTap document directly
5646
+ TipTapNodeSchema,
5647
+ // Legacy (read-tolerance only): wrapped in { doc: {...} }
5648
+ z5.object({
5649
+ doc: TipTapNodeSchema
5650
+ })
5651
+ ]);
5652
+ var RichTextDocSchema = z5.object({
5653
+ type: z5.literal("doc"),
5654
+ content: z5.array(TipTapNodeSchema)
5655
+ });
5656
+
5657
+ // ../blocks/src/lib/media.ts
5658
+ import z6 from "zod";
5659
+ var hotspotSchema = z6.object({
5660
+ x: z6.number().min(0).max(1),
5661
+ y: z6.number().min(0).max(1),
5662
+ radius: z6.number().optional()
5663
+ });
5664
+ var rotationSchema = z6.union([z6.literal(0), z6.literal(90), z6.literal(180), z6.literal(270)]);
5665
+ var rectSchema = z6.tuple([z6.number(), z6.number(), z6.number(), z6.number()]);
5666
+ var aspectCropSchema = z6.object({
5667
+ aspect: z6.preprocess((value) => value == null ? void 0 : value, z6.string().optional()),
5668
+ rect: z6.preprocess((value) => value == null ? void 0 : value, rectSchema.optional()),
5669
+ hotspot: z6.preprocess((value) => value == null ? void 0 : value, hotspotSchema.optional()),
5670
+ rotation: z6.preprocess((value) => value == null ? void 0 : value, rotationSchema.optional())
5671
+ });
5672
+ var transformSchema = z6.object({
5673
+ aspectCrops: z6.preprocess((value) => {
5674
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
5675
+ return void 0;
5676
+ }
5677
+ return value;
5678
+ }, z6.record(z6.string(), aspectCropSchema.catch({}))).optional(),
5679
+ rect: rectSchema.optional(),
5680
+ hotspot: hotspotSchema.optional(),
5681
+ rotation: rotationSchema.optional()
5682
+ });
5683
+ var mediaPosterSchema = z6.discriminatedUnion("tag", [
5684
+ z6.object({
5685
+ tag: z6.literal("storage"),
5686
+ assetId: z6.string().optional(),
5687
+ storageBucket: z6.string().min(1),
5688
+ storagePath: z6.string().min(1)
5689
+ }),
5690
+ z6.object({
5691
+ tag: z6.literal("external-src"),
5692
+ assetId: z6.string().optional(),
5693
+ src: z6.string().url()
5694
+ })
5695
+ ]);
5696
+ var mediaBaseSchema = z6.object({
5697
+ purpose: z6.string().optional(),
5698
+ placeholder: z6.boolean().default(true).optional(),
5699
+ assetId: z6.string().optional(),
5700
+ identifier: z6.string().optional(),
5701
+ src: z6.string().optional(),
5702
+ alt: z6.string().optional(),
5703
+ filename: z6.string().optional(),
5704
+ mimeType: z6.string().optional(),
5705
+ width: z6.number().optional(),
5706
+ height: z6.number().optional(),
5707
+ storageBucket: z6.string().optional(),
5708
+ storagePath: z6.string().optional(),
5709
+ poster: mediaPosterSchema.optional(),
5710
+ transform: transformSchema.optional()
5711
+ });
5712
+ var imageMediaSchema = mediaBaseSchema.extend({ type: z6.literal("image") });
5713
+ var videoMediaSchema = mediaBaseSchema.extend({ type: z6.literal("video") });
5714
+ var audioMediaSchema = mediaBaseSchema.extend({ type: z6.literal("audio") });
5715
+ var documentMediaSchema = mediaBaseSchema.extend({ type: z6.literal("document") });
5716
+ var spreadsheetMediaSchema = mediaBaseSchema.extend({ type: z6.literal("spreadsheet") });
5717
+ var archiveMediaSchema = mediaBaseSchema.extend({ type: z6.literal("archive") });
5718
+ var mediaSchema = z6.discriminatedUnion("type", [
5719
+ imageMediaSchema,
5720
+ videoMediaSchema,
5721
+ audioMediaSchema,
5722
+ documentMediaSchema,
5723
+ spreadsheetMediaSchema,
5724
+ archiveMediaSchema
5725
+ ]);
5726
+
5727
+ // ../theme-core/src/accordions/types.ts
5728
+ import { z as z7 } from "zod";
5729
+ var accordionIconSchema = z7.enum([
5610
5730
  "plus-minus",
5611
5731
  // + becomes - (swap or rotate 90°)
5612
5732
  "chevron",
@@ -5618,70 +5738,70 @@ var accordionIconSchema = z5.enum([
5618
5738
  "circle-plus-minus"
5619
5739
  // ⊕ becomes ⊖ (swap with fade)
5620
5740
  ]);
5621
- var accordionSystemSchema = z5.object({
5741
+ var accordionSystemSchema = z7.object({
5622
5742
  // Visual styling (solid color only - gradients can be added later if needed).
5623
5743
  // null = no fill, so the accordion sits transparently on the section
5624
5744
  // surface (used by open, boxless "divided" looks).
5625
- background: z5.object({
5626
- type: z5.literal("solid"),
5745
+ background: z7.object({
5746
+ type: z7.literal("solid"),
5627
5747
  colorToken: themeColorTokenSchema
5628
5748
  }).nullable(),
5629
5749
  // Spacing (padding inside items)
5630
- spacing: z5.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]),
5750
+ spacing: z7.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]),
5631
5751
  // Border radius (null = inherit from theme.corners)
5632
- corners: z5.enum(["square", "soft", "rounded", "pill"]).nullable(),
5752
+ corners: z7.enum(["square", "soft", "rounded", "pill"]).nullable(),
5633
5753
  // Border styling (null = inherit from theme.border)
5634
- border: z5.object({
5635
- widthClass: z5.string(),
5754
+ border: z7.object({
5755
+ widthClass: z7.string(),
5636
5756
  // e.g., 'border', 'border-2', 'border-0'
5637
5757
  colorToken: themeColorTokenSchema
5638
5758
  }).nullable(),
5639
5759
  // Shadow (null = inherit from theme.shadow)
5640
- shadow: z5.object({
5641
- elevation: z5.enum(["none", "low", "medium", "high"]),
5642
- softness: z5.enum(["soft", "crisp", "hard"]).nullable(),
5643
- position: z5.enum(["bottom", "bottom-right"])
5760
+ shadow: z7.object({
5761
+ elevation: z7.enum(["none", "low", "medium", "high"]),
5762
+ softness: z7.enum(["soft", "crisp", "hard"]).nullable(),
5763
+ position: z7.enum(["bottom", "bottom-right"])
5644
5764
  }).nullable(),
5645
5765
  // Icon style and animation
5646
- icon: z5.object({
5766
+ icon: z7.object({
5647
5767
  style: accordionIconSchema,
5648
- position: z5.enum(["left", "right"]),
5649
- size: z5.enum(["sm", "md", "lg"]),
5768
+ position: z7.enum(["left", "right"]),
5769
+ size: z7.enum(["sm", "md", "lg"]),
5650
5770
  colorToken: themeColorTokenSchema.optional()
5651
5771
  }),
5652
5772
  // Trigger (question) styling
5653
- trigger: z5.object({
5773
+ trigger: z7.object({
5654
5774
  textColorToken: themeColorTokenSchema,
5655
- fontWeight: z5.enum(["regular", "medium", "semibold", "bold"]).nullable(),
5775
+ fontWeight: z7.enum(["regular", "medium", "semibold", "bold"]).nullable(),
5656
5776
  // null = inherit from theme
5657
5777
  // Question typography. Defaults keep the historical body-font look; set
5658
5778
  // fontFamily 'heading' + a larger scale to give questions real presence.
5659
- fontFamily: z5.enum(["body", "heading"]).optional(),
5779
+ fontFamily: z7.enum(["body", "heading"]).optional(),
5660
5780
  // default 'body'
5661
- fontScale: z5.enum(["body", "md", "lg"]).optional(),
5781
+ fontScale: z7.enum(["body", "md", "lg"]).optional(),
5662
5782
  // default 'body'
5663
- letterSpacing: z5.enum(["normal", "tight", "wide"]).optional(),
5664
- textTransform: z5.enum(["none", "uppercase"]).optional()
5783
+ letterSpacing: z7.enum(["normal", "tight", "wide"]).optional(),
5784
+ textTransform: z7.enum(["none", "uppercase"]).optional()
5665
5785
  }),
5666
5786
  // Hover state styling
5667
- hover: z5.object({
5787
+ hover: z7.object({
5668
5788
  backgroundColorToken: themeColorTokenSchema.optional(),
5669
5789
  textColorToken: themeColorTokenSchema.optional(),
5670
5790
  borderColorToken: themeColorTokenSchema.optional()
5671
5791
  }),
5672
5792
  // Open-state emphasis: how an expanded item is visually rewarded. All
5673
5793
  // optional; omit for the historical "only the text recolors" behaviour.
5674
- openState: z5.object({
5794
+ openState: z7.object({
5675
5795
  backgroundColorToken: themeColorTokenSchema.optional(),
5676
5796
  triggerColorToken: themeColorTokenSchema.optional(),
5677
- accent: z5.object({
5678
- edge: z5.enum(["left", "top", "bottom"]),
5797
+ accent: z7.object({
5798
+ edge: z7.enum(["left", "top", "bottom"]),
5679
5799
  colorToken: themeColorTokenSchema,
5680
- thickness: z5.enum(["thin", "medium", "thick"])
5800
+ thickness: z7.enum(["thin", "medium", "thick"])
5681
5801
  }).optional()
5682
5802
  }).optional(),
5683
5803
  // Content (answer) styling
5684
- content: z5.object({
5804
+ content: z7.object({
5685
5805
  textColorToken: themeColorTokenSchema
5686
5806
  })
5687
5807
  });
@@ -5861,8 +5981,8 @@ function SpinnerNode({
5861
5981
  }
5862
5982
 
5863
5983
  // ../frontend-state/dist/index.mjs
5864
- var IDLE_FEEDBACK = idleFeedback();
5865
- function idleFeedback() {
5984
+ var IDLE_FEEDBACK$2 = idleFeedback$3();
5985
+ function idleFeedback$3() {
5866
5986
  return { tag: "idle" };
5867
5987
  }
5868
5988
  function clearWorkflowFeedback(state) {
@@ -5887,18 +6007,30 @@ function idleSubmissionFeedback() {
5887
6007
  return { tag: "idle" };
5888
6008
  }
5889
6009
  function errorSubmissionFeedback(message) {
5890
- return { tag: "error", message };
6010
+ return {
6011
+ tag: "error",
6012
+ message
6013
+ };
5891
6014
  }
5892
6015
  function successSubmissionFeedback(message) {
5893
- return { tag: "success", message };
6016
+ return {
6017
+ tag: "success",
6018
+ message
6019
+ };
5894
6020
  }
5895
- function okWith2(data) {
5896
- return { ok: true, data };
6021
+ function okWith(data) {
6022
+ return {
6023
+ ok: true,
6024
+ data
6025
+ };
5897
6026
  }
5898
6027
  function err2(error) {
5899
- return { ok: false, error };
6028
+ return {
6029
+ ok: false,
6030
+ error
6031
+ };
5900
6032
  }
5901
- function assertNever11(value, message) {
6033
+ function assertNever4(value, message) {
5902
6034
  throw new Error(message ?? `Unexpected value: ${String(value)}`);
5903
6035
  }
5904
6036
 
@@ -6053,7 +6185,7 @@ function deriveBookingFormViewState(input) {
6053
6185
  resourceName: input.verificationState.resourceName
6054
6186
  };
6055
6187
  default:
6056
- return assertNever11(input.verificationState);
6188
+ return assertNever4(input.verificationState);
6057
6189
  }
6058
6190
  }
6059
6191
  function resolveBookingSiteId(siteId, form) {
@@ -6223,7 +6355,7 @@ function getBookingServicePaymentSelectionMode(service) {
6223
6355
  case "flexible_balance":
6224
6356
  return "implicit_flexible_balance";
6225
6357
  default:
6226
- return assertNever11(onlyKind);
6358
+ return assertNever4(onlyKind);
6227
6359
  }
6228
6360
  }
6229
6361
  if (allowedKinds.length === 2 && allowedKinds.includes("upfront") && (allowedKinds.includes("deferred_manual") || allowedKinds.includes("instalment_plan") || allowedKinds.includes("flexible_balance"))) {
@@ -6425,7 +6557,7 @@ function formatBookingSubmissionPreparationError(error) {
6425
6557
  case "service-missing-duration":
6426
6558
  return `Service "${error.serviceTitle}" is missing duration. Please update the service in the dashboard to include a duration (e.g., 30 minutes).`;
6427
6559
  default:
6428
- return assertNever11(error);
6560
+ return assertNever4(error);
6429
6561
  }
6430
6562
  }
6431
6563
  function getBookingSuccessMessage(successMessage) {
@@ -6443,12 +6575,170 @@ var logger = {
6443
6575
  withFields: (_) => logger
6444
6576
  };
6445
6577
 
6578
+ // ../blocks/src/system/blocks/shared/bookingPaymentTerms.ts
6579
+ import { z as z8 } from "zod";
6580
+ var bookingDepositRefundPolicySchema = z8.enum([
6581
+ "refundable",
6582
+ "non_refundable"
6583
+ ]);
6584
+ var bookingInstalmentPlanSchema = z8.union([
6585
+ z8.object({
6586
+ kind: z8.literal("deposit_plus_one_remainder"),
6587
+ depositAmountCents: z8.number().int().min(0),
6588
+ depositRefundability: bookingDepositRefundPolicySchema,
6589
+ remainderDueCount: z8.number().int().positive(),
6590
+ intervalUnit: z8.enum(["day", "week", "month"])
6591
+ }),
6592
+ z8.object({
6593
+ kind: z8.literal("deposit_plus_scheduled_instalments"),
6594
+ depositAmountCents: z8.number().int().min(0),
6595
+ depositRefundability: bookingDepositRefundPolicySchema,
6596
+ instalmentCount: z8.number().int().positive(),
6597
+ intervalCount: z8.number().int().positive(),
6598
+ intervalUnit: z8.enum(["day", "week", "month"])
6599
+ }),
6600
+ z8.object({
6601
+ kind: z8.literal("equal_scheduled_instalments"),
6602
+ instalmentCount: z8.number().int().positive(),
6603
+ intervalCount: z8.number().int().positive(),
6604
+ intervalUnit: z8.enum(["day", "week", "month"])
6605
+ })
6606
+ ]);
6607
+ var bookingFlexibleBalanceDueDateRuleSchema = z8.union([
6608
+ z8.object({
6609
+ kind: z8.literal("relative_to_start_date"),
6610
+ daysBeforeStart: z8.number().int().positive()
6611
+ }),
6612
+ z8.object({
6613
+ kind: z8.literal("fixed_calendar_date"),
6614
+ dueAt: z8.string().datetime()
6615
+ })
6616
+ ]);
6617
+ var bookingFlexibleBalanceConfigSchema = z8.object({
6618
+ upfrontAmountCents: z8.number().int().min(0),
6619
+ dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
6620
+ depositRefundability: bookingDepositRefundPolicySchema
6621
+ });
6622
+ var blockBookingPaymentCollectionOptionSchema = z8.union([
6623
+ z8.object({
6624
+ kind: z8.literal("upfront")
6625
+ }),
6626
+ z8.object({
6627
+ kind: z8.literal("deferred_manual")
6628
+ }),
6629
+ z8.object({
6630
+ kind: z8.literal("instalment_plan"),
6631
+ plan: bookingInstalmentPlanSchema
6632
+ }),
6633
+ z8.object({
6634
+ kind: z8.literal("flexible_balance"),
6635
+ config: bookingFlexibleBalanceConfigSchema
6636
+ })
6637
+ ]);
6638
+ var blockBookingPaymentTermsSchema = z8.object({
6639
+ allowedOptions: z8.array(blockBookingPaymentCollectionOptionSchema).min(1)
6640
+ });
6641
+
6642
+ // ../blocks/src/system/blocks/courses/shared/schemas.ts
6643
+ import { z as z9 } from "zod";
6644
+ var courseVenueSchema = z9.object({
6645
+ id: z9.string(),
6646
+ name: z9.string(),
6647
+ address: z9.string().nullable()
6648
+ });
6649
+ var courseSessionSchema = z9.object({
6650
+ id: z9.string(),
6651
+ startsAt: z9.string(),
6652
+ endsAt: z9.string(),
6653
+ timeZone: z9.string(),
6654
+ capacityOverride: z9.number().nullable().optional(),
6655
+ overrides: z9.record(z9.string(), z9.unknown()).nullable().optional()
6656
+ });
6657
+ var courseTeamMemberSummarySchema = z9.object({
6658
+ id: z9.string(),
6659
+ name: z9.string(),
6660
+ roleLabel: z9.string().nullable(),
6661
+ summary: z9.string().nullable(),
6662
+ profilePath: z9.string().nullable()
6663
+ });
6664
+ var coursePricingOptionSchema = z9.object({
6665
+ id: z9.string(),
6666
+ name: z9.string(),
6667
+ description: z9.string().nullable(),
6668
+ priceAmount: z9.number(),
6669
+ isActive: z9.boolean(),
6670
+ sortOrder: z9.number(),
6671
+ capacityLimit: z9.number().nullable(),
6672
+ saleStartsAt: z9.string().nullable(),
6673
+ saleEndsAt: z9.string().nullable(),
6674
+ attendanceScope: z9.enum(["in_person", "online", "both"]).nullable().optional()
6675
+ });
6676
+ var coursePricingSchema = z9.object({
6677
+ bookingRequirement: z9.enum(["none", "required"]),
6678
+ pricingStrategy: z9.enum(["free", "single", "tiered"]),
6679
+ currency: z9.string(),
6680
+ singlePriceAmount: z9.number().nullable(),
6681
+ paymentTerms: blockBookingPaymentTermsSchema,
6682
+ options: z9.array(coursePricingOptionSchema)
6683
+ });
6684
+ var publicCourseSchema = z9.object({
6685
+ id: z9.string(),
6686
+ title: z9.string(),
6687
+ slug: z9.string(),
6688
+ description: z9.unknown().nullable(),
6689
+ teamMembers: z9.array(courseTeamMemberSummarySchema).optional(),
6690
+ enrollmentOpen: z9.boolean(),
6691
+ pricing: coursePricingSchema.optional(),
6692
+ priceCents: z9.number().nullable(),
6693
+ currency: z9.string(),
6694
+ paymentTerms: blockBookingPaymentTermsSchema,
6695
+ enrollmentCapacity: z9.number().nullable(),
6696
+ acceptsMemberships: z9.boolean(),
6697
+ status: z9.enum(["active", "draft", "cancelled"]),
6698
+ sessionsCount: z9.number(),
6699
+ enrolledCount: z9.number(),
6700
+ availableSpots: z9.number().nullable(),
6701
+ sessions: z9.array(courseSessionSchema),
6702
+ venue: courseVenueSchema.nullable(),
6703
+ contentEntryId: z9.string().nullable()
6704
+ });
6705
+ var publicCoursesArraySchema = z9.array(publicCourseSchema);
6706
+
6707
+ // ../blocks/src/system/runtime/nodes/events/shared/destination.ts
6708
+ function isRecord3(value) {
6709
+ return typeof value === "object" && value !== null && !Array.isArray(value);
6710
+ }
6711
+ function isRuntimeEventDestination(value) {
6712
+ if (!isRecord3(value) || typeof value.kind !== "string") return false;
6713
+ if (value.kind === "native") {
6714
+ return (value.mode === "cms-managed" || value.mode === "system-managed") && typeof value.path === "string";
6715
+ }
6716
+ return value.kind === "external" && typeof value.url === "string" && typeof value.label === "string";
6717
+ }
6718
+ function resolveRuntimeEventDestination(event) {
6719
+ if (isRuntimeEventDestination(event.destination)) {
6720
+ return event.destination;
6721
+ }
6722
+ return {
6723
+ kind: "native",
6724
+ mode: event.eventDestinationMode === "system-managed" ? "system-managed" : "cms-managed",
6725
+ path: typeof event.path === "string" ? event.path : ""
6726
+ };
6727
+ }
6728
+
6446
6729
  // ../blocks/src/system/runtime/nodes/events/shared/pricing.ts
6447
6730
  var DEFAULT_EVENT_CURRENCY = "USD";
6448
6731
  function resolveRuntimeEventPricing(event) {
6449
6732
  if (isPublicEventPricing(event.pricing)) {
6450
6733
  return event.pricing;
6451
6734
  }
6735
+ const destination = resolveRuntimeEventDestination(event);
6736
+ if (destination.kind === "external") {
6737
+ return {
6738
+ kind: "external",
6739
+ display: { kind: "external", label: "External registration" }
6740
+ };
6741
+ }
6452
6742
  const legacy = event;
6453
6743
  const currency = readCurrency(legacy.currency);
6454
6744
  if (event.requiresRegistration === false) {
@@ -6485,22 +6775,22 @@ function resolveRuntimeEventPricing(event) {
6485
6775
  function readCurrency(value) {
6486
6776
  return typeof value === "string" && value.trim().length > 0 ? value : DEFAULT_EVENT_CURRENCY;
6487
6777
  }
6488
- function isRecord3(value) {
6778
+ function isRecord4(value) {
6489
6779
  return typeof value === "object" && value !== null && !Array.isArray(value);
6490
6780
  }
6491
6781
  function isPublicEventPricing(value) {
6492
- if (!isRecord3(value) || typeof value.kind !== "string") return false;
6493
- return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course";
6782
+ if (!isRecord4(value) || typeof value.kind !== "string") return false;
6783
+ return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course" || value.kind === "external";
6494
6784
  }
6495
6785
  function isPublicEventTicketType(value) {
6496
- return isRecord3(value) && typeof value.id === "string";
6786
+ return isRecord4(value) && typeof value.id === "string";
6497
6787
  }
6498
6788
  function readTicketTypePriceDisplay(value, currency) {
6499
6789
  const display = readLegacyPriceDisplay(value, currency);
6500
- return display.kind === "course" ? { kind: "unavailable", currency } : display;
6790
+ return display.kind === "course" || display.kind === "external" ? { kind: "unavailable", currency } : display;
6501
6791
  }
6502
6792
  function readLegacyPriceDisplay(value, currency) {
6503
- if (!isRecord3(value) || typeof value.kind !== "string") {
6793
+ if (!isRecord4(value) || typeof value.kind !== "string") {
6504
6794
  return { kind: "unavailable", currency };
6505
6795
  }
6506
6796
  const displayCurrency = readCurrency(value.currency);
@@ -6539,7 +6829,7 @@ function readLegacyPriceDisplay(value, currency) {
6539
6829
  case "unavailable":
6540
6830
  return { kind: "unavailable", currency: displayCurrency };
6541
6831
  case "course":
6542
- return isRecord3(value.display) ? {
6832
+ return isRecord4(value.display) ? {
6543
6833
  kind: "course",
6544
6834
  display: readCoursePriceDisplay(value.display, displayCurrency)
6545
6835
  } : {
@@ -6575,69 +6865,69 @@ function readAmount(value) {
6575
6865
  }
6576
6866
 
6577
6867
  // ../theme-core/src/utils/tokenOrColor.ts
6578
- import { z as z6 } from "zod";
6579
- var tokenOrCssColorValueSchema = z6.string();
6868
+ import { z as z10 } from "zod";
6869
+ var tokenOrCssColorValueSchema = z10.string();
6580
6870
 
6581
6871
  // ../theme-core/src/cards/types.ts
6582
- import { z as z7 } from "zod";
6872
+ import { z as z11 } from "zod";
6583
6873
  var cardVariantRoleValues = ["default", "alternative"];
6584
6874
  var boxlessCardVariantValue = "none";
6585
- var cardSpacingSchema = z7.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]);
6586
- var gradientDirectionSchema2 = z7.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
6587
- var cardVariantRoleSchema = z7.enum(cardVariantRoleValues);
6588
- var boxStylesCardVariantSchema = z7.enum([
6875
+ var cardSpacingSchema = z11.enum(["none", "compact", "cozy", "medium", "comfortable", "spacious"]);
6876
+ var gradientDirectionSchema2 = z11.enum(["to-r", "to-l", "to-t", "to-b", "to-tr", "to-tl", "to-br", "to-bl"]);
6877
+ var cardVariantRoleSchema = z11.enum(cardVariantRoleValues);
6878
+ var boxStylesCardVariantSchema = z11.enum([
6589
6879
  ...cardVariantRoleValues,
6590
6880
  boxlessCardVariantValue
6591
6881
  ]);
6592
- var cardBackgroundSchema = z7.discriminatedUnion("type", [
6593
- z7.object({ type: z7.literal("solid"), colorToken: themeColorTokenSchema }),
6594
- z7.object({
6595
- type: z7.literal("gradient"),
6882
+ var cardBackgroundSchema = z11.discriminatedUnion("type", [
6883
+ z11.object({ type: z11.literal("solid"), colorToken: themeColorTokenSchema }),
6884
+ z11.object({
6885
+ type: z11.literal("gradient"),
6596
6886
  fromToken: themeColorTokenSchema,
6597
6887
  toToken: themeColorTokenSchema,
6598
6888
  direction: gradientDirectionSchema2
6599
6889
  }),
6600
- z7.object({ type: z7.literal("transparent") })
6890
+ z11.object({ type: z11.literal("transparent") })
6601
6891
  ]);
6602
- var cardBorderSchema = z7.object({
6603
- widthClass: z7.string(),
6892
+ var cardBorderSchema = z11.object({
6893
+ widthClass: z11.string(),
6604
6894
  colorToken: themeColorTokenSchema
6605
6895
  });
6606
- var cardCornerValueSchema = z7.enum([
6896
+ var cardCornerValueSchema = z11.enum([
6607
6897
  "square",
6608
6898
  "soft",
6609
6899
  "rounded",
6610
6900
  "pill",
6611
6901
  "expressive"
6612
6902
  ]);
6613
- var cardAccentEdgeSchema = z7.object({
6614
- edge: z7.enum(["left", "top", "right", "bottom"]),
6903
+ var cardAccentEdgeSchema = z11.object({
6904
+ edge: z11.enum(["left", "top", "right", "bottom"]),
6615
6905
  colorToken: themeColorTokenSchema,
6616
- width: z7.enum(["thin", "medium", "thick", "heavy"])
6906
+ width: z11.enum(["thin", "medium", "thick", "heavy"])
6617
6907
  });
6618
- var cardCornerRadiiSchema = z7.object({
6908
+ var cardCornerRadiiSchema = z11.object({
6619
6909
  topLeft: cardCornerValueSchema.optional(),
6620
6910
  topRight: cardCornerValueSchema.optional(),
6621
6911
  bottomLeft: cardCornerValueSchema.optional(),
6622
6912
  bottomRight: cardCornerValueSchema.optional()
6623
6913
  });
6624
- var cardVariantSchema = z7.object({
6625
- id: z7.string(),
6626
- name: z7.string().min(1).max(20),
6627
- enabled: z7.boolean(),
6628
- priority: z7.union([z7.literal(1), z7.literal(2), z7.literal(3)]),
6914
+ var cardVariantSchema = z11.object({
6915
+ id: z11.string(),
6916
+ name: z11.string().min(1).max(20),
6917
+ enabled: z11.boolean(),
6918
+ priority: z11.union([z11.literal(1), z11.literal(2), z11.literal(3)]),
6629
6919
  // Appearance (token-based)
6630
6920
  background: cardBackgroundSchema,
6631
6921
  spacing: cardSpacingSchema,
6632
6922
  // Optional foreground (card text) color, for cards on a strong fill.
6633
6923
  foregroundToken: themeColorTokenSchema.optional(),
6634
6924
  // Optional overrides (uses theme defaults if not specified)
6635
- shadow: z7.object({
6636
- elevation: z7.enum(["none", "low", "medium", "high"]),
6637
- softness: z7.enum(["crisp", "soft", "hard"]).nullable(),
6638
- position: z7.enum(["bottom", "bottom-right"]).default("bottom")
6925
+ shadow: z11.object({
6926
+ elevation: z11.enum(["none", "low", "medium", "high"]),
6927
+ softness: z11.enum(["crisp", "soft", "hard"]).nullable(),
6928
+ position: z11.enum(["bottom", "bottom-right"]).default("bottom")
6639
6929
  }).optional(),
6640
- corners: z7.enum(["square", "soft", "rounded", "pill"]).optional(),
6930
+ corners: z11.enum(["square", "soft", "rounded", "pill"]).optional(),
6641
6931
  // Per-corner radius override; wins over `corners` when set.
6642
6932
  cornerRadii: cardCornerRadiiSchema.optional(),
6643
6933
  // Border (optional)
@@ -6645,10 +6935,206 @@ var cardVariantSchema = z7.object({
6645
6935
  // Single accent edge; replaces `border` when set.
6646
6936
  accentEdge: cardAccentEdgeSchema.optional()
6647
6937
  });
6648
- var cardSystemSchema = z7.object({
6649
- variants: z7.array(cardVariantSchema).min(1).max(3)
6938
+ var cardSystemSchema = z11.object({
6939
+ variants: z11.array(cardVariantSchema).min(1).max(3)
6650
6940
  });
6651
6941
 
6942
+ // ../blocks/src/system/blocks/events/shared/schemas.ts
6943
+ import { z as z12 } from "zod";
6944
+ var eventPresetSchema = z12.enum(["event", "class", "workshop", "retreat", "performance"]);
6945
+ var eventScheduleScopeSchema = z12.enum(["recurring", "oneOff"]);
6946
+ var eventDestinationModeSchema = z12.enum(["cms-managed", "system-managed"]);
6947
+ var publicEventDestinationSchema = z12.discriminatedUnion("kind", [
6948
+ z12.object({
6949
+ kind: z12.literal("native"),
6950
+ mode: eventDestinationModeSchema,
6951
+ path: z12.string()
6952
+ }),
6953
+ z12.object({
6954
+ kind: z12.literal("external"),
6955
+ url: z12.string(),
6956
+ label: z12.string()
6957
+ })
6958
+ ]);
6959
+ var eventVenueSchema = z12.object({
6960
+ id: z12.string(),
6961
+ name: z12.string(),
6962
+ address: z12.string().nullable(),
6963
+ location: z12.object({
6964
+ lat: z12.number(),
6965
+ lng: z12.number()
6966
+ }).nullable()
6967
+ });
6968
+ var eventCategorySchema = z12.object({
6969
+ id: z12.string(),
6970
+ name: z12.string(),
6971
+ color: z12.string().nullable()
6972
+ });
6973
+ var pricingTypeSchema = z12.enum(["free", "paid", "external"]);
6974
+ var accessRestrictionSchema = z12.enum(["none", "category"]);
6975
+ var eventPricingModeSchema = z12.enum(["single", "ticket_types"]);
6976
+ var publicCoursePriceDisplaySchema = z12.discriminatedUnion("kind", [
6977
+ z12.object({ kind: z12.literal("free"), currency: z12.string() }),
6978
+ z12.object({ kind: z12.literal("exact"), amount: z12.number(), currency: z12.string() }),
6979
+ z12.object({ kind: z12.literal("from"), amount: z12.number(), currency: z12.string() }),
6980
+ z12.object({ kind: z12.literal("unavailable"), currency: z12.string() })
6981
+ ]);
6982
+ var publicEventPriceDisplaySchema = z12.discriminatedUnion("kind", [
6983
+ z12.object({ kind: z12.literal("free"), currency: z12.string() }),
6984
+ z12.object({ kind: z12.literal("exact"), amount: z12.number(), currency: z12.string() }),
6985
+ z12.object({ kind: z12.literal("from"), amount: z12.number(), currency: z12.string() }),
6986
+ z12.object({ kind: z12.literal("range"), minAmount: z12.number(), maxAmount: z12.number(), currency: z12.string() }),
6987
+ z12.object({
6988
+ kind: z12.literal("mixed"),
6989
+ paidFromAmount: z12.number(),
6990
+ paidToAmount: z12.number(),
6991
+ currency: z12.string()
6992
+ }),
6993
+ z12.object({ kind: z12.literal("unavailable"), currency: z12.string() }),
6994
+ z12.object({ kind: z12.literal("external"), label: z12.string() }),
6995
+ z12.object({ kind: z12.literal("course"), display: publicCoursePriceDisplaySchema })
6996
+ ]);
6997
+ var publicEventTicketTypePriceDisplaySchema = z12.union([
6998
+ z12.object({ kind: z12.literal("free"), currency: z12.string() }),
6999
+ z12.object({ kind: z12.literal("exact"), amount: z12.number(), currency: z12.string() }),
7000
+ z12.object({ kind: z12.literal("from"), amount: z12.number(), currency: z12.string() }),
7001
+ z12.object({ kind: z12.literal("range"), minAmount: z12.number(), maxAmount: z12.number(), currency: z12.string() }),
7002
+ z12.object({
7003
+ kind: z12.literal("mixed"),
7004
+ paidFromAmount: z12.number(),
7005
+ paidToAmount: z12.number(),
7006
+ currency: z12.string()
7007
+ }),
7008
+ z12.object({ kind: z12.literal("unavailable"), currency: z12.string() })
7009
+ ]);
7010
+ var publicEventAttendanceModeSchema = z12.enum(["in_person", "online"]);
7011
+ var publicEventAttendanceModeAvailabilitySchema = z12.object({
7012
+ mode: publicEventAttendanceModeSchema,
7013
+ capacity: z12.number().nullable(),
7014
+ registeredCount: z12.number(),
7015
+ availableSpots: z12.number().nullable(),
7016
+ waitlistEnabled: z12.boolean()
7017
+ });
7018
+ var publicEventTicketTypeAvailabilitySchema = z12.union([
7019
+ z12.object({
7020
+ kind: z12.literal("available"),
7021
+ remainingCapacity: z12.number().nullable()
7022
+ }),
7023
+ z12.object({
7024
+ kind: z12.literal("unavailable"),
7025
+ reason: z12.enum(["inactive", "not_on_sale_yet", "sale_ended", "sold_out", "event_sold_out"]),
7026
+ remainingCapacity: z12.number().nullable()
7027
+ })
7028
+ ]);
7029
+ var publicEventTicketTypeSchema = z12.object({
7030
+ id: z12.string(),
7031
+ siteId: z12.string(),
7032
+ eventSeriesId: z12.string(),
7033
+ name: z12.string(),
7034
+ description: z12.string().nullable(),
7035
+ priceAmount: z12.number(),
7036
+ isActive: z12.boolean(),
7037
+ sortOrder: z12.number(),
7038
+ capacityMode: z12.enum(["limited", "unlimited"]),
7039
+ capacityLimit: z12.number().nullable(),
7040
+ attendanceScope: z12.enum(["in_person", "online", "both"]).optional(),
7041
+ saleStartsAt: z12.string().nullable(),
7042
+ saleEndsAt: z12.string().nullable(),
7043
+ availability: publicEventTicketTypeAvailabilitySchema,
7044
+ createdAt: z12.string(),
7045
+ updatedAt: z12.string()
7046
+ });
7047
+ var publicEventPricingSchema = z12.discriminatedUnion("kind", [
7048
+ z12.object({
7049
+ kind: z12.literal("drop_in"),
7050
+ currency: z12.string(),
7051
+ display: z12.object({ kind: z12.literal("free"), currency: z12.string() })
7052
+ }),
7053
+ z12.object({
7054
+ kind: z12.literal("free_registration"),
7055
+ currency: z12.string(),
7056
+ display: z12.object({ kind: z12.literal("free"), currency: z12.string() })
7057
+ }),
7058
+ z12.object({
7059
+ kind: z12.literal("single_paid"),
7060
+ amount: z12.number(),
7061
+ currency: z12.string(),
7062
+ display: z12.object({ kind: z12.literal("exact"), amount: z12.number(), currency: z12.string() })
7063
+ }),
7064
+ z12.object({
7065
+ kind: z12.literal("ticket_types"),
7066
+ currency: z12.string(),
7067
+ ticketTypes: z12.array(publicEventTicketTypeSchema),
7068
+ display: publicEventTicketTypePriceDisplaySchema
7069
+ }),
7070
+ z12.object({
7071
+ kind: z12.literal("course"),
7072
+ display: z12.object({ kind: z12.literal("course"), display: publicCoursePriceDisplaySchema })
7073
+ }),
7074
+ z12.object({
7075
+ kind: z12.literal("external"),
7076
+ display: z12.object({ kind: z12.literal("external"), label: z12.string() })
7077
+ })
7078
+ ]);
7079
+ var publicTeamMemberSummarySchema = z12.object({
7080
+ id: z12.string(),
7081
+ name: z12.string(),
7082
+ roleLabel: z12.string().nullable(),
7083
+ summary: z12.string().nullable(),
7084
+ profilePath: z12.string().nullable()
7085
+ });
7086
+ var publicEventSchema = z12.object({
7087
+ kind: z12.enum(["event", "course_session"]).optional(),
7088
+ eventPreset: eventPresetSchema.optional(),
7089
+ eventDestinationMode: eventDestinationModeSchema.optional(),
7090
+ scheduleScope: eventScheduleScopeSchema.optional(),
7091
+ id: z12.string(),
7092
+ occurrenceId: z12.string(),
7093
+ seriesId: z12.string(),
7094
+ title: z12.string(),
7095
+ description: z12.string().nullable(),
7096
+ content: z12.object({
7097
+ body: RichTextDocSchema.nullable().optional()
7098
+ }).optional(),
7099
+ presentation: z12.object({
7100
+ cardTitleOverride: z12.string().nullable().optional(),
7101
+ summary: z12.string().nullable().optional(),
7102
+ image: mediaSchema.nullable().optional()
7103
+ }).optional(),
7104
+ slug: z12.string(),
7105
+ path: z12.string().nullable(),
7106
+ destination: publicEventDestinationSchema,
7107
+ requiresRegistration: z12.boolean(),
7108
+ deliveryMode: z12.enum(["in_person", "online", "hybrid"]),
7109
+ attendanceModes: z12.array(publicEventAttendanceModeAvailabilitySchema),
7110
+ startsAt: z12.string(),
7111
+ endsAt: z12.string(),
7112
+ capacity: z12.number().nullable(),
7113
+ registeredCount: z12.number(),
7114
+ availableSpots: z12.number().nullable(),
7115
+ waitlistEnabled: z12.boolean(),
7116
+ venue: eventVenueSchema.nullable(),
7117
+ eventCategory: eventCategorySchema.nullable(),
7118
+ teamMembers: z12.array(publicTeamMemberSummarySchema).optional(),
7119
+ status: z12.enum(["active", "draft", "archived"]).optional(),
7120
+ timeZone: z12.string(),
7121
+ pricing: publicEventPricingSchema,
7122
+ paymentTerms: blockBookingPaymentTermsSchema,
7123
+ accessRestriction: accessRestrictionSchema,
7124
+ allowedCategoryIds: z12.array(z12.string()),
7125
+ requireGuestDetails: z12.boolean().optional(),
7126
+ acceptsPasses: z12.boolean().optional(),
7127
+ acceptsMemberships: z12.boolean().optional(),
7128
+ course: z12.object({
7129
+ id: z12.string(),
7130
+ pricing: coursePricingSchema.optional(),
7131
+ priceCents: z12.number().nullable(),
7132
+ currency: z12.string(),
7133
+ enrollmentOpen: z12.boolean()
7134
+ }).nullable().optional()
7135
+ });
7136
+ var publicEventsArraySchema = z12.array(publicEventSchema);
7137
+
6652
7138
  // ../blocks/src/system/constants/events.ts
6653
7139
  var EVENT_CONTENT_TYPE_SLUGS = ["event", "events"];
6654
7140
  function isEventContentType(slug) {
@@ -6681,172 +7167,172 @@ function resolveHeaderCtaVariant(theme, treatment) {
6681
7167
  }
6682
7168
 
6683
7169
  // ../theme-core/src/palette/variants/types.ts
6684
- import { z as z18 } from "zod";
7170
+ import { z as z23 } from "zod";
6685
7171
 
6686
7172
  // ../theme-core/src/schema.ts
6687
- import { z as z17 } from "zod";
7173
+ import { z as z22 } from "zod";
6688
7174
 
6689
7175
  // ../theme-core/src/lib/media.ts
6690
- import z8 from "zod";
6691
- var hotspotSchema = z8.object({
6692
- x: z8.number().min(0).max(1),
6693
- y: z8.number().min(0).max(1),
6694
- radius: z8.number().optional()
7176
+ import z13 from "zod";
7177
+ var hotspotSchema2 = z13.object({
7178
+ x: z13.number().min(0).max(1),
7179
+ y: z13.number().min(0).max(1),
7180
+ radius: z13.number().optional()
6695
7181
  });
6696
- var rotationSchema = z8.union([z8.literal(0), z8.literal(90), z8.literal(180), z8.literal(270)]);
6697
- var rectSchema = z8.tuple([z8.number(), z8.number(), z8.number(), z8.number()]);
6698
- var aspectCropSchema = z8.object({
6699
- aspect: z8.preprocess((value) => value == null ? void 0 : value, z8.string().optional()),
6700
- rect: z8.preprocess((value) => value == null ? void 0 : value, rectSchema.optional()),
6701
- hotspot: z8.preprocess((value) => value == null ? void 0 : value, hotspotSchema.optional()),
6702
- rotation: z8.preprocess((value) => value == null ? void 0 : value, rotationSchema.optional())
7182
+ var rotationSchema2 = z13.union([z13.literal(0), z13.literal(90), z13.literal(180), z13.literal(270)]);
7183
+ var rectSchema2 = z13.tuple([z13.number(), z13.number(), z13.number(), z13.number()]);
7184
+ var aspectCropSchema2 = z13.object({
7185
+ aspect: z13.preprocess((value) => value == null ? void 0 : value, z13.string().optional()),
7186
+ rect: z13.preprocess((value) => value == null ? void 0 : value, rectSchema2.optional()),
7187
+ hotspot: z13.preprocess((value) => value == null ? void 0 : value, hotspotSchema2.optional()),
7188
+ rotation: z13.preprocess((value) => value == null ? void 0 : value, rotationSchema2.optional())
6703
7189
  });
6704
- var transformSchema = z8.object({
6705
- aspectCrops: z8.preprocess((value) => {
7190
+ var transformSchema2 = z13.object({
7191
+ aspectCrops: z13.preprocess((value) => {
6706
7192
  if (!value || typeof value !== "object" || Array.isArray(value)) {
6707
7193
  return void 0;
6708
7194
  }
6709
7195
  return value;
6710
- }, z8.record(z8.string(), aspectCropSchema.catch({}))).optional(),
6711
- rect: rectSchema.optional(),
6712
- hotspot: hotspotSchema.optional(),
6713
- rotation: rotationSchema.optional()
7196
+ }, z13.record(z13.string(), aspectCropSchema2.catch({}))).optional(),
7197
+ rect: rectSchema2.optional(),
7198
+ hotspot: hotspotSchema2.optional(),
7199
+ rotation: rotationSchema2.optional()
6714
7200
  });
6715
- var mediaSchema = z8.object({
6716
- type: z8.enum(["image", "video", "audio", "document", "spreadsheet", "archive"]),
6717
- purpose: z8.string().optional(),
6718
- placeholder: z8.boolean().default(true).optional(),
6719
- assetId: z8.string().optional(),
6720
- identifier: z8.string().optional(),
6721
- src: z8.string().optional(),
6722
- alt: z8.string().optional(),
6723
- filename: z8.string().optional(),
6724
- mimeType: z8.string().optional(),
6725
- width: z8.number().optional(),
6726
- height: z8.number().optional(),
6727
- storageBucket: z8.string().optional(),
6728
- storagePath: z8.string().optional(),
6729
- transform: transformSchema.optional()
7201
+ var mediaSchema2 = z13.object({
7202
+ type: z13.enum(["image", "video", "audio", "document", "spreadsheet", "archive"]),
7203
+ purpose: z13.string().optional(),
7204
+ placeholder: z13.boolean().default(true).optional(),
7205
+ assetId: z13.string().optional(),
7206
+ identifier: z13.string().optional(),
7207
+ src: z13.string().optional(),
7208
+ alt: z13.string().optional(),
7209
+ filename: z13.string().optional(),
7210
+ mimeType: z13.string().optional(),
7211
+ width: z13.number().optional(),
7212
+ height: z13.number().optional(),
7213
+ storageBucket: z13.string().optional(),
7214
+ storagePath: z13.string().optional(),
7215
+ transform: transformSchema2.optional()
6730
7216
  });
6731
7217
 
6732
7218
  // ../theme-core/src/inputs/types.ts
6733
- import { z as z9 } from "zod";
6734
- var inputSystemSchema = z9.object({
7219
+ import { z as z14 } from "zod";
7220
+ var inputSystemSchema = z14.object({
6735
7221
  // Base styling (applied to all inputs)
6736
- base: z9.object({
6737
- background: z9.union([
6738
- z9.object({
6739
- type: z9.literal("solid"),
7222
+ base: z14.object({
7223
+ background: z14.union([
7224
+ z14.object({
7225
+ type: z14.literal("solid"),
6740
7226
  colorToken: themeColorTokenSchema
6741
7227
  }),
6742
- z9.object({
6743
- type: z9.literal("transparent")
7228
+ z14.object({
7229
+ type: z14.literal("transparent")
6744
7230
  })
6745
7231
  ]),
6746
7232
  textColorToken: themeColorTokenSchema,
6747
- border: z9.object({
6748
- widthClass: z9.string(),
7233
+ border: z14.object({
7234
+ widthClass: z14.string(),
6749
7235
  // e.g., 'border', 'border-2'
6750
7236
  colorToken: themeColorTokenSchema,
6751
- style: z9.enum(["all", "underline"]).optional()
7237
+ style: z14.enum(["all", "underline"]).optional()
6752
7238
  }),
6753
- corners: z9.enum(["square", "soft", "rounded", "pill"]).nullable(),
7239
+ corners: z14.enum(["square", "soft", "rounded", "pill"]).nullable(),
6754
7240
  // null = inherit from theme.corners
6755
- shadow: z9.object({
6756
- elevation: z9.enum(["none", "low", "medium"]),
6757
- softness: z9.enum(["soft", "crisp", "hard"]).nullable()
7241
+ shadow: z14.object({
7242
+ elevation: z14.enum(["none", "low", "medium"]),
7243
+ softness: z14.enum(["soft", "crisp", "hard"]).nullable()
6758
7244
  }).nullable(),
6759
- spacing: z9.enum(["compact", "cozy", "medium", "comfortable"]),
7245
+ spacing: z14.enum(["compact", "cozy", "medium", "comfortable"]),
6760
7246
  // padding inside inputs
6761
- fontSize: z9.enum(["sm", "base", "lg"])
7247
+ fontSize: z14.enum(["sm", "base", "lg"])
6762
7248
  }),
6763
7249
  // Label styling
6764
- label: z9.object({
7250
+ label: z14.object({
6765
7251
  textColorToken: themeColorTokenSchema,
6766
- fontWeight: z9.enum(["regular", "medium", "semibold", "bold", "black"]),
6767
- fontSize: z9.enum(["2xs", "xs", "sm", "base"]),
6768
- textTransform: z9.enum(["none", "uppercase", "lowercase", "capitalize"]).optional(),
6769
- letterSpacing: z9.enum(["normal", "wide", "wider", "widest"]).optional(),
6770
- opacity: z9.number().min(0.2).max(1).optional()
7252
+ fontWeight: z14.enum(["regular", "medium", "semibold", "bold", "black"]),
7253
+ fontSize: z14.enum(["2xs", "xs", "sm", "base"]),
7254
+ textTransform: z14.enum(["none", "uppercase", "lowercase", "capitalize"]).optional(),
7255
+ letterSpacing: z14.enum(["normal", "wide", "wider", "widest"]).optional(),
7256
+ opacity: z14.number().min(0.2).max(1).optional()
6771
7257
  }),
6772
7258
  // Focus state
6773
- focus: z9.object({
7259
+ focus: z14.object({
6774
7260
  ringColorToken: themeColorTokenSchema,
6775
- ringWidth: z9.enum(["0", "1", "2", "3"]),
7261
+ ringWidth: z14.enum(["0", "1", "2", "3"]),
6776
7262
  borderColorToken: themeColorTokenSchema.optional()
6777
7263
  // Change border color on focus
6778
7264
  }),
6779
7265
  // Error state (for validation feedback)
6780
- error: z9.object({
7266
+ error: z14.object({
6781
7267
  borderColorToken: themeColorTokenSchema,
6782
7268
  textColorToken: themeColorTokenSchema
6783
7269
  }),
6784
7270
  // Disabled state
6785
- disabled: z9.object({
7271
+ disabled: z14.object({
6786
7272
  backgroundColorToken: themeColorTokenSchema,
6787
7273
  textColorToken: themeColorTokenSchema,
6788
- opacity: z9.number().min(0.3).max(0.7)
7274
+ opacity: z14.number().min(0.3).max(0.7)
6789
7275
  })
6790
7276
  });
6791
7277
 
6792
7278
  // ../theme-core/src/gradients/types.ts
6793
- import { z as z10 } from "zod";
6794
- var gradientStopSchema = z10.object({
7279
+ import { z as z15 } from "zod";
7280
+ var gradientStopSchema = z15.object({
6795
7281
  color: themeColorTokenSchema,
6796
- position: z10.number().min(0).max(100)
7282
+ position: z15.number().min(0).max(100)
6797
7283
  // Percentage 0-100
6798
7284
  });
6799
- var gradientConfigSchema = z10.object({
6800
- type: z10.enum(["linear", "radial"]),
6801
- angle: z10.number().min(0).max(360).optional(),
7285
+ var gradientConfigSchema = z15.object({
7286
+ type: z15.enum(["linear", "radial"]),
7287
+ angle: z15.number().min(0).max(360).optional(),
6802
7288
  // For linear gradients (degrees)
6803
- position: z10.string().optional(),
7289
+ position: z15.string().optional(),
6804
7290
  // For radial gradients ('center', 'top left', etc.)
6805
- stops: z10.array(gradientStopSchema).min(2)
7291
+ stops: z15.array(gradientStopSchema).min(2)
6806
7292
  });
6807
7293
 
6808
7294
  // ../theme-core/src/navigation/types.ts
6809
- import { z as z12 } from "zod";
7295
+ import { z as z17 } from "zod";
6810
7296
 
6811
7297
  // ../theme-core/src/interactive/baseSchema.ts
6812
- import { z as z11 } from "zod";
6813
- var interactiveTypographySchema = z11.object({
7298
+ import { z as z16 } from "zod";
7299
+ var interactiveTypographySchema = z16.object({
6814
7300
  /** Font family source */
6815
- typography: z11.enum(["body", "heading"]).default("body"),
7301
+ typography: z16.enum(["body", "heading"]).default("body"),
6816
7302
  /** Font weight */
6817
- fontWeight: z11.enum(["regular", "medium", "semibold", "bold"]).default("medium"),
7303
+ fontWeight: z16.enum(["regular", "medium", "semibold", "bold"]).default("medium"),
6818
7304
  /** Text transform */
6819
- textTransform: z11.enum(["none", "uppercase", "capitalize"]).default("none"),
7305
+ textTransform: z16.enum(["none", "uppercase", "capitalize"]).default("none"),
6820
7306
  /** Italic style */
6821
- italic: z11.boolean().default(false)
7307
+ italic: z16.boolean().default(false)
6822
7308
  });
6823
- var effectApplicationSchema2 = z11.object({
7309
+ var effectApplicationSchema2 = z16.object({
6824
7310
  /** Effect preset ID */
6825
- effectId: z11.string(),
7311
+ effectId: z16.string(),
6826
7312
  /** User-provided customization options */
6827
- options: z11.record(z11.string(), z11.any()).optional()
7313
+ options: z16.record(z16.string(), z16.any()).optional()
6828
7314
  });
6829
- var effectCompositionSchema = z11.object({
7315
+ var effectCompositionSchema = z16.object({
6830
7316
  /** Effects always applied */
6831
- base: z11.array(effectApplicationSchema2).optional(),
7317
+ base: z16.array(effectApplicationSchema2).optional(),
6832
7318
  /** Effects applied on hover */
6833
- hover: z11.array(effectApplicationSchema2).optional(),
7319
+ hover: z16.array(effectApplicationSchema2).optional(),
6834
7320
  /** Effects applied on active/pressed */
6835
- active: z11.array(effectApplicationSchema2).optional(),
7321
+ active: z16.array(effectApplicationSchema2).optional(),
6836
7322
  /** Effects applied on focus */
6837
- focus: z11.array(effectApplicationSchema2).optional()
7323
+ focus: z16.array(effectApplicationSchema2).optional()
6838
7324
  });
6839
7325
 
6840
7326
  // ../theme-core/src/navigation/types.ts
6841
- var navLinkPaddingSchema = z12.enum(["none", "compact", "default"]);
6842
- var navLinkPaddingXSchema = z12.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
6843
- var navLinkBorderRadiusSchema = z12.enum(["none", "sm", "md", "full"]);
6844
- var navLinkTextSizeSchema = z12.enum(["xs", "sm", "base", "lg"]);
6845
- var navLinkLetterSpacingSchema = z12.enum(["normal", "wide", "wider", "widest"]);
6846
- var navLinkContrastTreatmentSchema = z12.enum(["none", "soft-glow"]);
6847
- var navLinkStyleSchema = z12.object({
7327
+ var navLinkPaddingSchema = z17.enum(["none", "compact", "default"]);
7328
+ var navLinkPaddingXSchema = z17.enum(["none", "tight", "compact", "default", "relaxed", "spacious"]);
7329
+ var navLinkBorderRadiusSchema = z17.enum(["none", "sm", "md", "full"]);
7330
+ var navLinkTextSizeSchema = z17.enum(["xs", "sm", "base", "lg"]);
7331
+ var navLinkLetterSpacingSchema = z17.enum(["normal", "wide", "wider", "widest"]);
7332
+ var navLinkContrastTreatmentSchema = z17.enum(["none", "soft-glow"]);
7333
+ var navLinkStyleSchema = z17.object({
6848
7334
  /** Display name for the style */
6849
- name: z12.string().min(1).max(30).optional(),
7335
+ name: z17.string().min(1).max(30).optional(),
6850
7336
  /** Typography settings (inherited from interactive base) */
6851
7337
  ...interactiveTypographySchema.shape,
6852
7338
  /** Text color token */
@@ -6870,7 +7356,7 @@ var navLinkStyleSchema = z12.object({
6870
7356
  });
6871
7357
 
6872
7358
  // ../theme-core/src/customCss/validation.ts
6873
- import { z as z13 } from "zod";
7359
+ import { z as z18 } from "zod";
6874
7360
  var FORBIDDEN_SELECTORS = [":root", "html", "body"];
6875
7361
  var UNIVERSAL_SELECTOR = "*";
6876
7362
  var REMOTE_URL_PATTERN = /url\s*\(\s*['"]?(https?:|\/\/)/i;
@@ -6912,7 +7398,7 @@ function containsForbiddenSelector(selector) {
6912
7398
  }
6913
7399
  return false;
6914
7400
  }
6915
- var selectorSchema = z13.string().min(1, "Selector cannot be empty").max(200, "Selector too long (max 200 characters)").refine(
7401
+ var selectorSchema = z18.string().min(1, "Selector cannot be empty").max(200, "Selector too long (max 200 characters)").refine(
6916
7402
  (s) => !containsForbiddenSelector(s),
6917
7403
  { message: "Global selectors (:root, html, body, *) are not allowed" }
6918
7404
  );
@@ -6922,38 +7408,38 @@ function containsRemoteUrl(value) {
6922
7408
  function containsJavascriptUrl(value) {
6923
7409
  return JAVASCRIPT_URL_PATTERN.test(value);
6924
7410
  }
6925
- var declarationValueSchema = z13.string().max(500, "Declaration value too long (max 500 characters)").refine(
7411
+ var declarationValueSchema = z18.string().max(500, "Declaration value too long (max 500 characters)").refine(
6926
7412
  (v) => !containsRemoteUrl(v),
6927
7413
  { message: "Remote url() references are not allowed. Use local paths, data URIs, or fragment IDs." }
6928
7414
  ).refine(
6929
7415
  (v) => !containsJavascriptUrl(v),
6930
7416
  { message: "javascript: URLs are not allowed" }
6931
7417
  );
6932
- var declarationsSchema = z13.record(
6933
- z13.string().min(1).max(100),
7418
+ var declarationsSchema = z18.record(
7419
+ z18.string().min(1).max(100),
6934
7420
  // property name
6935
7421
  declarationValueSchema
6936
7422
  // property value
6937
7423
  );
6938
- var customCssRuleSchema = z13.object({
6939
- id: z13.string().min(1, "Rule ID is required").max(50, "Rule ID too long"),
7424
+ var customCssRuleSchema = z18.object({
7425
+ id: z18.string().min(1, "Rule ID is required").max(50, "Rule ID too long"),
6940
7426
  selector: selectorSchema,
6941
7427
  declarations: declarationsSchema
6942
7428
  });
6943
7429
  var blockCustomCssRuleSchema = customCssRuleSchema.extend({
6944
- blockKind: z13.string().min(1, "Block kind is required").max(50, "Block kind too long")
7430
+ blockKind: z18.string().min(1, "Block kind is required").max(50, "Block kind too long")
6945
7431
  });
6946
- var customCssRulesSchema = z13.array(customCssRuleSchema).optional();
6947
- var blockCustomCssRulesSchema = z13.array(blockCustomCssRuleSchema).optional();
7432
+ var customCssRulesSchema = z18.array(customCssRuleSchema).optional();
7433
+ var blockCustomCssRulesSchema = z18.array(blockCustomCssRuleSchema).optional();
6948
7434
 
6949
7435
  // ../theme-core/src/customCss/atRuleValidation.ts
6950
- import { z as z14 } from "zod";
7436
+ import { z as z19 } from "zod";
6951
7437
  var KEYFRAME_OFFSET_PATTERN = /^(from|to|\d{1,3}%)$/i;
6952
7438
  var ANIMATION_NAME_PATTERN = /^[a-zA-Z_-][a-zA-Z0-9_-]*$/;
6953
7439
  var BLOCKED_AT_RULES = ["@import", "@charset"];
6954
7440
  var BLOCKED_AT_RULE_PATTERN = /@(?:import|charset)\b/i;
6955
- var ruleIdSchema = z14.string().min(1, "Rule ID is required").max(50, "Rule ID too long");
6956
- var nestedRuleSchema = z14.object({
7441
+ var ruleIdSchema = z19.string().min(1, "Rule ID is required").max(50, "Rule ID too long");
7442
+ var nestedRuleSchema = z19.object({
6957
7443
  selector: selectorSchema,
6958
7444
  declarations: declarationsSchema
6959
7445
  });
@@ -6965,88 +7451,88 @@ function isValidKeyframeOffset(offset) {
6965
7451
  const value = parseInt(match[1], 10);
6966
7452
  return value >= 0 && value <= 100;
6967
7453
  }
6968
- var keyframeOffsetSchema = z14.string().transform((offset) => offset.trim()).refine(
7454
+ var keyframeOffsetSchema = z19.string().transform((offset) => offset.trim()).refine(
6969
7455
  (offset) => KEYFRAME_OFFSET_PATTERN.test(offset),
6970
7456
  { message: 'Invalid keyframe offset. Use percentages (0%, 50%, 100%) or "from"/"to"' }
6971
7457
  ).refine(
6972
7458
  isValidKeyframeOffset,
6973
7459
  { message: "Keyframe offset must be between 0% and 100%" }
6974
7460
  );
6975
- var animationNameSchema = z14.string().min(1, "Animation name is required").max(50, "Animation name too long").refine(
7461
+ var animationNameSchema = z19.string().min(1, "Animation name is required").max(50, "Animation name too long").refine(
6976
7462
  (name) => ANIMATION_NAME_PATTERN.test(name),
6977
7463
  { message: "Invalid animation name. Use letters, numbers, dashes, underscores (start with letter, dash, or underscore)" }
6978
7464
  );
6979
- var keyframeSchema = z14.object({
7465
+ var keyframeSchema = z19.object({
6980
7466
  offset: keyframeOffsetSchema,
6981
7467
  declarations: declarationsSchema
6982
7468
  });
6983
- var keyframesAtRuleSchema = z14.object({
7469
+ var keyframesAtRuleSchema = z19.object({
6984
7470
  id: ruleIdSchema,
6985
- type: z14.literal("keyframes"),
7471
+ type: z19.literal("keyframes"),
6986
7472
  name: animationNameSchema,
6987
- frames: z14.array(keyframeSchema).min(1, "At least one keyframe is required")
7473
+ frames: z19.array(keyframeSchema).min(1, "At least one keyframe is required")
6988
7474
  });
6989
- var fontFaceDeclarationsSchema = z14.record(z14.string().min(1).max(100), declarationValueSchema).refine(
7475
+ var fontFaceDeclarationsSchema = z19.record(z19.string().min(1).max(100), declarationValueSchema).refine(
6990
7476
  (decls) => "fontFamily" in decls || "font-family" in decls,
6991
7477
  { message: "font-family is required in @font-face" }
6992
7478
  );
6993
- var fontFaceAtRuleSchema = z14.object({
7479
+ var fontFaceAtRuleSchema = z19.object({
6994
7480
  id: ruleIdSchema,
6995
- type: z14.literal("font-face"),
7481
+ type: z19.literal("font-face"),
6996
7482
  declarations: fontFaceDeclarationsSchema
6997
7483
  });
6998
- var mediaQuerySchema = z14.string().min(1, "Media query is required").max(200, "Media query too long");
6999
- var mediaAtRuleSchema = z14.object({
7484
+ var mediaQuerySchema = z19.string().min(1, "Media query is required").max(200, "Media query too long");
7485
+ var mediaAtRuleSchema = z19.object({
7000
7486
  id: ruleIdSchema,
7001
- type: z14.literal("media"),
7487
+ type: z19.literal("media"),
7002
7488
  query: mediaQuerySchema,
7003
- rules: z14.array(nestedRuleSchema).min(1, "At least one rule is required")
7489
+ rules: z19.array(nestedRuleSchema).min(1, "At least one rule is required")
7004
7490
  });
7005
- var supportsConditionSchema = z14.string().min(1, "Supports condition is required").max(200, "Supports condition too long");
7006
- var supportsAtRuleSchema = z14.object({
7491
+ var supportsConditionSchema = z19.string().min(1, "Supports condition is required").max(200, "Supports condition too long");
7492
+ var supportsAtRuleSchema = z19.object({
7007
7493
  id: ruleIdSchema,
7008
- type: z14.literal("supports"),
7494
+ type: z19.literal("supports"),
7009
7495
  condition: supportsConditionSchema,
7010
- rules: z14.array(nestedRuleSchema).min(1, "At least one rule is required")
7496
+ rules: z19.array(nestedRuleSchema).min(1, "At least one rule is required")
7011
7497
  });
7012
7498
  function containsBlockedAtRule(css) {
7013
7499
  return BLOCKED_AT_RULE_PATTERN.test(css);
7014
7500
  }
7015
- var rawCssSchema = z14.string().min(1, "CSS is required").max(5e3, "Raw CSS too long (max 5000 characters)").refine(
7501
+ var rawCssSchema = z19.string().min(1, "CSS is required").max(5e3, "Raw CSS too long (max 5000 characters)").refine(
7016
7502
  (css) => css.trim().startsWith("@"),
7017
7503
  { message: "Raw at-rule must start with @" }
7018
7504
  ).refine(
7019
7505
  (css) => !containsBlockedAtRule(css),
7020
7506
  { message: `Blocked at-rules: ${BLOCKED_AT_RULES.join(", ")}. Use typed at-rules or local assets instead.` }
7021
7507
  );
7022
- var rawAtRuleSchema = z14.object({
7508
+ var rawAtRuleSchema = z19.object({
7023
7509
  id: ruleIdSchema,
7024
- type: z14.literal("raw"),
7510
+ type: z19.literal("raw"),
7025
7511
  css: rawCssSchema
7026
7512
  });
7027
- var customCssAtRuleSchema = z14.discriminatedUnion("type", [
7513
+ var customCssAtRuleSchema = z19.discriminatedUnion("type", [
7028
7514
  keyframesAtRuleSchema,
7029
7515
  fontFaceAtRuleSchema,
7030
7516
  mediaAtRuleSchema,
7031
7517
  supportsAtRuleSchema,
7032
7518
  rawAtRuleSchema
7033
7519
  ]);
7034
- var customCssAtRulesSchema = z14.array(customCssAtRuleSchema).optional();
7520
+ var customCssAtRulesSchema = z19.array(customCssAtRuleSchema).optional();
7035
7521
 
7036
7522
  // ../theme-core/src/shared/componentStyles.ts
7037
- import { z as z15 } from "zod";
7038
- var componentBorderSchema = z15.object({
7039
- width: z15.enum(["none", "hairline", "thin", "medium", "thick"]).default("none"),
7040
- style: z15.enum(["solid", "dashed"]).default("solid"),
7523
+ import { z as z20 } from "zod";
7524
+ var componentBorderSchema = z20.object({
7525
+ width: z20.enum(["none", "hairline", "thin", "medium", "thick"]).default("none"),
7526
+ style: z20.enum(["solid", "dashed"]).default("solid"),
7041
7527
  colorToken: themeColorTokenSchema.optional()
7042
7528
  // defaults to "border" if not set
7043
7529
  });
7044
- var componentShadowSchema = z15.object({
7045
- elevation: z15.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("sm")
7530
+ var componentShadowSchema = z20.object({
7531
+ elevation: z20.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("sm")
7046
7532
  });
7047
7533
 
7048
7534
  // ../theme-core/src/site-styles/logoBranding.ts
7049
- import { z as z16 } from "zod";
7535
+ import { z as z21 } from "zod";
7050
7536
  var logoTextConfidenceValues = ["low", "medium", "high"];
7051
7537
  var logoAssetShapeValues = [
7052
7538
  "none",
@@ -7064,43 +7550,43 @@ var logoKindValues = [
7064
7550
  "unknown"
7065
7551
  ];
7066
7552
  var logoDensityValues = ["simple", "detailed", "unknown"];
7067
- var logoContainsTextSchema = z16.discriminatedUnion("kind", [
7068
- z16.object({
7069
- kind: z16.literal("contains-text"),
7070
- confidence: z16.enum(logoTextConfidenceValues),
7071
- text: z16.string().trim().min(1).max(200).optional()
7553
+ var logoContainsTextSchema = z21.discriminatedUnion("kind", [
7554
+ z21.object({
7555
+ kind: z21.literal("contains-text"),
7556
+ confidence: z21.enum(logoTextConfidenceValues),
7557
+ text: z21.string().trim().min(1).max(200).optional()
7072
7558
  }),
7073
- z16.object({
7074
- kind: z16.literal("no-text"),
7075
- confidence: z16.enum(logoTextConfidenceValues)
7559
+ z21.object({
7560
+ kind: z21.literal("no-text"),
7561
+ confidence: z21.enum(logoTextConfidenceValues)
7076
7562
  }),
7077
- z16.object({
7078
- kind: z16.literal("unknown"),
7079
- reason: z16.enum([
7563
+ z21.object({
7564
+ kind: z21.literal("unknown"),
7565
+ reason: z21.enum([
7080
7566
  "analysis-unavailable",
7081
7567
  "unsupported-file",
7082
7568
  "low-confidence"
7083
7569
  ])
7084
7570
  })
7085
7571
  ]);
7086
- var logoAnalysisSourceSchema = z16.discriminatedUnion("kind", [
7087
- z16.object({ kind: z16.literal("none") }),
7088
- z16.object({
7089
- kind: z16.literal("deterministic"),
7090
- reason: z16.enum(["dimensions", "fallback"])
7572
+ var logoAnalysisSourceSchema = z21.discriminatedUnion("kind", [
7573
+ z21.object({ kind: z21.literal("none") }),
7574
+ z21.object({
7575
+ kind: z21.literal("deterministic"),
7576
+ reason: z21.enum(["dimensions", "fallback"])
7091
7577
  }),
7092
- z16.object({
7093
- kind: z16.literal("llm"),
7094
- model: z16.literal("gpt-5.4-mini"),
7095
- analyzedAt: z16.string().trim().min(1).max(80).optional()
7578
+ z21.object({
7579
+ kind: z21.literal("llm"),
7580
+ model: z21.literal("gpt-5.4-mini"),
7581
+ analyzedAt: z21.string().trim().min(1).max(80).optional()
7096
7582
  }),
7097
- z16.object({ kind: z16.literal("manual-override") })
7583
+ z21.object({ kind: z21.literal("manual-override") })
7098
7584
  ]);
7099
- var logoFactsSchema = z16.object({
7100
- shape: z16.enum(logoAssetShapeValues),
7585
+ var logoFactsSchema = z21.object({
7586
+ shape: z21.enum(logoAssetShapeValues),
7101
7587
  containsText: logoContainsTextSchema,
7102
- kind: z16.enum(logoKindValues),
7103
- density: z16.enum(logoDensityValues),
7588
+ kind: z21.enum(logoKindValues),
7589
+ density: z21.enum(logoDensityValues),
7104
7590
  source: logoAnalysisSourceSchema
7105
7591
  });
7106
7592
  var brandDisplayModeValues = [
@@ -7158,74 +7644,74 @@ var pageDesignEditorBackgroundOverrideOwner = "page-design-editor";
7158
7644
  var siteChromeBackgroundOverrideOwner = "site-chrome-editor";
7159
7645
 
7160
7646
  // ../theme-core/src/schema.ts
7161
- var axesSchema = z17.object({
7162
- tone: z17.enum(["minimal", "classic", "bold"]),
7163
- energy: z17.enum(["calm", "vibrant"]),
7164
- density: z17.enum(["airy", "regular", "compact"]),
7165
- mediaBias: z17.enum(["text", "media", "mixed"]),
7166
- conversionBias: z17.enum(["low", "med", "high"]),
7167
- motion: z17.enum(["subtle", "standard", "expressive"])
7647
+ var axesSchema = z22.object({
7648
+ tone: z22.enum(["minimal", "classic", "bold"]),
7649
+ energy: z22.enum(["calm", "vibrant"]),
7650
+ density: z22.enum(["airy", "regular", "compact"]),
7651
+ mediaBias: z22.enum(["text", "media", "mixed"]),
7652
+ conversionBias: z22.enum(["low", "med", "high"]),
7653
+ motion: z22.enum(["subtle", "standard", "expressive"])
7168
7654
  });
7169
- var colourHexString = z17.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
7170
- var paletteColorSchema = z17.object({
7171
- name: z17.string().min(1),
7655
+ var colourHexString = z22.string().regex(/^#([0-9A-Fa-f]{3}){1,2}$/);
7656
+ var paletteColorSchema = z22.object({
7657
+ name: z22.string().min(1),
7172
7658
  hex: colourHexString
7173
7659
  });
7174
- var paletteMetaSchema = z17.object({
7175
- mode: z17.enum(["light", "dark"])
7660
+ var paletteMetaSchema = z22.object({
7661
+ mode: z22.enum(["light", "dark"])
7176
7662
  });
7177
- var paletteSchema = z17.object({
7178
- colors: z17.array(paletteColorSchema),
7663
+ var paletteSchema = z22.object({
7664
+ colors: z22.array(paletteColorSchema),
7179
7665
  meta: paletteMetaSchema
7180
7666
  });
7181
- var typographyStyleSchema = z17.object({
7182
- family: z17.string().min(1),
7183
- weight: z17.enum(["light", "regular", "medium", "semibold", "bold"]),
7184
- letterSpacing: z17.enum(["tight", "normal", "loose"]),
7185
- lineHeight: z17.enum(["normal", "relaxed", "loose"])
7667
+ var typographyStyleSchema = z22.object({
7668
+ family: z22.string().min(1),
7669
+ weight: z22.enum(["light", "regular", "medium", "semibold", "bold"]),
7670
+ letterSpacing: z22.enum(["tight", "normal", "loose"]),
7671
+ lineHeight: z22.enum(["normal", "relaxed", "loose"])
7186
7672
  });
7187
7673
  var bodyTypographyStyleSchema = typographyStyleSchema.extend({
7188
- size: z17.enum(["md", "lg", "xl"])
7674
+ size: z22.enum(["md", "lg", "xl"])
7189
7675
  });
7190
- var headingSizeSchema = z17.enum(["xs", "sm", "md", "lg", "xl", "2xl"]);
7191
- var headingTypographyOverridesSchema = z17.object({
7192
- weight: z17.enum(["light", "regular", "medium", "semibold", "bold"]).nullable().optional(),
7193
- letterSpacing: z17.enum(["tight", "normal", "loose"]).nullable().optional(),
7676
+ var headingSizeSchema = z22.enum(["xs", "sm", "md", "lg", "xl", "2xl"]);
7677
+ var headingTypographyOverridesSchema = z22.object({
7678
+ weight: z22.enum(["light", "regular", "medium", "semibold", "bold"]).nullable().optional(),
7679
+ letterSpacing: z22.enum(["tight", "normal", "loose"]).nullable().optional(),
7194
7680
  size: headingSizeSchema.nullable().optional(),
7195
- lineHeight: z17.enum(["normal", "relaxed", "loose"]).nullable().optional(),
7196
- italic: z17.boolean().nullable().optional(),
7681
+ lineHeight: z22.enum(["normal", "relaxed", "loose"]).nullable().optional(),
7682
+ italic: z22.boolean().nullable().optional(),
7197
7683
  colorToken: themeColorTokenSchema.nullable().optional()
7198
7684
  });
7199
7685
  var headingTypographyStyleSchema = typographyStyleSchema.extend({
7200
- case: z17.enum(["uppercase", "normal", "smallCaps"]).nullable(),
7201
- italic: z17.boolean().nullable(),
7686
+ case: z22.enum(["uppercase", "normal", "smallCaps"]).nullable(),
7687
+ italic: z22.boolean().nullable(),
7202
7688
  colorToken: themeColorTokenSchema.nullable().optional()
7203
7689
  });
7204
- var proseLinkUnderlineStyleSchema = z17.enum(["solid", "dotted", "dashed"]);
7205
- var proseLinkUnderlineThicknessSchema = z17.enum([
7690
+ var proseLinkUnderlineStyleSchema = z22.enum(["solid", "dotted", "dashed"]);
7691
+ var proseLinkUnderlineThicknessSchema = z22.enum([
7206
7692
  "auto",
7207
7693
  "fromFont",
7208
7694
  "thin",
7209
7695
  "medium",
7210
7696
  "thick"
7211
7697
  ]);
7212
- var proseLinkUnderlineOffsetSchema = z17.enum([
7698
+ var proseLinkUnderlineOffsetSchema = z22.enum([
7213
7699
  "auto",
7214
7700
  "tight",
7215
7701
  "normal",
7216
7702
  "loose"
7217
7703
  ]);
7218
- var proseLinkStyleSchema = z17.object({
7704
+ var proseLinkStyleSchema = z22.object({
7219
7705
  colorToken: themeColorTokenSchema.optional(),
7220
7706
  hoverColorToken: themeColorTokenSchema.optional(),
7221
- underline: z17.boolean().optional(),
7707
+ underline: z22.boolean().optional(),
7222
7708
  decorationColorToken: themeColorTokenSchema.optional(),
7223
7709
  hoverDecorationColorToken: themeColorTokenSchema.optional(),
7224
7710
  underlineStyle: proseLinkUnderlineStyleSchema.optional(),
7225
7711
  underlineThickness: proseLinkUnderlineThicknessSchema.optional(),
7226
7712
  underlineOffset: proseLinkUnderlineOffsetSchema.optional()
7227
7713
  });
7228
- var semanticSpacingSchema = z17.enum([
7714
+ var semanticSpacingSchema = z22.enum([
7229
7715
  "none",
7230
7716
  "compact",
7231
7717
  "cozy",
@@ -7233,61 +7719,61 @@ var semanticSpacingSchema = z17.enum([
7233
7719
  "comfortable",
7234
7720
  "spacious"
7235
7721
  ]);
7236
- var boxRoundedSchema = z17.enum(["none", "sm", "md", "lg", "xl", "2xl", "full"]);
7237
- var boxBackgroundOverlaySchema = z17.object({
7238
- type: z17.enum(["none", "color", "gradient"]).nullable().optional(),
7722
+ var boxRoundedSchema = z22.enum(["none", "sm", "md", "lg", "xl", "2xl", "full"]);
7723
+ var boxBackgroundOverlaySchema = z22.object({
7724
+ type: z22.enum(["none", "color", "gradient"]).nullable().optional(),
7239
7725
  color: tokenOrCssColorValueSchema.nullable().optional(),
7240
- gradient: z17.string().nullable().optional(),
7241
- opacity: z17.number().min(0).max(1).nullable().optional()
7726
+ gradient: z22.string().nullable().optional(),
7727
+ opacity: z22.number().min(0).max(1).nullable().optional()
7242
7728
  });
7243
- var boxBackgroundSchema = z17.object({
7244
- type: z17.enum(["color", "gradient", "image"]).optional(),
7245
- contentOwner: z17.literal(pageDesignEditorBackgroundOverrideOwner).optional(),
7729
+ var boxBackgroundSchema = z22.object({
7730
+ type: z22.enum(["color", "gradient", "image"]).optional(),
7731
+ contentOwner: z22.literal(pageDesignEditorBackgroundOverrideOwner).optional(),
7246
7732
  color: tokenOrCssColorValueSchema.nullable().optional(),
7247
- gradient: z17.string().nullable().optional(),
7248
- gradientPresetId: z17.string().min(1).nullable().optional(),
7249
- image: mediaSchema.nullable().optional(),
7250
- objectFit: z17.enum(["fill", "fit", "original", "custom"]).nullable().optional(),
7251
- scale: z17.string().nullable().optional(),
7252
- position: z17.string().nullable().optional(),
7253
- opacity: z17.number().min(0).max(1).nullable().optional(),
7254
- motion: z17.enum(["static", "fixed-frame"]).nullable().optional(),
7733
+ gradient: z22.string().nullable().optional(),
7734
+ gradientPresetId: z22.string().min(1).nullable().optional(),
7735
+ image: mediaSchema2.nullable().optional(),
7736
+ objectFit: z22.enum(["fill", "fit", "original", "custom"]).nullable().optional(),
7737
+ scale: z22.string().nullable().optional(),
7738
+ position: z22.string().nullable().optional(),
7739
+ opacity: z22.number().min(0).max(1).nullable().optional(),
7740
+ motion: z22.enum(["static", "fixed-frame"]).nullable().optional(),
7255
7741
  overlay: boxBackgroundOverlaySchema.nullable().optional(),
7256
7742
  textColor: tokenOrCssColorValueSchema.nullable().optional(),
7257
7743
  headingColor: tokenOrCssColorValueSchema.nullable().optional(),
7258
7744
  linkColor: tokenOrCssColorValueSchema.nullable().optional(),
7259
7745
  supportingColor: tokenOrCssColorValueSchema.nullable().optional()
7260
7746
  });
7261
- var noHeadingDecorationSchema = z17.object({
7262
- family: z17.literal("none")
7747
+ var noHeadingDecorationSchema = z22.object({
7748
+ family: z22.literal("none")
7263
7749
  });
7264
- var visibleHeadingDecorationSchema = z17.object({
7265
- family: z17.enum(visibleHeadingDecorationFamilyValues),
7266
- colorToken: z17.enum(headingDecorationColorTokenValues).optional()
7750
+ var visibleHeadingDecorationSchema = z22.object({
7751
+ family: z22.enum(visibleHeadingDecorationFamilyValues),
7752
+ colorToken: z22.enum(headingDecorationColorTokenValues).optional()
7267
7753
  });
7268
- var headingDecorationSchema = z17.union([
7754
+ var headingDecorationSchema = z22.union([
7269
7755
  noHeadingDecorationSchema,
7270
7756
  visibleHeadingDecorationSchema
7271
7757
  ]);
7272
- var headingDecorationOverrideSchema = z17.union([
7273
- z17.enum(headingDecorationOverrideValues),
7758
+ var headingDecorationOverrideSchema = z22.union([
7759
+ z22.enum(headingDecorationOverrideValues),
7274
7760
  // Legacy authoring value from the earlier model. In the render-time model
7275
7761
  // "on" cannot force a fragment into a block, so it is equivalent to default.
7276
- z17.literal("on").transform(() => "site-default")
7762
+ z22.literal("on").transform(() => "site-default")
7277
7763
  ]);
7278
- var accordionIconTreatmentSchema = z17.object({
7279
- iconSet: z17.enum(accordionIconSetValues),
7280
- colorToken: z17.enum(accordionIconColorTokenValues),
7281
- openColorToken: z17.enum(accordionIconColorTokenValues).optional(),
7282
- motion: z17.enum(accordionIconMotionValues)
7764
+ var accordionIconTreatmentSchema = z22.object({
7765
+ iconSet: z22.enum(accordionIconSetValues),
7766
+ colorToken: z22.enum(accordionIconColorTokenValues),
7767
+ openColorToken: z22.enum(accordionIconColorTokenValues).optional(),
7768
+ motion: z22.enum(accordionIconMotionValues)
7283
7769
  });
7284
- var sectionStylesOverrideSchema = z17.object({
7770
+ var sectionStylesOverrideSchema = z22.object({
7285
7771
  background: boxBackgroundSchema.nullable().optional(),
7286
7772
  spacing: semanticSpacingSchema.nullable().optional(),
7287
- minHeight: z17.enum(["none", "banner", "hero", "immersive"]).nullable().optional(),
7288
- tileTreatment: z17.enum(tileTreatmentValues).nullable().optional(),
7289
- eventListTreatment: z17.enum(eventListTreatmentValues).nullable().optional(),
7290
- eyebrowTreatment: z17.enum(eyebrowTreatmentValues).nullable().optional(),
7773
+ minHeight: z22.enum(["none", "banner", "hero", "immersive"]).nullable().optional(),
7774
+ tileTreatment: z22.enum(tileTreatmentValues).nullable().optional(),
7775
+ eventListTreatment: z22.enum(eventListTreatmentValues).nullable().optional(),
7776
+ eyebrowTreatment: z22.enum(eyebrowTreatmentValues).nullable().optional(),
7291
7777
  headingDecoration: headingDecorationSchema.nullable().optional(),
7292
7778
  // Author-level opt-out consumed by render-time theme projection. Persisted
7293
7779
  // content may also carry legacy `headingDecoration` / `on` values; those are
@@ -7296,25 +7782,25 @@ var sectionStylesOverrideSchema = z17.object({
7296
7782
  headingDecorationOverride: headingDecorationOverrideSchema.nullable().optional(),
7297
7783
  accordionIconTreatment: accordionIconTreatmentSchema.nullable().optional()
7298
7784
  });
7299
- var containerStylesOverrideSchema = z17.object({
7785
+ var containerStylesOverrideSchema = z22.object({
7300
7786
  background: boxBackgroundSchema.nullable().optional(),
7301
7787
  spacing: semanticSpacingSchema.nullable().optional(),
7302
- raised: z17.boolean().nullable().optional(),
7788
+ raised: z22.boolean().nullable().optional(),
7303
7789
  rounded: boxRoundedSchema.nullable().optional(),
7304
- fullWidth: z17.boolean().nullable().optional()
7790
+ fullWidth: z22.boolean().nullable().optional()
7305
7791
  });
7306
- var cardBorderOverrideSchema = z17.object({
7307
- enabled: z17.boolean().nullable().optional(),
7308
- width: z17.enum(["none", "1", "2", "3"]).nullable().optional(),
7792
+ var cardBorderOverrideSchema = z22.object({
7793
+ enabled: z22.boolean().nullable().optional(),
7794
+ width: z22.enum(["none", "1", "2", "3"]).nullable().optional(),
7309
7795
  colorToken: themeColorTokenSchema.nullable().optional()
7310
7796
  });
7311
- var cardStylesOverrideSchema = z17.object({
7797
+ var cardStylesOverrideSchema = z22.object({
7312
7798
  background: boxBackgroundSchema.nullable().optional(),
7313
7799
  border: cardBorderOverrideSchema.nullable().optional(),
7314
7800
  spacing: semanticSpacingSchema.nullable().optional(),
7315
- raised: z17.boolean().nullable().optional(),
7801
+ raised: z22.boolean().nullable().optional(),
7316
7802
  rounded: boxRoundedSchema.nullable().optional(),
7317
- treatment: z17.enum([
7803
+ treatment: z22.enum([
7318
7804
  "accent-quote",
7319
7805
  "editorial-rule",
7320
7806
  "soft-panel",
@@ -7326,18 +7812,18 @@ var cardStylesOverrideSchema = z17.object({
7326
7812
  // 'none' is boxless. Driven by the block look via testimonialCardTreatment.
7327
7813
  cardVariant: boxStylesCardVariantSchema.nullable().optional()
7328
7814
  });
7329
- var blockStyleOverridesSchema = z17.object({
7815
+ var blockStyleOverridesSchema = z22.object({
7330
7816
  sectionStyles: sectionStylesOverrideSchema.nullable().optional(),
7331
7817
  containerStyles: containerStylesOverrideSchema.nullable().optional(),
7332
7818
  cardStyles: cardStylesOverrideSchema.nullable().optional()
7333
7819
  });
7334
- var blockThemeOverrideSchema = z17.object({
7335
- typography: z17.object({
7820
+ var blockThemeOverrideSchema = z22.object({
7821
+ typography: z22.object({
7336
7822
  proseLinkStyle: proseLinkStyleSchema.optional()
7337
7823
  }).optional(),
7338
7824
  styles: blockStyleOverridesSchema.optional()
7339
7825
  });
7340
- var typographyScaleSchema = z17.enum([
7826
+ var typographyScaleSchema = z22.enum([
7341
7827
  // New intuitive names
7342
7828
  "compact",
7343
7829
  // ratio 1.2 (was minorThird)
@@ -7350,9 +7836,9 @@ var typographyScaleSchema = z17.enum([
7350
7836
  "majorThird",
7351
7837
  "perfectFourth"
7352
7838
  ]);
7353
- var typographySchema = z17.object({
7839
+ var typographySchema = z22.object({
7354
7840
  body: bodyTypographyStyleSchema,
7355
- headings: z17.object({
7841
+ headings: z22.object({
7356
7842
  default: headingTypographyStyleSchema,
7357
7843
  h1: headingTypographyOverridesSchema,
7358
7844
  h2: headingTypographyOverridesSchema,
@@ -7365,41 +7851,41 @@ var typographySchema = z17.object({
7365
7851
  scale: typographyScaleSchema,
7366
7852
  proseLinkStyle: proseLinkStyleSchema.optional()
7367
7853
  });
7368
- var spaceSchema = z17.enum(["comfortable", "standard", "dense"]);
7369
- var corners = z17.enum(["square", "soft", "rounded", "pill"]);
7370
- var shadow = z17.object({
7371
- elevation: z17.enum(["none", "low", "medium", "high"]),
7372
- softness: z17.enum(["crisp", "soft", "hard"]).nullable(),
7373
- position: z17.enum(["bottom", "bottom-right"]).default("bottom")
7854
+ var spaceSchema = z22.enum(["comfortable", "standard", "dense"]);
7855
+ var corners = z22.enum(["square", "soft", "rounded", "pill"]);
7856
+ var shadow = z22.object({
7857
+ elevation: z22.enum(["none", "low", "medium", "high"]),
7858
+ softness: z22.enum(["crisp", "soft", "hard"]).nullable(),
7859
+ position: z22.enum(["bottom", "bottom-right"]).default("bottom")
7374
7860
  });
7375
- var border = z17.object({
7376
- width: z17.enum(["none", "hairline", "thin", "thick"]),
7377
- style: z17.enum(["solid", "dashed"])
7861
+ var border = z22.object({
7862
+ width: z22.enum(["none", "hairline", "thin", "thick"]),
7863
+ style: z22.enum(["solid", "dashed"])
7378
7864
  });
7379
- var motion = z17.object({
7380
- level: z17.enum(["off", "low", "medium", "high"]),
7381
- easing: z17.enum(["standard", "snappy", "gentle"]).nullable()
7865
+ var motion = z22.object({
7866
+ level: z22.enum(["off", "low", "medium", "high"]),
7867
+ easing: z22.enum(["standard", "snappy", "gentle"]).nullable()
7382
7868
  });
7383
- var buttonStyle = z17.object({
7869
+ var buttonStyle = z22.object({
7384
7870
  shape: corners
7385
7871
  // Used for --radius-control CSS variable
7386
7872
  });
7387
- var cardStyle = z17.object({
7388
- elevation: z17.enum(["none", "low", "medium", "high"]),
7389
- border: z17.enum(["none", "subtle", "defined"]),
7873
+ var cardStyle = z22.object({
7874
+ elevation: z22.enum(["none", "low", "medium", "high"]),
7875
+ border: z22.enum(["none", "subtle", "defined"]),
7390
7876
  shape: corners,
7391
- headerStyle: z17.enum(["plain", "accentBar", "subtleBg"]).nullable(),
7392
- mediaTreatment: z17.enum(["square", "rounded", "bleed"]).nullable()
7877
+ headerStyle: z22.enum(["plain", "accentBar", "subtleBg"]).nullable(),
7878
+ mediaTreatment: z22.enum(["square", "rounded", "bleed"]).nullable()
7393
7879
  });
7394
- var inputStyle = z17.object({
7880
+ var inputStyle = z22.object({
7395
7881
  shape: corners,
7396
- border: z17.enum(["subtle", "defined", "underline"]),
7397
- focus: z17.enum(["glow", "ring", "underline"]),
7398
- label: z17.enum(["inside", "above"])
7882
+ border: z22.enum(["subtle", "defined", "underline"]),
7883
+ focus: z22.enum(["glow", "ring", "underline"]),
7884
+ label: z22.enum(["inside", "above"])
7399
7885
  });
7400
- var headerVariant = z17.enum(["classic", "centered", "transparent", "floating"]);
7401
- var headerPositioning = z17.enum(["static", "sticky", "fixed"]);
7402
- var headerNavStyle = z17.enum([
7886
+ var headerVariant = z22.enum(["classic", "centered", "transparent", "floating"]);
7887
+ var headerPositioning = z22.enum(["static", "sticky", "fixed"]);
7888
+ var headerNavStyle = z22.enum([
7403
7889
  "minimal",
7404
7890
  "underline",
7405
7891
  "underline-grow",
@@ -7408,57 +7894,57 @@ var headerNavStyle = z17.enum([
7408
7894
  "frosted",
7409
7895
  "solid"
7410
7896
  ]);
7411
- var navFontWeight = z17.enum(["regular", "medium", "semibold", "bold"]);
7412
- var headerMaxWidth = z17.enum(["container", "full"]);
7413
- var headerContainerSchema = z17.object({
7414
- rounded: z17.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("xl"),
7415
- border: z17.boolean().default(true),
7416
- shadow: z17.boolean().default(true),
7417
- padding: z17.enum(["sm", "md", "lg"]).default("md"),
7418
- tint: z17.string().nullable().optional(),
7419
- opacity: z17.number().min(0).max(1).default(0.12)
7897
+ var navFontWeight = z22.enum(["regular", "medium", "semibold", "bold"]);
7898
+ var headerMaxWidth = z22.enum(["container", "full"]);
7899
+ var headerContainerSchema = z22.object({
7900
+ rounded: z22.enum(["none", "sm", "md", "lg", "xl", "2xl"]).default("xl"),
7901
+ border: z22.boolean().default(true),
7902
+ shadow: z22.boolean().default(true),
7903
+ padding: z22.enum(["sm", "md", "lg"]).default("md"),
7904
+ tint: z22.string().nullable().optional(),
7905
+ opacity: z22.number().min(0).max(1).default(0.12)
7420
7906
  }).optional();
7421
7907
  var headerBorderSchema = componentBorderSchema.extend({
7422
- position: z17.enum(["bottom", "top", "both", "none"]).default("bottom")
7908
+ position: z22.enum(["bottom", "top", "both", "none"]).default("bottom")
7423
7909
  }).optional();
7424
- var logoStyleSchema = z17.object({
7425
- fontFamily: z17.enum(["heading", "body"]).default("heading"),
7426
- letterSpacing: z17.enum(["normal", "wide", "wider", "widest"]).default("normal"),
7427
- gradient: z17.boolean().default(false),
7428
- brandDisplay: z17.enum(brandDisplayModeValues).optional(),
7429
- size: z17.enum(logoSizePolicyValues).optional(),
7430
- accommodation: z17.enum(logoAccommodationPatternValues).optional()
7910
+ var logoStyleSchema = z22.object({
7911
+ fontFamily: z22.enum(["heading", "body"]).default("heading"),
7912
+ letterSpacing: z22.enum(["normal", "wide", "wider", "widest"]).default("normal"),
7913
+ gradient: z22.boolean().default(false),
7914
+ brandDisplay: z22.enum(brandDisplayModeValues).optional(),
7915
+ size: z22.enum(logoSizePolicyValues).optional(),
7916
+ accommodation: z22.enum(logoAccommodationPatternValues).optional()
7431
7917
  }).optional();
7432
- var headerLogoTextSchema = z17.object({
7433
- mobileWrapLines: z17.union([z17.literal(1), z17.literal(2)]).optional(),
7434
- mobileMaxWidth: z17.enum(["xs", "sm", "md"]).optional(),
7435
- hideOnShrink: z17.boolean().optional()
7918
+ var headerLogoTextSchema = z22.object({
7919
+ mobileWrapLines: z22.union([z22.literal(1), z22.literal(2)]).optional(),
7920
+ mobileMaxWidth: z22.enum(["xs", "sm", "md"]).optional(),
7921
+ hideOnShrink: z22.boolean().optional()
7436
7922
  }).optional();
7437
- var navEffectsSchema = z17.object({
7438
- underlineGradient: z17.boolean().default(false),
7439
- glow: z17.boolean().default(false),
7440
- glowColor: z17.string().optional(),
7441
- neumorphic: z17.boolean().default(false)
7923
+ var navEffectsSchema = z22.object({
7924
+ underlineGradient: z22.boolean().default(false),
7925
+ glow: z22.boolean().default(false),
7926
+ glowColor: z22.string().optional(),
7927
+ neumorphic: z22.boolean().default(false)
7442
7928
  }).optional();
7443
- var dropdownStyleSchema = z17.object({
7929
+ var dropdownStyleSchema = z22.object({
7444
7930
  // Container styling
7445
7931
  background: themeColorTokenSchema.default("surface"),
7446
7932
  textColor: themeColorTokenSchema.default("text"),
7447
7933
  borderColor: themeColorTokenSchema.nullable().default("border"),
7448
- shadow: z17.enum(["none", "sm", "md", "lg"]).default("md"),
7449
- borderRadius: z17.enum(["none", "sm", "md", "lg"]).default("md"),
7934
+ shadow: z22.enum(["none", "sm", "md", "lg"]).default("md"),
7935
+ borderRadius: z22.enum(["none", "sm", "md", "lg"]).default("md"),
7450
7936
  // Link hover states (explicit control)
7451
7937
  hoverBackground: themeColorTokenSchema.nullable().optional(),
7452
7938
  hoverTextColor: themeColorTokenSchema.nullable().optional(),
7453
7939
  // Typography
7454
- textTransform: z17.enum(["none", "uppercase", "capitalize"]).default("none"),
7455
- letterSpacing: z17.enum(["normal", "wide", "wider"]).default("normal"),
7456
- fontWeight: z17.enum(["regular", "medium", "semibold", "bold"]).optional(),
7940
+ textTransform: z22.enum(["none", "uppercase", "capitalize"]).default("none"),
7941
+ letterSpacing: z22.enum(["normal", "wide", "wider"]).default("normal"),
7942
+ fontWeight: z22.enum(["regular", "medium", "semibold", "bold"]).optional(),
7457
7943
  // optional = inherit from navWeight
7458
- textSize: z17.enum(["xs", "sm", "base", "lg"]).optional()
7944
+ textSize: z22.enum(["xs", "sm", "base", "lg"]).optional()
7459
7945
  // optional = no override (browser default)
7460
7946
  }).optional();
7461
- var headerCtaGapSchema = z17.enum([
7947
+ var headerCtaGapSchema = z22.enum([
7462
7948
  "none",
7463
7949
  "tight",
7464
7950
  "compact",
@@ -7466,7 +7952,7 @@ var headerCtaGapSchema = z17.enum([
7466
7952
  "relaxed",
7467
7953
  "spacious"
7468
7954
  ]);
7469
- var headerCtaTreatmentSchema = z17.enum([
7955
+ var headerCtaTreatmentSchema = z22.enum([
7470
7956
  "default",
7471
7957
  "primary",
7472
7958
  "secondary",
@@ -7474,25 +7960,25 @@ var headerCtaTreatmentSchema = z17.enum([
7474
7960
  "outline",
7475
7961
  "ghost"
7476
7962
  ]);
7477
- var navContainerSchema = z17.object({
7478
- type: z17.enum(["none", "pill", "glass"]).default("none"),
7479
- tint: z17.string().nullable().optional(),
7480
- opacity: z17.number().min(0).max(1).default(0.15)
7963
+ var navContainerSchema = z22.object({
7964
+ type: z22.enum(["none", "pill", "glass"]).default("none"),
7965
+ tint: z22.string().nullable().optional(),
7966
+ opacity: z22.number().min(0).max(1).default(0.15)
7481
7967
  }).default({ type: "none", tint: null, opacity: 0.15 });
7482
- var headerBackgroundSchema = z17.object({
7483
- type: z17.enum(["color", "gradient", "image"]),
7484
- contentOwner: z17.literal(siteChromeBackgroundOverrideOwner).optional(),
7968
+ var headerBackgroundSchema = z22.object({
7969
+ type: z22.enum(["color", "gradient", "image"]),
7970
+ contentOwner: z22.literal(siteChromeBackgroundOverrideOwner).optional(),
7485
7971
  color: tokenOrCssColorValueSchema.nullable().optional(),
7486
7972
  gradient: gradientConfigSchema.nullable().optional(),
7487
- image: mediaSchema.nullable().optional(),
7973
+ image: mediaSchema2.nullable().optional(),
7488
7974
  textColor: tokenOrCssColorValueSchema.nullable().optional()
7489
7975
  });
7490
- var headerSchema = z17.object({
7976
+ var headerSchema = z22.object({
7491
7977
  variant: headerVariant,
7492
7978
  positioning: headerPositioning,
7493
- shrinkOnScroll: z17.boolean(),
7979
+ shrinkOnScroll: z22.boolean(),
7494
7980
  maxWidth: headerMaxWidth,
7495
- logoOverride: mediaSchema.nullable().optional(),
7981
+ logoOverride: mediaSchema2.nullable().optional(),
7496
7982
  background: headerBackgroundSchema.default({
7497
7983
  type: "color",
7498
7984
  color: "surface"
@@ -7520,16 +8006,16 @@ var headerSchema = z17.object({
7520
8006
  // Optional theme-level CTA variant for header/nav CTA buttons.
7521
8007
  // Internal runtime bridge for the block renderer; prefer ctaTreatment in
7522
8008
  // authored Theme V2 concepts.
7523
- ctaVariant: z17.string().min(1).optional(),
8009
+ ctaVariant: z22.string().min(1).optional(),
7524
8010
  // Dropdown menu styling (nav dropdowns and mobile drawer)
7525
8011
  dropdownStyle: dropdownStyleSchema
7526
8012
  });
7527
- var footerVariant = z17.enum(["simple", "columns", "split"]);
7528
- var footerMaxWidth = z17.enum(["container", "full"]);
7529
- var footerMode = z17.enum(["default", "blocks", "default+blocks", "none"]);
7530
- var footerNavLayoutMode = z17.enum(["stack", "inline", "inline-wrap"]);
7531
- var footerNavLayoutAlign = z17.enum(["start", "center", "end", "space-between"]);
7532
- var footerSpacing = z17.enum([
8013
+ var footerVariant = z22.enum(["simple", "columns", "split"]);
8014
+ var footerMaxWidth = z22.enum(["container", "full"]);
8015
+ var footerMode = z22.enum(["default", "blocks", "default+blocks", "none"]);
8016
+ var footerNavLayoutMode = z22.enum(["stack", "inline", "inline-wrap"]);
8017
+ var footerNavLayoutAlign = z22.enum(["start", "center", "end", "space-between"]);
8018
+ var footerSpacing = z22.enum([
7533
8019
  "none",
7534
8020
  "tight",
7535
8021
  "compact",
@@ -7537,44 +8023,44 @@ var footerSpacing = z17.enum([
7537
8023
  "relaxed",
7538
8024
  "spacious"
7539
8025
  ]);
7540
- var footerLogoPlacement = z17.enum(["left", "right", "above", "below"]);
7541
- var footerLogoSize = z17.enum(["sm", "md", "lg", "xl"]);
7542
- var footerLogoMaxHeight = z17.enum(["sm", "md", "lg", "xl"]);
7543
- var footerBottomTextLinkStyleSchema = z17.object({
8026
+ var footerLogoPlacement = z22.enum(["left", "right", "above", "below"]);
8027
+ var footerLogoSize = z22.enum(["sm", "md", "lg", "xl"]);
8028
+ var footerLogoMaxHeight = z22.enum(["sm", "md", "lg", "xl"]);
8029
+ var footerBottomTextLinkStyleSchema = z22.object({
7544
8030
  colorToken: themeColorTokenSchema.optional(),
7545
8031
  hoverColorToken: themeColorTokenSchema.nullable().optional(),
7546
8032
  decorationColorToken: themeColorTokenSchema.nullable().optional(),
7547
- underline: z17.boolean().optional()
8033
+ underline: z22.boolean().optional()
7548
8034
  });
7549
- var footerBottomBarSchema = z17.object({
7550
- enabled: z17.boolean().optional(),
7551
- fullBleed: z17.boolean().optional(),
8035
+ var footerBottomBarSchema = z22.object({
8036
+ enabled: z22.boolean().optional(),
8037
+ fullBleed: z22.boolean().optional(),
7552
8038
  background: headerBackgroundSchema.optional(),
7553
8039
  textColor: themeColorTokenSchema.nullable().optional(),
7554
- textAlign: z17.enum(["left", "center", "right"]).optional(),
8040
+ textAlign: z22.enum(["left", "center", "right"]).optional(),
7555
8041
  paddingY: footerSpacing.optional(),
7556
8042
  paddingX: footerSpacing.optional(),
7557
- borderTop: z17.object({
8043
+ borderTop: z22.object({
7558
8044
  colorToken: themeColorTokenSchema.nullable().optional(),
7559
- width: z17.enum(["none", "thin", "medium", "thick"]).optional()
8045
+ width: z22.enum(["none", "thin", "medium", "thick"]).optional()
7560
8046
  }).optional()
7561
8047
  });
7562
- var footerNavLayoutSchema = z17.object({
8048
+ var footerNavLayoutSchema = z22.object({
7563
8049
  layout: footerNavLayoutMode.optional(),
7564
8050
  align: footerNavLayoutAlign.optional(),
7565
8051
  gapX: footerSpacing.optional(),
7566
8052
  gapY: footerSpacing.optional(),
7567
- columns: z17.number().int().min(1).max(6).optional()
8053
+ columns: z22.number().int().min(1).max(6).optional()
7568
8054
  });
7569
- var footerLogoSchema = z17.object({
7570
- showLogo: z17.boolean().default(true),
7571
- showLogoText: z17.boolean().optional(),
8055
+ var footerLogoSchema = z22.object({
8056
+ showLogo: z22.boolean().default(true),
8057
+ showLogoText: z22.boolean().optional(),
7572
8058
  placement: footerLogoPlacement.optional(),
7573
8059
  size: footerLogoSize.optional(),
7574
8060
  maxHeight: footerLogoMaxHeight.optional(),
7575
- align: z17.enum(["start", "center", "end"]).optional()
8061
+ align: z22.enum(["start", "center", "end"]).optional()
7576
8062
  });
7577
- var footerSchema = z17.object({
8063
+ var footerSchema = z22.object({
7578
8064
  /**
7579
8065
  * SDK-only footer rendering mode.
7580
8066
  *
@@ -7583,7 +8069,7 @@ var footerSchema = z17.object({
7583
8069
  mode: footerMode.optional(),
7584
8070
  variant: footerVariant,
7585
8071
  maxWidth: footerMaxWidth,
7586
- showLogoText: z17.boolean().optional(),
8072
+ showLogoText: z22.boolean().optional(),
7587
8073
  background: headerBackgroundSchema.default({
7588
8074
  type: "color",
7589
8075
  color: "surface"
@@ -7601,20 +8087,20 @@ var footerSchema = z17.object({
7601
8087
  logo: footerLogoSchema.optional(),
7602
8088
  bottomBar: footerBottomBarSchema.optional()
7603
8089
  });
7604
- var containerPaddingPresetSchema = z17.enum([
8090
+ var containerPaddingPresetSchema = z22.enum([
7605
8091
  "tight",
7606
8092
  "compact",
7607
8093
  "default",
7608
8094
  "relaxed"
7609
8095
  ]);
7610
- var layoutSchema = z17.object({
7611
- containerPadding: z17.object({
8096
+ var layoutSchema = z22.object({
8097
+ containerPadding: z22.object({
7612
8098
  mobile: containerPaddingPresetSchema.optional(),
7613
8099
  tablet: containerPaddingPresetSchema.optional(),
7614
8100
  desktop: containerPaddingPresetSchema.optional()
7615
8101
  }).optional()
7616
8102
  }).optional();
7617
- var heroTypographySizeSchema = z17.enum([
8103
+ var heroTypographySizeSchema = z22.enum([
7618
8104
  "sm",
7619
8105
  "base",
7620
8106
  "lg",
@@ -7626,19 +8112,19 @@ var heroTypographySizeSchema = z17.enum([
7626
8112
  "6xl",
7627
8113
  "editorial"
7628
8114
  ]);
7629
- var heroTypographyLineHeightSchema = z17.enum([
8115
+ var heroTypographyLineHeightSchema = z22.enum([
7630
8116
  "tight",
7631
8117
  "snug",
7632
8118
  "normal",
7633
8119
  "relaxed"
7634
8120
  ]);
7635
- var heroResponsiveTypographySchema = z17.object({
8121
+ var heroResponsiveTypographySchema = z22.object({
7636
8122
  headlineSize: heroTypographySizeSchema.optional(),
7637
8123
  headlineLineHeight: heroTypographyLineHeightSchema.optional(),
7638
8124
  subheadlineSize: heroTypographySizeSchema.optional(),
7639
8125
  subheadlineLineHeight: heroTypographyLineHeightSchema.optional()
7640
8126
  });
7641
- var heroTypographySchema = z17.object({
8127
+ var heroTypographySchema = z22.object({
7642
8128
  headlineSize: heroTypographySizeSchema.optional(),
7643
8129
  headlineLineHeight: heroTypographyLineHeightSchema.optional(),
7644
8130
  subheadlineSize: heroTypographySizeSchema.optional(),
@@ -7647,38 +8133,38 @@ var heroTypographySchema = z17.object({
7647
8133
  microHeadlineLineHeight: heroTypographyLineHeightSchema.optional(),
7648
8134
  microSubheadlineSize: heroTypographySizeSchema.optional(),
7649
8135
  microSubheadlineLineHeight: heroTypographyLineHeightSchema.optional(),
7650
- responsive: z17.object({
8136
+ responsive: z22.object({
7651
8137
  tablet: heroResponsiveTypographySchema.optional(),
7652
8138
  mobile: heroResponsiveTypographySchema.optional()
7653
8139
  }).optional()
7654
8140
  });
7655
- var heroSchema = z17.object({
8141
+ var heroSchema = z22.object({
7656
8142
  typography: heroTypographySchema.optional()
7657
8143
  }).optional();
7658
- var bodyTextIntroTypographySizeSchema = z17.enum(["default", "editorial"]);
7659
- var bodyTextSchema = z17.object({
7660
- intro: z17.object({
8144
+ var bodyTextIntroTypographySizeSchema = z22.enum(["default", "editorial"]);
8145
+ var bodyTextSchema = z22.object({
8146
+ intro: z22.object({
7661
8147
  paragraphSize: bodyTextIntroTypographySizeSchema.optional(),
7662
8148
  headingSize: bodyTextIntroTypographySizeSchema.optional()
7663
8149
  }).optional()
7664
8150
  }).optional();
7665
- var gradientsSchema = z17.object({
7666
- button: z17.string().min(1).nullable().optional(),
7667
- hero: z17.string().min(1).nullable().optional(),
7668
- background: z17.string().min(1).nullable().optional()
8151
+ var gradientsSchema = z22.object({
8152
+ button: z22.string().min(1).nullable().optional(),
8153
+ hero: z22.string().min(1).nullable().optional(),
8154
+ background: z22.string().min(1).nullable().optional()
7669
8155
  });
7670
- var testimonialQuoteTreatmentSchema = z17.object({
7671
- style: z17.enum(["serif-display", "accent-glyph", "none"]),
7672
- fontFamily: z17.enum(["heading", "body"]).optional(),
7673
- scale: z17.enum(["sm", "md", "lg", "xl"]).optional(),
8156
+ var testimonialQuoteTreatmentSchema = z22.object({
8157
+ style: z22.enum(["serif-display", "accent-glyph", "none"]),
8158
+ fontFamily: z22.enum(["heading", "body"]).optional(),
8159
+ scale: z22.enum(["sm", "md", "lg", "xl"]).optional(),
7674
8160
  colorToken: themeColorTokenSchema.optional(),
7675
- opacity: z17.number().min(0).max(1).optional()
8161
+ opacity: z22.number().min(0).max(1).optional()
7676
8162
  });
7677
- var themeSchema = z17.object({
7678
- name: z17.string().min(1).max(30),
7679
- description: z17.string().min(1).max(400),
7680
- rationale: z17.string().min(1).max(400),
7681
- siteStyleId: z17.string().min(1).transform((value) => asSiteStyleId(value)).optional(),
8163
+ var themeSchema = z22.object({
8164
+ name: z22.string().min(1).max(30),
8165
+ description: z22.string().min(1).max(400),
8166
+ rationale: z22.string().min(1).max(400),
8167
+ siteStyleId: z22.string().min(1).transform((value) => asSiteStyleId(value)).optional(),
7682
8168
  axes: axesSchema,
7683
8169
  palette: paletteSchema,
7684
8170
  typography: typographySchema,
@@ -7708,15 +8194,15 @@ var themeSchema = z17.object({
7708
8194
  // Block-specific customization (Tier 3)
7709
8195
  // blockCustomVars: Per-block CSS variable overrides as bare values
7710
8196
  // Example: { "event-registration": { "--step-color": "#6d28d9" } }
7711
- blockCustomVars: z17.record(
7712
- z17.string(),
8197
+ blockCustomVars: z22.record(
8198
+ z22.string(),
7713
8199
  // block kind (matches data-block attribute)
7714
- z17.record(z17.string(), z17.string())
8200
+ z22.record(z22.string(), z22.string())
7715
8201
  // { '--var-name': 'value' }
7716
8202
  ).optional(),
7717
8203
  // Structured block-kind theme overrides (v1: typography prose-link style only)
7718
8204
  // Keyed by block kind (usually data-block value like "hero"; "block.hero" also accepted)
7719
- blockOverrides: z17.record(z17.string(), blockThemeOverrideSchema).optional(),
8205
+ blockOverrides: z22.record(z22.string(), blockThemeOverrideSchema).optional(),
7720
8206
  // Site-wide heading decoration signature (family + colour). Set once per Look
7721
8207
  // and projected transiently onto eligible block headings at render time.
7722
8208
  // Alignment is inherited from the heading, so no placement is stored.
@@ -7754,11 +8240,11 @@ var themeSchema = z17.object({
7754
8240
  * }
7755
8241
  * ```
7756
8242
  */
7757
- styleGroups: z17.record(z17.string(), z17.array(z17.string())).optional()
8243
+ styleGroups: z22.record(z22.string(), z22.array(z22.string())).optional()
7758
8244
  });
7759
- var themesTurnSchema = z17.object({
7760
- message: z17.string().min(1),
7761
- themes: z17.array(themeSchema).length(3)
8245
+ var themesTurnSchema = z22.object({
8246
+ message: z22.string().min(1),
8247
+ themes: z22.array(themeSchema).length(3)
7762
8248
  });
7763
8249
 
7764
8250
  // ../theme-core/src/palette/variants/types.ts
@@ -7768,19 +8254,19 @@ function asPaletteVariantId(value) {
7768
8254
  }
7769
8255
  return value;
7770
8256
  }
7771
- var paletteVariantIdSchema = z18.string().min(1).transform((value) => asPaletteVariantId(value));
8257
+ var paletteVariantIdSchema = z23.string().min(1).transform((value) => asPaletteVariantId(value));
7772
8258
  var HEX_COLOR_REGEX = /^#[0-9a-f]{6}$/;
7773
- var hexColorSchema = z18.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
8259
+ var hexColorSchema = z23.string().regex(HEX_COLOR_REGEX, "Hex must be #RRGGBB (lowercase)").transform((value) => value);
7774
8260
  var variantPaletteColorSchema = paletteColorSchema.extend({
7775
8261
  name: paletteTokenNameSchema
7776
8262
  });
7777
- var paletteVariantSchema = z18.object({
8263
+ var paletteVariantSchema = z23.object({
7778
8264
  id: paletteVariantIdSchema,
7779
- name: z18.string().min(1),
7780
- description: z18.string().min(1),
8265
+ name: z23.string().min(1),
8266
+ description: z23.string().min(1),
7781
8267
  tags: styleTagsSchema,
7782
- mode: z18.enum(["light", "dark"]),
7783
- colors: z18.array(variantPaletteColorSchema).min(1)
8268
+ mode: z23.enum(["light", "dark"]),
8269
+ colors: z23.array(variantPaletteColorSchema).min(1)
7784
8270
  });
7785
8271
  function definePaletteVariant(input) {
7786
8272
  return {
@@ -7792,7 +8278,7 @@ function definePaletteVariant(input) {
7792
8278
  colors: input.colors
7793
8279
  };
7794
8280
  }
7795
- var paletteOverridesSchema = z18.object({
8281
+ var paletteOverridesSchema = z23.object({
7796
8282
  primary: hexColorSchema.optional(),
7797
8283
  primaryForeground: hexColorSchema.optional(),
7798
8284
  secondary: hexColorSchema.optional(),
@@ -10194,66 +10680,66 @@ var typographyPresetsById = new Map(
10194
10680
  );
10195
10681
 
10196
10682
  // ../theme-core/src/site-styles/designState.ts
10197
- import { z as z19 } from "zod";
10683
+ import { z as z24 } from "zod";
10198
10684
  var themeV2DesignStateSchemaVersion = 1;
10199
- var designResolutionPolicySchema = z19.enum(["generated", "user", "admin", "sdk"]);
10200
- var runtimeStyleFieldNameSchema = z19.enum(themeV2RuntimeStyleFieldNames);
10201
- var nonEmptyRuntimeStyleFieldNamesSchema = z19.array(runtimeStyleFieldNameSchema).min(1).transform((fields) => [
10685
+ var designResolutionPolicySchema = z24.enum(["generated", "user", "admin", "sdk"]);
10686
+ var runtimeStyleFieldNameSchema = z24.enum(themeV2RuntimeStyleFieldNames);
10687
+ var nonEmptyRuntimeStyleFieldNamesSchema = z24.array(runtimeStyleFieldNameSchema).min(1).transform((fields) => [
10202
10688
  fields[0],
10203
10689
  ...fields.slice(1)
10204
10690
  ]);
10205
- var heroLegibilityStrategySchema = z19.enum([
10691
+ var heroLegibilityStrategySchema = z24.enum([
10206
10692
  "none",
10207
10693
  "scrim-gradient",
10208
10694
  "solid-panel"
10209
10695
  ]);
10210
- var heroCompositionIntentSchema = z19.enum([
10696
+ var heroCompositionIntentSchema = z24.enum([
10211
10697
  "center",
10212
10698
  "bottom-left"
10213
10699
  ]);
10214
- var heroTypographyScaleIntentSchema = z19.enum([
10700
+ var heroTypographyScaleIntentSchema = z24.enum([
10215
10701
  "quiet",
10216
10702
  "editorial",
10217
10703
  "display",
10218
10704
  "poster"
10219
10705
  ]);
10220
- var sectionHeightIntentSchema = z19.enum([
10706
+ var sectionHeightIntentSchema = z24.enum([
10221
10707
  "default",
10222
10708
  "banner",
10223
10709
  "hero",
10224
10710
  "immersive"
10225
10711
  ]);
10226
- var imageSurfaceTreatmentIntensitySchema = z19.enum(["soft", "balanced", "strong"]);
10227
- var imageSurfaceMotionSchema = z19.enum(["static", "fixed-frame"]);
10228
- var imageSurfaceTreatmentSchema = z19.discriminatedUnion("kind", [
10229
- z19.object({ kind: z19.literal("none") }).strict(),
10230
- z19.object({
10231
- kind: z19.literal("brand-scrim"),
10232
- token: z19.enum(["primary", "secondary", "accent"]),
10712
+ var imageSurfaceTreatmentIntensitySchema = z24.enum(["soft", "balanced", "strong"]);
10713
+ var imageSurfaceMotionSchema = z24.enum(["static", "fixed-frame"]);
10714
+ var imageSurfaceTreatmentSchema = z24.discriminatedUnion("kind", [
10715
+ z24.object({ kind: z24.literal("none") }).strict(),
10716
+ z24.object({
10717
+ kind: z24.literal("brand-scrim"),
10718
+ token: z24.enum(["primary", "secondary", "accent"]),
10233
10719
  intensity: imageSurfaceTreatmentIntensitySchema.optional()
10234
10720
  }).strict(),
10235
- z19.object({
10236
- kind: z19.literal("brand-wash"),
10237
- token: z19.enum(["primary", "secondary", "accent"]),
10721
+ z24.object({
10722
+ kind: z24.literal("brand-wash"),
10723
+ token: z24.enum(["primary", "secondary", "accent"]),
10238
10724
  intensity: imageSurfaceTreatmentIntensitySchema.optional()
10239
10725
  }).strict(),
10240
- z19.object({
10241
- kind: z19.literal("neutral-scrim"),
10726
+ z24.object({
10727
+ kind: z24.literal("neutral-scrim"),
10242
10728
  intensity: imageSurfaceTreatmentIntensitySchema.optional()
10243
10729
  }).strict(),
10244
- z19.object({
10245
- kind: z19.literal("neutral-wash"),
10730
+ z24.object({
10731
+ kind: z24.literal("neutral-wash"),
10246
10732
  intensity: imageSurfaceTreatmentIntensitySchema.optional()
10247
10733
  }).strict(),
10248
- z19.object({
10249
- kind: z19.literal("solid-panel"),
10734
+ z24.object({
10735
+ kind: z24.literal("solid-panel"),
10250
10736
  intensity: imageSurfaceTreatmentIntensitySchema.optional()
10251
10737
  }).strict()
10252
10738
  ]);
10253
- var testimonialCardTreatmentSchema = z19.enum(["default", "accent-quote"]);
10254
- var tileTreatmentSchema = z19.enum(tileTreatmentValues);
10255
- var eventListTreatmentSchema = z19.enum(eventListTreatmentValues);
10256
- var eyebrowTreatmentSchema = z19.enum(eyebrowTreatmentValues);
10739
+ var testimonialCardTreatmentSchema = z24.enum(["default", "accent-quote"]);
10740
+ var tileTreatmentSchema = z24.enum(tileTreatmentValues);
10741
+ var eventListTreatmentSchema = z24.enum(eventListTreatmentValues);
10742
+ var eyebrowTreatmentSchema = z24.enum(eyebrowTreatmentValues);
10257
10743
  function uniqueNonEmpty(values) {
10258
10744
  const uniqueValues = [...new Set(values)];
10259
10745
  const firstValue = uniqueValues[0];
@@ -10271,27 +10757,27 @@ var userFlushTreatments = uniqueNonEmpty(
10271
10757
  var userFlushBleeds = uniqueNonEmpty(
10272
10758
  userDesignOptionCatalog.contentFrames.filter((frame) => frame.kind === "flush-panel").map((frame) => frame.bleed)
10273
10759
  );
10274
- var contentFrameIntentSchema = z19.discriminatedUnion("kind", [
10275
- z19.object({ kind: z19.literal("plain") }).strict(),
10276
- z19.object({
10277
- kind: z19.literal("panel"),
10278
- treatment: z19.enum(userPanelTreatments)
10760
+ var contentFrameIntentSchema = z24.discriminatedUnion("kind", [
10761
+ z24.object({ kind: z24.literal("plain") }).strict(),
10762
+ z24.object({
10763
+ kind: z24.literal("panel"),
10764
+ treatment: z24.enum(userPanelTreatments)
10279
10765
  }).strict(),
10280
- z19.object({
10281
- kind: z19.literal("flush-panel"),
10282
- treatment: z19.enum(userFlushTreatments),
10283
- bleed: z19.enum(userFlushBleeds)
10766
+ z24.object({
10767
+ kind: z24.literal("flush-panel"),
10768
+ treatment: z24.enum(userFlushTreatments),
10769
+ bleed: z24.enum(userFlushBleeds)
10284
10770
  }).strict()
10285
10771
  ]);
10286
- var blockDesignPlanSchema = z19.object({
10287
- blockId: z19.string().min(1).transform(asDesignBlockId),
10288
- blockKind: z19.string().min(1),
10289
- purpose: z19.string().min(1),
10290
- sectionSurface: z19.enum(userDesignOptionCatalog.sectionSurfaces),
10772
+ var blockDesignPlanSchema = z24.object({
10773
+ blockId: z24.string().min(1).transform(asDesignBlockId),
10774
+ blockKind: z24.string().min(1),
10775
+ purpose: z24.string().min(1),
10776
+ sectionSurface: z24.enum(userDesignOptionCatalog.sectionSurfaces),
10291
10777
  contentFrame: contentFrameIntentSchema,
10292
- itemSurface: z19.enum(userDesignOptionCatalog.itemSurfaces),
10293
- transitionAfter: z19.enum(userDesignOptionCatalog.transitions),
10294
- emphasis: z19.enum(userDesignOptionCatalog.emphases),
10778
+ itemSurface: z24.enum(userDesignOptionCatalog.itemSurfaces),
10779
+ transitionAfter: z24.enum(userDesignOptionCatalog.transitions),
10780
+ emphasis: z24.enum(userDesignOptionCatalog.emphases),
10295
10781
  sectionHeight: sectionHeightIntentSchema.optional(),
10296
10782
  heroLegibility: heroLegibilityStrategySchema.optional(),
10297
10783
  heroComposition: heroCompositionIntentSchema.optional(),
@@ -10303,39 +10789,39 @@ var blockDesignPlanSchema = z19.object({
10303
10789
  eventListTreatment: eventListTreatmentSchema.optional(),
10304
10790
  eyebrowTreatment: eyebrowTreatmentSchema.optional()
10305
10791
  }).strict();
10306
- var styleAuthoritySchema = z19.discriminatedUnion("kind", [
10307
- z19.object({
10308
- kind: z19.literal("theme-v2"),
10792
+ var styleAuthoritySchema = z24.discriminatedUnion("kind", [
10793
+ z24.object({
10794
+ kind: z24.literal("theme-v2"),
10309
10795
  source: designResolutionPolicySchema,
10310
- siteStyleId: z19.string().min(1).transform(asSiteStyleId),
10311
- templateId: z19.string().min(1).transform(asDesignSystemTemplateId),
10312
- templateVersion: z19.number().int().nonnegative(),
10313
- resolverVersion: z19.number().int().nonnegative()
10796
+ siteStyleId: z24.string().min(1).transform(asSiteStyleId),
10797
+ templateId: z24.string().min(1).transform(asDesignSystemTemplateId),
10798
+ templateVersion: z24.number().int().nonnegative(),
10799
+ resolverVersion: z24.number().int().nonnegative()
10314
10800
  }).strict(),
10315
- z19.object({
10316
- kind: z19.literal("legacy-raw"),
10317
- reason: z19.enum(["pre-theme-v2", "manual-runtime-fields"])
10801
+ z24.object({
10802
+ kind: z24.literal("legacy-raw"),
10803
+ reason: z24.enum(["pre-theme-v2", "manual-runtime-fields"])
10318
10804
  }).strict(),
10319
- z19.object({
10320
- kind: z19.literal("advanced-detached"),
10321
- reason: z19.literal("detached-custom-runtime-fields")
10805
+ z24.object({
10806
+ kind: z24.literal("advanced-detached"),
10807
+ reason: z24.literal("detached-custom-runtime-fields")
10322
10808
  }).strict()
10323
10809
  ]);
10324
- var blockRuntimeStyleAuthoritySchema = z19.object({
10325
- unit: z19.literal("block-runtime-fields"),
10326
- blockId: z19.string().min(1).transform(asDesignBlockId),
10810
+ var blockRuntimeStyleAuthoritySchema = z24.object({
10811
+ unit: z24.literal("block-runtime-fields"),
10812
+ blockId: z24.string().min(1).transform(asDesignBlockId),
10327
10813
  fields: nonEmptyRuntimeStyleFieldNamesSchema,
10328
10814
  authority: styleAuthoritySchema
10329
10815
  }).strict();
10330
- var persistedPageDesignStateV1Schema = z19.object({
10331
- schemaVersion: z19.literal(themeV2DesignStateSchemaVersion),
10332
- siteStyleId: z19.string().min(1).transform(asSiteStyleId),
10333
- templateId: z19.string().min(1).transform(asDesignSystemTemplateId),
10334
- templateVersion: z19.number().int().nonnegative(),
10335
- resolverVersion: z19.number().int().nonnegative(),
10336
- rhythmPresetId: z19.string().min(1),
10337
- blocks: z19.array(blockDesignPlanSchema),
10338
- styleAuthorities: z19.array(blockRuntimeStyleAuthoritySchema)
10816
+ var persistedPageDesignStateV1Schema = z24.object({
10817
+ schemaVersion: z24.literal(themeV2DesignStateSchemaVersion),
10818
+ siteStyleId: z24.string().min(1).transform(asSiteStyleId),
10819
+ templateId: z24.string().min(1).transform(asDesignSystemTemplateId),
10820
+ templateVersion: z24.number().int().nonnegative(),
10821
+ resolverVersion: z24.number().int().nonnegative(),
10822
+ rhythmPresetId: z24.string().min(1),
10823
+ blocks: z24.array(blockDesignPlanSchema),
10824
+ styleAuthorities: z24.array(blockRuntimeStyleAuthoritySchema)
10339
10825
  }).strict();
10340
10826
 
10341
10827
  // ../theme-core/src/site-styles/runtimeCompiler.ts
@@ -11844,7 +12330,7 @@ function findEventByOccurrenceId(events, occurrenceId) {
11844
12330
  function findPreSelectedEvent(input) {
11845
12331
  const occurrenceContext = input.occurrenceContext;
11846
12332
  if (!occurrenceContext) {
11847
- return null;
12333
+ return input.scopedEvents.length === 1 ? input.scopedEvents[0] ?? null : null;
11848
12334
  }
11849
12335
  const contextDate = getBookingLocalDateKey(toScheduledBookingDateTime({
11850
12336
  startsAt: occurrenceContext.startsAt,
@@ -11877,7 +12363,7 @@ function resolveEventRequiresPayment(input) {
11877
12363
  if (!input.event) {
11878
12364
  return false;
11879
12365
  }
11880
- return publicEventPricingType(resolveRuntimeEventPricing(input.event)) !== "free";
12366
+ return publicEventPricingType(resolveRuntimeEventPricing(input.event)) === "paid";
11881
12367
  }
11882
12368
  function resolveDiscountContext(input) {
11883
12369
  const selection = input.paymentSelection.method ? input.paymentSelection : null;
@@ -11950,11 +12436,10 @@ function FeedbackMessage({
11950
12436
  }
11951
12437
 
11952
12438
  // ../blocks/src/system/runtime/nodes/booking-form.client.tsx
11953
- import React3, { useRef as useRef7, useState as useState3 } from "react";
12439
+ import React3, { useRef as useRef8, useState as useState2 } from "react";
11954
12440
 
11955
12441
  // ../altcha/src/AltchaWidget.tsx
11956
- import { useEffect, useRef } from "react";
11957
- import { jsx as jsx4 } from "react/jsx-runtime";
12442
+ import { createElement, useEffect, useRef } from "react";
11958
12443
  function AltchaWidget({
11959
12444
  challengeUrl,
11960
12445
  onSolutionChange,
@@ -11998,7 +12483,7 @@ function AltchaWidget({
11998
12483
  }
11999
12484
  };
12000
12485
  }, [challengeUrl, auto, hidelogo, className, onSolutionChange]);
12001
- return /* @__PURE__ */ jsx4("div", { ref: containerRef });
12486
+ return createElement("div", { ref: containerRef });
12002
12487
  }
12003
12488
 
12004
12489
  // ../altcha/src/client.ts
@@ -12007,13 +12492,13 @@ function isSpamProtectionEnabled() {
12007
12492
  }
12008
12493
 
12009
12494
  // ../blocks/src/system/runtime/components/booking/SuccessMessage.tsx
12010
- import { Fragment, jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
12495
+ import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
12011
12496
  var SuccessMessage = ({
12012
12497
  message,
12013
12498
  resourceName,
12014
12499
  className
12015
12500
  }) => {
12016
- return /* @__PURE__ */ jsx5(
12501
+ return /* @__PURE__ */ jsx4(
12017
12502
  FeedbackMessage,
12018
12503
  {
12019
12504
  tone: "success",
@@ -12021,7 +12506,7 @@ var SuccessMessage = ({
12021
12506
  role: "alert",
12022
12507
  live: "polite",
12023
12508
  children: /* @__PURE__ */ jsxs3(Fragment, { children: [
12024
- /* @__PURE__ */ jsx5("p", { className: "ab-text", children: message }),
12509
+ /* @__PURE__ */ jsx4("p", { className: "ab-text", children: message }),
12025
12510
  resourceName ? /* @__PURE__ */ jsxs3("p", { className: "ab-text ab-text--muted", children: [
12026
12511
  "Practitioner: ",
12027
12512
  resourceName
@@ -12037,9 +12522,9 @@ import React2, {
12037
12522
  useEffect as useEffect6,
12038
12523
  useLayoutEffect,
12039
12524
  useMemo as useMemo2,
12040
- useReducer as useReducer4,
12041
- useRef as useRef5,
12042
- useState as useState2
12525
+ useReducer as useReducer5,
12526
+ useRef as useRef6,
12527
+ useState
12043
12528
  } from "react";
12044
12529
 
12045
12530
  // ../../node_modules/.pnpm/altcha-lib@1.4.1/node_modules/altcha-lib/dist/helpers.js
@@ -12240,7 +12725,7 @@ function availableDatesReducer(state, action) {
12240
12725
  case "load-failed":
12241
12726
  return { tag: "error", data: state.data, message: action.message };
12242
12727
  default:
12243
- return assertNever11(action);
12728
+ return assertNever4(action);
12244
12729
  }
12245
12730
  }
12246
12731
 
@@ -12364,7 +12849,7 @@ function getAvailableSlots(state) {
12364
12849
  case "error":
12365
12850
  return state.slots;
12366
12851
  default:
12367
- return assertNever11(state);
12852
+ return assertNever4(state);
12368
12853
  }
12369
12854
  }
12370
12855
  function hasLoadedAvailableSlots(state) {
@@ -12378,7 +12863,7 @@ function hasLoadedAvailableSlots(state) {
12378
12863
  case "loaded":
12379
12864
  return true;
12380
12865
  default:
12381
- return assertNever11(state);
12866
+ return assertNever4(state);
12382
12867
  }
12383
12868
  }
12384
12869
  function isLoadingAvailableSlots(state) {
@@ -12412,7 +12897,7 @@ function availableSlotsReducer(state, action) {
12412
12897
  message: action.message
12413
12898
  };
12414
12899
  default:
12415
- return assertNever11(action);
12900
+ return assertNever4(action);
12416
12901
  }
12417
12902
  }
12418
12903
 
@@ -12521,7 +13006,7 @@ function bookingSubmissionReducer(state, action) {
12521
13006
  case "feedback-cleared":
12522
13007
  return clearWorkflowFeedback(state);
12523
13008
  default:
12524
- return assertNever11(action);
13009
+ return assertNever4(action);
12525
13010
  }
12526
13011
  }
12527
13012
  function selectIsSubmitting(state) {
@@ -12565,7 +13050,7 @@ function useBookingSubmission(_siteId) {
12565
13050
  type: "submission-succeeded",
12566
13051
  message: response.type === "checkout_redirect" ? "Redirecting to secure checkout..." : "Booking submitted successfully."
12567
13052
  });
12568
- return okWith2(response);
13053
+ return okWith(response);
12569
13054
  } catch (error) {
12570
13055
  console.error("Booking submission error:", error);
12571
13056
  const message = error instanceof Error ? error.message : "Failed to book appointment";
@@ -12586,65 +13071,157 @@ function useBookingSubmission(_siteId) {
12586
13071
  }
12587
13072
 
12588
13073
  // ../blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.ts
12589
- import { useEffect as useEffect5, useState } from "react";
13074
+ import { useEffect as useEffect5, useReducer as useReducer4, useRef as useRef5 } from "react";
13075
+
13076
+ // ../blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.state.ts
13077
+ var initialDiscountCodeUiState = {
13078
+ discountUiOpen: false,
13079
+ discountCode: "",
13080
+ availability: { tag: "disabled" }
13081
+ };
13082
+ function getDiscountContextKey(context) {
13083
+ if (!context) return "disabled";
13084
+ switch (context.type) {
13085
+ case "event":
13086
+ return [
13087
+ context.type,
13088
+ context.eventSeriesId,
13089
+ context.eventCategoryId ?? "",
13090
+ context.ticketsCount ?? ""
13091
+ ].join(":");
13092
+ case "appointment":
13093
+ return [context.type, context.serviceId].join(":");
13094
+ case "course":
13095
+ return [context.type, context.courseId].join(":");
13096
+ case "pass":
13097
+ return [context.type, context.passId].join(":");
13098
+ case "membership":
13099
+ return [context.type, context.membershipId].join(":");
13100
+ case "product":
13101
+ return [context.type, context.productId, context.productCategoryId ?? ""].join(":");
13102
+ }
13103
+ }
13104
+ function buildDiscountAvailabilityRequestPlan(options) {
13105
+ if (!options.discountContext) {
13106
+ return { ok: false, key: "disabled" };
13107
+ }
13108
+ const subtotalCents = options.subtotalCents;
13109
+ const key = [
13110
+ getDiscountContextKey(options.discountContext),
13111
+ subtotalCents ?? ""
13112
+ ].join("|");
13113
+ return {
13114
+ ok: true,
13115
+ key,
13116
+ request: {
13117
+ context: options.discountContext,
13118
+ ...subtotalCents !== void 0 ? { subtotalCents } : {}
13119
+ }
13120
+ };
13121
+ }
13122
+ function discountAvailabilityStateFromResponse(response) {
13123
+ if (!discountAvailabilityHasDiscounts(response)) {
13124
+ return { tag: "unavailable" };
13125
+ }
13126
+ return {
13127
+ tag: "available",
13128
+ manualCodeEntryAllowed: discountAvailabilityAllowsManualEntry(response),
13129
+ autoAppliedDiscount: getAutoAppliedDiscountPreview(response)
13130
+ };
13131
+ }
13132
+ function discountCodeUiReducer(state, event) {
13133
+ switch (event.type) {
13134
+ case "availability-disabled":
13135
+ return initialDiscountCodeUiState;
13136
+ case "availability-loading":
13137
+ return {
13138
+ ...state,
13139
+ availability: { tag: "loading" }
13140
+ };
13141
+ case "availability-loaded": {
13142
+ const availability = discountAvailabilityStateFromResponse(event.response);
13143
+ if (availability.tag !== "available" || !availability.manualCodeEntryAllowed) {
13144
+ return {
13145
+ ...state,
13146
+ discountUiOpen: false,
13147
+ discountCode: "",
13148
+ availability
13149
+ };
13150
+ }
13151
+ return {
13152
+ ...state,
13153
+ availability
13154
+ };
13155
+ }
13156
+ case "availability-failed":
13157
+ return {
13158
+ ...state,
13159
+ discountUiOpen: false,
13160
+ discountCode: "",
13161
+ availability: { tag: "error" }
13162
+ };
13163
+ case "discount-code-changed":
13164
+ return {
13165
+ ...state,
13166
+ discountCode: event.code
13167
+ };
13168
+ case "discount-ui-open-changed":
13169
+ return {
13170
+ ...state,
13171
+ discountUiOpen: event.isOpen
13172
+ };
13173
+ }
13174
+ }
13175
+
13176
+ // ../blocks/src/system/runtime/nodes/event-registration/useDiscountCodeUi.ts
13177
+ function useStableDiscountAvailabilityRequestPlan(options) {
13178
+ const nextPlan = buildDiscountAvailabilityRequestPlan(options);
13179
+ const planRef = useRef5(nextPlan);
13180
+ if (planRef.current.key !== nextPlan.key) {
13181
+ planRef.current = nextPlan;
13182
+ }
13183
+ return planRef.current;
13184
+ }
12590
13185
  function useDiscountCodeUi(options) {
12591
- const [discountUiOpen, setDiscountUiOpen] = useState(false);
12592
- const [discountCode, setDiscountCode] = useState("");
12593
- const [discountsAvailable, setDiscountsAvailable] = useState(false);
12594
- const [manualCodeEntryAllowed, setManualCodeEntryAllowed] = useState(false);
12595
- const [autoAppliedDiscount, setAutoAppliedDiscount] = useState(null);
12596
- const [discountsAvailableLoading, setDiscountsAvailableLoading] = useState(false);
13186
+ const [state, dispatch] = useReducer4(
13187
+ discountCodeUiReducer,
13188
+ initialDiscountCodeUiState
13189
+ );
13190
+ const requestPlan = useStableDiscountAvailabilityRequestPlan(options);
12597
13191
  useEffect5(() => {
12598
13192
  let cancelled = false;
12599
13193
  async function checkDiscountAvailability() {
12600
- if (!options.discountContext) {
12601
- setDiscountsAvailable(false);
12602
- setManualCodeEntryAllowed(false);
12603
- setAutoAppliedDiscount(null);
12604
- setDiscountsAvailableLoading(false);
12605
- setDiscountUiOpen(false);
12606
- setDiscountCode("");
13194
+ if (!requestPlan.ok) {
13195
+ dispatch({ type: "availability-disabled" });
12607
13196
  return;
12608
13197
  }
12609
- setDiscountsAvailableLoading(true);
13198
+ dispatch({ type: "availability-loading" });
12610
13199
  try {
12611
- const res = await options.api.getDiscountsAvailable({
12612
- context: options.discountContext,
12613
- subtotalCents: options.subtotalCents
12614
- });
13200
+ const res = await options.api.getDiscountsAvailable(requestPlan.request);
12615
13201
  if (cancelled) return;
12616
- setDiscountsAvailable(res.hasDiscounts);
12617
- setManualCodeEntryAllowed(res.manualCodeEntryAllowed);
12618
- setAutoAppliedDiscount(res.autoAppliedDiscount);
12619
- if (!res.hasDiscounts || !res.manualCodeEntryAllowed) {
12620
- setDiscountUiOpen(false);
12621
- setDiscountCode("");
12622
- }
13202
+ dispatch({ type: "availability-loaded", response: res });
12623
13203
  } catch {
12624
13204
  if (cancelled) return;
12625
- setDiscountsAvailable(false);
12626
- setManualCodeEntryAllowed(false);
12627
- setAutoAppliedDiscount(null);
12628
- setDiscountUiOpen(false);
12629
- setDiscountCode("");
12630
- } finally {
12631
- if (!cancelled) setDiscountsAvailableLoading(false);
13205
+ dispatch({ type: "availability-failed" });
12632
13206
  }
12633
13207
  }
12634
13208
  void checkDiscountAvailability();
12635
13209
  return () => {
12636
13210
  cancelled = true;
12637
13211
  };
12638
- }, [options.api, options.discountContext, options.subtotalCents]);
13212
+ }, [options.api, requestPlan]);
13213
+ const availability = state.availability;
13214
+ const isAvailable = availability.tag === "available";
13215
+ const manualCodeEntryAllowed = isAvailable ? availability.manualCodeEntryAllowed : false;
12639
13216
  return {
12640
- discountUiOpen,
12641
- setDiscountUiOpen,
12642
- discountCode,
12643
- setDiscountCode,
12644
- discountsAvailable,
13217
+ discountUiOpen: state.discountUiOpen,
13218
+ setDiscountUiOpen: (isOpen) => dispatch({ type: "discount-ui-open-changed", isOpen }),
13219
+ discountCode: state.discountCode,
13220
+ setDiscountCode: (code) => dispatch({ type: "discount-code-changed", code }),
13221
+ discountsAvailable: isAvailable,
12645
13222
  manualCodeEntryAllowed,
12646
- autoAppliedDiscount,
12647
- discountsAvailableLoading
13223
+ autoAppliedDiscount: isAvailable ? availability.autoAppliedDiscount : null,
13224
+ discountsAvailableLoading: availability.tag === "loading"
12648
13225
  };
12649
13226
  }
12650
13227
 
@@ -12798,8 +13375,10 @@ function buildBookingPaymentOptionViewModel(input) {
12798
13375
  totalAmountCents: input.totalCents,
12799
13376
  config: input.option.config
12800
13377
  });
13378
+ const remainingBalance = Math.max(0, input.totalCents - dueToday);
12801
13379
  const formattedTotal = formatPrice(input.totalCents, input.currency, input.locale);
12802
13380
  const formattedDueToday = formatPrice(dueToday, input.currency, input.locale);
13381
+ const formattedRemainingBalance = formatPrice(remainingBalance, input.currency, input.locale);
12803
13382
  const dueAt = resolveFlexibleBalanceDueAt({
12804
13383
  bookingStartAt: input.bookingStartAt ?? (/* @__PURE__ */ new Date()).toISOString(),
12805
13384
  dueDateRule: input.option.config.dueDateRule
@@ -12816,6 +13395,7 @@ function buildBookingPaymentOptionViewModel(input) {
12816
13395
  summaryRows: [
12817
13396
  { label: "Total", value: formattedTotal },
12818
13397
  { label: "Due today", value: formattedDueToday },
13398
+ { label: "Remaining balance", value: formattedRemainingBalance },
12819
13399
  { label: "Balance due by", value: formatScheduleDate(dueAt, input.locale) },
12820
13400
  {
12821
13401
  label: "Deposit policy",
@@ -12827,7 +13407,7 @@ function buildBookingPaymentOptionViewModel(input) {
12827
13407
  };
12828
13408
  }
12829
13409
  default:
12830
- return assertNever11(input.option);
13410
+ return assertNever4(input.option);
12831
13411
  }
12832
13412
  }
12833
13413
  function buildInstalmentSchedulePreview(input) {
@@ -12884,7 +13464,7 @@ function buildInstalmentSchedulePreview(input) {
12884
13464
  })));
12885
13465
  }
12886
13466
  default:
12887
- return assertNever11(input.option.plan);
13467
+ return assertNever4(input.option.plan);
12888
13468
  }
12889
13469
  }
12890
13470
  function getPaymentCadenceLabel(plan) {
@@ -13111,7 +13691,7 @@ function bookingFlowReducer(state, event) {
13111
13691
  case "reset":
13112
13692
  return event.initial;
13113
13693
  default:
13114
- return assertNever11(event);
13694
+ return assertNever4(event);
13115
13695
  }
13116
13696
  }
13117
13697
  function clearAvailabilityFeedback(feedback) {
@@ -13240,7 +13820,7 @@ function validateBookingStep(input) {
13240
13820
  return Object.keys(errors).length > 0 ? { ok: false, errors: createFieldBookingValidationErrors(errors) } : { ok: true };
13241
13821
  }
13242
13822
  default:
13243
- return assertNever11(input.stepId);
13823
+ return assertNever4(input.stepId);
13244
13824
  }
13245
13825
  }
13246
13826
  function validateBookingFields(input) {
@@ -13601,7 +14181,7 @@ function resolveAppointmentPackagesModel(input) {
13601
14181
  };
13602
14182
  }
13603
14183
  default:
13604
- return assertNever11(input.state);
14184
+ return assertNever4(input.state);
13605
14185
  }
13606
14186
  }
13607
14187
  function toHeadlessEligibleAppointmentPackage(appointmentPackage) {
@@ -13665,7 +14245,7 @@ function omitRecordKey(record, key) {
13665
14245
  return rest;
13666
14246
  }
13667
14247
  function readAppointmentBookingOverrideData(value) {
13668
- if (!isRecord4(value)) return null;
14248
+ if (!isRecord5(value)) return null;
13669
14249
  const services = normalizeBookingServices(value.services);
13670
14250
  return {
13671
14251
  form: normalizeBookingFormConfig(value.form),
@@ -13678,7 +14258,7 @@ function createOverrideInputError(reason, message, warnInDev = false) {
13678
14258
  }
13679
14259
  return { ok: false, reason, message };
13680
14260
  }
13681
- function isRecord4(value) {
14261
+ function isRecord5(value) {
13682
14262
  return typeof value === "object" && value !== null;
13683
14263
  }
13684
14264
 
@@ -13706,12 +14286,12 @@ function useHeadlessBookingFlow(options) {
13706
14286
  }),
13707
14287
  [defaultResourceId, defaultServiceId, options.initialData]
13708
14288
  );
13709
- const [state, dispatch] = useReducer4(bookingFlowReducer, initialState);
14289
+ const [state, dispatch] = useReducer5(bookingFlowReducer, initialState);
13710
14290
  const api = useBlockApi();
13711
- const [resourcesState, setResourcesState] = useState2({ tag: "idle" });
13712
- const resourcesRequestIdRef = useRef5(0);
13713
- const [appointmentPackages, setAppointmentPackages] = useState2({ tag: "idle" });
13714
- const appointmentPackagesRequestIdRef = useRef5(0);
14291
+ const [resourcesState, setResourcesState] = useState({ tag: "idle" });
14292
+ const resourcesRequestIdRef = useRef6(0);
14293
+ const [appointmentPackages, setAppointmentPackages] = useState({ tag: "idle" });
14294
+ const appointmentPackagesRequestIdRef = useRef6(0);
13715
14295
  const selectedServiceId = state.selectedServiceId ?? defaultServiceId;
13716
14296
  const selectedResourceId = state.selectedResourceId ?? defaultResourceId;
13717
14297
  const selectedService = options.services.find((service) => service.id === selectedServiceId) ?? null;
@@ -13948,14 +14528,17 @@ function useHeadlessBookingFlow(options) {
13948
14528
  state.selectedDate,
13949
14529
  state.selectedSlot
13950
14530
  ]);
13951
- const appointmentDiscountContext = selectedService && (selectedService.priceAmount ?? 0) > 0 ? { type: "appointment", serviceId: selectedService.id } : null;
14531
+ const appointmentDiscountContext = useMemo2(
14532
+ () => selectedService && (selectedService.priceAmount ?? 0) > 0 ? { type: "appointment", serviceId: selectedService.id } : null,
14533
+ [selectedService?.id, selectedService?.priceAmount]
14534
+ );
13952
14535
  const discountUi = useDiscountCodeUi({
13953
14536
  api,
13954
14537
  discountContext: appointmentDiscountContext,
13955
14538
  subtotalCents: selectedService?.priceAmount ?? 0
13956
14539
  });
13957
14540
  const { submit, clearFeedback } = useBookingSubmission(options.siteId);
13958
- const submittingRef = useRef5(false);
14541
+ const submittingRef = useRef6(false);
13959
14542
  const latestRef = useLatestRef({
13960
14543
  state,
13961
14544
  data,
@@ -14272,7 +14855,7 @@ function resolvePaymentMode(input) {
14272
14855
  return resolveBookingPaymentStep(input);
14273
14856
  }
14274
14857
  function useLatestRef(value) {
14275
- const ref = useRef5(value);
14858
+ const ref = useRef6(value);
14276
14859
  useLayoutEffect(() => {
14277
14860
  ref.current = value;
14278
14861
  }, [value]);
@@ -14283,7 +14866,7 @@ function useLatestRef(value) {
14283
14866
  import { useMemo as useMemo3 } from "react";
14284
14867
 
14285
14868
  // ../blocks/src/system/runtime/hooks/usePolling.ts
14286
- import { useEffect as useEffect7, useCallback as useCallback4, useReducer as useReducer5, useRef as useRef6 } from "react";
14869
+ import { useEffect as useEffect7, useCallback as useCallback4, useReducer as useReducer6, useRef as useRef7 } from "react";
14287
14870
 
14288
14871
  // ../blocks/src/system/runtime/hooks/usePolling.state.ts
14289
14872
  function createInitialPollingState() {
@@ -14340,7 +14923,7 @@ function pollingReducer(state, action) {
14340
14923
  case "timeout":
14341
14924
  return state;
14342
14925
  default:
14343
- return assertNever11(state);
14926
+ return assertNever4(state);
14344
14927
  }
14345
14928
  case "polling-timed-out":
14346
14929
  return {
@@ -14349,7 +14932,7 @@ function pollingReducer(state, action) {
14349
14932
  error: new Error("Polling timed out")
14350
14933
  };
14351
14934
  default:
14352
- return assertNever11(action);
14935
+ return assertNever4(action);
14353
14936
  }
14354
14937
  }
14355
14938
 
@@ -14357,17 +14940,17 @@ function pollingReducer(state, action) {
14357
14940
  var DEFAULT_MAX_ATTEMPTS = 10;
14358
14941
  var DEFAULT_POLL_INTERVAL = 1e3;
14359
14942
  function usePolling(config) {
14360
- const [state, dispatch] = useReducer5(
14943
+ const [state, dispatch] = useReducer6(
14361
14944
  pollingReducer,
14362
14945
  void 0,
14363
14946
  createInitialPollingState
14364
14947
  );
14365
- const attemptsRef = useRef6(0);
14366
- const timeoutRef = useRef6(null);
14367
- const isPollingRef = useRef6(false);
14368
- const isActiveRef = useRef6(false);
14369
- const generationRef = useRef6(0);
14370
- const configRef = useRef6(config);
14948
+ const attemptsRef = useRef7(0);
14949
+ const timeoutRef = useRef7(null);
14950
+ const isPollingRef = useRef7(false);
14951
+ const isActiveRef = useRef7(false);
14952
+ const generationRef = useRef7(0);
14953
+ const configRef = useRef7(config);
14371
14954
  configRef.current = config;
14372
14955
  const cleanup = useCallback4(() => {
14373
14956
  isActiveRef.current = false;
@@ -14491,7 +15074,7 @@ function useAppointmentCheckoutVerification(config) {
14491
15074
  }
14492
15075
 
14493
15076
  // ../blocks/src/system/runtime/components/booking/DatePicker.tsx
14494
- import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
15077
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
14495
15078
  var DatePicker = ({
14496
15079
  value,
14497
15080
  onChange,
@@ -14506,21 +15089,21 @@ var DatePicker = ({
14506
15089
  return /* @__PURE__ */ jsxs4("div", { className: "ab-stack--sm", children: [
14507
15090
  /* @__PURE__ */ jsxs4("label", { className: "ab-label", children: [
14508
15091
  "Select Date",
14509
- required && /* @__PURE__ */ jsx6("span", { className: "ab-required", children: "*" })
15092
+ required && /* @__PURE__ */ jsx5("span", { className: "ab-required", children: "*" })
14510
15093
  ] }),
14511
- /* @__PURE__ */ jsx6("div", { className: "ab-skeleton" }),
14512
- /* @__PURE__ */ jsx6("p", { className: "ab-text ab-text--muted ab-text--sm", children: "Loading available dates..." })
15094
+ /* @__PURE__ */ jsx5("div", { className: "ab-skeleton" }),
15095
+ /* @__PURE__ */ jsx5("p", { className: "ab-text ab-text--muted ab-text--sm", children: "Loading available dates..." })
14513
15096
  ] });
14514
15097
  }
14515
15098
  if (isEmpty) {
14516
15099
  return /* @__PURE__ */ jsxs4("div", { className: "ab-stack--sm", children: [
14517
15100
  /* @__PURE__ */ jsxs4("label", { className: "ab-label", children: [
14518
15101
  "Select Date",
14519
- required && /* @__PURE__ */ jsx6("span", { className: "ab-required", children: "*" })
15102
+ required && /* @__PURE__ */ jsx5("span", { className: "ab-required", children: "*" })
14520
15103
  ] }),
14521
- /* @__PURE__ */ jsx6(FeedbackMessage, { tone: "warning", className: "ab-alert ab-alert--warning", role: "status", children: /* @__PURE__ */ jsxs4("p", { className: "ab-text", children: [
15104
+ /* @__PURE__ */ jsx5(FeedbackMessage, { tone: "warning", className: "ab-alert ab-alert--warning", role: "status", children: /* @__PURE__ */ jsxs4("p", { className: "ab-text", children: [
14522
15105
  "No available dates in this period.",
14523
- hasMore && onLoadMore && /* @__PURE__ */ jsx6(
15106
+ hasMore && onLoadMore && /* @__PURE__ */ jsx5(
14524
15107
  "button",
14525
15108
  {
14526
15109
  type: "button",
@@ -14535,7 +15118,7 @@ var DatePicker = ({
14535
15118
  return /* @__PURE__ */ jsxs4("div", { className: "ab-stack--sm", children: [
14536
15119
  /* @__PURE__ */ jsxs4("label", { htmlFor: "booking-date", className: "ab-label", children: [
14537
15120
  "Select Date",
14538
- required && /* @__PURE__ */ jsx6("span", { className: "ab-required", children: "*" })
15121
+ required && /* @__PURE__ */ jsx5("span", { className: "ab-required", children: "*" })
14539
15122
  ] }),
14540
15123
  /* @__PURE__ */ jsxs4(
14541
15124
  "select",
@@ -14546,12 +15129,12 @@ var DatePicker = ({
14546
15129
  required,
14547
15130
  className: "ab-select",
14548
15131
  children: [
14549
- /* @__PURE__ */ jsx6("option", { value: "", children: "Choose a date..." }),
14550
- dateOptions.map((date) => /* @__PURE__ */ jsx6("option", { value: date, children: formatDate(date) }, date))
15132
+ /* @__PURE__ */ jsx5("option", { value: "", children: "Choose a date..." }),
15133
+ dateOptions.map((date) => /* @__PURE__ */ jsx5("option", { value: date, children: formatDate(date) }, date))
14551
15134
  ]
14552
15135
  }
14553
15136
  ),
14554
- hasMore && onLoadMore && /* @__PURE__ */ jsx6(
15137
+ hasMore && onLoadMore && /* @__PURE__ */ jsx5(
14555
15138
  "button",
14556
15139
  {
14557
15140
  type: "button",
@@ -14564,7 +15147,7 @@ var DatePicker = ({
14564
15147
  };
14565
15148
 
14566
15149
  // ../blocks/src/system/runtime/components/booking/TimeSlotSelector.tsx
14567
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
15150
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
14568
15151
  var TimeSlotSelector = ({
14569
15152
  value,
14570
15153
  onChange,
@@ -14575,9 +15158,9 @@ var TimeSlotSelector = ({
14575
15158
  return /* @__PURE__ */ jsxs5("div", { className: "ab-stack--sm", children: [
14576
15159
  /* @__PURE__ */ jsxs5("label", { htmlFor: "booking-slot", className: "ab-label", children: [
14577
15160
  "Select Time",
14578
- required && /* @__PURE__ */ jsx7("span", { className: "ab-required", children: "*" })
15161
+ required && /* @__PURE__ */ jsx6("span", { className: "ab-required", children: "*" })
14579
15162
  ] }),
14580
- isLoading ? /* @__PURE__ */ jsx7(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info ab-center", role: "status", children: "Loading available times..." }) : slots.length === 0 ? /* @__PURE__ */ jsx7(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info ab-center", role: "status", children: "No available times for this date" }) : /* @__PURE__ */ jsxs5(
15163
+ isLoading ? /* @__PURE__ */ jsx6(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info ab-center", role: "status", children: "Loading available times..." }) : slots.length === 0 ? /* @__PURE__ */ jsx6(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info ab-center", role: "status", children: "No available times for this date" }) : /* @__PURE__ */ jsxs5(
14581
15164
  "select",
14582
15165
  {
14583
15166
  id: "booking-slot",
@@ -14586,8 +15169,8 @@ var TimeSlotSelector = ({
14586
15169
  required,
14587
15170
  className: "ab-select",
14588
15171
  children: [
14589
- /* @__PURE__ */ jsx7("option", { value: "", children: "Choose a time..." }),
14590
- slots.map((slot) => /* @__PURE__ */ jsx7("option", { value: slot.startAt, children: formatTime(slot.startAt) }, slot.startAt))
15172
+ /* @__PURE__ */ jsx6("option", { value: "", children: "Choose a time..." }),
15173
+ slots.map((slot) => /* @__PURE__ */ jsx6("option", { value: slot.startAt, children: formatTime(slot.startAt) }, slot.startAt))
14591
15174
  ]
14592
15175
  }
14593
15176
  )
@@ -14596,7 +15179,7 @@ var TimeSlotSelector = ({
14596
15179
 
14597
15180
  // ../blocks/src/system/runtime/shared/components/DiscountCodeDisclosure.tsx
14598
15181
  import { useId } from "react";
14599
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
15182
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
14600
15183
  var BLOCK_DISCOUNT_CODE_DISCLOSURE_CLASSES = {
14601
15184
  "course-registration": {
14602
15185
  root: "cr-discount",
@@ -14672,10 +15255,10 @@ function DiscountCodeDisclosure({
14672
15255
  onApply();
14673
15256
  };
14674
15257
  const feedbackClassName = feedback ? `${classes.feedback} status-${feedback.tone}` : classes.feedback;
14675
- return /* @__PURE__ */ jsx8("div", { className: classes.root, children: !isOpen ? /* @__PURE__ */ jsx8("button", { type: "button", className: classes.toggle, onClick: onOpen, children: toggleLabel }) : /* @__PURE__ */ jsxs6("div", { className: classes.form, children: [
14676
- /* @__PURE__ */ jsx8("label", { htmlFor: inputId, className: classes.label, children: label }),
15258
+ return /* @__PURE__ */ jsx7("div", { className: classes.root, children: !isOpen ? /* @__PURE__ */ jsx7("button", { type: "button", className: classes.toggle, onClick: onOpen, children: toggleLabel }) : /* @__PURE__ */ jsxs6("div", { className: classes.form, children: [
15259
+ /* @__PURE__ */ jsx7("label", { htmlFor: inputId, className: classes.label, children: label }),
14677
15260
  /* @__PURE__ */ jsxs6("div", { className: classes.row, children: [
14678
- /* @__PURE__ */ jsx8(
15261
+ /* @__PURE__ */ jsx7(
14679
15262
  "input",
14680
15263
  {
14681
15264
  id: inputId,
@@ -14688,7 +15271,7 @@ function DiscountCodeDisclosure({
14688
15271
  disabled: disabled || isApplying
14689
15272
  }
14690
15273
  ),
14691
- onApply ? /* @__PURE__ */ jsx8(
15274
+ onApply ? /* @__PURE__ */ jsx7(
14692
15275
  "button",
14693
15276
  {
14694
15277
  type: "button",
@@ -14698,7 +15281,7 @@ function DiscountCodeDisclosure({
14698
15281
  children: isApplying ? "Applying..." : applyLabel
14699
15282
  }
14700
15283
  ) : null,
14701
- /* @__PURE__ */ jsx8(
15284
+ /* @__PURE__ */ jsx7(
14702
15285
  "button",
14703
15286
  {
14704
15287
  type: "button",
@@ -14709,8 +15292,8 @@ function DiscountCodeDisclosure({
14709
15292
  }
14710
15293
  )
14711
15294
  ] }),
14712
- /* @__PURE__ */ jsx8("p", { className: classes.hint, children: hint }),
14713
- feedback ? /* @__PURE__ */ jsx8(
15295
+ /* @__PURE__ */ jsx7("p", { className: classes.hint, children: hint }),
15296
+ feedback ? /* @__PURE__ */ jsx7(
14714
15297
  "p",
14715
15298
  {
14716
15299
  className: feedbackClassName,
@@ -14722,7 +15305,7 @@ function DiscountCodeDisclosure({
14722
15305
  }
14723
15306
 
14724
15307
  // ../blocks/src/system/runtime/shared/components/FieldValidationMessage.tsx
14725
- import { jsx as jsx9 } from "react/jsx-runtime";
15308
+ import { jsx as jsx8 } from "react/jsx-runtime";
14726
15309
  function getFieldValidationControlProps({
14727
15310
  message,
14728
15311
  messageId,
@@ -14741,7 +15324,7 @@ function FieldValidationMessage({
14741
15324
  className,
14742
15325
  live = "assertive"
14743
15326
  }) {
14744
- return /* @__PURE__ */ jsx9(
15327
+ return /* @__PURE__ */ jsx8(
14745
15328
  "p",
14746
15329
  {
14747
15330
  id,
@@ -14756,7 +15339,7 @@ function FieldValidationMessage({
14756
15339
  }
14757
15340
 
14758
15341
  // ../blocks/src/system/runtime/nodes/booking-form.default-ui.tsx
14759
- import { Fragment as Fragment2, jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
15342
+ import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
14760
15343
  var paymentOptionLayoutStyle = {
14761
15344
  alignItems: "flex-start",
14762
15345
  display: "flex",
@@ -14785,20 +15368,20 @@ function HeadlessBookingDefaultForm({
14785
15368
  }
14786
15369
  };
14787
15370
  if (!currentStep) {
14788
- return /* @__PURE__ */ jsx10("div", { className: "rb-text-center rb-py-12", children: /* @__PURE__ */ jsx10("p", { className: "status-muted", children: "No steps available" }) });
15371
+ return /* @__PURE__ */ jsx9("div", { className: "rb-text-center rb-py-12", children: /* @__PURE__ */ jsx9("p", { className: "status-muted", children: "No steps available" }) });
14789
15372
  }
14790
15373
  return /* @__PURE__ */ jsxs7("div", { className: "multi-step-form", children: [
14791
- /* @__PURE__ */ jsx10("div", { className: "rb-mb-8", children: /* @__PURE__ */ jsx10(
15374
+ /* @__PURE__ */ jsx9("div", { className: "rb-mb-8", children: /* @__PURE__ */ jsx9(
14792
15375
  DefaultBookingProgress,
14793
15376
  {
14794
15377
  steps: booking.steps,
14795
15378
  currentIndex: currentStepIndex
14796
15379
  }
14797
15380
  ) }),
14798
- /* @__PURE__ */ jsx10("div", { className: "step-content", children: /* @__PURE__ */ jsx10(DefaultBookingStepContent, { booking }) }),
14799
- /* @__PURE__ */ jsx10(DefaultBookingErrorSummary, { errors: currentStep.errors }),
15381
+ /* @__PURE__ */ jsx9("div", { className: "step-content", children: /* @__PURE__ */ jsx9(DefaultBookingStepContent, { booking }) }),
15382
+ /* @__PURE__ */ jsx9(DefaultBookingErrorSummary, { errors: currentStep.errors }),
14800
15383
  /* @__PURE__ */ jsxs7("div", { className: "rb-flex rb-gap-3 rb-mt-8", children: [
14801
- !isFirstStep ? /* @__PURE__ */ jsx10(
15384
+ !isFirstStep ? /* @__PURE__ */ jsx9(
14802
15385
  "button",
14803
15386
  {
14804
15387
  type: "button",
@@ -14807,7 +15390,7 @@ function HeadlessBookingDefaultForm({
14807
15390
  children: "Back"
14808
15391
  }
14809
15392
  ) : null,
14810
- /* @__PURE__ */ jsx10(
15393
+ /* @__PURE__ */ jsx9(
14811
15394
  "button",
14812
15395
  {
14813
15396
  type: "button",
@@ -14821,7 +15404,7 @@ function HeadlessBookingDefaultForm({
14821
15404
  extraClassName: "rb-flex-1"
14822
15405
  }),
14823
15406
  children: isSubmitting ? /* @__PURE__ */ jsxs7(Fragment2, { children: [
14824
- /* @__PURE__ */ jsx10(
15407
+ /* @__PURE__ */ jsx9(
14825
15408
  SpinnerNode,
14826
15409
  {
14827
15410
  size: "sm",
@@ -14835,22 +15418,22 @@ function HeadlessBookingDefaultForm({
14835
15418
  }
14836
15419
  )
14837
15420
  ] }),
14838
- /* @__PURE__ */ jsx10(DefaultBookingDiscount, { booking }),
14839
- /* @__PURE__ */ jsx10(DefaultBookingFeedback, { booking }),
14840
- /* @__PURE__ */ jsx10(DefaultBookingAltcha, { booking })
15421
+ /* @__PURE__ */ jsx9(DefaultBookingDiscount, { booking }),
15422
+ /* @__PURE__ */ jsx9(DefaultBookingFeedback, { booking }),
15423
+ /* @__PURE__ */ jsx9(DefaultBookingAltcha, { booking })
14841
15424
  ] });
14842
15425
  }
14843
15426
  function DefaultBookingProgress({
14844
15427
  steps,
14845
15428
  currentIndex
14846
15429
  }) {
14847
- return /* @__PURE__ */ jsx10("div", { className: "rb-flex rb-items-center rb-justify-between", children: steps.map((step, index) => {
15430
+ return /* @__PURE__ */ jsx9("div", { className: "rb-flex rb-items-center rb-justify-between", children: steps.map((step, index) => {
14848
15431
  const isActive = index === currentIndex;
14849
15432
  const isCompleted = index < currentIndex;
14850
15433
  const isLast = index === steps.length - 1;
14851
15434
  return /* @__PURE__ */ jsxs7("div", { className: "rb-flex rb-items-center rb-flex-1", children: [
14852
15435
  /* @__PURE__ */ jsxs7("div", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-default", children: [
14853
- /* @__PURE__ */ jsx10(
15436
+ /* @__PURE__ */ jsx9(
14854
15437
  "div",
14855
15438
  {
14856
15439
  className: `
@@ -14861,7 +15444,7 @@ function DefaultBookingProgress({
14861
15444
  children: isCompleted ? "\u2713" : index + 1
14862
15445
  }
14863
15446
  ),
14864
- /* @__PURE__ */ jsx10(
15447
+ /* @__PURE__ */ jsx9(
14865
15448
  "span",
14866
15449
  {
14867
15450
  className: `
@@ -14872,7 +15455,7 @@ function DefaultBookingProgress({
14872
15455
  }
14873
15456
  )
14874
15457
  ] }),
14875
- !isLast ? /* @__PURE__ */ jsx10("div", { className: "step-connector rb-ml-2 rb-mr-2 rb-hidden rb-sm-block" }) : null
15458
+ !isLast ? /* @__PURE__ */ jsx9("div", { className: "step-connector rb-ml-2 rb-mr-2 rb-hidden rb-sm-block" }) : null
14876
15459
  ] }, step.id);
14877
15460
  }) });
14878
15461
  }
@@ -14883,15 +15466,15 @@ function DefaultBookingStepContent({
14883
15466
  if (!stepId) return null;
14884
15467
  switch (stepId) {
14885
15468
  case "service-selection":
14886
- return /* @__PURE__ */ jsx10(DefaultServiceSelectionStep, { booking });
15469
+ return /* @__PURE__ */ jsx9(DefaultServiceSelectionStep, { booking });
14887
15470
  case "datetime-selection":
14888
- return /* @__PURE__ */ jsx10(DefaultDateTimeSelectionStep, { booking });
15471
+ return /* @__PURE__ */ jsx9(DefaultDateTimeSelectionStep, { booking });
14889
15472
  case "payment-selection":
14890
- return /* @__PURE__ */ jsx10(HeadlessBookingPaymentSelectionStep, { booking });
15473
+ return /* @__PURE__ */ jsx9(HeadlessBookingPaymentSelectionStep, { booking });
14891
15474
  case "custom-fields":
14892
- return /* @__PURE__ */ jsx10(DefaultDynamicFields, { fields: booking.fields.items, booking });
15475
+ return /* @__PURE__ */ jsx9(DefaultDynamicFields, { fields: booking.fields.items, booking });
14893
15476
  default:
14894
- return assertNever11(stepId);
15477
+ return assertNever4(stepId);
14895
15478
  }
14896
15479
  }
14897
15480
  function DefaultServiceSelectionStep({
@@ -14906,14 +15489,14 @@ function DefaultServiceSelectionStep({
14906
15489
  const allowAnyResource = !booking.resources.requiresSelection;
14907
15490
  return /* @__PURE__ */ jsxs7("div", { className: "ab-stack", children: [
14908
15491
  /* @__PURE__ */ jsxs7("div", { children: [
14909
- /* @__PURE__ */ jsx10("h2", { className: "ab-title", children: "Select Service" }),
14910
- /* @__PURE__ */ jsx10("p", { className: "ab-text ab-text--muted", children: "Choose the service you'd like to book" })
15492
+ /* @__PURE__ */ jsx9("h2", { className: "ab-title", children: "Select Service" }),
15493
+ /* @__PURE__ */ jsx9("p", { className: "ab-text ab-text--muted", children: "Choose the service you'd like to book" })
14911
15494
  ] }),
14912
15495
  showServiceSelect ? /* @__PURE__ */ jsxs7("div", { className: "ab-stack--sm", children: [
14913
- /* @__PURE__ */ jsx10("label", { className: "ab-subtitle", children: "Service" }),
14914
- /* @__PURE__ */ jsx10("div", { className: "ab-grid", children: services.map((service) => {
15496
+ /* @__PURE__ */ jsx9("label", { className: "ab-subtitle", children: "Service" }),
15497
+ /* @__PURE__ */ jsx9("div", { className: "ab-grid", children: services.map((service) => {
14915
15498
  const isSelected = selectedServiceId === service.id;
14916
- return /* @__PURE__ */ jsx10(
15499
+ return /* @__PURE__ */ jsx9(
14917
15500
  "button",
14918
15501
  {
14919
15502
  type: "button",
@@ -14921,14 +15504,14 @@ function DefaultServiceSelectionStep({
14921
15504
  className: `ab-card ${isSelected ? "ab-card--selected" : ""}`,
14922
15505
  children: /* @__PURE__ */ jsxs7("div", { className: "ab-row--between", children: [
14923
15506
  /* @__PURE__ */ jsxs7("div", { children: [
14924
- /* @__PURE__ */ jsx10("div", { className: "ab-subtitle", children: service.title }),
14925
- service.description ? /* @__PURE__ */ jsx10("div", { className: "ab-text ab-text--muted", children: service.description }) : null,
15507
+ /* @__PURE__ */ jsx9("div", { className: "ab-subtitle", children: service.title }),
15508
+ service.description ? /* @__PURE__ */ jsx9("div", { className: "ab-text ab-text--muted", children: service.description }) : null,
14926
15509
  service.durationMinutes ? /* @__PURE__ */ jsxs7("div", { className: "ab-text ab-text--muted", children: [
14927
15510
  service.durationMinutes,
14928
15511
  " minutes"
14929
15512
  ] }) : null
14930
15513
  ] }),
14931
- isSelected ? /* @__PURE__ */ jsx10(SelectedCheck, {}) : null
15514
+ isSelected ? /* @__PURE__ */ jsx9(SelectedCheck, {}) : null
14932
15515
  ] })
14933
15516
  },
14934
15517
  service.id
@@ -14936,41 +15519,41 @@ function DefaultServiceSelectionStep({
14936
15519
  }) })
14937
15520
  ] }) : null,
14938
15521
  booking.resources.state.tag === "loading" ? /* @__PURE__ */ jsxs7("div", { className: "ab-center", children: [
14939
- /* @__PURE__ */ jsx10(SpinnerNode, { size: "md", srLabel: "Loading practitioners" }),
14940
- /* @__PURE__ */ jsx10("p", { className: "ab-text ab-text--muted", children: "Loading practitioners..." })
15522
+ /* @__PURE__ */ jsx9(SpinnerNode, { size: "md", srLabel: "Loading practitioners" }),
15523
+ /* @__PURE__ */ jsx9("p", { className: "ab-text ab-text--muted", children: "Loading practitioners..." })
14941
15524
  ] }) : null,
14942
- booking.resources.state.tag === "error" ? /* @__PURE__ */ jsx10(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: booking.resources.state.message }) : null,
14943
- showResourceSelect && booking.resources.state.tag === "loaded" && resources.length === 0 ? /* @__PURE__ */ jsx10(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: "No practitioners are available for this service right now." }) : null,
15525
+ booking.resources.state.tag === "error" ? /* @__PURE__ */ jsx9(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: booking.resources.state.message }) : null,
15526
+ showResourceSelect && booking.resources.state.tag === "loaded" && resources.length === 0 ? /* @__PURE__ */ jsx9(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: "No practitioners are available for this service right now." }) : null,
14944
15527
  showResourceSelect && booking.resources.state.tag !== "loading" && (allowAnyResource || resources.length > 0) ? /* @__PURE__ */ jsxs7("div", { className: "ab-stack--sm", children: [
14945
15528
  /* @__PURE__ */ jsxs7("label", { className: "ab-subtitle", children: [
14946
15529
  "Practitioner",
14947
15530
  booking.resources.requiresSelection ? "" : " (Optional)"
14948
15531
  ] }),
14949
- /* @__PURE__ */ jsx10("p", { className: "ab-text ab-text--muted", children: allowAnyResource ? 'Choose a specific practitioner or select "Any Available"' : "Choose the practitioner you'd like to book" }),
15532
+ /* @__PURE__ */ jsx9("p", { className: "ab-text ab-text--muted", children: allowAnyResource ? 'Choose a specific practitioner or select "Any Available"' : "Choose the practitioner you'd like to book" }),
14950
15533
  /* @__PURE__ */ jsxs7("div", { className: "ab-grid", children: [
14951
- allowAnyResource ? /* @__PURE__ */ jsx10(
15534
+ allowAnyResource ? /* @__PURE__ */ jsx9(
14952
15535
  "button",
14953
15536
  {
14954
15537
  type: "button",
14955
15538
  onClick: () => booking.actions.selectResource(null),
14956
15539
  className: `ab-card ${!selectedResourceId ? "ab-card--selected" : ""}`,
14957
15540
  children: /* @__PURE__ */ jsxs7("div", { className: "ab-row--between", children: [
14958
- /* @__PURE__ */ jsx10("div", { className: "ab-subtitle", children: "Any Available" }),
14959
- !selectedResourceId ? /* @__PURE__ */ jsx10(SelectedCheck, {}) : null
15541
+ /* @__PURE__ */ jsx9("div", { className: "ab-subtitle", children: "Any Available" }),
15542
+ !selectedResourceId ? /* @__PURE__ */ jsx9(SelectedCheck, {}) : null
14960
15543
  ] })
14961
15544
  }
14962
15545
  ) : null,
14963
15546
  resources.map((resource) => {
14964
15547
  const isSelected = selectedResourceId === resource.id;
14965
- return /* @__PURE__ */ jsx10(
15548
+ return /* @__PURE__ */ jsx9(
14966
15549
  "button",
14967
15550
  {
14968
15551
  type: "button",
14969
15552
  onClick: () => booking.actions.selectResource(resource.id),
14970
15553
  className: `ab-card ${isSelected ? "ab-card--selected" : ""}`,
14971
15554
  children: /* @__PURE__ */ jsxs7("div", { className: "ab-row--between", children: [
14972
- /* @__PURE__ */ jsx10("div", { className: "ab-subtitle", children: resource.label }),
14973
- isSelected ? /* @__PURE__ */ jsx10(SelectedCheck, {}) : null
15555
+ /* @__PURE__ */ jsx9("div", { className: "ab-subtitle", children: resource.label }),
15556
+ isSelected ? /* @__PURE__ */ jsx9(SelectedCheck, {}) : null
14974
15557
  ] })
14975
15558
  },
14976
15559
  resource.id
@@ -14993,16 +15576,16 @@ function DefaultDateTimeSelectionStep({
14993
15576
  const error = booking.availability.datesState.tag === "error" ? booking.availability.datesState.message : booking.availability.slotsState.tag === "error" ? booking.availability.slotsState.message : null;
14994
15577
  return /* @__PURE__ */ jsxs7("div", { className: "ab-stack", children: [
14995
15578
  singleService ? /* @__PURE__ */ jsxs7("div", { className: "ab-info-box", children: [
14996
- /* @__PURE__ */ jsx10("h3", { className: "ab-subtitle", children: singleService.title }),
14997
- singleService.description ? /* @__PURE__ */ jsx10("p", { className: "ab-text ab-text--muted", children: singleService.description }) : null,
15579
+ /* @__PURE__ */ jsx9("h3", { className: "ab-subtitle", children: singleService.title }),
15580
+ singleService.description ? /* @__PURE__ */ jsx9("p", { className: "ab-text ab-text--muted", children: singleService.description }) : null,
14998
15581
  singleService.durationMinutes ? /* @__PURE__ */ jsxs7("p", { className: "ab-text ab-text--muted", children: [
14999
15582
  "Duration: ",
15000
15583
  singleService.durationMinutes,
15001
15584
  " minutes"
15002
15585
  ] }) : null
15003
15586
  ] }) : null,
15004
- error ? /* @__PURE__ */ jsx10(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: error }) : null,
15005
- /* @__PURE__ */ jsx10(
15587
+ error ? /* @__PURE__ */ jsx9(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: error }) : null,
15588
+ /* @__PURE__ */ jsx9(
15006
15589
  DatePicker,
15007
15590
  {
15008
15591
  value: selectedDate,
@@ -15014,7 +15597,7 @@ function DefaultDateTimeSelectionStep({
15014
15597
  onLoadMore: booking.availability.loadMoreDates
15015
15598
  }
15016
15599
  ),
15017
- selectedDate ? /* @__PURE__ */ jsx10(
15600
+ selectedDate ? /* @__PURE__ */ jsx9(
15018
15601
  TimeSlotSelector,
15019
15602
  {
15020
15603
  value: selectedSlotStart,
@@ -15037,19 +15620,19 @@ function HeadlessBookingPaymentSelectionStep({
15037
15620
  const service = booking.services.selected;
15038
15621
  const viewModel = booking.payment.selection;
15039
15622
  if (booking.payment.kind === "unsupported") {
15040
- return /* @__PURE__ */ jsx10(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: booking.payment.errorMessage });
15623
+ return /* @__PURE__ */ jsx9(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: booking.payment.errorMessage });
15041
15624
  }
15042
15625
  if (!service || !viewModel) {
15043
- return /* @__PURE__ */ jsx10(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: "Payment options are unavailable for this service right now." });
15626
+ return /* @__PURE__ */ jsx9(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: "Payment options are unavailable for this service right now." });
15044
15627
  }
15045
15628
  const packageOptions = booking.payment.appointmentPackages.items;
15046
15629
  const hasPackageOptions = packageOptions.length > 0;
15047
15630
  return /* @__PURE__ */ jsxs7("div", { className: "ab-stack", children: [
15048
15631
  /* @__PURE__ */ jsxs7("div", { className: "ab-info-box", children: [
15049
- /* @__PURE__ */ jsx10("h3", { className: "ab-subtitle", children: viewModel.sectionTitle }),
15050
- /* @__PURE__ */ jsx10("p", { className: "ab-text ab-text--muted", children: service.title })
15632
+ /* @__PURE__ */ jsx9("h3", { className: "ab-subtitle", children: viewModel.sectionTitle }),
15633
+ /* @__PURE__ */ jsx9("p", { className: "ab-text ab-text--muted", children: service.title })
15051
15634
  ] }),
15052
- booking.payment.appointmentPackages.state.tag === "loading" ? /* @__PURE__ */ jsx10(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info", role: "status", children: "Checking package credits..." }) : null,
15635
+ booking.payment.appointmentPackages.state.tag === "loading" ? /* @__PURE__ */ jsx9(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info", role: "status", children: "Checking package credits..." }) : null,
15053
15636
  booking.payment.appointmentPackages.state.tag === "error" ? /* @__PURE__ */ jsxs7(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info", role: "status", children: [
15054
15637
  booking.payment.appointmentPackages.state.message,
15055
15638
  " You can continue with the normal payment option."
@@ -15057,7 +15640,7 @@ function HeadlessBookingPaymentSelectionStep({
15057
15640
  /* @__PURE__ */ jsxs7("div", { className: "ab-stack", role: "list", "aria-label": "Payment options", children: [
15058
15641
  packageOptions.map((appointmentPackage) => {
15059
15642
  const isSelected = booking.payment.selectedAppointmentPackageId === appointmentPackage.customerPassId;
15060
- return /* @__PURE__ */ jsx10(
15643
+ return /* @__PURE__ */ jsx9(
15061
15644
  "button",
15062
15645
  {
15063
15646
  type: "button",
@@ -15070,7 +15653,7 @@ function HeadlessBookingPaymentSelectionStep({
15070
15653
  appointmentPackage.customerPassId
15071
15654
  ),
15072
15655
  "aria-pressed": isSelected,
15073
- children: /* @__PURE__ */ jsx10(
15656
+ children: /* @__PURE__ */ jsx9(
15074
15657
  PaymentOptionContent,
15075
15658
  {
15076
15659
  id: appointmentPackage.customerPassId,
@@ -15089,12 +15672,12 @@ function HeadlessBookingPaymentSelectionStep({
15089
15672
  viewModel.options.map((option) => {
15090
15673
  const isSelected = !booking.payment.selectedAppointmentPackageId && (booking.payment.selectedCollectionOptionKind === option.kind || viewModel.mode === "single_option");
15091
15674
  if (viewModel.mode === "single_option" && !hasPackageOptions) {
15092
- return /* @__PURE__ */ jsx10(
15675
+ return /* @__PURE__ */ jsx9(
15093
15676
  "div",
15094
15677
  {
15095
15678
  className: "ab-card",
15096
15679
  style: paymentOptionLayoutStyle,
15097
- children: /* @__PURE__ */ jsx10(
15680
+ children: /* @__PURE__ */ jsx9(
15098
15681
  PaymentOptionContent,
15099
15682
  {
15100
15683
  id: option.kind,
@@ -15108,7 +15691,7 @@ function HeadlessBookingPaymentSelectionStep({
15108
15691
  option.kind
15109
15692
  );
15110
15693
  }
15111
- return /* @__PURE__ */ jsx10(
15694
+ return /* @__PURE__ */ jsx9(
15112
15695
  "button",
15113
15696
  {
15114
15697
  type: "button",
@@ -15119,7 +15702,7 @@ function HeadlessBookingPaymentSelectionStep({
15119
15702
  style: paymentOptionLayoutStyle,
15120
15703
  onClick: () => booking.actions.selectPaymentOption(option.kind),
15121
15704
  "aria-pressed": isSelected,
15122
- children: /* @__PURE__ */ jsx10(
15705
+ children: /* @__PURE__ */ jsx9(
15123
15706
  PaymentOptionContent,
15124
15707
  {
15125
15708
  id: option.kind,
@@ -15144,21 +15727,21 @@ function PaymentOptionContent({
15144
15727
  title
15145
15728
  }) {
15146
15729
  return /* @__PURE__ */ jsxs7(Fragment2, { children: [
15147
- /* @__PURE__ */ jsx10("span", { children: title }),
15148
- /* @__PURE__ */ jsx10("span", { className: "ab-text ab-text--muted", children: description }),
15149
- /* @__PURE__ */ jsx10("div", { className: "ab-stack", style: summaryStackStyle, children: summaryRows.map((row) => /* @__PURE__ */ jsxs7("span", { className: "ab-text ab-text--muted", children: [
15730
+ /* @__PURE__ */ jsx9("span", { children: title }),
15731
+ /* @__PURE__ */ jsx9("span", { className: "ab-text ab-text--muted", children: description }),
15732
+ /* @__PURE__ */ jsx9("div", { className: "ab-stack", style: summaryStackStyle, children: summaryRows.map((row) => /* @__PURE__ */ jsxs7("span", { className: "ab-text ab-text--muted", children: [
15150
15733
  row.label,
15151
15734
  ": ",
15152
15735
  row.value
15153
15736
  ] }, `${id}-${row.label}`)) }),
15154
- helperText ? /* @__PURE__ */ jsx10("span", { className: "ab-text ab-text--muted", children: helperText }) : null
15737
+ helperText ? /* @__PURE__ */ jsx9("span", { className: "ab-text ab-text--muted", children: helperText }) : null
15155
15738
  ] });
15156
15739
  }
15157
15740
  function DefaultDynamicFields({
15158
15741
  booking,
15159
15742
  fields
15160
15743
  }) {
15161
- return /* @__PURE__ */ jsx10("div", { className: "rb-space-y-6", children: fields.map((field) => /* @__PURE__ */ jsx10(DefaultDynamicField, { booking, field }, field.id)) });
15744
+ return /* @__PURE__ */ jsx9("div", { className: "rb-space-y-6", children: fields.map((field) => /* @__PURE__ */ jsx9(DefaultDynamicField, { booking, field }, field.id)) });
15162
15745
  }
15163
15746
  function DefaultDynamicField({
15164
15747
  booking,
@@ -15171,10 +15754,10 @@ function DefaultDynamicField({
15171
15754
  return /* @__PURE__ */ jsxs7("div", { className: "rb-space-y-2", children: [
15172
15755
  /* @__PURE__ */ jsxs7("label", { id: field.labelId, htmlFor: field.inputId, className: "form-label", children: [
15173
15756
  field.label,
15174
- field.required ? /* @__PURE__ */ jsx10("span", { className: "required-marker", children: "*" }) : null
15757
+ field.required ? /* @__PURE__ */ jsx9("span", { className: "required-marker", children: "*" }) : null
15175
15758
  ] }),
15176
- field.helpText ? /* @__PURE__ */ jsx10("p", { id: field.helpTextId ?? void 0, className: "rb-caption status-muted", children: field.helpText }) : null,
15177
- /* @__PURE__ */ jsx10(
15759
+ field.helpText ? /* @__PURE__ */ jsx9("p", { id: field.helpTextId ?? void 0, className: "rb-caption status-muted", children: field.helpText }) : null,
15760
+ /* @__PURE__ */ jsx9(
15178
15761
  DefaultFieldInput,
15179
15762
  {
15180
15763
  field,
@@ -15186,7 +15769,7 @@ function DefaultDynamicField({
15186
15769
  describedBy
15187
15770
  }
15188
15771
  ),
15189
- error ? /* @__PURE__ */ jsx10(
15772
+ error ? /* @__PURE__ */ jsx9(
15190
15773
  FieldValidationMessage,
15191
15774
  {
15192
15775
  id: errorId ?? `${field.inputId}-error`,
@@ -15220,7 +15803,7 @@ function DefaultFieldInput({
15220
15803
  };
15221
15804
  switch (field.type) {
15222
15805
  case "textarea":
15223
- return /* @__PURE__ */ jsx10(
15806
+ return /* @__PURE__ */ jsx9(
15224
15807
  "textarea",
15225
15808
  {
15226
15809
  ...commonProps,
@@ -15235,7 +15818,7 @@ function DefaultFieldInput({
15235
15818
  );
15236
15819
  case "select":
15237
15820
  if (field.field.multiple) {
15238
- return /* @__PURE__ */ jsx10(
15821
+ return /* @__PURE__ */ jsx9(
15239
15822
  "select",
15240
15823
  {
15241
15824
  ...commonProps,
@@ -15248,7 +15831,7 @@ function DefaultFieldInput({
15248
15831
  },
15249
15832
  multiple: true,
15250
15833
  className: "form-select rb-h-32",
15251
- children: field.field.options?.map((option) => /* @__PURE__ */ jsx10("option", { value: option.value, children: option.label }, option.value))
15834
+ children: field.field.options?.map((option) => /* @__PURE__ */ jsx9("option", { value: option.value, children: option.label }, option.value))
15252
15835
  }
15253
15836
  );
15254
15837
  }
@@ -15260,14 +15843,14 @@ function DefaultFieldInput({
15260
15843
  onChange: (event) => onChange(event.target.value),
15261
15844
  className: "form-select",
15262
15845
  children: [
15263
- /* @__PURE__ */ jsx10("option", { value: "", children: "Select an option..." }),
15264
- field.field.options?.map((option) => /* @__PURE__ */ jsx10("option", { value: option.value, children: option.label }, option.value))
15846
+ /* @__PURE__ */ jsx9("option", { value: "", children: "Select an option..." }),
15847
+ field.field.options?.map((option) => /* @__PURE__ */ jsx9("option", { value: option.value, children: option.label }, option.value))
15265
15848
  ]
15266
15849
  }
15267
15850
  );
15268
15851
  case "radio":
15269
- return /* @__PURE__ */ jsx10("div", { className: "rb-space-y-2", children: field.field.options?.map((option) => /* @__PURE__ */ jsxs7("label", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer", children: [
15270
- /* @__PURE__ */ jsx10(
15852
+ return /* @__PURE__ */ jsx9("div", { className: "rb-space-y-2", children: field.field.options?.map((option) => /* @__PURE__ */ jsxs7("label", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer", children: [
15853
+ /* @__PURE__ */ jsx9(
15271
15854
  "input",
15272
15855
  {
15273
15856
  type: "radio",
@@ -15281,13 +15864,13 @@ function DefaultFieldInput({
15281
15864
  className: "form-radio"
15282
15865
  }
15283
15866
  ),
15284
- /* @__PURE__ */ jsx10("span", { className: "rb-caption", children: option.label })
15867
+ /* @__PURE__ */ jsx9("span", { className: "rb-caption", children: option.label })
15285
15868
  ] }, option.value)) });
15286
15869
  case "checkbox":
15287
15870
  if (field.field.options && field.field.options.length > 1) {
15288
15871
  const checkedValues = toStringArray(value);
15289
- return /* @__PURE__ */ jsx10("div", { className: "rb-space-y-2", children: field.field.options.map((option) => /* @__PURE__ */ jsxs7("label", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer", children: [
15290
- /* @__PURE__ */ jsx10(
15872
+ return /* @__PURE__ */ jsx9("div", { className: "rb-space-y-2", children: field.field.options.map((option) => /* @__PURE__ */ jsxs7("label", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer", children: [
15873
+ /* @__PURE__ */ jsx9(
15291
15874
  "input",
15292
15875
  {
15293
15876
  type: "checkbox",
@@ -15304,11 +15887,11 @@ function DefaultFieldInput({
15304
15887
  className: "form-checkbox"
15305
15888
  }
15306
15889
  ),
15307
- /* @__PURE__ */ jsx10("span", { className: "rb-caption", children: option.label })
15890
+ /* @__PURE__ */ jsx9("span", { className: "rb-caption", children: option.label })
15308
15891
  ] }, option.value)) });
15309
15892
  }
15310
15893
  return /* @__PURE__ */ jsxs7("label", { className: "rb-flex rb-items-center rb-gap-2 rb-cursor-pointer", children: [
15311
- /* @__PURE__ */ jsx10(
15894
+ /* @__PURE__ */ jsx9(
15312
15895
  "input",
15313
15896
  {
15314
15897
  type: "checkbox",
@@ -15322,11 +15905,11 @@ function DefaultFieldInput({
15322
15905
  className: "form-checkbox"
15323
15906
  }
15324
15907
  ),
15325
- /* @__PURE__ */ jsx10("span", { className: "rb-caption", children: field.field.placeholder || field.label })
15908
+ /* @__PURE__ */ jsx9("span", { className: "rb-caption", children: field.field.placeholder || field.label })
15326
15909
  ] });
15327
15910
  case "booking_requirement_consent":
15328
15911
  return /* @__PURE__ */ jsxs7("label", { className: "rb-flex rb-items-start rb-gap-2 rb-cursor-pointer", children: [
15329
- /* @__PURE__ */ jsx10(
15912
+ /* @__PURE__ */ jsx9(
15330
15913
  "input",
15331
15914
  {
15332
15915
  type: "checkbox",
@@ -15340,10 +15923,10 @@ function DefaultFieldInput({
15340
15923
  className: "form-checkbox rb-mt-0.5"
15341
15924
  }
15342
15925
  ),
15343
- /* @__PURE__ */ jsx10("span", { className: "rb-caption", children: field.field.placeholder || field.label })
15926
+ /* @__PURE__ */ jsx9("span", { className: "rb-caption", children: field.field.placeholder || field.label })
15344
15927
  ] });
15345
15928
  case "number":
15346
- return /* @__PURE__ */ jsx10(
15929
+ return /* @__PURE__ */ jsx9(
15347
15930
  "input",
15348
15931
  {
15349
15932
  ...commonProps,
@@ -15357,7 +15940,7 @@ function DefaultFieldInput({
15357
15940
  }
15358
15941
  );
15359
15942
  case "date":
15360
- return /* @__PURE__ */ jsx10(
15943
+ return /* @__PURE__ */ jsx9(
15361
15944
  "input",
15362
15945
  {
15363
15946
  ...commonProps,
@@ -15370,7 +15953,7 @@ function DefaultFieldInput({
15370
15953
  }
15371
15954
  );
15372
15955
  case "time":
15373
- return /* @__PURE__ */ jsx10(
15956
+ return /* @__PURE__ */ jsx9(
15374
15957
  "input",
15375
15958
  {
15376
15959
  ...commonProps,
@@ -15384,7 +15967,7 @@ function DefaultFieldInput({
15384
15967
  case "email":
15385
15968
  case "tel":
15386
15969
  case "url":
15387
- return /* @__PURE__ */ jsx10(
15970
+ return /* @__PURE__ */ jsx9(
15388
15971
  "input",
15389
15972
  {
15390
15973
  ...commonProps,
@@ -15409,7 +15992,7 @@ function DefaultBookingDiscount({
15409
15992
  const shouldShowDiscountSection = !booking.payment.selectedAppointmentPackageId && !booking.discount.loading && (booking.discount.manualCodeEntryAllowed || Boolean(booking.discount.autoAppliedDiscount));
15410
15993
  if (!shouldShowDiscountSection) return null;
15411
15994
  return /* @__PURE__ */ jsxs7("div", { className: "rb-mt-6", children: [
15412
- booking.discount.manualCodeEntryAllowed ? /* @__PURE__ */ jsx10(
15995
+ booking.discount.manualCodeEntryAllowed ? /* @__PURE__ */ jsx9(
15413
15996
  DiscountCodeDisclosure,
15414
15997
  {
15415
15998
  surface: "theme-form",
@@ -15423,7 +16006,7 @@ function DefaultBookingDiscount({
15423
16006
  }
15424
16007
  }
15425
16008
  ) : null,
15426
- booking.discount.autoAppliedDiscount && booking.discount.code.trim().length === 0 ? /* @__PURE__ */ jsx10(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info rb-mt-4", role: "status", children: /* @__PURE__ */ jsxs7("p", { className: "ab-text", children: [
16009
+ booking.discount.autoAppliedDiscount && booking.discount.code.trim().length === 0 ? /* @__PURE__ */ jsx9(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info rb-mt-4", role: "status", children: /* @__PURE__ */ jsxs7("p", { className: "ab-text", children: [
15427
16010
  "Discount available: ",
15428
16011
  booking.discount.autoAppliedDiscount.publicLabel,
15429
16012
  " ",
@@ -15436,8 +16019,8 @@ function DefaultBookingFeedback({
15436
16019
  }) {
15437
16020
  if (booking.feedback.kind !== "error") return null;
15438
16021
  return /* @__PURE__ */ jsxs7(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: [
15439
- /* @__PURE__ */ jsx10("p", { className: "ab-text", children: booking.feedback.message }),
15440
- /* @__PURE__ */ jsx10(
16022
+ /* @__PURE__ */ jsx9("p", { className: "ab-text", children: booking.feedback.message }),
16023
+ /* @__PURE__ */ jsx9(
15441
16024
  "button",
15442
16025
  {
15443
16026
  type: "button",
@@ -15452,7 +16035,7 @@ function DefaultBookingAltcha({
15452
16035
  booking
15453
16036
  }) {
15454
16037
  if (!booking.spamProtection.enabled) return null;
15455
- return /* @__PURE__ */ jsx10("div", { className: "ab-altcha", children: /* @__PURE__ */ jsx10(
16038
+ return /* @__PURE__ */ jsx9("div", { className: "ab-altcha", children: /* @__PURE__ */ jsx9(
15456
16039
  AltchaWidget,
15457
16040
  {
15458
16041
  challengeUrl: booking.spamProtection.challenge.url,
@@ -15465,12 +16048,12 @@ function DefaultBookingErrorSummary({
15465
16048
  }) {
15466
16049
  if (!hasBookingValidationErrors(errors)) return null;
15467
16050
  return /* @__PURE__ */ jsxs7(FeedbackMessage, { tone: "error", className: "rb-mt-6 alert alert-error", role: "alert", children: [
15468
- errors.formError ? /* @__PURE__ */ jsx10("p", { className: "rb-caption", children: /* @__PURE__ */ jsx10("strong", { children: errors.formError }) }) : null,
15469
- Object.entries(errors.fieldErrors).map(([key, message]) => /* @__PURE__ */ jsx10("p", { className: "rb-caption", children: message }, key))
16051
+ errors.formError ? /* @__PURE__ */ jsx9("p", { className: "rb-caption", children: /* @__PURE__ */ jsx9("strong", { children: errors.formError }) }) : null,
16052
+ Object.entries(errors.fieldErrors).map(([key, message]) => /* @__PURE__ */ jsx9("p", { className: "rb-caption", children: message }, key))
15470
16053
  ] });
15471
16054
  }
15472
16055
  function SelectedCheck() {
15473
- return /* @__PURE__ */ jsx10("div", { className: "ab-check", children: /* @__PURE__ */ jsx10(
16056
+ return /* @__PURE__ */ jsx9("div", { className: "ab-check", children: /* @__PURE__ */ jsx9(
15474
16057
  "svg",
15475
16058
  {
15476
16059
  fill: "none",
@@ -15479,7 +16062,7 @@ function SelectedCheck() {
15479
16062
  strokeWidth: "2",
15480
16063
  viewBox: "0 0 24 24",
15481
16064
  stroke: "currentColor",
15482
- children: /* @__PURE__ */ jsx10("path", { d: "M5 13l4 4L19 7" })
16065
+ children: /* @__PURE__ */ jsx9("path", { d: "M5 13l4 4L19 7" })
15483
16066
  }
15484
16067
  ) });
15485
16068
  }
@@ -15546,7 +16129,7 @@ function consumeSearchParam(paramName) {
15546
16129
  }
15547
16130
 
15548
16131
  // ../blocks/src/system/runtime/nodes/booking-form.client.tsx
15549
- import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
16132
+ import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
15550
16133
  var PORTAL_REBOOK_QUERY_PARAM = "rebook";
15551
16134
  var PORTAL_REBOOK_QUERY_VALUE = "1";
15552
16135
  var REBOOK_COMPLETION_MODE_VERIFIED_CHECKOUT = "verified_checkout";
@@ -15583,8 +16166,8 @@ var BookingFormClient = ({
15583
16166
  const initialServiceId = render.hydration.serviceId ?? defaultServiceId ?? void 0;
15584
16167
  const initialResourceId = render.hydration.resourceId ?? void 0;
15585
16168
  const isPortalRebook = render.hydration.rebookContext?.kind === "portal_rebook";
15586
- const hasLoggedRebookCompletionRef = useRef7(false);
15587
- const [redirectState] = useState3(
16169
+ const hasLoggedRebookCompletionRef = useRef8(false);
16170
+ const [redirectState] = useState2(
15588
16171
  () => getBookingRedirectStateFromLocation(getBookingRedirectLocationSnapshot())
15589
16172
  );
15590
16173
  const showSpamProtection = render.hydration.spamProtectionEnabled ?? isSpamProtectionEnabled();
@@ -15664,13 +16247,13 @@ var BookingFormClient = ({
15664
16247
  viewState.kind
15665
16248
  ]);
15666
16249
  if (render.display.state === "missing" || !form || !render.hydration.formId) {
15667
- return /* @__PURE__ */ jsx11(
16250
+ return /* @__PURE__ */ jsx10(
15668
16251
  FeedbackMessage,
15669
16252
  {
15670
16253
  tone: "error",
15671
16254
  className: `ab-alert ab-alert--error ${render.display.className ?? ""}`.trim(),
15672
16255
  role: "alert",
15673
- children: /* @__PURE__ */ jsx11("p", { className: "ab-text", children: render.display.message ?? "Booking form not found. Please check your configuration." })
16256
+ children: /* @__PURE__ */ jsx10("p", { className: "ab-text", children: render.display.message ?? "Booking form not found. Please check your configuration." })
15674
16257
  }
15675
16258
  );
15676
16259
  }
@@ -15690,7 +16273,7 @@ var BookingFormClient = ({
15690
16273
  }
15691
16274
  };
15692
16275
  if (viewState.kind === "success") {
15693
- return /* @__PURE__ */ jsx11(
16276
+ return /* @__PURE__ */ jsx10(
15694
16277
  SuccessMessage,
15695
16278
  {
15696
16279
  message: getBookingSuccessMessage(render.display.successMessage),
@@ -15700,19 +16283,19 @@ var BookingFormClient = ({
15700
16283
  );
15701
16284
  }
15702
16285
  if (viewState.kind === "verifying") {
15703
- return /* @__PURE__ */ jsx11(
16286
+ return /* @__PURE__ */ jsx10(
15704
16287
  "div",
15705
16288
  {
15706
16289
  id: bookingAnchorId,
15707
16290
  className: render.display.className ?? void 0,
15708
- children: /* @__PURE__ */ jsx11(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info", role: "status", children: /* @__PURE__ */ jsx11("p", { className: "ab-text", children: viewState.message }) })
16291
+ children: /* @__PURE__ */ jsx10(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info", role: "status", children: /* @__PURE__ */ jsx10("p", { className: "ab-text", children: viewState.message }) })
15709
16292
  }
15710
16293
  );
15711
16294
  }
15712
16295
  return /* @__PURE__ */ jsxs8("div", { id: bookingAnchorId, className: render.display.className ?? void 0, children: [
15713
- render.hydration.noticeMessage ? /* @__PURE__ */ jsx11(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info rb-mb-4", role: "status", children: /* @__PURE__ */ jsx11("p", { className: "ab-text", children: render.hydration.noticeMessage }) }) : null,
15714
- viewState.kind === "error" ? /* @__PURE__ */ jsx11(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: /* @__PURE__ */ jsx11("p", { className: "ab-text", children: viewState.message }) }) : null,
15715
- /* @__PURE__ */ jsx11(HeadlessBookingDefaultForm, { booking, onSubmit: handleComplete })
16296
+ render.hydration.noticeMessage ? /* @__PURE__ */ jsx10(FeedbackMessage, { tone: "info", className: "ab-alert ab-alert--info rb-mb-4", role: "status", children: /* @__PURE__ */ jsx10("p", { className: "ab-text", children: render.hydration.noticeMessage }) }) : null,
16297
+ viewState.kind === "error" ? /* @__PURE__ */ jsx10(FeedbackMessage, { tone: "error", className: "ab-alert ab-alert--error", role: "alert", children: /* @__PURE__ */ jsx10("p", { className: "ab-text", children: viewState.message }) }) : null,
16298
+ /* @__PURE__ */ jsx10(HeadlessBookingDefaultForm, { booking, onSubmit: handleComplete })
15716
16299
  ] });
15717
16300
  };
15718
16301
 
@@ -15729,12 +16312,18 @@ function createInitialRegistrationFlowState(hasPreSelectedContext) {
15729
16312
  };
15730
16313
  }
15731
16314
  function selectionEquals(a, b2) {
15732
- return a.method === b2.method && a.passId === b2.passId && a.membershipId === b2.membershipId && a.bundlePassId === b2.bundlePassId && a.bundleMembershipId === b2.bundleMembershipId && a.productName === b2.productName && a.productDescription === b2.productDescription && a.productPrice === b2.productPrice && a.productCurrency === b2.productCurrency && a.productInterval === b2.productInterval;
16315
+ return a.method === b2.method && a.passId === b2.passId && a.membershipId === b2.membershipId && a.bundlePassId === b2.bundlePassId && a.bundleMembershipId === b2.bundleMembershipId && a.productName === b2.productName && a.productDescription === b2.productDescription && a.productPrice === b2.productPrice && a.productCurrency === b2.productCurrency && a.productInterval === b2.productInterval && a.collectionOptionKind === b2.collectionOptionKind;
15733
16316
  }
15734
16317
  function withDefaultSelection(selection) {
15735
16318
  if (!selection || !selection.method) {
15736
16319
  return { method: null };
15737
16320
  }
16321
+ if (selection.method === "stripe") {
16322
+ return {
16323
+ ...selection,
16324
+ collectionOptionKind: selection.collectionOptionKind ?? "upfront"
16325
+ };
16326
+ }
15738
16327
  return selection;
15739
16328
  }
15740
16329
  function computeAutoSelection(input) {
@@ -15760,7 +16349,7 @@ function computeAutoSelection(input) {
15760
16349
  }
15761
16350
  }
15762
16351
  if (eligibility.canPayDirectly && eligibility.price) {
15763
- return { method: "stripe" };
16352
+ return { method: "stripe", collectionOptionKind: "upfront" };
15764
16353
  }
15765
16354
  return { method: null };
15766
16355
  }
@@ -15778,11 +16367,17 @@ function isSelectionValid(input) {
15778
16367
  case "pass":
15779
16368
  return isAuthenticated && ticketsCount === 1 && !!selection.passId && eligibility.eligiblePasses.some((pass) => pass.id === selection.passId);
15780
16369
  case "membership":
15781
- return isAuthenticated && ticketsCount === 1 && !!selection.membershipId && eligibility.eligibleMemberships.some((membership) => membership.id === selection.membershipId);
16370
+ return isAuthenticated && ticketsCount === 1 && !!selection.membershipId && eligibility.eligibleMemberships.some(
16371
+ (membership) => membership.id === selection.membershipId
16372
+ );
15782
16373
  case "pass_bundle":
15783
- return ticketsCount === 1 && !!selection.bundlePassId && eligibility.availablePasses.some((pass) => pass.id === selection.bundlePassId);
16374
+ return ticketsCount === 1 && !!selection.bundlePassId && eligibility.availablePasses.some(
16375
+ (pass) => pass.id === selection.bundlePassId
16376
+ );
15784
16377
  case "membership_bundle":
15785
- return ticketsCount === 1 && !!selection.bundleMembershipId && eligibility.availableMemberships.some((membership) => membership.id === selection.bundleMembershipId);
16378
+ return ticketsCount === 1 && !!selection.bundleMembershipId && eligibility.availableMemberships.some(
16379
+ (membership) => membership.id === selection.bundleMembershipId
16380
+ );
15786
16381
  default:
15787
16382
  return false;
15788
16383
  }
@@ -15829,9 +16424,15 @@ function registrationFlowReducer(state, action) {
15829
16424
  ticketsCount: Math.max(1, action.ticketsCount)
15830
16425
  });
15831
16426
  case "set-authenticated":
15832
- return normalizeRegistrationFlowState({ ...state, isAuthenticated: action.isAuthenticated });
16427
+ return normalizeRegistrationFlowState({
16428
+ ...state,
16429
+ isAuthenticated: action.isAuthenticated
16430
+ });
15833
16431
  case "eligibility-updated":
15834
- return normalizeRegistrationFlowState({ ...state, eligibility: action.eligibility });
16432
+ return normalizeRegistrationFlowState({
16433
+ ...state,
16434
+ eligibility: action.eligibility
16435
+ });
15835
16436
  case "set-manual-payment-selection":
15836
16437
  return normalizeRegistrationFlowState({
15837
16438
  ...state,
@@ -15843,7 +16444,7 @@ function registrationFlowReducer(state, action) {
15843
16444
  return normalizeRegistrationFlowState({
15844
16445
  ...state,
15845
16446
  passOptOut: true,
15846
- paymentSelection: { method: "stripe" },
16447
+ paymentSelection: { method: "stripe", collectionOptionKind: "upfront" },
15847
16448
  selectionSource: "manual"
15848
16449
  });
15849
16450
  case "event-changed":
@@ -15898,8 +16499,8 @@ function getEventRegistrationOverrideInput(props) {
15898
16499
  };
15899
16500
  }
15900
16501
  const content = props.content ?? {};
15901
- const data = isRecord5(props.data) ? props.data : {};
15902
- const events = Array.isArray(data.events) ? data.events.filter(isPublicEventLike) : [];
16502
+ const data = isRecord6(props.data) ? props.data : {};
16503
+ const events = Array.isArray(data.events) ? data.events.map(normalizePublicEventLike).filter((event) => event !== null) : [];
15903
16504
  return {
15904
16505
  ok: true,
15905
16506
  value: {
@@ -15924,20 +16525,22 @@ function getEventRegistrationOverrideInput(props) {
15924
16525
  }
15925
16526
  };
15926
16527
  }
15927
- function isRecord5(value) {
15928
- return typeof value === "object" && value !== null;
15929
- }
15930
- function isPublicEventLike(value) {
15931
- return isRecord5(value) && typeof value.id === "string" && typeof value.occurrenceId === "string" && typeof value.seriesId === "string" && typeof value.title === "string" && typeof value.slug === "string" && typeof value.path === "string" && typeof value.requiresRegistration === "boolean" && isDeliveryMode(value.deliveryMode) && Array.isArray(value.attendanceModes) && typeof value.startsAt === "string" && typeof value.endsAt === "string" && typeof value.timeZone === "string" && isRecord5(value.pricing) && isRecord5(value.paymentTerms) && isAccessRestriction(value.accessRestriction) && Array.isArray(value.allowedCategoryIds);
15932
- }
15933
- function isDeliveryMode(value) {
15934
- return value === "in_person" || value === "online" || value === "hybrid";
16528
+ function isRecord6(value) {
16529
+ return typeof value === "object" && value !== null && !Array.isArray(value);
15935
16530
  }
15936
- function isAccessRestriction(value) {
15937
- return value === "none" || value === "category";
16531
+ function normalizePublicEventLike(value) {
16532
+ if (!isRecord6(value)) {
16533
+ return null;
16534
+ }
16535
+ const candidate = {
16536
+ ...value,
16537
+ destination: resolveRuntimeEventDestination(value)
16538
+ };
16539
+ const parsed = publicEventSchema.safeParse(candidate);
16540
+ return parsed.success ? parsed.data : null;
15938
16541
  }
15939
16542
  function isEventRegistrationContentEntryLike(value) {
15940
- return isRecord5(value) && typeof value.id === "string" && typeof value.slug === "string" && typeof value.contentTypeSlug === "string";
16543
+ return isRecord6(value) && typeof value.id === "string" && typeof value.slug === "string" && typeof value.contentTypeSlug === "string";
15941
16544
  }
15942
16545
 
15943
16546
  // ../blocks/src/system/runtime/nodes/event-registration/event-registration.headless.planning.ts
@@ -15961,7 +16564,10 @@ function toHeadlessPaymentSelection(selection) {
15961
16564
  case "free":
15962
16565
  return { method: "free" };
15963
16566
  case "stripe":
15964
- return { method: "stripe" };
16567
+ return {
16568
+ method: "stripe",
16569
+ collectionOptionKind: selection.collectionOptionKind
16570
+ };
15965
16571
  case "pass":
15966
16572
  if (!selection.passId) return { method: "none" };
15967
16573
  return {
@@ -15999,7 +16605,10 @@ function toInternalPaymentSelection(selection) {
15999
16605
  case "free":
16000
16606
  return { method: "free" };
16001
16607
  case "stripe":
16002
- return { method: "stripe" };
16608
+ return {
16609
+ method: "stripe",
16610
+ collectionOptionKind: selection.collectionOptionKind ?? "upfront"
16611
+ };
16003
16612
  case "pass":
16004
16613
  return {
16005
16614
  method: "pass",
@@ -16029,7 +16638,10 @@ function toInternalPaymentSelection(selection) {
16029
16638
  function resolveEventRegistrationSubmitPlan(input) {
16030
16639
  const selection = input.paymentSelection.method ? input.paymentSelection : void 0;
16031
16640
  if (input.canJoinWaitlist) {
16032
- return { ok: true, args: withOptionalSelection({ method: "free" }, selection) };
16641
+ return {
16642
+ ok: true,
16643
+ args: withOptionalSelection({ method: "free" }, selection)
16644
+ };
16033
16645
  }
16034
16646
  switch (input.paymentSelection.method) {
16035
16647
  case "pass":
@@ -16044,19 +16656,28 @@ function resolveEventRegistrationSubmitPlan(input) {
16044
16656
  return input.paymentSelection.membershipId ? {
16045
16657
  ok: true,
16046
16658
  args: withOptionalSelection(
16047
- { method: "membership", membershipId: input.paymentSelection.membershipId },
16659
+ {
16660
+ method: "membership",
16661
+ membershipId: input.paymentSelection.membershipId
16662
+ },
16048
16663
  selection
16049
16664
  )
16050
16665
  } : missingPaymentSelection();
16051
16666
  case "free":
16052
- return { ok: true, args: withOptionalSelection({ method: "free" }, selection) };
16667
+ return {
16668
+ ok: true,
16669
+ args: withOptionalSelection({ method: "free" }, selection)
16670
+ };
16053
16671
  case null:
16054
16672
  return input.eventRequiresPayment ? missingPaymentSelection() : { ok: true, args: { method: "free" } };
16055
16673
  case "pass_bundle":
16056
16674
  return input.paymentSelection.bundlePassId ? {
16057
16675
  ok: true,
16058
16676
  args: withOptionalSelection(
16059
- { method: "pass_bundle", passId: input.paymentSelection.bundlePassId },
16677
+ {
16678
+ method: "pass_bundle",
16679
+ passId: input.paymentSelection.bundlePassId
16680
+ },
16060
16681
  selection
16061
16682
  )
16062
16683
  } : missingPaymentSelection();
@@ -16072,7 +16693,10 @@ function resolveEventRegistrationSubmitPlan(input) {
16072
16693
  )
16073
16694
  } : missingPaymentSelection();
16074
16695
  case "stripe":
16075
- return { ok: true, args: withOptionalSelection({ method: "stripe" }, selection) };
16696
+ return {
16697
+ ok: true,
16698
+ args: withOptionalSelection({ method: "stripe" }, selection)
16699
+ };
16076
16700
  }
16077
16701
  }
16078
16702
  function resolveHeadlessEventRegistrationStatus(wizard) {
@@ -16234,7 +16858,7 @@ function findSelectedTicketType(input) {
16234
16858
  }
16235
16859
 
16236
16860
  // ../blocks/src/system/runtime/nodes/event-registration/hooks.ts
16237
- import { useState as useState4, useEffect as useEffect8, useCallback as useCallback5, useRef as useRef8, useReducer as useReducer6 } from "react";
16861
+ import { useState as useState3, useEffect as useEffect8, useCallback as useCallback5, useRef as useRef9, useReducer as useReducer7 } from "react";
16238
16862
 
16239
16863
  // ../blocks/src/system/runtime/nodes/event-registration/hooks.state.ts
16240
16864
  var initialEligibilityLookupState = {
@@ -16265,7 +16889,7 @@ function eligibilityLookupReducer(state, action) {
16265
16889
  error: action.message
16266
16890
  };
16267
16891
  default:
16268
- return assertNever11(action);
16892
+ return assertNever4(action);
16269
16893
  }
16270
16894
  }
16271
16895
  var initialExistingRegistrationLookupState = {
@@ -16287,15 +16911,15 @@ function existingRegistrationLookupReducer(state, action) {
16287
16911
  registration: action.registration
16288
16912
  };
16289
16913
  default:
16290
- return assertNever11(action);
16914
+ return assertNever4(action);
16291
16915
  }
16292
16916
  }
16293
16917
 
16294
16918
  // ../blocks/src/system/runtime/nodes/event-registration/hooks.ts
16295
16919
  function usePortalAuth() {
16296
16920
  const api = useBlockApi();
16297
- const [authState, setAuthState] = useState4("checking");
16298
- const [profile, setProfile] = useState4(null);
16921
+ const [authState, setAuthState] = useState3("checking");
16922
+ const [profile, setProfile] = useState3(null);
16299
16923
  useEffect8(() => {
16300
16924
  let cancelled = false;
16301
16925
  async function checkPortalAuth() {
@@ -16342,11 +16966,11 @@ function usePortalAuth() {
16342
16966
  }
16343
16967
  function useEligibility(params) {
16344
16968
  const api = useBlockApi();
16345
- const [state, dispatch] = useReducer6(
16969
+ const [state, dispatch] = useReducer7(
16346
16970
  eligibilityLookupReducer,
16347
16971
  initialEligibilityLookupState
16348
16972
  );
16349
- const requestIdRef = useRef8(0);
16973
+ const requestIdRef = useRef9(0);
16350
16974
  useEffect8(() => {
16351
16975
  let cancelled = false;
16352
16976
  async function fetchEligibility() {
@@ -16401,11 +17025,11 @@ function useExistingEventRegistration({
16401
17025
  occurrenceId
16402
17026
  }) {
16403
17027
  const api = useBlockApi();
16404
- const [state, dispatch] = useReducer6(
17028
+ const [state, dispatch] = useReducer7(
16405
17029
  existingRegistrationLookupReducer,
16406
17030
  initialExistingRegistrationLookupState
16407
17031
  );
16408
- const requestIdRef = useRef8(0);
17032
+ const requestIdRef = useRef9(0);
16409
17033
  useEffect8(() => {
16410
17034
  let cancelled = false;
16411
17035
  async function fetchExistingRegistration() {
@@ -16607,8 +17231,100 @@ function cleanupStaleRegistrations() {
16607
17231
  }
16608
17232
  }
16609
17233
 
17234
+ // ../blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.ts
17235
+ var DEFAULT_EVENT_DIRECT_PAYMENT_OPTION = {
17236
+ kind: "upfront"
17237
+ };
17238
+ function buildEventRegistrationPaymentOptionsViewModel(input) {
17239
+ const supportedOptions = selectSupportedEventDirectPaymentOptions(
17240
+ input.paymentTerms
17241
+ );
17242
+ const selection = buildBookingPaymentSelectionViewModel({
17243
+ serviceTitle: input.eventTitle,
17244
+ paymentTerms: { allowedOptions: [...supportedOptions] },
17245
+ priceAmount: input.totalPriceCents,
17246
+ priceCurrency: input.currency,
17247
+ bookingStartAt: input.startsAt,
17248
+ locale: input.locale
17249
+ });
17250
+ return {
17251
+ mode: selection.mode,
17252
+ sectionTitle: selection.sectionTitle,
17253
+ options: selection.options.map(
17254
+ (option) => toEventDirectPaymentOption(option, selection.mode)
17255
+ )
17256
+ };
17257
+ }
17258
+ function selectSupportedEventDirectPaymentOptions(paymentTerms) {
17259
+ const supported = paymentTerms?.allowedOptions.filter(isSupportedEventDirectPaymentOption) ?? [];
17260
+ return supported.length > 0 ? supported : [DEFAULT_EVENT_DIRECT_PAYMENT_OPTION];
17261
+ }
17262
+ function isSupportedEventDirectPaymentOption(option) {
17263
+ return option.kind === "upfront" || option.kind === "flexible_balance";
17264
+ }
17265
+ function toEventDirectPaymentOption(option, mode) {
17266
+ switch (option.kind) {
17267
+ case "upfront":
17268
+ return {
17269
+ ...option,
17270
+ kind: "upfront",
17271
+ label: mode === "choice_required" ? "Pay in full now" : "Pay by card"
17272
+ };
17273
+ case "flexible_balance":
17274
+ return {
17275
+ ...option,
17276
+ kind: "flexible_balance",
17277
+ label: "Pay deposit now"
17278
+ };
17279
+ case "deferred_manual":
17280
+ case "instalment_plan":
17281
+ throw new Error(
17282
+ `Unsupported event registration payment option: ${option.kind}`
17283
+ );
17284
+ }
17285
+ }
17286
+ function resolveEventRegistrationDirectPaymentSelection(input) {
17287
+ if (input.selection.method !== "stripe") {
17288
+ return { kind: "not-stripe" };
17289
+ }
17290
+ const fallbackOption = input.options[0];
17291
+ if (!fallbackOption) {
17292
+ return { kind: "unavailable" };
17293
+ }
17294
+ const requestedKind = input.selection.collectionOptionKind;
17295
+ const selectedOption = requestedKind == null ? input.options.find((option) => option.kind === "upfront") : input.options.find((option) => option.kind === requestedKind);
17296
+ if (selectedOption) {
17297
+ return {
17298
+ kind: "valid",
17299
+ selection: {
17300
+ method: "stripe",
17301
+ collectionOptionKind: selectedOption.kind
17302
+ }
17303
+ };
17304
+ }
17305
+ return {
17306
+ kind: "invalid",
17307
+ fallbackSelection: {
17308
+ method: "stripe",
17309
+ collectionOptionKind: fallbackOption.kind
17310
+ }
17311
+ };
17312
+ }
17313
+ function normalizeEventRegistrationDirectPaymentSelection(input) {
17314
+ const selectionState = resolveEventRegistrationDirectPaymentSelection(input);
17315
+ switch (selectionState.kind) {
17316
+ case "valid":
17317
+ return selectionState.selection;
17318
+ case "invalid":
17319
+ return selectionState.fallbackSelection;
17320
+ case "not-stripe":
17321
+ case "unavailable":
17322
+ return input.selection;
17323
+ }
17324
+ }
17325
+
16610
17326
  // ../blocks/src/system/runtime/nodes/event-registration/useEventRegistrationWizard.ts
16611
- import { useCallback as useCallback6, useEffect as useEffect11, useMemo as useMemo6, useReducer as useReducer8, useState as useState5 } from "react";
17327
+ import { useCallback as useCallback6, useEffect as useEffect11, useMemo as useMemo6, useReducer as useReducer9, useState as useState4 } from "react";
16612
17328
 
16613
17329
  // ../blocks/src/system/runtime/nodes/event-registration/validation.ts
16614
17330
  function validateFormData2(formData) {
@@ -16625,7 +17341,7 @@ function validateFormData2(formData) {
16625
17341
  }
16626
17342
 
16627
17343
  // ../blocks/src/system/runtime/shared/useWaitlistClaim.ts
16628
- import { useEffect as useEffect9, useReducer as useReducer7, useSyncExternalStore } from "react";
17344
+ import { useEffect as useEffect9, useReducer as useReducer8, useSyncExternalStore } from "react";
16629
17345
 
16630
17346
  // ../blocks/src/system/runtime/shared/useWaitlistClaim.state.ts
16631
17347
  var DEFAULT_WAITLIST_CLAIM_ERROR = "Failed to resolve waitlist claim";
@@ -16731,7 +17447,7 @@ function useWaitlistClaim() {
16731
17447
  getWaitlistClaimTokenSnapshot,
16732
17448
  () => null
16733
17449
  );
16734
- const [state, dispatch] = useReducer7(
17450
+ const [state, dispatch] = useReducer8(
16735
17451
  waitlistClaimReducer,
16736
17452
  Boolean(token),
16737
17453
  createInitialWaitlistClaimState
@@ -17055,7 +17771,7 @@ function useEventRegistrationWizard(options) {
17055
17771
  [scopedEvents, options.occurrenceContext]
17056
17772
  );
17057
17773
  const hasPreSelectedContext = !!(options.occurrenceContext || preSelectedEvent);
17058
- const [flowState, dispatchFlow] = useReducer8(
17774
+ const [flowState, dispatchFlow] = useReducer9(
17059
17775
  registrationFlowReducer,
17060
17776
  hasPreSelectedContext,
17061
17777
  createInitialRegistrationFlowState
@@ -17063,24 +17779,24 @@ function useEventRegistrationWizard(options) {
17063
17779
  const step = flowState.step;
17064
17780
  const ticketsCount = flowState.ticketsCount;
17065
17781
  const paymentSelection = flowState.paymentSelection;
17066
- const [selectedEvent, setSelectedEvent] = useState5(preSelectedEvent ?? null);
17067
- const [formData, setFormData] = useState5({ name: "", email: "", phone: "", notes: "" });
17068
- const [errors, setErrors] = useState5({});
17069
- const [guests, setGuests] = useState5([]);
17070
- const [guestErrors, setGuestErrors] = useState5({});
17071
- const [guestSectionShake, setGuestSectionShake] = useState5(false);
17072
- const [selectedAttendanceMode, setSelectedAttendanceMode] = useState5(
17782
+ const [selectedEvent, setSelectedEvent] = useState4(preSelectedEvent ?? null);
17783
+ const [formData, setFormData] = useState4({ name: "", email: "", phone: "", notes: "" });
17784
+ const [errors, setErrors] = useState4({});
17785
+ const [guests, setGuests] = useState4([]);
17786
+ const [guestErrors, setGuestErrors] = useState4({});
17787
+ const [guestSectionShake, setGuestSectionShake] = useState4(false);
17788
+ const [selectedAttendanceMode, setSelectedAttendanceMode] = useState4(
17073
17789
  preSelectedEvent?.deliveryMode === "online" ? "online" : preSelectedEvent?.deliveryMode === "in_person" ? "in_person" : null
17074
17790
  );
17075
- const [selectedTicketTypeId, setSelectedTicketTypeId] = useState5(null);
17076
- const [registrationResult, setRegistrationResult] = useState5(null);
17077
- const [errorMessage, setErrorMessage] = useState5("");
17078
- const [altchaSolution, setAltchaSolution] = useState5(null);
17791
+ const [selectedTicketTypeId, setSelectedTicketTypeId] = useState4(null);
17792
+ const [registrationResult, setRegistrationResult] = useState4(null);
17793
+ const [errorMessage, setErrorMessage] = useState4("");
17794
+ const [altchaSolution, setAltchaSolution] = useState4(null);
17079
17795
  const { authState: portalAuthState, profile: portalProfile } = usePortalAuth();
17080
17796
  const waitlistClaim = useWaitlistClaim();
17081
- const [showMagicLinkModal, setShowMagicLinkModal] = useState5(false);
17082
- const [pendingAttendeeId, setPendingAttendeeId] = useState5(null);
17083
- const [paymentStepState, setPaymentStepState] = useState5({
17797
+ const [showMagicLinkModal, setShowMagicLinkModal] = useState4(false);
17798
+ const [pendingAttendeeId, setPendingAttendeeId] = useState4(null);
17799
+ const [paymentStepState, setPaymentStepState] = useState4({
17084
17800
  status: "loading",
17085
17801
  canContinue: false,
17086
17802
  buttonText: "Continue",
@@ -18277,10 +18993,10 @@ function buildResponsiveScopeRulePatternSource() {
18277
18993
  }
18278
18994
 
18279
18995
  // ../theme-core/src/ThemeScopeCore.tsx
18280
- import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
18996
+ import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
18281
18997
 
18282
18998
  // ../theme-core/src/ClientThemeScope.tsx
18283
- import { jsx as jsx13 } from "react/jsx-runtime";
18999
+ import { jsx as jsx12 } from "react/jsx-runtime";
18284
19000
 
18285
19001
  // ../blocks/src/system/runtime/hooks/useHeadlessEventRegistrationFlow.ts
18286
19002
  import React4, { useCallback as useCallback7, useMemo as useMemo8 } from "react";
@@ -18310,10 +19026,24 @@ function useEventRegistrationController(options) {
18310
19026
  ]
18311
19027
  );
18312
19028
  const currentStep = steps.find((step) => step.state === "active") ?? null;
19029
+ const directPaymentOptions = useMemo8(
19030
+ () => resolveHeadlessDirectPaymentOptions(wizard),
19031
+ [
19032
+ wizard.eligibility,
19033
+ wizard.occurrenceContext,
19034
+ wizard.preSelectedEvent,
19035
+ wizard.selectedEvent,
19036
+ wizard.ticketsCount
19037
+ ]
19038
+ );
18313
19039
  const submit = useCallback7(
18314
19040
  async (submitOptions) => {
19041
+ const paymentSelection = normalizeEventRegistrationDirectPaymentSelection({
19042
+ options: directPaymentOptions,
19043
+ selection: wizard.paymentSelection
19044
+ });
18315
19045
  const plan = resolveEventRegistrationSubmitPlan({
18316
- paymentSelection: wizard.paymentSelection,
19046
+ paymentSelection,
18317
19047
  eventRequiresPayment: wizard.eventRequiresPayment,
18318
19048
  canJoinWaitlist: wizard.eligibility?.canJoinWaitlist
18319
19049
  });
@@ -18332,7 +19062,7 @@ function useEventRegistrationController(options) {
18332
19062
  submitOptions
18333
19063
  );
18334
19064
  },
18335
- [wizard]
19065
+ [directPaymentOptions, wizard]
18336
19066
  );
18337
19067
  const next = useCallback7(async () => {
18338
19068
  switch (wizard.step) {
@@ -18418,9 +19148,14 @@ function useEventRegistrationController(options) {
18418
19148
  );
18419
19149
  const selectPayment = useCallback7(
18420
19150
  (selection) => {
18421
- wizard.handlePaymentSelectionChange(toInternalPaymentSelection(selection));
19151
+ wizard.handlePaymentSelectionChange(
19152
+ normalizeEventRegistrationDirectPaymentSelection({
19153
+ options: directPaymentOptions,
19154
+ selection: toInternalPaymentSelection(selection)
19155
+ })
19156
+ );
18422
19157
  },
18423
- [wizard]
19158
+ [directPaymentOptions, wizard]
18424
19159
  );
18425
19160
  const showSpamProtection = options.spamProtectionEnabled ?? isSpamProtectionEnabled();
18426
19161
  const spamProtection = showSpamProtection ? {
@@ -18429,7 +19164,7 @@ function useEventRegistrationController(options) {
18429
19164
  challenge: { url: getChallengeUrl(), auto: "onfocus" },
18430
19165
  solution: wizard.altchaSolution
18431
19166
  } : { enabled: false };
18432
- const payment = resolvePaymentModel(wizard);
19167
+ const payment = resolvePaymentModel(wizard, directPaymentOptions);
18433
19168
  const flow = {
18434
19169
  status: resolveHeadlessEventRegistrationStatus(wizard),
18435
19170
  view: resolveHeadlessEventRegistrationView(wizard),
@@ -18534,12 +19269,22 @@ function resolveExistingRegistrationState(wizard) {
18534
19269
  return { tag: "loaded", value: wizard.existingRegistration };
18535
19270
  }
18536
19271
  }
18537
- function resolvePaymentModel(wizard) {
18538
- const selection = toHeadlessPaymentSelection(wizard.paymentSelection);
19272
+ function resolvePaymentModel(wizard, directPaymentOptions) {
19273
+ const internalSelection = normalizeEventRegistrationDirectPaymentSelection({
19274
+ options: directPaymentOptions,
19275
+ selection: wizard.paymentSelection
19276
+ });
19277
+ const selection = toHeadlessPaymentSelection(internalSelection);
19278
+ const directPaymentSelectionState = resolveEventRegistrationDirectPaymentSelection({
19279
+ options: directPaymentOptions,
19280
+ selection: internalSelection
19281
+ });
18539
19282
  if (wizard.step !== "select-payment") {
18540
19283
  return {
18541
19284
  kind: "hidden",
18542
19285
  selection,
19286
+ directPaymentOptions,
19287
+ directPaymentSelectionState,
18543
19288
  stepState: wizard.paymentStepState
18544
19289
  };
18545
19290
  }
@@ -18547,14 +19292,30 @@ function resolvePaymentModel(wizard) {
18547
19292
  return {
18548
19293
  kind: status,
18549
19294
  selection,
19295
+ directPaymentOptions,
19296
+ directPaymentSelectionState,
18550
19297
  stepState: wizard.paymentStepState,
18551
19298
  eligibility: wizard.eligibility,
18552
19299
  eligibilityError: wizard.eligibilityError
18553
19300
  };
18554
19301
  }
19302
+ function resolveHeadlessDirectPaymentOptions(wizard) {
19303
+ const eligibility = wizard.eligibility;
19304
+ if (!eligibility?.eligible || !eligibility.canPayDirectly || !eligibility.price) {
19305
+ return [];
19306
+ }
19307
+ const event = wizard.selectedEvent ?? wizard.preSelectedEvent;
19308
+ return buildEventRegistrationPaymentOptionsViewModel({
19309
+ eventTitle: event?.title ?? "Event",
19310
+ paymentTerms: event?.paymentTerms,
19311
+ totalPriceCents: eligibility.price * wizard.ticketsCount,
19312
+ currency: eligibility.currency,
19313
+ startsAt: wizard.occurrenceContext?.startsAt ?? event?.startsAt
19314
+ }).options;
19315
+ }
18555
19316
 
18556
19317
  // ../blocks/src/system/runtime/hooks/useBookingFormConfig.ts
18557
- import { useEffect as useEffect12, useReducer as useReducer9 } from "react";
19318
+ import { useEffect as useEffect12, useReducer as useReducer10 } from "react";
18558
19319
 
18559
19320
  // ../blocks/src/system/runtime/hooks/useBookingFormConfig.state.ts
18560
19321
  var EMPTY_SNAPSHOT = Object.freeze({
@@ -18609,7 +19370,7 @@ function bookingFormConfigReducer(state, action) {
18609
19370
  previous: toBookingFormConfigSnapshot(state)
18610
19371
  };
18611
19372
  default:
18612
- return assertNever11(action);
19373
+ return assertNever4(action);
18613
19374
  }
18614
19375
  }
18615
19376
  function selectBookingFormConfig(state) {
@@ -18635,14 +19396,14 @@ function toBookingFormConfigSnapshot(state) {
18635
19396
  services: state.services
18636
19397
  };
18637
19398
  default:
18638
- return assertNever11(state);
19399
+ return assertNever4(state);
18639
19400
  }
18640
19401
  }
18641
19402
 
18642
19403
  // ../blocks/src/system/runtime/hooks/useBookingFormConfig.ts
18643
19404
  function useBookingFormConfig(siteId, formId) {
18644
19405
  const api = useBlockApi();
18645
- const [state, dispatch] = useReducer9(
19406
+ const [state, dispatch] = useReducer10(
18646
19407
  bookingFormConfigReducer,
18647
19408
  void 0,
18648
19409
  createInitialBookingFormConfigState