efficient-web-builder 67.2.0 → 67.4.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.
Files changed (65) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/editor/components/useSectionToBoxPass.d.ts +4 -0
  3. package/dist/editor/components/useSectionToBoxPass.js +1 -1
  4. package/dist/editor/lib/document/add-palette.js +1 -1
  5. package/dist/editor/lib/document/add-target.js +1 -1
  6. package/dist/editor/lib/document/block-offer.js +1 -1
  7. package/dist/editor/lib/document/blocks/shared-fields.js +1 -1
  8. package/dist/editor/lib/document/controls.js +1 -1
  9. package/dist/editor/lib/document/field-groups.js +1 -1
  10. package/dist/editor/lib/document/heading-outline.js +1 -1
  11. package/dist/editor/lib/document/slot-new-children.js +1 -1
  12. package/dist/editor/lib/host-document-bridge.js +1 -1
  13. package/dist/editor/lib/sections/city-presets.js +1 -1
  14. package/dist/editor/lib/sections/new-section-node.js +1 -1
  15. package/dist/editor/lib/sections/section-dry-run.js +2 -2
  16. package/dist/editor/lib/sections/text-layouts.js +1 -1
  17. package/dist/format/lib/content/box-layout.js +1 -1
  18. package/dist/format/lib/content/mirror-cards.js +1 -1
  19. package/dist/format/lib/content/section-width.js +1 -1
  20. package/dist/format/lib/document/box-footer.js +1 -1
  21. package/dist/format/lib/document/container-blocks.js +1 -1
  22. package/dist/format/lib/document/media-drop.js +1 -1
  23. package/dist/format/lib/document/part-inks.js +1 -1
  24. package/dist/format/lib/document/part-records.js +1 -1
  25. package/dist/format/lib/document/passes/catalogue-labels.js +1 -1
  26. package/dist/format/lib/document/passes/media-values.js +1 -1
  27. package/dist/format/lib/document/row-hand.js +1 -1
  28. package/dist/format/lib/document/section-catalog.d.ts +2 -0
  29. package/dist/format/lib/document/section-catalog.js +3 -3
  30. package/dist/format/lib/document/source-bound-parts.js +1 -1
  31. package/dist/format/lib/document/templateFields.js +1 -1
  32. package/dist/format/lib/document/theme-slots.js +1 -1
  33. package/dist/format/lib/editor-words.js +1 -1
  34. package/dist/format/lib/logo/logo-size.d.ts +5 -0
  35. package/dist/format/lib/logo/logo-size.js +1 -1
  36. package/dist/format/lib/own-entry.d.ts +2 -0
  37. package/dist/format/lib/own-entry.js +1 -0
  38. package/dist/format/lib/preview-header-settings.d.ts +3 -0
  39. package/dist/format/lib/sections/active-press-context.js +1 -1
  40. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  41. package/dist/format/lib/sections/section-eyebrow-look.js +1 -1
  42. package/dist/format/lib/sections/section-head-placement.js +1 -1
  43. package/dist/format/lib/sections/section-presets.d.ts +2 -0
  44. package/dist/format/lib/sections/section-presets.js +1 -1
  45. package/dist/format/lib/sections/section-text-kinds.js +1 -1
  46. package/dist/format/lib/sections/section-text-regions.js +1 -1
  47. package/dist/format/lib/source-rules/editor-words.js +3 -3
  48. package/dist/format/lib/source-rules/import-time-work.js +4 -4
  49. package/dist/format/lib/source-rules/own-key-reads.d.ts +26 -0
  50. package/dist/format/lib/source-rules/own-key-reads.js +7 -0
  51. package/dist/render/components/Logo.d.ts +2 -1
  52. package/dist/render/components/Logo.js +1 -1
  53. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
  54. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  55. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
  56. package/dist/render/lib/document/head-core-boxes.js +1 -1
  57. package/dist/render/lib/document/migrate-legacy.js +1 -1
  58. package/dist/render/lib/document/part-styles.js +2 -2
  59. package/dist/render/lib/document/passes/section-animation.js +1 -1
  60. package/dist/render/lib/document/passes/section-padding.js +1 -1
  61. package/dist/render/lib/document/passes/section-width.js +1 -1
  62. package/dist/render/lib/document/slot-counts.js +1 -1
  63. package/dist/render/lib/document/slot-specs.js +1 -1
  64. package/dist/render/lib/sections/section-to-box.js +1 -1
  65. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # Changelog
2
2
 
