@riverbankcms/sdk 0.88.0 → 0.89.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-EVRS3C7T.mjs → PreviewEditorSidebar-JDR64FEC.mjs} +3 -3
- package/dist/{PreviewEditorUI-54WD4IGE.mjs → PreviewEditorUI-67TMJMAF.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-ZBEMRV7N.mjs +8 -0
- package/dist/_dts/api/src/accessAdmin.d.ts +7 -0
- package/dist/_dts/api/src/endpoints.d.ts +8 -0
- package/dist/_dts/api/src/index.d.ts +2 -2
- package/dist/_dts/api/src/siteManagementEndpoints.d.ts +5 -1
- package/dist/_dts/api/src/siteMembers.d.ts +6 -1
- package/dist/_dts/api/src/types.d.ts +1 -1
- package/dist/_dts/blocks/src/system/icons/cta.d.ts +3 -3
- package/dist/_dts/blocks/src/system/icons/index.d.ts +1 -0
- package/dist/_dts/blocks/src/system/icons/registry.d.ts +2 -2
- package/dist/_dts/blocks/src/system/icons/semantic.d.ts +3 -3
- package/dist/_dts/blocks/src/system/icons/svg.d.ts +72 -0
- package/dist/_dts/blocks/src/system/runtime/api/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/loadStateError.d.ts +1 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableDates.state.d.ts +55 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useAvailableSlots.state.d.ts +39 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFormConfig.d.ts +4 -27
- package/dist/_dts/blocks/src/system/runtime/hooks/useBookingFormConfig.state.d.ts +40 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useCalendarEvents.state.d.ts +20 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventFilters.state.d.ts +31 -0
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.d.ts +3 -3
- package/dist/_dts/blocks/src/system/runtime/hooks/useEventPagination.state.d.ts +39 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/EventPaginatedListView.client.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/newsletter-form.client.state.d.ts +24 -2
- package/dist/_dts/blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/shared/useWaitlistClaim.state.d.ts +35 -0
- package/dist/_dts/content-model/src/entry-slots/types.d.ts +54 -0
- package/dist/_dts/core/src/branded.d.ts +7 -0
- package/dist/_dts/core/src/index.d.ts +1 -0
- package/dist/_dts/core/src/site-route-target.d.ts +40 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +159 -2
- package/dist/_dts/media-core/src/fileDomain.d.ts +4 -0
- package/dist/_dts/sdk/src/client/runtimeCachePolicy.d.ts +160 -0
- package/dist/_dts/sdk/src/client/types.d.ts +26 -1
- package/dist/_dts/sdk/src/index.d.ts +3 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/theme-core/src/generated/containerResponsiveThemeCss.d.ts +1 -1
- package/dist/{chunk-YDMBIIS5.mjs → chunk-7N46MZHI.mjs} +1 -1
- package/dist/{chunk-7KOO7RPP.mjs → chunk-7YUAXONX.mjs} +1007 -353
- package/dist/{chunk-O4LVYUVH.mjs → chunk-F645A5UV.mjs} +18 -0
- package/dist/{chunk-ER4UIW4X.mjs → chunk-HKJQERFR.mjs} +7 -7
- package/dist/{chunk-K3JWH6HE.mjs → chunk-TGBJWKMP.mjs} +1 -1
- package/dist/{chunk-HVOBXA3Y.mjs → chunk-ZQRBLCW5.mjs} +2 -2
- package/dist/cli/index.mjs +668 -18
- package/dist/client/{accordion-PT5CGW5N.mjs → accordion-MUCVNGQ7.mjs} +2 -2
- package/dist/client/{bookingForm-2HLRTEYS.mjs → bookingForm-PKD6EFIE.mjs} +192 -76
- package/dist/client/bookings.mjs +436 -191
- package/dist/client/{carousel-Z2LKYSWA.mjs → carousel-3TKQSNJC.mjs} +4 -3
- package/dist/client/{cart-ND5IK4A6.mjs → cart-6XHSZK23.mjs} +8 -7
- package/dist/client/{checkout-EYUSGAY7.mjs → checkout-FVSPM6FI.mjs} +8 -7
- package/dist/client/chunk-6N7YRNYU.mjs +183 -0
- package/dist/client/{chunk-O5JNI3E4.mjs → chunk-7DH35FGA.mjs} +2 -2
- package/dist/client/{chunk-BAWHZ5GM.mjs → chunk-CQKKFEQD.mjs} +195 -61
- package/dist/client/{chunk-X7GVFB7Y.mjs → chunk-EY42X22F.mjs} +3 -3
- package/dist/client/{chunk-6DVPO44G.mjs → chunk-FHU6PFPM.mjs} +1 -1
- package/dist/client/{chunk-H4MHEXYS.mjs → chunk-LQFDYWPJ.mjs} +1 -1
- package/dist/client/{chunk-MHBEWDT7.mjs → chunk-RSQWWUAD.mjs} +122 -50
- package/dist/client/{chunk-GOFO7HRH.mjs → chunk-STJ2NCQM.mjs} +1 -1
- package/dist/client/{chunk-DIRW2LNG.mjs → chunk-UQFY4AHX.mjs} +272 -198
- package/dist/client/{chunk-WCVK4MBJ.mjs → chunk-VGLXACVK.mjs} +1 -1
- package/dist/client/{chunk-BL66UWGD.mjs → chunk-ZJZZA5EP.mjs} +6 -6
- package/dist/client/{chunk-S4G65LGR.mjs → chunk-ZT5XE7FK.mjs} +1 -1
- package/dist/client/client.mjs +3823 -3507
- package/dist/client/{courseRegistration-H3AZBUEG.mjs → courseRegistration-ATZSYDHM.mjs} +6 -6
- package/dist/client/{eventCalendar-FPKJGLGS.mjs → eventCalendar-6T2UGKKP.mjs} +10 -9
- package/dist/client/{eventCombined-QCGIZBUY.mjs → eventCombined-Q4VANXVF.mjs} +10 -9
- package/dist/client/{eventDetails-HIT3BJWU.mjs → eventDetails-DW37E7VW.mjs} +10 -9
- package/dist/client/{eventListing-R4HNWJDN.mjs → eventListing-XURTSAUW.mjs} +10 -9
- package/dist/client/{eventRegistration-Q7BYY5HF.mjs → eventRegistration-MRKEVAXW.mjs} +10 -9
- package/dist/client/{form-NI6YOG6S.mjs → form-WZZFFGMU.mjs} +3 -3
- package/dist/client/{headerSection-SDYGII36.mjs → headerSection-EQYVQBLM.mjs} +3 -3
- package/dist/client/hooks.mjs +18 -0
- package/dist/client/{locationMap-BDETEUQD.mjs → locationMap-MFF5VAZR.mjs} +3 -3
- package/dist/client/{newsletterForm-EKYIU67X.mjs → newsletterForm-JQ77UYIE.mjs} +60 -24
- package/dist/client/{productDetail-5UTGNN76.mjs → productDetail-25LMT3IZ.mjs} +8 -7
- package/dist/client/{productList-7YA5KXZQ.mjs → productList-5ABEMKUG.mjs} +8 -7
- package/dist/client/rendering/client.mjs +3266 -3528
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +3143 -3452
- package/dist/client/{shop-AIMUMZYC.mjs → shop-OMMQZ6YO.mjs} +8 -7
- package/dist/preview-next/before-render.mjs +18 -0
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/preview-next/middleware.mjs +18 -0
- package/dist/{sdk-runtime-NW472WNT.mjs → sdk-runtime-WNLBZ3ZH.mjs} +6 -6
- package/dist/server/components.mjs +1068 -1540
- package/dist/server/config-validation.mjs +18 -0
- package/dist/server/config.mjs +18 -0
- package/dist/server/data.mjs +18 -0
- package/dist/server/index.mjs +847 -261
- package/dist/server/next.mjs +1708 -1555
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +1068 -1540
- package/dist/server/rendering.mjs +1074 -1546
- package/dist/server/routing.mjs +314 -9
- package/dist/server/server.mjs +668 -25
- package/dist/server/theme-bridge.mjs +26 -0
- package/dist/styles/index.css +26 -0
- package/package.json +2 -1
- package/dist/SdkPreviewModeRuntime-ZALZDJEK.mjs +0 -8
- /package/dist/client/{chunk-LI2C6M5O.mjs → chunk-25W2EQUN.mjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { ApiRequestError } from './chunk-
|
|
2
|
+
import { ApiRequestError } from './chunk-F645A5UV.mjs';
|
|
3
3
|
import { __commonJS, __export, __toESM } from './chunk-R7POPVJR.mjs';
|
|
4
4
|
import * as React61 from 'react';
|
|
5
5
|
import React61__default, { createContext, forwardRef, useContext, createElement, useRef, useMemo, useEffect, useState, useCallback, useImperativeHandle, useLayoutEffect, memo, createRef, Component as Component$1, useDebugValue, useId as useId$1, useSyncExternalStore, isValidElement, cloneElement, useReducer, startTransition } from 'react';
|
|
@@ -32009,6 +32009,276 @@ function parseSiteIconStyleGuideVersionId(value) {
|
|
|
32009
32009
|
const normalized = value.trim();
|
|
32010
32010
|
return SITE_ICON_STYLE_GUIDE_VERSION_ID_PATTERN.test(normalized) ? unsafeAsSiteIconStyleGuideVersionId(normalized) : null;
|
|
32011
32011
|
}
|
|
32012
|
+
function createIcon(displayName, children) {
|
|
32013
|
+
const Icon2 = ({
|
|
32014
|
+
size: size4 = "1em",
|
|
32015
|
+
strokeWidth = 2,
|
|
32016
|
+
title,
|
|
32017
|
+
className,
|
|
32018
|
+
focusable = false,
|
|
32019
|
+
role,
|
|
32020
|
+
...props2
|
|
32021
|
+
}) => /* @__PURE__ */ jsxs(
|
|
32022
|
+
"svg",
|
|
32023
|
+
{
|
|
32024
|
+
"aria-hidden": title ? void 0 : true,
|
|
32025
|
+
className,
|
|
32026
|
+
"data-rb-icon": displayName.replace(/Icon$/, ""),
|
|
32027
|
+
fill: "none",
|
|
32028
|
+
focusable,
|
|
32029
|
+
height: size4,
|
|
32030
|
+
role: title ? role ?? "img" : role,
|
|
32031
|
+
stroke: "currentColor",
|
|
32032
|
+
strokeLinecap: "round",
|
|
32033
|
+
strokeLinejoin: "round",
|
|
32034
|
+
strokeWidth,
|
|
32035
|
+
viewBox: "0 0 24 24",
|
|
32036
|
+
width: size4,
|
|
32037
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
32038
|
+
...props2,
|
|
32039
|
+
children: [
|
|
32040
|
+
title ? /* @__PURE__ */ jsx("title", { children: title }) : null,
|
|
32041
|
+
children
|
|
32042
|
+
]
|
|
32043
|
+
}
|
|
32044
|
+
);
|
|
32045
|
+
Icon2.displayName = displayName;
|
|
32046
|
+
return Icon2;
|
|
32047
|
+
}
|
|
32048
|
+
var ArrowDownIcon = createIcon("ArrowDownIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32049
|
+
/* @__PURE__ */ jsx("path", { d: "M12 5v14" }),
|
|
32050
|
+
/* @__PURE__ */ jsx("path", { d: "m6 13 6 6 6-6" })
|
|
32051
|
+
] }));
|
|
32052
|
+
var ArrowLeftIcon = createIcon("ArrowLeftIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32053
|
+
/* @__PURE__ */ jsx("path", { d: "M19 12H5" }),
|
|
32054
|
+
/* @__PURE__ */ jsx("path", { d: "m11 6-6 6 6 6" })
|
|
32055
|
+
] }));
|
|
32056
|
+
var ArrowRightIcon = createIcon("ArrowRightIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32057
|
+
/* @__PURE__ */ jsx("path", { d: "M5 12h14" }),
|
|
32058
|
+
/* @__PURE__ */ jsx("path", { d: "m13 6 6 6-6 6" })
|
|
32059
|
+
] }));
|
|
32060
|
+
var AwardIcon = createIcon("AwardIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32061
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "8", r: "4" }),
|
|
32062
|
+
/* @__PURE__ */ jsx("path", { d: "m8.5 12.5-1.5 7 5-3 5 3-1.5-7" })
|
|
32063
|
+
] }));
|
|
32064
|
+
var BadgeCheckIcon = createIcon("BadgeCheckIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32065
|
+
/* @__PURE__ */ jsx("path", { d: "m8 3 4-1 4 1 3 3 1 4-1 4-3 3-4 1-4-1-3-3-1-4 1-4Z" }),
|
|
32066
|
+
/* @__PURE__ */ jsx("path", { d: "m8.5 11.5 2.5 2.5 4.5-5" })
|
|
32067
|
+
] }));
|
|
32068
|
+
var BookOpenIcon = createIcon("BookOpenIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32069
|
+
/* @__PURE__ */ jsx("path", { d: "M4 5.5A3 3 0 0 1 7 4h13v15H7a3 3 0 0 0-3 1.5Z" }),
|
|
32070
|
+
/* @__PURE__ */ jsx("path", { d: "M4 5.5V20" }),
|
|
32071
|
+
/* @__PURE__ */ jsx("path", { d: "M12 4v15" })
|
|
32072
|
+
] }));
|
|
32073
|
+
var BrainIcon = createIcon("BrainIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32074
|
+
/* @__PURE__ */ jsx("path", { d: "M9 4a4 4 0 0 0-4 4 4 4 0 0 0 0 8 4 4 0 0 0 4 4" }),
|
|
32075
|
+
/* @__PURE__ */ jsx("path", { d: "M15 4a4 4 0 0 1 4 4 4 4 0 0 1 0 8 4 4 0 0 1-4 4" }),
|
|
32076
|
+
/* @__PURE__ */ jsx("path", { d: "M9 4v16" }),
|
|
32077
|
+
/* @__PURE__ */ jsx("path", { d: "M15 4v16" }),
|
|
32078
|
+
/* @__PURE__ */ jsx("path", { d: "M9 8h6" }),
|
|
32079
|
+
/* @__PURE__ */ jsx("path", { d: "M9 14h6" })
|
|
32080
|
+
] }));
|
|
32081
|
+
var BriefcaseBusinessIcon = createIcon("BriefcaseBusinessIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32082
|
+
/* @__PURE__ */ jsx("path", { d: "M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2" }),
|
|
32083
|
+
/* @__PURE__ */ jsx("rect", { x: "3", y: "7", width: "18", height: "13", rx: "2" }),
|
|
32084
|
+
/* @__PURE__ */ jsx("path", { d: "M3 12h18" }),
|
|
32085
|
+
/* @__PURE__ */ jsx("path", { d: "M9 12v2" }),
|
|
32086
|
+
/* @__PURE__ */ jsx("path", { d: "M15 12v2" })
|
|
32087
|
+
] }));
|
|
32088
|
+
var CalendarIcon = createIcon("CalendarIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32089
|
+
/* @__PURE__ */ jsx("path", { d: "M8 3v4" }),
|
|
32090
|
+
/* @__PURE__ */ jsx("path", { d: "M16 3v4" }),
|
|
32091
|
+
/* @__PURE__ */ jsx("rect", { x: "4", y: "5", width: "16", height: "16", rx: "2" }),
|
|
32092
|
+
/* @__PURE__ */ jsx("path", { d: "M4 10h16" })
|
|
32093
|
+
] }));
|
|
32094
|
+
var CalendarDaysIcon = CalendarIcon;
|
|
32095
|
+
var CheckIcon = createIcon("CheckIcon", /* @__PURE__ */ jsx("path", { d: "m5 12 4 4L19 6" }));
|
|
32096
|
+
var ChevronDownIcon = createIcon("ChevronDownIcon", /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" }));
|
|
32097
|
+
var ChevronLeftIcon = createIcon("ChevronLeftIcon", /* @__PURE__ */ jsx("path", { d: "m15 18-6-6 6-6" }));
|
|
32098
|
+
var ChevronRightIcon = createIcon("ChevronRightIcon", /* @__PURE__ */ jsx("path", { d: "m9 18 6-6-6-6" }));
|
|
32099
|
+
var ChevronUpIcon = createIcon("ChevronUpIcon", /* @__PURE__ */ jsx("path", { d: "m18 15-6-6-6 6" }));
|
|
32100
|
+
var CircleMinusIcon = createIcon("CircleMinusIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32101
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
32102
|
+
/* @__PURE__ */ jsx("path", { d: "M8 12h8" })
|
|
32103
|
+
] }));
|
|
32104
|
+
var CirclePlusIcon = createIcon("CirclePlusIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32105
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
32106
|
+
/* @__PURE__ */ jsx("path", { d: "M8 12h8" }),
|
|
32107
|
+
/* @__PURE__ */ jsx("path", { d: "M12 8v8" })
|
|
32108
|
+
] }));
|
|
32109
|
+
var ClockIcon = createIcon("ClockIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32110
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
32111
|
+
/* @__PURE__ */ jsx("path", { d: "M12 7v5l3 2" })
|
|
32112
|
+
] }));
|
|
32113
|
+
var CompassIcon = createIcon("CompassIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32114
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
32115
|
+
/* @__PURE__ */ jsx("path", { d: "m15 9-2 6-4 2 2-6Z" })
|
|
32116
|
+
] }));
|
|
32117
|
+
var DownloadIcon = createIcon("DownloadIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32118
|
+
/* @__PURE__ */ jsx("path", { d: "M12 3v12" }),
|
|
32119
|
+
/* @__PURE__ */ jsx("path", { d: "m7 10 5 5 5-5" }),
|
|
32120
|
+
/* @__PURE__ */ jsx("path", { d: "M5 21h14" })
|
|
32121
|
+
] }));
|
|
32122
|
+
var ExternalLinkIcon = createIcon("ExternalLinkIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32123
|
+
/* @__PURE__ */ jsx("path", { d: "M14 4h6v6" }),
|
|
32124
|
+
/* @__PURE__ */ jsx("path", { d: "m10 14 10-10" }),
|
|
32125
|
+
/* @__PURE__ */ jsx("path", { d: "M20 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h5" })
|
|
32126
|
+
] }));
|
|
32127
|
+
var FileArchiveIcon = createIcon("FileArchiveIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32128
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z" }),
|
|
32129
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2v5h5" }),
|
|
32130
|
+
/* @__PURE__ */ jsx("path", { d: "M10 7h2" }),
|
|
32131
|
+
/* @__PURE__ */ jsx("path", { d: "M10 11h2" }),
|
|
32132
|
+
/* @__PURE__ */ jsx("path", { d: "M10 15h4v4h-4Z" })
|
|
32133
|
+
] }));
|
|
32134
|
+
var FileAudioIcon = createIcon("FileAudioIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32135
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z" }),
|
|
32136
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2v5h5" }),
|
|
32137
|
+
/* @__PURE__ */ jsx("path", { d: "M10 16V10l5-2v6" }),
|
|
32138
|
+
/* @__PURE__ */ jsx("circle", { cx: "9", cy: "17", r: "1.5" }),
|
|
32139
|
+
/* @__PURE__ */ jsx("circle", { cx: "15", cy: "15", r: "1.5" })
|
|
32140
|
+
] }));
|
|
32141
|
+
var FileSpreadsheetIcon = createIcon("FileSpreadsheetIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32142
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z" }),
|
|
32143
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2v5h5" }),
|
|
32144
|
+
/* @__PURE__ */ jsx("path", { d: "M8 12h8" }),
|
|
32145
|
+
/* @__PURE__ */ jsx("path", { d: "M8 16h8" }),
|
|
32146
|
+
/* @__PURE__ */ jsx("path", { d: "M12 10v8" })
|
|
32147
|
+
] }));
|
|
32148
|
+
var FileTextIcon = createIcon("FileTextIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32149
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2H7a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7Z" }),
|
|
32150
|
+
/* @__PURE__ */ jsx("path", { d: "M14 2v5h5" }),
|
|
32151
|
+
/* @__PURE__ */ jsx("path", { d: "M9 13h6" }),
|
|
32152
|
+
/* @__PURE__ */ jsx("path", { d: "M9 17h6" })
|
|
32153
|
+
] }));
|
|
32154
|
+
var Flower2Icon = createIcon("Flower2Icon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32155
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "2" }),
|
|
32156
|
+
/* @__PURE__ */ jsx("path", { d: "M12 10C8 4 16 4 12 10Z" }),
|
|
32157
|
+
/* @__PURE__ */ jsx("path", { d: "M14 12c6-4 6 4 0 0Z" }),
|
|
32158
|
+
/* @__PURE__ */ jsx("path", { d: "M12 14c4 6-4 6 0 0Z" }),
|
|
32159
|
+
/* @__PURE__ */ jsx("path", { d: "M10 12c-6 4-6-4 0 0Z" })
|
|
32160
|
+
] }));
|
|
32161
|
+
var GlobeIcon = createIcon("GlobeIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32162
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
32163
|
+
/* @__PURE__ */ jsx("path", { d: "M3 12h18" }),
|
|
32164
|
+
/* @__PURE__ */ jsx("path", { d: "M12 3a14 14 0 0 1 0 18" }),
|
|
32165
|
+
/* @__PURE__ */ jsx("path", { d: "M12 3a14 14 0 0 0 0 18" })
|
|
32166
|
+
] }));
|
|
32167
|
+
var GraduationCapIcon = createIcon("GraduationCapIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32168
|
+
/* @__PURE__ */ jsx("path", { d: "m3 8 9-4 9 4-9 4Z" }),
|
|
32169
|
+
/* @__PURE__ */ jsx("path", { d: "M7 10v5c3 3 7 3 10 0v-5" }),
|
|
32170
|
+
/* @__PURE__ */ jsx("path", { d: "M21 8v6" })
|
|
32171
|
+
] }));
|
|
32172
|
+
var HandHeartIcon = createIcon("HandHeartIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32173
|
+
/* @__PURE__ */ jsx("path", { d: "M3 15h4l4 4h5l5-5" }),
|
|
32174
|
+
/* @__PURE__ */ jsx("path", { d: "M7 15l3-3h4a2 2 0 0 1 2 2" }),
|
|
32175
|
+
/* @__PURE__ */ jsx("path", { d: "M12 8c-2-2-5 1-2 4l2 2 2-2c3-3 0-6-2-4Z" })
|
|
32176
|
+
] }));
|
|
32177
|
+
var HeartIcon = createIcon("HeartIcon", /* @__PURE__ */ jsx("path", { d: "M12 21s-8-5-8-11a5 5 0 0 1 8-4 5 5 0 0 1 8 4c0 6-8 11-8 11Z" }));
|
|
32178
|
+
var HeartHandshakeIcon = createIcon("HeartHandshakeIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32179
|
+
/* @__PURE__ */ jsx("path", { d: "M12 21s-8-5-8-11a5 5 0 0 1 8-4 5 5 0 0 1 8 4c0 6-8 11-8 11Z" }),
|
|
32180
|
+
/* @__PURE__ */ jsx("path", { d: "m8 12 2 2 2-2 2 2 2-2" })
|
|
32181
|
+
] }));
|
|
32182
|
+
var HomeIcon = createIcon("HomeIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32183
|
+
/* @__PURE__ */ jsx("path", { d: "m3 11 9-8 9 8" }),
|
|
32184
|
+
/* @__PURE__ */ jsx("path", { d: "M5 10v10h14V10" }),
|
|
32185
|
+
/* @__PURE__ */ jsx("path", { d: "M9 20v-6h6v6" })
|
|
32186
|
+
] }));
|
|
32187
|
+
var InfoIcon = createIcon("InfoIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32188
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
32189
|
+
/* @__PURE__ */ jsx("path", { d: "M12 11v6" }),
|
|
32190
|
+
/* @__PURE__ */ jsx("path", { d: "M12 7h.01" })
|
|
32191
|
+
] }));
|
|
32192
|
+
var LeafIcon = createIcon("LeafIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32193
|
+
/* @__PURE__ */ jsx("path", { d: "M5 20C5 10 12 4 21 4c0 9-6 16-16 16Z" }),
|
|
32194
|
+
/* @__PURE__ */ jsx("path", { d: "M5 20c4-5 8-8 13-11" })
|
|
32195
|
+
] }));
|
|
32196
|
+
var LightbulbIcon = createIcon("LightbulbIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32197
|
+
/* @__PURE__ */ jsx("path", { d: "M9 18h6" }),
|
|
32198
|
+
/* @__PURE__ */ jsx("path", { d: "M10 22h4" }),
|
|
32199
|
+
/* @__PURE__ */ jsx("path", { d: "M8 14a6 6 0 1 1 8 0c-1 1-1 2-1 4H9c0-2 0-3-1-4Z" })
|
|
32200
|
+
] }));
|
|
32201
|
+
var LockIcon = createIcon("LockIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32202
|
+
/* @__PURE__ */ jsx("rect", { x: "5", y: "10", width: "14", height: "10", rx: "2" }),
|
|
32203
|
+
/* @__PURE__ */ jsx("path", { d: "M8 10V7a4 4 0 0 1 8 0v3" })
|
|
32204
|
+
] }));
|
|
32205
|
+
var MailIcon = createIcon("MailIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32206
|
+
/* @__PURE__ */ jsx("rect", { x: "3", y: "5", width: "18", height: "14", rx: "2" }),
|
|
32207
|
+
/* @__PURE__ */ jsx("path", { d: "m3 7 9 6 9-6" })
|
|
32208
|
+
] }));
|
|
32209
|
+
var MapPinIcon = createIcon("MapPinIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32210
|
+
/* @__PURE__ */ jsx("path", { d: "M12 21s7-5 7-12a7 7 0 0 0-14 0c0 7 7 12 7 12Z" }),
|
|
32211
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "9", r: "2.5" })
|
|
32212
|
+
] }));
|
|
32213
|
+
var MessageCircleIcon = createIcon("MessageCircleIcon", /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M21 11.5a8.5 8.5 0 0 1-12.6 7.4L3 20l1.1-5.3A8.5 8.5 0 1 1 21 11.5Z" }) }));
|
|
32214
|
+
var MinusIcon = createIcon("MinusIcon", /* @__PURE__ */ jsx("path", { d: "M5 12h14" }));
|
|
32215
|
+
var PackageIcon = createIcon("PackageIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32216
|
+
/* @__PURE__ */ jsx("path", { d: "m12 3 8 4.5v9L12 21l-8-4.5v-9Z" }),
|
|
32217
|
+
/* @__PURE__ */ jsx("path", { d: "M12 12 4 7.5" }),
|
|
32218
|
+
/* @__PURE__ */ jsx("path", { d: "m12 12 8-4.5" }),
|
|
32219
|
+
/* @__PURE__ */ jsx("path", { d: "M12 12v9" })
|
|
32220
|
+
] }));
|
|
32221
|
+
var PhoneIcon = createIcon("PhoneIcon", /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("path", { d: "M22 16.9v3a2 2 0 0 1-2.2 2A19 19 0 0 1 2.1 4.2 2 2 0 0 1 4.1 2h3a2 2 0 0 1 2 1.7l.4 2.5a2 2 0 0 1-.6 1.8L7.7 9.2a13 13 0 0 0 7.1 7.1l1.2-1.2a2 2 0 0 1 1.8-.6l2.5.4a2 2 0 0 1 1.7 2Z" }) }));
|
|
32222
|
+
var PlayIcon = createIcon("PlayIcon", /* @__PURE__ */ jsx("path", { d: "m8 5 11 7-11 7Z" }));
|
|
32223
|
+
var PlusIcon = createIcon("PlusIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32224
|
+
/* @__PURE__ */ jsx("path", { d: "M12 5v14" }),
|
|
32225
|
+
/* @__PURE__ */ jsx("path", { d: "M5 12h14" })
|
|
32226
|
+
] }));
|
|
32227
|
+
var ShieldIcon = createIcon("ShieldIcon", /* @__PURE__ */ jsx("path", { d: "M12 22s8-4 8-11V5l-8-3-8 3v6c0 7 8 11 8 11Z" }));
|
|
32228
|
+
var ShoppingBagIcon = createIcon("ShoppingBagIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32229
|
+
/* @__PURE__ */ jsx("path", { d: "M6 8h12l1 13H5Z" }),
|
|
32230
|
+
/* @__PURE__ */ jsx("path", { d: "M9 8a3 3 0 0 1 6 0" })
|
|
32231
|
+
] }));
|
|
32232
|
+
var ShoppingCartIcon = createIcon("ShoppingCartIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32233
|
+
/* @__PURE__ */ jsx("circle", { cx: "9", cy: "20", r: "1" }),
|
|
32234
|
+
/* @__PURE__ */ jsx("circle", { cx: "18", cy: "20", r: "1" }),
|
|
32235
|
+
/* @__PURE__ */ jsx("path", { d: "M2 3h3l3 12h10l3-8H7" })
|
|
32236
|
+
] }));
|
|
32237
|
+
var SmileIcon = createIcon("SmileIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32238
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
32239
|
+
/* @__PURE__ */ jsx("path", { d: "M8 14s1.5 2 4 2 4-2 4-2" }),
|
|
32240
|
+
/* @__PURE__ */ jsx("path", { d: "M9 9h.01" }),
|
|
32241
|
+
/* @__PURE__ */ jsx("path", { d: "M15 9h.01" })
|
|
32242
|
+
] }));
|
|
32243
|
+
var SparklesIcon = createIcon("SparklesIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32244
|
+
/* @__PURE__ */ jsx("path", { d: "m12 3 2 5 5 2-5 2-2 5-2-5-5-2 5-2Z" }),
|
|
32245
|
+
/* @__PURE__ */ jsx("path", { d: "m19 15 .8 2.2L22 18l-2.2.8L19 21l-.8-2.2L16 18l2.2-.8Z" })
|
|
32246
|
+
] }));
|
|
32247
|
+
var SproutIcon = createIcon("SproutIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32248
|
+
/* @__PURE__ */ jsx("path", { d: "M12 21V10" }),
|
|
32249
|
+
/* @__PURE__ */ jsx("path", { d: "M12 10C8 5 4 6 3 10c4 1 7 0 9 0Z" }),
|
|
32250
|
+
/* @__PURE__ */ jsx("path", { d: "M12 11c4-5 8-4 9 0-4 1-7 0-9 0Z" })
|
|
32251
|
+
] }));
|
|
32252
|
+
var StarIcon = createIcon("StarIcon", /* @__PURE__ */ jsx("path", { d: "m12 3 2.8 5.7 6.2.9-4.5 4.4 1.1 6.2L12 17.2 6.4 20.2 7.5 14 3 9.6l6.2-.9Z" }));
|
|
32253
|
+
var TargetIcon = createIcon("TargetIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32254
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "9" }),
|
|
32255
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "5" }),
|
|
32256
|
+
/* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "1" })
|
|
32257
|
+
] }));
|
|
32258
|
+
var UploadIcon = createIcon("UploadIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32259
|
+
/* @__PURE__ */ jsx("path", { d: "M12 21V9" }),
|
|
32260
|
+
/* @__PURE__ */ jsx("path", { d: "m7 14 5-5 5 5" }),
|
|
32261
|
+
/* @__PURE__ */ jsx("path", { d: "M5 3h14" })
|
|
32262
|
+
] }));
|
|
32263
|
+
var UserRoundCheckIcon = createIcon("UserRoundCheckIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32264
|
+
/* @__PURE__ */ jsx("circle", { cx: "10", cy: "8", r: "4" }),
|
|
32265
|
+
/* @__PURE__ */ jsx("path", { d: "M3 21a7 7 0 0 1 11.5-5.3" }),
|
|
32266
|
+
/* @__PURE__ */ jsx("path", { d: "m15 19 2 2 4-5" })
|
|
32267
|
+
] }));
|
|
32268
|
+
var UsersIcon = createIcon("UsersIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32269
|
+
/* @__PURE__ */ jsx("circle", { cx: "9", cy: "8", r: "4" }),
|
|
32270
|
+
/* @__PURE__ */ jsx("path", { d: "M2 21a7 7 0 0 1 14 0" }),
|
|
32271
|
+
/* @__PURE__ */ jsx("path", { d: "M17 11a4 4 0 0 0 0-7" }),
|
|
32272
|
+
/* @__PURE__ */ jsx("path", { d: "M22 21a7 7 0 0 0-5-6.7" })
|
|
32273
|
+
] }));
|
|
32274
|
+
var WrenchIcon = createIcon("WrenchIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32275
|
+
/* @__PURE__ */ jsx("path", { d: "M14.7 6.3A5 5 0 0 0 7 12.6L3.5 16a2.1 2.1 0 0 0 3 3L10 15.5A5 5 0 0 0 16.7 9Z" }),
|
|
32276
|
+
/* @__PURE__ */ jsx("path", { d: "m15 5 4 4" })
|
|
32277
|
+
] }));
|
|
32278
|
+
var XIcon = createIcon("XIcon", /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
32279
|
+
/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }),
|
|
32280
|
+
/* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })
|
|
32281
|
+
] }));
|
|
32012
32282
|
|
|
32013
32283
|
// ../blocks/src/system/icons/semantic.ts
|
|
32014
32284
|
var SEMANTIC_ICON_IDS = [
|
|
@@ -32045,37 +32315,37 @@ var SEMANTIC_ICON_IDS = [
|
|
|
32045
32315
|
"professional-service"
|
|
32046
32316
|
];
|
|
32047
32317
|
var SEMANTIC_ICON_COMPONENTS = {
|
|
32048
|
-
"protection-trust":
|
|
32049
|
-
confidentiality:
|
|
32050
|
-
"care-support":
|
|
32051
|
-
partnership:
|
|
32052
|
-
warmth:
|
|
32053
|
-
community:
|
|
32054
|
-
"personal-guidance":
|
|
32055
|
-
conversation:
|
|
32056
|
-
"friendly-welcome":
|
|
32057
|
-
"insight-learning":
|
|
32058
|
-
"natural-wellbeing":
|
|
32059
|
-
growth:
|
|
32060
|
-
"gentle-care":
|
|
32061
|
-
"special-touch":
|
|
32062
|
-
ideas:
|
|
32063
|
-
direction:
|
|
32064
|
-
focus:
|
|
32065
|
-
quality:
|
|
32066
|
-
highlight:
|
|
32067
|
-
"verified-quality":
|
|
32068
|
-
learning:
|
|
32069
|
-
training:
|
|
32070
|
-
"programmes-dates":
|
|
32071
|
-
place:
|
|
32072
|
-
products:
|
|
32073
|
-
packages:
|
|
32074
|
-
time:
|
|
32075
|
-
"practical-service":
|
|
32076
|
-
"at-home":
|
|
32077
|
-
worldwide:
|
|
32078
|
-
"professional-service":
|
|
32318
|
+
"protection-trust": ShieldIcon,
|
|
32319
|
+
confidentiality: LockIcon,
|
|
32320
|
+
"care-support": HandHeartIcon,
|
|
32321
|
+
partnership: HeartHandshakeIcon,
|
|
32322
|
+
warmth: HeartIcon,
|
|
32323
|
+
community: UsersIcon,
|
|
32324
|
+
"personal-guidance": UserRoundCheckIcon,
|
|
32325
|
+
conversation: MessageCircleIcon,
|
|
32326
|
+
"friendly-welcome": SmileIcon,
|
|
32327
|
+
"insight-learning": BrainIcon,
|
|
32328
|
+
"natural-wellbeing": LeafIcon,
|
|
32329
|
+
growth: SproutIcon,
|
|
32330
|
+
"gentle-care": Flower2Icon,
|
|
32331
|
+
"special-touch": SparklesIcon,
|
|
32332
|
+
ideas: LightbulbIcon,
|
|
32333
|
+
direction: CompassIcon,
|
|
32334
|
+
focus: TargetIcon,
|
|
32335
|
+
quality: AwardIcon,
|
|
32336
|
+
highlight: StarIcon,
|
|
32337
|
+
"verified-quality": BadgeCheckIcon,
|
|
32338
|
+
learning: BookOpenIcon,
|
|
32339
|
+
training: GraduationCapIcon,
|
|
32340
|
+
"programmes-dates": CalendarDaysIcon,
|
|
32341
|
+
place: MapPinIcon,
|
|
32342
|
+
products: ShoppingBagIcon,
|
|
32343
|
+
packages: PackageIcon,
|
|
32344
|
+
time: ClockIcon,
|
|
32345
|
+
"practical-service": WrenchIcon,
|
|
32346
|
+
"at-home": HomeIcon,
|
|
32347
|
+
worldwide: GlobeIcon,
|
|
32348
|
+
"professional-service": BriefcaseBusinessIcon
|
|
32079
32349
|
};
|
|
32080
32350
|
var featurePreset = ["feature"];
|
|
32081
32351
|
var SEMANTIC_ICON_DEFINITIONS = [
|
|
@@ -63814,7 +64084,7 @@ var MediaNodeServer = ({
|
|
|
63814
64084
|
}
|
|
63815
64085
|
);
|
|
63816
64086
|
};
|
|
63817
|
-
function
|
|
64087
|
+
function MapPinIcon2({
|
|
63818
64088
|
className,
|
|
63819
64089
|
size: size4 = 16,
|
|
63820
64090
|
strokeWidth = 2
|
|
@@ -63840,7 +64110,7 @@ function MapPinIcon({
|
|
|
63840
64110
|
}
|
|
63841
64111
|
);
|
|
63842
64112
|
}
|
|
63843
|
-
function
|
|
64113
|
+
function CalendarIcon2({
|
|
63844
64114
|
className,
|
|
63845
64115
|
size: size4 = 16,
|
|
63846
64116
|
strokeWidth = 2
|
|
@@ -63929,7 +64199,7 @@ var EventCard = ({
|
|
|
63929
64199
|
),
|
|
63930
64200
|
/* @__PURE__ */ jsx("h3", { className: "card-title rb-mb-3", children: title }),
|
|
63931
64201
|
/* @__PURE__ */ jsx("div", { className: "rb-mb-2 rb-caption", children: /* @__PURE__ */ jsxs("div", { className: "rb-flex rb-items-center rb-gap-2", children: [
|
|
63932
|
-
/* @__PURE__ */ jsx(
|
|
64202
|
+
/* @__PURE__ */ jsx(CalendarIcon2, { className: "rb-shrink-0" }),
|
|
63933
64203
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
63934
64204
|
/* @__PURE__ */ jsx("time", { children: formattedDate }),
|
|
63935
64205
|
/* @__PURE__ */ jsx("p", { className: "rb-pl-6", children: formattedTime })
|
|
@@ -63937,7 +64207,7 @@ var EventCard = ({
|
|
|
63937
64207
|
] }) }),
|
|
63938
64208
|
showVenue && event.venue && /* @__PURE__ */ jsxs("div", { className: "rb-mb-3", children: [
|
|
63939
64209
|
/* @__PURE__ */ jsxs("div", { className: "rb-flex rb-items-center rb-gap-2 rb-caption", children: [
|
|
63940
|
-
/* @__PURE__ */ jsx(
|
|
64210
|
+
/* @__PURE__ */ jsx(MapPinIcon2, { className: "rb-shrink-0" }),
|
|
63941
64211
|
/* @__PURE__ */ jsxs("span", { children: [
|
|
63942
64212
|
/* @__PURE__ */ jsx("strong", { children: event.venue.name }),
|
|
63943
64213
|
event.venue.address ? ` \xB7 ${event.venue.address}` : null
|
|
@@ -64026,7 +64296,7 @@ var EventCompactRow = ({
|
|
|
64026
64296
|
/* @__PURE__ */ jsx("h3", { className: "event-compact-row-title", children: event.title }),
|
|
64027
64297
|
/* @__PURE__ */ jsxs("div", { className: "event-compact-row-meta", children: [
|
|
64028
64298
|
event.venue && /* @__PURE__ */ jsxs("span", { className: "event-compact-row-venue", children: [
|
|
64029
|
-
/* @__PURE__ */ jsx(
|
|
64299
|
+
/* @__PURE__ */ jsx(MapPinIcon2, { className: "rb-shrink-0" }),
|
|
64030
64300
|
event.venue.name
|
|
64031
64301
|
] }),
|
|
64032
64302
|
teacherLine && /* @__PURE__ */ jsx("span", { className: "event-compact-row-teacher", children: teacherLine }),
|
|
@@ -64035,13 +64305,13 @@ var EventCompactRow = ({
|
|
|
64035
64305
|
] }),
|
|
64036
64306
|
/* @__PURE__ */ jsxs("div", { className: "event-compact-row-action", children: [
|
|
64037
64307
|
/* @__PURE__ */ jsxs("span", { className: "event-compact-row-datetime", children: [
|
|
64038
|
-
/* @__PURE__ */ jsx(
|
|
64308
|
+
/* @__PURE__ */ jsx(ClockIcon, { "aria-hidden": "true" }),
|
|
64039
64309
|
formattedTime,
|
|
64040
64310
|
/* @__PURE__ */ jsx("span", { className: "event-compact-row-action-price", children: price })
|
|
64041
64311
|
] }),
|
|
64042
64312
|
cta.hidden ? /* @__PURE__ */ jsx("span", { className: "event-compact-row-status", children: cta.label }) : /* @__PURE__ */ jsxs("a", { href: cta.href, className: `${buttonClass} event-compact-row-cta`, children: [
|
|
64043
64313
|
/* @__PURE__ */ jsx("span", { children: cta.label }),
|
|
64044
|
-
/* @__PURE__ */ jsx(
|
|
64314
|
+
/* @__PURE__ */ jsx(ArrowRightIcon, { "aria-hidden": "true" })
|
|
64045
64315
|
] })
|
|
64046
64316
|
] })
|
|
64047
64317
|
] })
|
|
@@ -72342,26 +72612,26 @@ var CTA_ICON_NAMES = [
|
|
|
72342
72612
|
"X"
|
|
72343
72613
|
];
|
|
72344
72614
|
var CTA_ICON_COMPONENTS = {
|
|
72345
|
-
ArrowRight,
|
|
72346
|
-
ArrowLeft,
|
|
72347
|
-
ChevronRight,
|
|
72348
|
-
ChevronLeft,
|
|
72349
|
-
ChevronUp,
|
|
72350
|
-
ChevronDown,
|
|
72351
|
-
ExternalLink,
|
|
72352
|
-
Download,
|
|
72353
|
-
Upload,
|
|
72354
|
-
Mail,
|
|
72355
|
-
Phone,
|
|
72356
|
-
Play,
|
|
72357
|
-
ShoppingCart,
|
|
72358
|
-
Calendar,
|
|
72359
|
-
MapPin,
|
|
72360
|
-
Info,
|
|
72361
|
-
Plus,
|
|
72362
|
-
Minus,
|
|
72363
|
-
Check,
|
|
72364
|
-
X
|
|
72615
|
+
ArrowRight: ArrowRightIcon,
|
|
72616
|
+
ArrowLeft: ArrowLeftIcon,
|
|
72617
|
+
ChevronRight: ChevronRightIcon,
|
|
72618
|
+
ChevronLeft: ChevronLeftIcon,
|
|
72619
|
+
ChevronUp: ChevronUpIcon,
|
|
72620
|
+
ChevronDown: ChevronDownIcon,
|
|
72621
|
+
ExternalLink: ExternalLinkIcon,
|
|
72622
|
+
Download: DownloadIcon,
|
|
72623
|
+
Upload: UploadIcon,
|
|
72624
|
+
Mail: MailIcon,
|
|
72625
|
+
Phone: PhoneIcon,
|
|
72626
|
+
Play: PlayIcon,
|
|
72627
|
+
ShoppingCart: ShoppingCartIcon,
|
|
72628
|
+
Calendar: CalendarIcon,
|
|
72629
|
+
MapPin: MapPinIcon,
|
|
72630
|
+
Info: InfoIcon,
|
|
72631
|
+
Plus: PlusIcon,
|
|
72632
|
+
Minus: MinusIcon,
|
|
72633
|
+
Check: CheckIcon,
|
|
72634
|
+
X: XIcon
|
|
72365
72635
|
};
|
|
72366
72636
|
function isCtaIconName(value) {
|
|
72367
72637
|
return typeof value === "string" && CTA_ICON_NAMES.includes(value);
|
|
@@ -72516,13 +72786,13 @@ function displayFilename(value) {
|
|
|
72516
72786
|
function iconForMediaType(type) {
|
|
72517
72787
|
switch (type) {
|
|
72518
72788
|
case "audio":
|
|
72519
|
-
return /* @__PURE__ */ jsx(
|
|
72789
|
+
return /* @__PURE__ */ jsx(FileAudioIcon, { "aria-hidden": "true", size: 24 });
|
|
72520
72790
|
case "document":
|
|
72521
|
-
return /* @__PURE__ */ jsx(
|
|
72791
|
+
return /* @__PURE__ */ jsx(FileTextIcon, { "aria-hidden": "true", size: 24 });
|
|
72522
72792
|
case "spreadsheet":
|
|
72523
|
-
return /* @__PURE__ */ jsx(
|
|
72793
|
+
return /* @__PURE__ */ jsx(FileSpreadsheetIcon, { "aria-hidden": "true", size: 24 });
|
|
72524
72794
|
case "archive":
|
|
72525
|
-
return /* @__PURE__ */ jsx(
|
|
72795
|
+
return /* @__PURE__ */ jsx(FileArchiveIcon, { "aria-hidden": "true", size: 24 });
|
|
72526
72796
|
}
|
|
72527
72797
|
}
|
|
72528
72798
|
function normalizeButtonVariant(value) {
|
|
@@ -72592,7 +72862,7 @@ function FileDownloadNode({
|
|
|
72592
72862
|
extraClassName: "rb-inline-flex rb-shrink-0 rb-items-center rb-justify-center rb-gap-2"
|
|
72593
72863
|
}),
|
|
72594
72864
|
children: [
|
|
72595
|
-
/* @__PURE__ */ jsx(
|
|
72865
|
+
/* @__PURE__ */ jsx(DownloadIcon, { "aria-hidden": "true", size: 24 }),
|
|
72596
72866
|
label
|
|
72597
72867
|
]
|
|
72598
72868
|
}
|
|
@@ -73028,12 +73298,12 @@ function assertNever7(value) {
|
|
|
73028
73298
|
throw new Error(`Unhandled accordion icon set: ${String(value)}`);
|
|
73029
73299
|
}
|
|
73030
73300
|
var ACCORDION_ICONS = {
|
|
73031
|
-
Plus,
|
|
73032
|
-
Minus,
|
|
73033
|
-
ChevronDown,
|
|
73034
|
-
ArrowDown,
|
|
73035
|
-
CirclePlus,
|
|
73036
|
-
CircleMinus
|
|
73301
|
+
Plus: PlusIcon,
|
|
73302
|
+
Minus: MinusIcon,
|
|
73303
|
+
ChevronDown: ChevronDownIcon,
|
|
73304
|
+
ArrowDown: ArrowDownIcon,
|
|
73305
|
+
CirclePlus: CirclePlusIcon,
|
|
73306
|
+
CircleMinus: CircleMinusIcon
|
|
73037
73307
|
};
|
|
73038
73308
|
var AccordionNodeSSR = ({
|
|
73039
73309
|
blockId,
|
|
@@ -75209,7 +75479,7 @@ function OfferingsPreviewNode(props2) {
|
|
|
75209
75479
|
),
|
|
75210
75480
|
blockCta ? /* @__PURE__ */ jsx("footer", { className: "offerings-preview-footer rb-flex rb-justify-center", children: /* @__PURE__ */ jsxs("a", { className: blockLinkClass, href: blockCta.href, children: [
|
|
75211
75481
|
/* @__PURE__ */ jsx("span", { children: blockCta.label }),
|
|
75212
|
-
/* @__PURE__ */ jsx(
|
|
75482
|
+
/* @__PURE__ */ jsx(ArrowRightIcon, { "aria-hidden": "true", className: "offerings-preview-link-icon rb-h-4 rb-w-4" })
|
|
75213
75483
|
] }) }) : null
|
|
75214
75484
|
]
|
|
75215
75485
|
}
|
|
@@ -90987,6 +91257,32 @@ var containerResponsiveThemeCss = `/*
|
|
|
90987
91257
|
/* Split grid: title column + cards. On desktop the title takes one quarter and
|
|
90988
91258
|
* the cards fill the remaining three quarters (so title + 3 cards each read as
|
|
90989
91259
|
* a quarter). Stacks on mobile. */
|
|
91260
|
+
:where(.theme-scope) :where([data-block="testimonials"]) .rb-testimonials-split-grid-heading,
|
|
91261
|
+
:where(.theme-scope) :where([data-block="testimonials"]) .rb-testimonials-split-grid-cards {
|
|
91262
|
+
min-width: 0;
|
|
91263
|
+
}
|
|
91264
|
+
|
|
91265
|
+
:where(.theme-scope) :where([data-block="testimonials"]) .rb-testimonials-split-grid-cards {
|
|
91266
|
+
container-type: inline-size;
|
|
91267
|
+
container-name: rb-testimonials-split-cards;
|
|
91268
|
+
}
|
|
91269
|
+
|
|
91270
|
+
:where(.theme-scope) :where([data-block="testimonials"]) .rb-testimonials-split-grid-card-list > .rb-grid {
|
|
91271
|
+
grid-template-columns: repeat(1, minmax(0, 1fr));
|
|
91272
|
+
}
|
|
91273
|
+
|
|
91274
|
+
@container rb-testimonials-split-cards (min-width: 36rem) {
|
|
91275
|
+
:where(.theme-scope) :where([data-block="testimonials"]) .rb-testimonials-split-grid-card-list > .rb-grid.rb-sm-grid-cols-2 {
|
|
91276
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
91277
|
+
}
|
|
91278
|
+
}
|
|
91279
|
+
|
|
91280
|
+
@container rb-testimonials-split-cards (min-width: 54rem) {
|
|
91281
|
+
:where(.theme-scope) :where([data-block="testimonials"]) .rb-testimonials-split-grid-card-list > .rb-grid.rb-lg-grid-cols-3 {
|
|
91282
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
91283
|
+
}
|
|
91284
|
+
}
|
|
91285
|
+
|
|
90990
91286
|
@container rb-site (min-width: 1024px) {
|
|
90991
91287
|
@scope ([data-rb-responsive-mode="container"]) to (:scope [data-rb-responsive-mode]) {
|
|
90992
91288
|
:where(.theme-scope) :where([data-block="testimonials"]) .rb-testimonials-split-grid {
|
|
@@ -126457,6 +126753,74 @@ function useVisibleTabPolling({
|
|
|
126457
126753
|
}, [enabled, intervalMs, jitterMs, minVisibleRefreshIntervalMs]);
|
|
126458
126754
|
}
|
|
126459
126755
|
|
|
126756
|
+
// ../blocks/src/system/runtime/hooks/useAvailableDates.state.ts
|
|
126757
|
+
function createEmptyAvailableDatesData() {
|
|
126758
|
+
return {
|
|
126759
|
+
availableDates: /* @__PURE__ */ new Set(),
|
|
126760
|
+
hasMore: false,
|
|
126761
|
+
loadedRange: null,
|
|
126762
|
+
nextStartDate: null
|
|
126763
|
+
};
|
|
126764
|
+
}
|
|
126765
|
+
function createInitialAvailableDatesState() {
|
|
126766
|
+
return {
|
|
126767
|
+
tag: "idle",
|
|
126768
|
+
data: createEmptyAvailableDatesData()
|
|
126769
|
+
};
|
|
126770
|
+
}
|
|
126771
|
+
function getAvailableDates(state) {
|
|
126772
|
+
return state.data.availableDates;
|
|
126773
|
+
}
|
|
126774
|
+
function getAvailableDatesLoadedRange(state) {
|
|
126775
|
+
return state.data.loadedRange;
|
|
126776
|
+
}
|
|
126777
|
+
function getAvailableDatesNextStartDate(state) {
|
|
126778
|
+
return state.data.nextStartDate;
|
|
126779
|
+
}
|
|
126780
|
+
function hasMoreAvailableDates(state) {
|
|
126781
|
+
return state.data.hasMore;
|
|
126782
|
+
}
|
|
126783
|
+
function isLoadingAvailableDates(state) {
|
|
126784
|
+
return state.tag === "loading";
|
|
126785
|
+
}
|
|
126786
|
+
function isRefreshingAvailableDates(state) {
|
|
126787
|
+
return state.tag === "refreshing";
|
|
126788
|
+
}
|
|
126789
|
+
function getAvailableDatesError(state) {
|
|
126790
|
+
return state.tag === "error" ? state.message : null;
|
|
126791
|
+
}
|
|
126792
|
+
function mergeAvailableDates(previous, action) {
|
|
126793
|
+
const availableDates = action.append ? new Set(previous.availableDates) : /* @__PURE__ */ new Set();
|
|
126794
|
+
for (const date of action.dates) {
|
|
126795
|
+
availableDates.add(date);
|
|
126796
|
+
}
|
|
126797
|
+
return {
|
|
126798
|
+
availableDates,
|
|
126799
|
+
hasMore: action.hasMore,
|
|
126800
|
+
loadedRange: {
|
|
126801
|
+
start: action.append && previous.loadedRange ? previous.loadedRange.start : action.startDate,
|
|
126802
|
+
end: action.endDate
|
|
126803
|
+
},
|
|
126804
|
+
nextStartDate: action.nextStartDate
|
|
126805
|
+
};
|
|
126806
|
+
}
|
|
126807
|
+
function availableDatesReducer(state, action) {
|
|
126808
|
+
switch (action.type) {
|
|
126809
|
+
case "query-cleared":
|
|
126810
|
+
return { tag: "idle", data: createEmptyAvailableDatesData() };
|
|
126811
|
+
case "load-started":
|
|
126812
|
+
return { tag: "loading", data: state.data };
|
|
126813
|
+
case "refresh-started":
|
|
126814
|
+
return { tag: "refreshing", data: state.data };
|
|
126815
|
+
case "load-succeeded":
|
|
126816
|
+
return { tag: "loaded", data: mergeAvailableDates(state.data, action) };
|
|
126817
|
+
case "load-failed":
|
|
126818
|
+
return { tag: "error", data: state.data, message: action.message };
|
|
126819
|
+
default:
|
|
126820
|
+
return assertNever11(action);
|
|
126821
|
+
}
|
|
126822
|
+
}
|
|
126823
|
+
|
|
126460
126824
|
// ../blocks/src/system/runtime/hooks/useAvailableDates.ts
|
|
126461
126825
|
var AVAILABILITY_REFRESH_INTERVAL_MS = 3e4;
|
|
126462
126826
|
var AVAILABILITY_REFRESH_JITTER_MS = 5e3;
|
|
@@ -126469,25 +126833,23 @@ function useAvailableDates({
|
|
|
126469
126833
|
initialDays = 30
|
|
126470
126834
|
}) {
|
|
126471
126835
|
const api = useBlockApi();
|
|
126472
|
-
const [
|
|
126473
|
-
|
|
126474
|
-
|
|
126475
|
-
|
|
126476
|
-
const [hasMore, setHasMore] = useState(false);
|
|
126477
|
-
const [loadedRange, setLoadedRange] = useState(null);
|
|
126478
|
-
const nextStartDateRef = useRef(null);
|
|
126836
|
+
const [state, dispatch] = useReducer(
|
|
126837
|
+
availableDatesReducer,
|
|
126838
|
+
createInitialAvailableDatesState()
|
|
126839
|
+
);
|
|
126479
126840
|
const requestIdRef = useRef(0);
|
|
126841
|
+
const loadedRange = getAvailableDatesLoadedRange(state);
|
|
126842
|
+
const isLoading = isLoadingAvailableDates(state);
|
|
126843
|
+
const nextStartDate = getAvailableDatesNextStartDate(state);
|
|
126480
126844
|
const fetchDates = useCallback(
|
|
126481
126845
|
async (startDate, endDate, append2 = false, mode = "load") => {
|
|
126482
126846
|
if (!serviceId) return;
|
|
126483
126847
|
const requestId = ++requestIdRef.current;
|
|
126484
126848
|
if (mode === "refresh") {
|
|
126485
|
-
|
|
126849
|
+
dispatch({ type: "refresh-started" });
|
|
126486
126850
|
} else {
|
|
126487
|
-
|
|
126488
|
-
setIsRefreshing(false);
|
|
126851
|
+
dispatch({ type: "load-started" });
|
|
126489
126852
|
}
|
|
126490
|
-
setError(null);
|
|
126491
126853
|
try {
|
|
126492
126854
|
const data = await api.getAvailableDates({
|
|
126493
126855
|
serviceId,
|
|
@@ -126497,38 +126859,29 @@ function useAvailableDates({
|
|
|
126497
126859
|
resourceId
|
|
126498
126860
|
});
|
|
126499
126861
|
if (requestId !== requestIdRef.current) return;
|
|
126500
|
-
|
|
126501
|
-
|
|
126502
|
-
data.dates
|
|
126503
|
-
|
|
126862
|
+
dispatch({
|
|
126863
|
+
type: "load-succeeded",
|
|
126864
|
+
dates: data.dates,
|
|
126865
|
+
hasMore: data.hasMore,
|
|
126866
|
+
nextStartDate: data.nextStartDate || null,
|
|
126867
|
+
startDate: data.startDate,
|
|
126868
|
+
endDate: data.endDate,
|
|
126869
|
+
append: append2
|
|
126504
126870
|
});
|
|
126505
|
-
setHasMore(data.hasMore);
|
|
126506
|
-
nextStartDateRef.current = data.nextStartDate || null;
|
|
126507
|
-
setLoadedRange((prev) => ({
|
|
126508
|
-
start: append2 && prev ? prev.start : data.startDate,
|
|
126509
|
-
end: data.endDate
|
|
126510
|
-
}));
|
|
126511
126871
|
} catch (err4) {
|
|
126512
126872
|
if (requestId !== requestIdRef.current) return;
|
|
126513
|
-
|
|
126514
|
-
|
|
126515
|
-
|
|
126516
|
-
|
|
126517
|
-
if (mode === "refresh" && requestId === requestIdRef.current) {
|
|
126518
|
-
setIsRefreshing(false);
|
|
126519
|
-
} else if (requestId === requestIdRef.current) {
|
|
126520
|
-
setIsLoading(false);
|
|
126521
|
-
}
|
|
126873
|
+
dispatch({
|
|
126874
|
+
type: "load-failed",
|
|
126875
|
+
message: err4 instanceof Error ? err4.message : "Failed to load available dates"
|
|
126876
|
+
});
|
|
126522
126877
|
}
|
|
126523
126878
|
},
|
|
126524
126879
|
[api, serviceId, resourceId, timezone]
|
|
126525
126880
|
);
|
|
126526
126881
|
useEffect(() => {
|
|
126527
126882
|
if (!serviceId) {
|
|
126528
|
-
|
|
126529
|
-
|
|
126530
|
-
setHasMore(false);
|
|
126531
|
-
setIsRefreshing(false);
|
|
126883
|
+
requestIdRef.current += 1;
|
|
126884
|
+
dispatch({ type: "query-cleared" });
|
|
126532
126885
|
return;
|
|
126533
126886
|
}
|
|
126534
126887
|
const now = /* @__PURE__ */ new Date();
|
|
@@ -126552,8 +126905,8 @@ function useAvailableDates({
|
|
|
126552
126905
|
}
|
|
126553
126906
|
});
|
|
126554
126907
|
const loadMore = useCallback(() => {
|
|
126555
|
-
if (!
|
|
126556
|
-
const start =
|
|
126908
|
+
if (!nextStartDate || isLoading) return;
|
|
126909
|
+
const start = nextStartDate;
|
|
126557
126910
|
const end = formatLocalScheduleDate(
|
|
126558
126911
|
addLocalScheduleDays(
|
|
126559
126912
|
parseBookingLocalDate(start),
|
|
@@ -126561,17 +126914,83 @@ function useAvailableDates({
|
|
|
126561
126914
|
)
|
|
126562
126915
|
);
|
|
126563
126916
|
void fetchDates(start, end, true);
|
|
126564
|
-
}, [fetchDates, isLoading]);
|
|
126917
|
+
}, [fetchDates, isLoading, nextStartDate]);
|
|
126565
126918
|
return {
|
|
126566
|
-
availableDates,
|
|
126919
|
+
availableDates: getAvailableDates(state),
|
|
126567
126920
|
isLoading,
|
|
126568
|
-
isRefreshing,
|
|
126569
|
-
error,
|
|
126570
|
-
hasMore,
|
|
126921
|
+
isRefreshing: isRefreshingAvailableDates(state),
|
|
126922
|
+
error: getAvailableDatesError(state),
|
|
126923
|
+
hasMore: hasMoreAvailableDates(state),
|
|
126571
126924
|
loadMore,
|
|
126572
126925
|
loadedRange
|
|
126573
126926
|
};
|
|
126574
126927
|
}
|
|
126928
|
+
|
|
126929
|
+
// ../blocks/src/system/runtime/hooks/useAvailableSlots.state.ts
|
|
126930
|
+
var initialAvailableSlotsState = { tag: "idle" };
|
|
126931
|
+
function getAvailableSlots(state) {
|
|
126932
|
+
switch (state.tag) {
|
|
126933
|
+
case "idle":
|
|
126934
|
+
case "loading":
|
|
126935
|
+
return [];
|
|
126936
|
+
case "loaded":
|
|
126937
|
+
case "refreshing":
|
|
126938
|
+
case "error":
|
|
126939
|
+
return state.slots;
|
|
126940
|
+
default:
|
|
126941
|
+
return assertNever11(state);
|
|
126942
|
+
}
|
|
126943
|
+
}
|
|
126944
|
+
function hasLoadedAvailableSlots(state) {
|
|
126945
|
+
switch (state.tag) {
|
|
126946
|
+
case "idle":
|
|
126947
|
+
return false;
|
|
126948
|
+
case "loading":
|
|
126949
|
+
case "refreshing":
|
|
126950
|
+
case "error":
|
|
126951
|
+
return state.hasLoaded;
|
|
126952
|
+
case "loaded":
|
|
126953
|
+
return true;
|
|
126954
|
+
default:
|
|
126955
|
+
return assertNever11(state);
|
|
126956
|
+
}
|
|
126957
|
+
}
|
|
126958
|
+
function isLoadingAvailableSlots(state) {
|
|
126959
|
+
return state.tag === "loading";
|
|
126960
|
+
}
|
|
126961
|
+
function isRefreshingAvailableSlots(state) {
|
|
126962
|
+
return state.tag === "refreshing";
|
|
126963
|
+
}
|
|
126964
|
+
function getAvailableSlotsError(state) {
|
|
126965
|
+
return state.tag === "error" ? state.message : null;
|
|
126966
|
+
}
|
|
126967
|
+
function availableSlotsReducer(state, action) {
|
|
126968
|
+
switch (action.type) {
|
|
126969
|
+
case "query-cleared":
|
|
126970
|
+
return { tag: "idle" };
|
|
126971
|
+
case "load-started":
|
|
126972
|
+
return { tag: "loading", hasLoaded: hasLoadedAvailableSlots(state) };
|
|
126973
|
+
case "refresh-started":
|
|
126974
|
+
return {
|
|
126975
|
+
tag: "refreshing",
|
|
126976
|
+
slots: getAvailableSlots(state),
|
|
126977
|
+
hasLoaded: hasLoadedAvailableSlots(state)
|
|
126978
|
+
};
|
|
126979
|
+
case "load-succeeded":
|
|
126980
|
+
return { tag: "loaded", slots: action.slots };
|
|
126981
|
+
case "load-failed":
|
|
126982
|
+
return {
|
|
126983
|
+
tag: "error",
|
|
126984
|
+
slots: getAvailableSlots(state),
|
|
126985
|
+
hasLoaded: hasLoadedAvailableSlots(state),
|
|
126986
|
+
message: action.message
|
|
126987
|
+
};
|
|
126988
|
+
default:
|
|
126989
|
+
return assertNever11(action);
|
|
126990
|
+
}
|
|
126991
|
+
}
|
|
126992
|
+
|
|
126993
|
+
// ../blocks/src/system/runtime/hooks/useAvailableSlots.ts
|
|
126575
126994
|
var AVAILABILITY_REFRESH_INTERVAL_MS2 = 3e4;
|
|
126576
126995
|
var AVAILABILITY_REFRESH_JITTER_MS2 = 5e3;
|
|
126577
126996
|
function useAvailableSlots({
|
|
@@ -126583,31 +127002,23 @@ function useAvailableSlots({
|
|
|
126583
127002
|
timezone
|
|
126584
127003
|
}) {
|
|
126585
127004
|
const api = useBlockApi();
|
|
126586
|
-
const [
|
|
126587
|
-
|
|
126588
|
-
|
|
126589
|
-
|
|
126590
|
-
const [error, setError] = useState(null);
|
|
127005
|
+
const [state, dispatch] = useReducer(
|
|
127006
|
+
availableSlotsReducer,
|
|
127007
|
+
initialAvailableSlotsState
|
|
127008
|
+
);
|
|
126591
127009
|
const requestIdRef = useRef(0);
|
|
126592
127010
|
const fetchSlots = useCallback(
|
|
126593
127011
|
async (mode) => {
|
|
126594
127012
|
const requestId = ++requestIdRef.current;
|
|
126595
127013
|
if (!selectedDate || !serviceId) {
|
|
126596
|
-
|
|
126597
|
-
setIsLoading(false);
|
|
126598
|
-
setIsRefreshing(false);
|
|
126599
|
-
setHasLoaded(false);
|
|
126600
|
-
setError(null);
|
|
127014
|
+
dispatch({ type: "query-cleared" });
|
|
126601
127015
|
return;
|
|
126602
127016
|
}
|
|
126603
127017
|
if (mode === "refresh") {
|
|
126604
|
-
|
|
127018
|
+
dispatch({ type: "refresh-started" });
|
|
126605
127019
|
} else {
|
|
126606
|
-
|
|
126607
|
-
setIsRefreshing(false);
|
|
126608
|
-
setSlots([]);
|
|
127020
|
+
dispatch({ type: "load-started" });
|
|
126609
127021
|
}
|
|
126610
|
-
setError(null);
|
|
126611
127022
|
try {
|
|
126612
127023
|
const result = await api.getAvailableSlots({
|
|
126613
127024
|
serviceId,
|
|
@@ -126617,24 +127028,19 @@ function useAvailableSlots({
|
|
|
126617
127028
|
resourceId
|
|
126618
127029
|
});
|
|
126619
127030
|
if (requestId !== requestIdRef.current) return;
|
|
126620
|
-
|
|
126621
|
-
|
|
127031
|
+
dispatch({
|
|
127032
|
+
type: "load-succeeded",
|
|
127033
|
+
slots: result.slots.map((slot) => ({
|
|
126622
127034
|
...slot,
|
|
126623
127035
|
resourceId: unsafeAsAppointmentResourceId(slot.resourceId)
|
|
126624
127036
|
}))
|
|
126625
|
-
);
|
|
126626
|
-
setHasLoaded(true);
|
|
127037
|
+
});
|
|
126627
127038
|
} catch (err4) {
|
|
126628
127039
|
if (requestId !== requestIdRef.current) return;
|
|
126629
|
-
|
|
126630
|
-
|
|
126631
|
-
|
|
126632
|
-
|
|
126633
|
-
if (mode === "refresh" && requestId === requestIdRef.current) {
|
|
126634
|
-
setIsRefreshing(false);
|
|
126635
|
-
} else if (requestId === requestIdRef.current) {
|
|
126636
|
-
setIsLoading(false);
|
|
126637
|
-
}
|
|
127040
|
+
dispatch({
|
|
127041
|
+
type: "load-failed",
|
|
127042
|
+
message: err4 instanceof Error ? err4.message : "Failed to load available times"
|
|
127043
|
+
});
|
|
126638
127044
|
}
|
|
126639
127045
|
},
|
|
126640
127046
|
[selectedDate, serviceId, resourceId, timezone, api]
|
|
@@ -126651,7 +127057,13 @@ function useAvailableSlots({
|
|
|
126651
127057
|
jitterMs: AVAILABILITY_REFRESH_JITTER_MS2,
|
|
126652
127058
|
onPoll: () => fetchSlots("refresh")
|
|
126653
127059
|
});
|
|
126654
|
-
return {
|
|
127060
|
+
return {
|
|
127061
|
+
slots: getAvailableSlots(state),
|
|
127062
|
+
isLoading: isLoadingAvailableSlots(state),
|
|
127063
|
+
isRefreshing: isRefreshingAvailableSlots(state),
|
|
127064
|
+
hasLoaded: hasLoadedAvailableSlots(state),
|
|
127065
|
+
error: getAvailableSlotsError(state)
|
|
127066
|
+
};
|
|
126655
127067
|
}
|
|
126656
127068
|
|
|
126657
127069
|
// ../blocks/src/system/runtime/hooks/useBookingSubmission.state.ts
|
|
@@ -129679,7 +130091,7 @@ function getStepNumber2(step, wizardSteps) {
|
|
|
129679
130091
|
const index2 = wizardSteps.indexOf(step);
|
|
129680
130092
|
return index2 >= 0 ? index2 + 1 : 1;
|
|
129681
130093
|
}
|
|
129682
|
-
function
|
|
130094
|
+
function CheckIcon2({ className, strokeWidth = 2 }) {
|
|
129683
130095
|
return /* @__PURE__ */ jsx(
|
|
129684
130096
|
"svg",
|
|
129685
130097
|
{
|
|
@@ -129697,7 +130109,7 @@ function CheckIcon({ className, strokeWidth = 2 }) {
|
|
|
129697
130109
|
}
|
|
129698
130110
|
);
|
|
129699
130111
|
}
|
|
129700
|
-
function
|
|
130112
|
+
function ClockIcon2({ className, strokeWidth = 2 }) {
|
|
129701
130113
|
return /* @__PURE__ */ jsx(
|
|
129702
130114
|
"svg",
|
|
129703
130115
|
{
|
|
@@ -130025,7 +130437,7 @@ function StepIndicator({
|
|
|
130025
130437
|
"div",
|
|
130026
130438
|
{
|
|
130027
130439
|
className: `${classPrefix}-step-circle${isActive2 ? ` ${classPrefix}-step-circle--active` : ""}${isComplete ? ` ${classPrefix}-step-circle--completed` : ""}`,
|
|
130028
|
-
children: isComplete ? /* @__PURE__ */ jsx(
|
|
130440
|
+
children: isComplete ? /* @__PURE__ */ jsx(CheckIcon2, { className: `${classPrefix}-step-check`, strokeWidth: 3 }) : stepNum
|
|
130029
130441
|
}
|
|
130030
130442
|
),
|
|
130031
130443
|
stepLabels?.[i2] && /* @__PURE__ */ jsx(
|
|
@@ -131525,7 +131937,7 @@ function SelectableOptionCard(props2) {
|
|
|
131525
131937
|
);
|
|
131526
131938
|
}
|
|
131527
131939
|
function PaymentCheckIcon() {
|
|
131528
|
-
return /* @__PURE__ */ jsx("div", { className: "er-check", children: /* @__PURE__ */ jsx(
|
|
131940
|
+
return /* @__PURE__ */ jsx("div", { className: "er-check", children: /* @__PURE__ */ jsx(CheckIcon2, {}) });
|
|
131529
131941
|
}
|
|
131530
131942
|
function PaymentTile({ icon: icon2, label, detail, selected, disabled, tooltip, upsell, onClick }) {
|
|
131531
131943
|
return /* @__PURE__ */ jsx(
|
|
@@ -131836,7 +132248,7 @@ var VerifyingTimeoutStep = ({
|
|
|
131836
132248
|
tone: "warning",
|
|
131837
132249
|
className: "er-center",
|
|
131838
132250
|
titleClassName: "er-title--lg er-message",
|
|
131839
|
-
icon: /* @__PURE__ */ jsx(StateIcon, { variant: "warning", children: /* @__PURE__ */ jsx(
|
|
132251
|
+
icon: /* @__PURE__ */ jsx(StateIcon, { variant: "warning", children: /* @__PURE__ */ jsx(ClockIcon2, {}) }),
|
|
131840
132252
|
title: "Your registration is saved",
|
|
131841
132253
|
body: /* @__PURE__ */ jsx("p", { className: "er-text--muted er-message", children: "We're still confirming your payment. This usually resolves within a few minutes. You'll receive a confirmation email once everything is verified." }),
|
|
131842
132254
|
actionsClassName: "er-button-group",
|
|
@@ -132168,6 +132580,54 @@ function validateFormData2(formData) {
|
|
|
132168
132580
|
}
|
|
132169
132581
|
return errors;
|
|
132170
132582
|
}
|
|
132583
|
+
|
|
132584
|
+
// ../blocks/src/system/runtime/shared/useWaitlistClaim.state.ts
|
|
132585
|
+
var DEFAULT_WAITLIST_CLAIM_ERROR = "Failed to resolve waitlist claim";
|
|
132586
|
+
function createInitialWaitlistClaimState(hasToken) {
|
|
132587
|
+
return hasToken ? { kind: "resolving" } : { kind: "idle" };
|
|
132588
|
+
}
|
|
132589
|
+
function waitlistClaimReducer(_state, action) {
|
|
132590
|
+
switch (action.type) {
|
|
132591
|
+
case "cleared":
|
|
132592
|
+
return { kind: "idle" };
|
|
132593
|
+
case "started":
|
|
132594
|
+
return { kind: "resolving" };
|
|
132595
|
+
case "resolved":
|
|
132596
|
+
return { kind: "resolved", claim: action.claim };
|
|
132597
|
+
case "failed":
|
|
132598
|
+
return action.failure;
|
|
132599
|
+
}
|
|
132600
|
+
}
|
|
132601
|
+
function toWaitlistClaimResolveFailure(error) {
|
|
132602
|
+
const message2 = error instanceof Error ? error.message : DEFAULT_WAITLIST_CLAIM_ERROR;
|
|
132603
|
+
if (isUnauthorizedBlockApiError(error)) {
|
|
132604
|
+
return { kind: "portal-login-required", message: message2 };
|
|
132605
|
+
}
|
|
132606
|
+
return { kind: "error", message: message2 };
|
|
132607
|
+
}
|
|
132608
|
+
function isUnauthorizedBlockApiError(error) {
|
|
132609
|
+
return error instanceof Error && error.name === "BlockApiError" && hasStatus(error) && error.status === 401;
|
|
132610
|
+
}
|
|
132611
|
+
function hasStatus(value) {
|
|
132612
|
+
return typeof value === "object" && value !== null && "status" in value;
|
|
132613
|
+
}
|
|
132614
|
+
function getWaitlistClaim(state) {
|
|
132615
|
+
return state.kind === "resolved" ? state.claim : null;
|
|
132616
|
+
}
|
|
132617
|
+
function getWaitlistClaimError(state) {
|
|
132618
|
+
return state.kind === "error" ? state.message : null;
|
|
132619
|
+
}
|
|
132620
|
+
function getWaitlistClaimLoginMessage(state) {
|
|
132621
|
+
return state.kind === "portal-login-required" ? state.message : null;
|
|
132622
|
+
}
|
|
132623
|
+
function requiresWaitlistClaimPortalLogin(state) {
|
|
132624
|
+
return state.kind === "portal-login-required";
|
|
132625
|
+
}
|
|
132626
|
+
function isWaitlistClaimLoading(state) {
|
|
132627
|
+
return state.kind === "resolving";
|
|
132628
|
+
}
|
|
132629
|
+
|
|
132630
|
+
// ../blocks/src/system/runtime/shared/useWaitlistClaim.ts
|
|
132171
132631
|
var WAITLIST_CLAIM_LOCATION_EVENT = "riverbank:waitlist-claim-location-change";
|
|
132172
132632
|
var historyPatched = false;
|
|
132173
132633
|
function emitWaitlistClaimLocationChange() {
|
|
@@ -132225,46 +132685,29 @@ function useWaitlistClaim() {
|
|
|
132225
132685
|
getWaitlistClaimTokenSnapshot,
|
|
132226
132686
|
() => null
|
|
132227
132687
|
);
|
|
132228
|
-
const [
|
|
132229
|
-
|
|
132230
|
-
|
|
132231
|
-
|
|
132232
|
-
|
|
132688
|
+
const [state, dispatch] = useReducer(
|
|
132689
|
+
waitlistClaimReducer,
|
|
132690
|
+
Boolean(token),
|
|
132691
|
+
createInitialWaitlistClaimState
|
|
132692
|
+
);
|
|
132233
132693
|
useEffect(() => {
|
|
132234
132694
|
let cancelled = false;
|
|
132235
132695
|
async function resolveClaim() {
|
|
132236
132696
|
if (!token) {
|
|
132237
|
-
|
|
132238
|
-
setError(null);
|
|
132239
|
-
setLoginMessage(null);
|
|
132240
|
-
setRequiresPortalLogin(false);
|
|
132241
|
-
setIsLoading(false);
|
|
132697
|
+
dispatch({ type: "cleared" });
|
|
132242
132698
|
return;
|
|
132243
132699
|
}
|
|
132244
|
-
|
|
132245
|
-
setClaim(null);
|
|
132246
|
-
setError(null);
|
|
132247
|
-
setLoginMessage(null);
|
|
132248
|
-
setRequiresPortalLogin(false);
|
|
132700
|
+
dispatch({ type: "started" });
|
|
132249
132701
|
try {
|
|
132250
132702
|
const result = await api.resolveWaitlistClaim({ claimToken: token });
|
|
132251
132703
|
if (cancelled) return;
|
|
132252
|
-
|
|
132704
|
+
dispatch({ type: "resolved", claim: result });
|
|
132253
132705
|
} catch (claimError) {
|
|
132254
132706
|
if (cancelled) return;
|
|
132255
|
-
|
|
132256
|
-
|
|
132257
|
-
|
|
132258
|
-
|
|
132259
|
-
setLoginMessage(message2);
|
|
132260
|
-
setError(null);
|
|
132261
|
-
} else {
|
|
132262
|
-
setError(message2);
|
|
132263
|
-
}
|
|
132264
|
-
} finally {
|
|
132265
|
-
if (!cancelled) {
|
|
132266
|
-
setIsLoading(false);
|
|
132267
|
-
}
|
|
132707
|
+
dispatch({
|
|
132708
|
+
type: "failed",
|
|
132709
|
+
failure: toWaitlistClaimResolveFailure(claimError)
|
|
132710
|
+
});
|
|
132268
132711
|
}
|
|
132269
132712
|
}
|
|
132270
132713
|
void resolveClaim();
|
|
@@ -132274,11 +132717,11 @@ function useWaitlistClaim() {
|
|
|
132274
132717
|
}, [api, token]);
|
|
132275
132718
|
return {
|
|
132276
132719
|
token,
|
|
132277
|
-
claim,
|
|
132278
|
-
error,
|
|
132279
|
-
loginMessage,
|
|
132280
|
-
requiresPortalLogin,
|
|
132281
|
-
isLoading
|
|
132720
|
+
claim: getWaitlistClaim(state),
|
|
132721
|
+
error: getWaitlistClaimError(state),
|
|
132722
|
+
loginMessage: getWaitlistClaimLoginMessage(state),
|
|
132723
|
+
requiresPortalLogin: requiresWaitlistClaimPortalLogin(state),
|
|
132724
|
+
isLoading: isWaitlistClaimLoading(state)
|
|
132282
132725
|
};
|
|
132283
132726
|
}
|
|
132284
132727
|
function usePaymentVerification(config) {
|
|
@@ -133042,6 +133485,43 @@ function useEventRegistrationWizard(options) {
|
|
|
133042
133485
|
handleRetry
|
|
133043
133486
|
};
|
|
133044
133487
|
}
|
|
133488
|
+
|
|
133489
|
+
// ../blocks/src/system/runtime/nodes/shared/MagicLinkForm.state.ts
|
|
133490
|
+
var initialMagicLinkSubmissionState = Object.freeze({
|
|
133491
|
+
tag: "idle"
|
|
133492
|
+
});
|
|
133493
|
+
function magicLinkSubmissionReducer(state, action) {
|
|
133494
|
+
switch (action.type) {
|
|
133495
|
+
case "submit-started":
|
|
133496
|
+
if (state.tag === "submitting") {
|
|
133497
|
+
return state;
|
|
133498
|
+
}
|
|
133499
|
+
return { tag: "submitting" };
|
|
133500
|
+
case "submit-succeeded":
|
|
133501
|
+
if (state.tag !== "submitting") {
|
|
133502
|
+
return state;
|
|
133503
|
+
}
|
|
133504
|
+
return { tag: "success" };
|
|
133505
|
+
case "submit-failed":
|
|
133506
|
+
if (state.tag !== "submitting") {
|
|
133507
|
+
return state;
|
|
133508
|
+
}
|
|
133509
|
+
return {
|
|
133510
|
+
tag: "error",
|
|
133511
|
+
message: action.message
|
|
133512
|
+
};
|
|
133513
|
+
case "reset":
|
|
133514
|
+
return initialMagicLinkSubmissionState;
|
|
133515
|
+
default:
|
|
133516
|
+
return assertNever11(action);
|
|
133517
|
+
}
|
|
133518
|
+
}
|
|
133519
|
+
function isMagicLinkSubmitting(state) {
|
|
133520
|
+
return state.tag === "submitting";
|
|
133521
|
+
}
|
|
133522
|
+
function getMagicLinkError(state) {
|
|
133523
|
+
return state.tag === "error" ? state.message : null;
|
|
133524
|
+
}
|
|
133045
133525
|
function MagicLinkForm({
|
|
133046
133526
|
initialEmail = "",
|
|
133047
133527
|
title,
|
|
@@ -133054,36 +133534,38 @@ function MagicLinkForm({
|
|
|
133054
133534
|
}) {
|
|
133055
133535
|
const api = useBlockApi();
|
|
133056
133536
|
const [email, setEmail] = useState(initialEmail);
|
|
133057
|
-
const [
|
|
133058
|
-
|
|
133059
|
-
|
|
133537
|
+
const [submissionState, dispatchSubmission] = useReducer(
|
|
133538
|
+
magicLinkSubmissionReducer,
|
|
133539
|
+
initialMagicLinkSubmissionState
|
|
133540
|
+
);
|
|
133541
|
+
const loading = isMagicLinkSubmitting(submissionState);
|
|
133542
|
+
const error = getMagicLinkError(submissionState);
|
|
133060
133543
|
const handleSubmit = async (e3) => {
|
|
133061
133544
|
e3.preventDefault();
|
|
133062
133545
|
const normalizedEmail = email.trim().toLowerCase();
|
|
133063
133546
|
if (!normalizedEmail || loading) return;
|
|
133064
|
-
|
|
133065
|
-
setError(null);
|
|
133547
|
+
dispatchSubmission({ type: "submit-started" });
|
|
133066
133548
|
try {
|
|
133067
133549
|
const redirectTo = `${window.location.pathname}${window.location.search}${window.location.hash}`;
|
|
133068
133550
|
await api.sendMagicLink({
|
|
133069
133551
|
email: normalizedEmail,
|
|
133070
133552
|
redirectUrl: `${window.location.origin}/api/portal/callback?redirect_to=${encodeURIComponent(redirectTo)}`
|
|
133071
133553
|
});
|
|
133072
|
-
|
|
133554
|
+
dispatchSubmission({ type: "submit-succeeded" });
|
|
133073
133555
|
onSuccess?.();
|
|
133074
133556
|
} catch (err4) {
|
|
133075
133557
|
console.error("Magic link error:", err4);
|
|
133076
|
-
|
|
133077
|
-
|
|
133078
|
-
|
|
133558
|
+
dispatchSubmission({
|
|
133559
|
+
type: "submit-failed",
|
|
133560
|
+
message: getMagicLinkErrorMessage(err4)
|
|
133561
|
+
});
|
|
133079
133562
|
}
|
|
133080
133563
|
};
|
|
133081
133564
|
const handleReset = () => {
|
|
133082
|
-
setSuccess(false);
|
|
133083
133565
|
setEmail("");
|
|
133084
|
-
|
|
133566
|
+
dispatchSubmission({ type: "reset" });
|
|
133085
133567
|
};
|
|
133086
|
-
if (success) {
|
|
133568
|
+
if (submissionState.tag === "success") {
|
|
133087
133569
|
return /* @__PURE__ */ jsxs("div", { className: `${classPrefix}-magic-link-success`, children: [
|
|
133088
133570
|
/* @__PURE__ */ jsx("p", { className: `${classPrefix}-portal-auth-text ${classPrefix}-portal-auth-text--success`, children: successMessage }),
|
|
133089
133571
|
!compact2 && /* @__PURE__ */ jsx(
|
|
@@ -133125,6 +133607,9 @@ function MagicLinkForm({
|
|
|
133125
133607
|
)
|
|
133126
133608
|
] });
|
|
133127
133609
|
}
|
|
133610
|
+
function getMagicLinkErrorMessage(error) {
|
|
133611
|
+
return error instanceof Error ? error.message : "Failed to send. Please try again.";
|
|
133612
|
+
}
|
|
133128
133613
|
var EVENT_PORTAL_AUTH_COPY = {
|
|
133129
133614
|
membership: {
|
|
133130
133615
|
title: "Have a pass or membership?",
|
|
@@ -133588,7 +134073,7 @@ function BookingModeStep({
|
|
|
133588
134073
|
},
|
|
133589
134074
|
"aria-pressed": bookingMode === "membership",
|
|
133590
134075
|
children: [
|
|
133591
|
-
/* @__PURE__ */ jsx("div", { className: "cr-payment-tile__check", children: /* @__PURE__ */ jsx(
|
|
134076
|
+
/* @__PURE__ */ jsx("div", { className: "cr-payment-tile__check", children: /* @__PURE__ */ jsx(CheckIcon2, { strokeWidth: 3 }) }),
|
|
133592
134077
|
/* @__PURE__ */ jsxs("div", { className: "cr-payment-tile__header", children: [
|
|
133593
134078
|
/* @__PURE__ */ jsx("h3", { className: "cr-payment-tile__name", children: singleMembership.membershipName }),
|
|
133594
134079
|
/* @__PURE__ */ jsx("span", { className: "cr-payment-tile__price", children: "Free" })
|
|
@@ -133608,7 +134093,7 @@ function BookingModeStep({
|
|
|
133608
134093
|
},
|
|
133609
134094
|
"aria-pressed": bookingMode === "membership" && selectedMembershipId === membership.customerMembershipId,
|
|
133610
134095
|
children: [
|
|
133611
|
-
/* @__PURE__ */ jsx("div", { className: "cr-payment-tile__check", children: /* @__PURE__ */ jsx(
|
|
134096
|
+
/* @__PURE__ */ jsx("div", { className: "cr-payment-tile__check", children: /* @__PURE__ */ jsx(CheckIcon2, { strokeWidth: 3 }) }),
|
|
133612
134097
|
/* @__PURE__ */ jsxs("div", { className: "cr-payment-tile__header", children: [
|
|
133613
134098
|
/* @__PURE__ */ jsx("h3", { className: "cr-payment-tile__name", children: membership.membershipName }),
|
|
133614
134099
|
/* @__PURE__ */ jsx("span", { className: "cr-payment-tile__price", children: "Free" })
|
|
@@ -133629,7 +134114,7 @@ function BookingModeStep({
|
|
|
133629
134114
|
},
|
|
133630
134115
|
"aria-pressed": bookingMode === "card",
|
|
133631
134116
|
children: [
|
|
133632
|
-
/* @__PURE__ */ jsx("div", { className: "cr-payment-tile__check", children: /* @__PURE__ */ jsx(
|
|
134117
|
+
/* @__PURE__ */ jsx("div", { className: "cr-payment-tile__check", children: /* @__PURE__ */ jsx(CheckIcon2, { strokeWidth: 3 }) }),
|
|
133633
134118
|
/* @__PURE__ */ jsxs("div", { className: "cr-payment-tile__header", children: [
|
|
133634
134119
|
/* @__PURE__ */ jsx("h3", { className: "cr-payment-tile__name", children: "Pay by Card" }),
|
|
133635
134120
|
priceCents !== null && /* @__PURE__ */ jsx("span", { className: "cr-payment-tile__price", children: formatPrice(priceCents, currency) })
|
|
@@ -133750,7 +134235,7 @@ function SuccessStep2({
|
|
|
133750
134235
|
tone: "success",
|
|
133751
134236
|
className: "cr-success",
|
|
133752
134237
|
titleClassName: "cr-success__title",
|
|
133753
|
-
icon: /* @__PURE__ */ jsx(StateIcon, { variant: "success", children: /* @__PURE__ */ jsx(
|
|
134238
|
+
icon: /* @__PURE__ */ jsx(StateIcon, { variant: "success", children: /* @__PURE__ */ jsx(CheckIcon2, { strokeWidth: 2 }) }),
|
|
133754
134239
|
title: "Enrollment Complete!",
|
|
133755
134240
|
body: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
133756
134241
|
/* @__PURE__ */ jsx("p", { className: "cr-success__message", children: usedMembership ? membershipMessage : successMessage }),
|
|
@@ -133793,7 +134278,7 @@ function VerifyingTimeoutStep2({
|
|
|
133793
134278
|
tone: "warning",
|
|
133794
134279
|
className: "cr-error",
|
|
133795
134280
|
titleClassName: "cr-error__title",
|
|
133796
|
-
icon: /* @__PURE__ */ jsx(StateIcon, { variant: "warning", children: /* @__PURE__ */ jsx(
|
|
134281
|
+
icon: /* @__PURE__ */ jsx(StateIcon, { variant: "warning", children: /* @__PURE__ */ jsx(ClockIcon2, {}) }),
|
|
133797
134282
|
title: "Payment Verification Taking Longer",
|
|
133798
134283
|
body: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
133799
134284
|
/* @__PURE__ */ jsx("p", { className: "cr-error__message", children: "Your payment may still be processing. Please check your email for confirmation." }),
|
|
@@ -133836,7 +134321,7 @@ function WaitlistStep({ message: message2, position }) {
|
|
|
133836
134321
|
tone: "info",
|
|
133837
134322
|
className: "cr-waitlist",
|
|
133838
134323
|
titleClassName: "cr-waitlist__title",
|
|
133839
|
-
icon: /* @__PURE__ */ jsx(StateIcon, { variant: "waitlist", children: /* @__PURE__ */ jsx(
|
|
134324
|
+
icon: /* @__PURE__ */ jsx(StateIcon, { variant: "waitlist", children: /* @__PURE__ */ jsx(ClockIcon2, {}) }),
|
|
133840
134325
|
title: "Added to Waitlist",
|
|
133841
134326
|
body: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
133842
134327
|
/* @__PURE__ */ jsx("p", { className: "cr-waitlist__message", children: message2 }),
|
|
@@ -136170,7 +136655,7 @@ function PassesMembershipsController({ render }) {
|
|
|
136170
136655
|
className: "shop__return",
|
|
136171
136656
|
titleClassName: "shop__return-title",
|
|
136172
136657
|
bodyClassName: "shop__return-text",
|
|
136173
|
-
icon: /* @__PURE__ */ jsx(StateIcon, { variant: state.returnNotice.kind === "success" ? "success" : "warning", children: state.returnNotice.kind === "success" ? /* @__PURE__ */ jsx(
|
|
136658
|
+
icon: /* @__PURE__ */ jsx(StateIcon, { variant: state.returnNotice.kind === "success" ? "success" : "warning", children: state.returnNotice.kind === "success" ? /* @__PURE__ */ jsx(CheckIcon2, {}) : /* @__PURE__ */ jsx(CrossIcon, {}) }),
|
|
136174
136659
|
title: state.returnNotice.kind === "success" ? "Payment successful" : "Payment cancelled",
|
|
136175
136660
|
body: state.returnNotice.kind === "success" ? "Check your email for confirmation." : "You can try again whenever you\u2019re ready.",
|
|
136176
136661
|
actions: /* @__PURE__ */ jsx(
|
|
@@ -138949,9 +139434,74 @@ var EventPaginatedListView = ({
|
|
|
138949
139434
|
}
|
|
138950
139435
|
);
|
|
138951
139436
|
};
|
|
139437
|
+
|
|
139438
|
+
// ../blocks/src/system/runtime/hooks/loadStateError.ts
|
|
139439
|
+
function toError(error, fallbackMessage) {
|
|
139440
|
+
return error instanceof Error ? error : new Error(fallbackMessage);
|
|
139441
|
+
}
|
|
139442
|
+
|
|
139443
|
+
// ../blocks/src/system/runtime/hooks/useEventPagination.state.ts
|
|
139444
|
+
function createInitialEventPaginationLoadState(events2, pageSize) {
|
|
139445
|
+
return {
|
|
139446
|
+
kind: "ready",
|
|
139447
|
+
events: events2,
|
|
139448
|
+
hasMore: hasMoreEventPages(events2, pageSize)
|
|
139449
|
+
};
|
|
139450
|
+
}
|
|
139451
|
+
function eventPaginationLoadReducer(state, action) {
|
|
139452
|
+
switch (action.type) {
|
|
139453
|
+
case "started":
|
|
139454
|
+
return {
|
|
139455
|
+
kind: "loading",
|
|
139456
|
+
events: state.events,
|
|
139457
|
+
hasMore: action.reset ? true : state.hasMore
|
|
139458
|
+
};
|
|
139459
|
+
case "succeeded":
|
|
139460
|
+
return {
|
|
139461
|
+
kind: "ready",
|
|
139462
|
+
events: action.events,
|
|
139463
|
+
hasMore: action.hasMore
|
|
139464
|
+
};
|
|
139465
|
+
case "failed":
|
|
139466
|
+
return {
|
|
139467
|
+
kind: "error",
|
|
139468
|
+
events: state.events,
|
|
139469
|
+
hasMore: state.hasMore,
|
|
139470
|
+
error: action.error
|
|
139471
|
+
};
|
|
139472
|
+
case "synced":
|
|
139473
|
+
return createInitialEventPaginationLoadState(action.events, action.pageSize);
|
|
139474
|
+
default:
|
|
139475
|
+
return assertNever11(action);
|
|
139476
|
+
}
|
|
139477
|
+
}
|
|
138952
139478
|
function getEventIdentity(event) {
|
|
138953
139479
|
return event.occurrenceId || event.id;
|
|
138954
139480
|
}
|
|
139481
|
+
function mergeEventPaginationEvents(existingEvents, newEvents) {
|
|
139482
|
+
const existingIds = new Set(existingEvents.map(getEventIdentity));
|
|
139483
|
+
const uniqueNew = newEvents.filter(
|
|
139484
|
+
(event) => !existingIds.has(getEventIdentity(event))
|
|
139485
|
+
);
|
|
139486
|
+
return [...existingEvents, ...uniqueNew];
|
|
139487
|
+
}
|
|
139488
|
+
function toEventPaginationLoadError(error) {
|
|
139489
|
+
return toError(error, "Unknown error");
|
|
139490
|
+
}
|
|
139491
|
+
function getEventPaginationEvents(state) {
|
|
139492
|
+
return state.events;
|
|
139493
|
+
}
|
|
139494
|
+
function isEventPaginationLoading(state) {
|
|
139495
|
+
return state.kind === "loading";
|
|
139496
|
+
}
|
|
139497
|
+
function getEventPaginationError(state) {
|
|
139498
|
+
return state.kind === "error" ? state.error : null;
|
|
139499
|
+
}
|
|
139500
|
+
function hasMoreEventPages(events2, pageSize) {
|
|
139501
|
+
return events2.length >= pageSize;
|
|
139502
|
+
}
|
|
139503
|
+
|
|
139504
|
+
// ../blocks/src/system/runtime/hooks/useEventPagination.ts
|
|
138955
139505
|
function getEventsKey(events2) {
|
|
138956
139506
|
return events2.map((e3) => `${getEventIdentity(e3)}:${e3.startsAt}`).join("|");
|
|
138957
139507
|
}
|
|
@@ -138974,10 +139524,15 @@ function useEventPagination({
|
|
|
138974
139524
|
useEffect(() => {
|
|
138975
139525
|
initialEventsRef.current = initialEvents;
|
|
138976
139526
|
}, [initialEventsKey]);
|
|
138977
|
-
const [
|
|
138978
|
-
|
|
138979
|
-
|
|
138980
|
-
|
|
139527
|
+
const [loadState, dispatchLoadState] = useReducer(
|
|
139528
|
+
eventPaginationLoadReducer,
|
|
139529
|
+
{ events: initialEvents, pageSize },
|
|
139530
|
+
({ events: events3, pageSize: initialPageSize }) => createInitialEventPaginationLoadState(events3, initialPageSize)
|
|
139531
|
+
);
|
|
139532
|
+
const events2 = getEventPaginationEvents(loadState);
|
|
139533
|
+
const loading = isEventPaginationLoading(loadState);
|
|
139534
|
+
const error = getEventPaginationError(loadState);
|
|
139535
|
+
const hasMore = loadState.hasMore;
|
|
138981
139536
|
const normalizedCategoryIds = normalizeCsvString(filters?.categoryIds);
|
|
138982
139537
|
const normalizedStaffMemberId = normalizeOptionalId(filters?.staffMemberId);
|
|
138983
139538
|
const normalizedVenueId = normalizeOptionalId(filters?.venueId);
|
|
@@ -139002,9 +139557,11 @@ function useEventPagination({
|
|
|
139002
139557
|
if (loadingRef.current) return;
|
|
139003
139558
|
if (!hasMoreRef.current && !options.reset) return;
|
|
139004
139559
|
const currentRequestId = ++requestIdRef.current;
|
|
139005
|
-
|
|
139560
|
+
dispatchLoadState({ type: "started", reset: options.reset });
|
|
139006
139561
|
loadingRef.current = true;
|
|
139007
|
-
|
|
139562
|
+
if (options.reset) {
|
|
139563
|
+
hasMoreRef.current = true;
|
|
139564
|
+
}
|
|
139008
139565
|
try {
|
|
139009
139566
|
const currentEvents = eventsRef.current;
|
|
139010
139567
|
const lastEvent = options.reset ? void 0 : currentEvents[currentEvents.length - 1];
|
|
@@ -139025,29 +139582,25 @@ function useEventPagination({
|
|
|
139025
139582
|
venueId: normalizedVenueId ?? void 0
|
|
139026
139583
|
});
|
|
139027
139584
|
if (currentRequestId === requestIdRef.current) {
|
|
139028
|
-
|
|
139029
|
-
|
|
139030
|
-
|
|
139031
|
-
|
|
139032
|
-
|
|
139033
|
-
|
|
139034
|
-
|
|
139035
|
-
|
|
139036
|
-
eventsRef.current = updated;
|
|
139037
|
-
return updated;
|
|
139038
|
-
});
|
|
139039
|
-
}
|
|
139040
|
-
const nextHasMore = newEvents.length >= pageSize;
|
|
139041
|
-
setHasMore(nextHasMore);
|
|
139585
|
+
const nextEvents = options.reset ? newEvents : mergeEventPaginationEvents(eventsRef.current, newEvents);
|
|
139586
|
+
const nextHasMore = hasMoreEventPages(newEvents, pageSize);
|
|
139587
|
+
dispatchLoadState({
|
|
139588
|
+
type: "succeeded",
|
|
139589
|
+
events: nextEvents,
|
|
139590
|
+
hasMore: nextHasMore
|
|
139591
|
+
});
|
|
139592
|
+
eventsRef.current = [...nextEvents];
|
|
139042
139593
|
hasMoreRef.current = nextHasMore;
|
|
139043
139594
|
}
|
|
139044
139595
|
} catch (err4) {
|
|
139045
139596
|
if (currentRequestId === requestIdRef.current) {
|
|
139046
|
-
|
|
139597
|
+
dispatchLoadState({
|
|
139598
|
+
type: "failed",
|
|
139599
|
+
error: toEventPaginationLoadError(err4)
|
|
139600
|
+
});
|
|
139047
139601
|
}
|
|
139048
139602
|
} finally {
|
|
139049
139603
|
if (currentRequestId === requestIdRef.current) {
|
|
139050
|
-
setLoading(false);
|
|
139051
139604
|
loadingRef.current = false;
|
|
139052
139605
|
}
|
|
139053
139606
|
}
|
|
@@ -139089,19 +139642,20 @@ function useEventPagination({
|
|
|
139089
139642
|
try {
|
|
139090
139643
|
if (filtersMatchInitial) {
|
|
139091
139644
|
if (!prevFiltersMatchInitial || prevInitialEventsKey !== initialEventsKey) {
|
|
139092
|
-
|
|
139645
|
+
dispatchLoadState({
|
|
139646
|
+
type: "synced",
|
|
139647
|
+
events: latestInitialEvents,
|
|
139648
|
+
pageSize
|
|
139649
|
+
});
|
|
139093
139650
|
eventsRef.current = latestInitialEvents;
|
|
139094
139651
|
}
|
|
139095
|
-
const nextHasMore = latestInitialEvents
|
|
139652
|
+
const nextHasMore = hasMoreEventPages(latestInitialEvents, pageSize);
|
|
139096
139653
|
if (hasMoreRef.current !== nextHasMore) {
|
|
139097
|
-
setHasMore(nextHasMore);
|
|
139098
139654
|
hasMoreRef.current = nextHasMore;
|
|
139099
139655
|
}
|
|
139100
|
-
if (error !== null) setError(null);
|
|
139101
139656
|
return;
|
|
139102
139657
|
}
|
|
139103
139658
|
if (prevFiltersMatchInitial || prevFiltersKey !== filtersKey) {
|
|
139104
|
-
setHasMore(true);
|
|
139105
139659
|
hasMoreRef.current = true;
|
|
139106
139660
|
void fetchPage({ reset: true });
|
|
139107
139661
|
}
|
|
@@ -139110,7 +139664,7 @@ function useEventPagination({
|
|
|
139110
139664
|
prevInitialEventsKeyRef.current = initialEventsKey;
|
|
139111
139665
|
prevFiltersKeyRef.current = filtersKey;
|
|
139112
139666
|
}
|
|
139113
|
-
}, [
|
|
139667
|
+
}, [fetchPage, filtersKey, filtersMatchInitial, initialEventsKey, pageSize]);
|
|
139114
139668
|
return {
|
|
139115
139669
|
events: events2,
|
|
139116
139670
|
loading,
|
|
@@ -139119,6 +139673,43 @@ function useEventPagination({
|
|
|
139119
139673
|
loadMore
|
|
139120
139674
|
};
|
|
139121
139675
|
}
|
|
139676
|
+
|
|
139677
|
+
// ../blocks/src/system/runtime/hooks/useEventFilters.state.ts
|
|
139678
|
+
var EMPTY_EVENT_FILTERS = Object.freeze({
|
|
139679
|
+
categories: [],
|
|
139680
|
+
venues: [],
|
|
139681
|
+
staffMembers: [],
|
|
139682
|
+
labels: Object.freeze({ courseOption: "Course" })
|
|
139683
|
+
});
|
|
139684
|
+
function createInitialEventFiltersLoadState() {
|
|
139685
|
+
return { kind: "idle", filters: EMPTY_EVENT_FILTERS };
|
|
139686
|
+
}
|
|
139687
|
+
function eventFiltersLoadReducer(state, action) {
|
|
139688
|
+
switch (action.type) {
|
|
139689
|
+
case "started":
|
|
139690
|
+
return { kind: "loading", filters: state.filters };
|
|
139691
|
+
case "succeeded":
|
|
139692
|
+
return { kind: "loaded", filters: action.filters };
|
|
139693
|
+
case "failed":
|
|
139694
|
+
return { kind: "error", filters: state.filters, error: action.error };
|
|
139695
|
+
default:
|
|
139696
|
+
return assertNever11(action);
|
|
139697
|
+
}
|
|
139698
|
+
}
|
|
139699
|
+
function toEventFiltersLoadError(error) {
|
|
139700
|
+
return toError(error, "Failed to load filters");
|
|
139701
|
+
}
|
|
139702
|
+
function getEventFiltersData(state) {
|
|
139703
|
+
return state.filters;
|
|
139704
|
+
}
|
|
139705
|
+
function isEventFiltersLoading(state) {
|
|
139706
|
+
return state.kind === "loading";
|
|
139707
|
+
}
|
|
139708
|
+
function getEventFiltersError(state) {
|
|
139709
|
+
return state.kind === "error" ? state.error : null;
|
|
139710
|
+
}
|
|
139711
|
+
|
|
139712
|
+
// ../blocks/src/system/runtime/hooks/useEventFilters.ts
|
|
139122
139713
|
function useEventFilters({
|
|
139123
139714
|
showCategoryFilter = "auto",
|
|
139124
139715
|
showVenueFilter = false,
|
|
@@ -139132,14 +139723,14 @@ function useEventFilters({
|
|
|
139132
139723
|
preFilterScheduleScope
|
|
139133
139724
|
} = {}) {
|
|
139134
139725
|
const api = useBlockApi();
|
|
139135
|
-
const [
|
|
139136
|
-
|
|
139137
|
-
|
|
139138
|
-
|
|
139139
|
-
|
|
139140
|
-
|
|
139141
|
-
const
|
|
139142
|
-
const
|
|
139726
|
+
const [loadState, dispatchLoadState] = useReducer(
|
|
139727
|
+
eventFiltersLoadReducer,
|
|
139728
|
+
void 0,
|
|
139729
|
+
createInitialEventFiltersLoadState
|
|
139730
|
+
);
|
|
139731
|
+
const filters = getEventFiltersData(loadState);
|
|
139732
|
+
const loading = isEventFiltersLoading(loadState);
|
|
139733
|
+
const error = getEventFiltersError(loadState);
|
|
139143
139734
|
const [selectedKind, setSelectedKindState] = useState("all");
|
|
139144
139735
|
const [selectedCategoryId, setSelectedCategoryId] = useState("all");
|
|
139145
139736
|
const [selectedStaffMemberId, setSelectedStaffMemberId] = useState("all");
|
|
@@ -139174,7 +139765,7 @@ function useEventFilters({
|
|
|
139174
139765
|
const needFilters = showCategoryFilter !== "never" && fixedKind !== "courses" || showVenueFilter || showStaffFilter;
|
|
139175
139766
|
if (!needFilters) return;
|
|
139176
139767
|
hasFetchedRef.current = true;
|
|
139177
|
-
|
|
139768
|
+
dispatchLoadState({ type: "started" });
|
|
139178
139769
|
api.getEventFilters({
|
|
139179
139770
|
categoryIds: allowedCategoryIds.length > 0 ? allowedCategoryIds.join(",") : void 0,
|
|
139180
139771
|
venueId: fixedVenueId ?? void 0,
|
|
@@ -139184,12 +139775,12 @@ function useEventFilters({
|
|
|
139184
139775
|
eventPresets: fixedEventPresets,
|
|
139185
139776
|
scheduleScope: fixedScheduleScope
|
|
139186
139777
|
}).then((data) => {
|
|
139187
|
-
|
|
139188
|
-
setError(null);
|
|
139778
|
+
dispatchLoadState({ type: "succeeded", filters: data });
|
|
139189
139779
|
}).catch((err4) => {
|
|
139190
|
-
|
|
139191
|
-
|
|
139192
|
-
|
|
139780
|
+
dispatchLoadState({
|
|
139781
|
+
type: "failed",
|
|
139782
|
+
error: toEventFiltersLoadError(err4)
|
|
139783
|
+
});
|
|
139193
139784
|
});
|
|
139194
139785
|
}, [
|
|
139195
139786
|
allowedCategoryIds,
|
|
@@ -139521,6 +140112,31 @@ var TabBar = ({
|
|
|
139521
140112
|
}
|
|
139522
140113
|
);
|
|
139523
140114
|
};
|
|
140115
|
+
|
|
140116
|
+
// ../blocks/src/system/runtime/hooks/useCalendarEvents.state.ts
|
|
140117
|
+
function calendarEventCacheLoadReducer(_state, action) {
|
|
140118
|
+
switch (action.type) {
|
|
140119
|
+
case "started":
|
|
140120
|
+
return { kind: "loading" };
|
|
140121
|
+
case "succeeded":
|
|
140122
|
+
return { kind: "idle" };
|
|
140123
|
+
case "failed":
|
|
140124
|
+
return { kind: "error", error: action.error };
|
|
140125
|
+
default:
|
|
140126
|
+
return assertNever11(action);
|
|
140127
|
+
}
|
|
140128
|
+
}
|
|
140129
|
+
function toCalendarEventCacheLoadError(error) {
|
|
140130
|
+
return toError(error, "Unknown error");
|
|
140131
|
+
}
|
|
140132
|
+
function isCalendarEventCacheLoading(state) {
|
|
140133
|
+
return state.kind === "loading";
|
|
140134
|
+
}
|
|
140135
|
+
function getCalendarEventCacheError(state) {
|
|
140136
|
+
return state.kind === "error" ? state.error : null;
|
|
140137
|
+
}
|
|
140138
|
+
|
|
140139
|
+
// ../blocks/src/system/runtime/hooks/useCalendarEvents.ts
|
|
139524
140140
|
var CALENDAR_FETCH_LIMIT = 200;
|
|
139525
140141
|
function getMonthKey(date) {
|
|
139526
140142
|
return `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}`;
|
|
@@ -139564,8 +140180,10 @@ function useCalendarEventCache({
|
|
|
139564
140180
|
stage
|
|
139565
140181
|
}) {
|
|
139566
140182
|
const { getPublicEvents } = useBlockApi();
|
|
139567
|
-
const [
|
|
139568
|
-
|
|
140183
|
+
const [loadState, dispatchLoadState] = useReducer(
|
|
140184
|
+
calendarEventCacheLoadReducer,
|
|
140185
|
+
{ kind: "idle" }
|
|
140186
|
+
);
|
|
139569
140187
|
const [cacheVersion, setCacheVersion] = useState(0);
|
|
139570
140188
|
const filtersKey = useMemo(
|
|
139571
140189
|
() => getEventRuntimeFiltersKey(filters),
|
|
@@ -139610,8 +140228,7 @@ function useCalendarEventCache({
|
|
|
139610
140228
|
if (monthsToFetch.length === 0) return;
|
|
139611
140229
|
monthsToFetch.forEach((m2) => fetchingRef.current.add(m2));
|
|
139612
140230
|
const currentRequestId = ++requestIdRef.current;
|
|
139613
|
-
|
|
139614
|
-
setError(null);
|
|
140231
|
+
dispatchLoadState({ type: "started" });
|
|
139615
140232
|
try {
|
|
139616
140233
|
const result = await getPublicEvents({
|
|
139617
140234
|
from: from2,
|
|
@@ -139643,16 +140260,17 @@ function useCalendarEventCache({
|
|
|
139643
140260
|
}
|
|
139644
140261
|
}
|
|
139645
140262
|
setCacheVersion((v2) => v2 + 1);
|
|
140263
|
+
dispatchLoadState({ type: "succeeded" });
|
|
139646
140264
|
}
|
|
139647
140265
|
} catch (err4) {
|
|
139648
140266
|
if (currentRequestId === requestIdRef.current) {
|
|
139649
|
-
|
|
140267
|
+
dispatchLoadState({
|
|
140268
|
+
type: "failed",
|
|
140269
|
+
error: toCalendarEventCacheLoadError(err4)
|
|
140270
|
+
});
|
|
139650
140271
|
}
|
|
139651
140272
|
} finally {
|
|
139652
140273
|
monthsToFetch.forEach((m2) => fetchingRef.current.delete(m2));
|
|
139653
|
-
if (currentRequestId === requestIdRef.current) {
|
|
139654
|
-
setLoading(false);
|
|
139655
|
-
}
|
|
139656
140274
|
}
|
|
139657
140275
|
}, [
|
|
139658
140276
|
getPublicEvents,
|
|
@@ -139702,8 +140320,8 @@ function useCalendarEventCache({
|
|
|
139702
140320
|
}, [viewDate, cacheVersion]);
|
|
139703
140321
|
return {
|
|
139704
140322
|
events: events2,
|
|
139705
|
-
loading,
|
|
139706
|
-
error
|
|
140323
|
+
loading: isCalendarEventCacheLoading(loadState),
|
|
140324
|
+
error: getCalendarEventCacheError(loadState)
|
|
139707
140325
|
};
|
|
139708
140326
|
}
|
|
139709
140327
|
function useCalendarEvents({
|
|
@@ -141309,6 +141927,23 @@ var MediaNode = ({
|
|
|
141309
141927
|
};
|
|
141310
141928
|
|
|
141311
141929
|
// ../blocks/src/system/runtime/nodes/newsletter-form.client.state.ts
|
|
141930
|
+
var initialNewsletterFormSubmissionState = {
|
|
141931
|
+
tag: "idle"
|
|
141932
|
+
};
|
|
141933
|
+
function newsletterFormSubmissionReducer(state, action) {
|
|
141934
|
+
switch (action.type) {
|
|
141935
|
+
case "submitted":
|
|
141936
|
+
if (state.tag === "success") return state;
|
|
141937
|
+
return { tag: "submitting" };
|
|
141938
|
+
case "failed":
|
|
141939
|
+
if (state.tag === "success") return state;
|
|
141940
|
+
return { tag: "error", error: action.error };
|
|
141941
|
+
case "succeeded":
|
|
141942
|
+
return { tag: "success" };
|
|
141943
|
+
default:
|
|
141944
|
+
return assertNever11(action);
|
|
141945
|
+
}
|
|
141946
|
+
}
|
|
141312
141947
|
function newsletterFieldError(fieldId, message2) {
|
|
141313
141948
|
return { kind: "field", fieldId, message: message2 };
|
|
141314
141949
|
}
|
|
@@ -141321,6 +141956,18 @@ function getNewsletterFieldError(error, fieldId) {
|
|
|
141321
141956
|
function getNewsletterFormError(error) {
|
|
141322
141957
|
return error?.kind === "form" ? error.message : null;
|
|
141323
141958
|
}
|
|
141959
|
+
function isNewsletterFormSubmitting(state) {
|
|
141960
|
+
return state.tag === "submitting";
|
|
141961
|
+
}
|
|
141962
|
+
function isNewsletterFormSuccess(state) {
|
|
141963
|
+
return state.tag === "success";
|
|
141964
|
+
}
|
|
141965
|
+
function getNewsletterSubmissionFieldError(state, fieldId) {
|
|
141966
|
+
return state.tag === "error" ? getNewsletterFieldError(state.error, fieldId) : null;
|
|
141967
|
+
}
|
|
141968
|
+
function getNewsletterSubmissionFormError(state) {
|
|
141969
|
+
return state.tag === "error" ? getNewsletterFormError(state.error) : null;
|
|
141970
|
+
}
|
|
141324
141971
|
|
|
141325
141972
|
// ../blocks/src/system/runtime/nodes/newsletter-form.submission.ts
|
|
141326
141973
|
function mapNewsletterFormFieldsToSubscriberInput(fields3) {
|
|
@@ -141368,16 +142015,16 @@ function NewsletterFormClient({
|
|
|
141368
142015
|
render
|
|
141369
142016
|
}) {
|
|
141370
142017
|
const api = useBlockApi();
|
|
141371
|
-
const [
|
|
141372
|
-
|
|
141373
|
-
|
|
142018
|
+
const [submissionState, dispatchSubmission] = useReducer(
|
|
142019
|
+
newsletterFormSubmissionReducer,
|
|
142020
|
+
initialNewsletterFormSubmissionState
|
|
142021
|
+
);
|
|
141374
142022
|
const [altchaSolution, setAltchaSolution] = useState(null);
|
|
141375
142023
|
const showSpamProtection = render.hydration.spamProtectionEnabled ?? isSpamProtectionEnabled();
|
|
141376
142024
|
const fields3 = render.display.fields;
|
|
141377
142025
|
const parsedTags = typeof render.hydration.tags === "string" ? render.hydration.tags.split(/[;,]/g).map((t3) => t3.trim()).filter(Boolean) : [];
|
|
141378
142026
|
const handleSubmit = async (e3) => {
|
|
141379
142027
|
e3.preventDefault();
|
|
141380
|
-
setError(null);
|
|
141381
142028
|
const formData = new FormData(e3.currentTarget);
|
|
141382
142029
|
const submittedFields = mapNewsletterFormFieldsToSubscriberInput({
|
|
141383
142030
|
email: formData.get("email"),
|
|
@@ -141389,11 +142036,14 @@ function NewsletterFormClient({
|
|
|
141389
142036
|
website: formData.get("website")
|
|
141390
142037
|
});
|
|
141391
142038
|
if (submittedFields.honeypot) {
|
|
141392
|
-
|
|
142039
|
+
dispatchSubmission({ type: "succeeded" });
|
|
141393
142040
|
return;
|
|
141394
142041
|
}
|
|
141395
142042
|
if (!submittedFields.email) {
|
|
141396
|
-
|
|
142043
|
+
dispatchSubmission({
|
|
142044
|
+
type: "failed",
|
|
142045
|
+
error: newsletterFieldError("email", "Email is required")
|
|
142046
|
+
});
|
|
141397
142047
|
return;
|
|
141398
142048
|
}
|
|
141399
142049
|
const submitTarget = resolveNewsletterSubmitTarget({
|
|
@@ -141401,10 +142051,13 @@ function NewsletterFormClient({
|
|
|
141401
142051
|
destinationRef: render.hydration.destinationRef
|
|
141402
142052
|
});
|
|
141403
142053
|
if (submitTarget.tag === "unavailable") {
|
|
141404
|
-
|
|
142054
|
+
dispatchSubmission({
|
|
142055
|
+
type: "failed",
|
|
142056
|
+
error: newsletterFormError("Newsletter list is not configured")
|
|
142057
|
+
});
|
|
141405
142058
|
return;
|
|
141406
142059
|
}
|
|
141407
|
-
|
|
142060
|
+
dispatchSubmission({ type: "submitted" });
|
|
141408
142061
|
try {
|
|
141409
142062
|
await api.subscribeNewsletter({
|
|
141410
142063
|
email: submittedFields.email,
|
|
@@ -141420,18 +142073,19 @@ function NewsletterFormClient({
|
|
|
141420
142073
|
altchaSolution
|
|
141421
142074
|
}
|
|
141422
142075
|
});
|
|
141423
|
-
|
|
142076
|
+
dispatchSubmission({ type: "succeeded" });
|
|
141424
142077
|
} catch (err4) {
|
|
141425
|
-
|
|
141426
|
-
|
|
141427
|
-
|
|
141428
|
-
|
|
141429
|
-
|
|
142078
|
+
dispatchSubmission({
|
|
142079
|
+
type: "failed",
|
|
142080
|
+
error: newsletterFormError(
|
|
142081
|
+
err4 instanceof Error ? err4.message : "Subscription failed. Please try again."
|
|
142082
|
+
)
|
|
142083
|
+
});
|
|
141430
142084
|
}
|
|
141431
142085
|
};
|
|
141432
142086
|
const renderField = (field) => {
|
|
141433
142087
|
const inputId = `newsletter_${field.id}`;
|
|
141434
|
-
const fieldError =
|
|
142088
|
+
const fieldError = getNewsletterSubmissionFieldError(submissionState, field.id);
|
|
141435
142089
|
const fieldErrorId = `${inputId}-error`;
|
|
141436
142090
|
const validationProps = getFieldValidationControlProps({
|
|
141437
142091
|
message: fieldError,
|
|
@@ -141452,15 +142106,15 @@ function NewsletterFormClient({
|
|
|
141452
142106
|
placeholder: field.placeholder,
|
|
141453
142107
|
className: "form-input",
|
|
141454
142108
|
autoComplete: field.type === "email" ? "email" : void 0,
|
|
141455
|
-
disabled:
|
|
142109
|
+
disabled: isNewsletterFormSubmitting(submissionState),
|
|
141456
142110
|
...validationProps
|
|
141457
142111
|
}
|
|
141458
142112
|
),
|
|
141459
142113
|
fieldError && /* @__PURE__ */ jsx(FieldValidationMessage, { id: fieldErrorId, className: "fb-error", children: fieldError })
|
|
141460
142114
|
] }, field.id);
|
|
141461
142115
|
};
|
|
141462
|
-
const formError =
|
|
141463
|
-
if (
|
|
142116
|
+
const formError = getNewsletterSubmissionFormError(submissionState);
|
|
142117
|
+
if (isNewsletterFormSuccess(submissionState)) {
|
|
141464
142118
|
return /* @__PURE__ */ jsx("div", { className: clsx_default("newsletter-form", "newsletter-success", render.display.className ?? void 0), children: /* @__PURE__ */ jsx(FeedbackMessage, { tone: "success", className: "fb-success", role: "status", children: render.display.successMessage?.trim() || "Thanks for subscribing!" }) });
|
|
141465
142119
|
}
|
|
141466
142120
|
return /* @__PURE__ */ jsxs("div", { className: clsx_default("newsletter-form", render.display.className ?? void 0), children: [
|
|
@@ -141491,8 +142145,8 @@ function NewsletterFormClient({
|
|
|
141491
142145
|
{
|
|
141492
142146
|
type: "submit",
|
|
141493
142147
|
className: themeButtonClassName({ variant: "primary", size: "md" }),
|
|
141494
|
-
disabled:
|
|
141495
|
-
children:
|
|
142148
|
+
disabled: isNewsletterFormSubmitting(submissionState),
|
|
142149
|
+
children: isNewsletterFormSubmitting(submissionState) ? "Subscribing..." : render.display.buttonLabel
|
|
141496
142150
|
}
|
|
141497
142151
|
) })
|
|
141498
142152
|
] }),
|
|
@@ -148458,7 +149112,7 @@ function parseAccessPolicyJson(value) {
|
|
|
148458
149112
|
return ok3({ tag: "site-editor-read", siteId: unsafeAsSiteId2(siteId.value) });
|
|
148459
149113
|
}
|
|
148460
149114
|
case "signed-public-render": {
|
|
148461
|
-
const expiresInSeconds =
|
|
149115
|
+
const expiresInSeconds = parsePositiveSeconds2(record.expiresInSeconds);
|
|
148462
149116
|
if (!expiresInSeconds.ok) return expiresInSeconds;
|
|
148463
149117
|
return ok3({ tag: "signed-public-render", expiresInSeconds: expiresInSeconds.value });
|
|
148464
149118
|
}
|
|
@@ -148534,7 +149188,7 @@ function parseStringIn(value, allowed, outOfSetError) {
|
|
|
148534
149188
|
if (!isOneOf(string.value, allowed)) return err3(outOfSetError);
|
|
148535
149189
|
return ok3(string.value);
|
|
148536
149190
|
}
|
|
148537
|
-
function
|
|
149191
|
+
function parsePositiveSeconds2(value) {
|
|
148538
149192
|
if (typeof value !== "number") return err3("invalid-number");
|
|
148539
149193
|
const parsed = asPositiveSeconds(value);
|
|
148540
149194
|
if (!parsed.ok) return err3("invalid-positive-seconds");
|
|
@@ -148542,7 +149196,7 @@ function parsePositiveSeconds(value) {
|
|
|
148542
149196
|
}
|
|
148543
149197
|
function parseOptionalPositiveSeconds(value) {
|
|
148544
149198
|
if (value === void 0 || value === null) return ok3(void 0);
|
|
148545
|
-
return
|
|
149199
|
+
return parsePositiveSeconds2(value);
|
|
148546
149200
|
}
|
|
148547
149201
|
function traverse(items, parse2) {
|
|
148548
149202
|
const values = [];
|
|
@@ -160520,7 +161174,7 @@ function findDiffEnd(a2, b2, posA, posB) {
|
|
|
160520
161174
|
posB -= size4;
|
|
160521
161175
|
}
|
|
160522
161176
|
}
|
|
160523
|
-
var
|
|
161177
|
+
var Fragment54 = class _Fragment {
|
|
160524
161178
|
/**
|
|
160525
161179
|
@internal
|
|
160526
161180
|
*/
|
|
@@ -160812,7 +161466,7 @@ var Fragment53 = class _Fragment {
|
|
|
160812
161466
|
throw new RangeError("Can not convert " + nodes + " to a Fragment" + (nodes.nodesBetween ? " (looks like multiple versions of prosemirror-model were loaded)" : ""));
|
|
160813
161467
|
}
|
|
160814
161468
|
};
|
|
160815
|
-
|
|
161469
|
+
Fragment54.empty = new Fragment54([], 0);
|
|
160816
161470
|
var found = { index: 0, offset: 0 };
|
|
160817
161471
|
function retIndex(index2, offset4) {
|
|
160818
161472
|
found.index = index2;
|
|
@@ -161037,7 +161691,7 @@ var Slice2 = class _Slice {
|
|
|
161037
161691
|
let openStart = json.openStart || 0, openEnd = json.openEnd || 0;
|
|
161038
161692
|
if (typeof openStart != "number" || typeof openEnd != "number")
|
|
161039
161693
|
throw new RangeError("Invalid input for Slice.fromJSON");
|
|
161040
|
-
return new _Slice(
|
|
161694
|
+
return new _Slice(Fragment54.fromJSON(schema, json.content), openStart, openEnd);
|
|
161041
161695
|
}
|
|
161042
161696
|
/**
|
|
161043
161697
|
Create a slice from a fragment by taking the maximum possible
|
|
@@ -161052,7 +161706,7 @@ var Slice2 = class _Slice {
|
|
|
161052
161706
|
return new _Slice(fragment, openStart, openEnd);
|
|
161053
161707
|
}
|
|
161054
161708
|
};
|
|
161055
|
-
Slice2.empty = new Slice2(
|
|
161709
|
+
Slice2.empty = new Slice2(Fragment54.empty, 0, 0);
|
|
161056
161710
|
function removeRange(content, from2, to) {
|
|
161057
161711
|
let { index: index2, offset: offset4 } = content.findIndex(from2), child = content.maybeChild(index2);
|
|
161058
161712
|
let { index: indexTo, offset: offsetTo } = content.findIndex(to);
|
|
@@ -161150,7 +161804,7 @@ function replaceThreeWay($from, $start, $end, $to, depth) {
|
|
|
161150
161804
|
addNode(close(openEnd, replaceTwoWay($end, $to, depth + 1)), content);
|
|
161151
161805
|
}
|
|
161152
161806
|
addRange($to, null, depth, content);
|
|
161153
|
-
return new
|
|
161807
|
+
return new Fragment54(content);
|
|
161154
161808
|
}
|
|
161155
161809
|
function replaceTwoWay($from, $to, depth) {
|
|
161156
161810
|
let content = [];
|
|
@@ -161160,13 +161814,13 @@ function replaceTwoWay($from, $to, depth) {
|
|
|
161160
161814
|
addNode(close(type, replaceTwoWay($from, $to, depth + 1)), content);
|
|
161161
161815
|
}
|
|
161162
161816
|
addRange($to, null, depth, content);
|
|
161163
|
-
return new
|
|
161817
|
+
return new Fragment54(content);
|
|
161164
161818
|
}
|
|
161165
161819
|
function prepareSliceForReplace(slice2, $along) {
|
|
161166
161820
|
let extra = $along.depth - slice2.openStart, parent = $along.node(extra);
|
|
161167
161821
|
let node = parent.copy(slice2.content);
|
|
161168
161822
|
for (let i2 = extra - 1; i2 >= 0; i2--)
|
|
161169
|
-
node = $along.node(i2).copy(
|
|
161823
|
+
node = $along.node(i2).copy(Fragment54.from(node));
|
|
161170
161824
|
return {
|
|
161171
161825
|
start: node.resolveNoCache(slice2.openStart + extra),
|
|
161172
161826
|
end: node.resolveNoCache(node.content.size - slice2.openEnd - extra)
|
|
@@ -161505,7 +162159,7 @@ var Node2 = class _Node {
|
|
|
161505
162159
|
this.type = type;
|
|
161506
162160
|
this.attrs = attrs;
|
|
161507
162161
|
this.marks = marks;
|
|
161508
|
-
this.content = content ||
|
|
162162
|
+
this.content = content || Fragment54.empty;
|
|
161509
162163
|
}
|
|
161510
162164
|
/**
|
|
161511
162165
|
The array of this node's child nodes.
|
|
@@ -161810,7 +162464,7 @@ var Node2 = class _Node {
|
|
|
161810
162464
|
can optionally pass `start` and `end` indices into the
|
|
161811
162465
|
replacement fragment.
|
|
161812
162466
|
*/
|
|
161813
|
-
canReplace(from2, to, replacement =
|
|
162467
|
+
canReplace(from2, to, replacement = Fragment54.empty, start = 0, end = replacement.childCount) {
|
|
161814
162468
|
let one = this.contentMatchAt(from2).matchFragment(replacement, start, end);
|
|
161815
162469
|
let two = one && one.matchFragment(this.content, to);
|
|
161816
162470
|
if (!two || !two.validEnd)
|
|
@@ -161892,7 +162546,7 @@ var Node2 = class _Node {
|
|
|
161892
162546
|
throw new RangeError("Invalid text node in JSON");
|
|
161893
162547
|
return schema.text(json.text, marks);
|
|
161894
162548
|
}
|
|
161895
|
-
let content =
|
|
162549
|
+
let content = Fragment54.fromJSON(schema, json.content);
|
|
161896
162550
|
let node = schema.nodeType(json.type).create(json.attrs, content, marks);
|
|
161897
162551
|
node.type.checkAttrs(node.attrs);
|
|
161898
162552
|
return node;
|
|
@@ -162034,7 +162688,7 @@ var ContentMatch = class _ContentMatch {
|
|
|
162034
162688
|
function search(match2, types) {
|
|
162035
162689
|
let finished = match2.matchFragment(after, startIndex);
|
|
162036
162690
|
if (finished && (!toEnd || finished.validEnd))
|
|
162037
|
-
return
|
|
162691
|
+
return Fragment54.from(types.map((tp) => tp.createAndFill()));
|
|
162038
162692
|
for (let i2 = 0; i2 < match2.next.length; i2++) {
|
|
162039
162693
|
let { type, next } = match2.next[i2];
|
|
162040
162694
|
if (!(type.isText || type.hasRequiredAttrs()) && seen.indexOf(next) == -1) {
|
|
@@ -162486,7 +163140,7 @@ var NodeType = class _NodeType {
|
|
|
162486
163140
|
create(attrs = null, content, marks) {
|
|
162487
163141
|
if (this.isText)
|
|
162488
163142
|
throw new Error("NodeType.create can't construct text nodes");
|
|
162489
|
-
return new Node2(this, this.computeAttrs(attrs),
|
|
163143
|
+
return new Node2(this, this.computeAttrs(attrs), Fragment54.from(content), Mark.setFrom(marks));
|
|
162490
163144
|
}
|
|
162491
163145
|
/**
|
|
162492
163146
|
Like [`create`](https://prosemirror.net/docs/ref/#model.NodeType.create), but check the given content
|
|
@@ -162494,7 +163148,7 @@ var NodeType = class _NodeType {
|
|
|
162494
163148
|
if it doesn't match.
|
|
162495
163149
|
*/
|
|
162496
163150
|
createChecked(attrs = null, content, marks) {
|
|
162497
|
-
content =
|
|
163151
|
+
content = Fragment54.from(content);
|
|
162498
163152
|
this.checkContent(content);
|
|
162499
163153
|
return new Node2(this, this.computeAttrs(attrs), content, Mark.setFrom(marks));
|
|
162500
163154
|
}
|
|
@@ -162508,7 +163162,7 @@ var NodeType = class _NodeType {
|
|
|
162508
163162
|
*/
|
|
162509
163163
|
createAndFill(attrs = null, content, marks) {
|
|
162510
163164
|
attrs = this.computeAttrs(attrs);
|
|
162511
|
-
content =
|
|
163165
|
+
content = Fragment54.from(content);
|
|
162512
163166
|
if (content.size) {
|
|
162513
163167
|
let before = this.contentMatch.fillBefore(content);
|
|
162514
163168
|
if (!before)
|
|
@@ -162516,7 +163170,7 @@ var NodeType = class _NodeType {
|
|
|
162516
163170
|
content = before.append(content);
|
|
162517
163171
|
}
|
|
162518
163172
|
let matched = this.contentMatch.matchFragment(content);
|
|
162519
|
-
let after = matched && matched.fillBefore(
|
|
163173
|
+
let after = matched && matched.fillBefore(Fragment54.empty, true);
|
|
162520
163174
|
if (!after)
|
|
162521
163175
|
return null;
|
|
162522
163176
|
return new Node2(this, attrs, content.append(after), Mark.setFrom(marks));
|
|
@@ -162980,7 +163634,7 @@ var NodeContext = class {
|
|
|
162980
163634
|
if (!this.match) {
|
|
162981
163635
|
if (!this.type)
|
|
162982
163636
|
return [];
|
|
162983
|
-
let fill = this.type.contentMatch.fillBefore(
|
|
163637
|
+
let fill = this.type.contentMatch.fillBefore(Fragment54.from(node));
|
|
162984
163638
|
if (fill) {
|
|
162985
163639
|
this.match = this.type.contentMatch.matchFragment(fill);
|
|
162986
163640
|
} else {
|
|
@@ -163006,9 +163660,9 @@ var NodeContext = class {
|
|
|
163006
163660
|
this.content[this.content.length - 1] = text2.withText(text2.text.slice(0, text2.text.length - m2[0].length));
|
|
163007
163661
|
}
|
|
163008
163662
|
}
|
|
163009
|
-
let content =
|
|
163663
|
+
let content = Fragment54.from(this.content);
|
|
163010
163664
|
if (!openEnd && this.match)
|
|
163011
|
-
content = content.append(this.match.fillBefore(
|
|
163665
|
+
content = content.append(this.match.fillBefore(Fragment54.empty, true));
|
|
163012
163666
|
return this.type ? this.type.create(this.attrs, content, this.marks) : content;
|
|
163013
163667
|
}
|
|
163014
163668
|
inlineContext(node) {
|
|
@@ -164024,7 +164678,7 @@ function mapFragment(fragment, f2, parent) {
|
|
|
164024
164678
|
child = f2(child, parent, i2);
|
|
164025
164679
|
mapped.push(child);
|
|
164026
164680
|
}
|
|
164027
|
-
return
|
|
164681
|
+
return Fragment54.fromArray(mapped);
|
|
164028
164682
|
}
|
|
164029
164683
|
var AddMarkStep = class _AddMarkStep extends Step {
|
|
164030
164684
|
/**
|
|
@@ -164141,7 +164795,7 @@ var AddNodeMarkStep = class _AddNodeMarkStep extends Step {
|
|
|
164141
164795
|
if (!node)
|
|
164142
164796
|
return StepResult.fail("No node at mark step's position");
|
|
164143
164797
|
let updated = node.type.create(node.attrs, null, this.mark.addToSet(node.marks));
|
|
164144
|
-
return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice2(
|
|
164798
|
+
return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice2(Fragment54.from(updated), 0, node.isLeaf ? 0 : 1));
|
|
164145
164799
|
}
|
|
164146
164800
|
invert(doc3) {
|
|
164147
164801
|
let node = doc3.nodeAt(this.pos);
|
|
@@ -164187,7 +164841,7 @@ var RemoveNodeMarkStep = class _RemoveNodeMarkStep extends Step {
|
|
|
164187
164841
|
if (!node)
|
|
164188
164842
|
return StepResult.fail("No node at mark step's position");
|
|
164189
164843
|
let updated = node.type.create(node.attrs, null, this.mark.removeFromSet(node.marks));
|
|
164190
|
-
return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice2(
|
|
164844
|
+
return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice2(Fragment54.from(updated), 0, node.isLeaf ? 0 : 1));
|
|
164191
164845
|
}
|
|
164192
164846
|
invert(doc3) {
|
|
164193
164847
|
let node = doc3.nodeAt(this.pos);
|
|
@@ -164452,7 +165106,7 @@ function clearIncompatible(tr2, pos, parentType, match2 = parentType.contentMatc
|
|
|
164452
165106
|
let m2, newline = /\r?\n|\r/g, slice2;
|
|
164453
165107
|
while (m2 = newline.exec(child.text)) {
|
|
164454
165108
|
if (!slice2)
|
|
164455
|
-
slice2 = new Slice2(
|
|
165109
|
+
slice2 = new Slice2(Fragment54.from(parentType.schema.text(" ", parentType.allowedMarks(child.marks))), 0, 0);
|
|
164456
165110
|
replSteps.push(new ReplaceStep(cur + m2.index, cur + m2.index + m2[0].length, slice2));
|
|
164457
165111
|
}
|
|
164458
165112
|
}
|
|
@@ -164460,7 +165114,7 @@ function clearIncompatible(tr2, pos, parentType, match2 = parentType.contentMatc
|
|
|
164460
165114
|
cur = end;
|
|
164461
165115
|
}
|
|
164462
165116
|
if (!match2.validEnd) {
|
|
164463
|
-
let fill = match2.fillBefore(
|
|
165117
|
+
let fill = match2.fillBefore(Fragment54.empty, true);
|
|
164464
165118
|
tr2.replace(cur, cur, new Slice2(fill, 0, 0));
|
|
164465
165119
|
}
|
|
164466
165120
|
for (let i2 = replSteps.length - 1; i2 >= 0; i2--)
|
|
@@ -164486,20 +165140,20 @@ function lift(tr2, range, target) {
|
|
|
164486
165140
|
let { $from, $to, depth } = range;
|
|
164487
165141
|
let gapStart = $from.before(depth + 1), gapEnd = $to.after(depth + 1);
|
|
164488
165142
|
let start = gapStart, end = gapEnd;
|
|
164489
|
-
let before =
|
|
165143
|
+
let before = Fragment54.empty, openStart = 0;
|
|
164490
165144
|
for (let d2 = depth, splitting = false; d2 > target; d2--)
|
|
164491
165145
|
if (splitting || $from.index(d2) > 0) {
|
|
164492
165146
|
splitting = true;
|
|
164493
|
-
before =
|
|
165147
|
+
before = Fragment54.from($from.node(d2).copy(before));
|
|
164494
165148
|
openStart++;
|
|
164495
165149
|
} else {
|
|
164496
165150
|
start--;
|
|
164497
165151
|
}
|
|
164498
|
-
let after =
|
|
165152
|
+
let after = Fragment54.empty, openEnd = 0;
|
|
164499
165153
|
for (let d2 = depth, splitting = false; d2 > target; d2--)
|
|
164500
165154
|
if (splitting || $to.after(d2 + 1) < $to.end(d2)) {
|
|
164501
165155
|
splitting = true;
|
|
164502
|
-
after =
|
|
165156
|
+
after = Fragment54.from($to.node(d2).copy(after));
|
|
164503
165157
|
openEnd++;
|
|
164504
165158
|
} else {
|
|
164505
165159
|
end++;
|
|
@@ -164539,14 +165193,14 @@ function findWrappingInside(range, type) {
|
|
|
164539
165193
|
return inside;
|
|
164540
165194
|
}
|
|
164541
165195
|
function wrap(tr2, range, wrappers) {
|
|
164542
|
-
let content =
|
|
165196
|
+
let content = Fragment54.empty;
|
|
164543
165197
|
for (let i2 = wrappers.length - 1; i2 >= 0; i2--) {
|
|
164544
165198
|
if (content.size) {
|
|
164545
165199
|
let match2 = wrappers[i2].type.contentMatch.matchFragment(content);
|
|
164546
165200
|
if (!match2 || !match2.validEnd)
|
|
164547
165201
|
throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper");
|
|
164548
165202
|
}
|
|
164549
|
-
content =
|
|
165203
|
+
content = Fragment54.from(wrappers[i2].type.create(wrappers[i2].attrs, content));
|
|
164550
165204
|
}
|
|
164551
165205
|
let start = range.start, end = range.end;
|
|
164552
165206
|
tr2.step(new ReplaceAroundStep(start, end, start, end, new Slice2(content, 0, 0), wrappers.length, true));
|
|
@@ -164571,7 +165225,7 @@ function setBlockType(tr2, from2, to, type, attrs) {
|
|
|
164571
165225
|
clearIncompatible(tr2, tr2.mapping.slice(mapFrom).map(pos, 1), type, void 0, convertNewlines === null);
|
|
164572
165226
|
let mapping = tr2.mapping.slice(mapFrom);
|
|
164573
165227
|
let startM = mapping.map(pos, 1), endM = mapping.map(pos + node.nodeSize, 1);
|
|
164574
|
-
tr2.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new Slice2(
|
|
165228
|
+
tr2.step(new ReplaceAroundStep(startM, endM, startM + 1, endM - 1, new Slice2(Fragment54.from(type.create(attrsHere, null, node.marks)), 0, 0), 1, true));
|
|
164575
165229
|
if (convertNewlines === true)
|
|
164576
165230
|
replaceNewlines(tr2, node, pos, mapFrom);
|
|
164577
165231
|
return false;
|
|
@@ -164612,7 +165266,7 @@ function setNodeMarkup(tr2, pos, type, attrs, marks) {
|
|
|
164612
165266
|
return tr2.replaceWith(pos, pos + node.nodeSize, newNode);
|
|
164613
165267
|
if (!type.validContent(node.content))
|
|
164614
165268
|
throw new RangeError("Invalid content for node type " + type.name);
|
|
164615
|
-
tr2.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1, new Slice2(
|
|
165269
|
+
tr2.step(new ReplaceAroundStep(pos, pos + node.nodeSize, pos + 1, pos + node.nodeSize - 1, new Slice2(Fragment54.from(newNode), 0, 0), 1, true));
|
|
164616
165270
|
}
|
|
164617
165271
|
function canSplit(doc3, pos, depth = 1, typesAfter) {
|
|
164618
165272
|
let $pos = doc3.resolve(pos), base2 = $pos.depth - depth;
|
|
@@ -164636,11 +165290,11 @@ function canSplit(doc3, pos, depth = 1, typesAfter) {
|
|
|
164636
165290
|
return $pos.node(base2).canReplaceWith(index2, index2, baseType ? baseType.type : $pos.node(base2 + 1).type);
|
|
164637
165291
|
}
|
|
164638
165292
|
function split(tr2, pos, depth = 1, typesAfter) {
|
|
164639
|
-
let $pos = tr2.doc.resolve(pos), before =
|
|
165293
|
+
let $pos = tr2.doc.resolve(pos), before = Fragment54.empty, after = Fragment54.empty;
|
|
164640
165294
|
for (let d2 = $pos.depth, e3 = $pos.depth - depth, i2 = depth - 1; d2 > e3; d2--, i2--) {
|
|
164641
|
-
before =
|
|
165295
|
+
before = Fragment54.from($pos.node(d2).copy(before));
|
|
164642
165296
|
let typeAfter = typesAfter && typesAfter[i2];
|
|
164643
|
-
after =
|
|
165297
|
+
after = Fragment54.from(typeAfter ? typeAfter.type.create(typeAfter.attrs, after) : $pos.node(d2).copy(after));
|
|
164644
165298
|
}
|
|
164645
165299
|
tr2.step(new ReplaceStep(pos, pos, new Slice2(before.append(after), depth, depth), true));
|
|
164646
165300
|
}
|
|
@@ -164779,7 +165433,7 @@ var Fitter = class {
|
|
|
164779
165433
|
this.$to = $to;
|
|
164780
165434
|
this.unplaced = unplaced;
|
|
164781
165435
|
this.frontier = [];
|
|
164782
|
-
this.placed =
|
|
165436
|
+
this.placed = Fragment54.empty;
|
|
164783
165437
|
for (let i2 = 0; i2 <= $from.depth; i2++) {
|
|
164784
165438
|
let node = $from.node(i2);
|
|
164785
165439
|
this.frontier.push({
|
|
@@ -164788,7 +165442,7 @@ var Fitter = class {
|
|
|
164788
165442
|
});
|
|
164789
165443
|
}
|
|
164790
165444
|
for (let i2 = $from.depth; i2 > 0; i2--)
|
|
164791
|
-
this.placed =
|
|
165445
|
+
this.placed = Fragment54.from($from.node(i2).copy(this.placed));
|
|
164792
165446
|
}
|
|
164793
165447
|
get depth() {
|
|
164794
165448
|
return this.frontier.length - 1;
|
|
@@ -164845,7 +165499,7 @@ var Fitter = class {
|
|
|
164845
165499
|
let first2 = fragment.firstChild;
|
|
164846
165500
|
for (let frontierDepth = this.depth; frontierDepth >= 0; frontierDepth--) {
|
|
164847
165501
|
let { type, match: match2 } = this.frontier[frontierDepth], wrap2, inject = null;
|
|
164848
|
-
if (pass == 1 && (first2 ? match2.matchType(first2.type) || (inject = match2.fillBefore(
|
|
165502
|
+
if (pass == 1 && (first2 ? match2.matchType(first2.type) || (inject = match2.fillBefore(Fragment54.from(first2), false)) : parent && type.compatibleContent(parent.type)))
|
|
164849
165503
|
return { sliceDepth, frontierDepth, parent, inject };
|
|
164850
165504
|
else if (pass == 2 && first2 && (wrap2 = match2.findWrapping(first2.type)))
|
|
164851
165505
|
return { sliceDepth, frontierDepth, parent, wrap: wrap2 };
|
|
@@ -164905,7 +165559,7 @@ var Fitter = class {
|
|
|
164905
165559
|
let toEnd = taken == fragment.childCount;
|
|
164906
165560
|
if (!toEnd)
|
|
164907
165561
|
openEndCount = -1;
|
|
164908
|
-
this.placed = addToFragment(this.placed, frontierDepth,
|
|
165562
|
+
this.placed = addToFragment(this.placed, frontierDepth, Fragment54.from(add2));
|
|
164909
165563
|
this.frontier[frontierDepth].match = match2;
|
|
164910
165564
|
if (toEnd && openEndCount < 0 && parent && parent.type == this.frontier[this.depth].type && this.frontier.length > 1)
|
|
164911
165565
|
this.closeFrontierNode();
|
|
@@ -164961,12 +165615,12 @@ var Fitter = class {
|
|
|
164961
165615
|
openFrontierNode(type, attrs = null, content) {
|
|
164962
165616
|
let top = this.frontier[this.depth];
|
|
164963
165617
|
top.match = top.match.matchType(type);
|
|
164964
|
-
this.placed = addToFragment(this.placed, this.depth,
|
|
165618
|
+
this.placed = addToFragment(this.placed, this.depth, Fragment54.from(type.create(attrs, content)));
|
|
164965
165619
|
this.frontier.push({ type, match: type.contentMatch });
|
|
164966
165620
|
}
|
|
164967
165621
|
closeFrontierNode() {
|
|
164968
165622
|
let open = this.frontier.pop();
|
|
164969
|
-
let add2 = open.match.fillBefore(
|
|
165623
|
+
let add2 = open.match.fillBefore(Fragment54.empty, true);
|
|
164970
165624
|
if (add2.childCount)
|
|
164971
165625
|
this.placed = addToFragment(this.placed, this.frontier.length, add2);
|
|
164972
165626
|
}
|
|
@@ -164995,7 +165649,7 @@ function closeNodeStart(node, openStart, openEnd) {
|
|
|
164995
165649
|
if (openStart > 0) {
|
|
164996
165650
|
frag = node.type.contentMatch.fillBefore(frag).append(frag);
|
|
164997
165651
|
if (openEnd <= 0)
|
|
164998
|
-
frag = frag.append(node.type.contentMatch.matchFragment(frag).fillBefore(
|
|
165652
|
+
frag = frag.append(node.type.contentMatch.matchFragment(frag).fillBefore(Fragment54.empty, true));
|
|
164999
165653
|
}
|
|
165000
165654
|
return node.copy(frag);
|
|
165001
165655
|
}
|
|
@@ -165087,7 +165741,7 @@ function closeFragment(fragment, depth, oldOpen, newOpen, parent) {
|
|
|
165087
165741
|
if (depth > newOpen) {
|
|
165088
165742
|
let match2 = parent.contentMatchAt(0);
|
|
165089
165743
|
let start = match2.fillBefore(fragment).append(fragment);
|
|
165090
|
-
fragment = start.append(match2.matchFragment(start).fillBefore(
|
|
165744
|
+
fragment = start.append(match2.matchFragment(start).fillBefore(Fragment54.empty, true));
|
|
165091
165745
|
}
|
|
165092
165746
|
return fragment;
|
|
165093
165747
|
}
|
|
@@ -165097,7 +165751,7 @@ function replaceRangeWith(tr2, from2, to, node) {
|
|
|
165097
165751
|
if (point != null)
|
|
165098
165752
|
from2 = to = point;
|
|
165099
165753
|
}
|
|
165100
|
-
tr2.replaceRange(from2, to, new Slice2(
|
|
165754
|
+
tr2.replaceRange(from2, to, new Slice2(Fragment54.from(node), 0, 0));
|
|
165101
165755
|
}
|
|
165102
165756
|
function deleteRange(tr2, from2, to) {
|
|
165103
165757
|
let $from = tr2.doc.resolve(from2), $to = tr2.doc.resolve(to);
|
|
@@ -165145,7 +165799,7 @@ var AttrStep = class _AttrStep extends Step {
|
|
|
165145
165799
|
attrs[name] = node.attrs[name];
|
|
165146
165800
|
attrs[this.attr] = this.value;
|
|
165147
165801
|
let updated = node.type.create(attrs, null, node.marks);
|
|
165148
|
-
return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice2(
|
|
165802
|
+
return StepResult.fromReplace(doc3, this.pos, this.pos + 1, new Slice2(Fragment54.from(updated), 0, node.isLeaf ? 0 : 1));
|
|
165149
165803
|
}
|
|
165150
165804
|
getMap() {
|
|
165151
165805
|
return StepMap.empty;
|
|
@@ -165280,7 +165934,7 @@ var Transform = class {
|
|
|
165280
165934
|
fragment, node, or array of nodes.
|
|
165281
165935
|
*/
|
|
165282
165936
|
replaceWith(from2, to, content) {
|
|
165283
|
-
return this.replace(from2, to, new Slice2(
|
|
165937
|
+
return this.replace(from2, to, new Slice2(Fragment54.from(content), 0, 0));
|
|
165284
165938
|
}
|
|
165285
165939
|
/**
|
|
165286
165940
|
Delete the content between the given positions.
|
|
@@ -165782,7 +166436,7 @@ var NodeSelection = class _NodeSelection extends Selection {
|
|
|
165782
166436
|
return new _NodeSelection($pos);
|
|
165783
166437
|
}
|
|
165784
166438
|
content() {
|
|
165785
|
-
return new Slice2(
|
|
166439
|
+
return new Slice2(Fragment54.from(this.node), 0, 0);
|
|
165786
166440
|
}
|
|
165787
166441
|
eq(other) {
|
|
165788
166442
|
return other instanceof _NodeSelection && other.anchor == this.anchor;
|
|
@@ -167604,7 +168258,7 @@ var NodeViewDesc = class _NodeViewDesc extends ViewDesc {
|
|
|
167604
168258
|
}
|
|
167605
168259
|
}
|
|
167606
168260
|
if (!rule2.contentElement)
|
|
167607
|
-
rule2.getContent = () =>
|
|
168261
|
+
rule2.getContent = () => Fragment54.empty;
|
|
167608
168262
|
}
|
|
167609
168263
|
return rule2;
|
|
167610
168264
|
}
|
|
@@ -168916,7 +169570,7 @@ function parseFromClipboard(view, text2, html, plainText, $context) {
|
|
|
168916
169570
|
text2 = f2(text2, inCode || plainText, view);
|
|
168917
169571
|
});
|
|
168918
169572
|
if (inCode) {
|
|
168919
|
-
slice2 = new Slice2(
|
|
169573
|
+
slice2 = new Slice2(Fragment54.from(view.state.schema.text(text2.replace(/\r\n?/g, "\n"))), 0, 0);
|
|
168920
169574
|
view.someProp("transformPasted", (f2) => {
|
|
168921
169575
|
slice2 = f2(slice2, view, true);
|
|
168922
169576
|
});
|
|
@@ -169010,13 +169664,13 @@ function normalizeSiblings(fragment, $context) {
|
|
|
169010
169664
|
}
|
|
169011
169665
|
});
|
|
169012
169666
|
if (result)
|
|
169013
|
-
return
|
|
169667
|
+
return Fragment54.from(result);
|
|
169014
169668
|
}
|
|
169015
169669
|
return fragment;
|
|
169016
169670
|
}
|
|
169017
169671
|
function withWrappers(node, wrap2, from2 = 0) {
|
|
169018
169672
|
for (let i2 = wrap2.length - 1; i2 >= from2; i2--)
|
|
169019
|
-
node = wrap2[i2].create(null,
|
|
169673
|
+
node = wrap2[i2].create(null, Fragment54.from(node));
|
|
169020
169674
|
return node;
|
|
169021
169675
|
}
|
|
169022
169676
|
function addToSibling(wrap2, lastWrap, node, sibling, depth) {
|
|
@@ -169026,14 +169680,14 @@ function addToSibling(wrap2, lastWrap, node, sibling, depth) {
|
|
|
169026
169680
|
return sibling.copy(sibling.content.replaceChild(sibling.childCount - 1, inner));
|
|
169027
169681
|
let match2 = sibling.contentMatchAt(sibling.childCount);
|
|
169028
169682
|
if (match2.matchType(depth == wrap2.length - 1 ? node.type : wrap2[depth + 1]))
|
|
169029
|
-
return sibling.copy(sibling.content.append(
|
|
169683
|
+
return sibling.copy(sibling.content.append(Fragment54.from(withWrappers(node, wrap2, depth + 1))));
|
|
169030
169684
|
}
|
|
169031
169685
|
}
|
|
169032
169686
|
function closeRight(node, depth) {
|
|
169033
169687
|
if (depth == 0)
|
|
169034
169688
|
return node;
|
|
169035
169689
|
let fragment = node.content.replaceChild(node.childCount - 1, closeRight(node.lastChild, depth - 1));
|
|
169036
|
-
let fill = node.contentMatchAt(node.childCount).fillBefore(
|
|
169690
|
+
let fill = node.contentMatchAt(node.childCount).fillBefore(Fragment54.empty, true);
|
|
169037
169691
|
return node.copy(fragment.append(fill));
|
|
169038
169692
|
}
|
|
169039
169693
|
function closeRange(fragment, side, from2, to, depth, openEnd) {
|
|
@@ -169043,7 +169697,7 @@ function closeRange(fragment, side, from2, to, depth, openEnd) {
|
|
|
169043
169697
|
if (depth < to - 1)
|
|
169044
169698
|
inner = closeRange(inner, side, from2, to, depth + 1, openEnd);
|
|
169045
169699
|
if (depth >= from2)
|
|
169046
|
-
inner = side < 0 ? node.contentMatchAt(0).fillBefore(inner, openEnd <= depth).append(inner) : inner.append(node.contentMatchAt(node.childCount).fillBefore(
|
|
169700
|
+
inner = side < 0 ? node.contentMatchAt(0).fillBefore(inner, openEnd <= depth).append(inner) : inner.append(node.contentMatchAt(node.childCount).fillBefore(Fragment54.empty, true));
|
|
169047
169701
|
return fragment.replaceChild(side < 0 ? 0 : fragment.childCount - 1, node.copy(inner));
|
|
169048
169702
|
}
|
|
169049
169703
|
function closeSlice(slice2, openStart, openEnd) {
|
|
@@ -169113,7 +169767,7 @@ function addContext(slice2, context) {
|
|
|
169113
169767
|
let type = schema.nodes[array[i2]];
|
|
169114
169768
|
if (!type || type.hasRequiredAttrs())
|
|
169115
169769
|
break;
|
|
169116
|
-
content =
|
|
169770
|
+
content = Fragment54.from(type.create(array[i2 + 1], content));
|
|
169117
169771
|
openStart++;
|
|
169118
169772
|
openEnd++;
|
|
169119
169773
|
}
|
|
@@ -170972,7 +171626,7 @@ function isMarkChange(cur, prev) {
|
|
|
170972
171626
|
let updated = [];
|
|
170973
171627
|
for (let i2 = 0; i2 < prev.childCount; i2++)
|
|
170974
171628
|
updated.push(update(prev.child(i2)));
|
|
170975
|
-
if (
|
|
171629
|
+
if (Fragment54.from(updated).eq(cur))
|
|
170976
171630
|
return { mark, type };
|
|
170977
171631
|
}
|
|
170978
171632
|
function looksLikeBackspace(old, start, end, $newStart, $newEnd) {
|
|
@@ -172122,10 +172776,10 @@ function deleteBarrier(state, $cut, dispatch, dir) {
|
|
|
172122
172776
|
let canDelAfter = !isolated && $cut.parent.canReplace($cut.index(), $cut.index() + 1);
|
|
172123
172777
|
if (canDelAfter && (conn = (match2 = before.contentMatchAt(before.childCount)).findWrapping(after.type)) && match2.matchType(conn[0] || after.type).validEnd) {
|
|
172124
172778
|
if (dispatch) {
|
|
172125
|
-
let end = $cut.pos + after.nodeSize, wrap2 =
|
|
172779
|
+
let end = $cut.pos + after.nodeSize, wrap2 = Fragment54.empty;
|
|
172126
172780
|
for (let i2 = conn.length - 1; i2 >= 0; i2--)
|
|
172127
|
-
wrap2 =
|
|
172128
|
-
wrap2 =
|
|
172781
|
+
wrap2 = Fragment54.from(conn[i2].create(null, wrap2));
|
|
172782
|
+
wrap2 = Fragment54.from(before.copy(wrap2));
|
|
172129
172783
|
let tr2 = state.tr.step(new ReplaceAroundStep($cut.pos - 1, end, $cut.pos, end, new Slice2(wrap2, 1, 0), conn.length, true));
|
|
172130
172784
|
let $joinAt = tr2.doc.resolve(end + 2 * conn.length);
|
|
172131
172785
|
if ($joinAt.nodeAfter && $joinAt.nodeAfter.type == before.type && canJoin(tr2.doc, $joinAt.pos))
|
|
@@ -172154,9 +172808,9 @@ function deleteBarrier(state, $cut, dispatch, dir) {
|
|
|
172154
172808
|
afterDepth++;
|
|
172155
172809
|
if (at.canReplace(at.childCount, at.childCount, afterText.content)) {
|
|
172156
172810
|
if (dispatch) {
|
|
172157
|
-
let end =
|
|
172811
|
+
let end = Fragment54.empty;
|
|
172158
172812
|
for (let i2 = wrap2.length - 1; i2 >= 0; i2--)
|
|
172159
|
-
end =
|
|
172813
|
+
end = Fragment54.from(wrap2[i2].copy(end));
|
|
172160
172814
|
let tr2 = state.tr.step(new ReplaceAroundStep($cut.pos - wrap2.length, $cut.pos + after.nodeSize, $cut.pos + afterDepth, $cut.pos + after.nodeSize - afterDepth, new Slice2(end, wrap2.length, 0), 0, true));
|
|
172161
172815
|
dispatch(tr2.scrollIntoView());
|
|
172162
172816
|
}
|
|
@@ -172273,9 +172927,9 @@ function wrapRangeInList(tr2, range, listType, attrs = null) {
|
|
|
172273
172927
|
return true;
|
|
172274
172928
|
}
|
|
172275
172929
|
function doWrapInList(tr2, range, wrappers, joinBefore, listType) {
|
|
172276
|
-
let content =
|
|
172930
|
+
let content = Fragment54.empty;
|
|
172277
172931
|
for (let i2 = wrappers.length - 1; i2 >= 0; i2--)
|
|
172278
|
-
content =
|
|
172932
|
+
content = Fragment54.from(wrappers[i2].type.create(wrappers[i2].attrs, content));
|
|
172279
172933
|
tr2.step(new ReplaceAroundStep(range.start - (joinBefore ? 2 : 0), range.end, range.start, range.end, new Slice2(content, 0, 0), wrappers.length, true));
|
|
172280
172934
|
let found2 = 0;
|
|
172281
172935
|
for (let i2 = 0; i2 < wrappers.length; i2++)
|
|
@@ -172309,7 +172963,7 @@ function liftListItem(itemType) {
|
|
|
172309
172963
|
function liftToOuterList(state, dispatch, itemType, range) {
|
|
172310
172964
|
let tr2 = state.tr, end = range.end, endOfList = range.$to.end(range.depth);
|
|
172311
172965
|
if (end < endOfList) {
|
|
172312
|
-
tr2.step(new ReplaceAroundStep(end - 1, endOfList, end, endOfList, new Slice2(
|
|
172966
|
+
tr2.step(new ReplaceAroundStep(end - 1, endOfList, end, endOfList, new Slice2(Fragment54.from(itemType.create(null, range.parent.copy())), 1, 0), 1, true));
|
|
172313
172967
|
range = new NodeRange(tr2.doc.resolve(range.$from.pos), tr2.doc.resolve(endOfList), range.depth);
|
|
172314
172968
|
}
|
|
172315
172969
|
const target = liftTarget(range);
|
|
@@ -172333,10 +172987,10 @@ function liftOutOfList(state, dispatch, range) {
|
|
|
172333
172987
|
return false;
|
|
172334
172988
|
let atStart = range.startIndex == 0, atEnd = range.endIndex == list.childCount;
|
|
172335
172989
|
let parent = $start.node(-1), indexBefore = $start.index(-1);
|
|
172336
|
-
if (!parent.canReplace(indexBefore + (atStart ? 0 : 1), indexBefore + 1, item.content.append(atEnd ?
|
|
172990
|
+
if (!parent.canReplace(indexBefore + (atStart ? 0 : 1), indexBefore + 1, item.content.append(atEnd ? Fragment54.empty : Fragment54.from(list))))
|
|
172337
172991
|
return false;
|
|
172338
172992
|
let start = $start.pos, end = start + item.nodeSize;
|
|
172339
|
-
tr2.step(new ReplaceAroundStep(start - (atStart ? 1 : 0), end + (atEnd ? 1 : 0), start + 1, end - 1, new Slice2((atStart ?
|
|
172993
|
+
tr2.step(new ReplaceAroundStep(start - (atStart ? 1 : 0), end + (atEnd ? 1 : 0), start + 1, end - 1, new Slice2((atStart ? Fragment54.empty : Fragment54.from(list.copy(Fragment54.empty))).append(atEnd ? Fragment54.empty : Fragment54.from(list.copy(Fragment54.empty))), atStart ? 0 : 1, atEnd ? 0 : 1), atStart ? 0 : 1));
|
|
172340
172994
|
dispatch(tr2.scrollIntoView());
|
|
172341
172995
|
return true;
|
|
172342
172996
|
}
|
|
@@ -172354,8 +173008,8 @@ function sinkListItem(itemType) {
|
|
|
172354
173008
|
return false;
|
|
172355
173009
|
if (dispatch) {
|
|
172356
173010
|
let nestedBefore = nodeBefore.lastChild && nodeBefore.lastChild.type == parent.type;
|
|
172357
|
-
let inner =
|
|
172358
|
-
let slice2 = new Slice2(
|
|
173011
|
+
let inner = Fragment54.from(nestedBefore ? itemType.create() : null);
|
|
173012
|
+
let slice2 = new Slice2(Fragment54.from(itemType.create(null, Fragment54.from(parent.type.create(null, inner)))), nestedBefore ? 3 : 1, 0);
|
|
172359
173013
|
let before = range.start, after = range.end;
|
|
172360
173014
|
dispatch(state.tr.step(new ReplaceAroundStep(before - (nestedBefore ? 3 : 1), after, before, after, slice2, 1, true)).scrollIntoView());
|
|
172361
173015
|
}
|
|
@@ -172986,7 +173640,7 @@ function inputRulesPlugin(props2) {
|
|
|
172986
173640
|
if (typeof text2 === "string") {
|
|
172987
173641
|
text2 = text2;
|
|
172988
173642
|
} else {
|
|
172989
|
-
text2 = getHTMLFromFragment(
|
|
173643
|
+
text2 = getHTMLFromFragment(Fragment54.from(text2), state.schema);
|
|
172990
173644
|
}
|
|
172991
173645
|
const { from: from2 } = simulatedInputMeta;
|
|
172992
173646
|
const to = from2 + text2.length;
|
|
@@ -173345,7 +173999,7 @@ function pasteRulesPlugin(props2) {
|
|
|
173345
173999
|
if (typeof text2 === "string") {
|
|
173346
174000
|
text2 = text2;
|
|
173347
174001
|
} else {
|
|
173348
|
-
text2 = getHTMLFromFragment(
|
|
174002
|
+
text2 = getHTMLFromFragment(Fragment54.from(text2), state.schema);
|
|
173349
174003
|
}
|
|
173350
174004
|
const { from: from3 } = simulatedPasteMeta;
|
|
173351
174005
|
const to2 = from3 + text2.length;
|
|
@@ -174046,7 +174700,7 @@ function elementFromString(value) {
|
|
|
174046
174700
|
return removeWhitespaces(html);
|
|
174047
174701
|
}
|
|
174048
174702
|
function createNodeFromContent(content, schema, options) {
|
|
174049
|
-
if (content instanceof Node2 || content instanceof
|
|
174703
|
+
if (content instanceof Node2 || content instanceof Fragment54) {
|
|
174050
174704
|
return content;
|
|
174051
174705
|
}
|
|
174052
174706
|
options = {
|
|
@@ -174060,7 +174714,7 @@ function createNodeFromContent(content, schema, options) {
|
|
|
174060
174714
|
try {
|
|
174061
174715
|
const isArrayContent = Array.isArray(content) && content.length > 0;
|
|
174062
174716
|
if (isArrayContent) {
|
|
174063
|
-
return
|
|
174717
|
+
return Fragment54.fromArray(content.map((item) => schema.nodeFromJSON(item)));
|
|
174064
174718
|
}
|
|
174065
174719
|
const node = schema.nodeFromJSON(content);
|
|
174066
174720
|
if (options.errorOnInvalidContent) {
|
|
@@ -174205,7 +174859,7 @@ var insertContentAt = (position, value, options) => ({ tr: tr2, dispatch, editor
|
|
|
174205
174859
|
if (isOnlyTextContent) {
|
|
174206
174860
|
if (Array.isArray(value)) {
|
|
174207
174861
|
newContent = value.map((v2) => v2.text || "").join("");
|
|
174208
|
-
} else if (value instanceof
|
|
174862
|
+
} else if (value instanceof Fragment54) {
|
|
174209
174863
|
let text2 = "";
|
|
174210
174864
|
value.forEach((node) => {
|
|
174211
174865
|
if (node.text) {
|
|
@@ -175004,10 +175658,10 @@ var splitListItem = (typeOrName, overrideAttrs = {}) => ({ tr: tr2, state, dispa
|
|
|
175004
175658
|
return false;
|
|
175005
175659
|
}
|
|
175006
175660
|
if (dispatch) {
|
|
175007
|
-
let wrap2 =
|
|
175661
|
+
let wrap2 = Fragment54.empty;
|
|
175008
175662
|
const depthBefore = $from.index(-1) ? 1 : $from.index(-2) ? 2 : 3;
|
|
175009
175663
|
for (let d2 = $from.depth - depthBefore; d2 >= $from.depth - 3; d2 -= 1) {
|
|
175010
|
-
wrap2 =
|
|
175664
|
+
wrap2 = Fragment54.from($from.node(d2).copy(wrap2));
|
|
175011
175665
|
}
|
|
175012
175666
|
const depthAfter = $from.indexAfter(-1) < $from.node(-2).childCount ? 1 : $from.indexAfter(-2) < $from.node(-3).childCount ? 2 : 3;
|
|
175013
175667
|
const newNextTypeAttributes2 = {
|
|
@@ -175015,7 +175669,7 @@ var splitListItem = (typeOrName, overrideAttrs = {}) => ({ tr: tr2, state, dispa
|
|
|
175015
175669
|
...overrideAttrs
|
|
175016
175670
|
};
|
|
175017
175671
|
const nextType2 = ((_a = type.contentMatch.defaultType) === null || _a === void 0 ? void 0 : _a.createAndFill(newNextTypeAttributes2)) || void 0;
|
|
175018
|
-
wrap2 = wrap2.append(
|
|
175672
|
+
wrap2 = wrap2.append(Fragment54.from(type.createAndFill(null, nextType2) || void 0));
|
|
175019
175673
|
const start = $from.before($from.depth - (depthBefore - 1));
|
|
175020
175674
|
tr2.replace(start, $from.after(-depthAfter), new Slice2(wrap2, 4 - depthBefore, 0));
|
|
175021
175675
|
let sel = -1;
|
|
@@ -177316,9 +177970,9 @@ function beforeinput(view, event) {
|
|
|
177316
177970
|
let insert2 = $from.parent.contentMatchAt($from.index()).findWrapping(view.state.schema.nodes.text);
|
|
177317
177971
|
if (!insert2)
|
|
177318
177972
|
return false;
|
|
177319
|
-
let frag =
|
|
177973
|
+
let frag = Fragment54.empty;
|
|
177320
177974
|
for (let i2 = insert2.length - 1; i2 >= 0; i2--)
|
|
177321
|
-
frag =
|
|
177975
|
+
frag = Fragment54.from(insert2[i2].createAndFill(null, frag));
|
|
177322
177976
|
let tr2 = view.state.tr.replace($from.pos, $from.pos, new Slice2(frag, 0, 0));
|
|
177323
177977
|
tr2.setSelection(TextSelection.near(tr2.doc.resolve($from.pos + 1)));
|
|
177324
177978
|
view.dispatch(tr2);
|
|
@@ -180952,7 +181606,7 @@ function requireUseSyncExternalStoreShim_development() {
|
|
|
180952
181606
|
return x === y2 && (x !== 0 || 1 / x === 1 / y2) || x !== x && y2 !== y2;
|
|
180953
181607
|
}
|
|
180954
181608
|
var objectIs = typeof Object.is === "function" ? Object.is : is;
|
|
180955
|
-
var
|
|
181609
|
+
var useState95 = React$1.useState, useEffect100 = React$1.useEffect, useLayoutEffect11 = React$1.useLayoutEffect, useDebugValue2 = React$1.useDebugValue;
|
|
180956
181610
|
var didWarnOld18Alpha = false;
|
|
180957
181611
|
var didWarnUncachedGetSnapshot = false;
|
|
180958
181612
|
function useSyncExternalStore7(subscribe, getSnapshot, getServerSnapshot) {
|
|
@@ -180974,7 +181628,7 @@ function requireUseSyncExternalStoreShim_development() {
|
|
|
180974
181628
|
}
|
|
180975
181629
|
}
|
|
180976
181630
|
}
|
|
180977
|
-
var _useState =
|
|
181631
|
+
var _useState = useState95({
|
|
180978
181632
|
inst: {
|
|
180979
181633
|
value,
|
|
180980
181634
|
getSnapshot
|