efficient-web-builder 72.0.0 → 73.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 +29 -0
- package/dist/editor/components/AddPageWindow.js +1 -1
- package/dist/editor/components/MediaUploadField.d.ts +2 -1
- package/dist/editor/components/PageStarterCard.js +1 -1
- package/dist/editor/components/SideSpaceField.d.ts +3 -0
- package/dist/editor/components/SideSpaceField.js +1 -1
- package/dist/editor/components/storefront-editor.css +9 -19
- package/dist/editor/lib/content/site-length-rows.js +1 -1
- package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
- package/dist/editor/lib/document/controls.d.ts +4 -2
- package/dist/editor/lib/document/controls.js +1 -1
- package/dist/editor/lib/document/shape-picker.d.ts +16 -8
- package/dist/editor/lib/document/shape-picker.js +1 -1
- package/dist/editor/lib/document/show-when-resolve.js +1 -1
- package/dist/format/lib/content/box-shape.d.ts +2 -1
- package/dist/format/lib/content/box-shape.js +1 -1
- package/dist/format/lib/content/css-length.d.ts +2 -3
- package/dist/format/lib/content/css-length.js +1 -1
- package/dist/format/lib/content/gallery-card-layout.d.ts +22 -1
- package/dist/format/lib/content/gallery-card-layout.js +1 -1
- package/dist/format/lib/content/grid-span.d.ts +15 -2
- package/dist/format/lib/content/grid-span.js +1 -1
- package/dist/format/lib/content/image-aspect.d.ts +5 -3
- package/dist/format/lib/content/image-aspect.js +1 -1
- package/dist/format/lib/content/page-width.d.ts +3 -0
- package/dist/format/lib/content/page-width.js +1 -1
- package/dist/format/lib/content/section-min-height.js +1 -1
- package/dist/format/lib/content/view-hide-class.js +1 -1
- package/dist/format/lib/content/view-tier.d.ts +2 -2
- package/dist/format/lib/document/style-text.d.ts +1 -0
- package/dist/format/lib/document/style-text.js +1 -0
- package/dist/format/lib/editor-words-catalogue.d.ts +3 -0
- package/dist/format/lib/editor-words-catalogue.js +1 -1
- package/dist/format/lib/site-twin-row.d.ts +2 -1
- package/dist/render/components/Flex.js +1 -1
- package/dist/render/components/ImageBlock.js +1 -1
- package/dist/render/components/PublishedPartStylesContext.js +1 -1
- package/dist/render/lib/content/section-padding.d.ts +2 -1
- package/dist/render/lib/document/blocks/general/CustomHTML/render.js +1 -1
- package/dist/render/lib/document/custom-css.d.ts +7 -0
- package/dist/render/lib/document/custom-css.js +2 -0
- package/dist/render/lib/document/part-styles.d.ts +2 -2
- package/dist/render/lib/document/passes/cell-width.js +1 -1
- package/dist/render/lib/document/render-registry.js +1 -1
- package/package.json +9 -5
|
@@ -1 +1 @@
|
|
|
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
|
+
"use client";import{jsx as i,jsxs as A,Fragment as L}from"react/jsx-runtime";import{HERO_FOCUS as An,HERO_MEDIA_TYPES as Ln}from"../../../format/lib/hero-media-layout.js";import{cloneElement as xe,createContext as kn,useContext as st,useEffect as Fn,useId as lt,useRef as J,useState as Z}from"react";import{useEasel as re,useSelectedHost as G}from"efficient-easel/easel";import{PIN_LENGTH as ie,toDateKey as Dn,fromDateKey as Bn}from"efficient-shell/format";import{say as a,editorEaselWords as x}from"../../../format/lib/editor-words.js";import{finiteNumber as V}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as at,firstFrameHint as vn,loadingShowsOf as Hn,loadingStillHint as Gn}from"../../../format/lib/hero-video.js";import{pageFramesFor as Mn,usePageVideoFrames as Un}from"../page-video-frames.js";import{ScreenDocumentContext as Wn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as ct,hidableText as ut}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as Oe,LINK_FIELD_MARKER as dt,MEDIA_FIELD_MARKER as Ie,SCAFFOLD_FIELD_MARKER as pt,TEXT_FIELD_MARKER as N,foldMetaOf as Ee,textFieldIdentifier as Kn}from"efficient-easel/draw";import Xn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as ft}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as $n,CARD_IMAGE_RADIUS_ROW as ht,CARD_IMAGE_RADIUS_STEP as jn,CORNER_RADIUS_MAX as Re,CORNER_RADIUS_MIN as k}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Vn,IMAGE_CORNERS_LABEL as Yn,IMAGE_CORNERS_ROW as zn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as qn,GRID_MAX_ROW_SPAN as mt,GRID_MAX_TILE_AT as Jn,GRID_MOBILE_MAX_COLUMNS as Zn,GRID_TILE_AT_KEY as Qn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as eo,GALLERY_LAYOUTS as Te,GALLERY_LAYOUT_KEYS as to,GALLERY_PHONE_LAYOUTS as no,galleryChoices as gt,galleryLayoutRatio as oo,galleryPictureCells as ro}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as io}from"./shell-glyph.js";import{anchorSiblingsOf as so,placementPoints as lo}from"../../../format/lib/hero-group-placement.js";import ao from"../../components/AnchorField.js";import co from"../../components/SourceStatus.js";import{AdjustIcon as uo,EyeIcon as po,AnimationIcon as fo,BackgroundIcon as bt,BorderAllIcon as ho,BlockSectionIcon as mo,ColumnWidthsIcon as se,ColumnsIcon as wt,CornerIcon as St,DirectionDownIcon as go,DirectionLeftIcon as bo,DirectionRightIcon as wo,DirectionUpIcon as So,EditIcon as _o,GapIcon as Co,GridIcon as _t,GroundIcon as Ne,HashIcon as Ct,HeightIcon as le,ImageIcon as yo,ListIcon as xo,LocationIcon as yt,PaddingBottomIcon as xt,PaddingLeftIcon as Ot,PaddingRightIcon as It,PaddingTopIcon as Pe,PageIcon as Oo,StickyIcon as Et,SearchIcon as Io,SquareIcon as Eo,TypeIcon as Ro,WidthIcon as To}from"efficient-easel/icons";import{FieldGlyph as Rt}from"../../components/FieldGlyph.js";import{resolvePageBackground as No}from"../../../format/lib/content/page-background.js";import{BOX_FILL_FADE_PROP as Po,BOX_FILL_FADES as Ao,BOX_SWATCH_PROP as Lo,boxFillFadeOf as Tt,boxFillOf as ko,boxFillSlot as Ae,boxPaintOf as Fo}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as Nt,CORNER_SIDE_POINTS as Do,SECTION_CORNERS_ROW as Pt,hasOwnSectionCorners as Bo,normalizeCornerSides as At}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as Lt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as vo,enclosingSection as Ho}from"./enclosing-section.js";import{SettingsDefaultReset as O,SettingsDrill as Go,SettingsField as _,SettingsGroup as Mo,SettingsSegmented as Uo,SettingsBorder as Wo,SettingsSidesEach as Ko,SettingsSwitch as Le,borderSides as Xo,borderStartEach as $o}from"efficient-easel/panel";import{ListField as jo}from"efficient-easel/fields";import{DisplayChips as Vo}from"efficient-shell/ui";import{desktopDisplayChanged as Yo,partShownOnDesktop as zo,partShownOnPhone as qo,phoneDisplayChanged as Jo,withDesktopPart as Zo,withPhonePart as Qo}from"../../../format/lib/content/part-display.js";import{ColorSwatch as er,CornersInput as tr,DatePicker as nr,DateTimePicker as or,FOCAL_DEFAULT as rr,IconPicker as kt,COLUMN_COUNT_MAX as Ft,COLUMN_SHARE_MIN as ir,COLUMN_SHARES_EQUAL as sr,resolveColumnShares as Dt,WidthsBar as lr,useShellStrings as ar,IconButton as Bt,InputNumber as vt,Slider as cr,Tooltip as ke}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as ur}from"./geocode-resolve.js";import{ColourRow as ae,InheritedColourRow as Ht}from"./ColourControl.js";import{fillThemeColors as dr,slotFill as ce}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Fe}from"../../../format/lib/document/part-inks.js";import{keptByRow as De}from"efficient-easel/screen/lib/document/style-fields";import Gt from"./MarkupToolbar.js";import{deviceField as y}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as pr,NoControlMark as fr,noControlField as Mt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as hr}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as mr,PANEL_ONLY_FIELD as gr}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as br,resolvePhoneValue as Be}from"../../../format/lib/document/phone-override.js";import{phoneKey as v,tabletKey as ve,viewKeyAt as He}from"efficient-easel/draw";import{viewKey as I}from"../../../format/lib/animation/views.js";import{viewRows as M}from"../animation/view-rows.js";import{SuppressibleText as wr}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Sr,CARD_OUTLINE_OPTIONS as _r,DEFAULT_CARD_INDEX_FORMAT as Cr,DEFAULT_CARD_OUTLINE as yr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as xr,DEFAULT_COVER_INDEX as Or}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Ir}from"efficient-easel/draw";import Er from"../../components/MediaUploadField.js";import Rr from"../../components/MultiSelectField.js";import Tr from"../../components/SectionThemePicker.js";import Nr from"../../components/SearchSelectField.js";import Pr from"../../components/StorefrontLinkField.js";import{UiIcon as Ut}from"efficient-easel/draw/client";import{SECTION_PADDING as P}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Ar}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Lr}from"efficient-easel/draw/client";import{encodePartId as kr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Fr,useEaselStrings as Dr}from"efficient-easel/strings";import{hasPhoneHeight as Br,hasTabletHeight as Ge,resolveSectionMinHeight as vr,resolveTabletHeight as Hr}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as Gr,SECTION_PIN_ABOVE_HINT as Mr,SECTION_PIN_ABOVE_KEY as Ur,SECTION_PIN_ABOVE_LABEL as Wr,SECTION_PIN_GROUP as Kr,SECTION_PIN_LABEL as Wt,SECTION_PIN_SCREENS_KEY as Me,SECTION_PIN_SCREENS_LABEL as Kt,SECTION_PIN_STOP_DEFAULT as Xr,SECTION_PIN_STOP_HINT as $r,SECTION_PIN_STOP_KEY as jr,SECTION_PIN_STOP_LABEL as Vr,SECTION_PIN_STOP_OPTIONS as Yr,SECTION_STICK_DISTANCE as U,SECTION_STICK_DISTANCE_ROW as Ue,SOME_VIEW_PINS as Xt,hasPhoneStick as zr,hasTabletStick as qr,resolveSectionStick as ue,sectionPinStopOf as Jr,sectionPinStopWrite as Zr}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as Qr}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as ei,SECTION_MIN_HEIGHT as ti,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as ni}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as oi,resolveContainerDirection as $t}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as ri,BOX_BLOCK_SPACING_POINTS as jt,BOX_PHONE_ROW_LABEL as Vt,BOX_COLUMNS_MAX as ii,BOX_COLUMNS_MIN as Yt,BOX_PHONE_ROW_MAX as si,BOX_PHONE_ROW_MIN as We,BOX_SHARE_CHOICES as zt,BOX_SHARE_LABEL as Y,boxShareChoiceOf as qt,boxShareWidthsOf as Ke,BOX_SHARE_PHONE_DEFAULT as li,BOX_SHARE_PHONE_POINTS as ai}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as W}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Jt,BORDER_SIDES as ci,SECTION_BORDER_ROW as Zt,borderBySide as Qt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as ui,normalizeTheme as en,normalizeThemeColors as di,sectionBandTone as pi,surfaceTwoTone as fi}from"../../../format/lib/theme.js";import{CONTAINER_GAP as tn,CONTAINER_GAP_BUILT_IN as hi,CONTAINER_GAP_PHONE as Xe,GAP_FIELD_CONTAINER as $e,followsSitePhoneGap as mi,hasOwnContainerGap as gi,hasOwnPhoneGap as je,resolveContainerGap as nn,resolvePhoneContainerGap as on}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as bi,CARD_IMAGE_BG_OFF as wi,CARD_IMAGE_BG_SWATCH_NAMES as Si,CARD_IMAGE_BG_SWATCHES as _i,isCardImageBackgroundInheriting as Ci,cardImageBackgroundChoice as yi,THEME_CARD_IMAGE_BG as xi}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Oi,SECTION_BG_NO_FILL as Ii,sectionBackgroundChoice as Ei,THEME_SECTION_BG as Ve,isSectionBackgroundEmpty as Ri,sectionBackgroundHex as rn}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Ti,nestedAccentValue as sn,resolveSectionAccent as de}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Ni,TYPE_SIZE_INHERIT as Pi,isTypeSizeInheriting as Ai}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Li,WIDTH_CHOICE_LABEL as ki,WIDTH_INHERIT as Fi}from"../../../format/lib/content/section-width.js";import{useEaselSession as Di}from"efficient-easel/screen/lib/session-context";import{backendOf as Bi}from"../website-session.js";import{BOX_GAP as vi,describedAs as F,group as R,iconOf as z,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as ln,onDesktopWords as K,phoneTwinFields as Ye,saidAlignmentGrid as Hi,useLengthUnit as Gi}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as Mi,PICTURE_PICKER_ROW as Ui,directionField as Wi,gapField as ze,iconPickerRow as an,lengthUnitFields as pe,pickerCellIcon as Ki,pickerNoneIcon as Xi,Segmented as fe,select as D,slider as H}from"./box-fields.js";import{VIEW_ABOVE as qe}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as cn,viewOfTier as $i}from"../../../format/lib/content/view-tier.js";import{ownEntry as ji}from"../../../format/lib/own-entry.js";import{LAYOUT_CELL as Vi,galleryPhonePicture as un}from"./choice-pictures.js";function nc({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function X(e,t){return a("{value} from {from}",{value:e,from:t})}function Yi(){const{blockGap:e}=W();return e===null?a("this container's own spacing"):X(`${e}px`,a("Styles"))}function zi({inherited:e,onReset:t,label:n}){return i(O,{words:x()?.panel,label:a(n),changed:!e,detail:Yi(),onReset:t})}function qi(e){return ze({...vi,builtIn:hi[e],resolve:(t,n)=>nn(e,t,n?.siteGap),action:(t,n)=>i(zi,{inherited:!gi(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[$e]:e}})}function Ji(e){return ft(y("mobile",{[$e]:e,type:"custom",render:t=>i(es,{container:e,...t})}),dn)}function Zi(e){return ft(y("tablet",{[$e]:e,type:"custom",render:t=>i(Qi,{container:e,...t})}),dn)}const dn={not:{field:"gap",in:Array.from({length:-tn.min},(e,t)=>tn.min+t)}};function oc(e){return{gap:y("desktop",qi(e)),[ve("gap")]:Zi(e),[v("gap")]:Ji(e)}}function Qi({container:e,...t}){const[n]=T("gap"),{siteGap:o}=t.field??{},r=Math.max(Xe.min,nn(e,n,o));return ze({...Xe,builtIn:r,resolve:s=>je(s)?s:r,action:(s,c)=>i(O,{words:x()?.panel,label:a("Gap"),changed:je(s),detail:K(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function es({container:e,...t}){const[n]=T("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},l=on(e,void 0,n,o,r);return ze({...Xe,builtIn:l,resolve:c=>on(e,c,n,o,r),action:(c,u)=>i(O,{words:x()?.panel,label:a("Gap"),changed:je(c),detail:X(`${l}px`,mi(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function rc(e){return Wi({offered:oi(e),fallback:$t(e,void 0),resolve:t=>$t(e,t)})}function ic(e,t){return lo(t?so(e,t):[],t)}function ts({inherited:e,onReset:t,label:n}){return i(O,{words:x()?.panel,label:a(n),changed:!e,detail:X(a("Full"),a("the page")),onReset:t})}function $({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:l,hideable:s=!0,markup:c=!0}){const{text:u,hidden:d}=ct(e),h=J(null),p=J(null),f=C=>t(s?{text:C,hidden:d}:C),m=()=>t({text:u,hidden:!d}),g=s&&d,b=lt(),S=r?ss(r)?i("span",{className:"sf-hint-while-typing",children:a(r)}):a(r):void 0,w=d?a("Show {label} on the slide",{label:a(n)}):a("Hide {label} on the slide",{label:a(n)});return i(_,{label:a(n),icon:i(Ro,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:s?i(ke,{content:w,children:i(Bt,{"aria-pressed":d,"aria-label":w,onClick:m,children:d?i(Ut,{name:"eye-off",size:14}):i(Ut,{name:"eye",size:14})})}):void 0,children:A("div",{className:"sf-copybox",children:[c&&i(Gt,{target:l?p:h,value:u,onChange:f}),l?i("textarea",{id:b,ref:p,value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)}):i("input",{id:b,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:a(o),onChange:C=>f(C.target.value)})]})})}function sc(e,t){return{...e,[pt]:t}}function lc(e){const t=e[N];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[N]:{...t,offPage:!0}}}function ac(e){return!e||typeof e!="object"?!1:e[N]?.offPage===!0}function cc(e){if(!e[N])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[gr]:!0}}function uc(e){return mr(e)}function dc(e){const t=e[N];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[N]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as xu,SCALAR_TEXT_CONTROLS as Ou}from"efficient-easel/draw";function pc(e,t){if(!e[N])throw new Error("inOwnBox: the field holds no authored text");const{[pr]:o,...r}=e;return{...r,[hr]:!0,render:t}}const ns=new Set(Ir),he={type:"radio",options:[{value:!0},{value:!1}]},pn={text:{type:"object",objectFields:{text:{type:"text"},hidden:he}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:he}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},j=(e,t)=>{const n=F({...t,[N]:e},{...pn[e.control],label:e.label});if(!ns.has(e.control))return n;const o=t.render;return{...Mt(n,"authored-copy"),render:r=>i(wr,{name:r.name,children:o(r)})}},fc="Everything else on this block comes from the linked post. Unlink it to edit by hand.",os={field:"source.slug",set:!0},hc={not:os},rs="Select a word, then press the highlighter.",is=new Set([rs]),ss=e=>is.has(e);function mc(e,t,n){return j({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i($,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function gc(e,t,n){return j({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i($,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function bc(e,t,n){return j({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i($,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function wc(e,t,n){return j({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i($,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Sc(e){return{type:"custom",[dt]:{label:e},...F({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(Pr,{value:ut(t),onChange:n,label:e})}}function _c(e,t,n){return j({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i($,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const Cc={Design:uo,Animation:fo};function yc(e,t){return{type:"custom",render:()=>i(ls,{text:e,values:t})}}function ls({text:e,values:t}){return i("p",{className:"sf-note",children:a(e,t)})}function xc(e){return Ee(e)!==null&&e?.tabs!==void 0}const fn=new Map;function Oc(e,t){const n=`${e}\0${t?t.join(""):""}`,o=fn.get(n)??{type:"custom",tabs:t,[Oe]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(L,{})};return fn.set(n,o),o}const hn=new Map;function Ic(e){const t=hn.get(e)??{type:"custom",[Oe]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(L,{})};return hn.set(e,t),t}function as(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Ec(e,t){return as(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(L,{})}}function Rc(e){const t=e;if(t.marker===!0&&t.fold===void 0)return e;const{fold:n,...o}=e;return{...o,marker:!0,render:()=>i(L,{})}}function Tc({title:e,children:t}){const[n,o]=Z(()=>!Je.has(e));return i(Mo,{title:e,open:n,onToggle:r=>{o(r),r?Je.delete(e):Je.add(e)},children:t})}const Je=new Set;function cs({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),l=r?o?.[r]:void 0,s=l?a(l):t;return A("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(ke,{content:u,children:i(er,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:s})]})}function Nc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(us,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function us({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const l=typeof o=="string"?o:void 0,{colors:s,n:c}=nt(),u={background:s.background,surface:s.surface,surface2:fi(s),band:pi(s)},d=n?Ve:t,h=Ri(l,t,d),p=rn(void 0,d,u),f=n?Oi:void 0,m=d===Ve?a("the theme's section background"):a("Theme {n} background",{n:c}),g=ds(l,t,s,c,u,r),b=X(p.toUpperCase(),m),S=Fe(l),w=S?ce(S,s,c):null;return w?i(ae,{label:a(e),icon:i(bt,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Ht,{label:a(e),icon:i(bt,{}),value:h?"":rn(l,t,u),inherited:p,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function ds(e,t,n,o,r,l){const s=Ei(e,t);return[{label:a("No fill"),color:"",selected:s==="none",onPick:()=>l(Ii)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:s==="band",onPick:()=>l(Ve)},...tt(Fe(e)??"",n,o,l)]}function ps(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,l=Ci(r,t);return i(_,{label:a(e),icon:i(Ne,{}),changed:!l,action:i(O,{words:x()?.panel,label:a(e),changed:!l,detail:a("the theme's image stage"),onReset:()=>o(bi)}),children:cs({swatches:_i,current:l?xi:yi(r,t),onPick:o,names:Si})})}}}function Pc(e=n=>n,t){return ee({_gSectionTheme:R(Ti),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(Tr,{value:e(n),onChange:o,followLabel:t})}})}function me(e){const t=E(),n=cn(e?.view),o=s=>He(e.valueKey,s),r=e.numbersIn??(s=>V(t[o(s)])!==void 0),l=e.followsView??Rs(n,r);return Gi({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Mi,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:l},convertTo:e.convertTo??(s=>{const c=V(t[o(n)]);return c===void 0?{}:{[o(n)]:s(c)}})})}function q({min:e,max:t,step:n,value:o,onChange:r,suffix:l="",readout:s=!0,notch:c,ariaLabel:u,disabled:d=!1,placeholder:h,placeholderWord:p,onClear:f,units:m,inputMax:g}){const b=c!==void 0&&Number.isFinite(c)&&c>=e&&c<=t;return i("div",{className:b?"sf-slider has-notch":"sf-slider",style:b?{"--sf-notch":(c-e)/(t-e)}:void 0,children:i(cr,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...p?{emptyLabel:a(p)}:{},suffix:l||void 0,...m?{units:m}:{},...g!==void 0?{inputMax:g}:{},showInput:s,label:u===void 0?void 0:a(u),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:S=>{S===null?f?.():S!==o&&r(S)}})})}function fs(e,t){const{min:n,max:o,step:r=1,unsetLabel:l,hint:s,restTrack:c,unsetMark:u,icon:d,unit:h="px"}=t;return{type:"custom",render:({value:p,onChange:f})=>{const m=typeof p=="number"?p:null,g=m===null;return i(_,{label:a(e),icon:d?z(d):void 0,value:g?u||l===void 0?void 0:a(l):`${m}${h}`,changed:!g,action:u?xe(u,{changed:!g,onReset:()=>f(null)}):i(O,{words:x()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof s=="string"?a(s):s,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:f}):q({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}const te="Corners",hs={kind:"radius"};function Ze(e){return{type:"custom",render:t=>{const{value:n,onChange:o}=t,r=typeof n=="number"&&Number.isFinite(n)?n:null,l=r!==null;return i(_,{label:a(te),icon:i(St,{}),changed:l,action:xe(e.mark,{changed:l,onReset:()=>o(null)}),hint:e.hint,children:i(ms,{tier:e,px:r,name:t.name,onRadius:o})})}}}function T(e){const t=G();return[t?.values?.[e],n=>t?.onChange(e,n)]}function mn(){return Mt({type:"custom",render:()=>i(fr,{})},"always")}function ge(){const e=G();return t=>e?.onChangeMany(t)}function ms({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[l,s]=T(e.sidesKey),c=ge(),u=me({row:e.row??hs,label:te,grid:{min:k,max:Re,step:e.step??1},valueKey:n??"",view:"desktop"}),d=At(l)??[...Nt];return i(tr,{label:a(te),value:d,corners:Do,onChange:h=>{const p=At(h)??[];s(p.length===Nt.length?null:p)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??k,radiusMax:u?.grid.max??Re,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function gn(e,t){return pe(e,t)}function bn(){return mn()}function gs({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=W(),r=typeof o=="number"?`${o}px`:a("not set");return i(O,{words:x()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):X(r,a("Styles")),onReset:n})}function bs(){const{cornerRadiusPx:e}=W();return typeof e=="number"?e:k}function ws(){return Ze({sidesKey:"sectionCornerSides",row:Pt,useFollowed:bs,mark:i(gs,{label:te}),hint:Ss})}const Ss="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function Ac(){return ee({_gShape:R("Shape"),sectionCorners:ws(),...gn(Pt,"sectionCorners"),sectionCornerSides:bn(),...M("sectionBorder",Es),...pe(Zt,"sectionBorder",{tablet:!0,phone:!0})})}const _s=()=>({width:a("Border width"),sides:{top:a("Border top"),right:a("Border right"),bottom:a("Border bottom"),left:a("Border left")},style:a("Border style"),styles:{solid:a("Solid"),dashed:a("Dashed"),dotted:a("Dotted")},color:a("Border color"),unit:"px"});function Cs(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function ys(){let e;try{const t=en(W().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||ui.line}function xs({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:l=!0,above:s={},length:c}){const u=e&&typeof e=="object"?e:{},[d,h]=Z(()=>r?$o(u,s):!1),p=_s(),f=m=>Cs(r&&l?m:{width:m.width,color:m.color,...l?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(ho,{}),action:r?i(Ko,{each:d,label:a("Each side"),onChange:h}):void 0,children:i(Wo,{label:a("Border"),value:u,each:d,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...p,unit:c.unit}:p,styles:l,max:c?.grid.max??Jt,...c?{step:c.grid.step,units:c.units}:{}})})}function Os({value:e,onChange:t,view:n}){const[o]=T("sectionBorder"),[r]=T(ve("sectionBorder")),l=ys(),s=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...Qt(s(o)),...Qt(s(r))}:n==="tablet"?s(o):{},u=E(),d=ge(),h=I("sectionBorder",n),p=me({row:Zt,label:"Border",grid:{min:0,max:Jt,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>Qe(u[He("sectionBorder",f)]),convertTo:f=>{const m=s(u[h]);return Qe(m)?{[h]:Is(m,f)}:{}}});return i(xs,{value:e,length:p,onChange:p?f=>d({[h]:f,...p.unitPatch(!Qe(f))}):t,placeholder:{sides:Xo(c),style:c.style??"solid",color:c.color||l},presets:[l],above:c})}const wn=["width",...ci];function Qe(e){if(!e||typeof e!="object")return!1;const t=e;return wn.some(n=>V(t[n])!==void 0)}function Is(e,t){const n={...e};for(const o of wn){const r=V(n[o]);r!==void 0&&(n[o]=t(r))}return n}function Es(e){return{type:"custom",render:({value:t,onChange:n})=>i(Os,{value:t,onChange:n,view:e})}}function Rs(e,t){let n=qe[e];for(;n&&qe[n]!==null&&!t(n);)n=qe[n];return n??e}function Lc(e){return{type:"custom",render:()=>i(Ts,{partKey:e})}}function Ts({partKey:e}){const[t]=T("id"),[n]=T("_partStyles"),{textStyles:o}=W(),r=Dr();let l=null;try{l=Lr().select}catch{l=null}const s=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Go,{name:a("Text"),preview:Ar(s,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Fr.copy.panel).cases}),onOpen:()=>{l&&typeof t=="string"&&l(kr(t,e))}})}function Sn(e){const{cornerRadiusPx:t}=W(),n=typeof t=="number"?t:e;let o=null;try{const{appState:l,selectedItem:s}=re(u=>u),c=s?.props?.id?String(s.props.id):void 0;o=c?Ho(l?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Bo(r)?r:n}function Ns({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Sn(k);return i(O,{words:x()?.panel,label:a(e),changed:t,detail:X(`${o}px`,a("the section")),onReset:n})}function Ps(){return i(L,{children:a("Follows the section's Corners until you set a number here.")})}function As(){return Ze({sidesKey:"cardCornerSides",row:Lt,useFollowed:()=>Sn(k),mark:i(Ns,{label:te}),hint:i(Ps,{})})}function Ls(){return{type:"custom",render:()=>i(Xn,{})}}function kc(){return{_gShape:R("Shape"),cardCorners:As(),...gn(Lt,"cardCorners"),cardCornerSides:bn(),cardCornersApplyAll:Ls()}}function ks(){return F({type:"custom",[Ui]:!0,render:e=>i(Ds,{...e})},{type:"select",label:Y,options:[{value:"content",label:"Fit content"},{value:"equal",label:"Equal"},{value:[50],label:"Custom: the width of each block in %, the last block left out"}]})}function Fs(e,t){const n=qt(e);if(n!=="custom")return a(zt.find(r=>r.value===n)?.label??"");const o=Dt(Ke(e,t),t);return o?[...o,100-o.reduce((r,l)=>r+l,0)].join(" / "):a("Custom")}function Ds(e){const{value:t,onChange:n}=e,[o]=T("content"),r=Array.isArray(o)?o.length:0,l="follows"in e,s=t!=null,c=s?t:l?e.follows:void 0,u=qt(c),d=r>=2&&r<=Ft,h=()=>[...sr[r]??[]],p=J(null),f=w=>{const C=p.current;C&&JSON.stringify(w)===JSON.stringify(C.shares)?n(C.value):w&&n(w)},m=w=>{w===u||w==="custom"&&!d||n(w==="custom"?h():w)},g=a("The width bar works for 2 to {count} blocks.",{count:Ft}),b=s&&(l||t!=="content"),S=ar().widths.hint(r,ir);return i(_,{label:a(Y),icon:i(se,{}),changed:b,hint:u!=="custom"?void 0:d?S:g,action:i(O,{words:x()?.panel,label:a(Y),changed:b,disabled:e.readOnly===!0,detail:l?K(w=>a(w),Fs(e.follows,r),e.followsView):a("Fit content"),onReset:()=>n(void 0)}),children:A("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(kt,{label:a(Y),value:u,options:zt.map(w=>({value:w.value,label:w.value==="custom"&&!d?g:a(w.label),icon:Ki(i("span",{className:"sf-gallery-pic sf-share-pic",children:_n(w.weights).map((C,B)=>i("i",{style:{gridColumn:`span ${C}`}},B))}),a(w.label),w.value==="custom"&&!d?g:a(w.label))})),onChange:m,columns:3,cell:Cn,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&d?i("div",{onFocus:()=>{p.current={value:t,shares:Dt(Ke(c,r),r)}},onBlur:()=>{p.current=null},children:i(lr,{label:a(Y),count:r,value:Ke(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function _n(e){if(!e)return[3,4];const t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function Fc(){return D(ri,i(Co,{}),jt,jt[0].value)}function Dc(){return y("mobile",an(Y,i(se,{}),ai.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:_n(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),li,{columns:2,cell:Cn}))}const Cn={width:"5.75rem",height:"3.25rem",words:!0};function Bc(){return Ye("share",ks(),ln)[ve("share")]}function Bs(){return y("mobile",H(Vt,i(wt,{}),We,si,1,We,"",{clear:{phoneFollows:!1,hint:We}}))}const yn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function vc(){const e=H(Vt,i(wt,{}),Yt,ii,1,Yt,"",{clear:{emptyLabel:"Auto"}}),t=Ye("columns",e,{...yn,tablet:ln.tablet}),n=Ye("columns",e,yn,{phoneRow:Bs()});return{...t,phoneRow:n.phoneRow}}function Hc(e,t,n,o,r,l,s){return{type:"custom",render:({value:c,onChange:u,name:d})=>i(vs,{label:e,min:t,max:n,step:o,fallback:r,role:l,value:c,onChange:u,name:d??"",length:s})}}function vs({label:e,min:t,max:n,step:o,fallback:r,role:l,value:s,onChange:c,name:u,length:d}){const h=E(),p=ge(),f=cn(d?.view),m=me({row:d?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:d?u:"",view:d?.view??"desktop",numbersIn:b=>b===f&&typeof h[u]=="number",followsView:f,convertTo:b=>typeof h[u]=="number"?{[u]:b(h[u])}:{}}),g=b=>m?p({[u]:b,...m.unitPatch(typeof b!="number")}):c(b);return i(_,{label:a(e),icon:i(Rt,{noun:l}),action:i(O,{words:x()?.panel,label:a(e),changed:!Ai(s),detail:a("the Text style in Styles"),onReset:()=>g(Pi),defaultAction:{onPress:()=>g(Ni),title:a("Keep this section's own built-in size"),icon:i(mo,{})}}),children:q({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof s=="number"?s:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function be(e,t,n){return[{label:"Auto",value:""},...Array.from({length:e},(o,r)=>({label:r===0?`1 ${t}`:`${r+1} ${n}`,value:String(r+1)}))]}function Gc(){return{_gCellWidth:R("Cell size"),gridSpan:y("desktop",D("Positions",i(se,{}),be(qn,"position","positions"),"")),gridRowSpan:y("desktop",D("Rows tall",i(le,{}),be(mt,"row","rows"),"")),[Qn]:H("At card",i(Ct,{}),1,Jn,1,1,""),[v("gridSpan")]:y("mobile",D("Positions",i(se,{}),[{label:"Full row",value:""},...be(Zn,"position","positions").slice(1)],"")),[v("gridRowSpan")]:y("mobile",D("Rows tall",i(le,{}),be(mt,"row","rows"),""))}}function E(){let e=null,t=null;try{e=st(Hs),t=re(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Hs=kn(null);function Gs({min:e,max:t,step:n,px:o,label:r,onChange:l,desktopKey:s,fallback:c}){const u=E()[s],d=Be(void 0,u,c);return i(L,{children:q({min:e,max:t,step:n,value:Be(o,u,c),readout:!1,ariaLabel:r,notch:d,onChange:l})})}function Ms({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:l=()=>{}}){const s=E()[t],c=Be(void 0,s,n);return i(O,{words:x()?.panel,label:a(e),changed:r,detail:K(u=>a(u),`${c}${o}`),onReset:l})}function Us(e){return fs(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Ms,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Gs,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Ws={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Ks={Top:Pe,Bottom:xt,Left:Ot,Right:It},Xs=e=>{const t=Ks[e];return i(t,{})};function Mc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>Ws[S],l=S=>H(r("Top"),i(Pe,{}),P.min,P.max,P.step,S,"px"),s=(S,w,C,B=P)=>y("mobile",Us({label:r(S),icon:Xs(S),desktopKey:w,min:B.min,max:B.max,step:B.step,fallback:C})),c=e.top??P.min,u=e.bottom??P.min,d="sectionPaddingLeft",h="sectionPaddingRight",p=e.sideBounds??P,f=e.side??p.min,m=e.sidePhone??f,g=e.phone===!0,b=S=>g?y("desktop",S):S;return ee({...o?{_gSpacing:R("Padding")}:{},[t]:b(l(c)),...g?{[v(t)]:s("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(H(r("Bottom"),i(xt,{}),P.min,P.max,P.step,u,"px")),...g?{[v(n)]:s("Bottom",n,u)}:{}},...e.sides?{[d]:b(H(r("Left"),i(Ot,{}),p.min,p.max,p.step,f,"px")),...g?{[v(d)]:s("Left",d,m,p)}:{},[h]:b(H(r("Right"),i(It,{}),p.min,p.max,p.step,f,"px")),...g?{[v(h)]:s("Right",h,m,p)}:{}}:{}})}function Uc(e,t){const n=Object.fromEntries(Object.entries(t).map(([l,s])=>[l,l in e&&Ee(s)?e[l]:s])),o={};let r=!1;for(const[l,s]of Object.entries(e)){if(l in t){r||Object.assign(o,n),r=!0;continue}o[l]=s}return r||Object.assign(o,n),o}const we="Width";function Wc(e,t=Li,n=!0){const o=t.map(r=>({label:ki[r],value:r}));return ee({...n?{_gWidth:R(we)}:{},widthMode:{type:"custom",render:({onChange:r,field:l})=>i(_,{label:a(we),icon:i(To,{}),action:n?i(ts,{inherited:l?.inherited??!1,onReset:()=>r(Fi),label:we}):void 0,children:fe({options:o,value:l?.currentValue||e,onChange:r,ariaLabel:we})})}})}function Kc({fill:e=!1}={}){const t=(r,l)=>({type:"custom",render:({value:s,onChange:c})=>i($s,{value:s,onChange:c,view:r,badge:l,fill:e})}),n=()=>De("sectionHeightMode"),o=()=>De("sectionHeightMode");return ee({_gHeight:R(Q),...M("sectionHeightMode",r=>r==="desktop"?t(r):t(r,l=>i(zs,{view:r,onClear:()=>l(void 0)}))),...M("sectionHeightValue",n),...M("sectionHeightUnit",o)})}function $s({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const l=E(),{mode:s,number:c,unit:u}=js(n,l,e);return i(_,{label:Q,icon:z(i(le,{})),action:o?o(t):void 0,children:A("div",{className:"es-width-stack",children:[fe({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...r?[{label:"Fill",value:"fill"}]:[]],value:s,onChange:t,ariaLabel:Q}),c?i(Ys,{view:n,mode:s,menu:u}):null]})})}function xn(e,t){return e==="phone"&&Ge(t)?Hr(t):vr(t)}function Se(e,t){return e==="desktop"||(e==="tablet"?Ge(t):Br(t))?null:xn(e,t)}function js(e,t,n){const r=(l=>ei.includes(l))(n)?n:Se(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function Vs(e,t,n,o){const r=Se(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[I("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[I("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[I("sectionHeightValue",e)]:r.value}:{},[I(n,e)]:o}}function On(e,t,n){const o=G(),r=Se(e,E());return!o||!r?{followed:null,write:n}:{followed:r,write:s=>o.onChangeMany(c=>{const u=Vs(e,c,t,s);return u===null?{[I(t,e)]:s}:Object.keys(u).length?u:null})}}function Ys({view:e,mode:t,menu:n}){const o=G(),r=E(),l=I("sectionHeightValue",e),s=I("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:d}=On(e,"sectionHeightValue",c(l)),{write:h}=On(e,"sectionHeightUnit",c(s)),p=t==="screen"?"%":r[s],f=(u?u.unit:p)==="%"?"%":"px",m=f==="%"?ni:ti,g=r[l],b=n?{options:["px","%"],label:a("Unit"),onChange:S=>h(S)}:void 0;return q({min:m.min,max:m.max,step:m.step,value:u?null:typeof g=="number"?g:m.fallback,...u?{placeholder:u.value}:{},suffix:f,...b?{units:b}:{},ariaLabel:Q,onChange:d})}function zs({view:e,onClear:t}){const n=E(),o=Se(e,n)===null,r=e==="phone"&&Ge(n),l=xn(e,n),s=K(c=>a(c),l.mode==="auto"?a("Auto"):`${l.value}${l.unit}`,r?"tablet":"desktop");return i(O,{words:x()?.panel,label:a(Q),changed:o,detail:s,onReset:t})}function Xc(e={}){const t=e.intro===!0,n=l=>({type:"custom",render:({value:s,onChange:c,id:u,name:d})=>i(nl,{value:s,onChange:c,labelId:`${u??d??"stickTop"}-label`,view:l,intro:t})}),o=l=>({type:"custom",render:({value:s,onChange:c})=>i(Qs,{value:s,onChange:c,view:l,intro:t})}),r=l=>({type:"custom",render:({value:s,onChange:c})=>i(el,{value:s,onChange:c,view:l,intro:t})});return{_gStick:R(Kr,{dot:t?Zs:Xt}),...M("stickTop",n),...M("stickTopDistance",o),...pe(Ue,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?M(Me,r):{},...t?{}:{[jr]:qs()},...t||e.above===!1?{}:{[Ur]:Js()}}}function qs(){const e=D(Vr,i(Pe,{}),Yr,Xr);return y("desktop",{...e,render:t=>{const n=e.render({...t,value:Jr(t.value),onChange:o=>t.onChange(Zr(o))});return xe(n,{hint:a($r)})}})}function Js(){const e=Rn(Wr,!1,i(Et,{}),Mr);return y("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const Zs={any:[Xt,Gr]};function In(e,t,n,o,r){const l=G(),s=E(),c=e==="desktop"||ne(e,s)?null:et(e,ue(s,{intro:o}));return{followed:c,write:(c||r)&&l?d=>l.onChangeMany(h=>{const p=tl(e,h,d,t,o),f=p===null?{[I(t,e)]:d}:p;return Object.keys(f).length?{...f,...r?.(d)??{}}:null}):n}}function Qs({value:e,onChange:t,view:n,intro:o}){const r=E(),l=ue(r,{intro:o}),s=h=>{const p=$i(h);return p==="desktop"||ne(p,r)},c=me({row:Ue,label:"Distance from top",grid:{min:U.min,max:U.max,step:U.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>s(h)&&V(r[He("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&l.ownTablet?"tablet":"desktop"}),{followed:u,write:d}=In(n,"stickTopDistance",t,o,c?h=>c.unitPatch(h===void 0):void 0);return i("div",{className:"sf-field",children:q({min:c?.grid.min??U.min,max:c?.grid.max??U.max,step:c?.grid.step??U.step,value:u?null:typeof e=="number"?e:U.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:d})})}function el({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=In(n,Me,t,o);return i(_,{label:a(Kt),icon:z(i(le,{})),children:q({min:ie.min,max:ie.max,step:ie.step,value:r?null:V(e)??ie.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Kt),onChange:l})})}function ne(e,t){return e==="tablet"?qr(t):zr(t)}function et(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function tl(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const l=et(e,ue(t,{intro:r})),s=e==="phone"&&ne("tablet",t)?h=>I(h,"tablet"):h=>h,c=(h,p)=>t[s(h)]==null?{}:{[I(h,e)]:p},u=Ue.unitKey,d=t[s(u)]==null?{}:{[I(u,e)]:l.unit};return{[I("stickTop",e)]:!0,...c("stickTopDistance",l.distance),...d,...c(Me,l.screens),[I(o,e)]:n}}function nl({value:e,onChange:t,labelId:n,view:o,intro:r}){const l=E(),s=ue(l,{intro:r}),c=o==="phone"?s.phone:o==="tablet"?s.tablet:r?s.desktop:e===!0,u=o==="phone"&&s.ownTablet,d=o==="desktop"?null:et(o,s),h=d?.on?Qr(d.distance,d.unit):a("Off");return i(_,{label:a(Wt),labelId:n,icon:z(i(Et,{})),action:A(L,{children:[o!=="desktop"?i(O,{words:x()?.panel,label:a(Wt),changed:ne(o,l),detail:K(p=>a(p),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Le,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const En="e.g. about";function $c(){return{_gAnchor:R("Anchor"),anchor:j({control:"plainText",label:"Name",placeholder:En},{type:"custom",render:({value:e,onChange:t})=>i(ao,{value:e,onChange:t,nameBox:(n,o)=>i($,{value:n,onChange:o,label:"Name",placeholder:En,hideable:!1,markup:!1})})})}}function jc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:s})=>{const c=`${l??s??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(or,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:d=>r(d?d.toISOString():"")})})}}}function Vc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:s})=>{const c=`${l??s??e}-date`;return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(nr,{id:c,value:Bn(typeof o=="string"?o:null),onChange:u=>r(u?Dn(u):"")})})}}}function Rn(e,t,n,o){return{type:"custom",...F({},{...he,label:e}),render:r=>{const{value:l,onChange:s,id:c,name:u}=r,d="follows"in r,h=r,p=typeof l=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=p?l:d?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(Le,{checked:m,onChange:s,disabled:b,ariaLabelledBy:g});return i(_,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:d?A(L,{children:[i(O,{words:x()?.panel,label:a(e),changed:p,detail:h.followsNoView?a(f?"On":"Off"):K(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>s(void 0)}),S]}):S})}}}function Yc(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(ol,{label:"Background",icon:i(Oo,{}),id:r,value:e,shown:No(e),onChange:t})}}}function zc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(ae,{label:a(e),icon:n,value:o||t,onChange:r})}}function ol({label:e,icon:t,id:n,value:o,shown:r,onChange:l}){const{colors:s,n:c}=nt(),u=Fe(o),d=u?ce(u,s,c):null;return i(ae,{label:a(e),icon:t,id:n,value:d?d.hex:r,caption:d?.words,onChange:l,choices:tt(u??"",s,c,l)})}function qc(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(rl,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function tt(e,t,n,o){const r=Ae(e);return dr(t,n).map(l=>({label:l.label,color:l.value,selected:r===l.name,onPick:()=>o(l.name)}))}function rl({value:e,onChange:t,twin:n}){const{colors:o,n:r}=nt(),l=o.background,s=X(l.toUpperCase(),a("Theme {n} background",{n:r})),[c,u]=T(Po),[d]=T(Lo),h=typeof d=="string"&&d.trim()!=="",p=Tt(c),f=oe=>u(Tt(oe)||void 0),m=Ae(e),g=m?ce(m,o,r):null,b=tt(e,o,r,t),S=n?()=>t(void 0):()=>t("");let w=l,C=s;if(n){const oe=Ae(n.follows),Ce=ko(n.follows),ye=oe?ce(oe,o,r):Ce?{hex:Ce,words:Ce.toUpperCase()}:null;w=ye?.hex??l,C=K(Pn=>a(Pn),ye?ye.words:s,n.view)}const B=!n&&(Fo(e)||h)?i(il,{value:p,onChange:f}):null;return g?i(ae,{label:a("Fill"),icon:i(Ne,{}),value:g.hex,caption:g.words,onChange:t,changed:!0,onReset:S,resetTo:C,choices:b,children:B}):i(Ht,{label:a("Fill"),icon:i(Ne,{}),value:e,inherited:w,resetTo:C,onChange:t,onReset:S,choices:b,children:B})}function il({value:e,onChange:t}){return fe({options:Ao.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:a("Fill")})}function sl(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return de(n);const r=vo(e,t);if(r.length===0)return null;const l=de(sn(n));if(l!==null)return l;for(let s=r.length-1;s>0;s-=1){const c=de(sn(r[s].sectionAccent));if(c!==null)return c}return de(r[0].sectionAccent)}function nt(){const e=en(W().theme),[t]=T("sectionAccent");let n=null;try{const{appState:r,selectedItem:l}=re(c=>c),s=l?.props?.id?String(l.props.id):void 0;n=s?sl(r?.data,s,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:di(e.themes[o]),n:o+1}}function Jc(){return mn()}const Zc={top:i(So,{}),right:i(wo,{}),bottom:i(go,{}),left:i(bo,{})};function Qc(e,t,n,o,r,l,s){const c=p=>t.find(f=>f.value===p),u=p=>({value:p,label:"",disabled:!0,title:o}),d=p=>{const f=t.find(g=>g.cell===p);if(!f)return u(`missing-${p}`);const m=l?.[p];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},h=[u("corner-top-left"),d("top"),u("corner-top-right"),d("left"),u("centre"),d("right"),u("corner-bottom-left"),d("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:f})=>{const m=t.some(g=>g.value===p)?p:n;return i(_,{label:a(e),icon:r,value:c(m)?.label?a(c(m).label):s?a(s):"",children:Hi(a,{label:e,value:m,onChange:f,points:h})})}}}function eu(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:l})=>i(Rr,{label:e,options:(l.options??t).map(s=>({...s,label:a(s.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function tu(e,t,n,o){return{type:"custom",options:t,fallback:n,...F({},{type:"select",label:e}),render:({value:r,onChange:l,field:s})=>i(Nr,{label:e,options:(s.options??t).map(c=>({...c,label:a(c.label)})),fallback:s.fallback??n,value:r,onChange:l,placeholder:o===void 0?void 0:a(o)})}}function nu(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const ll={image:"Image",video:"Video"},ou=Ln.map(e=>({label:ll[e],value:e}));function ru(e,t,n){const o=Object.keys(at).map(r=>({label:at[r],value:r,picture:n[r]}));return{type:"custom",...F({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(cl,{label:e,icon:t,options:o,onChange:r})}}function al(e,t,n){const o=vn(e,t,n);if(o!==void 0)return o==="save-makes-frame"?a("A frame is made from this video when you save the page."):o==="starts-dark"?a("This video starts dark, so no frame was made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="outside"?a("This video is on another website, so no frame can be made. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="unsupported"?a("This video's file type gives no frame. The slide shows its background colour while the video loads. Choose Image to show a picture."):o==="failed"?a("No frame could be made from this video. It is tried again the next time you save the page. The slide shows its background colour while the video loads."):o==="image-no-frame"?a("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=Gn(e);return r==="frame-missing-image"?a("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?a("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?a("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?a("No image yet. The slide shows its background colour until you choose one."):void 0}function cl({label:e,icon:t,options:n,onChange:o}){const r=G(),l=r?.values??{},s=Hn(l),c=st(Wn),u=Un(c?.docId??null);let d=null;try{d=re(p=>p.appState.data)}catch{d=null}const h=Mn(r?.id,d,u);return i(_,{label:a(e),icon:z(t),hint:al(l,h,c?.hasUnsavedEdits??!1),children:fe({options:n,value:s,onChange:o,ariaLabel:e})})}function iu(e,t,n,o={}){const r={type:"custom",[Ie]:!0,render:({value:l,onChange:s,name:c})=>i(Er,{value:l||"",onChange:s,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?y("each",r):r}function su(e){return ot(e).map(t=>t.path)}function ot(e,t="",n=[]){const o=[];for(const[r,l]of Object.entries(e??{})){const s=t?`${t}.${r}`:r,c=l;if(c&&c[Ie]){o.push({path:s,field:c,along:n});continue}c?.arrayFields&&o.push(...ot(c.arrayFields,`${s}[]`,[...n,c])),c?.objectFields&&o.push(...ot(c.objectFields,s,[...n,c]))}return o}const lu={HeroSingle:[An.image],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function ul(e){const t=a(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function au({value:e,onChange:t,label:n}){const o=e||{},r=G(),l=r?r.values!==r.node.props:!0,s=!!o.pending&&l,c=!!o.pending&&!l,u=!!Bi(Di()).geocode,d=lt(),h=(p,f)=>t({...o,[p]:f??void 0});return A(L,{children:[i(_,{label:a(n),icon:i(yt,{}),action:u?i(ke,{content:a("Find from the address (OpenStreetMap)"),children:i(Bt,{"aria-label":a("Find from the address"),"aria-busy":s||void 0,disabled:s,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(Io,{})})}):void 0,children:u&&o.status?i(co,{compact:!0,oneLine:!0,spaced:!1,status:s?"busy":o.ok&&!c?"found":"notfound",statusText:s?a("Finding…"):c?a(ur):a(o.status),hint:ul(o)}):null}),i(_,{label:a("Enter by hand"),labelId:d,icon:i(_o,{}),action:i(Le,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:d})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(yt,{}),children:A("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(vt,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>h("lat",p),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(vt,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>h("lng",p),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function dl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function pl(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,l)=>l===t?{text:n}:r)}function cu(e,t){return e===null?null:t>e?e:null}function fl(e,t,n){if(n===null||n>=t.length)return null;for(let o=0;o<n;o+=1)if(e[o]!==t[o])return null;return e[n]!==t[n]&&t.includes(e[n])||e[n]!==t[n]&&t.length!==e.length?null:n}const uu={label:"Ticker items",icon:i(xo,{})};function du(e,t,n,o){return{type:"custom",[N]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...F({},{...pn.textList,label:e}),render:({value:r,onChange:l})=>i(hl,{label:e,icon:z(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:l,markup:o==="markup"})}}function hl({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:l=!1}){const s=J(null),[c,u]=Z(null),d=p=>p.map(f=>({text:f?.text??""})),h=p=>{const f=fl(n,p,c);f===null&&(s.current=null),u(f),r(d(p))};return i(jo,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?i(Gt,{target:s,value:dl(n,c),onChange:p=>r(pl(n,c??-1,p)),disabled:c===null,label:c===null?a("Formatting — click a row first"):a("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,f,m)=>i("input",{type:"text",className:l&&c===f?"sf-list-marking":void 0,value:p?.text??"",placeholder:a(o),"aria-label":a("{label} {n}",{label:a(e),n:f+1}),onChange:g=>m({text:g.target.value}),onFocus:g=>{s.current=g.currentTarget,u(f)}})})}function pu(e,t){const n=`${e.label} — row ${t+1}`;return j({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i($,{value:o,onChange:r,label:a("{label} — row {n}",{label:a(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function fu(e){return{_gCards:R("Cards"),coverIndex:D("Cover image",i(yo,{}),xr,String(Or),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:ps("Image background",wi),cardImage:Tn()}}function hu(){return{outline:D("Card outline",i(Eo,{}),_r,yr),indexBadge:D("Card number",i(Ct,{}),Sr,Cr),showBadge:Rn("Product badge",!0,i(Rt,{noun:"tag"}))}}function mu(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...he,label:_e.find(l=>l.id===r).label}),o=r=>F(De(rt),n(r));return{_gShowOnCard:R("Show on a card"),[rt]:F({type:"custom",render:()=>i(ml,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(rt)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const rt="showCardPrice",_e=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function ml({rest:e}){const t=E(),n=ge(),o=s=>typeof t[s]=="boolean"?t[s]:void 0,r=s=>o(s)??e[s],l=_e.some(({id:s})=>o(s)!==void 0&&o(s)!==e[s]);return i(it,{parts:_e,changed:l,shown:r,onPress:(s,c)=>n({[s]:c}),onReset:()=>n(Object.fromEntries(_e.map(({id:s})=>[s,void 0])))})}function gu(e,t="display"){const n=v(t);return{[t]:y("desktop",{type:"custom",render:({value:o,onChange:r})=>i(it,{parts:e,changed:Yo(o),shown:l=>zo(o,l),onPress:(l,s)=>r(Zo(o,l,s)),onReset:()=>r(void 0)})}),[n]:y("mobile",{type:"custom",render:({value:o,onChange:r})=>i(gl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function it({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:l,disabledReason:s}){const c=a("Display");return i(_,{label:c,icon:i(po,{}),changed:t,action:i(O,{words:x()?.panel,label:c,changed:t,detail:l,onReset:r}),children:i(Vo,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...s?{disabled:!0,disabledReason:a(s)}:{}})),onChange:o})})}function gl({parts:e,desktopKey:t,value:n,onChange:o}){const r=E()[t];return i(it,{parts:e,changed:Jo(n),shown:l=>qo(r,n,l),onPress:(l,s)=>o(Qo(n,l,s)),onReset:()=>o(br),detail:a("the same as Desktop")})}function Tn(e=$n){return H("Card image",i(St,{}),k,Re,jn,k,e,{clear:{hint:k},hint:"Rounds the picture. The card's own corner is in Styles."})}function bl(){return pe(ht,"cardImage")}function bu(){return{cardImage:Tn(ht),...bl()}}function wu(){return Ze({sidesKey:"cornerSides",row:zn,step:Vn,useFollowed:()=>k,mark:i(wl,{label:Yn}),hint:a("Rounds the picture. Left alone it stays square.")})}function wl({label:e,changed:t=!1,onReset:n=()=>{}}){return i(O,{words:x()?.panel,label:a(e),changed:t,onReset:n})}function Su(){return{type:"custom",render:({value:e,onChange:t})=>i(yl,{value:typeof e=="string"?e:"",onChange:t})}}const Nn="own";function _u(){const e=[{value:Nn,label:"Layout's own",picture:un(Array.from({length:8},()=>[3,1]))},...Object.entries(no).map(([t,n])=>({value:t,label:n.label,picture:un([...n.phone,...n.phone])}))];return y("mobile",an("Layout",i(_t,{}),e,Nn,{columns:2,cell:Vi}))}function Sl({layout:e,width:t}){const n=oo(e),o=n?`${n[0]}/${n[1]}`:void 0;return i("span",{"aria-hidden":"true",style:{display:"grid",width:t,gridTemplateColumns:"repeat(12, minmax(0, 1fr))",gridAutoRows:o?"auto":6,gridAutoFlow:"row dense",gap:2},children:ro(e).map(([r,l],s)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${l}`,aspectRatio:o}},s))})}const _l={width:"3.5rem",height:"2.5rem",words:!1},Cl=200;function yl({value:e,onChange:t}){const[n,o]=Z(null),[r,l]=Z(4),s=J(null);Fn(()=>{const m=s.current;if(!m||typeof ResizeObserver!="function")return;const g=()=>l(m.getBoundingClientRect().width>=Cl?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?ji(Te,e):void 0,u=c?e:"",d=gt(n,u),h=gt(n,"").length,p=io("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:Xi(p,a("Not chosen"))},...d.map(m=>({value:m,label:a(Te[m].label),icon:i(Sl,{layout:Te[m],width:40})}))];return i(_,{label:a("Layout"),icon:i(_t,{}),value:c?a(c.label):void 0,children:i("div",{ref:s,style:{flex:"1 1 auto",minWidth:0},children:i(kt,{label:a("Layout"),value:u,options:f,onChange:t,columns:r,cell:_l,header:A("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:a("Photos in a row")}),i(Uo,{options:[{id:"all",label:a("All")},...eo.map(m=>({id:String(m),label:String(m)}))],value:n===null?"all":String(n),ariaLabel:a("Photos in a row"),onChange:m=>o(m==="all"?null:Number(m))}),i("span",{className:"text-2xs text-ink-faint",children:a("{n} of {total} layouts",{n:h,total:to.length})})]})})})})}export{os as BOUND_TO_POST,fc as BOUND_TO_POST_NOTE,Cc as BUCKET_ICONS,lu as CUSTOM_FIELD_MEDIA,au as CoordsField,dn as DESKTOP_GAP_NOT_OVERLAP,it as DisplayRow,Zc as EDGE_ARROWS,rr as FOCAL_DEFAULT,Oe as FOLD_FIELD_MARKER,rs as HIGHLIGHT_HINT,$ as HidableTextField,dt as LINK_FIELD_MARKER,nc as Label,Ie as MEDIA_FIELD_MARKER,ou as MEDIA_TYPE_OPTIONS,hc as NOT_BOUND_TO_POST,Tc as PanelBand,ls as PanelNoteLine,Hs as RowPropsContext,pt as SCAFFOLD_FIELD_MARKER,Ou as SCALAR_TEXT_CONTROLS,zi as SiteGapDefaultReset,q as Slider,cs as Swatches,xu as TEXT_CONTROL_KINDS,N as TEXT_FIELD_MARKER,uu as TICKER_ITEMS_ROW,hl as TextListField,ol as ThemeFillRow,we as WIDTH_LABEL,ts as WidthDefaultReset,fl as aimAfterListChange,$c as anchorFields,X as backTo,Nc as backgroundField,Fc as boxBlockSpacingField,vc as boxColumnsFields,qc as boxFillField,Bs as boxPhoneRowField,ks as boxShareField,Dc as boxSharePhoneField,Bc as boxShareTabletField,sl as boxThemeIndexOf,Oc as bucketHeader,Lc as buttonWordsEntryField,As as cardCornersField,ps as cardImageBackgroundField,Tn as cardImageField,bu as cardImageFields,fu as cardMediaFields,kc as cardShapeFields,mu as cardShowFields,hu as cardStyleFields,Gc as cellWidthFields,zc as colorInput,rc as containerDirectionField,qi as containerGapField,Ji as containerGapPhoneField,oc as containerGapRows,Zi as containerGapTabletField,ul as coordsResultTip,wc as copyText,bn as cornerSidesField,Ze as cornersRowField,gn as cornersUnitFields,Vc as date,jc as dateTime,Ic as designGroupHeader,gu as displayFields,Qc as edgePad,tt as fillSlotChoices,cu as focusAfterRemove,Jc as focusKeptField,Ec as foldMarker,Ee as foldMetaOf,as as foldTitleOf,Vs as followedHeightPatch,tl as followedStickPatch,Su as galleryLayoutField,_u as galleryLayoutPhoneField,Kc as heightFields,Se as heightFollowedBy,js as heightLayersAt,ic as heroGroupPlacementPoints,ut as hidableText,ss as hintIsWhileTyping,wu as imageCornersField,pc as inOwnBox,xc as isBucketHeader,mn as keptBy,Sc as linkField,al as loadingRowHint,ru as loadingShowsField,su as mediaFieldPaths,ot as mediaFields,eu as multiSelect,Yc as pageBackgroundField,yc as panelNote,Us as phoneOverrideField,bc as plainText,_c as plainTextarea,fs as pxField,Rc as quietMarker,ct as readHidable,dl as rowText,tu as searchSelect,ds as sectionBandChoices,ws as sectionCornersField,Ac as sectionShapeFields,Pc as sectionThemeFields,pl as setRowText,Hc as sizeField,nu as sourceField,Mc as spacingFields,Xc as stickFields,Uc as swapPadding,mc as text,Kn as textFieldIdentifier,ac as textFieldOffPage,uc as textFieldPanelOnly,du as textList,pu as textListRowField,gc as textarea,Rn as toggle,iu as upload,me as useLengthRow,ge as useSelectedPatch,E as useSelectedProps,T as useSelectedSibling,Yi as useSiteGapDetail,Wc as widthField,dc as withIdentifier,lc as withOffPage,cc as withPanelOnly,sc as withScaffold};
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactElement, type ReactNode } from "react";
|
|
2
2
|
import type { ShowWhenRule } from "efficient-shell/format";
|
|
3
|
-
import type
|
|
3
|
+
import { type ShapeLine } from "../../../format/lib/content/gallery-card-layout.js";
|
|
4
|
+
export declare const CUSTOM_RATIO_SEED: readonly [3, 2];
|
|
5
|
+
export declare function CustomRatioInputs<V extends string>({ value, follows, column, onChange, disabled }: {
|
|
6
|
+
value: unknown;
|
|
7
|
+
follows?: unknown;
|
|
8
|
+
column: "shape" | "image";
|
|
9
|
+
onChange: (next: V) => void;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}): import("react").FunctionComponentElement<import("efficient-easel/panel").SettingsFieldProps>;
|
|
4
12
|
export declare function fillRowCell<V extends string>(option: {
|
|
5
13
|
label: string;
|
|
6
14
|
value: V;
|
|
@@ -28,11 +36,6 @@ export declare function shapePickerRow<V extends string>(label: string, icon: Re
|
|
|
28
36
|
showWhen: ShowWhenRule;
|
|
29
37
|
}[];
|
|
30
38
|
}): {
|
|
31
|
-
options: {
|
|
32
|
-
showWhen?: ShowWhenRule | undefined;
|
|
33
|
-
label?: string | undefined;
|
|
34
|
-
value: V;
|
|
35
|
-
}[];
|
|
36
39
|
render: (props: {
|
|
37
40
|
value?: unknown;
|
|
38
41
|
onChange: (v: V) => void;
|
|
@@ -40,6 +43,11 @@ export declare function shapePickerRow<V extends string>(label: string, icon: Re
|
|
|
40
43
|
readOnly?: boolean;
|
|
41
44
|
follows?: unknown;
|
|
42
45
|
followsView?: "desktop" | "tablet";
|
|
43
|
-
}) => import("react").FunctionComponentElement<import("efficient-easel/panel").SettingsFieldProps>;
|
|
46
|
+
}) => import("react").FunctionComponentElement<import("efficient-easel/panel").SettingsFieldProps> | import("react").FunctionComponentElement<import("react").FragmentProps>;
|
|
47
|
+
options: {
|
|
48
|
+
showWhen?: ShowWhenRule | undefined;
|
|
49
|
+
label?: string | undefined;
|
|
50
|
+
value: V;
|
|
51
|
+
}[];
|
|
44
52
|
type: "custom";
|
|
45
53
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as h,jsxs as S,Fragment as H}from"react/jsx-runtime";import{createElement as p,Fragment as L}from"react";import{IconPicker as j,InputNumber as A}from"efficient-shell/ui";import{SettingsField as B}from"efficient-easel/panel";import{CUSTOM_SHAPE as x,customShapeRatio as P,isCustomShape as g,shapeRatioValue as R}from"../../../format/lib/content/gallery-card-layout.js";import{iconPickerRow as D,pickerCellsOf as T}from"./box-fields.js";import{say as v}from"../../../format/lib/editor-words.js";const t=28,i=1.5,k=[3,2];function N(e){return g(e)?x:e}function $(e,c){return e===x?R(k[0],k[1],c):e}const E={min:.01,max:9999,step:1};function W({value:e,follows:c,column:r,onChange:s,disabled:l}){const o=P(e),a=o??P(c)??k,m=(u,n)=>{const d=n===null?0:Math.min(E.max,Math.round(n*100)/100);if(!(d>0))return;const f=[a[0],a[1]];f[u]=d,s(R(f[0],f[1],r))},C=(u,n)=>p(A,{value:o?o[u]:null,...o?{}:{placeholder:String(a[u])},onChange:d=>m(u,d),...E,prefix:v(n),disabled:l});return p(B,{label:v("Custom W:H")},p("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0}},C(0,"W"),C(1,"H")))}function U({ratio:e}){const[c,r]=e??[1,1],s=(t-i*2)/Math.max(c,r),l=c*s,o=r*s;return h("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,"aria-hidden":"true",children:h("rect",{x:(t-l)/2,y:(t-o)/2,width:l,height:o,rx:2,fill:"none",stroke:"currentColor",strokeWidth:i,strokeDasharray:e?void 0:"3 2"})})}function V(){const e=i*2;return S("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,"aria-hidden":"true",children:[h("line",{x1:i,y1:i/2,x2:t-i,y2:i/2,stroke:"currentColor",strokeWidth:i}),h("line",{x1:i,y1:t-i/2,x2:t-i,y2:t-i/2,stroke:"currentColor",strokeWidth:i}),h("rect",{x:t/4,y:e,width:t/2,height:t-e*2,rx:2,fill:"none",stroke:"currentColor",strokeWidth:i})]})}function Z(e){return{...e,picture:h(V,{})}}const b={width:"5.25rem",height:"3.5rem",words:!0},M=3;function _(e,c){return e.map(r=>({value:r[c],label:r.label,picture:r.shape===x?h(X,{}):h(U,{ratio:r.ratio})}))}function X(){const[e,c]=k,r=(t-i*2)/Math.max(e,c),s=e*r,l=c*r,o=(t-s)/2,a=(t-l)/2;return S("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,"aria-hidden":"true",children:[h("rect",{x:o,y:a,width:s,height:l,rx:2,fill:"none",stroke:"currentColor",strokeWidth:i,strokeDasharray:"3 2"}),h("path",{d:`M${o+4} ${a+l-4} L${o+s-4} ${a+4}`,stroke:"currentColor",strokeWidth:i})]})}function tt({label:e,lines:c,column:r,value:s,onChange:l,disabled:o}){const a=h(j,{label:v(e),value:N(s),options:T(_(c,r)),onChange:m=>l($(m,r)),columns:M,cell:b,tooltips:!1,disabled:o});return g(s)?S(H,{children:[a,h(W,{value:s,column:r,onChange:l,disabled:o})]}):a}function et(e,c,r,s,l,o={}){const a=[..._(r,s),...o.more??[]],m=n=>a.some(d=>d.value===n),C=n=>g(n)?x:n!==x&&m(n)?n:void 0,u=D(e,c,a,l,{columns:M,cell:b,phoneRest:o.phoneRest,resolve:C});return{...u,render:n=>{const d=y=>n.onChange(y===void 0?y:$(y,s)),f=u.render({...n,onChange:d}),w=n.value,I=w==null||w==="",F=n.field?.currentValue,O="follows"in n?n.follows:F;return!g(w)&&!(I&&g(O))?f:p(L,null,f,p(W,{value:w,follows:O,column:s,onChange:n.onChange,disabled:n.readOnly===!0}))}}}export{k as CUSTOM_RATIO_SEED,W as CustomRatioInputs,tt as ShapePicker,Z as fillRowCell,et as shapePickerRow};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isShown as O,showWhenFactReaders as b}from"efficient-shell/format";import{containerOffersPositions as
|
|
1
|
+
import{isShown as O,showWhenFactReaders as b}from"efficient-shell/format";import{childInPositionSlot as k,containerOffersPositions as j}from"../../../format/lib/content/grid-span.js";import{heroGroupNestDepth as x}from"../../../format/lib/hero-group-placement.js";import{BUCKET_KEY as y,reseatBucketTabs as E}from"./field-groups.js";import{readsContext as P,resolverContext as T,showWhenOf as v}from"../../../render/lib/document/show-when.js";import{findParentNode as d}from"../../../format/lib/document/passes/document-position.js";const w=new WeakMap,B=new Set(Object.values(y));function F(e,f,n,S={}){if(!e)return e;const u=f?.props??{},o=u.id,m=b(S,f,n),g=T(n,{...m,parentOffersPositions:()=>{const t=d(n.appState,o);return t===void 0?void 0:j(t,o)},parentTileSlot:()=>{const t=d(n.appState,o);return t===void 0?void 0:k(t,o)},heroGroupDepth:()=>x(n.appState?.data,typeof o=="string"?o:"")}),r=[];for(const[t,p]of Object.entries(e)){const c=v(p);!c||P(c,"device")||O(c,u,g)||r.push(t)}if(r.length===0)return e;let s=w.get(e);s||w.set(e,s=new Map);const h=r.join("\0"),a=s.get(h);if(a)return a;const l=new Set(r);let i={};for(const[t,p]of Object.entries(e))l.has(t)||(i[t]=p);return r.some(t=>B.has(t))&&(i=E(i)),s.set(h,i),i}export{F as rowsShownForNode};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export declare const BOX_SHAPES: ("auto" | "square" | "video" | "screen" | "tall" | "wide" | "landscape" | "portrait" | "panorama" | "story" | "poster")[];
|
|
1
|
+
export declare const BOX_SHAPES: ("custom" | "auto" | "square" | "video" | "screen" | "tall" | "wide" | "landscape" | "portrait" | "panorama" | "story" | "poster")[];
|
|
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;
|
|
5
|
+
export declare function boxShapeStyle(desktop: unknown, phone?: unknown, tablet?: unknown): Record<string, string> | null;
|
|
5
6
|
export declare function boxShapePhoneOf(desktop: unknown, phone: unknown): BoxShape | null;
|
|
6
7
|
export declare function boxShapeTabletOf(tablet: unknown): BoxShape | null;
|
|
7
8
|
export declare function boxShapeClasses(desktop: unknown, phone: unknown, tablet?: unknown): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{galleryCardRatioClass as
|
|
1
|
+
import{CUSTOM_SHAPE as s,galleryCardRatioClass as c,isCustomShape as n,SHAPE_TABLE as r,shapeRatioStyle as x}from"./gallery-card-layout.js";const m=r.map(e=>e.shape),d=e=>e!==s&&m.includes(String(e??""))?e:null;function t(e){return d(e)??(n(e)?s:"auto")}function u(e){const a=t(e);return a==="auto"?"":c(a)}function O(e,a,i){return x({desktop:e,phone:p(a)!==null?a:i,tablet:i})}const l={tall:"view-wide:aspect-[3/4]",square:"view-wide:aspect-square",landscape:"view-wide:aspect-[4/3]",screen:"view-wide:aspect-[16/10]",video:"view-wide:aspect-[16/9]",wide:"view-wide:aspect-[2/1]",panorama:"view-wide:aspect-[21/9]",story:"view-wide:aspect-[9/16]",poster:"view-wide:aspect-[2/3]",portrait:"view-wide:aspect-[4/5]",custom:"view-wide:aspect-[var(--shape-ratio)]"},h={auto:"max-view-wide:aspect-auto",tall:"max-view-wide:h-auto max-view-wide:aspect-[3/4]",square:"max-view-wide:h-auto max-view-wide:aspect-square",landscape:"max-view-wide:h-auto max-view-wide:aspect-[4/3]",screen:"max-view-wide:h-auto max-view-wide:aspect-[16/10]",video:"max-view-wide:h-auto max-view-wide:aspect-[16/9]",wide:"max-view-wide:h-auto max-view-wide:aspect-[2/1]",panorama:"max-view-wide:h-auto max-view-wide:aspect-[21/9]",story:"max-view-wide:h-auto max-view-wide:aspect-[9/16]",poster:"max-view-wide:h-auto max-view-wide:aspect-[2/3]",portrait:"max-view-wide:h-auto max-view-wide:aspect-[4/5]",custom:"max-view-wide:h-auto max-view-wide:aspect-[var(--shape-ratio-phone)]"};function k(e,a){const i=t(a);return i==="auto"&&d(a)===null?null:i===s?a===e?null:i:i===t(e)?null:i}const S={auto:"view-wide:max-view-desktop:aspect-auto!",tall:"view-wide:max-view-desktop:h-auto! view-wide:max-view-desktop:aspect-[3/4]!",square:"view-wide:max-view-desktop:h-auto! view-wide:max-view-desktop:aspect-square!",landscape:"view-wide:max-view-desktop:h-auto! view-wide:max-view-desktop:aspect-[4/3]!",screen:"view-wide:max-view-desktop:h-auto! view-wide:max-view-desktop:aspect-[16/10]!",video:"view-wide:max-view-desktop:h-auto! view-wide:max-view-desktop:aspect-[16/9]!",wide:"view-wide:max-view-desktop:h-auto! view-wide:max-view-desktop:aspect-[2/1]!",panorama:"view-wide:max-view-desktop:h-auto! view-wide:max-view-desktop:aspect-[21/9]!",story:"view-wide:max-view-desktop:h-auto! view-wide:max-view-desktop:aspect-[9/16]!",poster:"view-wide:max-view-desktop:h-auto! view-wide:max-view-desktop:aspect-[2/3]!",portrait:"view-wide:max-view-desktop:h-auto! view-wide:max-view-desktop:aspect-[4/5]!",custom:"view-wide:max-view-desktop:h-auto! view-wide:max-view-desktop:aspect-[var(--shape-ratio-tablet)]!"};function p(e){const a=t(e);return a==="auto"&&d(e)===null?null:a}function E(e,a,i){const o=p(i),w=k(e,p(a)!==null?a:i);if(w===null&&o===null)return u(e);const v=t(e);return[w===null?u(e):v==="auto"?"":l[v],w===null?"":h[w],o===null?"":S[o]].filter(Boolean).join(" ")}export{m as BOX_SHAPES,u as boxShapeClass,E as boxShapeClasses,t as boxShapeOf,k as boxShapePhoneOf,O as boxShapeStyle,p as boxShapeTabletOf};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { type ViewTier } from "efficient-easel/screen/lib/content/view-tiers";
|
|
1
2
|
import type { SiteThemeRow } from "../site-theme-row.js";
|
|
2
|
-
import {
|
|
3
|
-
type ViewTier = keyof typeof VIEW_ABOVE;
|
|
3
|
+
import { type LengthGrid, type LengthKind, type LengthRow, type LengthUnit } from "efficient-easel/screen/lib/content/length-units";
|
|
4
4
|
export declare function cssLengthOf(value: number, unit: unknown): string;
|
|
5
5
|
export declare function storedUnit(stored: unknown, base?: LengthUnit): LengthUnit;
|
|
6
6
|
export declare function ownRowUnit(props: Readonly<Record<string, unknown>>, row: LengthRow, view: ViewTier): LengthUnit;
|
|
@@ -19,4 +19,3 @@ export type SiteLengthUnits = Readonly<{
|
|
|
19
19
|
export declare const SITE_LENGTH_UNIT_COLUMNS: Readonly<Record<keyof SiteLengthUnits, keyof SiteThemeRow>>;
|
|
20
20
|
export declare function siteLengthUnitsOfRow(row: object): SiteLengthUnits;
|
|
21
21
|
export declare function siteLengthNumber<T>(v: unknown, unit: unknown, px: (v?: number | null) => T): number | T;
|
|
22
|
-
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{viewKeyAt as
|
|
1
|
+
import{VIEW_TIERS as h,viewKeyAt as c}from"efficient-easel/screen/lib/content/view-tiers";import{finiteNumber as p}from"../finite-number.js";import{isLengthUnit as o,lengthOf as m,rowGrid as x}from"efficient-easel/screen/lib/content/length-units";function _(n,t){const e=m(n,u(t));return typeof e=="number"?`${e}px`:e}function u(n,t="px"){return o(n)?n:t}function L(n,t,e){return t.unitKey?u(n[c(t.unitKey,e)],t.base??"px"):t.base??"px"}function y(n,t=h){return n.unitKey?t.map(e=>c(n.unitKey,e)):[]}function a(n,t,e){const i=x({kind:n},t,e);return t!=="px"&&e.min>0?{...i,min:i.step}:i}function l(n,t,e,i){const r=p(n);if(!o(t)||t==="px"||r===void 0)return null;const s=a(e,t,i),f=Math.min(s.max,Math.max(s.min,r));return Math.round(f*100)/100}function k(n,t,e,i){const r=l(n,t,e,i);return r===null?null:_(r,t)}const d={cornerRadiusUnit:"corner_radius_unit",siteWidthUnit:"site_width_unit",siteGutterUnit:"site_gutter_unit",siteGutterPhoneUnit:"site_gutter_phone_unit",blockGapUnit:"block_gap_unit",blockGapPhoneUnit:"block_gap_phone_unit"};function K(n){const t=n;return Object.fromEntries(Object.entries(d).map(([e,i])=>[e,u(t[i])]))}function O(n,t,e){const i=p(n);return o(t)&&t!=="px"&&i!==void 0?i:e(i??null)}export{d as SITE_LENGTH_UNIT_COLUMNS,_ as cssLengthOf,L as ownRowUnit,y as rowUnitKeys,k as siteLengthCss,l as siteLengthHeld,O as siteLengthNumber,a as siteLengthTrack,K as siteLengthUnitsOfRow,u as storedUnit};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HeroGroupPlacement } from "../hero-group-placement.js";
|
|
2
|
-
export declare const GALLERY_CARD_RATIOS: readonly ["square", "tall", "wide", "landscape", "portrait", "video", "panorama", "story", "poster", "screen", "auto"];
|
|
2
|
+
export declare const GALLERY_CARD_RATIOS: readonly ["square", "tall", "wide", "landscape", "portrait", "video", "panorama", "story", "poster", "screen", "auto", "custom"];
|
|
3
3
|
export type GalleryCardRatio = (typeof GALLERY_CARD_RATIOS)[number];
|
|
4
4
|
export declare const GALLERY_CARD_RATIO_DEFAULT: GalleryCardRatio;
|
|
5
5
|
export declare function galleryCardRatioClass(ratio?: string): string;
|
|
@@ -64,8 +64,29 @@ export declare const SHAPE_TABLE: readonly [{
|
|
|
64
64
|
readonly image: "21/9";
|
|
65
65
|
readonly ratio: readonly [21, 9];
|
|
66
66
|
readonly label: "Panorama 21:9";
|
|
67
|
+
}, {
|
|
68
|
+
readonly shape: "custom";
|
|
69
|
+
readonly image: "custom";
|
|
70
|
+
readonly ratio: null;
|
|
71
|
+
readonly label: "Custom W:H";
|
|
67
72
|
}];
|
|
68
73
|
export type ImageShapeValue = (typeof SHAPE_TABLE)[number]["image"];
|
|
74
|
+
export declare const CUSTOM_SHAPE: "custom";
|
|
75
|
+
export declare function customShapeRatio(value: unknown): readonly [number, number] | null;
|
|
76
|
+
export declare function shapeRatioOf(value: unknown): readonly [number, number] | null;
|
|
77
|
+
export declare function isCustomShape(value: unknown): value is string;
|
|
78
|
+
export declare function shapeRatioValue(w: number, h: number, column: "shape" | "image"): string;
|
|
79
|
+
export declare function shapeRatioCss(ratio: readonly [number, number]): string;
|
|
80
|
+
export declare const SHAPE_RATIO_VARS: {
|
|
81
|
+
readonly desktop: "--shape-ratio";
|
|
82
|
+
readonly tablet: "--shape-ratio-tablet";
|
|
83
|
+
readonly phone: "--shape-ratio-phone";
|
|
84
|
+
};
|
|
85
|
+
export declare function shapeRatioStyle(views: {
|
|
86
|
+
desktop?: unknown;
|
|
87
|
+
tablet?: unknown;
|
|
88
|
+
phone?: unknown;
|
|
89
|
+
}): Record<string, string> | null;
|
|
69
90
|
export declare function shapeLines(shapes: readonly GalleryCardRatio[]): readonly ShapeLine[];
|
|
70
91
|
export declare const GALLERY_CAPTION_PLACES: readonly ["overlay", "below"];
|
|
71
92
|
export type GalleryCaptionPlace = (typeof GALLERY_CAPTION_PLACES)[number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{normalisePlacement as
|
|
1
|
+
import{normalisePlacement as p,placementParts as c}from"../hero-group-placement.js";import{scrim as s}from"./scrim.js";const y=["square","tall","wide","landscape","portrait","video","panorama","story","poster","screen","auto","custom"],R="square";function _(e){switch(e){case"tall":return"aspect-[3/4]";case"wide":return"aspect-[2/1]";case"landscape":return"aspect-[4/3]";case"screen":return"aspect-[16/10]";case"portrait":return"aspect-[4/5]";case"video":return"aspect-[16/9]";case"panorama":return"aspect-[21/9]";case"story":return"aspect-[9/16]";case"poster":return"aspect-[2/3]";case"auto":return"";case"custom":return"aspect-[var(--shape-ratio)]";default:return"aspect-square"}}const n=[{shape:"auto",image:"auto",ratio:null,label:"Auto"},{shape:"story",image:"9/16",ratio:[9,16],label:"Story 9:16"},{shape:"poster",image:"2/3",ratio:[2,3],label:"Poster 2:3"},{shape:"tall",image:"3/4",ratio:[3,4],label:"Tall 3:4"},{shape:"portrait",image:"4/5",ratio:[4,5],label:"Portrait 4:5"},{shape:"square",image:"1/1",ratio:[1,1],label:"Square 1:1"},{shape:"landscape",image:"4/3",ratio:[4,3],label:"Landscape 4:3"},{shape:"screen",image:"16/10",ratio:[16,10],label:"Screen 16:10"},{shape:"video",image:"16/9",ratio:[16,9],label:"Video 16:9"},{shape:"wide",image:"2/1",ratio:[2,1],label:"Wide 2:1"},{shape:"panorama",image:"21/9",ratio:[21,9],label:"Panorama 21:9"},{shape:"custom",image:"custom",ratio:null,label:"Custom W:H"}],l="custom",u=/^(\d{1,4}(?:\.\d{1,2})?)\/(\d{1,4}(?:\.\d{1,2})?)$/;function i(e){if(typeof e!="string")return null;const t=u.exec(e);if(!t)return null;const a=Number(t[1]),r=Number(t[2]);return a>0&&r>0?[a,r]:null}function C(e){const t=n.find(a=>a.shape!==l&&(a.shape===e||a.image===e));return t?t.ratio:i(e)}function m(e){return n.every(t=>t.shape!==e&&t.image!==e)&&i(e)!==null}function S(e,t,a){const r=n.find(o=>o.ratio!==null&&o.ratio[0]*t===o.ratio[1]*e);return r?r[a]:`${e}/${t}`}function h(e){return`${e[0]} / ${e[1]}`}const d={desktop:"--shape-ratio",tablet:"--shape-ratio-tablet",phone:"--shape-ratio-phone"};function L(e){const t={};for(const a of["desktop","phone","tablet"]){const r=m(e[a])?i(e[a]):null;r&&(t[d[a]]=h(r))}return Object.keys(t).length?t:null}function T(e){return n.filter(t=>e.includes(t.shape))}const O=["overlay","below"];function E(e){return e==="below"}const P="bottom-left";function H(e){const{band:t,column:a}=c(p(e));return["justify-start","justify-center","justify-end"][t]+(a==="center"?" text-center":a==="end"?" text-right":"")}const f=`linear-gradient(180deg, transparent 40%, ${s(.85)} 100%)`,g=`linear-gradient(0deg, transparent 40%, ${s(.85)} 100%)`,A=s(.45);function I(e){return[g,A,f][c(p(e)).band]}export{l as CUSTOM_SHAPE,P as GALLERY_CAPTION_ANCHOR_DEFAULT,O as GALLERY_CAPTION_PLACES,y as GALLERY_CARD_RATIOS,R as GALLERY_CARD_RATIO_DEFAULT,d as SHAPE_RATIO_VARS,n as SHAPE_TABLE,i as customShapeRatio,H as galleryCaptionAnchorClass,E as galleryCaptionIsBelow,I as galleryCaptionWash,_ as galleryCardRatioClass,m as isCustomShape,T as shapeLines,h as shapeRatioCss,C as shapeRatioOf,L as shapeRatioStyle,S as shapeRatioValue};
|
|
@@ -10,8 +10,21 @@ export declare const GRID_SPAN_ATTR = "data-sf-span";
|
|
|
10
10
|
export declare const GRID_MAX_ROW_SPAN = 4;
|
|
11
11
|
export declare function resolveGridRowSpan(span: unknown): number | null;
|
|
12
12
|
export declare const GRID_ROW_SPAN_ATTR = "data-sf-row-span";
|
|
13
|
-
export declare const
|
|
13
|
+
export declare const GRID_TILE_AT_KEY = "gridTileAt";
|
|
14
|
+
export declare const GRID_MAX_TILE_AT = 48;
|
|
15
|
+
export declare function resolveGridTileAt(at: unknown): number | null;
|
|
16
|
+
export declare const GRID_TILE_AT_VAR = "--sf-tile-at";
|
|
17
|
+
export declare function resolveGridSpanPhone(span: unknown): number | null;
|
|
18
|
+
export declare function resolveGridRowSpanPhone(span: unknown): number | null;
|
|
19
|
+
export declare const GRID_SPAN_PHONE_ATTR = "data-sf-span-phone";
|
|
20
|
+
export declare const GRID_ROW_SPAN_PHONE_ATTR = "data-sf-row-span-phone";
|
|
21
|
+
export declare const CELL_SPAN_KEYS: readonly ["gridSpan", "gridRowSpan", "gridTileAt", string, string];
|
|
14
22
|
export declare function containerOffersPositions(node: {
|
|
15
23
|
type?: unknown;
|
|
16
24
|
props?: Record<string, unknown>;
|
|
17
|
-
} | null | undefined): boolean;
|
|
25
|
+
} | null | undefined, childId?: unknown): boolean;
|
|
26
|
+
export declare function declarePositionSlots(type: string, slots: readonly string[]): void;
|
|
27
|
+
export declare function childInPositionSlot(node: {
|
|
28
|
+
type?: unknown;
|
|
29
|
+
props?: Record<string, unknown>;
|
|
30
|
+
} | null | undefined, childId: unknown): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolveGalleryLayout as
|
|
1
|
+
import{phoneKey as i}from"efficient-easel/screen/lib/content/view-tiers";import{resolveGalleryLayout as c}from"./gallery-layout.js";import{PHONE_EDGE as a}from"./view-lines.js";const u=12,p=1,l=3,P=a,R=3;function o(r,t,n){const e=typeof r=="number"?r:Number.parseInt(String(r??""),10);return Number.isFinite(e)?Math.min(n,Math.max(t,Math.trunc(e))):null}function x(r){return o(r,1,u)??R}function M(r,t){const n=o(r,p,l);return n??(x(t)===4?2:p)}function E(r){return r==null||r===""?null:o(r,1,u)}const L="data-sf-span",A=4;function S(r){return r==null||r===""?null:o(r,1,A)}const D="data-sf-row-span",G="gridTileAt",I=48;function y(r){return r==null||r===""?null:o(r,1,I)}const d="--sf-tile-at";function g(r){return r==null||r===""?null:o(r,1,l)}function h(r){return S(r)}const C="data-sf-span-phone",w="data-sf-row-span-phone",v=["gridSpan","gridRowSpan",G,i("gridSpan"),i("gridRowSpan")];function B(r,t){if(!r)return!1;if(N(r,t)||r.type==="Grid")return!0;if(r.type==="GalleryB"){if(c(r.props??{}))return!1;const n=r.props?.columns;return n!=null&&n!==""}return!1}const f=new Map;function K(r,t){f.set(r,[...t])}function N(r,t){if(!r||typeof r.type!="string"||typeof t!="string")return!1;const n=f.get(r.type);return n?n.some(e=>{const s=r.props?.[e];return Array.isArray(s)&&s.some(_=>_?.props?.id===t)}):!1}export{v as CELL_SPAN_KEYS,R as GRID_COLUMNS_FALLBACK,u as GRID_MAX_COLUMNS,A as GRID_MAX_ROW_SPAN,I as GRID_MAX_TILE_AT,l as GRID_MOBILE_MAX_COLUMNS,p as GRID_MOBILE_MIN_COLUMNS,P as GRID_PHONE_BREAKPOINT,D as GRID_ROW_SPAN_ATTR,w as GRID_ROW_SPAN_PHONE_ATTR,L as GRID_SPAN_ATTR,C as GRID_SPAN_PHONE_ATTR,G as GRID_TILE_AT_KEY,d as GRID_TILE_AT_VAR,N as childInPositionSlot,B as containerOffersPositions,K as declarePositionSlots,x as resolveGridColumns,M as resolveGridMobileColumns,S as resolveGridRowSpan,h as resolveGridRowSpanPhone,E as resolveGridSpan,g as resolveGridSpanPhone,y as resolveGridTileAt};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ShowWhenRule } from "efficient-shell/format";
|
|
2
|
-
import {
|
|
3
|
-
type
|
|
2
|
+
import type { ViewTier } from "efficient-easel/screen/lib/content/view-tiers";
|
|
3
|
+
import { CUSTOM_SHAPE, type ImageShapeValue } from "./gallery-card-layout.js";
|
|
4
|
+
type ImageRatio = Exclude<ImageShapeValue, typeof CUSTOM_SHAPE> | `${number}/${number}`;
|
|
4
5
|
export declare const FILL_ROW = "fill";
|
|
5
6
|
export type ImageAspect = ImageRatio | typeof FILL_ROW;
|
|
6
7
|
export declare const FILL_ROW_OPTION: {
|
|
@@ -45,12 +46,13 @@ export declare function pictureLayerClass(fill: {
|
|
|
45
46
|
} | null | undefined): string;
|
|
46
47
|
export declare const isImageRatio: (value: unknown) => value is ImageRatio;
|
|
47
48
|
export declare function imageRatioAspect(value: unknown): string | null;
|
|
49
|
+
export declare function imageShapeStyle(drawn: unknown, phone: unknown): Record<string, string> | null;
|
|
48
50
|
export declare function imageWidthFollowsBox(drawn: unknown, phone: unknown, fit: "cover" | "contain"): boolean;
|
|
49
51
|
export declare function imageAspectDrawn(aspect: unknown, rowGivesHeight: boolean): unknown;
|
|
50
52
|
export declare function imageAspectPhoneRest(desktop: unknown): ImageRatio | undefined;
|
|
51
53
|
export declare function imageAspectPhoneOf(drawn: unknown, phone: unknown): ImageRatio | null;
|
|
52
54
|
export declare function imageAspectDrawsARatio(aspect: unknown, phone: unknown): boolean;
|
|
53
55
|
export declare function imageFocalPointActs(fit: unknown, aspect: unknown, phone: unknown): boolean;
|
|
54
|
-
export declare function imageFocalPointActsIn(view:
|
|
56
|
+
export declare function imageFocalPointActsIn(view: ViewTier, fit: unknown, aspect: unknown, phone: unknown): boolean;
|
|
55
57
|
export declare function imageAspectClasses(drawn: unknown, phone: ImageRatio | null, fillFrom?: ImageFillFrom): string;
|
|
56
58
|
export {};
|