@riverbankcms/sdk 0.84.2 → 0.88.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PreviewEditorSidebar-4PH35ZIE.mjs → PreviewEditorSidebar-EVRS3C7T.mjs} +3 -3
- package/dist/{PreviewEditorUI-WHMCRJGM.mjs → PreviewEditorUI-54WD4IGE.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-ZALZDJEK.mjs +8 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +684 -0
- package/dist/_dts/api/src/endpoints.d.ts +58 -14
- package/dist/_dts/api/src/index.d.ts +4 -1
- package/dist/_dts/api/src/launchReadiness.d.ts +3 -3
- package/dist/_dts/api/src/mailchimpIntegration.d.ts +215 -0
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +35 -15
- package/dist/_dts/api/src/siteInfrastructure.d.ts +0 -14
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +1 -13
- package/dist/_dts/api/src/types.d.ts +6 -3
- package/dist/_dts/blocks/src/PageRenderer.d.ts +1 -0
- package/dist/_dts/blocks/src/contracts/proof-block-islands.d.ts +4 -0
- package/dist/_dts/blocks/src/index.d.ts +2 -1
- package/dist/_dts/blocks/src/system/blocks/appointment-booking.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/blog-listing.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/cart.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/checkout.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/collection.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +42 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +4 -0
- package/dist/_dts/blocks/src/system/blocks/faq.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/gifting.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/location-map.d.ts +1 -1
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +42 -42
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup-destination.d.ts +300 -0
- package/dist/_dts/blocks/src/system/blocks/newsletter-signup.d.ts +63 -3
- package/dist/_dts/blocks/src/system/blocks/product-detail.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/product-list.d.ts +288 -288
- package/dist/_dts/blocks/src/system/blocks/shop.d.ts +288 -288
- package/dist/_dts/blocks/src/system/fragments/library/newsletterForm.d.ts +53 -1
- package/dist/_dts/blocks/src/system/manifest/richTextSchema.d.ts +27 -0
- package/dist/_dts/blocks/src/system/manifest/schema.d.ts +23 -23
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +10 -2
- package/dist/_dts/blocks/src/system/runtime/components/registry.client.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/components/runtime-backed-blocks.d.ts +12 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.interactive.d.ts +4 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +11 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.interactive.d.ts +15 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.server.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.submission.d.ts +32 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.types.d.ts +5 -1
- package/dist/_dts/blocks/src/system/runtime/shared/components/ModalShell.d.ts +5 -1
- package/dist/_dts/blocks/src/system/runtime/shared/utils/formatting.d.ts +1 -1
- package/dist/_dts/content-model/src/referenceFields.d.ts +1 -1
- package/dist/_dts/core/src/currency-format.d.ts +37 -2
- package/dist/_dts/core/src/event-pricing.d.ts +24 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +551 -20
- package/dist/_dts/editor-blocks/src/widgets/reference/loaders.d.ts +3 -1
- package/dist/_dts/sdk/src/cli/canonical-entry-policy.d.ts +53 -0
- package/dist/_dts/sdk/src/cli/commands/migrate.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/commands/pull.d.ts +7 -1
- package/dist/_dts/sdk/src/cli/content/reader.d.ts +2 -0
- package/dist/_dts/sdk/src/cli/migrations/events.d.ts +73 -0
- package/dist/_dts/sdk/src/client/types.d.ts +9 -0
- package/dist/_dts/sdk/src/config/validation.d.ts +3 -0
- package/dist/_dts/sdk/src/contracts/system-block-content.d.ts +3 -0
- package/dist/_dts/sdk/src/data/prefetchBlockData.d.ts +3 -9
- package/dist/_dts/sdk/src/manifest/passes/pass1-fields.d.ts +1 -1
- package/dist/_dts/sdk/src/manifest/three-pass-converter.d.ts +7 -18
- package/dist/_dts/sdk/src/rendering/blocks-page-renderer.d.ts +2 -0
- package/dist/_dts/sdk/src/rendering/components/pageShared.d.ts +3 -1
- package/dist/_dts/sdk/src/rendering/helpers/loadContent.d.ts +7 -3
- package/dist/_dts/sdk/src/rendering/helpers/loadPage.d.ts +4 -24
- package/dist/_dts/sdk/src/rendering/helpers/pageRuntimeSupport.d.ts +45 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +57 -0
- package/dist/_dts/surfaces/src/index.d.ts +12 -0
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/_dts/theme-core/src/mock-themes/all.d.ts +9 -9
- package/dist/_dts/theme-core/src/schema.d.ts +11 -11
- package/dist/{chunk-ZR2GQK2A.mjs → chunk-7KOO7RPP.mjs} +953 -315
- package/dist/{chunk-OCGTXHSO.mjs → chunk-ER4UIW4X.mjs} +7 -7
- package/dist/{chunk-WFPYN7KA.mjs → chunk-HVOBXA3Y.mjs} +2 -2
- package/dist/{chunk-NFWGLRZZ.mjs → chunk-K3JWH6HE.mjs} +37 -3
- package/dist/{chunk-4QNLOTES.mjs → chunk-O4LVYUVH.mjs} +58 -14
- package/dist/{chunk-PYDHOMEO.mjs → chunk-YDMBIIS5.mjs} +1 -1
- package/dist/cli/index.mjs +1858 -512
- package/dist/client/{accordion-2UZPBMYM.mjs → accordion-PT5CGW5N.mjs} +2 -2
- package/dist/client/{bookingForm-36CWQUMV.mjs → bookingForm-2HLRTEYS.mjs} +7 -7
- package/dist/client/bookings.mjs +51 -6
- package/dist/client/{carousel-QH77HR6X.mjs → carousel-Z2LKYSWA.mjs} +3 -3
- package/dist/client/cart-ND5IK4A6.mjs +18 -0
- package/dist/client/checkout-EYUSGAY7.mjs +18 -0
- package/dist/client/{chunk-SYIJ5JO2.mjs → chunk-6DVPO44G.mjs} +1 -1
- package/dist/client/{chunk-3C2VTPWI.mjs → chunk-BAWHZ5GM.mjs} +176 -13
- package/dist/client/{chunk-52CGCQ7B.mjs → chunk-BL66UWGD.mjs} +10 -80
- package/dist/client/{chunk-VGDBVNOO.mjs → chunk-DIRW2LNG.mjs} +241 -210
- package/dist/client/{chunk-UDNSI5PY.mjs → chunk-GOFO7HRH.mjs} +1 -2
- package/dist/client/{chunk-ZKUO52W3.mjs → chunk-H4MHEXYS.mjs} +1 -1
- package/dist/client/{chunk-ZE5G642V.mjs → chunk-LI2C6M5O.mjs} +75 -1
- package/dist/client/{chunk-3DTWLTXM.mjs → chunk-MHBEWDT7.mjs} +117 -3
- package/dist/client/{chunk-4OXKTA3D.mjs → chunk-O5JNI3E4.mjs} +2 -2
- package/dist/client/{chunk-XSV6KW4D.mjs → chunk-S4G65LGR.mjs} +1 -1
- package/dist/client/{chunk-DVNUDUVT.mjs → chunk-WBQG7VJA.mjs} +4 -1
- package/dist/client/{chunk-F5VRX5Y6.mjs → chunk-WCVK4MBJ.mjs} +1 -1
- package/dist/client/{chunk-7UCLJ5SP.mjs → chunk-X7GVFB7Y.mjs} +4 -7
- package/dist/client/client.mjs +2125 -1403
- package/dist/client/{courseRegistration-TMKU6ABO.mjs → courseRegistration-H3AZBUEG.mjs} +7 -7
- package/dist/client/{eventCalendar-G6TI32X6.mjs → eventCalendar-FPKJGLGS.mjs} +10 -11
- package/dist/client/{eventCombined-SCKEMNAR.mjs → eventCombined-QCGIZBUY.mjs} +10 -11
- package/dist/client/{eventDetails-XPIFXXPK.mjs → eventDetails-HIT3BJWU.mjs} +10 -11
- package/dist/client/{eventListing-7QFMEMGT.mjs → eventListing-R4HNWJDN.mjs} +10 -11
- package/dist/client/{eventRegistration-TOODSZUI.mjs → eventRegistration-Q7BYY5HF.mjs} +10 -11
- package/dist/client/{form-MTCMVCZT.mjs → form-NI6YOG6S.mjs} +3 -3
- package/dist/client/{headerSection-Y5TMR3TW.mjs → headerSection-SDYGII36.mjs} +4 -4
- package/dist/client/hooks.mjs +1682 -1412
- package/dist/client/{locationMap-RH2LG7FZ.mjs → locationMap-BDETEUQD.mjs} +3 -4
- package/dist/client/{newsletterForm-PCAIPFMA.mjs → newsletterForm-EKYIU67X.mjs} +70 -22
- package/dist/client/{productDetail-OIGDR4YE.mjs → productDetail-5UTGNN76.mjs} +8 -9
- package/dist/client/{productList-4MA5S2CX.mjs → productList-7YA5KXZQ.mjs} +8 -9
- package/dist/client/rendering/client.mjs +753 -329
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +3786 -3034
- package/dist/client/shop-AIMUMZYC.mjs +20 -0
- package/dist/preview-next/before-render.mjs +58 -14
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/editor-chrome.css +56 -9
- package/dist/preview-next/middleware.mjs +58 -14
- package/dist/{sdk-runtime-QLOCYKVU.mjs → sdk-runtime-NW472WNT.mjs} +6 -6
- package/dist/server/components.mjs +1518 -1015
- package/dist/server/config-validation.mjs +1719 -1461
- package/dist/server/config.mjs +1719 -1461
- package/dist/server/data.mjs +1683 -1413
- package/dist/server/index.mjs +79 -17
- package/dist/server/next.mjs +1902 -1311
- package/dist/server/page-converter.mjs +2193 -1169
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1709 -1209
- package/dist/server/rendering.mjs +1894 -1347
- package/dist/server/routing.mjs +1872 -1499
- package/dist/server/server.mjs +1571 -1264
- package/dist/server/theme-bridge.mjs +234 -0
- package/dist/styles/index.css +232 -0
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-4FGSVUYI.mjs +0 -8
- package/dist/client/cart-X4YK4FTW.mjs +0 -19
- package/dist/client/checkout-OM2BEPWD.mjs +0 -19
- package/dist/client/chunk-I2MMZO53.mjs +0 -6
- package/dist/client/shop-WXSYV5QO.mjs +0 -21
|
@@ -127,6 +127,48 @@ function err(error) {
|
|
|
127
127
|
// ../core/src/branded.ts
|
|
128
128
|
var unsafeAsMediaAssetId = (id) => id;
|
|
129
129
|
|
|
130
|
+
// ../core/src/assert-never.ts
|
|
131
|
+
function assertNever(value, message = "Unexpected variant") {
|
|
132
|
+
throw new Error(`${message}: ${String(value)}`);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// ../core/src/currency-format.ts
|
|
136
|
+
var CURRENCY_LOCALE_BY_CODE = {
|
|
137
|
+
USD: "en-US",
|
|
138
|
+
GBP: "en-GB",
|
|
139
|
+
EUR: "de-DE",
|
|
140
|
+
AUD: "en-AU",
|
|
141
|
+
CAD: "en-CA",
|
|
142
|
+
NZD: "en-NZ",
|
|
143
|
+
JPY: "ja-JP",
|
|
144
|
+
CNY: "zh-CN",
|
|
145
|
+
CHF: "de-CH"
|
|
146
|
+
};
|
|
147
|
+
function resolveCurrencyLocale(currencyCode, override) {
|
|
148
|
+
return override ?? CURRENCY_LOCALE_BY_CODE[currencyCode] ?? "en";
|
|
149
|
+
}
|
|
150
|
+
function formatCurrencyAmount(amountCents, currency, options) {
|
|
151
|
+
const currencyCode = currency.toUpperCase();
|
|
152
|
+
const locale = resolveCurrencyLocale(currencyCode, options?.locale);
|
|
153
|
+
try {
|
|
154
|
+
const exactFormatter = new Intl.NumberFormat(locale, {
|
|
155
|
+
style: "currency",
|
|
156
|
+
currency: currencyCode
|
|
157
|
+
});
|
|
158
|
+
const fractionDigits = options?.decimals === "auto" ? {
|
|
159
|
+
minimumFractionDigits: 0,
|
|
160
|
+
maximumFractionDigits: exactFormatter.resolvedOptions().maximumFractionDigits
|
|
161
|
+
} : {};
|
|
162
|
+
return new Intl.NumberFormat(locale, {
|
|
163
|
+
style: "currency",
|
|
164
|
+
currency: currencyCode,
|
|
165
|
+
...fractionDigits
|
|
166
|
+
}).format(amountCents / 100);
|
|
167
|
+
} catch {
|
|
168
|
+
return `${(amountCents / 100).toFixed(2)} ${currencyCode}`;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
130
172
|
// ../core/src/event-pricing.ts
|
|
131
173
|
function publicEventPricingDisplay(pricing) {
|
|
132
174
|
return pricing.display;
|
|
@@ -161,11 +203,48 @@ function isFreePublicEventPriceDisplay(display) {
|
|
|
161
203
|
return display.display.kind === "free";
|
|
162
204
|
case "exact":
|
|
163
205
|
case "from":
|
|
206
|
+
case "range":
|
|
164
207
|
case "mixed":
|
|
165
208
|
case "unavailable":
|
|
166
209
|
return false;
|
|
167
210
|
}
|
|
168
211
|
}
|
|
212
|
+
function formatCoursePriceDisplayLabel(display, options) {
|
|
213
|
+
switch (display.kind) {
|
|
214
|
+
case "free":
|
|
215
|
+
case "unavailable":
|
|
216
|
+
return "Course";
|
|
217
|
+
case "exact":
|
|
218
|
+
return `Course (${formatCurrencyAmount(display.amount, display.currency, options)})`;
|
|
219
|
+
case "from":
|
|
220
|
+
return `Course (From ${formatCurrencyAmount(display.amount, display.currency, options)})`;
|
|
221
|
+
default:
|
|
222
|
+
return assertNever(display);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
function formatBookingPriceDisplay(display, options = {}) {
|
|
226
|
+
switch (display.kind) {
|
|
227
|
+
case "free":
|
|
228
|
+
return "Free";
|
|
229
|
+
case "exact":
|
|
230
|
+
return formatCurrencyAmount(display.amount, display.currency, options);
|
|
231
|
+
case "from":
|
|
232
|
+
return `From ${formatCurrencyAmount(display.amount, display.currency, options)}`;
|
|
233
|
+
case "range":
|
|
234
|
+
return `${formatCurrencyAmount(display.minAmount, display.currency, options)} - ${formatCurrencyAmount(display.maxAmount, display.currency, options)}`;
|
|
235
|
+
case "mixed":
|
|
236
|
+
return display.paidToAmount > display.paidFromAmount ? `Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)} - ${formatCurrencyAmount(display.paidToAmount, display.currency, options)}` : `Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)}`;
|
|
237
|
+
case "unavailable":
|
|
238
|
+
return "Pricing unavailable";
|
|
239
|
+
case "course":
|
|
240
|
+
return formatCoursePriceDisplayLabel(display.display, options);
|
|
241
|
+
default:
|
|
242
|
+
return assertNever(display);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
function formatEventPricing(pricing, options = {}) {
|
|
246
|
+
return formatBookingPriceDisplay(publicEventPricingDisplay(pricing), options);
|
|
247
|
+
}
|
|
169
248
|
|
|
170
249
|
// ../core/src/booking-date-time.ts
|
|
171
250
|
var DEFAULT_LOCALE = "en-US";
|
|
@@ -411,11 +490,6 @@ function toLocationCoordinates(value) {
|
|
|
411
490
|
};
|
|
412
491
|
}
|
|
413
492
|
|
|
414
|
-
// ../core/src/assert-never.ts
|
|
415
|
-
function assertNever(value, message = "Unexpected variant") {
|
|
416
|
-
throw new Error(`${message}: ${String(value)}`);
|
|
417
|
-
}
|
|
418
|
-
|
|
419
493
|
// ../core/src/planner.ts
|
|
420
494
|
var systemPlanningClock = {
|
|
421
495
|
now: () => Date.now()
|
|
@@ -20421,15 +20495,53 @@ var newsletterFormFragment = defineFragment({
|
|
|
20421
20495
|
title: "Newsletter Form",
|
|
20422
20496
|
description: "Newsletter subscription form with preset field configurations.",
|
|
20423
20497
|
fields: [
|
|
20498
|
+
{
|
|
20499
|
+
id: "destinationProvider",
|
|
20500
|
+
type: "select",
|
|
20501
|
+
label: "Send signups to",
|
|
20502
|
+
description: "Choose where new subscribers from this form should go.",
|
|
20503
|
+
defaultValue: "riverbank",
|
|
20504
|
+
required: true,
|
|
20505
|
+
ui: { intent: "behavior" },
|
|
20506
|
+
options: [
|
|
20507
|
+
{ value: "riverbank", label: "Riverbank newsletter" }
|
|
20508
|
+
]
|
|
20509
|
+
},
|
|
20424
20510
|
{
|
|
20425
20511
|
id: "listId",
|
|
20426
20512
|
type: "reference",
|
|
20427
20513
|
label: "Newsletter list",
|
|
20428
20514
|
description: "Select the list new subscribers should be added to.",
|
|
20429
|
-
required:
|
|
20515
|
+
required: false,
|
|
20430
20516
|
referenceKind: "newsletterList",
|
|
20431
20517
|
allowManualEntry: false,
|
|
20432
|
-
ui: {
|
|
20518
|
+
ui: {
|
|
20519
|
+
intent: "behavior",
|
|
20520
|
+
visibleWhen: { field: "destinationProvider", equals: "riverbank" }
|
|
20521
|
+
}
|
|
20522
|
+
},
|
|
20523
|
+
{
|
|
20524
|
+
id: "mailchimpAudienceId",
|
|
20525
|
+
type: "reference",
|
|
20526
|
+
label: "Mailchimp audience",
|
|
20527
|
+
description: "Choose the Mailchimp audience for new subscribers.",
|
|
20528
|
+
required: false,
|
|
20529
|
+
referenceKind: "mailchimpAudience",
|
|
20530
|
+
allowManualEntry: false,
|
|
20531
|
+
ui: {
|
|
20532
|
+
intent: "behavior",
|
|
20533
|
+
visibleWhen: { field: "destinationProvider", equals: "mailchimp" }
|
|
20534
|
+
}
|
|
20535
|
+
},
|
|
20536
|
+
{
|
|
20537
|
+
id: "mailchimpTags",
|
|
20538
|
+
type: "text",
|
|
20539
|
+
label: "Mailchimp tags",
|
|
20540
|
+
description: "Optional tags to apply in Mailchimp, separated by commas or semicolons.",
|
|
20541
|
+
ui: {
|
|
20542
|
+
intent: "behavior",
|
|
20543
|
+
visibleWhen: { field: "destinationProvider", equals: "mailchimp" }
|
|
20544
|
+
}
|
|
20433
20545
|
},
|
|
20434
20546
|
{
|
|
20435
20547
|
id: "preset",
|
|
@@ -20476,13 +20588,18 @@ var newsletterFormFragment = defineFragment({
|
|
|
20476
20588
|
id: "tags",
|
|
20477
20589
|
type: "text",
|
|
20478
20590
|
label: "Tags (optional)",
|
|
20479
|
-
description: "Optional tags to apply on subscribe (comma or semicolon separated)."
|
|
20591
|
+
description: "Optional tags to apply on subscribe (comma or semicolon separated).",
|
|
20592
|
+
ui: {
|
|
20593
|
+
intent: "behavior",
|
|
20594
|
+
visibleWhen: { field: "destinationProvider", equals: "riverbank" }
|
|
20595
|
+
}
|
|
20480
20596
|
}
|
|
20481
20597
|
],
|
|
20482
20598
|
layout: [
|
|
20483
20599
|
el(
|
|
20484
20600
|
"newsletter-form",
|
|
20485
20601
|
withApiBindings({
|
|
20602
|
+
destinationProvider: { $bind: { from: "destinationProvider" } },
|
|
20486
20603
|
listId: { $bind: { from: "listId" } },
|
|
20487
20604
|
preset: { $bind: { from: "preset" } },
|
|
20488
20605
|
includePhone: { $bind: { from: "includePhone" } },
|
|
@@ -26405,10 +26522,10 @@ var appointmentBookingBlockDefinition = {
|
|
|
26405
26522
|
};
|
|
26406
26523
|
|
|
26407
26524
|
// ../blocks/src/system/blocks/event-registration.ts
|
|
26408
|
-
import { z as
|
|
26525
|
+
import { z as z48 } from "zod";
|
|
26409
26526
|
|
|
26410
26527
|
// ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
26411
|
-
import { z as
|
|
26528
|
+
import { z as z44 } from "zod";
|
|
26412
26529
|
|
|
26413
26530
|
// ../blocks/src/lib/media.ts
|
|
26414
26531
|
import z40 from "zod";
|
|
@@ -26486,296 +26603,393 @@ var mediaSchema2 = z40.discriminatedUnion("type", [
|
|
|
26486
26603
|
archiveMediaSchema
|
|
26487
26604
|
]);
|
|
26488
26605
|
|
|
26489
|
-
// ../blocks/src/system/
|
|
26606
|
+
// ../blocks/src/system/manifest/richTextSchema.ts
|
|
26490
26607
|
import { z as z41 } from "zod";
|
|
26491
|
-
var
|
|
26608
|
+
var TipTapMarkSchema = z41.object({
|
|
26609
|
+
type: z41.string(),
|
|
26610
|
+
attrs: z41.record(z41.string(), z41.unknown()).optional()
|
|
26611
|
+
});
|
|
26612
|
+
var TipTapNodeSchema = z41.lazy(
|
|
26613
|
+
() => z41.object({
|
|
26614
|
+
type: z41.string(),
|
|
26615
|
+
content: z41.array(TipTapNodeSchema).optional(),
|
|
26616
|
+
text: z41.string().optional(),
|
|
26617
|
+
attrs: z41.record(z41.string(), z41.unknown()).optional(),
|
|
26618
|
+
marks: z41.array(TipTapMarkSchema).optional()
|
|
26619
|
+
})
|
|
26620
|
+
);
|
|
26621
|
+
var RichTextValueSchema = z41.union([
|
|
26622
|
+
// Canonical: TipTap document directly
|
|
26623
|
+
TipTapNodeSchema,
|
|
26624
|
+
// Legacy (read-tolerance only): wrapped in { doc: {...} }
|
|
26625
|
+
z41.object({
|
|
26626
|
+
doc: TipTapNodeSchema
|
|
26627
|
+
})
|
|
26628
|
+
]);
|
|
26629
|
+
var RichTextDocSchema = z41.object({
|
|
26630
|
+
type: z41.literal("doc"),
|
|
26631
|
+
content: z41.array(TipTapNodeSchema)
|
|
26632
|
+
});
|
|
26633
|
+
function unwrapRichTextRoot(value) {
|
|
26634
|
+
if (!isRecord4(value)) return value;
|
|
26635
|
+
if (!("doc" in value)) return value;
|
|
26636
|
+
const inner = value.doc;
|
|
26637
|
+
if (isRecord4(inner) && inner.type === "doc") return inner;
|
|
26638
|
+
return value;
|
|
26639
|
+
}
|
|
26640
|
+
function createHardBreakNode() {
|
|
26641
|
+
return { type: "hardBreak" };
|
|
26642
|
+
}
|
|
26643
|
+
function parseRichTextInlineMarkdown(text2) {
|
|
26644
|
+
const out = [];
|
|
26645
|
+
const pushText = (value, marks) => {
|
|
26646
|
+
if (!value) return;
|
|
26647
|
+
out.push(
|
|
26648
|
+
marks && marks.length > 0 ? { type: "text", text: value, marks } : { type: "text", text: value }
|
|
26649
|
+
);
|
|
26650
|
+
};
|
|
26651
|
+
let rest = text2;
|
|
26652
|
+
while (rest.length > 0) {
|
|
26653
|
+
const start = rest.indexOf("**");
|
|
26654
|
+
if (start === -1) {
|
|
26655
|
+
pushText(rest);
|
|
26656
|
+
break;
|
|
26657
|
+
}
|
|
26658
|
+
const end = rest.indexOf("**", start + 2);
|
|
26659
|
+
if (end === -1) {
|
|
26660
|
+
pushText(rest);
|
|
26661
|
+
break;
|
|
26662
|
+
}
|
|
26663
|
+
pushText(rest.slice(0, start));
|
|
26664
|
+
pushText(rest.slice(start + 2, end), [{ type: "bold" }]);
|
|
26665
|
+
rest = rest.slice(end + 2);
|
|
26666
|
+
}
|
|
26667
|
+
return out;
|
|
26668
|
+
}
|
|
26669
|
+
function parseRichTextParagraphInlineMarkdown(text2) {
|
|
26670
|
+
return text2.split("\n").flatMap((line, index) => {
|
|
26671
|
+
const lineNodes = parseRichTextInlineMarkdown(line.trim());
|
|
26672
|
+
return index === 0 ? lineNodes : [createHardBreakNode(), ...lineNodes];
|
|
26673
|
+
});
|
|
26674
|
+
}
|
|
26675
|
+
function createRichTextDocFromMarkdown(markdown) {
|
|
26676
|
+
const normalized = markdown.replace(/\r\n/g, "\n").trim();
|
|
26677
|
+
if (!normalized) return { type: "doc", content: [] };
|
|
26678
|
+
const paragraphs = normalized.split(/\n{2,}/).map((paragraph) => paragraph.trim()).filter(Boolean);
|
|
26679
|
+
return {
|
|
26680
|
+
type: "doc",
|
|
26681
|
+
content: paragraphs.map((paragraph) => {
|
|
26682
|
+
const inline2 = parseRichTextParagraphInlineMarkdown(paragraph);
|
|
26683
|
+
return inline2.length > 0 ? { type: "paragraph", content: inline2 } : { type: "paragraph" };
|
|
26684
|
+
})
|
|
26685
|
+
};
|
|
26686
|
+
}
|
|
26687
|
+
|
|
26688
|
+
// ../blocks/src/system/blocks/shared/bookingPaymentTerms.ts
|
|
26689
|
+
import { z as z42 } from "zod";
|
|
26690
|
+
var bookingDepositRefundPolicySchema = z42.enum([
|
|
26492
26691
|
"refundable",
|
|
26493
26692
|
"non_refundable"
|
|
26494
26693
|
]);
|
|
26495
|
-
var bookingInstalmentPlanSchema =
|
|
26496
|
-
|
|
26497
|
-
kind:
|
|
26498
|
-
depositAmountCents:
|
|
26694
|
+
var bookingInstalmentPlanSchema = z42.union([
|
|
26695
|
+
z42.object({
|
|
26696
|
+
kind: z42.literal("deposit_plus_one_remainder"),
|
|
26697
|
+
depositAmountCents: z42.number().int().min(0),
|
|
26499
26698
|
depositRefundability: bookingDepositRefundPolicySchema,
|
|
26500
|
-
remainderDueCount:
|
|
26501
|
-
intervalUnit:
|
|
26699
|
+
remainderDueCount: z42.number().int().positive(),
|
|
26700
|
+
intervalUnit: z42.enum(["day", "week", "month"])
|
|
26502
26701
|
}),
|
|
26503
|
-
|
|
26504
|
-
kind:
|
|
26505
|
-
depositAmountCents:
|
|
26702
|
+
z42.object({
|
|
26703
|
+
kind: z42.literal("deposit_plus_scheduled_instalments"),
|
|
26704
|
+
depositAmountCents: z42.number().int().min(0),
|
|
26506
26705
|
depositRefundability: bookingDepositRefundPolicySchema,
|
|
26507
|
-
instalmentCount:
|
|
26508
|
-
intervalCount:
|
|
26509
|
-
intervalUnit:
|
|
26706
|
+
instalmentCount: z42.number().int().positive(),
|
|
26707
|
+
intervalCount: z42.number().int().positive(),
|
|
26708
|
+
intervalUnit: z42.enum(["day", "week", "month"])
|
|
26510
26709
|
}),
|
|
26511
|
-
|
|
26512
|
-
kind:
|
|
26513
|
-
instalmentCount:
|
|
26514
|
-
intervalCount:
|
|
26515
|
-
intervalUnit:
|
|
26710
|
+
z42.object({
|
|
26711
|
+
kind: z42.literal("equal_scheduled_instalments"),
|
|
26712
|
+
instalmentCount: z42.number().int().positive(),
|
|
26713
|
+
intervalCount: z42.number().int().positive(),
|
|
26714
|
+
intervalUnit: z42.enum(["day", "week", "month"])
|
|
26516
26715
|
})
|
|
26517
26716
|
]);
|
|
26518
|
-
var bookingFlexibleBalanceDueDateRuleSchema =
|
|
26519
|
-
|
|
26520
|
-
kind:
|
|
26521
|
-
daysBeforeStart:
|
|
26717
|
+
var bookingFlexibleBalanceDueDateRuleSchema = z42.union([
|
|
26718
|
+
z42.object({
|
|
26719
|
+
kind: z42.literal("relative_to_start_date"),
|
|
26720
|
+
daysBeforeStart: z42.number().int().positive()
|
|
26522
26721
|
}),
|
|
26523
|
-
|
|
26524
|
-
kind:
|
|
26525
|
-
dueAt:
|
|
26722
|
+
z42.object({
|
|
26723
|
+
kind: z42.literal("fixed_calendar_date"),
|
|
26724
|
+
dueAt: z42.string().datetime()
|
|
26526
26725
|
})
|
|
26527
26726
|
]);
|
|
26528
|
-
var bookingFlexibleBalanceConfigSchema =
|
|
26529
|
-
upfrontAmountCents:
|
|
26727
|
+
var bookingFlexibleBalanceConfigSchema = z42.object({
|
|
26728
|
+
upfrontAmountCents: z42.number().int().min(0),
|
|
26530
26729
|
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
|
|
26531
26730
|
depositRefundability: bookingDepositRefundPolicySchema
|
|
26532
26731
|
});
|
|
26533
|
-
var blockBookingPaymentCollectionOptionSchema =
|
|
26534
|
-
|
|
26535
|
-
kind:
|
|
26732
|
+
var blockBookingPaymentCollectionOptionSchema = z42.union([
|
|
26733
|
+
z42.object({
|
|
26734
|
+
kind: z42.literal("upfront")
|
|
26536
26735
|
}),
|
|
26537
|
-
|
|
26538
|
-
kind:
|
|
26736
|
+
z42.object({
|
|
26737
|
+
kind: z42.literal("deferred_manual")
|
|
26539
26738
|
}),
|
|
26540
|
-
|
|
26541
|
-
kind:
|
|
26739
|
+
z42.object({
|
|
26740
|
+
kind: z42.literal("instalment_plan"),
|
|
26542
26741
|
plan: bookingInstalmentPlanSchema
|
|
26543
26742
|
}),
|
|
26544
|
-
|
|
26545
|
-
kind:
|
|
26743
|
+
z42.object({
|
|
26744
|
+
kind: z42.literal("flexible_balance"),
|
|
26546
26745
|
config: bookingFlexibleBalanceConfigSchema
|
|
26547
26746
|
})
|
|
26548
26747
|
]);
|
|
26549
|
-
var blockBookingPaymentTermsSchema =
|
|
26550
|
-
allowedOptions:
|
|
26748
|
+
var blockBookingPaymentTermsSchema = z42.object({
|
|
26749
|
+
allowedOptions: z42.array(blockBookingPaymentCollectionOptionSchema).min(1)
|
|
26551
26750
|
});
|
|
26552
26751
|
|
|
26553
26752
|
// ../blocks/src/system/blocks/courses/shared/schemas.ts
|
|
26554
|
-
import { z as
|
|
26555
|
-
var courseVenueSchema =
|
|
26556
|
-
id:
|
|
26557
|
-
name:
|
|
26558
|
-
address:
|
|
26753
|
+
import { z as z43 } from "zod";
|
|
26754
|
+
var courseVenueSchema = z43.object({
|
|
26755
|
+
id: z43.string(),
|
|
26756
|
+
name: z43.string(),
|
|
26757
|
+
address: z43.string().nullable()
|
|
26559
26758
|
});
|
|
26560
|
-
var courseSessionSchema =
|
|
26561
|
-
id:
|
|
26562
|
-
startsAt:
|
|
26563
|
-
endsAt:
|
|
26564
|
-
timeZone:
|
|
26565
|
-
capacityOverride:
|
|
26566
|
-
overrides:
|
|
26759
|
+
var courseSessionSchema = z43.object({
|
|
26760
|
+
id: z43.string(),
|
|
26761
|
+
startsAt: z43.string(),
|
|
26762
|
+
endsAt: z43.string(),
|
|
26763
|
+
timeZone: z43.string(),
|
|
26764
|
+
capacityOverride: z43.number().nullable().optional(),
|
|
26765
|
+
overrides: z43.record(z43.string(), z43.unknown()).nullable().optional()
|
|
26567
26766
|
});
|
|
26568
|
-
var courseTeamMemberSummarySchema =
|
|
26569
|
-
id:
|
|
26570
|
-
name:
|
|
26571
|
-
roleLabel:
|
|
26572
|
-
summary:
|
|
26573
|
-
profilePath:
|
|
26767
|
+
var courseTeamMemberSummarySchema = z43.object({
|
|
26768
|
+
id: z43.string(),
|
|
26769
|
+
name: z43.string(),
|
|
26770
|
+
roleLabel: z43.string().nullable(),
|
|
26771
|
+
summary: z43.string().nullable(),
|
|
26772
|
+
profilePath: z43.string().nullable()
|
|
26574
26773
|
});
|
|
26575
|
-
var coursePricingOptionSchema =
|
|
26576
|
-
id:
|
|
26577
|
-
name:
|
|
26578
|
-
description:
|
|
26579
|
-
priceAmount:
|
|
26580
|
-
isActive:
|
|
26581
|
-
sortOrder:
|
|
26582
|
-
capacityLimit:
|
|
26583
|
-
saleStartsAt:
|
|
26584
|
-
saleEndsAt:
|
|
26585
|
-
attendanceScope:
|
|
26774
|
+
var coursePricingOptionSchema = z43.object({
|
|
26775
|
+
id: z43.string(),
|
|
26776
|
+
name: z43.string(),
|
|
26777
|
+
description: z43.string().nullable(),
|
|
26778
|
+
priceAmount: z43.number(),
|
|
26779
|
+
isActive: z43.boolean(),
|
|
26780
|
+
sortOrder: z43.number(),
|
|
26781
|
+
capacityLimit: z43.number().nullable(),
|
|
26782
|
+
saleStartsAt: z43.string().nullable(),
|
|
26783
|
+
saleEndsAt: z43.string().nullable(),
|
|
26784
|
+
attendanceScope: z43.enum(["in_person", "online", "both"]).nullable().optional()
|
|
26586
26785
|
});
|
|
26587
|
-
var coursePricingSchema =
|
|
26588
|
-
bookingRequirement:
|
|
26589
|
-
pricingStrategy:
|
|
26590
|
-
currency:
|
|
26591
|
-
singlePriceAmount:
|
|
26786
|
+
var coursePricingSchema = z43.object({
|
|
26787
|
+
bookingRequirement: z43.enum(["none", "required"]),
|
|
26788
|
+
pricingStrategy: z43.enum(["free", "single", "tiered"]),
|
|
26789
|
+
currency: z43.string(),
|
|
26790
|
+
singlePriceAmount: z43.number().nullable(),
|
|
26592
26791
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
26593
|
-
options:
|
|
26792
|
+
options: z43.array(coursePricingOptionSchema)
|
|
26594
26793
|
});
|
|
26595
|
-
var publicCourseSchema =
|
|
26596
|
-
id:
|
|
26597
|
-
title:
|
|
26598
|
-
slug:
|
|
26599
|
-
description:
|
|
26600
|
-
teamMembers:
|
|
26601
|
-
enrollmentOpen:
|
|
26794
|
+
var publicCourseSchema = z43.object({
|
|
26795
|
+
id: z43.string(),
|
|
26796
|
+
title: z43.string(),
|
|
26797
|
+
slug: z43.string(),
|
|
26798
|
+
description: z43.unknown().nullable(),
|
|
26799
|
+
teamMembers: z43.array(courseTeamMemberSummarySchema).optional(),
|
|
26800
|
+
enrollmentOpen: z43.boolean(),
|
|
26602
26801
|
pricing: coursePricingSchema.optional(),
|
|
26603
|
-
priceCents:
|
|
26604
|
-
currency:
|
|
26802
|
+
priceCents: z43.number().nullable(),
|
|
26803
|
+
currency: z43.string(),
|
|
26605
26804
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
26606
|
-
enrollmentCapacity:
|
|
26607
|
-
acceptsMemberships:
|
|
26608
|
-
status:
|
|
26609
|
-
sessionsCount:
|
|
26610
|
-
enrolledCount:
|
|
26611
|
-
availableSpots:
|
|
26612
|
-
sessions:
|
|
26805
|
+
enrollmentCapacity: z43.number().nullable(),
|
|
26806
|
+
acceptsMemberships: z43.boolean(),
|
|
26807
|
+
status: z43.enum(["active", "draft", "cancelled"]),
|
|
26808
|
+
sessionsCount: z43.number(),
|
|
26809
|
+
enrolledCount: z43.number(),
|
|
26810
|
+
availableSpots: z43.number().nullable(),
|
|
26811
|
+
sessions: z43.array(courseSessionSchema),
|
|
26613
26812
|
venue: courseVenueSchema.nullable(),
|
|
26614
|
-
contentEntryId:
|
|
26813
|
+
contentEntryId: z43.string().nullable()
|
|
26615
26814
|
});
|
|
26616
|
-
var publicCoursesArraySchema =
|
|
26815
|
+
var publicCoursesArraySchema = z43.array(publicCourseSchema);
|
|
26617
26816
|
|
|
26618
26817
|
// ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
26619
|
-
var eventPresetSchema =
|
|
26620
|
-
var eventScheduleScopeSchema =
|
|
26621
|
-
var eventDestinationModeSchema =
|
|
26622
|
-
var eventVenueSchema =
|
|
26623
|
-
id:
|
|
26624
|
-
name:
|
|
26625
|
-
address:
|
|
26626
|
-
location:
|
|
26627
|
-
lat:
|
|
26628
|
-
lng:
|
|
26818
|
+
var eventPresetSchema = z44.enum(["event", "class", "workshop", "retreat", "performance"]);
|
|
26819
|
+
var eventScheduleScopeSchema = z44.enum(["recurring", "oneOff"]);
|
|
26820
|
+
var eventDestinationModeSchema = z44.enum(["cms-managed", "system-managed"]);
|
|
26821
|
+
var eventVenueSchema = z44.object({
|
|
26822
|
+
id: z44.string(),
|
|
26823
|
+
name: z44.string(),
|
|
26824
|
+
address: z44.string().nullable(),
|
|
26825
|
+
location: z44.object({
|
|
26826
|
+
lat: z44.number(),
|
|
26827
|
+
lng: z44.number()
|
|
26629
26828
|
}).nullable()
|
|
26630
26829
|
});
|
|
26631
|
-
var eventCategorySchema =
|
|
26632
|
-
id:
|
|
26633
|
-
name:
|
|
26634
|
-
color:
|
|
26830
|
+
var eventCategorySchema = z44.object({
|
|
26831
|
+
id: z44.string(),
|
|
26832
|
+
name: z44.string(),
|
|
26833
|
+
color: z44.string().nullable()
|
|
26635
26834
|
});
|
|
26636
|
-
var pricingTypeSchema =
|
|
26637
|
-
var accessRestrictionSchema =
|
|
26638
|
-
var eventPricingModeSchema =
|
|
26639
|
-
var publicCoursePriceDisplaySchema =
|
|
26640
|
-
|
|
26641
|
-
|
|
26642
|
-
|
|
26643
|
-
|
|
26835
|
+
var pricingTypeSchema = z44.enum(["free", "paid"]);
|
|
26836
|
+
var accessRestrictionSchema = z44.enum(["none", "category"]);
|
|
26837
|
+
var eventPricingModeSchema = z44.enum(["single", "ticket_types"]);
|
|
26838
|
+
var publicCoursePriceDisplaySchema = z44.discriminatedUnion("kind", [
|
|
26839
|
+
z44.object({ kind: z44.literal("free"), currency: z44.string() }),
|
|
26840
|
+
z44.object({ kind: z44.literal("exact"), amount: z44.number(), currency: z44.string() }),
|
|
26841
|
+
z44.object({ kind: z44.literal("from"), amount: z44.number(), currency: z44.string() }),
|
|
26842
|
+
z44.object({ kind: z44.literal("unavailable"), currency: z44.string() })
|
|
26644
26843
|
]);
|
|
26645
|
-
var publicEventPriceDisplaySchema =
|
|
26646
|
-
|
|
26647
|
-
|
|
26648
|
-
|
|
26649
|
-
|
|
26650
|
-
|
|
26651
|
-
|
|
26844
|
+
var publicEventPriceDisplaySchema = z44.discriminatedUnion("kind", [
|
|
26845
|
+
z44.object({ kind: z44.literal("free"), currency: z44.string() }),
|
|
26846
|
+
z44.object({ kind: z44.literal("exact"), amount: z44.number(), currency: z44.string() }),
|
|
26847
|
+
z44.object({ kind: z44.literal("from"), amount: z44.number(), currency: z44.string() }),
|
|
26848
|
+
z44.object({ kind: z44.literal("range"), minAmount: z44.number(), maxAmount: z44.number(), currency: z44.string() }),
|
|
26849
|
+
z44.object({
|
|
26850
|
+
kind: z44.literal("mixed"),
|
|
26851
|
+
paidFromAmount: z44.number(),
|
|
26852
|
+
paidToAmount: z44.number(),
|
|
26853
|
+
currency: z44.string()
|
|
26854
|
+
}),
|
|
26855
|
+
z44.object({ kind: z44.literal("unavailable"), currency: z44.string() }),
|
|
26856
|
+
z44.object({ kind: z44.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
26652
26857
|
]);
|
|
26653
|
-
var publicEventTicketTypePriceDisplaySchema =
|
|
26654
|
-
|
|
26655
|
-
|
|
26656
|
-
|
|
26657
|
-
|
|
26658
|
-
|
|
26858
|
+
var publicEventTicketTypePriceDisplaySchema = z44.union([
|
|
26859
|
+
z44.object({ kind: z44.literal("free"), currency: z44.string() }),
|
|
26860
|
+
z44.object({ kind: z44.literal("exact"), amount: z44.number(), currency: z44.string() }),
|
|
26861
|
+
z44.object({ kind: z44.literal("from"), amount: z44.number(), currency: z44.string() }),
|
|
26862
|
+
z44.object({ kind: z44.literal("range"), minAmount: z44.number(), maxAmount: z44.number(), currency: z44.string() }),
|
|
26863
|
+
z44.object({
|
|
26864
|
+
kind: z44.literal("mixed"),
|
|
26865
|
+
paidFromAmount: z44.number(),
|
|
26866
|
+
paidToAmount: z44.number(),
|
|
26867
|
+
currency: z44.string()
|
|
26868
|
+
}),
|
|
26869
|
+
z44.object({ kind: z44.literal("unavailable"), currency: z44.string() })
|
|
26659
26870
|
]);
|
|
26660
|
-
var publicEventAttendanceModeSchema =
|
|
26661
|
-
var publicEventAttendanceModeAvailabilitySchema =
|
|
26871
|
+
var publicEventAttendanceModeSchema = z44.enum(["in_person", "online"]);
|
|
26872
|
+
var publicEventAttendanceModeAvailabilitySchema = z44.object({
|
|
26662
26873
|
mode: publicEventAttendanceModeSchema,
|
|
26663
|
-
capacity:
|
|
26664
|
-
registeredCount:
|
|
26665
|
-
availableSpots:
|
|
26666
|
-
waitlistEnabled:
|
|
26874
|
+
capacity: z44.number().nullable(),
|
|
26875
|
+
registeredCount: z44.number(),
|
|
26876
|
+
availableSpots: z44.number().nullable(),
|
|
26877
|
+
waitlistEnabled: z44.boolean()
|
|
26667
26878
|
});
|
|
26668
|
-
var publicEventTicketTypeAvailabilitySchema =
|
|
26669
|
-
|
|
26670
|
-
kind:
|
|
26671
|
-
remainingCapacity:
|
|
26879
|
+
var publicEventTicketTypeAvailabilitySchema = z44.union([
|
|
26880
|
+
z44.object({
|
|
26881
|
+
kind: z44.literal("available"),
|
|
26882
|
+
remainingCapacity: z44.number().nullable()
|
|
26672
26883
|
}),
|
|
26673
|
-
|
|
26674
|
-
kind:
|
|
26675
|
-
reason:
|
|
26676
|
-
remainingCapacity:
|
|
26884
|
+
z44.object({
|
|
26885
|
+
kind: z44.literal("unavailable"),
|
|
26886
|
+
reason: z44.enum(["inactive", "not_on_sale_yet", "sale_ended", "sold_out", "event_sold_out"]),
|
|
26887
|
+
remainingCapacity: z44.number().nullable()
|
|
26677
26888
|
})
|
|
26678
26889
|
]);
|
|
26679
|
-
var publicEventTicketTypeSchema =
|
|
26680
|
-
id:
|
|
26681
|
-
siteId:
|
|
26682
|
-
eventSeriesId:
|
|
26683
|
-
name:
|
|
26684
|
-
description:
|
|
26685
|
-
priceAmount:
|
|
26686
|
-
isActive:
|
|
26687
|
-
sortOrder:
|
|
26688
|
-
capacityMode:
|
|
26689
|
-
capacityLimit:
|
|
26690
|
-
attendanceScope:
|
|
26691
|
-
saleStartsAt:
|
|
26692
|
-
saleEndsAt:
|
|
26890
|
+
var publicEventTicketTypeSchema = z44.object({
|
|
26891
|
+
id: z44.string(),
|
|
26892
|
+
siteId: z44.string(),
|
|
26893
|
+
eventSeriesId: z44.string(),
|
|
26894
|
+
name: z44.string(),
|
|
26895
|
+
description: z44.string().nullable(),
|
|
26896
|
+
priceAmount: z44.number(),
|
|
26897
|
+
isActive: z44.boolean(),
|
|
26898
|
+
sortOrder: z44.number(),
|
|
26899
|
+
capacityMode: z44.enum(["limited", "unlimited"]),
|
|
26900
|
+
capacityLimit: z44.number().nullable(),
|
|
26901
|
+
attendanceScope: z44.enum(["in_person", "online", "both"]).optional(),
|
|
26902
|
+
saleStartsAt: z44.string().nullable(),
|
|
26903
|
+
saleEndsAt: z44.string().nullable(),
|
|
26693
26904
|
availability: publicEventTicketTypeAvailabilitySchema,
|
|
26694
|
-
createdAt:
|
|
26695
|
-
updatedAt:
|
|
26905
|
+
createdAt: z44.string(),
|
|
26906
|
+
updatedAt: z44.string()
|
|
26696
26907
|
});
|
|
26697
|
-
var publicEventPricingSchema =
|
|
26698
|
-
|
|
26699
|
-
kind:
|
|
26700
|
-
currency:
|
|
26701
|
-
display:
|
|
26908
|
+
var publicEventPricingSchema = z44.discriminatedUnion("kind", [
|
|
26909
|
+
z44.object({
|
|
26910
|
+
kind: z44.literal("drop_in"),
|
|
26911
|
+
currency: z44.string(),
|
|
26912
|
+
display: z44.object({ kind: z44.literal("free"), currency: z44.string() })
|
|
26702
26913
|
}),
|
|
26703
|
-
|
|
26704
|
-
kind:
|
|
26705
|
-
currency:
|
|
26706
|
-
display:
|
|
26914
|
+
z44.object({
|
|
26915
|
+
kind: z44.literal("free_registration"),
|
|
26916
|
+
currency: z44.string(),
|
|
26917
|
+
display: z44.object({ kind: z44.literal("free"), currency: z44.string() })
|
|
26707
26918
|
}),
|
|
26708
|
-
|
|
26709
|
-
kind:
|
|
26710
|
-
amount:
|
|
26711
|
-
currency:
|
|
26712
|
-
display:
|
|
26919
|
+
z44.object({
|
|
26920
|
+
kind: z44.literal("single_paid"),
|
|
26921
|
+
amount: z44.number(),
|
|
26922
|
+
currency: z44.string(),
|
|
26923
|
+
display: z44.object({ kind: z44.literal("exact"), amount: z44.number(), currency: z44.string() })
|
|
26713
26924
|
}),
|
|
26714
|
-
|
|
26715
|
-
kind:
|
|
26716
|
-
currency:
|
|
26717
|
-
ticketTypes:
|
|
26925
|
+
z44.object({
|
|
26926
|
+
kind: z44.literal("ticket_types"),
|
|
26927
|
+
currency: z44.string(),
|
|
26928
|
+
ticketTypes: z44.array(publicEventTicketTypeSchema),
|
|
26718
26929
|
display: publicEventTicketTypePriceDisplaySchema
|
|
26719
26930
|
}),
|
|
26720
|
-
|
|
26721
|
-
kind:
|
|
26722
|
-
display:
|
|
26931
|
+
z44.object({
|
|
26932
|
+
kind: z44.literal("course"),
|
|
26933
|
+
display: z44.object({ kind: z44.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
26723
26934
|
})
|
|
26724
26935
|
]);
|
|
26725
|
-
var publicTeamMemberSummarySchema =
|
|
26726
|
-
id:
|
|
26727
|
-
name:
|
|
26728
|
-
roleLabel:
|
|
26729
|
-
summary:
|
|
26730
|
-
profilePath:
|
|
26936
|
+
var publicTeamMemberSummarySchema = z44.object({
|
|
26937
|
+
id: z44.string(),
|
|
26938
|
+
name: z44.string(),
|
|
26939
|
+
roleLabel: z44.string().nullable(),
|
|
26940
|
+
summary: z44.string().nullable(),
|
|
26941
|
+
profilePath: z44.string().nullable()
|
|
26731
26942
|
});
|
|
26732
|
-
var publicEventSchema =
|
|
26733
|
-
kind:
|
|
26943
|
+
var publicEventSchema = z44.object({
|
|
26944
|
+
kind: z44.enum(["event", "course_session"]).optional(),
|
|
26734
26945
|
eventPreset: eventPresetSchema.optional(),
|
|
26735
26946
|
eventDestinationMode: eventDestinationModeSchema.optional(),
|
|
26736
26947
|
scheduleScope: eventScheduleScopeSchema.optional(),
|
|
26737
|
-
id:
|
|
26738
|
-
occurrenceId:
|
|
26739
|
-
seriesId:
|
|
26740
|
-
title:
|
|
26741
|
-
description:
|
|
26742
|
-
|
|
26743
|
-
|
|
26744
|
-
|
|
26948
|
+
id: z44.string(),
|
|
26949
|
+
occurrenceId: z44.string(),
|
|
26950
|
+
seriesId: z44.string(),
|
|
26951
|
+
title: z44.string(),
|
|
26952
|
+
description: z44.string().nullable(),
|
|
26953
|
+
content: z44.object({
|
|
26954
|
+
body: RichTextDocSchema.nullable().optional()
|
|
26955
|
+
}).optional(),
|
|
26956
|
+
presentation: z44.object({
|
|
26957
|
+
cardTitleOverride: z44.string().nullable().optional(),
|
|
26958
|
+
summary: z44.string().nullable().optional(),
|
|
26745
26959
|
image: mediaSchema2.nullable().optional()
|
|
26746
26960
|
}).optional(),
|
|
26747
|
-
slug:
|
|
26748
|
-
path:
|
|
26749
|
-
requiresRegistration:
|
|
26750
|
-
deliveryMode:
|
|
26751
|
-
attendanceModes:
|
|
26752
|
-
startsAt:
|
|
26753
|
-
endsAt:
|
|
26754
|
-
capacity:
|
|
26755
|
-
registeredCount:
|
|
26756
|
-
availableSpots:
|
|
26757
|
-
waitlistEnabled:
|
|
26961
|
+
slug: z44.string(),
|
|
26962
|
+
path: z44.string(),
|
|
26963
|
+
requiresRegistration: z44.boolean(),
|
|
26964
|
+
deliveryMode: z44.enum(["in_person", "online", "hybrid"]),
|
|
26965
|
+
attendanceModes: z44.array(publicEventAttendanceModeAvailabilitySchema),
|
|
26966
|
+
startsAt: z44.string(),
|
|
26967
|
+
endsAt: z44.string(),
|
|
26968
|
+
capacity: z44.number().nullable(),
|
|
26969
|
+
registeredCount: z44.number(),
|
|
26970
|
+
availableSpots: z44.number().nullable(),
|
|
26971
|
+
waitlistEnabled: z44.boolean(),
|
|
26758
26972
|
venue: eventVenueSchema.nullable(),
|
|
26759
26973
|
eventCategory: eventCategorySchema.nullable(),
|
|
26760
|
-
teamMembers:
|
|
26761
|
-
status:
|
|
26762
|
-
timeZone:
|
|
26974
|
+
teamMembers: z44.array(publicTeamMemberSummarySchema).optional(),
|
|
26975
|
+
status: z44.enum(["active", "draft", "archived"]).optional(),
|
|
26976
|
+
timeZone: z44.string(),
|
|
26763
26977
|
pricing: publicEventPricingSchema,
|
|
26764
26978
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
26765
26979
|
accessRestriction: accessRestrictionSchema,
|
|
26766
|
-
allowedCategoryIds:
|
|
26767
|
-
requireGuestDetails:
|
|
26768
|
-
acceptsPasses:
|
|
26769
|
-
acceptsMemberships:
|
|
26770
|
-
course:
|
|
26771
|
-
id:
|
|
26980
|
+
allowedCategoryIds: z44.array(z44.string()),
|
|
26981
|
+
requireGuestDetails: z44.boolean().optional(),
|
|
26982
|
+
acceptsPasses: z44.boolean().optional(),
|
|
26983
|
+
acceptsMemberships: z44.boolean().optional(),
|
|
26984
|
+
course: z44.object({
|
|
26985
|
+
id: z44.string(),
|
|
26772
26986
|
pricing: coursePricingSchema.optional(),
|
|
26773
|
-
priceCents:
|
|
26774
|
-
currency:
|
|
26775
|
-
enrollmentOpen:
|
|
26987
|
+
priceCents: z44.number().nullable(),
|
|
26988
|
+
currency: z44.string(),
|
|
26989
|
+
enrollmentOpen: z44.boolean()
|
|
26776
26990
|
}).nullable().optional()
|
|
26777
26991
|
});
|
|
26778
|
-
var publicEventsArraySchema =
|
|
26992
|
+
var publicEventsArraySchema = z44.array(publicEventSchema);
|
|
26779
26993
|
|
|
26780
26994
|
// ../blocks/src/system/blocks/events/shared/fields.ts
|
|
26781
26995
|
var cardVariantOptions2 = cardVariantRoleValues.map((value) => ({
|
|
@@ -26979,19 +27193,19 @@ function normalizeEventStaffMemberId(value) {
|
|
|
26979
27193
|
}
|
|
26980
27194
|
|
|
26981
27195
|
// ../blocks/src/system/blocks/event-registration.shared.ts
|
|
26982
|
-
import { z as
|
|
26983
|
-
var occurrenceContextSchema =
|
|
26984
|
-
id:
|
|
26985
|
-
seriesId:
|
|
26986
|
-
startsAt:
|
|
26987
|
-
endsAt:
|
|
26988
|
-
timeZone:
|
|
26989
|
-
capacityOverride:
|
|
26990
|
-
overrides:
|
|
27196
|
+
import { z as z45 } from "zod";
|
|
27197
|
+
var occurrenceContextSchema = z45.object({
|
|
27198
|
+
id: z45.string(),
|
|
27199
|
+
seriesId: z45.string(),
|
|
27200
|
+
startsAt: z45.string(),
|
|
27201
|
+
endsAt: z45.string(),
|
|
27202
|
+
timeZone: z45.string(),
|
|
27203
|
+
capacityOverride: z45.number().nullable().optional(),
|
|
27204
|
+
overrides: z45.record(z45.string(), z45.unknown()).nullable().optional()
|
|
26991
27205
|
}).nullable();
|
|
26992
27206
|
|
|
26993
27207
|
// ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
26994
|
-
import { z as
|
|
27208
|
+
import { z as z47 } from "zod";
|
|
26995
27209
|
|
|
26996
27210
|
// ../blocks/src/system/constants/events.ts
|
|
26997
27211
|
var EVENT_CONTENT_TYPE_SLUGS = ["event", "events"];
|
|
@@ -27089,10 +27303,21 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
27089
27303
|
amount: readAmount(value.amount) ?? 0,
|
|
27090
27304
|
currency: displayCurrency
|
|
27091
27305
|
} : { kind: "unavailable", currency };
|
|
27306
|
+
case "range": {
|
|
27307
|
+
const minAmount = readAmount(value.minAmount);
|
|
27308
|
+
const maxAmount = readAmount(value.maxAmount);
|
|
27309
|
+
return minAmount !== null && maxAmount !== null ? {
|
|
27310
|
+
kind: "range",
|
|
27311
|
+
minAmount,
|
|
27312
|
+
maxAmount,
|
|
27313
|
+
currency: displayCurrency
|
|
27314
|
+
} : { kind: "unavailable", currency };
|
|
27315
|
+
}
|
|
27092
27316
|
case "mixed":
|
|
27093
27317
|
return readAmount(value.paidFromAmount) !== null ? {
|
|
27094
27318
|
kind: "mixed",
|
|
27095
27319
|
paidFromAmount: readAmount(value.paidFromAmount) ?? 0,
|
|
27320
|
+
paidToAmount: readAmount(value.paidToAmount) ?? readAmount(value.paidFromAmount) ?? 0,
|
|
27096
27321
|
currency: displayCurrency
|
|
27097
27322
|
} : { kind: "unavailable", currency };
|
|
27098
27323
|
case "unavailable":
|
|
@@ -27134,16 +27359,16 @@ function readAmount(value) {
|
|
|
27134
27359
|
}
|
|
27135
27360
|
|
|
27136
27361
|
// ../blocks/src/system/runtime/nodes/shared/contract-schemas.ts
|
|
27137
|
-
import { z as
|
|
27138
|
-
var previewStageSchema =
|
|
27139
|
-
var registrationButtonVariantSchema =
|
|
27140
|
-
var eventButtonVariantSchema =
|
|
27141
|
-
var eventLayoutSchema =
|
|
27142
|
-
var eventCalendarDisplayModeSchema =
|
|
27143
|
-
var columnOptionSchema =
|
|
27144
|
-
var weekStartSchema =
|
|
27145
|
-
var filterAutoShowSchema =
|
|
27146
|
-
var calendarTabViewsSchema =
|
|
27362
|
+
import { z as z46 } from "zod";
|
|
27363
|
+
var previewStageSchema = z46.enum(["preview", "published"]);
|
|
27364
|
+
var registrationButtonVariantSchema = z46.enum(["primary", "secondary", "outline"]);
|
|
27365
|
+
var eventButtonVariantSchema = z46.enum(["primary", "secondary", "outline", "link"]);
|
|
27366
|
+
var eventLayoutSchema = z46.enum(eventCalendarListLayoutValues);
|
|
27367
|
+
var eventCalendarDisplayModeSchema = z46.enum(eventCalendarDisplayModeValues);
|
|
27368
|
+
var columnOptionSchema = z46.enum(["2", "3", "4"]);
|
|
27369
|
+
var weekStartSchema = z46.enum(["sunday", "monday"]);
|
|
27370
|
+
var filterAutoShowSchema = z46.enum(["auto", "always", "never"]);
|
|
27371
|
+
var calendarTabViewsSchema = z46.enum(["both", "month", "week"]);
|
|
27147
27372
|
|
|
27148
27373
|
// ../blocks/src/system/runtime/nodes/event-registration/wizardSteps.ts
|
|
27149
27374
|
function getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep) {
|
|
@@ -27203,66 +27428,68 @@ function toRegistrationEvents(events) {
|
|
|
27203
27428
|
// ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
27204
27429
|
var EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS = ["Date", "Tickets", "Details"];
|
|
27205
27430
|
var EVENT_REGISTRATION_SHELL_STEP_LABELS = ["Event", "Date", "Tickets", "Details", "Payment"];
|
|
27206
|
-
var contentEntrySchema =
|
|
27207
|
-
id:
|
|
27208
|
-
slug:
|
|
27209
|
-
contentTypeSlug:
|
|
27431
|
+
var contentEntrySchema = z47.object({
|
|
27432
|
+
id: z47.string(),
|
|
27433
|
+
slug: z47.string(),
|
|
27434
|
+
contentTypeSlug: z47.string()
|
|
27210
27435
|
});
|
|
27211
|
-
var eventRegistrationPublicEventSchema =
|
|
27436
|
+
var eventRegistrationPublicEventSchema = z47.preprocess(
|
|
27212
27437
|
normalizeEventRegistrationEventInput,
|
|
27213
27438
|
publicEventSchema
|
|
27214
27439
|
);
|
|
27215
|
-
var eventRegistrationSourceSchema =
|
|
27216
|
-
siteId:
|
|
27217
|
-
apiBaseUrl:
|
|
27218
|
-
portalToken:
|
|
27219
|
-
previewToken:
|
|
27440
|
+
var eventRegistrationSourceSchema = z47.object({
|
|
27441
|
+
siteId: z47.string().optional(),
|
|
27442
|
+
apiBaseUrl: z47.string().optional(),
|
|
27443
|
+
portalToken: z47.string().nullable().optional(),
|
|
27444
|
+
previewToken: z47.string().nullable().optional(),
|
|
27220
27445
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
27221
27446
|
contentEntry: contentEntrySchema.nullable().optional(),
|
|
27222
|
-
events:
|
|
27223
|
-
className:
|
|
27224
|
-
buttonText:
|
|
27225
|
-
maxTickets:
|
|
27226
|
-
showVenue:
|
|
27227
|
-
showCapacity:
|
|
27228
|
-
successMessage:
|
|
27229
|
-
waitlistMessage:
|
|
27447
|
+
events: z47.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
27448
|
+
className: z47.string().nullable().optional(),
|
|
27449
|
+
buttonText: z47.string().nullable().optional(),
|
|
27450
|
+
maxTickets: z47.string().nullable().optional(),
|
|
27451
|
+
showVenue: z47.boolean().optional(),
|
|
27452
|
+
showCapacity: z47.boolean().optional(),
|
|
27453
|
+
successMessage: z47.string().optional(),
|
|
27454
|
+
waitlistMessage: z47.string().optional(),
|
|
27230
27455
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
27231
|
-
|
|
27456
|
+
overlayEnabled: z47.boolean().optional(),
|
|
27457
|
+
spamProtectionEnabled: z47.boolean().optional(),
|
|
27232
27458
|
stage: previewStageSchema.optional(),
|
|
27233
|
-
supportEmail:
|
|
27459
|
+
supportEmail: z47.string().optional()
|
|
27234
27460
|
});
|
|
27235
|
-
var eventRegistrationDisplaySchema =
|
|
27236
|
-
kind:
|
|
27237
|
-
state:
|
|
27238
|
-
className:
|
|
27239
|
-
titleText:
|
|
27240
|
-
bodyText:
|
|
27241
|
-
stepLabels:
|
|
27242
|
-
summaryButtonText:
|
|
27461
|
+
var eventRegistrationDisplaySchema = z47.object({
|
|
27462
|
+
kind: z47.literal("event-registration"),
|
|
27463
|
+
state: z47.literal("generic-shell"),
|
|
27464
|
+
className: z47.string().nullable(),
|
|
27465
|
+
titleText: z47.string(),
|
|
27466
|
+
bodyText: z47.string(),
|
|
27467
|
+
stepLabels: z47.array(z47.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
|
|
27468
|
+
summaryButtonText: z47.string()
|
|
27243
27469
|
});
|
|
27244
|
-
var eventRegistrationHydrationSchema =
|
|
27470
|
+
var eventRegistrationHydrationSchema = z47.object({
|
|
27245
27471
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
27246
27472
|
contentEntry: contentEntrySchema.nullable().optional(),
|
|
27247
|
-
events:
|
|
27248
|
-
maxTickets:
|
|
27249
|
-
showVenue:
|
|
27250
|
-
showCapacity:
|
|
27251
|
-
successMessage:
|
|
27252
|
-
waitlistMessage:
|
|
27473
|
+
events: z47.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
27474
|
+
maxTickets: z47.string().optional(),
|
|
27475
|
+
showVenue: z47.boolean().optional(),
|
|
27476
|
+
showCapacity: z47.boolean().optional(),
|
|
27477
|
+
successMessage: z47.string().optional(),
|
|
27478
|
+
waitlistMessage: z47.string().optional(),
|
|
27253
27479
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
27254
|
-
|
|
27255
|
-
|
|
27480
|
+
overlayEnabled: z47.boolean().optional(),
|
|
27481
|
+
spamProtectionEnabled: z47.boolean().optional(),
|
|
27482
|
+
supportEmail: z47.string().optional()
|
|
27256
27483
|
});
|
|
27257
|
-
var eventRegistrationRenderSchema =
|
|
27484
|
+
var eventRegistrationRenderSchema = z47.object({
|
|
27258
27485
|
display: eventRegistrationDisplaySchema,
|
|
27259
27486
|
hydration: eventRegistrationHydrationSchema
|
|
27260
27487
|
});
|
|
27261
|
-
var eventRegistrationIslandMetaCodec = createZodCodec(
|
|
27262
|
-
siteId:
|
|
27263
|
-
apiBaseUrl:
|
|
27264
|
-
portalToken:
|
|
27265
|
-
previewToken:
|
|
27488
|
+
var eventRegistrationIslandMetaCodec = createZodCodec(z47.object({
|
|
27489
|
+
siteId: z47.string().optional(),
|
|
27490
|
+
apiBaseUrl: z47.string().optional(),
|
|
27491
|
+
portalToken: z47.string().nullable().optional(),
|
|
27492
|
+
previewToken: z47.string().nullable().optional(),
|
|
27266
27493
|
stage: previewStageSchema.optional()
|
|
27267
27494
|
}));
|
|
27268
27495
|
var eventRegistrationIslandMetaKeys = defineInteractiveIslandMetaKeys(
|
|
@@ -27366,6 +27593,7 @@ var eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
27366
27593
|
successMessage: source.successMessage,
|
|
27367
27594
|
waitlistMessage: source.waitlistMessage,
|
|
27368
27595
|
buttonVariant: source.buttonVariant,
|
|
27596
|
+
overlayEnabled: source.overlayEnabled,
|
|
27369
27597
|
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
27370
27598
|
supportEmail: source.supportEmail
|
|
27371
27599
|
}
|
|
@@ -27555,6 +27783,12 @@ var eventRegistrationManifest = createBlockManifest({
|
|
|
27555
27783
|
buttonVariant: {
|
|
27556
27784
|
$bind: { from: "content.buttonVariant", fallback: "primary" }
|
|
27557
27785
|
},
|
|
27786
|
+
overlayEnabled: {
|
|
27787
|
+
$bind: {
|
|
27788
|
+
from: "$root.eventRegistrationOverlayEnabled",
|
|
27789
|
+
fallback: false
|
|
27790
|
+
}
|
|
27791
|
+
},
|
|
27558
27792
|
// Event data from loader
|
|
27559
27793
|
events: { $bind: { from: "data.events" } },
|
|
27560
27794
|
// Stage for preview mode (allows registering for draft events)
|
|
@@ -27575,7 +27809,7 @@ var eventRegistrationBlockDefinition = {
|
|
|
27575
27809
|
manifest: eventRegistrationManifest,
|
|
27576
27810
|
runtime: eventRegistrationBlockRuntime,
|
|
27577
27811
|
dataSchemas: {
|
|
27578
|
-
events:
|
|
27812
|
+
events: z48.array(publicEventSchema).optional(),
|
|
27579
27813
|
occurrenceContext: occurrenceContextSchema.optional()
|
|
27580
27814
|
},
|
|
27581
27815
|
dataLoaders: {
|
|
@@ -27702,29 +27936,7 @@ function resolveCoursePricingState(course, selectedPricingOptionId, nowInput = {
|
|
|
27702
27936
|
}
|
|
27703
27937
|
}
|
|
27704
27938
|
function formatCoursePriceDisplay(display, locale) {
|
|
27705
|
-
|
|
27706
|
-
case "free":
|
|
27707
|
-
return "Free";
|
|
27708
|
-
case "unavailable":
|
|
27709
|
-
return "Pricing unavailable";
|
|
27710
|
-
case "exact":
|
|
27711
|
-
return formatCourseCurrencyAmount(display.amount, display.currency, { locale });
|
|
27712
|
-
case "from":
|
|
27713
|
-
return `From ${formatCourseCurrencyAmount(display.amount, display.currency, { locale })}`;
|
|
27714
|
-
}
|
|
27715
|
-
}
|
|
27716
|
-
function formatCourseCurrencyAmount(amount, currency, options) {
|
|
27717
|
-
const {
|
|
27718
|
-
locale = "en-US",
|
|
27719
|
-
minimumFractionDigits,
|
|
27720
|
-
maximumFractionDigits
|
|
27721
|
-
} = options ?? {};
|
|
27722
|
-
return new Intl.NumberFormat(locale, {
|
|
27723
|
-
style: "currency",
|
|
27724
|
-
currency: currency.toUpperCase(),
|
|
27725
|
-
...minimumFractionDigits === void 0 ? {} : { minimumFractionDigits },
|
|
27726
|
-
...maximumFractionDigits === void 0 ? {} : { maximumFractionDigits }
|
|
27727
|
-
}).format(amount / 100);
|
|
27939
|
+
return formatBookingPriceDisplay(display, { decimals: "exact", locale });
|
|
27728
27940
|
}
|
|
27729
27941
|
function formatCoursePriceAmount(amount, currency, locale) {
|
|
27730
27942
|
return formatCoursePriceDisplay(
|
|
@@ -27734,73 +27946,73 @@ function formatCoursePriceAmount(amount, currency, locale) {
|
|
|
27734
27946
|
}
|
|
27735
27947
|
|
|
27736
27948
|
// ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
27737
|
-
import { z as
|
|
27738
|
-
var contentEntrySchema2 =
|
|
27739
|
-
id:
|
|
27740
|
-
slug:
|
|
27741
|
-
contentTypeSlug:
|
|
27949
|
+
import { z as z49 } from "zod";
|
|
27950
|
+
var contentEntrySchema2 = z49.object({
|
|
27951
|
+
id: z49.string(),
|
|
27952
|
+
slug: z49.string(),
|
|
27953
|
+
contentTypeSlug: z49.string()
|
|
27742
27954
|
});
|
|
27743
|
-
var courseEntrySubrouteContextSchema =
|
|
27744
|
-
|
|
27745
|
-
kind:
|
|
27746
|
-
run:
|
|
27747
|
-
courseId:
|
|
27748
|
-
seriesId:
|
|
27749
|
-
runSlug:
|
|
27750
|
-
runName:
|
|
27955
|
+
var courseEntrySubrouteContextSchema = z49.union([
|
|
27956
|
+
z49.object({
|
|
27957
|
+
kind: z49.literal("course-run"),
|
|
27958
|
+
run: z49.object({
|
|
27959
|
+
courseId: z49.string(),
|
|
27960
|
+
seriesId: z49.string(),
|
|
27961
|
+
runSlug: z49.string(),
|
|
27962
|
+
runName: z49.string().nullable()
|
|
27751
27963
|
})
|
|
27752
27964
|
}),
|
|
27753
|
-
|
|
27754
|
-
kind:
|
|
27965
|
+
z49.object({
|
|
27966
|
+
kind: z49.literal("event-occurrence"),
|
|
27755
27967
|
occurrence: occurrenceContextSchema
|
|
27756
27968
|
})
|
|
27757
27969
|
]);
|
|
27758
|
-
var courseRegistrationSourceSchema =
|
|
27759
|
-
siteId:
|
|
27760
|
-
apiBaseUrl:
|
|
27761
|
-
portalToken:
|
|
27970
|
+
var courseRegistrationSourceSchema = z49.object({
|
|
27971
|
+
siteId: z49.string().optional(),
|
|
27972
|
+
apiBaseUrl: z49.string().optional(),
|
|
27973
|
+
portalToken: z49.string().nullable().optional(),
|
|
27762
27974
|
contentEntry: contentEntrySchema2.nullable().optional(),
|
|
27763
27975
|
entrySubrouteContext: courseEntrySubrouteContextSchema.nullable().optional(),
|
|
27764
|
-
courses:
|
|
27765
|
-
className:
|
|
27766
|
-
showSessions:
|
|
27767
|
-
showPrice:
|
|
27768
|
-
showCapacity:
|
|
27769
|
-
showVenue:
|
|
27770
|
-
successMessage:
|
|
27771
|
-
waitlistMessage:
|
|
27772
|
-
membershipMessage:
|
|
27773
|
-
buttonText:
|
|
27976
|
+
courses: z49.array(publicCourseSchema).nullable().optional(),
|
|
27977
|
+
className: z49.string().nullable().optional(),
|
|
27978
|
+
showSessions: z49.boolean().optional(),
|
|
27979
|
+
showPrice: z49.boolean().optional(),
|
|
27980
|
+
showCapacity: z49.boolean().optional(),
|
|
27981
|
+
showVenue: z49.boolean().optional(),
|
|
27982
|
+
successMessage: z49.string().optional(),
|
|
27983
|
+
waitlistMessage: z49.string().optional(),
|
|
27984
|
+
membershipMessage: z49.string().optional(),
|
|
27985
|
+
buttonText: z49.string().nullable().optional(),
|
|
27774
27986
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
27775
27987
|
stage: previewStageSchema.optional()
|
|
27776
27988
|
});
|
|
27777
|
-
var courseRegistrationDisplaySchema =
|
|
27778
|
-
kind:
|
|
27779
|
-
state:
|
|
27780
|
-
className:
|
|
27781
|
-
summaryButtonText:
|
|
27989
|
+
var courseRegistrationDisplaySchema = z49.object({
|
|
27990
|
+
kind: z49.literal("course-registration"),
|
|
27991
|
+
state: z49.literal("shell"),
|
|
27992
|
+
className: z49.string().nullable(),
|
|
27993
|
+
summaryButtonText: z49.string()
|
|
27782
27994
|
});
|
|
27783
|
-
var courseRegistrationHydrationSchema =
|
|
27995
|
+
var courseRegistrationHydrationSchema = z49.object({
|
|
27784
27996
|
contentEntry: contentEntrySchema2.nullable().optional(),
|
|
27785
27997
|
entrySubrouteContext: courseEntrySubrouteContextSchema.nullable().optional(),
|
|
27786
|
-
courses:
|
|
27787
|
-
showSessions:
|
|
27788
|
-
showPrice:
|
|
27789
|
-
showCapacity:
|
|
27790
|
-
showVenue:
|
|
27791
|
-
successMessage:
|
|
27792
|
-
waitlistMessage:
|
|
27793
|
-
membershipMessage:
|
|
27998
|
+
courses: z49.array(publicCourseSchema).nullable().optional(),
|
|
27999
|
+
showSessions: z49.boolean().optional(),
|
|
28000
|
+
showPrice: z49.boolean().optional(),
|
|
28001
|
+
showCapacity: z49.boolean().optional(),
|
|
28002
|
+
showVenue: z49.boolean().optional(),
|
|
28003
|
+
successMessage: z49.string().optional(),
|
|
28004
|
+
waitlistMessage: z49.string().optional(),
|
|
28005
|
+
membershipMessage: z49.string().optional(),
|
|
27794
28006
|
buttonVariant: registrationButtonVariantSchema.optional()
|
|
27795
28007
|
});
|
|
27796
|
-
var courseRegistrationRenderSchema =
|
|
28008
|
+
var courseRegistrationRenderSchema = z49.object({
|
|
27797
28009
|
display: courseRegistrationDisplaySchema,
|
|
27798
28010
|
hydration: courseRegistrationHydrationSchema
|
|
27799
28011
|
});
|
|
27800
|
-
var courseRegistrationIslandMetaCodec = createZodCodec(
|
|
27801
|
-
siteId:
|
|
27802
|
-
apiBaseUrl:
|
|
27803
|
-
portalToken:
|
|
28012
|
+
var courseRegistrationIslandMetaCodec = createZodCodec(z49.object({
|
|
28013
|
+
siteId: z49.string().optional(),
|
|
28014
|
+
apiBaseUrl: z49.string().optional(),
|
|
28015
|
+
portalToken: z49.string().nullable().optional(),
|
|
27804
28016
|
stage: previewStageSchema.optional()
|
|
27805
28017
|
}));
|
|
27806
28018
|
var courseRegistrationIslandMetaKeys = defineInteractiveIslandMetaKeys(
|
|
@@ -28073,32 +28285,32 @@ var courseRegistrationBlockDefinition = {
|
|
|
28073
28285
|
};
|
|
28074
28286
|
|
|
28075
28287
|
// ../blocks/src/system/blocks/event-details.ts
|
|
28076
|
-
import { z as
|
|
28288
|
+
import { z as z51 } from "zod";
|
|
28077
28289
|
|
|
28078
28290
|
// ../blocks/src/system/blocks/shop.shared.ts
|
|
28079
|
-
import { z as
|
|
28080
|
-
var publicPassProductSchema =
|
|
28081
|
-
id:
|
|
28082
|
-
productUseCase:
|
|
28083
|
-
name:
|
|
28084
|
-
description:
|
|
28085
|
-
price:
|
|
28086
|
-
currency:
|
|
28087
|
-
creditsTotal:
|
|
28088
|
-
pricePerCredit:
|
|
28089
|
-
validDays:
|
|
28090
|
-
eligibleCategoryIds:
|
|
28091
|
-
eligibleCategoryNames:
|
|
28291
|
+
import { z as z50 } from "zod";
|
|
28292
|
+
var publicPassProductSchema = z50.object({
|
|
28293
|
+
id: z50.string(),
|
|
28294
|
+
productUseCase: z50.enum(["event_pass", "appointment_package"]).default("event_pass"),
|
|
28295
|
+
name: z50.string(),
|
|
28296
|
+
description: z50.string().nullable(),
|
|
28297
|
+
price: z50.number(),
|
|
28298
|
+
currency: z50.string(),
|
|
28299
|
+
creditsTotal: z50.number(),
|
|
28300
|
+
pricePerCredit: z50.number(),
|
|
28301
|
+
validDays: z50.number().nullable(),
|
|
28302
|
+
eligibleCategoryIds: z50.array(z50.string()),
|
|
28303
|
+
eligibleCategoryNames: z50.array(z50.string())
|
|
28092
28304
|
});
|
|
28093
|
-
var publicMembershipProductSchema =
|
|
28094
|
-
id:
|
|
28095
|
-
name:
|
|
28096
|
-
description:
|
|
28097
|
-
price:
|
|
28098
|
-
currency:
|
|
28099
|
-
billingInterval:
|
|
28100
|
-
eligibleCategoryIds:
|
|
28101
|
-
eligibleCategoryNames:
|
|
28305
|
+
var publicMembershipProductSchema = z50.object({
|
|
28306
|
+
id: z50.string(),
|
|
28307
|
+
name: z50.string(),
|
|
28308
|
+
description: z50.string().nullable(),
|
|
28309
|
+
price: z50.number(),
|
|
28310
|
+
currency: z50.string(),
|
|
28311
|
+
billingInterval: z50.enum(["month", "year"]),
|
|
28312
|
+
eligibleCategoryIds: z50.array(z50.string()),
|
|
28313
|
+
eligibleCategoryNames: z50.array(z50.string())
|
|
28102
28314
|
});
|
|
28103
28315
|
|
|
28104
28316
|
// ../blocks/src/system/blocks/event-details.ts
|
|
@@ -28233,40 +28445,40 @@ var eventDetailsManifest = createBlockManifest({
|
|
|
28233
28445
|
})
|
|
28234
28446
|
]
|
|
28235
28447
|
});
|
|
28236
|
-
var occurrenceContextSchema2 =
|
|
28237
|
-
id:
|
|
28238
|
-
seriesId:
|
|
28239
|
-
startsAt:
|
|
28240
|
-
endsAt:
|
|
28241
|
-
timeZone:
|
|
28242
|
-
capacityOverride:
|
|
28243
|
-
overrides:
|
|
28448
|
+
var occurrenceContextSchema2 = z51.object({
|
|
28449
|
+
id: z51.string(),
|
|
28450
|
+
seriesId: z51.string(),
|
|
28451
|
+
startsAt: z51.string(),
|
|
28452
|
+
endsAt: z51.string(),
|
|
28453
|
+
timeZone: z51.string(),
|
|
28454
|
+
capacityOverride: z51.number().nullable().optional(),
|
|
28455
|
+
overrides: z51.record(z51.string(), z51.unknown()).nullable().optional()
|
|
28244
28456
|
}).nullable();
|
|
28245
|
-
var eventAutoApplyDiscountPreviewBaseSchema =
|
|
28246
|
-
id:
|
|
28247
|
-
publicLabel:
|
|
28248
|
-
description:
|
|
28249
|
-
minTicketsRequired:
|
|
28457
|
+
var eventAutoApplyDiscountPreviewBaseSchema = z51.object({
|
|
28458
|
+
id: z51.string(),
|
|
28459
|
+
publicLabel: z51.string(),
|
|
28460
|
+
description: z51.string().nullable(),
|
|
28461
|
+
minTicketsRequired: z51.number().nullable()
|
|
28250
28462
|
});
|
|
28251
|
-
var eventAutoApplyDiscountPreviewSchema =
|
|
28463
|
+
var eventAutoApplyDiscountPreviewSchema = z51.discriminatedUnion("discountType", [
|
|
28252
28464
|
eventAutoApplyDiscountPreviewBaseSchema.extend({
|
|
28253
|
-
discountType:
|
|
28254
|
-
discountPercent:
|
|
28255
|
-
discountAmountCents:
|
|
28465
|
+
discountType: z51.literal("percent"),
|
|
28466
|
+
discountPercent: z51.number(),
|
|
28467
|
+
discountAmountCents: z51.null()
|
|
28256
28468
|
}),
|
|
28257
28469
|
eventAutoApplyDiscountPreviewBaseSchema.extend({
|
|
28258
|
-
discountType:
|
|
28259
|
-
discountPercent:
|
|
28260
|
-
discountAmountCents:
|
|
28470
|
+
discountType: z51.literal("fixed"),
|
|
28471
|
+
discountPercent: z51.null(),
|
|
28472
|
+
discountAmountCents: z51.number()
|
|
28261
28473
|
})
|
|
28262
28474
|
]);
|
|
28263
28475
|
var eventDetailsBlockDefinition = {
|
|
28264
28476
|
manifest: eventDetailsManifest,
|
|
28265
28477
|
dataSchemas: {
|
|
28266
|
-
eventDetailsData:
|
|
28478
|
+
eventDetailsData: z51.object({
|
|
28267
28479
|
events: publicEventsArraySchema,
|
|
28268
|
-
sitePasses:
|
|
28269
|
-
siteMemberships:
|
|
28480
|
+
sitePasses: z51.object({ passes: z51.array(publicPassProductSchema) }),
|
|
28481
|
+
siteMemberships: z51.object({ memberships: z51.array(publicMembershipProductSchema) }),
|
|
28270
28482
|
autoApplyDiscount: eventAutoApplyDiscountPreviewSchema.nullable().optional().default(null)
|
|
28271
28483
|
}).optional(),
|
|
28272
28484
|
occurrenceContext: occurrenceContextSchema2.optional()
|
|
@@ -28590,7 +28802,7 @@ var eventSpotlightBlockDefinition = {
|
|
|
28590
28802
|
};
|
|
28591
28803
|
|
|
28592
28804
|
// ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
28593
|
-
import { z as
|
|
28805
|
+
import { z as z53 } from "zod";
|
|
28594
28806
|
|
|
28595
28807
|
// ../calendar/src/grid.ts
|
|
28596
28808
|
var DAY_NAMES = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
|
|
@@ -28756,15 +28968,15 @@ function getLocalMinuteOfDay(isoTimestamp, timeZone) {
|
|
|
28756
28968
|
const date = new Date(isoTimestamp);
|
|
28757
28969
|
if (Number.isNaN(date.getTime())) return NaN;
|
|
28758
28970
|
if (!isValidTimeZone2(timeZone)) return NaN;
|
|
28759
|
-
const parts = new Intl.DateTimeFormat("en-
|
|
28971
|
+
const parts = new Intl.DateTimeFormat("en-GB", {
|
|
28760
28972
|
timeZone,
|
|
28761
28973
|
hour: "2-digit",
|
|
28762
28974
|
minute: "2-digit",
|
|
28763
|
-
hour12: false,
|
|
28764
28975
|
hourCycle: "h23"
|
|
28765
28976
|
}).formatToParts(date);
|
|
28766
|
-
const
|
|
28977
|
+
const hourPart = Number(parts.find((part) => part.type === "hour")?.value);
|
|
28767
28978
|
const minute = Number(parts.find((part) => part.type === "minute")?.value);
|
|
28979
|
+
const hour = hourPart === 24 ? 0 : hourPart;
|
|
28768
28980
|
if (Number.isNaN(hour) || Number.isNaN(minute)) return NaN;
|
|
28769
28981
|
return hour * MINUTES_PER_HOUR + minute;
|
|
28770
28982
|
}
|
|
@@ -29196,45 +29408,8 @@ function groupEventsByDate(events) {
|
|
|
29196
29408
|
}
|
|
29197
29409
|
return map;
|
|
29198
29410
|
}
|
|
29199
|
-
function formatCompactCurrencyAmount(amount, currency) {
|
|
29200
|
-
return formatCourseCurrencyAmount(amount, currency, {
|
|
29201
|
-
minimumFractionDigits: 0,
|
|
29202
|
-
maximumFractionDigits: 2
|
|
29203
|
-
});
|
|
29204
|
-
}
|
|
29205
|
-
function formatCourseEventPriceDisplay(display) {
|
|
29206
|
-
if (display.kind !== "course") {
|
|
29207
|
-
return "Course";
|
|
29208
|
-
}
|
|
29209
|
-
if (display.display.kind === "exact" || display.display.kind === "from") {
|
|
29210
|
-
const amountLabel = formatCompactCurrencyAmount(
|
|
29211
|
-
display.display.amount,
|
|
29212
|
-
display.display.currency
|
|
29213
|
-
);
|
|
29214
|
-
return display.display.kind === "from" ? `Course (From ${amountLabel})` : `Course (${amountLabel})`;
|
|
29215
|
-
}
|
|
29216
|
-
return "Course";
|
|
29217
|
-
}
|
|
29218
|
-
function formatPublicEventPriceDisplay(display) {
|
|
29219
|
-
switch (display.kind) {
|
|
29220
|
-
case "free":
|
|
29221
|
-
return "Free";
|
|
29222
|
-
case "exact":
|
|
29223
|
-
return formatCompactCurrencyAmount(display.amount, display.currency);
|
|
29224
|
-
case "from":
|
|
29225
|
-
return `From ${formatCompactCurrencyAmount(display.amount, display.currency)}`;
|
|
29226
|
-
case "mixed":
|
|
29227
|
-
return `Free / From ${formatCompactCurrencyAmount(display.paidFromAmount, display.currency)}`;
|
|
29228
|
-
case "unavailable":
|
|
29229
|
-
return "Pricing unavailable";
|
|
29230
|
-
case "course":
|
|
29231
|
-
return formatCourseEventPriceDisplay(display);
|
|
29232
|
-
}
|
|
29233
|
-
}
|
|
29234
29411
|
function formatEventPrice(event) {
|
|
29235
|
-
return
|
|
29236
|
-
publicEventPricingDisplay(resolveRuntimeEventPricing(event))
|
|
29237
|
-
);
|
|
29412
|
+
return formatEventPricing(resolveRuntimeEventPricing(event), { decimals: "auto" });
|
|
29238
29413
|
}
|
|
29239
29414
|
function resolveEventCta(event, buttonText) {
|
|
29240
29415
|
const { isFull: isSoldOut } = getEventAvailability(event);
|
|
@@ -30815,16 +30990,16 @@ function DateTimeTile({ startsAt, endsAt, timeZone }) {
|
|
|
30815
30990
|
}
|
|
30816
30991
|
|
|
30817
30992
|
// ../blocks/src/system/runtime/nodes/events/shared/listOptions.ts
|
|
30818
|
-
import { z as
|
|
30993
|
+
import { z as z52 } from "zod";
|
|
30819
30994
|
var eventPageSizeValues = [3, 6, 10, 12, 20, 24, 30];
|
|
30820
|
-
var eventPageSizeSchema =
|
|
30821
|
-
|
|
30822
|
-
|
|
30823
|
-
|
|
30824
|
-
|
|
30825
|
-
|
|
30826
|
-
|
|
30827
|
-
|
|
30995
|
+
var eventPageSizeSchema = z52.union([
|
|
30996
|
+
z52.literal(3),
|
|
30997
|
+
z52.literal(6),
|
|
30998
|
+
z52.literal(10),
|
|
30999
|
+
z52.literal(12),
|
|
31000
|
+
z52.literal(20),
|
|
31001
|
+
z52.literal(24),
|
|
31002
|
+
z52.literal(30)
|
|
30828
31003
|
]);
|
|
30829
31004
|
var eventPageSizeSet = new Set(eventPageSizeValues);
|
|
30830
31005
|
function resolveEventPageSize(value, fallback2 = 12) {
|
|
@@ -30834,15 +31009,15 @@ function resolveEventPageSize(value, fallback2 = 12) {
|
|
|
30834
31009
|
function resolveEventCalendarListPageSize(input) {
|
|
30835
31010
|
return resolveEventPageSize(input.eventsPerPage);
|
|
30836
31011
|
}
|
|
30837
|
-
var eventListPaginationActionSchema =
|
|
30838
|
-
|
|
30839
|
-
kind:
|
|
30840
|
-
label:
|
|
31012
|
+
var eventListPaginationActionSchema = z52.discriminatedUnion("kind", [
|
|
31013
|
+
z52.object({
|
|
31014
|
+
kind: z52.literal("loadMore"),
|
|
31015
|
+
label: z52.string()
|
|
30841
31016
|
}),
|
|
30842
|
-
|
|
30843
|
-
kind:
|
|
30844
|
-
label:
|
|
30845
|
-
href:
|
|
31017
|
+
z52.object({
|
|
31018
|
+
kind: z52.literal("seeAllLink"),
|
|
31019
|
+
label: z52.string(),
|
|
31020
|
+
href: z52.string()
|
|
30846
31021
|
})
|
|
30847
31022
|
]);
|
|
30848
31023
|
function resolveEventListPaginationAction(input) {
|
|
@@ -30855,89 +31030,89 @@ function resolveEventListPaginationAction(input) {
|
|
|
30855
31030
|
}
|
|
30856
31031
|
|
|
30857
31032
|
// ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
30858
|
-
var legacyEventCardVariantSchema =
|
|
30859
|
-
var eventCardVariantInputSchema =
|
|
31033
|
+
var legacyEventCardVariantSchema = z53.enum(["variant1", "variant2"]);
|
|
31034
|
+
var eventCardVariantInputSchema = z53.union([
|
|
30860
31035
|
cardVariantRoleSchema,
|
|
30861
31036
|
legacyEventCardVariantSchema
|
|
30862
31037
|
]);
|
|
30863
|
-
var cardOrientationSchema =
|
|
30864
|
-
var eventBlockKindSchema =
|
|
30865
|
-
var eventSurfaceScopeSchema =
|
|
30866
|
-
var eventScheduleScopeSchema2 =
|
|
30867
|
-
var eventListingSourceSchema =
|
|
30868
|
-
events:
|
|
30869
|
-
siteId:
|
|
30870
|
-
apiBaseUrl:
|
|
31038
|
+
var cardOrientationSchema = z53.enum(["vertical", "horizontal"]);
|
|
31039
|
+
var eventBlockKindSchema = z53.enum(eventBlockKindValues);
|
|
31040
|
+
var eventSurfaceScopeSchema = z53.enum(eventSurfaceScopeValues);
|
|
31041
|
+
var eventScheduleScopeSchema2 = z53.enum(eventScheduleScopeValues);
|
|
31042
|
+
var eventListingSourceSchema = z53.object({
|
|
31043
|
+
events: z53.array(publicEventSchema).nullable().optional(),
|
|
31044
|
+
siteId: z53.string(),
|
|
31045
|
+
apiBaseUrl: z53.string().optional(),
|
|
30871
31046
|
stage: previewStageSchema.optional(),
|
|
30872
31047
|
layout: eventLayoutSchema.optional(),
|
|
30873
31048
|
columns: columnOptionSchema.optional(),
|
|
30874
|
-
eventsPerPage:
|
|
30875
|
-
paginationMode:
|
|
30876
|
-
seeAllUrl:
|
|
30877
|
-
loadMoreText:
|
|
31049
|
+
eventsPerPage: z53.string().optional(),
|
|
31050
|
+
paginationMode: z53.enum(["loadMore", "seeAllLink"]).optional(),
|
|
31051
|
+
seeAllUrl: z53.string().optional(),
|
|
31052
|
+
loadMoreText: z53.string().optional(),
|
|
30878
31053
|
cardVariant: eventCardVariantInputSchema.optional(),
|
|
30879
31054
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
30880
|
-
buttonText:
|
|
30881
|
-
showVenue:
|
|
30882
|
-
showMap:
|
|
30883
|
-
showCapacity:
|
|
30884
|
-
emptyMessage:
|
|
30885
|
-
className:
|
|
30886
|
-
showFilters:
|
|
31055
|
+
buttonText: z53.string().optional(),
|
|
31056
|
+
showVenue: z53.boolean().optional(),
|
|
31057
|
+
showMap: z53.boolean().optional(),
|
|
31058
|
+
showCapacity: z53.boolean().optional(),
|
|
31059
|
+
emptyMessage: z53.string().optional(),
|
|
31060
|
+
className: z53.string().optional(),
|
|
31061
|
+
showFilters: z53.boolean().nullable().optional(),
|
|
30887
31062
|
showCategoryFilter: filterAutoShowSchema.optional(),
|
|
30888
|
-
showVenueFilter:
|
|
30889
|
-
showStaffFilter:
|
|
31063
|
+
showVenueFilter: z53.boolean().nullable().optional(),
|
|
31064
|
+
showStaffFilter: z53.boolean().nullable().optional(),
|
|
30890
31065
|
eventKind: eventBlockKindSchema.nullable().optional(),
|
|
30891
31066
|
eventSurface: eventSurfaceScopeSchema.nullable().optional(),
|
|
30892
|
-
filterEventPresets:
|
|
31067
|
+
filterEventPresets: z53.union([z53.string(), z53.array(z53.string())]).nullable().optional(),
|
|
30893
31068
|
scheduleScope: eventScheduleScopeSchema2.nullable().optional(),
|
|
30894
|
-
filterCategoryIds:
|
|
30895
|
-
filterStaffMemberId:
|
|
30896
|
-
filterVenueId:
|
|
31069
|
+
filterCategoryIds: z53.string().nullable().optional(),
|
|
31070
|
+
filterStaffMemberId: z53.string().nullable().optional(),
|
|
31071
|
+
filterVenueId: z53.string().nullable().optional()
|
|
30897
31072
|
});
|
|
30898
|
-
var eventListingDisplaySchema =
|
|
30899
|
-
kind:
|
|
30900
|
-
state:
|
|
31073
|
+
var eventListingDisplaySchema = z53.object({
|
|
31074
|
+
kind: z53.literal("event-listing"),
|
|
31075
|
+
state: z53.enum(["loading", "empty", "ready"]),
|
|
30901
31076
|
listLayout: eventLayoutSchema,
|
|
30902
|
-
className:
|
|
30903
|
-
emptyMessage:
|
|
30904
|
-
loadingMessage:
|
|
30905
|
-
containerClass:
|
|
31077
|
+
className: z53.string().nullable(),
|
|
31078
|
+
emptyMessage: z53.string(),
|
|
31079
|
+
loadingMessage: z53.string(),
|
|
31080
|
+
containerClass: z53.string(),
|
|
30906
31081
|
cardVariant: cardVariantRoleSchema,
|
|
30907
31082
|
buttonVariant: eventButtonVariantSchema,
|
|
30908
|
-
buttonText:
|
|
30909
|
-
showVenue:
|
|
30910
|
-
showMap:
|
|
30911
|
-
showCapacity:
|
|
31083
|
+
buttonText: z53.string(),
|
|
31084
|
+
showVenue: z53.boolean(),
|
|
31085
|
+
showMap: z53.boolean(),
|
|
31086
|
+
showCapacity: z53.boolean(),
|
|
30912
31087
|
orientation: cardOrientationSchema,
|
|
30913
|
-
events:
|
|
31088
|
+
events: z53.array(publicEventSchema)
|
|
30914
31089
|
});
|
|
30915
|
-
var eventListingHydrationSchema =
|
|
30916
|
-
siteId:
|
|
31090
|
+
var eventListingHydrationSchema = z53.object({
|
|
31091
|
+
siteId: z53.string(),
|
|
30917
31092
|
stage: previewStageSchema.optional(),
|
|
30918
31093
|
eventsPerPage: eventPageSizeSchema,
|
|
30919
31094
|
paginationAction: eventListPaginationActionSchema,
|
|
30920
|
-
showFilters:
|
|
31095
|
+
showFilters: z53.boolean(),
|
|
30921
31096
|
showCategoryFilter: filterAutoShowSchema,
|
|
30922
|
-
showVenueFilter:
|
|
30923
|
-
showStaffFilter:
|
|
31097
|
+
showVenueFilter: z53.boolean(),
|
|
31098
|
+
showStaffFilter: z53.boolean(),
|
|
30924
31099
|
eventKind: eventBlockKindSchema,
|
|
30925
31100
|
eventSurface: eventSurfaceScopeSchema,
|
|
30926
|
-
filterEventPresets:
|
|
31101
|
+
filterEventPresets: z53.string().nullable(),
|
|
30927
31102
|
scheduleScope: eventScheduleScopeSchema2,
|
|
30928
|
-
filterCategoryIds:
|
|
30929
|
-
filterStaffMemberId:
|
|
30930
|
-
filterVenueId:
|
|
30931
|
-
fetchInitialEventsOnMount:
|
|
31103
|
+
filterCategoryIds: z53.string().nullable().optional(),
|
|
31104
|
+
filterStaffMemberId: z53.string().nullable().optional(),
|
|
31105
|
+
filterVenueId: z53.string().nullable().optional(),
|
|
31106
|
+
fetchInitialEventsOnMount: z53.boolean()
|
|
30932
31107
|
});
|
|
30933
|
-
var eventListingRenderSchema =
|
|
31108
|
+
var eventListingRenderSchema = z53.object({
|
|
30934
31109
|
display: eventListingDisplaySchema,
|
|
30935
31110
|
hydration: eventListingHydrationSchema
|
|
30936
31111
|
});
|
|
30937
31112
|
var eventListingIslandMetaCodec = createZodCodec(
|
|
30938
|
-
|
|
30939
|
-
siteId:
|
|
30940
|
-
apiBaseUrl:
|
|
31113
|
+
z53.object({
|
|
31114
|
+
siteId: z53.string(),
|
|
31115
|
+
apiBaseUrl: z53.string().optional(),
|
|
30941
31116
|
stage: previewStageSchema.optional()
|
|
30942
31117
|
})
|
|
30943
31118
|
);
|
|
@@ -31316,15 +31491,15 @@ var eventListingBlockDefinition = {
|
|
|
31316
31491
|
};
|
|
31317
31492
|
|
|
31318
31493
|
// ../blocks/src/system/runtime/nodes/events/EventCalendar.interactive.ts
|
|
31319
|
-
import { z as
|
|
31320
|
-
var eventBlockKindSchema2 =
|
|
31321
|
-
var eventSurfaceScopeSchema2 =
|
|
31322
|
-
var eventScheduleScopeSchema3 =
|
|
31323
|
-
var eventCalendarSourceSchema =
|
|
31494
|
+
import { z as z54 } from "zod";
|
|
31495
|
+
var eventBlockKindSchema2 = z54.enum(eventBlockKindValues);
|
|
31496
|
+
var eventSurfaceScopeSchema2 = z54.enum(eventSurfaceScopeValues);
|
|
31497
|
+
var eventScheduleScopeSchema3 = z54.enum(eventScheduleScopeValues);
|
|
31498
|
+
var eventCalendarSourceSchema = z54.object(
|
|
31324
31499
|
{
|
|
31325
|
-
events:
|
|
31326
|
-
siteId:
|
|
31327
|
-
apiBaseUrl:
|
|
31500
|
+
events: z54.array(publicEventSchema).nullable().optional(),
|
|
31501
|
+
siteId: z54.string(),
|
|
31502
|
+
apiBaseUrl: z54.string().optional(),
|
|
31328
31503
|
stage: previewStageSchema.optional(),
|
|
31329
31504
|
variant: eventCalendarDisplayModeSchema.nullable().optional(),
|
|
31330
31505
|
displayMode: eventCalendarDisplayModeSchema.nullable().optional(),
|
|
@@ -31332,78 +31507,78 @@ var eventCalendarSourceSchema = z53.object(
|
|
|
31332
31507
|
listColumns: columnOptionSchema.optional(),
|
|
31333
31508
|
layout: eventLayoutSchema.optional(),
|
|
31334
31509
|
columns: columnOptionSchema.optional(),
|
|
31335
|
-
eventsPerPage:
|
|
31336
|
-
paginationMode:
|
|
31337
|
-
seeAllUrl:
|
|
31338
|
-
loadMoreText:
|
|
31510
|
+
eventsPerPage: z54.string().optional(),
|
|
31511
|
+
paginationMode: z54.enum(["loadMore", "seeAllLink"]).optional(),
|
|
31512
|
+
seeAllUrl: z54.string().optional(),
|
|
31513
|
+
loadMoreText: z54.string().optional(),
|
|
31339
31514
|
startOfWeek: weekStartSchema.optional(),
|
|
31340
31515
|
calendarTabViews: calendarTabViewsSchema.optional(),
|
|
31341
|
-
showFilters:
|
|
31516
|
+
showFilters: z54.boolean().nullable().optional(),
|
|
31342
31517
|
showCategoryFilter: filterAutoShowSchema.optional(),
|
|
31343
|
-
showVenueFilter:
|
|
31344
|
-
showStaffFilter:
|
|
31518
|
+
showVenueFilter: z54.boolean().nullable().optional(),
|
|
31519
|
+
showStaffFilter: z54.boolean().nullable().optional(),
|
|
31345
31520
|
kind: eventBlockKindSchema2.nullable().optional(),
|
|
31346
31521
|
eventSurface: eventSurfaceScopeSchema2.nullable().optional(),
|
|
31347
|
-
filterEventPresets:
|
|
31522
|
+
filterEventPresets: z54.union([z54.string(), z54.array(z54.string())]).nullable().optional(),
|
|
31348
31523
|
scheduleScope: eventScheduleScopeSchema3.nullable().optional(),
|
|
31349
|
-
filterCategoryIds:
|
|
31350
|
-
filterStaffMemberId:
|
|
31351
|
-
filterVenueId:
|
|
31524
|
+
filterCategoryIds: z54.union([z54.string(), z54.array(z54.string())]).nullable().optional(),
|
|
31525
|
+
filterStaffMemberId: z54.string().nullable().optional(),
|
|
31526
|
+
filterVenueId: z54.string().nullable().optional(),
|
|
31352
31527
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
31353
|
-
buttonText:
|
|
31354
|
-
showVenue:
|
|
31355
|
-
showMap:
|
|
31356
|
-
showCapacity:
|
|
31357
|
-
emptyMessage:
|
|
31358
|
-
className:
|
|
31528
|
+
buttonText: z54.string().optional(),
|
|
31529
|
+
showVenue: z54.boolean().nullable().optional(),
|
|
31530
|
+
showMap: z54.boolean().nullable().optional(),
|
|
31531
|
+
showCapacity: z54.boolean().nullable().optional(),
|
|
31532
|
+
emptyMessage: z54.string().optional(),
|
|
31533
|
+
className: z54.string().optional()
|
|
31359
31534
|
}
|
|
31360
31535
|
);
|
|
31361
|
-
var eventCalendarDisplaySchema =
|
|
31362
|
-
kind:
|
|
31536
|
+
var eventCalendarDisplaySchema = z54.object({
|
|
31537
|
+
kind: z54.literal("event-calendar"),
|
|
31363
31538
|
displayMode: eventCalendarDisplayModeSchema,
|
|
31364
|
-
className:
|
|
31365
|
-
events:
|
|
31539
|
+
className: z54.string().nullable(),
|
|
31540
|
+
events: z54.array(publicEventSchema),
|
|
31366
31541
|
listLayout: eventLayoutSchema,
|
|
31367
31542
|
listColumns: columnOptionSchema,
|
|
31368
31543
|
eventsPerPage: eventPageSizeSchema,
|
|
31369
31544
|
paginationAction: eventListPaginationActionSchema,
|
|
31370
31545
|
startOfWeek: weekStartSchema,
|
|
31371
31546
|
calendarTabViews: calendarTabViewsSchema,
|
|
31372
|
-
showFilters:
|
|
31547
|
+
showFilters: z54.boolean(),
|
|
31373
31548
|
showCategoryFilter: filterAutoShowSchema,
|
|
31374
|
-
showVenueFilter:
|
|
31375
|
-
showStaffFilter:
|
|
31549
|
+
showVenueFilter: z54.boolean(),
|
|
31550
|
+
showStaffFilter: z54.boolean(),
|
|
31376
31551
|
eventKind: eventBlockKindSchema2,
|
|
31377
31552
|
eventSurface: eventSurfaceScopeSchema2,
|
|
31378
|
-
filterEventPresets:
|
|
31553
|
+
filterEventPresets: z54.string().nullable(),
|
|
31379
31554
|
scheduleScope: eventScheduleScopeSchema3,
|
|
31380
|
-
filterCategoryIds:
|
|
31381
|
-
filterStaffMemberId:
|
|
31382
|
-
filterVenueId:
|
|
31555
|
+
filterCategoryIds: z54.string().nullable(),
|
|
31556
|
+
filterStaffMemberId: z54.string().nullable(),
|
|
31557
|
+
filterVenueId: z54.string().nullable(),
|
|
31383
31558
|
buttonVariant: eventButtonVariantSchema,
|
|
31384
|
-
buttonText:
|
|
31385
|
-
showVenue:
|
|
31386
|
-
showMap:
|
|
31387
|
-
showCapacity:
|
|
31388
|
-
emptyMessage:
|
|
31559
|
+
buttonText: z54.string(),
|
|
31560
|
+
showVenue: z54.boolean(),
|
|
31561
|
+
showMap: z54.boolean(),
|
|
31562
|
+
showCapacity: z54.boolean(),
|
|
31563
|
+
emptyMessage: z54.string()
|
|
31389
31564
|
});
|
|
31390
|
-
var eventCalendarHydrationSchema =
|
|
31391
|
-
siteId:
|
|
31565
|
+
var eventCalendarHydrationSchema = z54.object({
|
|
31566
|
+
siteId: z54.string(),
|
|
31392
31567
|
stage: previewStageSchema.optional(),
|
|
31393
|
-
prefetchedEvents:
|
|
31568
|
+
prefetchedEvents: z54.boolean(),
|
|
31394
31569
|
eventKind: eventBlockKindSchema2,
|
|
31395
31570
|
eventSurface: eventSurfaceScopeSchema2,
|
|
31396
|
-
filterEventPresets:
|
|
31571
|
+
filterEventPresets: z54.string().nullable(),
|
|
31397
31572
|
scheduleScope: eventScheduleScopeSchema3
|
|
31398
31573
|
});
|
|
31399
|
-
var eventCalendarRenderSchema =
|
|
31574
|
+
var eventCalendarRenderSchema = z54.object({
|
|
31400
31575
|
display: eventCalendarDisplaySchema,
|
|
31401
31576
|
hydration: eventCalendarHydrationSchema
|
|
31402
31577
|
});
|
|
31403
31578
|
var eventCalendarIslandMetaCodec = createZodCodec(
|
|
31404
|
-
|
|
31405
|
-
siteId:
|
|
31406
|
-
apiBaseUrl:
|
|
31579
|
+
z54.object({
|
|
31580
|
+
siteId: z54.string(),
|
|
31581
|
+
apiBaseUrl: z54.string().optional(),
|
|
31407
31582
|
stage: previewStageSchema.optional()
|
|
31408
31583
|
})
|
|
31409
31584
|
);
|
|
@@ -32145,7 +32320,7 @@ var eventCalendarBlockDefinition = {
|
|
|
32145
32320
|
};
|
|
32146
32321
|
|
|
32147
32322
|
// ../blocks/src/system/blocks/offerings-preview/index.ts
|
|
32148
|
-
import { z as
|
|
32323
|
+
import { z as z55 } from "zod";
|
|
32149
32324
|
|
|
32150
32325
|
// ../blocks/src/system/blocks/offerings-preview/model.ts
|
|
32151
32326
|
var OFFERINGS_PREVIEW_DEFAULT_ITEM_LIMIT = "3";
|
|
@@ -32467,13 +32642,13 @@ function normalizeTextOverride(value) {
|
|
|
32467
32642
|
}
|
|
32468
32643
|
|
|
32469
32644
|
// ../blocks/src/system/blocks/offerings-preview/index.ts
|
|
32470
|
-
var publicRouteCandidatesSchema =
|
|
32471
|
-
routes:
|
|
32472
|
-
entityId:
|
|
32473
|
-
path:
|
|
32474
|
-
title:
|
|
32475
|
-
kind:
|
|
32476
|
-
contentTypeKey:
|
|
32645
|
+
var publicRouteCandidatesSchema = z55.object({
|
|
32646
|
+
routes: z55.array(z55.object({
|
|
32647
|
+
entityId: z55.string(),
|
|
32648
|
+
path: z55.string(),
|
|
32649
|
+
title: z55.string(),
|
|
32650
|
+
kind: z55.enum(["page", "content"]),
|
|
32651
|
+
contentTypeKey: z55.string().nullable().optional()
|
|
32477
32652
|
}))
|
|
32478
32653
|
});
|
|
32479
32654
|
var groupOverrideFields = [
|
|
@@ -32871,7 +33046,7 @@ function isRecord8(value) {
|
|
|
32871
33046
|
}
|
|
32872
33047
|
|
|
32873
33048
|
// ../blocks/src/system/blocks/embed.ts
|
|
32874
|
-
import { z as
|
|
33049
|
+
import { z as z56 } from "zod";
|
|
32875
33050
|
var embedFields = [
|
|
32876
33051
|
// Section heading
|
|
32877
33052
|
parseFieldDefinition({
|
|
@@ -33102,18 +33277,18 @@ var embedManifest = createBlockManifest({
|
|
|
33102
33277
|
spacing: "lg"
|
|
33103
33278
|
}
|
|
33104
33279
|
});
|
|
33105
|
-
var embedEntrySchema =
|
|
33106
|
-
id:
|
|
33107
|
-
identifier:
|
|
33108
|
-
title:
|
|
33109
|
-
slug:
|
|
33110
|
-
content:
|
|
33111
|
-
publishedAt:
|
|
33280
|
+
var embedEntrySchema = z56.object({
|
|
33281
|
+
id: z56.string(),
|
|
33282
|
+
identifier: z56.string(),
|
|
33283
|
+
title: z56.string(),
|
|
33284
|
+
slug: z56.string().nullable().optional(),
|
|
33285
|
+
content: z56.record(z56.string(), z56.unknown()).optional(),
|
|
33286
|
+
publishedAt: z56.string().nullable().optional()
|
|
33112
33287
|
});
|
|
33113
33288
|
var embedBlockDefinition = {
|
|
33114
33289
|
manifest: embedManifest,
|
|
33115
33290
|
dataSchemas: {
|
|
33116
|
-
entries:
|
|
33291
|
+
entries: z56.array(embedEntrySchema).optional()
|
|
33117
33292
|
},
|
|
33118
33293
|
dataLoaders: {
|
|
33119
33294
|
entries: {
|
|
@@ -34297,52 +34472,52 @@ var fileDownloadBlockDefinition = {
|
|
|
34297
34472
|
};
|
|
34298
34473
|
|
|
34299
34474
|
// ../blocks/src/system/blocks/shop.ts
|
|
34300
|
-
import { z as
|
|
34475
|
+
import { z as z60 } from "zod";
|
|
34301
34476
|
|
|
34302
34477
|
// ../blocks/src/system/runtime/nodes/shop.interactive.ts
|
|
34303
|
-
import { z as
|
|
34478
|
+
import { z as z59 } from "zod";
|
|
34304
34479
|
|
|
34305
34480
|
// ../blocks/src/system/blocks/products/shared.ts
|
|
34306
|
-
import { z as
|
|
34307
|
-
var publicProductVariantSchema =
|
|
34308
|
-
id:
|
|
34309
|
-
title:
|
|
34310
|
-
sku:
|
|
34311
|
-
priceCents:
|
|
34312
|
-
stockQuantity:
|
|
34313
|
-
soldOut:
|
|
34481
|
+
import { z as z57 } from "zod";
|
|
34482
|
+
var publicProductVariantSchema = z57.object({
|
|
34483
|
+
id: z57.string(),
|
|
34484
|
+
title: z57.string(),
|
|
34485
|
+
sku: z57.string().nullable(),
|
|
34486
|
+
priceCents: z57.number(),
|
|
34487
|
+
stockQuantity: z57.number().nullable(),
|
|
34488
|
+
soldOut: z57.boolean()
|
|
34314
34489
|
});
|
|
34315
|
-
var publicProductSchema =
|
|
34316
|
-
id:
|
|
34317
|
-
contentEntryId:
|
|
34318
|
-
title:
|
|
34319
|
-
slug:
|
|
34320
|
-
path:
|
|
34321
|
-
status:
|
|
34322
|
-
priceCents:
|
|
34323
|
-
currency:
|
|
34324
|
-
productType:
|
|
34325
|
-
requiresShipping:
|
|
34326
|
-
hasVariants:
|
|
34327
|
-
trackInventory:
|
|
34328
|
-
soldOut:
|
|
34329
|
-
category:
|
|
34330
|
-
id:
|
|
34331
|
-
name:
|
|
34332
|
-
slug:
|
|
34490
|
+
var publicProductSchema = z57.object({
|
|
34491
|
+
id: z57.string(),
|
|
34492
|
+
contentEntryId: z57.string().nullable(),
|
|
34493
|
+
title: z57.string(),
|
|
34494
|
+
slug: z57.string(),
|
|
34495
|
+
path: z57.string().nullable(),
|
|
34496
|
+
status: z57.enum(["draft", "active"]),
|
|
34497
|
+
priceCents: z57.number(),
|
|
34498
|
+
currency: z57.string(),
|
|
34499
|
+
productType: z57.enum(["physical", "digital"]),
|
|
34500
|
+
requiresShipping: z57.boolean(),
|
|
34501
|
+
hasVariants: z57.boolean(),
|
|
34502
|
+
trackInventory: z57.boolean(),
|
|
34503
|
+
soldOut: z57.boolean(),
|
|
34504
|
+
category: z57.object({
|
|
34505
|
+
id: z57.string(),
|
|
34506
|
+
name: z57.string(),
|
|
34507
|
+
slug: z57.string()
|
|
34333
34508
|
}).nullable(),
|
|
34334
|
-
summary:
|
|
34335
|
-
body:
|
|
34336
|
-
gallery:
|
|
34337
|
-
|
|
34338
|
-
url:
|
|
34339
|
-
alt:
|
|
34509
|
+
summary: z57.string().nullable(),
|
|
34510
|
+
body: z57.unknown().nullable(),
|
|
34511
|
+
gallery: z57.array(
|
|
34512
|
+
z57.object({
|
|
34513
|
+
url: z57.string(),
|
|
34514
|
+
alt: z57.string().nullable()
|
|
34340
34515
|
})
|
|
34341
34516
|
),
|
|
34342
|
-
variants:
|
|
34517
|
+
variants: z57.array(publicProductVariantSchema)
|
|
34343
34518
|
});
|
|
34344
|
-
var publicProductsResponseSchema =
|
|
34345
|
-
products:
|
|
34519
|
+
var publicProductsResponseSchema = z57.object({
|
|
34520
|
+
products: z57.array(publicProductSchema)
|
|
34346
34521
|
});
|
|
34347
34522
|
|
|
34348
34523
|
// ../blocks/src/system/runtime/api/creditProducts.ts
|
|
@@ -34406,27 +34581,27 @@ function deriveCreditProductLabels(products, options = {}) {
|
|
|
34406
34581
|
}
|
|
34407
34582
|
|
|
34408
34583
|
// ../blocks/src/system/runtime/nodes/shop-commerce.shared.ts
|
|
34409
|
-
import { z as
|
|
34410
|
-
var storedProductCartItemSchema =
|
|
34411
|
-
kind:
|
|
34412
|
-
productId:
|
|
34413
|
-
productCategoryId:
|
|
34414
|
-
variantId:
|
|
34415
|
-
title:
|
|
34416
|
-
variantTitle:
|
|
34417
|
-
quantity:
|
|
34418
|
-
unitPriceCents:
|
|
34419
|
-
currency:
|
|
34420
|
-
imageUrl:
|
|
34421
|
-
soldOut:
|
|
34584
|
+
import { z as z58 } from "zod";
|
|
34585
|
+
var storedProductCartItemSchema = z58.object({
|
|
34586
|
+
kind: z58.literal("product"),
|
|
34587
|
+
productId: z58.string().min(1),
|
|
34588
|
+
productCategoryId: z58.string().min(1).optional().nullable(),
|
|
34589
|
+
variantId: z58.string().min(1).optional().nullable(),
|
|
34590
|
+
title: z58.string().min(1),
|
|
34591
|
+
variantTitle: z58.string().optional().nullable(),
|
|
34592
|
+
quantity: z58.number().finite(),
|
|
34593
|
+
unitPriceCents: z58.number().finite(),
|
|
34594
|
+
currency: z58.string().min(1),
|
|
34595
|
+
imageUrl: z58.string().optional().nullable(),
|
|
34596
|
+
soldOut: z58.boolean().optional()
|
|
34422
34597
|
});
|
|
34423
|
-
var storedPassCartItemSchema =
|
|
34424
|
-
kind:
|
|
34425
|
-
passId:
|
|
34426
|
-
title:
|
|
34427
|
-
quantity:
|
|
34428
|
-
unitPriceCents:
|
|
34429
|
-
currency:
|
|
34598
|
+
var storedPassCartItemSchema = z58.object({
|
|
34599
|
+
kind: z58.literal("pass"),
|
|
34600
|
+
passId: z58.string().min(1),
|
|
34601
|
+
title: z58.string().min(1),
|
|
34602
|
+
quantity: z58.number().finite().optional(),
|
|
34603
|
+
unitPriceCents: z58.number().finite(),
|
|
34604
|
+
currency: z58.string().min(1)
|
|
34430
34605
|
});
|
|
34431
34606
|
function deriveCommerceCheckoutState(state) {
|
|
34432
34607
|
if (state.items.length === 0) {
|
|
@@ -34465,10 +34640,7 @@ function resolveSelectedProduct(products, contentEntry, productSlug) {
|
|
|
34465
34640
|
|
|
34466
34641
|
// ../blocks/src/system/runtime/nodes/commerce/shared/display.ts
|
|
34467
34642
|
function formatCommercePrice(cents, currency) {
|
|
34468
|
-
return
|
|
34469
|
-
style: "currency",
|
|
34470
|
-
currency: currency.toUpperCase()
|
|
34471
|
-
}).format(cents / 100);
|
|
34643
|
+
return formatCurrencyAmount(cents, currency);
|
|
34472
34644
|
}
|
|
34473
34645
|
function getPassesHeading(passes, explicitHeading) {
|
|
34474
34646
|
if (explicitHeading) return explicitHeading;
|
|
@@ -34663,214 +34835,214 @@ function formatValidity(days) {
|
|
|
34663
34835
|
}
|
|
34664
34836
|
|
|
34665
34837
|
// ../blocks/src/system/runtime/nodes/shop.interactive.ts
|
|
34666
|
-
var shopModeSchema =
|
|
34667
|
-
var contentEntrySchema3 =
|
|
34668
|
-
id:
|
|
34669
|
-
slug:
|
|
34838
|
+
var shopModeSchema = z59.enum(["passes-memberships", "product-list", "product-detail", "cart", "checkout"]);
|
|
34839
|
+
var contentEntrySchema3 = z59.object({
|
|
34840
|
+
id: z59.string().nullable().optional(),
|
|
34841
|
+
slug: z59.string().nullable().optional()
|
|
34670
34842
|
}).nullable();
|
|
34671
|
-
var shopSourceSchema =
|
|
34672
|
-
className:
|
|
34843
|
+
var shopSourceSchema = z59.object({
|
|
34844
|
+
className: z59.string().nullable().optional(),
|
|
34673
34845
|
mode: shopModeSchema.optional(),
|
|
34674
|
-
heading:
|
|
34675
|
-
productSlug:
|
|
34676
|
-
showPasses:
|
|
34677
|
-
showMemberships:
|
|
34678
|
-
layout:
|
|
34679
|
-
columns:
|
|
34680
|
-
showDescriptions:
|
|
34681
|
-
showSummary:
|
|
34682
|
-
showBody:
|
|
34683
|
-
showPrices:
|
|
34684
|
-
showValidityPeriod:
|
|
34685
|
-
showPricePerCredit:
|
|
34686
|
-
passesHeading:
|
|
34687
|
-
membershipsHeading:
|
|
34688
|
-
buyButtonText:
|
|
34689
|
-
addButtonText:
|
|
34690
|
-
passPurchaseMode:
|
|
34691
|
-
subscribeButtonText:
|
|
34692
|
-
emptyStateText:
|
|
34693
|
-
checkoutButtonText:
|
|
34694
|
-
clearButtonText:
|
|
34695
|
-
submitButtonText:
|
|
34846
|
+
heading: z59.string().nullable().optional(),
|
|
34847
|
+
productSlug: z59.string().nullable().optional(),
|
|
34848
|
+
showPasses: z59.boolean().optional(),
|
|
34849
|
+
showMemberships: z59.boolean().optional(),
|
|
34850
|
+
layout: z59.enum(["grid", "list"]).optional(),
|
|
34851
|
+
columns: z59.string().optional(),
|
|
34852
|
+
showDescriptions: z59.boolean().optional(),
|
|
34853
|
+
showSummary: z59.boolean().optional(),
|
|
34854
|
+
showBody: z59.boolean().optional(),
|
|
34855
|
+
showPrices: z59.boolean().optional(),
|
|
34856
|
+
showValidityPeriod: z59.boolean().optional(),
|
|
34857
|
+
showPricePerCredit: z59.boolean().nullable().optional(),
|
|
34858
|
+
passesHeading: z59.string().optional(),
|
|
34859
|
+
membershipsHeading: z59.string().optional(),
|
|
34860
|
+
buyButtonText: z59.string().optional(),
|
|
34861
|
+
addButtonText: z59.string().optional(),
|
|
34862
|
+
passPurchaseMode: z59.enum(["add_to_cart", "buy_now"]).optional(),
|
|
34863
|
+
subscribeButtonText: z59.string().optional(),
|
|
34864
|
+
emptyStateText: z59.string().optional(),
|
|
34865
|
+
checkoutButtonText: z59.string().optional(),
|
|
34866
|
+
clearButtonText: z59.string().optional(),
|
|
34867
|
+
submitButtonText: z59.string().optional(),
|
|
34696
34868
|
contentEntry: contentEntrySchema3.optional(),
|
|
34697
|
-
passes:
|
|
34698
|
-
memberships:
|
|
34699
|
-
products:
|
|
34700
|
-
siteId:
|
|
34701
|
-
apiBaseUrl:
|
|
34869
|
+
passes: z59.array(publicPassProductSchema).nullable().optional(),
|
|
34870
|
+
memberships: z59.array(publicMembershipProductSchema).nullable().optional(),
|
|
34871
|
+
products: z59.array(publicProductSchema).nullable().optional(),
|
|
34872
|
+
siteId: z59.string().optional(),
|
|
34873
|
+
apiBaseUrl: z59.string().optional(),
|
|
34702
34874
|
stage: previewStageSchema.optional()
|
|
34703
34875
|
});
|
|
34704
|
-
var productVariantOptionDisplaySchema =
|
|
34705
|
-
id:
|
|
34706
|
-
label:
|
|
34707
|
-
soldOut:
|
|
34876
|
+
var productVariantOptionDisplaySchema = z59.object({
|
|
34877
|
+
id: z59.string(),
|
|
34878
|
+
label: z59.string(),
|
|
34879
|
+
soldOut: z59.boolean()
|
|
34708
34880
|
});
|
|
34709
|
-
var productCardDisplaySchema =
|
|
34710
|
-
productId:
|
|
34711
|
-
title:
|
|
34712
|
-
path:
|
|
34713
|
-
summary:
|
|
34714
|
-
priceLabel:
|
|
34715
|
-
image:
|
|
34716
|
-
url:
|
|
34717
|
-
alt:
|
|
34881
|
+
var productCardDisplaySchema = z59.object({
|
|
34882
|
+
productId: z59.string(),
|
|
34883
|
+
title: z59.string(),
|
|
34884
|
+
path: z59.string().nullable(),
|
|
34885
|
+
summary: z59.string().nullable(),
|
|
34886
|
+
priceLabel: z59.string().nullable(),
|
|
34887
|
+
image: z59.object({
|
|
34888
|
+
url: z59.string(),
|
|
34889
|
+
alt: z59.string().nullable()
|
|
34718
34890
|
}).nullable(),
|
|
34719
|
-
variantOptions:
|
|
34720
|
-
selectedVariantId:
|
|
34721
|
-
selectionLabel:
|
|
34722
|
-
actionLabel:
|
|
34723
|
-
soldOut:
|
|
34891
|
+
variantOptions: z59.array(productVariantOptionDisplaySchema),
|
|
34892
|
+
selectedVariantId: z59.string().nullable(),
|
|
34893
|
+
selectionLabel: z59.string(),
|
|
34894
|
+
actionLabel: z59.string(),
|
|
34895
|
+
soldOut: z59.boolean()
|
|
34724
34896
|
});
|
|
34725
|
-
var productListDisplaySchema =
|
|
34726
|
-
kind:
|
|
34727
|
-
state:
|
|
34728
|
-
heading:
|
|
34729
|
-
className:
|
|
34730
|
-
layout:
|
|
34731
|
-
columns:
|
|
34732
|
-
emptyMessage:
|
|
34733
|
-
cards:
|
|
34897
|
+
var productListDisplaySchema = z59.object({
|
|
34898
|
+
kind: z59.literal("product-list"),
|
|
34899
|
+
state: z59.enum(["empty", "ready"]),
|
|
34900
|
+
heading: z59.string().nullable(),
|
|
34901
|
+
className: z59.string().nullable(),
|
|
34902
|
+
layout: z59.enum(["grid", "list"]),
|
|
34903
|
+
columns: z59.string(),
|
|
34904
|
+
emptyMessage: z59.string(),
|
|
34905
|
+
cards: z59.array(productCardDisplaySchema)
|
|
34734
34906
|
});
|
|
34735
|
-
var productDetailDisplaySchema =
|
|
34736
|
-
|
|
34737
|
-
kind:
|
|
34738
|
-
state:
|
|
34739
|
-
heading:
|
|
34740
|
-
className:
|
|
34741
|
-
emptyMessage:
|
|
34907
|
+
var productDetailDisplaySchema = z59.discriminatedUnion("state", [
|
|
34908
|
+
z59.object({
|
|
34909
|
+
kind: z59.literal("product-detail"),
|
|
34910
|
+
state: z59.literal("empty"),
|
|
34911
|
+
heading: z59.string().nullable(),
|
|
34912
|
+
className: z59.string().nullable(),
|
|
34913
|
+
emptyMessage: z59.string()
|
|
34742
34914
|
}),
|
|
34743
|
-
|
|
34744
|
-
kind:
|
|
34745
|
-
state:
|
|
34746
|
-
heading:
|
|
34747
|
-
className:
|
|
34748
|
-
title:
|
|
34749
|
-
priceLabel:
|
|
34750
|
-
summary:
|
|
34751
|
-
categoryLabel:
|
|
34752
|
-
gallery:
|
|
34753
|
-
url:
|
|
34754
|
-
alt:
|
|
34915
|
+
z59.object({
|
|
34916
|
+
kind: z59.literal("product-detail"),
|
|
34917
|
+
state: z59.literal("ready"),
|
|
34918
|
+
heading: z59.string().nullable(),
|
|
34919
|
+
className: z59.string().nullable(),
|
|
34920
|
+
title: z59.string(),
|
|
34921
|
+
priceLabel: z59.string(),
|
|
34922
|
+
summary: z59.string().nullable(),
|
|
34923
|
+
categoryLabel: z59.string().nullable(),
|
|
34924
|
+
gallery: z59.array(z59.object({
|
|
34925
|
+
url: z59.string(),
|
|
34926
|
+
alt: z59.string().nullable()
|
|
34755
34927
|
})),
|
|
34756
|
-
variantOptions:
|
|
34757
|
-
selectedVariantId:
|
|
34758
|
-
selectionLabel:
|
|
34759
|
-
actionLabel:
|
|
34760
|
-
soldOut:
|
|
34761
|
-
body:
|
|
34928
|
+
variantOptions: z59.array(productVariantOptionDisplaySchema),
|
|
34929
|
+
selectedVariantId: z59.string().nullable(),
|
|
34930
|
+
selectionLabel: z59.string(),
|
|
34931
|
+
actionLabel: z59.string(),
|
|
34932
|
+
soldOut: z59.boolean(),
|
|
34933
|
+
body: z59.unknown().nullable()
|
|
34762
34934
|
})
|
|
34763
34935
|
]);
|
|
34764
|
-
var passCardDisplaySchema =
|
|
34765
|
-
id:
|
|
34766
|
-
title:
|
|
34767
|
-
description:
|
|
34768
|
-
priceLabel:
|
|
34769
|
-
creditsLabel:
|
|
34770
|
-
perCreditLabel:
|
|
34771
|
-
validityLabel:
|
|
34772
|
-
actionLabel:
|
|
34936
|
+
var passCardDisplaySchema = z59.object({
|
|
34937
|
+
id: z59.string(),
|
|
34938
|
+
title: z59.string(),
|
|
34939
|
+
description: z59.string().nullable(),
|
|
34940
|
+
priceLabel: z59.string(),
|
|
34941
|
+
creditsLabel: z59.string(),
|
|
34942
|
+
perCreditLabel: z59.string().nullable(),
|
|
34943
|
+
validityLabel: z59.string().nullable(),
|
|
34944
|
+
actionLabel: z59.string()
|
|
34773
34945
|
});
|
|
34774
|
-
var membershipCardDisplaySchema =
|
|
34775
|
-
id:
|
|
34776
|
-
title:
|
|
34777
|
-
description:
|
|
34778
|
-
priceLabel:
|
|
34779
|
-
intervalLabel:
|
|
34780
|
-
actionLabel:
|
|
34946
|
+
var membershipCardDisplaySchema = z59.object({
|
|
34947
|
+
id: z59.string(),
|
|
34948
|
+
title: z59.string(),
|
|
34949
|
+
description: z59.string().nullable(),
|
|
34950
|
+
priceLabel: z59.string(),
|
|
34951
|
+
intervalLabel: z59.string(),
|
|
34952
|
+
actionLabel: z59.string()
|
|
34781
34953
|
});
|
|
34782
|
-
var passesMembershipsDisplaySchema =
|
|
34783
|
-
kind:
|
|
34784
|
-
state:
|
|
34785
|
-
className:
|
|
34786
|
-
layout:
|
|
34787
|
-
columns:
|
|
34788
|
-
emptyMessage:
|
|
34789
|
-
passesHeading:
|
|
34790
|
-
membershipsHeading:
|
|
34791
|
-
passes:
|
|
34792
|
-
memberships:
|
|
34954
|
+
var passesMembershipsDisplaySchema = z59.object({
|
|
34955
|
+
kind: z59.literal("passes-memberships"),
|
|
34956
|
+
state: z59.enum(["empty", "ready"]),
|
|
34957
|
+
className: z59.string().nullable(),
|
|
34958
|
+
layout: z59.enum(["grid", "list"]),
|
|
34959
|
+
columns: z59.string(),
|
|
34960
|
+
emptyMessage: z59.string(),
|
|
34961
|
+
passesHeading: z59.string(),
|
|
34962
|
+
membershipsHeading: z59.string(),
|
|
34963
|
+
passes: z59.array(passCardDisplaySchema),
|
|
34964
|
+
memberships: z59.array(membershipCardDisplaySchema)
|
|
34793
34965
|
});
|
|
34794
|
-
var cartLineDisplaySchema =
|
|
34795
|
-
key:
|
|
34796
|
-
title:
|
|
34797
|
-
priceLabel:
|
|
34798
|
-
quantity:
|
|
34799
|
-
quantityEditable:
|
|
34966
|
+
var cartLineDisplaySchema = z59.object({
|
|
34967
|
+
key: z59.string(),
|
|
34968
|
+
title: z59.string(),
|
|
34969
|
+
priceLabel: z59.string(),
|
|
34970
|
+
quantity: z59.number(),
|
|
34971
|
+
quantityEditable: z59.boolean()
|
|
34800
34972
|
});
|
|
34801
|
-
var cartDisplaySchema =
|
|
34802
|
-
kind:
|
|
34803
|
-
state:
|
|
34804
|
-
heading:
|
|
34805
|
-
className:
|
|
34806
|
-
emptyMessage:
|
|
34807
|
-
supportText:
|
|
34808
|
-
items:
|
|
34809
|
-
subtotalLabel:
|
|
34810
|
-
checkoutButtonText:
|
|
34811
|
-
clearButtonText:
|
|
34973
|
+
var cartDisplaySchema = z59.object({
|
|
34974
|
+
kind: z59.literal("cart"),
|
|
34975
|
+
state: z59.enum(["empty", "ready"]),
|
|
34976
|
+
heading: z59.string().nullable(),
|
|
34977
|
+
className: z59.string().nullable(),
|
|
34978
|
+
emptyMessage: z59.string(),
|
|
34979
|
+
supportText: z59.string().nullable(),
|
|
34980
|
+
items: z59.array(cartLineDisplaySchema),
|
|
34981
|
+
subtotalLabel: z59.string().nullable(),
|
|
34982
|
+
checkoutButtonText: z59.string(),
|
|
34983
|
+
clearButtonText: z59.string()
|
|
34812
34984
|
});
|
|
34813
|
-
var checkoutDisplaySchema =
|
|
34814
|
-
kind:
|
|
34815
|
-
state:
|
|
34816
|
-
heading:
|
|
34817
|
-
className:
|
|
34818
|
-
message:
|
|
34819
|
-
submitButtonText:
|
|
34985
|
+
var checkoutDisplaySchema = z59.object({
|
|
34986
|
+
kind: z59.literal("checkout"),
|
|
34987
|
+
state: z59.enum(["empty", "blocked", "ready"]),
|
|
34988
|
+
heading: z59.string().nullable(),
|
|
34989
|
+
className: z59.string().nullable(),
|
|
34990
|
+
message: z59.string().nullable(),
|
|
34991
|
+
submitButtonText: z59.string()
|
|
34820
34992
|
});
|
|
34821
|
-
var passesMembershipsHydrationSchema =
|
|
34822
|
-
passes:
|
|
34823
|
-
memberships:
|
|
34824
|
-
passPurchaseMode:
|
|
34993
|
+
var passesMembershipsHydrationSchema = z59.object({
|
|
34994
|
+
passes: z59.array(publicPassProductSchema),
|
|
34995
|
+
memberships: z59.array(publicMembershipProductSchema),
|
|
34996
|
+
passPurchaseMode: z59.enum(["add_to_cart", "buy_now"])
|
|
34825
34997
|
});
|
|
34826
|
-
var productListHydrationSchema =
|
|
34827
|
-
products:
|
|
34828
|
-
showSummary:
|
|
34829
|
-
showPrices:
|
|
34830
|
-
addButtonText:
|
|
34998
|
+
var productListHydrationSchema = z59.object({
|
|
34999
|
+
products: z59.array(publicProductSchema),
|
|
35000
|
+
showSummary: z59.boolean(),
|
|
35001
|
+
showPrices: z59.boolean(),
|
|
35002
|
+
addButtonText: z59.string()
|
|
34831
35003
|
});
|
|
34832
|
-
var productDetailHydrationSchema =
|
|
34833
|
-
products:
|
|
34834
|
-
productId:
|
|
34835
|
-
showSummary:
|
|
34836
|
-
showBody:
|
|
34837
|
-
addButtonText:
|
|
35004
|
+
var productDetailHydrationSchema = z59.object({
|
|
35005
|
+
products: z59.array(publicProductSchema),
|
|
35006
|
+
productId: z59.string().nullable(),
|
|
35007
|
+
showSummary: z59.boolean(),
|
|
35008
|
+
showBody: z59.boolean(),
|
|
35009
|
+
addButtonText: z59.string()
|
|
34838
35010
|
});
|
|
34839
|
-
var cartHydrationSchema =
|
|
34840
|
-
emptyStateText:
|
|
34841
|
-
checkoutButtonText:
|
|
34842
|
-
clearButtonText:
|
|
35011
|
+
var cartHydrationSchema = z59.object({
|
|
35012
|
+
emptyStateText: z59.string(),
|
|
35013
|
+
checkoutButtonText: z59.string(),
|
|
35014
|
+
clearButtonText: z59.string()
|
|
34843
35015
|
});
|
|
34844
|
-
var checkoutHydrationSchema =
|
|
34845
|
-
emptyStateText:
|
|
34846
|
-
submitButtonText:
|
|
35016
|
+
var checkoutHydrationSchema = z59.object({
|
|
35017
|
+
emptyStateText: z59.string(),
|
|
35018
|
+
submitButtonText: z59.string()
|
|
34847
35019
|
});
|
|
34848
|
-
var passesMembershipsRenderSchema =
|
|
35020
|
+
var passesMembershipsRenderSchema = z59.object({
|
|
34849
35021
|
display: passesMembershipsDisplaySchema,
|
|
34850
35022
|
hydration: passesMembershipsHydrationSchema
|
|
34851
35023
|
});
|
|
34852
|
-
var productListRenderSchema =
|
|
35024
|
+
var productListRenderSchema = z59.object({
|
|
34853
35025
|
display: productListDisplaySchema,
|
|
34854
35026
|
hydration: productListHydrationSchema
|
|
34855
35027
|
});
|
|
34856
|
-
var productDetailRenderSchema =
|
|
35028
|
+
var productDetailRenderSchema = z59.object({
|
|
34857
35029
|
display: productDetailDisplaySchema,
|
|
34858
35030
|
hydration: productDetailHydrationSchema
|
|
34859
35031
|
});
|
|
34860
|
-
var cartRenderSchema =
|
|
35032
|
+
var cartRenderSchema = z59.object({
|
|
34861
35033
|
display: cartDisplaySchema,
|
|
34862
35034
|
hydration: cartHydrationSchema
|
|
34863
35035
|
});
|
|
34864
|
-
var checkoutRenderSchema =
|
|
35036
|
+
var checkoutRenderSchema = z59.object({
|
|
34865
35037
|
display: checkoutDisplaySchema,
|
|
34866
35038
|
hydration: checkoutHydrationSchema
|
|
34867
35039
|
});
|
|
34868
35040
|
function resolveShowPricePerCredit(source) {
|
|
34869
35041
|
return source.showPricePerCredit ?? true;
|
|
34870
35042
|
}
|
|
34871
|
-
var shopIslandMetaCodec = createZodCodec(
|
|
34872
|
-
siteId:
|
|
34873
|
-
apiBaseUrl:
|
|
35043
|
+
var shopIslandMetaCodec = createZodCodec(z59.object({
|
|
35044
|
+
siteId: z59.string().optional(),
|
|
35045
|
+
apiBaseUrl: z59.string().optional(),
|
|
34874
35046
|
stage: previewStageSchema.optional()
|
|
34875
35047
|
}));
|
|
34876
35048
|
var shopIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "stage");
|
|
@@ -35323,9 +35495,9 @@ var shopBlockDefinition = {
|
|
|
35323
35495
|
runtime: shopBlockRuntime,
|
|
35324
35496
|
dataSchemas: {
|
|
35325
35497
|
// listPublicPasses returns { passes: [...] }
|
|
35326
|
-
passes:
|
|
35498
|
+
passes: z60.object({ passes: z60.array(publicPassProductSchema) }).optional(),
|
|
35327
35499
|
// listPublicMemberships returns { memberships: [...] }
|
|
35328
|
-
memberships:
|
|
35500
|
+
memberships: z60.object({ memberships: z60.array(publicMembershipProductSchema) }).optional()
|
|
35329
35501
|
},
|
|
35330
35502
|
dataLoaders: {
|
|
35331
35503
|
// Load passes for display
|
|
@@ -35348,7 +35520,7 @@ var shopBlockDefinition = {
|
|
|
35348
35520
|
};
|
|
35349
35521
|
|
|
35350
35522
|
// ../blocks/src/system/blocks/product-list.ts
|
|
35351
|
-
import { z as
|
|
35523
|
+
import { z as z61 } from "zod";
|
|
35352
35524
|
var productListManifest = createBlockManifest({
|
|
35353
35525
|
id: "block.product-list",
|
|
35354
35526
|
version: "1.0.0",
|
|
@@ -35481,7 +35653,7 @@ var productListBlockDefinition = {
|
|
|
35481
35653
|
}
|
|
35482
35654
|
}
|
|
35483
35655
|
};
|
|
35484
|
-
var productListDataSchema =
|
|
35656
|
+
var productListDataSchema = z61.object({
|
|
35485
35657
|
products: publicProductsResponseSchema.optional()
|
|
35486
35658
|
});
|
|
35487
35659
|
|
|
@@ -35742,72 +35914,72 @@ var checkoutBlockDefinition = {
|
|
|
35742
35914
|
};
|
|
35743
35915
|
|
|
35744
35916
|
// ../blocks/src/system/runtime/nodes/gifting.interactive.ts
|
|
35745
|
-
import { z as
|
|
35746
|
-
var publicGiftCardOfferSchema =
|
|
35747
|
-
id:
|
|
35748
|
-
kind:
|
|
35749
|
-
title:
|
|
35750
|
-
description:
|
|
35751
|
-
sortOrder:
|
|
35752
|
-
giftCard:
|
|
35753
|
-
fixedDenominations:
|
|
35754
|
-
customAmountEnabled:
|
|
35755
|
-
customAmountMinCents:
|
|
35756
|
-
customAmountMaxCents:
|
|
35917
|
+
import { z as z62 } from "zod";
|
|
35918
|
+
var publicGiftCardOfferSchema = z62.object({
|
|
35919
|
+
id: z62.string(),
|
|
35920
|
+
kind: z62.literal("gift_card"),
|
|
35921
|
+
title: z62.string(),
|
|
35922
|
+
description: z62.string().nullable(),
|
|
35923
|
+
sortOrder: z62.number().int(),
|
|
35924
|
+
giftCard: z62.object({
|
|
35925
|
+
fixedDenominations: z62.array(z62.number().int().positive()),
|
|
35926
|
+
customAmountEnabled: z62.boolean(),
|
|
35927
|
+
customAmountMinCents: z62.number().int().positive(),
|
|
35928
|
+
customAmountMaxCents: z62.number().int().positive()
|
|
35757
35929
|
}),
|
|
35758
|
-
voucher:
|
|
35930
|
+
voucher: z62.null()
|
|
35759
35931
|
});
|
|
35760
|
-
var publicVoucherOfferSchema =
|
|
35761
|
-
id:
|
|
35762
|
-
kind:
|
|
35763
|
-
title:
|
|
35764
|
-
description:
|
|
35765
|
-
sortOrder:
|
|
35766
|
-
giftCard:
|
|
35767
|
-
voucher:
|
|
35768
|
-
purchaseAmountCents:
|
|
35932
|
+
var publicVoucherOfferSchema = z62.object({
|
|
35933
|
+
id: z62.string(),
|
|
35934
|
+
kind: z62.literal("voucher"),
|
|
35935
|
+
title: z62.string(),
|
|
35936
|
+
description: z62.string().nullable(),
|
|
35937
|
+
sortOrder: z62.number().int(),
|
|
35938
|
+
giftCard: z62.null(),
|
|
35939
|
+
voucher: z62.object({
|
|
35940
|
+
purchaseAmountCents: z62.number().int().positive()
|
|
35769
35941
|
})
|
|
35770
35942
|
});
|
|
35771
|
-
var publicGiftingOffersResponseSchema =
|
|
35772
|
-
currency:
|
|
35773
|
-
giftCards:
|
|
35774
|
-
vouchers:
|
|
35943
|
+
var publicGiftingOffersResponseSchema = z62.object({
|
|
35944
|
+
currency: z62.string(),
|
|
35945
|
+
giftCards: z62.array(publicGiftCardOfferSchema),
|
|
35946
|
+
vouchers: z62.array(publicVoucherOfferSchema)
|
|
35775
35947
|
});
|
|
35776
|
-
var giftingSourceSchema =
|
|
35777
|
-
siteId:
|
|
35778
|
-
apiBaseUrl:
|
|
35948
|
+
var giftingSourceSchema = z62.object({
|
|
35949
|
+
siteId: z62.string().optional(),
|
|
35950
|
+
apiBaseUrl: z62.string().optional(),
|
|
35779
35951
|
offers: publicGiftingOffersResponseSchema.nullable().optional(),
|
|
35780
|
-
className:
|
|
35781
|
-
heading:
|
|
35782
|
-
intro:
|
|
35783
|
-
giftCardsHeading:
|
|
35784
|
-
vouchersHeading:
|
|
35785
|
-
emptyStateText:
|
|
35786
|
-
checkoutButtonText:
|
|
35787
|
-
successMessage:
|
|
35952
|
+
className: z62.string().nullable().optional(),
|
|
35953
|
+
heading: z62.string().nullable().optional(),
|
|
35954
|
+
intro: z62.string().nullable().optional(),
|
|
35955
|
+
giftCardsHeading: z62.string().nullable().optional(),
|
|
35956
|
+
vouchersHeading: z62.string().nullable().optional(),
|
|
35957
|
+
emptyStateText: z62.string().nullable().optional(),
|
|
35958
|
+
checkoutButtonText: z62.string().nullable().optional(),
|
|
35959
|
+
successMessage: z62.string().nullable().optional()
|
|
35788
35960
|
});
|
|
35789
|
-
var giftingDisplaySchema =
|
|
35790
|
-
kind:
|
|
35791
|
-
state:
|
|
35792
|
-
className:
|
|
35793
|
-
heading:
|
|
35794
|
-
intro:
|
|
35795
|
-
giftCardsHeading:
|
|
35796
|
-
vouchersHeading:
|
|
35797
|
-
emptyStateText:
|
|
35961
|
+
var giftingDisplaySchema = z62.object({
|
|
35962
|
+
kind: z62.literal("gifting"),
|
|
35963
|
+
state: z62.literal("ready"),
|
|
35964
|
+
className: z62.string().nullable(),
|
|
35965
|
+
heading: z62.string(),
|
|
35966
|
+
intro: z62.string().nullable(),
|
|
35967
|
+
giftCardsHeading: z62.string(),
|
|
35968
|
+
vouchersHeading: z62.string(),
|
|
35969
|
+
emptyStateText: z62.string()
|
|
35798
35970
|
});
|
|
35799
|
-
var giftingHydrationSchema =
|
|
35971
|
+
var giftingHydrationSchema = z62.object({
|
|
35800
35972
|
offers: publicGiftingOffersResponseSchema.nullable(),
|
|
35801
|
-
checkoutButtonText:
|
|
35802
|
-
successMessage:
|
|
35973
|
+
checkoutButtonText: z62.string(),
|
|
35974
|
+
successMessage: z62.string()
|
|
35803
35975
|
});
|
|
35804
|
-
var giftingRenderSchema =
|
|
35976
|
+
var giftingRenderSchema = z62.object({
|
|
35805
35977
|
display: giftingDisplaySchema,
|
|
35806
35978
|
hydration: giftingHydrationSchema
|
|
35807
35979
|
});
|
|
35808
|
-
var giftingIslandMetaCodec = createZodCodec(
|
|
35809
|
-
siteId:
|
|
35810
|
-
apiBaseUrl:
|
|
35980
|
+
var giftingIslandMetaCodec = createZodCodec(z62.object({
|
|
35981
|
+
siteId: z62.string().optional(),
|
|
35982
|
+
apiBaseUrl: z62.string().optional()
|
|
35811
35983
|
}));
|
|
35812
35984
|
var giftingIslandMetaKeys = defineInteractiveIslandMetaKeys(
|
|
35813
35985
|
"siteId",
|
|
@@ -35989,7 +36161,89 @@ var giftingBlockDefinition = {
|
|
|
35989
36161
|
};
|
|
35990
36162
|
|
|
35991
36163
|
// ../blocks/src/system/runtime/nodes/newsletter-form.interactive.ts
|
|
35992
|
-
import { z as
|
|
36164
|
+
import { z as z63 } from "zod";
|
|
36165
|
+
|
|
36166
|
+
// ../blocks/src/system/blocks/newsletter-signup-destination.ts
|
|
36167
|
+
function parseNewsletterSignupBlockId(value) {
|
|
36168
|
+
const trimmed = parseTrimmedString(value);
|
|
36169
|
+
return trimmed && BLOCK_ID_PATTERN.test(trimmed) ? trimmed : null;
|
|
36170
|
+
}
|
|
36171
|
+
function parseSignedNewsletterDestinationRef(value) {
|
|
36172
|
+
const trimmed = parseTrimmedString(value);
|
|
36173
|
+
return trimmed && SIGNED_DESTINATION_REF_PATTERN.test(trimmed) ? trimmed : null;
|
|
36174
|
+
}
|
|
36175
|
+
function parseNewsletterSignupDestinationProvider(value) {
|
|
36176
|
+
return value === "riverbank" || value === "mailchimp" ? value : null;
|
|
36177
|
+
}
|
|
36178
|
+
function buildNewsletterSignupBlockRef(blockId) {
|
|
36179
|
+
const parsed = parseNewsletterSignupBlockId(blockId);
|
|
36180
|
+
return parsed ? { tag: "block_ref", blockId: parsed } : null;
|
|
36181
|
+
}
|
|
36182
|
+
function normalizeNewsletterSignupEditorValuesForDestination(values) {
|
|
36183
|
+
const destinationProvider = parseNewsletterSignupDestinationProvider(values.destinationProvider) ?? "riverbank";
|
|
36184
|
+
if (destinationProvider === "mailchimp") {
|
|
36185
|
+
return {
|
|
36186
|
+
destinationProvider,
|
|
36187
|
+
mailchimpAudienceId: values.mailchimpAudienceId,
|
|
36188
|
+
mailchimpTags: values.mailchimpTags
|
|
36189
|
+
};
|
|
36190
|
+
}
|
|
36191
|
+
return {
|
|
36192
|
+
destinationProvider,
|
|
36193
|
+
listId: values.listId,
|
|
36194
|
+
tags: values.tags
|
|
36195
|
+
};
|
|
36196
|
+
}
|
|
36197
|
+
function deriveNewsletterSignupRuntimeSource(values) {
|
|
36198
|
+
const normalized = normalizeNewsletterSignupEditorValuesForDestination(values);
|
|
36199
|
+
if (normalized.destinationProvider === "mailchimp") {
|
|
36200
|
+
return {
|
|
36201
|
+
destinationProvider: "mailchimp",
|
|
36202
|
+
listId: null,
|
|
36203
|
+
tags: null
|
|
36204
|
+
};
|
|
36205
|
+
}
|
|
36206
|
+
return {
|
|
36207
|
+
destinationProvider: "riverbank",
|
|
36208
|
+
listId: parseTrimmedString(normalized.listId),
|
|
36209
|
+
tags: parseTrimmedString(normalized.tags)
|
|
36210
|
+
};
|
|
36211
|
+
}
|
|
36212
|
+
function sanitizeNewsletterSignupPublicContent(content) {
|
|
36213
|
+
if (!isRecord9(content)) return content;
|
|
36214
|
+
const provider = parseNewsletterSignupDestinationProvider(content.destinationProvider) ?? getProviderFromExplicitDestination(content.destination);
|
|
36215
|
+
const {
|
|
36216
|
+
destination: _destination,
|
|
36217
|
+
destinationProvider: _destinationProvider,
|
|
36218
|
+
mailchimpAudienceId: _mailchimpAudienceId,
|
|
36219
|
+
mailchimpTags: _mailchimpTags,
|
|
36220
|
+
listId,
|
|
36221
|
+
tags: tags2,
|
|
36222
|
+
...publicContent
|
|
36223
|
+
} = content;
|
|
36224
|
+
const mutablePublicContent = { ...publicContent };
|
|
36225
|
+
if (provider !== "mailchimp") {
|
|
36226
|
+
if ("listId" in content) mutablePublicContent.listId = listId;
|
|
36227
|
+
if ("tags" in content) mutablePublicContent.tags = tags2;
|
|
36228
|
+
}
|
|
36229
|
+
return mutablePublicContent;
|
|
36230
|
+
}
|
|
36231
|
+
function getProviderFromExplicitDestination(destination) {
|
|
36232
|
+
if (!isRecord9(destination) || typeof destination.tag !== "string") return null;
|
|
36233
|
+
if (destination.tag === "riverbank_list") return "riverbank";
|
|
36234
|
+
if (destination.tag === "mailchimp_audience") return "mailchimp";
|
|
36235
|
+
return null;
|
|
36236
|
+
}
|
|
36237
|
+
var BLOCK_ID_PATTERN = /^[A-Za-z0-9._:-]{1,200}$/;
|
|
36238
|
+
var SIGNED_DESTINATION_REF_PATTERN = /^[A-Za-z0-9._~-]{16,1000}$/;
|
|
36239
|
+
function parseTrimmedString(value) {
|
|
36240
|
+
if (typeof value !== "string") return null;
|
|
36241
|
+
const trimmed = value.trim();
|
|
36242
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
36243
|
+
}
|
|
36244
|
+
function isRecord9(value) {
|
|
36245
|
+
return typeof value === "object" && value !== null;
|
|
36246
|
+
}
|
|
35993
36247
|
|
|
35994
36248
|
// ../blocks/src/system/runtime/nodes/newsletter-form.types.ts
|
|
35995
36249
|
function getPresetFields(preset2, options) {
|
|
@@ -36042,49 +36296,65 @@ function withOptionalPhone(fields3, includePhone) {
|
|
|
36042
36296
|
}
|
|
36043
36297
|
|
|
36044
36298
|
// ../blocks/src/system/runtime/nodes/newsletter-form.interactive.ts
|
|
36045
|
-
var newsletterPresetSchema =
|
|
36046
|
-
var
|
|
36047
|
-
|
|
36048
|
-
|
|
36049
|
-
|
|
36050
|
-
|
|
36051
|
-
|
|
36299
|
+
var newsletterPresetSchema = z63.enum(["emailOnly", "emailName", "emailFirstLast", "emailNameCompany"]);
|
|
36300
|
+
var newsletterDestinationProviderSchema = z63.enum(["riverbank", "mailchimp"]);
|
|
36301
|
+
var newsletterFieldSchema = z63.object({
|
|
36302
|
+
id: z63.string(),
|
|
36303
|
+
type: z63.enum(["email", "text"]),
|
|
36304
|
+
label: z63.string(),
|
|
36305
|
+
required: z63.boolean(),
|
|
36306
|
+
placeholder: z63.string().optional()
|
|
36052
36307
|
});
|
|
36053
|
-
var
|
|
36054
|
-
|
|
36055
|
-
|
|
36056
|
-
|
|
36308
|
+
var newsletterSignupBlockIdSchema = z63.string().trim().min(1).transform(parseRequiredNewsletterSignupBlockId);
|
|
36309
|
+
var signedNewsletterDestinationRefSchema = z63.string().trim().min(1).transform(parseRequiredSignedNewsletterDestinationRef);
|
|
36310
|
+
var newsletterPublicDestinationRefSchema = z63.discriminatedUnion("tag", [
|
|
36311
|
+
z63.object({
|
|
36312
|
+
tag: z63.literal("block_ref"),
|
|
36313
|
+
blockId: newsletterSignupBlockIdSchema
|
|
36314
|
+
}),
|
|
36315
|
+
z63.object({
|
|
36316
|
+
tag: z63.literal("signed_destination_ref"),
|
|
36317
|
+
token: signedNewsletterDestinationRefSchema
|
|
36318
|
+
})
|
|
36319
|
+
]);
|
|
36320
|
+
var newsletterSourceSchema = z63.object({
|
|
36321
|
+
blockId: z63.string().nullable().optional(),
|
|
36322
|
+
siteId: z63.string().optional(),
|
|
36323
|
+
apiBaseUrl: z63.string().optional(),
|
|
36324
|
+
listId: z63.string().nullable().optional(),
|
|
36325
|
+
destinationProvider: newsletterDestinationProviderSchema.nullable().optional(),
|
|
36057
36326
|
preset: newsletterPresetSchema.optional(),
|
|
36058
|
-
includePhone:
|
|
36059
|
-
buttonLabel:
|
|
36060
|
-
successMessage:
|
|
36061
|
-
privacyNote:
|
|
36062
|
-
tags:
|
|
36063
|
-
spamProtectionEnabled:
|
|
36064
|
-
className:
|
|
36327
|
+
includePhone: z63.boolean().optional(),
|
|
36328
|
+
buttonLabel: z63.string().nullable().optional(),
|
|
36329
|
+
successMessage: z63.string().nullable().optional(),
|
|
36330
|
+
privacyNote: z63.string().nullable().optional(),
|
|
36331
|
+
tags: z63.string().nullable().optional(),
|
|
36332
|
+
spamProtectionEnabled: z63.boolean().optional(),
|
|
36333
|
+
className: z63.string().nullable().optional()
|
|
36065
36334
|
});
|
|
36066
|
-
var newsletterDisplaySchema =
|
|
36067
|
-
kind:
|
|
36068
|
-
className:
|
|
36069
|
-
buttonLabel:
|
|
36070
|
-
successMessage:
|
|
36071
|
-
privacyNote:
|
|
36072
|
-
fields:
|
|
36335
|
+
var newsletterDisplaySchema = z63.object({
|
|
36336
|
+
kind: z63.literal("newsletter-form"),
|
|
36337
|
+
className: z63.string().nullable(),
|
|
36338
|
+
buttonLabel: z63.string(),
|
|
36339
|
+
successMessage: z63.string().nullable(),
|
|
36340
|
+
privacyNote: z63.string().nullable(),
|
|
36341
|
+
fields: z63.array(newsletterFieldSchema)
|
|
36073
36342
|
});
|
|
36074
|
-
var newsletterHydrationSchema =
|
|
36075
|
-
|
|
36343
|
+
var newsletterHydrationSchema = z63.object({
|
|
36344
|
+
destinationRef: newsletterPublicDestinationRefSchema.nullable().optional(),
|
|
36345
|
+
listId: z63.string().nullable().optional(),
|
|
36076
36346
|
preset: newsletterPresetSchema,
|
|
36077
|
-
includePhone:
|
|
36078
|
-
tags:
|
|
36079
|
-
spamProtectionEnabled:
|
|
36347
|
+
includePhone: z63.boolean(),
|
|
36348
|
+
tags: z63.string().nullable().optional(),
|
|
36349
|
+
spamProtectionEnabled: z63.boolean().optional()
|
|
36080
36350
|
});
|
|
36081
|
-
var newsletterRenderSchema =
|
|
36351
|
+
var newsletterRenderSchema = z63.object({
|
|
36082
36352
|
display: newsletterDisplaySchema,
|
|
36083
36353
|
hydration: newsletterHydrationSchema
|
|
36084
36354
|
});
|
|
36085
|
-
var newsletterIslandMetaCodec = createZodCodec(
|
|
36086
|
-
siteId:
|
|
36087
|
-
apiBaseUrl:
|
|
36355
|
+
var newsletterIslandMetaCodec = createZodCodec(z63.object({
|
|
36356
|
+
siteId: z63.string().optional(),
|
|
36357
|
+
apiBaseUrl: z63.string().optional()
|
|
36088
36358
|
}));
|
|
36089
36359
|
var newsletterIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl");
|
|
36090
36360
|
function buildNewsletterDisplay(source) {
|
|
@@ -36105,16 +36375,20 @@ var newsletterFormBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
36105
36375
|
source: createZodCodec(newsletterSourceSchema),
|
|
36106
36376
|
render: createZodCodec(newsletterRenderSchema)
|
|
36107
36377
|
},
|
|
36108
|
-
buildRender: (source) =>
|
|
36109
|
-
|
|
36110
|
-
|
|
36111
|
-
|
|
36112
|
-
|
|
36113
|
-
|
|
36114
|
-
|
|
36115
|
-
|
|
36116
|
-
|
|
36117
|
-
|
|
36378
|
+
buildRender: (source) => {
|
|
36379
|
+
const runtimeSource = deriveNewsletterSignupRuntimeSource(source);
|
|
36380
|
+
return {
|
|
36381
|
+
display: buildNewsletterDisplay(source),
|
|
36382
|
+
hydration: {
|
|
36383
|
+
destinationRef: buildNewsletterSignupBlockRef(source.blockId),
|
|
36384
|
+
listId: runtimeSource.listId,
|
|
36385
|
+
preset: source.preset ?? "emailOnly",
|
|
36386
|
+
includePhone: source.includePhone ?? false,
|
|
36387
|
+
tags: runtimeSource.tags,
|
|
36388
|
+
spamProtectionEnabled: source.spamProtectionEnabled
|
|
36389
|
+
}
|
|
36390
|
+
};
|
|
36391
|
+
}
|
|
36118
36392
|
});
|
|
36119
36393
|
var newsletterFormInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
36120
36394
|
runtime: newsletterFormBlockRuntime,
|
|
@@ -36137,6 +36411,20 @@ function buildNewsletterFormInteractiveIslandProps(props2) {
|
|
|
36137
36411
|
source: props2
|
|
36138
36412
|
});
|
|
36139
36413
|
}
|
|
36414
|
+
function parseRequiredNewsletterSignupBlockId(value) {
|
|
36415
|
+
const parsed = parseNewsletterSignupBlockId(value);
|
|
36416
|
+
if (!parsed) {
|
|
36417
|
+
throw new Error("Newsletter signup block destination ref requires blockId");
|
|
36418
|
+
}
|
|
36419
|
+
return parsed;
|
|
36420
|
+
}
|
|
36421
|
+
function parseRequiredSignedNewsletterDestinationRef(value) {
|
|
36422
|
+
const parsed = parseSignedNewsletterDestinationRef(value);
|
|
36423
|
+
if (!parsed) {
|
|
36424
|
+
throw new Error("Newsletter signup signed destination ref requires token");
|
|
36425
|
+
}
|
|
36426
|
+
return parsed;
|
|
36427
|
+
}
|
|
36140
36428
|
|
|
36141
36429
|
// ../blocks/src/system/blocks/newsletter-signup.ts
|
|
36142
36430
|
var stackedComposition = composeFragments([
|
|
@@ -36216,23 +36504,23 @@ var newsletterSignupBlockDefinition = {
|
|
|
36216
36504
|
};
|
|
36217
36505
|
|
|
36218
36506
|
// ../blocks/src/system/blocks/team-members.ts
|
|
36219
|
-
import { z as
|
|
36507
|
+
import { z as z64 } from "zod";
|
|
36220
36508
|
var ITEM_NAME2 = "member";
|
|
36221
36509
|
var teamMemberPhotoSchema = mediaSchema2.refine((media2) => media2.type === "image", {
|
|
36222
36510
|
message: "Team member photos must be image media"
|
|
36223
36511
|
}).nullable();
|
|
36224
|
-
var teamMemberDataSchema =
|
|
36225
|
-
_type:
|
|
36226
|
-
id:
|
|
36227
|
-
name:
|
|
36228
|
-
role:
|
|
36229
|
-
roleLabel:
|
|
36230
|
-
bio:
|
|
36231
|
-
summary:
|
|
36512
|
+
var teamMemberDataSchema = z64.object({
|
|
36513
|
+
_type: z64.literal("teamMember"),
|
|
36514
|
+
id: z64.string(),
|
|
36515
|
+
name: z64.string(),
|
|
36516
|
+
role: z64.string().nullable(),
|
|
36517
|
+
roleLabel: z64.string().nullable(),
|
|
36518
|
+
bio: z64.string().nullable(),
|
|
36519
|
+
summary: z64.string().nullable(),
|
|
36232
36520
|
photo: teamMemberPhotoSchema,
|
|
36233
|
-
profilePath:
|
|
36521
|
+
profilePath: z64.string().nullable()
|
|
36234
36522
|
});
|
|
36235
|
-
var teamMembersDataSchema =
|
|
36523
|
+
var teamMembersDataSchema = z64.array(teamMemberDataSchema);
|
|
36236
36524
|
var dynamicSourceWhen = { equals: "site_staff" };
|
|
36237
36525
|
var manualSourceWhen = { equals: "site_staff", not: true };
|
|
36238
36526
|
var headingNode = text(
|
|
@@ -38170,7 +38458,7 @@ import React4 from "react";
|
|
|
38170
38458
|
// ../blocks/src/system/data/linkedContentEntries.ts
|
|
38171
38459
|
var LINKED_CONTENT_ENTRY_META_KEY = "__rbLinkedContentEntry";
|
|
38172
38460
|
function coerceLinkedContentEntriesPayload(payload) {
|
|
38173
|
-
if (!
|
|
38461
|
+
if (!isRecord10(payload)) return payload;
|
|
38174
38462
|
const response = payload;
|
|
38175
38463
|
if (!Array.isArray(response.entries)) return payload;
|
|
38176
38464
|
const contentType = parsePublicContentTypeMeta(response.contentType);
|
|
@@ -38178,16 +38466,16 @@ function coerceLinkedContentEntriesPayload(payload) {
|
|
|
38178
38466
|
return response.entries.map((entry) => enrichLinkedContentEntry(entry, contentType));
|
|
38179
38467
|
}
|
|
38180
38468
|
function getLinkedContentEntryMeta(value) {
|
|
38181
|
-
if (!
|
|
38469
|
+
if (!isRecord10(value)) return null;
|
|
38182
38470
|
const candidate = value[LINKED_CONTENT_ENTRY_META_KEY];
|
|
38183
38471
|
return isLinkedContentEntryMeta(candidate) ? candidate : null;
|
|
38184
38472
|
}
|
|
38185
38473
|
function buildLinkedContentEditTarget(input) {
|
|
38186
38474
|
const { entry, sourceBlockId, sourceBlockKind, itemIndex } = input;
|
|
38187
|
-
if (!
|
|
38475
|
+
if (!isRecord10(entry)) return null;
|
|
38188
38476
|
const meta = getLinkedContentEntryMeta(entry);
|
|
38189
38477
|
if (!meta || meta.support.kind !== "supported") return null;
|
|
38190
|
-
const content =
|
|
38478
|
+
const content = isRecord10(entry.content) ? entry.content : {};
|
|
38191
38479
|
return {
|
|
38192
38480
|
kind: "linked-content-entry",
|
|
38193
38481
|
entryId: meta.entryId,
|
|
@@ -38237,12 +38525,12 @@ function resolveLinkedEntryInlineFieldEligibility(input) {
|
|
|
38237
38525
|
};
|
|
38238
38526
|
}
|
|
38239
38527
|
function enrichLinkedContentEntry(entry, contentType) {
|
|
38240
|
-
if (!
|
|
38528
|
+
if (!isRecord10(entry)) return entry;
|
|
38241
38529
|
const entryId = typeof entry.id === "string" ? entry.id : null;
|
|
38242
38530
|
if (!entryId) return entry;
|
|
38243
38531
|
const title = typeof entry.title === "string" && entry.title.trim().length > 0 ? entry.title : entryId;
|
|
38244
38532
|
const optimisticHash = typeof entry.optimisticHash === "string" && entry.optimisticHash.length > 0 ? entry.optimisticHash : null;
|
|
38245
|
-
const content =
|
|
38533
|
+
const content = isRecord10(entry.content) ? entry.content : {};
|
|
38246
38534
|
const meta = {
|
|
38247
38535
|
kind: "linked-content-entry",
|
|
38248
38536
|
entryId,
|
|
@@ -38338,7 +38626,7 @@ function capitalize(value) {
|
|
|
38338
38626
|
return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
|
|
38339
38627
|
}
|
|
38340
38628
|
function parsePublicContentTypeMeta(value) {
|
|
38341
|
-
if (!
|
|
38629
|
+
if (!isRecord10(value)) return null;
|
|
38342
38630
|
if (typeof value.key !== "string" || value.key.trim().length === 0) return null;
|
|
38343
38631
|
return {
|
|
38344
38632
|
key: value.key,
|
|
@@ -38348,7 +38636,7 @@ function parsePublicContentTypeMeta(value) {
|
|
|
38348
38636
|
};
|
|
38349
38637
|
}
|
|
38350
38638
|
function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
38351
|
-
if (!
|
|
38639
|
+
if (!isRecord10(value) || typeof value.kind !== "string") return null;
|
|
38352
38640
|
switch (value.kind) {
|
|
38353
38641
|
case "generic":
|
|
38354
38642
|
return { kind: "generic" };
|
|
@@ -38362,7 +38650,7 @@ function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
|
38362
38650
|
}
|
|
38363
38651
|
}
|
|
38364
38652
|
function parsePublicContentTypeFieldMeta(value) {
|
|
38365
|
-
if (!
|
|
38653
|
+
if (!isRecord10(value)) return [];
|
|
38366
38654
|
if (typeof value.id !== "string" || typeof value.type !== "string") return [];
|
|
38367
38655
|
return [{
|
|
38368
38656
|
id: value.id,
|
|
@@ -38377,14 +38665,14 @@ function parseStringArray(value) {
|
|
|
38377
38665
|
return value.filter((item) => typeof item === "string");
|
|
38378
38666
|
}
|
|
38379
38667
|
function isLinkedContentEntryMeta(value) {
|
|
38380
|
-
if (!
|
|
38668
|
+
if (!isRecord10(value)) return false;
|
|
38381
38669
|
if (value.kind !== "linked-content-entry") return false;
|
|
38382
38670
|
if (typeof value.entryId !== "string") return false;
|
|
38383
38671
|
if (typeof value.contentTypeKey !== "string") return false;
|
|
38384
38672
|
if (typeof value.contentTypeLabel !== "string") return false;
|
|
38385
38673
|
if (typeof value.title !== "string") return false;
|
|
38386
38674
|
if (!(value.optimisticHash === null || typeof value.optimisticHash === "string")) return false;
|
|
38387
|
-
if (!
|
|
38675
|
+
if (!isRecord10(value.contentType)) return false;
|
|
38388
38676
|
if (!isLinkedEntryFieldSourceArray(value.fieldSources)) return false;
|
|
38389
38677
|
return isLinkedContentEditSupport(value.support);
|
|
38390
38678
|
}
|
|
@@ -38392,7 +38680,7 @@ function isLinkedEntryFieldSourceArray(value) {
|
|
|
38392
38680
|
return Array.isArray(value) && value.every(isLinkedEntryFieldSource);
|
|
38393
38681
|
}
|
|
38394
38682
|
function isLinkedEntryFieldSource(value) {
|
|
38395
|
-
if (!
|
|
38683
|
+
if (!isRecord10(value)) return false;
|
|
38396
38684
|
if (typeof value.displayPath !== "string") return false;
|
|
38397
38685
|
switch (value.kind) {
|
|
38398
38686
|
case "content-field":
|
|
@@ -38418,7 +38706,7 @@ function isLinkedEntryInlineFieldReadOnlyReason(value) {
|
|
|
38418
38706
|
}
|
|
38419
38707
|
}
|
|
38420
38708
|
function isLinkedContentEditSupport(value) {
|
|
38421
|
-
if (!
|
|
38709
|
+
if (!isRecord10(value) || typeof value.kind !== "string") return false;
|
|
38422
38710
|
switch (value.kind) {
|
|
38423
38711
|
case "supported":
|
|
38424
38712
|
return true;
|
|
@@ -38430,7 +38718,7 @@ function isLinkedContentEditSupport(value) {
|
|
|
38430
38718
|
return false;
|
|
38431
38719
|
}
|
|
38432
38720
|
}
|
|
38433
|
-
function
|
|
38721
|
+
function isRecord10(value) {
|
|
38434
38722
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
38435
38723
|
}
|
|
38436
38724
|
|
|
@@ -38762,6 +39050,8 @@ function renderDoc(node, key, imageResolveContext) {
|
|
|
38762
39050
|
return /* @__PURE__ */ jsx15("blockquote", { children }, key);
|
|
38763
39051
|
case "horizontalRule":
|
|
38764
39052
|
return /* @__PURE__ */ jsx15("hr", {}, key);
|
|
39053
|
+
case "hardBreak":
|
|
39054
|
+
return /* @__PURE__ */ jsx15("br", {}, key);
|
|
38765
39055
|
case "image": {
|
|
38766
39056
|
const attrs = node.attrs ?? {};
|
|
38767
39057
|
const src = typeof attrs.src === "string" ? attrs.src.trim() : "";
|
|
@@ -38818,84 +39108,11 @@ function Text({
|
|
|
38818
39108
|
return /* @__PURE__ */ jsx16(Comp, { className, ...dataAttributes, children });
|
|
38819
39109
|
}
|
|
38820
39110
|
|
|
38821
|
-
// ../blocks/src/system/manifest/richTextSchema.ts
|
|
38822
|
-
import { z as z64 } from "zod";
|
|
38823
|
-
var TipTapMarkSchema = z64.object({
|
|
38824
|
-
type: z64.string(),
|
|
38825
|
-
attrs: z64.record(z64.string(), z64.unknown()).optional()
|
|
38826
|
-
});
|
|
38827
|
-
var TipTapNodeSchema = z64.lazy(
|
|
38828
|
-
() => z64.object({
|
|
38829
|
-
type: z64.string(),
|
|
38830
|
-
content: z64.array(TipTapNodeSchema).optional(),
|
|
38831
|
-
text: z64.string().optional(),
|
|
38832
|
-
attrs: z64.record(z64.string(), z64.unknown()).optional(),
|
|
38833
|
-
marks: z64.array(TipTapMarkSchema).optional()
|
|
38834
|
-
})
|
|
38835
|
-
);
|
|
38836
|
-
var RichTextValueSchema = z64.union([
|
|
38837
|
-
// Canonical: TipTap document directly
|
|
38838
|
-
TipTapNodeSchema,
|
|
38839
|
-
// Legacy (read-tolerance only): wrapped in { doc: {...} }
|
|
38840
|
-
z64.object({
|
|
38841
|
-
doc: TipTapNodeSchema
|
|
38842
|
-
})
|
|
38843
|
-
]);
|
|
38844
|
-
var RichTextDocSchema = z64.object({
|
|
38845
|
-
type: z64.literal("doc"),
|
|
38846
|
-
content: z64.array(TipTapNodeSchema)
|
|
38847
|
-
});
|
|
38848
|
-
function unwrapRichTextRoot(value) {
|
|
38849
|
-
if (!isRecord4(value)) return value;
|
|
38850
|
-
if (!("doc" in value)) return value;
|
|
38851
|
-
const inner = value.doc;
|
|
38852
|
-
if (isRecord4(inner) && inner.type === "doc") return inner;
|
|
38853
|
-
return value;
|
|
38854
|
-
}
|
|
38855
|
-
|
|
38856
39111
|
// ../blocks/src/system/runtime/nodes/richText-coerce.ts
|
|
38857
|
-
function parseInlineMarkdown(text2) {
|
|
38858
|
-
const out = [];
|
|
38859
|
-
const pushText = (value, marks) => {
|
|
38860
|
-
if (!value) return;
|
|
38861
|
-
out.push(
|
|
38862
|
-
marks && marks.length > 0 ? { type: "text", text: value, marks } : { type: "text", text: value }
|
|
38863
|
-
);
|
|
38864
|
-
};
|
|
38865
|
-
let rest = text2;
|
|
38866
|
-
while (rest.length > 0) {
|
|
38867
|
-
const start = rest.indexOf("**");
|
|
38868
|
-
if (start === -1) {
|
|
38869
|
-
pushText(rest);
|
|
38870
|
-
break;
|
|
38871
|
-
}
|
|
38872
|
-
const end = rest.indexOf("**", start + 2);
|
|
38873
|
-
if (end === -1) {
|
|
38874
|
-
pushText(rest);
|
|
38875
|
-
break;
|
|
38876
|
-
}
|
|
38877
|
-
pushText(rest.slice(0, start));
|
|
38878
|
-
pushText(rest.slice(start + 2, end), [{ type: "bold" }]);
|
|
38879
|
-
rest = rest.slice(end + 2);
|
|
38880
|
-
}
|
|
38881
|
-
return out;
|
|
38882
|
-
}
|
|
38883
|
-
function markdownToTipTapDoc(markdown) {
|
|
38884
|
-
const normalized = markdown.replace(/\r\n/g, "\n").trim();
|
|
38885
|
-
if (!normalized) return { type: "doc", content: [] };
|
|
38886
|
-
const paragraphs = normalized.split(/\n{2,}/).map((p) => p.trim()).filter(Boolean);
|
|
38887
|
-
return {
|
|
38888
|
-
type: "doc",
|
|
38889
|
-
content: paragraphs.map((p) => {
|
|
38890
|
-
const inline2 = parseInlineMarkdown(p);
|
|
38891
|
-
return inline2.length > 0 ? { type: "paragraph", content: inline2 } : { type: "paragraph" };
|
|
38892
|
-
})
|
|
38893
|
-
};
|
|
38894
|
-
}
|
|
38895
39112
|
function coerceRichTextDoc(value) {
|
|
38896
39113
|
const raw = unwrapRichTextRoot(value);
|
|
38897
39114
|
if (typeof raw === "string") {
|
|
38898
|
-
return
|
|
39115
|
+
return createRichTextDocFromMarkdown(raw);
|
|
38899
39116
|
}
|
|
38900
39117
|
if (isRecord4(raw) && typeof raw.type === "string") {
|
|
38901
39118
|
return raw;
|
|
@@ -39957,12 +40174,12 @@ function toTrimmedString(value) {
|
|
|
39957
40174
|
return trimmed ? trimmed : void 0;
|
|
39958
40175
|
}
|
|
39959
40176
|
function normalizeBookingFormConfig(form2) {
|
|
39960
|
-
if (!
|
|
40177
|
+
if (!isRecord11(form2)) return null;
|
|
39961
40178
|
const id = readNonEmptyString(form2.id);
|
|
39962
40179
|
const name = readNonEmptyString(form2.name);
|
|
39963
40180
|
if (!id || !name) return null;
|
|
39964
|
-
const schemaSource =
|
|
39965
|
-
const settingsSource =
|
|
40181
|
+
const schemaSource = isRecord11(form2.schema) ? form2.schema : isRecord11(form2.schemaJson) ? form2.schemaJson : null;
|
|
40182
|
+
const settingsSource = isRecord11(form2.settings) ? form2.settings : isRecord11(form2.settingsJson) ? form2.settingsJson : null;
|
|
39966
40183
|
return {
|
|
39967
40184
|
id,
|
|
39968
40185
|
name,
|
|
@@ -39986,10 +40203,10 @@ function normalizeBookingServices(services) {
|
|
|
39986
40203
|
if (Array.isArray(services)) {
|
|
39987
40204
|
return services.filter(isBookingFormService).map(normalizeService);
|
|
39988
40205
|
}
|
|
39989
|
-
if (
|
|
40206
|
+
if (isRecord11(services) && "services" in services) {
|
|
39990
40207
|
return Array.isArray(services.services) ? services.services.filter(isBookingFormService).map(normalizeService) : [];
|
|
39991
40208
|
}
|
|
39992
|
-
return
|
|
40209
|
+
return isRecord11(services) ? Object.values(services).filter(isBookingFormService).map(normalizeService) : [];
|
|
39993
40210
|
}
|
|
39994
40211
|
function normalizeBookingSchema(value) {
|
|
39995
40212
|
if (!value) return void 0;
|
|
@@ -40001,7 +40218,7 @@ function normalizeBookingSchema(value) {
|
|
|
40001
40218
|
};
|
|
40002
40219
|
}
|
|
40003
40220
|
function readBookingFormField(value) {
|
|
40004
|
-
if (!
|
|
40221
|
+
if (!isRecord11(value)) return null;
|
|
40005
40222
|
const id = readNonEmptyString(value.id);
|
|
40006
40223
|
const label = readNonEmptyString(value.label);
|
|
40007
40224
|
const type = readBookingFieldType(value.type);
|
|
@@ -40047,7 +40264,7 @@ function readBookingFieldOptions(value) {
|
|
|
40047
40264
|
return options.length > 0 ? options : void 0;
|
|
40048
40265
|
}
|
|
40049
40266
|
function readBookingFieldOption(value) {
|
|
40050
|
-
if (!
|
|
40267
|
+
if (!isRecord11(value)) return null;
|
|
40051
40268
|
const optionValue = readNonEmptyString(value.value);
|
|
40052
40269
|
const label = readNonEmptyString(value.label);
|
|
40053
40270
|
return optionValue && label ? { value: optionValue, label } : null;
|
|
@@ -40064,7 +40281,7 @@ function normalizeBookingSettings(value) {
|
|
|
40064
40281
|
};
|
|
40065
40282
|
}
|
|
40066
40283
|
function isBookingFormService(value) {
|
|
40067
|
-
return
|
|
40284
|
+
return isRecord11(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string";
|
|
40068
40285
|
}
|
|
40069
40286
|
function readNonEmptyString(value) {
|
|
40070
40287
|
if (typeof value !== "string") return null;
|
|
@@ -40082,7 +40299,7 @@ function readStringArray(value) {
|
|
|
40082
40299
|
const strings = value.filter((item) => typeof item === "string");
|
|
40083
40300
|
return strings.length > 0 ? strings : void 0;
|
|
40084
40301
|
}
|
|
40085
|
-
function
|
|
40302
|
+
function isRecord11(value) {
|
|
40086
40303
|
return typeof value === "object" && value !== null;
|
|
40087
40304
|
}
|
|
40088
40305
|
|
|
@@ -40503,6 +40720,32 @@ function TeamMemberName({
|
|
|
40503
40720
|
}) {
|
|
40504
40721
|
return profilePath ? /* @__PURE__ */ jsx29("a", { href: profilePath, className: "rb-hover-opacity-80", children: /* @__PURE__ */ jsx29("strong", { children: name }) }) : /* @__PURE__ */ jsx29("strong", { children: name });
|
|
40505
40722
|
}
|
|
40723
|
+
function formatTicketTypePrice(ticketType, currency) {
|
|
40724
|
+
return formatCurrencyAmount(ticketType.priceAmount, currency, { decimals: "auto" });
|
|
40725
|
+
}
|
|
40726
|
+
function getActiveTicketTypes(event) {
|
|
40727
|
+
return event.pricing.kind === "ticket_types" ? event.pricing.ticketTypes.filter((ticketType) => ticketType.isActive).sort((left, right) => left.sortOrder - right.sortOrder) : [];
|
|
40728
|
+
}
|
|
40729
|
+
function TicketTypePriceList({
|
|
40730
|
+
ticketTypes,
|
|
40731
|
+
currency
|
|
40732
|
+
}) {
|
|
40733
|
+
if (ticketTypes.length === 0) return null;
|
|
40734
|
+
return /* @__PURE__ */ jsx29("div", { className: "rb-mt-3 rb-flex rb-flex-col rb-gap-2", children: ticketTypes.map((ticketType) => /* @__PURE__ */ jsxs16(
|
|
40735
|
+
"div",
|
|
40736
|
+
{
|
|
40737
|
+
className: "rb-flex rb-items-start rb-justify-between rb-gap-4",
|
|
40738
|
+
children: [
|
|
40739
|
+
/* @__PURE__ */ jsxs16("div", { children: [
|
|
40740
|
+
/* @__PURE__ */ jsx29("p", { children: ticketType.name }),
|
|
40741
|
+
ticketType.description ? /* @__PURE__ */ jsx29("p", { className: "rb-caption status-muted", children: ticketType.description }) : null
|
|
40742
|
+
] }),
|
|
40743
|
+
/* @__PURE__ */ jsx29("p", { children: /* @__PURE__ */ jsx29("strong", { children: formatTicketTypePrice(ticketType, currency) }) })
|
|
40744
|
+
]
|
|
40745
|
+
},
|
|
40746
|
+
ticketType.id
|
|
40747
|
+
)) });
|
|
40748
|
+
}
|
|
40506
40749
|
function EventDetailsView({
|
|
40507
40750
|
selection,
|
|
40508
40751
|
showVenue,
|
|
@@ -40537,6 +40780,7 @@ function EventDetailsView({
|
|
|
40537
40780
|
const shouldShowCoursePricing = showCost && !isDropIn && coursePricing !== null;
|
|
40538
40781
|
const shouldShowEventCost = showCost && isPaid && !isDropIn && coursePricing === null;
|
|
40539
40782
|
const eventCostLabel = shouldShowEventCost ? formatEventPrice(selected) : null;
|
|
40783
|
+
const ticketTypes = shouldShowEventCost ? getActiveTicketTypes(selected) : [];
|
|
40540
40784
|
const acceptedItems = [];
|
|
40541
40785
|
if (showAcceptedPasses) {
|
|
40542
40786
|
acceptedItems.push(...applicablePasses.map((p) => p.name));
|
|
@@ -40593,6 +40837,7 @@ function EventDetailsView({
|
|
|
40593
40837
|
/* @__PURE__ */ jsx29("div", { className: "rb-label rb-mb-2", children: "Cost" }),
|
|
40594
40838
|
/* @__PURE__ */ jsx29("p", { children: /* @__PURE__ */ jsx29("strong", { children: eventCostLabel }) }),
|
|
40595
40839
|
autoApplyDiscount ? /* @__PURE__ */ jsx29("p", { className: "rb-caption rb-mt-1", children: formatAutoApplyDiscountLine(autoApplyDiscount, eventPricingCurrency) }) : null,
|
|
40840
|
+
/* @__PURE__ */ jsx29(TicketTypePriceList, { ticketTypes, currency: eventPricingCurrency }),
|
|
40596
40841
|
hasAcceptedItems ? /* @__PURE__ */ jsxs16("p", { className: "rb-caption rb-mt-1", children: [
|
|
40597
40842
|
"You can also attend with: ",
|
|
40598
40843
|
acceptedItems.join(", ")
|
|
@@ -42723,6 +42968,7 @@ function EventRegistrationSSR({
|
|
|
42723
42968
|
successMessage,
|
|
42724
42969
|
waitlistMessage,
|
|
42725
42970
|
buttonVariant,
|
|
42971
|
+
overlayEnabled,
|
|
42726
42972
|
spamProtectionEnabled,
|
|
42727
42973
|
stage,
|
|
42728
42974
|
supportEmail,
|
|
@@ -42744,6 +42990,7 @@ function EventRegistrationSSR({
|
|
|
42744
42990
|
successMessage,
|
|
42745
42991
|
waitlistMessage,
|
|
42746
42992
|
buttonVariant,
|
|
42993
|
+
overlayEnabled,
|
|
42747
42994
|
spamProtectionEnabled,
|
|
42748
42995
|
stage,
|
|
42749
42996
|
supportEmail
|
|
@@ -43008,6 +43255,7 @@ function NewsletterFormSSR({
|
|
|
43008
43255
|
siteId,
|
|
43009
43256
|
apiBaseUrl,
|
|
43010
43257
|
listId,
|
|
43258
|
+
destinationProvider,
|
|
43011
43259
|
preset: preset2 = "emailOnly",
|
|
43012
43260
|
includePhone,
|
|
43013
43261
|
buttonLabel = "Subscribe",
|
|
@@ -43018,9 +43266,11 @@ function NewsletterFormSSR({
|
|
|
43018
43266
|
className
|
|
43019
43267
|
}) {
|
|
43020
43268
|
const islandProps = buildNewsletterFormInteractiveIslandProps({
|
|
43269
|
+
blockId,
|
|
43021
43270
|
siteId,
|
|
43022
43271
|
apiBaseUrl,
|
|
43023
43272
|
listId,
|
|
43273
|
+
destinationProvider,
|
|
43024
43274
|
preset: preset2,
|
|
43025
43275
|
includePhone,
|
|
43026
43276
|
buttonLabel,
|
|
@@ -43400,14 +43650,14 @@ function isDecoratedHeadingBlockKind(blockKind) {
|
|
|
43400
43650
|
return blockKind === "block.intro" || blockKind === "block.feature-cards" || blockKind === "block.testimonials" || blockKind === "block.faq";
|
|
43401
43651
|
}
|
|
43402
43652
|
function readVariant(blockContent) {
|
|
43403
|
-
if (!
|
|
43653
|
+
if (!isRecord12(blockContent)) return void 0;
|
|
43404
43654
|
const variant = blockContent.variant;
|
|
43405
43655
|
return typeof variant === "string" ? variant : void 0;
|
|
43406
43656
|
}
|
|
43407
43657
|
function isFaqDecoratedVariant(variant) {
|
|
43408
43658
|
return variant === "default" || variant === "question-columns";
|
|
43409
43659
|
}
|
|
43410
|
-
function
|
|
43660
|
+
function isRecord12(value) {
|
|
43411
43661
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
43412
43662
|
}
|
|
43413
43663
|
function buildHeadingDecorationWrapperClassName(className) {
|
|
@@ -48828,6 +49078,7 @@ var MemoBlockSection = React6.memo(
|
|
|
48828
49078
|
apiBaseUrl: dataContext?.apiBaseUrl ?? null,
|
|
48829
49079
|
portalToken: dataContext?.portalToken ?? null,
|
|
48830
49080
|
bookingOfferingPresets: dataContext?.bookingOfferingPresets ?? [],
|
|
49081
|
+
eventRegistrationOverlayEnabled: dataContext?.eventRegistrationOverlayEnabled ?? false,
|
|
48831
49082
|
...routes ? { routes } : {},
|
|
48832
49083
|
// Identifier maps for CTA link resolution at render time
|
|
48833
49084
|
...dataContext?.pagesByIdentifier ? { pagesByIdentifier: dataContext.pagesByIdentifier } : {},
|
|
@@ -52208,6 +52459,7 @@ var containerResponsiveThemeCss = `/*
|
|
|
52208
52459
|
*/
|
|
52209
52460
|
|
|
52210
52461
|
:where(.theme-scope) :where([data-block="event-registration"]) {
|
|
52462
|
+
--rb-modal-overlay-bg: rgb(var(--tb-text, 0 0 0) / 0.6);
|
|
52211
52463
|
--rb-event-tile-bg: var(--er-event-card-bg);
|
|
52212
52464
|
--rb-event-tile-border: var(--er-border);
|
|
52213
52465
|
--rb-event-tile-border-width: var(--er-event-card-border-width);
|
|
@@ -53877,6 +54129,239 @@ var containerResponsiveThemeCss = `/*
|
|
|
53877
54129
|
background: rgba(var(--tb-text), 0.05);
|
|
53878
54130
|
}
|
|
53879
54131
|
|
|
54132
|
+
/* In-flow booking teaser (sits at the block's position in the page) */
|
|
54133
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser {
|
|
54134
|
+
display: flex;
|
|
54135
|
+
flex-wrap: wrap;
|
|
54136
|
+
align-items: center;
|
|
54137
|
+
justify-content: space-between;
|
|
54138
|
+
gap: 1rem 1.5rem;
|
|
54139
|
+
padding: 1.25rem 1.5rem;
|
|
54140
|
+
border: 1px solid var(--er-border);
|
|
54141
|
+
border-radius: var(--rb-block-radius);
|
|
54142
|
+
background: var(--er-event-card-bg);
|
|
54143
|
+
color: var(--er-on-surface);
|
|
54144
|
+
}
|
|
54145
|
+
|
|
54146
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser__info {
|
|
54147
|
+
display: flex;
|
|
54148
|
+
flex-direction: column;
|
|
54149
|
+
gap: 0.25rem;
|
|
54150
|
+
min-width: 0;
|
|
54151
|
+
}
|
|
54152
|
+
|
|
54153
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser__title {
|
|
54154
|
+
font-size: 1.0625rem;
|
|
54155
|
+
font-weight: 700;
|
|
54156
|
+
line-height: 1.2;
|
|
54157
|
+
}
|
|
54158
|
+
|
|
54159
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser__meta {
|
|
54160
|
+
font-size: 0.9375rem;
|
|
54161
|
+
line-height: 1.3;
|
|
54162
|
+
opacity: 0.75;
|
|
54163
|
+
}
|
|
54164
|
+
|
|
54165
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser__tickets {
|
|
54166
|
+
display: flex;
|
|
54167
|
+
flex-direction: column;
|
|
54168
|
+
gap: 0.375rem;
|
|
54169
|
+
margin-top: 0.5rem;
|
|
54170
|
+
padding-top: 0.625rem;
|
|
54171
|
+
border-top: 1px solid var(--er-border);
|
|
54172
|
+
}
|
|
54173
|
+
|
|
54174
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser__ticket {
|
|
54175
|
+
display: flex;
|
|
54176
|
+
align-items: baseline;
|
|
54177
|
+
justify-content: space-between;
|
|
54178
|
+
gap: 1rem;
|
|
54179
|
+
font-size: 0.9375rem;
|
|
54180
|
+
line-height: 1.35;
|
|
54181
|
+
}
|
|
54182
|
+
|
|
54183
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser__ticket-name {
|
|
54184
|
+
min-width: 0;
|
|
54185
|
+
}
|
|
54186
|
+
|
|
54187
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-teaser__cta {
|
|
54188
|
+
flex: 0 0 auto;
|
|
54189
|
+
}
|
|
54190
|
+
|
|
54191
|
+
/* Fixed, full-width sticky booking bar (content-agnostic; sits above page flow) */
|
|
54192
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-bar {
|
|
54193
|
+
position: fixed;
|
|
54194
|
+
left: 0;
|
|
54195
|
+
right: 0;
|
|
54196
|
+
bottom: 0;
|
|
54197
|
+
z-index: 12000;
|
|
54198
|
+
padding: 0.75rem max(1rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
|
|
54199
|
+
background: rgb(var(--tb-background));
|
|
54200
|
+
border-top: 1px solid var(--er-border);
|
|
54201
|
+
box-shadow: 0 -10px 30px rgba(var(--tb-shadow), 0.16);
|
|
54202
|
+
}
|
|
54203
|
+
|
|
54204
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-bar__inner {
|
|
54205
|
+
display: flex;
|
|
54206
|
+
align-items: center;
|
|
54207
|
+
justify-content: space-between;
|
|
54208
|
+
gap: 1rem;
|
|
54209
|
+
width: 100%;
|
|
54210
|
+
max-width: 72rem;
|
|
54211
|
+
margin-inline: auto;
|
|
54212
|
+
}
|
|
54213
|
+
|
|
54214
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-bar__info {
|
|
54215
|
+
display: flex;
|
|
54216
|
+
flex-direction: column;
|
|
54217
|
+
gap: 0.125rem;
|
|
54218
|
+
min-width: 0;
|
|
54219
|
+
}
|
|
54220
|
+
|
|
54221
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-bar__title {
|
|
54222
|
+
font-size: 0.95rem;
|
|
54223
|
+
font-weight: 700;
|
|
54224
|
+
line-height: 1.2;
|
|
54225
|
+
white-space: nowrap;
|
|
54226
|
+
overflow: hidden;
|
|
54227
|
+
text-overflow: ellipsis;
|
|
54228
|
+
}
|
|
54229
|
+
|
|
54230
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-bar__meta {
|
|
54231
|
+
font-size: 0.8125rem;
|
|
54232
|
+
line-height: 1.25;
|
|
54233
|
+
opacity: 0.75;
|
|
54234
|
+
white-space: nowrap;
|
|
54235
|
+
overflow: hidden;
|
|
54236
|
+
text-overflow: ellipsis;
|
|
54237
|
+
}
|
|
54238
|
+
|
|
54239
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-bar__cta {
|
|
54240
|
+
flex: 0 0 auto;
|
|
54241
|
+
}
|
|
54242
|
+
|
|
54243
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-overlay {
|
|
54244
|
+
position: fixed;
|
|
54245
|
+
inset: 0;
|
|
54246
|
+
height: 100dvh;
|
|
54247
|
+
z-index: 14000;
|
|
54248
|
+
display: flex;
|
|
54249
|
+
align-items: stretch;
|
|
54250
|
+
justify-content: stretch;
|
|
54251
|
+
background: var(--rb-modal-overlay-bg);
|
|
54252
|
+
}
|
|
54253
|
+
|
|
54254
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-overlay__panel {
|
|
54255
|
+
position: relative;
|
|
54256
|
+
z-index: 1;
|
|
54257
|
+
display: flex;
|
|
54258
|
+
flex-direction: column;
|
|
54259
|
+
width: 100%;
|
|
54260
|
+
height: 100dvh;
|
|
54261
|
+
min-height: 0;
|
|
54262
|
+
overflow: hidden;
|
|
54263
|
+
background: rgb(var(--tb-background));
|
|
54264
|
+
color: var(--er-on-surface);
|
|
54265
|
+
}
|
|
54266
|
+
|
|
54267
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-overlay__header {
|
|
54268
|
+
flex: 0 0 auto;
|
|
54269
|
+
z-index: 2;
|
|
54270
|
+
display: flex;
|
|
54271
|
+
align-items: center;
|
|
54272
|
+
justify-content: space-between;
|
|
54273
|
+
gap: 1rem;
|
|
54274
|
+
padding: 1rem;
|
|
54275
|
+
background: rgb(var(--tb-background));
|
|
54276
|
+
border-bottom: 1px solid var(--er-border);
|
|
54277
|
+
}
|
|
54278
|
+
|
|
54279
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-overlay__title {
|
|
54280
|
+
margin: 0;
|
|
54281
|
+
font-size: 1rem;
|
|
54282
|
+
line-height: 1.25;
|
|
54283
|
+
font-weight: 700;
|
|
54284
|
+
}
|
|
54285
|
+
|
|
54286
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-overlay__close {
|
|
54287
|
+
width: 2rem;
|
|
54288
|
+
height: 2rem;
|
|
54289
|
+
display: inline-flex;
|
|
54290
|
+
align-items: center;
|
|
54291
|
+
justify-content: center;
|
|
54292
|
+
border: 1px solid var(--er-border);
|
|
54293
|
+
border-radius: 999px;
|
|
54294
|
+
background: transparent;
|
|
54295
|
+
color: rgb(var(--tb-text));
|
|
54296
|
+
font-size: 1.25rem;
|
|
54297
|
+
line-height: 1;
|
|
54298
|
+
cursor: pointer;
|
|
54299
|
+
}
|
|
54300
|
+
|
|
54301
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-container--overlay {
|
|
54302
|
+
max-width: none;
|
|
54303
|
+
border: 0;
|
|
54304
|
+
border-radius: 0;
|
|
54305
|
+
padding: 0;
|
|
54306
|
+
background: transparent;
|
|
54307
|
+
display: flex;
|
|
54308
|
+
flex: 1 1 auto;
|
|
54309
|
+
min-height: 0;
|
|
54310
|
+
overflow: hidden;
|
|
54311
|
+
}
|
|
54312
|
+
|
|
54313
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-container--overlay .er-payment-layout {
|
|
54314
|
+
flex: 1 1 auto;
|
|
54315
|
+
min-height: 0;
|
|
54316
|
+
height: 100%;
|
|
54317
|
+
gap: 0;
|
|
54318
|
+
grid-template-rows: minmax(0, 1fr) auto;
|
|
54319
|
+
grid-template-areas:
|
|
54320
|
+
"main"
|
|
54321
|
+
"footer";
|
|
54322
|
+
}
|
|
54323
|
+
|
|
54324
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-container--overlay .er-payment-layout-main {
|
|
54325
|
+
min-height: 0;
|
|
54326
|
+
overflow: auto;
|
|
54327
|
+
padding: 1rem;
|
|
54328
|
+
}
|
|
54329
|
+
|
|
54330
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-container--overlay .er-payment-layout-footer {
|
|
54331
|
+
position: relative;
|
|
54332
|
+
z-index: 3;
|
|
54333
|
+
padding: 0.875rem 1rem max(0.875rem, env(safe-area-inset-bottom));
|
|
54334
|
+
background: rgb(var(--tb-background));
|
|
54335
|
+
border-top: 1px solid var(--er-border);
|
|
54336
|
+
box-shadow: 0 -12px 26px rgba(var(--tb-shadow), 0.12);
|
|
54337
|
+
}
|
|
54338
|
+
|
|
54339
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-container--overlay .er-actions {
|
|
54340
|
+
margin-top: 0;
|
|
54341
|
+
}
|
|
54342
|
+
|
|
54343
|
+
@container rb-site (min-width: 768px) {
|
|
54344
|
+
@scope ([data-rb-responsive-mode="container"]) to (:scope [data-rb-responsive-mode]) {
|
|
54345
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-overlay {
|
|
54346
|
+
justify-content: flex-end;
|
|
54347
|
+
}
|
|
54348
|
+
|
|
54349
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-booking-overlay__panel {
|
|
54350
|
+
width: min(32rem, 100vw);
|
|
54351
|
+
min-height: 100%;
|
|
54352
|
+
box-shadow: -16px 0 40px rgba(var(--tb-shadow), 0.22);
|
|
54353
|
+
}
|
|
54354
|
+
|
|
54355
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-container--overlay .er-payment-layout-main {
|
|
54356
|
+
padding: 1.25rem;
|
|
54357
|
+
}
|
|
54358
|
+
|
|
54359
|
+
:where(.theme-scope) :where([data-block="event-registration"]) .er-container--overlay .er-payment-layout-footer {
|
|
54360
|
+
padding: 0.875rem 1.25rem max(0.875rem, env(safe-area-inset-bottom));
|
|
54361
|
+
}
|
|
54362
|
+
}
|
|
54363
|
+
}
|
|
54364
|
+
|
|
53880
54365
|
/* Magic Link Form */
|
|
53881
54366
|
:where(.theme-scope) :where([data-block="event-registration"]) .er-magic-link-form {
|
|
53882
54367
|
display: flex;
|
|
@@ -59890,6 +60375,7 @@ function PageContent({
|
|
|
59890
60375
|
themeTokens: providedTokens,
|
|
59891
60376
|
siteId,
|
|
59892
60377
|
resolvedData,
|
|
60378
|
+
bookingOfferingPresets,
|
|
59893
60379
|
routeMap,
|
|
59894
60380
|
pagesByIdentifier,
|
|
59895
60381
|
entriesByIdentifier,
|
|
@@ -59922,6 +60408,7 @@ function PageContent({
|
|
|
59922
60408
|
portalToken,
|
|
59923
60409
|
previewToken,
|
|
59924
60410
|
resolvedData,
|
|
60411
|
+
bookingOfferingPresets: bookingOfferingPresets ?? [],
|
|
59925
60412
|
routes: routeMap,
|
|
59926
60413
|
pagesByIdentifier,
|
|
59927
60414
|
entriesByIdentifier,
|
|
@@ -61670,6 +62157,64 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
61670
62157
|
auth: "user",
|
|
61671
62158
|
responseKind: "json"
|
|
61672
62159
|
},
|
|
62160
|
+
listMailchimpAudiences: {
|
|
62161
|
+
path: "/sites/{siteId}/integrations/mailchimp/audiences",
|
|
62162
|
+
method: "GET",
|
|
62163
|
+
tags: [TAG_TEMPLATES.site],
|
|
62164
|
+
auth: "user",
|
|
62165
|
+
responseKind: "json",
|
|
62166
|
+
errors: ["auth:forbidden", "server:internal_error"]
|
|
62167
|
+
},
|
|
62168
|
+
getMailchimpSignupSyncHealth: {
|
|
62169
|
+
path: "/sites/{siteId}/integrations/mailchimp/signup-sync-health",
|
|
62170
|
+
method: "GET",
|
|
62171
|
+
tags: [TAG_TEMPLATES.site],
|
|
62172
|
+
auth: "user",
|
|
62173
|
+
responseKind: "json",
|
|
62174
|
+
errors: ["auth:forbidden", "server:internal_error"]
|
|
62175
|
+
},
|
|
62176
|
+
getMailchimpConnection: {
|
|
62177
|
+
path: "/sites/{siteId}/integrations/mailchimp/connection",
|
|
62178
|
+
method: "GET",
|
|
62179
|
+
tags: [TAG_TEMPLATES.site],
|
|
62180
|
+
auth: "user",
|
|
62181
|
+
responseKind: "json",
|
|
62182
|
+
errors: ["auth:forbidden", "server:internal_error"]
|
|
62183
|
+
},
|
|
62184
|
+
startMailchimpOAuth: {
|
|
62185
|
+
path: "/sites/{siteId}/integrations/mailchimp/oauth/start",
|
|
62186
|
+
method: "POST",
|
|
62187
|
+
tags: [TAG_TEMPLATES.site],
|
|
62188
|
+
auth: "user",
|
|
62189
|
+
responseKind: "json",
|
|
62190
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
62191
|
+
errors: ["auth:forbidden", "validation:invalid_input", "server:internal_error"]
|
|
62192
|
+
},
|
|
62193
|
+
refreshMailchimpAudiences: {
|
|
62194
|
+
path: "/sites/{siteId}/integrations/mailchimp/audiences/refresh",
|
|
62195
|
+
method: "POST",
|
|
62196
|
+
tags: [TAG_TEMPLATES.site],
|
|
62197
|
+
auth: "user",
|
|
62198
|
+
responseKind: "json",
|
|
62199
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
62200
|
+
errors: ["auth:forbidden", "server:internal_error"]
|
|
62201
|
+
},
|
|
62202
|
+
disconnectMailchimp: {
|
|
62203
|
+
path: "/sites/{siteId}/integrations/mailchimp/disconnect",
|
|
62204
|
+
method: "POST",
|
|
62205
|
+
tags: [TAG_TEMPLATES.site],
|
|
62206
|
+
auth: "user",
|
|
62207
|
+
responseKind: "json",
|
|
62208
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
62209
|
+
errors: ["auth:forbidden", "server:internal_error"]
|
|
62210
|
+
},
|
|
62211
|
+
mailchimpOAuthCallback: {
|
|
62212
|
+
path: "/auth/mailchimp/callback",
|
|
62213
|
+
method: "GET",
|
|
62214
|
+
auth: "public",
|
|
62215
|
+
responseKind: "void",
|
|
62216
|
+
errors: []
|
|
62217
|
+
},
|
|
61673
62218
|
createNewsletterList: {
|
|
61674
62219
|
path: "/sites/{siteId}/newsletter/lists",
|
|
61675
62220
|
method: "POST",
|
|
@@ -63894,20 +64439,6 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
63894
64439
|
auth: "user",
|
|
63895
64440
|
responseKind: "json"
|
|
63896
64441
|
},
|
|
63897
|
-
instagramUploadZip: {
|
|
63898
|
-
path: "/instagram/upload-zip",
|
|
63899
|
-
method: "POST",
|
|
63900
|
-
tags: ["instagram-import"],
|
|
63901
|
-
auth: "user",
|
|
63902
|
-
responseKind: "json"
|
|
63903
|
-
},
|
|
63904
|
-
createInstagramZipUploadUrl: {
|
|
63905
|
-
path: "/instagram/upload-zip-url",
|
|
63906
|
-
method: "POST",
|
|
63907
|
-
tags: ["instagram-import"],
|
|
63908
|
-
auth: "user",
|
|
63909
|
-
responseKind: "json"
|
|
63910
|
-
},
|
|
63911
64442
|
getAnalyticsReport: {
|
|
63912
64443
|
path: "/sites/{siteId}/analytics/report",
|
|
63913
64444
|
method: "GET",
|
|
@@ -68025,7 +68556,7 @@ function preset(id, verticalId, canonicalBehaviour, label, pluralLabel, descript
|
|
|
68025
68556
|
}
|
|
68026
68557
|
|
|
68027
68558
|
// ../api/src/utils/isRecord.ts
|
|
68028
|
-
function
|
|
68559
|
+
function isRecord13(value) {
|
|
68029
68560
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
68030
68561
|
}
|
|
68031
68562
|
|
|
@@ -68332,7 +68863,7 @@ function sanitizeMarks(marks) {
|
|
|
68332
68863
|
if (mark.type === "bold" || mark.type === "strong" || mark.type === "italic" || mark.type === "em") {
|
|
68333
68864
|
return [{ type: mark.type }];
|
|
68334
68865
|
}
|
|
68335
|
-
if (mark.type === "link" &&
|
|
68866
|
+
if (mark.type === "link" && isRecord13(mark.attrs) && typeof mark.attrs.href === "string") {
|
|
68336
68867
|
const attrs = { href: mark.attrs.href };
|
|
68337
68868
|
if (typeof mark.attrs.target === "string" && mark.attrs.target.trim().length > 0) {
|
|
68338
68869
|
attrs.target = mark.attrs.target;
|
|
@@ -68347,10 +68878,10 @@ function sanitizeMarks(marks) {
|
|
|
68347
68878
|
return sanitized.length > 0 ? sanitized : void 0;
|
|
68348
68879
|
}
|
|
68349
68880
|
function unwrapRichTextValue(value) {
|
|
68350
|
-
if (
|
|
68881
|
+
if (isRecord13(value) && isRecord13(value.doc)) {
|
|
68351
68882
|
return unwrapRichTextValue(value.doc);
|
|
68352
68883
|
}
|
|
68353
|
-
if (
|
|
68884
|
+
if (isRecord13(value) && value.type === "doc") {
|
|
68354
68885
|
return {
|
|
68355
68886
|
type: "doc",
|
|
68356
68887
|
content: Array.isArray(value.content) ? value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) : []
|
|
@@ -68359,7 +68890,7 @@ function unwrapRichTextValue(value) {
|
|
|
68359
68890
|
return EMPTY_SITE_BANNER_BODY;
|
|
68360
68891
|
}
|
|
68361
68892
|
function isTipTapNodeLike(value) {
|
|
68362
|
-
return
|
|
68893
|
+
return isRecord13(value) && typeof value.type === "string";
|
|
68363
68894
|
}
|
|
68364
68895
|
function coerceTipTapNode(value) {
|
|
68365
68896
|
return {
|
|
@@ -68367,9 +68898,9 @@ function coerceTipTapNode(value) {
|
|
|
68367
68898
|
...Array.isArray(value.content) ? { content: value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) } : {},
|
|
68368
68899
|
...typeof value.text === "string" ? { text: value.text } : {},
|
|
68369
68900
|
...Array.isArray(value.marks) ? {
|
|
68370
|
-
marks: value.marks.filter((mark) =>
|
|
68901
|
+
marks: value.marks.filter((mark) => isRecord13(mark) && typeof mark.type === "string").map((mark) => ({
|
|
68371
68902
|
type: mark.type,
|
|
68372
|
-
...
|
|
68903
|
+
...isRecord13(mark.attrs) ? { attrs: mark.attrs } : {}
|
|
68373
68904
|
}))
|
|
68374
68905
|
} : {}
|
|
68375
68906
|
};
|
|
@@ -68529,21 +69060,8 @@ var MultiPageUpdateResponse = z76.object({
|
|
|
68529
69060
|
});
|
|
68530
69061
|
|
|
68531
69062
|
// src/data/prefetchBlockData.ts
|
|
68532
|
-
var SUPPORTED_LOADER_ENDPOINTS2 = [
|
|
68533
|
-
"listPublishedEntries",
|
|
68534
|
-
"getPublishedEntryPreview",
|
|
68535
|
-
"listPublicEvents",
|
|
68536
|
-
"listPublicCourses",
|
|
68537
|
-
"listPublicTeamMembers",
|
|
68538
|
-
"listPublicProducts",
|
|
68539
|
-
"listPublicPasses",
|
|
68540
|
-
"listPublicMemberships",
|
|
68541
|
-
"getPublicFormById",
|
|
68542
|
-
"getPublicBookingServices",
|
|
68543
|
-
"getPublicEventDetails"
|
|
68544
|
-
];
|
|
68545
69063
|
function isSupportedLoaderEndpoint2(endpoint) {
|
|
68546
|
-
return
|
|
69064
|
+
return SUPPORTED_LOADER_ENDPOINTS.includes(endpoint);
|
|
68547
69065
|
}
|
|
68548
69066
|
var ENTRY_REF_KEYS = [
|
|
68549
69067
|
"identifier",
|
|
@@ -68552,7 +69070,7 @@ var ENTRY_REF_KEYS = [
|
|
|
68552
69070
|
"entryId",
|
|
68553
69071
|
"slug"
|
|
68554
69072
|
];
|
|
68555
|
-
function
|
|
69073
|
+
function isRecord14(value) {
|
|
68556
69074
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
68557
69075
|
}
|
|
68558
69076
|
function extractManualEntryRef(item) {
|
|
@@ -68560,7 +69078,7 @@ function extractManualEntryRef(item) {
|
|
|
68560
69078
|
const trimmed = item.trim();
|
|
68561
69079
|
return trimmed.length > 0 ? trimmed : null;
|
|
68562
69080
|
}
|
|
68563
|
-
if (!
|
|
69081
|
+
if (!isRecord14(item)) return null;
|
|
68564
69082
|
for (const key of ENTRY_REF_KEYS) {
|
|
68565
69083
|
const raw = item[key];
|
|
68566
69084
|
if (typeof raw === "string" && raw.trim().length > 0) {
|
|
@@ -68608,6 +69126,194 @@ function parseManualEntryRefs(...values) {
|
|
|
68608
69126
|
}
|
|
68609
69127
|
return void 0;
|
|
68610
69128
|
}
|
|
69129
|
+
var loaderAdapters = {
|
|
69130
|
+
listPublishedEntries: listPublishedEntries2,
|
|
69131
|
+
getPublishedEntryPreview,
|
|
69132
|
+
listPublicEvents,
|
|
69133
|
+
getPublicEventDetails,
|
|
69134
|
+
listPublicCourses,
|
|
69135
|
+
listPublicRouteCandidates,
|
|
69136
|
+
listPublicTeamMembers,
|
|
69137
|
+
listPublicProducts,
|
|
69138
|
+
listPublicPasses,
|
|
69139
|
+
listPublicMemberships,
|
|
69140
|
+
getPublicFormById,
|
|
69141
|
+
getPublicBookingServices
|
|
69142
|
+
};
|
|
69143
|
+
function readStringParam(params, key) {
|
|
69144
|
+
const value = params[key];
|
|
69145
|
+
return value && value.length > 0 ? value : void 0;
|
|
69146
|
+
}
|
|
69147
|
+
function requireStringParam(params, key, endpoint) {
|
|
69148
|
+
const value = readStringParam(params, key);
|
|
69149
|
+
if (!value) {
|
|
69150
|
+
throw new Error(`${endpoint} requires ${key} param`);
|
|
69151
|
+
}
|
|
69152
|
+
return value;
|
|
69153
|
+
}
|
|
69154
|
+
function parsePositiveIntegerParam(params, key) {
|
|
69155
|
+
const value = params[key];
|
|
69156
|
+
const parsed = value === void 0 ? void 0 : Number.parseInt(value, 10);
|
|
69157
|
+
return typeof parsed === "number" && Number.isInteger(parsed) && parsed > 0 ? parsed : void 0;
|
|
69158
|
+
}
|
|
69159
|
+
function parseEntryOrder(value) {
|
|
69160
|
+
if (value === void 0) return void 0;
|
|
69161
|
+
switch (value) {
|
|
69162
|
+
case "order":
|
|
69163
|
+
return "manual";
|
|
69164
|
+
case "newest":
|
|
69165
|
+
case "oldest":
|
|
69166
|
+
case "title":
|
|
69167
|
+
return value;
|
|
69168
|
+
default:
|
|
69169
|
+
return void 0;
|
|
69170
|
+
}
|
|
69171
|
+
}
|
|
69172
|
+
function parsePublicEventKind(value) {
|
|
69173
|
+
if (value === void 0) return void 0;
|
|
69174
|
+
switch (value) {
|
|
69175
|
+
case "all":
|
|
69176
|
+
case "courses":
|
|
69177
|
+
case "events":
|
|
69178
|
+
return value;
|
|
69179
|
+
default:
|
|
69180
|
+
return void 0;
|
|
69181
|
+
}
|
|
69182
|
+
}
|
|
69183
|
+
async function listPublishedEntries2({ client, params }) {
|
|
69184
|
+
const siteId = requireStringParam(params, "siteId", "listPublishedEntries");
|
|
69185
|
+
const type = requireStringParam(params, "type", "listPublishedEntries");
|
|
69186
|
+
const stage = readStringParam(params, "stage");
|
|
69187
|
+
const mode = readStringParam(params, "mode");
|
|
69188
|
+
const parsedEntryRefs = mode === "manual" ? parseManualEntryRefs(params.identifiers, params.entryRefs, params.entryIds) : void 0;
|
|
69189
|
+
if (mode === "manual" && (!parsedEntryRefs || parsedEntryRefs.length === 0)) {
|
|
69190
|
+
return { entries: [] };
|
|
69191
|
+
}
|
|
69192
|
+
if (mode === "manual" && parsedEntryRefs) {
|
|
69193
|
+
return await client.getEntriesByIdentifiers({
|
|
69194
|
+
siteId,
|
|
69195
|
+
contentType: type,
|
|
69196
|
+
identifiers: parsedEntryRefs,
|
|
69197
|
+
preview: stage === "preview"
|
|
69198
|
+
});
|
|
69199
|
+
}
|
|
69200
|
+
return await client.getEntries({
|
|
69201
|
+
siteId,
|
|
69202
|
+
contentType: type,
|
|
69203
|
+
limit: parsePositiveIntegerParam(params, "limit"),
|
|
69204
|
+
order: parseEntryOrder(readStringParam(params, "orderBy")),
|
|
69205
|
+
preview: stage === "preview"
|
|
69206
|
+
});
|
|
69207
|
+
}
|
|
69208
|
+
async function getPublishedEntryPreview({ client, params }) {
|
|
69209
|
+
return await client.getEntry({
|
|
69210
|
+
siteId: requireStringParam(params, "siteId", "getPublishedEntryPreview"),
|
|
69211
|
+
contentType: requireStringParam(params, "type", "getPublishedEntryPreview"),
|
|
69212
|
+
slug: requireStringParam(params, "slug", "getPublishedEntryPreview")
|
|
69213
|
+
});
|
|
69214
|
+
}
|
|
69215
|
+
async function listPublicEvents({ client, params }) {
|
|
69216
|
+
return await client.listPublicEvents({
|
|
69217
|
+
siteId: requireStringParam(params, "siteId", "listPublicEvents"),
|
|
69218
|
+
limit: parsePositiveIntegerParam(params, "limit"),
|
|
69219
|
+
from: readStringParam(params, "from"),
|
|
69220
|
+
to: readStringParam(params, "to"),
|
|
69221
|
+
afterStartsAt: readStringParam(params, "afterStartsAt"),
|
|
69222
|
+
afterId: readStringParam(params, "afterId"),
|
|
69223
|
+
stage: readStringParam(params, "stage"),
|
|
69224
|
+
categoryIds: readStringParam(params, "categoryIds"),
|
|
69225
|
+
venueId: readStringParam(params, "venueId"),
|
|
69226
|
+
staffMemberId: readStringParam(params, "staffMemberId"),
|
|
69227
|
+
kind: parsePublicEventKind(readStringParam(params, "kind")),
|
|
69228
|
+
eventSurface: readStringParam(params, "eventSurface"),
|
|
69229
|
+
eventPresets: readStringParam(params, "eventPresets"),
|
|
69230
|
+
scheduleScope: readStringParam(params, "scheduleScope"),
|
|
69231
|
+
entryId: readStringParam(params, "entryId"),
|
|
69232
|
+
seriesId: readStringParam(params, "seriesId"),
|
|
69233
|
+
includeOccurrenceId: readStringParam(params, "includeOccurrenceId")
|
|
69234
|
+
});
|
|
69235
|
+
}
|
|
69236
|
+
async function getPublicEventDetails({ client, params }) {
|
|
69237
|
+
return await client.getPublicEventDetails({
|
|
69238
|
+
siteId: requireStringParam(params, "siteId", "getPublicEventDetails"),
|
|
69239
|
+
limit: parsePositiveIntegerParam(params, "limit"),
|
|
69240
|
+
from: readStringParam(params, "from"),
|
|
69241
|
+
to: readStringParam(params, "to"),
|
|
69242
|
+
afterStartsAt: readStringParam(params, "afterStartsAt"),
|
|
69243
|
+
afterId: readStringParam(params, "afterId"),
|
|
69244
|
+
stage: readStringParam(params, "stage"),
|
|
69245
|
+
categoryIds: readStringParam(params, "categoryIds"),
|
|
69246
|
+
venueId: readStringParam(params, "venueId"),
|
|
69247
|
+
staffMemberId: readStringParam(params, "staffMemberId"),
|
|
69248
|
+
kind: readStringParam(params, "kind"),
|
|
69249
|
+
eventSurface: readStringParam(params, "eventSurface"),
|
|
69250
|
+
eventPresets: readStringParam(params, "eventPresets"),
|
|
69251
|
+
scheduleScope: readStringParam(params, "scheduleScope"),
|
|
69252
|
+
entryId: readStringParam(params, "entryId"),
|
|
69253
|
+
seriesId: readStringParam(params, "seriesId"),
|
|
69254
|
+
includeOccurrenceId: readStringParam(params, "includeOccurrenceId")
|
|
69255
|
+
});
|
|
69256
|
+
}
|
|
69257
|
+
async function listPublicCourses({ client, params }) {
|
|
69258
|
+
return await client.listPublicCourses({
|
|
69259
|
+
siteId: requireStringParam(params, "siteId", "listPublicCourses"),
|
|
69260
|
+
limit: parsePositiveIntegerParam(params, "limit"),
|
|
69261
|
+
stage: readStringParam(params, "stage")
|
|
69262
|
+
});
|
|
69263
|
+
}
|
|
69264
|
+
async function listPublicRouteCandidates({ client, params }) {
|
|
69265
|
+
const siteId = requireStringParam(params, "siteId", "listPublicRouteCandidates");
|
|
69266
|
+
const response = await client.getAllPublishedRoutes({ siteId });
|
|
69267
|
+
return {
|
|
69268
|
+
routes: response.items.flatMap((item) => {
|
|
69269
|
+
if (!item.path) return [];
|
|
69270
|
+
return [{
|
|
69271
|
+
entityId: item.entityId,
|
|
69272
|
+
path: item.path,
|
|
69273
|
+
title: item.title,
|
|
69274
|
+
kind: item.entityType,
|
|
69275
|
+
contentTypeKey: item.contentTypeKey ?? null
|
|
69276
|
+
}];
|
|
69277
|
+
})
|
|
69278
|
+
};
|
|
69279
|
+
}
|
|
69280
|
+
async function listPublicTeamMembers({ client, params }) {
|
|
69281
|
+
return await client.listPublicTeamMembers({
|
|
69282
|
+
siteId: requireStringParam(params, "siteId", "listPublicTeamMembers"),
|
|
69283
|
+
stage: readStringParam(params, "stage")
|
|
69284
|
+
});
|
|
69285
|
+
}
|
|
69286
|
+
async function listPublicProducts({ client, params }) {
|
|
69287
|
+
return await client.listPublicProducts({
|
|
69288
|
+
siteId: requireStringParam(params, "siteId", "listPublicProducts"),
|
|
69289
|
+
stage: readStringParam(params, "stage") === "preview" ? "preview" : "published",
|
|
69290
|
+
categorySelector: parsePublicProductCategorySelector(params.categorySelector)
|
|
69291
|
+
});
|
|
69292
|
+
}
|
|
69293
|
+
async function listPublicPasses({ client, params }) {
|
|
69294
|
+
return await client.listPublicPasses({
|
|
69295
|
+
siteId: requireStringParam(params, "siteId", "listPublicPasses"),
|
|
69296
|
+
categories: readStringParam(params, "categories")
|
|
69297
|
+
});
|
|
69298
|
+
}
|
|
69299
|
+
async function listPublicMemberships({ client, params }) {
|
|
69300
|
+
return await client.listPublicMemberships({
|
|
69301
|
+
siteId: requireStringParam(params, "siteId", "listPublicMemberships"),
|
|
69302
|
+
categories: readStringParam(params, "categories")
|
|
69303
|
+
});
|
|
69304
|
+
}
|
|
69305
|
+
async function getPublicFormById({ client, params }) {
|
|
69306
|
+
return await client.getPublicFormById({
|
|
69307
|
+
formId: requireStringParam(params, "formId", "getPublicFormById"),
|
|
69308
|
+
siteId: requireStringParam(params, "siteId", "getPublicFormById")
|
|
69309
|
+
});
|
|
69310
|
+
}
|
|
69311
|
+
async function getPublicBookingServices({ client, params }) {
|
|
69312
|
+
return await client.getPublicBookingServices({
|
|
69313
|
+
siteId: requireStringParam(params, "siteId", "getPublicBookingServices"),
|
|
69314
|
+
ids: readStringParam(params, "ids")
|
|
69315
|
+
});
|
|
69316
|
+
}
|
|
68611
69317
|
async function prefetchBlockData2(page, context, client, options) {
|
|
68612
69318
|
const { customBlocks } = options ?? {};
|
|
68613
69319
|
const customBlockMap = new Map(
|
|
@@ -68617,189 +69323,11 @@ async function prefetchBlockData2(page, context, client, options) {
|
|
|
68617
69323
|
apiClient: async ({ endpoint, params }) => {
|
|
68618
69324
|
if (!isSupportedLoaderEndpoint2(endpoint)) {
|
|
68619
69325
|
throw new Error(
|
|
68620
|
-
`Unsupported loader endpoint: ${endpoint}. SDK only supports: ${
|
|
69326
|
+
`Unsupported loader endpoint: ${endpoint}. SDK only supports: ${SUPPORTED_LOADER_ENDPOINTS.join(", ")}`
|
|
68621
69327
|
);
|
|
68622
69328
|
}
|
|
68623
69329
|
const resolvedParams = normalizeLoaderParams(endpoint, params, context);
|
|
68624
|
-
|
|
68625
|
-
case "listPublishedEntries": {
|
|
68626
|
-
const {
|
|
68627
|
-
siteId,
|
|
68628
|
-
type,
|
|
68629
|
-
orderBy,
|
|
68630
|
-
limit,
|
|
68631
|
-
stage,
|
|
68632
|
-
mode,
|
|
68633
|
-
entryIds,
|
|
68634
|
-
identifiers,
|
|
68635
|
-
entryRefs
|
|
68636
|
-
} = resolvedParams ?? {};
|
|
68637
|
-
if (!siteId || !type) {
|
|
68638
|
-
throw new Error("listPublishedEntries requires siteId and type params");
|
|
68639
|
-
}
|
|
68640
|
-
const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
|
|
68641
|
-
const order = orderBy === "order" ? "manual" : orderBy === "newest" || orderBy === "oldest" || orderBy === "title" ? orderBy : void 0;
|
|
68642
|
-
const parsedEntryRefs = mode === "manual" ? parseManualEntryRefs(identifiers, entryRefs, entryIds) : void 0;
|
|
68643
|
-
if (mode === "manual" && (!parsedEntryRefs || parsedEntryRefs.length === 0)) {
|
|
68644
|
-
return { entries: [] };
|
|
68645
|
-
}
|
|
68646
|
-
if (mode === "manual" && parsedEntryRefs) {
|
|
68647
|
-
return await client.getEntriesByIdentifiers({
|
|
68648
|
-
siteId,
|
|
68649
|
-
contentType: type,
|
|
68650
|
-
identifiers: parsedEntryRefs,
|
|
68651
|
-
preview: stage === "preview"
|
|
68652
|
-
});
|
|
68653
|
-
}
|
|
68654
|
-
return await client.getEntries({
|
|
68655
|
-
siteId,
|
|
68656
|
-
contentType: type,
|
|
68657
|
-
limit: parsedLimit,
|
|
68658
|
-
order,
|
|
68659
|
-
preview: stage === "preview"
|
|
68660
|
-
});
|
|
68661
|
-
}
|
|
68662
|
-
case "getPublishedEntryPreview": {
|
|
68663
|
-
const { siteId, type, slug } = resolvedParams ?? {};
|
|
68664
|
-
if (!siteId || !type || !slug) {
|
|
68665
|
-
throw new Error("getPublishedEntryPreview requires siteId, type, and slug params");
|
|
68666
|
-
}
|
|
68667
|
-
return await client.getEntry({ siteId, contentType: type, slug });
|
|
68668
|
-
}
|
|
68669
|
-
case "listPublicEvents": {
|
|
68670
|
-
const {
|
|
68671
|
-
siteId,
|
|
68672
|
-
limit,
|
|
68673
|
-
from,
|
|
68674
|
-
to,
|
|
68675
|
-
stage,
|
|
68676
|
-
categoryIds,
|
|
68677
|
-
venueId,
|
|
68678
|
-
kind,
|
|
68679
|
-
entryId,
|
|
68680
|
-
seriesId,
|
|
68681
|
-
includeOccurrenceId
|
|
68682
|
-
} = resolvedParams ?? {};
|
|
68683
|
-
if (!siteId) {
|
|
68684
|
-
throw new Error("listPublicEvents requires siteId param");
|
|
68685
|
-
}
|
|
68686
|
-
const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
|
|
68687
|
-
return await client.listPublicEvents({
|
|
68688
|
-
siteId,
|
|
68689
|
-
limit: parsedLimit,
|
|
68690
|
-
from,
|
|
68691
|
-
to,
|
|
68692
|
-
stage,
|
|
68693
|
-
categoryIds: typeof categoryIds === "string" ? categoryIds : void 0,
|
|
68694
|
-
venueId: typeof venueId === "string" ? venueId : void 0,
|
|
68695
|
-
kind: kind === "all" || kind === "courses" || kind === "events" ? kind : void 0,
|
|
68696
|
-
entryId: typeof entryId === "string" ? entryId : void 0,
|
|
68697
|
-
seriesId: typeof seriesId === "string" ? seriesId : void 0,
|
|
68698
|
-
includeOccurrenceId: typeof includeOccurrenceId === "string" ? includeOccurrenceId : void 0
|
|
68699
|
-
});
|
|
68700
|
-
}
|
|
68701
|
-
case "getPublicEventDetails": {
|
|
68702
|
-
const {
|
|
68703
|
-
siteId,
|
|
68704
|
-
limit,
|
|
68705
|
-
from,
|
|
68706
|
-
to,
|
|
68707
|
-
afterStartsAt,
|
|
68708
|
-
afterId,
|
|
68709
|
-
stage,
|
|
68710
|
-
categoryIds,
|
|
68711
|
-
venueId,
|
|
68712
|
-
staffMemberId,
|
|
68713
|
-
kind,
|
|
68714
|
-
entryId,
|
|
68715
|
-
seriesId,
|
|
68716
|
-
includeOccurrenceId
|
|
68717
|
-
} = resolvedParams ?? {};
|
|
68718
|
-
if (!siteId) {
|
|
68719
|
-
throw new Error("getPublicEventDetails requires siteId param");
|
|
68720
|
-
}
|
|
68721
|
-
const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
|
|
68722
|
-
return await client.getPublicEventDetails({
|
|
68723
|
-
siteId,
|
|
68724
|
-
limit: parsedLimit,
|
|
68725
|
-
from: typeof from === "string" ? from : void 0,
|
|
68726
|
-
to: typeof to === "string" ? to : void 0,
|
|
68727
|
-
afterStartsAt: typeof afterStartsAt === "string" ? afterStartsAt : void 0,
|
|
68728
|
-
afterId: typeof afterId === "string" ? afterId : void 0,
|
|
68729
|
-
stage: typeof stage === "string" ? stage : void 0,
|
|
68730
|
-
categoryIds: typeof categoryIds === "string" ? categoryIds : void 0,
|
|
68731
|
-
venueId: typeof venueId === "string" ? venueId : void 0,
|
|
68732
|
-
staffMemberId: typeof staffMemberId === "string" ? staffMemberId : void 0,
|
|
68733
|
-
kind: typeof kind === "string" ? kind : void 0,
|
|
68734
|
-
entryId: typeof entryId === "string" ? entryId : void 0,
|
|
68735
|
-
seriesId: typeof seriesId === "string" ? seriesId : void 0,
|
|
68736
|
-
includeOccurrenceId: typeof includeOccurrenceId === "string" ? includeOccurrenceId : void 0
|
|
68737
|
-
});
|
|
68738
|
-
}
|
|
68739
|
-
case "listPublicCourses": {
|
|
68740
|
-
const { siteId, limit, stage } = resolvedParams ?? {};
|
|
68741
|
-
if (!siteId) {
|
|
68742
|
-
throw new Error("listPublicCourses requires siteId param");
|
|
68743
|
-
}
|
|
68744
|
-
const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
|
|
68745
|
-
return await client.listPublicCourses({ siteId, limit: parsedLimit, stage });
|
|
68746
|
-
}
|
|
68747
|
-
case "listPublicTeamMembers": {
|
|
68748
|
-
const { siteId, stage } = resolvedParams ?? {};
|
|
68749
|
-
if (!siteId) {
|
|
68750
|
-
throw new Error("listPublicTeamMembers requires siteId param");
|
|
68751
|
-
}
|
|
68752
|
-
return await client.listPublicTeamMembers({
|
|
68753
|
-
siteId,
|
|
68754
|
-
stage: typeof stage === "string" ? stage : void 0
|
|
68755
|
-
});
|
|
68756
|
-
}
|
|
68757
|
-
case "listPublicProducts": {
|
|
68758
|
-
const { siteId, stage, categorySelector } = resolvedParams ?? {};
|
|
68759
|
-
if (!siteId) {
|
|
68760
|
-
throw new Error("listPublicProducts requires siteId param");
|
|
68761
|
-
}
|
|
68762
|
-
return await client.listPublicProducts({
|
|
68763
|
-
siteId,
|
|
68764
|
-
stage: stage === "preview" ? "preview" : "published",
|
|
68765
|
-
categorySelector: parsePublicProductCategorySelector(categorySelector)
|
|
68766
|
-
});
|
|
68767
|
-
}
|
|
68768
|
-
case "getPublicFormById": {
|
|
68769
|
-
const { formId, siteId } = resolvedParams ?? {};
|
|
68770
|
-
if (!formId) {
|
|
68771
|
-
throw new Error("getPublicFormById requires formId param");
|
|
68772
|
-
}
|
|
68773
|
-
if (!siteId) {
|
|
68774
|
-
throw new Error("getPublicFormById requires siteId param");
|
|
68775
|
-
}
|
|
68776
|
-
return await client.getPublicFormById({ formId, siteId });
|
|
68777
|
-
}
|
|
68778
|
-
case "getPublicBookingServices": {
|
|
68779
|
-
const { siteId, ids } = resolvedParams ?? {};
|
|
68780
|
-
if (!siteId) {
|
|
68781
|
-
throw new Error("getPublicBookingServices requires siteId param");
|
|
68782
|
-
}
|
|
68783
|
-
return await client.getPublicBookingServices({ siteId, ids });
|
|
68784
|
-
}
|
|
68785
|
-
case "listPublicPasses": {
|
|
68786
|
-
const { siteId, categories } = resolvedParams ?? {};
|
|
68787
|
-
if (!siteId) {
|
|
68788
|
-
throw new Error("listPublicPasses requires siteId param");
|
|
68789
|
-
}
|
|
68790
|
-
return await client.listPublicPasses({ siteId, categories });
|
|
68791
|
-
}
|
|
68792
|
-
case "listPublicMemberships": {
|
|
68793
|
-
const { siteId, categories } = resolvedParams ?? {};
|
|
68794
|
-
if (!siteId) {
|
|
68795
|
-
throw new Error("listPublicMemberships requires siteId param");
|
|
68796
|
-
}
|
|
68797
|
-
return await client.listPublicMemberships({ siteId, categories });
|
|
68798
|
-
}
|
|
68799
|
-
default: {
|
|
68800
|
-
throw new Error("Unhandled endpoint");
|
|
68801
|
-
}
|
|
68802
|
-
}
|
|
69330
|
+
return await loaderAdapters[endpoint]({ client, params: resolvedParams });
|
|
68803
69331
|
},
|
|
68804
69332
|
isValidEndpoint: isSupportedLoaderEndpoint2,
|
|
68805
69333
|
onError: (error, { block, loader }) => {
|
|
@@ -69051,6 +69579,76 @@ function resolveSiteCustomBlocks(site) {
|
|
|
69051
69579
|
return void 0;
|
|
69052
69580
|
}
|
|
69053
69581
|
|
|
69582
|
+
// src/rendering/helpers/pageRuntimeSupport.ts
|
|
69583
|
+
function buildSiteRenderSupport(site, mediaAssets) {
|
|
69584
|
+
const customBlocks = resolveSiteCustomBlocks(site);
|
|
69585
|
+
return {
|
|
69586
|
+
theme: site.theme,
|
|
69587
|
+
site: site.site,
|
|
69588
|
+
sdkConfig: site.sdkConfig ?? null,
|
|
69589
|
+
bookingOfferingPresets: site.bookingOfferingPresets ?? [],
|
|
69590
|
+
...customBlocks ? { customBlocks } : {},
|
|
69591
|
+
supabaseUrl: site.supabaseUrl,
|
|
69592
|
+
routeMap: site.routes,
|
|
69593
|
+
pagesByIdentifier: site.pagesByIdentifier,
|
|
69594
|
+
entriesByIdentifier: site.entriesByIdentifier,
|
|
69595
|
+
...mediaAssets ? { mediaAssets } : {}
|
|
69596
|
+
};
|
|
69597
|
+
}
|
|
69598
|
+
function collectMediaAssetSidecar(mediaAssets) {
|
|
69599
|
+
return Array.isArray(mediaAssets) && mediaAssets.length > 0 ? mediaAssets : void 0;
|
|
69600
|
+
}
|
|
69601
|
+
function convertPageResponseBlock(block) {
|
|
69602
|
+
if (!isRecord15(block)) {
|
|
69603
|
+
throw new Error("Invalid block format in page API response");
|
|
69604
|
+
}
|
|
69605
|
+
if (typeof block.id !== "string" && block.id !== null) {
|
|
69606
|
+
throw new Error(`Invalid block id in page: expected string or null, got ${typeof block.id}`);
|
|
69607
|
+
}
|
|
69608
|
+
if (typeof block.kind !== "string") {
|
|
69609
|
+
throw new Error(`Invalid block kind in page: expected string, got ${typeof block.kind}`);
|
|
69610
|
+
}
|
|
69611
|
+
if (typeof block.purpose !== "string") {
|
|
69612
|
+
throw new Error(`Invalid block purpose in page: expected string, got ${typeof block.purpose}`);
|
|
69613
|
+
}
|
|
69614
|
+
return {
|
|
69615
|
+
id: block.id,
|
|
69616
|
+
kind: block.kind,
|
|
69617
|
+
purpose: block.purpose,
|
|
69618
|
+
content: sanitizeSdkRuntimeBlockContent(block.kind, readContentRecord(block.content) ?? {}),
|
|
69619
|
+
draftContent: sanitizeNullableSdkRuntimeBlockContent(
|
|
69620
|
+
block.kind,
|
|
69621
|
+
readNestedContentRecord(block.draftContent)
|
|
69622
|
+
)
|
|
69623
|
+
};
|
|
69624
|
+
}
|
|
69625
|
+
function buildPageOutline(input) {
|
|
69626
|
+
return {
|
|
69627
|
+
name: input.name,
|
|
69628
|
+
path: input.path ?? input.fallbackPath,
|
|
69629
|
+
purpose: input.purpose,
|
|
69630
|
+
blocks: input.blocks.map(convertPageResponseBlock)
|
|
69631
|
+
};
|
|
69632
|
+
}
|
|
69633
|
+
function isRecord15(value) {
|
|
69634
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
69635
|
+
}
|
|
69636
|
+
function readContentRecord(value) {
|
|
69637
|
+
return isRecord15(value) ? value : void 0;
|
|
69638
|
+
}
|
|
69639
|
+
function readNestedContentRecord(value) {
|
|
69640
|
+
if (!isRecord15(value)) return null;
|
|
69641
|
+
return readContentRecord(value.data) ?? null;
|
|
69642
|
+
}
|
|
69643
|
+
function sanitizeSdkRuntimeBlockContent(blockKind, content) {
|
|
69644
|
+
if (blockKind !== "block.newsletter-signup") return content;
|
|
69645
|
+
const sanitized = sanitizeNewsletterSignupPublicContent(content);
|
|
69646
|
+
return isRecord15(sanitized) ? sanitized : {};
|
|
69647
|
+
}
|
|
69648
|
+
function sanitizeNullableSdkRuntimeBlockContent(blockKind, content) {
|
|
69649
|
+
return content ? sanitizeSdkRuntimeBlockContent(blockKind, content) : null;
|
|
69650
|
+
}
|
|
69651
|
+
|
|
69054
69652
|
// src/rendering/helpers/loadPage.ts
|
|
69055
69653
|
async function loadPage(params) {
|
|
69056
69654
|
const { client, siteId, path, pageId, preview = false, dataLoaderOverrides, searchParams, forceSite } = params;
|
|
@@ -69058,45 +69656,23 @@ async function loadPage(params) {
|
|
|
69058
69656
|
client.getSite({ id: siteId, ...forceSite ? { force: true } : {} }),
|
|
69059
69657
|
client.getPage({ siteId, path, preview })
|
|
69060
69658
|
]);
|
|
69061
|
-
const customBlocks = resolveSiteCustomBlocks(site);
|
|
69062
69659
|
if ("entry" in pageResponse) {
|
|
69063
69660
|
throw new Error(
|
|
69064
69661
|
"This path resolves to a content entry, not a page. Use loadContent() instead, which handles both pages and entries. For entries, loadContent() returns the raw entry data for custom rendering."
|
|
69065
69662
|
);
|
|
69066
69663
|
}
|
|
69067
69664
|
const { page: pageData } = pageResponse;
|
|
69068
|
-
const
|
|
69069
|
-
|
|
69070
|
-
|
|
69071
|
-
|
|
69072
|
-
|
|
69073
|
-
if (typeof block.id !== "string" && block.id !== null) {
|
|
69074
|
-
throw new Error(`Invalid block id: expected string or null, got ${typeof block.id}`);
|
|
69075
|
-
}
|
|
69076
|
-
if (typeof block.kind !== "string") {
|
|
69077
|
-
throw new Error(`Invalid block kind: expected string, got ${typeof block.kind}`);
|
|
69078
|
-
}
|
|
69079
|
-
if (typeof block.purpose !== "string") {
|
|
69080
|
-
throw new Error(`Invalid block purpose: expected string, got ${typeof block.purpose}`);
|
|
69081
|
-
}
|
|
69082
|
-
const typedBlock = block;
|
|
69083
|
-
return {
|
|
69084
|
-
id: typedBlock.id,
|
|
69085
|
-
kind: typedBlock.kind,
|
|
69086
|
-
purpose: typedBlock.purpose,
|
|
69087
|
-
// Include content for PageRenderer's getRenderableContent()
|
|
69088
|
-
content: typedBlock.content ?? {},
|
|
69089
|
-
// Include draftContent if available (for preview mode)
|
|
69090
|
-
draftContent: typedBlock.draftContent?.data ?? null
|
|
69091
|
-
};
|
|
69092
|
-
});
|
|
69093
|
-
const canonicalPagePath = pageData.path ?? path;
|
|
69094
|
-
const pageOutline = {
|
|
69665
|
+
const support = buildSiteRenderSupport(
|
|
69666
|
+
site,
|
|
69667
|
+
collectMediaAssetSidecar(pageResponse.mediaAssets)
|
|
69668
|
+
);
|
|
69669
|
+
const pageOutline = buildPageOutline({
|
|
69095
69670
|
name: pageData.name,
|
|
69096
|
-
path:
|
|
69671
|
+
path: pageData.path,
|
|
69672
|
+
fallbackPath: path,
|
|
69097
69673
|
purpose: pageData.purpose,
|
|
69098
|
-
blocks
|
|
69099
|
-
};
|
|
69674
|
+
blocks: pageData.blocks
|
|
69675
|
+
});
|
|
69100
69676
|
const prefetchContext = {
|
|
69101
69677
|
siteId,
|
|
69102
69678
|
pageId: pageId ?? pageData.id,
|
|
@@ -69109,7 +69685,7 @@ async function loadPage(params) {
|
|
|
69109
69685
|
client,
|
|
69110
69686
|
{
|
|
69111
69687
|
// Pass custom blocks so their config-based loaders are discovered
|
|
69112
|
-
customBlocks
|
|
69688
|
+
customBlocks: support.customBlocks
|
|
69113
69689
|
}
|
|
69114
69690
|
);
|
|
69115
69691
|
let resolvedData = configData;
|
|
@@ -69119,22 +69695,20 @@ async function loadPage(params) {
|
|
|
69119
69695
|
}
|
|
69120
69696
|
return {
|
|
69121
69697
|
page: pageOutline,
|
|
69122
|
-
theme:
|
|
69123
|
-
sdkConfig:
|
|
69698
|
+
theme: support.theme,
|
|
69699
|
+
sdkConfig: support.sdkConfig,
|
|
69124
69700
|
siteId,
|
|
69125
69701
|
resolvedData,
|
|
69126
|
-
|
|
69127
|
-
|
|
69128
|
-
...
|
|
69702
|
+
bookingOfferingPresets: support.bookingOfferingPresets,
|
|
69703
|
+
supabaseUrl: support.supabaseUrl,
|
|
69704
|
+
...support.mediaAssets ? { mediaAssets: support.mediaAssets } : {},
|
|
69705
|
+
...support.customBlocks ? { customBlocks: support.customBlocks } : {},
|
|
69129
69706
|
// Maps for CTA link resolution (e.g., { kind: 'page', identifier: 'about' })
|
|
69130
|
-
routeMap:
|
|
69131
|
-
pagesByIdentifier:
|
|
69132
|
-
entriesByIdentifier:
|
|
69707
|
+
routeMap: support.routeMap,
|
|
69708
|
+
pagesByIdentifier: support.pagesByIdentifier,
|
|
69709
|
+
entriesByIdentifier: support.entriesByIdentifier
|
|
69133
69710
|
};
|
|
69134
69711
|
}
|
|
69135
|
-
function toMediaAssetSidecar(mediaAssets) {
|
|
69136
|
-
return mediaAssets ?? [];
|
|
69137
|
-
}
|
|
69138
69712
|
|
|
69139
69713
|
// ../blocks/src/bindings/types.ts
|
|
69140
69714
|
var TRANSFORMS = {
|
|
@@ -69409,8 +69983,10 @@ async function loadContent(params) {
|
|
|
69409
69983
|
}
|
|
69410
69984
|
const site = siteResult.value;
|
|
69411
69985
|
const contentResponse = contentResult.value;
|
|
69412
|
-
const
|
|
69413
|
-
|
|
69986
|
+
const support = buildSiteRenderSupport(
|
|
69987
|
+
site,
|
|
69988
|
+
collectMediaAssetSidecar(contentResponse.mediaAssets)
|
|
69989
|
+
);
|
|
69414
69990
|
if (isEntryResponse(contentResponse)) {
|
|
69415
69991
|
const entryData = contentResponse.entry;
|
|
69416
69992
|
const draftContent = entryData.draftContent;
|
|
@@ -69436,13 +70012,14 @@ async function loadContent(params) {
|
|
|
69436
70012
|
entry,
|
|
69437
70013
|
{ siteId, preview },
|
|
69438
70014
|
client,
|
|
69439
|
-
{ customBlocks }
|
|
70015
|
+
{ customBlocks: support.customBlocks }
|
|
69440
70016
|
);
|
|
69441
70017
|
return {
|
|
69442
70018
|
type: "entry",
|
|
69443
70019
|
entry,
|
|
69444
70020
|
templatePage,
|
|
69445
70021
|
resolvedData: resolvedData2,
|
|
70022
|
+
bookingOfferingPresets: support.bookingOfferingPresets,
|
|
69446
70023
|
dataContext: {
|
|
69447
70024
|
contentEntry: {
|
|
69448
70025
|
...entry.content ?? {},
|
|
@@ -69454,29 +70031,29 @@ async function loadContent(params) {
|
|
|
69454
70031
|
_contentTypeSlug: entry.type
|
|
69455
70032
|
}
|
|
69456
70033
|
},
|
|
69457
|
-
theme:
|
|
70034
|
+
theme: support.theme,
|
|
69458
70035
|
siteId,
|
|
69459
|
-
...customBlocks ? { customBlocks } : {},
|
|
69460
|
-
site:
|
|
69461
|
-
sdkConfig:
|
|
69462
|
-
supabaseUrl:
|
|
69463
|
-
routeMap:
|
|
69464
|
-
pagesByIdentifier:
|
|
69465
|
-
entriesByIdentifier:
|
|
69466
|
-
...mediaAssets ? { mediaAssets } : {}
|
|
70036
|
+
...support.customBlocks ? { customBlocks: support.customBlocks } : {},
|
|
70037
|
+
site: support.site,
|
|
70038
|
+
sdkConfig: support.sdkConfig,
|
|
70039
|
+
supabaseUrl: support.supabaseUrl,
|
|
70040
|
+
routeMap: support.routeMap,
|
|
70041
|
+
pagesByIdentifier: support.pagesByIdentifier,
|
|
70042
|
+
entriesByIdentifier: support.entriesByIdentifier,
|
|
70043
|
+
...support.mediaAssets ? { mediaAssets: support.mediaAssets } : {}
|
|
69467
70044
|
};
|
|
69468
70045
|
}
|
|
69469
70046
|
const { page: pageData } = contentResponse;
|
|
69470
70047
|
const pageRecord = pageData;
|
|
69471
70048
|
const canonicalPagePath = pageData.path ?? pageRecord.path ?? "/";
|
|
69472
70049
|
const draftPagePath = pageRecord.draftPath ?? pageRecord.path ?? canonicalPagePath;
|
|
69473
|
-
const
|
|
69474
|
-
const pageOutline = {
|
|
70050
|
+
const pageOutline = buildPageOutline({
|
|
69475
70051
|
name: pageData.name,
|
|
69476
70052
|
path: canonicalPagePath,
|
|
70053
|
+
fallbackPath: "/",
|
|
69477
70054
|
purpose: pageData.purpose,
|
|
69478
|
-
blocks
|
|
69479
|
-
};
|
|
70055
|
+
blocks: pageData.blocks
|
|
70056
|
+
});
|
|
69480
70057
|
const resolvedData = await prefetchBlockData2(
|
|
69481
70058
|
pageOutline,
|
|
69482
70059
|
{
|
|
@@ -69485,7 +70062,7 @@ async function loadContent(params) {
|
|
|
69485
70062
|
previewStage: preview ? "preview" : "published"
|
|
69486
70063
|
},
|
|
69487
70064
|
client,
|
|
69488
|
-
{ customBlocks }
|
|
70065
|
+
{ customBlocks: support.customBlocks }
|
|
69489
70066
|
);
|
|
69490
70067
|
return {
|
|
69491
70068
|
type: "page",
|
|
@@ -69506,56 +70083,23 @@ async function loadContent(params) {
|
|
|
69506
70083
|
ogImageId: pageRecord.ogImageId ?? null
|
|
69507
70084
|
},
|
|
69508
70085
|
page: pageOutline,
|
|
69509
|
-
theme:
|
|
70086
|
+
theme: support.theme,
|
|
69510
70087
|
siteId,
|
|
69511
|
-
...customBlocks ? { customBlocks } : {},
|
|
70088
|
+
...support.customBlocks ? { customBlocks: support.customBlocks } : {},
|
|
69512
70089
|
resolvedData,
|
|
69513
|
-
|
|
69514
|
-
|
|
69515
|
-
|
|
69516
|
-
|
|
69517
|
-
|
|
69518
|
-
|
|
69519
|
-
|
|
70090
|
+
bookingOfferingPresets: support.bookingOfferingPresets,
|
|
70091
|
+
site: support.site,
|
|
70092
|
+
sdkConfig: support.sdkConfig,
|
|
70093
|
+
supabaseUrl: support.supabaseUrl,
|
|
70094
|
+
routeMap: support.routeMap,
|
|
70095
|
+
pagesByIdentifier: support.pagesByIdentifier,
|
|
70096
|
+
entriesByIdentifier: support.entriesByIdentifier,
|
|
70097
|
+
...support.mediaAssets ? { mediaAssets: support.mediaAssets } : {}
|
|
69520
70098
|
};
|
|
69521
70099
|
}
|
|
69522
70100
|
function isEntryResponse(response) {
|
|
69523
70101
|
return "entry" in response;
|
|
69524
70102
|
}
|
|
69525
|
-
function validateAndConvertBlock(block, source) {
|
|
69526
|
-
if (!block || typeof block !== "object") {
|
|
69527
|
-
throw new Error(`Invalid block format in ${source} API response`);
|
|
69528
|
-
}
|
|
69529
|
-
const blockRecord = block;
|
|
69530
|
-
const kindField = source === "template" ? "blockKind" : "kind";
|
|
69531
|
-
const kindValue = blockRecord[kindField];
|
|
69532
|
-
if (typeof blockRecord.id !== "string" && blockRecord.id !== null) {
|
|
69533
|
-
throw new Error(`Invalid block id in ${source}: expected string or null, got ${typeof blockRecord.id}`);
|
|
69534
|
-
}
|
|
69535
|
-
if (typeof kindValue !== "string") {
|
|
69536
|
-
throw new Error(`Invalid block ${kindField} in ${source}: expected string, got ${typeof kindValue}`);
|
|
69537
|
-
}
|
|
69538
|
-
if (source === "page") {
|
|
69539
|
-
if (typeof blockRecord.purpose !== "string") {
|
|
69540
|
-
throw new Error(`Invalid block purpose in ${source}: expected string, got ${typeof blockRecord.purpose}`);
|
|
69541
|
-
}
|
|
69542
|
-
const content2 = blockRecord.content ?? {};
|
|
69543
|
-
return {
|
|
69544
|
-
id: blockRecord.id,
|
|
69545
|
-
kind: kindValue,
|
|
69546
|
-
purpose: blockRecord.purpose,
|
|
69547
|
-
content: content2
|
|
69548
|
-
};
|
|
69549
|
-
}
|
|
69550
|
-
const scope = blockRecord.scope;
|
|
69551
|
-
const content = blockRecord.content ?? {};
|
|
69552
|
-
return {
|
|
69553
|
-
id: blockRecord.id,
|
|
69554
|
-
kind: kindValue,
|
|
69555
|
-
purpose: scope === "entry" ? "entry-content" : "template-layout",
|
|
69556
|
-
content
|
|
69557
|
-
};
|
|
69558
|
-
}
|
|
69559
70103
|
async function processEntryTemplate(templates, entrySlots, entry, context, client, options) {
|
|
69560
70104
|
const template = templates?.[0];
|
|
69561
70105
|
if (!template || !template.blocks?.length) {
|
|
@@ -69599,7 +70143,10 @@ async function processEntryTemplate(templates, entrySlots, entry, context, clien
|
|
|
69599
70143
|
return { templatePage, resolvedData };
|
|
69600
70144
|
}
|
|
69601
70145
|
function resolveTemplateBlock(block, bindingContext) {
|
|
69602
|
-
const rawContent =
|
|
70146
|
+
const rawContent = sanitizeSdkRuntimeBlockContent(
|
|
70147
|
+
block.blockKind,
|
|
70148
|
+
block.content ?? {}
|
|
70149
|
+
);
|
|
69603
70150
|
const baseContent = normalizeBindingOutput2(rawContent);
|
|
69604
70151
|
if (block.scope === "template") {
|
|
69605
70152
|
return {
|