3
+ ## 67.4.0 - 2026-11-11
4
+
5
+ From main at `95e3acc7`: #715, #716. A minor: no `!`, no export is removed, the peers stay `efficient-easel` `^34.1.0` and `efficient-shell` `^12.33.0`. One new export and one optional field. No stored key or value moves.
6
+
7
+ **For hosts:**
8
+ - Nothing to change. No live host passes `sets` today, so no page or editor changes (#715). A host's own press list with no `blocks` still allows its whole set (#716).
9
+ - storefront-blocks: import `pressWithheld` from `format/lib/document/section-catalog` in place of its own copy (`scripts/press-withheld.ts`), and drop the Spec Table test allowance in `scripts/test-block-sets.tsx` and the `WheelDiagram` line in `scripts/registered-not-catalogued.ts` (#715, #716).
10
+
11
+ ### Added
12
+
13
+ - **`pressWithheld`** (#716): new export `pressWithheld(type, sets, needs = PRESS_NEEDS_SET)` beside `PRESS_NEEDS_SET`: true when a row is withheld under a set choice because its press needs a set the choice does not offer. It reads the list by own key.
14
+ - **A press line names its blocks** (#716): `PressNeedsSet` gains optional `blocks`. A line with `blocks` allows only those blocks of its set; the Tab Bar line (`DocTabs`) names `MenuBlock` only.
15
+
16
+ ### Fixed
17
+
18
+ - **The Wheel Diagram is in the commerce set** (#715): `WheelDiagram: "commerce"` in `UNLISTED_BLOCK_SETS`, beside the EU Tyre Label. A host that narrows its editor by `sets` offers the Wheel Diagram, and so the Spec Table press, again.
19
+
20
+ ## 67.3.0 - 2026-11-11
21
+
22
+ From main at `c30ebb65`: #711, #712, #708, #713. A minor: no `!`, no export is removed, the peers stay `efficient-easel` `^34.1.0` and `efficient-shell` `^12.33.0`. New exports and optional props only. No stored key or value moves.
23
+
24
+ **For hosts:**
25
+ - Nothing to change. A host that registers no Spec Table row presses the ordinary insert, as before (#712). A logo with no `sizeUnit`, or px, draws the bytes it drew (#713).
26
+ - To draw a logo height stored in vw or %, pass the stored `logo_size_unit` as the new `sizeUnit` prop of `<Logo>`, or as `logoSizeUnit` in `PreviewHeaderSettings` (#713).
27
+ - storefront-blocks: the Spec Table row with the Sheet (storefront-blocks #481) is the row this release presses. Blocks releases that peer on web-builder `^66` or lower hold an older row; do not force them onto 67.x (#712).
28
+
29
+ ### Added
30
+
31
+ - **The logo height draws in its stored unit** (#713): `<Logo>` takes an optional `sizeUnit`; a unit other than px writes the height through `siteLengthCss`, held in the size grid. New export `HEADER_LOGO_GRID` (`format/lib/logo/logo-size`). `PreviewHeaderSettings` gains optional `logoSizeUnit` and `menuGapUnit`.
32
+ - **Own-key registry reads** (#708): new module `format/lib/own-entry` (`ownEntry`, `hasOwnEntry`): a registry keyed by a type reads its own keys only, so a stored type such as "toString" reads as no entry. New source rule `format/lib/source-rules/own-key-reads`. 91 registry reads and 23 hand-written own-key reads now go through it; the gallery layout picker, the footer text size and a Box's justify and align no longer accept an Object key.
33
+ - **The Spec Table is a host-row press type** (#712): `SpecTable` joins `HOST_PRESS_TYPES` and `SECTION_TO_BOX_PRESS`; the Add menu presses the host's Spec Table row as a Box.
34
+
35
+ ### Fixed
36
+
37
+ - **The editor converts with the site Side space** (#711): `editorConvertContext` takes the header's `siteGutter`, `siteGutterPhone` and `siteLengthUnits` (optional); `PressContext` gains optional `site`. A Section Header pressed in the editor gets its second gutter from the site, not the 40px default. The published page converts no section and does not change.
38
+
3
39
  ## 67.2.0 - 2026-11-11
4
40
 
5
41
  From main at `7d5e50df`: #701, #702, #705, #706, #707, #704. A minor: no `!`, no export is removed, the peers stay `efficient-easel` `^34.1.0` and `efficient-shell` `^12.33.0`. Exported functions gain optional arguments and components gain optional props; one exported type widens (`OptionRowShape` adds `"d"` and `"e"`). One stored key is added (`hoverShow` on a Box, and the value `hover: "nextImage"` on a card Box); no stored key or value moves (read-only count 2026-11-11: 0 such nodes on the US and AU sites).
@@ -2,10 +2,14 @@ import type { ScreenDocumentOps } from "efficient-easel/screen/lib/screen-parts"
2
2
  import { type ThemeRow } from "../../render/components/PreviewHeaderContext.js";
3
3
  import { type ConvertContext, type SectionToBoxEdit } from "../../render/lib/sections/section-to-box.js";
4
4
  import type { ThemeValue } from "../../format/lib/theme.js";
5
+ import type { SiteLengthUnits } from "../../format/lib/content/css-length.js";
5
6
  export declare function useSectionToBoxPass(ops: ScreenDocumentOps): void;
6
7
  export declare function editorConvertContext(header: {
7
8
  theme: ThemeValue;
8
9
  themeRow: ThemeRow;
9
10
  themeFromDocument: boolean;
11
+ siteGutter?: number | null;
12
+ siteGutterPhone?: number | null;
13
+ siteLengthUnits?: SiteLengthUnits;
10
14
  }): ConvertContext | null;
11
15
  export declare function applySectionToBoxEdits(edits: readonly SectionToBoxEdit[], ops: Pick<ScreenDocumentOps, "replaceComponent" | "insertNode">, done: Set<string>): void;
@@ -1 +1 @@
1
- "use client";import{useEffect as f,useRef as p}from"react";import{useEasel as d}from"efficient-easel/easel";import{ROOT_ZONE as s}from"efficient-easel/draw";import{usePreviewHeader as x}from"../../render/components/PreviewHeaderContext.js";import{sectionToBoxEdits as a}from"../../render/lib/sections/section-to-box.js";import{clearActivePressContext as l,setActivePressContext as h}from"../../format/lib/sections/active-press-context.js";function T(t){const i=d(e=>e.appState.data.content),{theme:r,themeRow:o,themeFromDocument:n}=x(),c=p(new Set);f(()=>{const e=u({theme:r,themeRow:o,themeFromDocument:n});e&&C(a(i,void 0,e),t,c.current)},[i,t,r,o,n]),f(()=>{const e=h(u({theme:r,themeRow:o,themeFromDocument:n}));return()=>l(e)},[r,o,n])}function u(t){return t.themeFromDocument||t.themeRow==="none"?{}:t.themeRow==="read"?{theme:t.theme}:null}function C(t,i,r){for(const{index:o,nodes:n}of[...t].sort((c,e)=>e.index-c.index)){const c=String(n[0].props.id);r.has(c)||(r.add(c),i.replaceComponent(s,o,n[0]),n.slice(1).forEach((e,m)=>{i.insertNode(s,o+1+m,e),i.replaceComponent(s,o+1+m,e)}))}}export{C as applySectionToBoxEdits,u as editorConvertContext,T as useSectionToBoxPass};
1
+ "use client";import{useEffect as f,useRef as h}from"react";import{useEasel as a}from"efficient-easel/easel";import{ROOT_ZONE as m}from"efficient-easel/draw";import{usePreviewHeader as x}from"../../render/components/PreviewHeaderContext.js";import{sectionToBoxEdits as d}from"../../render/lib/sections/section-to-box.js";import{clearActivePressContext as _,setActivePressContext as g}from"../../format/lib/sections/active-press-context.js";import{siteFactsFromRead as P}from"../lib/sections/section-dry-run.js";function T(t){const i=a(c=>c.appState.data.content),{theme:n,themeRow:e,themeFromDocument:o,siteGutter:r,siteGutterPhone:s,siteLengthUnits:u}=x(),p=h(new Set);f(()=>{const c=l({theme:n,themeRow:e,themeFromDocument:o,siteGutter:r,siteGutterPhone:s,siteLengthUnits:u});c&&C(d(i,void 0,c),t,p.current)},[i,t,n,e,o,r,s,u]),f(()=>{const c=g(l({theme:n,themeRow:e,themeFromDocument:o,siteGutter:r,siteGutterPhone:s,siteLengthUnits:u}));return()=>_(c)},[n,e,o,r,s,u])}function l(t){if(t.themeFromDocument||t.themeRow==="none")return{};if(t.themeRow!=="read")return null;const{siteGutter:i=null,siteGutterPhone:n=null,siteLengthUnits:e={}}=t;if(i===null&&n===null)return{theme:t.theme};const o=P({schema:"",site:"",site_gutter:i,site_gutter_phone:n,site_gutter_unit:e.siteGutterUnit??null,site_gutter_phone_unit:e.siteGutterPhoneUnit??null});return{theme:t.theme,site:o}}function C(t,i,n){for(const{index:e,nodes:o}of[...t].sort((r,s)=>s.index-r.index)){const r=String(o[0].props.id);n.has(r)||(n.add(r),i.replaceComponent(m,e,o[0]),o.slice(1).forEach((s,u)=>{i.insertNode(m,e+1+u,s),i.replaceComponent(m,e+1+u,s)}))}}export{C as applySectionToBoxEdits,l as editorConvertContext,T as useSectionToBoxPass};
@@ -1 +1 @@
1
- import{buildPaletteSections as a,categoryLabel as l,paletteWithoutPinned as i,pinnedSection as r}from"efficient-easel/screen/lib/document/palette-sections";import{labelAtLevel as c,LEVEL_NAMED_TYPE as b}from"../../../format/lib/document/section-catalog.js";const s={openers:{label:"Hero & intros",icon:"image"},shop:{label:"Shop & galleries",icon:"bag"},product:{label:"Product page",icon:"box"},checkout:{label:"Checkout & ordering",icon:"bag"},about:{label:"About & brand story",icon:"book"},content:{label:"Text & content",icon:"type"},proof:{label:"Stats & social proof",icon:"star"},promo:{label:"Promotions & sign-ups",icon:"sparkles"},blog:{label:"Blog & journal",icon:"newspaper"},navigation:{label:"Navigation & wayfinding",icon:"bookmark"},legal:{label:"Legal & documents",icon:"file"},contact:{label:"Contact, FAQ & forms",icon:"mail"},structure:{label:"Layout, structure & embeds",icon:"grid"},layouts:{label:"Layouts",icon:"layers"}};function t(o){return s[o]?.label}function d(o,e={}){return a(o,{labelAtLevel:c,categoryLabel:t,descriptions:e})}function f(o,e){return l(o,e,t)}const n=b;function m(o){return r(o,n)}function y(o){return i(o,n)}export{s as CATEGORY_META,n as PINNED_SECTION_TYPE,d as buildPaletteSections,f as categoryLabel,t as categoryShortLabel,y as paletteWithoutPinned,m as pinnedSection};
1
+ import{buildPaletteSections as a,categoryLabel as l,paletteWithoutPinned as i,pinnedSection as r}from"efficient-easel/screen/lib/document/palette-sections";import{labelAtLevel as c,LEVEL_NAMED_TYPE as b}from"../../../format/lib/document/section-catalog.js";import{ownEntry as s}from"../../../format/lib/own-entry.js";const u={openers:{label:"Hero & intros",icon:"image"},shop:{label:"Shop & galleries",icon:"bag"},product:{label:"Product page",icon:"box"},checkout:{label:"Checkout & ordering",icon:"bag"},about:{label:"About & brand story",icon:"book"},content:{label:"Text & content",icon:"type"},proof:{label:"Stats & social proof",icon:"star"},promo:{label:"Promotions & sign-ups",icon:"sparkles"},blog:{label:"Blog & journal",icon:"newspaper"},navigation:{label:"Navigation & wayfinding",icon:"bookmark"},legal:{label:"Legal & documents",icon:"file"},contact:{label:"Contact, FAQ & forms",icon:"mail"},structure:{label:"Layout, structure & embeds",icon:"grid"},layouts:{label:"Layouts",icon:"layers"}};function t(o){return s(u,o)?.label}function f(o,e={}){return a(o,{labelAtLevel:c,categoryLabel:t,descriptions:e})}function y(o,e){return l(o,e,t)}const n=b;function L(o){return r(o,n)}function E(o){return i(o,n)}export{u as CATEGORY_META,n as PINNED_SECTION_TYPE,f as buildPaletteSections,y as categoryLabel,t as categoryShortLabel,E as paletteWithoutPinned,L as pinnedSection};
@@ -1 +1 @@
1
- import{cardTemplateBlocks as i,cardTemplateOwner as f,cardTemplatesNameBlocks as u}from"../../../format/lib/content/card-template.js";import{blockOfferOf as p}from"./block-offer.js";import{containerBlocksFor as m}from"../../../format/lib/document/container-blocks.js";import{blockChoicesFor as h,FOOTER_BLOCKS_SLOT as a}from"./footer-blocks.js";import{EDITOR_SLOT_EXTRA_SPECS as d}from"./slot-new-children.js";import{SLOT_SECTION_SPECS as O}from"../../../render/lib/document/slot-specs.js";function L(o,r=0,n,c){const e=S(y(o,r,c),n),t=e?p():null;return e&&t?T(e,t):e}function T(o,r){if(o.spec)return r.offers(o.spec.childType)?o:null;const n=o.choices??[],c=n.filter(e=>r.offers(e.type));return c.length===n.length?o:c.length>0?{...o,choices:c}:null}function S(o,r){if(!o||o.source!=="container"||!r||!u())return o;const n=f({data:r.data},r.id),c=typeof n?.type=="string"?i(n.type):[],e=o.choices??[],t=c.filter(s=>!e.some(l=>l.type===s.type));return t.length?{...o,choices:[...e,...t.map(s=>({type:s.type,label:s.label}))]}:o}function y(o,r,n){const c=n?d[o]?.[n]:void 0;if(c)return{source:"section",slot:c.slot,choices:null,spec:c};const e=O[o];if(e)return{source:"section",slot:e.slot,choices:null,spec:e};const t=m(o,r);if(t)return{source:"container",slot:t.slot,choices:t.choices,spec:null};const s=h(o);return s?{source:"footer",slot:a,choices:s,spec:null}:null}export{L as canAddTo};
1
+ import{cardTemplateBlocks as f,cardTemplateOwner as u,cardTemplatesNameBlocks as p}from"../../../format/lib/content/card-template.js";import{blockOfferOf as m}from"./block-offer.js";import{containerBlocksFor as h}from"../../../format/lib/document/container-blocks.js";import{blockChoicesFor as a,FOOTER_BLOCKS_SLOT as d}from"./footer-blocks.js";import{EDITOR_SLOT_EXTRA_SPECS as O}from"./slot-new-children.js";import{SLOT_SECTION_SPECS as T}from"../../../render/lib/document/slot-specs.js";import{ownEntry as l}from"../../../format/lib/own-entry.js";function x(o,r=0,n,c){const e=y(C(o,r,c),n),t=e?m():null;return e&&t?S(e,t):e}function S(o,r){if(o.spec)return r.offers(o.spec.childType)?o:null;const n=o.choices??[],c=n.filter(e=>r.offers(e.type));return c.length===n.length?o:c.length>0?{...o,choices:c}:null}function y(o,r){if(!o||o.source!=="container"||!r||!p())return o;const n=u({data:r.data},r.id),c=typeof n?.type=="string"?f(n.type):[],e=o.choices??[],t=c.filter(s=>!e.some(i=>i.type===s.type));return t.length?{...o,choices:[...e,...t.map(s=>({type:s.type,label:s.label}))]}:o}function C(o,r,n){const c=n?l(O,o)?.[n]:void 0;if(c)return{source:"section",slot:c.slot,choices:null,spec:c};const e=l(T,o);if(e)return{source:"section",slot:e.slot,choices:null,spec:e};const t=h(o,r);if(t)return{source:"container",slot:t.slot,choices:t.choices,spec:null};const s=a(o);return s?{source:"footer",slot:d,choices:s,spec:null}:null}export{x as canAddTo};
@@ -1 +1 @@
1
- import{offeredSets as h}from"../editor-blocks.js";import{currentEaselSession as u}from"efficient-easel/screen/lib/session";import{blocksOf as E}from"../website-session.js";import{layoutPresetFor as T}from"../sections/text-layouts.js";import{blockTypesIn as d}from"efficient-easel/screen/lib/document/block-types-in";import{blockSetOf as w,PRESS_NEEDS_SET as _}from"../../../format/lib/document/section-catalog.js";import{SLOT_SECTION_SPECS as S}from"../../../render/lib/document/slot-specs.js";const m=()=>({}),O=new Map;function p(e){const n=O.get(e);if(n)return n;const t=new Set,f=Object.prototype.hasOwnProperty.call(S,e)?S[e]:void 0;if(f)for(const r of f.seeds(m))for(const s of d({type:f.childType,props:r}))t.add(s);const c=T(e);if(c){let r=0;for(const s of d(c(m,o=>`${o}-${r+=1}`)))t.add(s)}t.delete(e);const i=[...t].sort();return O.set(e,i),i}function N(e,n=p(e),t=w,f=_){const c=new Set(["general"]),i=t(e);return i&&c.add(i),Object.prototype.hasOwnProperty.call(f,e)&&c.add(f[e].set),n.filter(r=>{const s=t(r);return!s||!c.has(s)})}function x(e){if(!e||!e.sets&&!e.allow&&!e.deny?.length)return null;const n=h(e),t=e.allow?new Set(e.allow):null,f=new Set(e.deny??[]),c=new Set(Object.keys(e.host??{})),i=o=>{if(f.has(o))return!1;if(c.has(o))return!0;const l=w(o);return!l||!n[l]?!1:t?t.has(o):!0},r=new Map,s=o=>{const l=r.get(o);if(l!==void 0)return l;r.set(o,!1);const a=i(o)&&p(o).every(s);return r.set(o,a),a};return{sets:n,offers:s}}const P="block-offer";function b(e=u()){return e.cache(P,()=>x(E(e)))}function v(e,n=u()){const t=b(n);return t?t.offers(e):!0}export{v as blockIsOffered,b as blockOfferOf,p as blocksLaidDownBy,N as blocksOutsideItsSet,x as resolveBlockOffer};
1
+ import{offeredSets as h}from"../editor-blocks.js";import{currentEaselSession as d}from"efficient-easel/screen/lib/session";import{blocksOf as p}from"../website-session.js";import{layoutPresetFor as k}from"../sections/text-layouts.js";import{blockTypesIn as u}from"efficient-easel/screen/lib/document/block-types-in";import{blockSetOf as w,PRESS_NEEDS_SET as T}from"../../../format/lib/document/section-catalog.js";import{SLOT_SECTION_SPECS as _}from"../../../render/lib/document/slot-specs.js";import{ownEntry as S}from"../../../format/lib/own-entry.js";const m=()=>({}),E=new Map;function O(e){const s=E.get(e);if(s)return s;const t=new Set,i=S(_,e);if(i)for(const o of i.seeds(m))for(const c of u({type:i.childType,props:o}))t.add(c);const f=k(e);if(f){let o=0;for(const c of u(f(m,n=>`${n}-${o+=1}`)))t.add(c)}t.delete(e);const l=[...t].sort();return E.set(e,l),l}function C(e,s=O(e),t=w,i=T){const f=new Set(["general"]),l=t(e);l&&f.add(l);const o=S(i,e);o&&!o.blocks&&f.add(o.set);const c=new Set(o?.blocks??[]);return s.filter(n=>{const r=t(n);return r&&r===o?.set&&c.has(n)?!1:!r||!f.has(r)})}function x(e){if(!e||!e.sets&&!e.allow&&!e.deny?.length)return null;const s=h(e),t=e.allow?new Set(e.allow):null,i=new Set(e.deny??[]),f=new Set(Object.keys(e.host??{})),l=n=>{if(i.has(n))return!1;if(f.has(n))return!0;const r=w(n);return!r||!s[r]?!1:t?t.has(n):!0},o=new Map,c=n=>{const r=o.get(n);if(r!==void 0)return r;o.set(n,!1);const a=l(n)&&O(n).every(c);return o.set(n,a),a};return{sets:s,offers:c}}const b="block-offer";function g(e=d()){return e.cache(b,()=>x(p(e)))}function M(e,s=d()){const t=g(s);return t?t.offers(e):!0}export{M as blockIsOffered,g as blockOfferOf,O as blocksLaidDownBy,C as blocksOutsideItsSet,x as resolveBlockOffer};
@@ -1 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{SECTION_PAD_INNER_DEFAULTS as i}from"../../../../render/lib/document/passes/section-padding.js";import n,{SlotNoticeField as p}from"../../../components/SlotChildRows.js";import{SECTION_HEIGHT as r}from"../../../../format/lib/content/section-height.js";import{usePreviewHeader as l}from"../../../../render/components/PreviewHeaderContext.js";import{IMAGE_GRAYSCALE_LABEL as m}from"../../../../format/lib/content/image-treatment.js";import{BlackAndWhiteIcon as d,ContrastIcon as s,HeightIcon as a,TypeIcon as c}from"efficient-easel/icons";import{linkField as f,spacingFields as u,text as g,toggle as h}from"../controls.js";import{segmented as x,slider as F}from"../box-fields.js";import{deviceField as y}from"efficient-easel/screen/lib/document/device-fields";import{FieldGlyph as T}from"../../../components/FieldGlyph.js";import{fieldNoun as I}from"../../../../format/lib/document/field-noun.js";import{CTA_PH as A}from"../../../../format/lib/document/blocks/placeholders.js";const E=t=>F("Height",o(a,{}),r.min,r.max,r.step,r.fallback,r.unit,t),D=t=>y(t,E());import{heroHeightFields as J}from"./hero-shared-fields.js";const j={ctaText:g("Button",A.text),ctaHref:f("Button link")},M=()=>x("Tone",o(s,{}),[{label:"Default",value:"default"},{label:"Muted",value:"dim"}],"default"),O=t=>u({...i[t],keys:{top:"padTop",bottom:"padBottom"},group:!1}),K=(t,e)=>({type:"custom",render:()=>o(n,{parentType:t,label:e})}),U=t=>({type:"custom",render:()=>o(p,{parentType:t})});function H(t){const{photographyGrayscale:e}=l();return h(m,e===!0,o(d,{})).render(t)}function W(){return{type:"custom",render:t=>o(H,{...t})}}function Y(t){const e=I(t);return e?o(T,{noun:e}):o(c,{})}export{j as ctaField,D as heightField,J as heroHeightFields,O as innerSpacingFields,W as photographyToggle,U as slotNoticeField,K as slotRowsField,Y as textKindGlyph,M as toneField};
1
+ import{jsx as t}from"react/jsx-runtime";import{SECTION_PAD_INNER_DEFAULTS as i}from"../../../../render/lib/document/passes/section-padding.js";import n,{SlotNoticeField as p}from"../../../components/SlotChildRows.js";import{SECTION_HEIGHT as r}from"../../../../format/lib/content/section-height.js";import{usePreviewHeader as l}from"../../../../render/components/PreviewHeaderContext.js";import{IMAGE_GRAYSCALE_LABEL as m}from"../../../../format/lib/content/image-treatment.js";import{BlackAndWhiteIcon as d,ContrastIcon as s,HeightIcon as a,TypeIcon as c}from"efficient-easel/icons";import{linkField as f,spacingFields as u,text as g,toggle as h}from"../controls.js";import{segmented as x,slider as y}from"../box-fields.js";import{deviceField as F}from"efficient-easel/screen/lib/document/device-fields";import{FieldGlyph as T}from"../../../components/FieldGlyph.js";import{fieldNoun as E}from"../../../../format/lib/document/field-noun.js";import{CTA_PH as I}from"../../../../format/lib/document/blocks/placeholders.js";import{ownEntry as A}from"../../../../format/lib/own-entry.js";const H=o=>y("Height",t(a,{}),r.min,r.max,r.step,r.fallback,r.unit,o),M=o=>F(o,H());import{heroHeightFields as V}from"./hero-shared-fields.js";const O={ctaText:g("Button",I.text),ctaHref:f("Button link")},K=()=>x("Tone",t(s,{}),[{label:"Default",value:"default"},{label:"Muted",value:"dim"}],"default"),U=o=>u({...A(i,o),keys:{top:"padTop",bottom:"padBottom"},group:!1}),W=(o,e)=>({type:"custom",render:()=>t(n,{parentType:o,label:e})}),Y=o=>({type:"custom",render:()=>t(p,{parentType:o})});function _(o){const{photographyGrayscale:e}=l();return h(m,e===!0,t(d,{})).render(o)}function q(){return{type:"custom",render:o=>t(_,{...o})}}function z(o){const e=E(o);return e?t(T,{noun:e}):t(c,{})}export{O as ctaField,M as heightField,V as heroHeightFields,U as innerSpacingFields,q as photographyToggle,Y as slotNoticeField,W as slotRowsField,z as textKindGlyph,K as toneField};
@@ -1 +1 @@
1
- "use client";import{jsx as i,jsxs as k,Fragment as P}from"react/jsx-runtime";import{cloneElement as be,createContext as wn,useContext as Qe,useEffect as Sn,useId as et,useRef as J,useState as Z}from"react";import{useEasel as oe,useSelectedHost as v}from"efficient-easel/easel";import{PIN_LENGTH as re,toDateKey as _n,fromDateKey as Cn}from"efficient-shell/format";import{say as a,editorEaselWords as C}from"../../../format/lib/editor-words.js";import{finiteNumber as $}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as tt,firstFrameHint as yn,loadingShowsOf as xn,loadingStillHint as In}from"../../../format/lib/hero-video.js";import{pageFramesFor as On,usePageVideoFrames as Tn}from"../page-video-frames.js";import{ScreenDocumentContext as En}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as nt,hidableText as ot}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as we,LINK_FIELD_MARKER as rt,MEDIA_FIELD_MARKER as it,SCAFFOLD_FIELD_MARKER as st,TEXT_FIELD_MARKER as R,foldMetaOf as Se,textFieldIdentifier as Rn}from"efficient-easel/draw";import Nn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as lt}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as kn,CARD_IMAGE_RADIUS_ROW as at,CARD_IMAGE_RADIUS_STEP as Pn,CORNER_RADIUS_MAX as _e,CORNER_RADIUS_MIN as A}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as An,IMAGE_CORNERS_LABEL as Ln,IMAGE_CORNERS_ROW as Fn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as vn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Bn,GALLERY_LAYOUTS as ie,GALLERY_LAYOUT_KEYS as Dn,galleryChoices as ct,galleryLayoutRatio as Hn,galleryPictureCells as Gn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Mn}from"./shell-glyph.js";import{anchorSiblingsOf as Wn,placementPoints as Un}from"../../../format/lib/hero-group-placement.js";import Kn from"../../components/AnchorField.js";import $n from"../../components/SourceStatus.js";import{AdjustIcon as Xn,EyeIcon as Vn,AnimationIcon as jn,BackgroundIcon as ut,BorderAllIcon as zn,BlockSectionIcon as Yn,ColumnWidthsIcon as Ce,ColumnsIcon as dt,CornerIcon as pt,DirectionDownIcon as qn,DirectionLeftIcon as Jn,DirectionRightIcon as Zn,DirectionUpIcon as Qn,EditIcon as eo,GapIcon as to,GridIcon as no,GroundIcon as ye,HashIcon as oo,HeightIcon as ft,ImageIcon as ro,ListIcon as io,LocationIcon as ht,PaddingBottomIcon as mt,PaddingLeftIcon as gt,PaddingRightIcon as bt,PaddingTopIcon as xe,PageIcon as so,StickyIcon as wt,SearchIcon as lo,SquareIcon as ao,TypeIcon as co,WidthIcon as uo}from"efficient-easel/icons";import{FieldGlyph as St}from"../../components/FieldGlyph.js";import{resolvePageBackground as po}from"../../../format/lib/content/page-background.js";import{boxFillOf as fo,boxFillSlot as Ie}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as _t,CORNER_SIDE_POINTS as ho,SECTION_CORNERS_ROW as Ct,hasOwnSectionCorners as mo,normalizeCornerSides as yt}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as xt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as go,enclosingSection as bo}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as wo,SettingsField as _,SettingsGroup as So,SettingsSegmented as _o,SettingsBorder as Co,SettingsSidesEach as yo,SettingsSwitch as Oe,borderSides as xo,borderStartEach as Io}from"efficient-easel/panel";import{ListField as Oo}from"efficient-easel/fields";import{DisplayChips as To}from"efficient-shell/ui";import{desktopDisplayChanged as Eo,partShownOnDesktop as Ro,partShownOnPhone as No,phoneDisplayChanged as ko,withDesktopPart as Po,withPhonePart as Ao}from"../../../format/lib/content/part-display.js";import{ColorSwatch as Lo,CornersInput as Fo,DatePicker as vo,DateTimePicker as Bo,FOCAL_DEFAULT as Do,IconPicker as It,COLUMN_COUNT_MAX as Ot,COLUMN_SHARE_MIN as Ho,COLUMN_SHARES_EQUAL as Go,resolveColumnShares as Tt,WidthsBar as Mo,useShellStrings as Wo,IconButton as Et,InputNumber as Rt,Slider as Uo,Tooltip as Te}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as Ko}from"./geocode-resolve.js";import{ColourRow as se,InheritedColourRow as Nt}from"./ColourControl.js";import{fillThemeColors as $o,slotFill as le}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Ee}from"../../../format/lib/document/part-inks.js";import{keptByRow as Re}from"efficient-easel/screen/lib/document/style-fields";import kt from"./MarkupToolbar.js";import{deviceField as T}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Xo,NoControlMark as Vo,noControlField as Pt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as jo}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as zo,PANEL_ONLY_FIELD as Yo}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as qo,resolvePhoneValue as Ne}from"../../../format/lib/document/phone-override.js";import{phoneKey as X,tabletKey as ke,viewKeyAt as Pe}from"efficient-easel/draw";import{viewKey as I}from"../../../format/lib/animation/views.js";import{viewRows as B}from"../animation/view-rows.js";import{SuppressibleText as Jo}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Zo,CARD_OUTLINE_OPTIONS as Qo,DEFAULT_CARD_INDEX_FORMAT as er,DEFAULT_CARD_OUTLINE as tr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as nr,DEFAULT_COVER_INDEX as or}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as rr}from"efficient-easel/draw";import ir from"../../components/MediaUploadField.js";import sr from"../../components/MultiSelectField.js";import lr from"../../components/SectionThemePicker.js";import ar from"../../components/SearchSelectField.js";import cr from"../../components/StorefrontLinkField.js";import{UiIcon as At}from"efficient-easel/draw/client";import{SECTION_PADDING as N}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as ur}from"../../../render/lib/content/button-look.js";import{usePreviewParts as dr}from"efficient-easel/draw/client";import{encodePartId as pr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as fr,useEaselStrings as hr}from"efficient-easel/strings";import{hasPhoneHeight as mr,hasTabletHeight as Ae,resolveSectionMinHeight as gr,resolveTabletHeight as br}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as wr,SECTION_PIN_ABOVE_HINT as Sr,SECTION_PIN_ABOVE_KEY as _r,SECTION_PIN_ABOVE_LABEL as Cr,SECTION_PIN_GROUP as yr,SECTION_PIN_LABEL as Lt,SECTION_PIN_SCREENS_KEY as Le,SECTION_PIN_SCREENS_LABEL as Ft,SECTION_PIN_STOP_DEFAULT as xr,SECTION_PIN_STOP_HINT as Ir,SECTION_PIN_STOP_KEY as Or,SECTION_PIN_STOP_LABEL as Tr,SECTION_PIN_STOP_OPTIONS as Er,SECTION_STICK_DISTANCE as D,SECTION_STICK_DISTANCE_ROW as Fe,SOME_VIEW_PINS as vt,hasPhoneStick as Rr,hasTabletStick as Nr,resolveSectionStick as ae,sectionPinStopOf as kr,sectionPinStopWrite as Pr}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as Ar}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as Lr,SECTION_MIN_HEIGHT as Fr,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as vr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as Br,resolveContainerDirection as Bt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Dr,BOX_BLOCK_SPACING_POINTS as Dt,BOX_PHONE_ROW_LABEL as Ht,BOX_COLUMNS_MAX as Hr,BOX_COLUMNS_MIN as Gt,BOX_PHONE_ROW_MAX as Gr,BOX_PHONE_ROW_MIN as ve,BOX_SHARE_CHOICES as Mt,BOX_SHARE_LABEL as V,boxShareChoiceOf as Wt,boxShareWidthsOf as Be,BOX_SHARE_PHONE_DEFAULT as Mr,BOX_SHARE_PHONE_POINTS as Wr}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as H}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Ut,BORDER_SIDES as Ur,SECTION_BORDER_ROW as Kt,borderBySide as $t}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Kr,normalizeTheme as Xt,normalizeThemeColors as $r,sectionBandTone as Xr,surfaceTwoTone as Vr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Vt,CONTAINER_GAP_BUILT_IN as jr,CONTAINER_GAP_PHONE as De,GAP_FIELD_CONTAINER as He,followsSitePhoneGap as zr,hasOwnContainerGap as Yr,hasOwnPhoneGap as Ge,resolveContainerGap as jt,resolvePhoneContainerGap as zt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as qr,CARD_IMAGE_BG_OFF as Jr,CARD_IMAGE_BG_SWATCH_NAMES as Zr,CARD_IMAGE_BG_SWATCHES as Qr,isCardImageBackgroundInheriting as ei,cardImageBackgroundChoice as ti,THEME_CARD_IMAGE_BG as ni}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as oi,SECTION_BG_NO_FILL as ri,sectionBackgroundChoice as ii,THEME_SECTION_BG as Me,isSectionBackgroundEmpty as si,sectionBackgroundHex as Yt}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as li,nestedAccentValue as qt,resolveSectionAccent as ce}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as ai,TYPE_SIZE_INHERIT as ci,isTypeSizeInheriting as ui}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as di,WIDTH_CHOICE_LABEL as pi,WIDTH_INHERIT as fi}from"../../../format/lib/content/section-width.js";import{useEaselSession as hi}from"efficient-easel/screen/lib/session-context";import{backendOf as mi}from"../website-session.js";import{BOX_GAP as gi,describedAs as L,group as E,iconOf as j,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Jt,onDesktopWords as G,phoneTwinFields as We,saidAlignmentGrid as bi,useLengthUnit as wi}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as Si,directionField as _i,gapField as Ue,iconPickerRow as Ci,lengthUnitFields as ue,pickerCellIcon as yi,pickerNoneIcon as xi,Segmented as Ke,select as z,slider as M}from"./box-fields.js";import{VIEW_ABOVE as $e}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as Zt,viewOfTier as Ii}from"../../../format/lib/content/view-tier.js";function Ra({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function W(e,t){return a("{value} from {from}",{value:e,from:t})}function Oi(){const{blockGap:e}=H();return e===null?a("this container's own spacing"):W(`${e}px`,a("Styles"))}function Ti({inherited:e,onReset:t,label:n}){return i(y,{words:C()?.panel,label:a(n),changed:!e,detail:Oi(),onReset:t})}function Ei(e){return Ue({...gi,builtIn:jr[e],resolve:(t,n)=>jt(e,t,n?.siteGap),action:(t,n)=>i(Ti,{inherited:!Yr(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[He]:e}})}function Ri(e){return lt(T("mobile",{[He]:e,type:"custom",render:t=>i(Pi,{container:e,...t})}),Qt)}function Ni(e){return lt(T("tablet",{[He]:e,type:"custom",render:t=>i(ki,{container:e,...t})}),Qt)}const Qt={not:{field:"gap",in:Array.from({length:-Vt.min},(e,t)=>Vt.min+t)}};function Na(e){return{gap:T("desktop",Ei(e)),[ke("gap")]:Ni(e),[X("gap")]:Ri(e)}}function ki({container:e,...t}){const[n]=F("gap"),{siteGap:o}=t.field??{},r=Math.max(De.min,jt(e,n,o));return Ue({...De,builtIn:r,resolve:l=>Ge(l)?l:r,action:(l,c)=>i(y,{words:C()?.panel,label:a("Gap"),changed:Ge(l),detail:G(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Pi({container:e,...t}){const[n]=F("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=zt(e,void 0,n,o,r);return Ue({...De,builtIn:s,resolve:c=>zt(e,c,n,o,r),action:(c,u)=>i(y,{words:C()?.panel,label:a("Gap"),changed:Ge(c),detail:W(`${s}px`,zr(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function ka(e){return _i({offered:Br(e),fallback:Bt(e,void 0),resolve:t=>Bt(e,t)})}function Pa(e,t){return Un(t?Wn(e,t):[],t)}function Ai({inherited:e,onReset:t,label:n}){return i(y,{words:C()?.panel,label:a(n),changed:!e,detail:W(a("Full"),a("the page")),onReset:t})}function U({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:l=!0,markup:c=!0}){const{text:u,hidden:p}=nt(e),h=J(null),d=J(null),f=x=>t(l?{text:x,hidden:p}:x),m=()=>t({text:u,hidden:!p}),g=l&&p,b=et(),S=r?Di(r)?i("span",{className:"sf-hint-while-typing",children:a(r)}):a(r):void 0,w=p?a("Show {label} on the slide",{label:a(n)}):a("Hide {label} on the slide",{label:a(n)});return i(_,{label:a(n),icon:i(co,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:l?i(Te,{content:w,children:i(Et,{"aria-pressed":p,"aria-label":w,onClick:m,children:p?i(At,{name:"eye-off",size:14}):i(At,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[c&&i(kt,{target:s?d:h,value:u,onChange:f}),s?i("textarea",{id:b,ref:d,value:u,placeholder:o===void 0?void 0:a(o),onChange:x=>f(x.target.value)}):i("input",{id:b,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:a(o),onChange:x=>f(x.target.value)})]})})}function Aa(e,t){return{...e,[st]:t}}function La(e){const t=e[R];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[R]:{...t,offPage:!0}}}function Fa(e){return!e||typeof e!="object"?!1:e[R]?.offPage===!0}function va(e){if(!e[R])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Yo]:!0}}function Ba(e){return zo(e)}function Da(e){const t=e[R];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[R]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as jc,SCALAR_TEXT_CONTROLS as zc}from"efficient-easel/draw";function Ha(e,t){if(!e[R])throw new Error("inOwnBox: the field holds no authored text");const{[Xo]:o,...r}=e;return{...r,[jo]:!0,render:t}}const Li=new Set(rr),de={type:"radio",options:[{value:!0},{value:!1}]},en={text:{type:"object",objectFields:{text:{type:"text"},hidden:de}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:de}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},K=(e,t)=>{const n=L({...t,[R]:e},{...en[e.control],label:e.label});if(!Li.has(e.control))return n;const o=t.render;return{...Pt(n,"authored-copy"),render:r=>i(Jo,{name:r.name,children:o(r)})}},Ga="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Fi={field:"source.slug",set:!0},Ma={not:Fi},vi="Select a word, then press the highlighter.",Bi=new Set([vi]),Di=e=>Bi.has(e);function Wa(e,t,n){return K({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Ua(e,t,n){return K({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Ka(e,t,n){return K({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function $a(e,t,n){return K({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Xa(e){return{type:"custom",[rt]:{label:e},...L({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(cr,{value:ot(t),onChange:n,label:e})}}function Va(e,t,n){return K({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const ja={Design:Xn,Animation:jn};function za(e){return{type:"custom",render:()=>i(Hi,{text:e})}}function Hi({text:e}){return i("p",{className:"sf-note",children:a(e)})}function Ya(e){return Se(e)!==null&&e?.tabs!==void 0}const tn=new Map;function qa(e,t){const n=`${e}\0${t?t.join(""):""}`,o=tn.get(n)??{type:"custom",tabs:t,[we]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(P,{})};return tn.set(n,o),o}const nn=new Map;function Ja(e){const t=nn.get(e)??{type:"custom",[we]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(P,{})};return nn.set(e,t),t}function Gi(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Za(e,t){return Gi(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(P,{})}}function Qa(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(P,{})}}function ec({title:e,children:t}){const[n,o]=Z(()=>!Xe.has(e));return i(So,{title:e,open:n,onToggle:r=>{o(r),r?Xe.delete(e):Xe.add(e)},children:t})}const Xe=new Set;function Mi({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),s=r?o?.[r]:void 0,l=s?a(s):t;return k("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(Te,{content:u,children:i(Lo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:l})]})}function tc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(Wi,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Wi({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:l,n:c}=qe(),u={background:l.background,surface:l.surface,surface2:Vr(l),band:Xr(l)},p=n?Me:t,h=si(s,t,p),d=Yt(void 0,p,u),f=n?oi:void 0,m=p===Me?a("the theme's section background"):a("Theme {n} background",{n:c}),g=Ui(s,t,l,c,u,r),b=W(d.toUpperCase(),m),S=Ee(s),w=S?le(S,l,c):null;return w?i(se,{label:a(e),icon:i(ut,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Nt,{label:a(e),icon:i(ut,{}),value:h?"":Yt(s,t,u),inherited:d,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function Ui(e,t,n,o,r,s){const l=ii(e,t);return[{label:a("No fill"),color:"",selected:l==="none",onPick:()=>s(ri)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:l==="band",onPick:()=>s(Me)},...Ye(Ee(e)??"",n,o,s)]}function Ki(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=ei(r,t);return i(_,{label:a(e),icon:i(ye,{}),changed:!s,action:i(y,{words:C()?.panel,label:a(e),changed:!s,detail:a("the theme's image stage"),onReset:()=>o(qr)}),children:Mi({swatches:Qr,current:s?ni:ti(r,t),onPick:o,names:Zr})})}}}function nc(e=n=>n,t){return ee({_gSectionTheme:E(li),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(lr,{value:e(n),onChange:o,followLabel:t})}})}function pe(e){const t=O(),n=Zt(e?.view),o=l=>Pe(e.valueKey,l),r=e.numbersIn??(l=>$(t[o(l)])!==void 0),s=e.followsView??rs(n,r);return wi({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Si,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:s},convertTo:e.convertTo??(l=>{const c=$(t[o(n)]);return c===void 0?{}:{[o(n)]:l(c)}})})}function Y({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:l=!0,notch:c,ariaLabel:u,disabled:p=!1,placeholder:h,placeholderWord:d,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(Uo,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...d?{emptyLabel:a(d)}:{},suffix:s||void 0,...m?{units:m}:{},showInput:l,label:u===void 0?void 0:a(u),disabled:p,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:b=>{b===null?f?.():b!==o&&r(b)}})})}function $i(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:l,restTrack:c,unsetMark:u,icon:p,unit:h="px"}=t;return{type:"custom",render:({value:d,onChange:f})=>{const m=typeof d=="number"?d:null,g=m===null;return i(_,{label:a(e),icon:p?j(p):void 0,value:g?u||s===void 0?void 0:a(s):`${m}${h}`,changed:!g,action:u?be(u,{changed:!g,onReset:()=>f(null)}):i(y,{words:C()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof l=="string"?a(l):l,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:f}):Y({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}const te="Corners",Xi={kind:"radius"};function Ve(e){return{type:"custom",render:t=>{const{value:n,onChange:o}=t,r=typeof n=="number"&&Number.isFinite(n)?n:null,s=r!==null;return i(_,{label:a(te),icon:i(pt,{}),changed:s,action:be(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:i(Vi,{tier:e,px:r,name:t.name,onRadius:o})})}}}function F(e){const t=v();return[t?.values?.[e],n=>t?.onChange(e,n)]}function on(){return Pt({type:"custom",render:()=>i(Vo,{})},"always")}function fe(){const e=v();return t=>e?.onChangeMany(t)}function Vi({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[s,l]=F(e.sidesKey),c=fe(),u=pe({row:e.row??Xi,label:te,grid:{min:A,max:_e,step:e.step??1},valueKey:n??"",view:"desktop"}),p=yt(s)??[..._t];return i(Fo,{label:a(te),value:p,corners:ho,onChange:h=>{const d=yt(h)??[];l(d.length===_t.length?null:d)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??A,radiusMax:u?.grid.max??_e,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function rn(e,t){return ue(e,t)}function sn(){return on()}function ji({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=H(),r=typeof o=="number"?`${o}px`:a("not set");return i(y,{words:C()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):W(r,a("Styles")),onReset:n})}function zi(){const{cornerRadiusPx:e}=H();return typeof e=="number"?e:A}function Yi(){return Ve({sidesKey:"sectionCornerSides",row:Ct,useFollowed:zi,mark:i(ji,{label:te}),hint:qi})}const qi="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function oc(){return ee({_gShape:E("Shape"),sectionCorners:Yi(),...rn(Ct,"sectionCorners"),sectionCornerSides:sn(),...B("sectionBorder",os),...ue(Kt,"sectionBorder",{tablet:!0,phone:!0})})}const Ji=()=>({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 Zi(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Qi(){let e;try{const t=Xt(H().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Kr.line}function es({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:l={},length:c}){const u=e&&typeof e=="object"?e:{},[p,h]=Z(()=>r?Io(u,l):!1),d=Ji(),f=m=>Zi(r&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(zn,{}),action:r?i(yo,{each:p,label:a("Each side"),onChange:h}):void 0,children:i(Co,{label:a("Border"),value:u,each:p,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...d,unit:c.unit}:d,styles:s,max:c?.grid.max??Ut,...c?{step:c.grid.step,units:c.units}:{}})})}function ts({value:e,onChange:t,view:n}){const[o]=F("sectionBorder"),[r]=F(ke("sectionBorder")),s=Qi(),l=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...$t(l(o)),...$t(l(r))}:n==="tablet"?l(o):{},u=O(),p=fe(),h=I("sectionBorder",n),d=pe({row:Kt,label:"Border",grid:{min:0,max:Ut,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>je(u[Pe("sectionBorder",f)]),convertTo:f=>{const m=l(u[h]);return je(m)?{[h]:ns(m,f)}:{}}});return i(es,{value:e,length:d,onChange:d?f=>p({[h]:f,...d.unitPatch(!je(f))}):t,placeholder:{sides:xo(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}const ln=["width",...Ur];function je(e){if(!e||typeof e!="object")return!1;const t=e;return ln.some(n=>$(t[n])!==void 0)}function ns(e,t){const n={...e};for(const o of ln){const r=$(n[o]);r!==void 0&&(n[o]=t(r))}return n}function os(e){return{type:"custom",render:({value:t,onChange:n})=>i(ts,{value:t,onChange:n,view:e})}}function rs(e,t){let n=$e[e];for(;n&&$e[n]!==null&&!t(n);)n=$e[n];return n??e}function rc(e){return{type:"custom",render:()=>i(is,{partKey:e})}}function is({partKey:e}){const[t]=F("id"),[n]=F("_partStyles"),{textStyles:o}=H(),r=hr();let s=null;try{s=dr().select}catch{s=null}const l=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(wo,{name:a("Text"),preview:ur(l,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??fr.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(pr(t,e))}})}function an(e){const{cornerRadiusPx:t}=H(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:l}=oe(u=>u),c=l?.props?.id?String(l.props.id):void 0;o=c?bo(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return mo(r)?r:n}function ss({label:e,changed:t=!1,onReset:n=()=>{}}){const o=an(A);return i(y,{words:C()?.panel,label:a(e),changed:t,detail:W(`${o}px`,a("the section")),onReset:n})}function ls(){return i(P,{children:a("Follows the section's Corners until you set a number here.")})}function as(){return Ve({sidesKey:"cardCornerSides",row:xt,useFollowed:()=>an(A),mark:i(ss,{label:te}),hint:i(ls,{})})}function cs(){return{type:"custom",render:()=>i(Nn,{})}}function ic(){return{_gShape:E("Shape"),cardCorners:as(),...rn(xt,"cardCorners"),cardCornerSides:sn(),cardCornersApplyAll:cs()}}function us(){return L({type:"custom",render:e=>i(ps,{...e})},{type:"select",label:V,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 ds(e,t){const n=Wt(e);if(n!=="custom")return a(Mt.find(r=>r.value===n)?.label??"");const o=Tt(Be(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):a("Custom")}function ps(e){const{value:t,onChange:n}=e,[o]=F("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,l=t!=null,c=l?t:s?e.follows:void 0,u=Wt(c),p=r>=2&&r<=Ot,h=()=>[...Go[r]??[]],d=J(null),f=w=>{const x=d.current;x&&JSON.stringify(w)===JSON.stringify(x.shares)?n(x.value):w&&n(w)},m=w=>{w===u||w==="custom"&&!p||n(w==="custom"?h():w)},g=a("The width bar works for 2 to {count} blocks.",{count:Ot}),b=l&&(s||t!=="content"),S=Wo().widths.hint(r,Ho);return i(_,{label:a(V),icon:i(Ce,{}),changed:b,hint:u!=="custom"?void 0:p?S:g,action:i(y,{words:C()?.panel,label:a(V),changed:b,disabled:e.readOnly===!0,detail:s?G(w=>a(w),ds(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(It,{label:a(V),value:u,options:Mt.map(w=>({value:w.value,label:w.value==="custom"&&!p?g:a(w.label),icon:yi(i("span",{className:"sf-gallery-pic sf-share-pic",children:cn(w.weights).map((x,q)=>i("i",{style:{gridColumn:`span ${x}`}},q))}),a(w.label),w.value==="custom"&&!p?g:a(w.label))})),onChange:m,columns:3,cell:un,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&p?i("div",{onFocus:()=>{d.current={value:t,shares:Tt(Be(c,r),r)}},onBlur:()=>{d.current=null},children:i(Mo,{label:a(V),count:r,value:Be(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function cn(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 sc(){return z(Dr,i(to,{}),Dt,Dt[0].value)}function lc(){return T("mobile",Ci(V,i(Ce,{}),Wr.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:cn(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),Mr,{columns:2,cell:un}))}const un={width:"5.75rem",height:"3.25rem"};function ac(){return We("share",us(),Jt)[ke("share")]}function fs(){return T("mobile",M(Ht,i(dt,{}),ve,Gr,1,ve,"",{clear:{phoneFollows:!1,hint:ve}}))}const dn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function cc(){const e=M(Ht,i(dt,{}),Gt,Hr,1,Gt,"",{clear:{emptyLabel:"Auto"}}),t=We("columns",e,{...dn,tablet:Jt.tablet}),n=We("columns",e,dn,{phoneRow:fs()});return{...t,phoneRow:n.phoneRow}}function uc(e,t,n,o,r,s,l){return{type:"custom",render:({value:c,onChange:u,name:p})=>i(hs,{label:e,min:t,max:n,step:o,fallback:r,role:s,value:c,onChange:u,name:p??"",length:l})}}function hs({label:e,min:t,max:n,step:o,fallback:r,role:s,value:l,onChange:c,name:u,length:p}){const h=O(),d=fe(),f=Zt(p?.view),m=pe({row:p?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:p?u:"",view:p?.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?d({[u]:b,...m.unitPatch(typeof b!="number")}):c(b);return i(_,{label:a(e),icon:i(St,{noun:s}),action:i(y,{words:C()?.panel,label:a(e),changed:!ui(l),detail:a("the Text style in Styles"),onReset:()=>g(ci),defaultAction:{onPress:()=>g(ai),title:a("Keep this section's own built-in size"),icon:i(Yn,{})}}),children:Y({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof l=="number"?l:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function dc(){return{_gCellWidth:E("Cell width"),gridSpan:z("Positions",i(Ce,{}),[{label:"Auto",value:""},...Array.from({length:vn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function O(){let e=null,t=null;try{e=Qe(ms),t=oe(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const ms=wn(null);function gs({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:l,fallback:c}){const u=O()[l],p=Ne(void 0,u,c);return i(P,{children:Y({min:e,max:t,step:n,value:Ne(o,u,c),readout:!1,ariaLabel:r,notch:p,onChange:s})})}function bs({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const l=O()[t],c=Ne(void 0,l,n);return i(y,{words:C()?.panel,label:a(e),changed:r,detail:G(u=>a(u),`${c}${o}`),onReset:s})}function ws(e){return $i(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(bs,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(gs,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Ss={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},_s={Top:xe,Bottom:mt,Left:gt,Right:bt},Cs=e=>{const t=_s[e];return i(t,{})};function pc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>Ss[S],s=S=>M(r("Top"),i(xe,{}),N.min,N.max,N.step,S,"px"),l=(S,w,x,q=N)=>T("mobile",ws({label:r(S),icon:Cs(S),desktopKey:w,min:q.min,max:q.max,step:q.step,fallback:x})),c=e.top??N.min,u=e.bottom??N.min,p="sectionPaddingLeft",h="sectionPaddingRight",d=e.sideBounds??N,f=e.side??d.min,m=e.sidePhone??f,g=e.phone===!0,b=S=>g?T("desktop",S):S;return ee({...o?{_gSpacing:E("Padding")}:{},[t]:b(s(c)),...g?{[X(t)]:l("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(M(r("Bottom"),i(mt,{}),N.min,N.max,N.step,u,"px")),...g?{[X(n)]:l("Bottom",n,u)}:{}},...e.sides?{[p]:b(M(r("Left"),i(gt,{}),d.min,d.max,d.step,f,"px")),...g?{[X(p)]:l("Left",p,m,d)}:{},[h]:b(M(r("Right"),i(bt,{}),d.min,d.max,d.step,f,"px")),...g?{[X(h)]:l("Right",h,m,d)}:{}}:{}})}function fc(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,s in e&&Se(l)?e[s]:l])),o={};let r=!1;for(const[s,l]of Object.entries(e)){if(s in t){r||Object.assign(o,n),r=!0;continue}o[s]=l}return r||Object.assign(o,n),o}const he="Width";function hc(e,t=di,n=!0){const o=t.map(r=>({label:pi[r],value:r}));return ee({...n?{_gWidth:E(he)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(_,{label:a(he),icon:i(uo,{}),action:n?i(Ai,{inherited:s?.inherited??!1,onReset:()=>r(fi),label:he}):void 0,children:Ke({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:he})})}})}function mc({fill:e=!1}={}){const t=(r,s)=>({type:"custom",render:({value:l,onChange:c})=>i(ys,{value:l,onChange:c,view:r,badge:s,fill:e})}),n=()=>Re("sectionHeightMode"),o=()=>Re("sectionHeightMode");return ee({_gHeight:E(Q),...B("sectionHeightMode",r=>r==="desktop"?t(r):t(r,s=>i(Ts,{view:r,onClear:()=>s(void 0)}))),...B("sectionHeightValue",n),...B("sectionHeightUnit",o)})}function ys({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const s=O(),{mode:l,number:c,unit:u}=xs(n,s,e);return i(_,{label:Q,icon:j(i(ft,{})),action:o?o(t):void 0,children:k("div",{className:"es-width-stack",children:[Ke({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...r?[{label:"Fill",value:"fill"}]:[]],value:l,onChange:t,ariaLabel:Q}),c?i(Os,{view:n,mode:l,menu:u}):null]})})}function pn(e,t){return e==="phone"&&Ae(t)?br(t):gr(t)}function me(e,t){return e==="desktop"||(e==="tablet"?Ae(t):mr(t))?null:pn(e,t)}function xs(e,t,n){const r=(s=>Lr.includes(s))(n)?n:me(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function Is(e,t,n,o){const r=me(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 fn(e,t,n){const o=v(),r=me(e,O());return!o||!r?{followed:null,write:n}:{followed:r,write:l=>o.onChangeMany(c=>{const u=Is(e,c,t,l);return u===null?{[I(t,e)]:l}:Object.keys(u).length?u:null})}}function Os({view:e,mode:t,menu:n}){const o=v(),r=O(),s=I("sectionHeightValue",e),l=I("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:p}=fn(e,"sectionHeightValue",c(s)),{write:h}=fn(e,"sectionHeightUnit",c(l)),d=t==="screen"?"%":r[l],f=(u?u.unit:d)==="%"?"%":"px",m=f==="%"?vr:Fr,g=r[s],b=n?{options:["px","%"],label:a("Unit"),onChange:S=>h(S)}:void 0;return Y({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:p})}function Ts({view:e,onClear:t}){const n=O(),o=me(e,n)===null,r=e==="phone"&&Ae(n),s=pn(e,n),l=G(c=>a(c),s.mode==="auto"?a("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(y,{words:C()?.panel,label:a(Q),changed:o,detail:l,onReset:t})}function gc(e={}){const t=e.intro===!0,n=s=>({type:"custom",render:({value:l,onChange:c,id:u,name:p})=>i(Ls,{value:l,onChange:c,labelId:`${u??p??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:l,onChange:c})=>i(ks,{value:l,onChange:c,view:s,intro:t})}),r=s=>({type:"custom",render:({value:l,onChange:c})=>i(Ps,{value:l,onChange:c,view:s,intro:t})});return{_gStick:E(yr,{dot:t?Ns:vt}),...B("stickTop",n),...B("stickTopDistance",o),...ue(Fe,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?B(Le,r):{},...t?{}:{[Or]:Es()},...t||e.above===!1?{}:{[_r]:Rs()}}}function Es(){const e=z(Tr,i(xe,{}),Er,xr);return T("desktop",{...e,render:t=>{const n=e.render({...t,value:kr(t.value),onChange:o=>t.onChange(Pr(o))});return be(n,{hint:a(Ir)})}})}function Rs(){const e=gn(Cr,!1,i(wt,{}),Sr);return T("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const Ns={any:[vt,wr]};function hn(e,t,n,o,r){const s=v(),l=O(),c=e==="desktop"||ne(e,l)?null:ze(e,ae(l,{intro:o}));return{followed:c,write:(c||r)&&s?p=>s.onChangeMany(h=>{const d=As(e,h,p,t,o),f=d===null?{[I(t,e)]:p}:d;return Object.keys(f).length?{...f,...r?.(p)??{}}:null}):n}}function ks({value:e,onChange:t,view:n,intro:o}){const r=O(),s=ae(r,{intro:o}),l=h=>{const d=Ii(h);return d==="desktop"||ne(d,r)},c=pe({row:Fe,label:"Distance from top",grid:{min:D.min,max:D.max,step:D.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>l(h)&&$(r[Pe("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:u,write:p}=hn(n,"stickTopDistance",t,o,c?h=>c.unitPatch(h===void 0):void 0);return i("div",{className:"sf-field",children:Y({min:c?.grid.min??D.min,max:c?.grid.max??D.max,step:c?.grid.step??D.step,value:u?null:typeof e=="number"?e:D.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:p})})}function Ps({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:s}=hn(n,Le,t,o);return i(_,{label:a(Ft),icon:j(i(ft,{})),children:Y({min:re.min,max:re.max,step:re.step,value:r?null:$(e)??re.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Ft),onChange:s})})}function ne(e,t){return e==="tablet"?Nr(t):Rr(t)}function ze(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function As(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const s=ze(e,ae(t,{intro:r})),l=e==="phone"&&ne("tablet",t)?h=>I(h,"tablet"):h=>h,c=(h,d)=>t[l(h)]==null?{}:{[I(h,e)]:d},u=Fe.unitKey,p=t[l(u)]==null?{}:{[I(u,e)]:s.unit};return{[I("stickTop",e)]:!0,...c("stickTopDistance",s.distance),...p,...c(Le,s.screens),[I(o,e)]:n}}function Ls({value:e,onChange:t,labelId:n,view:o,intro:r}){const s=O(),l=ae(s,{intro:r}),c=o==="phone"?l.phone:o==="tablet"?l.tablet:r?l.desktop:e===!0,u=o==="phone"&&l.ownTablet,p=o==="desktop"?null:ze(o,l),h=p?.on?Ar(p.distance,p.unit):a("Off");return i(_,{label:a(Lt),labelId:n,icon:j(i(wt,{})),action:k(P,{children:[o!=="desktop"?i(y,{words:C()?.panel,label:a(Lt),changed:ne(o,s),detail:G(d=>a(d),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Oe,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const mn="e.g. about";function bc(){return{_gAnchor:E("Anchor"),anchor:K({control:"plainText",label:"Name",placeholder:mn},{type:"custom",render:({value:e,onChange:t})=>i(Kn,{value:e,onChange:t,nameBox:(n,o)=>i(U,{value:n,onChange:o,label:"Name",placeholder:mn,hideable:!1,markup:!1})})})}}function wc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(Bo,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:p=>r(p?p.toISOString():"")})})}}}function Sc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-date`;return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(vo,{id:c,value:Cn(typeof o=="string"?o:null),onChange:u=>r(u?_n(u):"")})})}}}function gn(e,t,n,o){return{type:"custom",...L({},{...de,label:e}),render:r=>{const{value:s,onChange:l,id:c,name:u}=r,p="follows"in r,h=r,d=typeof s=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=d?s:p?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(Oe,{checked:m,onChange:l,disabled:b,ariaLabelledBy:g});return i(_,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:p?k(P,{children:[i(y,{words:C()?.panel,label:a(e),changed:d,detail:h.followsNoView?a(f?"On":"Off"):G(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>l(void 0)}),S]}):S})}}}function _c(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(Fs,{label:"Background",icon:i(so,{}),id:r,value:e,shown:po(e),onChange:t})}}}function Cc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(se,{label:a(e),icon:n,value:o||t,onChange:r})}}function Fs({label:e,icon:t,id:n,value:o,shown:r,onChange:s}){const{colors:l,n:c}=qe(),u=Ee(o),p=u?le(u,l,c):null;return i(se,{label:a(e),icon:t,id:n,value:p?p.hex:r,caption:p?.words,onChange:s,choices:Ye(u??"",l,c,s)})}function yc(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(vs,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Ye(e,t,n,o){const r=Ie(e);return $o(t,n).map(s=>({label:s.label,color:s.value,selected:r===s.name,onPick:()=>o(s.name)}))}function vs({value:e,onChange:t,twin:n}){const{colors:o,n:r}=qe(),s=o.background,l=W(s.toUpperCase(),a("Theme {n} background",{n:r})),c=Ie(e),u=c?le(c,o,r):null,p=Ye(e,o,r,t),h=n?()=>t(void 0):()=>t("");let d=s,f=l;if(n){const m=Ie(n.follows),g=fo(n.follows),b=m?le(m,o,r):g?{hex:g,words:g.toUpperCase()}:null;d=b?.hex??s,f=G(S=>a(S),b?b.words:l,n.view)}return u?i(se,{label:a("Fill"),icon:i(ye,{}),value:u.hex,caption:u.words,onChange:t,changed:!0,onReset:h,resetTo:f,choices:p}):i(Nt,{label:a("Fill"),icon:i(ye,{}),value:e,inherited:d,resetTo:f,onChange:t,onReset:h,choices:p})}function Bs(e,t,n){if((e?.content??[]).some(l=>l?.props?.id===t))return ce(n);const r=go(e,t);if(r.length===0)return null;const s=ce(qt(n));if(s!==null)return s;for(let l=r.length-1;l>0;l-=1){const c=ce(qt(r[l].sectionAccent));if(c!==null)return c}return ce(r[0].sectionAccent)}function qe(){const e=Xt(H().theme),[t]=F("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=oe(c=>c),l=s?.props?.id?String(s.props.id):void 0;n=l?Bs(r?.data,l,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:$r(e.themes[o]),n:o+1}}function xc(){return on()}const Ic={top:i(Qn,{}),right:i(Zn,{}),bottom:i(qn,{}),left:i(Jn,{})};function Oc(e,t,n,o,r,s,l){const c=d=>t.find(f=>f.value===d),u=d=>({value:d,label:"",disabled:!0,title:o}),p=d=>{const f=t.find(g=>g.cell===d);if(!f)return u(`missing-${d}`);const m=s?.[d];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},h=[u("corner-top-left"),p("top"),u("corner-top-right"),p("left"),u("centre"),p("right"),u("corner-bottom-left"),p("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:d,onChange:f})=>{const m=t.some(g=>g.value===d)?d:n;return i(_,{label:a(e),icon:r,value:c(m)?.label?a(c(m).label):l?a(l):"",children:bi(a,{label:e,value:m,onChange:f,points:h})})}}}function Tc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(sr,{label:e,options:(s.options??t).map(l=>({...l,label:a(l.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function Ec(e,t,n,o){return{type:"custom",options:t,fallback:n,...L({},{type:"select",label:e}),render:({value:r,onChange:s,field:l})=>i(ar,{label:e,options:(l.options??t).map(c=>({...c,label:a(c.label)})),fallback:l.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:a(o)})}}function Rc(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Nc=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function kc(e,t,n){const o=Object.keys(tt).map(r=>({label:tt[r],value:r,picture:n[r]}));return{type:"custom",...L({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Hs,{label:e,icon:t,options:o,onChange:r})}}function Ds(e,t,n){const o=yn(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=In(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 Hs({label:e,icon:t,options:n,onChange:o}){const r=v(),s=r?.values??{},l=xn(s),c=Qe(En),u=Tn(c?.docId??null);let p=null;try{p=oe(d=>d.appState.data)}catch{p=null}const h=On(r?.id,p,u);return i(_,{label:a(e),icon:j(t),hint:Ds(s,h,c?.hasUnsavedEdits??!1),children:Ke({options:n,value:l,onChange:o,ariaLabel:e})})}function Pc(e,t,n,o={}){const r={type:"custom",[it]:!0,render:({value:s,onChange:l,name:c})=>i(ir,{value:s||"",onChange:l,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?T("each",r):r}const Ac={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Gs(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 Lc({value:e,onChange:t,label:n}){const o=e||{},r=v(),s=r?r.values!==r.node.props:!0,l=!!o.pending&&s,c=!!o.pending&&!s,u=!!mi(hi()).geocode,p=et(),h=(d,f)=>t({...o,[d]:f??void 0});return k(P,{children:[i(_,{label:a(n),icon:i(ht,{}),action:u?i(Te,{content:a("Find from the address (OpenStreetMap)"),children:i(Et,{"aria-label":a("Find from the address"),"aria-busy":l||void 0,disabled:l,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(lo,{})})}):void 0,children:u&&o.status?i($n,{compact:!0,oneLine:!0,spaced:!1,status:l?"busy":o.ok&&!c?"found":"notfound",statusText:l?a("Finding…"):c?a(Ko):a(o.status),hint:Gs(o)}):null}),i(_,{label:a("Enter by hand"),labelId:p,icon:i(eo,{}),action:i(Oe,{checked:!!o.manual,onChange:d=>t({...o,manual:d}),ariaLabelledBy:p})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(ht,{}),children:k("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(Rt,{value:typeof o.lat=="number"?o.lat:null,onChange:d=>h("lat",d),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(Rt,{value:typeof o.lng=="number"?o.lng:null,onChange:d=>h("lng",d),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function Ms(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Ws(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,s)=>s===t?{text:n}:r)}function Fc(e,t){return e===null?null:t>e?e:null}function Us(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 vc={label:"Ticker items",icon:i(io,{})};function Bc(e,t,n,o){return{type:"custom",[R]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...L({},{...en.textList,label:e}),render:({value:r,onChange:s})=>i(Ks,{label:e,icon:j(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function Ks({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const l=J(null),[c,u]=Z(null),p=d=>d.map(f=>({text:f?.text??""})),h=d=>{const f=Us(n,d,c);f===null&&(l.current=null),u(f),r(p(d))};return i(Oo,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(kt,{target:l,value:Ms(n,c),onChange:d=>r(Ws(n,c??-1,d)),disabled:c===null,label:c===null?a("Formatting — click a row first"):a("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(d,f,m)=>i("input",{type:"text",className:s&&c===f?"sf-list-marking":void 0,value:d?.text??"",placeholder:a(o),"aria-label":a("{label} {n}",{label:a(e),n:f+1}),onChange:g=>m({text:g.target.value}),onFocus:g=>{l.current=g.currentTarget,u(f)}})})}function Dc(e,t){const n=`${e.label} — row ${t+1}`;return K({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(U,{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 Hc(e){return{_gCards:E("Cards"),coverIndex:z("Cover image",i(ro,{}),nr,String(or),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Ki("Image background",Jr),cardImage:bn()}}function Gc(){return{outline:z("Card outline",i(ao,{}),Qo,tr),indexBadge:z("Card number",i(oo,{}),Zo,er),showBadge:gn("Product badge",!0,i(St,{noun:"tag"}))}}function Mc(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...de,label:ge.find(s=>s.id===r).label}),o=r=>L(Re(Je),n(r));return{_gShowOnCard:E("Show on a card"),[Je]:L({type:"custom",render:()=>i($s,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(Je)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const Je="showCardPrice",ge=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function $s({rest:e}){const t=O(),n=fe(),o=l=>typeof t[l]=="boolean"?t[l]:void 0,r=l=>o(l)??e[l],s=ge.some(({id:l})=>o(l)!==void 0&&o(l)!==e[l]);return i(Ze,{parts:ge,changed:s,shown:r,onPress:(l,c)=>n({[l]:c}),onReset:()=>n(Object.fromEntries(ge.map(({id:l})=>[l,void 0])))})}function Wc(e,t="display"){const n=X(t);return{[t]:T("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Ze,{parts:e,changed:Eo(o),shown:s=>Ro(o,s),onPress:(s,l)=>r(Po(o,s,l)),onReset:()=>r(void 0)})}),[n]:T("mobile",{type:"custom",render:({value:o,onChange:r})=>i(Xs,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ze({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:l}){const c=a("Display");return i(_,{label:c,icon:i(Vn,{}),changed:t,action:i(y,{words:C()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(To,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...l?{disabled:!0,disabledReason:a(l)}:{}})),onChange:o})})}function Xs({parts:e,desktopKey:t,value:n,onChange:o}){const r=O()[t];return i(Ze,{parts:e,changed:ko(n),shown:s=>No(r,n,s),onPress:(s,l)=>o(Ao(n,s,l)),onReset:()=>o(qo),detail:a("the same as Desktop")})}function bn(e=kn){return M("Card image",i(pt,{}),A,_e,Pn,A,e,{clear:{hint:A},hint:"Rounds the picture. The card's own corner is in Styles."})}function Vs(){return ue(at,"cardImage")}function Uc(){return{cardImage:bn(at),...Vs()}}function Kc(){return Ve({sidesKey:"cornerSides",row:Fn,step:An,useFollowed:()=>A,mark:i(js,{label:Ln}),hint:a("Rounds the picture. Left alone it stays square.")})}function js({label:e,changed:t=!1,onReset:n=()=>{}}){return i(y,{words:C()?.panel,label:a(e),changed:t,onReset:n})}function $c(){return{type:"custom",render:({value:e,onChange:t})=>i(Js,{value:typeof e=="string"?e:"",onChange:t})}}function zs({layout:e,width:t}){const n=Hn(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:Gn(e).map(([r,s],l)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${s}`,aspectRatio:o}},l))})}const Ys={width:"3.5rem",height:"2.5rem"},qs=200;function Js({value:e,onChange:t}){const[n,o]=Z(null),[r,s]=Z(4),l=J(null);Sn(()=>{const f=l.current;if(!f||typeof ResizeObserver!="function")return;const m=()=>s(f.getBoundingClientRect().width>=qs?4:3);m();const g=new ResizeObserver(m);return g.observe(f),()=>g.disconnect()},[]);const c=e&&e in ie?e:"",u=ct(n,c),p=ct(n,"").length,h=Mn("no-symbol"),d=[{value:"",label:a("Not chosen"),icon:xi(h,a("Not chosen"))},...u.map(f=>({value:f,label:a(ie[f].label),icon:i(zs,{layout:ie[f],width:40})}))];return i(_,{label:a("Layout"),icon:i(no,{}),value:c?a(ie[c].label):void 0,children:i("div",{ref:l,style:{flex:"1 1 auto",minWidth:0},children:i(It,{label:a("Layout"),value:c,options:d,onChange:t,columns:r,cell:Ys,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(_o,{options:[{id:"all",label:a("All")},...Bn.map(f=>({id:String(f),label:String(f)}))],value:n===null?"all":String(n),ariaLabel:a("Photos in a row"),onChange:f=>o(f==="all"?null:Number(f))}),i("span",{className:"text-2xs text-ink-faint",children:a("{n} of {total} layouts",{n:p,total:Dn.length})})]})})})})}export{Fi as BOUND_TO_POST,Ga as BOUND_TO_POST_NOTE,ja as BUCKET_ICONS,Ac as CUSTOM_FIELD_MEDIA,Lc as CoordsField,Qt as DESKTOP_GAP_NOT_OVERLAP,Ze as DisplayRow,Ic as EDGE_ARROWS,Do as FOCAL_DEFAULT,we as FOLD_FIELD_MARKER,vi as HIGHLIGHT_HINT,U as HidableTextField,rt as LINK_FIELD_MARKER,Ra as Label,it as MEDIA_FIELD_MARKER,Nc as MEDIA_TYPE_OPTIONS,Ma as NOT_BOUND_TO_POST,ec as PanelBand,Hi as PanelNoteLine,ms as RowPropsContext,st as SCAFFOLD_FIELD_MARKER,zc as SCALAR_TEXT_CONTROLS,Ti as SiteGapDefaultReset,Y as Slider,Mi as Swatches,jc as TEXT_CONTROL_KINDS,R as TEXT_FIELD_MARKER,vc as TICKER_ITEMS_ROW,Ks as TextListField,Fs as ThemeFillRow,he as WIDTH_LABEL,Ai as WidthDefaultReset,Us as aimAfterListChange,bc as anchorFields,W as backTo,tc as backgroundField,sc as boxBlockSpacingField,cc as boxColumnsFields,yc as boxFillField,fs as boxPhoneRowField,us as boxShareField,lc as boxSharePhoneField,ac as boxShareTabletField,Bs as boxThemeIndexOf,qa as bucketHeader,rc as buttonWordsEntryField,as as cardCornersField,Ki as cardImageBackgroundField,bn as cardImageField,Uc as cardImageFields,Hc as cardMediaFields,ic as cardShapeFields,Mc as cardShowFields,Gc as cardStyleFields,dc as cellWidthFields,Cc as colorInput,ka as containerDirectionField,Ei as containerGapField,Ri as containerGapPhoneField,Na as containerGapRows,Ni as containerGapTabletField,Gs as coordsResultTip,$a as copyText,sn as cornerSidesField,Ve as cornersRowField,rn as cornersUnitFields,Sc as date,wc as dateTime,Ja as designGroupHeader,Wc as displayFields,Oc as edgePad,Ye as fillSlotChoices,Fc as focusAfterRemove,xc as focusKeptField,Za as foldMarker,Se as foldMetaOf,Gi as foldTitleOf,Is as followedHeightPatch,As as followedStickPatch,$c as galleryLayoutField,mc as heightFields,me as heightFollowedBy,xs as heightLayersAt,Pa as heroGroupPlacementPoints,ot as hidableText,Di as hintIsWhileTyping,Kc as imageCornersField,Ha as inOwnBox,Ya as isBucketHeader,on as keptBy,Xa as linkField,Ds as loadingRowHint,kc as loadingShowsField,Tc as multiSelect,_c as pageBackgroundField,za as panelNote,ws as phoneOverrideField,Ka as plainText,Va as plainTextarea,$i as pxField,Qa as quietMarker,nt as readHidable,Ms as rowText,Ec as searchSelect,Ui as sectionBandChoices,Yi as sectionCornersField,oc as sectionShapeFields,nc as sectionThemeFields,Ws as setRowText,uc as sizeField,Rc as sourceField,pc as spacingFields,gc as stickFields,fc as swapPadding,Wa as text,Rn as textFieldIdentifier,Fa as textFieldOffPage,Ba as textFieldPanelOnly,Bc as textList,Dc as textListRowField,Ua as textarea,gn as toggle,Pc as upload,pe as useLengthRow,fe as useSelectedPatch,O as useSelectedProps,F as useSelectedSibling,Oi as useSiteGapDetail,hc as widthField,Da as withIdentifier,La as withOffPage,va as withPanelOnly,Aa as withScaffold};
1
+ "use client";import{jsx as i,jsxs as k,Fragment as P}from"react/jsx-runtime";import{cloneElement as ge,createContext as wn,useContext as Qe,useEffect as Sn,useId as et,useRef as J,useState as Z}from"react";import{useEasel as oe,useSelectedHost as v}from"efficient-easel/easel";import{PIN_LENGTH as re,toDateKey as _n,fromDateKey as Cn}from"efficient-shell/format";import{say as a,editorEaselWords as C}from"../../../format/lib/editor-words.js";import{finiteNumber as $}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as tt,firstFrameHint as yn,loadingShowsOf as xn,loadingStillHint as In}from"../../../format/lib/hero-video.js";import{pageFramesFor as On,usePageVideoFrames as Tn}from"../page-video-frames.js";import{ScreenDocumentContext as En}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as nt,hidableText as ot}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as be,LINK_FIELD_MARKER as rt,MEDIA_FIELD_MARKER as it,SCAFFOLD_FIELD_MARKER as st,TEXT_FIELD_MARKER as R,foldMetaOf as we,textFieldIdentifier as Rn}from"efficient-easel/draw";import Nn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as lt}from"../../../render/lib/document/show-when.js";import{CARD_IMAGE_PX_ROW as kn,CARD_IMAGE_RADIUS_ROW as at,CARD_IMAGE_RADIUS_STEP as Pn,CORNER_RADIUS_MAX as Se,CORNER_RADIUS_MIN as A}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as An,IMAGE_CORNERS_LABEL as Ln,IMAGE_CORNERS_ROW as Fn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as vn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Bn,GALLERY_LAYOUTS as _e,GALLERY_LAYOUT_KEYS as Dn,galleryChoices as ct,galleryLayoutRatio as Hn,galleryPictureCells as Gn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Mn}from"./shell-glyph.js";import{anchorSiblingsOf as Wn,placementPoints as Un}from"../../../format/lib/hero-group-placement.js";import Kn from"../../components/AnchorField.js";import $n from"../../components/SourceStatus.js";import{AdjustIcon as Xn,EyeIcon as Vn,AnimationIcon as jn,BackgroundIcon as ut,BorderAllIcon as zn,BlockSectionIcon as Yn,ColumnWidthsIcon as Ce,ColumnsIcon as dt,CornerIcon as pt,DirectionDownIcon as qn,DirectionLeftIcon as Jn,DirectionRightIcon as Zn,DirectionUpIcon as Qn,EditIcon as eo,GapIcon as to,GridIcon as no,GroundIcon as ye,HashIcon as oo,HeightIcon as ft,ImageIcon as ro,ListIcon as io,LocationIcon as ht,PaddingBottomIcon as mt,PaddingLeftIcon as gt,PaddingRightIcon as bt,PaddingTopIcon as xe,PageIcon as so,StickyIcon as wt,SearchIcon as lo,SquareIcon as ao,TypeIcon as co,WidthIcon as uo}from"efficient-easel/icons";import{FieldGlyph as St}from"../../components/FieldGlyph.js";import{resolvePageBackground as po}from"../../../format/lib/content/page-background.js";import{boxFillOf as fo,boxFillSlot as Ie}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as _t,CORNER_SIDE_POINTS as ho,SECTION_CORNERS_ROW as Ct,hasOwnSectionCorners as mo,normalizeCornerSides as yt}from"../../../format/lib/content/section-corners.js";import{CARD_CORNERS_ROW as xt}from"../../../format/lib/content/card-corners.js";import{enclosingPath as go,enclosingSection as bo}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as wo,SettingsField as _,SettingsGroup as So,SettingsSegmented as _o,SettingsBorder as Co,SettingsSidesEach as yo,SettingsSwitch as Oe,borderSides as xo,borderStartEach as Io}from"efficient-easel/panel";import{ListField as Oo}from"efficient-easel/fields";import{DisplayChips as To}from"efficient-shell/ui";import{desktopDisplayChanged as Eo,partShownOnDesktop as Ro,partShownOnPhone as No,phoneDisplayChanged as ko,withDesktopPart as Po,withPhonePart as Ao}from"../../../format/lib/content/part-display.js";import{ColorSwatch as Lo,CornersInput as Fo,DatePicker as vo,DateTimePicker as Bo,FOCAL_DEFAULT as Do,IconPicker as It,COLUMN_COUNT_MAX as Ot,COLUMN_SHARE_MIN as Ho,COLUMN_SHARES_EQUAL as Go,resolveColumnShares as Tt,WidthsBar as Mo,useShellStrings as Wo,IconButton as Et,InputNumber as Rt,Slider as Uo,Tooltip as Te}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as Ko}from"./geocode-resolve.js";import{ColourRow as ie,InheritedColourRow as Nt}from"./ColourControl.js";import{fillThemeColors as $o,slotFill as se}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Ee}from"../../../format/lib/document/part-inks.js";import{keptByRow as Re}from"efficient-easel/screen/lib/document/style-fields";import kt from"./MarkupToolbar.js";import{deviceField as T}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Xo,NoControlMark as Vo,noControlField as Pt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as jo}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as zo,PANEL_ONLY_FIELD as Yo}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as qo,resolvePhoneValue as Ne}from"../../../format/lib/document/phone-override.js";import{phoneKey as X,tabletKey as ke,viewKeyAt as Pe}from"efficient-easel/draw";import{viewKey as I}from"../../../format/lib/animation/views.js";import{viewRows as B}from"../animation/view-rows.js";import{SuppressibleText as Jo}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Zo,CARD_OUTLINE_OPTIONS as Qo,DEFAULT_CARD_INDEX_FORMAT as er,DEFAULT_CARD_OUTLINE as tr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as nr,DEFAULT_COVER_INDEX as or}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as rr}from"efficient-easel/draw";import ir from"../../components/MediaUploadField.js";import sr from"../../components/MultiSelectField.js";import lr from"../../components/SectionThemePicker.js";import ar from"../../components/SearchSelectField.js";import cr from"../../components/StorefrontLinkField.js";import{UiIcon as At}from"efficient-easel/draw/client";import{SECTION_PADDING as N}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as ur}from"../../../render/lib/content/button-look.js";import{usePreviewParts as dr}from"efficient-easel/draw/client";import{encodePartId as pr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as fr,useEaselStrings as hr}from"efficient-easel/strings";import{hasPhoneHeight as mr,hasTabletHeight as Ae,resolveSectionMinHeight as gr,resolveTabletHeight as br}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as wr,SECTION_PIN_ABOVE_HINT as Sr,SECTION_PIN_ABOVE_KEY as _r,SECTION_PIN_ABOVE_LABEL as Cr,SECTION_PIN_GROUP as yr,SECTION_PIN_LABEL as Lt,SECTION_PIN_SCREENS_KEY as Le,SECTION_PIN_SCREENS_LABEL as Ft,SECTION_PIN_STOP_DEFAULT as xr,SECTION_PIN_STOP_HINT as Ir,SECTION_PIN_STOP_KEY as Or,SECTION_PIN_STOP_LABEL as Tr,SECTION_PIN_STOP_OPTIONS as Er,SECTION_STICK_DISTANCE as D,SECTION_STICK_DISTANCE_ROW as Fe,SOME_VIEW_PINS as vt,hasPhoneStick as Rr,hasTabletStick as Nr,resolveSectionStick as le,sectionPinStopOf as kr,sectionPinStopWrite as Pr}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as Ar}from"../../../format/lib/content/css-length.js";import{SECTION_HEIGHT_MODES as Lr,SECTION_MIN_HEIGHT as Fr,SECTION_MIN_HEIGHT_GROUP_LABEL as Q,SECTION_SCREEN_PCT as vr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as Br,resolveContainerDirection as Bt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as Dr,BOX_BLOCK_SPACING_POINTS as Dt,BOX_PHONE_ROW_LABEL as Ht,BOX_COLUMNS_MAX as Hr,BOX_COLUMNS_MIN as Gt,BOX_PHONE_ROW_MAX as Gr,BOX_PHONE_ROW_MIN as ve,BOX_SHARE_CHOICES as Mt,BOX_SHARE_LABEL as V,boxShareChoiceOf as Wt,boxShareWidthsOf as Be,BOX_SHARE_PHONE_DEFAULT as Mr,BOX_SHARE_PHONE_POINTS as Wr}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as H}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Ut,BORDER_SIDES as Ur,SECTION_BORDER_ROW as Kt,borderBySide as $t}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Kr,normalizeTheme as Xt,normalizeThemeColors as $r,sectionBandTone as Xr,surfaceTwoTone as Vr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Vt,CONTAINER_GAP_BUILT_IN as jr,CONTAINER_GAP_PHONE as De,GAP_FIELD_CONTAINER as He,followsSitePhoneGap as zr,hasOwnContainerGap as Yr,hasOwnPhoneGap as Ge,resolveContainerGap as jt,resolvePhoneContainerGap as zt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as qr,CARD_IMAGE_BG_OFF as Jr,CARD_IMAGE_BG_SWATCH_NAMES as Zr,CARD_IMAGE_BG_SWATCHES as Qr,isCardImageBackgroundInheriting as ei,cardImageBackgroundChoice as ti,THEME_CARD_IMAGE_BG as ni}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as oi,SECTION_BG_NO_FILL as ri,sectionBackgroundChoice as ii,THEME_SECTION_BG as Me,isSectionBackgroundEmpty as si,sectionBackgroundHex as Yt}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as li,nestedAccentValue as qt,resolveSectionAccent as ae}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as ai,TYPE_SIZE_INHERIT as ci,isTypeSizeInheriting as ui}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as di,WIDTH_CHOICE_LABEL as pi,WIDTH_INHERIT as fi}from"../../../format/lib/content/section-width.js";import{useEaselSession as hi}from"efficient-easel/screen/lib/session-context";import{backendOf as mi}from"../website-session.js";import{BOX_GAP as gi,describedAs as L,group as E,iconOf as j,sharedStyleKinds as ee}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Jt,onDesktopWords as G,phoneTwinFields as We,saidAlignmentGrid as bi,useLengthUnit as wi}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as Si,directionField as _i,gapField as Ue,iconPickerRow as Ci,lengthUnitFields as ce,pickerCellIcon as yi,pickerNoneIcon as xi,Segmented as Ke,select as z,slider as M}from"./box-fields.js";import{VIEW_ABOVE as $e}from"efficient-easel/screen/lib/content/length-units";import{tierOfView as Zt,viewOfTier as Ii}from"../../../format/lib/content/view-tier.js";import{ownEntry as Oi}from"../../../format/lib/own-entry.js";function ka({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?a(e):e})}function W(e,t){return a("{value} from {from}",{value:e,from:t})}function Ti(){const{blockGap:e}=H();return e===null?a("this container's own spacing"):W(`${e}px`,a("Styles"))}function Ei({inherited:e,onReset:t,label:n}){return i(y,{words:C()?.panel,label:a(n),changed:!e,detail:Ti(),onReset:t})}function Ri(e){return Ue({...gi,builtIn:jr[e],resolve:(t,n)=>jt(e,t,n?.siteGap),action:(t,n)=>i(Ei,{inherited:!Yr(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[He]:e}})}function Ni(e){return lt(T("mobile",{[He]:e,type:"custom",render:t=>i(Ai,{container:e,...t})}),Qt)}function ki(e){return lt(T("tablet",{[He]:e,type:"custom",render:t=>i(Pi,{container:e,...t})}),Qt)}const Qt={not:{field:"gap",in:Array.from({length:-Vt.min},(e,t)=>Vt.min+t)}};function Pa(e){return{gap:T("desktop",Ri(e)),[ke("gap")]:ki(e),[X("gap")]:Ni(e)}}function Pi({container:e,...t}){const[n]=F("gap"),{siteGap:o}=t.field??{},r=Math.max(De.min,jt(e,n,o));return Ue({...De,builtIn:r,resolve:l=>Ge(l)?l:r,action:(l,c)=>i(y,{words:C()?.panel,label:a("Gap"),changed:Ge(l),detail:G(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Ai({container:e,...t}){const[n]=F("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=zt(e,void 0,n,o,r);return Ue({...De,builtIn:s,resolve:c=>zt(e,c,n,o,r),action:(c,u)=>i(y,{words:C()?.panel,label:a("Gap"),changed:Ge(c),detail:W(`${s}px`,zr(e,n,r)?a("Styles"):a("Desktop")),onReset:()=>u(void 0)})}).render(t)}function Aa(e){return _i({offered:Br(e),fallback:Bt(e,void 0),resolve:t=>Bt(e,t)})}function La(e,t){return Un(t?Wn(e,t):[],t)}function Li({inherited:e,onReset:t,label:n}){return i(y,{words:C()?.panel,label:a(n),changed:!e,detail:W(a("Full"),a("the page")),onReset:t})}function U({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:l=!0,markup:c=!0}){const{text:u,hidden:p}=nt(e),h=J(null),d=J(null),f=x=>t(l?{text:x,hidden:p}:x),m=()=>t({text:u,hidden:!p}),g=l&&p,b=et(),S=r?Hi(r)?i("span",{className:"sf-hint-while-typing",children:a(r)}):a(r):void 0,w=p?a("Show {label} on the slide",{label:a(n)}):a("Hide {label} on the slide",{label:a(n)});return i(_,{label:a(n),icon:i(co,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:l?i(Te,{content:w,children:i(Et,{"aria-pressed":p,"aria-label":w,onClick:m,children:p?i(At,{name:"eye-off",size:14}):i(At,{name:"eye",size:14})})}):void 0,children:k("div",{className:"sf-copybox",children:[c&&i(kt,{target:s?d:h,value:u,onChange:f}),s?i("textarea",{id:b,ref:d,value:u,placeholder:o===void 0?void 0:a(o),onChange:x=>f(x.target.value)}):i("input",{id:b,ref:h,type:"text",value:u,placeholder:o===void 0?void 0:a(o),onChange:x=>f(x.target.value)})]})})}function Fa(e,t){return{...e,[st]:t}}function va(e){const t=e[R];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[R]:{...t,offPage:!0}}}function Ba(e){return!e||typeof e!="object"?!1:e[R]?.offPage===!0}function Da(e){if(!e[R])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Yo]:!0}}function Ha(e){return zo(e)}function Ga(e){const t=e[R];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[R]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as Yc,SCALAR_TEXT_CONTROLS as qc}from"efficient-easel/draw";function Ma(e,t){if(!e[R])throw new Error("inOwnBox: the field holds no authored text");const{[Xo]:o,...r}=e;return{...r,[jo]:!0,render:t}}const Fi=new Set(rr),ue={type:"radio",options:[{value:!0},{value:!1}]},en={text:{type:"object",objectFields:{text:{type:"text"},hidden:ue}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:ue}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},K=(e,t)=>{const n=L({...t,[R]:e},{...en[e.control],label:e.label});if(!Fi.has(e.control))return n;const o=t.render;return{...Pt(n,"authored-copy"),render:r=>i(Jo,{name:r.name,children:o(r)})}},Wa="Everything else on this block comes from the linked post. Unlink it to edit by hand.",vi={field:"source.slug",set:!0},Ua={not:vi},Bi="Select a word, then press the highlighter.",Di=new Set([Bi]),Hi=e=>Di.has(e);function Ka(e,t,n){return K({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function $a(e,t,n){return K({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function Xa(e,t,n){return K({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function Va(e,t,n){return K({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function ja(e){return{type:"custom",[rt]:{label:e},...L({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(cr,{value:ot(t),onChange:n,label:e})}}function za(e,t,n){return K({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(U,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const Ya={Design:Xn,Animation:jn};function qa(e){return{type:"custom",render:()=>i(Gi,{text:e})}}function Gi({text:e}){return i("p",{className:"sf-note",children:a(e)})}function Ja(e){return we(e)!==null&&e?.tabs!==void 0}const tn=new Map;function Za(e,t){const n=`${e}\0${t?t.join(""):""}`,o=tn.get(n)??{type:"custom",tabs:t,[be]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(P,{})};return tn.set(n,o),o}const nn=new Map;function Qa(e){const t=nn.get(e)??{type:"custom",[be]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(P,{})};return nn.set(e,t),t}function Mi(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function ec(e,t){return Mi(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(P,{})}}function tc(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(P,{})}}function nc({title:e,children:t}){const[n,o]=Z(()=>!Xe.has(e));return i(So,{title:e,open:n,onToggle:r=>{o(r),r?Xe.delete(e):Xe.add(e)},children:t})}const Xe=new Set;function Wi({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),s=r?o?.[r]:void 0,l=s?a(s):t;return k("div",{className:"sf-swatches",children:[e.map(c=>{const u=o?.[c]?a(o[c]):c;return i(Te,{content:u,children:i(Lo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:l})]})}function oc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(Ui,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Ui({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:l,n:c}=qe(),u={background:l.background,surface:l.surface,surface2:Vr(l),band:Xr(l)},p=n?Me:t,h=si(s,t,p),d=Yt(void 0,p,u),f=n?oi:void 0,m=p===Me?a("the theme's section background"):a("Theme {n} background",{n:c}),g=Ki(s,t,l,c,u,r),b=W(d.toUpperCase(),m),S=Ee(s),w=S?se(S,l,c):null;return w?i(ie,{label:a(e),icon:i(ut,{}),value:w.hex,caption:w.words,onChange:r,changed:!0,onReset:()=>r(f),resetTo:b,choices:g}):i(Nt,{label:a(e),icon:i(ut,{}),value:h?"":Yt(s,t,u),inherited:d,resetTo:b,onChange:r,onReset:()=>r(f),choices:g})}function Ki(e,t,n,o,r,s){const l=ii(e,t);return[{label:a("No fill"),color:"",selected:l==="none",onPick:()=>s(ri)},{label:`${a("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:l==="band",onPick:()=>s(Me)},...Ye(Ee(e)??"",n,o,s)]}function $i(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=ei(r,t);return i(_,{label:a(e),icon:i(ye,{}),changed:!s,action:i(y,{words:C()?.panel,label:a(e),changed:!s,detail:a("the theme's image stage"),onReset:()=>o(qr)}),children:Wi({swatches:Qr,current:s?ni:ti(r,t),onPick:o,names:Zr})})}}}function rc(e=n=>n,t){return ee({_gSectionTheme:E(li),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(lr,{value:e(n),onChange:o,followLabel:t})}})}function de(e){const t=O(),n=Zt(e?.view),o=l=>Pe(e.valueKey,l),r=e.numbersIn??(l=>$(t[o(l)])!==void 0),s=e.followsView??is(n,r);return wi({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Si,label:a(e.label),grid:e.grid,hasOwn:r(n),view:{tier:n,numbersIn:r,followsView:s},convertTo:e.convertTo??(l=>{const c=$(t[o(n)]);return c===void 0?{}:{[o(n)]:l(c)}})})}function Y({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:l=!0,notch:c,ariaLabel:u,disabled:p=!1,placeholder:h,placeholderWord:d,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(Uo,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...d?{emptyLabel:a(d)}:{},suffix:s||void 0,...m?{units:m}:{},showInput:l,label:u===void 0?void 0:a(u),disabled:p,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:b=>{b===null?f?.():b!==o&&r(b)}})})}function Xi(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:l,restTrack:c,unsetMark:u,icon:p,unit:h="px"}=t;return{type:"custom",render:({value:d,onChange:f})=>{const m=typeof d=="number"?d:null,g=m===null;return i(_,{label:a(e),icon:p?j(p):void 0,value:g?u||s===void 0?void 0:a(s):`${m}${h}`,changed:!g,action:u?ge(u,{changed:!g,onReset:()=>f(null)}):i(y,{words:C()?.panel,label:a(e),changed:!g,onReset:()=>f(null)}),hint:typeof l=="string"?a(l):l,children:c?c({min:n,max:o,step:r,px:m,label:e,onChange:f}):Y({min:n,max:o,step:r,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}const te="Corners",Vi={kind:"radius"};function Ve(e){return{type:"custom",render:t=>{const{value:n,onChange:o}=t,r=typeof n=="number"&&Number.isFinite(n)?n:null,s=r!==null;return i(_,{label:a(te),icon:i(pt,{}),changed:s,action:ge(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:i(ji,{tier:e,px:r,name:t.name,onRadius:o})})}}}function F(e){const t=v();return[t?.values?.[e],n=>t?.onChange(e,n)]}function on(){return Pt({type:"custom",render:()=>i(Vo,{})},"always")}function pe(){const e=v();return t=>e?.onChangeMany(t)}function ji({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[s,l]=F(e.sidesKey),c=pe(),u=de({row:e.row??Vi,label:te,grid:{min:A,max:Se,step:e.step??1},valueKey:n??"",view:"desktop"}),p=yt(s)??[..._t];return i(Fo,{label:a(te),value:p,corners:ho,onChange:h=>{const d=yt(h)??[];l(d.length===_t.length?null:d)},radius:t,onRadiusChange:u&&n?h=>c({[n]:h,...u.unitPatch(h===null)}):o,radiusMin:u?.grid.min??A,radiusMax:u?.grid.max??Se,radiusStep:u?.grid.step??e.step??1,radiusPlaceholder:u&&u.unit!=="px"?"–":String(r),...u?{radiusUnit:u.unit,units:u.units}:{}})}function rn(e,t){return ce(e,t)}function sn(){return on()}function zi({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=H(),r=typeof o=="number"?`${o}px`:a("not set");return i(y,{words:C()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):W(r,a("Styles")),onReset:n})}function Yi(){const{cornerRadiusPx:e}=H();return typeof e=="number"?e:A}function qi(){return Ve({sidesKey:"sectionCornerSides",row:Ct,useFollowed:Yi,mark:i(zi,{label:te}),hint:Ji})}const Ji="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function ic(){return ee({_gShape:E("Shape"),sectionCorners:qi(),...rn(Ct,"sectionCorners"),sectionCornerSides:sn(),...B("sectionBorder",rs),...ce(Kt,"sectionBorder",{tablet:!0,phone:!0})})}const Zi=()=>({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 Qi(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function es(){let e;try{const t=Xt(H().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Kr.line}function ts({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:l={},length:c}){const u=e&&typeof e=="object"?e:{},[p,h]=Z(()=>r?Io(u,l):!1),d=Zi(),f=m=>Qi(r&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return i(_,{label:a("Border"),icon:i(zn,{}),action:r?i(yo,{each:p,label:a("Each side"),onChange:h}):void 0,children:i(Co,{label:a("Border"),value:u,each:p,onChange:m=>t(f(m)),placeholder:n,presets:o,words:c?{...d,unit:c.unit}:d,styles:s,max:c?.grid.max??Ut,...c?{step:c.grid.step,units:c.units}:{}})})}function ns({value:e,onChange:t,view:n}){const[o]=F("sectionBorder"),[r]=F(ke("sectionBorder")),s=es(),l=f=>f&&typeof f=="object"?f:{},c=n==="phone"?{...$t(l(o)),...$t(l(r))}:n==="tablet"?l(o):{},u=O(),p=pe(),h=I("sectionBorder",n),d=de({row:Kt,label:"Border",grid:{min:0,max:Ut,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>je(u[Pe("sectionBorder",f)]),convertTo:f=>{const m=l(u[h]);return je(m)?{[h]:os(m,f)}:{}}});return i(ts,{value:e,length:d,onChange:d?f=>p({[h]:f,...d.unitPatch(!je(f))}):t,placeholder:{sides:xo(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}const ln=["width",...Ur];function je(e){if(!e||typeof e!="object")return!1;const t=e;return ln.some(n=>$(t[n])!==void 0)}function os(e,t){const n={...e};for(const o of ln){const r=$(n[o]);r!==void 0&&(n[o]=t(r))}return n}function rs(e){return{type:"custom",render:({value:t,onChange:n})=>i(ns,{value:t,onChange:n,view:e})}}function is(e,t){let n=$e[e];for(;n&&$e[n]!==null&&!t(n);)n=$e[n];return n??e}function sc(e){return{type:"custom",render:()=>i(ss,{partKey:e})}}function ss({partKey:e}){const[t]=F("id"),[n]=F("_partStyles"),{textStyles:o}=H(),r=hr();let s=null;try{s=dr().select}catch{s=null}const l=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(wo,{name:a("Text"),preview:ur(l,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??fr.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(pr(t,e))}})}function an(e){const{cornerRadiusPx:t}=H(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:l}=oe(u=>u),c=l?.props?.id?String(l.props.id):void 0;o=c?bo(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return mo(r)?r:n}function ls({label:e,changed:t=!1,onReset:n=()=>{}}){const o=an(A);return i(y,{words:C()?.panel,label:a(e),changed:t,detail:W(`${o}px`,a("the section")),onReset:n})}function as(){return i(P,{children:a("Follows the section's Corners until you set a number here.")})}function cs(){return Ve({sidesKey:"cardCornerSides",row:xt,useFollowed:()=>an(A),mark:i(ls,{label:te}),hint:i(as,{})})}function us(){return{type:"custom",render:()=>i(Nn,{})}}function lc(){return{_gShape:E("Shape"),cardCorners:cs(),...rn(xt,"cardCorners"),cardCornerSides:sn(),cardCornersApplyAll:us()}}function ds(){return L({type:"custom",render:e=>i(fs,{...e})},{type:"select",label:V,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 ps(e,t){const n=Wt(e);if(n!=="custom")return a(Mt.find(r=>r.value===n)?.label??"");const o=Tt(Be(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):a("Custom")}function fs(e){const{value:t,onChange:n}=e,[o]=F("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,l=t!=null,c=l?t:s?e.follows:void 0,u=Wt(c),p=r>=2&&r<=Ot,h=()=>[...Go[r]??[]],d=J(null),f=w=>{const x=d.current;x&&JSON.stringify(w)===JSON.stringify(x.shares)?n(x.value):w&&n(w)},m=w=>{w===u||w==="custom"&&!p||n(w==="custom"?h():w)},g=a("The width bar works for 2 to {count} blocks.",{count:Ot}),b=l&&(s||t!=="content"),S=Wo().widths.hint(r,Ho);return i(_,{label:a(V),icon:i(Ce,{}),changed:b,hint:u!=="custom"?void 0:p?S:g,action:i(y,{words:C()?.panel,label:a(V),changed:b,disabled:e.readOnly===!0,detail:s?G(w=>a(w),ps(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(It,{label:a(V),value:u,options:Mt.map(w=>({value:w.value,label:w.value==="custom"&&!p?g:a(w.label),icon:yi(i("span",{className:"sf-gallery-pic sf-share-pic",children:cn(w.weights).map((x,q)=>i("i",{style:{gridColumn:`span ${x}`}},q))}),a(w.label),w.value==="custom"&&!p?g:a(w.label))})),onChange:m,columns:3,cell:un,tooltips:!1,disabled:e.readOnly===!0})}),u==="custom"&&p?i("div",{onFocus:()=>{d.current={value:t,shares:Tt(Be(c,r),r)}},onBlur:()=>{d.current=null},children:i(Mo,{label:a(V),count:r,value:Be(c,r),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function cn(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 ac(){return z(Dr,i(to,{}),Dt,Dt[0].value)}function cc(){return T("mobile",Ci(V,i(Ce,{}),Wr.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:cn(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),Mr,{columns:2,cell:un}))}const un={width:"5.75rem",height:"3.25rem"};function uc(){return We("share",ds(),Jt)[ke("share")]}function hs(){return T("mobile",M(Ht,i(dt,{}),ve,Gr,1,ve,"",{clear:{phoneFollows:!1,hint:ve}}))}const dn={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function dc(){const e=M(Ht,i(dt,{}),Gt,Hr,1,Gt,"",{clear:{emptyLabel:"Auto"}}),t=We("columns",e,{...dn,tablet:Jt.tablet}),n=We("columns",e,dn,{phoneRow:hs()});return{...t,phoneRow:n.phoneRow}}function pc(e,t,n,o,r,s,l){return{type:"custom",render:({value:c,onChange:u,name:p})=>i(ms,{label:e,min:t,max:n,step:o,fallback:r,role:s,value:c,onChange:u,name:p??"",length:l})}}function ms({label:e,min:t,max:n,step:o,fallback:r,role:s,value:l,onChange:c,name:u,length:p}){const h=O(),d=pe(),f=Zt(p?.view),m=de({row:p?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:p?u:"",view:p?.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?d({[u]:b,...m.unitPatch(typeof b!="number")}):c(b);return i(_,{label:a(e),icon:i(St,{noun:s}),action:i(y,{words:C()?.panel,label:a(e),changed:!ui(l),detail:a("the Text style in Styles"),onReset:()=>g(ci),defaultAction:{onPress:()=>g(ai),title:a("Keep this section's own built-in size"),icon:i(Yn,{})}}),children:Y({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof l=="number"?l:r,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:g})})}function fc(){return{_gCellWidth:E("Cell width"),gridSpan:z("Positions",i(Ce,{}),[{label:"Auto",value:""},...Array.from({length:vn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function O(){let e=null,t=null;try{e=Qe(gs),t=oe(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const gs=wn(null);function bs({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:l,fallback:c}){const u=O()[l],p=Ne(void 0,u,c);return i(P,{children:Y({min:e,max:t,step:n,value:Ne(o,u,c),readout:!1,ariaLabel:r,notch:p,onChange:s})})}function ws({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const l=O()[t],c=Ne(void 0,l,n);return i(y,{words:C()?.panel,label:a(e),changed:r,detail:G(u=>a(u),`${c}${o}`),onReset:s})}function Ss(e){return Xi(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(ws,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(bs,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const _s={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Cs={Top:xe,Bottom:mt,Left:gt,Right:bt},ys=e=>{const t=Cs[e];return i(t,{})};function hc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>_s[S],s=S=>M(r("Top"),i(xe,{}),N.min,N.max,N.step,S,"px"),l=(S,w,x,q=N)=>T("mobile",Ss({label:r(S),icon:ys(S),desktopKey:w,min:q.min,max:q.max,step:q.step,fallback:x})),c=e.top??N.min,u=e.bottom??N.min,p="sectionPaddingLeft",h="sectionPaddingRight",d=e.sideBounds??N,f=e.side??d.min,m=e.sidePhone??f,g=e.phone===!0,b=S=>g?T("desktop",S):S;return ee({...o?{_gSpacing:E("Padding")}:{},[t]:b(s(c)),...g?{[X(t)]:l("Top",t,c)}:{},...e.only==="top"?{}:{[n]:b(M(r("Bottom"),i(mt,{}),N.min,N.max,N.step,u,"px")),...g?{[X(n)]:l("Bottom",n,u)}:{}},...e.sides?{[p]:b(M(r("Left"),i(gt,{}),d.min,d.max,d.step,f,"px")),...g?{[X(p)]:l("Left",p,m,d)}:{},[h]:b(M(r("Right"),i(bt,{}),d.min,d.max,d.step,f,"px")),...g?{[X(h)]:l("Right",h,m,d)}:{}}:{}})}function mc(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,l])=>[s,s in e&&we(l)?e[s]:l])),o={};let r=!1;for(const[s,l]of Object.entries(e)){if(s in t){r||Object.assign(o,n),r=!0;continue}o[s]=l}return r||Object.assign(o,n),o}const fe="Width";function gc(e,t=di,n=!0){const o=t.map(r=>({label:pi[r],value:r}));return ee({...n?{_gWidth:E(fe)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(_,{label:a(fe),icon:i(uo,{}),action:n?i(Li,{inherited:s?.inherited??!1,onReset:()=>r(fi),label:fe}):void 0,children:Ke({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:fe})})}})}function bc({fill:e=!1}={}){const t=(r,s)=>({type:"custom",render:({value:l,onChange:c})=>i(xs,{value:l,onChange:c,view:r,badge:s,fill:e})}),n=()=>Re("sectionHeightMode"),o=()=>Re("sectionHeightMode");return ee({_gHeight:E(Q),...B("sectionHeightMode",r=>r==="desktop"?t(r):t(r,s=>i(Es,{view:r,onClear:()=>s(void 0)}))),...B("sectionHeightValue",n),...B("sectionHeightUnit",o)})}function xs({value:e,onChange:t,view:n,badge:o,fill:r=!1}){const s=O(),{mode:l,number:c,unit:u}=Is(n,s,e);return i(_,{label:Q,icon:j(i(ft,{})),action:o?o(t):void 0,children:k("div",{className:"es-width-stack",children:[Ke({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...r?[{label:"Fill",value:"fill"}]:[]],value:l,onChange:t,ariaLabel:Q}),c?i(Ts,{view:n,mode:l,menu:u}):null]})})}function pn(e,t){return e==="phone"&&Ae(t)?br(t):gr(t)}function he(e,t){return e==="desktop"||(e==="tablet"?Ae(t):mr(t))?null:pn(e,t)}function Is(e,t,n){const r=(s=>Lr.includes(s))(n)?n:he(e,t)?.mode??"auto";return{mode:r,number:r!=="auto"&&r!=="fill",unit:r==="fixed"}}function Os(e,t,n,o){const r=he(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 fn(e,t,n){const o=v(),r=he(e,O());return!o||!r?{followed:null,write:n}:{followed:r,write:l=>o.onChangeMany(c=>{const u=Os(e,c,t,l);return u===null?{[I(t,e)]:l}:Object.keys(u).length?u:null})}}function Ts({view:e,mode:t,menu:n}){const o=v(),r=O(),s=I("sectionHeightValue",e),l=I("sectionHeightUnit",e),c=S=>w=>o?.onChangeMany(()=>({[S]:w})),{followed:u,write:p}=fn(e,"sectionHeightValue",c(s)),{write:h}=fn(e,"sectionHeightUnit",c(l)),d=t==="screen"?"%":r[l],f=(u?u.unit:d)==="%"?"%":"px",m=f==="%"?vr:Fr,g=r[s],b=n?{options:["px","%"],label:a("Unit"),onChange:S=>h(S)}:void 0;return Y({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:p})}function Es({view:e,onClear:t}){const n=O(),o=he(e,n)===null,r=e==="phone"&&Ae(n),s=pn(e,n),l=G(c=>a(c),s.mode==="auto"?a("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(y,{words:C()?.panel,label:a(Q),changed:o,detail:l,onReset:t})}function wc(e={}){const t=e.intro===!0,n=s=>({type:"custom",render:({value:l,onChange:c,id:u,name:p})=>i(Fs,{value:l,onChange:c,labelId:`${u??p??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:l,onChange:c})=>i(Ps,{value:l,onChange:c,view:s,intro:t})}),r=s=>({type:"custom",render:({value:l,onChange:c})=>i(As,{value:l,onChange:c,view:s,intro:t})});return{_gStick:E(yr,{dot:t?ks:vt}),...B("stickTop",n),...B("stickTopDistance",o),...ce(Fe,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?B(Le,r):{},...t?{}:{[Or]:Rs()},...t||e.above===!1?{}:{[_r]:Ns()}}}function Rs(){const e=z(Tr,i(xe,{}),Er,xr);return T("desktop",{...e,render:t=>{const n=e.render({...t,value:kr(t.value),onChange:o=>t.onChange(Pr(o))});return ge(n,{hint:a(Ir)})}})}function Ns(){const e=gn(Cr,!1,i(wt,{}),Sr);return T("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const ks={any:[vt,wr]};function hn(e,t,n,o,r){const s=v(),l=O(),c=e==="desktop"||ne(e,l)?null:ze(e,le(l,{intro:o}));return{followed:c,write:(c||r)&&s?p=>s.onChangeMany(h=>{const d=Ls(e,h,p,t,o),f=d===null?{[I(t,e)]:p}:d;return Object.keys(f).length?{...f,...r?.(p)??{}}:null}):n}}function Ps({value:e,onChange:t,view:n,intro:o}){const r=O(),s=le(r,{intro:o}),l=h=>{const d=Ii(h);return d==="desktop"||ne(d,r)},c=de({row:Fe,label:"Distance from top",grid:{min:D.min,max:D.max,step:D.step},valueKey:"stickTopDistance",view:n,numbersIn:h=>l(h)&&$(r[Pe("stickTopDistance",h)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:u,write:p}=hn(n,"stickTopDistance",t,o,c?h=>c.unitPatch(h===void 0):void 0);return i("div",{className:"sf-field",children:Y({min:c?.grid.min??D.min,max:c?.grid.max??D.max,step:c?.grid.step??D.step,value:u?null:typeof e=="number"?e:D.fallback,...u?{placeholder:u.distance}:{},...c?{suffix:c.unit,units:c.units}:{suffix:"px"},ariaLabel:a("Distance from top"),onChange:p})})}function As({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:s}=hn(n,Le,t,o);return i(_,{label:a(Ft),icon:j(i(ft,{})),children:Y({min:re.min,max:re.max,step:re.step,value:r?null:$(e)??re.default,...r?{placeholder:r.screens}:{},ariaLabel:a(Ft),onChange:s})})}function ne(e,t){return e==="tablet"?Nr(t):Rr(t)}function ze(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function Ls(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||ne(e,t))return null;if(n===void 0)return{};const s=ze(e,le(t,{intro:r})),l=e==="phone"&&ne("tablet",t)?h=>I(h,"tablet"):h=>h,c=(h,d)=>t[l(h)]==null?{}:{[I(h,e)]:d},u=Fe.unitKey,p=t[l(u)]==null?{}:{[I(u,e)]:s.unit};return{[I("stickTop",e)]:!0,...c("stickTopDistance",s.distance),...p,...c(Le,s.screens),[I(o,e)]:n}}function Fs({value:e,onChange:t,labelId:n,view:o,intro:r}){const s=O(),l=le(s,{intro:r}),c=o==="phone"?l.phone:o==="tablet"?l.tablet:r?l.desktop:e===!0,u=o==="phone"&&l.ownTablet,p=o==="desktop"?null:ze(o,l),h=p?.on?Ar(p.distance,p.unit):a("Off");return i(_,{label:a(Lt),labelId:n,icon:j(i(wt,{})),action:k(P,{children:[o!=="desktop"?i(y,{words:C()?.panel,label:a(Lt),changed:ne(o,s),detail:G(d=>a(d),h,u?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(Oe,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const mn="e.g. about";function Sc(){return{_gAnchor:E("Anchor"),anchor:K({control:"plainText",label:"Name",placeholder:mn},{type:"custom",render:({value:e,onChange:t})=>i(Kn,{value:e,onChange:t,nameBox:(n,o)=>i(U,{value:n,onChange:o,label:"Name",placeholder:mn,hideable:!1,markup:!1})})})}}function _c(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-datetime`,u=Date.parse(typeof o=="string"?o:"");return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(Bo,{id:c,value:Number.isFinite(u)?new Date(u):null,onChange:p=>r(p?p.toISOString():"")})})}}}function Cc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:l})=>{const c=`${s??l??e}-date`;return i(_,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(vo,{id:c,value:Cn(typeof o=="string"?o:null),onChange:u=>r(u?_n(u):"")})})}}}function gn(e,t,n,o){return{type:"custom",...L({},{...ue,label:e}),render:r=>{const{value:s,onChange:l,id:c,name:u}=r,p="follows"in r,h=r,d=typeof s=="boolean",f=typeof h.follows=="boolean"?h.follows:t,m=d?s:p?f:t,g=`${c??u??e}-label`,b=h.readOnly===!0,S=i(Oe,{checked:m,onChange:l,disabled:b,ariaLabelledBy:g});return i(_,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:p?k(P,{children:[i(y,{words:C()?.panel,label:a(e),changed:d,detail:h.followsNoView?a(f?"On":"Off"):G(w=>a(w),a(f?"On":"Off"),h.followsView),disabled:b,onReset:()=>l(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(vs,{label:"Background",icon:i(so,{}),id:r,value:e,shown:po(e),onChange:t})}}}function xc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(ie,{label:a(e),icon:n,value:o||t,onChange:r})}}function vs({label:e,icon:t,id:n,value:o,shown:r,onChange:s}){const{colors:l,n:c}=qe(),u=Ee(o),p=u?se(u,l,c):null;return i(ie,{label:a(e),icon:t,id:n,value:p?p.hex:r,caption:p?.words,onChange:s,choices:Ye(u??"",l,c,s)})}function Ic(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(Bs,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Ye(e,t,n,o){const r=Ie(e);return $o(t,n).map(s=>({label:s.label,color:s.value,selected:r===s.name,onPick:()=>o(s.name)}))}function Bs({value:e,onChange:t,twin:n}){const{colors:o,n:r}=qe(),s=o.background,l=W(s.toUpperCase(),a("Theme {n} background",{n:r})),c=Ie(e),u=c?se(c,o,r):null,p=Ye(e,o,r,t),h=n?()=>t(void 0):()=>t("");let d=s,f=l;if(n){const m=Ie(n.follows),g=fo(n.follows),b=m?se(m,o,r):g?{hex:g,words:g.toUpperCase()}:null;d=b?.hex??s,f=G(S=>a(S),b?b.words:l,n.view)}return u?i(ie,{label:a("Fill"),icon:i(ye,{}),value:u.hex,caption:u.words,onChange:t,changed:!0,onReset:h,resetTo:f,choices:p}):i(Nt,{label:a("Fill"),icon:i(ye,{}),value:e,inherited:d,resetTo:f,onChange:t,onReset:h,choices:p})}function Ds(e,t,n){if((e?.content??[]).some(l=>l?.props?.id===t))return ae(n);const r=go(e,t);if(r.length===0)return null;const s=ae(qt(n));if(s!==null)return s;for(let l=r.length-1;l>0;l-=1){const c=ae(qt(r[l].sectionAccent));if(c!==null)return c}return ae(r[0].sectionAccent)}function qe(){const e=Xt(H().theme),[t]=F("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=oe(c=>c),l=s?.props?.id?String(s.props.id):void 0;n=l?Ds(r?.data,l,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:$r(e.themes[o]),n:o+1}}function Oc(){return on()}const Tc={top:i(Qn,{}),right:i(Zn,{}),bottom:i(qn,{}),left:i(Jn,{})};function Ec(e,t,n,o,r,s,l){const c=d=>t.find(f=>f.value===d),u=d=>({value:d,label:"",disabled:!0,title:o}),p=d=>{const f=t.find(g=>g.cell===d);if(!f)return u(`missing-${d}`);const m=s?.[d];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},h=[u("corner-top-left"),p("top"),u("corner-top-right"),p("left"),u("centre"),p("right"),u("corner-bottom-left"),p("bottom"),u("corner-bottom-right")];return{type:"custom",render:({value:d,onChange:f})=>{const m=t.some(g=>g.value===d)?d:n;return i(_,{label:a(e),icon:r,value:c(m)?.label?a(c(m).label):l?a(l):"",children:bi(a,{label:e,value:m,onChange:f,points:h})})}}}function Rc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(sr,{label:e,options:(s.options??t).map(l=>({...l,label:a(l.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:a(n)}:{}})}}function Nc(e,t,n,o){return{type:"custom",options:t,fallback:n,...L({},{type:"select",label:e}),render:({value:r,onChange:s,field:l})=>i(ar,{label:e,options:(l.options??t).map(c=>({...c,label:a(c.label)})),fallback:l.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:a(o)})}}function kc(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Pc=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Ac(e,t,n){const o=Object.keys(tt).map(r=>({label:tt[r],value:r,picture:n[r]}));return{type:"custom",...L({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Gs,{label:e,icon:t,options:o,onChange:r})}}function Hs(e,t,n){const o=yn(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=In(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 Gs({label:e,icon:t,options:n,onChange:o}){const r=v(),s=r?.values??{},l=xn(s),c=Qe(En),u=Tn(c?.docId??null);let p=null;try{p=oe(d=>d.appState.data)}catch{p=null}const h=On(r?.id,p,u);return i(_,{label:a(e),icon:j(t),hint:Hs(s,h,c?.hasUnsavedEdits??!1),children:Ke({options:n,value:l,onChange:o,ariaLabel:e})})}function Lc(e,t,n,o={}){const r={type:"custom",[it]:!0,render:({value:s,onChange:l,name:c})=>i(ir,{value:s||"",onChange:l,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?T("each",r):r}const Fc={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Ms(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 vc({value:e,onChange:t,label:n}){const o=e||{},r=v(),s=r?r.values!==r.node.props:!0,l=!!o.pending&&s,c=!!o.pending&&!s,u=!!mi(hi()).geocode,p=et(),h=(d,f)=>t({...o,[d]:f??void 0});return k(P,{children:[i(_,{label:a(n),icon:i(ht,{}),action:u?i(Te,{content:a("Find from the address (OpenStreetMap)"),children:i(Et,{"aria-label":a("Find from the address"),"aria-busy":l||void 0,disabled:l,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(lo,{})})}):void 0,children:u&&o.status?i($n,{compact:!0,oneLine:!0,spaced:!1,status:l?"busy":o.ok&&!c?"found":"notfound",statusText:l?a("Finding…"):c?a(Ko):a(o.status),hint:Ms(o)}):null}),i(_,{label:a("Enter by hand"),labelId:p,icon:i(eo,{}),action:i(Oe,{checked:!!o.manual,onChange:d=>t({...o,manual:d}),ariaLabelledBy:p})}),o.manual&&i(_,{label:a("Latitude, longitude"),icon:i(ht,{}),children:k("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(Rt,{value:typeof o.lat=="number"?o.lat:null,onChange:d=>h("lat",d),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(Rt,{value:typeof o.lng=="number"?o.lng:null,onChange:d=>h("lng",d),min:-180,max:180,step:1e-4,placeholder:a("Longitude")})]})})]})}function Ws(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Us(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,s)=>s===t?{text:n}:r)}function Bc(e,t){return e===null?null:t>e?e:null}function Ks(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 Dc={label:"Ticker items",icon:i(io,{})};function Hc(e,t,n,o){return{type:"custom",[R]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...L({},{...en.textList,label:e}),render:({value:r,onChange:s})=>i($s,{label:e,icon:j(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function $s({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const l=J(null),[c,u]=Z(null),p=d=>d.map(f=>({text:f?.text??""})),h=d=>{const f=Ks(n,d,c);f===null&&(l.current=null),u(f),r(p(d))};return i(Oo,{label:a(e),icon:t,noun:a("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(kt,{target:l,value:Ws(n,c),onChange:d=>r(Us(n,c??-1,d)),disabled:c===null,label:c===null?a("Formatting — click a row first"):a("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(d,f,m)=>i("input",{type:"text",className:s&&c===f?"sf-list-marking":void 0,value:d?.text??"",placeholder:a(o),"aria-label":a("{label} {n}",{label:a(e),n:f+1}),onChange:g=>m({text:g.target.value}),onFocus:g=>{l.current=g.currentTarget,u(f)}})})}function Gc(e,t){const n=`${e.label} — row ${t+1}`;return K({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(U,{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 Mc(e){return{_gCards:E("Cards"),coverIndex:z("Cover image",i(ro,{}),nr,String(or),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:$i("Image background",Jr),cardImage:bn()}}function Wc(){return{outline:z("Card outline",i(ao,{}),Qo,tr),indexBadge:z("Card number",i(oo,{}),Zo,er),showBadge:gn("Product badge",!0,i(St,{noun:"tag"}))}}function Uc(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...ue,label:me.find(s=>s.id===r).label}),o=r=>L(Re(Je),n(r));return{_gShowOnCard:E("Show on a card"),[Je]:L({type:"custom",render:()=>i(Xs,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(Je)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const Je="showCardPrice",me=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function Xs({rest:e}){const t=O(),n=pe(),o=l=>typeof t[l]=="boolean"?t[l]:void 0,r=l=>o(l)??e[l],s=me.some(({id:l})=>o(l)!==void 0&&o(l)!==e[l]);return i(Ze,{parts:me,changed:s,shown:r,onPress:(l,c)=>n({[l]:c}),onReset:()=>n(Object.fromEntries(me.map(({id:l})=>[l,void 0])))})}function Kc(e,t="display"){const n=X(t);return{[t]:T("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Ze,{parts:e,changed:Eo(o),shown:s=>Ro(o,s),onPress:(s,l)=>r(Po(o,s,l)),onReset:()=>r(void 0)})}),[n]:T("mobile",{type:"custom",render:({value:o,onChange:r})=>i(Vs,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ze({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:l}){const c=a("Display");return i(_,{label:c,icon:i(Vn,{}),changed:t,action:i(y,{words:C()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(To,{label:c,items:e.map(u=>({id:u.id,label:a(u.label),shown:n(u.id),...l?{disabled:!0,disabledReason:a(l)}:{}})),onChange:o})})}function Vs({parts:e,desktopKey:t,value:n,onChange:o}){const r=O()[t];return i(Ze,{parts:e,changed:ko(n),shown:s=>No(r,n,s),onPress:(s,l)=>o(Ao(n,s,l)),onReset:()=>o(qo),detail:a("the same as Desktop")})}function bn(e=kn){return M("Card image",i(pt,{}),A,Se,Pn,A,e,{clear:{hint:A},hint:"Rounds the picture. The card's own corner is in Styles."})}function js(){return ce(at,"cardImage")}function $c(){return{cardImage:bn(at),...js()}}function Xc(){return Ve({sidesKey:"cornerSides",row:Fn,step:An,useFollowed:()=>A,mark:i(zs,{label:Ln}),hint:a("Rounds the picture. Left alone it stays square.")})}function zs({label:e,changed:t=!1,onReset:n=()=>{}}){return i(y,{words:C()?.panel,label:a(e),changed:t,onReset:n})}function Vc(){return{type:"custom",render:({value:e,onChange:t})=>i(Zs,{value:typeof e=="string"?e:"",onChange:t})}}function Ys({layout:e,width:t}){const n=Hn(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:Gn(e).map(([r,s],l)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${s}`,aspectRatio:o}},l))})}const qs={width:"3.5rem",height:"2.5rem"},Js=200;function Zs({value:e,onChange:t}){const[n,o]=Z(null),[r,s]=Z(4),l=J(null);Sn(()=>{const m=l.current;if(!m||typeof ResizeObserver!="function")return;const g=()=>s(m.getBoundingClientRect().width>=Js?4:3);g();const b=new ResizeObserver(g);return b.observe(m),()=>b.disconnect()},[]);const c=e?Oi(_e,e):void 0,u=c?e:"",p=ct(n,u),h=ct(n,"").length,d=Mn("no-symbol"),f=[{value:"",label:a("Not chosen"),icon:xi(d,a("Not chosen"))},...p.map(m=>({value:m,label:a(_e[m].label),icon:i(Ys,{layout:_e[m],width:40})}))];return i(_,{label:a("Layout"),icon:i(no,{}),value:c?a(c.label):void 0,children:i("div",{ref:l,style:{flex:"1 1 auto",minWidth:0},children:i(It,{label:a("Layout"),value:u,options:f,onChange:t,columns:r,cell:qs,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(_o,{options:[{id:"all",label:a("All")},...Bn.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:Dn.length})})]})})})})}export{vi as BOUND_TO_POST,Wa as BOUND_TO_POST_NOTE,Ya as BUCKET_ICONS,Fc as CUSTOM_FIELD_MEDIA,vc as CoordsField,Qt as DESKTOP_GAP_NOT_OVERLAP,Ze as DisplayRow,Tc as EDGE_ARROWS,Do as FOCAL_DEFAULT,be as FOLD_FIELD_MARKER,Bi as HIGHLIGHT_HINT,U as HidableTextField,rt as LINK_FIELD_MARKER,ka as Label,it as MEDIA_FIELD_MARKER,Pc as MEDIA_TYPE_OPTIONS,Ua as NOT_BOUND_TO_POST,nc as PanelBand,Gi as PanelNoteLine,gs as RowPropsContext,st as SCAFFOLD_FIELD_MARKER,qc as SCALAR_TEXT_CONTROLS,Ei as SiteGapDefaultReset,Y as Slider,Wi as Swatches,Yc as TEXT_CONTROL_KINDS,R as TEXT_FIELD_MARKER,Dc as TICKER_ITEMS_ROW,$s as TextListField,vs as ThemeFillRow,fe as WIDTH_LABEL,Li as WidthDefaultReset,Ks as aimAfterListChange,Sc as anchorFields,W as backTo,oc as backgroundField,ac as boxBlockSpacingField,dc as boxColumnsFields,Ic as boxFillField,hs as boxPhoneRowField,ds as boxShareField,cc as boxSharePhoneField,uc as boxShareTabletField,Ds as boxThemeIndexOf,Za as bucketHeader,sc as buttonWordsEntryField,cs as cardCornersField,$i as cardImageBackgroundField,bn as cardImageField,$c as cardImageFields,Mc as cardMediaFields,lc as cardShapeFields,Uc as cardShowFields,Wc as cardStyleFields,fc as cellWidthFields,xc as colorInput,Aa as containerDirectionField,Ri as containerGapField,Ni as containerGapPhoneField,Pa as containerGapRows,ki as containerGapTabletField,Ms as coordsResultTip,Va as copyText,sn as cornerSidesField,Ve as cornersRowField,rn as cornersUnitFields,Cc as date,_c as dateTime,Qa as designGroupHeader,Kc as displayFields,Ec as edgePad,Ye as fillSlotChoices,Bc as focusAfterRemove,Oc as focusKeptField,ec as foldMarker,we as foldMetaOf,Mi as foldTitleOf,Os as followedHeightPatch,Ls as followedStickPatch,Vc as galleryLayoutField,bc as heightFields,he as heightFollowedBy,Is as heightLayersAt,La as heroGroupPlacementPoints,ot as hidableText,Hi as hintIsWhileTyping,Xc as imageCornersField,Ma as inOwnBox,Ja as isBucketHeader,on as keptBy,ja as linkField,Hs as loadingRowHint,Ac as loadingShowsField,Rc as multiSelect,yc as pageBackgroundField,qa as panelNote,Ss as phoneOverrideField,Xa as plainText,za as plainTextarea,Xi as pxField,tc as quietMarker,nt as readHidable,Ws as rowText,Nc as searchSelect,Ki as sectionBandChoices,qi as sectionCornersField,ic as sectionShapeFields,rc as sectionThemeFields,Us as setRowText,pc as sizeField,kc as sourceField,hc as spacingFields,wc as stickFields,mc as swapPadding,Ka as text,Rn as textFieldIdentifier,Ba as textFieldOffPage,Ha as textFieldPanelOnly,Hc as textList,Gc as textListRowField,$a as textarea,gn as toggle,Lc as upload,de as useLengthRow,pe as useSelectedPatch,O as useSelectedProps,F as useSelectedSibling,Ti as useSiteGapDetail,gc as widthField,Ga as withIdentifier,va as withOffPage,Da as withPanelOnly,Fa as withScaffold};
@@ -1 +1 @@
1
- import{anchorFields as f,bucketHeader as m,cardMediaFields as N,cardShowFields as Y,designGroupHeader as I,foldMarker as U,foldMetaOf as C,quietMarker as W,heightFields as L,sectionShapeFields as w,sectionThemeFields as E,stickFields as x,widthField as O}from"./controls.js";import{group as z}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as D}from"./box-fields.js";import{deviceField as q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as T}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as J}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as p}from"efficient-easel/screen/lib/document/field-buckets";const B=J;function Q(t){return t==="Animation"?"Animation":"Design"}const V="Editor only — not shown live",A={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content","Card list":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Loop:"Animation",Scroll:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[V]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},$={"AlloyWheelsListing._gCards":"Design"},H={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function R(t,e,o){const a=`${t}.${e}`;return H[a]??$[a]??A[o]}function he(t,e,o){const a=R(t,e,o);return a?Q(a):void 0}function X(t){return t==="Animation"?[d.Animation]:[d.Design,p[t]]}function S(...t){const e=[];for(const o of t)for(const a of Object.values(o)){const h=P(a),b=C(h?h.inner:a),l=b?A[b.label]:void 0;if(l)for(const g of X(l))e.includes(g)||e.push(g)}return e}const be=[...S(D({tablet:!0,siteSide:!0}),O("full"),L(),f(),x()),...Object.keys(D({tablet:!0,siteSide:!0})),...Object.keys(O("full")),...Object.keys(L()),...Object.keys(f()),...Object.keys(x())],Ce=[...S(E()),...Object.keys(E())],pe=[...S(w()),...Object.keys(w())],ge=[...S(T()),...Object.keys(T())],ye=Object.keys(N()),ke=Object.keys(Y()),Z={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},G={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},K={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const t={...D({tablet:!0,siteSide:!0}),...O("full"),...L(),...f(),...E(),...w(),...T()};for(const e of Object.keys(K)){const o=C(t[e]),a=o?A[o.label]:void 0;if(!o||o.level!==2||!a||!G[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${e}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const ee=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),te=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(t=>[p[t],t])]);function ne(t){const e=`${t}.`;return Object.keys(Z).filter(o=>o.startsWith(e)).map(o=>o.slice(e.length))}function oe(t,e){const o=P(t),a=z(e);return o?q(o.tier,a):a}function ae(t,e){const o=C(e);return o?t==="Content"||t==="Animation"?U(e,o.label):W(e):e}function M(t){return t==="Design"?k:["Animation"]}function Se(t,e){const o=[],a=new Set(ne(e)),h=new Set;let b=!1,l=null;for(const[n,r]of Object.entries(t)){const i=C(r);if(ee.has(n))throw new Error(`${e}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=te.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${e}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(b=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||n in K){const s=R(e,n,i.label);if(i.level!==2||!s||!G[s].includes(i.label))throw new Error(`${e}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&h.add(n),o.push(l={place:s,entries:[]});continue}const u=R(e,n,i.label);if(!u)throw new Error(`${e}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...k,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:oe(r,i.label)]]})}const g=new Set(Object.entries(t).filter(([,n])=>C(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",H],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${e}.`)).filter(c=>!g.has(c.slice(e.length+1)));if(i.length)throw new Error(`${e}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const _=b?[]:[...a].filter(n=>!h.has(n));if(_.length)throw new Error(`${e}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(_)}, but this section has no such fold header${_.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const F=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),v=B.filter(n=>M(n).some(r=>F.has(r))),y={};for(const n of v){y[d[n]]=m(n,n===v[0]?v:null);for(const r of M(n)){if(!F.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(y[p[r]]=I(r));for(const u of i)for(const[s,j]of u.entries)y[s]=ae(r,j)}}return y}function _e(t){return d.Design in t?t:{[d.Design]:m("Design",null),[p.Content]:I("Content"),...t}}function ve(t){return B.some(e=>d[e]in t)}function fe(t){const e=B.filter(a=>d[a]in t);if(e.length===0)return t;const o={...t};for(const a of e)o[d[a]]=m(a,a===e[0]?e:null);return o}export{H as BLOCK_KEY_GROUP,B as BUCKETS,d as BUCKET_KEY,ye as CARD_MEDIA_FIELD_KEYS,ke as CARD_SHOW_FIELD_KEYS,k as DESIGN_GROUPS,p as DESIGN_GROUP_KEY,V as EDITOR_ONLY_GROUP,K as INJECTED_RETIRED,$ as KEY_GROUP,A as LABEL_GROUP,be as LAYOUT_FIELD_KEYS,G as PLACE_WORDS,Z as RETIRED,ge as SECTION_ANIM_FIELD_KEYS,pe as SECTION_SHAPE_FIELD_KEYS,Ce as SECTION_THEME_FIELD_KEYS,Se as assignSectionGroups,he as bucketOf,Q as bucketOfPlace,ve as hasBucketTabs,S as headerKeysOf,X as headerKeysOfPlace,R as placeOf,fe as reseatBucketTabs,ne as retiredHeadings,_e as seatDesignBucket};
1
+ import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,designGroupHeader as x,foldMarker as W,foldMetaOf as C,quietMarker as z,heightFields as w,sectionShapeFields as E,sectionThemeFields as O,stickFields as P,widthField as D}from"./controls.js";import{group as q}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as J,deviceMetaOf as $}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as B}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as S,SETTINGS_BUCKETS as Q}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as p}from"efficient-easel/screen/lib/document/field-buckets";import{ownEntry as g,hasOwnEntry as V}from"../../../format/lib/own-entry.js";const A=Q;function X(t){return t==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",R={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content","Card list":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content",Display:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel · actions":"Content","Right panel · choices":"Content","Right panel · form":"Content","Routing groups":"Content",Rows:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content",Source:"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","“Other” reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Map:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Shadow:"Design",Texture:"Design",Overlay:"Design","Text style":"Design",Entrance:"Animation",Hover:"Animation",Loop:"Animation",Scroll:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Schedule:"Layout",Controls:"Layout",Diagram:"Layout",[Z]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Placement:"Position",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Size:"Size",Height:"Size"},H={"AlloyWheelsListing._gCards":"Design"},G={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function F(t,e,o){const a=`${t}.${e}`;return g(G,a)??g(H,a)??g(R,o)}function pe(t,e,o){const a=F(t,e,o);return a?X(a):void 0}function ee(t){return t==="Animation"?[d.Animation]:[d.Design,p[t]]}function _(...t){const e=[];for(const o of t)for(const a of Object.values(o)){const h=$(a),b=C(h?h.inner:a),l=b?g(R,b.label):void 0;if(l)for(const y of ee(l))e.includes(y)||e.push(y)}return e}const ge=[..._(T({tablet:!0,siteSide:!0}),D("full"),w(),m(),P()),...Object.keys(T({tablet:!0,siteSide:!0})),...Object.keys(D("full")),...Object.keys(w()),...Object.keys(m()),...Object.keys(P())],ye=[..._(O()),...Object.keys(O())],ke=[..._(E()),...Object.keys(E())],Se=[..._(B()),...Object.keys(B())],_e=Object.keys(Y()),ve=Object.keys(U()),te={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) — the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) — the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},K={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},M={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{const t={...T({tablet:!0,siteSide:!0}),...D("full"),...w(),...m(),...O(),...E(),...B()};for(const e of Object.keys(M)){const o=C(t[e]),a=o?g(R,o.label):void 0;if(!o||o.level!==2||!a||!K[a].includes(o.label))throw new Error(`INJECTED_RETIRED (lib/document/field-groups.ts) lists "${e}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const ne=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),oe=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...S.map(t=>[p[t],t])]);function ae(t){const e=`${t}.`;return Object.keys(te).filter(o=>o.startsWith(e)).map(o=>o.slice(e.length))}function ie(t,e){const o=$(t),a=q(e);return o?J(o.tier,a):a}function re(t,e){const o=C(e);return o?t==="Content"||t==="Animation"?W(e,o.label):z(e):e}function j(t){return t==="Design"?S:["Animation"]}function fe(t,e){const o=[],a=new Set(ae(e)),h=new Set;let b=!1,l=null;for(const[n,r]of Object.entries(t)){const i=C(r);if(ne.has(n))throw new Error(`${e}.${n}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design · Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g…\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);const c=oe.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${e}.${n}: that key is reserved for the ${c} heading of the settings panel, but this field is ${i?`a level-${i.level} "${i.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(n===d.Design||n===d.Animation)&&(b=!0),o.push(l={place:c,entries:[],adopted:!0});continue}if(!i){l||o.push(l={place:"Content",entries:[]}),l.entries.push([n,r]);continue}if(a.has(n)||V(M,n)){const s=F(e,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${e}.${n}: ${a.has(n)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${i.level} "${i.label}" header in the ${s??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired — anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);a.has(n)&&h.add(n),o.push(l={place:s,entries:[]});continue}const u=F(e,n,i.label);if(!u)throw new Error(`${e}.${n}: the inspector group "${i.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...S,"Animation"].join(" / ")} its controls belong under. Classify it — an unclassified group silently lands wherever it was declared, which is the whole bug.`);o.push(l={place:u,entries:[[n,i.level===2?r:ie(r,i.label)]]})}const y=new Set(Object.entries(t).filter(([,n])=>C(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",G],["KEY_GROUP",H]]){const i=Object.keys(r).filter(c=>c.startsWith(`${e}.`)).filter(c=>!y.has(c.slice(e.length+1)));if(i.length)throw new Error(`${e}: ${n} (lib/document/field-groups.ts) lists ${JSON.stringify(i)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key — an override that quietly matches nothing is worse than no override.`)}const v=b?[]:[...a].filter(n=>!h.has(n));if(v.length)throw new Error(`${e}: RETIRED (lib/document/field-groups.ts) lists ${JSON.stringify(v)}, but this section has no such fold header${v.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section — a list that quietly matches nothing is worse than no list.`);const I=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=A.filter(n=>j(n).some(r=>I.has(r))),k={};for(const n of f){k[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!I.has(r))continue;const i=o.filter(u=>u.place===r),c=i.findIndex(u=>u.adopted);c>0&&i.unshift(...i.splice(c,1)),n==="Design"&&(k[p[r]]=x(r));for(const u of i)for(const[s,N]of u.entries)k[s]=re(r,N)}}return k}function me(t){return d.Design in t?t:{[d.Design]:L("Design",null),[p.Content]:x("Content"),...t}}function Le(t){return A.some(e=>d[e]in t)}function we(t){const e=A.filter(a=>d[a]in t);if(e.length===0)return t;const o={...t};for(const a of e)o[d[a]]=L(a,a===e[0]?e:null);return o}export{G as BLOCK_KEY_GROUP,A as BUCKETS,d as BUCKET_KEY,_e as CARD_MEDIA_FIELD_KEYS,ve as CARD_SHOW_FIELD_KEYS,S as DESIGN_GROUPS,p as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,H as KEY_GROUP,R as LABEL_GROUP,ge as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,te as RETIRED,Se as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,fe as assignSectionGroups,pe as bucketOf,X as bucketOfPlace,Le as hasBucketTabs,_ as headerKeysOf,ee as headerKeysOfPlace,F as placeOf,we as reseatBucketTabs,ae as retiredHeadings,me as seatDesignBucket};
@@ -1 +1 @@
1
- import{slotFieldsOf as u}from"efficient-easel/draw";import{readHidable as c}from"efficient-easel/draw";import{headingLevelOfTag as d}from"../../../format/lib/content/text-tag.js";function p(n){return n.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim()}function m(n){const s=[],e=/<h([1-6])\b[^>]*>([\s\S]*?)<\/h\1>/gi;let a;for(;a=e.exec(n);)s.push({level:Number(a[1]),text:p(a[2])||"(empty)"});return s}const h=new Set(["SubmitBuild"]),b={AlloyWheelsListing:1,DocMasthead:1,AppointmentBooking:2,BookingBox:2,SubmitBox:2,Banner:2,BundleOffer:2,Cards:2,Chart:2,CheckoutCTA:2,CollectionCard:3,Collections:2,CompatibleTyres:2,ContactLocations:2,ContactRouting:2,DeliveryOptions:2,DetailRows:2,DocBody:2,EuTyreLabel:2,Events:2,FAQ:2,FeaturedCover:2,FitmentFinder:2,FitmentTable:2,FooterEmailSignup:4,FooterMenu:4,Footprint:2,Form:2,Gallery:2,GalleryB:2,GalleryItem:2,Integrations:2,IntroBleed:2,KeyFeatures:2,Logos:2,LongRead:2,Manifesto:2,Mockup:2,OrderSummary:2,PostCard:2,ProcessSteps:2,ProductGrid:2,Prose:2,RelatedProducts:2,ReviewForm:2,Reviews:2,SectionHeader:2,Series:2,SpecTable:2,Split:2,StatsParagraph:2,SubmitBuild:2,Subscribe:2,SubscribeBlogs:2,Testimonials:2,Timeline:2,TimelineTrack:2,TitleWithButtons:2,TyreFitment:2,TyreSizes:2};function T(n,s){const e=[];for(const a of n??[]){const i=a,r=i.props??{};switch(i.type){case"Heading":{const{text:t,hidden:o}=c(r.text);if(o)break;e.push({level:Number(r.level)||2,text:t||"(empty heading)"})}break;case"Text":{const t=d(r.tag),{text:o,hidden:l}=c(r.text);if(t===null||l)break;e.push({level:t,text:o||"(empty heading)"})}break;case"Hero":e.push({level:1,text:"Hero (brand headline)"});break;case"CustomHTML":e.push(...m(c(r.html).text));break;default:{const t=b[i.type??""],o=c(r.title??r.heading),l=o.text.trim();if(!t||o.hidden)break;l?e.push({level:t,text:l}):h.has(i.type??"")&&e.push({level:t,text:String(i.type)});break}}for(const t of u(s,i.type??"")){const o=r[t];Array.isArray(o)&&e.push(...T(o,s))}}return e}export{b as SECTION_TOP_LEVEL_FOR_TEST,T as headingOutline};
1
+ import{slotFieldsOf as u}from"efficient-easel/draw";import{readHidable as c}from"efficient-easel/draw";import{headingLevelOfTag as d}from"../../../format/lib/content/text-tag.js";import{ownEntry as p}from"../../../format/lib/own-entry.js";function m(n){return n.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim()}function h(n){const s=[],e=/<h([1-6])\b[^>]*>([\s\S]*?)<\/h\1>/gi;let a;for(;a=e.exec(n);)s.push({level:Number(a[1]),text:m(a[2])||"(empty)"});return s}const b=new Set(["SubmitBuild"]),T={AlloyWheelsListing:1,DocMasthead:1,AppointmentBooking:2,BookingBox:2,SubmitBox:2,Banner:2,BundleOffer:2,Cards:2,Chart:2,CheckoutCTA:2,CollectionCard:3,Collections:2,CompatibleTyres:2,ContactLocations:2,ContactRouting:2,DeliveryOptions:2,DetailRows:2,DocBody:2,EuTyreLabel:2,Events:2,FAQ:2,FeaturedCover:2,FitmentFinder:2,FitmentTable:2,FooterEmailSignup:4,FooterMenu:4,Footprint:2,Form:2,Gallery:2,GalleryB:2,GalleryItem:2,Integrations:2,IntroBleed:2,KeyFeatures:2,Logos:2,LongRead:2,Manifesto:2,Mockup:2,OrderSummary:2,PostCard:2,ProcessSteps:2,ProductGrid:2,Prose:2,RelatedProducts:2,ReviewForm:2,Reviews:2,SectionHeader:2,Series:2,SpecTable:2,Split:2,StatsParagraph:2,SubmitBuild:2,Subscribe:2,SubscribeBlogs:2,Testimonials:2,Timeline:2,TimelineTrack:2,TitleWithButtons:2,TyreFitment:2,TyreSizes:2};function f(n,s){const e=[];for(const a of n??[]){const i=a,r=i.props??{};switch(i.type){case"Heading":{const{text:t,hidden:o}=c(r.text);if(o)break;e.push({level:Number(r.level)||2,text:t||"(empty heading)"})}break;case"Text":{const t=d(r.tag),{text:o,hidden:l}=c(r.text);if(t===null||l)break;e.push({level:t,text:o||"(empty heading)"})}break;case"Hero":e.push({level:1,text:"Hero (brand headline)"});break;case"CustomHTML":e.push(...h(c(r.html).text));break;default:{const t=p(T,i.type??""),o=c(r.title??r.heading),l=o.text.trim();if(!t||o.hidden)break;l?e.push({level:t,text:l}):b.has(i.type??"")&&e.push({level:t,text:String(i.type)});break}}for(const t of u(s,i.type??"")){const o=r[t];Array.isArray(o)&&e.push(...f(o,s))}}return e}export{T as SECTION_TOP_LEVEL_FOR_TEST,f as headingOutline};
@@ -1 +1 @@
1
- import{SECTION_LABELS as i}from"../../../format/lib/document/section-catalog.js";import{SLOT_SECTION_EXTRA_SPECS as E}from"../../../render/lib/document/slot-specs.js";import{HERO_STRIP_SLOT as S,STRIP_ON_MEDIA as n}from"../../../format/lib/hero-ticker.js";import{SECTION_PRESETS as s}from"../../../format/lib/sections/section-presets.js";function T(o){const e=s.Ticker(o.nodeDefaults,o.newNodeId),{sectionBorder:r,...t}=e.props,c=n.line?{sectionBorder:r}:{};return{...e,props:{...t,...c,sectionAccent:n.sectionAccent}}}const O={Hero:{[S]:{newChild:T,childLabel:i.Ticker}}},f=Object.fromEntries(Object.entries(E).map(([o,e])=>[o,Object.fromEntries(Object.entries(e).map(([r,t])=>[r,{...t,...O[o]?.[r]}]))]));export{f as EDITOR_SLOT_EXTRA_SPECS};
1
+ import{SECTION_LABELS as i}from"../../../format/lib/document/section-catalog.js";import{SLOT_SECTION_EXTRA_SPECS as E}from"../../../render/lib/document/slot-specs.js";import{HERO_STRIP_SLOT as S,STRIP_ON_MEDIA as n}from"../../../format/lib/hero-ticker.js";import{SECTION_PRESETS as s}from"../../../format/lib/sections/section-presets.js";import{ownEntry as T}from"../../../format/lib/own-entry.js";function p(o){const r=s.Ticker(o.nodeDefaults,o.newNodeId),{sectionBorder:e,...t}=r.props,c=n.line?{sectionBorder:e}:{};return{...r,props:{...t,...c,sectionAccent:n.sectionAccent}}}const O={Hero:{[S]:{newChild:p,childLabel:i.Ticker}}},R=Object.fromEntries(Object.entries(E).map(([o,r])=>[o,Object.fromEntries(Object.entries(r).map(([e,t])=>[e,{...t,...T(O,o)?.[e]}]))]));export{R as EDITOR_SLOT_EXTRA_SPECS};
@@ -1 +1 @@
1
- import{FIELD_DESCRIPTION_MARKER as j}from"efficient-easel/screen/lib/host";import{isNode as d}from"efficient-easel/data";import{RETIRED_SECTIONS as v}from"../../format/lib/document/section-catalog.js";import{layoutPresetFor as O}from"./sections/text-layouts.js";function u(r,t){const e=r.components[t]?.label;return typeof e=="string"&&e.trim()?e.trim():t}function E(r){return r.length>3&&r.endsWith("s")?r.slice(0,-1):r}function b(r,t,e,o){r.forEach((s,l)=>{if(d(s)){o.push({node:s,list:r,index:l,parent:t,slot:e});for(const[i,n]of Object.entries(s.props))Array.isArray(n)&&n.some(d)&&b(n,s,i,o)}})}function x(r){const t=[];b(Array.isArray(r.content)?r.content:[],null,"",t);for(const e of Object.values(r.zones??{}))Array.isArray(e)&&b(e,null,"",t);return t}function h(r,t){return x(r).find(e=>String(e.node.props.id)===t)}function N(r,t,e){if(!e)return null;const o=h(t,e);if(!o)return null;const s=u(r,o.node.type),l=o.parent?`${u(r,o.parent.type)} · ${E(o.slot)} ${o.index+1}`:s;return{blockId:e,type:o.node.type,label:l,path:""}}const w=r=>r.filter(t=>!!t&&typeof t=="object"&&"value"in t).map(t=>typeof t.label=="string"?{value:t.value,label:t.label}:{value:t.value});function F(r){if(!r||typeof r!="object")return null;const t=r;if(typeof t.type!="string")return null;const e=t.type==="custom"?t[j]:void 0,o={type:e?.type??t.type},s=e?.label??t.label;typeof s=="string"&&(o.label=s);const l=e?.options??t.options;Array.isArray(l)&&(o.options=w(l));for(const i of["arrayFields","objectFields"]){const n=e?.[i]??t[i];n&&typeof n=="object"&&(o[i]=k(n))}return o}function k(r){const t={};for(const[e,o]of Object.entries(r??{})){const s=F(o);s&&(t[e]=s)}return t}function z(r){const t={};for(const[e,o]of Object.entries(r.components))o&&(t[e]={label:u(r,e),fields:k(o.fields),...m(e)?{retired:!0}:{}});return t}function m(r){return Object.prototype.hasOwnProperty.call(v,r)}function A(r,t){const e=r.components[t]?.defaultProps;return e&&typeof e=="object"?structuredClone(e):{}}function S(r,t){let e=r;for(const o of t?t.split("."):[]){const s=/^([A-Za-z_][A-Za-z0-9_]*)(?:\[(\d+)\])?$/.exec(o);if(!s||!e||typeof e!="object")return null;e=e[s[1]],s[2]!==void 0&&(e=Array.isArray(e)?e[Number(s[2])]:void 0)}return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function y(r,t){return r.findIndex(e=>d(e)&&String(e.props.id)===t)}function g(r,t,e){const o=t||e;if(!o)return r.length;const s=y(r,o);if(s<0)throw new Error(`there is no top-level block ${o}`);return t?s+1:s}function D(r,t,e,o,s={}){const l=structuredClone(t),i=Array.isArray(l.content)?l.content:l.content=[];try{e.forEach((n,_)=>{const a=c=>{throw new Error(`change ${_+1}: ${c}`)};switch(n.op){case"set_props":{const c=h(l,n.block_id)??a(`there is no block ${n.block_id}`);"id"in n.props&&a("a block's id is never changed");const f=S(c.node.props,n.path)??a(`there is no ${n.path} in that block`);Object.assign(f,structuredClone(n.props));break}case"insert_block":{r.components[n.type]??a(`there is no block type ${n.type}`),m(n.type)&&a(`${u(r,n.type)} is retired: it is no longer added (a page that holds one keeps it)`);const c=O(n.type),f=Object.keys(n.props??{}).filter(p=>p!=="id");c&&f.length&&a(`${u(r,n.type)} is laid down as a Box of blocks: insert it with no props, then change its blocks`);const $=c?c(p=>A(r,p),o,s):{type:n.type,props:{...A(r,n.type),...structuredClone(n.props),id:o(n.type)}};i.splice(g(i,n.after,n.before),0,$);break}case"remove_block":{const c=y(i,n.block_id);c<0&&a(`there is no top-level block ${n.block_id}`),i.splice(c,1);break}case"move_block":{const c=y(i,n.block_id);c<0&&a(`there is no top-level block ${n.block_id}`);const[f]=i.splice(c,1);i.splice(g(i,n.after,n.before),0,f);break}default:a(`"${n.op}" is not a change this editor makes`)}})}catch(n){return{ok:!1,reason:n instanceof Error?n.message:String(n)}}return{ok:!0,document:l}}export{D as applyPageEdits,u as blockLabel,z as describeBlocks,N as describeSelection};
1
+ import{FIELD_DESCRIPTION_MARKER as j}from"efficient-easel/screen/lib/host";import{isNode as d}from"efficient-easel/data";import{RETIRED_SECTIONS as v}from"../../format/lib/document/section-catalog.js";import{layoutPresetFor as E}from"./sections/text-layouts.js";import{hasOwnEntry as O}from"../../format/lib/own-entry.js";function u(r,t){const e=r.components[t]?.label;return typeof e=="string"&&e.trim()?e.trim():t}function x(r){return r.length>3&&r.endsWith("s")?r.slice(0,-1):r}function b(r,t,e,o){r.forEach((s,l)=>{if(d(s)){o.push({node:s,list:r,index:l,parent:t,slot:e});for(const[i,n]of Object.entries(s.props))Array.isArray(n)&&n.some(d)&&b(n,s,i,o)}})}function w(r){const t=[];b(Array.isArray(r.content)?r.content:[],null,"",t);for(const e of Object.values(r.zones??{}))Array.isArray(e)&&b(e,null,"",t);return t}function h(r,t){return w(r).find(e=>String(e.node.props.id)===t)}function D(r,t,e){if(!e)return null;const o=h(t,e);if(!o)return null;const s=u(r,o.node.type),l=o.parent?`${u(r,o.parent.type)} · ${x(o.slot)} ${o.index+1}`:s;return{blockId:e,type:o.node.type,label:l,path:""}}const F=r=>r.filter(t=>!!t&&typeof t=="object"&&"value"in t).map(t=>typeof t.label=="string"?{value:t.value,label:t.label}:{value:t.value});function S(r){if(!r||typeof r!="object")return null;const t=r;if(typeof t.type!="string")return null;const e=t.type==="custom"?t[j]:void 0,o={type:e?.type??t.type},s=e?.label??t.label;typeof s=="string"&&(o.label=s);const l=e?.options??t.options;Array.isArray(l)&&(o.options=F(l));for(const i of["arrayFields","objectFields"]){const n=e?.[i]??t[i];n&&typeof n=="object"&&(o[i]=k(n))}return o}function k(r){const t={};for(const[e,o]of Object.entries(r??{})){const s=S(o);s&&(t[e]=s)}return t}function T(r){const t={};for(const[e,o]of Object.entries(r.components))o&&(t[e]={label:u(r,e),fields:k(o.fields),...m(e)?{retired:!0}:{}});return t}function m(r){return O(v,r)}function A(r,t){const e=r.components[t]?.defaultProps;return e&&typeof e=="object"?structuredClone(e):{}}function C(r,t){let e=r;for(const o of t?t.split("."):[]){const s=/^([A-Za-z_][A-Za-z0-9_]*)(?:\[(\d+)\])?$/.exec(o);if(!s||!e||typeof e!="object")return null;e=e[s[1]],s[2]!==void 0&&(e=Array.isArray(e)?e[Number(s[2])]:void 0)}return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function y(r,t){return r.findIndex(e=>d(e)&&String(e.props.id)===t)}function g(r,t,e){const o=t||e;if(!o)return r.length;const s=y(r,o);if(s<0)throw new Error(`there is no top-level block ${o}`);return t?s+1:s}function B(r,t,e,o,s={}){const l=structuredClone(t),i=Array.isArray(l.content)?l.content:l.content=[];try{e.forEach((n,_)=>{const a=c=>{throw new Error(`change ${_+1}: ${c}`)};switch(n.op){case"set_props":{const c=h(l,n.block_id)??a(`there is no block ${n.block_id}`);"id"in n.props&&a("a block's id is never changed");const f=C(c.node.props,n.path)??a(`there is no ${n.path} in that block`);Object.assign(f,structuredClone(n.props));break}case"insert_block":{r.components[n.type]??a(`there is no block type ${n.type}`),m(n.type)&&a(`${u(r,n.type)} is retired: it is no longer added (a page that holds one keeps it)`);const c=E(n.type),f=Object.keys(n.props??{}).filter(p=>p!=="id");c&&f.length&&a(`${u(r,n.type)} is laid down as a Box of blocks: insert it with no props, then change its blocks`);const $=c?c(p=>A(r,p),o,s):{type:n.type,props:{...A(r,n.type),...structuredClone(n.props),id:o(n.type)}};i.splice(g(i,n.after,n.before),0,$);break}case"remove_block":{const c=y(i,n.block_id);c<0&&a(`there is no top-level block ${n.block_id}`),i.splice(c,1);break}case"move_block":{const c=y(i,n.block_id);c<0&&a(`there is no top-level block ${n.block_id}`);const[f]=i.splice(c,1);i.splice(g(i,n.after,n.before),0,f);break}default:a(`"${n.op}" is not a change this editor makes`)}})}catch(n){return{ok:!1,reason:n instanceof Error?n.message:String(n)}}return{ok:!0,document:l}}export{B as applyPageEdits,u as blockLabel,T as describeBlocks,D as describeSelection};