@riverbankcms/sdk 0.90.0 → 0.90.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PreviewEditorSidebar-KVXNF3VW.mjs → PreviewEditorSidebar-FNFRVSIM.mjs} +2 -2
- package/dist/{PreviewEditorUI-J3JN5Z7T.mjs → PreviewEditorUI-3WXJFQXG.mjs} +2 -2
- package/dist/SdkPreviewModeRuntime-2UCIMKUB.mjs +8 -0
- package/dist/_dts/api/src/bookingConfig.d.ts +3 -0
- package/dist/_dts/api/src/event-listing-destination.d.ts +59 -0
- package/dist/_dts/api/src/index.d.ts +4 -0
- package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +0 -1
- package/dist/_dts/api/src/navigation.d.ts +2 -0
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +3 -1
- package/dist/_dts/api/src/settings/permissions.d.ts +273 -0
- package/dist/_dts/api/src/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +60 -2
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +12 -1
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +9 -9
- package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/destination.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/pricing.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +7 -0
- package/dist/_dts/core/src/event-pricing.d.ts +12 -2
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +11 -1
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +11 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/{chunk-PMBB6MQ7.mjs → chunk-CR2VX432.mjs} +297 -117
- package/dist/{chunk-AEOYWPE4.mjs → chunk-FA6LVZ7C.mjs} +5 -5
- package/dist/{chunk-RQ3XZ4SJ.mjs → chunk-H6TT5ZXI.mjs} +1 -1
- package/dist/{chunk-GSPFFUVB.mjs → chunk-SYYJZPKU.mjs} +1 -1
- package/dist/cli/index.mjs +160 -103
- package/dist/client/{accordion-GXQNWQ6O.mjs → accordion-4K7VGZ3I.mjs} +2 -2
- package/dist/client/{bookingForm-STLUJ36H.mjs → bookingForm-3QXA3CIS.mjs} +5 -5
- package/dist/client/bookings.mjs +1154 -556
- package/dist/client/{carousel-CVRN6EPP.mjs → carousel-BEJKNGQ7.mjs} +3 -3
- package/dist/client/{cart-IYIBA5CL.mjs → cart-44BBM6XG.mjs} +6 -6
- package/dist/client/{checkout-O3BGM4GS.mjs → checkout-THMHEYKF.mjs} +6 -6
- package/dist/client/{chunk-25W2EQUN.mjs → chunk-3H5CLFKT.mjs} +8 -0
- package/dist/client/{chunk-MFPKS6QS.mjs → chunk-4COPESPO.mjs} +5 -5
- package/dist/client/{chunk-4RTFGHZN.mjs → chunk-5AJIMWKS.mjs} +6 -3
- package/dist/client/{chunk-6DPXDOIL.mjs → chunk-B4H6QMPY.mjs} +93 -22
- package/dist/client/{chunk-VFHZLZAC.mjs → chunk-DQIRKNZE.mjs} +1 -1
- package/dist/client/{chunk-7DH35FGA.mjs → chunk-EJBHK74Y.mjs} +1 -1
- package/dist/client/{chunk-DAS5CIER.mjs → chunk-JV7ZNAOU.mjs} +118 -20
- package/dist/client/{chunk-FHU6PFPM.mjs → chunk-KNTLBQ3N.mjs} +1 -1
- package/dist/client/{chunk-Z62JYS5O.mjs → chunk-PEDNDLPB.mjs} +2 -2
- package/dist/client/{chunk-NBFRJ5NB.mjs → chunk-SLY6UDAS.mjs} +2 -2
- package/dist/client/{chunk-D3ETC2SU.mjs → chunk-ZIAF2DA4.mjs} +1 -1
- package/dist/client/client.mjs +272 -83
- package/dist/client/{courseRegistration-2D3ACMJR.mjs → courseRegistration-URX7RCCK.mjs} +5 -5
- package/dist/client/{eventCalendar-QY4UZUFF.mjs → eventCalendar-GTENOQCE.mjs} +8 -8
- package/dist/client/{eventCombined-RRCDKJC2.mjs → eventCombined-EZVB72MF.mjs} +8 -8
- package/dist/client/{eventDetails-YO335BUT.mjs → eventDetails-CH4BJR5Z.mjs} +8 -8
- package/dist/client/{eventListing-PXA6GFQ3.mjs → eventListing-4BVOI5HS.mjs} +8 -8
- package/dist/client/{eventRegistration-2ZHEDDXO.mjs → eventRegistration-37LPIKIE.mjs} +8 -8
- package/dist/client/{form-ZS6KX4U2.mjs → form-FX3Y54YK.mjs} +2 -2
- package/dist/client/{headerSection-QK5SLIIB.mjs → headerSection-UOZZGVYL.mjs} +3 -3
- package/dist/client/hooks.mjs +86 -35
- package/dist/client/{locationMap-GFNIUD2X.mjs → locationMap-VSIPKV35.mjs} +3 -3
- package/dist/client/{newsletterForm-PGLTTCUG.mjs → newsletterForm-6FRJKNAF.mjs} +2 -2
- package/dist/client/{productDetail-OPBE5ZPI.mjs → productDetail-6AHMLXCO.mjs} +6 -6
- package/dist/client/{productList-NI72Q62Z.mjs → productList-M2CYIZVH.mjs} +6 -6
- package/dist/client/rendering/client.mjs +231 -42
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +273 -84
- package/dist/client/{shop-3ZQPEWYI.mjs → shop-AUOT6GEX.mjs} +6 -6
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/{sdk-runtime-FSHXCWDS.mjs → sdk-runtime-6GPJNLU6.mjs} +4 -4
- package/dist/server/components.mjs +136 -58
- package/dist/server/config-validation.mjs +78 -27
- package/dist/server/config.mjs +78 -27
- package/dist/server/data.mjs +86 -35
- package/dist/server/index.mjs +1 -1
- package/dist/server/next.mjs +157 -79
- package/dist/server/page-converter.mjs +72 -21
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +148 -70
- package/dist/server/rendering.mjs +152 -74
- package/dist/server/routing.mjs +121 -44
- package/dist/server/server.mjs +95 -44
- package/package.json +2 -2
- package/dist/SdkPreviewModeRuntime-UBL6MSNP.mjs +0 -8
|
@@ -182,6 +182,8 @@ function publicEventPricingType(pricing) {
|
|
|
182
182
|
case "ticket_types":
|
|
183
183
|
case "course":
|
|
184
184
|
return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
|
|
185
|
+
case "external":
|
|
186
|
+
return "external";
|
|
185
187
|
}
|
|
186
188
|
}
|
|
187
189
|
function publicEventPricingCurrency(pricing) {
|
|
@@ -193,6 +195,8 @@ function publicEventPricingCurrency(pricing) {
|
|
|
193
195
|
return pricing.currency;
|
|
194
196
|
case "course":
|
|
195
197
|
return pricing.display.display.currency;
|
|
198
|
+
case "external":
|
|
199
|
+
return null;
|
|
196
200
|
}
|
|
197
201
|
}
|
|
198
202
|
function isFreePublicEventPriceDisplay(display) {
|
|
@@ -206,6 +210,7 @@ function isFreePublicEventPriceDisplay(display) {
|
|
|
206
210
|
case "range":
|
|
207
211
|
case "mixed":
|
|
208
212
|
case "unavailable":
|
|
213
|
+
case "external":
|
|
209
214
|
return false;
|
|
210
215
|
}
|
|
211
216
|
}
|
|
@@ -236,6 +241,8 @@ function formatBookingPriceDisplay(display, options = {}) {
|
|
|
236
241
|
return display.paidToAmount > display.paidFromAmount ? `Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)} - ${formatCurrencyAmount(display.paidToAmount, display.currency, options)}` : `Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)}`;
|
|
237
242
|
case "unavailable":
|
|
238
243
|
return "Pricing unavailable";
|
|
244
|
+
case "external":
|
|
245
|
+
return display.label;
|
|
239
246
|
case "course":
|
|
240
247
|
return formatCoursePriceDisplayLabel(display.display, options);
|
|
241
248
|
default:
|
|
@@ -26353,6 +26360,18 @@ var publicCoursesArraySchema = z43.array(publicCourseSchema);
|
|
|
26353
26360
|
var eventPresetSchema = z44.enum(["event", "class", "workshop", "retreat", "performance"]);
|
|
26354
26361
|
var eventScheduleScopeSchema = z44.enum(["recurring", "oneOff"]);
|
|
26355
26362
|
var eventDestinationModeSchema = z44.enum(["cms-managed", "system-managed"]);
|
|
26363
|
+
var publicEventDestinationSchema = z44.discriminatedUnion("kind", [
|
|
26364
|
+
z44.object({
|
|
26365
|
+
kind: z44.literal("native"),
|
|
26366
|
+
mode: eventDestinationModeSchema,
|
|
26367
|
+
path: z44.string()
|
|
26368
|
+
}),
|
|
26369
|
+
z44.object({
|
|
26370
|
+
kind: z44.literal("external"),
|
|
26371
|
+
url: z44.string(),
|
|
26372
|
+
label: z44.string()
|
|
26373
|
+
})
|
|
26374
|
+
]);
|
|
26356
26375
|
var eventVenueSchema = z44.object({
|
|
26357
26376
|
id: z44.string(),
|
|
26358
26377
|
name: z44.string(),
|
|
@@ -26367,7 +26386,7 @@ var eventCategorySchema = z44.object({
|
|
|
26367
26386
|
name: z44.string(),
|
|
26368
26387
|
color: z44.string().nullable()
|
|
26369
26388
|
});
|
|
26370
|
-
var pricingTypeSchema = z44.enum(["free", "paid"]);
|
|
26389
|
+
var pricingTypeSchema = z44.enum(["free", "paid", "external"]);
|
|
26371
26390
|
var accessRestrictionSchema = z44.enum(["none", "category"]);
|
|
26372
26391
|
var eventPricingModeSchema = z44.enum(["single", "ticket_types"]);
|
|
26373
26392
|
var publicCoursePriceDisplaySchema = z44.discriminatedUnion("kind", [
|
|
@@ -26388,6 +26407,7 @@ var publicEventPriceDisplaySchema = z44.discriminatedUnion("kind", [
|
|
|
26388
26407
|
currency: z44.string()
|
|
26389
26408
|
}),
|
|
26390
26409
|
z44.object({ kind: z44.literal("unavailable"), currency: z44.string() }),
|
|
26410
|
+
z44.object({ kind: z44.literal("external"), label: z44.string() }),
|
|
26391
26411
|
z44.object({ kind: z44.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
26392
26412
|
]);
|
|
26393
26413
|
var publicEventTicketTypePriceDisplaySchema = z44.union([
|
|
@@ -26466,6 +26486,10 @@ var publicEventPricingSchema = z44.discriminatedUnion("kind", [
|
|
|
26466
26486
|
z44.object({
|
|
26467
26487
|
kind: z44.literal("course"),
|
|
26468
26488
|
display: z44.object({ kind: z44.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
26489
|
+
}),
|
|
26490
|
+
z44.object({
|
|
26491
|
+
kind: z44.literal("external"),
|
|
26492
|
+
display: z44.object({ kind: z44.literal("external"), label: z44.string() })
|
|
26469
26493
|
})
|
|
26470
26494
|
]);
|
|
26471
26495
|
var publicTeamMemberSummarySchema = z44.object({
|
|
@@ -26494,7 +26518,8 @@ var publicEventSchema = z44.object({
|
|
|
26494
26518
|
image: mediaSchema2.nullable().optional()
|
|
26495
26519
|
}).optional(),
|
|
26496
26520
|
slug: z44.string(),
|
|
26497
|
-
path: z44.string(),
|
|
26521
|
+
path: z44.string().nullable(),
|
|
26522
|
+
destination: publicEventDestinationSchema,
|
|
26498
26523
|
requiresRegistration: z44.boolean(),
|
|
26499
26524
|
deliveryMode: z44.enum(["in_person", "online", "hybrid"]),
|
|
26500
26525
|
attendanceModes: z44.array(publicEventAttendanceModeAvailabilitySchema),
|
|
@@ -26798,12 +26823,41 @@ function isEventContentType(slug) {
|
|
|
26798
26823
|
return EVENT_CONTENT_TYPE_SLUGS.includes(slug);
|
|
26799
26824
|
}
|
|
26800
26825
|
|
|
26826
|
+
// ../blocks/src/system/runtime/nodes/events/shared/destination.ts
|
|
26827
|
+
function isRecord5(value) {
|
|
26828
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
26829
|
+
}
|
|
26830
|
+
function isRuntimeEventDestination(value) {
|
|
26831
|
+
if (!isRecord5(value) || typeof value.kind !== "string") return false;
|
|
26832
|
+
if (value.kind === "native") {
|
|
26833
|
+
return (value.mode === "cms-managed" || value.mode === "system-managed") && typeof value.path === "string";
|
|
26834
|
+
}
|
|
26835
|
+
return value.kind === "external" && typeof value.url === "string" && typeof value.label === "string";
|
|
26836
|
+
}
|
|
26837
|
+
function resolveRuntimeEventDestination(event) {
|
|
26838
|
+
if (isRuntimeEventDestination(event.destination)) {
|
|
26839
|
+
return event.destination;
|
|
26840
|
+
}
|
|
26841
|
+
return {
|
|
26842
|
+
kind: "native",
|
|
26843
|
+
mode: event.eventDestinationMode === "system-managed" ? "system-managed" : "cms-managed",
|
|
26844
|
+
path: typeof event.path === "string" ? event.path : ""
|
|
26845
|
+
};
|
|
26846
|
+
}
|
|
26847
|
+
|
|
26801
26848
|
// ../blocks/src/system/runtime/nodes/events/shared/pricing.ts
|
|
26802
26849
|
var DEFAULT_EVENT_CURRENCY = "USD";
|
|
26803
26850
|
function resolveRuntimeEventPricing(event) {
|
|
26804
26851
|
if (isPublicEventPricing(event.pricing)) {
|
|
26805
26852
|
return event.pricing;
|
|
26806
26853
|
}
|
|
26854
|
+
const destination = resolveRuntimeEventDestination(event);
|
|
26855
|
+
if (destination.kind === "external") {
|
|
26856
|
+
return {
|
|
26857
|
+
kind: "external",
|
|
26858
|
+
display: { kind: "external", label: "External registration" }
|
|
26859
|
+
};
|
|
26860
|
+
}
|
|
26807
26861
|
const legacy = event;
|
|
26808
26862
|
const currency = readCurrency(legacy.currency);
|
|
26809
26863
|
if (event.requiresRegistration === false) {
|
|
@@ -26840,22 +26894,22 @@ function resolveRuntimeEventPricing(event) {
|
|
|
26840
26894
|
function readCurrency(value) {
|
|
26841
26895
|
return typeof value === "string" && value.trim().length > 0 ? value : DEFAULT_EVENT_CURRENCY;
|
|
26842
26896
|
}
|
|
26843
|
-
function
|
|
26897
|
+
function isRecord6(value) {
|
|
26844
26898
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
26845
26899
|
}
|
|
26846
26900
|
function isPublicEventPricing(value) {
|
|
26847
|
-
if (!
|
|
26848
|
-
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course";
|
|
26901
|
+
if (!isRecord6(value) || typeof value.kind !== "string") return false;
|
|
26902
|
+
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course" || value.kind === "external";
|
|
26849
26903
|
}
|
|
26850
26904
|
function isPublicEventTicketType(value) {
|
|
26851
|
-
return
|
|
26905
|
+
return isRecord6(value) && typeof value.id === "string";
|
|
26852
26906
|
}
|
|
26853
26907
|
function readTicketTypePriceDisplay(value, currency) {
|
|
26854
26908
|
const display = readLegacyPriceDisplay(value, currency);
|
|
26855
|
-
return display.kind === "course" ? { kind: "unavailable", currency } : display;
|
|
26909
|
+
return display.kind === "course" || display.kind === "external" ? { kind: "unavailable", currency } : display;
|
|
26856
26910
|
}
|
|
26857
26911
|
function readLegacyPriceDisplay(value, currency) {
|
|
26858
|
-
if (!
|
|
26912
|
+
if (!isRecord6(value) || typeof value.kind !== "string") {
|
|
26859
26913
|
return { kind: "unavailable", currency };
|
|
26860
26914
|
}
|
|
26861
26915
|
const displayCurrency = readCurrency(value.currency);
|
|
@@ -26894,7 +26948,7 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
26894
26948
|
case "unavailable":
|
|
26895
26949
|
return { kind: "unavailable", currency: displayCurrency };
|
|
26896
26950
|
case "course":
|
|
26897
|
-
return
|
|
26951
|
+
return isRecord6(value.display) ? {
|
|
26898
26952
|
kind: "course",
|
|
26899
26953
|
display: readCoursePriceDisplay(value.display, displayCurrency)
|
|
26900
26954
|
} : {
|
|
@@ -26981,7 +27035,7 @@ function resolveEventRequiresPayment(input) {
|
|
|
26981
27035
|
if (!input.event) {
|
|
26982
27036
|
return false;
|
|
26983
27037
|
}
|
|
26984
|
-
return publicEventPricingType(resolveRuntimeEventPricing(input.event))
|
|
27038
|
+
return publicEventPricingType(resolveRuntimeEventPricing(input.event)) === "paid";
|
|
26985
27039
|
}
|
|
26986
27040
|
|
|
26987
27041
|
// ../blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.ts
|
|
@@ -27178,15 +27232,16 @@ var eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
27178
27232
|
})
|
|
27179
27233
|
});
|
|
27180
27234
|
function normalizeEventRegistrationEventInput(value) {
|
|
27181
|
-
if (!
|
|
27235
|
+
if (!isRecord7(value)) {
|
|
27182
27236
|
return value;
|
|
27183
27237
|
}
|
|
27184
27238
|
return {
|
|
27185
27239
|
...value,
|
|
27240
|
+
destination: resolveRuntimeEventDestination(value),
|
|
27186
27241
|
pricing: resolveRuntimeEventPricing(value)
|
|
27187
27242
|
};
|
|
27188
27243
|
}
|
|
27189
|
-
function
|
|
27244
|
+
function isRecord7(value) {
|
|
27190
27245
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
27191
27246
|
}
|
|
27192
27247
|
var eventRegistrationInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
@@ -28979,16 +29034,28 @@ function groupEventsByDate(events) {
|
|
|
28979
29034
|
function formatEventPrice(event) {
|
|
28980
29035
|
return formatEventPricing(resolveRuntimeEventPricing(event), { decimals: "auto" });
|
|
28981
29036
|
}
|
|
29037
|
+
function resolveEventHref(event) {
|
|
29038
|
+
const destination = resolveRuntimeEventDestination(event);
|
|
29039
|
+
return destination.kind === "external" ? destination.url : destination.path;
|
|
29040
|
+
}
|
|
29041
|
+
function resolveEventLinkProps(event) {
|
|
29042
|
+
const href = resolveEventHref(event);
|
|
29043
|
+
const destination = resolveRuntimeEventDestination(event);
|
|
29044
|
+
return destination.kind === "external" ? { href, target: "_blank", rel: "noopener noreferrer" } : { href };
|
|
29045
|
+
}
|
|
28982
29046
|
function resolveEventCta(event, buttonText) {
|
|
28983
29047
|
const { isFull: isSoldOut } = getEventAvailability(event);
|
|
28984
|
-
const
|
|
29048
|
+
const destination = resolveRuntimeEventDestination(event);
|
|
29049
|
+
const isExternal = destination.kind === "external";
|
|
29050
|
+
const defaultButtonText = isExternal ? destination.label : event.kind === "course_session" ? "Book course" : "Book";
|
|
28985
29051
|
const effectiveButtonText = buttonText ?? defaultButtonText;
|
|
28986
|
-
|
|
28987
|
-
|
|
29052
|
+
const href = resolveEventHref(event);
|
|
29053
|
+
if (!isExternal && isSoldOut) {
|
|
29054
|
+
return { label: "Sold out", href, external: false, hidden: true };
|
|
28988
29055
|
}
|
|
28989
29056
|
const enrollmentOpen = event.kind === "course_session" ? event.course?.enrollmentOpen !== false : true;
|
|
28990
29057
|
const label = !enrollmentOpen ? "Registration closed" : effectiveButtonText;
|
|
28991
|
-
return { label, href:
|
|
29058
|
+
return { label, href, external: isExternal, hidden: false };
|
|
28992
29059
|
}
|
|
28993
29060
|
|
|
28994
29061
|
// ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
@@ -30426,6 +30493,8 @@ var EventCard = ({
|
|
|
30426
30493
|
"a",
|
|
30427
30494
|
{
|
|
30428
30495
|
href: cta.href,
|
|
30496
|
+
target: cta.external ? "_blank" : void 0,
|
|
30497
|
+
rel: cta.external ? "noopener noreferrer" : void 0,
|
|
30429
30498
|
className: `${buttonClass} event-card-cta`,
|
|
30430
30499
|
children: cta.label
|
|
30431
30500
|
}
|
|
@@ -30515,10 +30584,19 @@ var EventCompactRow = ({
|
|
|
30515
30584
|
formattedTime,
|
|
30516
30585
|
/* @__PURE__ */ jsx8("span", { className: "event-compact-row-action-price", children: price })
|
|
30517
30586
|
] }),
|
|
30518
|
-
cta.hidden ? /* @__PURE__ */ jsx8("span", { className: "event-compact-row-status", children: cta.label }) : /* @__PURE__ */ jsxs6(
|
|
30519
|
-
|
|
30520
|
-
|
|
30521
|
-
|
|
30587
|
+
cta.hidden ? /* @__PURE__ */ jsx8("span", { className: "event-compact-row-status", children: cta.label }) : /* @__PURE__ */ jsxs6(
|
|
30588
|
+
"a",
|
|
30589
|
+
{
|
|
30590
|
+
href: cta.href,
|
|
30591
|
+
target: cta.external ? "_blank" : void 0,
|
|
30592
|
+
rel: cta.external ? "noopener noreferrer" : void 0,
|
|
30593
|
+
className: `${buttonClass} event-compact-row-cta`,
|
|
30594
|
+
children: [
|
|
30595
|
+
/* @__PURE__ */ jsx8("span", { children: cta.label }),
|
|
30596
|
+
/* @__PURE__ */ jsx8(ArrowRightIcon, { "aria-hidden": "true" })
|
|
30597
|
+
]
|
|
30598
|
+
}
|
|
30599
|
+
)
|
|
30522
30600
|
] })
|
|
30523
30601
|
] })
|
|
30524
30602
|
] });
|
|
@@ -32108,7 +32186,7 @@ function inferLegacyOfferingsPreviewGroupOrder(overrides) {
|
|
|
32108
32186
|
return keys.length >= 2 ? keys : [];
|
|
32109
32187
|
}
|
|
32110
32188
|
function normalizeOfferingsPreviewContentForWrite(value) {
|
|
32111
|
-
if (!
|
|
32189
|
+
if (!isRecord8(value)) return null;
|
|
32112
32190
|
const groupOrderValue = value.groupOrder;
|
|
32113
32191
|
if (Array.isArray(groupOrderValue)) {
|
|
32114
32192
|
const normalized = normalizeOfferingsPreviewGroupOrder(groupOrderValue);
|
|
@@ -32121,7 +32199,7 @@ function normalizeOfferingsPreviewContentForWrite(value) {
|
|
|
32121
32199
|
return { ...value, groupOrder: [] };
|
|
32122
32200
|
}
|
|
32123
32201
|
const legacyOrder = inferLegacyOfferingsPreviewGroupOrder(
|
|
32124
|
-
Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(
|
|
32202
|
+
Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord8) : []
|
|
32125
32203
|
);
|
|
32126
32204
|
return legacyOrder.length > 0 ? { ...value, groupOrder: legacyOrder } : value;
|
|
32127
32205
|
}
|
|
@@ -32175,7 +32253,7 @@ function uniqueOfferingsPreviewSourceKeys(values) {
|
|
|
32175
32253
|
}
|
|
32176
32254
|
return keys;
|
|
32177
32255
|
}
|
|
32178
|
-
function
|
|
32256
|
+
function isRecord8(value) {
|
|
32179
32257
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
32180
32258
|
}
|
|
32181
32259
|
function mergeOrderedKeysWithDefaults(orderedKeys, defaultKeys) {
|
|
@@ -32637,7 +32715,7 @@ function isOfferingsPreviewItemLimit(value) {
|
|
|
32637
32715
|
return value === "1" || value === "2" || value === "3" || value === "4" || value === "5" || value === "6" || value === null;
|
|
32638
32716
|
}
|
|
32639
32717
|
function normalizeOfferingsPreviewGroupOverride(value) {
|
|
32640
|
-
if (!
|
|
32718
|
+
if (!isRecord9(value)) return [];
|
|
32641
32719
|
const override = {};
|
|
32642
32720
|
if (isOfferingsPreviewSourceKey(value.sourceKey) || value.sourceKey === null) {
|
|
32643
32721
|
override.sourceKey = value.sourceKey;
|
|
@@ -32669,12 +32747,12 @@ function isButtonVariant(value) {
|
|
|
32669
32747
|
return value === "primary" || value === "secondary" || value === "outline" || value === "link" || value === null;
|
|
32670
32748
|
}
|
|
32671
32749
|
function normalizeCardStylesContent(value) {
|
|
32672
|
-
return
|
|
32750
|
+
return isRecord9(value) || value === null ? value : void 0;
|
|
32673
32751
|
}
|
|
32674
32752
|
function normalizeSectionStylesContent(value) {
|
|
32675
|
-
return
|
|
32753
|
+
return isRecord9(value) || value === null ? value : void 0;
|
|
32676
32754
|
}
|
|
32677
|
-
function
|
|
32755
|
+
function isRecord9(value) {
|
|
32678
32756
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
32679
32757
|
}
|
|
32680
32758
|
|
|
@@ -35840,7 +35918,7 @@ function deriveNewsletterSignupRuntimeSource(values) {
|
|
|
35840
35918
|
};
|
|
35841
35919
|
}
|
|
35842
35920
|
function sanitizeNewsletterSignupPublicContent(content) {
|
|
35843
|
-
if (!
|
|
35921
|
+
if (!isRecord10(content)) return content;
|
|
35844
35922
|
const provider = parseNewsletterSignupDestinationProvider(content.destinationProvider) ?? getProviderFromExplicitDestination(content.destination);
|
|
35845
35923
|
const {
|
|
35846
35924
|
destination: _destination,
|
|
@@ -35859,7 +35937,7 @@ function sanitizeNewsletterSignupPublicContent(content) {
|
|
|
35859
35937
|
return mutablePublicContent;
|
|
35860
35938
|
}
|
|
35861
35939
|
function getProviderFromExplicitDestination(destination) {
|
|
35862
|
-
if (!
|
|
35940
|
+
if (!isRecord10(destination) || typeof destination.tag !== "string") return null;
|
|
35863
35941
|
if (destination.tag === "riverbank_list") return "riverbank";
|
|
35864
35942
|
if (destination.tag === "mailchimp_audience") return "mailchimp";
|
|
35865
35943
|
return null;
|
|
@@ -35871,7 +35949,7 @@ function parseTrimmedString(value) {
|
|
|
35871
35949
|
const trimmed = value.trim();
|
|
35872
35950
|
return trimmed.length > 0 ? trimmed : null;
|
|
35873
35951
|
}
|
|
35874
|
-
function
|
|
35952
|
+
function isRecord10(value) {
|
|
35875
35953
|
return typeof value === "object" && value !== null;
|
|
35876
35954
|
}
|
|
35877
35955
|
|
|
@@ -38070,7 +38148,7 @@ import React4 from "react";
|
|
|
38070
38148
|
// ../blocks/src/system/data/linkedContentEntries.ts
|
|
38071
38149
|
var LINKED_CONTENT_ENTRY_META_KEY = "__rbLinkedContentEntry";
|
|
38072
38150
|
function coerceLinkedContentEntriesPayload(payload) {
|
|
38073
|
-
if (!
|
|
38151
|
+
if (!isRecord11(payload)) return payload;
|
|
38074
38152
|
const response = payload;
|
|
38075
38153
|
if (!Array.isArray(response.entries)) return payload;
|
|
38076
38154
|
const contentType = parsePublicContentTypeMeta(response.contentType);
|
|
@@ -38078,16 +38156,16 @@ function coerceLinkedContentEntriesPayload(payload) {
|
|
|
38078
38156
|
return response.entries.map((entry) => enrichLinkedContentEntry(entry, contentType));
|
|
38079
38157
|
}
|
|
38080
38158
|
function getLinkedContentEntryMeta(value) {
|
|
38081
|
-
if (!
|
|
38159
|
+
if (!isRecord11(value)) return null;
|
|
38082
38160
|
const candidate = value[LINKED_CONTENT_ENTRY_META_KEY];
|
|
38083
38161
|
return isLinkedContentEntryMeta(candidate) ? candidate : null;
|
|
38084
38162
|
}
|
|
38085
38163
|
function buildLinkedContentEditTarget(input) {
|
|
38086
38164
|
const { entry, sourceBlockId, sourceBlockKind, itemIndex } = input;
|
|
38087
|
-
if (!
|
|
38165
|
+
if (!isRecord11(entry)) return null;
|
|
38088
38166
|
const meta = getLinkedContentEntryMeta(entry);
|
|
38089
38167
|
if (!meta || meta.support.kind !== "supported") return null;
|
|
38090
|
-
const content =
|
|
38168
|
+
const content = isRecord11(entry.content) ? entry.content : {};
|
|
38091
38169
|
return {
|
|
38092
38170
|
kind: "linked-content-entry",
|
|
38093
38171
|
entryId: meta.entryId,
|
|
@@ -38137,12 +38215,12 @@ function resolveLinkedEntryInlineFieldEligibility(input) {
|
|
|
38137
38215
|
};
|
|
38138
38216
|
}
|
|
38139
38217
|
function enrichLinkedContentEntry(entry, contentType) {
|
|
38140
|
-
if (!
|
|
38218
|
+
if (!isRecord11(entry)) return entry;
|
|
38141
38219
|
const entryId = typeof entry.id === "string" ? entry.id : null;
|
|
38142
38220
|
if (!entryId) return entry;
|
|
38143
38221
|
const title = typeof entry.title === "string" && entry.title.trim().length > 0 ? entry.title : entryId;
|
|
38144
38222
|
const optimisticHash = typeof entry.optimisticHash === "string" && entry.optimisticHash.length > 0 ? entry.optimisticHash : null;
|
|
38145
|
-
const content =
|
|
38223
|
+
const content = isRecord11(entry.content) ? entry.content : {};
|
|
38146
38224
|
const meta = {
|
|
38147
38225
|
kind: "linked-content-entry",
|
|
38148
38226
|
entryId,
|
|
@@ -38238,7 +38316,7 @@ function capitalize(value) {
|
|
|
38238
38316
|
return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
|
|
38239
38317
|
}
|
|
38240
38318
|
function parsePublicContentTypeMeta(value) {
|
|
38241
|
-
if (!
|
|
38319
|
+
if (!isRecord11(value)) return null;
|
|
38242
38320
|
if (typeof value.key !== "string" || value.key.trim().length === 0) return null;
|
|
38243
38321
|
return {
|
|
38244
38322
|
key: value.key,
|
|
@@ -38248,7 +38326,7 @@ function parsePublicContentTypeMeta(value) {
|
|
|
38248
38326
|
};
|
|
38249
38327
|
}
|
|
38250
38328
|
function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
38251
|
-
if (!
|
|
38329
|
+
if (!isRecord11(value) || typeof value.kind !== "string") return null;
|
|
38252
38330
|
switch (value.kind) {
|
|
38253
38331
|
case "generic":
|
|
38254
38332
|
return { kind: "generic" };
|
|
@@ -38262,7 +38340,7 @@ function parsePublicContentTypeLinkedEntryEditing(value) {
|
|
|
38262
38340
|
}
|
|
38263
38341
|
}
|
|
38264
38342
|
function parsePublicContentTypeFieldMeta(value) {
|
|
38265
|
-
if (!
|
|
38343
|
+
if (!isRecord11(value)) return [];
|
|
38266
38344
|
if (typeof value.id !== "string" || typeof value.type !== "string") return [];
|
|
38267
38345
|
return [{
|
|
38268
38346
|
id: value.id,
|
|
@@ -38277,14 +38355,14 @@ function parseStringArray(value) {
|
|
|
38277
38355
|
return value.filter((item) => typeof item === "string");
|
|
38278
38356
|
}
|
|
38279
38357
|
function isLinkedContentEntryMeta(value) {
|
|
38280
|
-
if (!
|
|
38358
|
+
if (!isRecord11(value)) return false;
|
|
38281
38359
|
if (value.kind !== "linked-content-entry") return false;
|
|
38282
38360
|
if (typeof value.entryId !== "string") return false;
|
|
38283
38361
|
if (typeof value.contentTypeKey !== "string") return false;
|
|
38284
38362
|
if (typeof value.contentTypeLabel !== "string") return false;
|
|
38285
38363
|
if (typeof value.title !== "string") return false;
|
|
38286
38364
|
if (!(value.optimisticHash === null || typeof value.optimisticHash === "string")) return false;
|
|
38287
|
-
if (!
|
|
38365
|
+
if (!isRecord11(value.contentType)) return false;
|
|
38288
38366
|
if (!isLinkedEntryFieldSourceArray(value.fieldSources)) return false;
|
|
38289
38367
|
return isLinkedContentEditSupport(value.support);
|
|
38290
38368
|
}
|
|
@@ -38292,7 +38370,7 @@ function isLinkedEntryFieldSourceArray(value) {
|
|
|
38292
38370
|
return Array.isArray(value) && value.every(isLinkedEntryFieldSource);
|
|
38293
38371
|
}
|
|
38294
38372
|
function isLinkedEntryFieldSource(value) {
|
|
38295
|
-
if (!
|
|
38373
|
+
if (!isRecord11(value)) return false;
|
|
38296
38374
|
if (typeof value.displayPath !== "string") return false;
|
|
38297
38375
|
switch (value.kind) {
|
|
38298
38376
|
case "content-field":
|
|
@@ -38318,7 +38396,7 @@ function isLinkedEntryInlineFieldReadOnlyReason(value) {
|
|
|
38318
38396
|
}
|
|
38319
38397
|
}
|
|
38320
38398
|
function isLinkedContentEditSupport(value) {
|
|
38321
|
-
if (!
|
|
38399
|
+
if (!isRecord11(value) || typeof value.kind !== "string") return false;
|
|
38322
38400
|
switch (value.kind) {
|
|
38323
38401
|
case "supported":
|
|
38324
38402
|
return true;
|
|
@@ -38330,7 +38408,7 @@ function isLinkedContentEditSupport(value) {
|
|
|
38330
38408
|
return false;
|
|
38331
38409
|
}
|
|
38332
38410
|
}
|
|
38333
|
-
function
|
|
38411
|
+
function isRecord11(value) {
|
|
38334
38412
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
38335
38413
|
}
|
|
38336
38414
|
|
|
@@ -39786,12 +39864,12 @@ function toTrimmedString(value) {
|
|
|
39786
39864
|
return trimmed ? trimmed : void 0;
|
|
39787
39865
|
}
|
|
39788
39866
|
function normalizeBookingFormConfig(form2) {
|
|
39789
|
-
if (!
|
|
39867
|
+
if (!isRecord12(form2)) return null;
|
|
39790
39868
|
const id = readNonEmptyString(form2.id);
|
|
39791
39869
|
const name = readNonEmptyString(form2.name);
|
|
39792
39870
|
if (!id || !name) return null;
|
|
39793
|
-
const schemaSource =
|
|
39794
|
-
const settingsSource =
|
|
39871
|
+
const schemaSource = isRecord12(form2.schema) ? form2.schema : isRecord12(form2.schemaJson) ? form2.schemaJson : null;
|
|
39872
|
+
const settingsSource = isRecord12(form2.settings) ? form2.settings : isRecord12(form2.settingsJson) ? form2.settingsJson : null;
|
|
39795
39873
|
return {
|
|
39796
39874
|
id,
|
|
39797
39875
|
name,
|
|
@@ -39815,10 +39893,10 @@ function normalizeBookingServices(services) {
|
|
|
39815
39893
|
if (Array.isArray(services)) {
|
|
39816
39894
|
return services.filter(isBookingFormService).map(normalizeService);
|
|
39817
39895
|
}
|
|
39818
|
-
if (
|
|
39896
|
+
if (isRecord12(services) && "services" in services) {
|
|
39819
39897
|
return Array.isArray(services.services) ? services.services.filter(isBookingFormService).map(normalizeService) : [];
|
|
39820
39898
|
}
|
|
39821
|
-
return
|
|
39899
|
+
return isRecord12(services) ? Object.values(services).filter(isBookingFormService).map(normalizeService) : [];
|
|
39822
39900
|
}
|
|
39823
39901
|
function normalizeBookingSchema(value) {
|
|
39824
39902
|
if (!value) return void 0;
|
|
@@ -39830,7 +39908,7 @@ function normalizeBookingSchema(value) {
|
|
|
39830
39908
|
};
|
|
39831
39909
|
}
|
|
39832
39910
|
function readBookingFormField(value) {
|
|
39833
|
-
if (!
|
|
39911
|
+
if (!isRecord12(value)) return null;
|
|
39834
39912
|
const id = readNonEmptyString(value.id);
|
|
39835
39913
|
const label = readNonEmptyString(value.label);
|
|
39836
39914
|
const type = readBookingFieldType(value.type);
|
|
@@ -39876,7 +39954,7 @@ function readBookingFieldOptions(value) {
|
|
|
39876
39954
|
return options.length > 0 ? options : void 0;
|
|
39877
39955
|
}
|
|
39878
39956
|
function readBookingFieldOption(value) {
|
|
39879
|
-
if (!
|
|
39957
|
+
if (!isRecord12(value)) return null;
|
|
39880
39958
|
const optionValue = readNonEmptyString(value.value);
|
|
39881
39959
|
const label = readNonEmptyString(value.label);
|
|
39882
39960
|
return optionValue && label ? { value: optionValue, label } : null;
|
|
@@ -39893,7 +39971,7 @@ function normalizeBookingSettings(value) {
|
|
|
39893
39971
|
};
|
|
39894
39972
|
}
|
|
39895
39973
|
function isBookingFormService(value) {
|
|
39896
|
-
return
|
|
39974
|
+
return isRecord12(value) && typeof value.id === "string" && typeof value.siteId === "string" && typeof value.title === "string";
|
|
39897
39975
|
}
|
|
39898
39976
|
function readNonEmptyString(value) {
|
|
39899
39977
|
if (typeof value !== "string") return null;
|
|
@@ -39911,7 +39989,7 @@ function readStringArray(value) {
|
|
|
39911
39989
|
const strings = value.filter((item) => typeof item === "string");
|
|
39912
39990
|
return strings.length > 0 ? strings : void 0;
|
|
39913
39991
|
}
|
|
39914
|
-
function
|
|
39992
|
+
function isRecord12(value) {
|
|
39915
39993
|
return typeof value === "object" && value !== null;
|
|
39916
39994
|
}
|
|
39917
39995
|
|
|
@@ -40469,7 +40547,7 @@ function EventDetailsView({
|
|
|
40469
40547
|
"a",
|
|
40470
40548
|
{
|
|
40471
40549
|
className: "rb-tile rb-tile--interactive",
|
|
40472
|
-
|
|
40550
|
+
...resolveEventLinkProps(e),
|
|
40473
40551
|
children: /* @__PURE__ */ jsx30(
|
|
40474
40552
|
DateTimeTile,
|
|
40475
40553
|
{
|
|
@@ -42153,7 +42231,7 @@ var AgendaEventCard = ({
|
|
|
42153
42231
|
showCapacity,
|
|
42154
42232
|
onClick
|
|
42155
42233
|
}) => {
|
|
42156
|
-
const
|
|
42234
|
+
const eventLinkProps = resolveEventLinkProps(event);
|
|
42157
42235
|
const categoryColor = event.eventCategory?.color || "rgb(var(--tb-accent))";
|
|
42158
42236
|
const price = formatEventPrice(event);
|
|
42159
42237
|
const { available, isFull } = getEventAvailability(event);
|
|
@@ -42214,7 +42292,7 @@ var AgendaEventCard = ({
|
|
|
42214
42292
|
}
|
|
42215
42293
|
);
|
|
42216
42294
|
}
|
|
42217
|
-
return /* @__PURE__ */ jsx47("a", {
|
|
42295
|
+
return /* @__PURE__ */ jsx47("a", { ...eventLinkProps, className: "event-agenda-card", children: cardContent });
|
|
42218
42296
|
};
|
|
42219
42297
|
|
|
42220
42298
|
// ../blocks/src/system/runtime/nodes/events/shared/WeekAgendaView.tsx
|
|
@@ -42457,7 +42535,7 @@ function renderCalendarSsr(display) {
|
|
|
42457
42535
|
dayEvents.slice(0, MAX_EVENTS_PER_DAY).map((event) => /* @__PURE__ */ jsxs35(
|
|
42458
42536
|
"a",
|
|
42459
42537
|
{
|
|
42460
|
-
|
|
42538
|
+
...resolveEventLinkProps(event),
|
|
42461
42539
|
className: "event-calendar-event",
|
|
42462
42540
|
title: `${event.title} at ${formatTime(event.startsAt, { timeZone: getEventTimeZone(event) })}`,
|
|
42463
42541
|
children: [
|
|
@@ -42585,7 +42663,7 @@ function renderTimetableSsr(display) {
|
|
|
42585
42663
|
day.events.length === 0 ? /* @__PURE__ */ jsx49("p", { className: "event-timetable-day-empty", children: "No classes" }) : day.events.map((cell) => /* @__PURE__ */ jsxs35(
|
|
42586
42664
|
"a",
|
|
42587
42665
|
{
|
|
42588
|
-
|
|
42666
|
+
...resolveEventLinkProps(cell.event),
|
|
42589
42667
|
className: "event-timetable-event",
|
|
42590
42668
|
title: `${cell.event.title}, ${cell.timeLabel}`,
|
|
42591
42669
|
style: {
|
|
@@ -43392,14 +43470,14 @@ function isDecoratedHeadingBlockKind(blockKind) {
|
|
|
43392
43470
|
return blockKind === "block.intro" || blockKind === "block.feature-cards" || blockKind === "block.testimonials" || blockKind === "block.faq";
|
|
43393
43471
|
}
|
|
43394
43472
|
function readVariant(blockContent) {
|
|
43395
|
-
if (!
|
|
43473
|
+
if (!isRecord13(blockContent)) return void 0;
|
|
43396
43474
|
const variant = blockContent.variant;
|
|
43397
43475
|
return typeof variant === "string" ? variant : void 0;
|
|
43398
43476
|
}
|
|
43399
43477
|
function isFaqDecoratedVariant(variant) {
|
|
43400
43478
|
return variant === "default" || variant === "question-columns";
|
|
43401
43479
|
}
|
|
43402
|
-
function
|
|
43480
|
+
function isRecord13(value) {
|
|
43403
43481
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
43404
43482
|
}
|
|
43405
43483
|
function buildHeadingDecorationWrapperClassName(className) {
|
|
@@ -68429,7 +68507,7 @@ function preset(id, verticalId, canonicalBehaviour, label, pluralLabel, descript
|
|
|
68429
68507
|
}
|
|
68430
68508
|
|
|
68431
68509
|
// ../api/src/utils/isRecord.ts
|
|
68432
|
-
function
|
|
68510
|
+
function isRecord14(value) {
|
|
68433
68511
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
68434
68512
|
}
|
|
68435
68513
|
|
|
@@ -68736,7 +68814,7 @@ function sanitizeMarks(marks) {
|
|
|
68736
68814
|
if (mark.type === "bold" || mark.type === "strong" || mark.type === "italic" || mark.type === "em") {
|
|
68737
68815
|
return [{ type: mark.type }];
|
|
68738
68816
|
}
|
|
68739
|
-
if (mark.type === "link" &&
|
|
68817
|
+
if (mark.type === "link" && isRecord14(mark.attrs) && typeof mark.attrs.href === "string") {
|
|
68740
68818
|
const attrs = { href: mark.attrs.href };
|
|
68741
68819
|
if (typeof mark.attrs.target === "string" && mark.attrs.target.trim().length > 0) {
|
|
68742
68820
|
attrs.target = mark.attrs.target;
|
|
@@ -68751,10 +68829,10 @@ function sanitizeMarks(marks) {
|
|
|
68751
68829
|
return sanitized.length > 0 ? sanitized : void 0;
|
|
68752
68830
|
}
|
|
68753
68831
|
function unwrapRichTextValue(value) {
|
|
68754
|
-
if (
|
|
68832
|
+
if (isRecord14(value) && isRecord14(value.doc)) {
|
|
68755
68833
|
return unwrapRichTextValue(value.doc);
|
|
68756
68834
|
}
|
|
68757
|
-
if (
|
|
68835
|
+
if (isRecord14(value) && value.type === "doc") {
|
|
68758
68836
|
return {
|
|
68759
68837
|
type: "doc",
|
|
68760
68838
|
content: Array.isArray(value.content) ? value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) : []
|
|
@@ -68763,7 +68841,7 @@ function unwrapRichTextValue(value) {
|
|
|
68763
68841
|
return EMPTY_SITE_BANNER_BODY;
|
|
68764
68842
|
}
|
|
68765
68843
|
function isTipTapNodeLike(value) {
|
|
68766
|
-
return
|
|
68844
|
+
return isRecord14(value) && typeof value.type === "string";
|
|
68767
68845
|
}
|
|
68768
68846
|
function coerceTipTapNode(value) {
|
|
68769
68847
|
return {
|
|
@@ -68771,9 +68849,9 @@ function coerceTipTapNode(value) {
|
|
|
68771
68849
|
...Array.isArray(value.content) ? { content: value.content.filter(isTipTapNodeLike).map(coerceTipTapNode) } : {},
|
|
68772
68850
|
...typeof value.text === "string" ? { text: value.text } : {},
|
|
68773
68851
|
...Array.isArray(value.marks) ? {
|
|
68774
|
-
marks: value.marks.filter((mark) =>
|
|
68852
|
+
marks: value.marks.filter((mark) => isRecord14(mark) && typeof mark.type === "string").map((mark) => ({
|
|
68775
68853
|
type: mark.type,
|
|
68776
|
-
...
|
|
68854
|
+
...isRecord14(mark.attrs) ? { attrs: mark.attrs } : {}
|
|
68777
68855
|
}))
|
|
68778
68856
|
} : {}
|
|
68779
68857
|
};
|
|
@@ -68943,7 +69021,7 @@ var ENTRY_REF_KEYS = [
|
|
|
68943
69021
|
"entryId",
|
|
68944
69022
|
"slug"
|
|
68945
69023
|
];
|
|
68946
|
-
function
|
|
69024
|
+
function isRecord15(value) {
|
|
68947
69025
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
68948
69026
|
}
|
|
68949
69027
|
function extractManualEntryRef(item) {
|
|
@@ -68951,7 +69029,7 @@ function extractManualEntryRef(item) {
|
|
|
68951
69029
|
const trimmed = item.trim();
|
|
68952
69030
|
return trimmed.length > 0 ? trimmed : null;
|
|
68953
69031
|
}
|
|
68954
|
-
if (!
|
|
69032
|
+
if (!isRecord15(item)) return null;
|
|
68955
69033
|
for (const key of ENTRY_REF_KEYS) {
|
|
68956
69034
|
const raw = item[key];
|
|
68957
69035
|
if (typeof raw === "string" && raw.trim().length > 0) {
|
|
@@ -69472,7 +69550,7 @@ function collectMediaAssetSidecar(mediaAssets) {
|
|
|
69472
69550
|
return Array.isArray(mediaAssets) && mediaAssets.length > 0 ? mediaAssets : void 0;
|
|
69473
69551
|
}
|
|
69474
69552
|
function convertPageResponseBlock(block) {
|
|
69475
|
-
if (!
|
|
69553
|
+
if (!isRecord16(block)) {
|
|
69476
69554
|
throw new Error("Invalid block format in page API response");
|
|
69477
69555
|
}
|
|
69478
69556
|
if (typeof block.id !== "string" && block.id !== null) {
|
|
@@ -69503,20 +69581,20 @@ function buildPageOutline(input) {
|
|
|
69503
69581
|
blocks: input.blocks.map(convertPageResponseBlock)
|
|
69504
69582
|
};
|
|
69505
69583
|
}
|
|
69506
|
-
function
|
|
69584
|
+
function isRecord16(value) {
|
|
69507
69585
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
69508
69586
|
}
|
|
69509
69587
|
function readContentRecord(value) {
|
|
69510
|
-
return
|
|
69588
|
+
return isRecord16(value) ? value : void 0;
|
|
69511
69589
|
}
|
|
69512
69590
|
function readNestedContentRecord(value) {
|
|
69513
|
-
if (!
|
|
69591
|
+
if (!isRecord16(value)) return null;
|
|
69514
69592
|
return readContentRecord(value.data) ?? null;
|
|
69515
69593
|
}
|
|
69516
69594
|
function sanitizeSdkRuntimeBlockContent(blockKind, content) {
|
|
69517
69595
|
if (blockKind !== "block.newsletter-signup") return content;
|
|
69518
69596
|
const sanitized = sanitizeNewsletterSignupPublicContent(content);
|
|
69519
|
-
return
|
|
69597
|
+
return isRecord16(sanitized) ? sanitized : {};
|
|
69520
69598
|
}
|
|
69521
69599
|
function sanitizeNullableSdkRuntimeBlockContent(blockKind, content) {
|
|
69522
69600
|
return content ? sanitizeSdkRuntimeBlockContent(blockKind, content) : null;
|