@riverbankcms/sdk 0.85.0 → 0.88.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/api/src/endpoints.d.ts +58 -14
- package/dist/_dts/api/src/index.d.ts +3 -0
- 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 +549 -18
- package/dist/_dts/editor-blocks/src/widgets/reference/loaders.d.ts +3 -1
- 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/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 +408 -109
- 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
package/dist/server/server.mjs
CHANGED
|
@@ -806,6 +806,64 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
806
806
|
auth: "user",
|
|
807
807
|
responseKind: "json"
|
|
808
808
|
},
|
|
809
|
+
listMailchimpAudiences: {
|
|
810
|
+
path: "/sites/{siteId}/integrations/mailchimp/audiences",
|
|
811
|
+
method: "GET",
|
|
812
|
+
tags: [TAG_TEMPLATES.site],
|
|
813
|
+
auth: "user",
|
|
814
|
+
responseKind: "json",
|
|
815
|
+
errors: ["auth:forbidden", "server:internal_error"]
|
|
816
|
+
},
|
|
817
|
+
getMailchimpSignupSyncHealth: {
|
|
818
|
+
path: "/sites/{siteId}/integrations/mailchimp/signup-sync-health",
|
|
819
|
+
method: "GET",
|
|
820
|
+
tags: [TAG_TEMPLATES.site],
|
|
821
|
+
auth: "user",
|
|
822
|
+
responseKind: "json",
|
|
823
|
+
errors: ["auth:forbidden", "server:internal_error"]
|
|
824
|
+
},
|
|
825
|
+
getMailchimpConnection: {
|
|
826
|
+
path: "/sites/{siteId}/integrations/mailchimp/connection",
|
|
827
|
+
method: "GET",
|
|
828
|
+
tags: [TAG_TEMPLATES.site],
|
|
829
|
+
auth: "user",
|
|
830
|
+
responseKind: "json",
|
|
831
|
+
errors: ["auth:forbidden", "server:internal_error"]
|
|
832
|
+
},
|
|
833
|
+
startMailchimpOAuth: {
|
|
834
|
+
path: "/sites/{siteId}/integrations/mailchimp/oauth/start",
|
|
835
|
+
method: "POST",
|
|
836
|
+
tags: [TAG_TEMPLATES.site],
|
|
837
|
+
auth: "user",
|
|
838
|
+
responseKind: "json",
|
|
839
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
840
|
+
errors: ["auth:forbidden", "validation:invalid_input", "server:internal_error"]
|
|
841
|
+
},
|
|
842
|
+
refreshMailchimpAudiences: {
|
|
843
|
+
path: "/sites/{siteId}/integrations/mailchimp/audiences/refresh",
|
|
844
|
+
method: "POST",
|
|
845
|
+
tags: [TAG_TEMPLATES.site],
|
|
846
|
+
auth: "user",
|
|
847
|
+
responseKind: "json",
|
|
848
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
849
|
+
errors: ["auth:forbidden", "server:internal_error"]
|
|
850
|
+
},
|
|
851
|
+
disconnectMailchimp: {
|
|
852
|
+
path: "/sites/{siteId}/integrations/mailchimp/disconnect",
|
|
853
|
+
method: "POST",
|
|
854
|
+
tags: [TAG_TEMPLATES.site],
|
|
855
|
+
auth: "user",
|
|
856
|
+
responseKind: "json",
|
|
857
|
+
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED,
|
|
858
|
+
errors: ["auth:forbidden", "server:internal_error"]
|
|
859
|
+
},
|
|
860
|
+
mailchimpOAuthCallback: {
|
|
861
|
+
path: "/auth/mailchimp/callback",
|
|
862
|
+
method: "GET",
|
|
863
|
+
auth: "public",
|
|
864
|
+
responseKind: "void",
|
|
865
|
+
errors: []
|
|
866
|
+
},
|
|
809
867
|
createNewsletterList: {
|
|
810
868
|
path: "/sites/{siteId}/newsletter/lists",
|
|
811
869
|
method: "POST",
|
|
@@ -3030,20 +3088,6 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
3030
3088
|
auth: "user",
|
|
3031
3089
|
responseKind: "json"
|
|
3032
3090
|
},
|
|
3033
|
-
instagramUploadZip: {
|
|
3034
|
-
path: "/instagram/upload-zip",
|
|
3035
|
-
method: "POST",
|
|
3036
|
-
tags: ["instagram-import"],
|
|
3037
|
-
auth: "user",
|
|
3038
|
-
responseKind: "json"
|
|
3039
|
-
},
|
|
3040
|
-
createInstagramZipUploadUrl: {
|
|
3041
|
-
path: "/instagram/upload-zip-url",
|
|
3042
|
-
method: "POST",
|
|
3043
|
-
tags: ["instagram-import"],
|
|
3044
|
-
auth: "user",
|
|
3045
|
-
responseKind: "json"
|
|
3046
|
-
},
|
|
3047
3091
|
getAnalyticsReport: {
|
|
3048
3092
|
path: "/sites/{siteId}/analytics/report",
|
|
3049
3093
|
method: "GET",
|
|
@@ -6998,7 +7042,7 @@ var SimpleCache = class {
|
|
|
6998
7042
|
};
|
|
6999
7043
|
|
|
7000
7044
|
// src/version.ts
|
|
7001
|
-
var SDK_VERSION = "0.
|
|
7045
|
+
var SDK_VERSION = "0.88.0";
|
|
7002
7046
|
|
|
7003
7047
|
// src/client/error.ts
|
|
7004
7048
|
var RiverbankApiError = class _RiverbankApiError extends Error {
|
|
@@ -8152,10 +8196,16 @@ function createRiverbankClient(config) {
|
|
|
8152
8196
|
limit,
|
|
8153
8197
|
from,
|
|
8154
8198
|
to,
|
|
8199
|
+
afterStartsAt,
|
|
8200
|
+
afterId,
|
|
8155
8201
|
stage,
|
|
8156
8202
|
categoryIds,
|
|
8157
8203
|
venueId,
|
|
8204
|
+
staffMemberId,
|
|
8158
8205
|
kind,
|
|
8206
|
+
eventSurface,
|
|
8207
|
+
eventPresets,
|
|
8208
|
+
scheduleScope,
|
|
8159
8209
|
entryId,
|
|
8160
8210
|
seriesId,
|
|
8161
8211
|
includeOccurrenceId,
|
|
@@ -8164,7 +8214,7 @@ function createRiverbankClient(config) {
|
|
|
8164
8214
|
if (!siteId) {
|
|
8165
8215
|
throw new Error("listPublicEvents() requires siteId");
|
|
8166
8216
|
}
|
|
8167
|
-
const cacheKey = `public-events:${siteId}:${limit ?? ""}:${from ?? ""}:${to ?? ""}:${stage ?? ""}:${categoryIds ?? ""}:${venueId ?? ""}:${kind ?? ""}:${entryId ?? ""}:${seriesId ?? ""}:${includeOccurrenceId ?? ""}`;
|
|
8217
|
+
const cacheKey = `public-events:${siteId}:${limit ?? ""}:${from ?? ""}:${to ?? ""}:${afterStartsAt ?? ""}:${afterId ?? ""}:${stage ?? ""}:${categoryIds ?? ""}:${venueId ?? ""}:${staffMemberId ?? ""}:${kind ?? ""}:${eventSurface ?? ""}:${eventPresets ?? ""}:${scheduleScope ?? ""}:${entryId ?? ""}:${seriesId ?? ""}:${includeOccurrenceId ?? ""}`;
|
|
8168
8218
|
return resilientFetchData(
|
|
8169
8219
|
cacheKey,
|
|
8170
8220
|
async (sig) => {
|
|
@@ -8173,10 +8223,16 @@ function createRiverbankClient(config) {
|
|
|
8173
8223
|
...typeof limit === "number" && { limit: String(limit) },
|
|
8174
8224
|
...from && { from },
|
|
8175
8225
|
...to && { to },
|
|
8226
|
+
...afterStartsAt && { afterStartsAt },
|
|
8227
|
+
...afterId && { afterId },
|
|
8176
8228
|
...stage && { stage },
|
|
8177
8229
|
...categoryIds && { categoryIds },
|
|
8178
8230
|
...venueId && { venueId },
|
|
8231
|
+
...staffMemberId && { staffMemberId },
|
|
8179
8232
|
...kind && { kind },
|
|
8233
|
+
...eventSurface && { eventSurface },
|
|
8234
|
+
...eventPresets && { eventPresets },
|
|
8235
|
+
...scheduleScope && { scheduleScope },
|
|
8180
8236
|
...entryId && { entryId },
|
|
8181
8237
|
...seriesId && { seriesId },
|
|
8182
8238
|
...includeOccurrenceId && { includeOccurrenceId }
|
|
@@ -8203,6 +8259,9 @@ function createRiverbankClient(config) {
|
|
|
8203
8259
|
venueId,
|
|
8204
8260
|
staffMemberId,
|
|
8205
8261
|
kind,
|
|
8262
|
+
eventSurface,
|
|
8263
|
+
eventPresets,
|
|
8264
|
+
scheduleScope,
|
|
8206
8265
|
entryId,
|
|
8207
8266
|
seriesId,
|
|
8208
8267
|
includeOccurrenceId,
|
|
@@ -8211,7 +8270,7 @@ function createRiverbankClient(config) {
|
|
|
8211
8270
|
if (!siteId) {
|
|
8212
8271
|
throw new Error("getPublicEventDetails() requires siteId");
|
|
8213
8272
|
}
|
|
8214
|
-
const cacheKey = `public-event-details:${siteId}:${limit ?? ""}:${from ?? ""}:${to ?? ""}:${afterStartsAt ?? ""}:${afterId ?? ""}:${stage ?? ""}:${categoryIds ?? ""}:${venueId ?? ""}:${staffMemberId ?? ""}:${kind ?? ""}:${entryId ?? ""}:${seriesId ?? ""}:${includeOccurrenceId ?? ""}`;
|
|
8273
|
+
const cacheKey = `public-event-details:${siteId}:${limit ?? ""}:${from ?? ""}:${to ?? ""}:${afterStartsAt ?? ""}:${afterId ?? ""}:${stage ?? ""}:${categoryIds ?? ""}:${venueId ?? ""}:${staffMemberId ?? ""}:${kind ?? ""}:${eventSurface ?? ""}:${eventPresets ?? ""}:${scheduleScope ?? ""}:${entryId ?? ""}:${seriesId ?? ""}:${includeOccurrenceId ?? ""}`;
|
|
8215
8274
|
return resilientFetchData(
|
|
8216
8275
|
cacheKey,
|
|
8217
8276
|
async (sig) => {
|
|
@@ -8234,6 +8293,9 @@ function createRiverbankClient(config) {
|
|
|
8234
8293
|
...venueId && { venueId },
|
|
8235
8294
|
...staffMemberId && { staffMemberId },
|
|
8236
8295
|
...kind && { kind },
|
|
8296
|
+
...eventSurface && { eventSurface },
|
|
8297
|
+
...eventPresets && { eventPresets },
|
|
8298
|
+
...scheduleScope && { scheduleScope },
|
|
8237
8299
|
...entryId && { entryId },
|
|
8238
8300
|
...seriesId && { seriesId },
|
|
8239
8301
|
...includeOccurrenceId && { includeOccurrenceId }
|
|
@@ -8482,6 +8544,48 @@ function err(error) {
|
|
|
8482
8544
|
return { ok: false, error };
|
|
8483
8545
|
}
|
|
8484
8546
|
|
|
8547
|
+
// ../core/src/assert-never.ts
|
|
8548
|
+
function assertNever(value, message = "Unexpected variant") {
|
|
8549
|
+
throw new Error(`${message}: ${String(value)}`);
|
|
8550
|
+
}
|
|
8551
|
+
|
|
8552
|
+
// ../core/src/currency-format.ts
|
|
8553
|
+
var CURRENCY_LOCALE_BY_CODE = {
|
|
8554
|
+
USD: "en-US",
|
|
8555
|
+
GBP: "en-GB",
|
|
8556
|
+
EUR: "de-DE",
|
|
8557
|
+
AUD: "en-AU",
|
|
8558
|
+
CAD: "en-CA",
|
|
8559
|
+
NZD: "en-NZ",
|
|
8560
|
+
JPY: "ja-JP",
|
|
8561
|
+
CNY: "zh-CN",
|
|
8562
|
+
CHF: "de-CH"
|
|
8563
|
+
};
|
|
8564
|
+
function resolveCurrencyLocale(currencyCode, override) {
|
|
8565
|
+
return override ?? CURRENCY_LOCALE_BY_CODE[currencyCode] ?? "en";
|
|
8566
|
+
}
|
|
8567
|
+
function formatCurrencyAmount(amountCents, currency, options) {
|
|
8568
|
+
const currencyCode = currency.toUpperCase();
|
|
8569
|
+
const locale = resolveCurrencyLocale(currencyCode, options?.locale);
|
|
8570
|
+
try {
|
|
8571
|
+
const exactFormatter = new Intl.NumberFormat(locale, {
|
|
8572
|
+
style: "currency",
|
|
8573
|
+
currency: currencyCode
|
|
8574
|
+
});
|
|
8575
|
+
const fractionDigits = options?.decimals === "auto" ? {
|
|
8576
|
+
minimumFractionDigits: 0,
|
|
8577
|
+
maximumFractionDigits: exactFormatter.resolvedOptions().maximumFractionDigits
|
|
8578
|
+
} : {};
|
|
8579
|
+
return new Intl.NumberFormat(locale, {
|
|
8580
|
+
style: "currency",
|
|
8581
|
+
currency: currencyCode,
|
|
8582
|
+
...fractionDigits
|
|
8583
|
+
}).format(amountCents / 100);
|
|
8584
|
+
} catch {
|
|
8585
|
+
return `${(amountCents / 100).toFixed(2)} ${currencyCode}`;
|
|
8586
|
+
}
|
|
8587
|
+
}
|
|
8588
|
+
|
|
8485
8589
|
// ../core/src/event-pricing.ts
|
|
8486
8590
|
function publicEventPricingType(pricing) {
|
|
8487
8591
|
switch (pricing.kind) {
|
|
@@ -8502,6 +8606,7 @@ function isFreePublicEventPriceDisplay(display) {
|
|
|
8502
8606
|
return display.display.kind === "free";
|
|
8503
8607
|
case "exact":
|
|
8504
8608
|
case "from":
|
|
8609
|
+
case "range":
|
|
8505
8610
|
case "mixed":
|
|
8506
8611
|
case "unavailable":
|
|
8507
8612
|
return false;
|
|
@@ -8660,11 +8765,6 @@ function toLocationCoordinates(value) {
|
|
|
8660
8765
|
};
|
|
8661
8766
|
}
|
|
8662
8767
|
|
|
8663
|
-
// ../core/src/assert-never.ts
|
|
8664
|
-
function assertNever(value, message = "Unexpected variant") {
|
|
8665
|
-
throw new Error(`${message}: ${String(value)}`);
|
|
8666
|
-
}
|
|
8667
|
-
|
|
8668
8768
|
// ../api/src/accessAdmin.ts
|
|
8669
8769
|
import { z } from "zod";
|
|
8670
8770
|
var managedDomainAddOnPricingSnapshotSchema = z.object({
|
|
@@ -23906,15 +24006,53 @@ var newsletterFormFragment = defineFragment({
|
|
|
23906
24006
|
title: "Newsletter Form",
|
|
23907
24007
|
description: "Newsletter subscription form with preset field configurations.",
|
|
23908
24008
|
fields: [
|
|
24009
|
+
{
|
|
24010
|
+
id: "destinationProvider",
|
|
24011
|
+
type: "select",
|
|
24012
|
+
label: "Send signups to",
|
|
24013
|
+
description: "Choose where new subscribers from this form should go.",
|
|
24014
|
+
defaultValue: "riverbank",
|
|
24015
|
+
required: true,
|
|
24016
|
+
ui: { intent: "behavior" },
|
|
24017
|
+
options: [
|
|
24018
|
+
{ value: "riverbank", label: "Riverbank newsletter" }
|
|
24019
|
+
]
|
|
24020
|
+
},
|
|
23909
24021
|
{
|
|
23910
24022
|
id: "listId",
|
|
23911
24023
|
type: "reference",
|
|
23912
24024
|
label: "Newsletter list",
|
|
23913
24025
|
description: "Select the list new subscribers should be added to.",
|
|
23914
|
-
required:
|
|
24026
|
+
required: false,
|
|
23915
24027
|
referenceKind: "newsletterList",
|
|
23916
24028
|
allowManualEntry: false,
|
|
23917
|
-
ui: {
|
|
24029
|
+
ui: {
|
|
24030
|
+
intent: "behavior",
|
|
24031
|
+
visibleWhen: { field: "destinationProvider", equals: "riverbank" }
|
|
24032
|
+
}
|
|
24033
|
+
},
|
|
24034
|
+
{
|
|
24035
|
+
id: "mailchimpAudienceId",
|
|
24036
|
+
type: "reference",
|
|
24037
|
+
label: "Mailchimp audience",
|
|
24038
|
+
description: "Choose the Mailchimp audience for new subscribers.",
|
|
24039
|
+
required: false,
|
|
24040
|
+
referenceKind: "mailchimpAudience",
|
|
24041
|
+
allowManualEntry: false,
|
|
24042
|
+
ui: {
|
|
24043
|
+
intent: "behavior",
|
|
24044
|
+
visibleWhen: { field: "destinationProvider", equals: "mailchimp" }
|
|
24045
|
+
}
|
|
24046
|
+
},
|
|
24047
|
+
{
|
|
24048
|
+
id: "mailchimpTags",
|
|
24049
|
+
type: "text",
|
|
24050
|
+
label: "Mailchimp tags",
|
|
24051
|
+
description: "Optional tags to apply in Mailchimp, separated by commas or semicolons.",
|
|
24052
|
+
ui: {
|
|
24053
|
+
intent: "behavior",
|
|
24054
|
+
visibleWhen: { field: "destinationProvider", equals: "mailchimp" }
|
|
24055
|
+
}
|
|
23918
24056
|
},
|
|
23919
24057
|
{
|
|
23920
24058
|
id: "preset",
|
|
@@ -23961,13 +24099,18 @@ var newsletterFormFragment = defineFragment({
|
|
|
23961
24099
|
id: "tags",
|
|
23962
24100
|
type: "text",
|
|
23963
24101
|
label: "Tags (optional)",
|
|
23964
|
-
description: "Optional tags to apply on subscribe (comma or semicolon separated)."
|
|
24102
|
+
description: "Optional tags to apply on subscribe (comma or semicolon separated).",
|
|
24103
|
+
ui: {
|
|
24104
|
+
intent: "behavior",
|
|
24105
|
+
visibleWhen: { field: "destinationProvider", equals: "riverbank" }
|
|
24106
|
+
}
|
|
23965
24107
|
}
|
|
23966
24108
|
],
|
|
23967
24109
|
layout: [
|
|
23968
24110
|
el(
|
|
23969
24111
|
"newsletter-form",
|
|
23970
24112
|
withApiBindings({
|
|
24113
|
+
destinationProvider: { $bind: { from: "destinationProvider" } },
|
|
23971
24114
|
listId: { $bind: { from: "listId" } },
|
|
23972
24115
|
preset: { $bind: { from: "preset" } },
|
|
23973
24116
|
includePhone: { $bind: { from: "includePhone" } },
|
|
@@ -29811,10 +29954,10 @@ var appointmentBookingBlockDefinition = {
|
|
|
29811
29954
|
};
|
|
29812
29955
|
|
|
29813
29956
|
// ../blocks/src/system/blocks/event-registration.ts
|
|
29814
|
-
import { z as
|
|
29957
|
+
import { z as z47 } from "zod";
|
|
29815
29958
|
|
|
29816
29959
|
// ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
29817
|
-
import { z as
|
|
29960
|
+
import { z as z43 } from "zod";
|
|
29818
29961
|
|
|
29819
29962
|
// ../blocks/src/lib/media.ts
|
|
29820
29963
|
import z39 from "zod";
|
|
@@ -29892,296 +30035,346 @@ var mediaSchema2 = z39.discriminatedUnion("type", [
|
|
|
29892
30035
|
archiveMediaSchema
|
|
29893
30036
|
]);
|
|
29894
30037
|
|
|
29895
|
-
// ../blocks/src/system/
|
|
30038
|
+
// ../blocks/src/system/manifest/richTextSchema.ts
|
|
29896
30039
|
import { z as z40 } from "zod";
|
|
29897
|
-
var
|
|
30040
|
+
var TipTapMarkSchema = z40.object({
|
|
30041
|
+
type: z40.string(),
|
|
30042
|
+
attrs: z40.record(z40.string(), z40.unknown()).optional()
|
|
30043
|
+
});
|
|
30044
|
+
var TipTapNodeSchema = z40.lazy(
|
|
30045
|
+
() => z40.object({
|
|
30046
|
+
type: z40.string(),
|
|
30047
|
+
content: z40.array(TipTapNodeSchema).optional(),
|
|
30048
|
+
text: z40.string().optional(),
|
|
30049
|
+
attrs: z40.record(z40.string(), z40.unknown()).optional(),
|
|
30050
|
+
marks: z40.array(TipTapMarkSchema).optional()
|
|
30051
|
+
})
|
|
30052
|
+
);
|
|
30053
|
+
var RichTextValueSchema = z40.union([
|
|
30054
|
+
// Canonical: TipTap document directly
|
|
30055
|
+
TipTapNodeSchema,
|
|
30056
|
+
// Legacy (read-tolerance only): wrapped in { doc: {...} }
|
|
30057
|
+
z40.object({
|
|
30058
|
+
doc: TipTapNodeSchema
|
|
30059
|
+
})
|
|
30060
|
+
]);
|
|
30061
|
+
var RichTextDocSchema = z40.object({
|
|
30062
|
+
type: z40.literal("doc"),
|
|
30063
|
+
content: z40.array(TipTapNodeSchema)
|
|
30064
|
+
});
|
|
30065
|
+
function unwrapRichTextRoot(value) {
|
|
30066
|
+
if (!isRecord2(value)) return value;
|
|
30067
|
+
if (!("doc" in value)) return value;
|
|
30068
|
+
const inner = value.doc;
|
|
30069
|
+
if (isRecord2(inner) && inner.type === "doc") return inner;
|
|
30070
|
+
return value;
|
|
30071
|
+
}
|
|
30072
|
+
|
|
30073
|
+
// ../blocks/src/system/blocks/shared/bookingPaymentTerms.ts
|
|
30074
|
+
import { z as z41 } from "zod";
|
|
30075
|
+
var bookingDepositRefundPolicySchema = z41.enum([
|
|
29898
30076
|
"refundable",
|
|
29899
30077
|
"non_refundable"
|
|
29900
30078
|
]);
|
|
29901
|
-
var bookingInstalmentPlanSchema =
|
|
29902
|
-
|
|
29903
|
-
kind:
|
|
29904
|
-
depositAmountCents:
|
|
30079
|
+
var bookingInstalmentPlanSchema = z41.union([
|
|
30080
|
+
z41.object({
|
|
30081
|
+
kind: z41.literal("deposit_plus_one_remainder"),
|
|
30082
|
+
depositAmountCents: z41.number().int().min(0),
|
|
29905
30083
|
depositRefundability: bookingDepositRefundPolicySchema,
|
|
29906
|
-
remainderDueCount:
|
|
29907
|
-
intervalUnit:
|
|
30084
|
+
remainderDueCount: z41.number().int().positive(),
|
|
30085
|
+
intervalUnit: z41.enum(["day", "week", "month"])
|
|
29908
30086
|
}),
|
|
29909
|
-
|
|
29910
|
-
kind:
|
|
29911
|
-
depositAmountCents:
|
|
30087
|
+
z41.object({
|
|
30088
|
+
kind: z41.literal("deposit_plus_scheduled_instalments"),
|
|
30089
|
+
depositAmountCents: z41.number().int().min(0),
|
|
29912
30090
|
depositRefundability: bookingDepositRefundPolicySchema,
|
|
29913
|
-
instalmentCount:
|
|
29914
|
-
intervalCount:
|
|
29915
|
-
intervalUnit:
|
|
30091
|
+
instalmentCount: z41.number().int().positive(),
|
|
30092
|
+
intervalCount: z41.number().int().positive(),
|
|
30093
|
+
intervalUnit: z41.enum(["day", "week", "month"])
|
|
29916
30094
|
}),
|
|
29917
|
-
|
|
29918
|
-
kind:
|
|
29919
|
-
instalmentCount:
|
|
29920
|
-
intervalCount:
|
|
29921
|
-
intervalUnit:
|
|
30095
|
+
z41.object({
|
|
30096
|
+
kind: z41.literal("equal_scheduled_instalments"),
|
|
30097
|
+
instalmentCount: z41.number().int().positive(),
|
|
30098
|
+
intervalCount: z41.number().int().positive(),
|
|
30099
|
+
intervalUnit: z41.enum(["day", "week", "month"])
|
|
29922
30100
|
})
|
|
29923
30101
|
]);
|
|
29924
|
-
var bookingFlexibleBalanceDueDateRuleSchema =
|
|
29925
|
-
|
|
29926
|
-
kind:
|
|
29927
|
-
daysBeforeStart:
|
|
30102
|
+
var bookingFlexibleBalanceDueDateRuleSchema = z41.union([
|
|
30103
|
+
z41.object({
|
|
30104
|
+
kind: z41.literal("relative_to_start_date"),
|
|
30105
|
+
daysBeforeStart: z41.number().int().positive()
|
|
29928
30106
|
}),
|
|
29929
|
-
|
|
29930
|
-
kind:
|
|
29931
|
-
dueAt:
|
|
30107
|
+
z41.object({
|
|
30108
|
+
kind: z41.literal("fixed_calendar_date"),
|
|
30109
|
+
dueAt: z41.string().datetime()
|
|
29932
30110
|
})
|
|
29933
30111
|
]);
|
|
29934
|
-
var bookingFlexibleBalanceConfigSchema =
|
|
29935
|
-
upfrontAmountCents:
|
|
30112
|
+
var bookingFlexibleBalanceConfigSchema = z41.object({
|
|
30113
|
+
upfrontAmountCents: z41.number().int().min(0),
|
|
29936
30114
|
dueDateRule: bookingFlexibleBalanceDueDateRuleSchema,
|
|
29937
30115
|
depositRefundability: bookingDepositRefundPolicySchema
|
|
29938
30116
|
});
|
|
29939
|
-
var blockBookingPaymentCollectionOptionSchema =
|
|
29940
|
-
|
|
29941
|
-
kind:
|
|
30117
|
+
var blockBookingPaymentCollectionOptionSchema = z41.union([
|
|
30118
|
+
z41.object({
|
|
30119
|
+
kind: z41.literal("upfront")
|
|
29942
30120
|
}),
|
|
29943
|
-
|
|
29944
|
-
kind:
|
|
30121
|
+
z41.object({
|
|
30122
|
+
kind: z41.literal("deferred_manual")
|
|
29945
30123
|
}),
|
|
29946
|
-
|
|
29947
|
-
kind:
|
|
30124
|
+
z41.object({
|
|
30125
|
+
kind: z41.literal("instalment_plan"),
|
|
29948
30126
|
plan: bookingInstalmentPlanSchema
|
|
29949
30127
|
}),
|
|
29950
|
-
|
|
29951
|
-
kind:
|
|
30128
|
+
z41.object({
|
|
30129
|
+
kind: z41.literal("flexible_balance"),
|
|
29952
30130
|
config: bookingFlexibleBalanceConfigSchema
|
|
29953
30131
|
})
|
|
29954
30132
|
]);
|
|
29955
|
-
var blockBookingPaymentTermsSchema =
|
|
29956
|
-
allowedOptions:
|
|
30133
|
+
var blockBookingPaymentTermsSchema = z41.object({
|
|
30134
|
+
allowedOptions: z41.array(blockBookingPaymentCollectionOptionSchema).min(1)
|
|
29957
30135
|
});
|
|
29958
30136
|
|
|
29959
30137
|
// ../blocks/src/system/blocks/courses/shared/schemas.ts
|
|
29960
|
-
import { z as
|
|
29961
|
-
var courseVenueSchema =
|
|
29962
|
-
id:
|
|
29963
|
-
name:
|
|
29964
|
-
address:
|
|
29965
|
-
});
|
|
29966
|
-
var courseSessionSchema =
|
|
29967
|
-
id:
|
|
29968
|
-
startsAt:
|
|
29969
|
-
endsAt:
|
|
29970
|
-
timeZone:
|
|
29971
|
-
capacityOverride:
|
|
29972
|
-
overrides:
|
|
29973
|
-
});
|
|
29974
|
-
var courseTeamMemberSummarySchema =
|
|
29975
|
-
id:
|
|
29976
|
-
name:
|
|
29977
|
-
roleLabel:
|
|
29978
|
-
summary:
|
|
29979
|
-
profilePath:
|
|
29980
|
-
});
|
|
29981
|
-
var coursePricingOptionSchema =
|
|
29982
|
-
id:
|
|
29983
|
-
name:
|
|
29984
|
-
description:
|
|
29985
|
-
priceAmount:
|
|
29986
|
-
isActive:
|
|
29987
|
-
sortOrder:
|
|
29988
|
-
capacityLimit:
|
|
29989
|
-
saleStartsAt:
|
|
29990
|
-
saleEndsAt:
|
|
29991
|
-
attendanceScope:
|
|
29992
|
-
});
|
|
29993
|
-
var coursePricingSchema =
|
|
29994
|
-
bookingRequirement:
|
|
29995
|
-
pricingStrategy:
|
|
29996
|
-
currency:
|
|
29997
|
-
singlePriceAmount:
|
|
30138
|
+
import { z as z42 } from "zod";
|
|
30139
|
+
var courseVenueSchema = z42.object({
|
|
30140
|
+
id: z42.string(),
|
|
30141
|
+
name: z42.string(),
|
|
30142
|
+
address: z42.string().nullable()
|
|
30143
|
+
});
|
|
30144
|
+
var courseSessionSchema = z42.object({
|
|
30145
|
+
id: z42.string(),
|
|
30146
|
+
startsAt: z42.string(),
|
|
30147
|
+
endsAt: z42.string(),
|
|
30148
|
+
timeZone: z42.string(),
|
|
30149
|
+
capacityOverride: z42.number().nullable().optional(),
|
|
30150
|
+
overrides: z42.record(z42.string(), z42.unknown()).nullable().optional()
|
|
30151
|
+
});
|
|
30152
|
+
var courseTeamMemberSummarySchema = z42.object({
|
|
30153
|
+
id: z42.string(),
|
|
30154
|
+
name: z42.string(),
|
|
30155
|
+
roleLabel: z42.string().nullable(),
|
|
30156
|
+
summary: z42.string().nullable(),
|
|
30157
|
+
profilePath: z42.string().nullable()
|
|
30158
|
+
});
|
|
30159
|
+
var coursePricingOptionSchema = z42.object({
|
|
30160
|
+
id: z42.string(),
|
|
30161
|
+
name: z42.string(),
|
|
30162
|
+
description: z42.string().nullable(),
|
|
30163
|
+
priceAmount: z42.number(),
|
|
30164
|
+
isActive: z42.boolean(),
|
|
30165
|
+
sortOrder: z42.number(),
|
|
30166
|
+
capacityLimit: z42.number().nullable(),
|
|
30167
|
+
saleStartsAt: z42.string().nullable(),
|
|
30168
|
+
saleEndsAt: z42.string().nullable(),
|
|
30169
|
+
attendanceScope: z42.enum(["in_person", "online", "both"]).nullable().optional()
|
|
30170
|
+
});
|
|
30171
|
+
var coursePricingSchema = z42.object({
|
|
30172
|
+
bookingRequirement: z42.enum(["none", "required"]),
|
|
30173
|
+
pricingStrategy: z42.enum(["free", "single", "tiered"]),
|
|
30174
|
+
currency: z42.string(),
|
|
30175
|
+
singlePriceAmount: z42.number().nullable(),
|
|
29998
30176
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
29999
|
-
options:
|
|
30000
|
-
});
|
|
30001
|
-
var publicCourseSchema =
|
|
30002
|
-
id:
|
|
30003
|
-
title:
|
|
30004
|
-
slug:
|
|
30005
|
-
description:
|
|
30006
|
-
teamMembers:
|
|
30007
|
-
enrollmentOpen:
|
|
30177
|
+
options: z42.array(coursePricingOptionSchema)
|
|
30178
|
+
});
|
|
30179
|
+
var publicCourseSchema = z42.object({
|
|
30180
|
+
id: z42.string(),
|
|
30181
|
+
title: z42.string(),
|
|
30182
|
+
slug: z42.string(),
|
|
30183
|
+
description: z42.unknown().nullable(),
|
|
30184
|
+
teamMembers: z42.array(courseTeamMemberSummarySchema).optional(),
|
|
30185
|
+
enrollmentOpen: z42.boolean(),
|
|
30008
30186
|
pricing: coursePricingSchema.optional(),
|
|
30009
|
-
priceCents:
|
|
30010
|
-
currency:
|
|
30187
|
+
priceCents: z42.number().nullable(),
|
|
30188
|
+
currency: z42.string(),
|
|
30011
30189
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
30012
|
-
enrollmentCapacity:
|
|
30013
|
-
acceptsMemberships:
|
|
30014
|
-
status:
|
|
30015
|
-
sessionsCount:
|
|
30016
|
-
enrolledCount:
|
|
30017
|
-
availableSpots:
|
|
30018
|
-
sessions:
|
|
30190
|
+
enrollmentCapacity: z42.number().nullable(),
|
|
30191
|
+
acceptsMemberships: z42.boolean(),
|
|
30192
|
+
status: z42.enum(["active", "draft", "cancelled"]),
|
|
30193
|
+
sessionsCount: z42.number(),
|
|
30194
|
+
enrolledCount: z42.number(),
|
|
30195
|
+
availableSpots: z42.number().nullable(),
|
|
30196
|
+
sessions: z42.array(courseSessionSchema),
|
|
30019
30197
|
venue: courseVenueSchema.nullable(),
|
|
30020
|
-
contentEntryId:
|
|
30198
|
+
contentEntryId: z42.string().nullable()
|
|
30021
30199
|
});
|
|
30022
|
-
var publicCoursesArraySchema =
|
|
30200
|
+
var publicCoursesArraySchema = z42.array(publicCourseSchema);
|
|
30023
30201
|
|
|
30024
30202
|
// ../blocks/src/system/blocks/events/shared/schemas.ts
|
|
30025
|
-
var eventPresetSchema =
|
|
30026
|
-
var eventScheduleScopeSchema =
|
|
30027
|
-
var eventDestinationModeSchema =
|
|
30028
|
-
var eventVenueSchema =
|
|
30029
|
-
id:
|
|
30030
|
-
name:
|
|
30031
|
-
address:
|
|
30032
|
-
location:
|
|
30033
|
-
lat:
|
|
30034
|
-
lng:
|
|
30203
|
+
var eventPresetSchema = z43.enum(["event", "class", "workshop", "retreat", "performance"]);
|
|
30204
|
+
var eventScheduleScopeSchema = z43.enum(["recurring", "oneOff"]);
|
|
30205
|
+
var eventDestinationModeSchema = z43.enum(["cms-managed", "system-managed"]);
|
|
30206
|
+
var eventVenueSchema = z43.object({
|
|
30207
|
+
id: z43.string(),
|
|
30208
|
+
name: z43.string(),
|
|
30209
|
+
address: z43.string().nullable(),
|
|
30210
|
+
location: z43.object({
|
|
30211
|
+
lat: z43.number(),
|
|
30212
|
+
lng: z43.number()
|
|
30035
30213
|
}).nullable()
|
|
30036
30214
|
});
|
|
30037
|
-
var eventCategorySchema =
|
|
30038
|
-
id:
|
|
30039
|
-
name:
|
|
30040
|
-
color:
|
|
30041
|
-
});
|
|
30042
|
-
var pricingTypeSchema =
|
|
30043
|
-
var accessRestrictionSchema =
|
|
30044
|
-
var eventPricingModeSchema =
|
|
30045
|
-
var publicCoursePriceDisplaySchema =
|
|
30046
|
-
|
|
30047
|
-
|
|
30048
|
-
|
|
30049
|
-
|
|
30215
|
+
var eventCategorySchema = z43.object({
|
|
30216
|
+
id: z43.string(),
|
|
30217
|
+
name: z43.string(),
|
|
30218
|
+
color: z43.string().nullable()
|
|
30219
|
+
});
|
|
30220
|
+
var pricingTypeSchema = z43.enum(["free", "paid"]);
|
|
30221
|
+
var accessRestrictionSchema = z43.enum(["none", "category"]);
|
|
30222
|
+
var eventPricingModeSchema = z43.enum(["single", "ticket_types"]);
|
|
30223
|
+
var publicCoursePriceDisplaySchema = z43.discriminatedUnion("kind", [
|
|
30224
|
+
z43.object({ kind: z43.literal("free"), currency: z43.string() }),
|
|
30225
|
+
z43.object({ kind: z43.literal("exact"), amount: z43.number(), currency: z43.string() }),
|
|
30226
|
+
z43.object({ kind: z43.literal("from"), amount: z43.number(), currency: z43.string() }),
|
|
30227
|
+
z43.object({ kind: z43.literal("unavailable"), currency: z43.string() })
|
|
30050
30228
|
]);
|
|
30051
|
-
var publicEventPriceDisplaySchema =
|
|
30052
|
-
|
|
30053
|
-
|
|
30054
|
-
|
|
30055
|
-
|
|
30056
|
-
|
|
30057
|
-
|
|
30229
|
+
var publicEventPriceDisplaySchema = z43.discriminatedUnion("kind", [
|
|
30230
|
+
z43.object({ kind: z43.literal("free"), currency: z43.string() }),
|
|
30231
|
+
z43.object({ kind: z43.literal("exact"), amount: z43.number(), currency: z43.string() }),
|
|
30232
|
+
z43.object({ kind: z43.literal("from"), amount: z43.number(), currency: z43.string() }),
|
|
30233
|
+
z43.object({ kind: z43.literal("range"), minAmount: z43.number(), maxAmount: z43.number(), currency: z43.string() }),
|
|
30234
|
+
z43.object({
|
|
30235
|
+
kind: z43.literal("mixed"),
|
|
30236
|
+
paidFromAmount: z43.number(),
|
|
30237
|
+
paidToAmount: z43.number(),
|
|
30238
|
+
currency: z43.string()
|
|
30239
|
+
}),
|
|
30240
|
+
z43.object({ kind: z43.literal("unavailable"), currency: z43.string() }),
|
|
30241
|
+
z43.object({ kind: z43.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
30058
30242
|
]);
|
|
30059
|
-
var publicEventTicketTypePriceDisplaySchema =
|
|
30060
|
-
|
|
30061
|
-
|
|
30062
|
-
|
|
30063
|
-
|
|
30064
|
-
|
|
30243
|
+
var publicEventTicketTypePriceDisplaySchema = z43.union([
|
|
30244
|
+
z43.object({ kind: z43.literal("free"), currency: z43.string() }),
|
|
30245
|
+
z43.object({ kind: z43.literal("exact"), amount: z43.number(), currency: z43.string() }),
|
|
30246
|
+
z43.object({ kind: z43.literal("from"), amount: z43.number(), currency: z43.string() }),
|
|
30247
|
+
z43.object({ kind: z43.literal("range"), minAmount: z43.number(), maxAmount: z43.number(), currency: z43.string() }),
|
|
30248
|
+
z43.object({
|
|
30249
|
+
kind: z43.literal("mixed"),
|
|
30250
|
+
paidFromAmount: z43.number(),
|
|
30251
|
+
paidToAmount: z43.number(),
|
|
30252
|
+
currency: z43.string()
|
|
30253
|
+
}),
|
|
30254
|
+
z43.object({ kind: z43.literal("unavailable"), currency: z43.string() })
|
|
30065
30255
|
]);
|
|
30066
|
-
var publicEventAttendanceModeSchema =
|
|
30067
|
-
var publicEventAttendanceModeAvailabilitySchema =
|
|
30256
|
+
var publicEventAttendanceModeSchema = z43.enum(["in_person", "online"]);
|
|
30257
|
+
var publicEventAttendanceModeAvailabilitySchema = z43.object({
|
|
30068
30258
|
mode: publicEventAttendanceModeSchema,
|
|
30069
|
-
capacity:
|
|
30070
|
-
registeredCount:
|
|
30071
|
-
availableSpots:
|
|
30072
|
-
waitlistEnabled:
|
|
30073
|
-
});
|
|
30074
|
-
var publicEventTicketTypeAvailabilitySchema =
|
|
30075
|
-
|
|
30076
|
-
kind:
|
|
30077
|
-
remainingCapacity:
|
|
30259
|
+
capacity: z43.number().nullable(),
|
|
30260
|
+
registeredCount: z43.number(),
|
|
30261
|
+
availableSpots: z43.number().nullable(),
|
|
30262
|
+
waitlistEnabled: z43.boolean()
|
|
30263
|
+
});
|
|
30264
|
+
var publicEventTicketTypeAvailabilitySchema = z43.union([
|
|
30265
|
+
z43.object({
|
|
30266
|
+
kind: z43.literal("available"),
|
|
30267
|
+
remainingCapacity: z43.number().nullable()
|
|
30078
30268
|
}),
|
|
30079
|
-
|
|
30080
|
-
kind:
|
|
30081
|
-
reason:
|
|
30082
|
-
remainingCapacity:
|
|
30269
|
+
z43.object({
|
|
30270
|
+
kind: z43.literal("unavailable"),
|
|
30271
|
+
reason: z43.enum(["inactive", "not_on_sale_yet", "sale_ended", "sold_out", "event_sold_out"]),
|
|
30272
|
+
remainingCapacity: z43.number().nullable()
|
|
30083
30273
|
})
|
|
30084
30274
|
]);
|
|
30085
|
-
var publicEventTicketTypeSchema =
|
|
30086
|
-
id:
|
|
30087
|
-
siteId:
|
|
30088
|
-
eventSeriesId:
|
|
30089
|
-
name:
|
|
30090
|
-
description:
|
|
30091
|
-
priceAmount:
|
|
30092
|
-
isActive:
|
|
30093
|
-
sortOrder:
|
|
30094
|
-
capacityMode:
|
|
30095
|
-
capacityLimit:
|
|
30096
|
-
attendanceScope:
|
|
30097
|
-
saleStartsAt:
|
|
30098
|
-
saleEndsAt:
|
|
30275
|
+
var publicEventTicketTypeSchema = z43.object({
|
|
30276
|
+
id: z43.string(),
|
|
30277
|
+
siteId: z43.string(),
|
|
30278
|
+
eventSeriesId: z43.string(),
|
|
30279
|
+
name: z43.string(),
|
|
30280
|
+
description: z43.string().nullable(),
|
|
30281
|
+
priceAmount: z43.number(),
|
|
30282
|
+
isActive: z43.boolean(),
|
|
30283
|
+
sortOrder: z43.number(),
|
|
30284
|
+
capacityMode: z43.enum(["limited", "unlimited"]),
|
|
30285
|
+
capacityLimit: z43.number().nullable(),
|
|
30286
|
+
attendanceScope: z43.enum(["in_person", "online", "both"]).optional(),
|
|
30287
|
+
saleStartsAt: z43.string().nullable(),
|
|
30288
|
+
saleEndsAt: z43.string().nullable(),
|
|
30099
30289
|
availability: publicEventTicketTypeAvailabilitySchema,
|
|
30100
|
-
createdAt:
|
|
30101
|
-
updatedAt:
|
|
30102
|
-
});
|
|
30103
|
-
var publicEventPricingSchema =
|
|
30104
|
-
|
|
30105
|
-
kind:
|
|
30106
|
-
currency:
|
|
30107
|
-
display:
|
|
30290
|
+
createdAt: z43.string(),
|
|
30291
|
+
updatedAt: z43.string()
|
|
30292
|
+
});
|
|
30293
|
+
var publicEventPricingSchema = z43.discriminatedUnion("kind", [
|
|
30294
|
+
z43.object({
|
|
30295
|
+
kind: z43.literal("drop_in"),
|
|
30296
|
+
currency: z43.string(),
|
|
30297
|
+
display: z43.object({ kind: z43.literal("free"), currency: z43.string() })
|
|
30108
30298
|
}),
|
|
30109
|
-
|
|
30110
|
-
kind:
|
|
30111
|
-
currency:
|
|
30112
|
-
display:
|
|
30299
|
+
z43.object({
|
|
30300
|
+
kind: z43.literal("free_registration"),
|
|
30301
|
+
currency: z43.string(),
|
|
30302
|
+
display: z43.object({ kind: z43.literal("free"), currency: z43.string() })
|
|
30113
30303
|
}),
|
|
30114
|
-
|
|
30115
|
-
kind:
|
|
30116
|
-
amount:
|
|
30117
|
-
currency:
|
|
30118
|
-
display:
|
|
30304
|
+
z43.object({
|
|
30305
|
+
kind: z43.literal("single_paid"),
|
|
30306
|
+
amount: z43.number(),
|
|
30307
|
+
currency: z43.string(),
|
|
30308
|
+
display: z43.object({ kind: z43.literal("exact"), amount: z43.number(), currency: z43.string() })
|
|
30119
30309
|
}),
|
|
30120
|
-
|
|
30121
|
-
kind:
|
|
30122
|
-
currency:
|
|
30123
|
-
ticketTypes:
|
|
30310
|
+
z43.object({
|
|
30311
|
+
kind: z43.literal("ticket_types"),
|
|
30312
|
+
currency: z43.string(),
|
|
30313
|
+
ticketTypes: z43.array(publicEventTicketTypeSchema),
|
|
30124
30314
|
display: publicEventTicketTypePriceDisplaySchema
|
|
30125
30315
|
}),
|
|
30126
|
-
|
|
30127
|
-
kind:
|
|
30128
|
-
display:
|
|
30316
|
+
z43.object({
|
|
30317
|
+
kind: z43.literal("course"),
|
|
30318
|
+
display: z43.object({ kind: z43.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
30129
30319
|
})
|
|
30130
30320
|
]);
|
|
30131
|
-
var publicTeamMemberSummarySchema =
|
|
30132
|
-
id:
|
|
30133
|
-
name:
|
|
30134
|
-
roleLabel:
|
|
30135
|
-
summary:
|
|
30136
|
-
profilePath:
|
|
30321
|
+
var publicTeamMemberSummarySchema = z43.object({
|
|
30322
|
+
id: z43.string(),
|
|
30323
|
+
name: z43.string(),
|
|
30324
|
+
roleLabel: z43.string().nullable(),
|
|
30325
|
+
summary: z43.string().nullable(),
|
|
30326
|
+
profilePath: z43.string().nullable()
|
|
30137
30327
|
});
|
|
30138
|
-
var publicEventSchema =
|
|
30139
|
-
kind:
|
|
30328
|
+
var publicEventSchema = z43.object({
|
|
30329
|
+
kind: z43.enum(["event", "course_session"]).optional(),
|
|
30140
30330
|
eventPreset: eventPresetSchema.optional(),
|
|
30141
30331
|
eventDestinationMode: eventDestinationModeSchema.optional(),
|
|
30142
30332
|
scheduleScope: eventScheduleScopeSchema.optional(),
|
|
30143
|
-
id:
|
|
30144
|
-
occurrenceId:
|
|
30145
|
-
seriesId:
|
|
30146
|
-
title:
|
|
30147
|
-
description:
|
|
30148
|
-
|
|
30149
|
-
|
|
30150
|
-
|
|
30333
|
+
id: z43.string(),
|
|
30334
|
+
occurrenceId: z43.string(),
|
|
30335
|
+
seriesId: z43.string(),
|
|
30336
|
+
title: z43.string(),
|
|
30337
|
+
description: z43.string().nullable(),
|
|
30338
|
+
content: z43.object({
|
|
30339
|
+
body: RichTextDocSchema.nullable().optional()
|
|
30340
|
+
}).optional(),
|
|
30341
|
+
presentation: z43.object({
|
|
30342
|
+
cardTitleOverride: z43.string().nullable().optional(),
|
|
30343
|
+
summary: z43.string().nullable().optional(),
|
|
30151
30344
|
image: mediaSchema2.nullable().optional()
|
|
30152
30345
|
}).optional(),
|
|
30153
|
-
slug:
|
|
30154
|
-
path:
|
|
30155
|
-
requiresRegistration:
|
|
30156
|
-
deliveryMode:
|
|
30157
|
-
attendanceModes:
|
|
30158
|
-
startsAt:
|
|
30159
|
-
endsAt:
|
|
30160
|
-
capacity:
|
|
30161
|
-
registeredCount:
|
|
30162
|
-
availableSpots:
|
|
30163
|
-
waitlistEnabled:
|
|
30346
|
+
slug: z43.string(),
|
|
30347
|
+
path: z43.string(),
|
|
30348
|
+
requiresRegistration: z43.boolean(),
|
|
30349
|
+
deliveryMode: z43.enum(["in_person", "online", "hybrid"]),
|
|
30350
|
+
attendanceModes: z43.array(publicEventAttendanceModeAvailabilitySchema),
|
|
30351
|
+
startsAt: z43.string(),
|
|
30352
|
+
endsAt: z43.string(),
|
|
30353
|
+
capacity: z43.number().nullable(),
|
|
30354
|
+
registeredCount: z43.number(),
|
|
30355
|
+
availableSpots: z43.number().nullable(),
|
|
30356
|
+
waitlistEnabled: z43.boolean(),
|
|
30164
30357
|
venue: eventVenueSchema.nullable(),
|
|
30165
30358
|
eventCategory: eventCategorySchema.nullable(),
|
|
30166
|
-
teamMembers:
|
|
30167
|
-
status:
|
|
30168
|
-
timeZone:
|
|
30359
|
+
teamMembers: z43.array(publicTeamMemberSummarySchema).optional(),
|
|
30360
|
+
status: z43.enum(["active", "draft", "archived"]).optional(),
|
|
30361
|
+
timeZone: z43.string(),
|
|
30169
30362
|
pricing: publicEventPricingSchema,
|
|
30170
30363
|
paymentTerms: blockBookingPaymentTermsSchema,
|
|
30171
30364
|
accessRestriction: accessRestrictionSchema,
|
|
30172
|
-
allowedCategoryIds:
|
|
30173
|
-
requireGuestDetails:
|
|
30174
|
-
acceptsPasses:
|
|
30175
|
-
acceptsMemberships:
|
|
30176
|
-
course:
|
|
30177
|
-
id:
|
|
30365
|
+
allowedCategoryIds: z43.array(z43.string()),
|
|
30366
|
+
requireGuestDetails: z43.boolean().optional(),
|
|
30367
|
+
acceptsPasses: z43.boolean().optional(),
|
|
30368
|
+
acceptsMemberships: z43.boolean().optional(),
|
|
30369
|
+
course: z43.object({
|
|
30370
|
+
id: z43.string(),
|
|
30178
30371
|
pricing: coursePricingSchema.optional(),
|
|
30179
|
-
priceCents:
|
|
30180
|
-
currency:
|
|
30181
|
-
enrollmentOpen:
|
|
30372
|
+
priceCents: z43.number().nullable(),
|
|
30373
|
+
currency: z43.string(),
|
|
30374
|
+
enrollmentOpen: z43.boolean()
|
|
30182
30375
|
}).nullable().optional()
|
|
30183
30376
|
});
|
|
30184
|
-
var publicEventsArraySchema =
|
|
30377
|
+
var publicEventsArraySchema = z43.array(publicEventSchema);
|
|
30185
30378
|
|
|
30186
30379
|
// ../blocks/src/system/blocks/events/shared/fields.ts
|
|
30187
30380
|
var cardVariantOptions2 = cardVariantRoleValues.map((value) => ({
|
|
@@ -30385,19 +30578,19 @@ function normalizeEventStaffMemberId(value) {
|
|
|
30385
30578
|
}
|
|
30386
30579
|
|
|
30387
30580
|
// ../blocks/src/system/blocks/event-registration.shared.ts
|
|
30388
|
-
import { z as
|
|
30389
|
-
var occurrenceContextSchema =
|
|
30390
|
-
id:
|
|
30391
|
-
seriesId:
|
|
30392
|
-
startsAt:
|
|
30393
|
-
endsAt:
|
|
30394
|
-
timeZone:
|
|
30395
|
-
capacityOverride:
|
|
30396
|
-
overrides:
|
|
30581
|
+
import { z as z44 } from "zod";
|
|
30582
|
+
var occurrenceContextSchema = z44.object({
|
|
30583
|
+
id: z44.string(),
|
|
30584
|
+
seriesId: z44.string(),
|
|
30585
|
+
startsAt: z44.string(),
|
|
30586
|
+
endsAt: z44.string(),
|
|
30587
|
+
timeZone: z44.string(),
|
|
30588
|
+
capacityOverride: z44.number().nullable().optional(),
|
|
30589
|
+
overrides: z44.record(z44.string(), z44.unknown()).nullable().optional()
|
|
30397
30590
|
}).nullable();
|
|
30398
30591
|
|
|
30399
30592
|
// ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
30400
|
-
import { z as
|
|
30593
|
+
import { z as z46 } from "zod";
|
|
30401
30594
|
|
|
30402
30595
|
// ../blocks/src/system/constants/events.ts
|
|
30403
30596
|
var EVENT_CONTENT_TYPE_SLUGS = ["event", "events"];
|
|
@@ -30495,10 +30688,21 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
30495
30688
|
amount: readAmount(value.amount) ?? 0,
|
|
30496
30689
|
currency: displayCurrency
|
|
30497
30690
|
} : { kind: "unavailable", currency };
|
|
30691
|
+
case "range": {
|
|
30692
|
+
const minAmount = readAmount(value.minAmount);
|
|
30693
|
+
const maxAmount = readAmount(value.maxAmount);
|
|
30694
|
+
return minAmount !== null && maxAmount !== null ? {
|
|
30695
|
+
kind: "range",
|
|
30696
|
+
minAmount,
|
|
30697
|
+
maxAmount,
|
|
30698
|
+
currency: displayCurrency
|
|
30699
|
+
} : { kind: "unavailable", currency };
|
|
30700
|
+
}
|
|
30498
30701
|
case "mixed":
|
|
30499
30702
|
return readAmount(value.paidFromAmount) !== null ? {
|
|
30500
30703
|
kind: "mixed",
|
|
30501
30704
|
paidFromAmount: readAmount(value.paidFromAmount) ?? 0,
|
|
30705
|
+
paidToAmount: readAmount(value.paidToAmount) ?? readAmount(value.paidFromAmount) ?? 0,
|
|
30502
30706
|
currency: displayCurrency
|
|
30503
30707
|
} : { kind: "unavailable", currency };
|
|
30504
30708
|
case "unavailable":
|
|
@@ -30540,16 +30744,16 @@ function readAmount(value) {
|
|
|
30540
30744
|
}
|
|
30541
30745
|
|
|
30542
30746
|
// ../blocks/src/system/runtime/nodes/shared/contract-schemas.ts
|
|
30543
|
-
import { z as
|
|
30544
|
-
var previewStageSchema =
|
|
30545
|
-
var registrationButtonVariantSchema =
|
|
30546
|
-
var eventButtonVariantSchema =
|
|
30547
|
-
var eventLayoutSchema =
|
|
30548
|
-
var eventCalendarDisplayModeSchema =
|
|
30549
|
-
var columnOptionSchema =
|
|
30550
|
-
var weekStartSchema =
|
|
30551
|
-
var filterAutoShowSchema =
|
|
30552
|
-
var calendarTabViewsSchema =
|
|
30747
|
+
import { z as z45 } from "zod";
|
|
30748
|
+
var previewStageSchema = z45.enum(["preview", "published"]);
|
|
30749
|
+
var registrationButtonVariantSchema = z45.enum(["primary", "secondary", "outline"]);
|
|
30750
|
+
var eventButtonVariantSchema = z45.enum(["primary", "secondary", "outline", "link"]);
|
|
30751
|
+
var eventLayoutSchema = z45.enum(eventCalendarListLayoutValues);
|
|
30752
|
+
var eventCalendarDisplayModeSchema = z45.enum(eventCalendarDisplayModeValues);
|
|
30753
|
+
var columnOptionSchema = z45.enum(["2", "3", "4"]);
|
|
30754
|
+
var weekStartSchema = z45.enum(["sunday", "monday"]);
|
|
30755
|
+
var filterAutoShowSchema = z45.enum(["auto", "always", "never"]);
|
|
30756
|
+
var calendarTabViewsSchema = z45.enum(["both", "month", "week"]);
|
|
30553
30757
|
|
|
30554
30758
|
// ../blocks/src/system/runtime/nodes/event-registration/wizardSteps.ts
|
|
30555
30759
|
function getWizardStepsForContext(hasPreSelectedContext, needsPaymentStep) {
|
|
@@ -30609,66 +30813,68 @@ function toRegistrationEvents(events) {
|
|
|
30609
30813
|
// ../blocks/src/system/runtime/nodes/event-registration.interactive.ts
|
|
30610
30814
|
var EVENT_REGISTRATION_GENERIC_SHELL_STEP_LABELS = ["Date", "Tickets", "Details"];
|
|
30611
30815
|
var EVENT_REGISTRATION_SHELL_STEP_LABELS = ["Event", "Date", "Tickets", "Details", "Payment"];
|
|
30612
|
-
var contentEntrySchema =
|
|
30613
|
-
id:
|
|
30614
|
-
slug:
|
|
30615
|
-
contentTypeSlug:
|
|
30816
|
+
var contentEntrySchema = z46.object({
|
|
30817
|
+
id: z46.string(),
|
|
30818
|
+
slug: z46.string(),
|
|
30819
|
+
contentTypeSlug: z46.string()
|
|
30616
30820
|
});
|
|
30617
|
-
var eventRegistrationPublicEventSchema =
|
|
30821
|
+
var eventRegistrationPublicEventSchema = z46.preprocess(
|
|
30618
30822
|
normalizeEventRegistrationEventInput,
|
|
30619
30823
|
publicEventSchema
|
|
30620
30824
|
);
|
|
30621
|
-
var eventRegistrationSourceSchema =
|
|
30622
|
-
siteId:
|
|
30623
|
-
apiBaseUrl:
|
|
30624
|
-
portalToken:
|
|
30625
|
-
previewToken:
|
|
30825
|
+
var eventRegistrationSourceSchema = z46.object({
|
|
30826
|
+
siteId: z46.string().optional(),
|
|
30827
|
+
apiBaseUrl: z46.string().optional(),
|
|
30828
|
+
portalToken: z46.string().nullable().optional(),
|
|
30829
|
+
previewToken: z46.string().nullable().optional(),
|
|
30626
30830
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
30627
30831
|
contentEntry: contentEntrySchema.nullable().optional(),
|
|
30628
|
-
events:
|
|
30629
|
-
className:
|
|
30630
|
-
buttonText:
|
|
30631
|
-
maxTickets:
|
|
30632
|
-
showVenue:
|
|
30633
|
-
showCapacity:
|
|
30634
|
-
successMessage:
|
|
30635
|
-
waitlistMessage:
|
|
30832
|
+
events: z46.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
30833
|
+
className: z46.string().nullable().optional(),
|
|
30834
|
+
buttonText: z46.string().nullable().optional(),
|
|
30835
|
+
maxTickets: z46.string().nullable().optional(),
|
|
30836
|
+
showVenue: z46.boolean().optional(),
|
|
30837
|
+
showCapacity: z46.boolean().optional(),
|
|
30838
|
+
successMessage: z46.string().optional(),
|
|
30839
|
+
waitlistMessage: z46.string().optional(),
|
|
30636
30840
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
30637
|
-
|
|
30841
|
+
overlayEnabled: z46.boolean().optional(),
|
|
30842
|
+
spamProtectionEnabled: z46.boolean().optional(),
|
|
30638
30843
|
stage: previewStageSchema.optional(),
|
|
30639
|
-
supportEmail:
|
|
30640
|
-
});
|
|
30641
|
-
var eventRegistrationDisplaySchema =
|
|
30642
|
-
kind:
|
|
30643
|
-
state:
|
|
30644
|
-
className:
|
|
30645
|
-
titleText:
|
|
30646
|
-
bodyText:
|
|
30647
|
-
stepLabels:
|
|
30648
|
-
summaryButtonText:
|
|
30649
|
-
});
|
|
30650
|
-
var eventRegistrationHydrationSchema =
|
|
30844
|
+
supportEmail: z46.string().optional()
|
|
30845
|
+
});
|
|
30846
|
+
var eventRegistrationDisplaySchema = z46.object({
|
|
30847
|
+
kind: z46.literal("event-registration"),
|
|
30848
|
+
state: z46.literal("generic-shell"),
|
|
30849
|
+
className: z46.string().nullable(),
|
|
30850
|
+
titleText: z46.string(),
|
|
30851
|
+
bodyText: z46.string(),
|
|
30852
|
+
stepLabels: z46.array(z46.enum(EVENT_REGISTRATION_SHELL_STEP_LABELS)).min(1),
|
|
30853
|
+
summaryButtonText: z46.string()
|
|
30854
|
+
});
|
|
30855
|
+
var eventRegistrationHydrationSchema = z46.object({
|
|
30651
30856
|
occurrenceContext: occurrenceContextSchema.optional(),
|
|
30652
30857
|
contentEntry: contentEntrySchema.nullable().optional(),
|
|
30653
|
-
events:
|
|
30654
|
-
maxTickets:
|
|
30655
|
-
showVenue:
|
|
30656
|
-
showCapacity:
|
|
30657
|
-
successMessage:
|
|
30658
|
-
waitlistMessage:
|
|
30858
|
+
events: z46.array(eventRegistrationPublicEventSchema).nullable().optional(),
|
|
30859
|
+
maxTickets: z46.string().optional(),
|
|
30860
|
+
showVenue: z46.boolean().optional(),
|
|
30861
|
+
showCapacity: z46.boolean().optional(),
|
|
30862
|
+
successMessage: z46.string().optional(),
|
|
30863
|
+
waitlistMessage: z46.string().optional(),
|
|
30659
30864
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
30660
|
-
|
|
30661
|
-
|
|
30865
|
+
overlayEnabled: z46.boolean().optional(),
|
|
30866
|
+
spamProtectionEnabled: z46.boolean().optional(),
|
|
30867
|
+
supportEmail: z46.string().optional()
|
|
30662
30868
|
});
|
|
30663
|
-
var eventRegistrationRenderSchema =
|
|
30869
|
+
var eventRegistrationRenderSchema = z46.object({
|
|
30664
30870
|
display: eventRegistrationDisplaySchema,
|
|
30665
30871
|
hydration: eventRegistrationHydrationSchema
|
|
30666
30872
|
});
|
|
30667
|
-
var eventRegistrationIslandMetaCodec = createZodCodec(
|
|
30668
|
-
siteId:
|
|
30669
|
-
apiBaseUrl:
|
|
30670
|
-
portalToken:
|
|
30671
|
-
previewToken:
|
|
30873
|
+
var eventRegistrationIslandMetaCodec = createZodCodec(z46.object({
|
|
30874
|
+
siteId: z46.string().optional(),
|
|
30875
|
+
apiBaseUrl: z46.string().optional(),
|
|
30876
|
+
portalToken: z46.string().nullable().optional(),
|
|
30877
|
+
previewToken: z46.string().nullable().optional(),
|
|
30672
30878
|
stage: previewStageSchema.optional()
|
|
30673
30879
|
}));
|
|
30674
30880
|
var eventRegistrationIslandMetaKeys = defineInteractiveIslandMetaKeys(
|
|
@@ -30772,6 +30978,7 @@ var eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
30772
30978
|
successMessage: source.successMessage,
|
|
30773
30979
|
waitlistMessage: source.waitlistMessage,
|
|
30774
30980
|
buttonVariant: source.buttonVariant,
|
|
30981
|
+
overlayEnabled: source.overlayEnabled,
|
|
30775
30982
|
spamProtectionEnabled: source.spamProtectionEnabled,
|
|
30776
30983
|
supportEmail: source.supportEmail
|
|
30777
30984
|
}
|
|
@@ -30947,6 +31154,12 @@ var eventRegistrationManifest = createBlockManifest({
|
|
|
30947
31154
|
buttonVariant: {
|
|
30948
31155
|
$bind: { from: "content.buttonVariant", fallback: "primary" }
|
|
30949
31156
|
},
|
|
31157
|
+
overlayEnabled: {
|
|
31158
|
+
$bind: {
|
|
31159
|
+
from: "$root.eventRegistrationOverlayEnabled",
|
|
31160
|
+
fallback: false
|
|
31161
|
+
}
|
|
31162
|
+
},
|
|
30950
31163
|
// Event data from loader
|
|
30951
31164
|
events: { $bind: { from: "data.events" } },
|
|
30952
31165
|
// Stage for preview mode (allows registering for draft events)
|
|
@@ -30967,7 +31180,7 @@ var eventRegistrationBlockDefinition = {
|
|
|
30967
31180
|
manifest: eventRegistrationManifest,
|
|
30968
31181
|
runtime: eventRegistrationBlockRuntime,
|
|
30969
31182
|
dataSchemas: {
|
|
30970
|
-
events:
|
|
31183
|
+
events: z47.array(publicEventSchema).optional(),
|
|
30971
31184
|
occurrenceContext: occurrenceContextSchema.optional()
|
|
30972
31185
|
},
|
|
30973
31186
|
dataLoaders: {
|
|
@@ -30991,73 +31204,73 @@ var eventRegistrationBlockDefinition = {
|
|
|
30991
31204
|
};
|
|
30992
31205
|
|
|
30993
31206
|
// ../blocks/src/system/runtime/nodes/course-registration.interactive.ts
|
|
30994
|
-
import { z as
|
|
30995
|
-
var contentEntrySchema2 =
|
|
30996
|
-
id:
|
|
30997
|
-
slug:
|
|
30998
|
-
contentTypeSlug:
|
|
30999
|
-
});
|
|
31000
|
-
var courseEntrySubrouteContextSchema =
|
|
31001
|
-
|
|
31002
|
-
kind:
|
|
31003
|
-
run:
|
|
31004
|
-
courseId:
|
|
31005
|
-
seriesId:
|
|
31006
|
-
runSlug:
|
|
31007
|
-
runName:
|
|
31207
|
+
import { z as z48 } from "zod";
|
|
31208
|
+
var contentEntrySchema2 = z48.object({
|
|
31209
|
+
id: z48.string(),
|
|
31210
|
+
slug: z48.string(),
|
|
31211
|
+
contentTypeSlug: z48.string()
|
|
31212
|
+
});
|
|
31213
|
+
var courseEntrySubrouteContextSchema = z48.union([
|
|
31214
|
+
z48.object({
|
|
31215
|
+
kind: z48.literal("course-run"),
|
|
31216
|
+
run: z48.object({
|
|
31217
|
+
courseId: z48.string(),
|
|
31218
|
+
seriesId: z48.string(),
|
|
31219
|
+
runSlug: z48.string(),
|
|
31220
|
+
runName: z48.string().nullable()
|
|
31008
31221
|
})
|
|
31009
31222
|
}),
|
|
31010
|
-
|
|
31011
|
-
kind:
|
|
31223
|
+
z48.object({
|
|
31224
|
+
kind: z48.literal("event-occurrence"),
|
|
31012
31225
|
occurrence: occurrenceContextSchema
|
|
31013
31226
|
})
|
|
31014
31227
|
]);
|
|
31015
|
-
var courseRegistrationSourceSchema =
|
|
31016
|
-
siteId:
|
|
31017
|
-
apiBaseUrl:
|
|
31018
|
-
portalToken:
|
|
31228
|
+
var courseRegistrationSourceSchema = z48.object({
|
|
31229
|
+
siteId: z48.string().optional(),
|
|
31230
|
+
apiBaseUrl: z48.string().optional(),
|
|
31231
|
+
portalToken: z48.string().nullable().optional(),
|
|
31019
31232
|
contentEntry: contentEntrySchema2.nullable().optional(),
|
|
31020
31233
|
entrySubrouteContext: courseEntrySubrouteContextSchema.nullable().optional(),
|
|
31021
|
-
courses:
|
|
31022
|
-
className:
|
|
31023
|
-
showSessions:
|
|
31024
|
-
showPrice:
|
|
31025
|
-
showCapacity:
|
|
31026
|
-
showVenue:
|
|
31027
|
-
successMessage:
|
|
31028
|
-
waitlistMessage:
|
|
31029
|
-
membershipMessage:
|
|
31030
|
-
buttonText:
|
|
31234
|
+
courses: z48.array(publicCourseSchema).nullable().optional(),
|
|
31235
|
+
className: z48.string().nullable().optional(),
|
|
31236
|
+
showSessions: z48.boolean().optional(),
|
|
31237
|
+
showPrice: z48.boolean().optional(),
|
|
31238
|
+
showCapacity: z48.boolean().optional(),
|
|
31239
|
+
showVenue: z48.boolean().optional(),
|
|
31240
|
+
successMessage: z48.string().optional(),
|
|
31241
|
+
waitlistMessage: z48.string().optional(),
|
|
31242
|
+
membershipMessage: z48.string().optional(),
|
|
31243
|
+
buttonText: z48.string().nullable().optional(),
|
|
31031
31244
|
buttonVariant: registrationButtonVariantSchema.optional(),
|
|
31032
31245
|
stage: previewStageSchema.optional()
|
|
31033
31246
|
});
|
|
31034
|
-
var courseRegistrationDisplaySchema =
|
|
31035
|
-
kind:
|
|
31036
|
-
state:
|
|
31037
|
-
className:
|
|
31038
|
-
summaryButtonText:
|
|
31247
|
+
var courseRegistrationDisplaySchema = z48.object({
|
|
31248
|
+
kind: z48.literal("course-registration"),
|
|
31249
|
+
state: z48.literal("shell"),
|
|
31250
|
+
className: z48.string().nullable(),
|
|
31251
|
+
summaryButtonText: z48.string()
|
|
31039
31252
|
});
|
|
31040
|
-
var courseRegistrationHydrationSchema =
|
|
31253
|
+
var courseRegistrationHydrationSchema = z48.object({
|
|
31041
31254
|
contentEntry: contentEntrySchema2.nullable().optional(),
|
|
31042
31255
|
entrySubrouteContext: courseEntrySubrouteContextSchema.nullable().optional(),
|
|
31043
|
-
courses:
|
|
31044
|
-
showSessions:
|
|
31045
|
-
showPrice:
|
|
31046
|
-
showCapacity:
|
|
31047
|
-
showVenue:
|
|
31048
|
-
successMessage:
|
|
31049
|
-
waitlistMessage:
|
|
31050
|
-
membershipMessage:
|
|
31256
|
+
courses: z48.array(publicCourseSchema).nullable().optional(),
|
|
31257
|
+
showSessions: z48.boolean().optional(),
|
|
31258
|
+
showPrice: z48.boolean().optional(),
|
|
31259
|
+
showCapacity: z48.boolean().optional(),
|
|
31260
|
+
showVenue: z48.boolean().optional(),
|
|
31261
|
+
successMessage: z48.string().optional(),
|
|
31262
|
+
waitlistMessage: z48.string().optional(),
|
|
31263
|
+
membershipMessage: z48.string().optional(),
|
|
31051
31264
|
buttonVariant: registrationButtonVariantSchema.optional()
|
|
31052
31265
|
});
|
|
31053
|
-
var courseRegistrationRenderSchema =
|
|
31266
|
+
var courseRegistrationRenderSchema = z48.object({
|
|
31054
31267
|
display: courseRegistrationDisplaySchema,
|
|
31055
31268
|
hydration: courseRegistrationHydrationSchema
|
|
31056
31269
|
});
|
|
31057
|
-
var courseRegistrationIslandMetaCodec = createZodCodec(
|
|
31058
|
-
siteId:
|
|
31059
|
-
apiBaseUrl:
|
|
31060
|
-
portalToken:
|
|
31270
|
+
var courseRegistrationIslandMetaCodec = createZodCodec(z48.object({
|
|
31271
|
+
siteId: z48.string().optional(),
|
|
31272
|
+
apiBaseUrl: z48.string().optional(),
|
|
31273
|
+
portalToken: z48.string().nullable().optional(),
|
|
31061
31274
|
stage: previewStageSchema.optional()
|
|
31062
31275
|
}));
|
|
31063
31276
|
var courseRegistrationIslandMetaKeys = defineInteractiveIslandMetaKeys(
|
|
@@ -31317,32 +31530,32 @@ var courseRegistrationBlockDefinition = {
|
|
|
31317
31530
|
};
|
|
31318
31531
|
|
|
31319
31532
|
// ../blocks/src/system/blocks/event-details.ts
|
|
31320
|
-
import { z as
|
|
31533
|
+
import { z as z50 } from "zod";
|
|
31321
31534
|
|
|
31322
31535
|
// ../blocks/src/system/blocks/shop.shared.ts
|
|
31323
|
-
import { z as
|
|
31324
|
-
var publicPassProductSchema =
|
|
31325
|
-
id:
|
|
31326
|
-
productUseCase:
|
|
31327
|
-
name:
|
|
31328
|
-
description:
|
|
31329
|
-
price:
|
|
31330
|
-
currency:
|
|
31331
|
-
creditsTotal:
|
|
31332
|
-
pricePerCredit:
|
|
31333
|
-
validDays:
|
|
31334
|
-
eligibleCategoryIds:
|
|
31335
|
-
eligibleCategoryNames:
|
|
31336
|
-
});
|
|
31337
|
-
var publicMembershipProductSchema =
|
|
31338
|
-
id:
|
|
31339
|
-
name:
|
|
31340
|
-
description:
|
|
31341
|
-
price:
|
|
31342
|
-
currency:
|
|
31343
|
-
billingInterval:
|
|
31344
|
-
eligibleCategoryIds:
|
|
31345
|
-
eligibleCategoryNames:
|
|
31536
|
+
import { z as z49 } from "zod";
|
|
31537
|
+
var publicPassProductSchema = z49.object({
|
|
31538
|
+
id: z49.string(),
|
|
31539
|
+
productUseCase: z49.enum(["event_pass", "appointment_package"]).default("event_pass"),
|
|
31540
|
+
name: z49.string(),
|
|
31541
|
+
description: z49.string().nullable(),
|
|
31542
|
+
price: z49.number(),
|
|
31543
|
+
currency: z49.string(),
|
|
31544
|
+
creditsTotal: z49.number(),
|
|
31545
|
+
pricePerCredit: z49.number(),
|
|
31546
|
+
validDays: z49.number().nullable(),
|
|
31547
|
+
eligibleCategoryIds: z49.array(z49.string()),
|
|
31548
|
+
eligibleCategoryNames: z49.array(z49.string())
|
|
31549
|
+
});
|
|
31550
|
+
var publicMembershipProductSchema = z49.object({
|
|
31551
|
+
id: z49.string(),
|
|
31552
|
+
name: z49.string(),
|
|
31553
|
+
description: z49.string().nullable(),
|
|
31554
|
+
price: z49.number(),
|
|
31555
|
+
currency: z49.string(),
|
|
31556
|
+
billingInterval: z49.enum(["month", "year"]),
|
|
31557
|
+
eligibleCategoryIds: z49.array(z49.string()),
|
|
31558
|
+
eligibleCategoryNames: z49.array(z49.string())
|
|
31346
31559
|
});
|
|
31347
31560
|
|
|
31348
31561
|
// ../blocks/src/system/blocks/event-details.ts
|
|
@@ -31477,40 +31690,40 @@ var eventDetailsManifest = createBlockManifest({
|
|
|
31477
31690
|
})
|
|
31478
31691
|
]
|
|
31479
31692
|
});
|
|
31480
|
-
var occurrenceContextSchema2 =
|
|
31481
|
-
id:
|
|
31482
|
-
seriesId:
|
|
31483
|
-
startsAt:
|
|
31484
|
-
endsAt:
|
|
31485
|
-
timeZone:
|
|
31486
|
-
capacityOverride:
|
|
31487
|
-
overrides:
|
|
31693
|
+
var occurrenceContextSchema2 = z50.object({
|
|
31694
|
+
id: z50.string(),
|
|
31695
|
+
seriesId: z50.string(),
|
|
31696
|
+
startsAt: z50.string(),
|
|
31697
|
+
endsAt: z50.string(),
|
|
31698
|
+
timeZone: z50.string(),
|
|
31699
|
+
capacityOverride: z50.number().nullable().optional(),
|
|
31700
|
+
overrides: z50.record(z50.string(), z50.unknown()).nullable().optional()
|
|
31488
31701
|
}).nullable();
|
|
31489
|
-
var eventAutoApplyDiscountPreviewBaseSchema =
|
|
31490
|
-
id:
|
|
31491
|
-
publicLabel:
|
|
31492
|
-
description:
|
|
31493
|
-
minTicketsRequired:
|
|
31702
|
+
var eventAutoApplyDiscountPreviewBaseSchema = z50.object({
|
|
31703
|
+
id: z50.string(),
|
|
31704
|
+
publicLabel: z50.string(),
|
|
31705
|
+
description: z50.string().nullable(),
|
|
31706
|
+
minTicketsRequired: z50.number().nullable()
|
|
31494
31707
|
});
|
|
31495
|
-
var eventAutoApplyDiscountPreviewSchema =
|
|
31708
|
+
var eventAutoApplyDiscountPreviewSchema = z50.discriminatedUnion("discountType", [
|
|
31496
31709
|
eventAutoApplyDiscountPreviewBaseSchema.extend({
|
|
31497
|
-
discountType:
|
|
31498
|
-
discountPercent:
|
|
31499
|
-
discountAmountCents:
|
|
31710
|
+
discountType: z50.literal("percent"),
|
|
31711
|
+
discountPercent: z50.number(),
|
|
31712
|
+
discountAmountCents: z50.null()
|
|
31500
31713
|
}),
|
|
31501
31714
|
eventAutoApplyDiscountPreviewBaseSchema.extend({
|
|
31502
|
-
discountType:
|
|
31503
|
-
discountPercent:
|
|
31504
|
-
discountAmountCents:
|
|
31715
|
+
discountType: z50.literal("fixed"),
|
|
31716
|
+
discountPercent: z50.null(),
|
|
31717
|
+
discountAmountCents: z50.number()
|
|
31505
31718
|
})
|
|
31506
31719
|
]);
|
|
31507
31720
|
var eventDetailsBlockDefinition = {
|
|
31508
31721
|
manifest: eventDetailsManifest,
|
|
31509
31722
|
dataSchemas: {
|
|
31510
|
-
eventDetailsData:
|
|
31723
|
+
eventDetailsData: z50.object({
|
|
31511
31724
|
events: publicEventsArraySchema,
|
|
31512
|
-
sitePasses:
|
|
31513
|
-
siteMemberships:
|
|
31725
|
+
sitePasses: z50.object({ passes: z50.array(publicPassProductSchema) }),
|
|
31726
|
+
siteMemberships: z50.object({ memberships: z50.array(publicMembershipProductSchema) }),
|
|
31514
31727
|
autoApplyDiscount: eventAutoApplyDiscountPreviewSchema.nullable().optional().default(null)
|
|
31515
31728
|
}).optional(),
|
|
31516
31729
|
occurrenceContext: occurrenceContextSchema2.optional()
|
|
@@ -31834,7 +32047,7 @@ var eventSpotlightBlockDefinition = {
|
|
|
31834
32047
|
};
|
|
31835
32048
|
|
|
31836
32049
|
// ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
31837
|
-
import { z as
|
|
32050
|
+
import { z as z52 } from "zod";
|
|
31838
32051
|
|
|
31839
32052
|
// ../blocks/src/system/runtime/nodes/events/shared/utils.ts
|
|
31840
32053
|
var COLUMN_CLASSES = {
|
|
@@ -31942,16 +32155,16 @@ function computeMediaTransformStyle(value, style, targetAspectRatio, options) {
|
|
|
31942
32155
|
}
|
|
31943
32156
|
|
|
31944
32157
|
// ../blocks/src/system/runtime/nodes/events/shared/listOptions.ts
|
|
31945
|
-
import { z as
|
|
32158
|
+
import { z as z51 } from "zod";
|
|
31946
32159
|
var eventPageSizeValues = [3, 6, 10, 12, 20, 24, 30];
|
|
31947
|
-
var eventPageSizeSchema =
|
|
31948
|
-
|
|
31949
|
-
|
|
31950
|
-
|
|
31951
|
-
|
|
31952
|
-
|
|
31953
|
-
|
|
31954
|
-
|
|
32160
|
+
var eventPageSizeSchema = z51.union([
|
|
32161
|
+
z51.literal(3),
|
|
32162
|
+
z51.literal(6),
|
|
32163
|
+
z51.literal(10),
|
|
32164
|
+
z51.literal(12),
|
|
32165
|
+
z51.literal(20),
|
|
32166
|
+
z51.literal(24),
|
|
32167
|
+
z51.literal(30)
|
|
31955
32168
|
]);
|
|
31956
32169
|
var eventPageSizeSet = new Set(eventPageSizeValues);
|
|
31957
32170
|
function resolveEventPageSize(value, fallback = 12) {
|
|
@@ -31961,15 +32174,15 @@ function resolveEventPageSize(value, fallback = 12) {
|
|
|
31961
32174
|
function resolveEventCalendarListPageSize(input) {
|
|
31962
32175
|
return resolveEventPageSize(input.eventsPerPage);
|
|
31963
32176
|
}
|
|
31964
|
-
var eventListPaginationActionSchema =
|
|
31965
|
-
|
|
31966
|
-
kind:
|
|
31967
|
-
label:
|
|
32177
|
+
var eventListPaginationActionSchema = z51.discriminatedUnion("kind", [
|
|
32178
|
+
z51.object({
|
|
32179
|
+
kind: z51.literal("loadMore"),
|
|
32180
|
+
label: z51.string()
|
|
31968
32181
|
}),
|
|
31969
|
-
|
|
31970
|
-
kind:
|
|
31971
|
-
label:
|
|
31972
|
-
href:
|
|
32182
|
+
z51.object({
|
|
32183
|
+
kind: z51.literal("seeAllLink"),
|
|
32184
|
+
label: z51.string(),
|
|
32185
|
+
href: z51.string()
|
|
31973
32186
|
})
|
|
31974
32187
|
]);
|
|
31975
32188
|
function resolveEventListPaginationAction(input) {
|
|
@@ -31982,89 +32195,89 @@ function resolveEventListPaginationAction(input) {
|
|
|
31982
32195
|
}
|
|
31983
32196
|
|
|
31984
32197
|
// ../blocks/src/system/runtime/nodes/events/EventListing.interactive.ts
|
|
31985
|
-
var legacyEventCardVariantSchema =
|
|
31986
|
-
var eventCardVariantInputSchema =
|
|
32198
|
+
var legacyEventCardVariantSchema = z52.enum(["variant1", "variant2"]);
|
|
32199
|
+
var eventCardVariantInputSchema = z52.union([
|
|
31987
32200
|
cardVariantRoleSchema,
|
|
31988
32201
|
legacyEventCardVariantSchema
|
|
31989
32202
|
]);
|
|
31990
|
-
var cardOrientationSchema =
|
|
31991
|
-
var eventBlockKindSchema =
|
|
31992
|
-
var eventSurfaceScopeSchema =
|
|
31993
|
-
var eventScheduleScopeSchema2 =
|
|
31994
|
-
var eventListingSourceSchema =
|
|
31995
|
-
events:
|
|
31996
|
-
siteId:
|
|
31997
|
-
apiBaseUrl:
|
|
32203
|
+
var cardOrientationSchema = z52.enum(["vertical", "horizontal"]);
|
|
32204
|
+
var eventBlockKindSchema = z52.enum(eventBlockKindValues);
|
|
32205
|
+
var eventSurfaceScopeSchema = z52.enum(eventSurfaceScopeValues);
|
|
32206
|
+
var eventScheduleScopeSchema2 = z52.enum(eventScheduleScopeValues);
|
|
32207
|
+
var eventListingSourceSchema = z52.object({
|
|
32208
|
+
events: z52.array(publicEventSchema).nullable().optional(),
|
|
32209
|
+
siteId: z52.string(),
|
|
32210
|
+
apiBaseUrl: z52.string().optional(),
|
|
31998
32211
|
stage: previewStageSchema.optional(),
|
|
31999
32212
|
layout: eventLayoutSchema.optional(),
|
|
32000
32213
|
columns: columnOptionSchema.optional(),
|
|
32001
|
-
eventsPerPage:
|
|
32002
|
-
paginationMode:
|
|
32003
|
-
seeAllUrl:
|
|
32004
|
-
loadMoreText:
|
|
32214
|
+
eventsPerPage: z52.string().optional(),
|
|
32215
|
+
paginationMode: z52.enum(["loadMore", "seeAllLink"]).optional(),
|
|
32216
|
+
seeAllUrl: z52.string().optional(),
|
|
32217
|
+
loadMoreText: z52.string().optional(),
|
|
32005
32218
|
cardVariant: eventCardVariantInputSchema.optional(),
|
|
32006
32219
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
32007
|
-
buttonText:
|
|
32008
|
-
showVenue:
|
|
32009
|
-
showMap:
|
|
32010
|
-
showCapacity:
|
|
32011
|
-
emptyMessage:
|
|
32012
|
-
className:
|
|
32013
|
-
showFilters:
|
|
32220
|
+
buttonText: z52.string().optional(),
|
|
32221
|
+
showVenue: z52.boolean().optional(),
|
|
32222
|
+
showMap: z52.boolean().optional(),
|
|
32223
|
+
showCapacity: z52.boolean().optional(),
|
|
32224
|
+
emptyMessage: z52.string().optional(),
|
|
32225
|
+
className: z52.string().optional(),
|
|
32226
|
+
showFilters: z52.boolean().nullable().optional(),
|
|
32014
32227
|
showCategoryFilter: filterAutoShowSchema.optional(),
|
|
32015
|
-
showVenueFilter:
|
|
32016
|
-
showStaffFilter:
|
|
32228
|
+
showVenueFilter: z52.boolean().nullable().optional(),
|
|
32229
|
+
showStaffFilter: z52.boolean().nullable().optional(),
|
|
32017
32230
|
eventKind: eventBlockKindSchema.nullable().optional(),
|
|
32018
32231
|
eventSurface: eventSurfaceScopeSchema.nullable().optional(),
|
|
32019
|
-
filterEventPresets:
|
|
32232
|
+
filterEventPresets: z52.union([z52.string(), z52.array(z52.string())]).nullable().optional(),
|
|
32020
32233
|
scheduleScope: eventScheduleScopeSchema2.nullable().optional(),
|
|
32021
|
-
filterCategoryIds:
|
|
32022
|
-
filterStaffMemberId:
|
|
32023
|
-
filterVenueId:
|
|
32234
|
+
filterCategoryIds: z52.string().nullable().optional(),
|
|
32235
|
+
filterStaffMemberId: z52.string().nullable().optional(),
|
|
32236
|
+
filterVenueId: z52.string().nullable().optional()
|
|
32024
32237
|
});
|
|
32025
|
-
var eventListingDisplaySchema =
|
|
32026
|
-
kind:
|
|
32027
|
-
state:
|
|
32238
|
+
var eventListingDisplaySchema = z52.object({
|
|
32239
|
+
kind: z52.literal("event-listing"),
|
|
32240
|
+
state: z52.enum(["loading", "empty", "ready"]),
|
|
32028
32241
|
listLayout: eventLayoutSchema,
|
|
32029
|
-
className:
|
|
32030
|
-
emptyMessage:
|
|
32031
|
-
loadingMessage:
|
|
32032
|
-
containerClass:
|
|
32242
|
+
className: z52.string().nullable(),
|
|
32243
|
+
emptyMessage: z52.string(),
|
|
32244
|
+
loadingMessage: z52.string(),
|
|
32245
|
+
containerClass: z52.string(),
|
|
32033
32246
|
cardVariant: cardVariantRoleSchema,
|
|
32034
32247
|
buttonVariant: eventButtonVariantSchema,
|
|
32035
|
-
buttonText:
|
|
32036
|
-
showVenue:
|
|
32037
|
-
showMap:
|
|
32038
|
-
showCapacity:
|
|
32248
|
+
buttonText: z52.string(),
|
|
32249
|
+
showVenue: z52.boolean(),
|
|
32250
|
+
showMap: z52.boolean(),
|
|
32251
|
+
showCapacity: z52.boolean(),
|
|
32039
32252
|
orientation: cardOrientationSchema,
|
|
32040
|
-
events:
|
|
32253
|
+
events: z52.array(publicEventSchema)
|
|
32041
32254
|
});
|
|
32042
|
-
var eventListingHydrationSchema =
|
|
32043
|
-
siteId:
|
|
32255
|
+
var eventListingHydrationSchema = z52.object({
|
|
32256
|
+
siteId: z52.string(),
|
|
32044
32257
|
stage: previewStageSchema.optional(),
|
|
32045
32258
|
eventsPerPage: eventPageSizeSchema,
|
|
32046
32259
|
paginationAction: eventListPaginationActionSchema,
|
|
32047
|
-
showFilters:
|
|
32260
|
+
showFilters: z52.boolean(),
|
|
32048
32261
|
showCategoryFilter: filterAutoShowSchema,
|
|
32049
|
-
showVenueFilter:
|
|
32050
|
-
showStaffFilter:
|
|
32262
|
+
showVenueFilter: z52.boolean(),
|
|
32263
|
+
showStaffFilter: z52.boolean(),
|
|
32051
32264
|
eventKind: eventBlockKindSchema,
|
|
32052
32265
|
eventSurface: eventSurfaceScopeSchema,
|
|
32053
|
-
filterEventPresets:
|
|
32266
|
+
filterEventPresets: z52.string().nullable(),
|
|
32054
32267
|
scheduleScope: eventScheduleScopeSchema2,
|
|
32055
|
-
filterCategoryIds:
|
|
32056
|
-
filterStaffMemberId:
|
|
32057
|
-
filterVenueId:
|
|
32058
|
-
fetchInitialEventsOnMount:
|
|
32268
|
+
filterCategoryIds: z52.string().nullable().optional(),
|
|
32269
|
+
filterStaffMemberId: z52.string().nullable().optional(),
|
|
32270
|
+
filterVenueId: z52.string().nullable().optional(),
|
|
32271
|
+
fetchInitialEventsOnMount: z52.boolean()
|
|
32059
32272
|
});
|
|
32060
|
-
var eventListingRenderSchema =
|
|
32273
|
+
var eventListingRenderSchema = z52.object({
|
|
32061
32274
|
display: eventListingDisplaySchema,
|
|
32062
32275
|
hydration: eventListingHydrationSchema
|
|
32063
32276
|
});
|
|
32064
32277
|
var eventListingIslandMetaCodec = createZodCodec(
|
|
32065
|
-
|
|
32066
|
-
siteId:
|
|
32067
|
-
apiBaseUrl:
|
|
32278
|
+
z52.object({
|
|
32279
|
+
siteId: z52.string(),
|
|
32280
|
+
apiBaseUrl: z52.string().optional(),
|
|
32068
32281
|
stage: previewStageSchema.optional()
|
|
32069
32282
|
})
|
|
32070
32283
|
);
|
|
@@ -32431,15 +32644,15 @@ var eventListingBlockDefinition = {
|
|
|
32431
32644
|
};
|
|
32432
32645
|
|
|
32433
32646
|
// ../blocks/src/system/runtime/nodes/events/EventCalendar.interactive.ts
|
|
32434
|
-
import { z as
|
|
32435
|
-
var eventBlockKindSchema2 =
|
|
32436
|
-
var eventSurfaceScopeSchema2 =
|
|
32437
|
-
var eventScheduleScopeSchema3 =
|
|
32438
|
-
var eventCalendarSourceSchema =
|
|
32647
|
+
import { z as z53 } from "zod";
|
|
32648
|
+
var eventBlockKindSchema2 = z53.enum(eventBlockKindValues);
|
|
32649
|
+
var eventSurfaceScopeSchema2 = z53.enum(eventSurfaceScopeValues);
|
|
32650
|
+
var eventScheduleScopeSchema3 = z53.enum(eventScheduleScopeValues);
|
|
32651
|
+
var eventCalendarSourceSchema = z53.object(
|
|
32439
32652
|
{
|
|
32440
|
-
events:
|
|
32441
|
-
siteId:
|
|
32442
|
-
apiBaseUrl:
|
|
32653
|
+
events: z53.array(publicEventSchema).nullable().optional(),
|
|
32654
|
+
siteId: z53.string(),
|
|
32655
|
+
apiBaseUrl: z53.string().optional(),
|
|
32443
32656
|
stage: previewStageSchema.optional(),
|
|
32444
32657
|
variant: eventCalendarDisplayModeSchema.nullable().optional(),
|
|
32445
32658
|
displayMode: eventCalendarDisplayModeSchema.nullable().optional(),
|
|
@@ -32447,78 +32660,78 @@ var eventCalendarSourceSchema = z52.object(
|
|
|
32447
32660
|
listColumns: columnOptionSchema.optional(),
|
|
32448
32661
|
layout: eventLayoutSchema.optional(),
|
|
32449
32662
|
columns: columnOptionSchema.optional(),
|
|
32450
|
-
eventsPerPage:
|
|
32451
|
-
paginationMode:
|
|
32452
|
-
seeAllUrl:
|
|
32453
|
-
loadMoreText:
|
|
32663
|
+
eventsPerPage: z53.string().optional(),
|
|
32664
|
+
paginationMode: z53.enum(["loadMore", "seeAllLink"]).optional(),
|
|
32665
|
+
seeAllUrl: z53.string().optional(),
|
|
32666
|
+
loadMoreText: z53.string().optional(),
|
|
32454
32667
|
startOfWeek: weekStartSchema.optional(),
|
|
32455
32668
|
calendarTabViews: calendarTabViewsSchema.optional(),
|
|
32456
|
-
showFilters:
|
|
32669
|
+
showFilters: z53.boolean().nullable().optional(),
|
|
32457
32670
|
showCategoryFilter: filterAutoShowSchema.optional(),
|
|
32458
|
-
showVenueFilter:
|
|
32459
|
-
showStaffFilter:
|
|
32671
|
+
showVenueFilter: z53.boolean().nullable().optional(),
|
|
32672
|
+
showStaffFilter: z53.boolean().nullable().optional(),
|
|
32460
32673
|
kind: eventBlockKindSchema2.nullable().optional(),
|
|
32461
32674
|
eventSurface: eventSurfaceScopeSchema2.nullable().optional(),
|
|
32462
|
-
filterEventPresets:
|
|
32675
|
+
filterEventPresets: z53.union([z53.string(), z53.array(z53.string())]).nullable().optional(),
|
|
32463
32676
|
scheduleScope: eventScheduleScopeSchema3.nullable().optional(),
|
|
32464
|
-
filterCategoryIds:
|
|
32465
|
-
filterStaffMemberId:
|
|
32466
|
-
filterVenueId:
|
|
32677
|
+
filterCategoryIds: z53.union([z53.string(), z53.array(z53.string())]).nullable().optional(),
|
|
32678
|
+
filterStaffMemberId: z53.string().nullable().optional(),
|
|
32679
|
+
filterVenueId: z53.string().nullable().optional(),
|
|
32467
32680
|
buttonVariant: eventButtonVariantSchema.optional(),
|
|
32468
|
-
buttonText:
|
|
32469
|
-
showVenue:
|
|
32470
|
-
showMap:
|
|
32471
|
-
showCapacity:
|
|
32472
|
-
emptyMessage:
|
|
32473
|
-
className:
|
|
32681
|
+
buttonText: z53.string().optional(),
|
|
32682
|
+
showVenue: z53.boolean().nullable().optional(),
|
|
32683
|
+
showMap: z53.boolean().nullable().optional(),
|
|
32684
|
+
showCapacity: z53.boolean().nullable().optional(),
|
|
32685
|
+
emptyMessage: z53.string().optional(),
|
|
32686
|
+
className: z53.string().optional()
|
|
32474
32687
|
}
|
|
32475
32688
|
);
|
|
32476
|
-
var eventCalendarDisplaySchema =
|
|
32477
|
-
kind:
|
|
32689
|
+
var eventCalendarDisplaySchema = z53.object({
|
|
32690
|
+
kind: z53.literal("event-calendar"),
|
|
32478
32691
|
displayMode: eventCalendarDisplayModeSchema,
|
|
32479
|
-
className:
|
|
32480
|
-
events:
|
|
32692
|
+
className: z53.string().nullable(),
|
|
32693
|
+
events: z53.array(publicEventSchema),
|
|
32481
32694
|
listLayout: eventLayoutSchema,
|
|
32482
32695
|
listColumns: columnOptionSchema,
|
|
32483
32696
|
eventsPerPage: eventPageSizeSchema,
|
|
32484
32697
|
paginationAction: eventListPaginationActionSchema,
|
|
32485
32698
|
startOfWeek: weekStartSchema,
|
|
32486
32699
|
calendarTabViews: calendarTabViewsSchema,
|
|
32487
|
-
showFilters:
|
|
32700
|
+
showFilters: z53.boolean(),
|
|
32488
32701
|
showCategoryFilter: filterAutoShowSchema,
|
|
32489
|
-
showVenueFilter:
|
|
32490
|
-
showStaffFilter:
|
|
32702
|
+
showVenueFilter: z53.boolean(),
|
|
32703
|
+
showStaffFilter: z53.boolean(),
|
|
32491
32704
|
eventKind: eventBlockKindSchema2,
|
|
32492
32705
|
eventSurface: eventSurfaceScopeSchema2,
|
|
32493
|
-
filterEventPresets:
|
|
32706
|
+
filterEventPresets: z53.string().nullable(),
|
|
32494
32707
|
scheduleScope: eventScheduleScopeSchema3,
|
|
32495
|
-
filterCategoryIds:
|
|
32496
|
-
filterStaffMemberId:
|
|
32497
|
-
filterVenueId:
|
|
32708
|
+
filterCategoryIds: z53.string().nullable(),
|
|
32709
|
+
filterStaffMemberId: z53.string().nullable(),
|
|
32710
|
+
filterVenueId: z53.string().nullable(),
|
|
32498
32711
|
buttonVariant: eventButtonVariantSchema,
|
|
32499
|
-
buttonText:
|
|
32500
|
-
showVenue:
|
|
32501
|
-
showMap:
|
|
32502
|
-
showCapacity:
|
|
32503
|
-
emptyMessage:
|
|
32504
|
-
});
|
|
32505
|
-
var eventCalendarHydrationSchema =
|
|
32506
|
-
siteId:
|
|
32712
|
+
buttonText: z53.string(),
|
|
32713
|
+
showVenue: z53.boolean(),
|
|
32714
|
+
showMap: z53.boolean(),
|
|
32715
|
+
showCapacity: z53.boolean(),
|
|
32716
|
+
emptyMessage: z53.string()
|
|
32717
|
+
});
|
|
32718
|
+
var eventCalendarHydrationSchema = z53.object({
|
|
32719
|
+
siteId: z53.string(),
|
|
32507
32720
|
stage: previewStageSchema.optional(),
|
|
32508
|
-
prefetchedEvents:
|
|
32721
|
+
prefetchedEvents: z53.boolean(),
|
|
32509
32722
|
eventKind: eventBlockKindSchema2,
|
|
32510
32723
|
eventSurface: eventSurfaceScopeSchema2,
|
|
32511
|
-
filterEventPresets:
|
|
32724
|
+
filterEventPresets: z53.string().nullable(),
|
|
32512
32725
|
scheduleScope: eventScheduleScopeSchema3
|
|
32513
32726
|
});
|
|
32514
|
-
var eventCalendarRenderSchema =
|
|
32727
|
+
var eventCalendarRenderSchema = z53.object({
|
|
32515
32728
|
display: eventCalendarDisplaySchema,
|
|
32516
32729
|
hydration: eventCalendarHydrationSchema
|
|
32517
32730
|
});
|
|
32518
32731
|
var eventCalendarIslandMetaCodec = createZodCodec(
|
|
32519
|
-
|
|
32520
|
-
siteId:
|
|
32521
|
-
apiBaseUrl:
|
|
32732
|
+
z53.object({
|
|
32733
|
+
siteId: z53.string(),
|
|
32734
|
+
apiBaseUrl: z53.string().optional(),
|
|
32522
32735
|
stage: previewStageSchema.optional()
|
|
32523
32736
|
})
|
|
32524
32737
|
);
|
|
@@ -33227,7 +33440,7 @@ var eventCalendarBlockDefinition = {
|
|
|
33227
33440
|
};
|
|
33228
33441
|
|
|
33229
33442
|
// ../blocks/src/system/blocks/offerings-preview/index.ts
|
|
33230
|
-
import { z as
|
|
33443
|
+
import { z as z54 } from "zod";
|
|
33231
33444
|
|
|
33232
33445
|
// ../blocks/src/system/blocks/offerings-preview/model.ts
|
|
33233
33446
|
var OFFERINGS_PREVIEW_DEFAULT_ITEM_LIMIT = "3";
|
|
@@ -33319,13 +33532,13 @@ function isRecord5(value) {
|
|
|
33319
33532
|
}
|
|
33320
33533
|
|
|
33321
33534
|
// ../blocks/src/system/blocks/offerings-preview/index.ts
|
|
33322
|
-
var publicRouteCandidatesSchema =
|
|
33323
|
-
routes:
|
|
33324
|
-
entityId:
|
|
33325
|
-
path:
|
|
33326
|
-
title:
|
|
33327
|
-
kind:
|
|
33328
|
-
contentTypeKey:
|
|
33535
|
+
var publicRouteCandidatesSchema = z54.object({
|
|
33536
|
+
routes: z54.array(z54.object({
|
|
33537
|
+
entityId: z54.string(),
|
|
33538
|
+
path: z54.string(),
|
|
33539
|
+
title: z54.string(),
|
|
33540
|
+
kind: z54.enum(["page", "content"]),
|
|
33541
|
+
contentTypeKey: z54.string().nullable().optional()
|
|
33329
33542
|
}))
|
|
33330
33543
|
});
|
|
33331
33544
|
var groupOverrideFields = [
|
|
@@ -33723,7 +33936,7 @@ function isRecord6(value) {
|
|
|
33723
33936
|
}
|
|
33724
33937
|
|
|
33725
33938
|
// ../blocks/src/system/blocks/embed.ts
|
|
33726
|
-
import { z as
|
|
33939
|
+
import { z as z55 } from "zod";
|
|
33727
33940
|
var embedFields = [
|
|
33728
33941
|
// Section heading
|
|
33729
33942
|
parseFieldDefinition({
|
|
@@ -33954,18 +34167,18 @@ var embedManifest = createBlockManifest({
|
|
|
33954
34167
|
spacing: "lg"
|
|
33955
34168
|
}
|
|
33956
34169
|
});
|
|
33957
|
-
var embedEntrySchema =
|
|
33958
|
-
id:
|
|
33959
|
-
identifier:
|
|
33960
|
-
title:
|
|
33961
|
-
slug:
|
|
33962
|
-
content:
|
|
33963
|
-
publishedAt:
|
|
34170
|
+
var embedEntrySchema = z55.object({
|
|
34171
|
+
id: z55.string(),
|
|
34172
|
+
identifier: z55.string(),
|
|
34173
|
+
title: z55.string(),
|
|
34174
|
+
slug: z55.string().nullable().optional(),
|
|
34175
|
+
content: z55.record(z55.string(), z55.unknown()).optional(),
|
|
34176
|
+
publishedAt: z55.string().nullable().optional()
|
|
33964
34177
|
});
|
|
33965
34178
|
var embedBlockDefinition = {
|
|
33966
34179
|
manifest: embedManifest,
|
|
33967
34180
|
dataSchemas: {
|
|
33968
|
-
entries:
|
|
34181
|
+
entries: z55.array(embedEntrySchema).optional()
|
|
33969
34182
|
},
|
|
33970
34183
|
dataLoaders: {
|
|
33971
34184
|
entries: {
|
|
@@ -35149,52 +35362,52 @@ var fileDownloadBlockDefinition = {
|
|
|
35149
35362
|
};
|
|
35150
35363
|
|
|
35151
35364
|
// ../blocks/src/system/blocks/shop.ts
|
|
35152
|
-
import { z as
|
|
35365
|
+
import { z as z59 } from "zod";
|
|
35153
35366
|
|
|
35154
35367
|
// ../blocks/src/system/runtime/nodes/shop.interactive.ts
|
|
35155
|
-
import { z as
|
|
35368
|
+
import { z as z58 } from "zod";
|
|
35156
35369
|
|
|
35157
35370
|
// ../blocks/src/system/blocks/products/shared.ts
|
|
35158
|
-
import { z as
|
|
35159
|
-
var publicProductVariantSchema =
|
|
35160
|
-
id:
|
|
35161
|
-
title:
|
|
35162
|
-
sku:
|
|
35163
|
-
priceCents:
|
|
35164
|
-
stockQuantity:
|
|
35165
|
-
soldOut:
|
|
35166
|
-
});
|
|
35167
|
-
var publicProductSchema =
|
|
35168
|
-
id:
|
|
35169
|
-
contentEntryId:
|
|
35170
|
-
title:
|
|
35171
|
-
slug:
|
|
35172
|
-
path:
|
|
35173
|
-
status:
|
|
35174
|
-
priceCents:
|
|
35175
|
-
currency:
|
|
35176
|
-
productType:
|
|
35177
|
-
requiresShipping:
|
|
35178
|
-
hasVariants:
|
|
35179
|
-
trackInventory:
|
|
35180
|
-
soldOut:
|
|
35181
|
-
category:
|
|
35182
|
-
id:
|
|
35183
|
-
name:
|
|
35184
|
-
slug:
|
|
35371
|
+
import { z as z56 } from "zod";
|
|
35372
|
+
var publicProductVariantSchema = z56.object({
|
|
35373
|
+
id: z56.string(),
|
|
35374
|
+
title: z56.string(),
|
|
35375
|
+
sku: z56.string().nullable(),
|
|
35376
|
+
priceCents: z56.number(),
|
|
35377
|
+
stockQuantity: z56.number().nullable(),
|
|
35378
|
+
soldOut: z56.boolean()
|
|
35379
|
+
});
|
|
35380
|
+
var publicProductSchema = z56.object({
|
|
35381
|
+
id: z56.string(),
|
|
35382
|
+
contentEntryId: z56.string().nullable(),
|
|
35383
|
+
title: z56.string(),
|
|
35384
|
+
slug: z56.string(),
|
|
35385
|
+
path: z56.string().nullable(),
|
|
35386
|
+
status: z56.enum(["draft", "active"]),
|
|
35387
|
+
priceCents: z56.number(),
|
|
35388
|
+
currency: z56.string(),
|
|
35389
|
+
productType: z56.enum(["physical", "digital"]),
|
|
35390
|
+
requiresShipping: z56.boolean(),
|
|
35391
|
+
hasVariants: z56.boolean(),
|
|
35392
|
+
trackInventory: z56.boolean(),
|
|
35393
|
+
soldOut: z56.boolean(),
|
|
35394
|
+
category: z56.object({
|
|
35395
|
+
id: z56.string(),
|
|
35396
|
+
name: z56.string(),
|
|
35397
|
+
slug: z56.string()
|
|
35185
35398
|
}).nullable(),
|
|
35186
|
-
summary:
|
|
35187
|
-
body:
|
|
35188
|
-
gallery:
|
|
35189
|
-
|
|
35190
|
-
url:
|
|
35191
|
-
alt:
|
|
35399
|
+
summary: z56.string().nullable(),
|
|
35400
|
+
body: z56.unknown().nullable(),
|
|
35401
|
+
gallery: z56.array(
|
|
35402
|
+
z56.object({
|
|
35403
|
+
url: z56.string(),
|
|
35404
|
+
alt: z56.string().nullable()
|
|
35192
35405
|
})
|
|
35193
35406
|
),
|
|
35194
|
-
variants:
|
|
35407
|
+
variants: z56.array(publicProductVariantSchema)
|
|
35195
35408
|
});
|
|
35196
|
-
var publicProductsResponseSchema =
|
|
35197
|
-
products:
|
|
35409
|
+
var publicProductsResponseSchema = z56.object({
|
|
35410
|
+
products: z56.array(publicProductSchema)
|
|
35198
35411
|
});
|
|
35199
35412
|
|
|
35200
35413
|
// ../blocks/src/system/runtime/api/creditProducts.ts
|
|
@@ -35258,27 +35471,27 @@ function deriveCreditProductLabels(products, options = {}) {
|
|
|
35258
35471
|
}
|
|
35259
35472
|
|
|
35260
35473
|
// ../blocks/src/system/runtime/nodes/shop-commerce.shared.ts
|
|
35261
|
-
import { z as
|
|
35262
|
-
var storedProductCartItemSchema =
|
|
35263
|
-
kind:
|
|
35264
|
-
productId:
|
|
35265
|
-
productCategoryId:
|
|
35266
|
-
variantId:
|
|
35267
|
-
title:
|
|
35268
|
-
variantTitle:
|
|
35269
|
-
quantity:
|
|
35270
|
-
unitPriceCents:
|
|
35271
|
-
currency:
|
|
35272
|
-
imageUrl:
|
|
35273
|
-
soldOut:
|
|
35274
|
-
});
|
|
35275
|
-
var storedPassCartItemSchema =
|
|
35276
|
-
kind:
|
|
35277
|
-
passId:
|
|
35278
|
-
title:
|
|
35279
|
-
quantity:
|
|
35280
|
-
unitPriceCents:
|
|
35281
|
-
currency:
|
|
35474
|
+
import { z as z57 } from "zod";
|
|
35475
|
+
var storedProductCartItemSchema = z57.object({
|
|
35476
|
+
kind: z57.literal("product"),
|
|
35477
|
+
productId: z57.string().min(1),
|
|
35478
|
+
productCategoryId: z57.string().min(1).optional().nullable(),
|
|
35479
|
+
variantId: z57.string().min(1).optional().nullable(),
|
|
35480
|
+
title: z57.string().min(1),
|
|
35481
|
+
variantTitle: z57.string().optional().nullable(),
|
|
35482
|
+
quantity: z57.number().finite(),
|
|
35483
|
+
unitPriceCents: z57.number().finite(),
|
|
35484
|
+
currency: z57.string().min(1),
|
|
35485
|
+
imageUrl: z57.string().optional().nullable(),
|
|
35486
|
+
soldOut: z57.boolean().optional()
|
|
35487
|
+
});
|
|
35488
|
+
var storedPassCartItemSchema = z57.object({
|
|
35489
|
+
kind: z57.literal("pass"),
|
|
35490
|
+
passId: z57.string().min(1),
|
|
35491
|
+
title: z57.string().min(1),
|
|
35492
|
+
quantity: z57.number().finite().optional(),
|
|
35493
|
+
unitPriceCents: z57.number().finite(),
|
|
35494
|
+
currency: z57.string().min(1)
|
|
35282
35495
|
});
|
|
35283
35496
|
function deriveCommerceCheckoutState(state) {
|
|
35284
35497
|
if (state.items.length === 0) {
|
|
@@ -35317,10 +35530,7 @@ function resolveSelectedProduct(products, contentEntry, productSlug) {
|
|
|
35317
35530
|
|
|
35318
35531
|
// ../blocks/src/system/runtime/nodes/commerce/shared/display.ts
|
|
35319
35532
|
function formatCommercePrice(cents, currency) {
|
|
35320
|
-
return
|
|
35321
|
-
style: "currency",
|
|
35322
|
-
currency: currency.toUpperCase()
|
|
35323
|
-
}).format(cents / 100);
|
|
35533
|
+
return formatCurrencyAmount(cents, currency);
|
|
35324
35534
|
}
|
|
35325
35535
|
function getPassesHeading(passes, explicitHeading) {
|
|
35326
35536
|
if (explicitHeading) return explicitHeading;
|
|
@@ -35515,214 +35725,214 @@ function formatValidity(days) {
|
|
|
35515
35725
|
}
|
|
35516
35726
|
|
|
35517
35727
|
// ../blocks/src/system/runtime/nodes/shop.interactive.ts
|
|
35518
|
-
var shopModeSchema =
|
|
35519
|
-
var contentEntrySchema3 =
|
|
35520
|
-
id:
|
|
35521
|
-
slug:
|
|
35728
|
+
var shopModeSchema = z58.enum(["passes-memberships", "product-list", "product-detail", "cart", "checkout"]);
|
|
35729
|
+
var contentEntrySchema3 = z58.object({
|
|
35730
|
+
id: z58.string().nullable().optional(),
|
|
35731
|
+
slug: z58.string().nullable().optional()
|
|
35522
35732
|
}).nullable();
|
|
35523
|
-
var shopSourceSchema =
|
|
35524
|
-
className:
|
|
35733
|
+
var shopSourceSchema = z58.object({
|
|
35734
|
+
className: z58.string().nullable().optional(),
|
|
35525
35735
|
mode: shopModeSchema.optional(),
|
|
35526
|
-
heading:
|
|
35527
|
-
productSlug:
|
|
35528
|
-
showPasses:
|
|
35529
|
-
showMemberships:
|
|
35530
|
-
layout:
|
|
35531
|
-
columns:
|
|
35532
|
-
showDescriptions:
|
|
35533
|
-
showSummary:
|
|
35534
|
-
showBody:
|
|
35535
|
-
showPrices:
|
|
35536
|
-
showValidityPeriod:
|
|
35537
|
-
showPricePerCredit:
|
|
35538
|
-
passesHeading:
|
|
35539
|
-
membershipsHeading:
|
|
35540
|
-
buyButtonText:
|
|
35541
|
-
addButtonText:
|
|
35542
|
-
passPurchaseMode:
|
|
35543
|
-
subscribeButtonText:
|
|
35544
|
-
emptyStateText:
|
|
35545
|
-
checkoutButtonText:
|
|
35546
|
-
clearButtonText:
|
|
35547
|
-
submitButtonText:
|
|
35736
|
+
heading: z58.string().nullable().optional(),
|
|
35737
|
+
productSlug: z58.string().nullable().optional(),
|
|
35738
|
+
showPasses: z58.boolean().optional(),
|
|
35739
|
+
showMemberships: z58.boolean().optional(),
|
|
35740
|
+
layout: z58.enum(["grid", "list"]).optional(),
|
|
35741
|
+
columns: z58.string().optional(),
|
|
35742
|
+
showDescriptions: z58.boolean().optional(),
|
|
35743
|
+
showSummary: z58.boolean().optional(),
|
|
35744
|
+
showBody: z58.boolean().optional(),
|
|
35745
|
+
showPrices: z58.boolean().optional(),
|
|
35746
|
+
showValidityPeriod: z58.boolean().optional(),
|
|
35747
|
+
showPricePerCredit: z58.boolean().nullable().optional(),
|
|
35748
|
+
passesHeading: z58.string().optional(),
|
|
35749
|
+
membershipsHeading: z58.string().optional(),
|
|
35750
|
+
buyButtonText: z58.string().optional(),
|
|
35751
|
+
addButtonText: z58.string().optional(),
|
|
35752
|
+
passPurchaseMode: z58.enum(["add_to_cart", "buy_now"]).optional(),
|
|
35753
|
+
subscribeButtonText: z58.string().optional(),
|
|
35754
|
+
emptyStateText: z58.string().optional(),
|
|
35755
|
+
checkoutButtonText: z58.string().optional(),
|
|
35756
|
+
clearButtonText: z58.string().optional(),
|
|
35757
|
+
submitButtonText: z58.string().optional(),
|
|
35548
35758
|
contentEntry: contentEntrySchema3.optional(),
|
|
35549
|
-
passes:
|
|
35550
|
-
memberships:
|
|
35551
|
-
products:
|
|
35552
|
-
siteId:
|
|
35553
|
-
apiBaseUrl:
|
|
35759
|
+
passes: z58.array(publicPassProductSchema).nullable().optional(),
|
|
35760
|
+
memberships: z58.array(publicMembershipProductSchema).nullable().optional(),
|
|
35761
|
+
products: z58.array(publicProductSchema).nullable().optional(),
|
|
35762
|
+
siteId: z58.string().optional(),
|
|
35763
|
+
apiBaseUrl: z58.string().optional(),
|
|
35554
35764
|
stage: previewStageSchema.optional()
|
|
35555
35765
|
});
|
|
35556
|
-
var productVariantOptionDisplaySchema =
|
|
35557
|
-
id:
|
|
35558
|
-
label:
|
|
35559
|
-
soldOut:
|
|
35560
|
-
});
|
|
35561
|
-
var productCardDisplaySchema =
|
|
35562
|
-
productId:
|
|
35563
|
-
title:
|
|
35564
|
-
path:
|
|
35565
|
-
summary:
|
|
35566
|
-
priceLabel:
|
|
35567
|
-
image:
|
|
35568
|
-
url:
|
|
35569
|
-
alt:
|
|
35766
|
+
var productVariantOptionDisplaySchema = z58.object({
|
|
35767
|
+
id: z58.string(),
|
|
35768
|
+
label: z58.string(),
|
|
35769
|
+
soldOut: z58.boolean()
|
|
35770
|
+
});
|
|
35771
|
+
var productCardDisplaySchema = z58.object({
|
|
35772
|
+
productId: z58.string(),
|
|
35773
|
+
title: z58.string(),
|
|
35774
|
+
path: z58.string().nullable(),
|
|
35775
|
+
summary: z58.string().nullable(),
|
|
35776
|
+
priceLabel: z58.string().nullable(),
|
|
35777
|
+
image: z58.object({
|
|
35778
|
+
url: z58.string(),
|
|
35779
|
+
alt: z58.string().nullable()
|
|
35570
35780
|
}).nullable(),
|
|
35571
|
-
variantOptions:
|
|
35572
|
-
selectedVariantId:
|
|
35573
|
-
selectionLabel:
|
|
35574
|
-
actionLabel:
|
|
35575
|
-
soldOut:
|
|
35576
|
-
});
|
|
35577
|
-
var productListDisplaySchema =
|
|
35578
|
-
kind:
|
|
35579
|
-
state:
|
|
35580
|
-
heading:
|
|
35581
|
-
className:
|
|
35582
|
-
layout:
|
|
35583
|
-
columns:
|
|
35584
|
-
emptyMessage:
|
|
35585
|
-
cards:
|
|
35586
|
-
});
|
|
35587
|
-
var productDetailDisplaySchema =
|
|
35588
|
-
|
|
35589
|
-
kind:
|
|
35590
|
-
state:
|
|
35591
|
-
heading:
|
|
35592
|
-
className:
|
|
35593
|
-
emptyMessage:
|
|
35781
|
+
variantOptions: z58.array(productVariantOptionDisplaySchema),
|
|
35782
|
+
selectedVariantId: z58.string().nullable(),
|
|
35783
|
+
selectionLabel: z58.string(),
|
|
35784
|
+
actionLabel: z58.string(),
|
|
35785
|
+
soldOut: z58.boolean()
|
|
35786
|
+
});
|
|
35787
|
+
var productListDisplaySchema = z58.object({
|
|
35788
|
+
kind: z58.literal("product-list"),
|
|
35789
|
+
state: z58.enum(["empty", "ready"]),
|
|
35790
|
+
heading: z58.string().nullable(),
|
|
35791
|
+
className: z58.string().nullable(),
|
|
35792
|
+
layout: z58.enum(["grid", "list"]),
|
|
35793
|
+
columns: z58.string(),
|
|
35794
|
+
emptyMessage: z58.string(),
|
|
35795
|
+
cards: z58.array(productCardDisplaySchema)
|
|
35796
|
+
});
|
|
35797
|
+
var productDetailDisplaySchema = z58.discriminatedUnion("state", [
|
|
35798
|
+
z58.object({
|
|
35799
|
+
kind: z58.literal("product-detail"),
|
|
35800
|
+
state: z58.literal("empty"),
|
|
35801
|
+
heading: z58.string().nullable(),
|
|
35802
|
+
className: z58.string().nullable(),
|
|
35803
|
+
emptyMessage: z58.string()
|
|
35594
35804
|
}),
|
|
35595
|
-
|
|
35596
|
-
kind:
|
|
35597
|
-
state:
|
|
35598
|
-
heading:
|
|
35599
|
-
className:
|
|
35600
|
-
title:
|
|
35601
|
-
priceLabel:
|
|
35602
|
-
summary:
|
|
35603
|
-
categoryLabel:
|
|
35604
|
-
gallery:
|
|
35605
|
-
url:
|
|
35606
|
-
alt:
|
|
35805
|
+
z58.object({
|
|
35806
|
+
kind: z58.literal("product-detail"),
|
|
35807
|
+
state: z58.literal("ready"),
|
|
35808
|
+
heading: z58.string().nullable(),
|
|
35809
|
+
className: z58.string().nullable(),
|
|
35810
|
+
title: z58.string(),
|
|
35811
|
+
priceLabel: z58.string(),
|
|
35812
|
+
summary: z58.string().nullable(),
|
|
35813
|
+
categoryLabel: z58.string().nullable(),
|
|
35814
|
+
gallery: z58.array(z58.object({
|
|
35815
|
+
url: z58.string(),
|
|
35816
|
+
alt: z58.string().nullable()
|
|
35607
35817
|
})),
|
|
35608
|
-
variantOptions:
|
|
35609
|
-
selectedVariantId:
|
|
35610
|
-
selectionLabel:
|
|
35611
|
-
actionLabel:
|
|
35612
|
-
soldOut:
|
|
35613
|
-
body:
|
|
35818
|
+
variantOptions: z58.array(productVariantOptionDisplaySchema),
|
|
35819
|
+
selectedVariantId: z58.string().nullable(),
|
|
35820
|
+
selectionLabel: z58.string(),
|
|
35821
|
+
actionLabel: z58.string(),
|
|
35822
|
+
soldOut: z58.boolean(),
|
|
35823
|
+
body: z58.unknown().nullable()
|
|
35614
35824
|
})
|
|
35615
35825
|
]);
|
|
35616
|
-
var passCardDisplaySchema =
|
|
35617
|
-
id:
|
|
35618
|
-
title:
|
|
35619
|
-
description:
|
|
35620
|
-
priceLabel:
|
|
35621
|
-
creditsLabel:
|
|
35622
|
-
perCreditLabel:
|
|
35623
|
-
validityLabel:
|
|
35624
|
-
actionLabel:
|
|
35625
|
-
});
|
|
35626
|
-
var membershipCardDisplaySchema =
|
|
35627
|
-
id:
|
|
35628
|
-
title:
|
|
35629
|
-
description:
|
|
35630
|
-
priceLabel:
|
|
35631
|
-
intervalLabel:
|
|
35632
|
-
actionLabel:
|
|
35633
|
-
});
|
|
35634
|
-
var passesMembershipsDisplaySchema =
|
|
35635
|
-
kind:
|
|
35636
|
-
state:
|
|
35637
|
-
className:
|
|
35638
|
-
layout:
|
|
35639
|
-
columns:
|
|
35640
|
-
emptyMessage:
|
|
35641
|
-
passesHeading:
|
|
35642
|
-
membershipsHeading:
|
|
35643
|
-
passes:
|
|
35644
|
-
memberships:
|
|
35645
|
-
});
|
|
35646
|
-
var cartLineDisplaySchema =
|
|
35647
|
-
key:
|
|
35648
|
-
title:
|
|
35649
|
-
priceLabel:
|
|
35650
|
-
quantity:
|
|
35651
|
-
quantityEditable:
|
|
35652
|
-
});
|
|
35653
|
-
var cartDisplaySchema =
|
|
35654
|
-
kind:
|
|
35655
|
-
state:
|
|
35656
|
-
heading:
|
|
35657
|
-
className:
|
|
35658
|
-
emptyMessage:
|
|
35659
|
-
supportText:
|
|
35660
|
-
items:
|
|
35661
|
-
subtotalLabel:
|
|
35662
|
-
checkoutButtonText:
|
|
35663
|
-
clearButtonText:
|
|
35664
|
-
});
|
|
35665
|
-
var checkoutDisplaySchema =
|
|
35666
|
-
kind:
|
|
35667
|
-
state:
|
|
35668
|
-
heading:
|
|
35669
|
-
className:
|
|
35670
|
-
message:
|
|
35671
|
-
submitButtonText:
|
|
35672
|
-
});
|
|
35673
|
-
var passesMembershipsHydrationSchema =
|
|
35674
|
-
passes:
|
|
35675
|
-
memberships:
|
|
35676
|
-
passPurchaseMode:
|
|
35677
|
-
});
|
|
35678
|
-
var productListHydrationSchema =
|
|
35679
|
-
products:
|
|
35680
|
-
showSummary:
|
|
35681
|
-
showPrices:
|
|
35682
|
-
addButtonText:
|
|
35683
|
-
});
|
|
35684
|
-
var productDetailHydrationSchema =
|
|
35685
|
-
products:
|
|
35686
|
-
productId:
|
|
35687
|
-
showSummary:
|
|
35688
|
-
showBody:
|
|
35689
|
-
addButtonText:
|
|
35690
|
-
});
|
|
35691
|
-
var cartHydrationSchema =
|
|
35692
|
-
emptyStateText:
|
|
35693
|
-
checkoutButtonText:
|
|
35694
|
-
clearButtonText:
|
|
35695
|
-
});
|
|
35696
|
-
var checkoutHydrationSchema =
|
|
35697
|
-
emptyStateText:
|
|
35698
|
-
submitButtonText:
|
|
35699
|
-
});
|
|
35700
|
-
var passesMembershipsRenderSchema =
|
|
35826
|
+
var passCardDisplaySchema = z58.object({
|
|
35827
|
+
id: z58.string(),
|
|
35828
|
+
title: z58.string(),
|
|
35829
|
+
description: z58.string().nullable(),
|
|
35830
|
+
priceLabel: z58.string(),
|
|
35831
|
+
creditsLabel: z58.string(),
|
|
35832
|
+
perCreditLabel: z58.string().nullable(),
|
|
35833
|
+
validityLabel: z58.string().nullable(),
|
|
35834
|
+
actionLabel: z58.string()
|
|
35835
|
+
});
|
|
35836
|
+
var membershipCardDisplaySchema = z58.object({
|
|
35837
|
+
id: z58.string(),
|
|
35838
|
+
title: z58.string(),
|
|
35839
|
+
description: z58.string().nullable(),
|
|
35840
|
+
priceLabel: z58.string(),
|
|
35841
|
+
intervalLabel: z58.string(),
|
|
35842
|
+
actionLabel: z58.string()
|
|
35843
|
+
});
|
|
35844
|
+
var passesMembershipsDisplaySchema = z58.object({
|
|
35845
|
+
kind: z58.literal("passes-memberships"),
|
|
35846
|
+
state: z58.enum(["empty", "ready"]),
|
|
35847
|
+
className: z58.string().nullable(),
|
|
35848
|
+
layout: z58.enum(["grid", "list"]),
|
|
35849
|
+
columns: z58.string(),
|
|
35850
|
+
emptyMessage: z58.string(),
|
|
35851
|
+
passesHeading: z58.string(),
|
|
35852
|
+
membershipsHeading: z58.string(),
|
|
35853
|
+
passes: z58.array(passCardDisplaySchema),
|
|
35854
|
+
memberships: z58.array(membershipCardDisplaySchema)
|
|
35855
|
+
});
|
|
35856
|
+
var cartLineDisplaySchema = z58.object({
|
|
35857
|
+
key: z58.string(),
|
|
35858
|
+
title: z58.string(),
|
|
35859
|
+
priceLabel: z58.string(),
|
|
35860
|
+
quantity: z58.number(),
|
|
35861
|
+
quantityEditable: z58.boolean()
|
|
35862
|
+
});
|
|
35863
|
+
var cartDisplaySchema = z58.object({
|
|
35864
|
+
kind: z58.literal("cart"),
|
|
35865
|
+
state: z58.enum(["empty", "ready"]),
|
|
35866
|
+
heading: z58.string().nullable(),
|
|
35867
|
+
className: z58.string().nullable(),
|
|
35868
|
+
emptyMessage: z58.string(),
|
|
35869
|
+
supportText: z58.string().nullable(),
|
|
35870
|
+
items: z58.array(cartLineDisplaySchema),
|
|
35871
|
+
subtotalLabel: z58.string().nullable(),
|
|
35872
|
+
checkoutButtonText: z58.string(),
|
|
35873
|
+
clearButtonText: z58.string()
|
|
35874
|
+
});
|
|
35875
|
+
var checkoutDisplaySchema = z58.object({
|
|
35876
|
+
kind: z58.literal("checkout"),
|
|
35877
|
+
state: z58.enum(["empty", "blocked", "ready"]),
|
|
35878
|
+
heading: z58.string().nullable(),
|
|
35879
|
+
className: z58.string().nullable(),
|
|
35880
|
+
message: z58.string().nullable(),
|
|
35881
|
+
submitButtonText: z58.string()
|
|
35882
|
+
});
|
|
35883
|
+
var passesMembershipsHydrationSchema = z58.object({
|
|
35884
|
+
passes: z58.array(publicPassProductSchema),
|
|
35885
|
+
memberships: z58.array(publicMembershipProductSchema),
|
|
35886
|
+
passPurchaseMode: z58.enum(["add_to_cart", "buy_now"])
|
|
35887
|
+
});
|
|
35888
|
+
var productListHydrationSchema = z58.object({
|
|
35889
|
+
products: z58.array(publicProductSchema),
|
|
35890
|
+
showSummary: z58.boolean(),
|
|
35891
|
+
showPrices: z58.boolean(),
|
|
35892
|
+
addButtonText: z58.string()
|
|
35893
|
+
});
|
|
35894
|
+
var productDetailHydrationSchema = z58.object({
|
|
35895
|
+
products: z58.array(publicProductSchema),
|
|
35896
|
+
productId: z58.string().nullable(),
|
|
35897
|
+
showSummary: z58.boolean(),
|
|
35898
|
+
showBody: z58.boolean(),
|
|
35899
|
+
addButtonText: z58.string()
|
|
35900
|
+
});
|
|
35901
|
+
var cartHydrationSchema = z58.object({
|
|
35902
|
+
emptyStateText: z58.string(),
|
|
35903
|
+
checkoutButtonText: z58.string(),
|
|
35904
|
+
clearButtonText: z58.string()
|
|
35905
|
+
});
|
|
35906
|
+
var checkoutHydrationSchema = z58.object({
|
|
35907
|
+
emptyStateText: z58.string(),
|
|
35908
|
+
submitButtonText: z58.string()
|
|
35909
|
+
});
|
|
35910
|
+
var passesMembershipsRenderSchema = z58.object({
|
|
35701
35911
|
display: passesMembershipsDisplaySchema,
|
|
35702
35912
|
hydration: passesMembershipsHydrationSchema
|
|
35703
35913
|
});
|
|
35704
|
-
var productListRenderSchema =
|
|
35914
|
+
var productListRenderSchema = z58.object({
|
|
35705
35915
|
display: productListDisplaySchema,
|
|
35706
35916
|
hydration: productListHydrationSchema
|
|
35707
35917
|
});
|
|
35708
|
-
var productDetailRenderSchema =
|
|
35918
|
+
var productDetailRenderSchema = z58.object({
|
|
35709
35919
|
display: productDetailDisplaySchema,
|
|
35710
35920
|
hydration: productDetailHydrationSchema
|
|
35711
35921
|
});
|
|
35712
|
-
var cartRenderSchema =
|
|
35922
|
+
var cartRenderSchema = z58.object({
|
|
35713
35923
|
display: cartDisplaySchema,
|
|
35714
35924
|
hydration: cartHydrationSchema
|
|
35715
35925
|
});
|
|
35716
|
-
var checkoutRenderSchema =
|
|
35926
|
+
var checkoutRenderSchema = z58.object({
|
|
35717
35927
|
display: checkoutDisplaySchema,
|
|
35718
35928
|
hydration: checkoutHydrationSchema
|
|
35719
35929
|
});
|
|
35720
35930
|
function resolveShowPricePerCredit(source) {
|
|
35721
35931
|
return source.showPricePerCredit ?? true;
|
|
35722
35932
|
}
|
|
35723
|
-
var shopIslandMetaCodec = createZodCodec(
|
|
35724
|
-
siteId:
|
|
35725
|
-
apiBaseUrl:
|
|
35933
|
+
var shopIslandMetaCodec = createZodCodec(z58.object({
|
|
35934
|
+
siteId: z58.string().optional(),
|
|
35935
|
+
apiBaseUrl: z58.string().optional(),
|
|
35726
35936
|
stage: previewStageSchema.optional()
|
|
35727
35937
|
}));
|
|
35728
35938
|
var shopIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl", "stage");
|
|
@@ -36100,9 +36310,9 @@ var shopBlockDefinition = {
|
|
|
36100
36310
|
runtime: shopBlockRuntime,
|
|
36101
36311
|
dataSchemas: {
|
|
36102
36312
|
// listPublicPasses returns { passes: [...] }
|
|
36103
|
-
passes:
|
|
36313
|
+
passes: z59.object({ passes: z59.array(publicPassProductSchema) }).optional(),
|
|
36104
36314
|
// listPublicMemberships returns { memberships: [...] }
|
|
36105
|
-
memberships:
|
|
36315
|
+
memberships: z59.object({ memberships: z59.array(publicMembershipProductSchema) }).optional()
|
|
36106
36316
|
},
|
|
36107
36317
|
dataLoaders: {
|
|
36108
36318
|
// Load passes for display
|
|
@@ -36125,7 +36335,7 @@ var shopBlockDefinition = {
|
|
|
36125
36335
|
};
|
|
36126
36336
|
|
|
36127
36337
|
// ../blocks/src/system/blocks/product-list.ts
|
|
36128
|
-
import { z as
|
|
36338
|
+
import { z as z60 } from "zod";
|
|
36129
36339
|
var productListManifest = createBlockManifest({
|
|
36130
36340
|
id: "block.product-list",
|
|
36131
36341
|
version: "1.0.0",
|
|
@@ -36258,7 +36468,7 @@ var productListBlockDefinition = {
|
|
|
36258
36468
|
}
|
|
36259
36469
|
}
|
|
36260
36470
|
};
|
|
36261
|
-
var productListDataSchema =
|
|
36471
|
+
var productListDataSchema = z60.object({
|
|
36262
36472
|
products: publicProductsResponseSchema.optional()
|
|
36263
36473
|
});
|
|
36264
36474
|
|
|
@@ -36519,72 +36729,72 @@ var checkoutBlockDefinition = {
|
|
|
36519
36729
|
};
|
|
36520
36730
|
|
|
36521
36731
|
// ../blocks/src/system/runtime/nodes/gifting.interactive.ts
|
|
36522
|
-
import { z as
|
|
36523
|
-
var publicGiftCardOfferSchema =
|
|
36524
|
-
id:
|
|
36525
|
-
kind:
|
|
36526
|
-
title:
|
|
36527
|
-
description:
|
|
36528
|
-
sortOrder:
|
|
36529
|
-
giftCard:
|
|
36530
|
-
fixedDenominations:
|
|
36531
|
-
customAmountEnabled:
|
|
36532
|
-
customAmountMinCents:
|
|
36533
|
-
customAmountMaxCents:
|
|
36732
|
+
import { z as z61 } from "zod";
|
|
36733
|
+
var publicGiftCardOfferSchema = z61.object({
|
|
36734
|
+
id: z61.string(),
|
|
36735
|
+
kind: z61.literal("gift_card"),
|
|
36736
|
+
title: z61.string(),
|
|
36737
|
+
description: z61.string().nullable(),
|
|
36738
|
+
sortOrder: z61.number().int(),
|
|
36739
|
+
giftCard: z61.object({
|
|
36740
|
+
fixedDenominations: z61.array(z61.number().int().positive()),
|
|
36741
|
+
customAmountEnabled: z61.boolean(),
|
|
36742
|
+
customAmountMinCents: z61.number().int().positive(),
|
|
36743
|
+
customAmountMaxCents: z61.number().int().positive()
|
|
36534
36744
|
}),
|
|
36535
|
-
voucher:
|
|
36536
|
-
});
|
|
36537
|
-
var publicVoucherOfferSchema =
|
|
36538
|
-
id:
|
|
36539
|
-
kind:
|
|
36540
|
-
title:
|
|
36541
|
-
description:
|
|
36542
|
-
sortOrder:
|
|
36543
|
-
giftCard:
|
|
36544
|
-
voucher:
|
|
36545
|
-
purchaseAmountCents:
|
|
36745
|
+
voucher: z61.null()
|
|
36746
|
+
});
|
|
36747
|
+
var publicVoucherOfferSchema = z61.object({
|
|
36748
|
+
id: z61.string(),
|
|
36749
|
+
kind: z61.literal("voucher"),
|
|
36750
|
+
title: z61.string(),
|
|
36751
|
+
description: z61.string().nullable(),
|
|
36752
|
+
sortOrder: z61.number().int(),
|
|
36753
|
+
giftCard: z61.null(),
|
|
36754
|
+
voucher: z61.object({
|
|
36755
|
+
purchaseAmountCents: z61.number().int().positive()
|
|
36546
36756
|
})
|
|
36547
36757
|
});
|
|
36548
|
-
var publicGiftingOffersResponseSchema =
|
|
36549
|
-
currency:
|
|
36550
|
-
giftCards:
|
|
36551
|
-
vouchers:
|
|
36758
|
+
var publicGiftingOffersResponseSchema = z61.object({
|
|
36759
|
+
currency: z61.string(),
|
|
36760
|
+
giftCards: z61.array(publicGiftCardOfferSchema),
|
|
36761
|
+
vouchers: z61.array(publicVoucherOfferSchema)
|
|
36552
36762
|
});
|
|
36553
|
-
var giftingSourceSchema =
|
|
36554
|
-
siteId:
|
|
36555
|
-
apiBaseUrl:
|
|
36763
|
+
var giftingSourceSchema = z61.object({
|
|
36764
|
+
siteId: z61.string().optional(),
|
|
36765
|
+
apiBaseUrl: z61.string().optional(),
|
|
36556
36766
|
offers: publicGiftingOffersResponseSchema.nullable().optional(),
|
|
36557
|
-
className:
|
|
36558
|
-
heading:
|
|
36559
|
-
intro:
|
|
36560
|
-
giftCardsHeading:
|
|
36561
|
-
vouchersHeading:
|
|
36562
|
-
emptyStateText:
|
|
36563
|
-
checkoutButtonText:
|
|
36564
|
-
successMessage:
|
|
36565
|
-
});
|
|
36566
|
-
var giftingDisplaySchema =
|
|
36567
|
-
kind:
|
|
36568
|
-
state:
|
|
36569
|
-
className:
|
|
36570
|
-
heading:
|
|
36571
|
-
intro:
|
|
36572
|
-
giftCardsHeading:
|
|
36573
|
-
vouchersHeading:
|
|
36574
|
-
emptyStateText:
|
|
36575
|
-
});
|
|
36576
|
-
var giftingHydrationSchema =
|
|
36767
|
+
className: z61.string().nullable().optional(),
|
|
36768
|
+
heading: z61.string().nullable().optional(),
|
|
36769
|
+
intro: z61.string().nullable().optional(),
|
|
36770
|
+
giftCardsHeading: z61.string().nullable().optional(),
|
|
36771
|
+
vouchersHeading: z61.string().nullable().optional(),
|
|
36772
|
+
emptyStateText: z61.string().nullable().optional(),
|
|
36773
|
+
checkoutButtonText: z61.string().nullable().optional(),
|
|
36774
|
+
successMessage: z61.string().nullable().optional()
|
|
36775
|
+
});
|
|
36776
|
+
var giftingDisplaySchema = z61.object({
|
|
36777
|
+
kind: z61.literal("gifting"),
|
|
36778
|
+
state: z61.literal("ready"),
|
|
36779
|
+
className: z61.string().nullable(),
|
|
36780
|
+
heading: z61.string(),
|
|
36781
|
+
intro: z61.string().nullable(),
|
|
36782
|
+
giftCardsHeading: z61.string(),
|
|
36783
|
+
vouchersHeading: z61.string(),
|
|
36784
|
+
emptyStateText: z61.string()
|
|
36785
|
+
});
|
|
36786
|
+
var giftingHydrationSchema = z61.object({
|
|
36577
36787
|
offers: publicGiftingOffersResponseSchema.nullable(),
|
|
36578
|
-
checkoutButtonText:
|
|
36579
|
-
successMessage:
|
|
36788
|
+
checkoutButtonText: z61.string(),
|
|
36789
|
+
successMessage: z61.string()
|
|
36580
36790
|
});
|
|
36581
|
-
var giftingRenderSchema =
|
|
36791
|
+
var giftingRenderSchema = z61.object({
|
|
36582
36792
|
display: giftingDisplaySchema,
|
|
36583
36793
|
hydration: giftingHydrationSchema
|
|
36584
36794
|
});
|
|
36585
|
-
var giftingIslandMetaCodec = createZodCodec(
|
|
36586
|
-
siteId:
|
|
36587
|
-
apiBaseUrl:
|
|
36795
|
+
var giftingIslandMetaCodec = createZodCodec(z61.object({
|
|
36796
|
+
siteId: z61.string().optional(),
|
|
36797
|
+
apiBaseUrl: z61.string().optional()
|
|
36588
36798
|
}));
|
|
36589
36799
|
var giftingIslandMetaKeys = defineInteractiveIslandMetaKeys(
|
|
36590
36800
|
"siteId",
|
|
@@ -36755,7 +36965,89 @@ var giftingBlockDefinition = {
|
|
|
36755
36965
|
};
|
|
36756
36966
|
|
|
36757
36967
|
// ../blocks/src/system/runtime/nodes/newsletter-form.interactive.ts
|
|
36758
|
-
import { z as
|
|
36968
|
+
import { z as z62 } from "zod";
|
|
36969
|
+
|
|
36970
|
+
// ../blocks/src/system/blocks/newsletter-signup-destination.ts
|
|
36971
|
+
function parseNewsletterSignupBlockId(value) {
|
|
36972
|
+
const trimmed = parseTrimmedString(value);
|
|
36973
|
+
return trimmed && BLOCK_ID_PATTERN.test(trimmed) ? trimmed : null;
|
|
36974
|
+
}
|
|
36975
|
+
function parseSignedNewsletterDestinationRef(value) {
|
|
36976
|
+
const trimmed = parseTrimmedString(value);
|
|
36977
|
+
return trimmed && SIGNED_DESTINATION_REF_PATTERN.test(trimmed) ? trimmed : null;
|
|
36978
|
+
}
|
|
36979
|
+
function parseNewsletterSignupDestinationProvider(value) {
|
|
36980
|
+
return value === "riverbank" || value === "mailchimp" ? value : null;
|
|
36981
|
+
}
|
|
36982
|
+
function buildNewsletterSignupBlockRef(blockId) {
|
|
36983
|
+
const parsed = parseNewsletterSignupBlockId(blockId);
|
|
36984
|
+
return parsed ? { tag: "block_ref", blockId: parsed } : null;
|
|
36985
|
+
}
|
|
36986
|
+
function normalizeNewsletterSignupEditorValuesForDestination(values) {
|
|
36987
|
+
const destinationProvider = parseNewsletterSignupDestinationProvider(values.destinationProvider) ?? "riverbank";
|
|
36988
|
+
if (destinationProvider === "mailchimp") {
|
|
36989
|
+
return {
|
|
36990
|
+
destinationProvider,
|
|
36991
|
+
mailchimpAudienceId: values.mailchimpAudienceId,
|
|
36992
|
+
mailchimpTags: values.mailchimpTags
|
|
36993
|
+
};
|
|
36994
|
+
}
|
|
36995
|
+
return {
|
|
36996
|
+
destinationProvider,
|
|
36997
|
+
listId: values.listId,
|
|
36998
|
+
tags: values.tags
|
|
36999
|
+
};
|
|
37000
|
+
}
|
|
37001
|
+
function deriveNewsletterSignupRuntimeSource(values) {
|
|
37002
|
+
const normalized = normalizeNewsletterSignupEditorValuesForDestination(values);
|
|
37003
|
+
if (normalized.destinationProvider === "mailchimp") {
|
|
37004
|
+
return {
|
|
37005
|
+
destinationProvider: "mailchimp",
|
|
37006
|
+
listId: null,
|
|
37007
|
+
tags: null
|
|
37008
|
+
};
|
|
37009
|
+
}
|
|
37010
|
+
return {
|
|
37011
|
+
destinationProvider: "riverbank",
|
|
37012
|
+
listId: parseTrimmedString(normalized.listId),
|
|
37013
|
+
tags: parseTrimmedString(normalized.tags)
|
|
37014
|
+
};
|
|
37015
|
+
}
|
|
37016
|
+
function sanitizeNewsletterSignupPublicContent(content) {
|
|
37017
|
+
if (!isRecord7(content)) return content;
|
|
37018
|
+
const provider = parseNewsletterSignupDestinationProvider(content.destinationProvider) ?? getProviderFromExplicitDestination(content.destination);
|
|
37019
|
+
const {
|
|
37020
|
+
destination: _destination,
|
|
37021
|
+
destinationProvider: _destinationProvider,
|
|
37022
|
+
mailchimpAudienceId: _mailchimpAudienceId,
|
|
37023
|
+
mailchimpTags: _mailchimpTags,
|
|
37024
|
+
listId,
|
|
37025
|
+
tags: tags2,
|
|
37026
|
+
...publicContent
|
|
37027
|
+
} = content;
|
|
37028
|
+
const mutablePublicContent = { ...publicContent };
|
|
37029
|
+
if (provider !== "mailchimp") {
|
|
37030
|
+
if ("listId" in content) mutablePublicContent.listId = listId;
|
|
37031
|
+
if ("tags" in content) mutablePublicContent.tags = tags2;
|
|
37032
|
+
}
|
|
37033
|
+
return mutablePublicContent;
|
|
37034
|
+
}
|
|
37035
|
+
function getProviderFromExplicitDestination(destination) {
|
|
37036
|
+
if (!isRecord7(destination) || typeof destination.tag !== "string") return null;
|
|
37037
|
+
if (destination.tag === "riverbank_list") return "riverbank";
|
|
37038
|
+
if (destination.tag === "mailchimp_audience") return "mailchimp";
|
|
37039
|
+
return null;
|
|
37040
|
+
}
|
|
37041
|
+
var BLOCK_ID_PATTERN = /^[A-Za-z0-9._:-]{1,200}$/;
|
|
37042
|
+
var SIGNED_DESTINATION_REF_PATTERN = /^[A-Za-z0-9._~-]{16,1000}$/;
|
|
37043
|
+
function parseTrimmedString(value) {
|
|
37044
|
+
if (typeof value !== "string") return null;
|
|
37045
|
+
const trimmed = value.trim();
|
|
37046
|
+
return trimmed.length > 0 ? trimmed : null;
|
|
37047
|
+
}
|
|
37048
|
+
function isRecord7(value) {
|
|
37049
|
+
return typeof value === "object" && value !== null;
|
|
37050
|
+
}
|
|
36759
37051
|
|
|
36760
37052
|
// ../blocks/src/system/runtime/nodes/newsletter-form.types.ts
|
|
36761
37053
|
function getPresetFields(preset2, options) {
|
|
@@ -36808,49 +37100,65 @@ function withOptionalPhone(fields3, includePhone) {
|
|
|
36808
37100
|
}
|
|
36809
37101
|
|
|
36810
37102
|
// ../blocks/src/system/runtime/nodes/newsletter-form.interactive.ts
|
|
36811
|
-
var newsletterPresetSchema =
|
|
36812
|
-
var
|
|
36813
|
-
|
|
36814
|
-
|
|
36815
|
-
|
|
36816
|
-
|
|
36817
|
-
|
|
36818
|
-
|
|
36819
|
-
|
|
36820
|
-
|
|
36821
|
-
|
|
36822
|
-
|
|
37103
|
+
var newsletterPresetSchema = z62.enum(["emailOnly", "emailName", "emailFirstLast", "emailNameCompany"]);
|
|
37104
|
+
var newsletterDestinationProviderSchema = z62.enum(["riverbank", "mailchimp"]);
|
|
37105
|
+
var newsletterFieldSchema = z62.object({
|
|
37106
|
+
id: z62.string(),
|
|
37107
|
+
type: z62.enum(["email", "text"]),
|
|
37108
|
+
label: z62.string(),
|
|
37109
|
+
required: z62.boolean(),
|
|
37110
|
+
placeholder: z62.string().optional()
|
|
37111
|
+
});
|
|
37112
|
+
var newsletterSignupBlockIdSchema = z62.string().trim().min(1).transform(parseRequiredNewsletterSignupBlockId);
|
|
37113
|
+
var signedNewsletterDestinationRefSchema = z62.string().trim().min(1).transform(parseRequiredSignedNewsletterDestinationRef);
|
|
37114
|
+
var newsletterPublicDestinationRefSchema = z62.discriminatedUnion("tag", [
|
|
37115
|
+
z62.object({
|
|
37116
|
+
tag: z62.literal("block_ref"),
|
|
37117
|
+
blockId: newsletterSignupBlockIdSchema
|
|
37118
|
+
}),
|
|
37119
|
+
z62.object({
|
|
37120
|
+
tag: z62.literal("signed_destination_ref"),
|
|
37121
|
+
token: signedNewsletterDestinationRefSchema
|
|
37122
|
+
})
|
|
37123
|
+
]);
|
|
37124
|
+
var newsletterSourceSchema = z62.object({
|
|
37125
|
+
blockId: z62.string().nullable().optional(),
|
|
37126
|
+
siteId: z62.string().optional(),
|
|
37127
|
+
apiBaseUrl: z62.string().optional(),
|
|
37128
|
+
listId: z62.string().nullable().optional(),
|
|
37129
|
+
destinationProvider: newsletterDestinationProviderSchema.nullable().optional(),
|
|
36823
37130
|
preset: newsletterPresetSchema.optional(),
|
|
36824
|
-
includePhone:
|
|
36825
|
-
buttonLabel:
|
|
36826
|
-
successMessage:
|
|
36827
|
-
privacyNote:
|
|
36828
|
-
tags:
|
|
36829
|
-
spamProtectionEnabled:
|
|
36830
|
-
className:
|
|
36831
|
-
});
|
|
36832
|
-
var newsletterDisplaySchema =
|
|
36833
|
-
kind:
|
|
36834
|
-
className:
|
|
36835
|
-
buttonLabel:
|
|
36836
|
-
successMessage:
|
|
36837
|
-
privacyNote:
|
|
36838
|
-
fields:
|
|
36839
|
-
});
|
|
36840
|
-
var newsletterHydrationSchema =
|
|
36841
|
-
|
|
37131
|
+
includePhone: z62.boolean().optional(),
|
|
37132
|
+
buttonLabel: z62.string().nullable().optional(),
|
|
37133
|
+
successMessage: z62.string().nullable().optional(),
|
|
37134
|
+
privacyNote: z62.string().nullable().optional(),
|
|
37135
|
+
tags: z62.string().nullable().optional(),
|
|
37136
|
+
spamProtectionEnabled: z62.boolean().optional(),
|
|
37137
|
+
className: z62.string().nullable().optional()
|
|
37138
|
+
});
|
|
37139
|
+
var newsletterDisplaySchema = z62.object({
|
|
37140
|
+
kind: z62.literal("newsletter-form"),
|
|
37141
|
+
className: z62.string().nullable(),
|
|
37142
|
+
buttonLabel: z62.string(),
|
|
37143
|
+
successMessage: z62.string().nullable(),
|
|
37144
|
+
privacyNote: z62.string().nullable(),
|
|
37145
|
+
fields: z62.array(newsletterFieldSchema)
|
|
37146
|
+
});
|
|
37147
|
+
var newsletterHydrationSchema = z62.object({
|
|
37148
|
+
destinationRef: newsletterPublicDestinationRefSchema.nullable().optional(),
|
|
37149
|
+
listId: z62.string().nullable().optional(),
|
|
36842
37150
|
preset: newsletterPresetSchema,
|
|
36843
|
-
includePhone:
|
|
36844
|
-
tags:
|
|
36845
|
-
spamProtectionEnabled:
|
|
37151
|
+
includePhone: z62.boolean(),
|
|
37152
|
+
tags: z62.string().nullable().optional(),
|
|
37153
|
+
spamProtectionEnabled: z62.boolean().optional()
|
|
36846
37154
|
});
|
|
36847
|
-
var newsletterRenderSchema =
|
|
37155
|
+
var newsletterRenderSchema = z62.object({
|
|
36848
37156
|
display: newsletterDisplaySchema,
|
|
36849
37157
|
hydration: newsletterHydrationSchema
|
|
36850
37158
|
});
|
|
36851
|
-
var newsletterIslandMetaCodec = createZodCodec(
|
|
36852
|
-
siteId:
|
|
36853
|
-
apiBaseUrl:
|
|
37159
|
+
var newsletterIslandMetaCodec = createZodCodec(z62.object({
|
|
37160
|
+
siteId: z62.string().optional(),
|
|
37161
|
+
apiBaseUrl: z62.string().optional()
|
|
36854
37162
|
}));
|
|
36855
37163
|
var newsletterIslandMetaKeys = defineInteractiveIslandMetaKeys("siteId", "apiBaseUrl");
|
|
36856
37164
|
function buildNewsletterDisplay(source) {
|
|
@@ -36871,16 +37179,20 @@ var newsletterFormBlockRuntime = defineProgressiveBlockRuntime({
|
|
|
36871
37179
|
source: createZodCodec(newsletterSourceSchema),
|
|
36872
37180
|
render: createZodCodec(newsletterRenderSchema)
|
|
36873
37181
|
},
|
|
36874
|
-
buildRender: (source) =>
|
|
36875
|
-
|
|
36876
|
-
|
|
36877
|
-
|
|
36878
|
-
|
|
36879
|
-
|
|
36880
|
-
|
|
36881
|
-
|
|
36882
|
-
|
|
36883
|
-
|
|
37182
|
+
buildRender: (source) => {
|
|
37183
|
+
const runtimeSource = deriveNewsletterSignupRuntimeSource(source);
|
|
37184
|
+
return {
|
|
37185
|
+
display: buildNewsletterDisplay(source),
|
|
37186
|
+
hydration: {
|
|
37187
|
+
destinationRef: buildNewsletterSignupBlockRef(source.blockId),
|
|
37188
|
+
listId: runtimeSource.listId,
|
|
37189
|
+
preset: source.preset ?? "emailOnly",
|
|
37190
|
+
includePhone: source.includePhone ?? false,
|
|
37191
|
+
tags: runtimeSource.tags,
|
|
37192
|
+
spamProtectionEnabled: source.spamProtectionEnabled
|
|
37193
|
+
}
|
|
37194
|
+
};
|
|
37195
|
+
}
|
|
36884
37196
|
});
|
|
36885
37197
|
var newsletterFormInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
36886
37198
|
runtime: newsletterFormBlockRuntime,
|
|
@@ -36892,6 +37204,20 @@ var newsletterFormInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
|
36892
37204
|
apiBaseUrl: value.apiBaseUrl
|
|
36893
37205
|
})
|
|
36894
37206
|
});
|
|
37207
|
+
function parseRequiredNewsletterSignupBlockId(value) {
|
|
37208
|
+
const parsed = parseNewsletterSignupBlockId(value);
|
|
37209
|
+
if (!parsed) {
|
|
37210
|
+
throw new Error("Newsletter signup block destination ref requires blockId");
|
|
37211
|
+
}
|
|
37212
|
+
return parsed;
|
|
37213
|
+
}
|
|
37214
|
+
function parseRequiredSignedNewsletterDestinationRef(value) {
|
|
37215
|
+
const parsed = parseSignedNewsletterDestinationRef(value);
|
|
37216
|
+
if (!parsed) {
|
|
37217
|
+
throw new Error("Newsletter signup signed destination ref requires token");
|
|
37218
|
+
}
|
|
37219
|
+
return parsed;
|
|
37220
|
+
}
|
|
36895
37221
|
|
|
36896
37222
|
// ../blocks/src/system/blocks/newsletter-signup.ts
|
|
36897
37223
|
var stackedComposition = composeFragments([
|
|
@@ -36971,23 +37297,23 @@ var newsletterSignupBlockDefinition = {
|
|
|
36971
37297
|
};
|
|
36972
37298
|
|
|
36973
37299
|
// ../blocks/src/system/blocks/team-members.ts
|
|
36974
|
-
import { z as
|
|
37300
|
+
import { z as z63 } from "zod";
|
|
36975
37301
|
var ITEM_NAME2 = "member";
|
|
36976
37302
|
var teamMemberPhotoSchema = mediaSchema2.refine((media2) => media2.type === "image", {
|
|
36977
37303
|
message: "Team member photos must be image media"
|
|
36978
37304
|
}).nullable();
|
|
36979
|
-
var teamMemberDataSchema =
|
|
36980
|
-
_type:
|
|
36981
|
-
id:
|
|
36982
|
-
name:
|
|
36983
|
-
role:
|
|
36984
|
-
roleLabel:
|
|
36985
|
-
bio:
|
|
36986
|
-
summary:
|
|
37305
|
+
var teamMemberDataSchema = z63.object({
|
|
37306
|
+
_type: z63.literal("teamMember"),
|
|
37307
|
+
id: z63.string(),
|
|
37308
|
+
name: z63.string(),
|
|
37309
|
+
role: z63.string().nullable(),
|
|
37310
|
+
roleLabel: z63.string().nullable(),
|
|
37311
|
+
bio: z63.string().nullable(),
|
|
37312
|
+
summary: z63.string().nullable(),
|
|
36987
37313
|
photo: teamMemberPhotoSchema,
|
|
36988
|
-
profilePath:
|
|
37314
|
+
profilePath: z63.string().nullable()
|
|
36989
37315
|
});
|
|
36990
|
-
var teamMembersDataSchema =
|
|
37316
|
+
var teamMembersDataSchema = z63.array(teamMemberDataSchema);
|
|
36991
37317
|
var dynamicSourceWhen = { equals: "site_staff" };
|
|
36992
37318
|
var manualSourceWhen = { equals: "site_staff", not: true };
|
|
36993
37319
|
var headingNode = text(
|
|
@@ -38894,7 +39220,7 @@ var defaultTransforms = createTransformRegistry(builtinTransformDefinitions);
|
|
|
38894
39220
|
// ../blocks/src/system/data/linkedContentEntries.ts
|
|
38895
39221
|
var LINKED_CONTENT_ENTRY_META_KEY = "__rbLinkedContentEntry";
|
|
38896
39222
|
function coerceLinkedContentEntriesPayload(payload) {
|
|
38897
|
-
if (!
|
|
39223
|
+
if (!isRecord8(payload)) return payload;
|
|
38898
39224
|
const response = payload;
|
|
38899
39225
|
if (!Array.isArray(response.entries)) return payload;
|
|
38900
39226
|
const contentType = parsePublicContentTypeMeta(response.contentType);
|
|
@@ -38902,12 +39228,12 @@ function coerceLinkedContentEntriesPayload(payload) {
|
|
|
38902
39228
|
return response.entries.map((entry) => enrichLinkedContentEntry(entry, contentType));
|
|
38903
39229
|
}
|
|
38904
39230
|
function enrichLinkedContentEntry(entry, contentType) {
|
|
38905
|
-
if (!
|
|
39231
|
+
if (!isRecord8(entry)) return entry;
|
|
38906
39232
|
const entryId = typeof entry.id === "string" ? entry.id : null;
|
|
38907
39233
|
if (!entryId) return entry;
|
|
38908
39234
|
const title = typeof entry.title === "string" && entry.title.trim().length > 0 ? entry.title : entryId;
|
|
38909
39235
|
const optimisticHash = typeof entry.optimisticHash === "string" && entry.optimisticHash.length > 0 ? entry.optimisticHash : null;
|
|
38910
|
-
const content =
|
|
39236
|
+
const content = isRecord8(entry.content) ? entry.content : {};
|
|
38911
39237
|
const meta = {
|
|
38912
39238
|
kind: "linked-content-entry",
|
|
38913
39239
|
entryId,
|
|
@@ -39000,7 +39326,7 @@ function capitalize(value) {
|
|
|
39000
39326
|
return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
|
|
39001
39327
|
}
|
|
39002
39328
|
function parsePublicContentTypeMeta(value) {
|
|
39003
|
-
if (!
|
|
39329
|
+
if (!isRecord8(value)) return null;
|
|
39004
39330
|
if (typeof value.key !== "string" || value.key.trim().length === 0) return null;
|
|
39005
39331
|
return {
|
|
39006
39332
|
key: value.key,
|
|
@@ -39010,7 +39336,7 @@ function parsePublicContentTypeMeta(value) {
|
|
|
39010
39336
|
};
|
|
39011
39337
|
}
|
|
39012
39338
|
function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
39013
|
-
if (!
|
|
39339
|
+
if (!isRecord8(value) || typeof value.kind !== "string") return null;
|
|
39014
39340
|
switch (value.kind) {
|
|
39015
39341
|
case "generic":
|
|
39016
39342
|
return { kind: "generic" };
|
|
@@ -39024,7 +39350,7 @@ function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
|
39024
39350
|
}
|
|
39025
39351
|
}
|
|
39026
39352
|
function parsePublicContentTypeFieldMeta(value) {
|
|
39027
|
-
if (!
|
|
39353
|
+
if (!isRecord8(value)) return [];
|
|
39028
39354
|
if (typeof value.id !== "string" || typeof value.type !== "string") return [];
|
|
39029
39355
|
return [{
|
|
39030
39356
|
id: value.id,
|
|
@@ -39038,45 +39364,10 @@ function parseStringArray(value) {
|
|
|
39038
39364
|
if (!Array.isArray(value)) return null;
|
|
39039
39365
|
return value.filter((item) => typeof item === "string");
|
|
39040
39366
|
}
|
|
39041
|
-
function
|
|
39367
|
+
function isRecord8(value) {
|
|
39042
39368
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
39043
39369
|
}
|
|
39044
39370
|
|
|
39045
|
-
// ../blocks/src/system/manifest/richTextSchema.ts
|
|
39046
|
-
import { z as z63 } from "zod";
|
|
39047
|
-
var TipTapMarkSchema = z63.object({
|
|
39048
|
-
type: z63.string(),
|
|
39049
|
-
attrs: z63.record(z63.string(), z63.unknown()).optional()
|
|
39050
|
-
});
|
|
39051
|
-
var TipTapNodeSchema = z63.lazy(
|
|
39052
|
-
() => z63.object({
|
|
39053
|
-
type: z63.string(),
|
|
39054
|
-
content: z63.array(TipTapNodeSchema).optional(),
|
|
39055
|
-
text: z63.string().optional(),
|
|
39056
|
-
attrs: z63.record(z63.string(), z63.unknown()).optional(),
|
|
39057
|
-
marks: z63.array(TipTapMarkSchema).optional()
|
|
39058
|
-
})
|
|
39059
|
-
);
|
|
39060
|
-
var RichTextValueSchema = z63.union([
|
|
39061
|
-
// Canonical: TipTap document directly
|
|
39062
|
-
TipTapNodeSchema,
|
|
39063
|
-
// Legacy (read-tolerance only): wrapped in { doc: {...} }
|
|
39064
|
-
z63.object({
|
|
39065
|
-
doc: TipTapNodeSchema
|
|
39066
|
-
})
|
|
39067
|
-
]);
|
|
39068
|
-
var RichTextDocSchema = z63.object({
|
|
39069
|
-
type: z63.literal("doc"),
|
|
39070
|
-
content: z63.array(TipTapNodeSchema)
|
|
39071
|
-
});
|
|
39072
|
-
function unwrapRichTextRoot(value) {
|
|
39073
|
-
if (!isRecord2(value)) return value;
|
|
39074
|
-
if (!("doc" in value)) return value;
|
|
39075
|
-
const inner = value.doc;
|
|
39076
|
-
if (isRecord2(inner) && inner.type === "doc") return inner;
|
|
39077
|
-
return value;
|
|
39078
|
-
}
|
|
39079
|
-
|
|
39080
39371
|
// ../theme-core/src/navigation/presets.ts
|
|
39081
39372
|
var NAV_LINK_PRESETS = {
|
|
39082
39373
|
/**
|
|
@@ -40838,7 +41129,7 @@ function preset(id, verticalId, canonicalBehaviour, label, pluralLabel, descript
|
|
|
40838
41129
|
}
|
|
40839
41130
|
|
|
40840
41131
|
// ../api/src/utils/isRecord.ts
|
|
40841
|
-
function
|
|
41132
|
+
function isRecord9(value) {
|
|
40842
41133
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
40843
41134
|
}
|
|
40844
41135
|
|
|
@@ -41145,7 +41436,7 @@ function sanitizeMarks(marks) {
|
|
|
41145
41436
|
if (mark.type === "bold" || mark.type === "strong" || mark.type === "italic" || mark.type === "em") {
|
|
41146
41437
|
return [{ type: mark.type }];
|
|
41147
41438
|
}
|
|
41148
|
-
if (mark.type === "link" &&
|
|
41439
|
+
if (mark.type === "link" && isRecord9(mark.attrs) && typeof mark.attrs.href === "string") {
|
|
41149
41440
|
const attrs = { href: mark.attrs.href };
|
|
41150
41441
|
if (typeof mark.attrs.target === "string" && mark.attrs.target.trim().length > 0) {
|
|
41151
41442
|
attrs.target = mark.attrs.target;
|
|
@@ -41160,10 +41451,10 @@ function sanitizeMarks(marks) {
|
|
|
41160
41451
|
return sanitized.length > 0 ? sanitized : void 0;
|
|
41161
41452
|
}
|
|
41162
41453
|
function unwrapRichTextValue(value) {
|
|
41163
|
-
if (
|
|
41454
|
+
if (isRecord9(value) && isRecord9(value.doc)) {
|
|
41164
41455
|
return unwrapRichTextValue(value.doc);
|
|
41165
41456
|
}
|
|
41166
|
-
if (
|
|
41457
|
+
if (isRecord9(value) && value.type === "doc") {
|
|
41167
41458
|
return {
|
|
41168
41459
|
type: "doc",
|
|
41169
41460
|
content: Array.isArray(value.content) ? value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) : []
|
|
@@ -41172,7 +41463,7 @@ function unwrapRichTextValue(value) {
|
|
|
41172
41463
|
return EMPTY_SITE_BANNER_BODY;
|
|
41173
41464
|
}
|
|
41174
41465
|
function isTipTapNodeLike(value) {
|
|
41175
|
-
return
|
|
41466
|
+
return isRecord9(value) && typeof value.type === "string";
|
|
41176
41467
|
}
|
|
41177
41468
|
function coerceTipTapNode(value) {
|
|
41178
41469
|
return {
|
|
@@ -41180,9 +41471,9 @@ function coerceTipTapNode(value) {
|
|
|
41180
41471
|
...Array.isArray(value.content) ? { content: value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) } : {},
|
|
41181
41472
|
...typeof value.text === "string" ? { text: value.text } : {},
|
|
41182
41473
|
...Array.isArray(value.marks) ? {
|
|
41183
|
-
marks: value.marks.filter((mark) =>
|
|
41474
|
+
marks: value.marks.filter((mark) => isRecord9(mark) && typeof mark.type === "string").map((mark) => ({
|
|
41184
41475
|
type: mark.type,
|
|
41185
|
-
...
|
|
41476
|
+
...isRecord9(mark.attrs) ? { attrs: mark.attrs } : {}
|
|
41186
41477
|
}))
|
|
41187
41478
|
} : {}
|
|
41188
41479
|
};
|
|
@@ -41307,21 +41598,8 @@ var MultiPageUpdateResponse = z70.object({
|
|
|
41307
41598
|
});
|
|
41308
41599
|
|
|
41309
41600
|
// src/data/prefetchBlockData.ts
|
|
41310
|
-
var SUPPORTED_LOADER_ENDPOINTS2 = [
|
|
41311
|
-
"listPublishedEntries",
|
|
41312
|
-
"getPublishedEntryPreview",
|
|
41313
|
-
"listPublicEvents",
|
|
41314
|
-
"listPublicCourses",
|
|
41315
|
-
"listPublicTeamMembers",
|
|
41316
|
-
"listPublicProducts",
|
|
41317
|
-
"listPublicPasses",
|
|
41318
|
-
"listPublicMemberships",
|
|
41319
|
-
"getPublicFormById",
|
|
41320
|
-
"getPublicBookingServices",
|
|
41321
|
-
"getPublicEventDetails"
|
|
41322
|
-
];
|
|
41323
41601
|
function isSupportedLoaderEndpoint2(endpoint) {
|
|
41324
|
-
return
|
|
41602
|
+
return SUPPORTED_LOADER_ENDPOINTS.includes(endpoint);
|
|
41325
41603
|
}
|
|
41326
41604
|
var ENTRY_REF_KEYS = [
|
|
41327
41605
|
"identifier",
|
|
@@ -41330,7 +41608,7 @@ var ENTRY_REF_KEYS = [
|
|
|
41330
41608
|
"entryId",
|
|
41331
41609
|
"slug"
|
|
41332
41610
|
];
|
|
41333
|
-
function
|
|
41611
|
+
function isRecord10(value) {
|
|
41334
41612
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
41335
41613
|
}
|
|
41336
41614
|
function extractManualEntryRef(item) {
|
|
@@ -41338,7 +41616,7 @@ function extractManualEntryRef(item) {
|
|
|
41338
41616
|
const trimmed = item.trim();
|
|
41339
41617
|
return trimmed.length > 0 ? trimmed : null;
|
|
41340
41618
|
}
|
|
41341
|
-
if (!
|
|
41619
|
+
if (!isRecord10(item)) return null;
|
|
41342
41620
|
for (const key of ENTRY_REF_KEYS) {
|
|
41343
41621
|
const raw = item[key];
|
|
41344
41622
|
if (typeof raw === "string" && raw.trim().length > 0) {
|
|
@@ -41386,6 +41664,194 @@ function parseManualEntryRefs(...values) {
|
|
|
41386
41664
|
}
|
|
41387
41665
|
return void 0;
|
|
41388
41666
|
}
|
|
41667
|
+
var loaderAdapters = {
|
|
41668
|
+
listPublishedEntries: listPublishedEntries2,
|
|
41669
|
+
getPublishedEntryPreview,
|
|
41670
|
+
listPublicEvents,
|
|
41671
|
+
getPublicEventDetails,
|
|
41672
|
+
listPublicCourses,
|
|
41673
|
+
listPublicRouteCandidates,
|
|
41674
|
+
listPublicTeamMembers,
|
|
41675
|
+
listPublicProducts,
|
|
41676
|
+
listPublicPasses,
|
|
41677
|
+
listPublicMemberships,
|
|
41678
|
+
getPublicFormById,
|
|
41679
|
+
getPublicBookingServices
|
|
41680
|
+
};
|
|
41681
|
+
function readStringParam(params, key) {
|
|
41682
|
+
const value = params[key];
|
|
41683
|
+
return value && value.length > 0 ? value : void 0;
|
|
41684
|
+
}
|
|
41685
|
+
function requireStringParam(params, key, endpoint) {
|
|
41686
|
+
const value = readStringParam(params, key);
|
|
41687
|
+
if (!value) {
|
|
41688
|
+
throw new Error(`${endpoint} requires ${key} param`);
|
|
41689
|
+
}
|
|
41690
|
+
return value;
|
|
41691
|
+
}
|
|
41692
|
+
function parsePositiveIntegerParam(params, key) {
|
|
41693
|
+
const value = params[key];
|
|
41694
|
+
const parsed = value === void 0 ? void 0 : Number.parseInt(value, 10);
|
|
41695
|
+
return typeof parsed === "number" && Number.isInteger(parsed) && parsed > 0 ? parsed : void 0;
|
|
41696
|
+
}
|
|
41697
|
+
function parseEntryOrder(value) {
|
|
41698
|
+
if (value === void 0) return void 0;
|
|
41699
|
+
switch (value) {
|
|
41700
|
+
case "order":
|
|
41701
|
+
return "manual";
|
|
41702
|
+
case "newest":
|
|
41703
|
+
case "oldest":
|
|
41704
|
+
case "title":
|
|
41705
|
+
return value;
|
|
41706
|
+
default:
|
|
41707
|
+
return void 0;
|
|
41708
|
+
}
|
|
41709
|
+
}
|
|
41710
|
+
function parsePublicEventKind(value) {
|
|
41711
|
+
if (value === void 0) return void 0;
|
|
41712
|
+
switch (value) {
|
|
41713
|
+
case "all":
|
|
41714
|
+
case "courses":
|
|
41715
|
+
case "events":
|
|
41716
|
+
return value;
|
|
41717
|
+
default:
|
|
41718
|
+
return void 0;
|
|
41719
|
+
}
|
|
41720
|
+
}
|
|
41721
|
+
async function listPublishedEntries2({ client, params }) {
|
|
41722
|
+
const siteId = requireStringParam(params, "siteId", "listPublishedEntries");
|
|
41723
|
+
const type = requireStringParam(params, "type", "listPublishedEntries");
|
|
41724
|
+
const stage = readStringParam(params, "stage");
|
|
41725
|
+
const mode = readStringParam(params, "mode");
|
|
41726
|
+
const parsedEntryRefs = mode === "manual" ? parseManualEntryRefs(params.identifiers, params.entryRefs, params.entryIds) : void 0;
|
|
41727
|
+
if (mode === "manual" && (!parsedEntryRefs || parsedEntryRefs.length === 0)) {
|
|
41728
|
+
return { entries: [] };
|
|
41729
|
+
}
|
|
41730
|
+
if (mode === "manual" && parsedEntryRefs) {
|
|
41731
|
+
return await client.getEntriesByIdentifiers({
|
|
41732
|
+
siteId,
|
|
41733
|
+
contentType: type,
|
|
41734
|
+
identifiers: parsedEntryRefs,
|
|
41735
|
+
preview: stage === "preview"
|
|
41736
|
+
});
|
|
41737
|
+
}
|
|
41738
|
+
return await client.getEntries({
|
|
41739
|
+
siteId,
|
|
41740
|
+
contentType: type,
|
|
41741
|
+
limit: parsePositiveIntegerParam(params, "limit"),
|
|
41742
|
+
order: parseEntryOrder(readStringParam(params, "orderBy")),
|
|
41743
|
+
preview: stage === "preview"
|
|
41744
|
+
});
|
|
41745
|
+
}
|
|
41746
|
+
async function getPublishedEntryPreview({ client, params }) {
|
|
41747
|
+
return await client.getEntry({
|
|
41748
|
+
siteId: requireStringParam(params, "siteId", "getPublishedEntryPreview"),
|
|
41749
|
+
contentType: requireStringParam(params, "type", "getPublishedEntryPreview"),
|
|
41750
|
+
slug: requireStringParam(params, "slug", "getPublishedEntryPreview")
|
|
41751
|
+
});
|
|
41752
|
+
}
|
|
41753
|
+
async function listPublicEvents({ client, params }) {
|
|
41754
|
+
return await client.listPublicEvents({
|
|
41755
|
+
siteId: requireStringParam(params, "siteId", "listPublicEvents"),
|
|
41756
|
+
limit: parsePositiveIntegerParam(params, "limit"),
|
|
41757
|
+
from: readStringParam(params, "from"),
|
|
41758
|
+
to: readStringParam(params, "to"),
|
|
41759
|
+
afterStartsAt: readStringParam(params, "afterStartsAt"),
|
|
41760
|
+
afterId: readStringParam(params, "afterId"),
|
|
41761
|
+
stage: readStringParam(params, "stage"),
|
|
41762
|
+
categoryIds: readStringParam(params, "categoryIds"),
|
|
41763
|
+
venueId: readStringParam(params, "venueId"),
|
|
41764
|
+
staffMemberId: readStringParam(params, "staffMemberId"),
|
|
41765
|
+
kind: parsePublicEventKind(readStringParam(params, "kind")),
|
|
41766
|
+
eventSurface: readStringParam(params, "eventSurface"),
|
|
41767
|
+
eventPresets: readStringParam(params, "eventPresets"),
|
|
41768
|
+
scheduleScope: readStringParam(params, "scheduleScope"),
|
|
41769
|
+
entryId: readStringParam(params, "entryId"),
|
|
41770
|
+
seriesId: readStringParam(params, "seriesId"),
|
|
41771
|
+
includeOccurrenceId: readStringParam(params, "includeOccurrenceId")
|
|
41772
|
+
});
|
|
41773
|
+
}
|
|
41774
|
+
async function getPublicEventDetails({ client, params }) {
|
|
41775
|
+
return await client.getPublicEventDetails({
|
|
41776
|
+
siteId: requireStringParam(params, "siteId", "getPublicEventDetails"),
|
|
41777
|
+
limit: parsePositiveIntegerParam(params, "limit"),
|
|
41778
|
+
from: readStringParam(params, "from"),
|
|
41779
|
+
to: readStringParam(params, "to"),
|
|
41780
|
+
afterStartsAt: readStringParam(params, "afterStartsAt"),
|
|
41781
|
+
afterId: readStringParam(params, "afterId"),
|
|
41782
|
+
stage: readStringParam(params, "stage"),
|
|
41783
|
+
categoryIds: readStringParam(params, "categoryIds"),
|
|
41784
|
+
venueId: readStringParam(params, "venueId"),
|
|
41785
|
+
staffMemberId: readStringParam(params, "staffMemberId"),
|
|
41786
|
+
kind: readStringParam(params, "kind"),
|
|
41787
|
+
eventSurface: readStringParam(params, "eventSurface"),
|
|
41788
|
+
eventPresets: readStringParam(params, "eventPresets"),
|
|
41789
|
+
scheduleScope: readStringParam(params, "scheduleScope"),
|
|
41790
|
+
entryId: readStringParam(params, "entryId"),
|
|
41791
|
+
seriesId: readStringParam(params, "seriesId"),
|
|
41792
|
+
includeOccurrenceId: readStringParam(params, "includeOccurrenceId")
|
|
41793
|
+
});
|
|
41794
|
+
}
|
|
41795
|
+
async function listPublicCourses({ client, params }) {
|
|
41796
|
+
return await client.listPublicCourses({
|
|
41797
|
+
siteId: requireStringParam(params, "siteId", "listPublicCourses"),
|
|
41798
|
+
limit: parsePositiveIntegerParam(params, "limit"),
|
|
41799
|
+
stage: readStringParam(params, "stage")
|
|
41800
|
+
});
|
|
41801
|
+
}
|
|
41802
|
+
async function listPublicRouteCandidates({ client, params }) {
|
|
41803
|
+
const siteId = requireStringParam(params, "siteId", "listPublicRouteCandidates");
|
|
41804
|
+
const response = await client.getAllPublishedRoutes({ siteId });
|
|
41805
|
+
return {
|
|
41806
|
+
routes: response.items.flatMap((item) => {
|
|
41807
|
+
if (!item.path) return [];
|
|
41808
|
+
return [{
|
|
41809
|
+
entityId: item.entityId,
|
|
41810
|
+
path: item.path,
|
|
41811
|
+
title: item.title,
|
|
41812
|
+
kind: item.entityType,
|
|
41813
|
+
contentTypeKey: item.contentTypeKey ?? null
|
|
41814
|
+
}];
|
|
41815
|
+
})
|
|
41816
|
+
};
|
|
41817
|
+
}
|
|
41818
|
+
async function listPublicTeamMembers({ client, params }) {
|
|
41819
|
+
return await client.listPublicTeamMembers({
|
|
41820
|
+
siteId: requireStringParam(params, "siteId", "listPublicTeamMembers"),
|
|
41821
|
+
stage: readStringParam(params, "stage")
|
|
41822
|
+
});
|
|
41823
|
+
}
|
|
41824
|
+
async function listPublicProducts({ client, params }) {
|
|
41825
|
+
return await client.listPublicProducts({
|
|
41826
|
+
siteId: requireStringParam(params, "siteId", "listPublicProducts"),
|
|
41827
|
+
stage: readStringParam(params, "stage") === "preview" ? "preview" : "published",
|
|
41828
|
+
categorySelector: parsePublicProductCategorySelector(params.categorySelector)
|
|
41829
|
+
});
|
|
41830
|
+
}
|
|
41831
|
+
async function listPublicPasses({ client, params }) {
|
|
41832
|
+
return await client.listPublicPasses({
|
|
41833
|
+
siteId: requireStringParam(params, "siteId", "listPublicPasses"),
|
|
41834
|
+
categories: readStringParam(params, "categories")
|
|
41835
|
+
});
|
|
41836
|
+
}
|
|
41837
|
+
async function listPublicMemberships({ client, params }) {
|
|
41838
|
+
return await client.listPublicMemberships({
|
|
41839
|
+
siteId: requireStringParam(params, "siteId", "listPublicMemberships"),
|
|
41840
|
+
categories: readStringParam(params, "categories")
|
|
41841
|
+
});
|
|
41842
|
+
}
|
|
41843
|
+
async function getPublicFormById({ client, params }) {
|
|
41844
|
+
return await client.getPublicFormById({
|
|
41845
|
+
formId: requireStringParam(params, "formId", "getPublicFormById"),
|
|
41846
|
+
siteId: requireStringParam(params, "siteId", "getPublicFormById")
|
|
41847
|
+
});
|
|
41848
|
+
}
|
|
41849
|
+
async function getPublicBookingServices({ client, params }) {
|
|
41850
|
+
return await client.getPublicBookingServices({
|
|
41851
|
+
siteId: requireStringParam(params, "siteId", "getPublicBookingServices"),
|
|
41852
|
+
ids: readStringParam(params, "ids")
|
|
41853
|
+
});
|
|
41854
|
+
}
|
|
41389
41855
|
async function prefetchBlockData2(page, context, client, options) {
|
|
41390
41856
|
const { customBlocks } = options ?? {};
|
|
41391
41857
|
const customBlockMap = new Map(
|
|
@@ -41395,189 +41861,11 @@ async function prefetchBlockData2(page, context, client, options) {
|
|
|
41395
41861
|
apiClient: async ({ endpoint, params }) => {
|
|
41396
41862
|
if (!isSupportedLoaderEndpoint2(endpoint)) {
|
|
41397
41863
|
throw new Error(
|
|
41398
|
-
`Unsupported loader endpoint: ${endpoint}. SDK only supports: ${
|
|
41864
|
+
`Unsupported loader endpoint: ${endpoint}. SDK only supports: ${SUPPORTED_LOADER_ENDPOINTS.join(", ")}`
|
|
41399
41865
|
);
|
|
41400
41866
|
}
|
|
41401
41867
|
const resolvedParams = normalizeLoaderParams(endpoint, params, context);
|
|
41402
|
-
|
|
41403
|
-
case "listPublishedEntries": {
|
|
41404
|
-
const {
|
|
41405
|
-
siteId,
|
|
41406
|
-
type,
|
|
41407
|
-
orderBy,
|
|
41408
|
-
limit,
|
|
41409
|
-
stage,
|
|
41410
|
-
mode,
|
|
41411
|
-
entryIds,
|
|
41412
|
-
identifiers,
|
|
41413
|
-
entryRefs
|
|
41414
|
-
} = resolvedParams ?? {};
|
|
41415
|
-
if (!siteId || !type) {
|
|
41416
|
-
throw new Error("listPublishedEntries requires siteId and type params");
|
|
41417
|
-
}
|
|
41418
|
-
const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
|
|
41419
|
-
const order = orderBy === "order" ? "manual" : orderBy === "newest" || orderBy === "oldest" || orderBy === "title" ? orderBy : void 0;
|
|
41420
|
-
const parsedEntryRefs = mode === "manual" ? parseManualEntryRefs(identifiers, entryRefs, entryIds) : void 0;
|
|
41421
|
-
if (mode === "manual" && (!parsedEntryRefs || parsedEntryRefs.length === 0)) {
|
|
41422
|
-
return { entries: [] };
|
|
41423
|
-
}
|
|
41424
|
-
if (mode === "manual" && parsedEntryRefs) {
|
|
41425
|
-
return await client.getEntriesByIdentifiers({
|
|
41426
|
-
siteId,
|
|
41427
|
-
contentType: type,
|
|
41428
|
-
identifiers: parsedEntryRefs,
|
|
41429
|
-
preview: stage === "preview"
|
|
41430
|
-
});
|
|
41431
|
-
}
|
|
41432
|
-
return await client.getEntries({
|
|
41433
|
-
siteId,
|
|
41434
|
-
contentType: type,
|
|
41435
|
-
limit: parsedLimit,
|
|
41436
|
-
order,
|
|
41437
|
-
preview: stage === "preview"
|
|
41438
|
-
});
|
|
41439
|
-
}
|
|
41440
|
-
case "getPublishedEntryPreview": {
|
|
41441
|
-
const { siteId, type, slug } = resolvedParams ?? {};
|
|
41442
|
-
if (!siteId || !type || !slug) {
|
|
41443
|
-
throw new Error("getPublishedEntryPreview requires siteId, type, and slug params");
|
|
41444
|
-
}
|
|
41445
|
-
return await client.getEntry({ siteId, contentType: type, slug });
|
|
41446
|
-
}
|
|
41447
|
-
case "listPublicEvents": {
|
|
41448
|
-
const {
|
|
41449
|
-
siteId,
|
|
41450
|
-
limit,
|
|
41451
|
-
from,
|
|
41452
|
-
to,
|
|
41453
|
-
stage,
|
|
41454
|
-
categoryIds,
|
|
41455
|
-
venueId,
|
|
41456
|
-
kind,
|
|
41457
|
-
entryId,
|
|
41458
|
-
seriesId,
|
|
41459
|
-
includeOccurrenceId
|
|
41460
|
-
} = resolvedParams ?? {};
|
|
41461
|
-
if (!siteId) {
|
|
41462
|
-
throw new Error("listPublicEvents requires siteId param");
|
|
41463
|
-
}
|
|
41464
|
-
const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
|
|
41465
|
-
return await client.listPublicEvents({
|
|
41466
|
-
siteId,
|
|
41467
|
-
limit: parsedLimit,
|
|
41468
|
-
from,
|
|
41469
|
-
to,
|
|
41470
|
-
stage,
|
|
41471
|
-
categoryIds: typeof categoryIds === "string" ? categoryIds : void 0,
|
|
41472
|
-
venueId: typeof venueId === "string" ? venueId : void 0,
|
|
41473
|
-
kind: kind === "all" || kind === "courses" || kind === "events" ? kind : void 0,
|
|
41474
|
-
entryId: typeof entryId === "string" ? entryId : void 0,
|
|
41475
|
-
seriesId: typeof seriesId === "string" ? seriesId : void 0,
|
|
41476
|
-
includeOccurrenceId: typeof includeOccurrenceId === "string" ? includeOccurrenceId : void 0
|
|
41477
|
-
});
|
|
41478
|
-
}
|
|
41479
|
-
case "getPublicEventDetails": {
|
|
41480
|
-
const {
|
|
41481
|
-
siteId,
|
|
41482
|
-
limit,
|
|
41483
|
-
from,
|
|
41484
|
-
to,
|
|
41485
|
-
afterStartsAt,
|
|
41486
|
-
afterId,
|
|
41487
|
-
stage,
|
|
41488
|
-
categoryIds,
|
|
41489
|
-
venueId,
|
|
41490
|
-
staffMemberId,
|
|
41491
|
-
kind,
|
|
41492
|
-
entryId,
|
|
41493
|
-
seriesId,
|
|
41494
|
-
includeOccurrenceId
|
|
41495
|
-
} = resolvedParams ?? {};
|
|
41496
|
-
if (!siteId) {
|
|
41497
|
-
throw new Error("getPublicEventDetails requires siteId param");
|
|
41498
|
-
}
|
|
41499
|
-
const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
|
|
41500
|
-
return await client.getPublicEventDetails({
|
|
41501
|
-
siteId,
|
|
41502
|
-
limit: parsedLimit,
|
|
41503
|
-
from: typeof from === "string" ? from : void 0,
|
|
41504
|
-
to: typeof to === "string" ? to : void 0,
|
|
41505
|
-
afterStartsAt: typeof afterStartsAt === "string" ? afterStartsAt : void 0,
|
|
41506
|
-
afterId: typeof afterId === "string" ? afterId : void 0,
|
|
41507
|
-
stage: typeof stage === "string" ? stage : void 0,
|
|
41508
|
-
categoryIds: typeof categoryIds === "string" ? categoryIds : void 0,
|
|
41509
|
-
venueId: typeof venueId === "string" ? venueId : void 0,
|
|
41510
|
-
staffMemberId: typeof staffMemberId === "string" ? staffMemberId : void 0,
|
|
41511
|
-
kind: typeof kind === "string" ? kind : void 0,
|
|
41512
|
-
entryId: typeof entryId === "string" ? entryId : void 0,
|
|
41513
|
-
seriesId: typeof seriesId === "string" ? seriesId : void 0,
|
|
41514
|
-
includeOccurrenceId: typeof includeOccurrenceId === "string" ? includeOccurrenceId : void 0
|
|
41515
|
-
});
|
|
41516
|
-
}
|
|
41517
|
-
case "listPublicCourses": {
|
|
41518
|
-
const { siteId, limit, stage } = resolvedParams ?? {};
|
|
41519
|
-
if (!siteId) {
|
|
41520
|
-
throw new Error("listPublicCourses requires siteId param");
|
|
41521
|
-
}
|
|
41522
|
-
const parsedLimit = typeof limit === "string" ? Number.parseInt(limit, 10) : typeof limit === "number" ? limit : void 0;
|
|
41523
|
-
return await client.listPublicCourses({ siteId, limit: parsedLimit, stage });
|
|
41524
|
-
}
|
|
41525
|
-
case "listPublicTeamMembers": {
|
|
41526
|
-
const { siteId, stage } = resolvedParams ?? {};
|
|
41527
|
-
if (!siteId) {
|
|
41528
|
-
throw new Error("listPublicTeamMembers requires siteId param");
|
|
41529
|
-
}
|
|
41530
|
-
return await client.listPublicTeamMembers({
|
|
41531
|
-
siteId,
|
|
41532
|
-
stage: typeof stage === "string" ? stage : void 0
|
|
41533
|
-
});
|
|
41534
|
-
}
|
|
41535
|
-
case "listPublicProducts": {
|
|
41536
|
-
const { siteId, stage, categorySelector } = resolvedParams ?? {};
|
|
41537
|
-
if (!siteId) {
|
|
41538
|
-
throw new Error("listPublicProducts requires siteId param");
|
|
41539
|
-
}
|
|
41540
|
-
return await client.listPublicProducts({
|
|
41541
|
-
siteId,
|
|
41542
|
-
stage: stage === "preview" ? "preview" : "published",
|
|
41543
|
-
categorySelector: parsePublicProductCategorySelector(categorySelector)
|
|
41544
|
-
});
|
|
41545
|
-
}
|
|
41546
|
-
case "getPublicFormById": {
|
|
41547
|
-
const { formId, siteId } = resolvedParams ?? {};
|
|
41548
|
-
if (!formId) {
|
|
41549
|
-
throw new Error("getPublicFormById requires formId param");
|
|
41550
|
-
}
|
|
41551
|
-
if (!siteId) {
|
|
41552
|
-
throw new Error("getPublicFormById requires siteId param");
|
|
41553
|
-
}
|
|
41554
|
-
return await client.getPublicFormById({ formId, siteId });
|
|
41555
|
-
}
|
|
41556
|
-
case "getPublicBookingServices": {
|
|
41557
|
-
const { siteId, ids } = resolvedParams ?? {};
|
|
41558
|
-
if (!siteId) {
|
|
41559
|
-
throw new Error("getPublicBookingServices requires siteId param");
|
|
41560
|
-
}
|
|
41561
|
-
return await client.getPublicBookingServices({ siteId, ids });
|
|
41562
|
-
}
|
|
41563
|
-
case "listPublicPasses": {
|
|
41564
|
-
const { siteId, categories } = resolvedParams ?? {};
|
|
41565
|
-
if (!siteId) {
|
|
41566
|
-
throw new Error("listPublicPasses requires siteId param");
|
|
41567
|
-
}
|
|
41568
|
-
return await client.listPublicPasses({ siteId, categories });
|
|
41569
|
-
}
|
|
41570
|
-
case "listPublicMemberships": {
|
|
41571
|
-
const { siteId, categories } = resolvedParams ?? {};
|
|
41572
|
-
if (!siteId) {
|
|
41573
|
-
throw new Error("listPublicMemberships requires siteId param");
|
|
41574
|
-
}
|
|
41575
|
-
return await client.listPublicMemberships({ siteId, categories });
|
|
41576
|
-
}
|
|
41577
|
-
default: {
|
|
41578
|
-
throw new Error("Unhandled endpoint");
|
|
41579
|
-
}
|
|
41580
|
-
}
|
|
41868
|
+
return await loaderAdapters[endpoint]({ client, params: resolvedParams });
|
|
41581
41869
|
},
|
|
41582
41870
|
isValidEndpoint: isSupportedLoaderEndpoint2,
|
|
41583
41871
|
onError: (error, { block, loader }) => {
|
|
@@ -41665,6 +41953,76 @@ function resolveSiteCustomBlocks(site) {
|
|
|
41665
41953
|
return void 0;
|
|
41666
41954
|
}
|
|
41667
41955
|
|
|
41956
|
+
// src/rendering/helpers/pageRuntimeSupport.ts
|
|
41957
|
+
function buildSiteRenderSupport(site, mediaAssets) {
|
|
41958
|
+
const customBlocks = resolveSiteCustomBlocks(site);
|
|
41959
|
+
return {
|
|
41960
|
+
theme: site.theme,
|
|
41961
|
+
site: site.site,
|
|
41962
|
+
sdkConfig: site.sdkConfig ?? null,
|
|
41963
|
+
bookingOfferingPresets: site.bookingOfferingPresets ?? [],
|
|
41964
|
+
...customBlocks ? { customBlocks } : {},
|
|
41965
|
+
supabaseUrl: site.supabaseUrl,
|
|
41966
|
+
routeMap: site.routes,
|
|
41967
|
+
pagesByIdentifier: site.pagesByIdentifier,
|
|
41968
|
+
entriesByIdentifier: site.entriesByIdentifier,
|
|
41969
|
+
...mediaAssets ? { mediaAssets } : {}
|
|
41970
|
+
};
|
|
41971
|
+
}
|
|
41972
|
+
function collectMediaAssetSidecar(mediaAssets) {
|
|
41973
|
+
return Array.isArray(mediaAssets) && mediaAssets.length > 0 ? mediaAssets : void 0;
|
|
41974
|
+
}
|
|
41975
|
+
function convertPageResponseBlock(block) {
|
|
41976
|
+
if (!isRecord11(block)) {
|
|
41977
|
+
throw new Error("Invalid block format in page API response");
|
|
41978
|
+
}
|
|
41979
|
+
if (typeof block.id !== "string" && block.id !== null) {
|
|
41980
|
+
throw new Error(`Invalid block id in page: expected string or null, got ${typeof block.id}`);
|
|
41981
|
+
}
|
|
41982
|
+
if (typeof block.kind !== "string") {
|
|
41983
|
+
throw new Error(`Invalid block kind in page: expected string, got ${typeof block.kind}`);
|
|
41984
|
+
}
|
|
41985
|
+
if (typeof block.purpose !== "string") {
|
|
41986
|
+
throw new Error(`Invalid block purpose in page: expected string, got ${typeof block.purpose}`);
|
|
41987
|
+
}
|
|
41988
|
+
return {
|
|
41989
|
+
id: block.id,
|
|
41990
|
+
kind: block.kind,
|
|
41991
|
+
purpose: block.purpose,
|
|
41992
|
+
content: sanitizeSdkRuntimeBlockContent(block.kind, readContentRecord(block.content) ?? {}),
|
|
41993
|
+
draftContent: sanitizeNullableSdkRuntimeBlockContent(
|
|
41994
|
+
block.kind,
|
|
41995
|
+
readNestedContentRecord(block.draftContent)
|
|
41996
|
+
)
|
|
41997
|
+
};
|
|
41998
|
+
}
|
|
41999
|
+
function buildPageOutline(input) {
|
|
42000
|
+
return {
|
|
42001
|
+
name: input.name,
|
|
42002
|
+
path: input.path ?? input.fallbackPath,
|
|
42003
|
+
purpose: input.purpose,
|
|
42004
|
+
blocks: input.blocks.map(convertPageResponseBlock)
|
|
42005
|
+
};
|
|
42006
|
+
}
|
|
42007
|
+
function isRecord11(value) {
|
|
42008
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
42009
|
+
}
|
|
42010
|
+
function readContentRecord(value) {
|
|
42011
|
+
return isRecord11(value) ? value : void 0;
|
|
42012
|
+
}
|
|
42013
|
+
function readNestedContentRecord(value) {
|
|
42014
|
+
if (!isRecord11(value)) return null;
|
|
42015
|
+
return readContentRecord(value.data) ?? null;
|
|
42016
|
+
}
|
|
42017
|
+
function sanitizeSdkRuntimeBlockContent(blockKind, content) {
|
|
42018
|
+
if (blockKind !== "block.newsletter-signup") return content;
|
|
42019
|
+
const sanitized = sanitizeNewsletterSignupPublicContent(content);
|
|
42020
|
+
return isRecord11(sanitized) ? sanitized : {};
|
|
42021
|
+
}
|
|
42022
|
+
function sanitizeNullableSdkRuntimeBlockContent(blockKind, content) {
|
|
42023
|
+
return content ? sanitizeSdkRuntimeBlockContent(blockKind, content) : null;
|
|
42024
|
+
}
|
|
42025
|
+
|
|
41668
42026
|
// src/rendering/helpers/loadPage.ts
|
|
41669
42027
|
async function loadPage(params) {
|
|
41670
42028
|
const { client, siteId, path, pageId, preview = false, dataLoaderOverrides, searchParams, forceSite } = params;
|
|
@@ -41672,45 +42030,23 @@ async function loadPage(params) {
|
|
|
41672
42030
|
client.getSite({ id: siteId, ...forceSite ? { force: true } : {} }),
|
|
41673
42031
|
client.getPage({ siteId, path, preview })
|
|
41674
42032
|
]);
|
|
41675
|
-
const customBlocks = resolveSiteCustomBlocks(site);
|
|
41676
42033
|
if ("entry" in pageResponse) {
|
|
41677
42034
|
throw new Error(
|
|
41678
42035
|
"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."
|
|
41679
42036
|
);
|
|
41680
42037
|
}
|
|
41681
42038
|
const { page: pageData } = pageResponse;
|
|
41682
|
-
const
|
|
41683
|
-
|
|
41684
|
-
|
|
41685
|
-
|
|
41686
|
-
|
|
41687
|
-
if (typeof block.id !== "string" && block.id !== null) {
|
|
41688
|
-
throw new Error(`Invalid block id: expected string or null, got ${typeof block.id}`);
|
|
41689
|
-
}
|
|
41690
|
-
if (typeof block.kind !== "string") {
|
|
41691
|
-
throw new Error(`Invalid block kind: expected string, got ${typeof block.kind}`);
|
|
41692
|
-
}
|
|
41693
|
-
if (typeof block.purpose !== "string") {
|
|
41694
|
-
throw new Error(`Invalid block purpose: expected string, got ${typeof block.purpose}`);
|
|
41695
|
-
}
|
|
41696
|
-
const typedBlock = block;
|
|
41697
|
-
return {
|
|
41698
|
-
id: typedBlock.id,
|
|
41699
|
-
kind: typedBlock.kind,
|
|
41700
|
-
purpose: typedBlock.purpose,
|
|
41701
|
-
// Include content for PageRenderer's getRenderableContent()
|
|
41702
|
-
content: typedBlock.content ?? {},
|
|
41703
|
-
// Include draftContent if available (for preview mode)
|
|
41704
|
-
draftContent: typedBlock.draftContent?.data ?? null
|
|
41705
|
-
};
|
|
41706
|
-
});
|
|
41707
|
-
const canonicalPagePath = pageData.path ?? path;
|
|
41708
|
-
const pageOutline = {
|
|
42039
|
+
const support = buildSiteRenderSupport(
|
|
42040
|
+
site,
|
|
42041
|
+
collectMediaAssetSidecar(pageResponse.mediaAssets)
|
|
42042
|
+
);
|
|
42043
|
+
const pageOutline = buildPageOutline({
|
|
41709
42044
|
name: pageData.name,
|
|
41710
|
-
path:
|
|
42045
|
+
path: pageData.path,
|
|
42046
|
+
fallbackPath: path,
|
|
41711
42047
|
purpose: pageData.purpose,
|
|
41712
|
-
blocks
|
|
41713
|
-
};
|
|
42048
|
+
blocks: pageData.blocks
|
|
42049
|
+
});
|
|
41714
42050
|
const prefetchContext = {
|
|
41715
42051
|
siteId,
|
|
41716
42052
|
pageId: pageId ?? pageData.id,
|
|
@@ -41723,7 +42059,7 @@ async function loadPage(params) {
|
|
|
41723
42059
|
client,
|
|
41724
42060
|
{
|
|
41725
42061
|
// Pass custom blocks so their config-based loaders are discovered
|
|
41726
|
-
customBlocks
|
|
42062
|
+
customBlocks: support.customBlocks
|
|
41727
42063
|
}
|
|
41728
42064
|
);
|
|
41729
42065
|
let resolvedData = configData;
|
|
@@ -41733,22 +42069,20 @@ async function loadPage(params) {
|
|
|
41733
42069
|
}
|
|
41734
42070
|
return {
|
|
41735
42071
|
page: pageOutline,
|
|
41736
|
-
theme:
|
|
41737
|
-
sdkConfig:
|
|
42072
|
+
theme: support.theme,
|
|
42073
|
+
sdkConfig: support.sdkConfig,
|
|
41738
42074
|
siteId,
|
|
41739
42075
|
resolvedData,
|
|
41740
|
-
|
|
41741
|
-
|
|
41742
|
-
...
|
|
42076
|
+
bookingOfferingPresets: support.bookingOfferingPresets,
|
|
42077
|
+
supabaseUrl: support.supabaseUrl,
|
|
42078
|
+
...support.mediaAssets ? { mediaAssets: support.mediaAssets } : {},
|
|
42079
|
+
...support.customBlocks ? { customBlocks: support.customBlocks } : {},
|
|
41743
42080
|
// Maps for CTA link resolution (e.g., { kind: 'page', identifier: 'about' })
|
|
41744
|
-
routeMap:
|
|
41745
|
-
pagesByIdentifier:
|
|
41746
|
-
entriesByIdentifier:
|
|
42081
|
+
routeMap: support.routeMap,
|
|
42082
|
+
pagesByIdentifier: support.pagesByIdentifier,
|
|
42083
|
+
entriesByIdentifier: support.entriesByIdentifier
|
|
41747
42084
|
};
|
|
41748
42085
|
}
|
|
41749
|
-
function toMediaAssetSidecar(mediaAssets) {
|
|
41750
|
-
return mediaAssets ?? [];
|
|
41751
|
-
}
|
|
41752
42086
|
|
|
41753
42087
|
// ../blocks/src/bindings/types.ts
|
|
41754
42088
|
var TRANSFORMS = {
|
|
@@ -42023,8 +42357,10 @@ async function loadContent(params) {
|
|
|
42023
42357
|
}
|
|
42024
42358
|
const site = siteResult.value;
|
|
42025
42359
|
const contentResponse = contentResult.value;
|
|
42026
|
-
const
|
|
42027
|
-
|
|
42360
|
+
const support = buildSiteRenderSupport(
|
|
42361
|
+
site,
|
|
42362
|
+
collectMediaAssetSidecar(contentResponse.mediaAssets)
|
|
42363
|
+
);
|
|
42028
42364
|
if (isEntryResponse(contentResponse)) {
|
|
42029
42365
|
const entryData = contentResponse.entry;
|
|
42030
42366
|
const draftContent = entryData.draftContent;
|
|
@@ -42050,13 +42386,14 @@ async function loadContent(params) {
|
|
|
42050
42386
|
entry,
|
|
42051
42387
|
{ siteId, preview },
|
|
42052
42388
|
client,
|
|
42053
|
-
{ customBlocks }
|
|
42389
|
+
{ customBlocks: support.customBlocks }
|
|
42054
42390
|
);
|
|
42055
42391
|
return {
|
|
42056
42392
|
type: "entry",
|
|
42057
42393
|
entry,
|
|
42058
42394
|
templatePage,
|
|
42059
42395
|
resolvedData: resolvedData2,
|
|
42396
|
+
bookingOfferingPresets: support.bookingOfferingPresets,
|
|
42060
42397
|
dataContext: {
|
|
42061
42398
|
contentEntry: {
|
|
42062
42399
|
...entry.content ?? {},
|
|
@@ -42068,29 +42405,29 @@ async function loadContent(params) {
|
|
|
42068
42405
|
_contentTypeSlug: entry.type
|
|
42069
42406
|
}
|
|
42070
42407
|
},
|
|
42071
|
-
theme:
|
|
42408
|
+
theme: support.theme,
|
|
42072
42409
|
siteId,
|
|
42073
|
-
...customBlocks ? { customBlocks } : {},
|
|
42074
|
-
site:
|
|
42075
|
-
sdkConfig:
|
|
42076
|
-
supabaseUrl:
|
|
42077
|
-
routeMap:
|
|
42078
|
-
pagesByIdentifier:
|
|
42079
|
-
entriesByIdentifier:
|
|
42080
|
-
...mediaAssets ? { mediaAssets } : {}
|
|
42410
|
+
...support.customBlocks ? { customBlocks: support.customBlocks } : {},
|
|
42411
|
+
site: support.site,
|
|
42412
|
+
sdkConfig: support.sdkConfig,
|
|
42413
|
+
supabaseUrl: support.supabaseUrl,
|
|
42414
|
+
routeMap: support.routeMap,
|
|
42415
|
+
pagesByIdentifier: support.pagesByIdentifier,
|
|
42416
|
+
entriesByIdentifier: support.entriesByIdentifier,
|
|
42417
|
+
...support.mediaAssets ? { mediaAssets: support.mediaAssets } : {}
|
|
42081
42418
|
};
|
|
42082
42419
|
}
|
|
42083
42420
|
const { page: pageData } = contentResponse;
|
|
42084
42421
|
const pageRecord = pageData;
|
|
42085
42422
|
const canonicalPagePath = pageData.path ?? pageRecord.path ?? "/";
|
|
42086
42423
|
const draftPagePath = pageRecord.draftPath ?? pageRecord.path ?? canonicalPagePath;
|
|
42087
|
-
const
|
|
42088
|
-
const pageOutline = {
|
|
42424
|
+
const pageOutline = buildPageOutline({
|
|
42089
42425
|
name: pageData.name,
|
|
42090
42426
|
path: canonicalPagePath,
|
|
42427
|
+
fallbackPath: "/",
|
|
42091
42428
|
purpose: pageData.purpose,
|
|
42092
|
-
blocks
|
|
42093
|
-
};
|
|
42429
|
+
blocks: pageData.blocks
|
|
42430
|
+
});
|
|
42094
42431
|
const resolvedData = await prefetchBlockData2(
|
|
42095
42432
|
pageOutline,
|
|
42096
42433
|
{
|
|
@@ -42099,7 +42436,7 @@ async function loadContent(params) {
|
|
|
42099
42436
|
previewStage: preview ? "preview" : "published"
|
|
42100
42437
|
},
|
|
42101
42438
|
client,
|
|
42102
|
-
{ customBlocks }
|
|
42439
|
+
{ customBlocks: support.customBlocks }
|
|
42103
42440
|
);
|
|
42104
42441
|
return {
|
|
42105
42442
|
type: "page",
|
|
@@ -42120,56 +42457,23 @@ async function loadContent(params) {
|
|
|
42120
42457
|
ogImageId: pageRecord.ogImageId ?? null
|
|
42121
42458
|
},
|
|
42122
42459
|
page: pageOutline,
|
|
42123
|
-
theme:
|
|
42460
|
+
theme: support.theme,
|
|
42124
42461
|
siteId,
|
|
42125
|
-
...customBlocks ? { customBlocks } : {},
|
|
42462
|
+
...support.customBlocks ? { customBlocks: support.customBlocks } : {},
|
|
42126
42463
|
resolvedData,
|
|
42127
|
-
|
|
42128
|
-
|
|
42129
|
-
|
|
42130
|
-
|
|
42131
|
-
|
|
42132
|
-
|
|
42133
|
-
|
|
42464
|
+
bookingOfferingPresets: support.bookingOfferingPresets,
|
|
42465
|
+
site: support.site,
|
|
42466
|
+
sdkConfig: support.sdkConfig,
|
|
42467
|
+
supabaseUrl: support.supabaseUrl,
|
|
42468
|
+
routeMap: support.routeMap,
|
|
42469
|
+
pagesByIdentifier: support.pagesByIdentifier,
|
|
42470
|
+
entriesByIdentifier: support.entriesByIdentifier,
|
|
42471
|
+
...support.mediaAssets ? { mediaAssets: support.mediaAssets } : {}
|
|
42134
42472
|
};
|
|
42135
42473
|
}
|
|
42136
42474
|
function isEntryResponse(response) {
|
|
42137
42475
|
return "entry" in response;
|
|
42138
42476
|
}
|
|
42139
|
-
function validateAndConvertBlock(block, source) {
|
|
42140
|
-
if (!block || typeof block !== "object") {
|
|
42141
|
-
throw new Error(`Invalid block format in ${source} API response`);
|
|
42142
|
-
}
|
|
42143
|
-
const blockRecord = block;
|
|
42144
|
-
const kindField = source === "template" ? "blockKind" : "kind";
|
|
42145
|
-
const kindValue = blockRecord[kindField];
|
|
42146
|
-
if (typeof blockRecord.id !== "string" && blockRecord.id !== null) {
|
|
42147
|
-
throw new Error(`Invalid block id in ${source}: expected string or null, got ${typeof blockRecord.id}`);
|
|
42148
|
-
}
|
|
42149
|
-
if (typeof kindValue !== "string") {
|
|
42150
|
-
throw new Error(`Invalid block ${kindField} in ${source}: expected string, got ${typeof kindValue}`);
|
|
42151
|
-
}
|
|
42152
|
-
if (source === "page") {
|
|
42153
|
-
if (typeof blockRecord.purpose !== "string") {
|
|
42154
|
-
throw new Error(`Invalid block purpose in ${source}: expected string, got ${typeof blockRecord.purpose}`);
|
|
42155
|
-
}
|
|
42156
|
-
const content2 = blockRecord.content ?? {};
|
|
42157
|
-
return {
|
|
42158
|
-
id: blockRecord.id,
|
|
42159
|
-
kind: kindValue,
|
|
42160
|
-
purpose: blockRecord.purpose,
|
|
42161
|
-
content: content2
|
|
42162
|
-
};
|
|
42163
|
-
}
|
|
42164
|
-
const scope = blockRecord.scope;
|
|
42165
|
-
const content = blockRecord.content ?? {};
|
|
42166
|
-
return {
|
|
42167
|
-
id: blockRecord.id,
|
|
42168
|
-
kind: kindValue,
|
|
42169
|
-
purpose: scope === "entry" ? "entry-content" : "template-layout",
|
|
42170
|
-
content
|
|
42171
|
-
};
|
|
42172
|
-
}
|
|
42173
42477
|
async function processEntryTemplate(templates, entrySlots, entry, context, client, options) {
|
|
42174
42478
|
const template = templates?.[0];
|
|
42175
42479
|
if (!template || !template.blocks?.length) {
|
|
@@ -42213,7 +42517,10 @@ async function processEntryTemplate(templates, entrySlots, entry, context, clien
|
|
|
42213
42517
|
return { templatePage, resolvedData };
|
|
42214
42518
|
}
|
|
42215
42519
|
function resolveTemplateBlock(block, bindingContext) {
|
|
42216
|
-
const rawContent =
|
|
42520
|
+
const rawContent = sanitizeSdkRuntimeBlockContent(
|
|
42521
|
+
block.blockKind,
|
|
42522
|
+
block.content ?? {}
|
|
42523
|
+
);
|
|
42217
42524
|
const baseContent = normalizeBindingOutput2(rawContent);
|
|
42218
42525
|
if (block.scope === "template") {
|
|
42219
42526
|
return {
|