efficient-web-builder 69.4.0 → 70.0.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 +34 -0
- package/dist/editor/components/SiteFields.js +1 -1
- package/dist/editor/components/StandaloneSectionEditor.js +1 -1
- package/dist/editor/components/WebsiteScreenParts.js +1 -1
- package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSingle/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/HeroSlide/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Prose/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/Timeline/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/TimelineTrack/fields.js +1 -1
- package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
- package/dist/editor/lib/document/blocks/hero-shared-fields.d.ts +19 -0
- package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
- package/dist/editor/lib/document/box-fields.d.ts +1 -1
- package/dist/editor/lib/document/box-footer-rows.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +9 -1
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/field-groups.js +1 -1
- package/dist/editor/lib/host-document-bridge.js +1 -1
- package/dist/editor/lib/sections/city-presets.d.ts +1 -1
- package/dist/editor/lib/sections/city-presets.js +1 -1
- package/dist/editor/lib/sections/insert-box-path.d.ts +8 -0
- package/dist/editor/lib/sections/insert-box-path.js +1 -0
- package/dist/editor/lib/sections/menu-presets.d.ts +2 -0
- package/dist/editor/lib/sections/menu-presets.js +1 -0
- package/dist/format/lib/build/module-specifiers.d.ts +11 -0
- package/dist/format/lib/build/module-specifiers.js +1 -1
- package/dist/format/lib/content/box-background.d.ts +1 -7
- package/dist/format/lib/content/box-background.js +1 -1
- package/dist/format/lib/content/box-darken-styles.d.ts +7 -0
- package/dist/format/lib/content/box-darken-styles.js +1 -0
- package/dist/format/lib/content/box-shape.d.ts +1 -1
- package/dist/format/lib/content/card-row-keys.d.ts +10 -0
- package/dist/format/lib/content/card-row-keys.js +1 -1
- package/dist/format/lib/content/card-template.d.ts +1 -11
- package/dist/format/lib/content/card-template.js +1 -1
- package/dist/format/lib/content/count-numbers.js +1 -1
- package/dist/format/lib/content/picture-focus-rows.js +1 -1
- package/dist/format/lib/content/section-sticky.d.ts +3 -3
- package/dist/format/lib/content/site-gutter.js +1 -1
- package/dist/format/lib/document/blocks/general/CardList/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Cards/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/FAQ/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/Footprint/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/HeroSingle/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/HeroSlide/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/OrderSummary/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/PostCard/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/ProcessSteps/meta.js +1 -1
- package/dist/format/lib/document/blocks/general/ProcessSteps/row-seed.js +1 -1
- package/dist/format/lib/document/box-footer.js +1 -1
- package/dist/format/lib/document/media-manifest.json +2 -1
- package/dist/format/lib/document/node-lists.d.ts +4 -0
- package/dist/format/lib/document/node-lists.js +1 -1
- package/dist/format/lib/document/passes/document-position.js +1 -1
- package/dist/format/lib/document/section-catalog.js +19 -3
- package/dist/format/lib/editor-words-kept.js +1 -1
- package/dist/format/lib/hero-media-layout.d.ts +12 -0
- package/dist/format/lib/hero-media-layout.js +1 -1
- package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
- package/dist/format/lib/source-rules/editor-words.js +1 -1
- package/dist/format/lib/source-rules/panel-one-arrow.js +1 -1
- package/dist/format/lib/source-rules/support/panel-select-cascade.d.ts +1 -1
- package/dist/format/lib/source-rules/support/panel-select-cascade.js +1 -1
- package/dist/render/components/HeroSingle.d.ts +2 -1
- package/dist/render/components/HeroSingle.js +1 -1
- package/dist/render/components/HeroSlide.d.ts +2 -1
- package/dist/render/components/HeroSlide.js +1 -1
- package/dist/render/lib/content/page-contents.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSingle/render.js +1 -1
- package/dist/render/lib/document/blocks/general/HeroSlide/render.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.d.ts +1 -0
- package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
- package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
- package/dist/render/lib/document/hero-media-parts.d.ts +6 -4
- package/dist/render/lib/document/hero-media-parts.js +1 -1
- package/dist/render/lib/document/slot-counts.js +1 -1
- package/dist/render/lib/sections/section-to-box.js +1 -1
- package/package.json +5 -5
- package/dist/format/lib/document/panel-bands.d.ts +0 -15
- package/dist/format/lib/document/panel-bands.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";import{jsx as i,jsxs as k,Fragment as L}from"react/jsx-runtime";import{cloneElement as _e,createContext as Tn,useContext as ot,useEffect as Nn,useId as rt,useRef as J,useState as Z}from"react";import{useEasel as re,useSelectedHost as B}from"efficient-easel/easel";import{PIN_LENGTH as ie,toDateKey as Pn,fromDateKey as kn}from"efficient-shell/format";import{say as a,editorEaselWords as y}from"../../../format/lib/editor-words.js";import{finiteNumber as V}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as it,firstFrameHint as Ln,loadingShowsOf as An,loadingStillHint as Fn}from"../../../format/lib/hero-video.js";import{pageFramesFor as vn,usePageVideoFrames as Bn}from"../page-video-frames.js";import{ScreenDocumentContext as Dn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as st,hidableText as lt}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Ce,LINK_FIELD_MARKER as at,MEDIA_FIELD_MARKER as ct,SCAFFOLD_FIELD_MARKER as ut,TEXT_FIELD_MARKER as N,foldMetaOf as ye,textFieldIdentifier as Hn}from"efficient-easel/draw";import Gn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as dt}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as Mn,CARD_IMAGE_RADIUS_ROW as pt,CARD_IMAGE_RADIUS_STEP as Wn,CORNER_RADIUS_MAX as xe,CORNER_RADIUS_MIN as A}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Un,IMAGE_CORNERS_LABEL as Kn,IMAGE_CORNERS_ROW as Xn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as $n,GRID_MAX_ROW_SPAN as Vn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as jn,GALLERY_LAYOUTS as Oe,GALLERY_LAYOUT_KEYS as Yn,GALLERY_PHONE_LAYOUTS as zn,galleryChoices as ft,galleryLayoutRatio as qn,galleryPictureCells as Jn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Zn}from"./shell-glyph.js";import{anchorSiblingsOf as Qn,placementPoints as eo}from"../../../format/lib/hero-group-placement.js";import to from"../../components/AnchorField.js";import no from"../../components/SourceStatus.js";import{AdjustIcon as oo,EyeIcon as ro,AnimationIcon as io,BackgroundIcon as ht,BorderAllIcon as so,BlockSectionIcon as lo,ColumnWidthsIcon as Ie,ColumnsIcon as mt,CornerIcon as gt,DirectionDownIcon as ao,DirectionLeftIcon as co,DirectionRightIcon as uo,DirectionUpIcon as po,EditIcon as fo,GapIcon as ho,GridIcon as bt,GroundIcon as Ee,HashIcon as mo,HeightIcon as Re,ImageIcon as go,ListIcon as bo,LocationIcon as wt,PaddingBottomIcon as St,PaddingLeftIcon as _t,PaddingRightIcon as Ct,PaddingTopIcon as Te,PageIcon as wo,StickyIcon as yt,SearchIcon as So,SquareIcon as _o,TypeIcon as Co,WidthIcon as yo}from"efficient-easel/icons";import{FieldGlyph as xt}from"../../components/FieldGlyph.js";import{resolvePageBackground as xo}from"../../../format/lib/content/page-background.js";import{BOX_FILL_FADE_PROP as Oo,BOX_FILL_FADES as Io,BOX_SWATCH_PROP as Eo,boxFillFadeOf as Ot,boxFillOf as Ro,boxFillSlot as Ne,boxPaintOf as To}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as It,CORNER_SIDE_POINTS as No,SECTION_CORNERS_ROW as Et,hasOwnSectionCorners as Po,normalizeCornerSides as Rt}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as Tt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as ko,enclosingSection as Lo}from"./enclosing-section.js";import{SettingsDefaultReset as x,SettingsDrill as Ao,SettingsField as _,SettingsGroup as Fo,SettingsSegmented as vo,SettingsBorder as Bo,SettingsSidesEach as Do,SettingsSwitch as Pe,borderSides as Ho,borderStartEach as Go}from"efficient-easel/panel";import{ListField as Mo}from"efficient-easel/fields";import{DisplayChips as Wo}from"efficient-shell/ui";import{desktopDisplayChanged as Uo,partShownOnDesktop as Ko,partShownOnPhone as Xo,phoneDisplayChanged as $o,withDesktopPart as Vo,withPhonePart as jo}from"../../../format/lib/content/part-display.js";import{ColorSwatch as Yo,CornersInput as zo,DatePicker as qo,DateTimePicker as Jo,FOCAL_DEFAULT as Zo,IconPicker as Nt,COLUMN_COUNT_MAX as Pt,COLUMN_SHARE_MIN as Qo,COLUMN_SHARES_EQUAL as er,resolveColumnShares as kt,WidthsBar as tr,useShellStrings as nr,IconButton as Lt,InputNumber as At,Slider as or,Tooltip as ke}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as rr}from"./geocode-resolve.js";import{ColourRow as se,InheritedColourRow as Ft}from"./ColourControl.js";import{fillThemeColors as ir,slotFill as le}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Le}from"../../../format/lib/document/part-inks.js";import{keptByRow as Ae}from"efficient-easel/screen/lib/document/style-fields";import vt from"./MarkupToolbar.js";import{deviceField as E}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as sr,NoControlMark as lr,noControlField as Bt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as ar}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as cr,PANEL_ONLY_FIELD as ur}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as dr,resolvePhoneValue as Fe}from"../../../format/lib/document/phone-override.js";import{phoneKey as j,tabletKey as ve,viewKeyAt as Be}from"efficient-easel/draw";import{viewKey as O}from"../../../format/lib/animation/views.js";import{viewRows as D}from"../animation/view-rows.js";import{SuppressibleText as pr}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as fr,CARD_OUTLINE_OPTIONS as hr,DEFAULT_CARD_INDEX_FORMAT as mr,DEFAULT_CARD_OUTLINE as gr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as br,DEFAULT_COVER_INDEX as wr}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Sr}from"efficient-easel/draw";import _r from"../../components/MediaUploadField.js";import Cr from"../../components/MultiSelectField.js";import yr from"../../components/SectionThemePicker.js";import xr from"../../components/SearchSelectField.js";import Or from"../../components/StorefrontLinkField.js";import{UiIcon as Dt}from"efficient-easel/draw/client";import{SECTION_PADDING as P}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Ir}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Er}from"efficient-easel/draw/client";import{encodePartId as Rr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Tr,useEaselStrings as Nr}from"efficient-easel/strings";import{hasPhoneHeight as Pr,hasTabletHeight as De,resolveSectionMinHeight as kr,resolveTabletHeight as Lr}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as Ar,SECTION_PIN_ABOVE_HINT as Fr,SECTION_PIN_ABOVE_KEY as vr,SECTION_PIN_ABOVE_LABEL as Br,SECTION_PIN_GROUP as Dr,SECTION_PIN_LABEL as Ht,SECTION_PIN_SCREENS_KEY as He,SECTION_PIN_SCREENS_LABEL as Gt,SECTION_PIN_STOP_DEFAULT as Hr,SECTION_PIN_STOP_HINT as Gr,SECTION_PIN_STOP_KEY as Mr,SECTION_PIN_STOP_LABEL as Wr,SECTION_PIN_STOP_OPTIONS as Ur,SECTION_STICK_DISTANCE as H,SECTION_STICK_DISTANCE_ROW as Ge,SOME_VIEW_PINS as Mt,hasPhoneStick as Kr,hasTabletStick as Xr,resolveSectionStick as ae,sectionPinStopOf as $r,sectionPinStopWrite as Vr}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as jr}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as Yr,SECTION_MIN_HEIGHT as zr,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as qr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as Jr,resolveContainerDirection as Wt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Zr,BOX_BLOCK_SPACING_POINTS as Ut,BOX_PHONE_ROW_LABEL as Kt,BOX_COLUMNS_MAX as Qr,BOX_COLUMNS_MIN as Xt,BOX_PHONE_ROW_MAX as ei,BOX_PHONE_ROW_MIN as Me,BOX_SHARE_CHOICES as $t,BOX_SHARE_LABEL as Y,boxShareChoiceOf as Vt,boxShareWidthsOf as We,BOX_SHARE_PHONE_DEFAULT as ti,BOX_SHARE_PHONE_POINTS as ni}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as G}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as jt,BORDER_SIDES as oi,SECTION_BORDER_ROW as Yt,borderBySide as zt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as ri,normalizeTheme as qt,normalizeThemeColors as ii,sectionBandTone as si,surfaceTwoTone as li}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Jt,CONTAINER_GAP_BUILT_IN as ai,CONTAINER_GAP_PHONE as Ue,GAP_FIELD_CONTAINER as Ke,followsSitePhoneGap as ci,hasOwnContainerGap as ui,hasOwnPhoneGap as Xe,resolveContainerGap as Zt,resolvePhoneContainerGap as Qt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as di,CARD_IMAGE_BG_OFF as pi,CARD_IMAGE_BG_SWATCH_NAMES as fi,CARD_IMAGE_BG_SWATCHES as hi,isCardImageBackgroundInheriting as mi,cardImageBackgroundChoice as gi,THEME_CARD_IMAGE_BG as bi}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as wi,SECTION_BG_NO_FILL as Si,sectionBackgroundChoice as _i,THEME_SECTION_BG as $e,isSectionBackgroundEmpty as Ci,sectionBackgroundHex as en}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as yi,nestedAccentValue as tn,resolveSectionAccent as ce}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as xi,TYPE_SIZE_INHERIT as Oi,isTypeSizeInheriting as Ii}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Ei,WIDTH_CHOICE_LABEL as Ri,WIDTH_INHERIT as Ti}from"../../../format/lib/content/section-width.js";import{useEaselSession as Ni}from"efficient-easel/screen/lib/session-context";import{backendOf as Pi}from"../website-session.js";import{BOX_GAP as ki,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 nn,onDesktopWords as M,phoneTwinFields as Ve,saidAlignmentGrid as Li,useLengthUnit as Ai}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as Fi,PICTURE_PICKER_ROW as vi,directionField as Bi,gapField as je,iconPickerRow as on,lengthUnitFields as ue,pickerCellIcon as Di,pickerNoneIcon as Hi,Segmented as de,select as W,slider as U}from"./box-fields.js";import{VIEW_ABOVE as Ye}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as rn,viewOfTier as Gi}from"../../../format/lib/content/view-tier.js";import{ownEntry as Mi}from"../../../format/lib/own-entry.js";import{LAYOUT_CELL as Wi,galleryPhonePicture as sn}from"./choice-pictures.js";function Ya({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function K(e,t){return a("{value} from {from}",{value:e,from:t})}function Ui(){const{blockGap:e}=G();return e===null?a("this container's own spacing"):K(`${e}px`,a("Styles"))}function Ki({inherited:e,onReset:t,label:n}){return i(x,{words:y()?.panel,label:a(n),changed:!e,detail:Ui(),onReset:t})}function Xi(e){return je({...ki,builtIn:ai[e],resolve:(t,n)=>Zt(e,t,n?.siteGap),action:(t,n)=>i(Ki,{inherited:!ui(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Ke]:e}})}function $i(e){return dt(E("mobile",{[Ke]:e,type:"custom",render:t=>i(Yi,{container:e,...t})}),ln)}function Vi(e){return dt(E("tablet",{[Ke]:e,type:"custom",render:t=>i(ji,{container:e,...t})}),ln)}const ln={not:{field:"gap",in:Array.from({length:-Jt.min},(e,t)=>Jt.min+t)}};function za(e){return{gap:E("desktop",Xi(e)),[ve("gap")]:Vi(e),[j("gap")]:$i(e)}}function ji({container:e,...t}){const[n]=T("gap"),{siteGap:o}=t.field??{},r=Math.max(Ue.min,Zt(e,n,o));return je({...Ue,builtIn:r,resolve:l=>Xe(l)?l:r,action:(l,c)=>i(x,{words:y()?.panel,label:a("Gap"),changed:Xe(l),detail:M(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Yi({container:e,...t}){const[n]=T("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=Qt(e,void 0,n,o,r);return je({...Ue,builtIn:s,resolve:c=>Qt(e,c,n,o,r),action:(c,u)=>i(x,{words:y()?.panel,label:a("Gap"),changed:Xe(c),detail:K(`${s}px`,ci(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function qa(e){return Bi({offered:Jr(e),fallback:Wt(e,void 0),resolve:t=>Wt(e,t)})}function Ja(e,t){return eo(t?Qn(e,t):[],t)}function zi({inherited:e,onReset:t,label:n}){return i(x,{words:y()?.panel,label:a(n),changed:!e,detail:K(a("Full"),a("the page")),onReset:t})}function X({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:l=!0,markup:c=!0}){const{text:u,hidden:d}=st(e),h=J(null),p=J(null),f=C=>t(l?{text:C,hidden:d}:C),m=()=>t({text:u,hidden:!d}),g=l&&d,b=rt(),S=r?es(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(Co,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:l?i(ke,{content:w,children:i(Lt,{"aria-pressed":d,"aria-label":w,onClick:m,children:d?i(Dt,{name:"eye-off",size:14}):i(Dt,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[c&&i(vt,{target:s?p:h,value:u,onChange:f}),s?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 Za(e,t){return{...e,[ut]:t}}function Qa(e){const t=e[N];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[N]:{...t,offPage:!0}}}function ec(e){return!e||typeof e!="object"?!1:e[N]?.offPage===!0}function tc(e){if(!e[N])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[ur]:!0}}function nc(e){return cr(e)}function oc(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 hu,SCALAR_TEXT_CONTROLS as mu}from"efficient-easel/draw";function rc(e,t){if(!e[N])throw new Error("inOwnBox: the field holds no authored text");const{[sr]:o,...r}=e;return{...r,[ar]:!0,render:t}}const qi=new Set(Sr),pe={type:"radio",options:[{value:!0},{value:!1}]},an={text:{type:"object",objectFields:{text:{type:"text"},hidden:pe}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:pe}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},$=(e,t)=>{const n=F({...t,[N]:e},{...an[e.control],label:e.label});if(!qi.has(e.control))return n;const o=t.render;return{...Bt(n,"authored-copy"),render:r=>i(pr,{name:r.name,children:o(r)})}},ic="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Ji={field:"source.slug",set:!0},sc={not:Ji},Zi="Select a word, then press the highlighter.",Qi=new Set([Zi]),es=e=>Qi.has(e);function lc(e,t,n){return $({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(X,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function ac(e,t,n){return $({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(X,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function cc(e,t,n){return $({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(X,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function uc(e,t,n){return $({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(X,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function dc(e){return{type:"custom",[at]:{label:e},...F({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(Or,{value:lt(t),onChange:n,label:e})}}function pc(e,t,n){return $({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(X,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const fc={Design:oo,Animation:io};function hc(e,t){return{type:"custom",render:()=>i(ts,{text:e,values:t})}}function ts({text:e,values:t}){return i("p",{className:"sf-note",children:a(e,t)})}function mc(e){return ye(e)!==null&&e?.tabs!==void 0}const cn=new Map;function gc(e,t){const n=`${e}\0${t?t.join(""):""}`,o=cn.get(n)??{type:"custom",tabs:t,[Ce]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(L,{})};return cn.set(n,o),o}const un=new Map;function bc(e){const t=un.get(e)??{type:"custom",[Ce]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(L,{})};return un.set(e,t),t}function ns(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function wc(e,t){return ns(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(L,{})}}function Sc(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 _c({title:e,children:t}){const[n,o]=Z(()=>!ze.has(e));return i(Fo,{title:e,open:n,onToggle:r=>{o(r),r?ze.delete(e):ze.add(e)},children:t})}const ze=new Set;function os({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),s=r?o?.[r]:void 0,l=s?a(s):t;return k("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(ke,{content:u,children:i(Yo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:l})]})}function Cc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(rs,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function rs({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:l,n:c}=et(),u={background:l.background,surface:l.surface,surface2:li(l),band:si(l)},d=n?$e:t,h=Ci(s,t,d),p=en(void 0,d,u),f=n?wi:void 0,m=d===$e?a("the theme's section background"):a("Theme {n} background",{n:c}),g=is(s,t,l,c,u,r),b=K(p.toUpperCase(),m),S=Le(s),w=S?le(S,l,c):null;return w?i(se,{label:a(e),icon:i(ht,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Ft,{label:a(e),icon:i(ht,{}),value:h?"":en(s,t,u),inherited:p,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function is(e,t,n,o,r,s){const l=_i(e,t);return[{label:a("No fill"),color:"",selected:l==="none",onPick:()=>s(Si)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:l==="band",onPick:()=>s($e)},...Qe(Le(e)??"",n,o,s)]}function ss(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=mi(r,t);return i(_,{label:a(e),icon:i(Ee,{}),changed:!s,action:i(x,{words:y()?.panel,label:a(e),changed:!s,detail:a("the theme's image stage"),onReset:()=>o(di)}),children:os({swatches:hi,current:s?bi:gi(r,t),onPick:o,names:fi})})}}}function yc(e=n=>n,t){return ee({_gSectionTheme:R(yi),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(yr,{value:e(n),onChange:o,followLabel:t})}})}function fe(e){const t=I(),n=rn(e?.view),o=l=>Be(e.valueKey,l),r=e.numbersIn??(l=>V(t[o(l)])!==void 0),s=e.followsView??Cs(n,r);return Ai({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Fi,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:s},convertTo:e.convertTo??(l=>{const c=V(t[o(n)]);return c===void 0?{}:{[o(n)]:l(c)}})})}function q({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:l=!0,notch:c,ariaLabel:u,disabled:d=!1,placeholder:h,placeholderWord:p,onClear:f,units:m}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(or,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...p?{emptyLabel:a(p)}:{},suffix:s||void 0,...m?{units:m}:{},showInput:l,label:u===void 0?void 0:a(u),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:b=>{b===null?f?.():b!==o&&r(b)}})})}function ls(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:l,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||s===void 0?void 0:a(s):`${m}${h}`,changed:!g,action:u?_e(u,{changed:!g,onReset:()=>f(null)}):i(x,{words:y()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof l=="string"?a(l):l,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",as={kind:"radius"};function qe(e){return{type:"custom",render:t=>{const{value:n,onChange:o}=t,r=typeof n=="number"&&Number.isFinite(n)?n:null,s=r!==null;return i(_,{label:a(te),icon:i(gt,{}),changed:s,action:_e(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:i(cs,{tier:e,px:r,name:t.name,onRadius:o})})}}}function T(e){const t=B();return[t?.values?.[e],n=>t?.onChange(e,n)]}function dn(){return Bt({type:"custom",render:()=>i(lr,{})},"always")}function he(){const e=B();return t=>e?.onChangeMany(t)}function cs({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[s,l]=T(e.sidesKey),c=he(),u=fe({row:e.row??as,label:te,grid:{min:A,max:xe,step:e.step??1},valueKey:n??"",view:"desktop"}),d=Rt(s)??[...It];return i(zo,{label:a(te),value:d,corners:No,onChange:h=>{const p=Rt(h)??[];l(p.length===It.length?null:p)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??A,radiusMax:u?.grid.max??xe,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function pn(e,t){return ue(e,t)}function fn(){return dn()}function us({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=G(),r=typeof o=="number"?`${o}px`:a("not set");return i(x,{words:y()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):K(r,a("Styles")),onReset:n})}function ds(){const{cornerRadiusPx:e}=G();return typeof e=="number"?e:A}function ps(){return qe({sidesKey:"sectionCornerSides",row:Et,useFollowed:ds,mark:i(us,{label:te}),hint:fs})}const fs="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function xc(){return ee({_gShape:R("Shape"),sectionCorners:ps(),...pn(Et,"sectionCorners"),sectionCornerSides:fn(),...D("sectionBorder",_s),...ue(Yt,"sectionBorder",{tablet:!0,phone:!0})})}const hs=()=>({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 ms(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function gs(){let e;try{const t=qt(G().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||ri.line}function bs({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:l={},length:c}){const u=e&&typeof e=="object"?e:{},[d,h]=Z(()=>r?Go(u,l):!1),p=hs(),f=m=>ms(r&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(so,{}),action:r?i(Do,{each:d,label:a("Each side"),onChange:h}):void 0,children:i(Bo,{label:a("Border"),value:u,each:d,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...p,unit:c.unit}:p,styles:s,max:c?.grid.max??jt,...c?{step:c.grid.step,units:c.units}:{}})})}function ws({value:e,onChange:t,view:n}){const[o]=T("sectionBorder"),[r]=T(ve("sectionBorder")),s=gs(),l=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...zt(l(o)),...zt(l(r))}:n==="tablet"?l(o):{},u=I(),d=he(),h=O("sectionBorder",n),p=fe({row:Yt,label:"Border",grid:{min:0,max:jt,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>Je(u[Be("sectionBorder",f)]),convertTo:f=>{const m=l(u[h]);return Je(m)?{[h]:Ss(m,f)}:{}}});return i(bs,{value:e,length:p,onChange:p?f=>d({[h]:f,...p.unitPatch(!Je(f))}):t,placeholder:{sides:Ho(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}const hn=["width",...oi];function Je(e){if(!e||typeof e!="object")return!1;const t=e;return hn.some(n=>V(t[n])!==void 0)}function Ss(e,t){const n={...e};for(const o of hn){const r=V(n[o]);r!==void 0&&(n[o]=t(r))}return n}function _s(e){return{type:"custom",render:({value:t,onChange:n})=>i(ws,{value:t,onChange:n,view:e})}}function Cs(e,t){let n=Ye[e];for(;n&&Ye[n]!==null&&!t(n);)n=Ye[n];return n??e}function Oc(e){return{type:"custom",render:()=>i(ys,{partKey:e})}}function ys({partKey:e}){const[t]=T("id"),[n]=T("_partStyles"),{textStyles:o}=G(),r=Nr();let s=null;try{s=Er().select}catch{s=null}const l=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Ao,{name:a("Text"),preview:Ir(l,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Tr.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(Rr(t,e))}})}function mn(e){const{cornerRadiusPx:t}=G(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:l}=re(u=>u),c=l?.props?.id?String(l.props.id):void 0;o=c?Lo(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Po(r)?r:n}function xs({label:e,changed:t=!1,onReset:n=()=>{}}){const o=mn(A);return i(x,{words:y()?.panel,label:a(e),changed:t,detail:K(`${o}px`,a("the section")),onReset:n})}function Os(){return i(L,{children:a("Follows the section's Corners until you set a number here.")})}function Is(){return qe({sidesKey:"cardCornerSides",row:Tt,useFollowed:()=>mn(A),mark:i(xs,{label:te}),hint:i(Os,{})})}function Es(){return{type:"custom",render:()=>i(Gn,{})}}function Ic(){return{_gShape:R("Shape"),cardCorners:Is(),...pn(Tt,"cardCorners"),cardCornerSides:fn(),cardCornersApplyAll:Es()}}function Rs(){return F({type:"custom",[vi]:!0,render:e=>i(Ns,{...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 Ts(e,t){const n=Vt(e);if(n!=="custom")return a($t.find(r=>r.value===n)?.label??"");const o=kt(We(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):a("Custom")}function Ns(e){const{value:t,onChange:n}=e,[o]=T("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,l=t!=null,c=l?t:s?e.follows:void 0,u=Vt(c),d=r>=2&&r<=Pt,h=()=>[...er[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:Pt}),b=l&&(s||t!=="content"),S=nr().widths.hint(r,Qo);return i(_,{label:a(Y),icon:i(Ie,{}),changed:b,hint:u!=="custom"?void 0:d?S:g,action:i(x,{words:y()?.panel,label:a(Y),changed:b,disabled:e.readOnly===!0,detail:s?M(w=>a(w),Ts(e.follows,r),e.followsView):a("Fit content"),onReset:()=>n(void 0)}),children:k("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(Nt,{label:a(Y),value:u,options:$t.map(w=>({value:w.value,label:w.value==="custom"&&!d?g:a(w.label),icon:Di(i("span",{className:"sf-gallery-pic sf-share-pic",children:gn(w.weights).map((C,v)=>i("i",{style:{gridColumn:`span ${C}`}},v))}),a(w.label),w.value==="custom"&&!d?g:a(w.label))})),onChange:m,columns:3,cell:bn,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&d?i("div",{onFocus:()=>{p.current={value:t,shares:kt(We(c,r),r)}},onBlur:()=>{p.current=null},children:i(tr,{label:a(Y),count:r,value:We(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function gn(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 Ec(){return W(Zr,i(ho,{}),Ut,Ut[0].value)}function Rc(){return E("mobile",on(Y,i(Ie,{}),ni.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:gn(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),ti,{columns:2,cell:bn}))}const bn={width:"5.75rem",height:"3.25rem",words:!0};function Tc(){return Ve("share",Rs(),nn)[ve("share")]}function Ps(){return E("mobile",U(Kt,i(mt,{}),Me,ei,1,Me,"",{clear:{phoneFollows:!1,hint:Me}}))}const wn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Nc(){const e=U(Kt,i(mt,{}),Xt,Qr,1,Xt,"",{clear:{emptyLabel:"Auto"}}),t=Ve("columns",e,{...wn,tablet:nn.tablet}),n=Ve("columns",e,wn,{phoneRow:Ps()});return{...t,phoneRow:n.phoneRow}}function Pc(e,t,n,o,r,s,l){return{type:"custom",render:({value:c,onChange:u,name:d})=>i(ks,{label:e,min:t,max:n,step:o,fallback:r,role:s,value:c,onChange:u,name:d??"",length:l})}}function ks({label:e,min:t,max:n,step:o,fallback:r,role:s,value:l,onChange:c,name:u,length:d}){const h=I(),p=he(),f=rn(d?.view),m=fe({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(xt,{noun:s}),action:i(x,{words:y()?.panel,label:a(e),changed:!Ii(l),detail:a("the Text style in Styles"),onReset:()=>g(Oi),defaultAction:{onPress:()=>g(xi),title:a("Keep this section's own built-in size"),icon:i(lo,{})}}),children:q({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof l=="number"?l:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function Sn(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 kc(){return{_gCellWidth:R("Cell size"),gridSpan:W("Positions",i(Ie,{}),Sn($n,"position","positions"),""),gridRowSpan:W("Rows tall",i(Re,{}),Sn(Vn,"row","rows"),"")}}function I(){let e=null,t=null;try{e=ot(Ls),t=re(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Ls=Tn(null);function As({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:l,fallback:c}){const u=I()[l],d=Fe(void 0,u,c);return i(L,{children:q({min:e,max:t,step:n,value:Fe(o,u,c),readout:!1,ariaLabel:r,notch:d,onChange:s})})}function Fs({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const l=I()[t],c=Fe(void 0,l,n);return i(x,{words:y()?.panel,label:a(e),changed:r,detail:M(u=>a(u),`${c}${o}`),onReset:s})}function vs(e){return ls(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Fs,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(As,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Bs={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Ds={Top:Te,Bottom:St,Left:_t,Right:Ct},Hs=e=>{const t=Ds[e];return i(t,{})};function Lc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>Bs[S],s=S=>U(r("Top"),i(Te,{}),P.min,P.max,P.step,S,"px"),l=(S,w,C,v=P)=>E("mobile",vs({label:r(S),icon:Hs(S),desktopKey:w,min:v.min,max:v.max,step:v.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?E("desktop",S):S;return ee({...o?{_gSpacing:R("Padding")}:{},[t]:b(s(c)),...g?{[j(t)]:l("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(U(r("Bottom"),i(St,{}),P.min,P.max,P.step,u,"px")),...g?{[j(n)]:l("Bottom",n,u)}:{}},...e.sides?{[d]:b(U(r("Left"),i(_t,{}),p.min,p.max,p.step,f,"px")),...g?{[j(d)]:l("Left",d,m,p)}:{},[h]:b(U(r("Right"),i(Ct,{}),p.min,p.max,p.step,f,"px")),...g?{[j(h)]:l("Right",h,m,p)}:{}}:{}})}function Ac(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,s in e&&ye(l)?e[s]:l])),o={};let r=!1;for(const[s,l]of Object.entries(e)){if(s in t){r||Object.assign(o,n),r=!0;continue}o[s]=l}return r||Object.assign(o,n),o}const me="Width";function Fc(e,t=Ei,n=!0){const o=t.map(r=>({label:Ri[r],value:r}));return ee({...n?{_gWidth:R(me)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(_,{label:a(me),icon:i(yo,{}),action:n?i(zi,{inherited:s?.inherited??!1,onReset:()=>r(Ti),label:me}):void 0,children:de({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:me})})}})}function vc({fill:e=!1}={}){const t=(r,s)=>({type:"custom",render:({value:l,onChange:c})=>i(Gs,{value:l,onChange:c,view:r,badge:s,fill:e})}),n=()=>Ae("sectionHeightMode"),o=()=>Ae("sectionHeightMode");return ee({_gHeight:R(Q),...D("sectionHeightMode",r=>r==="desktop"?t(r):t(r,s=>i(Ks,{view:r,onClear:()=>s(void 0)}))),...D("sectionHeightValue",n),...D("sectionHeightUnit",o)})}function Gs({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const s=I(),{mode:l,number:c,unit:u}=Ms(n,s,e);return i(_,{label:Q,icon:z(i(Re,{})),action:o?o(t):void 0,children:k("div",{className:"es-width-stack",children:[de({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...r?[{label:"Fill",value:"fill"}]:[]],value:l,onChange:t,ariaLabel:Q}),c?i(Us,{view:n,mode:l,menu:u}):null]})})}function _n(e,t){return e==="phone"&&De(t)?Lr(t):kr(t)}function ge(e,t){return e==="desktop"||(e==="tablet"?De(t):Pr(t))?null:_n(e,t)}function Ms(e,t,n){const r=(s=>Yr.includes(s))(n)?n:ge(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function Ws(e,t,n,o){const r=ge(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[O("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[O("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[O("sectionHeightValue",e)]:r.value}:{},[O(n,e)]:o}}function Cn(e,t,n){const o=B(),r=ge(e,I());return!o||!r?{followed:null,write:n}:{followed:r,write:l=>o.onChangeMany(c=>{const u=Ws(e,c,t,l);return u===null?{[O(t,e)]:l}:Object.keys(u).length?u:null})}}function Us({view:e,mode:t,menu:n}){const o=B(),r=I(),s=O("sectionHeightValue",e),l=O("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:d}=Cn(e,"sectionHeightValue",c(s)),{write:h}=Cn(e,"sectionHeightUnit",c(l)),p=t==="screen"?"%":r[l],f=(u?u.unit:p)==="%"?"%":"px",m=f==="%"?qr:zr,g=r[s],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 Ks({view:e,onClear:t}){const n=I(),o=ge(e,n)===null,r=e==="phone"&&De(n),s=_n(e,n),l=M(c=>a(c),s.mode==="auto"?a("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(x,{words:y()?.panel,label:a(Q),changed:o,detail:l,onReset:t})}function Bc(e={}){const t=e.intro===!0,n=s=>({type:"custom",render:({value:l,onChange:c,id:u,name:d})=>i(qs,{value:l,onChange:c,labelId:`${u??d??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:l,onChange:c})=>i(js,{value:l,onChange:c,view:s,intro:t})}),r=s=>({type:"custom",render:({value:l,onChange:c})=>i(Ys,{value:l,onChange:c,view:s,intro:t})});return{_gStick:R(Dr,{dot:t?Vs:Mt}),...D("stickTop",n),...D("stickTopDistance",o),...ue(Ge,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?D(He,r):{},...t?{}:{[Mr]:Xs()},...t||e.above===!1?{}:{[vr]:$s()}}}function Xs(){const e=W(Wr,i(Te,{}),Ur,Hr);return E("desktop",{...e,render:t=>{const n=e.render({...t,value:$r(t.value),onChange:o=>t.onChange(Vr(o))});return _e(n,{hint:a(Gr)})}})}function $s(){const e=On(Br,!1,i(yt,{}),Fr);return E("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const Vs={any:[Mt,Ar]};function yn(e,t,n,o,r){const s=B(),l=I(),c=e==="desktop"||ne(e,l)?null:Ze(e,ae(l,{intro:o}));return{followed:c,write:(c||r)&&s?d=>s.onChangeMany(h=>{const p=zs(e,h,d,t,o),f=p===null?{[O(t,e)]:d}:p;return Object.keys(f).length?{...f,...r?.(d)??{}}:null}):n}}function js({value:e,onChange:t,view:n,intro:o}){const r=I(),s=ae(r,{intro:o}),l=h=>{const p=Gi(h);return p==="desktop"||ne(p,r)},c=fe({row:Ge,label:"Distance from top",grid:{min:H.min,max:H.max,step:H.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>l(h)&&V(r[Be("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:u,write:d}=yn(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??H.min,max:c?.grid.max??H.max,step:c?.grid.step??H.step,value:u?null:typeof e=="number"?e:H.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:d})})}function Ys({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:s}=yn(n,He,t,o);return i(_,{label:a(Gt),icon:z(i(Re,{})),children:q({min:ie.min,max:ie.max,step:ie.step,value:r?null:V(e)??ie.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Gt),onChange:s})})}function ne(e,t){return e==="tablet"?Xr(t):Kr(t)}function Ze(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 zs(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const s=Ze(e,ae(t,{intro:r})),l=e==="phone"&&ne("tablet",t)?h=>O(h,"tablet"):h=>h,c=(h,p)=>t[l(h)]==null?{}:{[O(h,e)]:p},u=Ge.unitKey,d=t[l(u)]==null?{}:{[O(u,e)]:s.unit};return{[O("stickTop",e)]:!0,...c("stickTopDistance",s.distance),...d,...c(He,s.screens),[O(o,e)]:n}}function qs({value:e,onChange:t,labelId:n,view:o,intro:r}){const s=I(),l=ae(s,{intro:r}),c=o==="phone"?l.phone:o==="tablet"?l.tablet:r?l.desktop:e===!0,u=o==="phone"&&l.ownTablet,d=o==="desktop"?null:Ze(o,l),h=d?.on?jr(d.distance,d.unit):a("Off");return i(_,{label:a(Ht),labelId:n,icon:z(i(yt,{})),action:k(L,{children:[o!=="desktop"?i(x,{words:y()?.panel,label:a(Ht),changed:ne(o,s),detail:M(p=>a(p),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Pe,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const xn="e.g. about";function Dc(){return{_gAnchor:R("Anchor"),anchor:$({control:"plainText",label:"Name",placeholder:xn},{type:"custom",render:({value:e,onChange:t})=>i(to,{value:e,onChange:t,nameBox:(n,o)=>i(X,{value:n,onChange:o,label:"Name",placeholder:xn,hideable:!1,markup:!1})})})}}function Hc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??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(Jo,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:d=>r(d?d.toISOString():"")})})}}}function Gc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-date`;return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(qo,{id:c,value:kn(typeof o=="string"?o:null),onChange:u=>r(u?Pn(u):"")})})}}}function On(e,t,n,o){return{type:"custom",...F({},{...pe,label:e}),render:r=>{const{value:s,onChange:l,id:c,name:u}=r,d="follows"in r,h=r,p=typeof s=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=p?s:d?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(Pe,{checked:m,onChange:l,disabled:b,ariaLabelledBy:g});return i(_,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:d?k(L,{children:[i(x,{words:y()?.panel,label:a(e),changed:p,detail:h.followsNoView?a(f?"On":"Off"):M(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>l(void 0)}),S]}):S})}}}function Mc(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(Js,{label:"Background",icon:i(wo,{}),id:r,value:e,shown:xo(e),onChange:t})}}}function Wc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(se,{label:a(e),icon:n,value:o||t,onChange:r})}}function Js({label:e,icon:t,id:n,value:o,shown:r,onChange:s}){const{colors:l,n:c}=et(),u=Le(o),d=u?le(u,l,c):null;return i(se,{label:a(e),icon:t,id:n,value:d?d.hex:r,caption:d?.words,onChange:s,choices:Qe(u??"",l,c,s)})}function Uc(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(Zs,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Qe(e,t,n,o){const r=Ne(e);return ir(t,n).map(s=>({label:s.label,color:s.value,selected:r===s.name,onPick:()=>o(s.name)}))}function Zs({value:e,onChange:t,twin:n}){const{colors:o,n:r}=et(),s=o.background,l=K(s.toUpperCase(),a("Theme {n} background",{n:r})),[c,u]=T(Oo),[d]=T(Eo),h=typeof d=="string"&&d.trim()!=="",p=Ot(c),f=oe=>u(Ot(oe)||void 0),m=Ne(e),g=m?le(m,o,r):null,b=Qe(e,o,r,t),S=n?()=>t(void 0):()=>t("");let w=s,C=l;if(n){const oe=Ne(n.follows),we=Ro(n.follows),Se=oe?le(oe,o,r):we?{hex:we,words:we.toUpperCase()}:null;w=Se?.hex??s,C=M(Rn=>a(Rn),Se?Se.words:l,n.view)}const v=!n&&(To(e)||h)?i(Qs,{value:p,onChange:f}):null;return g?i(se,{label:a("Fill"),icon:i(Ee,{}),value:g.hex,caption:g.words,onChange:t,changed:!0,onReset:S,resetTo:C,choices:b,children:v}):i(Ft,{label:a("Fill"),icon:i(Ee,{}),value:e,inherited:w,resetTo:C,onChange:t,onReset:S,choices:b,children:v})}function Qs({value:e,onChange:t}){return de({options:Io.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:a("Fill")})}function el(e,t,n){if((e?.content??[]).some(l=>l?.props?.id===t))return ce(n);const r=ko(e,t);if(r.length===0)return null;const s=ce(tn(n));if(s!==null)return s;for(let l=r.length-1;l>0;l-=1){const c=ce(tn(r[l].sectionAccent));if(c!==null)return c}return ce(r[0].sectionAccent)}function et(){const e=qt(G().theme),[t]=T("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=re(c=>c),l=s?.props?.id?String(s.props.id):void 0;n=l?el(r?.data,l,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:ii(e.themes[o]),n:o+1}}function Kc(){return dn()}const Xc={top:i(po,{}),right:i(uo,{}),bottom:i(ao,{}),left:i(co,{})};function $c(e,t,n,o,r,s,l){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=s?.[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):l?a(l):"",children:Li(a,{label:e,value:m,onChange:f,points:h})})}}}function Vc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(Cr,{label:e,options:(s.options??t).map(l=>({...l,label:a(l.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function jc(e,t,n,o){return{type:"custom",options:t,fallback:n,...F({},{type:"select",label:e}),render:({value:r,onChange:s,field:l})=>i(xr,{label:e,options:(l.options??t).map(c=>({...c,label:a(c.label)})),fallback:l.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:a(o)})}}function Yc(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const zc=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function qc(e,t,n){const o=Object.keys(it).map(r=>({label:it[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(nl,{label:e,icon:t,options:o,onChange:r})}}function tl(e,t,n){const o=Ln(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=Fn(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 nl({label:e,icon:t,options:n,onChange:o}){const r=B(),s=r?.values??{},l=An(s),c=ot(Dn),u=Bn(c?.docId??null);let d=null;try{d=re(p=>p.appState.data)}catch{d=null}const h=vn(r?.id,d,u);return i(_,{label:a(e),icon:z(t),hint:tl(s,h,c?.hasUnsavedEdits??!1),children:de({options:n,value:l,onChange:o,ariaLabel:e})})}function Jc(e,t,n,o={}){const r={type:"custom",[ct]:!0,render:({value:s,onChange:l,name:c})=>i(_r,{value:s||"",onChange:l,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?E("each",r):r}const Zc={HeroSingle:["imageFocal"],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ol(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 Qc({value:e,onChange:t,label:n}){const o=e||{},r=B(),s=r?r.values!==r.node.props:!0,l=!!o.pending&&s,c=!!o.pending&&!s,u=!!Pi(Ni()).geocode,d=rt(),h=(p,f)=>t({...o,[p]:f??void 0});return k(L,{children:[i(_,{label:a(n),icon:i(wt,{}),action:u?i(ke,{content:a("Find from the address (OpenStreetMap)"),children:i(Lt,{"aria-label":a("Find from the address"),"aria-busy":l||void 0,disabled:l,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(So,{})})}):void 0,children:u&&o.status?i(no,{compact:!0,oneLine:!0,spaced:!1,status:l?"busy":o.ok&&!c?"found":"notfound",statusText:l?a("Finding…"):c?a(rr):a(o.status),hint:ol(o)}):null}),i(_,{label:a("Enter by hand"),labelId:d,icon:i(fo,{}),action:i(Pe,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:d})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(wt,{}),children:k("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(At,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(At,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function rl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function il(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,s)=>s===t?{text:n}:r)}function eu(e,t){return e===null?null:t>e?e:null}function sl(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 tu={label:"Ticker items",icon:i(bo,{})};function nu(e,t,n,o){return{type:"custom",[N]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...F({},{...an.textList,label:e}),render:({value:r,onChange:s})=>i(ll,{label:e,icon:z(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function ll({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const l=J(null),[c,u]=Z(null),d=p=>p.map(f=>({text:f?.text??""})),h=p=>{const f=sl(n,p,c);f===null&&(l.current=null),u(f),r(d(p))};return i(Mo,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(vt,{target:l,value:rl(n,c),onChange:p=>r(il(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:s&&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=>{l.current=g.currentTarget,u(f)}})})}function ou(e,t){const n=`${e.label} — row ${t+1}`;return $({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(X,{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 ru(e){return{_gCards:R("Cards"),coverIndex:W("Cover image",i(go,{}),br,String(wr),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:ss("Image background",pi),cardImage:In()}}function iu(){return{outline:W("Card outline",i(_o,{}),hr,gr),indexBadge:W("Card number",i(mo,{}),fr,mr),showBadge:On("Product badge",!0,i(xt,{noun:"tag"}))}}function su(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...pe,label:be.find(s=>s.id===r).label}),o=r=>F(Ae(tt),n(r));return{_gShowOnCard:R("Show on a card"),[tt]:F({type:"custom",render:()=>i(al,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(tt)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const tt="showCardPrice",be=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function al({rest:e}){const t=I(),n=he(),o=l=>typeof t[l]=="boolean"?t[l]:void 0,r=l=>o(l)??e[l],s=be.some(({id:l})=>o(l)!==void 0&&o(l)!==e[l]);return i(nt,{parts:be,changed:s,shown:r,onPress:(l,c)=>n({[l]:c}),onReset:()=>n(Object.fromEntries(be.map(({id:l})=>[l,void 0])))})}function lu(e,t="display"){const n=j(t);return{[t]:E("desktop",{type:"custom",render:({value:o,onChange:r})=>i(nt,{parts:e,changed:Uo(o),shown:s=>Ko(o,s),onPress:(s,l)=>r(Vo(o,s,l)),onReset:()=>r(void 0)})}),[n]:E("mobile",{type:"custom",render:({value:o,onChange:r})=>i(cl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function nt({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:l}){const c=a("Display");return i(_,{label:c,icon:i(ro,{}),changed:t,action:i(x,{words:y()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(Wo,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...l?{disabled:!0,disabledReason:a(l)}:{}})),onChange:o})})}function cl({parts:e,desktopKey:t,value:n,onChange:o}){const r=I()[t];return i(nt,{parts:e,changed:$o(n),shown:s=>Xo(r,n,s),onPress:(s,l)=>o(jo(n,s,l)),onReset:()=>o(dr),detail:a("the same as Desktop")})}function In(e=Mn){return U("Card image",i(gt,{}),A,xe,Wn,A,e,{clear:{hint:A},hint:"Rounds the picture. The card's own corner is in Styles."})}function ul(){return ue(pt,"cardImage")}function au(){return{cardImage:In(pt),...ul()}}function cu(){return qe({sidesKey:"cornerSides",row:Xn,step:Un,useFollowed:()=>A,mark:i(dl,{label:Kn}),hint:a("Rounds the picture. Left alone it stays square.")})}function dl({label:e,changed:t=!1,onReset:n=()=>{}}){return i(x,{words:y()?.panel,label:a(e),changed:t,onReset:n})}function uu(){return{type:"custom",render:({value:e,onChange:t})=>i(ml,{value:typeof e=="string"?e:"",onChange:t})}}const En="own";function du(){const e=[{value:En,label:"Layout's own",picture:sn(Array.from({length:8},()=>[3,1]))},...Object.entries(zn).map(([t,n])=>({value:t,label:n.label,picture:sn([...n.phone,...n.phone])}))];return E("mobile",on("Layout",i(bt,{}),e,En,{columns:2,cell:Wi}))}function pl({layout:e,width:t}){const n=qn(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:Jn(e).map(([r,s],l)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${s}`,aspectRatio:o}},l))})}const fl={width:"3.5rem",height:"2.5rem",words:!1},hl=200;function ml({value:e,onChange:t}){const[n,o]=Z(null),[r,s]=Z(4),l=J(null);Nn(()=>{const m=l.current;if(!m||typeof ResizeObserver!="function")return;const g=()=>s(m.getBoundingClientRect().width>=hl?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?Mi(Oe,e):void 0,u=c?e:"",d=ft(n,u),h=ft(n,"").length,p=Zn("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:Hi(p,a("Not chosen"))},...d.map(m=>({value:m,label:a(Oe[m].label),icon:i(pl,{layout:Oe[m],width:40})}))];return i(_,{label:a("Layout"),icon:i(bt,{}),value:c?a(c.label):void 0,children:i("div",{ref:l,style:{flex:"1 1 auto",minWidth:0},children:i(Nt,{label:a("Layout"),value:u,options:f,onChange:t,columns:r,cell:fl,header:k("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(vo,{options:[{id:"all",label:a("All")},...jn.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:Yn.length})})]})})})})}export{Ji as BOUND_TO_POST,ic as BOUND_TO_POST_NOTE,fc as BUCKET_ICONS,Zc as CUSTOM_FIELD_MEDIA,Qc as CoordsField,ln as DESKTOP_GAP_NOT_OVERLAP,nt as DisplayRow,Xc as EDGE_ARROWS,Zo as FOCAL_DEFAULT,Ce as FOLD_FIELD_MARKER,Zi as HIGHLIGHT_HINT,X as HidableTextField,at as LINK_FIELD_MARKER,Ya as Label,ct as MEDIA_FIELD_MARKER,zc as MEDIA_TYPE_OPTIONS,sc as NOT_BOUND_TO_POST,_c as PanelBand,ts as PanelNoteLine,Ls as RowPropsContext,ut as SCAFFOLD_FIELD_MARKER,mu as SCALAR_TEXT_CONTROLS,Ki as SiteGapDefaultReset,q as Slider,os as Swatches,hu as TEXT_CONTROL_KINDS,N as TEXT_FIELD_MARKER,tu as TICKER_ITEMS_ROW,ll as TextListField,Js as ThemeFillRow,me as WIDTH_LABEL,zi as WidthDefaultReset,sl as aimAfterListChange,Dc as anchorFields,K as backTo,Cc as backgroundField,Ec as boxBlockSpacingField,Nc as boxColumnsFields,Uc as boxFillField,Ps as boxPhoneRowField,Rs as boxShareField,Rc as boxSharePhoneField,Tc as boxShareTabletField,el as boxThemeIndexOf,gc as bucketHeader,Oc as buttonWordsEntryField,Is as cardCornersField,ss as cardImageBackgroundField,In as cardImageField,au as cardImageFields,ru as cardMediaFields,Ic as cardShapeFields,su as cardShowFields,iu as cardStyleFields,kc as cellWidthFields,Wc as colorInput,qa as containerDirectionField,Xi as containerGapField,$i as containerGapPhoneField,za as containerGapRows,Vi as containerGapTabletField,ol as coordsResultTip,uc as copyText,fn as cornerSidesField,qe as cornersRowField,pn as cornersUnitFields,Gc as date,Hc as dateTime,bc as designGroupHeader,lu as displayFields,$c as edgePad,Qe as fillSlotChoices,eu as focusAfterRemove,Kc as focusKeptField,wc as foldMarker,ye as foldMetaOf,ns as foldTitleOf,Ws as followedHeightPatch,zs as followedStickPatch,uu as galleryLayoutField,du as galleryLayoutPhoneField,vc as heightFields,ge as heightFollowedBy,Ms as heightLayersAt,Ja as heroGroupPlacementPoints,lt as hidableText,es as hintIsWhileTyping,cu as imageCornersField,rc as inOwnBox,mc as isBucketHeader,dn as keptBy,dc as linkField,tl as loadingRowHint,qc as loadingShowsField,Vc as multiSelect,Mc as pageBackgroundField,hc as panelNote,vs as phoneOverrideField,cc as plainText,pc as plainTextarea,ls as pxField,Sc as quietMarker,st as readHidable,rl as rowText,jc as searchSelect,is as sectionBandChoices,ps as sectionCornersField,xc as sectionShapeFields,yc as sectionThemeFields,il as setRowText,Pc as sizeField,Yc as sourceField,Lc as spacingFields,Bc as stickFields,Ac as swapPadding,lc as text,Hn as textFieldIdentifier,ec as textFieldOffPage,nc as textFieldPanelOnly,nu as textList,ou as textListRowField,ac as textarea,On as toggle,Jc as upload,fe as useLengthRow,he as useSelectedPatch,I as useSelectedProps,T as useSelectedSibling,Ui as useSiteGapDetail,Fc as widthField,oc as withIdentifier,Qa as withOffPage,tc as withPanelOnly,Za as withScaffold};
|
|
1
|
+
"use client";import{jsx as i,jsxs as k,Fragment as F}from"react/jsx-runtime";import{HERO_FOCUS as Nn,HERO_MEDIA_TYPES as Pn}from"../../../format/lib/hero-media-layout.js";import{cloneElement as _e,createContext as kn,useContext as it,useEffect as Fn,useId as st,useRef as J,useState as Z}from"react";import{useEasel as re,useSelectedHost as D}from"efficient-easel/easel";import{PIN_LENGTH as ie,toDateKey as Ln,fromDateKey as An}from"efficient-shell/format";import{say as a,editorEaselWords as y}from"../../../format/lib/editor-words.js";import{finiteNumber as j}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as lt,firstFrameHint as Bn,loadingShowsOf as Dn,loadingStillHint as vn}from"../../../format/lib/hero-video.js";import{pageFramesFor as Hn,usePageVideoFrames as Gn}from"../page-video-frames.js";import{ScreenDocumentContext as Mn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as at,hidableText as ct}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Ce,LINK_FIELD_MARKER as ut,MEDIA_FIELD_MARKER as ye,SCAFFOLD_FIELD_MARKER as dt,TEXT_FIELD_MARKER as N,foldMetaOf as xe,textFieldIdentifier as Wn}from"efficient-easel/draw";import Un from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as pt}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as Kn,CARD_IMAGE_RADIUS_ROW as ft,CARD_IMAGE_RADIUS_STEP as $n,CORNER_RADIUS_MAX as Oe,CORNER_RADIUS_MIN as L}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Xn,IMAGE_CORNERS_LABEL as jn,IMAGE_CORNERS_ROW as Vn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as Yn,GRID_MAX_ROW_SPAN as zn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as qn,GALLERY_LAYOUTS as Ee,GALLERY_LAYOUT_KEYS as Jn,GALLERY_PHONE_LAYOUTS as Zn,galleryChoices as ht,galleryLayoutRatio as Qn,galleryPictureCells as eo}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as to}from"./shell-glyph.js";import{anchorSiblingsOf as no,placementPoints as oo}from"../../../format/lib/hero-group-placement.js";import ro from"../../components/AnchorField.js";import io from"../../components/SourceStatus.js";import{AdjustIcon as so,EyeIcon as lo,AnimationIcon as ao,BackgroundIcon as mt,BorderAllIcon as co,BlockSectionIcon as uo,ColumnWidthsIcon as Ie,ColumnsIcon as gt,CornerIcon as bt,DirectionDownIcon as po,DirectionLeftIcon as fo,DirectionRightIcon as ho,DirectionUpIcon as mo,EditIcon as go,GapIcon as bo,GridIcon as wt,GroundIcon as Re,HashIcon as wo,HeightIcon as Te,ImageIcon as So,ListIcon as _o,LocationIcon as St,PaddingBottomIcon as _t,PaddingLeftIcon as Ct,PaddingRightIcon as yt,PaddingTopIcon as Ne,PageIcon as Co,StickyIcon as xt,SearchIcon as yo,SquareIcon as xo,TypeIcon as Oo,WidthIcon as Eo}from"efficient-easel/icons";import{FieldGlyph as Ot}from"../../components/FieldGlyph.js";import{resolvePageBackground as Io}from"../../../format/lib/content/page-background.js";import{BOX_FILL_FADE_PROP as Ro,BOX_FILL_FADES as To,BOX_SWATCH_PROP as No,boxFillFadeOf as Et,boxFillOf as Po,boxFillSlot as Pe,boxPaintOf as ko}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as It,CORNER_SIDE_POINTS as Fo,SECTION_CORNERS_ROW as Rt,hasOwnSectionCorners as Lo,normalizeCornerSides as Tt}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as Nt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as Ao,enclosingSection as Bo}from"./enclosing-section.js";import{SettingsDefaultReset as x,SettingsDrill as Do,SettingsField as _,SettingsGroup as vo,SettingsSegmented as Ho,SettingsBorder as Go,SettingsSidesEach as Mo,SettingsSwitch as ke,borderSides as Wo,borderStartEach as Uo}from"efficient-easel/panel";import{ListField as Ko}from"efficient-easel/fields";import{DisplayChips as $o}from"efficient-shell/ui";import{desktopDisplayChanged as Xo,partShownOnDesktop as jo,partShownOnPhone as Vo,phoneDisplayChanged as Yo,withDesktopPart as zo,withPhonePart as qo}from"../../../format/lib/content/part-display.js";import{ColorSwatch as Jo,CornersInput as Zo,DatePicker as Qo,DateTimePicker as er,FOCAL_DEFAULT as tr,IconPicker as Pt,COLUMN_COUNT_MAX as kt,COLUMN_SHARE_MIN as nr,COLUMN_SHARES_EQUAL as or,resolveColumnShares as Ft,WidthsBar as rr,useShellStrings as ir,IconButton as Lt,InputNumber as At,Slider as sr,Tooltip as Fe}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as lr}from"./geocode-resolve.js";import{ColourRow as se,InheritedColourRow as Bt}from"./ColourControl.js";import{fillThemeColors as ar,slotFill as le}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Le}from"../../../format/lib/document/part-inks.js";import{keptByRow as Ae}from"efficient-easel/screen/lib/document/style-fields";import Dt from"./MarkupToolbar.js";import{deviceField as I}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as cr,NoControlMark as ur,noControlField as vt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as dr}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as pr,PANEL_ONLY_FIELD as fr}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as hr,resolvePhoneValue as Be}from"../../../format/lib/document/phone-override.js";import{phoneKey as V,tabletKey as De,viewKeyAt as ve}from"efficient-easel/draw";import{viewKey as O}from"../../../format/lib/animation/views.js";import{viewRows as v}from"../animation/view-rows.js";import{SuppressibleText as mr}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as gr,CARD_OUTLINE_OPTIONS as br,DEFAULT_CARD_INDEX_FORMAT as wr,DEFAULT_CARD_OUTLINE as Sr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as _r,DEFAULT_COVER_INDEX as Cr}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as yr}from"efficient-easel/draw";import xr from"../../components/MediaUploadField.js";import Or from"../../components/MultiSelectField.js";import Er from"../../components/SectionThemePicker.js";import Ir from"../../components/SearchSelectField.js";import Rr from"../../components/StorefrontLinkField.js";import{UiIcon as Ht}from"efficient-easel/draw/client";import{SECTION_PADDING as P}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Tr}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Nr}from"efficient-easel/draw/client";import{encodePartId as Pr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as kr,useEaselStrings as Fr}from"efficient-easel/strings";import{hasPhoneHeight as Lr,hasTabletHeight as He,resolveSectionMinHeight as Ar,resolveTabletHeight as Br}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as Dr,SECTION_PIN_ABOVE_HINT as vr,SECTION_PIN_ABOVE_KEY as Hr,SECTION_PIN_ABOVE_LABEL as Gr,SECTION_PIN_GROUP as Mr,SECTION_PIN_LABEL as Gt,SECTION_PIN_SCREENS_KEY as Ge,SECTION_PIN_SCREENS_LABEL as Mt,SECTION_PIN_STOP_DEFAULT as Wr,SECTION_PIN_STOP_HINT as Ur,SECTION_PIN_STOP_KEY as Kr,SECTION_PIN_STOP_LABEL as $r,SECTION_PIN_STOP_OPTIONS as Xr,SECTION_STICK_DISTANCE as H,SECTION_STICK_DISTANCE_ROW as Me,SOME_VIEW_PINS as Wt,hasPhoneStick as jr,hasTabletStick as Vr,resolveSectionStick as ae,sectionPinStopOf as Yr,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 Jr,SECTION_MIN_HEIGHT as Zr,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as Qr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as ei,resolveContainerDirection as Ut}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as ti,BOX_BLOCK_SPACING_POINTS as Kt,BOX_PHONE_ROW_LABEL as $t,BOX_COLUMNS_MAX as ni,BOX_COLUMNS_MIN as Xt,BOX_PHONE_ROW_MAX as oi,BOX_PHONE_ROW_MIN as We,BOX_SHARE_CHOICES as jt,BOX_SHARE_LABEL as Y,boxShareChoiceOf as Vt,boxShareWidthsOf as Ue,BOX_SHARE_PHONE_DEFAULT as ri,BOX_SHARE_PHONE_POINTS as ii}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as G}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Yt,BORDER_SIDES as si,SECTION_BORDER_ROW as zt,borderBySide as qt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as li,normalizeTheme as Jt,normalizeThemeColors as ai,sectionBandTone as ci,surfaceTwoTone as ui}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Zt,CONTAINER_GAP_BUILT_IN as di,CONTAINER_GAP_PHONE as Ke,GAP_FIELD_CONTAINER as $e,followsSitePhoneGap as pi,hasOwnContainerGap as fi,hasOwnPhoneGap as Xe,resolveContainerGap as Qt,resolvePhoneContainerGap as en}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as hi,CARD_IMAGE_BG_OFF as mi,CARD_IMAGE_BG_SWATCH_NAMES as gi,CARD_IMAGE_BG_SWATCHES as bi,isCardImageBackgroundInheriting as wi,cardImageBackgroundChoice as Si,THEME_CARD_IMAGE_BG as _i}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Ci,SECTION_BG_NO_FILL as yi,sectionBackgroundChoice as xi,THEME_SECTION_BG as je,isSectionBackgroundEmpty as Oi,sectionBackgroundHex as tn}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Ei,nestedAccentValue as nn,resolveSectionAccent as ce}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Ii,TYPE_SIZE_INHERIT as Ri,isTypeSizeInheriting as Ti}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Ni,WIDTH_CHOICE_LABEL as Pi,WIDTH_INHERIT as ki}from"../../../format/lib/content/section-width.js";import{useEaselSession as Fi}from"efficient-easel/screen/lib/session-context";import{backendOf as Li}from"../website-session.js";import{BOX_GAP as Ai,describedAs as A,group as R,iconOf as z,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as on,onDesktopWords as M,phoneTwinFields as Ve,saidAlignmentGrid as Bi,useLengthUnit as Di}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as vi,PICTURE_PICKER_ROW as Hi,directionField as Gi,gapField as Ye,iconPickerRow as rn,lengthUnitFields as ue,pickerCellIcon as Mi,pickerNoneIcon as Wi,Segmented as de,select as W,slider as U}from"./box-fields.js";import{VIEW_ABOVE as ze}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as sn,viewOfTier as Ui}from"../../../format/lib/content/view-tier.js";import{ownEntry as Ki}from"../../../format/lib/own-entry.js";import{LAYOUT_CELL as $i,galleryPhonePicture as ln}from"./choice-pictures.js";function Qa({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function K(e,t){return a("{value} from {from}",{value:e,from:t})}function Xi(){const{blockGap:e}=G();return e===null?a("this container's own spacing"):K(`${e}px`,a("Styles"))}function ji({inherited:e,onReset:t,label:n}){return i(x,{words:y()?.panel,label:a(n),changed:!e,detail:Xi(),onReset:t})}function Vi(e){return Ye({...Ai,builtIn:di[e],resolve:(t,n)=>Qt(e,t,n?.siteGap),action:(t,n)=>i(ji,{inherited:!fi(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[$e]:e}})}function Yi(e){return pt(I("mobile",{[$e]:e,type:"custom",render:t=>i(Ji,{container:e,...t})}),an)}function zi(e){return pt(I("tablet",{[$e]:e,type:"custom",render:t=>i(qi,{container:e,...t})}),an)}const an={not:{field:"gap",in:Array.from({length:-Zt.min},(e,t)=>Zt.min+t)}};function ec(e){return{gap:I("desktop",Vi(e)),[De("gap")]:zi(e),[V("gap")]:Yi(e)}}function qi({container:e,...t}){const[n]=T("gap"),{siteGap:o}=t.field??{},r=Math.max(Ke.min,Qt(e,n,o));return Ye({...Ke,builtIn:r,resolve:s=>Xe(s)?s:r,action:(s,c)=>i(x,{words:y()?.panel,label:a("Gap"),changed:Xe(s),detail:M(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Ji({container:e,...t}){const[n]=T("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},l=en(e,void 0,n,o,r);return Ye({...Ke,builtIn:l,resolve:c=>en(e,c,n,o,r),action:(c,u)=>i(x,{words:y()?.panel,label:a("Gap"),changed:Xe(c),detail:K(`${l}px`,pi(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function tc(e){return Gi({offered:ei(e),fallback:Ut(e,void 0),resolve:t=>Ut(e,t)})}function nc(e,t){return oo(t?no(e,t):[],t)}function Zi({inherited:e,onReset:t,label:n}){return i(x,{words:y()?.panel,label:a(n),changed:!e,detail:K(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}=at(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=st(),S=r?os(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(Oo,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:s?i(Fe,{content:w,children:i(Lt,{"aria-pressed":d,"aria-label":w,onClick:m,children:d?i(Ht,{name:"eye-off",size:14}):i(Ht,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[c&&i(Dt,{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 oc(e,t){return{...e,[dt]:t}}function rc(e){const t=e[N];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[N]:{...t,offPage:!0}}}function ic(e){return!e||typeof e!="object"?!1:e[N]?.offPage===!0}function sc(e){if(!e[N])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[fr]:!0}}function lc(e){return pr(e)}function ac(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 _u,SCALAR_TEXT_CONTROLS as Cu}from"efficient-easel/draw";function cc(e,t){if(!e[N])throw new Error("inOwnBox: the field holds no authored text");const{[cr]:o,...r}=e;return{...r,[dr]:!0,render:t}}const Qi=new Set(yr),pe={type:"radio",options:[{value:!0},{value:!1}]},cn={text:{type:"object",objectFields:{text:{type:"text"},hidden:pe}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:pe}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},X=(e,t)=>{const n=A({...t,[N]:e},{...cn[e.control],label:e.label});if(!Qi.has(e.control))return n;const o=t.render;return{...vt(n,"authored-copy"),render:r=>i(mr,{name:r.name,children:o(r)})}},uc="Everything else on this block comes from the linked post. Unlink it to edit by hand.",es={field:"source.slug",set:!0},dc={not:es},ts="Select a word, then press the highlighter.",ns=new Set([ts]),os=e=>ns.has(e);function pc(e,t,n){return X({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 fc(e,t,n){return X({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 hc(e,t,n){return X({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 mc(e,t,n){return X({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 gc(e){return{type:"custom",[ut]:{label:e},...A({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(Rr,{value:ct(t),onChange:n,label:e})}}function bc(e,t,n){return X({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 wc={Design:so,Animation:ao};function Sc(e,t){return{type:"custom",render:()=>i(rs,{text:e,values:t})}}function rs({text:e,values:t}){return i("p",{className:"sf-note",children:a(e,t)})}function _c(e){return xe(e)!==null&&e?.tabs!==void 0}const un=new Map;function Cc(e,t){const n=`${e}\0${t?t.join(""):""}`,o=un.get(n)??{type:"custom",tabs:t,[Ce]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(F,{})};return un.set(n,o),o}const dn=new Map;function yc(e){const t=dn.get(e)??{type:"custom",[Ce]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(F,{})};return dn.set(e,t),t}function is(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function xc(e,t){return is(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(F,{})}}function Oc(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(F,{})}}function Ec({title:e,children:t}){const[n,o]=Z(()=>!qe.has(e));return i(vo,{title:e,open:n,onToggle:r=>{o(r),r?qe.delete(e):qe.add(e)},children:t})}const qe=new Set;function ss({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 k("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(Fe,{content:u,children:i(Jo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:s})]})}function Ic(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(ls,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function ls({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const l=typeof o=="string"?o:void 0,{colors:s,n:c}=tt(),u={background:s.background,surface:s.surface,surface2:ui(s),band:ci(s)},d=n?je:t,h=Oi(l,t,d),p=tn(void 0,d,u),f=n?Ci:void 0,m=d===je?a("the theme's section background"):a("Theme {n} background",{n:c}),g=as(l,t,s,c,u,r),b=K(p.toUpperCase(),m),S=Le(l),w=S?le(S,s,c):null;return w?i(se,{label:a(e),icon:i(mt,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Bt,{label:a(e),icon:i(mt,{}),value:h?"":tn(l,t,u),inherited:p,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function as(e,t,n,o,r,l){const s=xi(e,t);return[{label:a("No fill"),color:"",selected:s==="none",onPick:()=>l(yi)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:s==="band",onPick:()=>l(je)},...et(Le(e)??"",n,o,l)]}function cs(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,l=wi(r,t);return i(_,{label:a(e),icon:i(Re,{}),changed:!l,action:i(x,{words:y()?.panel,label:a(e),changed:!l,detail:a("the theme's image stage"),onReset:()=>o(hi)}),children:ss({swatches:bi,current:l?_i:Si(r,t),onPick:o,names:gi})})}}}function Rc(e=n=>n,t){return ee({_gSectionTheme:R(Ei),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(Er,{value:e(n),onChange:o,followLabel:t})}})}function fe(e){const t=E(),n=sn(e?.view),o=s=>ve(e.valueKey,s),r=e.numbersIn??(s=>j(t[o(s)])!==void 0),l=e.followsView??Os(n,r);return Di({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:vi,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:l},convertTo:e.convertTo??(s=>{const c=j(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}){const g=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:g?"sf-slider has-notch":"sf-slider",style:g?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(sr,{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}:{},showInput:s,label:u===void 0?void 0:a(u),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:b=>{b===null?f?.():b!==o&&r(b)}})})}function us(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?_e(u,{changed:!g,onReset:()=>f(null)}):i(x,{words:y()?.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",ds={kind:"radius"};function Je(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(bt,{}),changed:l,action:_e(e.mark,{changed:l,onReset:()=>o(null)}),hint:e.hint,children:i(ps,{tier:e,px:r,name:t.name,onRadius:o})})}}}function T(e){const t=D();return[t?.values?.[e],n=>t?.onChange(e,n)]}function pn(){return vt({type:"custom",render:()=>i(ur,{})},"always")}function he(){const e=D();return t=>e?.onChangeMany(t)}function ps({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[l,s]=T(e.sidesKey),c=he(),u=fe({row:e.row??ds,label:te,grid:{min:L,max:Oe,step:e.step??1},valueKey:n??"",view:"desktop"}),d=Tt(l)??[...It];return i(Zo,{label:a(te),value:d,corners:Fo,onChange:h=>{const p=Tt(h)??[];s(p.length===It.length?null:p)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??L,radiusMax:u?.grid.max??Oe,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function fn(e,t){return ue(e,t)}function hn(){return pn()}function fs({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=G(),r=typeof o=="number"?`${o}px`:a("not set");return i(x,{words:y()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):K(r,a("Styles")),onReset:n})}function hs(){const{cornerRadiusPx:e}=G();return typeof e=="number"?e:L}function ms(){return Je({sidesKey:"sectionCornerSides",row:Rt,useFollowed:hs,mark:i(fs,{label:te}),hint:gs})}const gs="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function Tc(){return ee({_gShape:R("Shape"),sectionCorners:ms(),...fn(Rt,"sectionCorners"),sectionCornerSides:hn(),...v("sectionBorder",xs),...ue(zt,"sectionBorder",{tablet:!0,phone:!0})})}const bs=()=>({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 ws(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Ss(){let e;try{const t=Jt(G().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||li.line}function _s({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?Uo(u,s):!1),p=bs(),f=m=>ws(r&&l?m:{width:m.width,color:m.color,...l?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(co,{}),action:r?i(Mo,{each:d,label:a("Each side"),onChange:h}):void 0,children:i(Go,{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??Yt,...c?{step:c.grid.step,units:c.units}:{}})})}function Cs({value:e,onChange:t,view:n}){const[o]=T("sectionBorder"),[r]=T(De("sectionBorder")),l=Ss(),s=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...qt(s(o)),...qt(s(r))}:n==="tablet"?s(o):{},u=E(),d=he(),h=O("sectionBorder",n),p=fe({row:zt,label:"Border",grid:{min:0,max:Yt,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>Ze(u[ve("sectionBorder",f)]),convertTo:f=>{const m=s(u[h]);return Ze(m)?{[h]:ys(m,f)}:{}}});return i(_s,{value:e,length:p,onChange:p?f=>d({[h]:f,...p.unitPatch(!Ze(f))}):t,placeholder:{sides:Wo(c),style:c.style??"solid",color:c.color||l},presets:[l],above:c})}const mn=["width",...si];function Ze(e){if(!e||typeof e!="object")return!1;const t=e;return mn.some(n=>j(t[n])!==void 0)}function ys(e,t){const n={...e};for(const o of mn){const r=j(n[o]);r!==void 0&&(n[o]=t(r))}return n}function xs(e){return{type:"custom",render:({value:t,onChange:n})=>i(Cs,{value:t,onChange:n,view:e})}}function Os(e,t){let n=ze[e];for(;n&&ze[n]!==null&&!t(n);)n=ze[n];return n??e}function Nc(e){return{type:"custom",render:()=>i(Es,{partKey:e})}}function Es({partKey:e}){const[t]=T("id"),[n]=T("_partStyles"),{textStyles:o}=G(),r=Fr();let l=null;try{l=Nr().select}catch{l=null}const s=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Do,{name:a("Text"),preview:Tr(s,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??kr.copy.panel).cases}),onOpen:()=>{l&&typeof t=="string"&&l(Pr(t,e))}})}function gn(e){const{cornerRadiusPx:t}=G(),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?Bo(l?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Lo(r)?r:n}function Is({label:e,changed:t=!1,onReset:n=()=>{}}){const o=gn(L);return i(x,{words:y()?.panel,label:a(e),changed:t,detail:K(`${o}px`,a("the section")),onReset:n})}function Rs(){return i(F,{children:a("Follows the section's Corners until you set a number here.")})}function Ts(){return Je({sidesKey:"cardCornerSides",row:Nt,useFollowed:()=>gn(L),mark:i(Is,{label:te}),hint:i(Rs,{})})}function Ns(){return{type:"custom",render:()=>i(Un,{})}}function Pc(){return{_gShape:R("Shape"),cardCorners:Ts(),...fn(Nt,"cardCorners"),cardCornerSides:hn(),cardCornersApplyAll:Ns()}}function Ps(){return A({type:"custom",[Hi]:!0,render:e=>i(Fs,{...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 ks(e,t){const n=Vt(e);if(n!=="custom")return a(jt.find(r=>r.value===n)?.label??"");const o=Ft(Ue(e,t),t);return o?[...o,100-o.reduce((r,l)=>r+l,0)].join(" / "):a("Custom")}function Fs(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=Vt(c),d=r>=2&&r<=kt,h=()=>[...or[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:kt}),b=s&&(l||t!=="content"),S=ir().widths.hint(r,nr);return i(_,{label:a(Y),icon:i(Ie,{}),changed:b,hint:u!=="custom"?void 0:d?S:g,action:i(x,{words:y()?.panel,label:a(Y),changed:b,disabled:e.readOnly===!0,detail:l?M(w=>a(w),ks(e.follows,r),e.followsView):a("Fit content"),onReset:()=>n(void 0)}),children:k("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(Pt,{label:a(Y),value:u,options:jt.map(w=>({value:w.value,label:w.value==="custom"&&!d?g:a(w.label),icon:Mi(i("span",{className:"sf-gallery-pic sf-share-pic",children:bn(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:wn,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&d?i("div",{onFocus:()=>{p.current={value:t,shares:Ft(Ue(c,r),r)}},onBlur:()=>{p.current=null},children:i(rr,{label:a(Y),count:r,value:Ue(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function bn(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 kc(){return W(ti,i(bo,{}),Kt,Kt[0].value)}function Fc(){return I("mobile",rn(Y,i(Ie,{}),ii.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:bn(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),ri,{columns:2,cell:wn}))}const wn={width:"5.75rem",height:"3.25rem",words:!0};function Lc(){return Ve("share",Ps(),on)[De("share")]}function Ls(){return I("mobile",U($t,i(gt,{}),We,oi,1,We,"",{clear:{phoneFollows:!1,hint:We}}))}const Sn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Ac(){const e=U($t,i(gt,{}),Xt,ni,1,Xt,"",{clear:{emptyLabel:"Auto"}}),t=Ve("columns",e,{...Sn,tablet:on.tablet}),n=Ve("columns",e,Sn,{phoneRow:Ls()});return{...t,phoneRow:n.phoneRow}}function Bc(e,t,n,o,r,l,s){return{type:"custom",render:({value:c,onChange:u,name:d})=>i(As,{label:e,min:t,max:n,step:o,fallback:r,role:l,value:c,onChange:u,name:d??"",length:s})}}function As({label:e,min:t,max:n,step:o,fallback:r,role:l,value:s,onChange:c,name:u,length:d}){const h=E(),p=he(),f=sn(d?.view),m=fe({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(Ot,{noun:l}),action:i(x,{words:y()?.panel,label:a(e),changed:!Ti(s),detail:a("the Text style in Styles"),onReset:()=>g(Ri),defaultAction:{onPress:()=>g(Ii),title:a("Keep this section's own built-in size"),icon:i(uo,{})}}),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 _n(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 Dc(){return{_gCellWidth:R("Cell size"),gridSpan:W("Positions",i(Ie,{}),_n(Yn,"position","positions"),""),gridRowSpan:W("Rows tall",i(Te,{}),_n(zn,"row","rows"),"")}}function E(){let e=null,t=null;try{e=it(Bs),t=re(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Bs=kn(null);function Ds({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(F,{children:q({min:e,max:t,step:n,value:Be(o,u,c),readout:!1,ariaLabel:r,notch:d,onChange:l})})}function vs({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(x,{words:y()?.panel,label:a(e),changed:r,detail:M(u=>a(u),`${c}${o}`),onReset:l})}function Hs(e){return us(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(vs,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Ds,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Gs={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Ms={Top:Ne,Bottom:_t,Left:Ct,Right:yt},Ws=e=>{const t=Ms[e];return i(t,{})};function vc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>Gs[S],l=S=>U(r("Top"),i(Ne,{}),P.min,P.max,P.step,S,"px"),s=(S,w,C,B=P)=>I("mobile",Hs({label:r(S),icon:Ws(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?I("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(U(r("Bottom"),i(_t,{}),P.min,P.max,P.step,u,"px")),...g?{[V(n)]:s("Bottom",n,u)}:{}},...e.sides?{[d]:b(U(r("Left"),i(Ct,{}),p.min,p.max,p.step,f,"px")),...g?{[V(d)]:s("Left",d,m,p)}:{},[h]:b(U(r("Right"),i(yt,{}),p.min,p.max,p.step,f,"px")),...g?{[V(h)]:s("Right",h,m,p)}:{}}:{}})}function Hc(e,t){const n=Object.fromEntries(Object.entries(t).map(([l,s])=>[l,l in e&&xe(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 me="Width";function Gc(e,t=Ni,n=!0){const o=t.map(r=>({label:Pi[r],value:r}));return ee({...n?{_gWidth:R(me)}:{},widthMode:{type:"custom",render:({onChange:r,field:l})=>i(_,{label:a(me),icon:i(Eo,{}),action:n?i(Zi,{inherited:l?.inherited??!1,onReset:()=>r(ki),label:me}):void 0,children:de({options:o,value:l?.currentValue||e,onChange:r,ariaLabel:me})})}})}function Mc({fill:e=!1}={}){const t=(r,l)=>({type:"custom",render:({value:s,onChange:c})=>i(Us,{value:s,onChange:c,view:r,badge:l,fill:e})}),n=()=>Ae("sectionHeightMode"),o=()=>Ae("sectionHeightMode");return ee({_gHeight:R(Q),...v("sectionHeightMode",r=>r==="desktop"?t(r):t(r,l=>i(js,{view:r,onClear:()=>l(void 0)}))),...v("sectionHeightValue",n),...v("sectionHeightUnit",o)})}function Us({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const l=E(),{mode:s,number:c,unit:u}=Ks(n,l,e);return i(_,{label:Q,icon:z(i(Te,{})),action:o?o(t):void 0,children:k("div",{className:"es-width-stack",children:[de({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(Xs,{view:n,mode:s,menu:u}):null]})})}function Cn(e,t){return e==="phone"&&He(t)?Br(t):Ar(t)}function ge(e,t){return e==="desktop"||(e==="tablet"?He(t):Lr(t))?null:Cn(e,t)}function Ks(e,t,n){const r=(l=>Jr.includes(l))(n)?n:ge(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function $s(e,t,n,o){const r=ge(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[O("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[O("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[O("sectionHeightValue",e)]:r.value}:{},[O(n,e)]:o}}function yn(e,t,n){const o=D(),r=ge(e,E());return!o||!r?{followed:null,write:n}:{followed:r,write:s=>o.onChangeMany(c=>{const u=$s(e,c,t,s);return u===null?{[O(t,e)]:s}:Object.keys(u).length?u:null})}}function Xs({view:e,mode:t,menu:n}){const o=D(),r=E(),l=O("sectionHeightValue",e),s=O("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:d}=yn(e,"sectionHeightValue",c(l)),{write:h}=yn(e,"sectionHeightUnit",c(s)),p=t==="screen"?"%":r[s],f=(u?u.unit:p)==="%"?"%":"px",m=f==="%"?Qr:Zr,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 js({view:e,onClear:t}){const n=E(),o=ge(e,n)===null,r=e==="phone"&&He(n),l=Cn(e,n),s=M(c=>a(c),l.mode==="auto"?a("Auto"):`${l.value}${l.unit}`,r?"tablet":"desktop");return i(x,{words:y()?.panel,label:a(Q),changed:o,detail:s,onReset:t})}function Wc(e={}){const t=e.intro===!0,n=l=>({type:"custom",render:({value:s,onChange:c,id:u,name:d})=>i(Qs,{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(Js,{value:s,onChange:c,view:l,intro:t})});return{_gStick:R(Mr,{dot:t?zs:Wt}),...v("stickTop",n),...v("stickTopDistance",o),...ue(Me,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?v(Ge,r):{},...t?{}:{[Kr]:Vs()},...t||e.above===!1?{}:{[Hr]:Ys()}}}function Vs(){const e=W($r,i(Ne,{}),Xr,Wr);return I("desktop",{...e,render:t=>{const n=e.render({...t,value:Yr(t.value),onChange:o=>t.onChange(zr(o))});return _e(n,{hint:a(Ur)})}})}function Ys(){const e=En(Gr,!1,i(xt,{}),vr);return I("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const zs={any:[Wt,Dr]};function xn(e,t,n,o,r){const l=D(),s=E(),c=e==="desktop"||ne(e,s)?null:Qe(e,ae(s,{intro:o}));return{followed:c,write:(c||r)&&l?d=>l.onChangeMany(h=>{const p=Zs(e,h,d,t,o),f=p===null?{[O(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=ae(r,{intro:o}),s=h=>{const p=Ui(h);return p==="desktop"||ne(p,r)},c=fe({row:Me,label:"Distance from top",grid:{min:H.min,max:H.max,step:H.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>s(h)&&j(r[ve("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&l.ownTablet?"tablet":"desktop"}),{followed:u,write:d}=xn(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??H.min,max:c?.grid.max??H.max,step:c?.grid.step??H.step,value:u?null:typeof e=="number"?e:H.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:d})})}function Js({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=xn(n,Ge,t,o);return i(_,{label:a(Mt),icon:z(i(Te,{})),children:q({min:ie.min,max:ie.max,step:ie.step,value:r?null:j(e)??ie.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Mt),onChange:l})})}function ne(e,t){return e==="tablet"?Vr(t):jr(t)}function Qe(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 Zs(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const l=Qe(e,ae(t,{intro:r})),s=e==="phone"&&ne("tablet",t)?h=>O(h,"tablet"):h=>h,c=(h,p)=>t[s(h)]==null?{}:{[O(h,e)]:p},u=Me.unitKey,d=t[s(u)]==null?{}:{[O(u,e)]:l.unit};return{[O("stickTop",e)]:!0,...c("stickTopDistance",l.distance),...d,...c(Ge,l.screens),[O(o,e)]:n}}function Qs({value:e,onChange:t,labelId:n,view:o,intro:r}){const l=E(),s=ae(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:Qe(o,s),h=d?.on?qr(d.distance,d.unit):a("Off");return i(_,{label:a(Gt),labelId:n,icon:z(i(xt,{})),action:k(F,{children:[o!=="desktop"?i(x,{words:y()?.panel,label:a(Gt),changed:ne(o,l),detail:M(p=>a(p),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(ke,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const On="e.g. about";function Uc(){return{_gAnchor:R("Anchor"),anchor:X({control:"plainText",label:"Name",placeholder:On},{type:"custom",render:({value:e,onChange:t})=>i(ro,{value:e,onChange:t,nameBox:(n,o)=>i($,{value:n,onChange:o,label:"Name",placeholder:On,hideable:!1,markup:!1})})})}}function Kc(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(er,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:d=>r(d?d.toISOString():"")})})}}}function $c(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(Qo,{id:c,value:An(typeof o=="string"?o:null),onChange:u=>r(u?Ln(u):"")})})}}}function En(e,t,n,o){return{type:"custom",...A({},{...pe,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(ke,{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?k(F,{children:[i(x,{words:y()?.panel,label:a(e),changed:p,detail:h.followsNoView?a(f?"On":"Off"):M(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>s(void 0)}),S]}):S})}}}function Xc(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(el,{label:"Background",icon:i(Co,{}),id:r,value:e,shown:Io(e),onChange:t})}}}function jc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(se,{label:a(e),icon:n,value:o||t,onChange:r})}}function el({label:e,icon:t,id:n,value:o,shown:r,onChange:l}){const{colors:s,n:c}=tt(),u=Le(o),d=u?le(u,s,c):null;return i(se,{label:a(e),icon:t,id:n,value:d?d.hex:r,caption:d?.words,onChange:l,choices:et(u??"",s,c,l)})}function Vc(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(tl,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function et(e,t,n,o){const r=Pe(e);return ar(t,n).map(l=>({label:l.label,color:l.value,selected:r===l.name,onPick:()=>o(l.name)}))}function tl({value:e,onChange:t,twin:n}){const{colors:o,n:r}=tt(),l=o.background,s=K(l.toUpperCase(),a("Theme {n} background",{n:r})),[c,u]=T(Ro),[d]=T(No),h=typeof d=="string"&&d.trim()!=="",p=Et(c),f=oe=>u(Et(oe)||void 0),m=Pe(e),g=m?le(m,o,r):null,b=et(e,o,r,t),S=n?()=>t(void 0):()=>t("");let w=l,C=s;if(n){const oe=Pe(n.follows),we=Po(n.follows),Se=oe?le(oe,o,r):we?{hex:we,words:we.toUpperCase()}:null;w=Se?.hex??l,C=M(Tn=>a(Tn),Se?Se.words:s,n.view)}const B=!n&&(ko(e)||h)?i(nl,{value:p,onChange:f}):null;return g?i(se,{label:a("Fill"),icon:i(Re,{}),value:g.hex,caption:g.words,onChange:t,changed:!0,onReset:S,resetTo:C,choices:b,children:B}):i(Bt,{label:a("Fill"),icon:i(Re,{}),value:e,inherited:w,resetTo:C,onChange:t,onReset:S,choices:b,children:B})}function nl({value:e,onChange:t}){return de({options:To.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:a("Fill")})}function ol(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return ce(n);const r=Ao(e,t);if(r.length===0)return null;const l=ce(nn(n));if(l!==null)return l;for(let s=r.length-1;s>0;s-=1){const c=ce(nn(r[s].sectionAccent));if(c!==null)return c}return ce(r[0].sectionAccent)}function tt(){const e=Jt(G().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?ol(r?.data,s,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:ai(e.themes[o]),n:o+1}}function Yc(){return pn()}const zc={top:i(mo,{}),right:i(ho,{}),bottom:i(po,{}),left:i(fo,{})};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:Bi(a,{label:e,value:m,onChange:f,points:h})})}}}function Jc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:l})=>i(Or,{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 Zc(e,t,n,o){return{type:"custom",options:t,fallback:n,...A({},{type:"select",label:e}),render:({value:r,onChange:l,field:s})=>i(Ir,{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 Qc(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const rl={image:"Image",video:"Video"},eu=Pn.map(e=>({label:rl[e],value:e}));function tu(e,t,n){const o=Object.keys(lt).map(r=>({label:lt[r],value:r,picture:n[r]}));return{type:"custom",...A({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(sl,{label:e,icon:t,options:o,onChange:r})}}function il(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=vn(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 sl({label:e,icon:t,options:n,onChange:o}){const r=D(),l=r?.values??{},s=Dn(l),c=it(Mn),u=Gn(c?.docId??null);let d=null;try{d=re(p=>p.appState.data)}catch{d=null}const h=Hn(r?.id,d,u);return i(_,{label:a(e),icon:z(t),hint:il(l,h,c?.hasUnsavedEdits??!1),children:de({options:n,value:s,onChange:o,ariaLabel:e})})}function nu(e,t,n,o={}){const r={type:"custom",[ye]:!0,render:({value:l,onChange:s,name:c})=>i(xr,{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?I("each",r):r}function ou(e){return nt(e).map(t=>t.path)}function nt(e,t="",n=[]){const o=[];for(const[r,l]of Object.entries(e??{})){const s=t?`${t}.${r}`:r,c=l;if(c&&c[ye]){o.push({path:s,field:c,along:n});continue}c?.arrayFields&&o.push(...nt(c.arrayFields,`${s}[]`,[...n,c])),c?.objectFields&&o.push(...nt(c.objectFields,s,[...n,c]))}return o}const ru={HeroSingle:[Nn.image],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ll(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 iu({value:e,onChange:t,label:n}){const o=e||{},r=D(),l=r?r.values!==r.node.props:!0,s=!!o.pending&&l,c=!!o.pending&&!l,u=!!Li(Fi()).geocode,d=st(),h=(p,f)=>t({...o,[p]:f??void 0});return k(F,{children:[i(_,{label:a(n),icon:i(St,{}),action:u?i(Fe,{content:a("Find from the address (OpenStreetMap)"),children:i(Lt,{"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(yo,{})})}):void 0,children:u&&o.status?i(io,{compact:!0,oneLine:!0,spaced:!1,status:s?"busy":o.ok&&!c?"found":"notfound",statusText:s?a("Finding…"):c?a(lr):a(o.status),hint:ll(o)}):null}),i(_,{label:a("Enter by hand"),labelId:d,icon:i(go,{}),action:i(ke,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:d})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(St,{}),children:k("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(At,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(At,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function al(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function cl(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 su(e,t){return e===null?null:t>e?e:null}function ul(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 lu={label:"Ticker items",icon:i(_o,{})};function au(e,t,n,o){return{type:"custom",[N]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...A({},{...cn.textList,label:e}),render:({value:r,onChange:l})=>i(dl,{label:e,icon:z(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:l,markup:o==="markup"})}}function dl({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=ul(n,p,c);f===null&&(s.current=null),u(f),r(d(p))};return i(Ko,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?i(Dt,{target:s,value:al(n,c),onChange:p=>r(cl(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 cu(e,t){const n=`${e.label} — row ${t+1}`;return X({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 uu(e){return{_gCards:R("Cards"),coverIndex:W("Cover image",i(So,{}),_r,String(Cr),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:cs("Image background",mi),cardImage:In()}}function du(){return{outline:W("Card outline",i(xo,{}),br,Sr),indexBadge:W("Card number",i(wo,{}),gr,wr),showBadge:En("Product badge",!0,i(Ot,{noun:"tag"}))}}function pu(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...pe,label:be.find(l=>l.id===r).label}),o=r=>A(Ae(ot),n(r));return{_gShowOnCard:R("Show on a card"),[ot]:A({type:"custom",render:()=>i(pl,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(ot)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const ot="showCardPrice",be=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function pl({rest:e}){const t=E(),n=he(),o=s=>typeof t[s]=="boolean"?t[s]:void 0,r=s=>o(s)??e[s],l=be.some(({id:s})=>o(s)!==void 0&&o(s)!==e[s]);return i(rt,{parts:be,changed:l,shown:r,onPress:(s,c)=>n({[s]:c}),onReset:()=>n(Object.fromEntries(be.map(({id:s})=>[s,void 0])))})}function fu(e,t="display"){const n=V(t);return{[t]:I("desktop",{type:"custom",render:({value:o,onChange:r})=>i(rt,{parts:e,changed:Xo(o),shown:l=>jo(o,l),onPress:(l,s)=>r(zo(o,l,s)),onReset:()=>r(void 0)})}),[n]:I("mobile",{type:"custom",render:({value:o,onChange:r})=>i(fl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function rt({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:l,disabledReason:s}){const c=a("Display");return i(_,{label:c,icon:i(lo,{}),changed:t,action:i(x,{words:y()?.panel,label:c,changed:t,detail:l,onReset:r}),children:i($o,{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 fl({parts:e,desktopKey:t,value:n,onChange:o}){const r=E()[t];return i(rt,{parts:e,changed:Yo(n),shown:l=>Vo(r,n,l),onPress:(l,s)=>o(qo(n,l,s)),onReset:()=>o(hr),detail:a("the same as Desktop")})}function In(e=Kn){return U("Card image",i(bt,{}),L,Oe,$n,L,e,{clear:{hint:L},hint:"Rounds the picture. The card's own corner is in Styles."})}function hl(){return ue(ft,"cardImage")}function hu(){return{cardImage:In(ft),...hl()}}function mu(){return Je({sidesKey:"cornerSides",row:Vn,step:Xn,useFollowed:()=>L,mark:i(ml,{label:jn}),hint:a("Rounds the picture. Left alone it stays square.")})}function ml({label:e,changed:t=!1,onReset:n=()=>{}}){return i(x,{words:y()?.panel,label:a(e),changed:t,onReset:n})}function gu(){return{type:"custom",render:({value:e,onChange:t})=>i(Sl,{value:typeof e=="string"?e:"",onChange:t})}}const Rn="own";function bu(){const e=[{value:Rn,label:"Layout's own",picture:ln(Array.from({length:8},()=>[3,1]))},...Object.entries(Zn).map(([t,n])=>({value:t,label:n.label,picture:ln([...n.phone,...n.phone])}))];return I("mobile",rn("Layout",i(wt,{}),e,Rn,{columns:2,cell:$i}))}function gl({layout:e,width:t}){const n=Qn(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:eo(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 bl={width:"3.5rem",height:"2.5rem",words:!1},wl=200;function Sl({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>=wl?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?Ki(Ee,e):void 0,u=c?e:"",d=ht(n,u),h=ht(n,"").length,p=to("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:Wi(p,a("Not chosen"))},...d.map(m=>({value:m,label:a(Ee[m].label),icon:i(gl,{layout:Ee[m],width:40})}))];return i(_,{label:a("Layout"),icon:i(wt,{}),value:c?a(c.label):void 0,children:i("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:i(Pt,{label:a("Layout"),value:u,options:f,onChange:t,columns:r,cell:bl,header:k("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(Ho,{options:[{id:"all",label:a("All")},...qn.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:Jn.length})})]})})})})}export{es as BOUND_TO_POST,uc as BOUND_TO_POST_NOTE,wc as BUCKET_ICONS,ru as CUSTOM_FIELD_MEDIA,iu as CoordsField,an as DESKTOP_GAP_NOT_OVERLAP,rt as DisplayRow,zc as EDGE_ARROWS,tr as FOCAL_DEFAULT,Ce as FOLD_FIELD_MARKER,ts as HIGHLIGHT_HINT,$ as HidableTextField,ut as LINK_FIELD_MARKER,Qa as Label,ye as MEDIA_FIELD_MARKER,eu as MEDIA_TYPE_OPTIONS,dc as NOT_BOUND_TO_POST,Ec as PanelBand,rs as PanelNoteLine,Bs as RowPropsContext,dt as SCAFFOLD_FIELD_MARKER,Cu as SCALAR_TEXT_CONTROLS,ji as SiteGapDefaultReset,q as Slider,ss as Swatches,_u as TEXT_CONTROL_KINDS,N as TEXT_FIELD_MARKER,lu as TICKER_ITEMS_ROW,dl as TextListField,el as ThemeFillRow,me as WIDTH_LABEL,Zi as WidthDefaultReset,ul as aimAfterListChange,Uc as anchorFields,K as backTo,Ic as backgroundField,kc as boxBlockSpacingField,Ac as boxColumnsFields,Vc as boxFillField,Ls as boxPhoneRowField,Ps as boxShareField,Fc as boxSharePhoneField,Lc as boxShareTabletField,ol as boxThemeIndexOf,Cc as bucketHeader,Nc as buttonWordsEntryField,Ts as cardCornersField,cs as cardImageBackgroundField,In as cardImageField,hu as cardImageFields,uu as cardMediaFields,Pc as cardShapeFields,pu as cardShowFields,du as cardStyleFields,Dc as cellWidthFields,jc as colorInput,tc as containerDirectionField,Vi as containerGapField,Yi as containerGapPhoneField,ec as containerGapRows,zi as containerGapTabletField,ll as coordsResultTip,mc as copyText,hn as cornerSidesField,Je as cornersRowField,fn as cornersUnitFields,$c as date,Kc as dateTime,yc as designGroupHeader,fu as displayFields,qc as edgePad,et as fillSlotChoices,su as focusAfterRemove,Yc as focusKeptField,xc as foldMarker,xe as foldMetaOf,is as foldTitleOf,$s as followedHeightPatch,Zs as followedStickPatch,gu as galleryLayoutField,bu as galleryLayoutPhoneField,Mc as heightFields,ge as heightFollowedBy,Ks as heightLayersAt,nc as heroGroupPlacementPoints,ct as hidableText,os as hintIsWhileTyping,mu as imageCornersField,cc as inOwnBox,_c as isBucketHeader,pn as keptBy,gc as linkField,il as loadingRowHint,tu as loadingShowsField,ou as mediaFieldPaths,nt as mediaFields,Jc as multiSelect,Xc as pageBackgroundField,Sc as panelNote,Hs as phoneOverrideField,hc as plainText,bc as plainTextarea,us as pxField,Oc as quietMarker,at as readHidable,al as rowText,Zc as searchSelect,as as sectionBandChoices,ms as sectionCornersField,Tc as sectionShapeFields,Rc as sectionThemeFields,cl as setRowText,Bc as sizeField,Qc as sourceField,vc as spacingFields,Wc as stickFields,Hc as swapPadding,pc as text,Wn as textFieldIdentifier,ic as textFieldOffPage,lc as textFieldPanelOnly,au as textList,cu as textListRowField,fc as textarea,En as toggle,nu as upload,fe as useLengthRow,he as useSelectedPatch,E as useSelectedProps,T as useSelectedSibling,Xi as useSiteGapDetail,Gc as widthField,ac as withIdentifier,rc as withOffPage,sc as withPanelOnly,oc as withScaffold};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,designGroupHeader as x,foldMarker as W,foldMetaOf as C,quietMarker as z,heightFields as w,sectionShapeFields as E,sectionThemeFields as O,stickFields as P,widthField as D}from"./controls.js";import{group as q}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as J,deviceMetaOf as $}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as S,SETTINGS_BUCKETS as Q}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as p}from"efficient-easel/screen/lib/document/field-buckets";import{ownEntry as g,hasOwnEntry as V}from"../../../format/lib/own-entry.js";const A=Q;function X(t){return t==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",R={"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",[Z]:"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"},H={"AlloyWheelsListing._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function F(t,e,o){const a=`${t}.${e}`;return g(G,a)??g(H,a)??g(R,o)}function pe(t,e,o){const a=F(t,e,o);return a?X(a):void 0}function ee(t){return t==="Animation"?[d.Animation]:[d.Design,p[t]]}function _(...t){const e=[];for(const o of t)for(const a of Object.values(o)){const h=$(a),b=C(h?h.inner:a),l=b?g(R,b.label):void 0;if(l)for(const y of ee(l))e.includes(y)||e.push(y)}return e}const ge=[..._(T({tablet:!0,siteSide:!0}),D("full"),w(),m(),P()),...Object.keys(T({tablet:!0,siteSide:!0})),...Object.keys(D("full")),...Object.keys(w()),...Object.keys(m()),...Object.keys(P())],ye=[..._(O()),...Object.keys(O())],ke=[..._(E()),...Object.keys(E())],Se=[..._(B()),...Object.keys(B())],_e=Object.keys(Y()),ve=Object.keys(U()),te={"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)","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)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const t={...T({tablet:!0,siteSide:!0}),...D("full"),...w(),...m(),...O(),...E(),...B()};for(const e of Object.keys(M)){const o=C(t[e]),a=o?g(R,o.label):void 0;if(!o||o.level!==2||!a||!K[a].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 ne=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),oe=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...S.map(t=>[p[t],t])]);function ae(t){const e=`${t}.`;return Object.keys(te).filter(o=>o.startsWith(e)).map(o=>o.slice(e.length))}function ie(t,e){const o=$(t),a=q(e);return o?J(o.tier,a):a}function re(t,e){const o=C(e);return o?t==="Content"||t==="Animation"?W(e,o.label):z(e):e}function j(t){return t==="Design"?S:["Animation"]}function fe(t,e){const o=[],a=new Set(ae(e)),h=new Set;let b=!1,l=null;for(const[n,r]of Object.entries(t)){const i=C(r);if(ne.has(n))throw new Error(`${e}.${n}: 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 (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=oe.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${e}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(b=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||V(M,n)){const s=F(e,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${e}.${n}: ${a.has(n)?"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-${i.level} "${i.label}" header in the ${s??"(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.`);a.has(n)&&h.add(n),o.push(l={place:s,entries:[]});continue}const u=F(e,n,i.label);if(!u)throw new Error(`${e}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...S,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:ie(r,i.label)]]})}const y=new Set(Object.entries(t).filter(([,n])=>C(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",H]]){const i=Object.keys(r).filter(c=>c.startsWith(`${e}.`)).filter(c=>!y.has(c.slice(e.length+1)));if(i.length)throw new Error(`${e}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, 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 v=b?[]:[...a].filter(n=>!h.has(n));if(v.length)throw new Error(`${e}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.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 I=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>I.has(r))),k={};for(const n of f){k[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!I.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(k[p[r]]=x(r));for(const u of i)for(const[s,N]of u.entries)k[s]=re(r,N)}}return k}function me(t){return d.Design in t?t:{[d.Design]:L("Design",null),[p.Content]:x("Content"),...t}}function Le(t){return A.some(e=>d[e]in t)}function we(t){const e=A.filter(a=>d[a]in t);if(e.length===0)return t;const o={...t};for(const a of e)o[d[a]]=L(a,a===e[0]?e:null);return o}export{G as BLOCK_KEY_GROUP,A as BUCKETS,d as BUCKET_KEY,_e as CARD_MEDIA_FIELD_KEYS,ve as CARD_SHOW_FIELD_KEYS,S as DESIGN_GROUPS,p as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,H as KEY_GROUP,R as LABEL_GROUP,ge as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,te as RETIRED,Se as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,fe as assignSectionGroups,pe as bucketOf,X as bucketOfPlace,Le as hasBucketTabs,_ as headerKeysOf,ee as headerKeysOfPlace,F as placeOf,we as reseatBucketTabs,ae as retiredHeadings,me 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 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 F}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 R=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"},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(F()),...Object.keys(F())],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)","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(),...F()};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=R.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 R.some(e=>l[e]in n)}function we(n){const e=R.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,R 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 +1 @@
|
|
|
1
|
-
import{FIELD_DESCRIPTION_MARKER as
|
|
1
|
+
import{FIELD_DESCRIPTION_MARKER as E}from"efficient-easel/screen/lib/host";import{isNode as y}from"efficient-easel/data";import{nodeListKeys as j}from"../../format/lib/document/node-lists.js";import{RETIRED_SECTIONS as v}from"../../format/lib/document/section-catalog.js";import{layoutPresetFor as O}from"./sections/text-layouts.js";import{hasOwnEntry as x}from"../../format/lib/own-entry.js";function u(r,t){const e=r.components[t]?.label;return typeof e=="string"&&e.trim()?e.trim():t}function w(r){return r.length>3&&r.endsWith("s")?r.slice(0,-1):r}function d(r,t,e,o){r.forEach((s,l)=>{if(y(s)){o.push({node:s,list:r,index:l,parent:t,slot:e});for(const i of j(s))d(s.props[i],s,i,o)}})}function F(r){const t=[];d(Array.isArray(r.content)?r.content:[],null,"",t);for(const e of Object.values(r.zones??{}))Array.isArray(e)&&d(e,null,"",t);return t}function h(r,t){return F(r).find(e=>String(e.node.props.id)===t)}function T(r,t,e){if(!e)return null;const o=h(t,e);if(!o)return null;const s=u(r,o.node.type),l=o.parent?`${u(r,o.parent.type)} · ${w(o.slot)} ${o.index+1}`:s;return{blockId:e,type:o.node.type,label:l,path:""}}const S=r=>r.filter(t=>!!t&&typeof t=="object"&&"value"in t).map(t=>typeof t.label=="string"?{value:t.value,label:t.label}:{value:t.value});function C(r){if(!r||typeof r!="object")return null;const t=r;if(typeof t.type!="string")return null;const e=t.type==="custom"?t[E]:void 0,o={type:e?.type??t.type},s=e?.label??t.label;typeof s=="string"&&(o.label=s);const l=e?.options??t.options;Array.isArray(l)&&(o.options=S(l));for(const i of["arrayFields","objectFields"]){const n=e?.[i]??t[i];n&&typeof n=="object"&&(o[i]=k(n))}return o}function k(r){const t={};for(const[e,o]of Object.entries(r??{})){const s=C(o);s&&(t[e]=s)}return t}function B(r){const t={};for(const[e,o]of Object.entries(r.components))o&&(t[e]={label:u(r,e),fields:k(o.fields),...m(e)?{retired:!0}:{}});return t}function m(r){return x(v,r)}function g(r,t){const e=r.components[t]?.defaultProps;return e&&typeof e=="object"?structuredClone(e):{}}function R(r,t){let e=r;for(const o of t?t.split("."):[]){const s=/^([A-Za-z_][A-Za-z0-9_]*)(?:\[(\d+)\])?$/.exec(o);if(!s||!e||typeof e!="object")return null;e=e[s[1]],s[2]!==void 0&&(e=Array.isArray(e)?e[Number(s[2])]:void 0)}return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function b(r,t){return r.findIndex(e=>y(e)&&String(e.props.id)===t)}function A(r,t,e){const o=t||e;if(!o)return r.length;const s=b(r,o);if(s<0)throw new Error(`there is no top-level block ${o}`);return t?s+1:s}function K(r,t,e,o,s={}){const l=structuredClone(t),i=Array.isArray(l.content)?l.content:l.content=[];try{e.forEach((n,_)=>{const a=c=>{throw new Error(`change ${_+1}: ${c}`)};switch(n.op){case"set_props":{const c=h(l,n.block_id)??a(`there is no block ${n.block_id}`);"id"in n.props&&a("a block's id is never changed");const f=R(c.node.props,n.path)??a(`there is no ${n.path} in that block`);Object.assign(f,structuredClone(n.props));break}case"insert_block":{r.components[n.type]??a(`there is no block type ${n.type}`),m(n.type)&&a(`${u(r,n.type)} is retired: it is no longer added (a page that holds one keeps it)`);const c=O(n.type),f=Object.keys(n.props??{}).filter(p=>p!=="id");c&&f.length&&a(`${u(r,n.type)} is laid down as a Box of blocks: insert it with no props, then change its blocks`);const $=c?c(p=>g(r,p),o,s):{type:n.type,props:{...g(r,n.type),...structuredClone(n.props),id:o(n.type)}};i.splice(A(i,n.after,n.before),0,$);break}case"remove_block":{const c=b(i,n.block_id);c<0&&a(`there is no top-level block ${n.block_id}`),i.splice(c,1);break}case"move_block":{const c=b(i,n.block_id);c<0&&a(`there is no top-level block ${n.block_id}`);const[f]=i.splice(c,1);i.splice(A(i,n.after,n.before),0,f);break}default:a(`"${n.op}" is not a change this editor makes`)}})}catch(n){return{ok:!1,reason:n instanceof Error?n.message:String(n)}}return{ok:!0,document:l}}export{K as applyPageEdits,u as blockLabel,B as describeBlocks,T as describeSelection};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { PalettePreset } from "efficient-easel/screen/lib/document/palette-sections";
|
|
2
2
|
export declare const CITY_PICTURES = "CityPictures";
|
|
3
3
|
export declare const CITY_MAPS = "CityMaps";
|
|
4
|
-
export declare function cityPalettePresets(press?: readonly string[]): PalettePreset[];
|
|
4
|
+
export declare function cityPalettePresets(press?: readonly string[], wallHidden?: boolean): PalettePreset[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{SECTION_CATALOG as
|
|
1
|
+
import{SECTION_CATALOG as O}from"../../../format/lib/document/section-catalog.js";import{SECTION_TO_BOX_PRESS as P,sectionToBoxRow as S}from"../../../render/lib/sections/section-to-box.js";import{conversionPreset as u}from"./text-layouts.js";import{activePressContext as b}from"../../../format/lib/sections/active-press-context.js";import{CITY_PHOTO_WALL_HIDDEN as A}from"../../../render/lib/document/blocks/general/section-to-box-rows-locations.js";import{SECTION_PAD_KEYS as c}from"../../../render/lib/content/section-padding.js";import{phoneKey as I,tabletKey as h}from"efficient-easel/draw";const R=[c.top,h(c.top),I(c.top)],r="ContactLocations",d="ContactRouting",l="CityPictures",y="CityMaps",x=[{key:l,label:"City pictures",piece:0,desc:"A wall of city photos, grouped by region. Each photo links to its city's card."},{key:y,label:"City maps",piece:1,desc:"A card per city, grouped by region: address, phone, hours and a map."}];function w(C=P,p=A){const a=O.find(o=>o.sections.some(s=>s.type===d))?.key;return!C.includes(r)||!a?[]:x.filter(o=>!(p&&o.key===l)).map(({key:o,label:s,desc:T,piece:_})=>({key:o,label:s,cat:a,after:d,desc:T,alias:"locations offices stores branches",insert:n=>{const i=S(r);if(!i)return null;const f=b(),e=u(r,i,_)(n.nodeDefaults,n.newNodeId,f);if(!e||!(p&&o===y))return e;const m=u(r,i,0)(n.nodeDefaults,t=>`${t}-above`,f),E=Object.fromEntries(R.filter(t=>m?.props[t]!==void 0).map(t=>[t,m.props[t]]));return{...e,props:{...e.props,...E}}}}))}export{y as CITY_MAPS,l as CITY_PICTURES,w as cityPalettePresets};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type Node = {
|
|
2
|
+
type: string;
|
|
3
|
+
props: Record<string, unknown>;
|
|
4
|
+
};
|
|
5
|
+
export declare const SAME_KEY_BOX_PART: Readonly<Record<string, string>>;
|
|
6
|
+
export declare function drawsThroughBox(root: Node | null | undefined, type: string): boolean;
|
|
7
|
+
export declare function hasInsertBoxPath(type: string, nodeDefaults?: (type: string) => Record<string, unknown>): boolean;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isNode as s}from"efficient-easel/data";import{BOX_TYPE as p}from"../../../format/lib/document/container-blocks.js";import{hasOwnEntry as c,ownEntry as n}from"../../../format/lib/own-entry.js";import{boxNativeReason as l}from"../../../render/lib/sections/section-to-box.js";import{newSectionNode as f}from"./new-section-node.js";import{SECTION_HEAD_TYPE as d}from"../../../format/lib/sections/section-head-placement.js";function i(e,o=[]){o.push(e);for(const t of Object.values(e.props))if(Array.isArray(t))for(const r of t)s(r)&&i(r,o);return o}const a=e=>Array.isArray(e.props.template)&&e.props.template.length>0,m={Form:"the form logic (its fields, picked by slug, and the post to the backend's form service) is the Form block's; a Box holding that block is the Form layout"},u={Logos:"logos",ProcessSteps:"boxes"},y=e=>{const o=n(u,e.type);return!!o&&e.props.headPlacement==="own-box"&&Array.isArray(e.props[o])&&e.props[o].some(s)},h={Chart:["eyebrow","title","body","caption"],Mockup:["eyebrow","title","body"],Countdown:["title"],FeaturedCover:[]},b=e=>{const o=n(h,e.type);return!!o&&e.props.headPlacement==="own-box"&&o.every(t=>e.props[t]===void 0)};function w(e,o){if(!e)return!1;if(e.type===o)return a(e);if(e.type!==p)return!1;const t=i(e);return c(m,o)?t.some(r=>r.type===o)&&t.every(r=>r.type!==d):t.every(r=>r.type!==o||a(r)||y(r)||b(r))}let A=0;function v(e,o=()=>({})){if(l(e))return!0;const t=f(e,{nodeDefaults:o,newNodeId:r=>`${r}-${++A}`,sectionLabel:r=>r,blockIsOffered:()=>!0});return w(t,e)}export{m as SAME_KEY_BOX_PART,w as drawsThroughBox,v as hasInsertBoxPath};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SECTION_TO_BOX_PRESS as r}from"../../../render/lib/sections/section-to-box.js";import{cityPalettePresets as o}from"./city-presets.js";function n(t=r,e){return[...o(t,e)]}export{n as menuPresets};
|
|
@@ -16,6 +16,8 @@ export interface TypeScriptApi {
|
|
|
16
16
|
ScriptKind: {
|
|
17
17
|
JS: number;
|
|
18
18
|
TS: number;
|
|
19
|
+
TSX: number;
|
|
20
|
+
JSX: number;
|
|
19
21
|
};
|
|
20
22
|
SyntaxKind: {
|
|
21
23
|
ImportKeyword: number;
|
|
@@ -29,8 +31,17 @@ export interface TypeScriptApi {
|
|
|
29
31
|
isLiteralTypeNode(node: SyntaxNode): boolean;
|
|
30
32
|
isModuleDeclaration(node: SyntaxNode): boolean;
|
|
31
33
|
isStringLiteral(node: unknown): boolean;
|
|
34
|
+
isNoSubstitutionTemplateLiteral(node: unknown): boolean;
|
|
35
|
+
isImportEqualsDeclaration(node: SyntaxNode): boolean;
|
|
36
|
+
isExternalModuleReference(node: unknown): boolean;
|
|
37
|
+
isNamespaceImport(node: unknown): boolean;
|
|
38
|
+
isNamedExports(node: unknown): boolean;
|
|
32
39
|
}
|
|
33
40
|
export declare function moduleSpecifiers(ts: TypeScriptApi, fileName: string, text: string): ModuleSpecifier[];
|
|
41
|
+
export declare function importIsTypeOnly(ts: TypeScriptApi, node: SyntaxNode): boolean;
|
|
42
|
+
export declare function exportIsTypeOnly(ts: TypeScriptApi, node: SyntaxNode): boolean;
|
|
43
|
+
export declare function importsOf(ts: TypeScriptApi, fileName: string, text: string): string[];
|
|
44
|
+
export declare function packageNameOf(spec: string): string;
|
|
34
45
|
export declare function relinkSpecifiers(ts: TypeScriptApi, fileName: string, text: string, retarget: (spec: string) => string | null): {
|
|
35
46
|
text: string;
|
|
36
47
|
rewritten: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function f(e,n,s){const l=e.createSourceFile(n,s,e.ScriptTarget.Latest,!1,n.endsWith(".d.ts")?e.ScriptKind.TS:e.ScriptKind.JS),i=[],o=t=>i.push({start:t.getStart(l)+1,end:t.getEnd()-1,text:t.text}),c=t=>{const r=t;if((e.isImportDeclaration(t)||e.isExportDeclaration(t))&&r.moduleSpecifier&&e.isStringLiteral(r.moduleSpecifier))o(r.moduleSpecifier);else if(e.isCallExpression(t)){const a=r.arguments,p=r.expression;a.length>0&&e.isStringLiteral(a[0])&&(p.kind===e.SyntaxKind.ImportKeyword||e.isIdentifier(p)&&p.text==="require")&&o(a[0])}else if(e.isImportTypeNode(t)){const a=r.argument;e.isLiteralTypeNode(a)&&e.isStringLiteral(a.literal)&&o(a.literal)}else e.isModuleDeclaration(t)&&e.isStringLiteral(r.name)&&o(r.name);e.forEachChild(t,c)};return c(l),i.sort((t,r)=>r.start-t.start)}function S(e,n){const s=n.importClause;if(!s)return!1;if(s.isTypeOnly)return!0;if(s.name)return!1;const l=s.namedBindings;if(!l||e.isNamespaceImport(l))return!1;const{elements:i}=l;return i.length>0&&i.every(o=>o.isTypeOnly)}function m(e,n){const s=n;if(s.isTypeOnly)return!0;if(!s.exportClause||!e.isNamedExports(s.exportClause))return!1;const{elements:l}=s.exportClause;return l.length>0&&l.every(i=>i.isTypeOnly)}function x(e,n){return/\.tsx$/.test(n)?e.ScriptKind.TSX:/\.jsx$/.test(n)?e.ScriptKind.JSX:/\.[cm]?js$/.test(n)?e.ScriptKind.JS:e.ScriptKind.TS}function d(e,n,s){const l=e.createSourceFile(n,s,e.ScriptTarget.Latest,!1,x(e,n)),i=[],o=t=>e.isStringLiteral(t)||e.isNoSubstitutionTemplateLiteral(t)?t.text:null,c=t=>{const r=t;if(e.isImportDeclaration(t)&&e.isStringLiteral(r.moduleSpecifier))S(e,t)||i.push(r.moduleSpecifier.text);else if(e.isExportDeclaration(t)&&r.moduleSpecifier&&e.isStringLiteral(r.moduleSpecifier))m(e,t)||i.push(r.moduleSpecifier.text);else if(e.isImportEqualsDeclaration(t)&&!r.isTypeOnly&&e.isExternalModuleReference(r.moduleReference)){const a=o(r.moduleReference.expression);a!==null&&i.push(a)}else if(e.isCallExpression(t)){const a=r.arguments,p=r.expression;if(a.length>0&&(p.kind===e.SyntaxKind.ImportKeyword||e.isIdentifier(p)&&p.text==="require")){const u=o(a[0]);u!==null&&i.push(u)}}e.forEachChild(t,c)};return c(l),i}function g(e){const n=e.split("/");return e.startsWith("@")?n.slice(0,2).join("/"):n[0]}function y(e,n,s,l){let i=s,o=0;for(const c of f(e,n,s)){const t=l(c.text);t===null||t===c.text||(i=i.slice(0,c.start)+t+i.slice(c.end),o+=1)}return{text:i,rewritten:o}}function h(e,n){const s=e.split("/").slice(0,-1),l=n.split("/");let i=0;for(;i<s.length&&i<l.length-1&&s[i]===l[i];)i+=1;const o=s.length-i,c=l.slice(i).join("/");return o===0?`./${c}`:`${"../".repeat(o)}${c}`}export{m as exportIsTypeOnly,S as importIsTypeOnly,d as importsOf,f as moduleSpecifiers,g as packageNameOf,h as relativeSpecifier,y as relinkSpecifiers};
|
|
@@ -12,13 +12,7 @@ export declare const BOX_DARKEN: {
|
|
|
12
12
|
readonly fallback: 0;
|
|
13
13
|
readonly unit: "%";
|
|
14
14
|
};
|
|
15
|
-
export
|
|
16
|
-
readonly label: "Even";
|
|
17
|
-
readonly value: "even";
|
|
18
|
-
}, {
|
|
19
|
-
readonly label: "From the bottom";
|
|
20
|
-
readonly value: "bottom";
|
|
21
|
-
}];
|
|
15
|
+
export { BOX_DARKEN_STYLES } from "./box-darken-styles.js";
|
|
22
16
|
export declare const BOX_CARD_PAD: {
|
|
23
17
|
readonly desktop: 20;
|
|
24
18
|
readonly phone: 20;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseHexColor as C}from"efficient-shell/format";import{fillColorRole as
|
|
1
|
+
import{parseHexColor as C}from"efficient-shell/format";import{fillColorRole as D}from"efficient-shell/markup";import{BOX_ROW_IMAGE_PROP as c}from"./box-card-rule.js";import{boxLayoutClasses as P}from"./box-layout.js";import{namedRowField as u,rowFieldText as h}from"./card-template.js";import{fillInkCss as y,fillSlotNamed as L,inkTokenOf as E,partColourName as I}from"../document/part-inks.js";import{scrim as f}from"./scrim.js";import{viewVarSplit as _}from"./view-var-split.js";import{BOX_DARKEN_STYLES as N}from"./box-darken-styles.js";const J="sf-card",Q="[--sf-card-lift:none] [--sf-card-shadow-hover:var(--sf-card-shadow,none)]",g={min:0,max:100,step:5,fallback:0,unit:"%"};import{BOX_DARKEN_STYLES as mt}from"./box-darken-styles.js";const B="68%",U={desktop:20,phone:20,side:40,sidePhone:24},Z="sf-box-sides",v={min:0,max:200,step:10};function R(t){return typeof t=="string"&&t.trim()!==""}function tt(t){return R(typeof t?.bgImage=="string"?t.bgImage:null)||O(t)}function O(t){return u(t,c)!==""}function et(t,e){return e||!O(t)?t:{...t,[c]:""}}function ot(t,e){const n=h(e,u(t,c))?.trim();return n||null}function F(t,e){const o=typeof t=="number"?t:Number.parseFloat(String(t??""));if(!Number.isFinite(o)||o<=0)return null;const l=(Math.min(g.max,Math.max(g.min,o))/100).toFixed(2);return e!=="bottom"?{background:f(Number(l))}:{background:`linear-gradient(0deg, ${f(Number(l))} 0%, ${f(0)} ${B})`}}const k=[{label:"Flat",value:"",hint:"One colour from top to bottom"},{label:"Fade",value:"down",hint:"The colour fades into the page colour at the bottom"}],nt="fillFade",m=k[1].value,T=t=>t===m?m:k[0].value,X=[{mix:"12%",at:"50%"},{mix:"19%",at:"70%"},{mix:"50%",at:"95%"}];function rt(t){return T(t)!==m?null:{backgroundImage:`linear-gradient(to bottom, transparent, ${X.map(o=>`color-mix(in srgb, var(--bg) ${o.mix}, transparent) ${o.at}`).join(", ")})`}}const A=t=>typeof t=="string"?C(t.trim()):null,p=t=>{const e=A(t);if(e!==null||typeof t!="string")return e;const o=t.trim();return o&&!o.startsWith("#")&&y(o)||null},lt=t=>{if(typeof t!="string")return null;const e=D(I(t.trim()));return e?.kind==="slot"?e.slot:null},W="swatch";function at(t,e){if(!e)return null;const o=h(e,u(t,W)),n=L(o);return A(o)??(n&&E(n)||null)}const V={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function st(t,e,o){return _(V,p(t),p(e),p(o))}const w={tabletClass:"sf-wash-tablet",tabletVar:"--sf-wash-tablet",phoneClass:"sf-wash-phone",phoneVar:"--sf-wash-phone"};function it(t){const e=F(t.darken,t.darkenStyle);if(!e)return{className:"",style:{}};const o=(r,i)=>String(F(r,i)?.background??"none"),n=r=>(typeof r=="number"||typeof r=="string"&&r.trim()!=="")&&Number.isFinite(Number(r))?r:void 0,l=r=>N.some(i=>i.value===r)?r:void 0,[a,s,d,x]=[n(t.darkenTablet),l(t.darkenStyleTablet),n(t.darkenPhone),l(t.darkenStylePhone)],b=a??t.darken,S=s??t.darkenStyle;return _(w,String(e.background),a!==void 0||s!==void 0?o(b,S):null,d!==void 0||x!==void 0?o(d??b,x??S):null)}function ct(t,e){const o={"top-left":["start","start"],"top-center":["center","start"],"top-right":["end","start"],left:["start","center"],center:["center","center"],right:["end","center"],"bottom-left":["start","end"],"bottom-center":["center","end"],"bottom-right":["end","end"]},[n,l]=o[t]??o.center,[a,s]=e==="column"?[l,n]:[n,l];return P(a,s)}export{U as BOX_CARD_PAD,v as BOX_CARD_SIDE,g as BOX_DARKEN,mt as BOX_DARKEN_STYLES,k as BOX_FILL_FADES,nt as BOX_FILL_FADE_PROP,V as BOX_FILL_VIEWS,Z as BOX_OWNS_SIDES_CLASS,W as BOX_SWATCH_PROP,w as BOX_WASH_VIEWS,Q as CARD_NO_LIFT_CLASS,J as CARD_SHADOW_CLASS,et as boxCardProps,F as boxDarkenStyle,T as boxFillFadeOf,rt as boxFillFadeStyle,A as boxFillOf,lt as boxFillSlot,st as boxFillViews,tt as boxIsCard,O as boxNamesRowPicture,p as boxPaintOf,ct as boxPlacementClasses,ot as boxRowPicture,at as boxSwatchFill,it as boxWashViews,R as isBackgroundBox};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}];export{e as BOX_DARKEN_STYLES};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const BOX_SHAPES: ("auto" | "
|
|
1
|
+
export declare const BOX_SHAPES: ("auto" | "tall" | "square" | "wide" | "landscape" | "portrait" | "video" | "panorama" | "story" | "poster" | "screen")[];
|
|
2
2
|
export type BoxShape = (typeof BOX_SHAPES)[number];
|
|
3
3
|
export declare function boxShapeOf(value: unknown): BoxShape;
|
|
4
4
|
export declare function boxShapeClass(value: unknown): string;
|