efficient-web-builder 73.0.0 → 73.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/editor/components/storefront-editor.css +5 -4
- package/dist/editor/lib/document/controls.d.ts +1 -0
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/document/passes/inspector.js +1 -1
- package/dist/format/lib/content/part-names.d.ts +27 -0
- package/dist/format/lib/content/part-names.js +1 -0
- package/dist/format/lib/content/section-css.d.ts +3 -0
- package/dist/format/lib/content/section-css.js +1 -0
- package/dist/format/lib/document/passes/types.d.ts +1 -0
- package/dist/format/lib/editor-words-catalogue.d.ts +2 -0
- package/dist/format/lib/editor-words-catalogue.js +1 -1
- package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
- package/dist/render/components/BlockFrame.d.ts +3 -1
- package/dist/render/components/BlockFrame.js +1 -1
- package/dist/render/components/Btn.d.ts +3 -0
- package/dist/render/components/Btn.js +1 -1
- package/dist/render/components/ButtonBlock.js +1 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/Grid.js +1 -1
- package/dist/render/components/Heading.js +1 -1
- package/dist/render/components/HeroArrows.d.ts +4 -1
- package/dist/render/components/HeroArrows.js +1 -1
- package/dist/render/components/HeroPictures.js +1 -1
- package/dist/render/components/HeroPoster.js +1 -1
- package/dist/render/components/HeroSection.js +1 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/components/ImageBlock.js +1 -1
- package/dist/render/components/Logo.d.ts +3 -1
- package/dist/render/components/Logo.js +1 -1
- package/dist/render/components/LogoBlock.js +1 -1
- package/dist/render/components/SiteGutterFrame.d.ts +3 -1
- package/dist/render/components/SiteGutterFrame.js +1 -1
- package/dist/render/components/Text.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
- package/dist/render/lib/document/custom-css.d.ts +4 -2
- package/dist/render/lib/document/custom-css.js +2 -2
- package/dist/render/lib/document/passes/index.js +1 -1
- package/dist/render/lib/document/passes/section-custom-css.d.ts +2 -0
- package/dist/render/lib/document/passes/section-custom-css.js +1 -0
- package/dist/render/lib/document/section-css-style.d.ts +4 -0
- package/dist/render/lib/document/section-css-style.js +1 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 73.1.0 - 2026-11-19
|
|
4
|
+
|
|
5
|
+
From main at `1d788e30`: #806, #807.
|
|
6
|
+
|
|
7
|
+
A minor: every section gets one Custom CSS box, and the parts the sections draw carry fixed `data-part` names. The `efficient-easel` peer floor moves to `^37.1.0` (the panel's Advanced band). New exports; one new optional prop. No stored key or value moves.
|
|
8
|
+
|
|
9
|
+
**For hosts:**
|
|
10
|
+
- Install `efficient-easel` 37.1.0 or later with this release.
|
|
11
|
+
- A section with no Custom CSS draws exactly what it drew before. A section with Custom CSS draws one wrapper (`data-sf-section-css="<id>"`) with its scoped `<style>` first; the style is loaded lazily and suspends with its section, so a host that streams (the storefront) gets the `<style>` in the server HTML. `renderToString` of a section that has Custom CSS throws.
|
|
12
|
+
- storefront-blocks: its own parts import their names from `PART_NAMES` (follow-up PR).
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **A Custom CSS box on every section**, in the settings panel's Advanced band. It is for one-off values on one site. The CSS is stored verbatim in the section's `customCss` prop and limited at draw time by the one scoper Custom HTML uses (`scopeCustomCss`, now with a scope attribute): selectors are prefixed with the section's scope; `http:`, `data:`, `//host` and `@import` are dropped. `customCss` is carried when a legacy section becomes a Box and when a HeroSingle becomes a Hero. (#807)
|
|
17
|
+
- **Frozen part names.** One list, `src/lib/content/part-names.ts` (`PART_NAMES`); every block draws its parts with `data-part="..."` from it (Box, Grid, Hero, HeroSlide, HeroSingle, ImageBlock, ButtonBlock, Text, Heading, LogoBlock). After this release a name does not change. (#807)
|
|
18
|
+
|
|
19
|
+
### Guards
|
|
20
|
+
|
|
21
|
+
- ui-check turns on `spacing`, `font-size`, `shadow`, `own-text`, `own-badge`, `hand-motion` and `shell-part-copy`, with `includeValues: ["src/**"]` (checker `efficient-shell` 13.25.0, dev only). `scripts/test-editor-css-tokens.ts` is deleted: the ui-check counts the same values. (#806)
|
|
22
|
+
|
|
3
23
|
## 73.0.0 - 2026-11-19
|
|
4
24
|
|
|
5
25
|
From main at `e3945738`: #792, #793, #798, #800, #801, #802, #803.
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
* sheet, or the shell's tokens resolve to nothing.
|
|
29
29
|
*
|
|
30
30
|
* NO COLOUR LITERAL AND NO LITERAL RADIUS IN A CHROME RULE
|
|
31
|
-
* (`
|
|
31
|
+
* (`pnpm run test:own-ui`: the ui-check counts every literal colour, radius,
|
|
32
|
+
* size and face in this sheet, and its baseline only goes down). Two regions are not chrome and are
|
|
32
33
|
* marked `@tokens canvas-begin/end` and `@tokens output-begin/end`: rules that
|
|
33
34
|
* paint inside the canvas frame (the website being edited, where no token is
|
|
34
35
|
* defined), and the section covers' palette (a miniature of a section, output).
|
|
@@ -329,7 +330,7 @@
|
|
|
329
330
|
the admin's catalog; it is not chrome and does not follow the shell theme,
|
|
330
331
|
exactly as the canvas paper stays white (UI-24 leaves rendered output its own
|
|
331
332
|
look). The card around a cover is easel's `.es-add-*` chrome, on shell tokens.
|
|
332
|
-
|
|
333
|
+
Its literal colours are held in `ui-kit.baseline.json`. */
|
|
333
334
|
.sf-thumb {
|
|
334
335
|
--sf-thumb-card: #ffffff;
|
|
335
336
|
--sf-thumb-thumb-bg: #fcfdff;
|
|
@@ -511,8 +512,8 @@
|
|
|
511
512
|
INSIDE the canvas frame, on the website being edited: that document has no
|
|
512
513
|
`.es-editor` root, so no shell or `--es-*` token is defined there, and each
|
|
513
514
|
colour carries its own fallback (see the note at B below). Harness UI-24
|
|
514
|
-
leaves the canvas to the page;
|
|
515
|
-
|
|
515
|
+
leaves the canvas to the page; its literal colours are held in
|
|
516
|
+
`ui-kit.baseline.json`. */
|
|
516
517
|
|
|
517
518
|
/* ── One dashed outline on hover, not a field of them (card 66395) ─────────
|
|
518
519
|
The owner, 2026-09-01: hovering a section shows too many dashed lines. He
|
|
@@ -298,6 +298,7 @@ export declare function stickFields(opts?: {
|
|
|
298
298
|
type StickNumberKey = "stickTopDistance" | typeof SECTION_PIN_SCREENS_KEY;
|
|
299
299
|
export declare function followedStickPatch(view: PanelView, props: Record<string, unknown>, next: unknown, base?: StickNumberKey, intro?: boolean): Record<string, unknown> | null;
|
|
300
300
|
export declare function anchorFields(): Record<string, CustomField<undefined> | CustomField<HidableValue>>;
|
|
301
|
+
export declare function customCssFields(): Record<string, CustomField<undefined> | CustomField<string>>;
|
|
301
302
|
export declare function dateTime(label: string, icon?: ReactNode, hint?: string): CustomField<string>;
|
|
302
303
|
export declare function date(label: string, icon?: ReactNode, hint?: string): CustomField<string>;
|
|
303
304
|
export declare function toggle(label: string, fallback: boolean, icon?: ReactNode, hint?: string): CustomField<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as i,jsxs as A,Fragment as L}from"react/jsx-runtime";import{HERO_FOCUS as An,HERO_MEDIA_TYPES as Ln}from"../../../format/lib/hero-media-layout.js";import{cloneElement as xe,createContext as kn,useContext as st,useEffect as Fn,useId as lt,useRef as J,useState as Z}from"react";import{useEasel as re,useSelectedHost as G}from"efficient-easel/easel";import{PIN_LENGTH as ie,toDateKey as Dn,fromDateKey as Bn}from"efficient-shell/format";import{say as a,editorEaselWords as x}from"../../../format/lib/editor-words.js";import{finiteNumber as V}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as at,firstFrameHint as vn,loadingShowsOf as Hn,loadingStillHint as Gn}from"../../../format/lib/hero-video.js";import{pageFramesFor as Mn,usePageVideoFrames as Un}from"../page-video-frames.js";import{ScreenDocumentContext as Wn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as ct,hidableText as ut}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Oe,LINK_FIELD_MARKER as dt,MEDIA_FIELD_MARKER as Ie,SCAFFOLD_FIELD_MARKER as pt,TEXT_FIELD_MARKER as N,foldMetaOf as Ee,textFieldIdentifier as Kn}from"efficient-easel/draw";import Xn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as ft}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as $n,CARD_IMAGE_RADIUS_ROW as ht,CARD_IMAGE_RADIUS_STEP as jn,CORNER_RADIUS_MAX as Re,CORNER_RADIUS_MIN as k}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Vn,IMAGE_CORNERS_LABEL as Yn,IMAGE_CORNERS_ROW as zn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as qn,GRID_MAX_ROW_SPAN as mt,GRID_MAX_TILE_AT as Jn,GRID_MOBILE_MAX_COLUMNS as Zn,GRID_TILE_AT_KEY as Qn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as eo,GALLERY_LAYOUTS as Te,GALLERY_LAYOUT_KEYS as to,GALLERY_PHONE_LAYOUTS as no,galleryChoices as gt,galleryLayoutRatio as oo,galleryPictureCells as ro}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as io}from"./shell-glyph.js";import{anchorSiblingsOf as so,placementPoints as lo}from"../../../format/lib/hero-group-placement.js";import ao from"../../components/AnchorField.js";import co from"../../components/SourceStatus.js";import{AdjustIcon as uo,EyeIcon as po,AnimationIcon as fo,BackgroundIcon as bt,BorderAllIcon as ho,BlockSectionIcon as mo,ColumnWidthsIcon as se,ColumnsIcon as wt,CornerIcon as St,DirectionDownIcon as go,DirectionLeftIcon as bo,DirectionRightIcon as wo,DirectionUpIcon as So,EditIcon as _o,GapIcon as Co,GridIcon as _t,GroundIcon as Ne,HashIcon as Ct,HeightIcon as le,ImageIcon as yo,ListIcon as xo,LocationIcon as yt,PaddingBottomIcon as xt,PaddingLeftIcon as Ot,PaddingRightIcon as It,PaddingTopIcon as Pe,PageIcon as Oo,StickyIcon as Et,SearchIcon as Io,SquareIcon as Eo,TypeIcon as Ro,WidthIcon as To}from"efficient-easel/icons";import{FieldGlyph as Rt}from"../../components/FieldGlyph.js";import{resolvePageBackground as No}from"../../../format/lib/content/page-background.js";import{BOX_FILL_FADE_PROP as Po,BOX_FILL_FADES as Ao,BOX_SWATCH_PROP as Lo,boxFillFadeOf as Tt,boxFillOf as ko,boxFillSlot as Ae,boxPaintOf as Fo}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as Nt,CORNER_SIDE_POINTS as Do,SECTION_CORNERS_ROW as Pt,hasOwnSectionCorners as Bo,normalizeCornerSides as At}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as Lt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as vo,enclosingSection as Ho}from"./enclosing-section.js";import{SettingsDefaultReset as O,SettingsDrill as Go,SettingsField as _,SettingsGroup as Mo,SettingsSegmented as Uo,SettingsBorder as Wo,SettingsSidesEach as Ko,SettingsSwitch as Le,borderSides as Xo,borderStartEach as $o}from"efficient-easel/panel";import{ListField as jo}from"efficient-easel/fields";import{DisplayChips as Vo}from"efficient-shell/ui";import{desktopDisplayChanged as Yo,partShownOnDesktop as zo,partShownOnPhone as qo,phoneDisplayChanged as Jo,withDesktopPart as Zo,withPhonePart as Qo}from"../../../format/lib/content/part-display.js";import{ColorSwatch as er,CornersInput as tr,DatePicker as nr,DateTimePicker as or,FOCAL_DEFAULT as rr,IconPicker as kt,COLUMN_COUNT_MAX as Ft,COLUMN_SHARE_MIN as ir,COLUMN_SHARES_EQUAL as sr,resolveColumnShares as Dt,WidthsBar as lr,useShellStrings as ar,IconButton as Bt,InputNumber as vt,Slider as cr,Tooltip as ke}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as ur}from"./geocode-resolve.js";import{ColourRow as ae,InheritedColourRow as Ht}from"./ColourControl.js";import{fillThemeColors as dr,slotFill as ce}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Fe}from"../../../format/lib/document/part-inks.js";import{keptByRow as De}from"efficient-easel/screen/lib/document/style-fields";import Gt from"./MarkupToolbar.js";import{deviceField as y}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as pr,NoControlMark as fr,noControlField as Mt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as hr}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as mr,PANEL_ONLY_FIELD as gr}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as br,resolvePhoneValue as Be}from"../../../format/lib/document/phone-override.js";import{phoneKey as v,tabletKey as ve,viewKeyAt as He}from"efficient-easel/draw";import{viewKey as I}from"../../../format/lib/animation/views.js";import{viewRows as M}from"../animation/view-rows.js";import{SuppressibleText as wr}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Sr,CARD_OUTLINE_OPTIONS as _r,DEFAULT_CARD_INDEX_FORMAT as Cr,DEFAULT_CARD_OUTLINE as yr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as xr,DEFAULT_COVER_INDEX as Or}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Ir}from"efficient-easel/draw";import Er from"../../components/MediaUploadField.js";import Rr from"../../components/MultiSelectField.js";import Tr from"../../components/SectionThemePicker.js";import Nr from"../../components/SearchSelectField.js";import Pr from"../../components/StorefrontLinkField.js";import{UiIcon as Ut}from"efficient-easel/draw/client";import{SECTION_PADDING as P}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Ar}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Lr}from"efficient-easel/draw/client";import{encodePartId as kr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Fr,useEaselStrings as Dr}from"efficient-easel/strings";import{hasPhoneHeight as Br,hasTabletHeight as Ge,resolveSectionMinHeight as vr,resolveTabletHeight as Hr}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as Gr,SECTION_PIN_ABOVE_HINT as Mr,SECTION_PIN_ABOVE_KEY as Ur,SECTION_PIN_ABOVE_LABEL as Wr,SECTION_PIN_GROUP as Kr,SECTION_PIN_LABEL as Wt,SECTION_PIN_SCREENS_KEY as Me,SECTION_PIN_SCREENS_LABEL as Kt,SECTION_PIN_STOP_DEFAULT as Xr,SECTION_PIN_STOP_HINT as $r,SECTION_PIN_STOP_KEY as jr,SECTION_PIN_STOP_LABEL as Vr,SECTION_PIN_STOP_OPTIONS as Yr,SECTION_STICK_DISTANCE as U,SECTION_STICK_DISTANCE_ROW as Ue,SOME_VIEW_PINS as Xt,hasPhoneStick as zr,hasTabletStick as qr,resolveSectionStick as ue,sectionPinStopOf as Jr,sectionPinStopWrite as Zr}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as Qr}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as ei,SECTION_MIN_HEIGHT as ti,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as ni}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as oi,resolveContainerDirection as $t}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as ri,BOX_BLOCK_SPACING_POINTS as jt,BOX_PHONE_ROW_LABEL as Vt,BOX_COLUMNS_MAX as ii,BOX_COLUMNS_MIN as Yt,BOX_PHONE_ROW_MAX as si,BOX_PHONE_ROW_MIN as We,BOX_SHARE_CHOICES as zt,BOX_SHARE_LABEL as Y,boxShareChoiceOf as qt,boxShareWidthsOf as Ke,BOX_SHARE_PHONE_DEFAULT as li,BOX_SHARE_PHONE_POINTS as ai}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as W}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Jt,BORDER_SIDES as ci,SECTION_BORDER_ROW as Zt,borderBySide as Qt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as ui,normalizeTheme as en,normalizeThemeColors as di,sectionBandTone as pi,surfaceTwoTone as fi}from"../../../format/lib/theme.js";import{CONTAINER_GAP as tn,CONTAINER_GAP_BUILT_IN as hi,CONTAINER_GAP_PHONE as Xe,GAP_FIELD_CONTAINER as $e,followsSitePhoneGap as mi,hasOwnContainerGap as gi,hasOwnPhoneGap as je,resolveContainerGap as nn,resolvePhoneContainerGap as on}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as bi,CARD_IMAGE_BG_OFF as wi,CARD_IMAGE_BG_SWATCH_NAMES as Si,CARD_IMAGE_BG_SWATCHES as _i,isCardImageBackgroundInheriting as Ci,cardImageBackgroundChoice as yi,THEME_CARD_IMAGE_BG as xi}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Oi,SECTION_BG_NO_FILL as Ii,sectionBackgroundChoice as Ei,THEME_SECTION_BG as Ve,isSectionBackgroundEmpty as Ri,sectionBackgroundHex as rn}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Ti,nestedAccentValue as sn,resolveSectionAccent as de}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Ni,TYPE_SIZE_INHERIT as Pi,isTypeSizeInheriting as Ai}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Li,WIDTH_CHOICE_LABEL as ki,WIDTH_INHERIT as Fi}from"../../../format/lib/content/section-width.js";import{useEaselSession as Di}from"efficient-easel/screen/lib/session-context";import{backendOf as Bi}from"../website-session.js";import{BOX_GAP as vi,describedAs as F,group as R,iconOf as z,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as ln,onDesktopWords as K,phoneTwinFields as Ye,saidAlignmentGrid as Hi,useLengthUnit as Gi}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as Mi,PICTURE_PICKER_ROW as Ui,directionField as Wi,gapField as ze,iconPickerRow as an,lengthUnitFields as pe,pickerCellIcon as Ki,pickerNoneIcon as Xi,Segmented as fe,select as D,slider as H}from"./box-fields.js";import{VIEW_ABOVE as qe}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as cn,viewOfTier as $i}from"../../../format/lib/content/view-tier.js";import{ownEntry as ji}from"../../../format/lib/own-entry.js";import{LAYOUT_CELL as Vi,galleryPhonePicture as un}from"./choice-pictures.js";function nc({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function X(e,t){return a("{value} from {from}",{value:e,from:t})}function Yi(){const{blockGap:e}=W();return e===null?a("this container's own spacing"):X(`${e}px`,a("Styles"))}function zi({inherited:e,onReset:t,label:n}){return i(O,{words:x()?.panel,label:a(n),changed:!e,detail:Yi(),onReset:t})}function qi(e){return ze({...vi,builtIn:hi[e],resolve:(t,n)=>nn(e,t,n?.siteGap),action:(t,n)=>i(zi,{inherited:!gi(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[$e]:e}})}function Ji(e){return ft(y("mobile",{[$e]:e,type:"custom",render:t=>i(es,{container:e,...t})}),dn)}function Zi(e){return ft(y("tablet",{[$e]:e,type:"custom",render:t=>i(Qi,{container:e,...t})}),dn)}const dn={not:{field:"gap",in:Array.from({length:-tn.min},(e,t)=>tn.min+t)}};function oc(e){return{gap:y("desktop",qi(e)),[ve("gap")]:Zi(e),[v("gap")]:Ji(e)}}function Qi({container:e,...t}){const[n]=T("gap"),{siteGap:o}=t.field??{},r=Math.max(Xe.min,nn(e,n,o));return ze({...Xe,builtIn:r,resolve:s=>je(s)?s:r,action:(s,c)=>i(O,{words:x()?.panel,label:a("Gap"),changed:je(s),detail:K(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function es({container:e,...t}){const[n]=T("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},l=on(e,void 0,n,o,r);return ze({...Xe,builtIn:l,resolve:c=>on(e,c,n,o,r),action:(c,u)=>i(O,{words:x()?.panel,label:a("Gap"),changed:je(c),detail:X(`${l}px`,mi(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function rc(e){return Wi({offered:oi(e),fallback:$t(e,void 0),resolve:t=>$t(e,t)})}function ic(e,t){return lo(t?so(e,t):[],t)}function ts({inherited:e,onReset:t,label:n}){return i(O,{words:x()?.panel,label:a(n),changed:!e,detail:X(a("Full"),a("the page")),onReset:t})}function $({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:l,hideable:s=!0,markup:c=!0}){const{text:u,hidden:d}=ct(e),h=J(null),p=J(null),f=C=>t(s?{text:C,hidden:d}:C),m=()=>t({text:u,hidden:!d}),g=s&&d,b=lt(),S=r?ss(r)?i("span",{className:"sf-hint-while-typing",children:a(r)}):a(r):void 0,w=d?a("Show {label} on the slide",{label:a(n)}):a("Hide {label} on the slide",{label:a(n)});return i(_,{label:a(n),icon:i(Ro,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:s?i(ke,{content:w,children:i(Bt,{"aria-pressed":d,"aria-label":w,onClick:m,children:d?i(Ut,{name:"eye-off",size:14}):i(Ut,{name:"eye",size:14})})}):void 0,children:A("div",{className:"sf-copybox",children:[c&&i(Gt,{target:l?p:h,value:u,onChange:f}),l?i("textarea",{id:b,ref:p,value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)}):i("input",{id:b,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)})]})})}function sc(e,t){return{...e,[pt]:t}}function lc(e){const t=e[N];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[N]:{...t,offPage:!0}}}function ac(e){return!e||typeof e!="object"?!1:e[N]?.offPage===!0}function cc(e){if(!e[N])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[gr]:!0}}function uc(e){return mr(e)}function dc(e){const t=e[N];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[N]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as xu,SCALAR_TEXT_CONTROLS as Ou}from"efficient-easel/draw";function pc(e,t){if(!e[N])throw new Error("inOwnBox: the field holds no authored text");const{[pr]:o,...r}=e;return{...r,[hr]:!0,render:t}}const ns=new Set(Ir),he={type:"radio",options:[{value:!0},{value:!1}]},pn={text:{type:"object",objectFields:{text:{type:"text"},hidden:he}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:he}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},j=(e,t)=>{const n=F({...t,[N]:e},{...pn[e.control],label:e.label});if(!ns.has(e.control))return n;const o=t.render;return{...Mt(n,"authored-copy"),render:r=>i(wr,{name:r.name,children:o(r)})}},fc="Everything else on this block comes from the linked post. Unlink it to edit by hand.",os={field:"source.slug",set:!0},hc={not:os},rs="Select a word, then press the highlighter.",is=new Set([rs]),ss=e=>is.has(e);function mc(e,t,n){return j({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i($,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function gc(e,t,n){return j({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i($,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function bc(e,t,n){return j({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i($,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function wc(e,t,n){return j({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i($,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Sc(e){return{type:"custom",[dt]:{label:e},...F({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(Pr,{value:ut(t),onChange:n,label:e})}}function _c(e,t,n){return j({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i($,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const Cc={Design:uo,Animation:fo};function yc(e,t){return{type:"custom",render:()=>i(ls,{text:e,values:t})}}function ls({text:e,values:t}){return i("p",{className:"sf-note",children:a(e,t)})}function xc(e){return Ee(e)!==null&&e?.tabs!==void 0}const fn=new Map;function Oc(e,t){const n=`${e}\0${t?t.join(""):""}`,o=fn.get(n)??{type:"custom",tabs:t,[Oe]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(L,{})};return fn.set(n,o),o}const hn=new Map;function Ic(e){const t=hn.get(e)??{type:"custom",[Oe]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(L,{})};return hn.set(e,t),t}function as(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Ec(e,t){return as(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(L,{})}}function Rc(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(L,{})}}function Tc({title:e,children:t}){const[n,o]=Z(()=>!Je.has(e));return i(Mo,{title:e,open:n,onToggle:r=>{o(r),r?Je.delete(e):Je.add(e)},children:t})}const Je=new Set;function cs({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),l=r?o?.[r]:void 0,s=l?a(l):t;return A("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(ke,{content:u,children:i(er,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:s})]})}function Nc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(us,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function us({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const l=typeof o=="string"?o:void 0,{colors:s,n:c}=nt(),u={background:s.background,surface:s.surface,surface2:fi(s),band:pi(s)},d=n?Ve:t,h=Ri(l,t,d),p=rn(void 0,d,u),f=n?Oi:void 0,m=d===Ve?a("the theme's section background"):a("Theme {n} background",{n:c}),g=ds(l,t,s,c,u,r),b=X(p.toUpperCase(),m),S=Fe(l),w=S?ce(S,s,c):null;return w?i(ae,{label:a(e),icon:i(bt,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Ht,{label:a(e),icon:i(bt,{}),value:h?"":rn(l,t,u),inherited:p,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function ds(e,t,n,o,r,l){const s=Ei(e,t);return[{label:a("No fill"),color:"",selected:s==="none",onPick:()=>l(Ii)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:s==="band",onPick:()=>l(Ve)},...tt(Fe(e)??"",n,o,l)]}function ps(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,l=Ci(r,t);return i(_,{label:a(e),icon:i(Ne,{}),changed:!l,action:i(O,{words:x()?.panel,label:a(e),changed:!l,detail:a("the theme's image stage"),onReset:()=>o(bi)}),children:cs({swatches:_i,current:l?xi:yi(r,t),onPick:o,names:Si})})}}}function Pc(e=n=>n,t){return ee({_gSectionTheme:R(Ti),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(Tr,{value:e(n),onChange:o,followLabel:t})}})}function me(e){const t=E(),n=cn(e?.view),o=s=>He(e.valueKey,s),r=e.numbersIn??(s=>V(t[o(s)])!==void 0),l=e.followsView??Rs(n,r);return Gi({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Mi,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:l},convertTo:e.convertTo??(s=>{const c=V(t[o(n)]);return c===void 0?{}:{[o(n)]:s(c)}})})}function q({min:e,max:t,step:n,value:o,onChange:r,suffix:l="",readout:s=!0,notch:c,ariaLabel:u,disabled:d=!1,placeholder:h,placeholderWord:p,onClear:f,units:m,inputMax:g}){const b=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:b?"sf-slider has-notch":"sf-slider",style:b?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(cr,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...p?{emptyLabel:a(p)}:{},suffix:l||void 0,...m?{units:m}:{},...g!==void 0?{inputMax:g}:{},showInput:s,label:u===void 0?void 0:a(u),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:S=>{S===null?f?.():S!==o&&r(S)}})})}function fs(e,t){const{min:n,max:o,step:r=1,unsetLabel:l,hint:s,restTrack:c,unsetMark:u,icon:d,unit:h="px"}=t;return{type:"custom",render:({value:p,onChange:f})=>{const m=typeof p=="number"?p:null,g=m===null;return i(_,{label:a(e),icon:d?z(d):void 0,value:g?u||l===void 0?void 0:a(l):`${m}${h}`,changed:!g,action:u?xe(u,{changed:!g,onReset:()=>f(null)}):i(O,{words:x()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof s=="string"?a(s):s,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:f}):q({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}const te="Corners",hs={kind:"radius"};function Ze(e){return{type:"custom",render:t=>{const{value:n,onChange:o}=t,r=typeof n=="number"&&Number.isFinite(n)?n:null,l=r!==null;return i(_,{label:a(te),icon:i(St,{}),changed:l,action:xe(e.mark,{changed:l,onReset:()=>o(null)}),hint:e.hint,children:i(ms,{tier:e,px:r,name:t.name,onRadius:o})})}}}function T(e){const t=G();return[t?.values?.[e],n=>t?.onChange(e,n)]}function mn(){return Mt({type:"custom",render:()=>i(fr,{})},"always")}function ge(){const e=G();return t=>e?.onChangeMany(t)}function ms({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[l,s]=T(e.sidesKey),c=ge(),u=me({row:e.row??hs,label:te,grid:{min:k,max:Re,step:e.step??1},valueKey:n??"",view:"desktop"}),d=At(l)??[...Nt];return i(tr,{label:a(te),value:d,corners:Do,onChange:h=>{const p=At(h)??[];s(p.length===Nt.length?null:p)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??k,radiusMax:u?.grid.max??Re,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function gn(e,t){return pe(e,t)}function bn(){return mn()}function gs({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=W(),r=typeof o=="number"?`${o}px`:a("not set");return i(O,{words:x()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):X(r,a("Styles")),onReset:n})}function bs(){const{cornerRadiusPx:e}=W();return typeof e=="number"?e:k}function ws(){return Ze({sidesKey:"sectionCornerSides",row:Pt,useFollowed:bs,mark:i(gs,{label:te}),hint:Ss})}const Ss="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function Ac(){return ee({_gShape:R("Shape"),sectionCorners:ws(),...gn(Pt,"sectionCorners"),sectionCornerSides:bn(),...M("sectionBorder",Es),...pe(Zt,"sectionBorder",{tablet:!0,phone:!0})})}const _s=()=>({width:a("Border width"),sides:{top:a("Border top"),right:a("Border right"),bottom:a("Border bottom"),left:a("Border left")},style:a("Border style"),styles:{solid:a("Solid"),dashed:a("Dashed"),dotted:a("Dotted")},color:a("Border color"),unit:"px"});function Cs(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function ys(){let e;try{const t=en(W().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||ui.line}function xs({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:l=!0,above:s={},length:c}){const u=e&&typeof e=="object"?e:{},[d,h]=Z(()=>r?$o(u,s):!1),p=_s(),f=m=>Cs(r&&l?m:{width:m.width,color:m.color,...l?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(ho,{}),action:r?i(Ko,{each:d,label:a("Each side"),onChange:h}):void 0,children:i(Wo,{label:a("Border"),value:u,each:d,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...p,unit:c.unit}:p,styles:l,max:c?.grid.max??Jt,...c?{step:c.grid.step,units:c.units}:{}})})}function Os({value:e,onChange:t,view:n}){const[o]=T("sectionBorder"),[r]=T(ve("sectionBorder")),l=ys(),s=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...Qt(s(o)),...Qt(s(r))}:n==="tablet"?s(o):{},u=E(),d=ge(),h=I("sectionBorder",n),p=me({row:Zt,label:"Border",grid:{min:0,max:Jt,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>Qe(u[He("sectionBorder",f)]),convertTo:f=>{const m=s(u[h]);return Qe(m)?{[h]:Is(m,f)}:{}}});return i(xs,{value:e,length:p,onChange:p?f=>d({[h]:f,...p.unitPatch(!Qe(f))}):t,placeholder:{sides:Xo(c),style:c.style??"solid",color:c.color||l},presets:[l],above:c})}const wn=["width",...ci];function Qe(e){if(!e||typeof e!="object")return!1;const t=e;return wn.some(n=>V(t[n])!==void 0)}function Is(e,t){const n={...e};for(const o of wn){const r=V(n[o]);r!==void 0&&(n[o]=t(r))}return n}function Es(e){return{type:"custom",render:({value:t,onChange:n})=>i(Os,{value:t,onChange:n,view:e})}}function Rs(e,t){let n=qe[e];for(;n&&qe[n]!==null&&!t(n);)n=qe[n];return n??e}function Lc(e){return{type:"custom",render:()=>i(Ts,{partKey:e})}}function Ts({partKey:e}){const[t]=T("id"),[n]=T("_partStyles"),{textStyles:o}=W(),r=Dr();let l=null;try{l=Lr().select}catch{l=null}const s=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Go,{name:a("Text"),preview:Ar(s,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Fr.copy.panel).cases}),onOpen:()=>{l&&typeof t=="string"&&l(kr(t,e))}})}function Sn(e){const{cornerRadiusPx:t}=W(),n=typeof t=="number"?t:e;let o=null;try{const{appState:l,selectedItem:s}=re(u=>u),c=s?.props?.id?String(s.props.id):void 0;o=c?Ho(l?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Bo(r)?r:n}function Ns({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Sn(k);return i(O,{words:x()?.panel,label:a(e),changed:t,detail:X(`${o}px`,a("the section")),onReset:n})}function Ps(){return i(L,{children:a("Follows the section's Corners until you set a number here.")})}function As(){return Ze({sidesKey:"cardCornerSides",row:Lt,useFollowed:()=>Sn(k),mark:i(Ns,{label:te}),hint:i(Ps,{})})}function Ls(){return{type:"custom",render:()=>i(Xn,{})}}function kc(){return{_gShape:R("Shape"),cardCorners:As(),...gn(Lt,"cardCorners"),cardCornerSides:bn(),cardCornersApplyAll:Ls()}}function ks(){return F({type:"custom",[Ui]:!0,render:e=>i(Ds,{...e})},{type:"select",label:Y,options:[{value:"content",label:"Fit content"},{value:"equal",label:"Equal"},{value:[50],label:"Custom: the width of each block in %, the last block left out"}]})}function Fs(e,t){const n=qt(e);if(n!=="custom")return a(zt.find(r=>r.value===n)?.label??"");const o=Dt(Ke(e,t),t);return o?[...o,100-o.reduce((r,l)=>r+l,0)].join(" / "):a("Custom")}function Ds(e){const{value:t,onChange:n}=e,[o]=T("content"),r=Array.isArray(o)?o.length:0,l="follows"in e,s=t!=null,c=s?t:l?e.follows:void 0,u=qt(c),d=r>=2&&r<=Ft,h=()=>[...sr[r]??[]],p=J(null),f=w=>{const C=p.current;C&&JSON.stringify(w)===JSON.stringify(C.shares)?n(C.value):w&&n(w)},m=w=>{w===u||w==="custom"&&!d||n(w==="custom"?h():w)},g=a("The width bar works for 2 to {count} blocks.",{count:Ft}),b=s&&(l||t!=="content"),S=ar().widths.hint(r,ir);return i(_,{label:a(Y),icon:i(se,{}),changed:b,hint:u!=="custom"?void 0:d?S:g,action:i(O,{words:x()?.panel,label:a(Y),changed:b,disabled:e.readOnly===!0,detail:l?K(w=>a(w),Fs(e.follows,r),e.followsView):a("Fit content"),onReset:()=>n(void 0)}),children:A("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(kt,{label:a(Y),value:u,options:zt.map(w=>({value:w.value,label:w.value==="custom"&&!d?g:a(w.label),icon:Ki(i("span",{className:"sf-gallery-pic sf-share-pic",children:_n(w.weights).map((C,B)=>i("i",{style:{gridColumn:`span ${C}`}},B))}),a(w.label),w.value==="custom"&&!d?g:a(w.label))})),onChange:m,columns:3,cell:Cn,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&d?i("div",{onFocus:()=>{p.current={value:t,shares:Dt(Ke(c,r),r)}},onBlur:()=>{p.current=null},children:i(lr,{label:a(Y),count:r,value:Ke(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function _n(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function Fc(){return D(ri,i(Co,{}),jt,jt[0].value)}function Dc(){return y("mobile",an(Y,i(se,{}),ai.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:_n(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),li,{columns:2,cell:Cn}))}const Cn={width:"5.75rem",height:"3.25rem",words:!0};function Bc(){return Ye("share",ks(),ln)[ve("share")]}function Bs(){return y("mobile",H(Vt,i(wt,{}),We,si,1,We,"",{clear:{phoneFollows:!1,hint:We}}))}const yn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function vc(){const e=H(Vt,i(wt,{}),Yt,ii,1,Yt,"",{clear:{emptyLabel:"Auto"}}),t=Ye("columns",e,{...yn,tablet:ln.tablet}),n=Ye("columns",e,yn,{phoneRow:Bs()});return{...t,phoneRow:n.phoneRow}}function Hc(e,t,n,o,r,l,s){return{type:"custom",render:({value:c,onChange:u,name:d})=>i(vs,{label:e,min:t,max:n,step:o,fallback:r,role:l,value:c,onChange:u,name:d??"",length:s})}}function vs({label:e,min:t,max:n,step:o,fallback:r,role:l,value:s,onChange:c,name:u,length:d}){const h=E(),p=ge(),f=cn(d?.view),m=me({row:d?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:d?u:"",view:d?.view??"desktop",numbersIn:b=>b===f&&typeof h[u]=="number",followsView:f,convertTo:b=>typeof h[u]=="number"?{[u]:b(h[u])}:{}}),g=b=>m?p({[u]:b,...m.unitPatch(typeof b!="number")}):c(b);return i(_,{label:a(e),icon:i(Rt,{noun:l}),action:i(O,{words:x()?.panel,label:a(e),changed:!Ai(s),detail:a("the Text style in Styles"),onReset:()=>g(Pi),defaultAction:{onPress:()=>g(Ni),title:a("Keep this section's own built-in size"),icon:i(mo,{})}}),children:q({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof s=="number"?s:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function be(e,t,n){return[{label:"Auto",value:""},...Array.from({length:e},(o,r)=>({label:r===0?`1 ${t}`:`${r+1} ${n}`,value:String(r+1)}))]}function Gc(){return{_gCellWidth:R("Cell size"),gridSpan:y("desktop",D("Positions",i(se,{}),be(qn,"position","positions"),"")),gridRowSpan:y("desktop",D("Rows tall",i(le,{}),be(mt,"row","rows"),"")),[Qn]:H("At card",i(Ct,{}),1,Jn,1,1,""),[v("gridSpan")]:y("mobile",D("Positions",i(se,{}),[{label:"Full row",value:""},...be(Zn,"position","positions").slice(1)],"")),[v("gridRowSpan")]:y("mobile",D("Rows tall",i(le,{}),be(mt,"row","rows"),""))}}function E(){let e=null,t=null;try{e=st(Hs),t=re(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Hs=kn(null);function Gs({min:e,max:t,step:n,px:o,label:r,onChange:l,desktopKey:s,fallback:c}){const u=E()[s],d=Be(void 0,u,c);return i(L,{children:q({min:e,max:t,step:n,value:Be(o,u,c),readout:!1,ariaLabel:r,notch:d,onChange:l})})}function Ms({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:l=()=>{}}){const s=E()[t],c=Be(void 0,s,n);return i(O,{words:x()?.panel,label:a(e),changed:r,detail:K(u=>a(u),`${c}${o}`),onReset:l})}function Us(e){return fs(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Ms,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Gs,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Ws={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Ks={Top:Pe,Bottom:xt,Left:Ot,Right:It},Xs=e=>{const t=Ks[e];return i(t,{})};function Mc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>Ws[S],l=S=>H(r("Top"),i(Pe,{}),P.min,P.max,P.step,S,"px"),s=(S,w,C,B=P)=>y("mobile",Us({label:r(S),icon:Xs(S),desktopKey:w,min:B.min,max:B.max,step:B.step,fallback:C})),c=e.top??P.min,u=e.bottom??P.min,d="sectionPaddingLeft",h="sectionPaddingRight",p=e.sideBounds??P,f=e.side??p.min,m=e.sidePhone??f,g=e.phone===!0,b=S=>g?y("desktop",S):S;return ee({...o?{_gSpacing:R("Padding")}:{},[t]:b(l(c)),...g?{[v(t)]:s("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(H(r("Bottom"),i(xt,{}),P.min,P.max,P.step,u,"px")),...g?{[v(n)]:s("Bottom",n,u)}:{}},...e.sides?{[d]:b(H(r("Left"),i(Ot,{}),p.min,p.max,p.step,f,"px")),...g?{[v(d)]:s("Left",d,m,p)}:{},[h]:b(H(r("Right"),i(It,{}),p.min,p.max,p.step,f,"px")),...g?{[v(h)]:s("Right",h,m,p)}:{}}:{}})}function Uc(e,t){const n=Object.fromEntries(Object.entries(t).map(([l,s])=>[l,l in e&&Ee(s)?e[l]:s])),o={};let r=!1;for(const[l,s]of Object.entries(e)){if(l in t){r||Object.assign(o,n),r=!0;continue}o[l]=s}return r||Object.assign(o,n),o}const we="Width";function Wc(e,t=Li,n=!0){const o=t.map(r=>({label:ki[r],value:r}));return ee({...n?{_gWidth:R(we)}:{},widthMode:{type:"custom",render:({onChange:r,field:l})=>i(_,{label:a(we),icon:i(To,{}),action:n?i(ts,{inherited:l?.inherited??!1,onReset:()=>r(Fi),label:we}):void 0,children:fe({options:o,value:l?.currentValue||e,onChange:r,ariaLabel:we})})}})}function Kc({fill:e=!1}={}){const t=(r,l)=>({type:"custom",render:({value:s,onChange:c})=>i($s,{value:s,onChange:c,view:r,badge:l,fill:e})}),n=()=>De("sectionHeightMode"),o=()=>De("sectionHeightMode");return ee({_gHeight:R(Q),...M("sectionHeightMode",r=>r==="desktop"?t(r):t(r,l=>i(zs,{view:r,onClear:()=>l(void 0)}))),...M("sectionHeightValue",n),...M("sectionHeightUnit",o)})}function $s({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const l=E(),{mode:s,number:c,unit:u}=js(n,l,e);return i(_,{label:Q,icon:z(i(le,{})),action:o?o(t):void 0,children:A("div",{className:"es-width-stack",children:[fe({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...r?[{label:"Fill",value:"fill"}]:[]],value:s,onChange:t,ariaLabel:Q}),c?i(Ys,{view:n,mode:s,menu:u}):null]})})}function xn(e,t){return e==="phone"&&Ge(t)?Hr(t):vr(t)}function Se(e,t){return e==="desktop"||(e==="tablet"?Ge(t):Br(t))?null:xn(e,t)}function js(e,t,n){const r=(l=>ei.includes(l))(n)?n:Se(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function Vs(e,t,n,o){const r=Se(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[I("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[I("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[I("sectionHeightValue",e)]:r.value}:{},[I(n,e)]:o}}function On(e,t,n){const o=G(),r=Se(e,E());return!o||!r?{followed:null,write:n}:{followed:r,write:s=>o.onChangeMany(c=>{const u=Vs(e,c,t,s);return u===null?{[I(t,e)]:s}:Object.keys(u).length?u:null})}}function Ys({view:e,mode:t,menu:n}){const o=G(),r=E(),l=I("sectionHeightValue",e),s=I("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:d}=On(e,"sectionHeightValue",c(l)),{write:h}=On(e,"sectionHeightUnit",c(s)),p=t==="screen"?"%":r[s],f=(u?u.unit:p)==="%"?"%":"px",m=f==="%"?ni:ti,g=r[l],b=n?{options:["px","%"],label:a("Unit"),onChange:S=>h(S)}:void 0;return q({min:m.min,max:m.max,step:m.step,value:u?null:typeof g=="number"?g:m.fallback,...u?{placeholder:u.value}:{},suffix:f,...b?{units:b}:{},ariaLabel:Q,onChange:d})}function zs({view:e,onClear:t}){const n=E(),o=Se(e,n)===null,r=e==="phone"&&Ge(n),l=xn(e,n),s=K(c=>a(c),l.mode==="auto"?a("Auto"):`${l.value}${l.unit}`,r?"tablet":"desktop");return i(O,{words:x()?.panel,label:a(Q),changed:o,detail:s,onReset:t})}function Xc(e={}){const t=e.intro===!0,n=l=>({type:"custom",render:({value:s,onChange:c,id:u,name:d})=>i(nl,{value:s,onChange:c,labelId:`${u??d??"stickTop"}-label`,view:l,intro:t})}),o=l=>({type:"custom",render:({value:s,onChange:c})=>i(Qs,{value:s,onChange:c,view:l,intro:t})}),r=l=>({type:"custom",render:({value:s,onChange:c})=>i(el,{value:s,onChange:c,view:l,intro:t})});return{_gStick:R(Kr,{dot:t?Zs:Xt}),...M("stickTop",n),...M("stickTopDistance",o),...pe(Ue,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?M(Me,r):{},...t?{}:{[jr]:qs()},...t||e.above===!1?{}:{[Ur]:Js()}}}function qs(){const e=D(Vr,i(Pe,{}),Yr,Xr);return y("desktop",{...e,render:t=>{const n=e.render({...t,value:Jr(t.value),onChange:o=>t.onChange(Zr(o))});return xe(n,{hint:a($r)})}})}function Js(){const e=Rn(Wr,!1,i(Et,{}),Mr);return y("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const Zs={any:[Xt,Gr]};function In(e,t,n,o,r){const l=G(),s=E(),c=e==="desktop"||ne(e,s)?null:et(e,ue(s,{intro:o}));return{followed:c,write:(c||r)&&l?d=>l.onChangeMany(h=>{const p=tl(e,h,d,t,o),f=p===null?{[I(t,e)]:d}:p;return Object.keys(f).length?{...f,...r?.(d)??{}}:null}):n}}function Qs({value:e,onChange:t,view:n,intro:o}){const r=E(),l=ue(r,{intro:o}),s=h=>{const p=$i(h);return p==="desktop"||ne(p,r)},c=me({row:Ue,label:"Distance from top",grid:{min:U.min,max:U.max,step:U.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>s(h)&&V(r[He("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&l.ownTablet?"tablet":"desktop"}),{followed:u,write:d}=In(n,"stickTopDistance",t,o,c?h=>c.unitPatch(h===void 0):void 0);return i("div",{className:"sf-field",children:q({min:c?.grid.min??U.min,max:c?.grid.max??U.max,step:c?.grid.step??U.step,value:u?null:typeof e=="number"?e:U.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:d})})}function el({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=In(n,Me,t,o);return i(_,{label:a(Kt),icon:z(i(le,{})),children:q({min:ie.min,max:ie.max,step:ie.step,value:r?null:V(e)??ie.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Kt),onChange:l})})}function ne(e,t){return e==="tablet"?qr(t):zr(t)}function et(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function tl(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const l=et(e,ue(t,{intro:r})),s=e==="phone"&&ne("tablet",t)?h=>I(h,"tablet"):h=>h,c=(h,p)=>t[s(h)]==null?{}:{[I(h,e)]:p},u=Ue.unitKey,d=t[s(u)]==null?{}:{[I(u,e)]:l.unit};return{[I("stickTop",e)]:!0,...c("stickTopDistance",l.distance),...d,...c(Me,l.screens),[I(o,e)]:n}}function nl({value:e,onChange:t,labelId:n,view:o,intro:r}){const l=E(),s=ue(l,{intro:r}),c=o==="phone"?s.phone:o==="tablet"?s.tablet:r?s.desktop:e===!0,u=o==="phone"&&s.ownTablet,d=o==="desktop"?null:et(o,s),h=d?.on?Qr(d.distance,d.unit):a("Off");return i(_,{label:a(Wt),labelId:n,icon:z(i(Et,{})),action:A(L,{children:[o!=="desktop"?i(O,{words:x()?.panel,label:a(Wt),changed:ne(o,l),detail:K(p=>a(p),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Le,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const En="e.g. about";function $c(){return{_gAnchor:R("Anchor"),anchor:j({control:"plainText",label:"Name",placeholder:En},{type:"custom",render:({value:e,onChange:t})=>i(ao,{value:e,onChange:t,nameBox:(n,o)=>i($,{value:n,onChange:o,label:"Name",placeholder:En,hideable:!1,markup:!1})})})}}function jc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:s})=>{const c=`${l??s??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(or,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:d=>r(d?d.toISOString():"")})})}}}function Vc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:s})=>{const c=`${l??s??e}-date`;return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(nr,{id:c,value:Bn(typeof o=="string"?o:null),onChange:u=>r(u?Dn(u):"")})})}}}function Rn(e,t,n,o){return{type:"custom",...F({},{...he,label:e}),render:r=>{const{value:l,onChange:s,id:c,name:u}=r,d="follows"in r,h=r,p=typeof l=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=p?l:d?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(Le,{checked:m,onChange:s,disabled:b,ariaLabelledBy:g});return i(_,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:d?A(L,{children:[i(O,{words:x()?.panel,label:a(e),changed:p,detail:h.followsNoView?a(f?"On":"Off"):K(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>s(void 0)}),S]}):S})}}}function Yc(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(ol,{label:"Background",icon:i(Oo,{}),id:r,value:e,shown:No(e),onChange:t})}}}function zc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(ae,{label:a(e),icon:n,value:o||t,onChange:r})}}function ol({label:e,icon:t,id:n,value:o,shown:r,onChange:l}){const{colors:s,n:c}=nt(),u=Fe(o),d=u?ce(u,s,c):null;return i(ae,{label:a(e),icon:t,id:n,value:d?d.hex:r,caption:d?.words,onChange:l,choices:tt(u??"",s,c,l)})}function qc(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(rl,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function tt(e,t,n,o){const r=Ae(e);return dr(t,n).map(l=>({label:l.label,color:l.value,selected:r===l.name,onPick:()=>o(l.name)}))}function rl({value:e,onChange:t,twin:n}){const{colors:o,n:r}=nt(),l=o.background,s=X(l.toUpperCase(),a("Theme {n} background",{n:r})),[c,u]=T(Po),[d]=T(Lo),h=typeof d=="string"&&d.trim()!=="",p=Tt(c),f=oe=>u(Tt(oe)||void 0),m=Ae(e),g=m?ce(m,o,r):null,b=tt(e,o,r,t),S=n?()=>t(void 0):()=>t("");let w=l,C=s;if(n){const oe=Ae(n.follows),Ce=ko(n.follows),ye=oe?ce(oe,o,r):Ce?{hex:Ce,words:Ce.toUpperCase()}:null;w=ye?.hex??l,C=K(Pn=>a(Pn),ye?ye.words:s,n.view)}const B=!n&&(Fo(e)||h)?i(il,{value:p,onChange:f}):null;return g?i(ae,{label:a("Fill"),icon:i(Ne,{}),value:g.hex,caption:g.words,onChange:t,changed:!0,onReset:S,resetTo:C,choices:b,children:B}):i(Ht,{label:a("Fill"),icon:i(Ne,{}),value:e,inherited:w,resetTo:C,onChange:t,onReset:S,choices:b,children:B})}function il({value:e,onChange:t}){return fe({options:Ao.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:a("Fill")})}function sl(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return de(n);const r=vo(e,t);if(r.length===0)return null;const l=de(sn(n));if(l!==null)return l;for(let s=r.length-1;s>0;s-=1){const c=de(sn(r[s].sectionAccent));if(c!==null)return c}return de(r[0].sectionAccent)}function nt(){const e=en(W().theme),[t]=T("sectionAccent");let n=null;try{const{appState:r,selectedItem:l}=re(c=>c),s=l?.props?.id?String(l.props.id):void 0;n=s?sl(r?.data,s,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:di(e.themes[o]),n:o+1}}function Jc(){return mn()}const Zc={top:i(So,{}),right:i(wo,{}),bottom:i(go,{}),left:i(bo,{})};function Qc(e,t,n,o,r,l,s){const c=p=>t.find(f=>f.value===p),u=p=>({value:p,label:"",disabled:!0,title:o}),d=p=>{const f=t.find(g=>g.cell===p);if(!f)return u(`missing-${p}`);const m=l?.[p];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},h=[u("corner-top-left"),d("top"),u("corner-top-right"),d("left"),u("centre"),d("right"),u("corner-bottom-left"),d("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:f})=>{const m=t.some(g=>g.value===p)?p:n;return i(_,{label:a(e),icon:r,value:c(m)?.label?a(c(m).label):s?a(s):"",children:Hi(a,{label:e,value:m,onChange:f,points:h})})}}}function eu(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:l})=>i(Rr,{label:e,options:(l.options??t).map(s=>({...s,label:a(s.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function tu(e,t,n,o){return{type:"custom",options:t,fallback:n,...F({},{type:"select",label:e}),render:({value:r,onChange:l,field:s})=>i(Nr,{label:e,options:(s.options??t).map(c=>({...c,label:a(c.label)})),fallback:s.fallback??n,value:r,onChange:l,placeholder:o===void 0?void 0:a(o)})}}function nu(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const ll={image:"Image",video:"Video"},ou=Ln.map(e=>({label:ll[e],value:e}));function ru(e,t,n){const o=Object.keys(at).map(r=>({label:at[r],value:r,picture:n[r]}));return{type:"custom",...F({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(cl,{label:e,icon:t,options:o,onChange:r})}}function al(e,t,n){const o=vn(e,t,n);if(o!==void 0)return o==="save-makes-frame"?a("A frame is made from this video when you save the page."):o==="starts-dark"?a("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?a("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?a("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?a("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?a("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=Gn(e);return r==="frame-missing-image"?a("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?a("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?a("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?a("No image yet. The slide shows its background colour until you choose one."):void 0}function cl({label:e,icon:t,options:n,onChange:o}){const r=G(),l=r?.values??{},s=Hn(l),c=st(Wn),u=Un(c?.docId??null);let d=null;try{d=re(p=>p.appState.data)}catch{d=null}const h=Mn(r?.id,d,u);return i(_,{label:a(e),icon:z(t),hint:al(l,h,c?.hasUnsavedEdits??!1),children:fe({options:n,value:s,onChange:o,ariaLabel:e})})}function iu(e,t,n,o={}){const r={type:"custom",[Ie]:!0,render:({value:l,onChange:s,name:c})=>i(Er,{value:l||"",onChange:s,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?y("each",r):r}function su(e){return ot(e).map(t=>t.path)}function ot(e,t="",n=[]){const o=[];for(const[r,l]of Object.entries(e??{})){const s=t?`${t}.${r}`:r,c=l;if(c&&c[Ie]){o.push({path:s,field:c,along:n});continue}c?.arrayFields&&o.push(...ot(c.arrayFields,`${s}[]`,[...n,c])),c?.objectFields&&o.push(...ot(c.objectFields,s,[...n,c]))}return o}const lu={HeroSingle:[An.image],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ul(e){const t=a(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function au({value:e,onChange:t,label:n}){const o=e||{},r=G(),l=r?r.values!==r.node.props:!0,s=!!o.pending&&l,c=!!o.pending&&!l,u=!!Bi(Di()).geocode,d=lt(),h=(p,f)=>t({...o,[p]:f??void 0});return A(L,{children:[i(_,{label:a(n),icon:i(yt,{}),action:u?i(ke,{content:a("Find from the address (OpenStreetMap)"),children:i(Bt,{"aria-label":a("Find from the address"),"aria-busy":s||void 0,disabled:s,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(Io,{})})}):void 0,children:u&&o.status?i(co,{compact:!0,oneLine:!0,spaced:!1,status:s?"busy":o.ok&&!c?"found":"notfound",statusText:s?a("Finding…"):c?a(ur):a(o.status),hint:ul(o)}):null}),i(_,{label:a("Enter by hand"),labelId:d,icon:i(_o,{}),action:i(Le,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:d})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(yt,{}),children:A("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(vt,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(vt,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function dl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function pl(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,l)=>l===t?{text:n}:r)}function cu(e,t){return e===null?null:t>e?e:null}function fl(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const uu={label:"Ticker items",icon:i(xo,{})};function du(e,t,n,o){return{type:"custom",[N]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...F({},{...pn.textList,label:e}),render:({value:r,onChange:l})=>i(hl,{label:e,icon:z(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:l,markup:o==="markup"})}}function hl({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:l=!1}){const s=J(null),[c,u]=Z(null),d=p=>p.map(f=>({text:f?.text??""})),h=p=>{const f=fl(n,p,c);f===null&&(s.current=null),u(f),r(d(p))};return i(jo,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?i(Gt,{target:s,value:dl(n,c),onChange:p=>r(pl(n,c??-1,p)),disabled:c===null,label:c===null?a("Formatting — click a row first"):a("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,f,m)=>i("input",{type:"text",className:l&&c===f?"sf-list-marking":void 0,value:p?.text??"",placeholder:a(o),"aria-label":a("{label} {n}",{label:a(e),n:f+1}),onChange:g=>m({text:g.target.value}),onFocus:g=>{s.current=g.currentTarget,u(f)}})})}function pu(e,t){const n=`${e.label} — row ${t+1}`;return j({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i($,{value:o,onChange:r,label:a("{label} — row {n}",{label:a(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function fu(e){return{_gCards:R("Cards"),coverIndex:D("Cover image",i(yo,{}),xr,String(Or),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:ps("Image background",wi),cardImage:Tn()}}function hu(){return{outline:D("Card outline",i(Eo,{}),_r,yr),indexBadge:D("Card number",i(Ct,{}),Sr,Cr),showBadge:Rn("Product badge",!0,i(Rt,{noun:"tag"}))}}function mu(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...he,label:_e.find(l=>l.id===r).label}),o=r=>F(De(rt),n(r));return{_gShowOnCard:R("Show on a card"),[rt]:F({type:"custom",render:()=>i(ml,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(rt)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const rt="showCardPrice",_e=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function ml({rest:e}){const t=E(),n=ge(),o=s=>typeof t[s]=="boolean"?t[s]:void 0,r=s=>o(s)??e[s],l=_e.some(({id:s})=>o(s)!==void 0&&o(s)!==e[s]);return i(it,{parts:_e,changed:l,shown:r,onPress:(s,c)=>n({[s]:c}),onReset:()=>n(Object.fromEntries(_e.map(({id:s})=>[s,void 0])))})}function gu(e,t="display"){const n=v(t);return{[t]:y("desktop",{type:"custom",render:({value:o,onChange:r})=>i(it,{parts:e,changed:Yo(o),shown:l=>zo(o,l),onPress:(l,s)=>r(Zo(o,l,s)),onReset:()=>r(void 0)})}),[n]:y("mobile",{type:"custom",render:({value:o,onChange:r})=>i(gl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function it({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:l,disabledReason:s}){const c=a("Display");return i(_,{label:c,icon:i(po,{}),changed:t,action:i(O,{words:x()?.panel,label:c,changed:t,detail:l,onReset:r}),children:i(Vo,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...s?{disabled:!0,disabledReason:a(s)}:{}})),onChange:o})})}function gl({parts:e,desktopKey:t,value:n,onChange:o}){const r=E()[t];return i(it,{parts:e,changed:Jo(n),shown:l=>qo(r,n,l),onPress:(l,s)=>o(Qo(n,l,s)),onReset:()=>o(br),detail:a("the same as Desktop")})}function Tn(e=$n){return H("Card image",i(St,{}),k,Re,jn,k,e,{clear:{hint:k},hint:"Rounds the picture. The card's own corner is in Styles."})}function bl(){return pe(ht,"cardImage")}function bu(){return{cardImage:Tn(ht),...bl()}}function wu(){return Ze({sidesKey:"cornerSides",row:zn,step:Vn,useFollowed:()=>k,mark:i(wl,{label:Yn}),hint:a("Rounds the picture. Left alone it stays square.")})}function wl({label:e,changed:t=!1,onReset:n=()=>{}}){return i(O,{words:x()?.panel,label:a(e),changed:t,onReset:n})}function Su(){return{type:"custom",render:({value:e,onChange:t})=>i(yl,{value:typeof e=="string"?e:"",onChange:t})}}const Nn="own";function _u(){const e=[{value:Nn,label:"Layout's own",picture:un(Array.from({length:8},()=>[3,1]))},...Object.entries(no).map(([t,n])=>({value:t,label:n.label,picture:un([...n.phone,...n.phone])}))];return y("mobile",an("Layout",i(_t,{}),e,Nn,{columns:2,cell:Vi}))}function Sl({layout:e,width:t}){const n=oo(e),o=n?`${n[0]}/${n[1]}`:void 0;return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:ro(e).map(([r,l],s)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${l}`,aspectRatio:o}},s))})}const _l={width:"3.5rem",height:"2.5rem",words:!1},Cl=200;function yl({value:e,onChange:t}){const[n,o]=Z(null),[r,l]=Z(4),s=J(null);Fn(()=>{const m=s.current;if(!m||typeof ResizeObserver!="function")return;const g=()=>l(m.getBoundingClientRect().width>=Cl?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?ji(Te,e):void 0,u=c?e:"",d=gt(n,u),h=gt(n,"").length,p=io("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:Xi(p,a("Not chosen"))},...d.map(m=>({value:m,label:a(Te[m].label),icon:i(Sl,{layout:Te[m],width:40})}))];return i(_,{label:a("Layout"),icon:i(_t,{}),value:c?a(c.label):void 0,children:i("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:i(kt,{label:a("Layout"),value:u,options:f,onChange:t,columns:r,cell:_l,header:A("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:a("Photos in a row")}),i(Uo,{options:[{id:"all",label:a("All")},...eo.map(m=>({id:String(m),label:String(m)}))],value:n===null?"all":String(n),ariaLabel:a("Photos in a row"),onChange:m=>o(m==="all"?null:Number(m))}),i("span",{className:"text-2xs text-ink-faint",children:a("{n} of {total} layouts",{n:h,total:to.length})})]})})})})}export{os as BOUND_TO_POST,fc as BOUND_TO_POST_NOTE,Cc as BUCKET_ICONS,lu as CUSTOM_FIELD_MEDIA,au as CoordsField,dn as DESKTOP_GAP_NOT_OVERLAP,it as DisplayRow,Zc as EDGE_ARROWS,rr as FOCAL_DEFAULT,Oe as FOLD_FIELD_MARKER,rs as HIGHLIGHT_HINT,$ as HidableTextField,dt as LINK_FIELD_MARKER,nc as Label,Ie as MEDIA_FIELD_MARKER,ou as MEDIA_TYPE_OPTIONS,hc as NOT_BOUND_TO_POST,Tc as PanelBand,ls as PanelNoteLine,Hs as RowPropsContext,pt as SCAFFOLD_FIELD_MARKER,Ou as SCALAR_TEXT_CONTROLS,zi as SiteGapDefaultReset,q as Slider,cs as Swatches,xu as TEXT_CONTROL_KINDS,N as TEXT_FIELD_MARKER,uu as TICKER_ITEMS_ROW,hl as TextListField,ol as ThemeFillRow,we as WIDTH_LABEL,ts as WidthDefaultReset,fl as aimAfterListChange,$c as anchorFields,X as backTo,Nc as backgroundField,Fc as boxBlockSpacingField,vc as boxColumnsFields,qc as boxFillField,Bs as boxPhoneRowField,ks as boxShareField,Dc as boxSharePhoneField,Bc as boxShareTabletField,sl as boxThemeIndexOf,Oc as bucketHeader,Lc as buttonWordsEntryField,As as cardCornersField,ps as cardImageBackgroundField,Tn as cardImageField,bu as cardImageFields,fu as cardMediaFields,kc as cardShapeFields,mu as cardShowFields,hu as cardStyleFields,Gc as cellWidthFields,zc as colorInput,rc as containerDirectionField,qi as containerGapField,Ji as containerGapPhoneField,oc as containerGapRows,Zi as containerGapTabletField,ul as coordsResultTip,wc as copyText,bn as cornerSidesField,Ze as cornersRowField,gn as cornersUnitFields,Vc as date,jc as dateTime,Ic as designGroupHeader,gu as displayFields,Qc as edgePad,tt as fillSlotChoices,cu as focusAfterRemove,Jc as focusKeptField,Ec as foldMarker,Ee as foldMetaOf,as as foldTitleOf,Vs as followedHeightPatch,tl as followedStickPatch,Su as galleryLayoutField,_u as galleryLayoutPhoneField,Kc as heightFields,Se as heightFollowedBy,js as heightLayersAt,ic as heroGroupPlacementPoints,ut as hidableText,ss as hintIsWhileTyping,wu as imageCornersField,pc as inOwnBox,xc as isBucketHeader,mn as keptBy,Sc as linkField,al as loadingRowHint,ru as loadingShowsField,su as mediaFieldPaths,ot as mediaFields,eu as multiSelect,Yc as pageBackgroundField,yc as panelNote,Us as phoneOverrideField,bc as plainText,_c as plainTextarea,fs as pxField,Rc as quietMarker,ct as readHidable,dl as rowText,tu as searchSelect,ds as sectionBandChoices,ws as sectionCornersField,Ac as sectionShapeFields,Pc as sectionThemeFields,pl as setRowText,Hc as sizeField,nu as sourceField,Mc as spacingFields,Xc as stickFields,Uc as swapPadding,mc as text,Kn as textFieldIdentifier,ac as textFieldOffPage,uc as textFieldPanelOnly,du as textList,pu as textListRowField,gc as textarea,Rn as toggle,iu as upload,me as useLengthRow,ge as useSelectedPatch,E as useSelectedProps,T as useSelectedSibling,Yi as useSiteGapDetail,Wc as widthField,dc as withIdentifier,lc as withOffPage,cc as withPanelOnly,sc as withScaffold};
|
|
1
|
+
"use client";import{jsx as i,jsxs as A,Fragment as L}from"react/jsx-runtime";import{HERO_FOCUS as An,HERO_MEDIA_TYPES as Ln}from"../../../format/lib/hero-media-layout.js";import{cloneElement as xe,createContext as kn,useContext as st,useEffect as Fn,useId as lt,useRef as J,useState as Z}from"react";import{useEasel as re,useSelectedHost as G}from"efficient-easel/easel";import{PIN_LENGTH as ie,toDateKey as vn,fromDateKey as Dn}from"efficient-shell/format";import{say as a,editorEaselWords as x}from"../../../format/lib/editor-words.js";import{finiteNumber as Y}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as at,firstFrameHint as Bn,loadingShowsOf as Hn,loadingStillHint as Gn}from"../../../format/lib/hero-video.js";import{pageFramesFor as Mn,usePageVideoFrames as Un}from"../page-video-frames.js";import{ScreenDocumentContext as Wn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as ct,hidableText as ut}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Oe,LINK_FIELD_MARKER as dt,MEDIA_FIELD_MARKER as Ie,SCAFFOLD_FIELD_MARKER as pt,TEXT_FIELD_MARKER as N,foldMetaOf as Ee,textFieldIdentifier as Kn}from"efficient-easel/draw";import Xn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as ft}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as $n,CARD_IMAGE_RADIUS_ROW as ht,CARD_IMAGE_RADIUS_STEP as jn,CORNER_RADIUS_MAX as Re,CORNER_RADIUS_MIN as k}from"../../../format/lib/content/card-image-shape.js";import{SECTION_CSS_KEY as Vn}from"../../../format/lib/content/section-css.js";import{IMAGE_CORNER_STEP as Yn,IMAGE_CORNERS_LABEL as zn,IMAGE_CORNERS_ROW as qn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Jn,GRID_MAX_ROW_SPAN as mt,GRID_MAX_TILE_AT as Zn,GRID_MOBILE_MAX_COLUMNS as Qn,GRID_TILE_AT_KEY as eo}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as to,GALLERY_LAYOUTS as Te,GALLERY_LAYOUT_KEYS as no,GALLERY_PHONE_LAYOUTS as oo,galleryChoices as gt,galleryLayoutRatio as ro,galleryPictureCells as io}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as so}from"./shell-glyph.js";import{anchorSiblingsOf as lo,placementPoints as ao}from"../../../format/lib/hero-group-placement.js";import co from"../../components/AnchorField.js";import uo from"../../components/SourceStatus.js";import{AdjustIcon as po,EyeIcon as fo,AnimationIcon as ho,BackgroundIcon as bt,BorderAllIcon as mo,BlockSectionIcon as go,ColumnWidthsIcon as se,ColumnsIcon as wt,CornerIcon as St,DirectionDownIcon as bo,DirectionLeftIcon as wo,DirectionRightIcon as So,DirectionUpIcon as _o,EditIcon as Co,GapIcon as yo,GridIcon as _t,GroundIcon as Ne,HashIcon as Ct,HeightIcon as le,ImageIcon as xo,ListIcon as Oo,LocationIcon as yt,PaddingBottomIcon as xt,PaddingLeftIcon as Ot,PaddingRightIcon as It,PaddingTopIcon as Pe,PageIcon as Io,StickyIcon as Et,SearchIcon as Eo,SquareIcon as Ro,TypeIcon as To,WidthIcon as No}from"efficient-easel/icons";import{FieldGlyph as Rt}from"../../components/FieldGlyph.js";import{resolvePageBackground as Po}from"../../../format/lib/content/page-background.js";import{BOX_FILL_FADE_PROP as Ao,BOX_FILL_FADES as Lo,BOX_SWATCH_PROP as ko,boxFillFadeOf as Tt,boxFillOf as Fo,boxFillSlot as Ae,boxPaintOf as vo}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as Nt,CORNER_SIDE_POINTS as Do,SECTION_CORNERS_ROW as Pt,hasOwnSectionCorners as Bo,normalizeCornerSides as At}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as Lt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as Ho,enclosingSection as Go}from"./enclosing-section.js";import{SettingsDefaultReset as O,SettingsDrill as Mo,SettingsField as _,SettingsGroup as Uo,SettingsSegmented as Wo,SettingsBorder as Ko,SettingsSidesEach as Xo,SettingsSwitch as Le,borderSides as $o,borderStartEach as jo}from"efficient-easel/panel";import{ListField as Vo}from"efficient-easel/fields";import{CodeIcon as Yo}from"efficient-shell/icons/efficient";import{DisplayChips as zo}from"efficient-shell/ui";import{desktopDisplayChanged as qo,partShownOnDesktop as Jo,partShownOnPhone as Zo,phoneDisplayChanged as Qo,withDesktopPart as er,withPhonePart as tr}from"../../../format/lib/content/part-display.js";import{ColorSwatch as nr,CornersInput as or,DatePicker as rr,DateTimePicker as ir,FOCAL_DEFAULT as sr,IconPicker as kt,COLUMN_COUNT_MAX as Ft,COLUMN_SHARE_MIN as lr,COLUMN_SHARES_EQUAL as ar,resolveColumnShares as vt,WidthsBar as cr,useShellStrings as ur,IconButton as Dt,InputNumber as Bt,Slider as dr,Textarea as pr,Tooltip as ke}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as fr}from"./geocode-resolve.js";import{ColourRow as ae,InheritedColourRow as Ht}from"./ColourControl.js";import{fillThemeColors as hr,slotFill as ce}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Fe}from"../../../format/lib/document/part-inks.js";import{keptByRow as ve}from"efficient-easel/screen/lib/document/style-fields";import Gt from"./MarkupToolbar.js";import{deviceField as y}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as mr,NoControlMark as gr,noControlField as Mt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as br}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as wr,PANEL_ONLY_FIELD as Sr}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as _r,resolvePhoneValue as De}from"../../../format/lib/document/phone-override.js";import{phoneKey as B,tabletKey as Be,viewKeyAt as He}from"efficient-easel/draw";import{viewKey as I}from"../../../format/lib/animation/views.js";import{viewRows as M}from"../animation/view-rows.js";import{SuppressibleText as Cr}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as yr,CARD_OUTLINE_OPTIONS as xr,DEFAULT_CARD_INDEX_FORMAT as Or,DEFAULT_CARD_OUTLINE as Ir}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Er,DEFAULT_COVER_INDEX as Rr}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Tr}from"efficient-easel/draw";import Nr from"../../components/MediaUploadField.js";import Pr from"../../components/MultiSelectField.js";import Ar from"../../components/SectionThemePicker.js";import Lr from"../../components/SearchSelectField.js";import kr from"../../components/StorefrontLinkField.js";import{UiIcon as Ut}from"efficient-easel/draw/client";import{SECTION_PADDING as P}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Fr}from"../../../render/lib/content/button-look.js";import{usePreviewParts as vr}from"efficient-easel/draw/client";import{encodePartId as Dr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Br,useEaselStrings as Hr}from"efficient-easel/strings";import{hasPhoneHeight as Gr,hasTabletHeight as Ge,resolveSectionMinHeight as Mr,resolveTabletHeight as Ur}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as Wr,SECTION_PIN_ABOVE_HINT as Kr,SECTION_PIN_ABOVE_KEY as Xr,SECTION_PIN_ABOVE_LABEL as $r,SECTION_PIN_GROUP as jr,SECTION_PIN_LABEL as Wt,SECTION_PIN_SCREENS_KEY as Me,SECTION_PIN_SCREENS_LABEL as Kt,SECTION_PIN_STOP_DEFAULT as Vr,SECTION_PIN_STOP_HINT as Yr,SECTION_PIN_STOP_KEY as zr,SECTION_PIN_STOP_LABEL as qr,SECTION_PIN_STOP_OPTIONS as Jr,SECTION_STICK_DISTANCE as U,SECTION_STICK_DISTANCE_ROW as Ue,SOME_VIEW_PINS as Xt,hasPhoneStick as Zr,hasTabletStick as Qr,resolveSectionStick as ue,sectionPinStopOf as ei,sectionPinStopWrite as ti}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as ni}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as oi,SECTION_MIN_HEIGHT as ri,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as ii}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as si,resolveContainerDirection as $t}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as li,BOX_BLOCK_SPACING_POINTS as jt,BOX_PHONE_ROW_LABEL as Vt,BOX_COLUMNS_MAX as ai,BOX_COLUMNS_MIN as Yt,BOX_PHONE_ROW_MAX as ci,BOX_PHONE_ROW_MIN as We,BOX_SHARE_CHOICES as zt,BOX_SHARE_LABEL as z,boxShareChoiceOf as qt,boxShareWidthsOf as Ke,BOX_SHARE_PHONE_DEFAULT as ui,BOX_SHARE_PHONE_POINTS as di}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as W}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Jt,BORDER_SIDES as pi,SECTION_BORDER_ROW as Zt,borderBySide as Qt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as fi,normalizeTheme as en,normalizeThemeColors as hi,sectionBandTone as mi,surfaceTwoTone as gi}from"../../../format/lib/theme.js";import{CONTAINER_GAP as tn,CONTAINER_GAP_BUILT_IN as bi,CONTAINER_GAP_PHONE as Xe,GAP_FIELD_CONTAINER as $e,followsSitePhoneGap as wi,hasOwnContainerGap as Si,hasOwnPhoneGap as je,resolveContainerGap as nn,resolvePhoneContainerGap as on}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as _i,CARD_IMAGE_BG_OFF as Ci,CARD_IMAGE_BG_SWATCH_NAMES as yi,CARD_IMAGE_BG_SWATCHES as xi,isCardImageBackgroundInheriting as Oi,cardImageBackgroundChoice as Ii,THEME_CARD_IMAGE_BG as Ei}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Ri,SECTION_BG_NO_FILL as Ti,sectionBackgroundChoice as Ni,THEME_SECTION_BG as Ve,isSectionBackgroundEmpty as Pi,sectionBackgroundHex as rn}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Ai,nestedAccentValue as sn,resolveSectionAccent as de}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Li,TYPE_SIZE_INHERIT as ki,isTypeSizeInheriting as Fi}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as vi,WIDTH_CHOICE_LABEL as Di,WIDTH_INHERIT as Bi}from"../../../format/lib/content/section-width.js";import{useEaselSession as Hi}from"efficient-easel/screen/lib/session-context";import{backendOf as Gi}from"../website-session.js";import{BOX_GAP as Mi,describedAs as F,group as R,iconOf as K,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as ln,onDesktopWords as X,phoneTwinFields as Ye,saidAlignmentGrid as Ui,useLengthUnit as Wi}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as Ki,PICTURE_PICKER_ROW as Xi,directionField as $i,gapField as ze,iconPickerRow as an,lengthUnitFields as pe,pickerCellIcon as ji,pickerNoneIcon as Vi,Segmented as fe,select as v,slider as H}from"./box-fields.js";import{VIEW_ABOVE as qe}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as cn,viewOfTier as Yi}from"../../../format/lib/content/view-tier.js";import{ownEntry as zi}from"../../../format/lib/own-entry.js";import{LAYOUT_CELL as qi,galleryPhonePicture as un}from"./choice-pictures.js";function lc({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function $(e,t){return a("{value} from {from}",{value:e,from:t})}function Ji(){const{blockGap:e}=W();return e===null?a("this container's own spacing"):$(`${e}px`,a("Styles"))}function Zi({inherited:e,onReset:t,label:n}){return i(O,{words:x()?.panel,label:a(n),changed:!e,detail:Ji(),onReset:t})}function Qi(e){return ze({...Mi,builtIn:bi[e],resolve:(t,n)=>nn(e,t,n?.siteGap),action:(t,n)=>i(Zi,{inherited:!Si(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[$e]:e}})}function es(e){return ft(y("mobile",{[$e]:e,type:"custom",render:t=>i(os,{container:e,...t})}),dn)}function ts(e){return ft(y("tablet",{[$e]:e,type:"custom",render:t=>i(ns,{container:e,...t})}),dn)}const dn={not:{field:"gap",in:Array.from({length:-tn.min},(e,t)=>tn.min+t)}};function ac(e){return{gap:y("desktop",Qi(e)),[Be("gap")]:ts(e),[B("gap")]:es(e)}}function ns({container:e,...t}){const[n]=T("gap"),{siteGap:o}=t.field??{},r=Math.max(Xe.min,nn(e,n,o));return ze({...Xe,builtIn:r,resolve:s=>je(s)?s:r,action:(s,c)=>i(O,{words:x()?.panel,label:a("Gap"),changed:je(s),detail:X(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function os({container:e,...t}){const[n]=T("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},l=on(e,void 0,n,o,r);return ze({...Xe,builtIn:l,resolve:c=>on(e,c,n,o,r),action:(c,u)=>i(O,{words:x()?.panel,label:a("Gap"),changed:je(c),detail:$(`${l}px`,wi(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function cc(e){return $i({offered:si(e),fallback:$t(e,void 0),resolve:t=>$t(e,t)})}function uc(e,t){return ao(t?lo(e,t):[],t)}function rs({inherited:e,onReset:t,label:n}){return i(O,{words:x()?.panel,label:a(n),changed:!e,detail:$(a("Full"),a("the page")),onReset:t})}function j({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:l,hideable:s=!0,markup:c=!0}){const{text:u,hidden:d}=ct(e),h=J(null),p=J(null),f=C=>t(s?{text:C,hidden:d}:C),m=()=>t({text:u,hidden:!d}),g=s&&d,b=lt(),S=r?cs(r)?i("span",{className:"sf-hint-while-typing",children:a(r)}):a(r):void 0,w=d?a("Show {label} on the slide",{label:a(n)}):a("Hide {label} on the slide",{label:a(n)});return i(_,{label:a(n),icon:i(To,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:s?i(ke,{content:w,children:i(Dt,{"aria-pressed":d,"aria-label":w,onClick:m,children:d?i(Ut,{name:"eye-off",size:14}):i(Ut,{name:"eye",size:14})})}):void 0,children:A("div",{className:"sf-copybox",children:[c&&i(Gt,{target:l?p:h,value:u,onChange:f}),l?i("textarea",{id:b,ref:p,value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)}):i("input",{id:b,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)})]})})}function dc(e,t){return{...e,[pt]:t}}function pc(e){const t=e[N];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[N]:{...t,offPage:!0}}}function fc(e){return!e||typeof e!="object"?!1:e[N]?.offPage===!0}function hc(e){if(!e[N])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Sr]:!0}}function mc(e){return wr(e)}function gc(e){const t=e[N];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[N]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as Nu,SCALAR_TEXT_CONTROLS as Pu}from"efficient-easel/draw";function bc(e,t){if(!e[N])throw new Error("inOwnBox: the field holds no authored text");const{[mr]:o,...r}=e;return{...r,[br]:!0,render:t}}const is=new Set(Tr),he={type:"radio",options:[{value:!0},{value:!1}]},pn={text:{type:"object",objectFields:{text:{type:"text"},hidden:he}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:he}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},V=(e,t)=>{const n=F({...t,[N]:e},{...pn[e.control],label:e.label});if(!is.has(e.control))return n;const o=t.render;return{...Mt(n,"authored-copy"),render:r=>i(Cr,{name:r.name,children:o(r)})}},wc="Everything else on this block comes from the linked post. Unlink it to edit by hand.",ss={field:"source.slug",set:!0},Sc={not:ss},ls="Select a word, then press the highlighter.",as=new Set([ls]),cs=e=>as.has(e);function _c(e,t,n){return V({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Cc(e,t,n){return V({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function yc(e,t,n){return V({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function xc(e,t,n){return V({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Oc(e){return{type:"custom",[dt]:{label:e},...F({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(kr,{value:ut(t),onChange:n,label:e})}}function Ic(e,t,n){return V({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const Ec={Design:po,Animation:ho};function Rc(e,t){return{type:"custom",render:()=>i(us,{text:e,values:t})}}function us({text:e,values:t}){return i("p",{className:"sf-note",children:a(e,t)})}function Tc(e){return Ee(e)!==null&&e?.tabs!==void 0}const fn=new Map;function Nc(e,t){const n=`${e}\0${t?t.join(""):""}`,o=fn.get(n)??{type:"custom",tabs:t,[Oe]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(L,{})};return fn.set(n,o),o}const hn=new Map;function Pc(e){const t=hn.get(e)??{type:"custom",[Oe]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(L,{})};return hn.set(e,t),t}function ds(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Ac(e,t){return ds(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(L,{})}}function Lc(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(L,{})}}function kc({title:e,children:t}){const[n,o]=Z(()=>!Je.has(e));return i(Uo,{title:e,open:n,onToggle:r=>{o(r),r?Je.delete(e):Je.add(e)},children:t})}const Je=new Set;function ps({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),l=r?o?.[r]:void 0,s=l?a(l):t;return A("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(ke,{content:u,children:i(nr,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:s})]})}function Fc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(fs,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function fs({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const l=typeof o=="string"?o:void 0,{colors:s,n:c}=nt(),u={background:s.background,surface:s.surface,surface2:gi(s),band:mi(s)},d=n?Ve:t,h=Pi(l,t,d),p=rn(void 0,d,u),f=n?Ri:void 0,m=d===Ve?a("the theme's section background"):a("Theme {n} background",{n:c}),g=hs(l,t,s,c,u,r),b=$(p.toUpperCase(),m),S=Fe(l),w=S?ce(S,s,c):null;return w?i(ae,{label:a(e),icon:i(bt,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Ht,{label:a(e),icon:i(bt,{}),value:h?"":rn(l,t,u),inherited:p,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function hs(e,t,n,o,r,l){const s=Ni(e,t);return[{label:a("No fill"),color:"",selected:s==="none",onPick:()=>l(Ti)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:s==="band",onPick:()=>l(Ve)},...tt(Fe(e)??"",n,o,l)]}function ms(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,l=Oi(r,t);return i(_,{label:a(e),icon:i(Ne,{}),changed:!l,action:i(O,{words:x()?.panel,label:a(e),changed:!l,detail:a("the theme's image stage"),onReset:()=>o(_i)}),children:ps({swatches:xi,current:l?Ei:Ii(r,t),onPick:o,names:yi})})}}}function vc(e=n=>n,t){return ee({_gSectionTheme:R(Ai),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(Ar,{value:e(n),onChange:o,followLabel:t})}})}function me(e){const t=E(),n=cn(e?.view),o=s=>He(e.valueKey,s),r=e.numbersIn??(s=>Y(t[o(s)])!==void 0),l=e.followsView??Ps(n,r);return Wi({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Ki,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:l},convertTo:e.convertTo??(s=>{const c=Y(t[o(n)]);return c===void 0?{}:{[o(n)]:s(c)}})})}function q({min:e,max:t,step:n,value:o,onChange:r,suffix:l="",readout:s=!0,notch:c,ariaLabel:u,disabled:d=!1,placeholder:h,placeholderWord:p,onClear:f,units:m,inputMax:g}){const b=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:b?"sf-slider has-notch":"sf-slider",style:b?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(dr,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...p?{emptyLabel:a(p)}:{},suffix:l||void 0,...m?{units:m}:{},...g!==void 0?{inputMax:g}:{},showInput:s,label:u===void 0?void 0:a(u),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:S=>{S===null?f?.():S!==o&&r(S)}})})}function gs(e,t){const{min:n,max:o,step:r=1,unsetLabel:l,hint:s,restTrack:c,unsetMark:u,icon:d,unit:h="px"}=t;return{type:"custom",render:({value:p,onChange:f})=>{const m=typeof p=="number"?p:null,g=m===null;return i(_,{label:a(e),icon:d?K(d):void 0,value:g?u||l===void 0?void 0:a(l):`${m}${h}`,changed:!g,action:u?xe(u,{changed:!g,onReset:()=>f(null)}):i(O,{words:x()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof s=="string"?a(s):s,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:f}):q({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}const te="Corners",bs={kind:"radius"};function Ze(e){return{type:"custom",render:t=>{const{value:n,onChange:o}=t,r=typeof n=="number"&&Number.isFinite(n)?n:null,l=r!==null;return i(_,{label:a(te),icon:i(St,{}),changed:l,action:xe(e.mark,{changed:l,onReset:()=>o(null)}),hint:e.hint,children:i(ws,{tier:e,px:r,name:t.name,onRadius:o})})}}}function T(e){const t=G();return[t?.values?.[e],n=>t?.onChange(e,n)]}function mn(){return Mt({type:"custom",render:()=>i(gr,{})},"always")}function ge(){const e=G();return t=>e?.onChangeMany(t)}function ws({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[l,s]=T(e.sidesKey),c=ge(),u=me({row:e.row??bs,label:te,grid:{min:k,max:Re,step:e.step??1},valueKey:n??"",view:"desktop"}),d=At(l)??[...Nt];return i(or,{label:a(te),value:d,corners:Do,onChange:h=>{const p=At(h)??[];s(p.length===Nt.length?null:p)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??k,radiusMax:u?.grid.max??Re,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function gn(e,t){return pe(e,t)}function bn(){return mn()}function Ss({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=W(),r=typeof o=="number"?`${o}px`:a("not set");return i(O,{words:x()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):$(r,a("Styles")),onReset:n})}function _s(){const{cornerRadiusPx:e}=W();return typeof e=="number"?e:k}function Cs(){return Ze({sidesKey:"sectionCornerSides",row:Pt,useFollowed:_s,mark:i(Ss,{label:te}),hint:ys})}const ys="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function Dc(){return ee({_gShape:R("Shape"),sectionCorners:Cs(),...gn(Pt,"sectionCorners"),sectionCornerSides:bn(),...M("sectionBorder",Ns),...pe(Zt,"sectionBorder",{tablet:!0,phone:!0})})}const xs=()=>({width:a("Border width"),sides:{top:a("Border top"),right:a("Border right"),bottom:a("Border bottom"),left:a("Border left")},style:a("Border style"),styles:{solid:a("Solid"),dashed:a("Dashed"),dotted:a("Dotted")},color:a("Border color"),unit:"px"});function Os(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Is(){let e;try{const t=en(W().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||fi.line}function Es({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:l=!0,above:s={},length:c}){const u=e&&typeof e=="object"?e:{},[d,h]=Z(()=>r?jo(u,s):!1),p=xs(),f=m=>Os(r&&l?m:{width:m.width,color:m.color,...l?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(mo,{}),action:r?i(Xo,{each:d,label:a("Each side"),onChange:h}):void 0,children:i(Ko,{label:a("Border"),value:u,each:d,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...p,unit:c.unit}:p,styles:l,max:c?.grid.max??Jt,...c?{step:c.grid.step,units:c.units}:{}})})}function Rs({value:e,onChange:t,view:n}){const[o]=T("sectionBorder"),[r]=T(Be("sectionBorder")),l=Is(),s=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...Qt(s(o)),...Qt(s(r))}:n==="tablet"?s(o):{},u=E(),d=ge(),h=I("sectionBorder",n),p=me({row:Zt,label:"Border",grid:{min:0,max:Jt,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>Qe(u[He("sectionBorder",f)]),convertTo:f=>{const m=s(u[h]);return Qe(m)?{[h]:Ts(m,f)}:{}}});return i(Es,{value:e,length:p,onChange:p?f=>d({[h]:f,...p.unitPatch(!Qe(f))}):t,placeholder:{sides:$o(c),style:c.style??"solid",color:c.color||l},presets:[l],above:c})}const wn=["width",...pi];function Qe(e){if(!e||typeof e!="object")return!1;const t=e;return wn.some(n=>Y(t[n])!==void 0)}function Ts(e,t){const n={...e};for(const o of wn){const r=Y(n[o]);r!==void 0&&(n[o]=t(r))}return n}function Ns(e){return{type:"custom",render:({value:t,onChange:n})=>i(Rs,{value:t,onChange:n,view:e})}}function Ps(e,t){let n=qe[e];for(;n&&qe[n]!==null&&!t(n);)n=qe[n];return n??e}function Bc(e){return{type:"custom",render:()=>i(As,{partKey:e})}}function As({partKey:e}){const[t]=T("id"),[n]=T("_partStyles"),{textStyles:o}=W(),r=Hr();let l=null;try{l=vr().select}catch{l=null}const s=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Mo,{name:a("Text"),preview:Fr(s,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Br.copy.panel).cases}),onOpen:()=>{l&&typeof t=="string"&&l(Dr(t,e))}})}function Sn(e){const{cornerRadiusPx:t}=W(),n=typeof t=="number"?t:e;let o=null;try{const{appState:l,selectedItem:s}=re(u=>u),c=s?.props?.id?String(s.props.id):void 0;o=c?Go(l?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Bo(r)?r:n}function Ls({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Sn(k);return i(O,{words:x()?.panel,label:a(e),changed:t,detail:$(`${o}px`,a("the section")),onReset:n})}function ks(){return i(L,{children:a("Follows the section's Corners until you set a number here.")})}function Fs(){return Ze({sidesKey:"cardCornerSides",row:Lt,useFollowed:()=>Sn(k),mark:i(Ls,{label:te}),hint:i(ks,{})})}function vs(){return{type:"custom",render:()=>i(Xn,{})}}function Hc(){return{_gShape:R("Shape"),cardCorners:Fs(),...gn(Lt,"cardCorners"),cardCornerSides:bn(),cardCornersApplyAll:vs()}}function Ds(){return F({type:"custom",[Xi]:!0,render:e=>i(Hs,{...e})},{type:"select",label:z,options:[{value:"content",label:"Fit content"},{value:"equal",label:"Equal"},{value:[50],label:"Custom: the width of each block in %, the last block left out"}]})}function Bs(e,t){const n=qt(e);if(n!=="custom")return a(zt.find(r=>r.value===n)?.label??"");const o=vt(Ke(e,t),t);return o?[...o,100-o.reduce((r,l)=>r+l,0)].join(" / "):a("Custom")}function Hs(e){const{value:t,onChange:n}=e,[o]=T("content"),r=Array.isArray(o)?o.length:0,l="follows"in e,s=t!=null,c=s?t:l?e.follows:void 0,u=qt(c),d=r>=2&&r<=Ft,h=()=>[...ar[r]??[]],p=J(null),f=w=>{const C=p.current;C&&JSON.stringify(w)===JSON.stringify(C.shares)?n(C.value):w&&n(w)},m=w=>{w===u||w==="custom"&&!d||n(w==="custom"?h():w)},g=a("The width bar works for 2 to {count} blocks.",{count:Ft}),b=s&&(l||t!=="content"),S=ur().widths.hint(r,lr);return i(_,{label:a(z),icon:i(se,{}),changed:b,hint:u!=="custom"?void 0:d?S:g,action:i(O,{words:x()?.panel,label:a(z),changed:b,disabled:e.readOnly===!0,detail:l?X(w=>a(w),Bs(e.follows,r),e.followsView):a("Fit content"),onReset:()=>n(void 0)}),children:A("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(kt,{label:a(z),value:u,options:zt.map(w=>({value:w.value,label:w.value==="custom"&&!d?g:a(w.label),icon:ji(i("span",{className:"sf-gallery-pic sf-share-pic",children:_n(w.weights).map((C,D)=>i("i",{style:{gridColumn:`span ${C}`}},D))}),a(w.label),w.value==="custom"&&!d?g:a(w.label))})),onChange:m,columns:3,cell:Cn,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&d?i("div",{onFocus:()=>{p.current={value:t,shares:vt(Ke(c,r),r)}},onBlur:()=>{p.current=null},children:i(cr,{label:a(z),count:r,value:Ke(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function _n(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function Gc(){return v(li,i(yo,{}),jt,jt[0].value)}function Mc(){return y("mobile",an(z,i(se,{}),di.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:_n(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),ui,{columns:2,cell:Cn}))}const Cn={width:"5.75rem",height:"3.25rem",words:!0};function Uc(){return Ye("share",Ds(),ln)[Be("share")]}function Gs(){return y("mobile",H(Vt,i(wt,{}),We,ci,1,We,"",{clear:{phoneFollows:!1,hint:We}}))}const yn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Wc(){const e=H(Vt,i(wt,{}),Yt,ai,1,Yt,"",{clear:{emptyLabel:"Auto"}}),t=Ye("columns",e,{...yn,tablet:ln.tablet}),n=Ye("columns",e,yn,{phoneRow:Gs()});return{...t,phoneRow:n.phoneRow}}function Kc(e,t,n,o,r,l,s){return{type:"custom",render:({value:c,onChange:u,name:d})=>i(Ms,{label:e,min:t,max:n,step:o,fallback:r,role:l,value:c,onChange:u,name:d??"",length:s})}}function Ms({label:e,min:t,max:n,step:o,fallback:r,role:l,value:s,onChange:c,name:u,length:d}){const h=E(),p=ge(),f=cn(d?.view),m=me({row:d?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:d?u:"",view:d?.view??"desktop",numbersIn:b=>b===f&&typeof h[u]=="number",followsView:f,convertTo:b=>typeof h[u]=="number"?{[u]:b(h[u])}:{}}),g=b=>m?p({[u]:b,...m.unitPatch(typeof b!="number")}):c(b);return i(_,{label:a(e),icon:i(Rt,{noun:l}),action:i(O,{words:x()?.panel,label:a(e),changed:!Fi(s),detail:a("the Text style in Styles"),onReset:()=>g(ki),defaultAction:{onPress:()=>g(Li),title:a("Keep this section's own built-in size"),icon:i(go,{})}}),children:q({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof s=="number"?s:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function be(e,t,n){return[{label:"Auto",value:""},...Array.from({length:e},(o,r)=>({label:r===0?`1 ${t}`:`${r+1} ${n}`,value:String(r+1)}))]}function Xc(){return{_gCellWidth:R("Cell size"),gridSpan:y("desktop",v("Positions",i(se,{}),be(Jn,"position","positions"),"")),gridRowSpan:y("desktop",v("Rows tall",i(le,{}),be(mt,"row","rows"),"")),[eo]:H("At card",i(Ct,{}),1,Zn,1,1,""),[B("gridSpan")]:y("mobile",v("Positions",i(se,{}),[{label:"Full row",value:""},...be(Qn,"position","positions").slice(1)],"")),[B("gridRowSpan")]:y("mobile",v("Rows tall",i(le,{}),be(mt,"row","rows"),""))}}function E(){let e=null,t=null;try{e=st(Us),t=re(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Us=kn(null);function Ws({min:e,max:t,step:n,px:o,label:r,onChange:l,desktopKey:s,fallback:c}){const u=E()[s],d=De(void 0,u,c);return i(L,{children:q({min:e,max:t,step:n,value:De(o,u,c),readout:!1,ariaLabel:r,notch:d,onChange:l})})}function Ks({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:l=()=>{}}){const s=E()[t],c=De(void 0,s,n);return i(O,{words:x()?.panel,label:a(e),changed:r,detail:X(u=>a(u),`${c}${o}`),onReset:l})}function Xs(e){return gs(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Ks,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Ws,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const $s={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},js={Top:Pe,Bottom:xt,Left:Ot,Right:It},Vs=e=>{const t=js[e];return i(t,{})};function $c(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>$s[S],l=S=>H(r("Top"),i(Pe,{}),P.min,P.max,P.step,S,"px"),s=(S,w,C,D=P)=>y("mobile",Xs({label:r(S),icon:Vs(S),desktopKey:w,min:D.min,max:D.max,step:D.step,fallback:C})),c=e.top??P.min,u=e.bottom??P.min,d="sectionPaddingLeft",h="sectionPaddingRight",p=e.sideBounds??P,f=e.side??p.min,m=e.sidePhone??f,g=e.phone===!0,b=S=>g?y("desktop",S):S;return ee({...o?{_gSpacing:R("Padding")}:{},[t]:b(l(c)),...g?{[B(t)]:s("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(H(r("Bottom"),i(xt,{}),P.min,P.max,P.step,u,"px")),...g?{[B(n)]:s("Bottom",n,u)}:{}},...e.sides?{[d]:b(H(r("Left"),i(Ot,{}),p.min,p.max,p.step,f,"px")),...g?{[B(d)]:s("Left",d,m,p)}:{},[h]:b(H(r("Right"),i(It,{}),p.min,p.max,p.step,f,"px")),...g?{[B(h)]:s("Right",h,m,p)}:{}}:{}})}function jc(e,t){const n=Object.fromEntries(Object.entries(t).map(([l,s])=>[l,l in e&&Ee(s)?e[l]:s])),o={};let r=!1;for(const[l,s]of Object.entries(e)){if(l in t){r||Object.assign(o,n),r=!0;continue}o[l]=s}return r||Object.assign(o,n),o}const we="Width";function Vc(e,t=vi,n=!0){const o=t.map(r=>({label:Di[r],value:r}));return ee({...n?{_gWidth:R(we)}:{},widthMode:{type:"custom",render:({onChange:r,field:l})=>i(_,{label:a(we),icon:i(No,{}),action:n?i(rs,{inherited:l?.inherited??!1,onReset:()=>r(Bi),label:we}):void 0,children:fe({options:o,value:l?.currentValue||e,onChange:r,ariaLabel:we})})}})}function Yc({fill:e=!1}={}){const t=(r,l)=>({type:"custom",render:({value:s,onChange:c})=>i(Ys,{value:s,onChange:c,view:r,badge:l,fill:e})}),n=()=>ve("sectionHeightMode"),o=()=>ve("sectionHeightMode");return ee({_gHeight:R(Q),...M("sectionHeightMode",r=>r==="desktop"?t(r):t(r,l=>i(Zs,{view:r,onClear:()=>l(void 0)}))),...M("sectionHeightValue",n),...M("sectionHeightUnit",o)})}function Ys({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const l=E(),{mode:s,number:c,unit:u}=zs(n,l,e);return i(_,{label:Q,icon:K(i(le,{})),action:o?o(t):void 0,children:A("div",{className:"es-width-stack",children:[fe({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...r?[{label:"Fill",value:"fill"}]:[]],value:s,onChange:t,ariaLabel:Q}),c?i(Js,{view:n,mode:s,menu:u}):null]})})}function xn(e,t){return e==="phone"&&Ge(t)?Ur(t):Mr(t)}function Se(e,t){return e==="desktop"||(e==="tablet"?Ge(t):Gr(t))?null:xn(e,t)}function zs(e,t,n){const r=(l=>oi.includes(l))(n)?n:Se(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function qs(e,t,n,o){const r=Se(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[I("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[I("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[I("sectionHeightValue",e)]:r.value}:{},[I(n,e)]:o}}function On(e,t,n){const o=G(),r=Se(e,E());return!o||!r?{followed:null,write:n}:{followed:r,write:s=>o.onChangeMany(c=>{const u=qs(e,c,t,s);return u===null?{[I(t,e)]:s}:Object.keys(u).length?u:null})}}function Js({view:e,mode:t,menu:n}){const o=G(),r=E(),l=I("sectionHeightValue",e),s=I("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:d}=On(e,"sectionHeightValue",c(l)),{write:h}=On(e,"sectionHeightUnit",c(s)),p=t==="screen"?"%":r[s],f=(u?u.unit:p)==="%"?"%":"px",m=f==="%"?ii:ri,g=r[l],b=n?{options:["px","%"],label:a("Unit"),onChange:S=>h(S)}:void 0;return q({min:m.min,max:m.max,step:m.step,value:u?null:typeof g=="number"?g:m.fallback,...u?{placeholder:u.value}:{},suffix:f,...b?{units:b}:{},ariaLabel:Q,onChange:d})}function Zs({view:e,onClear:t}){const n=E(),o=Se(e,n)===null,r=e==="phone"&&Ge(n),l=xn(e,n),s=X(c=>a(c),l.mode==="auto"?a("Auto"):`${l.value}${l.unit}`,r?"tablet":"desktop");return i(O,{words:x()?.panel,label:a(Q),changed:o,detail:s,onReset:t})}function zc(e={}){const t=e.intro===!0,n=l=>({type:"custom",render:({value:s,onChange:c,id:u,name:d})=>i(il,{value:s,onChange:c,labelId:`${u??d??"stickTop"}-label`,view:l,intro:t})}),o=l=>({type:"custom",render:({value:s,onChange:c})=>i(nl,{value:s,onChange:c,view:l,intro:t})}),r=l=>({type:"custom",render:({value:s,onChange:c})=>i(ol,{value:s,onChange:c,view:l,intro:t})});return{_gStick:R(jr,{dot:t?tl:Xt}),...M("stickTop",n),...M("stickTopDistance",o),...pe(Ue,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?M(Me,r):{},...t?{}:{[zr]:Qs()},...t||e.above===!1?{}:{[Xr]:el()}}}function Qs(){const e=v(qr,i(Pe,{}),Jr,Vr);return y("desktop",{...e,render:t=>{const n=e.render({...t,value:ei(t.value),onChange:o=>t.onChange(ti(o))});return xe(n,{hint:a(Yr)})}})}function el(){const e=Rn($r,!1,i(Et,{}),Kr);return y("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const tl={any:[Xt,Wr]};function In(e,t,n,o,r){const l=G(),s=E(),c=e==="desktop"||ne(e,s)?null:et(e,ue(s,{intro:o}));return{followed:c,write:(c||r)&&l?d=>l.onChangeMany(h=>{const p=rl(e,h,d,t,o),f=p===null?{[I(t,e)]:d}:p;return Object.keys(f).length?{...f,...r?.(d)??{}}:null}):n}}function nl({value:e,onChange:t,view:n,intro:o}){const r=E(),l=ue(r,{intro:o}),s=h=>{const p=Yi(h);return p==="desktop"||ne(p,r)},c=me({row:Ue,label:"Distance from top",grid:{min:U.min,max:U.max,step:U.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>s(h)&&Y(r[He("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&l.ownTablet?"tablet":"desktop"}),{followed:u,write:d}=In(n,"stickTopDistance",t,o,c?h=>c.unitPatch(h===void 0):void 0);return i("div",{className:"sf-field",children:q({min:c?.grid.min??U.min,max:c?.grid.max??U.max,step:c?.grid.step??U.step,value:u?null:typeof e=="number"?e:U.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:d})})}function ol({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=In(n,Me,t,o);return i(_,{label:a(Kt),icon:K(i(le,{})),children:q({min:ie.min,max:ie.max,step:ie.step,value:r?null:Y(e)??ie.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Kt),onChange:l})})}function ne(e,t){return e==="tablet"?Qr(t):Zr(t)}function et(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function rl(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const l=et(e,ue(t,{intro:r})),s=e==="phone"&&ne("tablet",t)?h=>I(h,"tablet"):h=>h,c=(h,p)=>t[s(h)]==null?{}:{[I(h,e)]:p},u=Ue.unitKey,d=t[s(u)]==null?{}:{[I(u,e)]:l.unit};return{[I("stickTop",e)]:!0,...c("stickTopDistance",l.distance),...d,...c(Me,l.screens),[I(o,e)]:n}}function il({value:e,onChange:t,labelId:n,view:o,intro:r}){const l=E(),s=ue(l,{intro:r}),c=o==="phone"?s.phone:o==="tablet"?s.tablet:r?s.desktop:e===!0,u=o==="phone"&&s.ownTablet,d=o==="desktop"?null:et(o,s),h=d?.on?ni(d.distance,d.unit):a("Off");return i(_,{label:a(Wt),labelId:n,icon:K(i(Et,{})),action:A(L,{children:[o!=="desktop"?i(O,{words:x()?.panel,label:a(Wt),changed:ne(o,l),detail:X(p=>a(p),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Le,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const En="e.g. about";function qc(){return{_gAnchor:R("Anchor"),anchor:V({control:"plainText",label:"Name",placeholder:En},{type:"custom",render:({value:e,onChange:t})=>i(co,{value:e,onChange:t,nameBox:(n,o)=>i(j,{value:n,onChange:o,label:"Name",placeholder:En,hideable:!1,markup:!1})})})}}function Jc(){return{_gAdvanced:R("Advanced"),[Vn]:{type:"custom",render:({value:e,onChange:t})=>i(_,{label:a("Custom CSS"),icon:K(i(Yo,{})),children:i(pr,{"aria-label":a("Custom CSS"),spellCheck:!1,autoGrow:!0,className:"font-mono",value:typeof e=="string"?e:"",onChange:n=>t(n.target.value)})})}}}function Zc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:s})=>{const c=`${l??s??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(ir,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:d=>r(d?d.toISOString():"")})})}}}function Qc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:s})=>{const c=`${l??s??e}-date`;return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(rr,{id:c,value:Dn(typeof o=="string"?o:null),onChange:u=>r(u?vn(u):"")})})}}}function Rn(e,t,n,o){return{type:"custom",...F({},{...he,label:e}),render:r=>{const{value:l,onChange:s,id:c,name:u}=r,d="follows"in r,h=r,p=typeof l=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=p?l:d?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(Le,{checked:m,onChange:s,disabled:b,ariaLabelledBy:g});return i(_,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:d?A(L,{children:[i(O,{words:x()?.panel,label:a(e),changed:p,detail:h.followsNoView?a(f?"On":"Off"):X(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>s(void 0)}),S]}):S})}}}function eu(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(sl,{label:"Background",icon:i(Io,{}),id:r,value:e,shown:Po(e),onChange:t})}}}function tu(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(ae,{label:a(e),icon:n,value:o||t,onChange:r})}}function sl({label:e,icon:t,id:n,value:o,shown:r,onChange:l}){const{colors:s,n:c}=nt(),u=Fe(o),d=u?ce(u,s,c):null;return i(ae,{label:a(e),icon:t,id:n,value:d?d.hex:r,caption:d?.words,onChange:l,choices:tt(u??"",s,c,l)})}function nu(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(ll,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function tt(e,t,n,o){const r=Ae(e);return hr(t,n).map(l=>({label:l.label,color:l.value,selected:r===l.name,onPick:()=>o(l.name)}))}function ll({value:e,onChange:t,twin:n}){const{colors:o,n:r}=nt(),l=o.background,s=$(l.toUpperCase(),a("Theme {n} background",{n:r})),[c,u]=T(Ao),[d]=T(ko),h=typeof d=="string"&&d.trim()!=="",p=Tt(c),f=oe=>u(Tt(oe)||void 0),m=Ae(e),g=m?ce(m,o,r):null,b=tt(e,o,r,t),S=n?()=>t(void 0):()=>t("");let w=l,C=s;if(n){const oe=Ae(n.follows),Ce=Fo(n.follows),ye=oe?ce(oe,o,r):Ce?{hex:Ce,words:Ce.toUpperCase()}:null;w=ye?.hex??l,C=X(Pn=>a(Pn),ye?ye.words:s,n.view)}const D=!n&&(vo(e)||h)?i(al,{value:p,onChange:f}):null;return g?i(ae,{label:a("Fill"),icon:i(Ne,{}),value:g.hex,caption:g.words,onChange:t,changed:!0,onReset:S,resetTo:C,choices:b,children:D}):i(Ht,{label:a("Fill"),icon:i(Ne,{}),value:e,inherited:w,resetTo:C,onChange:t,onReset:S,choices:b,children:D})}function al({value:e,onChange:t}){return fe({options:Lo.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:a("Fill")})}function cl(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return de(n);const r=Ho(e,t);if(r.length===0)return null;const l=de(sn(n));if(l!==null)return l;for(let s=r.length-1;s>0;s-=1){const c=de(sn(r[s].sectionAccent));if(c!==null)return c}return de(r[0].sectionAccent)}function nt(){const e=en(W().theme),[t]=T("sectionAccent");let n=null;try{const{appState:r,selectedItem:l}=re(c=>c),s=l?.props?.id?String(l.props.id):void 0;n=s?cl(r?.data,s,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:hi(e.themes[o]),n:o+1}}function ou(){return mn()}const ru={top:i(_o,{}),right:i(So,{}),bottom:i(bo,{}),left:i(wo,{})};function iu(e,t,n,o,r,l,s){const c=p=>t.find(f=>f.value===p),u=p=>({value:p,label:"",disabled:!0,title:o}),d=p=>{const f=t.find(g=>g.cell===p);if(!f)return u(`missing-${p}`);const m=l?.[p];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},h=[u("corner-top-left"),d("top"),u("corner-top-right"),d("left"),u("centre"),d("right"),u("corner-bottom-left"),d("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:f})=>{const m=t.some(g=>g.value===p)?p:n;return i(_,{label:a(e),icon:r,value:c(m)?.label?a(c(m).label):s?a(s):"",children:Ui(a,{label:e,value:m,onChange:f,points:h})})}}}function su(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:l})=>i(Pr,{label:e,options:(l.options??t).map(s=>({...s,label:a(s.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function lu(e,t,n,o){return{type:"custom",options:t,fallback:n,...F({},{type:"select",label:e}),render:({value:r,onChange:l,field:s})=>i(Lr,{label:e,options:(s.options??t).map(c=>({...c,label:a(c.label)})),fallback:s.fallback??n,value:r,onChange:l,placeholder:o===void 0?void 0:a(o)})}}function au(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const ul={image:"Image",video:"Video"},cu=Ln.map(e=>({label:ul[e],value:e}));function uu(e,t,n){const o=Object.keys(at).map(r=>({label:at[r],value:r,picture:n[r]}));return{type:"custom",...F({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(pl,{label:e,icon:t,options:o,onChange:r})}}function dl(e,t,n){const o=Bn(e,t,n);if(o!==void 0)return o==="save-makes-frame"?a("A frame is made from this video when you save the page."):o==="starts-dark"?a("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?a("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?a("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?a("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?a("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=Gn(e);return r==="frame-missing-image"?a("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?a("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?a("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?a("No image yet. The slide shows its background colour until you choose one."):void 0}function pl({label:e,icon:t,options:n,onChange:o}){const r=G(),l=r?.values??{},s=Hn(l),c=st(Wn),u=Un(c?.docId??null);let d=null;try{d=re(p=>p.appState.data)}catch{d=null}const h=Mn(r?.id,d,u);return i(_,{label:a(e),icon:K(t),hint:dl(l,h,c?.hasUnsavedEdits??!1),children:fe({options:n,value:s,onChange:o,ariaLabel:e})})}function du(e,t,n,o={}){const r={type:"custom",[Ie]:!0,render:({value:l,onChange:s,name:c})=>i(Nr,{value:l||"",onChange:s,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?y("each",r):r}function pu(e){return ot(e).map(t=>t.path)}function ot(e,t="",n=[]){const o=[];for(const[r,l]of Object.entries(e??{})){const s=t?`${t}.${r}`:r,c=l;if(c&&c[Ie]){o.push({path:s,field:c,along:n});continue}c?.arrayFields&&o.push(...ot(c.arrayFields,`${s}[]`,[...n,c])),c?.objectFields&&o.push(...ot(c.objectFields,s,[...n,c]))}return o}const fu={HeroSingle:[An.image],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function fl(e){const t=a(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function hu({value:e,onChange:t,label:n}){const o=e||{},r=G(),l=r?r.values!==r.node.props:!0,s=!!o.pending&&l,c=!!o.pending&&!l,u=!!Gi(Hi()).geocode,d=lt(),h=(p,f)=>t({...o,[p]:f??void 0});return A(L,{children:[i(_,{label:a(n),icon:i(yt,{}),action:u?i(ke,{content:a("Find from the address (OpenStreetMap)"),children:i(Dt,{"aria-label":a("Find from the address"),"aria-busy":s||void 0,disabled:s,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(Eo,{})})}):void 0,children:u&&o.status?i(uo,{compact:!0,oneLine:!0,spaced:!1,status:s?"busy":o.ok&&!c?"found":"notfound",statusText:s?a("Finding…"):c?a(fr):a(o.status),hint:fl(o)}):null}),i(_,{label:a("Enter by hand"),labelId:d,icon:i(Co,{}),action:i(Le,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:d})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(yt,{}),children:A("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(Bt,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(Bt,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function hl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function ml(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,l)=>l===t?{text:n}:r)}function mu(e,t){return e===null?null:t>e?e:null}function gl(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const gu={label:"Ticker items",icon:i(Oo,{})};function bu(e,t,n,o){return{type:"custom",[N]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...F({},{...pn.textList,label:e}),render:({value:r,onChange:l})=>i(bl,{label:e,icon:K(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:l,markup:o==="markup"})}}function bl({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:l=!1}){const s=J(null),[c,u]=Z(null),d=p=>p.map(f=>({text:f?.text??""})),h=p=>{const f=gl(n,p,c);f===null&&(s.current=null),u(f),r(d(p))};return i(Vo,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?i(Gt,{target:s,value:hl(n,c),onChange:p=>r(ml(n,c??-1,p)),disabled:c===null,label:c===null?a("Formatting — click a row first"):a("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,f,m)=>i("input",{type:"text",className:l&&c===f?"sf-list-marking":void 0,value:p?.text??"",placeholder:a(o),"aria-label":a("{label} {n}",{label:a(e),n:f+1}),onChange:g=>m({text:g.target.value}),onFocus:g=>{s.current=g.currentTarget,u(f)}})})}function wu(e,t){const n=`${e.label} — row ${t+1}`;return V({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(j,{value:o,onChange:r,label:a("{label} — row {n}",{label:a(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Su(e){return{_gCards:R("Cards"),coverIndex:v("Cover image",i(xo,{}),Er,String(Rr),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:ms("Image background",Ci),cardImage:Tn()}}function _u(){return{outline:v("Card outline",i(Ro,{}),xr,Ir),indexBadge:v("Card number",i(Ct,{}),yr,Or),showBadge:Rn("Product badge",!0,i(Rt,{noun:"tag"}))}}function Cu(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...he,label:_e.find(l=>l.id===r).label}),o=r=>F(ve(rt),n(r));return{_gShowOnCard:R("Show on a card"),[rt]:F({type:"custom",render:()=>i(wl,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(rt)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const rt="showCardPrice",_e=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function wl({rest:e}){const t=E(),n=ge(),o=s=>typeof t[s]=="boolean"?t[s]:void 0,r=s=>o(s)??e[s],l=_e.some(({id:s})=>o(s)!==void 0&&o(s)!==e[s]);return i(it,{parts:_e,changed:l,shown:r,onPress:(s,c)=>n({[s]:c}),onReset:()=>n(Object.fromEntries(_e.map(({id:s})=>[s,void 0])))})}function yu(e,t="display"){const n=B(t);return{[t]:y("desktop",{type:"custom",render:({value:o,onChange:r})=>i(it,{parts:e,changed:qo(o),shown:l=>Jo(o,l),onPress:(l,s)=>r(er(o,l,s)),onReset:()=>r(void 0)})}),[n]:y("mobile",{type:"custom",render:({value:o,onChange:r})=>i(Sl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function it({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:l,disabledReason:s}){const c=a("Display");return i(_,{label:c,icon:i(fo,{}),changed:t,action:i(O,{words:x()?.panel,label:c,changed:t,detail:l,onReset:r}),children:i(zo,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...s?{disabled:!0,disabledReason:a(s)}:{}})),onChange:o})})}function Sl({parts:e,desktopKey:t,value:n,onChange:o}){const r=E()[t];return i(it,{parts:e,changed:Qo(n),shown:l=>Zo(r,n,l),onPress:(l,s)=>o(tr(n,l,s)),onReset:()=>o(_r),detail:a("the same as Desktop")})}function Tn(e=$n){return H("Card image",i(St,{}),k,Re,jn,k,e,{clear:{hint:k},hint:"Rounds the picture. The card's own corner is in Styles."})}function _l(){return pe(ht,"cardImage")}function xu(){return{cardImage:Tn(ht),..._l()}}function Ou(){return Ze({sidesKey:"cornerSides",row:qn,step:Yn,useFollowed:()=>k,mark:i(Cl,{label:zn}),hint:a("Rounds the picture. Left alone it stays square.")})}function Cl({label:e,changed:t=!1,onReset:n=()=>{}}){return i(O,{words:x()?.panel,label:a(e),changed:t,onReset:n})}function Iu(){return{type:"custom",render:({value:e,onChange:t})=>i(Il,{value:typeof e=="string"?e:"",onChange:t})}}const Nn="own";function Eu(){const e=[{value:Nn,label:"Layout's own",picture:un(Array.from({length:8},()=>[3,1]))},...Object.entries(oo).map(([t,n])=>({value:t,label:n.label,picture:un([...n.phone,...n.phone])}))];return y("mobile",an("Layout",i(_t,{}),e,Nn,{columns:2,cell:qi}))}function yl({layout:e,width:t}){const n=ro(e),o=n?`${n[0]}/${n[1]}`:void 0;return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:io(e).map(([r,l],s)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${l}`,aspectRatio:o}},s))})}const xl={width:"3.5rem",height:"2.5rem",words:!1},Ol=200;function Il({value:e,onChange:t}){const[n,o]=Z(null),[r,l]=Z(4),s=J(null);Fn(()=>{const m=s.current;if(!m||typeof ResizeObserver!="function")return;const g=()=>l(m.getBoundingClientRect().width>=Ol?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?zi(Te,e):void 0,u=c?e:"",d=gt(n,u),h=gt(n,"").length,p=so("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:Vi(p,a("Not chosen"))},...d.map(m=>({value:m,label:a(Te[m].label),icon:i(yl,{layout:Te[m],width:40})}))];return i(_,{label:a("Layout"),icon:i(_t,{}),value:c?a(c.label):void 0,children:i("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:i(kt,{label:a("Layout"),value:u,options:f,onChange:t,columns:r,cell:xl,header:A("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:a("Photos in a row")}),i(Wo,{options:[{id:"all",label:a("All")},...to.map(m=>({id:String(m),label:String(m)}))],value:n===null?"all":String(n),ariaLabel:a("Photos in a row"),onChange:m=>o(m==="all"?null:Number(m))}),i("span",{className:"text-2xs text-ink-faint",children:a("{n} of {total} layouts",{n:h,total:no.length})})]})})})})}export{ss as BOUND_TO_POST,wc as BOUND_TO_POST_NOTE,Ec as BUCKET_ICONS,fu as CUSTOM_FIELD_MEDIA,hu as CoordsField,dn as DESKTOP_GAP_NOT_OVERLAP,it as DisplayRow,ru as EDGE_ARROWS,sr as FOCAL_DEFAULT,Oe as FOLD_FIELD_MARKER,ls as HIGHLIGHT_HINT,j as HidableTextField,dt as LINK_FIELD_MARKER,lc as Label,Ie as MEDIA_FIELD_MARKER,cu as MEDIA_TYPE_OPTIONS,Sc as NOT_BOUND_TO_POST,kc as PanelBand,us as PanelNoteLine,Us as RowPropsContext,pt as SCAFFOLD_FIELD_MARKER,Pu as SCALAR_TEXT_CONTROLS,Zi as SiteGapDefaultReset,q as Slider,ps as Swatches,Nu as TEXT_CONTROL_KINDS,N as TEXT_FIELD_MARKER,gu as TICKER_ITEMS_ROW,bl as TextListField,sl as ThemeFillRow,we as WIDTH_LABEL,rs as WidthDefaultReset,gl as aimAfterListChange,qc as anchorFields,$ as backTo,Fc as backgroundField,Gc as boxBlockSpacingField,Wc as boxColumnsFields,nu as boxFillField,Gs as boxPhoneRowField,Ds as boxShareField,Mc as boxSharePhoneField,Uc as boxShareTabletField,cl as boxThemeIndexOf,Nc as bucketHeader,Bc as buttonWordsEntryField,Fs as cardCornersField,ms as cardImageBackgroundField,Tn as cardImageField,xu as cardImageFields,Su as cardMediaFields,Hc as cardShapeFields,Cu as cardShowFields,_u as cardStyleFields,Xc as cellWidthFields,tu as colorInput,cc as containerDirectionField,Qi as containerGapField,es as containerGapPhoneField,ac as containerGapRows,ts as containerGapTabletField,fl as coordsResultTip,xc as copyText,bn as cornerSidesField,Ze as cornersRowField,gn as cornersUnitFields,Jc as customCssFields,Qc as date,Zc as dateTime,Pc as designGroupHeader,yu as displayFields,iu as edgePad,tt as fillSlotChoices,mu as focusAfterRemove,ou as focusKeptField,Ac as foldMarker,Ee as foldMetaOf,ds as foldTitleOf,qs as followedHeightPatch,rl as followedStickPatch,Iu as galleryLayoutField,Eu as galleryLayoutPhoneField,Yc as heightFields,Se as heightFollowedBy,zs as heightLayersAt,uc as heroGroupPlacementPoints,ut as hidableText,cs as hintIsWhileTyping,Ou as imageCornersField,bc as inOwnBox,Tc as isBucketHeader,mn as keptBy,Oc as linkField,dl as loadingRowHint,uu as loadingShowsField,pu as mediaFieldPaths,ot as mediaFields,su as multiSelect,eu as pageBackgroundField,Rc as panelNote,Xs as phoneOverrideField,yc as plainText,Ic as plainTextarea,gs as pxField,Lc as quietMarker,ct as readHidable,hl as rowText,lu as searchSelect,hs as sectionBandChoices,Cs as sectionCornersField,Dc as sectionShapeFields,vc as sectionThemeFields,ml as setRowText,Kc as sizeField,au as sourceField,$c as spacingFields,zc as stickFields,jc as swapPadding,_c as text,Kn as textFieldIdentifier,fc as textFieldOffPage,mc as textFieldPanelOnly,bu as textList,wu as textListRowField,Cc as textarea,Rn as toggle,du as upload,me as useLengthRow,ge as useSelectedPatch,E as useSelectedProps,T as useSelectedSibling,Ji as useSiteGapDetail,Vc as widthField,gc as withIdentifier,pc as withOffPage,hc as withPanelOnly,dc as withScaffold};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{anchorFields as E,bucketHeader as w,cardMediaFields as W,cardShowFields as z,designGroupHeader as $,foldMarker as J,foldMetaOf as C,quietMarker as q,heightFields as O,sectionShapeFields as D,sectionThemeFields as T,stickFields as H,widthField as B}from"./controls.js";import{group as Q}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as A}from"./box-fields.js";import{deviceField as V,deviceMetaOf as K}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as R}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as _,SETTINGS_BUCKETS as X}from"efficient-easel/panel";import{BUCKET_KEY as l,DESIGN_GROUP_KEY as g}from"efficient-easel/screen/lib/document/field-buckets";import{ownEntry as p,hasOwnEntry as M}from"../../../format/lib/own-entry.js";const F=X;function Z(n){return n==="Animation"?"Animation":"Design"}const ee="Editor only — not shown live",x={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content","Card list":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Loop:"Animation",Scroll:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell size":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[ee]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},j={"AlloyWheelsListing._gCards":"Design","Flex._gLink":"Link","LongRead._gLink":"Link"},N={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function I(n,e,o){const i=`${n}.${e}`;return p(N,i)??p(j,i)??p(x,o)}function pe(n,e,o){const i=I(n,e,o);return i?Z(i):void 0}function te(n){return n==="Animation"?[l.Animation]:[l.Design,g[n]]}function v(...n){const e=[];for(const o of n)for(const i of Object.values(o)){const s=K(i),h=C(s?s.inner:i),u=h?p(x,h.label):void 0;if(u)for(const y of te(u))e.includes(y)||e.push(y)}return e}const ye=[...v(A({tablet:!0,siteSide:!0}),B("full"),O(),E(),H()),...Object.keys(A({tablet:!0,siteSide:!0})),...Object.keys(B("full")),...Object.keys(O()),...Object.keys(E()),...Object.keys(H())],ke=[...v(T()),...Object.keys(T())],Se=[...v(D()),...Object.keys(D())],_e=[...v(R()),...Object.keys(R())],ve=Object.keys(W()),fe=Object.keys(z()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","Flex._gLink":"repeated the Link group heading above it (owner 2026-11-17)","LongRead._gLink":"repeated the Link group heading above it (decided 2026-11-17)","Flex._gJump":"repeated the Anchor group heading above it (owner 2026-11-17)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},Y={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Link:["Link"],Anchor:["Anchor"],Animation:["Animation"]},P={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const n={...A({tablet:!0,siteSide:!0}),...B("full"),...O(),...E(),...T(),...D(),...R()};for(const e of Object.keys(P)){const o=C(n[e]),i=o?p(x,o.label):void 0;if(!o||o.level!==2||!i||!Y[i].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${e}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[l.Design,"Content"],[l.Animation,"Animation"],..._.map(n=>[g[n],n])]);function ie(n){const e=`${n}.`;return Object.keys(ne).filter(o=>o.startsWith(e)).map(o=>o.slice(e.length))}function re(n,e){const o=K(n),i=Q(e);return o?V(o.tier,i):i}function de(n,e){const o=C(e);return o?n==="Content"||n==="Animation"?J(e,o.label):q(e):e}function U(n){return n==="Design"?_:["Animation"]}function me(n,e){const o=[],i=new Set(ie(e)),s=new Set;let h=!1,u=null;for(const[t,d]of Object.entries(n)){const a=C(d);if(oe.has(t))throw new Error(`${e}.${t}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key from efficient-easel's DESIGN_GROUP_KEY (\`[DESIGN_GROUP_KEY.Design]: section("Design")\`).`);const c=ae.get(t);if(c!==void 0){if(a?.level!==1)throw new Error(`${e}.${t}: that key is reserved for the ${c} heading of the settings panel, but this field is ${a?`a level-${a.level} "${a.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(t===l.Design||t===l.Animation)&&(h=!0),o.push(u={place:c,entries:[],adopted:!0});continue}if(!a){u||o.push(u={place:"Content",entries:[]}),u.entries.push([t,d]);continue}if(i.has(t)||M(P,t)){const r=I(e,t,a.label);if(a.level!==2||!r||!Y[r].includes(a.label))throw new Error(`${e}.${t}: ${i.has(t)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${a.level} "${a.label}" header in the ${r??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);i.has(t)&&s.add(t),o.push(u={place:r,entries:[],uniform:M(P,t)});continue}const b=I(e,t,a.label);if(!b)throw new Error(`${e}.${t}: the inspector group "${a.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[..._,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(u={place:b,entries:[[t,a.level===2?d:re(d,a.label)]]})}const y=new Set(Object.entries(n).filter(([,t])=>C(t)).map(([t])=>t));for(const[t,d]of[["BLOCK_KEY_GROUP",N],["KEY_GROUP",j]]){const a=Object.keys(d).filter(c=>c.startsWith(`${e}.`)).filter(c=>!y.has(c.slice(e.length+1))&&!i.has(c.slice(e.length+1)));if(a.length)throw new Error(`${e}: ${t} (lib/document/field-groups.ts) lists ${JSON.stringify(a)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const f=h?[]:[...i].filter(t=>!s.has(t));if(f.length)throw new Error(`${e}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(f)}, but this section has no such fold header${f.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const G=new Set(o.filter(t=>t.entries.length>0).map(t=>t.place)),m=F.filter(t=>U(t).some(d=>G.has(d))),k={};for(const t of m){k[l[t]]=w(t,t===m[0]?m:null);for(const d of U(t)){if(!G.has(d))continue;const a=o.filter(r=>r.place===d),c=a.findIndex(r=>r.adopted);c>0&&a.unshift(...a.splice(c,1));const b=a.filter(r=>r.uniform);if(b.length>0){const r=a.filter(L=>!L.uniform),S=a[0]?.adopted?1:0;a.splice(0,a.length,...r.slice(0,S),...b,...r.slice(S))}t==="Design"&&(k[g[d]]=$(d));for(const r of a)for(const[S,L]of r.entries)k[S]=de(d,L)}}return k}function Le(n){return l.Design in n?n:{[l.Design]:w("Design",null),[g.Content]:$("Content"),...n}}function Ee(n){return F.some(e=>l[e]in n)}function we(n){const e=F.filter(i=>l[i]in n);if(e.length===0)return n;const o={...n};for(const i of e)o[l[i]]=w(i,i===e[0]?e:null);return o}export{N as BLOCK_KEY_GROUP,F as BUCKETS,l as BUCKET_KEY,ve as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,_ as DESIGN_GROUPS,g as DESIGN_GROUP_KEY,ee as EDITOR_ONLY_GROUP,P as INJECTED_RETIRED,j as KEY_GROUP,x as LABEL_GROUP,ye as LAYOUT_FIELD_KEYS,Y as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,Se as SECTION_SHAPE_FIELD_KEYS,ke as SECTION_THEME_FIELD_KEYS,me as assignSectionGroups,pe as bucketOf,Z as bucketOfPlace,Ee as hasBucketTabs,v as headerKeysOf,te as headerKeysOfPlace,I as placeOf,we as reseatBucketTabs,ie as retiredHeadings,Le as seatDesignBucket};
|
|
1
|
+
import{anchorFields as E,bucketHeader as w,cardMediaFields as W,cardShowFields as z,designGroupHeader as $,foldMarker as J,foldMetaOf as C,quietMarker as q,heightFields as O,sectionShapeFields as D,sectionThemeFields as A,stickFields as H,widthField as T}from"./controls.js";import{group as Q}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as B}from"./box-fields.js";import{deviceField as V,deviceMetaOf as K}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as R}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as _,SETTINGS_BUCKETS as X}from"efficient-easel/panel";import{BUCKET_KEY as c,DESIGN_GROUP_KEY as g}from"efficient-easel/screen/lib/document/field-buckets";import{ownEntry as p,hasOwnEntry as M}from"../../../format/lib/own-entry.js";const F=X;function Z(n){return n==="Animation"?"Animation":"Design"}const ee="Editor only — not shown live",x={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content","Card list":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Loop:"Animation",Scroll:"Animation",Advanced:"Advanced",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell size":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[ee]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},j={"AlloyWheelsListing._gCards":"Design","Flex._gLink":"Link","LongRead._gLink":"Link"},N={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function I(n,e,o){const i=`${n}.${e}`;return p(N,i)??p(j,i)??p(x,o)}function pe(n,e,o){const i=I(n,e,o);return i?Z(i):void 0}function te(n){return n==="Animation"?[c.Animation]:[c.Design,g[n]]}function v(...n){const e=[];for(const o of n)for(const i of Object.values(o)){const s=K(i),h=C(s?s.inner:i),u=h?p(x,h.label):void 0;if(u)for(const y of te(u))e.includes(y)||e.push(y)}return e}const ye=[...v(B({tablet:!0,siteSide:!0}),T("full"),O(),E(),H()),...Object.keys(B({tablet:!0,siteSide:!0})),...Object.keys(T("full")),...Object.keys(O()),...Object.keys(E()),...Object.keys(H())],ke=[...v(A()),...Object.keys(A())],Se=[...v(D()),...Object.keys(D())],_e=[...v(R()),...Object.keys(R())],ve=Object.keys(W()),fe=Object.keys(z()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","Flex._gLink":"repeated the Link group heading above it (owner 2026-11-17)","LongRead._gLink":"repeated the Link group heading above it (decided 2026-11-17)","Flex._gJump":"repeated the Anchor group heading above it (owner 2026-11-17)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},Y={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Advanced:["Advanced"],Link:["Link"],Anchor:["Anchor"],Animation:["Animation"]},P={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const n={...B({tablet:!0,siteSide:!0}),...T("full"),...O(),...E(),...A(),...D(),...R()};for(const e of Object.keys(P)){const o=C(n[e]),i=o?p(x,o.label):void 0;if(!o||o.level!==2||!i||!Y[i].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${e}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[c.Design,"Content"],[c.Animation,"Animation"],..._.map(n=>[g[n],n])]);function ie(n){const e=`${n}.`;return Object.keys(ne).filter(o=>o.startsWith(e)).map(o=>o.slice(e.length))}function re(n,e){const o=K(n),i=Q(e);return o?V(o.tier,i):i}function de(n,e){const o=C(e);return o?n==="Content"||n==="Animation"?J(e,o.label):q(e):e}function U(n){return n==="Design"?_:["Animation"]}function me(n,e){const o=[],i=new Set(ie(e)),s=new Set;let h=!1,u=null;for(const[t,d]of Object.entries(n)){const a=C(d);if(oe.has(t))throw new Error(`${e}.${t}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key from efficient-easel's DESIGN_GROUP_KEY (\`[DESIGN_GROUP_KEY.Design]: section("Design")\`).`);const l=ae.get(t);if(l!==void 0){if(a?.level!==1)throw new Error(`${e}.${t}: that key is reserved for the ${l} heading of the settings panel, but this field is ${a?`a level-${a.level} "${a.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(t===c.Design||t===c.Animation)&&(h=!0),o.push(u={place:l,entries:[],adopted:!0});continue}if(!a){u||o.push(u={place:"Content",entries:[]}),u.entries.push([t,d]);continue}if(i.has(t)||M(P,t)){const r=I(e,t,a.label);if(a.level!==2||!r||!Y[r].includes(a.label))throw new Error(`${e}.${t}: ${i.has(t)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${a.level} "${a.label}" header in the ${r??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);i.has(t)&&s.add(t),o.push(u={place:r,entries:[],uniform:M(P,t)});continue}const b=I(e,t,a.label);if(!b)throw new Error(`${e}.${t}: the inspector group "${a.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[..._,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(u={place:b,entries:[[t,a.level===2?d:re(d,a.label)]]})}const y=new Set(Object.entries(n).filter(([,t])=>C(t)).map(([t])=>t));for(const[t,d]of[["BLOCK_KEY_GROUP",N],["KEY_GROUP",j]]){const a=Object.keys(d).filter(l=>l.startsWith(`${e}.`)).filter(l=>!y.has(l.slice(e.length+1))&&!i.has(l.slice(e.length+1)));if(a.length)throw new Error(`${e}: ${t} (lib/document/field-groups.ts) lists ${JSON.stringify(a)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const f=h?[]:[...i].filter(t=>!s.has(t));if(f.length)throw new Error(`${e}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(f)}, but this section has no such fold header${f.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const G=new Set(o.filter(t=>t.entries.length>0).map(t=>t.place)),m=F.filter(t=>U(t).some(d=>G.has(d))),k={};for(const t of m){k[c[t]]=w(t,t===m[0]?m:null);for(const d of U(t)){if(!G.has(d))continue;const a=o.filter(r=>r.place===d),l=a.findIndex(r=>r.adopted);l>0&&a.unshift(...a.splice(l,1));const b=a.filter(r=>r.uniform);if(b.length>0){const r=a.filter(L=>!L.uniform),S=a[0]?.adopted?1:0;a.splice(0,a.length,...r.slice(0,S),...b,...r.slice(S))}t==="Design"&&(k[g[d]]=$(d));for(const r of a)for(const[S,L]of r.entries)k[S]=de(d,L)}}return k}function Le(n){return c.Design in n?n:{[c.Design]:w("Design",null),[g.Content]:$("Content"),...n}}function Ee(n){return F.some(e=>c[e]in n)}function we(n){const e=F.filter(i=>c[i]in n);if(e.length===0)return n;const o={...n};for(const i of e)o[c[i]]=w(i,i===e[0]?e:null);return o}export{N as BLOCK_KEY_GROUP,F as BUCKETS,c as BUCKET_KEY,ve as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,_ as DESIGN_GROUPS,g as DESIGN_GROUP_KEY,ee as EDITOR_ONLY_GROUP,P as INJECTED_RETIRED,j as KEY_GROUP,x as LABEL_GROUP,ye as LAYOUT_FIELD_KEYS,Y as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,Se as SECTION_SHAPE_FIELD_KEYS,ke as SECTION_THEME_FIELD_KEYS,me as assignSectionGroups,pe as bucketOf,Z as bucketOfPlace,Ee as hasBucketTabs,v as headerKeysOf,te as headerKeysOfPlace,I as placeOf,we as reseatBucketTabs,ie as retiredHeadings,Le as seatDesignBucket};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"../../../components/PreviewPartAnchors.js";import{animationTabFields as r}from"../../animation/fields.js";import{BLOCK_THEME_FOLLOW_LABEL as s,SECTION_THEME_FOLLOW_LABEL as t}from"../../../components/SectionThemePicker.js";import{anchorFields as m,cardShapeFields as d,customCssFields as l,cellWidthFields as n,heightFields as p,sectionShapeFields as F,sectionThemeFields as a,spacingFields as c,stickFields as h,widthField as S}from"../controls.js";import{blockSizeFieldSet as E}from"efficient-easel/screen/lib/document/block-size-fields";import{VIEW_KEY_ACCESS as f}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as L,rowSay as _,sidesPaddingFields as T}from"../box-fields.js";import{assignSectionGroups as O}from"../field-groups.js";import{boxGutterFields as A}from"../box-gutter-field.js";import{sectionOwnWidthFields as g}from"../section-own-width-fields.js";import{dropEmptyHeadings as w}from"../panel-drop-empty-headings.js";import{rowsShownForNode as C}from"../show-when-resolve.js";const z={spacingFields:c,sidesPaddingFields:T,sectionShapeFields:F,cardShapeFields:d,cellWidthFields:n,widthField:S,boxGutterFields:A,sectionOwnWidthFields:g,heightFields:p,anchorFields:m,customCssFields:l,stickFields:h,sectionThemeFields:a,animationTabFields:r,blockSizeFields:({tablet:i,...o}={})=>E({...o,shorten:!0,say:_,lengthUnits:L,...i?{phone:f}:{}}),assignSectionGroups:O,dropEmptyHeadings:w,rowsShownForNode:C,SECTION_THEME_FOLLOW_LABEL:t,BLOCK_THEME_FOLLOW_LABEL:s,PartAnchors:e};export{z as PASS_INSPECTOR};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export declare const PART_ATTR = "data-part";
|
|
2
|
+
export declare const PART_NAMES: Readonly<{
|
|
3
|
+
Flex: readonly ["box", "card", "card-content"];
|
|
4
|
+
Grid: readonly ["grid"];
|
|
5
|
+
Hero: readonly ["hero", "arrows", "arrow", "dots", "dot", "strip"];
|
|
6
|
+
HeroSlide: readonly ["slide", "hero-media", "tint", "overlay", "hero-content"];
|
|
7
|
+
HeroSingle: readonly ["hero", "hero-media", "tint", "overlay", "hero-content"];
|
|
8
|
+
ImageBlock: readonly ["image-block", "image-frame", "image"];
|
|
9
|
+
ButtonBlock: readonly ["button-block", "button", "button-icon"];
|
|
10
|
+
Text: readonly ["text-block", "text"];
|
|
11
|
+
Heading: readonly ["heading-block", "heading"];
|
|
12
|
+
LogoBlock: readonly ["logo"];
|
|
13
|
+
MenuBlock: readonly ["menu-block", "heading", "menu", "menu-item", "menu-link", "menu-button"];
|
|
14
|
+
SiteHeader: readonly ["header", "header-content"];
|
|
15
|
+
SiteFooter: readonly ["footer"];
|
|
16
|
+
FooterSection: readonly ["footer-block", "grid", "legal-line", "copyright"];
|
|
17
|
+
FooterLogo: readonly ["logo-block", "logo-link", "tagline"];
|
|
18
|
+
FooterSocial: readonly ["social-block", "social-item", "social-link"];
|
|
19
|
+
ProductGrid: readonly ["product-grid-block", "grid-head", "grid-number", "heading", "description", "view-all", "count", "grid", "grid-empty"];
|
|
20
|
+
ProductCard: readonly ["card", "card-link", "card-content", "image-block", "image-frame", "image-plate", "image", "card-number", "badges", "badge", "eyebrow", "product-name", "pattern", "specs", "price", "price-note", "swatches", "swatch", "sizes", "size", "buy", "button", "page-label"];
|
|
21
|
+
}>;
|
|
22
|
+
type PartName = (typeof PART_NAMES)[keyof typeof PART_NAMES][number];
|
|
23
|
+
export type PartAttr = {
|
|
24
|
+
readonly [PART_ATTR]: PartName;
|
|
25
|
+
};
|
|
26
|
+
export declare function partAttr(name: PartName): PartAttr;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t="data-part",o=Object.freeze({Flex:Object.freeze(["box","card","card-content"]),Grid:Object.freeze(["grid"]),Hero:Object.freeze(["hero","arrows","arrow","dots","dot","strip"]),HeroSlide:Object.freeze(["slide","hero-media","tint","overlay","hero-content"]),HeroSingle:Object.freeze(["hero","hero-media","tint","overlay","hero-content"]),ImageBlock:Object.freeze(["image-block","image-frame","image"]),ButtonBlock:Object.freeze(["button-block","button","button-icon"]),Text:Object.freeze(["text-block","text"]),Heading:Object.freeze(["heading-block","heading"]),LogoBlock:Object.freeze(["logo"]),MenuBlock:Object.freeze(["menu-block","heading","menu","menu-item","menu-link","menu-button"]),SiteHeader:Object.freeze(["header","header-content"]),SiteFooter:Object.freeze(["footer"]),FooterSection:Object.freeze(["footer-block","grid","legal-line","copyright"]),FooterLogo:Object.freeze(["logo-block","logo-link","tagline"]),FooterSocial:Object.freeze(["social-block","social-item","social-link"]),ProductGrid:Object.freeze(["product-grid-block","grid-head","grid-number","heading","description","view-all","count","grid","grid-empty"]),ProductCard:Object.freeze(["card","card-link","card-content","image-block","image-frame","image-plate","image","card-number","badges","badge","eyebrow","product-name","pattern","specs","price","price-note","swatches","swatch","sizes","size","buy","button","page-label"])});function r(e){return{[t]:e}}export{t as PART_ATTR,o as PART_NAMES,r as partAttr};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const n="data-sf-section-css",o="customCss";function c(s){const t=s?.[o];return typeof t=="string"&&t.trim()!==""?t:""}export{o as SECTION_CSS_KEY,n as SECTION_CSS_SCOPE_ATTR,c as sectionCssOf};
|
|
@@ -116,6 +116,7 @@ export declare const WEB_BUILDER_WORDS: {
|
|
|
116
116
|
readonly "Add your numbers.": "Add your numbers.";
|
|
117
117
|
readonly "Add \u201C{name}\u201D": "Add “{name}”";
|
|
118
118
|
readonly Address: "Address";
|
|
119
|
+
readonly Advanced: "Advanced";
|
|
119
120
|
readonly After: "After";
|
|
120
121
|
readonly All: "All";
|
|
121
122
|
readonly "All pages": "All pages";
|
|
@@ -357,6 +358,7 @@ export declare const WEB_BUILDER_WORDS: {
|
|
|
357
358
|
readonly Crumbs: "Crumbs";
|
|
358
359
|
readonly "Current page": "Current page";
|
|
359
360
|
readonly Custom: "Custom";
|
|
361
|
+
readonly "Custom CSS": "Custom CSS";
|
|
360
362
|
readonly "Custom HTML": "Custom HTML";
|
|
361
363
|
readonly "Custom URL": "Custom URL";
|
|
362
364
|
readonly "Custom W:H": "Custom W:H";
|