@riverbankcms/sdk 0.60.9 → 0.60.12
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/_dts/api/src/accessAdmin.d.ts +102 -0
- package/dist/_dts/api/src/common/envelope.d.ts +1 -1
- package/dist/_dts/api/src/domains.d.ts +14 -13
- package/dist/_dts/api/src/endpoints.d.ts +32 -0
- package/dist/_dts/api/src/index.d.ts +4 -3
- package/dist/_dts/api/src/navigation/linkValue.d.ts +15 -2
- package/dist/_dts/api/src/navigation.d.ts +2 -0
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +15 -1
- package/dist/_dts/blocks/src/index.d.ts +1 -1
- package/dist/_dts/blocks/src/system/node/fragments/ctaButton.d.ts +2 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +2 -1
- package/dist/_dts/blocks/src/system/types/link.d.ts +7 -1
- package/dist/_dts/core/src/participant-identity.d.ts +72 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +96 -60
- package/dist/_dts/db/src/schemas/forms.d.ts +135 -24
- package/dist/_dts/sdk/src/contracts/content.d.ts +7 -1
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +1 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/buttons/classNames.d.ts +21 -0
- package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -0
- package/dist/_dts/theme-core/src/buttons/types.d.ts +1 -0
- package/dist/cli/index.mjs +188 -9
- package/dist/client/bookings.mjs +808 -149
- package/dist/client/client.mjs +553 -130
- package/dist/client/hooks.mjs +119 -0
- package/dist/client/rendering/client.mjs +412 -113
- package/dist/client/rendering/islands.mjs +4605 -4361
- package/dist/client/rendering.mjs +580 -157
- package/dist/preview-next/before-render.mjs +57 -0
- package/dist/preview-next/client/runtime.mjs +580 -151
- package/dist/preview-next/middleware.mjs +57 -0
- package/dist/server/components.mjs +293 -45
- package/dist/server/config-validation.mjs +119 -0
- package/dist/server/config.mjs +119 -0
- package/dist/server/data.mjs +119 -0
- package/dist/server/index.mjs +120 -1
- package/dist/server/next.mjs +300 -52
- package/dist/server/page-converter.mjs +62 -0
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +293 -45
- package/dist/server/rendering.mjs +293 -45
- package/dist/server/routing.mjs +159 -29
- package/dist/server/server.mjs +120 -1
- package/package.json +1 -1
- package/dist/_dts/blocks/src/system/runtime/shared/themedButtonClass.d.ts +0 -11
|
@@ -2261,6 +2261,63 @@ var init_endpoints = __esm({
|
|
|
2261
2261
|
auth: "user",
|
|
2262
2262
|
responseKind: "json"
|
|
2263
2263
|
},
|
|
2264
|
+
updateRegisteredDomainContact: {
|
|
2265
|
+
path: "/domains/{domainId}/registrar/contact",
|
|
2266
|
+
method: "POST",
|
|
2267
|
+
errors: [
|
|
2268
|
+
"validation:invalid_input",
|
|
2269
|
+
"resource:not_found",
|
|
2270
|
+
"auth:forbidden",
|
|
2271
|
+
"external:service_error",
|
|
2272
|
+
"external:registrar_orphaned_contact_profile",
|
|
2273
|
+
"server:internal_error"
|
|
2274
|
+
],
|
|
2275
|
+
tags: ["domains", "domain-{domainId}", "domain-registrar"],
|
|
2276
|
+
auth: "user",
|
|
2277
|
+
responseKind: "json"
|
|
2278
|
+
},
|
|
2279
|
+
setRegisteredDomainPrivacy: {
|
|
2280
|
+
path: "/domains/{domainId}/registrar/privacy",
|
|
2281
|
+
method: "POST",
|
|
2282
|
+
errors: [
|
|
2283
|
+
"validation:invalid_input",
|
|
2284
|
+
"resource:not_found",
|
|
2285
|
+
"auth:forbidden",
|
|
2286
|
+
"external:service_error",
|
|
2287
|
+
"server:internal_error"
|
|
2288
|
+
],
|
|
2289
|
+
tags: ["domains", "domain-{domainId}", "domain-registrar"],
|
|
2290
|
+
auth: "user",
|
|
2291
|
+
responseKind: "json"
|
|
2292
|
+
},
|
|
2293
|
+
setRegisteredDomainAutoRenew: {
|
|
2294
|
+
path: "/domains/{domainId}/registrar/auto-renew",
|
|
2295
|
+
method: "POST",
|
|
2296
|
+
errors: [
|
|
2297
|
+
"validation:invalid_input",
|
|
2298
|
+
"resource:not_found",
|
|
2299
|
+
"auth:forbidden",
|
|
2300
|
+
"external:service_error",
|
|
2301
|
+
"server:internal_error"
|
|
2302
|
+
],
|
|
2303
|
+
tags: ["domains", "domain-{domainId}", "domain-registrar"],
|
|
2304
|
+
auth: "user",
|
|
2305
|
+
responseKind: "json"
|
|
2306
|
+
},
|
|
2307
|
+
getRegisteredDomainRenewalPosture: {
|
|
2308
|
+
path: "/domains/{domainId}/registrar/renewal",
|
|
2309
|
+
method: "GET",
|
|
2310
|
+
errors: [
|
|
2311
|
+
"validation:invalid_input",
|
|
2312
|
+
"resource:not_found",
|
|
2313
|
+
"auth:forbidden",
|
|
2314
|
+
"external:service_error",
|
|
2315
|
+
"server:internal_error"
|
|
2316
|
+
],
|
|
2317
|
+
tags: ["domains", "domain-{domainId}", "domain-registrar"],
|
|
2318
|
+
auth: "user",
|
|
2319
|
+
responseKind: "json"
|
|
2320
|
+
},
|
|
2264
2321
|
retryDomainVercel: {
|
|
2265
2322
|
path: "/domains/{domainId}/vercel",
|
|
2266
2323
|
method: "POST",
|
|
@@ -96829,9 +96886,70 @@ var init_participants = __esm({
|
|
|
96829
96886
|
});
|
|
96830
96887
|
|
|
96831
96888
|
// ../core/src/participant-identity.ts
|
|
96889
|
+
var PARTICIPANT_PARTICIPATION_IDENTITY_FIELD_CLASSIFICATION_BY_FIELD;
|
|
96832
96890
|
var init_participant_identity = __esm({
|
|
96833
96891
|
"../core/src/participant-identity.ts"() {
|
|
96834
96892
|
init_assertNever();
|
|
96893
|
+
PARTICIPANT_PARTICIPATION_IDENTITY_FIELD_CLASSIFICATION_BY_FIELD = {
|
|
96894
|
+
participant_id: {
|
|
96895
|
+
field: "participant_id",
|
|
96896
|
+
role: "canonical_link",
|
|
96897
|
+
canonicalSource: "booking_participants.id",
|
|
96898
|
+
contractAction: "tighten_in_839",
|
|
96899
|
+
notes: "Canonical person-subject link for a participation. #839 should enforce this once preflight is clean."
|
|
96900
|
+
},
|
|
96901
|
+
display_name: {
|
|
96902
|
+
field: "display_name",
|
|
96903
|
+
role: "contextual_snapshot",
|
|
96904
|
+
canonicalSource: "booking_participants.display_name for live identity",
|
|
96905
|
+
contractAction: "retain_as_snapshot",
|
|
96906
|
+
notes: "Participation-time display context. Readers must not treat it as mutable live participant identity."
|
|
96907
|
+
},
|
|
96908
|
+
email: {
|
|
96909
|
+
field: "email",
|
|
96910
|
+
role: "contextual_snapshot",
|
|
96911
|
+
canonicalSource: "booking_participants.email_normalized for live email identity",
|
|
96912
|
+
contractAction: "retain_as_snapshot",
|
|
96913
|
+
notes: "Participation-time contact snapshot used for notifications/context. Live identity belongs to the participant row."
|
|
96914
|
+
},
|
|
96915
|
+
email_normalized: {
|
|
96916
|
+
field: "email_normalized",
|
|
96917
|
+
role: "contextual_snapshot",
|
|
96918
|
+
canonicalSource: "booking_participants.email_normalized for live email identity",
|
|
96919
|
+
contractAction: "retain_as_snapshot",
|
|
96920
|
+
notes: "Normalized snapshot/dedupe helper for the participation slot, not live person authority."
|
|
96921
|
+
},
|
|
96922
|
+
phone: {
|
|
96923
|
+
field: "phone",
|
|
96924
|
+
role: "contextual_snapshot",
|
|
96925
|
+
canonicalSource: "booking_participants.phone for live phone identity",
|
|
96926
|
+
contractAction: "retain_as_snapshot",
|
|
96927
|
+
notes: "Participation-time phone context. Live identity belongs to the participant row."
|
|
96928
|
+
},
|
|
96929
|
+
identity_state: {
|
|
96930
|
+
field: "identity_state",
|
|
96931
|
+
role: "materialization_state",
|
|
96932
|
+
canonicalSource: "booking_participants.identity_state for subject state",
|
|
96933
|
+
contractAction: "review_for_later_contract_cleanup",
|
|
96934
|
+
notes: "Slot materialization state: booker_supplied, contactable, portal_claimed, or staff_verified."
|
|
96935
|
+
},
|
|
96936
|
+
event_attendee_guest_id: {
|
|
96937
|
+
field: "event_attendee_guest_id",
|
|
96938
|
+
role: "compatibility_projection",
|
|
96939
|
+
canonicalSource: "canonical participant slot plus #838 event guest compatibility projection",
|
|
96940
|
+
contractAction: "retain_as_projection",
|
|
96941
|
+
notes: "Compatibility FK for event guest read models. It is not person identity authority."
|
|
96942
|
+
}
|
|
96943
|
+
};
|
|
96944
|
+
[
|
|
96945
|
+
PARTICIPANT_PARTICIPATION_IDENTITY_FIELD_CLASSIFICATION_BY_FIELD.participant_id,
|
|
96946
|
+
PARTICIPANT_PARTICIPATION_IDENTITY_FIELD_CLASSIFICATION_BY_FIELD.display_name,
|
|
96947
|
+
PARTICIPANT_PARTICIPATION_IDENTITY_FIELD_CLASSIFICATION_BY_FIELD.email,
|
|
96948
|
+
PARTICIPANT_PARTICIPATION_IDENTITY_FIELD_CLASSIFICATION_BY_FIELD.email_normalized,
|
|
96949
|
+
PARTICIPANT_PARTICIPATION_IDENTITY_FIELD_CLASSIFICATION_BY_FIELD.phone,
|
|
96950
|
+
PARTICIPANT_PARTICIPATION_IDENTITY_FIELD_CLASSIFICATION_BY_FIELD.identity_state,
|
|
96951
|
+
PARTICIPANT_PARTICIPATION_IDENTITY_FIELD_CLASSIFICATION_BY_FIELD.event_attendee_guest_id
|
|
96952
|
+
];
|
|
96835
96953
|
}
|
|
96836
96954
|
});
|
|
96837
96955
|
|
|
@@ -100647,6 +100765,9 @@ function validationContext(options = {}) {
|
|
|
100647
100765
|
allowIncomplete: isDraft || (options.allowIncomplete ?? false)
|
|
100648
100766
|
};
|
|
100649
100767
|
}
|
|
100768
|
+
function formatFieldPath(path) {
|
|
100769
|
+
return path.map((segment) => String(segment)).join(".");
|
|
100770
|
+
}
|
|
100650
100771
|
function fieldIssueToMessage(issue2) {
|
|
100651
100772
|
switch (issue2.kind) {
|
|
100652
100773
|
case "required":
|
|
@@ -100870,7 +100991,7 @@ function normalizeRepeaterItems(plan, value, ctx) {
|
|
|
100870
100991
|
return normalizeObjectChildren(fields3, itemRecord, ctx);
|
|
100871
100992
|
});
|
|
100872
100993
|
}
|
|
100873
|
-
function normalizeNumberInput(value,
|
|
100994
|
+
function normalizeNumberInput(value, _allowNull) {
|
|
100874
100995
|
if (value === "") return void 0;
|
|
100875
100996
|
if (typeof value === "string" && value.trim() !== "") return Number(value);
|
|
100876
100997
|
return value;
|
|
@@ -101002,7 +101123,7 @@ function validateRepeaterItem(plan, item, index2, ctx) {
|
|
|
101002
101123
|
const fields3 = plan.repeatedItemVariants ? plan.repeatedItemVariants.find((variant) => variant.typeId === itemType)?.fields : plan.repeatedItemPlan;
|
|
101003
101124
|
if (!fields3) return [];
|
|
101004
101125
|
return fields3.flatMap((childPlan) => {
|
|
101005
|
-
const indexedPlan =
|
|
101126
|
+
const indexedPlan = materializeRepeaterItemPlan(childPlan, plan.path, index2);
|
|
101006
101127
|
return validateNormalizedFieldValue(indexedPlan, item[childPlan.fieldId], ctx);
|
|
101007
101128
|
});
|
|
101008
101129
|
}
|
|
@@ -101014,12 +101135,58 @@ function validateGroupPlan(plan, value, ctx) {
|
|
|
101014
101135
|
function childValidationContext(plan, ctx) {
|
|
101015
101136
|
return plan.allowNullChildren ? { ...ctx, allowNull: true } : ctx;
|
|
101016
101137
|
}
|
|
101017
|
-
function
|
|
101018
|
-
|
|
101019
|
-
|
|
101020
|
-
|
|
101021
|
-
|
|
101022
|
-
|
|
101138
|
+
function materializeRepeaterItemPlan(plan, parentPath, index2) {
|
|
101139
|
+
return rebaseFieldPlanPath(plan, [...parentPath, 0], [...parentPath, index2]);
|
|
101140
|
+
}
|
|
101141
|
+
function rebaseFieldPlanPath(plan, fromPrefix, toPrefix) {
|
|
101142
|
+
const path = rebaseFieldPath(plan.path, fromPrefix, toPrefix);
|
|
101143
|
+
switch (plan.kind) {
|
|
101144
|
+
case "group":
|
|
101145
|
+
return {
|
|
101146
|
+
...plan,
|
|
101147
|
+
path,
|
|
101148
|
+
children: plan.children.map((childPlan) => rebaseFieldPlanPath(childPlan, fromPrefix, toPrefix))
|
|
101149
|
+
};
|
|
101150
|
+
case "repeater":
|
|
101151
|
+
return {
|
|
101152
|
+
...plan,
|
|
101153
|
+
path,
|
|
101154
|
+
...plan.repeatedItemVariants ? {
|
|
101155
|
+
repeatedItemVariants: plan.repeatedItemVariants.map((variant) => ({
|
|
101156
|
+
...variant,
|
|
101157
|
+
fields: variant.fields.map((fieldPlan) => rebaseFieldPlanPath(fieldPlan, fromPrefix, toPrefix))
|
|
101158
|
+
}))
|
|
101159
|
+
} : {},
|
|
101160
|
+
...plan.repeatedItemPlan ? {
|
|
101161
|
+
repeatedItemPlan: plan.repeatedItemPlan.map(
|
|
101162
|
+
(fieldPlan) => rebaseFieldPlanPath(fieldPlan, fromPrefix, toPrefix)
|
|
101163
|
+
)
|
|
101164
|
+
} : {}
|
|
101165
|
+
};
|
|
101166
|
+
case "string":
|
|
101167
|
+
case "number":
|
|
101168
|
+
case "boolean":
|
|
101169
|
+
case "richText":
|
|
101170
|
+
case "media":
|
|
101171
|
+
case "link":
|
|
101172
|
+
case "select":
|
|
101173
|
+
case "passthrough":
|
|
101174
|
+
return {
|
|
101175
|
+
...plan,
|
|
101176
|
+
path
|
|
101177
|
+
};
|
|
101178
|
+
default:
|
|
101179
|
+
return assertNever5(plan);
|
|
101180
|
+
}
|
|
101181
|
+
}
|
|
101182
|
+
function rebaseFieldPath(path, fromPrefix, toPrefix) {
|
|
101183
|
+
if (!startsWithFieldPath(path, fromPrefix)) {
|
|
101184
|
+
throw new Error(`Cannot rebase field path ${formatFieldPath(path)} from ${formatFieldPath(fromPrefix)}`);
|
|
101185
|
+
}
|
|
101186
|
+
return [...toPrefix, ...path.slice(fromPrefix.length)];
|
|
101187
|
+
}
|
|
101188
|
+
function startsWithFieldPath(path, prefix) {
|
|
101189
|
+
return prefix.every((segment, index2) => path[index2] === segment);
|
|
101023
101190
|
}
|
|
101024
101191
|
function issue(plan, kind, extra) {
|
|
101025
101192
|
return {
|
|
@@ -101628,6 +101795,15 @@ var init_curatedChoices = __esm({
|
|
|
101628
101795
|
"../theme-core/src/site-styles/curatedChoices.ts"() {
|
|
101629
101796
|
}
|
|
101630
101797
|
});
|
|
101798
|
+
function isVariantRole(value) {
|
|
101799
|
+
return VARIANT_ROLES.includes(value);
|
|
101800
|
+
}
|
|
101801
|
+
function asSpecialVariantId(value) {
|
|
101802
|
+
if (value.length === 0) {
|
|
101803
|
+
throw new Error("SpecialVariantId must be a non-empty string");
|
|
101804
|
+
}
|
|
101805
|
+
return value;
|
|
101806
|
+
}
|
|
101631
101807
|
var VARIANT_ROLES, DEFAULT_VARIANT_ALIAS_ID, cornerStyleSchema, shadowSizeSchema, textTransformSchema, fontWeightSchema, buttonTypographySchema, letterSpacingSchema, hoverTransformSchema, hoverColorSchema, buttonPaddingPresetSchema, gradientStyleSchema, gradientSharpnessSchema, prioritySchema, buttonSizeNameSchema, PADDING_TOKEN_PATTERN, paddingShorthandSchema, buttonSizeConfigSchema, buttonSizesSchema, buttonGlobalSettingsSchema, gradientDirectionSchema, buttonBackgroundSchema, effectApplicationSchema, buttonBorderSchema, variantShadowSchema, variantEffectsSchema, variantSizeOverridesSchema, buttonVariantSchema, buttonSystemSchema;
|
|
101632
101808
|
var init_types6 = __esm({
|
|
101633
101809
|
"../theme-core/src/buttons/types.ts"() {
|
|
@@ -102451,6 +102627,47 @@ var init_media = __esm({
|
|
|
102451
102627
|
}
|
|
102452
102628
|
});
|
|
102453
102629
|
|
|
102630
|
+
// ../theme-core/src/buttons/classNames.ts
|
|
102631
|
+
function parseThemeButtonVariantId(value) {
|
|
102632
|
+
const normalized = value?.trim() ?? "";
|
|
102633
|
+
if (normalized.length === 0) {
|
|
102634
|
+
return null;
|
|
102635
|
+
}
|
|
102636
|
+
if (normalized === DEFAULT_VARIANT_ALIAS_ID) {
|
|
102637
|
+
return DEFAULT_VARIANT_ALIAS_ID;
|
|
102638
|
+
}
|
|
102639
|
+
return isVariantRole(normalized) ? normalized : asSpecialVariantId(normalized);
|
|
102640
|
+
}
|
|
102641
|
+
function themeButtonVariantClassNames(variant) {
|
|
102642
|
+
if (variant === DEFAULT_VARIANT_ALIAS_ID) {
|
|
102643
|
+
return [variant];
|
|
102644
|
+
}
|
|
102645
|
+
return [variant, `button-${variant}`];
|
|
102646
|
+
}
|
|
102647
|
+
function themeButtonSizeClassName(size4) {
|
|
102648
|
+
return `btn-${size4}`;
|
|
102649
|
+
}
|
|
102650
|
+
function themeButtonSelector(variant, size4) {
|
|
102651
|
+
const baseSelector = `.${variant}`;
|
|
102652
|
+
if (!size4) {
|
|
102653
|
+
return baseSelector;
|
|
102654
|
+
}
|
|
102655
|
+
return `${baseSelector}.${themeButtonSizeClassName(size4)}`;
|
|
102656
|
+
}
|
|
102657
|
+
function themeButtonClassName(spec) {
|
|
102658
|
+
const classes = [
|
|
102659
|
+
...themeButtonVariantClassNames(spec.variant),
|
|
102660
|
+
themeButtonSizeClassName(spec.size),
|
|
102661
|
+
spec.extraClassName
|
|
102662
|
+
];
|
|
102663
|
+
return classes.filter(Boolean).join(" ");
|
|
102664
|
+
}
|
|
102665
|
+
var init_classNames = __esm({
|
|
102666
|
+
"../theme-core/src/buttons/classNames.ts"() {
|
|
102667
|
+
init_types6();
|
|
102668
|
+
}
|
|
102669
|
+
});
|
|
102670
|
+
|
|
102454
102671
|
// ../theme-core/src/tokens/resolver.ts
|
|
102455
102672
|
var TokenResolver;
|
|
102456
102673
|
var init_resolver = __esm({
|
|
@@ -104103,17 +104320,25 @@ function resolveAliasSource(enabled) {
|
|
|
104103
104320
|
}
|
|
104104
104321
|
function variantChunks(variant, global2, themeSizes, themeId, tokens, theme) {
|
|
104105
104322
|
const out = [];
|
|
104106
|
-
|
|
104107
|
-
|
|
104323
|
+
const variantId = parseButtonVariantIdForCss(variant.id);
|
|
104324
|
+
out.push(variantBaseRule(variant, variantId, global2, themeId, tokens, theme));
|
|
104325
|
+
const hoverBg = variantHoverBackgroundRule(variant, variantId, global2, themeId, tokens);
|
|
104108
104326
|
if (hoverBg) out.push(hoverBg);
|
|
104109
104327
|
const effects = variantEffectsCss(variant, themeId, tokens, theme);
|
|
104110
104328
|
if (effects) out.push({ raw: effects });
|
|
104111
|
-
out.push(...variantDisabledRules(
|
|
104112
|
-
out.push(...variantSizeRules(variant, themeSizes, themeId));
|
|
104329
|
+
out.push(...variantDisabledRules(variantId, themeId));
|
|
104330
|
+
out.push(...variantSizeRules(variant, variantId, themeSizes, themeId));
|
|
104113
104331
|
return out;
|
|
104114
104332
|
}
|
|
104115
|
-
function
|
|
104116
|
-
const
|
|
104333
|
+
function parseButtonVariantIdForCss(value) {
|
|
104334
|
+
const variantId = parseThemeButtonVariantId(value);
|
|
104335
|
+
if (!variantId) {
|
|
104336
|
+
throw new Error("Button variant id must be a non-empty string");
|
|
104337
|
+
}
|
|
104338
|
+
return variantId;
|
|
104339
|
+
}
|
|
104340
|
+
function variantBaseRule(variant, variantId, global2, themeId, tokens, theme) {
|
|
104341
|
+
const selector = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}`;
|
|
104117
104342
|
const decls = [];
|
|
104118
104343
|
decls.push(["font-weight", String(global2.fontWeight)]);
|
|
104119
104344
|
decls.push(["font-family", resolveFontFamily(global2)]);
|
|
@@ -104146,13 +104371,13 @@ function variantBaseRule(variant, global2, themeId, tokens, theme) {
|
|
|
104146
104371
|
}
|
|
104147
104372
|
return rule(selector, decls);
|
|
104148
104373
|
}
|
|
104149
|
-
function variantHoverBackgroundRule(variant, global2, themeId, tokens) {
|
|
104374
|
+
function variantHoverBackgroundRule(variant, variantId, global2, themeId, tokens) {
|
|
104150
104375
|
let hoverToken = variant.hoverBackgroundToken;
|
|
104151
104376
|
if (!hoverToken && global2.hoverColor === "token" && global2.hoverColorToken) {
|
|
104152
104377
|
hoverToken = global2.hoverColorToken;
|
|
104153
104378
|
}
|
|
104154
104379
|
if (!hoverToken) return null;
|
|
104155
|
-
return rule(`:where([data-theme-scope="${themeId}"])
|
|
104380
|
+
return rule(`:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}:hover`, [
|
|
104156
104381
|
["background-color", tokens.getColor(hoverToken)]
|
|
104157
104382
|
]);
|
|
104158
104383
|
}
|
|
@@ -104172,8 +104397,8 @@ function variantEffectsCss(variant, themeId, tokens, theme) {
|
|
|
104172
104397
|
theme
|
|
104173
104398
|
});
|
|
104174
104399
|
}
|
|
104175
|
-
function variantDisabledRules(
|
|
104176
|
-
const base2 = `:where([data-theme-scope="${themeId}"])
|
|
104400
|
+
function variantDisabledRules(variantId, themeId) {
|
|
104401
|
+
const base2 = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId)}:disabled`;
|
|
104177
104402
|
const disabledSelectors = [base2, `${base2}:hover`, `${base2}:active`, `${base2}:focus`];
|
|
104178
104403
|
const pseudoSelectors = [`${base2}::before`, `${base2}::after`];
|
|
104179
104404
|
return [
|
|
@@ -104191,12 +104416,12 @@ function variantDisabledRules(variant, themeId) {
|
|
|
104191
104416
|
])
|
|
104192
104417
|
];
|
|
104193
104418
|
}
|
|
104194
|
-
function variantSizeRules(variant, themeSizes, themeId) {
|
|
104419
|
+
function variantSizeRules(variant, variantId, themeSizes, themeId) {
|
|
104195
104420
|
const borderWidth = variant.border ? BORDER_WIDTH_MAP[variant.border.widthClass] || "1px" : "0px";
|
|
104196
104421
|
const rules = [];
|
|
104197
104422
|
for (const sizeName of BUTTON_SIZE_NAMES) {
|
|
104198
104423
|
const config = resolveSizeConfig(variant, sizeName, themeSizes);
|
|
104199
|
-
const selector = `:where([data-theme-scope="${themeId}"])
|
|
104424
|
+
const selector = `:where([data-theme-scope="${themeId}"]) ${themeButtonSelector(variantId, sizeName)}`;
|
|
104200
104425
|
const decls = [];
|
|
104201
104426
|
for (const decl of paddingDeclarations(config.padding, borderWidth)) decls.push(decl);
|
|
104202
104427
|
if (config.fontSize) {
|
|
@@ -104258,6 +104483,7 @@ var BUTTON_SIZE_NAMES, LETTER_SPACING_MAP, STRUCTURAL_DECLARATIONS;
|
|
|
104258
104483
|
var init_generateButtonCss = __esm({
|
|
104259
104484
|
"../theme-core/src/buttons/generateButtonCss.ts"() {
|
|
104260
104485
|
init_types6();
|
|
104486
|
+
init_classNames();
|
|
104261
104487
|
init_resolver();
|
|
104262
104488
|
init_generateEffectsCSS();
|
|
104263
104489
|
init_constants4();
|
|
@@ -104300,6 +104526,7 @@ var init_core = __esm({
|
|
|
104300
104526
|
var init_buttons = __esm({
|
|
104301
104527
|
"../theme-core/src/buttons/index.ts"() {
|
|
104302
104528
|
init_types6();
|
|
104529
|
+
init_classNames();
|
|
104303
104530
|
init_generateButtonCss();
|
|
104304
104531
|
init_generateDefaultButtonSystem();
|
|
104305
104532
|
init_constants4();
|
|
@@ -121058,18 +121285,6 @@ var init_EventCardIcons = __esm({
|
|
|
121058
121285
|
"../blocks/src/system/runtime/nodes/events/shared/EventCardIcons.tsx"() {
|
|
121059
121286
|
}
|
|
121060
121287
|
});
|
|
121061
|
-
|
|
121062
|
-
// ../blocks/src/system/runtime/shared/themedButtonClass.ts
|
|
121063
|
-
function themedButtonClass(spec) {
|
|
121064
|
-
const { variant, size: size4, extraClassName } = spec;
|
|
121065
|
-
const normalizedVariant = variant.trim();
|
|
121066
|
-
const variantClasses = normalizedVariant ? [normalizedVariant, `button-${normalizedVariant}`] : [];
|
|
121067
|
-
return [...variantClasses, `btn-${size4}`, extraClassName].filter(Boolean).join(" ");
|
|
121068
|
-
}
|
|
121069
|
-
var init_themedButtonClass = __esm({
|
|
121070
|
-
"../blocks/src/system/runtime/shared/themedButtonClass.ts"() {
|
|
121071
|
-
}
|
|
121072
|
-
});
|
|
121073
121288
|
function formatCapacityText(event, options) {
|
|
121074
121289
|
if (event.capacity == null) return null;
|
|
121075
121290
|
if (options.isSoldOut) return "Sold out";
|
|
@@ -121114,7 +121329,7 @@ var init_EventCard = __esm({
|
|
|
121114
121329
|
init_EventCardIcons();
|
|
121115
121330
|
init_eventCapacity();
|
|
121116
121331
|
init_utils7();
|
|
121117
|
-
|
|
121332
|
+
init_buttons();
|
|
121118
121333
|
EventCard = ({
|
|
121119
121334
|
event,
|
|
121120
121335
|
cardVariant = "default",
|
|
@@ -121140,7 +121355,7 @@ var init_EventCard = __esm({
|
|
|
121140
121355
|
const isSoldOut = cta.hidden;
|
|
121141
121356
|
const { available: spotsLeft } = getEventAvailability(event);
|
|
121142
121357
|
const cardClass = `card-${cardVariant}`;
|
|
121143
|
-
const buttonClass =
|
|
121358
|
+
const buttonClass = themeButtonClassName({ variant: buttonVariant, size: "md" });
|
|
121144
121359
|
const title = event.title;
|
|
121145
121360
|
const summary = event.presentation?.summary ?? event.description;
|
|
121146
121361
|
const image = event.presentation?.image ?? null;
|
|
@@ -121218,7 +121433,7 @@ var init_EventCompactRow = __esm({
|
|
|
121218
121433
|
"../blocks/src/system/runtime/nodes/events/shared/EventCompactRow.tsx"() {
|
|
121219
121434
|
init_utils7();
|
|
121220
121435
|
init_EventCardIcons();
|
|
121221
|
-
|
|
121436
|
+
init_buttons();
|
|
121222
121437
|
EventCompactRow = ({
|
|
121223
121438
|
event,
|
|
121224
121439
|
buttonVariant = "primary",
|
|
@@ -121230,7 +121445,7 @@ var init_EventCompactRow = __esm({
|
|
|
121230
121445
|
const price = formatEventPrice(event);
|
|
121231
121446
|
const teacherLine = formatEventTeacherLine(event);
|
|
121232
121447
|
const cta = resolveEventCta(event, buttonText);
|
|
121233
|
-
const buttonClass =
|
|
121448
|
+
const buttonClass = themeButtonClassName({ variant: buttonVariant, size: "sm" });
|
|
121234
121449
|
return /* @__PURE__ */ jsxs("div", { className: "event-compact-row", children: [
|
|
121235
121450
|
/* @__PURE__ */ jsxs("div", { className: "event-compact-row-content", children: [
|
|
121236
121451
|
/* @__PURE__ */ jsxs("div", { className: "event-compact-row-top", children: [
|
|
@@ -128440,11 +128655,12 @@ var init_basic = __esm({
|
|
|
128440
128655
|
}
|
|
128441
128656
|
return null;
|
|
128442
128657
|
}
|
|
128443
|
-
const resolvedVariantId =
|
|
128444
|
-
const
|
|
128445
|
-
|
|
128446
|
-
|
|
128447
|
-
|
|
128658
|
+
const resolvedVariantId = parseThemeButtonVariantId(variantId);
|
|
128659
|
+
const combinedClassName = resolvedVariantId ? themeButtonClassName({
|
|
128660
|
+
variant: resolvedVariantId,
|
|
128661
|
+
size: size4,
|
|
128662
|
+
extraClassName: className
|
|
128663
|
+
}) : className;
|
|
128448
128664
|
if (resolvedHref) {
|
|
128449
128665
|
return /* @__PURE__ */ jsx(
|
|
128450
128666
|
"a",
|
|
@@ -128664,7 +128880,7 @@ function FileDownloadNode({
|
|
|
128664
128880
|
{
|
|
128665
128881
|
href,
|
|
128666
128882
|
download: filename,
|
|
128667
|
-
className:
|
|
128883
|
+
className: themeButtonClassName({
|
|
128668
128884
|
variant,
|
|
128669
128885
|
size: "md",
|
|
128670
128886
|
extraClassName: "rb-inline-flex rb-shrink-0 rb-items-center rb-justify-center rb-gap-2"
|
|
@@ -128683,7 +128899,7 @@ var init_file_download2 = __esm({
|
|
|
128683
128899
|
init_lucide_react();
|
|
128684
128900
|
init_colorStyles();
|
|
128685
128901
|
init_media3();
|
|
128686
|
-
|
|
128902
|
+
init_buttons();
|
|
128687
128903
|
init_media4();
|
|
128688
128904
|
FILE_DOWNLOAD_BUTTON_VARIANTS = ["primary", "secondary", "outline", "link"];
|
|
128689
128905
|
}
|
|
@@ -130827,7 +131043,7 @@ var EventSpotlight;
|
|
|
130827
131043
|
var init_EventSpotlight = __esm({
|
|
130828
131044
|
"../blocks/src/system/runtime/nodes/events/EventSpotlight.tsx"() {
|
|
130829
131045
|
init_shared7();
|
|
130830
|
-
|
|
131046
|
+
init_buttons();
|
|
130831
131047
|
EventSpotlight = ({
|
|
130832
131048
|
events: events2,
|
|
130833
131049
|
layout = "grid",
|
|
@@ -130849,7 +131065,7 @@ var init_EventSpotlight = __esm({
|
|
|
130849
131065
|
}
|
|
130850
131066
|
const containerClass = getContainerClass(layout, columns);
|
|
130851
131067
|
const cardOrientation = getCardOrientation(layout);
|
|
130852
|
-
const buttonClass =
|
|
131068
|
+
const buttonClass = themeButtonClassName({ variant: buttonVariant, size: "md" });
|
|
130853
131069
|
return /* @__PURE__ */ jsxs("div", { className: `event-spotlight-section ${className || ""}`, "data-block": "event-spotlight", children: [
|
|
130854
131070
|
/* @__PURE__ */ jsx("div", { className: `event-spotlight ${containerClass}`, children: normalizedEvents.map((event) => /* @__PURE__ */ jsx(
|
|
130855
131071
|
EventCard,
|
|
@@ -131343,7 +131559,16 @@ var init_view4 = __esm({
|
|
|
131343
131559
|
});
|
|
131344
131560
|
function renderServerPendingAction(label, soldOut) {
|
|
131345
131561
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
131346
|
-
/* @__PURE__ */ jsx(
|
|
131562
|
+
/* @__PURE__ */ jsx(
|
|
131563
|
+
"button",
|
|
131564
|
+
{
|
|
131565
|
+
type: "button",
|
|
131566
|
+
className: themeButtonClassName({ variant: "default", size: "md" }),
|
|
131567
|
+
disabled: true,
|
|
131568
|
+
"aria-disabled": "true",
|
|
131569
|
+
children: soldOut ? "Sold out" : label
|
|
131570
|
+
}
|
|
131571
|
+
),
|
|
131347
131572
|
!soldOut ? /* @__PURE__ */ jsx("p", { className: "rb-caption status-muted", children: "Cart actions become interactive after page load." }) : null
|
|
131348
131573
|
] });
|
|
131349
131574
|
}
|
|
@@ -131363,7 +131588,14 @@ function ProductListServerContent(props2) {
|
|
|
131363
131588
|
),
|
|
131364
131589
|
actions: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
131365
131590
|
renderServerPendingAction(card.actionLabel, card.soldOut),
|
|
131366
|
-
card.path ? /* @__PURE__ */ jsx(
|
|
131591
|
+
card.path ? /* @__PURE__ */ jsx(
|
|
131592
|
+
"a",
|
|
131593
|
+
{
|
|
131594
|
+
href: card.path,
|
|
131595
|
+
className: themeButtonClassName({ variant: "secondary", size: "sm" }),
|
|
131596
|
+
children: "View details"
|
|
131597
|
+
}
|
|
131598
|
+
) : null
|
|
131367
131599
|
] })
|
|
131368
131600
|
},
|
|
131369
131601
|
card.productId
|
|
@@ -131405,6 +131637,7 @@ function CheckoutServerContent(props2) {
|
|
|
131405
131637
|
}
|
|
131406
131638
|
var init_shop_commerce_server = __esm({
|
|
131407
131639
|
"../blocks/src/system/runtime/nodes/shop-commerce.server.tsx"() {
|
|
131640
|
+
init_buttons();
|
|
131408
131641
|
init_RichText();
|
|
131409
131642
|
init_carousel_server();
|
|
131410
131643
|
init_richText_coerce();
|
|
@@ -131929,7 +132162,7 @@ function renderCalendarGrid(display) {
|
|
|
131929
132162
|
"button",
|
|
131930
132163
|
{
|
|
131931
132164
|
type: "button",
|
|
131932
|
-
className:
|
|
132165
|
+
className: themeButtonClassName({
|
|
131933
132166
|
variant: display.buttonVariant,
|
|
131934
132167
|
size: "sm"
|
|
131935
132168
|
}),
|
|
@@ -132015,7 +132248,7 @@ function renderTimetableSsr(display) {
|
|
|
132015
132248
|
"button",
|
|
132016
132249
|
{
|
|
132017
132250
|
type: "button",
|
|
132018
|
-
className:
|
|
132251
|
+
className: themeButtonClassName({
|
|
132019
132252
|
variant: display.buttonVariant,
|
|
132020
132253
|
size: "sm"
|
|
132021
132254
|
}),
|
|
@@ -132142,7 +132375,7 @@ var init_EventCalendar_server = __esm({
|
|
|
132142
132375
|
init_renderEventListItem();
|
|
132143
132376
|
init_utils7();
|
|
132144
132377
|
init_timetableModel();
|
|
132145
|
-
|
|
132378
|
+
init_buttons();
|
|
132146
132379
|
EventCalendarSSR = (props2) => {
|
|
132147
132380
|
const islandProps = buildEventCalendarInteractiveIslandProps(props2);
|
|
132148
132381
|
const display = islandProps.render.display;
|
|
@@ -132261,7 +132494,7 @@ var init_form_server = __esm({
|
|
|
132261
132494
|
"../blocks/src/system/runtime/nodes/form.server.tsx"() {
|
|
132262
132495
|
init_clsx();
|
|
132263
132496
|
init_ssr();
|
|
132264
|
-
|
|
132497
|
+
init_buttons();
|
|
132265
132498
|
init_form_interactive();
|
|
132266
132499
|
FormNodeSSR = ({
|
|
132267
132500
|
blockId,
|
|
@@ -132399,7 +132632,7 @@ var init_form_server = __esm({
|
|
|
132399
132632
|
"button",
|
|
132400
132633
|
{
|
|
132401
132634
|
type: "submit",
|
|
132402
|
-
className:
|
|
132635
|
+
className: themeButtonClassName({
|
|
132403
132636
|
variant: "primary",
|
|
132404
132637
|
size: "md",
|
|
132405
132638
|
extraClassName: "rb-w-full rb-sm-w-auto"
|
|
@@ -132489,7 +132722,7 @@ function NewsletterFormSSR({
|
|
|
132489
132722
|
"button",
|
|
132490
132723
|
{
|
|
132491
132724
|
type: "submit",
|
|
132492
|
-
className:
|
|
132725
|
+
className: themeButtonClassName({ variant: "primary", size: "md" }),
|
|
132493
132726
|
children: display.buttonLabel
|
|
132494
132727
|
}
|
|
132495
132728
|
) })
|
|
@@ -132505,7 +132738,7 @@ var init_newsletter_form_server = __esm({
|
|
|
132505
132738
|
"../blocks/src/system/runtime/nodes/newsletter-form.server.tsx"() {
|
|
132506
132739
|
init_clsx();
|
|
132507
132740
|
init_ssr();
|
|
132508
|
-
|
|
132741
|
+
init_buttons();
|
|
132509
132742
|
init_newsletter_form_interactive();
|
|
132510
132743
|
newsletter_form_server_default = NewsletterFormSSR;
|
|
132511
132744
|
}
|
|
@@ -132625,7 +132858,16 @@ function ShopSSR({
|
|
|
132625
132858
|
PassCardView,
|
|
132626
132859
|
{
|
|
132627
132860
|
display: pass,
|
|
132628
|
-
action: /* @__PURE__ */ jsx(
|
|
132861
|
+
action: /* @__PURE__ */ jsx(
|
|
132862
|
+
"button",
|
|
132863
|
+
{
|
|
132864
|
+
type: "button",
|
|
132865
|
+
className: themeButtonClassName({ variant: "default", size: "md" }),
|
|
132866
|
+
disabled: true,
|
|
132867
|
+
"aria-disabled": "true",
|
|
132868
|
+
children: pass.actionLabel
|
|
132869
|
+
}
|
|
132870
|
+
)
|
|
132629
132871
|
},
|
|
132630
132872
|
pass.id
|
|
132631
132873
|
)),
|
|
@@ -132633,7 +132875,16 @@ function ShopSSR({
|
|
|
132633
132875
|
MembershipCardView,
|
|
132634
132876
|
{
|
|
132635
132877
|
display: membership,
|
|
132636
|
-
action: /* @__PURE__ */ jsx(
|
|
132878
|
+
action: /* @__PURE__ */ jsx(
|
|
132879
|
+
"button",
|
|
132880
|
+
{
|
|
132881
|
+
type: "button",
|
|
132882
|
+
className: themeButtonClassName({ variant: "default", size: "md" }),
|
|
132883
|
+
disabled: true,
|
|
132884
|
+
"aria-disabled": "true",
|
|
132885
|
+
children: membership.actionLabel
|
|
132886
|
+
}
|
|
132887
|
+
)
|
|
132637
132888
|
},
|
|
132638
132889
|
membership.id
|
|
132639
132890
|
))
|
|
@@ -132647,6 +132898,7 @@ function ShopSSR({
|
|
|
132647
132898
|
var shop_server_default;
|
|
132648
132899
|
var init_shop_server = __esm({
|
|
132649
132900
|
"../blocks/src/system/runtime/nodes/shop.server.tsx"() {
|
|
132901
|
+
init_buttons();
|
|
132650
132902
|
init_ssr();
|
|
132651
132903
|
init_view4();
|
|
132652
132904
|
init_shop_interactive();
|
|
@@ -155913,6 +156165,92 @@ function encodePublicProductCategorySelector(selector) {
|
|
|
155913
156165
|
};
|
|
155914
156166
|
}
|
|
155915
156167
|
}
|
|
156168
|
+
function isRecord8(value) {
|
|
156169
|
+
return typeof value === "object" && value !== null;
|
|
156170
|
+
}
|
|
156171
|
+
function isJsonResponseContentType(contentType) {
|
|
156172
|
+
if (!contentType) return false;
|
|
156173
|
+
const mimeType = contentType.split(";", 1)[0]?.trim().toLowerCase() ?? "";
|
|
156174
|
+
return mimeType === "application/json" || mimeType.endsWith("+json");
|
|
156175
|
+
}
|
|
156176
|
+
function getResponseContentType(response) {
|
|
156177
|
+
return response.headers.get("content-type");
|
|
156178
|
+
}
|
|
156179
|
+
async function parseJsonBody(response) {
|
|
156180
|
+
const rawText = await response.text();
|
|
156181
|
+
if (rawText.trim().length === 0) {
|
|
156182
|
+
return { kind: "empty-body" };
|
|
156183
|
+
}
|
|
156184
|
+
try {
|
|
156185
|
+
return { kind: "success", value: JSON.parse(rawText) };
|
|
156186
|
+
} catch {
|
|
156187
|
+
return { kind: "invalid-json" };
|
|
156188
|
+
}
|
|
156189
|
+
}
|
|
156190
|
+
function getBlockApiErrorDetails(data) {
|
|
156191
|
+
if (!isRecord8(data)) {
|
|
156192
|
+
return {};
|
|
156193
|
+
}
|
|
156194
|
+
const nestedError = isRecord8(data.error) ? data.error : void 0;
|
|
156195
|
+
const message2 = typeof nestedError?.message === "string" ? nestedError.message : typeof data.message === "string" ? data.message : void 0;
|
|
156196
|
+
const code = typeof nestedError?.code === "string" ? nestedError.code : typeof data.code === "string" ? data.code : void 0;
|
|
156197
|
+
return { message: message2, code };
|
|
156198
|
+
}
|
|
156199
|
+
function buildUnexpectedJsonResponseMessage(parseResult) {
|
|
156200
|
+
switch (parseResult.kind) {
|
|
156201
|
+
case "empty-body":
|
|
156202
|
+
return "Expected JSON response body but received an empty response";
|
|
156203
|
+
case "invalid-json":
|
|
156204
|
+
return "Expected JSON response but received invalid JSON";
|
|
156205
|
+
}
|
|
156206
|
+
}
|
|
156207
|
+
async function extractErrorDetails(response) {
|
|
156208
|
+
const contentType = getResponseContentType(response);
|
|
156209
|
+
const fallbackMessage = `Request failed: ${response.statusText}`;
|
|
156210
|
+
if (!isJsonResponseContentType(contentType)) {
|
|
156211
|
+
return {
|
|
156212
|
+
message: `${fallbackMessage} (received ${contentType ?? "unknown content type"})`
|
|
156213
|
+
};
|
|
156214
|
+
}
|
|
156215
|
+
const parseResult = await parseJsonBody(response);
|
|
156216
|
+
switch (parseResult.kind) {
|
|
156217
|
+
case "success": {
|
|
156218
|
+
const details = getBlockApiErrorDetails(parseResult.value);
|
|
156219
|
+
return {
|
|
156220
|
+
message: details.message ?? fallbackMessage,
|
|
156221
|
+
code: details.code
|
|
156222
|
+
};
|
|
156223
|
+
}
|
|
156224
|
+
case "invalid-json":
|
|
156225
|
+
return {
|
|
156226
|
+
message: `${fallbackMessage} (received invalid JSON)`
|
|
156227
|
+
};
|
|
156228
|
+
case "empty-body":
|
|
156229
|
+
return {
|
|
156230
|
+
message: `${fallbackMessage} (received an empty response)`
|
|
156231
|
+
};
|
|
156232
|
+
}
|
|
156233
|
+
}
|
|
156234
|
+
async function parseJsonApiResponse(response) {
|
|
156235
|
+
if (response.status === 204 || response.status === 205) {
|
|
156236
|
+
return void 0;
|
|
156237
|
+
}
|
|
156238
|
+
const contentType = getResponseContentType(response);
|
|
156239
|
+
if (!isJsonResponseContentType(contentType)) {
|
|
156240
|
+
throw new BlockApiError(
|
|
156241
|
+
`Expected JSON response but received ${contentType ?? "unknown content type"}`,
|
|
156242
|
+
response.status
|
|
156243
|
+
);
|
|
156244
|
+
}
|
|
156245
|
+
const parseResult = await parseJsonBody(response);
|
|
156246
|
+
if (parseResult.kind !== "success") {
|
|
156247
|
+
throw new BlockApiError(
|
|
156248
|
+
buildUnexpectedJsonResponseMessage(parseResult),
|
|
156249
|
+
response.status
|
|
156250
|
+
);
|
|
156251
|
+
}
|
|
156252
|
+
return parseResult.value;
|
|
156253
|
+
}
|
|
155916
156254
|
function getAuthHeaders2(auth) {
|
|
155917
156255
|
switch (auth.type) {
|
|
155918
156256
|
case "api-key":
|
|
@@ -155969,21 +156307,10 @@ function createBlockApi(config) {
|
|
|
155969
156307
|
const doFetch = async () => {
|
|
155970
156308
|
const response = await fetch(url, fetchOptions);
|
|
155971
156309
|
if (!response.ok) {
|
|
155972
|
-
|
|
155973
|
-
|
|
155974
|
-
try {
|
|
155975
|
-
const errorData = await response.json();
|
|
155976
|
-
if (typeof errorData.error?.message === "string") {
|
|
155977
|
-
errorMessage3 = errorData.error.message;
|
|
155978
|
-
} else if (typeof errorData.message === "string") {
|
|
155979
|
-
errorMessage3 = errorData.message;
|
|
155980
|
-
}
|
|
155981
|
-
errorCode = errorData.error?.code || errorData.code;
|
|
155982
|
-
} catch {
|
|
155983
|
-
}
|
|
155984
|
-
throw new BlockApiError(errorMessage3, response.status, errorCode);
|
|
156310
|
+
const details = await extractErrorDetails(response);
|
|
156311
|
+
throw new BlockApiError(details.message, response.status, details.code);
|
|
155985
156312
|
}
|
|
155986
|
-
const json = await response
|
|
156313
|
+
const json = await parseJsonApiResponse(response);
|
|
155987
156314
|
if (isApiSuccessResponse(json)) {
|
|
155988
156315
|
return json.data;
|
|
155989
156316
|
}
|
|
@@ -159805,7 +160132,7 @@ function MultiStepForm({
|
|
|
159805
160132
|
type: "button",
|
|
159806
160133
|
onClick: goToPrevious,
|
|
159807
160134
|
disabled: !canGoBack,
|
|
159808
|
-
className: "outline
|
|
160135
|
+
className: themeButtonClassName({ variant: "outline", size: "md" }),
|
|
159809
160136
|
children: backButtonLabel
|
|
159810
160137
|
}
|
|
159811
160138
|
),
|
|
@@ -159815,7 +160142,11 @@ function MultiStepForm({
|
|
|
159815
160142
|
type: "button",
|
|
159816
160143
|
onClick: goToNext,
|
|
159817
160144
|
disabled: !canGoNext,
|
|
159818
|
-
className:
|
|
160145
|
+
className: themeButtonClassName({
|
|
160146
|
+
variant: "primary",
|
|
160147
|
+
size: "md",
|
|
160148
|
+
extraClassName: "rb-flex-1"
|
|
160149
|
+
}),
|
|
159819
160150
|
children: [
|
|
159820
160151
|
(isValidating || isSubmitting) && /* @__PURE__ */ jsx(
|
|
159821
160152
|
SpinnerNode,
|
|
@@ -159930,6 +160261,7 @@ function ProgressIndicator({
|
|
|
159930
160261
|
var init_MultiStepForm = __esm({
|
|
159931
160262
|
"../blocks/src/system/runtime/components/multi-step/MultiStepForm.tsx"() {
|
|
159932
160263
|
"use client";
|
|
160264
|
+
init_buttons();
|
|
159933
160265
|
init_MultiStepContext();
|
|
159934
160266
|
init_useMultiStep();
|
|
159935
160267
|
init_spinner2();
|
|
@@ -161143,7 +161475,10 @@ function PaymentOptionSelectionStep({
|
|
|
161143
161475
|
"button",
|
|
161144
161476
|
{
|
|
161145
161477
|
type: "button",
|
|
161146
|
-
className:
|
|
161478
|
+
className: themeButtonClassName({
|
|
161479
|
+
variant: isSelected ? "primary" : "outline",
|
|
161480
|
+
size: "md"
|
|
161481
|
+
}),
|
|
161147
161482
|
style: paymentOptionLayoutStyle,
|
|
161148
161483
|
onClick: () => updateData({
|
|
161149
161484
|
selectedAppointmentPackageId: appointmentPackage.customerPassId,
|
|
@@ -161192,7 +161527,10 @@ function PaymentOptionSelectionStep({
|
|
|
161192
161527
|
"button",
|
|
161193
161528
|
{
|
|
161194
161529
|
type: "button",
|
|
161195
|
-
className:
|
|
161530
|
+
className: themeButtonClassName({
|
|
161531
|
+
variant: isSelected ? "primary" : "outline",
|
|
161532
|
+
size: "md"
|
|
161533
|
+
}),
|
|
161196
161534
|
style: paymentOptionLayoutStyle,
|
|
161197
161535
|
onClick: () => updateData({
|
|
161198
161536
|
selectedAppointmentPackageId: void 0,
|
|
@@ -161220,6 +161558,7 @@ var paymentOptionLayoutStyle, summaryStackStyle;
|
|
|
161220
161558
|
var init_PaymentOptionSelectionStep = __esm({
|
|
161221
161559
|
"../blocks/src/system/runtime/components/booking/PaymentOptionSelectionStep.tsx"() {
|
|
161222
161560
|
"use client";
|
|
161561
|
+
init_buttons();
|
|
161223
161562
|
init_api();
|
|
161224
161563
|
init_MultiStepContext();
|
|
161225
161564
|
init_booking_form_state();
|
|
@@ -162762,6 +163101,7 @@ var init_booking_form_client = __esm({
|
|
|
162762
163101
|
init_noop();
|
|
162763
163102
|
init_client2();
|
|
162764
163103
|
init_src8();
|
|
163104
|
+
init_buttons();
|
|
162765
163105
|
init_api();
|
|
162766
163106
|
init_MultiStepForm();
|
|
162767
163107
|
init_SuccessMessage();
|
|
@@ -162999,7 +163339,7 @@ var init_booking_form_client = __esm({
|
|
|
162999
163339
|
"button",
|
|
163000
163340
|
{
|
|
163001
163341
|
type: "button",
|
|
163002
|
-
className: "secondary
|
|
163342
|
+
className: themeButtonClassName({ variant: "secondary", size: "sm" }),
|
|
163003
163343
|
onClick: clearFeedback,
|
|
163004
163344
|
children: "Dismiss"
|
|
163005
163345
|
}
|
|
@@ -164329,7 +164669,7 @@ var init_PaymentSelectionStep = __esm({
|
|
|
164329
164669
|
init_lucide_react();
|
|
164330
164670
|
init_utils12();
|
|
164331
164671
|
init_spinner2();
|
|
164332
|
-
|
|
164672
|
+
init_buttons();
|
|
164333
164673
|
init_CheckIcon2();
|
|
164334
164674
|
init_SelectableOptionCard();
|
|
164335
164675
|
PaymentSelectionStep = ({
|
|
@@ -164430,7 +164770,7 @@ var init_PaymentSelectionStep = __esm({
|
|
|
164430
164770
|
"button",
|
|
164431
164771
|
{
|
|
164432
164772
|
type: "button",
|
|
164433
|
-
className:
|
|
164773
|
+
className: themeButtonClassName({ variant: "primary", size: "md" }),
|
|
164434
164774
|
disabled: !email.trim(),
|
|
164435
164775
|
onClick: onRequestLogin,
|
|
164436
164776
|
children: "Email me a login link"
|
|
@@ -166020,7 +166360,7 @@ function MagicLinkForm({
|
|
|
166020
166360
|
"button",
|
|
166021
166361
|
{
|
|
166022
166362
|
type: "button",
|
|
166023
|
-
className: classPrefix === "cp" ? "secondary" : `${classPrefix}-modal-btn ${classPrefix}-modal-btn--secondary`,
|
|
166363
|
+
className: classPrefix === "cp" ? themeButtonClassName({ variant: "secondary", size: "md" }) : `${classPrefix}-modal-btn ${classPrefix}-modal-btn--secondary`,
|
|
166024
166364
|
onClick: handleReset,
|
|
166025
166365
|
children: "Try a different email"
|
|
166026
166366
|
}
|
|
@@ -166048,7 +166388,7 @@ function MagicLinkForm({
|
|
|
166048
166388
|
"button",
|
|
166049
166389
|
{
|
|
166050
166390
|
type: "submit",
|
|
166051
|
-
className: classPrefix === "cp" ? "primary" : `${classPrefix}-modal-btn`,
|
|
166391
|
+
className: classPrefix === "cp" ? themeButtonClassName({ variant: "primary", size: "md" }) : `${classPrefix}-modal-btn`,
|
|
166052
166392
|
disabled: !email.trim() || loading,
|
|
166053
166393
|
children: loading ? "Sending..." : buttonText
|
|
166054
166394
|
}
|
|
@@ -166058,6 +166398,7 @@ function MagicLinkForm({
|
|
|
166058
166398
|
var init_MagicLinkForm = __esm({
|
|
166059
166399
|
"../blocks/src/system/runtime/nodes/shared/MagicLinkForm.tsx"() {
|
|
166060
166400
|
"use client";
|
|
166401
|
+
init_buttons();
|
|
166061
166402
|
init_api();
|
|
166062
166403
|
}
|
|
166063
166404
|
});
|
|
@@ -166079,7 +166420,7 @@ function EventRegistrationWizard(props2) {
|
|
|
166079
166420
|
} = props2;
|
|
166080
166421
|
const maxTicketsNum = parseInt(maxTickets, 10) || 5;
|
|
166081
166422
|
const showSpamProtection = spamProtectionEnabled ?? isSpamProtectionEnabled();
|
|
166082
|
-
const buttonClass =
|
|
166423
|
+
const buttonClass = themeButtonClassName({ variant: buttonVariant, size: "md" });
|
|
166083
166424
|
const wizard = useEventRegistrationWizard({
|
|
166084
166425
|
anchorId: EVENT_REGISTRATION_ANCHOR_ID,
|
|
166085
166426
|
occurrenceContext: occurrenceContext ?? null,
|
|
@@ -166215,7 +166556,7 @@ var init_EventRegistrationWizard = __esm({
|
|
|
166215
166556
|
init_useEventRegistrationWizard();
|
|
166216
166557
|
init_MagicLinkForm();
|
|
166217
166558
|
init_spinner2();
|
|
166218
|
-
|
|
166559
|
+
init_buttons();
|
|
166219
166560
|
init_event_registration3();
|
|
166220
166561
|
EVENT_REGISTRATION_ANCHOR_ID = "event-registration";
|
|
166221
166562
|
EVENT_PORTAL_AUTH_COPY = {
|
|
@@ -166625,7 +166966,7 @@ function ErrorStep2({
|
|
|
166625
166966
|
buttonVariant = "primary",
|
|
166626
166967
|
onRetry
|
|
166627
166968
|
}) {
|
|
166628
|
-
const buttonClass =
|
|
166969
|
+
const buttonClass = themeButtonClassName({ variant: buttonVariant, size: "md" });
|
|
166629
166970
|
return /* @__PURE__ */ jsxs("div", { className: "cr-error", role: "alert", children: [
|
|
166630
166971
|
/* @__PURE__ */ jsx(StateIcon, { variant: "error", children: /* @__PURE__ */ jsx(CrossIcon, {}) }),
|
|
166631
166972
|
/* @__PURE__ */ jsx("h3", { className: "cr-error__title", children: "Enrollment Failed" }),
|
|
@@ -166636,7 +166977,7 @@ function ErrorStep2({
|
|
|
166636
166977
|
var init_ErrorStep2 = __esm({
|
|
166637
166978
|
"../blocks/src/system/runtime/nodes/course-registration/ErrorStep.tsx"() {
|
|
166638
166979
|
init_shared9();
|
|
166639
|
-
|
|
166980
|
+
init_buttons();
|
|
166640
166981
|
}
|
|
166641
166982
|
});
|
|
166642
166983
|
function VerifyingTimeoutStep2({
|
|
@@ -166645,7 +166986,7 @@ function VerifyingTimeoutStep2({
|
|
|
166645
166986
|
onCheckAgain,
|
|
166646
166987
|
supportEmail
|
|
166647
166988
|
}) {
|
|
166648
|
-
const buttonClass =
|
|
166989
|
+
const buttonClass = themeButtonClassName({ variant: buttonVariant, size: "md" });
|
|
166649
166990
|
return /* @__PURE__ */ jsxs("div", { className: "cr-error", role: "alert", children: [
|
|
166650
166991
|
/* @__PURE__ */ jsx(StateIcon, { variant: "warning", children: /* @__PURE__ */ jsx(ClockIcon, {}) }),
|
|
166651
166992
|
/* @__PURE__ */ jsx("h3", { className: "cr-error__title", children: "Payment Verification Taking Longer" }),
|
|
@@ -166661,7 +167002,7 @@ function VerifyingTimeoutStep2({
|
|
|
166661
167002
|
var init_VerifyingTimeoutStep2 = __esm({
|
|
166662
167003
|
"../blocks/src/system/runtime/nodes/course-registration/VerifyingTimeoutStep.tsx"() {
|
|
166663
167004
|
init_shared9();
|
|
166664
|
-
|
|
167005
|
+
init_buttons();
|
|
166665
167006
|
}
|
|
166666
167007
|
});
|
|
166667
167008
|
function PaymentFailedStep2({
|
|
@@ -166670,7 +167011,7 @@ function PaymentFailedStep2({
|
|
|
166670
167011
|
buttonVariant = "primary",
|
|
166671
167012
|
onRetry
|
|
166672
167013
|
}) {
|
|
166673
|
-
const buttonClass =
|
|
167014
|
+
const buttonClass = themeButtonClassName({ variant: buttonVariant, size: "md" });
|
|
166674
167015
|
return /* @__PURE__ */ jsxs("div", { className: "cr-payment-failed", role: "alert", children: [
|
|
166675
167016
|
/* @__PURE__ */ jsx(StateIcon, { variant: "error", children: /* @__PURE__ */ jsx(CrossIcon, {}) }),
|
|
166676
167017
|
/* @__PURE__ */ jsx("h3", { className: "cr-payment-failed__title", children: "Payment Failed" }),
|
|
@@ -166681,7 +167022,7 @@ function PaymentFailedStep2({
|
|
|
166681
167022
|
var init_PaymentFailedStep2 = __esm({
|
|
166682
167023
|
"../blocks/src/system/runtime/nodes/course-registration/PaymentFailedStep.tsx"() {
|
|
166683
167024
|
init_shared9();
|
|
166684
|
-
|
|
167025
|
+
init_buttons();
|
|
166685
167026
|
}
|
|
166686
167027
|
});
|
|
166687
167028
|
function WaitlistStep({ message: message2, position }) {
|
|
@@ -167657,7 +167998,7 @@ function CourseRegistrationWizard(props2) {
|
|
|
167657
167998
|
handleRetry,
|
|
167658
167999
|
handleBookingModeChange
|
|
167659
168000
|
} = useCourseRegistrationWizard(props2);
|
|
167660
|
-
const buttonClass =
|
|
168001
|
+
const buttonClass = themeButtonClassName({ variant: buttonVariant, size: "md" });
|
|
167661
168002
|
if (scopedCourses.length === 0) {
|
|
167662
168003
|
return /* @__PURE__ */ jsx(
|
|
167663
168004
|
"div",
|
|
@@ -168066,7 +168407,7 @@ var init_CourseRegistrationWizard = __esm({
|
|
|
168066
168407
|
init_PaymentFailedStep2();
|
|
168067
168408
|
init_VerifyingTimeoutStep2();
|
|
168068
168409
|
init_spinner2();
|
|
168069
|
-
|
|
168410
|
+
init_buttons();
|
|
168070
168411
|
}
|
|
168071
168412
|
});
|
|
168072
168413
|
function toCourseRegistrationClientProps(props2) {
|
|
@@ -168769,7 +169110,11 @@ function PassesMembershipsController({ render }) {
|
|
|
168769
169110
|
"button",
|
|
168770
169111
|
{
|
|
168771
169112
|
type: "button",
|
|
168772
|
-
className:
|
|
169113
|
+
className: themeButtonClassName({
|
|
169114
|
+
variant: "secondary",
|
|
169115
|
+
size: "sm",
|
|
169116
|
+
extraClassName: "shop__return-dismiss"
|
|
169117
|
+
}),
|
|
168773
169118
|
onClick: () => dispatch({ type: "clearReturnNotice" }),
|
|
168774
169119
|
children: "Dismiss"
|
|
168775
169120
|
}
|
|
@@ -168786,7 +169131,11 @@ function PassesMembershipsController({ render }) {
|
|
|
168786
169131
|
"button",
|
|
168787
169132
|
{
|
|
168788
169133
|
type: "button",
|
|
168789
|
-
className:
|
|
169134
|
+
className: themeButtonClassName({
|
|
169135
|
+
variant: "default",
|
|
169136
|
+
size: "md",
|
|
169137
|
+
extraClassName: "shop__cta"
|
|
169138
|
+
}),
|
|
168790
169139
|
onClick: () => handleBuyPass(pass),
|
|
168791
169140
|
children: passDisplay.actionLabel
|
|
168792
169141
|
}
|
|
@@ -168813,7 +169162,11 @@ function PassesMembershipsController({ render }) {
|
|
|
168813
169162
|
"button",
|
|
168814
169163
|
{
|
|
168815
169164
|
type: "button",
|
|
168816
|
-
className:
|
|
169165
|
+
className: themeButtonClassName({
|
|
169166
|
+
variant: "default",
|
|
169167
|
+
size: "md",
|
|
169168
|
+
extraClassName: "shop__cta"
|
|
169169
|
+
}),
|
|
168817
169170
|
onClick: () => handleSubscribe(membership),
|
|
168818
169171
|
children: membershipDisplay.actionLabel
|
|
168819
169172
|
}
|
|
@@ -168857,12 +169210,20 @@ function PassesMembershipsController({ render }) {
|
|
|
168857
169210
|
] }) : null
|
|
168858
169211
|
] }),
|
|
168859
169212
|
/* @__PURE__ */ jsxs(ActionRow, { className: "shop__modal-warning-actions", children: [
|
|
168860
|
-
/* @__PURE__ */ jsx("button", { type: "button", className: "secondary", onClick: closeCheckout, children: "Cancel" }),
|
|
168861
169213
|
/* @__PURE__ */ jsx(
|
|
168862
169214
|
"button",
|
|
168863
169215
|
{
|
|
168864
169216
|
type: "button",
|
|
168865
|
-
className: "
|
|
169217
|
+
className: themeButtonClassName({ variant: "secondary", size: "md" }),
|
|
169218
|
+
onClick: closeCheckout,
|
|
169219
|
+
children: "Cancel"
|
|
169220
|
+
}
|
|
169221
|
+
),
|
|
169222
|
+
/* @__PURE__ */ jsx(
|
|
169223
|
+
"button",
|
|
169224
|
+
{
|
|
169225
|
+
type: "button",
|
|
169226
|
+
className: themeButtonClassName({ variant: "default", size: "md" }),
|
|
168866
169227
|
onClick: handleConfirmDuplicate,
|
|
168867
169228
|
disabled: checkout2.submitting,
|
|
168868
169229
|
children: checkout2.submitting ? "Processing..." : "Subscribe Anyway"
|
|
@@ -168905,8 +169266,25 @@ function PassesMembershipsController({ render }) {
|
|
|
168905
169266
|
] }),
|
|
168906
169267
|
checkout2.formError ? /* @__PURE__ */ jsx("p", { className: "shop__modal-error", role: "alert", children: checkout2.formError }) : null,
|
|
168907
169268
|
/* @__PURE__ */ jsxs(ActionRow, { className: "shop__modal-actions", children: [
|
|
168908
|
-
/* @__PURE__ */ jsx(
|
|
168909
|
-
|
|
169269
|
+
/* @__PURE__ */ jsx(
|
|
169270
|
+
"button",
|
|
169271
|
+
{
|
|
169272
|
+
type: "button",
|
|
169273
|
+
className: themeButtonClassName({ variant: "secondary", size: "md" }),
|
|
169274
|
+
onClick: closeCheckout,
|
|
169275
|
+
disabled: checkout2.submitting,
|
|
169276
|
+
children: "Cancel"
|
|
169277
|
+
}
|
|
169278
|
+
),
|
|
169279
|
+
/* @__PURE__ */ jsx(
|
|
169280
|
+
"button",
|
|
169281
|
+
{
|
|
169282
|
+
type: "submit",
|
|
169283
|
+
className: themeButtonClassName({ variant: "default", size: "md" }),
|
|
169284
|
+
disabled: checkout2.submitting,
|
|
169285
|
+
children: checkout2.submitting ? "Processing..." : "Continue to Payment"
|
|
169286
|
+
}
|
|
169287
|
+
)
|
|
168910
169288
|
] })
|
|
168911
169289
|
] })
|
|
168912
169290
|
] })
|
|
@@ -168918,6 +169296,7 @@ var SHOP_ANCHOR_ID;
|
|
|
168918
169296
|
var init_shop_client = __esm({
|
|
168919
169297
|
"../blocks/src/system/runtime/nodes/shop.client.tsx"() {
|
|
168920
169298
|
"use client";
|
|
169299
|
+
init_buttons();
|
|
168921
169300
|
init_api();
|
|
168922
169301
|
init_ModalShell();
|
|
168923
169302
|
init_shared9();
|
|
@@ -169514,7 +169893,7 @@ function ProductListController(props2) {
|
|
|
169514
169893
|
"button",
|
|
169515
169894
|
{
|
|
169516
169895
|
type: "button",
|
|
169517
|
-
className: "default",
|
|
169896
|
+
className: themeButtonClassName({ variant: "default", size: "md" }),
|
|
169518
169897
|
onClick: () => {
|
|
169519
169898
|
const product = props2.render.hydration.products.find((candidate) => candidate.id === card.productId);
|
|
169520
169899
|
if (!product) return;
|
|
@@ -169530,7 +169909,14 @@ function ProductListController(props2) {
|
|
|
169530
169909
|
children: card.soldOut ? "Sold out" : card.actionLabel
|
|
169531
169910
|
}
|
|
169532
169911
|
),
|
|
169533
|
-
card.path ? /* @__PURE__ */ jsx(
|
|
169912
|
+
card.path ? /* @__PURE__ */ jsx(
|
|
169913
|
+
"a",
|
|
169914
|
+
{
|
|
169915
|
+
href: card.path,
|
|
169916
|
+
className: themeButtonClassName({ variant: "secondary", size: "sm" }),
|
|
169917
|
+
children: "View details"
|
|
169918
|
+
}
|
|
169919
|
+
) : null
|
|
169534
169920
|
] }),
|
|
169535
169921
|
feedback: /* @__PURE__ */ jsx(
|
|
169536
169922
|
ShopAddFeedback,
|
|
@@ -169596,7 +169982,7 @@ function ProductDetailController(props2) {
|
|
|
169596
169982
|
"button",
|
|
169597
169983
|
{
|
|
169598
169984
|
type: "button",
|
|
169599
|
-
className: "default",
|
|
169985
|
+
className: themeButtonClassName({ variant: "default", size: "md" }),
|
|
169600
169986
|
disabled: display.soldOut,
|
|
169601
169987
|
onClick: () => {
|
|
169602
169988
|
if (!selectedProduct) return;
|
|
@@ -169646,15 +170032,31 @@ function CartController(props2) {
|
|
|
169646
170032
|
onChange: item.quantityEditable ? (event) => cart2.updateQuantity(item.key, Number(event.target.value)) : void 0
|
|
169647
170033
|
}
|
|
169648
170034
|
),
|
|
169649
|
-
/* @__PURE__ */ jsx(
|
|
170035
|
+
/* @__PURE__ */ jsx(
|
|
170036
|
+
"button",
|
|
170037
|
+
{
|
|
170038
|
+
type: "button",
|
|
170039
|
+
className: themeButtonClassName({ variant: "secondary", size: "sm" }),
|
|
170040
|
+
onClick: () => cart2.removeItem(item.key),
|
|
170041
|
+
children: "Remove"
|
|
170042
|
+
}
|
|
170043
|
+
)
|
|
169650
170044
|
] }),
|
|
169651
170045
|
footerActions: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
169652
|
-
/* @__PURE__ */ jsx("button", { type: "button", className: "secondary btn-sm", onClick: () => cart2.clear(), children: display.clearButtonText }),
|
|
169653
170046
|
/* @__PURE__ */ jsx(
|
|
169654
170047
|
"button",
|
|
169655
170048
|
{
|
|
169656
170049
|
type: "button",
|
|
169657
|
-
className: "
|
|
170050
|
+
className: themeButtonClassName({ variant: "secondary", size: "sm" }),
|
|
170051
|
+
onClick: () => cart2.clear(),
|
|
170052
|
+
children: display.clearButtonText
|
|
170053
|
+
}
|
|
170054
|
+
),
|
|
170055
|
+
/* @__PURE__ */ jsx(
|
|
170056
|
+
"button",
|
|
170057
|
+
{
|
|
170058
|
+
type: "button",
|
|
170059
|
+
className: themeButtonClassName({ variant: "default", size: "md" }),
|
|
169658
170060
|
onClick: () => {
|
|
169659
170061
|
window.location.href = resolveDedicatedCheckoutPath(window.location.pathname);
|
|
169660
170062
|
},
|
|
@@ -169760,7 +170162,15 @@ function CheckoutController(props2) {
|
|
|
169760
170162
|
)
|
|
169761
170163
|
] }),
|
|
169762
170164
|
state.feedback.tag === "error" ? /* @__PURE__ */ jsx("p", { className: "rb-caption status-muted", children: state.feedback.message }) : null,
|
|
169763
|
-
/* @__PURE__ */ jsx(
|
|
170165
|
+
/* @__PURE__ */ jsx(
|
|
170166
|
+
"button",
|
|
170167
|
+
{
|
|
170168
|
+
type: "submit",
|
|
170169
|
+
className: themeButtonClassName({ variant: "default", size: "md" }),
|
|
170170
|
+
disabled: state.submission === "submitting",
|
|
170171
|
+
children: state.submission === "submitting" ? "Loading\u2026" : display.submitButtonText
|
|
170172
|
+
}
|
|
170173
|
+
)
|
|
169764
170174
|
] })
|
|
169765
170175
|
}
|
|
169766
170176
|
);
|
|
@@ -169769,6 +170179,7 @@ var CHECKOUT_ANCHOR_ID;
|
|
|
169769
170179
|
var init_shop_commerce = __esm({
|
|
169770
170180
|
"../blocks/src/system/runtime/nodes/shop-commerce.tsx"() {
|
|
169771
170181
|
"use client";
|
|
170182
|
+
init_buttons();
|
|
169772
170183
|
init_api();
|
|
169773
170184
|
init_RichText();
|
|
169774
170185
|
init_carousel_client();
|
|
@@ -170372,7 +170783,7 @@ function HeaderCartDrawerItems(props2) {
|
|
|
170372
170783
|
"button",
|
|
170373
170784
|
{
|
|
170374
170785
|
type: "button",
|
|
170375
|
-
className: "secondary
|
|
170786
|
+
className: themeButtonClassName({ variant: "secondary", size: "sm" }),
|
|
170376
170787
|
onClick: () => props2.cart.removeItem(item.key),
|
|
170377
170788
|
children: "Remove"
|
|
170378
170789
|
}
|
|
@@ -170465,7 +170876,7 @@ function HeaderCartDrawer(props2) {
|
|
|
170465
170876
|
"button",
|
|
170466
170877
|
{
|
|
170467
170878
|
type: "button",
|
|
170468
|
-
className: "secondary",
|
|
170879
|
+
className: themeButtonClassName({ variant: "secondary", size: "md" }),
|
|
170469
170880
|
onClick: () => props2.cart.clear(),
|
|
170470
170881
|
disabled: display.state === "empty",
|
|
170471
170882
|
children: display.clearButtonText
|
|
@@ -170474,12 +170885,20 @@ function HeaderCartDrawer(props2) {
|
|
|
170474
170885
|
props2.checkoutHref && display.state === "ready" ? /* @__PURE__ */ jsx(
|
|
170475
170886
|
"a",
|
|
170476
170887
|
{
|
|
170477
|
-
className: "default",
|
|
170888
|
+
className: themeButtonClassName({ variant: "default", size: "md" }),
|
|
170478
170889
|
href: props2.checkoutHref,
|
|
170479
170890
|
onClick: props2.onClose,
|
|
170480
170891
|
children: display.checkoutButtonText
|
|
170481
170892
|
}
|
|
170482
|
-
) : /* @__PURE__ */ jsx(
|
|
170893
|
+
) : /* @__PURE__ */ jsx(
|
|
170894
|
+
"button",
|
|
170895
|
+
{
|
|
170896
|
+
type: "button",
|
|
170897
|
+
className: themeButtonClassName({ variant: "default", size: "md" }),
|
|
170898
|
+
disabled: true,
|
|
170899
|
+
children: display.checkoutButtonText
|
|
170900
|
+
}
|
|
170901
|
+
)
|
|
170483
170902
|
] })
|
|
170484
170903
|
]
|
|
170485
170904
|
}
|
|
@@ -170491,6 +170910,7 @@ function HeaderCartDrawer(props2) {
|
|
|
170491
170910
|
var init_HeaderCartDrawer = __esm({
|
|
170492
170911
|
"../blocks/src/system/runtime/header/HeaderCartDrawer.tsx"() {
|
|
170493
170912
|
"use client";
|
|
170913
|
+
init_buttons();
|
|
170494
170914
|
init_display();
|
|
170495
170915
|
init_ModalShell();
|
|
170496
170916
|
}
|
|
@@ -171233,7 +171653,7 @@ var init_EventPaginatedListView_client = __esm({
|
|
|
171233
171653
|
init_EventCompactRow();
|
|
171234
171654
|
init_EmptyState();
|
|
171235
171655
|
init_EventListing_view();
|
|
171236
|
-
|
|
171656
|
+
init_buttons();
|
|
171237
171657
|
EventPaginatedListView = ({
|
|
171238
171658
|
filters,
|
|
171239
171659
|
display,
|
|
@@ -171276,7 +171696,7 @@ var init_EventPaginatedListView_client = __esm({
|
|
|
171276
171696
|
{
|
|
171277
171697
|
type: "button",
|
|
171278
171698
|
onClick: loadMore,
|
|
171279
|
-
className:
|
|
171699
|
+
className: themeButtonClassName({
|
|
171280
171700
|
variant: display.buttonVariant,
|
|
171281
171701
|
size: "md"
|
|
171282
171702
|
}),
|
|
@@ -171290,7 +171710,7 @@ var init_EventPaginatedListView_client = __esm({
|
|
|
171290
171710
|
type: "button",
|
|
171291
171711
|
onClick: loadMore,
|
|
171292
171712
|
disabled: loading,
|
|
171293
|
-
className:
|
|
171713
|
+
className: themeButtonClassName({
|
|
171294
171714
|
variant: display.buttonVariant,
|
|
171295
171715
|
size: "md",
|
|
171296
171716
|
extraClassName: loading ? "rb-opacity-50 rb-cursor-wait" : null
|
|
@@ -171302,7 +171722,7 @@ var init_EventPaginatedListView_client = __esm({
|
|
|
171302
171722
|
"a",
|
|
171303
171723
|
{
|
|
171304
171724
|
href: seeAllUrl,
|
|
171305
|
-
className:
|
|
171725
|
+
className: themeButtonClassName({
|
|
171306
171726
|
variant: display.buttonVariant,
|
|
171307
171727
|
size: "md"
|
|
171308
171728
|
}),
|
|
@@ -172596,7 +173016,7 @@ var init_EventCombined_client = __esm({
|
|
|
172596
173016
|
init_EventModalContext();
|
|
172597
173017
|
init_EventModals();
|
|
172598
173018
|
init_utils7();
|
|
172599
|
-
|
|
173019
|
+
init_buttons();
|
|
172600
173020
|
EventCombinedClient = ({
|
|
172601
173021
|
events: initialEvents,
|
|
172602
173022
|
siteId,
|
|
@@ -172922,7 +173342,7 @@ var init_EventCombined_client = __esm({
|
|
|
172922
173342
|
{
|
|
172923
173343
|
type: "button",
|
|
172924
173344
|
onClick: goToToday,
|
|
172925
|
-
className:
|
|
173345
|
+
className: themeButtonClassName({ variant: buttonVariant, size: "sm" }),
|
|
172926
173346
|
children: "Today"
|
|
172927
173347
|
}
|
|
172928
173348
|
)
|
|
@@ -173229,7 +173649,7 @@ var init_EventCalendar_client = __esm({
|
|
|
173229
173649
|
init_EventModalContext();
|
|
173230
173650
|
init_EventModals();
|
|
173231
173651
|
init_WeekTimetableView();
|
|
173232
|
-
|
|
173652
|
+
init_buttons();
|
|
173233
173653
|
EventCalendarClient = ({
|
|
173234
173654
|
render
|
|
173235
173655
|
}) => {
|
|
@@ -173518,7 +173938,7 @@ var init_EventCalendar_client = __esm({
|
|
|
173518
173938
|
{
|
|
173519
173939
|
type: "button",
|
|
173520
173940
|
onClick: onToday,
|
|
173521
|
-
className:
|
|
173941
|
+
className: themeButtonClassName({
|
|
173522
173942
|
variant: display.buttonVariant,
|
|
173523
173943
|
size: "sm"
|
|
173524
173944
|
}),
|
|
@@ -173534,7 +173954,7 @@ var init_EventCalendar_client = __esm({
|
|
|
173534
173954
|
{
|
|
173535
173955
|
type: "button",
|
|
173536
173956
|
onClick: onToday,
|
|
173537
|
-
className:
|
|
173957
|
+
className: themeButtonClassName({
|
|
173538
173958
|
variant: display.buttonVariant,
|
|
173539
173959
|
size: "sm"
|
|
173540
173960
|
}),
|
|
@@ -173621,7 +174041,7 @@ var init_form_client = __esm({
|
|
|
173621
174041
|
init_client2();
|
|
173622
174042
|
init_src8();
|
|
173623
174043
|
init_useFormSubmission();
|
|
173624
|
-
|
|
174044
|
+
init_buttons();
|
|
173625
174045
|
FormNodeClient = ({
|
|
173626
174046
|
render
|
|
173627
174047
|
}) => {
|
|
@@ -173763,7 +174183,7 @@ var init_form_client = __esm({
|
|
|
173763
174183
|
"button",
|
|
173764
174184
|
{
|
|
173765
174185
|
type: "submit",
|
|
173766
|
-
className:
|
|
174186
|
+
className: themeButtonClassName({
|
|
173767
174187
|
variant: "primary",
|
|
173768
174188
|
size: "md",
|
|
173769
174189
|
extraClassName: "rb-w-full rb-sm-w-auto"
|
|
@@ -173983,7 +174403,7 @@ function NewsletterFormClient({
|
|
|
173983
174403
|
"button",
|
|
173984
174404
|
{
|
|
173985
174405
|
type: "submit",
|
|
173986
|
-
className:
|
|
174406
|
+
className: themeButtonClassName({ variant: "primary", size: "md" }),
|
|
173987
174407
|
disabled: isSubmitting,
|
|
173988
174408
|
children: isSubmitting ? "Subscribing..." : render.display.buttonLabel
|
|
173989
174409
|
}
|
|
@@ -174001,11 +174421,11 @@ var init_newsletter_form_client = __esm({
|
|
|
174001
174421
|
init_client2();
|
|
174002
174422
|
init_src8();
|
|
174003
174423
|
init_api();
|
|
174004
|
-
|
|
174424
|
+
init_buttons();
|
|
174005
174425
|
newsletter_form_client_default = NewsletterFormClient;
|
|
174006
174426
|
}
|
|
174007
174427
|
});
|
|
174008
|
-
function
|
|
174428
|
+
function isRecord9(value) {
|
|
174009
174429
|
return typeof value === "object" && value !== null;
|
|
174010
174430
|
}
|
|
174011
174431
|
function buildRenderFromLooseProps(runtime, mode, props2) {
|
|
@@ -174024,14 +174444,14 @@ function withRuntimeBackedEnvelope(source, runtime, render) {
|
|
|
174024
174444
|
function normalizeLegacyInteractiveRenderProps(runtime, mode, props2) {
|
|
174025
174445
|
const source = props2;
|
|
174026
174446
|
const render = props2["render"];
|
|
174027
|
-
if (!
|
|
174447
|
+
if (!isRecord9(render)) {
|
|
174028
174448
|
return withRuntimeBackedEnvelope(
|
|
174029
174449
|
source,
|
|
174030
174450
|
runtime,
|
|
174031
174451
|
buildRenderFromLooseProps(runtime, mode, props2)
|
|
174032
174452
|
);
|
|
174033
174453
|
}
|
|
174034
|
-
if (
|
|
174454
|
+
if (isRecord9(render["hydration"])) {
|
|
174035
174455
|
return withRuntimeBackedEnvelope(
|
|
174036
174456
|
source,
|
|
174037
174457
|
runtime,
|
|
@@ -174041,7 +174461,7 @@ function normalizeLegacyInteractiveRenderProps(runtime, mode, props2) {
|
|
|
174041
174461
|
}
|
|
174042
174462
|
);
|
|
174043
174463
|
}
|
|
174044
|
-
if (!
|
|
174464
|
+
if (!isRecord9(render["display"])) {
|
|
174045
174465
|
return withRuntimeBackedEnvelope(
|
|
174046
174466
|
source,
|
|
174047
174467
|
runtime,
|
|
@@ -189145,7 +189565,7 @@ var init_MediaEditor = __esm({
|
|
|
189145
189565
|
});
|
|
189146
189566
|
|
|
189147
189567
|
// ../media-storage-api/dist/index.mjs
|
|
189148
|
-
function
|
|
189568
|
+
function isRecord10(value) {
|
|
189149
189569
|
return typeof value === "object" && value !== null;
|
|
189150
189570
|
}
|
|
189151
189571
|
function createCachedMediaRepo(baseRepo, options) {
|
|
@@ -189268,7 +189688,7 @@ var init_dist91 = __esm({
|
|
|
189268
189688
|
return payload;
|
|
189269
189689
|
};
|
|
189270
189690
|
extractErrorMessage = (body) => {
|
|
189271
|
-
if (!
|
|
189691
|
+
if (!isRecord10(body)) {
|
|
189272
189692
|
return typeof body === "string" && body.trim().length > 0 ? body : null;
|
|
189273
189693
|
}
|
|
189274
189694
|
const directKeys = ["error", "message", "detail", "reason"];
|
|
@@ -189284,7 +189704,7 @@ var init_dist91 = __esm({
|
|
|
189284
189704
|
if (typeof entry === "string" && entry.trim().length > 0) {
|
|
189285
189705
|
return entry;
|
|
189286
189706
|
}
|
|
189287
|
-
if (
|
|
189707
|
+
if (isRecord10(entry) && typeof entry.message === "string" && entry.message.trim().length > 0) {
|
|
189288
189708
|
return entry.message;
|
|
189289
189709
|
}
|
|
189290
189710
|
}
|
|
@@ -189292,7 +189712,7 @@ var init_dist91 = __esm({
|
|
|
189292
189712
|
const errors = body.errors;
|
|
189293
189713
|
if (Array.isArray(errors)) {
|
|
189294
189714
|
for (const entry of errors) {
|
|
189295
|
-
if (
|
|
189715
|
+
if (isRecord10(entry) && typeof entry.message === "string" && entry.message.trim().length > 0) {
|
|
189296
189716
|
return entry.message;
|
|
189297
189717
|
}
|
|
189298
189718
|
}
|
|
@@ -193531,6 +193951,14 @@ var init_routableLink = __esm({
|
|
|
193531
193951
|
}
|
|
193532
193952
|
});
|
|
193533
193953
|
|
|
193954
|
+
// ../api/src/navigation/linkValue.ts
|
|
193955
|
+
var init_linkValue = __esm({
|
|
193956
|
+
"../api/src/navigation/linkValue.ts"() {
|
|
193957
|
+
init_src3();
|
|
193958
|
+
init_routableLink();
|
|
193959
|
+
}
|
|
193960
|
+
});
|
|
193961
|
+
|
|
193534
193962
|
// ../api/src/navigation/matcher.ts
|
|
193535
193963
|
var init_matcher = __esm({
|
|
193536
193964
|
"../api/src/navigation/matcher.ts"() {
|
|
@@ -193545,6 +193973,7 @@ var init_navigation2 = __esm({
|
|
|
193545
193973
|
init_navigationMenuValidation();
|
|
193546
193974
|
init_linkResolver();
|
|
193547
193975
|
init_routableLink();
|
|
193976
|
+
init_linkValue();
|
|
193548
193977
|
init_matcher();
|
|
193549
193978
|
}
|
|
193550
193979
|
});
|
|
@@ -201623,8 +202052,8 @@ function deriveLaunchReadiness(input) {
|
|
|
201623
202052
|
description: input.customDomain.kind === "connected" ? "A custom domain is already connected." : "You can connect a custom domain later when you are ready to launch.",
|
|
201624
202053
|
action: openDashboardPathAction(
|
|
201625
202054
|
siteId,
|
|
201626
|
-
"/settings/domains",
|
|
201627
|
-
"
|
|
202055
|
+
"/settings/domains?setup=domain",
|
|
202056
|
+
"Set up domain"
|
|
201628
202057
|
),
|
|
201629
202058
|
evidence: evidenceFromDerivedState(
|
|
201630
202059
|
input.customDomain.kind === "connected" ? "complete" : "pending"
|
|
@@ -202121,8 +202550,8 @@ init_matcher();
|
|
|
202121
202550
|
// ../api/src/navigation/visibility.ts
|
|
202122
202551
|
init_isRecord();
|
|
202123
202552
|
|
|
202124
|
-
// ../api/src/
|
|
202125
|
-
|
|
202553
|
+
// ../api/src/index.ts
|
|
202554
|
+
init_linkValue();
|
|
202126
202555
|
|
|
202127
202556
|
// ../api/src/redirects.ts
|
|
202128
202557
|
init_envelope();
|
|
@@ -203012,7 +203441,7 @@ function blockIdForRuntimePatch(action) {
|
|
|
203012
203441
|
}
|
|
203013
203442
|
function currentLocalBlockContent(uiStore, targetBlockId) {
|
|
203014
203443
|
const current = uiStore.getState().drafts.getCurrentValues(asEditorBlockId(targetBlockId));
|
|
203015
|
-
return
|
|
203444
|
+
return isRecord11(current) ? current : null;
|
|
203016
203445
|
}
|
|
203017
203446
|
function replaceLocalBlockContentWithoutHistory(uiStore, targetBlockId, nextContent) {
|
|
203018
203447
|
const editorBlockId = asEditorBlockId(targetBlockId);
|
|
@@ -203031,7 +203460,7 @@ function replaceLocalBlockContentWithoutHistory(uiStore, targetBlockId, nextCont
|
|
|
203031
203460
|
}
|
|
203032
203461
|
});
|
|
203033
203462
|
}
|
|
203034
|
-
function
|
|
203463
|
+
function isRecord11(value) {
|
|
203035
203464
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
203036
203465
|
}
|
|
203037
203466
|
|
|
@@ -203605,25 +204034,25 @@ var INITIAL_ONBOARDING_CONFIRMATION_STATE = {
|
|
|
203605
204034
|
resendFeedback: null,
|
|
203606
204035
|
statusLoadFailed: false
|
|
203607
204036
|
};
|
|
203608
|
-
function
|
|
204037
|
+
function isRecord12(value) {
|
|
203609
204038
|
return value !== null && typeof value === "object";
|
|
203610
204039
|
}
|
|
203611
204040
|
function getErrorMessageFromEnvelope(payload, fallback2) {
|
|
203612
|
-
const error =
|
|
203613
|
-
const message2 =
|
|
204041
|
+
const error = isRecord12(payload) ? payload.error : null;
|
|
204042
|
+
const message2 = isRecord12(error) ? error.message : null;
|
|
203614
204043
|
return typeof message2 === "string" && message2.trim().length > 0 ? message2 : fallback2;
|
|
203615
204044
|
}
|
|
203616
204045
|
function isLaunchReadiness(value) {
|
|
203617
|
-
return
|
|
204046
|
+
return isRecord12(value) && Array.isArray(value.requirements) && typeof value.pendingRequiredCount === "number" && typeof value.pendingRecommendedCount === "number" && typeof value.pendingOptionalCount === "number" && isRecord12(value.goLiveDecision) && (value.goLiveDecision.kind === "allowed" || value.goLiveDecision.kind === "blocked");
|
|
203618
204047
|
}
|
|
203619
204048
|
function isOnboardingPreviewStatusResponse(value) {
|
|
203620
|
-
return
|
|
204049
|
+
return isRecord12(value) && typeof value.dashboardUnlocked === "boolean" && typeof value.requiresEmailConfirmation === "boolean" && isLaunchReadiness(value.launchReadiness);
|
|
203621
204050
|
}
|
|
203622
204051
|
function isResendOnboardingPreviewConfirmationResponse(value) {
|
|
203623
|
-
return
|
|
204052
|
+
return isRecord12(value) && (value.result === "resent" || value.result === "already_confirmed") && typeof value.dashboardUnlocked === "boolean" && typeof value.requiresEmailConfirmation === "boolean" && isLaunchReadiness(value.launchReadiness);
|
|
203624
204053
|
}
|
|
203625
204054
|
function getSuccessData(payload, isData) {
|
|
203626
|
-
if (!
|
|
204055
|
+
if (!isRecord12(payload) || payload.success !== true || !isData(payload.data)) {
|
|
203627
204056
|
return null;
|
|
203628
204057
|
}
|
|
203629
204058
|
return payload.data;
|
|
@@ -204714,11 +205143,11 @@ init_src3();
|
|
|
204714
205143
|
// ../preview-next/src/client/utils/path.ts
|
|
204715
205144
|
var PATH_SEPARATOR_REGEX3 = /\./g;
|
|
204716
205145
|
var BRACKET_ACCESS_REGEX3 = /\[([^\]]+)\]/g;
|
|
204717
|
-
function
|
|
205146
|
+
function isRecord13(value) {
|
|
204718
205147
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
204719
205148
|
}
|
|
204720
205149
|
function isPathContainer2(value) {
|
|
204721
|
-
return Array.isArray(value) ||
|
|
205150
|
+
return Array.isArray(value) || isRecord13(value);
|
|
204722
205151
|
}
|
|
204723
205152
|
function createPathContainer2(nextIsIndex) {
|
|
204724
205153
|
return nextIsIndex ? [] : {};
|
|
@@ -205013,7 +205442,7 @@ init_src11();
|
|
|
205013
205442
|
init_lucide_react();
|
|
205014
205443
|
|
|
205015
205444
|
// ../preview-next/src/client/blocks/isRecord.ts
|
|
205016
|
-
function
|
|
205445
|
+
function isRecord14(value) {
|
|
205017
205446
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
205018
205447
|
}
|
|
205019
205448
|
|
|
@@ -205225,7 +205654,7 @@ function BlockToolbar({
|
|
|
205225
205654
|
return;
|
|
205226
205655
|
}
|
|
205227
205656
|
if (!outcome.response.content) return;
|
|
205228
|
-
const savedContent =
|
|
205657
|
+
const savedContent = isRecord14(outcome.response.content.data) ? outcome.response.content.data : null;
|
|
205229
205658
|
const editorBlockId = asEditorBlockId(input.action.blockId);
|
|
205230
205659
|
const currentContent = uiStore.getState().drafts.getCurrentValues(editorBlockId);
|
|
205231
205660
|
if (jsonValuesEqual(currentContent, savedContent)) {
|
|
@@ -205375,8 +205804,8 @@ function jsonValuesEqual(left, right) {
|
|
|
205375
205804
|
if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length) return false;
|
|
205376
205805
|
return left.every((value, index2) => jsonValuesEqual(value, right[index2]));
|
|
205377
205806
|
}
|
|
205378
|
-
if (
|
|
205379
|
-
if (!
|
|
205807
|
+
if (isRecord14(left) || isRecord14(right)) {
|
|
205808
|
+
if (!isRecord14(left) || !isRecord14(right)) return false;
|
|
205380
205809
|
const leftKeys = Object.keys(left);
|
|
205381
205810
|
const rightKeys = Object.keys(right);
|
|
205382
205811
|
if (leftKeys.length !== rightKeys.length) return false;
|
|
@@ -205408,13 +205837,13 @@ function findFirstFieldPath(fields3, data, prefix) {
|
|
|
205408
205837
|
}
|
|
205409
205838
|
const nextPrefix = [...prefix, field.id];
|
|
205410
205839
|
if (field.type === "group") {
|
|
205411
|
-
const groupValue =
|
|
205840
|
+
const groupValue = isRecord14(data) ? data[field.id] : void 0;
|
|
205412
205841
|
const nested = findFirstFieldPath(field.schema.fields, groupValue, nextPrefix);
|
|
205413
205842
|
if (nested) return nested;
|
|
205414
205843
|
continue;
|
|
205415
205844
|
}
|
|
205416
205845
|
if (field.type === "repeater" && field.schema) {
|
|
205417
|
-
const collection =
|
|
205846
|
+
const collection = isRecord14(data) ? data[field.id] : void 0;
|
|
205418
205847
|
const items = Array.isArray(collection) ? collection : [];
|
|
205419
205848
|
if (items.length > 0) {
|
|
205420
205849
|
const firstItem = items[0];
|
|
@@ -205684,7 +206113,7 @@ function applyPageDesignRuntimeFieldsToBlockItems(blockItems, source) {
|
|
|
205684
206113
|
const fields3 = blockId ? fieldsByBlockId.get(blockId) : void 0;
|
|
205685
206114
|
return {
|
|
205686
206115
|
...block,
|
|
205687
|
-
content: applyCompiledRuntimeFieldsToContent(
|
|
206116
|
+
content: applyCompiledRuntimeFieldsToContent(isRecord15(block.content) ? block.content : {}, fields3)
|
|
205688
206117
|
};
|
|
205689
206118
|
});
|
|
205690
206119
|
}
|
|
@@ -205703,7 +206132,7 @@ function resolveRuntimePreviewSource(pageDesignState) {
|
|
|
205703
206132
|
function designBlockIdFromBlockItem(block) {
|
|
205704
206133
|
return typeof block.id === "string" && block.id.length > 0 ? asDesignBlockId(block.id) : null;
|
|
205705
206134
|
}
|
|
205706
|
-
function
|
|
206135
|
+
function isRecord15(value) {
|
|
205707
206136
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
205708
206137
|
}
|
|
205709
206138
|
function EditablePageRenderer(props2) {
|