efficient-web-builder 65.0.0 → 67.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/dist/editor/components/AnchorField.js +1 -1
  3. package/dist/editor/components/CardShadowField.js +1 -1
  4. package/dist/editor/components/MediaUploadField.js +1 -1
  5. package/dist/editor/components/PagesPanel.js +1 -1
  6. package/dist/editor/components/PartSettingsPanel.js +1 -1
  7. package/dist/editor/components/PartTextBox.js +1 -1
  8. package/dist/editor/components/PreviewPartAnchors.js +1 -1
  9. package/dist/editor/components/SectionEditor.js +1 -1
  10. package/dist/editor/components/SectionWidthRows.d.ts +3 -1
  11. package/dist/editor/components/SectionWidthRows.js +1 -1
  12. package/dist/editor/components/SiteTextStylesField.js +1 -1
  13. package/dist/editor/components/WebsitePreviewButton.js +1 -1
  14. package/dist/editor/components/storefront-editor.css +16 -24
  15. package/dist/editor/components/usePreviewHref.js +1 -1
  16. package/dist/editor/lib/animation/hover-fields.d.ts +1 -1
  17. package/dist/editor/lib/animation/hover-fields.js +1 -1
  18. package/dist/editor/lib/document/blocks/general/Banner/fields.js +1 -1
  19. package/dist/editor/lib/document/blocks/general/ButtonBlock/fields.js +1 -1
  20. package/dist/editor/lib/document/blocks/general/Divider/fields.js +1 -1
  21. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  22. package/dist/editor/lib/document/blocks/general/Footprint/fields.d.ts +0 -1
  23. package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
  24. package/dist/editor/lib/document/blocks/general/HeroGroup/fields.js +1 -1
  25. package/dist/editor/lib/document/blocks/general/ImageBlock/fields.js +1 -1
  26. package/dist/editor/lib/document/blocks/general/IntroBleed/fields.js +1 -1
  27. package/dist/editor/lib/document/blocks/general/LogoBlock/fields.js +1 -1
  28. package/dist/editor/lib/document/blocks/general/PostCard/fields.js +1 -1
  29. package/dist/editor/lib/document/blocks/general/ProcessSteps/fields.js +1 -1
  30. package/dist/editor/lib/document/blocks/general/SectionHeader/fields.js +1 -1
  31. package/dist/editor/lib/document/blocks/general/Text/fields.js +1 -1
  32. package/dist/editor/lib/document/blocks/general/index.d.ts +2 -2
  33. package/dist/editor/lib/document/blocks/hero-shared-fields.js +1 -1
  34. package/dist/editor/lib/document/box-fields.d.ts +2 -1
  35. package/dist/editor/lib/document/box-fields.js +1 -1
  36. package/dist/editor/lib/document/card-row-fields.d.ts +3 -0
  37. package/dist/editor/lib/document/card-row-fields.js +1 -1
  38. package/dist/editor/lib/document/controls.d.ts +31 -12
  39. package/dist/editor/lib/document/controls.js +1 -1
  40. package/dist/editor/lib/document/field-groups.d.ts +0 -3
  41. package/dist/editor/lib/document/field-groups.js +1 -1
  42. package/dist/editor/lib/document/passes/inspector.js +1 -1
  43. package/dist/editor/lib/document/section-own-width-fields.js +1 -1
  44. package/dist/editor/lib/sections/section-dry-run.d.ts +1 -20
  45. package/dist/editor/lib/sections/section-dry-run.js +2 -2
  46. package/dist/editor/lib/sections/text-layouts.js +1 -1
  47. package/dist/format/lib/animation/views.js +1 -1
  48. package/dist/format/lib/content/block-sources.d.ts +3 -0
  49. package/dist/format/lib/content/block-sources.js +1 -1
  50. package/dist/format/lib/content/borders.d.ts +12 -2
  51. package/dist/format/lib/content/borders.js +1 -1
  52. package/dist/format/lib/content/box-background.d.ts +1 -0
  53. package/dist/format/lib/content/box-background.js +1 -1
  54. package/dist/format/lib/content/box-link.d.ts +11 -0
  55. package/dist/format/lib/content/box-link.js +8 -8
  56. package/dist/format/lib/content/box-phone-place.d.ts +0 -2
  57. package/dist/format/lib/content/box-phone-place.js +1 -1
  58. package/dist/format/lib/content/box-side-space.js +1 -1
  59. package/dist/format/lib/content/card-corners.d.ts +3 -1
  60. package/dist/format/lib/content/card-corners.js +1 -1
  61. package/dist/format/lib/content/card-image-shape.d.ts +5 -1
  62. package/dist/format/lib/content/card-image-shape.js +1 -1
  63. package/dist/format/lib/content/card-template.d.ts +1 -0
  64. package/dist/format/lib/content/card-template.js +1 -1
  65. package/dist/format/lib/content/contact.d.ts +0 -1
  66. package/dist/format/lib/content/contact.js +2 -2
  67. package/dist/format/lib/content/css-length.d.ts +7 -0
  68. package/dist/format/lib/content/css-length.js +1 -0
  69. package/dist/format/lib/content/image-corners.d.ts +3 -1
  70. package/dist/format/lib/content/image-corners.js +1 -1
  71. package/dist/format/lib/content/page-width.d.ts +17 -1
  72. package/dist/format/lib/content/page-width.js +1 -1
  73. package/dist/format/lib/content/section-corners.d.ts +3 -1
  74. package/dist/format/lib/content/section-corners.js +1 -1
  75. package/dist/format/lib/content/section-sticky.d.ts +5 -0
  76. package/dist/format/lib/content/section-sticky.js +1 -1
  77. package/dist/format/lib/content/section-type-size.d.ts +12 -1
  78. package/dist/format/lib/content/section-type-size.js +1 -1
  79. package/dist/format/lib/content/section-width.d.ts +8 -0
  80. package/dist/format/lib/content/section-width.js +1 -1
  81. package/dist/format/lib/content/view-tier.d.ts +10 -0
  82. package/dist/format/lib/content/view-tier.js +1 -0
  83. package/dist/format/lib/document/blocks/general/Banner/meta.d.ts +5 -0
  84. package/dist/format/lib/document/blocks/general/Banner/meta.js +1 -1
  85. package/dist/format/lib/document/blocks/general/Footprint/card-seed.d.ts +2 -0
  86. package/dist/format/lib/document/blocks/general/Footprint/card-seed.js +1 -1
  87. package/dist/format/lib/document/blocks/general/Footprint/meta.js +2 -2
  88. package/dist/format/lib/document/blocks/general/ProcessSteps/column-seed.d.ts +5 -0
  89. package/dist/format/lib/document/blocks/general/ProcessSteps/column-seed.js +1 -0
  90. package/dist/format/lib/document/blocks/general/ProcessSteps/meta.js +1 -1
  91. package/dist/format/lib/document/blocks/general/SectionHeader/meta.d.ts +6 -0
  92. package/dist/format/lib/document/blocks/general/SectionHeader/meta.js +1 -1
  93. package/dist/format/lib/document/blocks/general/TitleWithButtons/meta.d.ts +2 -0
  94. package/dist/format/lib/document/blocks/general/TitleWithButtons/meta.js +2 -2
  95. package/dist/format/lib/document/media-drop.js +1 -1
  96. package/dist/format/lib/document/one-h1.d.ts +2 -0
  97. package/dist/format/lib/document/one-h1.js +1 -1
  98. package/dist/format/lib/document/passes/types.d.ts +1 -0
  99. package/dist/format/lib/document/renamed-props.d.ts +1 -0
  100. package/dist/format/lib/document/renamed-props.js +1 -1
  101. package/dist/format/lib/document/section-catalog.js +10 -2
  102. package/dist/format/lib/document/section-descriptions.js +1 -1
  103. package/dist/format/lib/editor-words-catalogue.d.ts +10 -0
  104. package/dist/format/lib/editor-words-catalogue.js +3 -3
  105. package/dist/format/lib/editor-words-kept.js +1 -1
  106. package/dist/format/lib/fit-words.js +4 -1
  107. package/dist/format/lib/links/page-link-rules.d.ts +0 -1
  108. package/dist/format/lib/links/page-link-rules.js +1 -1
  109. package/dist/format/lib/markup.d.ts +1 -0
  110. package/dist/format/lib/markup.js +2 -2
  111. package/dist/format/lib/post-card-layout.d.ts +3 -0
  112. package/dist/format/lib/post-card-layout.js +1 -1
  113. package/dist/format/lib/sections/divider-style.d.ts +9 -0
  114. package/dist/format/lib/sections/divider-style.js +1 -1
  115. package/dist/format/lib/sections/hero-single-to-hero.js +1 -1
  116. package/dist/format/lib/sections/section-presets.js +1 -1
  117. package/dist/format/lib/sections/timeline-year-shape.js +1 -1
  118. package/dist/format/lib/source-rules/editor-words.js +1 -1
  119. package/dist/format/lib/source-rules/one-length-control.d.ts +18 -0
  120. package/dist/format/lib/source-rules/one-length-control.js +16 -0
  121. package/dist/format/lib/source-rules/support/label-extraction.js +3 -3
  122. package/dist/format/lib/theme.d.ts +1 -2
  123. package/dist/format/lib/theme.js +4 -4
  124. package/dist/format/lib/web-runtime.d.ts +2 -0
  125. package/dist/format/lib/web-runtime.js +1 -1
  126. package/dist/render/components/BlockFrame.d.ts +3 -3
  127. package/dist/render/components/BlockFrame.js +1 -1
  128. package/dist/render/components/Breadcrumb.js +1 -1
  129. package/dist/render/components/Btn.js +1 -1
  130. package/dist/render/components/CardRowContext.d.ts +7 -1
  131. package/dist/render/components/CardRowContext.js +1 -1
  132. package/dist/render/components/CategoryBar.js +1 -1
  133. package/dist/render/components/ContactLocations.js +2 -2
  134. package/dist/render/components/DealerFinder.d.ts +4 -1
  135. package/dist/render/components/DealerFinder.js +1 -1
  136. package/dist/render/components/Divider.d.ts +3 -1
  137. package/dist/render/components/Divider.js +1 -1
  138. package/dist/render/components/DocMasthead.js +1 -1
  139. package/dist/render/components/DocTabs.js +1 -1
  140. package/dist/render/components/FeaturedCover.js +1 -1
  141. package/dist/render/components/Flex.d.ts +3 -1
  142. package/dist/render/components/Flex.js +1 -1
  143. package/dist/render/components/Footprint.d.ts +5 -3
  144. package/dist/render/components/Footprint.js +1 -1
  145. package/dist/render/components/Heading.d.ts +0 -1
  146. package/dist/render/components/Heading.js +1 -1
  147. package/dist/render/components/HeroGroup.d.ts +3 -1
  148. package/dist/render/components/HeroGroup.js +1 -1
  149. package/dist/render/components/ImageBlock.d.ts +2 -1
  150. package/dist/render/components/ImageBlock.js +1 -1
  151. package/dist/render/components/IntroBleed.d.ts +3 -2
  152. package/dist/render/components/IntroBleed.js +1 -1
  153. package/dist/render/components/KeyFeatures.js +1 -1
  154. package/dist/render/components/LocationMap.js +1 -1
  155. package/dist/render/components/LogoBlock.js +1 -1
  156. package/dist/render/components/Logos.d.ts +1 -2
  157. package/dist/render/components/Logos.js +1 -1
  158. package/dist/render/components/LongRead.js +1 -1
  159. package/dist/render/components/PictureHoverMove.d.ts +18 -0
  160. package/dist/render/components/PictureHoverMove.js +1 -0
  161. package/dist/render/components/PictureWash.d.ts +2 -1
  162. package/dist/render/components/PictureWash.js +1 -1
  163. package/dist/render/components/PostCard.js +1 -1
  164. package/dist/render/components/ProcessSteps.d.ts +2 -1
  165. package/dist/render/components/ProcessSteps.js +1 -1
  166. package/dist/render/components/SectionHeader.js +1 -1
  167. package/dist/render/components/SideListLayout.d.ts +4 -1
  168. package/dist/render/components/SideListLayout.js +1 -1
  169. package/dist/render/components/Split.js +1 -1
  170. package/dist/render/components/Text.d.ts +2 -1
  171. package/dist/render/components/Text.js +1 -1
  172. package/dist/render/components/Timeline.js +1 -1
  173. package/dist/render/components/TimelineRail.d.ts +11 -3
  174. package/dist/render/components/TimelineRail.js +1 -1
  175. package/dist/render/components/TimelineTrack.js +1 -1
  176. package/dist/render/components/TitleWithButtons.js +1 -1
  177. package/dist/render/components/goldPhrases.js +3 -3
  178. package/dist/render/lib/content/block-size.d.ts +5 -1
  179. package/dist/render/lib/content/block-size.js +1 -1
  180. package/dist/render/lib/content/box-stack-line.d.ts +1 -1
  181. package/dist/render/lib/content/box-stack-line.js +1 -1
  182. package/dist/render/lib/content/button-look.d.ts +2 -0
  183. package/dist/render/lib/content/button-look.js +1 -1
  184. package/dist/render/lib/content/section-edge.js +1 -1
  185. package/dist/render/lib/content/section-padding.d.ts +5 -2
  186. package/dist/render/lib/content/section-padding.js +1 -1
  187. package/dist/render/lib/dealer-source.d.ts +6 -2
  188. package/dist/render/lib/dealer-source.js +1 -1
  189. package/dist/render/lib/document/blocks/general/Banner/render.js +1 -1
  190. package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
  191. package/dist/render/lib/document/blocks/general/Divider/render.js +1 -1
  192. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  193. package/dist/render/lib/document/blocks/general/Footprint/render.js +1 -1
  194. package/dist/render/lib/document/blocks/general/HeroGroup/render.js +1 -1
  195. package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
  196. package/dist/render/lib/document/blocks/general/IntroBleed/render.js +1 -1
  197. package/dist/render/lib/document/blocks/general/SectionHeader/render.js +1 -1
  198. package/dist/render/lib/document/blocks/general/Text/render.js +1 -1
  199. package/dist/render/lib/document/blocks/general/TitleWithButtons/render.js +1 -1
  200. package/dist/render/lib/document/blocks/general/section-head-looks.d.ts +2 -0
  201. package/dist/render/lib/document/blocks/general/section-head-looks.js +2 -2
  202. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  203. package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
  204. package/dist/render/lib/document/blocks/general/section-to-box-rows-editorial.js +1 -1
  205. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.d.ts +2 -2
  206. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
  207. package/dist/render/lib/document/blocks/general/section-to-box-rows-locations.js +1 -1
  208. package/dist/render/lib/document/blocks/general/section-to-box-rows-pageheader.js +1 -1
  209. package/dist/render/lib/document/blocks/general/section-to-box-rows-stats.js +1 -1
  210. package/dist/render/lib/document/blocks/general/section-to-box-rows-tabbar.d.ts +3 -0
  211. package/dist/render/lib/document/blocks/general/section-to-box-rows-tabbar.js +1 -0
  212. package/dist/render/lib/document/blocks/general/section-to-box-rows-timeline.js +2 -2
  213. package/dist/render/lib/document/blocks/general/section-to-box-rows.d.ts +3 -0
  214. package/dist/render/lib/document/blocks/general/section-to-box-rows.js +1 -1
  215. package/dist/render/lib/document/card-press-titles.d.ts +10 -0
  216. package/dist/render/lib/document/card-press-titles.js +1 -0
  217. package/dist/render/lib/document/part-styles.d.ts +13 -0
  218. package/dist/render/lib/document/part-styles.js +2 -2
  219. package/dist/render/lib/document/passes/borders.js +1 -1
  220. package/dist/render/lib/document/passes/corners.js +1 -1
  221. package/dist/render/lib/document/passes/section-height.js +1 -1
  222. package/dist/render/lib/document/passes/section-padding.js +1 -1
  223. package/dist/render/lib/document/passes/section-width.js +1 -1
  224. package/dist/render/lib/document/published-passes.js +1 -1
  225. package/dist/render/lib/document/slot-specs.js +1 -1
  226. package/dist/render/lib/sections/section-to-box.d.ts +0 -15
  227. package/dist/render/lib/sections/section-to-box.js +1 -1
  228. package/dist/render/lib/site-runtime.d.ts +4 -1
  229. package/dist/render/lib/site-runtime.js +1 -1
  230. package/dist/render/lib/text-styles/site-text-styles.js +2 -2
  231. package/package.json +5 -5
  232. package/dist/editor/components/TemplateFieldRow.d.ts +0 -11
  233. package/dist/editor/components/TemplateFieldRow.js +0 -1
  234. package/dist/editor/lib/document/panel-heading-scope.d.ts +0 -8
  235. package/dist/editor/lib/document/panel-heading-scope.js +0 -1
  236. package/dist/editor/lib/document/template-field.d.ts +0 -13
  237. package/dist/editor/lib/document/template-field.js +0 -1
  238. package/dist/format/lib/canvas-accent.d.ts +0 -1
  239. package/dist/format/lib/canvas-accent.js +0 -1
  240. package/dist/format/lib/source-rules/padding-units-declared.d.ts +0 -2
  241. package/dist/format/lib/source-rules/padding-units-declared.js +0 -6
@@ -5,9 +5,10 @@ import { type KnownVideoFrame, type LoadingShows } from "../../../format/lib/her
5
5
  import { readHidable, hidableText, type HidableValue } from "efficient-easel/draw";
6
6
  import { FOLD_FIELD_MARKER, LINK_FIELD_MARKER, MEDIA_FIELD_MARKER, SCAFFOLD_FIELD_MARKER, TEXT_FIELD_MARKER, foldMetaOf, textFieldIdentifier, type EdgeCell, type FoldFieldMeta, type TextFieldMeta, type TextListRendering } from "efficient-easel/draw";
7
7
  import { type ShowWhenRule } from "../../../render/lib/document/show-when.js";
8
- import { type SettingsBorderValue } from "efficient-easel/panel";
9
- import { type AlignmentPoint, FOCAL_DEFAULT } from "efficient-shell/ui";
8
+ import { CARD_IMAGE_RADIUS_ROW } from "../../../format/lib/content/card-image-shape.js";
9
+ import { type AlignmentPoint, FOCAL_DEFAULT, type UnitChoice as ShellUnitChoice } from "efficient-shell/ui";
10
10
  import { type ColourChoice } from "./ColourControl.js";
11
+ import { type DeviceTier } from "efficient-easel/screen/lib/document/device-fields";
11
12
  import type { GeocodeState } from "../../../format/lib/content/contact.js";
12
13
  import { SECTION_PIN_SCREENS_KEY } from "../../../format/lib/content/section-sticky.js";
13
14
  import { type SectionHeightMode, type SectionHeightUnit } from "../../../format/lib/content/section-min-height.js";
@@ -19,6 +20,9 @@ import { type TypeRole, type TypeSizeValue } from "../../../format/lib/content/s
19
20
  import { type WidthMode } from "../../../format/lib/content/section-width.js";
20
21
  import type { Bucket, DesignGroup } from "./field-groups.js";
21
22
  import { type SelectField, type SelectOption } from "efficient-easel/screen/lib/document/box-fields";
23
+ import { type LengthUnitState } from "efficient-easel/screen/lib/document/box-fields";
24
+ import { type LengthGrid, type LengthRow } from "efficient-easel/screen/lib/content/length-units";
25
+ import { type PanelView } from "../../../format/lib/content/view-tier.js";
22
26
  type SelectData = {
23
27
  options: readonly SelectOption[];
24
28
  fallback: string;
@@ -132,9 +136,6 @@ export declare function PanelBand({ title, children }: {
132
136
  title: string;
133
137
  children: ReactNode;
134
138
  }): import("react").JSX.Element;
135
- export declare function GroupLabel({ label }: {
136
- label: string;
137
- }): import("react").JSX.Element;
138
139
  export declare function Swatches({ swatches, current, onPick, names, }: {
139
140
  swatches: readonly string[];
140
141
  current: string;
@@ -145,7 +146,17 @@ export declare function backgroundField(label: string, builtIn: SectionBackgroun
145
146
  export declare function sectionBandChoices(stored: SectionBackground, builtIn: SectionBackground, colors: ReturnType<typeof normalizeThemeColors>, n: number, band: SectionBandColours, onChange: (next: SectionBackground) => void): ColourChoice[];
146
147
  export declare function cardImageBackgroundField(label: string, builtIn: string): CustomField<unknown>;
147
148
  export declare function sectionThemeFields(readValue?: (v: unknown) => unknown, followLabel?: string): Record<string, CustomField<unknown>>;
148
- export declare function Slider({ min, max, step, value, onChange, suffix, readout, notch, ariaLabel, disabled, placeholder, placeholderWord, onClear, }: {
149
+ export declare function useLengthRow(o: {
150
+ row: LengthRow;
151
+ label: string;
152
+ grid: LengthGrid;
153
+ valueKey: string;
154
+ view: PanelView;
155
+ numbersIn?: (tier: DeviceTier) => boolean;
156
+ convertTo?: (convert: (value: number) => number) => Record<string, unknown>;
157
+ followsView?: DeviceTier;
158
+ }): LengthUnitState | undefined;
159
+ export declare function Slider({ min, max, step, value, onChange, suffix, readout, notch, ariaLabel, disabled, placeholder, placeholderWord, onClear, units, }: {
149
160
  min: number;
150
161
  max: number;
151
162
  step: number;
@@ -159,6 +170,7 @@ export declare function Slider({ min, max, step, value, onChange, suffix, readou
159
170
  placeholder?: number;
160
171
  placeholderWord?: string;
161
172
  onClear?: () => void;
173
+ units?: ShellUnitChoice;
162
174
  }): import("react").JSX.Element;
163
175
  export declare function pxField(label: string, opts: {
164
176
  min: number;
@@ -180,6 +192,7 @@ export declare function pxField(label: string, opts: {
180
192
  }): CustomField<number | null>;
181
193
  interface CornersRowTier {
182
194
  sidesKey: string;
195
+ row?: LengthRow;
183
196
  step?: number;
184
197
  useFollowed: () => number;
185
198
  mark: ReactElement<MarkProps>;
@@ -189,14 +202,12 @@ export declare function cornersRowField(tier: CornersRowTier): CustomField<numbe
189
202
  export declare function useSelectedSibling(key: string): [unknown, (next: unknown) => void];
190
203
  export declare function keptBy<T = unknown>(): CustomField<T>;
191
204
  export declare function useSelectedPatch(): (patch: FieldsPatch) => void;
205
+ export declare function cornersUnitFields(row: LengthRow, reachedBy: string): Record<string, CustomField<unknown>>;
192
206
  export declare function cornerSidesField(): CustomField<string[] | null>;
193
207
  export declare function sectionCornersField(): CustomField<number | null>;
194
208
  export declare function sectionShapeFields(): Record<string, unknown>;
195
- export declare function sectionBorderField(tier: "desktop" | "tablet" | "mobile"): CustomField<SettingsBorderValue | undefined>;
196
- type PanelView = "desktop" | "tablet" | "phone";
197
209
  export declare function buttonWordsEntryField(partKey: string): CustomField<undefined>;
198
210
  export declare function cardCornersField(): CustomField<number | null>;
199
- export declare function templateField<V>(inner: CustomField<V>): CustomField<V>;
200
211
  export declare function cardShapeFields(): Record<string, unknown>;
201
212
  export declare function boxShareField(): CustomField<unknown>;
202
213
  export declare function boxBlockSpacingField(): SelectField;
@@ -221,7 +232,10 @@ export declare function boxPhoneRowField(): import("efficient-easel/screen/lib/d
221
232
  export declare function boxColumnsFields(): {
222
233
  phoneRow: import("efficient-easel/screen/lib/document/box-fields").BoxField<number>;
223
234
  };
224
- export declare function sizeField(label: string, min: number, max: number, step: number, fallback: number, role: TypeRole): CustomField<TypeSizeValue>;
235
+ export declare function sizeField(label: string, min: number, max: number, step: number, fallback: number, role: TypeRole, length?: {
236
+ row: LengthRow;
237
+ view: PanelView;
238
+ }): CustomField<TypeSizeValue>;
225
239
  export declare function cellWidthFields(): Record<string, unknown>;
226
240
  export declare function useSelectedProps(): Record<string, unknown>;
227
241
  export declare const RowPropsContext: import("react").Context<Record<string, unknown> | null>;
@@ -263,6 +277,11 @@ export declare function heightFollowedBy(view: PanelView, props: Record<string,
263
277
  value: number;
264
278
  unit: SectionHeightUnit;
265
279
  } | null;
280
+ export declare function heightLayersAt(view: PanelView, props: Record<string, unknown>, own: unknown): {
281
+ mode: SectionHeightMode;
282
+ number: boolean;
283
+ unit: boolean;
284
+ };
266
285
  export declare function followedHeightPatch(view: PanelView, props: Record<string, unknown>, base: "sectionHeightValue" | "sectionHeightUnit", next: unknown): Record<string, unknown> | null;
267
286
  export declare function stickFields(opts?: {
268
287
  intro?: boolean;
@@ -276,7 +295,6 @@ export declare function dateTime(label: string, icon?: ReactNode, hint?: string)
276
295
  export declare function date(label: string, icon?: ReactNode, hint?: string): CustomField<string>;
277
296
  export declare function toggle(label: string, fallback: boolean, icon?: ReactNode, hint?: string): CustomField<boolean>;
278
297
  export declare function pageBackgroundField(): CustomField<string>;
279
- export declare function checkbox(label: string, fallback: boolean): CustomField<boolean>;
280
298
  export declare function colorInput(label: string, fallback: string, icon?: ReactElement): CustomField<string>;
281
299
  export declare function ThemeFillRow({ label, icon, id, value, shown, onChange, }: {
282
300
  label: string;
@@ -395,6 +413,7 @@ export declare function DisplayRow({ parts, changed, shown, onPress, onReset, de
395
413
  detail?: string;
396
414
  disabledReason?: string;
397
415
  }): import("react").JSX.Element;
398
- export declare function cardImageField(): CustomField<number | null>;
416
+ export declare function cardImageField(row?: typeof CARD_IMAGE_RADIUS_ROW): CustomField<number | null>;
417
+ export declare function cardImageFields(): Record<string, CustomField<unknown>>;
399
418
  export declare function imageCornersField(): CustomField<number | null>;
400
419
  export declare function galleryLayoutField(): CustomField<string>;
@@ -1 +1 @@
1
- "use client";import{jsx as i,jsxs as L,Fragment as k}from"react/jsx-runtime";import{cloneElement as pe,createContext as nn,useContext as Ke,useEffect as on,useId as $e,useRef as z,useState as q}from"react";import{useEasel as ee,useSelectedHost as M}from"efficient-easel/easel";import{PIN_LENGTH as te,toDateKey as rn,fromDateKey as ln}from"efficient-shell/format";import{say as s,editorEaselWords as C}from"../../../format/lib/editor-words.js";import{finiteNumber as sn}from"../../../format/lib/finite-number.js";import{LOADING_SHOWS_LABELS as Xe,firstFrameHint as an,loadingShowsOf as cn,loadingStillHint as dn}from"../../../format/lib/hero-video.js";import{pageFramesFor as un,usePageVideoFrames as pn}from"../page-video-frames.js";import{ScreenDocumentContext as fn}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as je,hidableText as Ve}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as fe,LINK_FIELD_MARKER as Ye,MEDIA_FIELD_MARKER as ze,SCAFFOLD_FIELD_MARKER as qe,TEXT_FIELD_MARKER as O,foldMetaOf as he,textFieldIdentifier as hn}from"efficient-easel/draw";import mn from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as Je}from"../../../render/lib/document/show-when.js";import gn from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as bn,CORNER_RADIUS_MAX as Ze,CORNER_RADIUS_MIN as W}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as Sn,IMAGE_CORNERS_LABEL as wn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as xn}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as Cn,GALLERY_LAYOUTS as ne,GALLERY_LAYOUT_KEYS as yn,galleryChoices as Qe,galleryLayoutRatio as _n,galleryPictureCells as In}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as Tn}from"./shell-glyph.js";import{anchorSiblingsOf as On,placementPoints as En}from"../../../format/lib/hero-group-placement.js";import Rn from"../../components/AnchorField.js";import Nn from"../../components/SourceStatus.js";import{AdjustIcon as kn,EyeIcon as Pn,AnimationIcon as Fn,BackgroundIcon as et,BorderAllIcon as Ln,BlockSectionIcon as An,ColumnWidthsIcon as me,ColumnsIcon as tt,CornerIcon as nt,DirectionDownIcon as vn,DirectionLeftIcon as Bn,DirectionRightIcon as Dn,DirectionUpIcon as Hn,EditIcon as Gn,GapIcon as Mn,GridIcon as Wn,GroundIcon as ge,HashIcon as ot,HeightIcon as rt,ImageIcon as Un,ListIcon as Kn,LocationIcon as it,PaddingBottomIcon as lt,PaddingLeftIcon as st,PaddingRightIcon as at,PaddingTopIcon as be,PageIcon as $n,StickyIcon as ct,SearchIcon as Xn,SquareIcon as jn,TypeIcon as Vn,WidthIcon as Yn}from"efficient-easel/icons";import{FieldGlyph as dt}from"../../components/FieldGlyph.js";import{resolvePageBackground as zn}from"../../../format/lib/content/page-background.js";import{boxFillOf as qn,boxFillSlot as Se}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as ut,CORNER_SIDE_POINTS as Jn,hasOwnSectionCorners as Zn,normalizeCornerSides as pt}from"../../../format/lib/content/section-corners.js";import{enclosingPath as Qn,enclosingSection as eo}from"./enclosing-section.js";import{SettingsDefaultReset as y,SettingsDrill as to,SettingsField as S,SettingsGroup as no,SettingsGroupSub as oo,SettingsSegmented as ro,SettingsBorder as io,SettingsSidesEach as lo,SettingsSwitch as we,borderSides as so,borderStartEach as ao}from"efficient-easel/panel";import{ListField as co}from"efficient-easel/fields";import{DisplayChips as uo}from"efficient-shell/ui";import{desktopDisplayChanged as po,partShownOnDesktop as fo,partShownOnPhone as ho,phoneDisplayChanged as mo,withDesktopPart as go,withPhonePart as bo}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as So,Checkbox as wo,ColorSwatch as xo,CornersInput as Co,DatePicker as yo,DateTimePicker as _o,FOCAL_DEFAULT as Io,IconPicker as ft,COLUMN_COUNT_MAX as ht,COLUMN_SHARE_MIN as To,COLUMN_SHARES_EQUAL as Oo,resolveColumnShares as mt,WidthsBar as Eo,useShellStrings as Ro,IconButton as gt,InputNumber as bt,Slider as No,Tooltip as xe}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as ko}from"./geocode-resolve.js";import{ColourRow as oe,InheritedColourRow as St}from"./ColourControl.js";import{fillThemeColors as Po,slotFill as re}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Ce}from"../../../format/lib/document/part-inks.js";import{keptByRow as Fo}from"efficient-easel/screen/lib/document/style-fields";import wt from"./MarkupToolbar.js";import{deviceField as I}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Lo,NoControlMark as Ao,noControlField as xt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as vo}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as Bo,PANEL_ONLY_FIELD as Do}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as Ho,resolvePhoneValue as ye}from"../../../format/lib/document/phone-override.js";import{phoneKey as U,tabletKey as _e}from"efficient-easel/draw";import{viewKey as E}from"../../../format/lib/animation/views.js";import{viewRows as A}from"../animation/view-rows.js";import{SuppressibleText as Go}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Mo,CARD_OUTLINE_OPTIONS as Wo,DEFAULT_CARD_INDEX_FORMAT as Uo,DEFAULT_CARD_OUTLINE as Ko}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as $o,DEFAULT_COVER_INDEX as Xo}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as jo}from"efficient-easel/draw";import Vo from"../../components/MediaUploadField.js";import Yo from"../../components/MultiSelectField.js";import zo from"../../components/SectionThemePicker.js";import qo from"../../components/SearchSelectField.js";import Jo from"../../components/StorefrontLinkField.js";import{UiIcon as Ct}from"efficient-easel/draw/client";import{SECTION_PADDING as R}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Zo}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Qo}from"efficient-easel/draw/client";import{encodePartId as er}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as tr,useEaselStrings as nr}from"efficient-easel/strings";import{hasPhoneHeight as or,hasTabletHeight as Ie,resolveSectionMinHeight as rr,resolveTabletHeight as ir}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as lr,SECTION_PIN_ABOVE_HINT as sr,SECTION_PIN_ABOVE_KEY as ar,SECTION_PIN_ABOVE_LABEL as cr,SECTION_PIN_GROUP as dr,SECTION_PIN_LABEL as yt,SECTION_PIN_SCREENS_KEY as Te,SECTION_PIN_SCREENS_LABEL as _t,SECTION_PIN_STOP_DEFAULT as ur,SECTION_PIN_STOP_HINT as pr,SECTION_PIN_STOP_KEY as fr,SECTION_PIN_STOP_LABEL as hr,SECTION_PIN_STOP_OPTIONS as mr,SECTION_STICK_DISTANCE as ie,SOME_VIEW_PINS as It,hasPhoneStick as gr,hasTabletStick as br,resolveSectionStick as Oe,sectionPinStopOf as Sr,sectionPinStopWrite as wr}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as xr,SECTION_MIN_HEIGHT_GROUP_LABEL as J,SECTION_SCREEN_PCT as Cr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as yr,resolveContainerDirection as Tt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as _r,BOX_BLOCK_SPACING_POINTS as Ot,BOX_PHONE_ROW_LABEL as Et,BOX_COLUMNS_MAX as Ir,BOX_COLUMNS_MIN as Rt,BOX_PHONE_ROW_MAX as Tr,BOX_PHONE_ROW_MIN as Ee,BOX_SHARE_CHOICES as Nt,BOX_SHARE_LABEL as K,boxShareChoiceOf as kt,boxShareWidthsOf as Re,BOX_SHARE_PHONE_DEFAULT as Or,BOX_SHARE_PHONE_POINTS as Er}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as v}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as Rr,borderBySide as Pt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as Nr,normalizeTheme as Ft,normalizeThemeColors as kr,sectionBandTone as Pr,surfaceTwoTone as Fr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Lt,CONTAINER_GAP_BUILT_IN as Lr,CONTAINER_GAP_PHONE as Ne,GAP_FIELD_CONTAINER as ke,followsSitePhoneGap as Ar,hasOwnContainerGap as vr,hasOwnPhoneGap as Pe,resolveContainerGap as At,resolvePhoneContainerGap as vt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as Br,CARD_IMAGE_BG_OFF as Dr,CARD_IMAGE_BG_SWATCH_NAMES as Hr,CARD_IMAGE_BG_SWATCHES as Gr,isCardImageBackgroundInheriting as Mr,cardImageBackgroundChoice as Wr,THEME_CARD_IMAGE_BG as Ur}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Kr,SECTION_BG_NO_FILL as $r,sectionBackgroundChoice as Xr,THEME_SECTION_BG as Fe,isSectionBackgroundEmpty as jr,sectionBackgroundHex as Bt}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Vr,nestedAccentValue as Dt,resolveSectionAccent as le}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Yr,TYPE_SIZE_INHERIT as zr,isTypeSizeInheriting as qr}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Jr,WIDTH_CHOICE_LABEL as Zr,WIDTH_INHERIT as Qr}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as ei}from"./panel-heading-scope.js";import{useEaselSession as ti}from"efficient-easel/screen/lib/session-context";import{backendOf as ni}from"../website-session.js";import{BOX_GAP as oi,describedAs as N,group as T,iconOf as $,sharedStyleKinds as Z}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Ht,onDesktopWords as B,phoneTwinFields as Le}from"efficient-easel/screen/lib/document/box-fields";import{directionField as ri,gapField as Ae,iconPickerRow as ii,pickerCellIcon as li,pickerNoneIcon as si,Segmented as ve,segmented as ai,select as X,slider as j}from"./box-fields.js";function sa({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?s(e):e})}function D(e,t){return s("{value} from {from}",{value:e,from:t})}function ci(){const{blockGap:e}=v();return e===null?s("this container's own spacing"):D(`${e}px`,s("Styles"))}function di({inherited:e,onReset:t,label:n}){return i(y,{words:C()?.panel,label:s(n),changed:!e,detail:ci(),onReset:t})}function ui(e){return Ae({...oi,builtIn:Lr[e],resolve:(t,n)=>At(e,t,n?.siteGap),action:(t,n)=>i(di,{inherited:!vr(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[ke]:e}})}function pi(e){return Je(I("mobile",{[ke]:e,type:"custom",render:t=>i(mi,{container:e,...t})}),Gt)}function fi(e){return Je(I("tablet",{[ke]:e,type:"custom",render:t=>i(hi,{container:e,...t})}),Gt)}const Gt={not:{field:"gap",in:Array.from({length:-Lt.min},(e,t)=>Lt.min+t)}};function aa(e){return{gap:I("desktop",ui(e)),[_e("gap")]:fi(e),[U("gap")]:pi(e)}}function hi({container:e,...t}){const[n]=P("gap"),{siteGap:o}=t.field??{},r=Math.max(Ne.min,At(e,n,o));return Ae({...Ne,builtIn:r,resolve:a=>Pe(a)?a:r,action:(a,c)=>i(y,{words:C()?.panel,label:s("Gap"),changed:Pe(a),detail:B(d=>s(d),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function mi({container:e,...t}){const[n]=P("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},l=vt(e,void 0,n,o,r);return Ae({...Ne,builtIn:l,resolve:c=>vt(e,c,n,o,r),action:(c,d)=>i(y,{words:C()?.panel,label:s("Gap"),changed:Pe(c),detail:D(`${l}px`,Ar(e,n,r)?s("Styles"):s("Desktop")),onReset:()=>d(void 0)})}).render(t)}function ca(e){return ri({offered:yr(e),fallback:Tt(e,void 0),resolve:t=>Tt(e,t)})}function da(e,t){return En(t?On(e,t):[],t)}function gi({inherited:e,onReset:t,label:n}){return i(y,{words:C()?.panel,label:s(n),changed:!e,detail:D(s("Full"),s("the page")),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:l,hideable:a=!0,markup:c=!0}){const{text:d,hidden:p}=je(e),h=z(null),f=z(null),u=_=>t(a?{text:_,hidden:p}:_),g=()=>t({text:d,hidden:!p}),m=a&&p,w=$e(),x=r?Ci(r)?i("span",{className:"sf-hint-while-typing",children:s(r)}):s(r):void 0,b=p?s("Show {label} on the slide",{label:s(n)}):s("Hide {label} on the slide",{label:s(n)});return i(S,{label:s(n),icon:i(Vn,{}),htmlFor:w,className:m?"is-hidden":void 0,hint:x,action:a?i(xe,{content:b,children:i(gt,{"aria-pressed":p,"aria-label":b,onClick:g,children:p?i(Ct,{name:"eye-off",size:14}):i(Ct,{name:"eye",size:14})})}):void 0,children:L("div",{className:"sf-copybox",children:[c&&i(wt,{target:l?f:h,value:d,onChange:u}),l?i("textarea",{id:w,ref:f,value:d,placeholder:o===void 0?void 0:s(o),onChange:_=>u(_.target.value)}):i("input",{id:w,ref:h,type:"text",value:d,placeholder:o===void 0?void 0:s(o),onChange:_=>u(_.target.value)})]})})}function ua(e,t){return{...e,[qe]:t}}function pa(e){const t=e[O];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[O]:{...t,offPage:!0}}}function fa(e){return!e||typeof e!="object"?!1:e[O]?.offPage===!0}function ha(e){if(!e[O])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Do]:!0}}function ma(e){return Bo(e)}function ga(e){const t=e[O];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[O]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as Nc,SCALAR_TEXT_CONTROLS as kc}from"efficient-easel/draw";function ba(e,t){if(!e[O])throw new Error("inOwnBox: the field holds no authored text");const{[Lo]:o,...r}=e;return{...r,[vo]:!0,render:t}}const bi=new Set(jo),Q={type:"radio",options:[{value:!0},{value:!1}]},Mt={text:{type:"object",objectFields:{text:{type:"text"},hidden:Q}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:Q}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},G=(e,t)=>{const n=N({...t,[O]:e},{...Mt[e.control],label:e.label});if(!bi.has(e.control))return n;const o=t.render;return{...xt(n,"authored-copy"),render:r=>i(Go,{name:r.name,children:o(r)})}},Sa="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Si={field:"source.slug",set:!0},wa={not:Si},wi="Select a word, then press the highlighter.",xi=new Set([wi]),Ci=e=>xi.has(e);function xa(e,t,n){return G({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n})})}function Ca(e,t,n){return G({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0})})}function ya(e,t,n){return G({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function _a(e,t,n){return G({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,hideable:!1})})}function Ia(e){return{type:"custom",[Ye]:{label:e},...N({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(Jo,{value:Ve(t),onChange:n,label:e})}}function Ta(e,t,n){return G({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}const Oa={Design:kn,Animation:Fn};function Ea(e){return{type:"custom",render:()=>i(yi,{text:e})}}function yi({text:e}){return i("p",{className:"sf-note",children:s(e)})}function Ra(e){return he(e)!==null&&e?.tabs!==void 0}const Wt=new Map;function Na(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Wt.get(n)??{type:"custom",tabs:t,[fe]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(k,{})};return Wt.set(n,o),o}const Ut=new Map;function ka(e){const t=Ut.get(e)??{type:"custom",[fe]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(k,{})};return Ut.set(e,t),t}function _i(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Pa(e,t){return _i(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(k,{})}}function Fa(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(k,{})}}function La({title:e,children:t}){const[n,o]=q(()=>!Be.has(e));return i(no,{title:e,open:n,onToggle:r=>{o(r),r?Be.delete(e):Be.add(e)},children:t})}const Be=new Set;function Aa({label:e}){return i(oo,{title:s(e),level:ei(2)})}function Ii({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),l=r?o?.[r]:void 0,a=l?s(l):t;return L("div",{className:"sf-swatches",children:[e.map(c=>{const d=o?.[c]?s(o[c]):c;return i(xe,{content:d,children:i(xo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":d})},c)}),i("span",{className:"sf-swatch-hex",children:a})]})}function va(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(Ti,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Ti({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const l=typeof o=="string"?o:void 0,{colors:a,n:c}=Me(),d={background:a.background,surface:a.surface,surface2:Fr(a),band:Pr(a)},p=n?Fe:t,h=jr(l,t,p),f=Bt(void 0,p,d),u=n?Kr:void 0,g=p===Fe?s("the theme's section background"):s("Theme {n} background",{n:c}),m=Oi(l,t,a,c,d,r),w=D(f.toUpperCase(),g),x=Ce(l),b=x?re(x,a,c):null;return b?i(oe,{label:s(e),icon:i(et,{}),value:b.hex,caption:b.words,onChange:r,changed:!0,onReset:()=>r(u),resetTo:w,choices:m}):i(St,{label:s(e),icon:i(et,{}),value:h?"":Bt(l,t,d),inherited:f,resetTo:w,onChange:r,onReset:()=>r(u),choices:m})}function Oi(e,t,n,o,r,l){const a=Xr(e,t);return[{label:s("No fill"),color:"",selected:a==="none",onPick:()=>l($r)},{label:`${s("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:a==="band",onPick:()=>l(Fe)},...Ge(Ce(e)??"",n,o,l)]}function Ei(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,l=Mr(r,t);return i(S,{label:s(e),icon:i(ge,{}),changed:!l,action:i(y,{words:C()?.panel,label:s(e),changed:!l,detail:s("the theme's image stage"),onReset:()=>o(Br)}),children:Ii({swatches:Gr,current:l?Ur:Wr(r,t),onPick:o,names:Hr})})}}}function Ba(e=n=>n,t){return Z({_gSectionTheme:T(Vr),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(zo,{value:e(n),onChange:o,followLabel:t})}})}function V({min:e,max:t,step:n,value:o,onChange:r,suffix:l="",readout:a=!0,notch:c,ariaLabel:d,disabled:p=!1,placeholder:h,placeholderWord:f,onClear:u}){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(No,{min:e,max:t,step:n,value:o,...o===null&&h!==void 0?{placeholderValue:h}:{},...f?{emptyLabel:s(f)}:{},suffix:l||void 0,showInput:a,label:d===void 0?void 0:s(d),disabled:p,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:m=>{m===null?u?.():m!==o&&r(m)}})})}function Kt(e,t){const{min:n,max:o,step:r=1,unsetLabel:l,hint:a,restTrack:c,unsetMark:d,icon:p,unit:h="px"}=t;return{type:"custom",render:({value:f,onChange:u})=>{const g=typeof f=="number"?f:null,m=g===null;return i(S,{label:s(e),icon:p?$(p):void 0,value:m?d||l===void 0?void 0:s(l):`${g}${h}`,changed:!m,action:d?pe(d,{changed:!m,onReset:()=>u(null)}):i(y,{words:C()?.panel,label:s(e),changed:!m,onReset:()=>u(null)}),hint:typeof a=="string"?s(a):a,children:c?c({min:n,max:o,step:r,px:g,label:e,onChange:u}):V({min:n,max:o,step:r,value:g??n,readout:!1,ariaLabel:e,onChange:u})})}}}const se="Corners";function De(e){return{type:"custom",render:({value:t,onChange:n})=>{const o=typeof t=="number"&&Number.isFinite(t)?t:null,r=o!==null;return i(S,{label:s(se),icon:i(nt,{}),changed:r,action:pe(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(Ni,{tier:e,px:o,onRadius:n})})}}}function P(e){const t=M();return[t?.values?.[e],n=>t?.onChange(e,n)]}function $t(){return xt({type:"custom",render:()=>i(Ao,{})},"always")}function Ri(){const e=M();return t=>e?.onChangeMany(t)}function Ni({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,l]=P(e.sidesKey),a=pt(r)??[...ut];return i(Co,{label:s(se),value:a,corners:Jn,onChange:c=>{const d=pt(c)??[];l(d.length===ut.length?null:d)},radius:t,onRadiusChange:n,radiusMin:W,radiusMax:Ze,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function Xt(){return $t()}function ki({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=v(),r=typeof o=="number"?`${o}px`:s("not set");return i(y,{words:C()?.panel,label:s(e),changed:t,detail:o==null?s("the built-in corners"):D(r,s("Styles")),onReset:n})}function Pi(){const{cornerRadiusPx:e}=v();return typeof e=="number"?e:W}function Fi(){return De({sidesKey:"sectionCornerSides",useFollowed:Pi,mark:i(ki,{label:se}),hint:Li})}const Li="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function Da(){return Z({_gShape:T("Shape"),sectionCorners:Fi(),sectionCornerSides:Xt(),...A("sectionBorder",jt)})}const Ai=()=>({width:s("Border width"),sides:{top:s("Border top"),right:s("Border right"),bottom:s("Border bottom"),left:s("Border left")},style:s("Border style"),styles:{solid:s("Solid"),dashed:s("Dashed"),dotted:s("Dotted")},color:s("Border color"),unit:"px"});function vi(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Bi(){let e;try{const t=Ft(v().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Nr.line}function Di({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:l=!0,above:a={}}){const c=e&&typeof e=="object"?e:{},[d,p]=q(()=>r?ao(c,a):!1),h=Ai(),f=u=>vi(r&&l?u:{width:u.width,color:u.color,...l?{style:u.style}:{}});return i(S,{label:s("Border"),icon:i(Ln,{}),action:r?i(lo,{each:d,label:s("Each side"),onChange:p}):void 0,children:i(io,{label:s("Border"),value:c,each:d,onChange:u=>t(f(u)),placeholder:n,presets:o,words:h,styles:l,max:Rr})})}function Hi({value:e,onChange:t,view:n}){const[o]=P("sectionBorder"),[r]=P(_e("sectionBorder")),l=Bi(),a=d=>d&&typeof d=="object"?d:{},c=n==="phone"?{...Pt(a(o)),...Pt(a(r))}:n==="tablet"?a(o):{};return i(Di,{value:e,onChange:t,placeholder:{sides:so(c),style:c.style??"solid",color:c.color||l},presets:[l],above:c})}function Ha(e){return I(e,jt(e==="mobile"?"phone":e))}function jt(e){return{type:"custom",render:({value:t,onChange:n})=>i(Hi,{value:t,onChange:n,view:e})}}function Ga(e){return{type:"custom",render:()=>i(Gi,{partKey:e})}}function Gi({partKey:e}){const[t]=P("id"),[n]=P("_partStyles"),{textStyles:o}=v(),r=nr();let l=null;try{l=Qo().select}catch{l=null}const a=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(to,{name:s("Text"),preview:Zo(a,c,{noStyle:s("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??tr.copy.panel).cases}),onOpen:()=>{l&&typeof t=="string"&&l(er(t,e))}})}function Vt(e){const{cornerRadiusPx:t}=v(),n=typeof t=="number"?t:e;let o=null;try{const{appState:l,selectedItem:a}=ee(d=>d),c=a?.props?.id?String(a.props.id):void 0;o=c?eo(l?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Zn(r)?r:n}function Mi({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Vt(W);return i(y,{words:C()?.panel,label:s(e),changed:t,detail:D(`${o}px`,s("the section")),onReset:n})}function Wi(){return i(k,{children:s("Follows the section's Corners until you set a number here.")})}function Ui(){return De({sidesKey:"cardCornerSides",useFollowed:()=>Vt(W),mark:i(Mi,{label:se}),hint:i(Wi,{})})}function Ki(){return{type:"custom",render:()=>i(mn,{})}}function Ma(e){return{...e,render:t=>i(gn,{render:e.render,props:t})}}function Wa(){return{_gShape:T("Shape"),cardCorners:Ui(),cardCornerSides:Xt(),cardCornersApplyAll:Ki()}}function $i(){return N({type:"custom",render:e=>i(ji,{...e})},{type:"select",label:K,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 Xi(e,t){const n=kt(e);if(n!=="custom")return s(Nt.find(r=>r.value===n)?.label??"");const o=mt(Re(e,t),t);return o?[...o,100-o.reduce((r,l)=>r+l,0)].join(" / "):s("Custom")}function ji(e){const{value:t,onChange:n}=e,[o]=P("content"),r=Array.isArray(o)?o.length:0,l="follows"in e,a=t!=null,c=a?t:l?e.follows:void 0,d=kt(c),p=r>=2&&r<=ht,h=()=>[...Oo[r]??[]],f=z(null),u=b=>{const _=f.current;_&&JSON.stringify(b)===JSON.stringify(_.shares)?n(_.value):b&&n(b)},g=b=>{b===d||b==="custom"&&!p||n(b==="custom"?h():b)},m=s("The width bar works for 2 to {count} blocks.",{count:ht}),w=a&&(l||t!=="content"),x=Ro().widths.hint(r,To);return i(S,{label:s(K),icon:i(me,{}),changed:w,hint:d!=="custom"?void 0:p?x:m,action:i(y,{words:C()?.panel,label:s(K),changed:w,disabled:e.readOnly===!0,detail:l?B(b=>s(b),Xi(e.follows,r),e.followsView):s("Fit content"),onReset:()=>n(void 0)}),children:L("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(ft,{label:s(K),value:d,options:Nt.map(b=>({value:b.value,label:b.value==="custom"&&!p?m:s(b.label),icon:li(i("span",{className:"sf-gallery-pic sf-share-pic",children:Yt(b.weights).map((_,Y)=>i("i",{style:{gridColumn:`span ${_}`}},Y))}),s(b.label),b.value==="custom"&&!p?m:s(b.label))})),onChange:g,columns:3,cell:zt,tooltips:!1,disabled:e.readOnly===!0})}),d==="custom"&&p?i("div",{onFocus:()=>{f.current={value:t,shares:mt(Re(c,r),r)}},onBlur:()=>{f.current=null},children:i(Eo,{label:s(K),count:r,value:Re(c,r),onChange:u,readOnly:e.readOnly===!0})}):null]})})}function Yt(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 Ua(){return X(_r,i(Mn,{}),Ot,Ot[0].value)}function Ka(){return I("mobile",ii(K,i(me,{}),Er.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:Yt(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),Or,{columns:2,cell:zt}))}const zt={width:"5.75rem",height:"3.25rem"};function $a(){return Le("share",$i(),Ht)[_e("share")]}function Vi(){return I("mobile",j(Et,i(tt,{}),Ee,Tr,1,Ee,"",{clear:{phoneFollows:!1,hint:Ee}}))}const qt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Xa(){const e=j(Et,i(tt,{}),Rt,Ir,1,Rt,"",{clear:{emptyLabel:"Auto"}}),t=Le("columns",e,{...qt,tablet:Ht.tablet}),n=Le("columns",e,qt,{phoneRow:Vi()});return{...t,phoneRow:n.phoneRow}}function ja(e,t,n,o,r,l){return{type:"custom",render:({value:a,onChange:c})=>i(S,{label:s(e),icon:i(dt,{noun:l}),action:i(y,{words:C()?.panel,label:s(e),changed:!qr(a),detail:s("the Text style in Styles"),onReset:()=>c(zr),defaultAction:{onPress:()=>c(Yr),title:s("Keep this section's own built-in size"),icon:i(An,{})}}),children:V({min:t,max:n,step:o,value:typeof a=="number"?a:r,suffix:"px",ariaLabel:e,onChange:c})})}}function Va(){return{_gCellWidth:T("Cell width"),gridSpan:X("Positions",i(me,{}),[{label:"Auto",value:""},...Array.from({length:xn},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function F(){let e=null,t=null;try{e=Ke(Yi),t=ee(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Yi=nn(null);function zi({min:e,max:t,step:n,px:o,label:r,onChange:l,desktopKey:a,fallback:c}){const d=F()[a],p=ye(void 0,d,c);return i(k,{children:V({min:e,max:t,step:n,value:ye(o,d,c),readout:!1,ariaLabel:r,notch:p,onChange:l})})}function qi({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:l=()=>{}}){const a=F()[t],c=ye(void 0,a,n);return i(y,{words:C()?.panel,label:s(e),changed:r,detail:B(d=>s(d),`${c}${o}`),onReset:l})}function Ji(e){return Kt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(qi,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(zi,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Zi={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Qi={Top:be,Bottom:lt,Left:st,Right:at},el=e=>{const t=Qi[e];return i(t,{})};function Ya(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=x=>Zi[x],l=x=>j(r("Top"),i(be,{}),R.min,R.max,R.step,x,"px"),a=(x,b,_,Y=R)=>I("mobile",Ji({label:r(x),icon:el(x),desktopKey:b,min:Y.min,max:Y.max,step:Y.step,fallback:_})),c=e.top??R.min,d=e.bottom??R.min,p="sectionPaddingLeft",h="sectionPaddingRight",f=e.sideBounds??R,u=e.side??f.min,g=e.sidePhone??u,m=e.phone===!0,w=x=>m?I("desktop",x):x;return Z({...o?{_gSpacing:T("Padding")}:{},[t]:w(l(c)),...m?{[U(t)]:a("Top",t,c)}:{},...e.only==="top"?{}:{[n]:w(j(r("Bottom"),i(lt,{}),R.min,R.max,R.step,d,"px")),...m?{[U(n)]:a("Bottom",n,d)}:{}},...e.sides?{[p]:w(j(r("Left"),i(st,{}),f.min,f.max,f.step,u,"px")),...m?{[U(p)]:a("Left",p,g,f)}:{},[h]:w(j(r("Right"),i(at,{}),f.min,f.max,f.step,u,"px")),...m?{[U(h)]:a("Right",h,g,f)}:{}}:{}})}function za(e,t){const n=Object.fromEntries(Object.entries(t).map(([l,a])=>[l,l in e&&he(a)?e[l]:a])),o={};let r=!1;for(const[l,a]of Object.entries(e)){if(l in t){r||Object.assign(o,n),r=!0;continue}o[l]=a}return r||Object.assign(o,n),o}const ae="Width";function qa(e,t=Jr,n=!0){const o=t.map(r=>({label:Zr[r],value:r}));return Z({...n?{_gWidth:T(ae)}:{},widthMode:{type:"custom",render:({onChange:r,field:l})=>i(S,{label:s(ae),icon:i(Yn,{}),action:n?i(gi,{inherited:l?.inherited??!1,onReset:()=>r(Qr),label:ae}):void 0,children:ve({options:o,value:l?.currentValue||e,onChange:r,ariaLabel:ae})})}})}function Ja(){const e=(o,r)=>({type:"custom",render:({value:l,onChange:a})=>i(tl,{value:l,onChange:a,view:o,badge:r})}),t=o=>({type:"custom",render:({value:r,onChange:l,field:a})=>i(ol,{value:r,onChange:l,unit:a?.unit,view:o})}),n=o=>{const r=ai("Unit",i(ot,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");if(o==="desktop")return r;const l=r.render;return{...r,render:a=>i(rl,{props:a,draw:l,view:o})}};return Z({_gHeight:T(J),...A("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>i(il,{view:o,onClear:()=>r(void 0)}))),...A("sectionHeightValue",t),...A("sectionHeightUnit",n)})}function tl({value:e,onChange:t,view:n,badge:o}){const r=F(),l=c=>["auto","fixed","screen"].includes(c),a=ce(n,r)?.mode??"auto";return i(S,{label:J,icon:$(i(rt,{})),action:o?o(t):void 0,children:ve({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:l(e)?e:a,onChange:t,ariaLabel:J})})}function Jt(e,t){return e==="phone"&&Ie(t)?ir(t):rr(t)}function ce(e,t){return e==="desktop"||(e==="tablet"?Ie(t):or(t))?null:Jt(e,t)}function nl(e,t,n,o){const r=ce(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[E("sectionHeightMode",e)]:r.mode,...r.mode==="fixed"?{[E("sectionHeightUnit",e)]:r.unit}:{},...n==="sectionHeightUnit"?{[E("sectionHeightValue",e)]:r.value}:{},[E(n,e)]:o}}function Zt(e,t,n){const o=M(),r=ce(e,F());return!o||!r?{followed:null,write:n}:{followed:r,write:a=>o.onChangeMany(c=>{const d=nl(e,c,t,a);return d===null?{[E(t,e)]:a}:Object.keys(d).length?d:null})}}function ol({value:e,onChange:t,unit:n,view:o}){const{followed:r,write:l}=Zt(o,"sectionHeightValue",t),a=(r?r.unit:n)==="%"?"%":"px",c=a==="%"?Cr:xr;return i("div",{className:"sf-field",children:V({min:c.min,max:c.max,step:c.step,value:r?null:typeof e=="number"?e:c.fallback,...r?{placeholder:r.value}:{},suffix:a,ariaLabel:J,onChange:l})})}function rl({props:e,draw:t,view:n}){const{followed:o,write:r}=Zt(n,"sectionHeightUnit",e.onChange);return t({...e,...o?{value:void 0,storedValue:void 0,follows:o.unit}:{},onChange:r})}function il({view:e,onClear:t}){const n=F(),o=ce(e,n)===null,r=e==="phone"&&Ie(n),l=Jt(e,n),a=B(c=>s(c),l.mode==="auto"?s("Auto"):`${l.value}${l.unit}`,r?"tablet":"desktop");return i(y,{words:C()?.panel,label:s(J),changed:o,detail:a,onReset:t})}function Za(e={}){const t=e.intro===!0,n=l=>({type:"custom",render:({value:a,onChange:c,id:d,name:p})=>i(pl,{value:a,onChange:c,labelId:`${d??p??"stickTop"}-label`,view:l,intro:t})}),o=l=>({type:"custom",render:({value:a,onChange:c})=>i(cl,{value:a,onChange:c,view:l,intro:t})}),r=l=>({type:"custom",render:({value:a,onChange:c})=>i(dl,{value:a,onChange:c,view:l,intro:t})});return{_gStick:T(dr,{dot:t?al:It}),...A("stickTop",n),...A("stickTopDistance",o),...e.screens?A(Te,r):{},...t?{}:{[fr]:ll()},...t||e.above===!1?{}:{[ar]:sl()}}}function ll(){const e=X(hr,i(be,{}),mr,ur);return I("desktop",{...e,render:t=>{const n=e.render({...t,value:Sr(t.value),onChange:o=>t.onChange(wr(o))});return pe(n,{hint:s(pr)})}})}function sl(){const e=tn(cr,!1,i(ct,{}),sr);return I("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const al={any:[It,lr]};function Qt(e,t,n,o){const r=M(),l=F(),a=e==="desktop"||de(e,l)?null:He(e,Oe(l,{intro:o}));return{followed:a,write:a&&r?d=>r.onChangeMany(p=>{const h=ul(e,p,d,t,o);return h===null?{[E(t,e)]:d}:Object.keys(h).length?h:null}):n}}function cl({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=Qt(n,"stickTopDistance",t,o);return i("div",{className:"sf-field",children:V({min:ie.min,max:ie.max,step:ie.step,value:r?null:typeof e=="number"?e:ie.fallback,...r?{placeholder:r.distance}:{},suffix:"px",ariaLabel:s("Distance from top"),onChange:l})})}function dl({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:l}=Qt(n,Te,t,o);return i(S,{label:s(_t),icon:$(i(rt,{})),children:V({min:te.min,max:te.max,step:te.step,value:r?null:sn(e)??te.default,...r?{placeholder:r.screens}:{},ariaLabel:s(_t),onChange:l})})}function de(e,t){return e==="tablet"?br(t):gr(t)}function He(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,screens:t.desktopScreens}}function ul(e,t,n,o="stickTopDistance",r=!1){if(e==="desktop"||de(e,t))return null;if(n===void 0)return{};const l=He(e,Oe(t,{intro:r})),a=e==="phone"&&de("tablet",t)?d=>E(d,"tablet"):d=>d,c=(d,p)=>t[a(d)]==null?{}:{[E(d,e)]:p};return{[E("stickTop",e)]:!0,...c("stickTopDistance",l.distance),...c(Te,l.screens),[E(o,e)]:n}}function pl({value:e,onChange:t,labelId:n,view:o,intro:r}){const l=F(),a=Oe(l,{intro:r}),c=o==="phone"?a.phone:o==="tablet"?a.tablet:r?a.desktop:e===!0,d=o==="phone"&&a.ownTablet,p=o==="desktop"?null:He(o,a),h=p?.on?`${p.distance}px`:s("Off");return i(S,{label:s(yt),labelId:n,icon:$(i(ct,{})),action:L(k,{children:[o!=="desktop"?i(y,{words:C()?.panel,label:s(yt),changed:de(o,l),detail:B(f=>s(f),h,d?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(we,{checked:c,onChange:t,ariaLabelledBy:n})]})})}const en="e.g. about";function Qa(){return{_gAnchor:T("Anchor"),anchor:G({control:"plainText",label:"Name",placeholder:en},{type:"custom",render:({value:e,onChange:t})=>i(Rn,{value:e,onChange:t,nameBox:(n,o)=>i(H,{value:n,onChange:o,label:"Name",placeholder:en,hideable:!1,markup:!1})})})}}function ec(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:a})=>{const c=`${l??a??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return i(S,{label:s(e),icon:t,htmlFor:c,hint:n===void 0?void 0:s(n),children:i(_o,{id:c,value:Number.isFinite(d)?new Date(d):null,onChange:p=>r(p?p.toISOString():"")})})}}}function tc(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:l,name:a})=>{const c=`${l??a??e}-date`;return i(S,{label:s(e),icon:t,htmlFor:c,hint:n===void 0?void 0:s(n),children:i(yo,{id:c,value:ln(typeof o=="string"?o:null),onChange:d=>r(d?rn(d):"")})})}}}function tn(e,t,n,o){return{type:"custom",...N({},{...Q,label:e}),render:r=>{const{value:l,onChange:a,id:c,name:d}=r,p="follows"in r,h=r,f=typeof l=="boolean",u=typeof h.follows=="boolean"?h.follows:t,g=f?l:p?u:t,m=`${c??d??e}-label`,w=h.readOnly===!0,x=i(we,{checked:g,onChange:a,disabled:w,ariaLabelledBy:m});return i(S,{label:s(e),labelId:m,icon:n,hint:o===void 0?void 0:s(o),action:p?L(k,{children:[i(y,{words:C()?.panel,label:s(e),changed:f,detail:h.followsNoView?s(u?"On":"Off"):B(b=>s(b),s(u?"On":"Off"),h.followsView),disabled:w,onReset:()=>a(void 0)}),x]}):x})}}}function nc(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(fl,{label:"Background",icon:i($n,{}),id:r,value:e,shown:zn(e),onChange:t})}}}function oc(e,t){return{type:"custom",...N({},{...Q,label:e}),render:({value:n,onChange:o,id:r})=>{const l=typeof n=="boolean"?n:t,a=`${r??e}-checkbox`;return i(S,{label:s(e),htmlFor:a,className:"sf-checkbox",action:i(wo,{id:a,checked:l,onChange:o})})}}}function rc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(oe,{label:s(e),icon:n,value:o||t,onChange:r})}}function fl({label:e,icon:t,id:n,value:o,shown:r,onChange:l}){const{colors:a,n:c}=Me(),d=Ce(o),p=d?re(d,a,c):null;return i(oe,{label:s(e),icon:t,id:n,value:p?p.hex:r,caption:p?.words,onChange:l,choices:Ge(d??"",a,c,l)})}function ic(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(hl,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function Ge(e,t,n,o){const r=Se(e);return Po(t,n).map(l=>({label:l.label,color:l.value,selected:r===l.name,onPick:()=>o(l.name)}))}function hl({value:e,onChange:t,twin:n}){const{colors:o,n:r}=Me(),l=o.background,a=D(l.toUpperCase(),s("Theme {n} background",{n:r})),c=Se(e),d=c?re(c,o,r):null,p=Ge(e,o,r,t),h=n?()=>t(void 0):()=>t("");let f=l,u=a;if(n){const g=Se(n.follows),m=qn(n.follows),w=g?re(g,o,r):m?{hex:m,words:m.toUpperCase()}:null;f=w?.hex??l,u=B(x=>s(x),w?w.words:a,n.view)}return d?i(oe,{label:s("Fill"),icon:i(ge,{}),value:d.hex,caption:d.words,onChange:t,changed:!0,onReset:h,resetTo:u,choices:p}):i(St,{label:s("Fill"),icon:i(ge,{}),value:e,inherited:f,resetTo:u,onChange:t,onReset:h,choices:p})}function ml(e,t,n){if((e?.content??[]).some(a=>a?.props?.id===t))return le(n);const r=Qn(e,t);if(r.length===0)return null;const l=le(Dt(n));if(l!==null)return l;for(let a=r.length-1;a>0;a-=1){const c=le(Dt(r[a].sectionAccent));if(c!==null)return c}return le(r[0].sectionAccent)}function Me(){const e=Ft(v().theme),[t]=P("sectionAccent");let n=null;try{const{appState:r,selectedItem:l}=ee(c=>c),a=l?.props?.id?String(l.props.id):void 0;n=a?ml(r?.data,a,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:kr(e.themes[o]),n:o+1}}const gl=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function bl({label:e,value:t,onChange:n,points:o=gl}){const r=o.map(l=>({...l,label:s(l.label),...l.title?{title:s(l.title)}:null}));return i(So,{label:s(e),value:t,points:r,onChange:n})}function lc(){return $t()}const sc={top:i(Hn,{}),right:i(Dn,{}),bottom:i(vn,{}),left:i(Bn,{})};function ac(e,t,n,o,r,l,a){const c=f=>t.find(u=>u.value===f),d=f=>({value:f,label:"",disabled:!0,title:o}),p=f=>{const u=t.find(m=>m.cell===f);if(!u)return d(`missing-${f}`);const g=l?.[f];return g?{value:u.value,label:u.label,icon:g}:{value:u.value,label:u.label}},h=[d("corner-top-left"),p("top"),d("corner-top-right"),p("left"),d("centre"),p("right"),d("corner-bottom-left"),p("bottom"),d("corner-bottom-right")];return{type:"custom",render:({value:f,onChange:u})=>{const g=t.some(m=>m.value===f)?f:n;return i(S,{label:s(e),icon:r,value:c(g)?.label?s(c(g).label):a?s(a):"",children:bl({label:e,value:g,onChange:u,points:h})})}}}function cc(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:l})=>i(Yo,{label:e,options:(l.options??t).map(a=>({...a,label:s(a.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:s(n)}:{}})}}function dc(e,t,n,o){return{type:"custom",options:t,fallback:n,...N({},{type:"select",label:e}),render:({value:r,onChange:l,field:a})=>i(qo,{label:e,options:(a.options??t).map(c=>({...c,label:s(c.label)})),fallback:a.fallback??n,value:r,onChange:l,placeholder:o===void 0?void 0:s(o)})}}function uc(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 fc(e,t,n){const o=Object.keys(Xe).map(r=>({label:Xe[r],value:r,picture:n[r]}));return{type:"custom",...N({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(wl,{label:e,icon:t,options:o,onChange:r})}}function Sl(e,t,n){const o=an(e,t,n);if(o!==void 0)return o==="save-makes-frame"?s("A frame is made from this video when you save the page."):o==="starts-dark"?s("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"?s("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"?s("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"?s("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"?s("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=dn(e);return r==="frame-missing-image"?s("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?s("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?s("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?s("No image yet. The slide shows its background colour until you choose one."):void 0}function wl({label:e,icon:t,options:n,onChange:o}){const r=M(),l=r?.values??{},a=cn(l),c=Ke(fn),d=pn(c?.docId??null);let p=null;try{p=ee(f=>f.appState.data)}catch{p=null}const h=un(r?.id,p,d);return i(S,{label:s(e),icon:$(t),hint:Sl(l,h,c?.hasUnsavedEdits??!1),children:ve({options:n,value:a,onChange:o,ariaLabel:e})})}function hc(e,t,n,o={}){const r={type:"custom",[ze]:!0,render:({value:l,onChange:a,name:c})=>i(Vo,{value:l||"",onChange:a,fieldKey:c,label:e,accept:t,placeholder:n,focusKey:o.focus,focusWhen:o.focusWhen,frameKey:o.frame}),...o.focus?{focusKey:o.focus}:{},...o.focusWhen?{focusWhen:o.focusWhen}:{}};return o.focus?I("each",r):r}const mc={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function xl(e){const t=s(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function gc({value:e,onChange:t,label:n}){const o=e||{},r=M(),l=r?r.values!==r.node.props:!0,a=!!o.pending&&l,c=!!o.pending&&!l,d=!!ni(ti()).geocode,p=$e(),h=(f,u)=>t({...o,[f]:u??void 0});return L(k,{children:[i(S,{label:s(n),icon:i(it,{}),action:d?i(xe,{content:s("Find from the address (OpenStreetMap)"),children:i(gt,{"aria-label":s("Find from the address"),"aria-busy":a||void 0,disabled:a,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(Xn,{})})}):void 0,children:d&&o.status?i(Nn,{compact:!0,oneLine:!0,spaced:!1,status:a?"busy":o.ok&&!c?"found":"notfound",statusText:a?s("Finding…"):c?s(ko):s(o.status),hint:xl(o)}):null}),i(S,{label:s("Enter by hand"),labelId:p,icon:i(Gn,{}),action:i(we,{checked:!!o.manual,onChange:f=>t({...o,manual:f}),ariaLabelledBy:p})}),o.manual&&i(S,{label:s("Latitude, longitude"),icon:i(it,{}),children:L("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(bt,{value:typeof o.lat=="number"?o.lat:null,onChange:f=>h("lat",f),min:-90,max:90,step:1e-4,placeholder:s("Latitude")}),i(bt,{value:typeof o.lng=="number"?o.lng:null,onChange:f=>h("lng",f),min:-180,max:180,step:1e-4,placeholder:s("Longitude")})]})})]})}function Cl(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function yl(e,t,n){const o=e.map(r=>({text:r?.text??""}));return t===null||t<0||t>=e.length?o:o.map((r,l)=>l===t?{text:n}:r)}function bc(e,t){return e===null?null:t>e?e:null}function _l(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 Sc={label:"Ticker items",icon:i(Kn,{})};function wc(e,t,n,o){return{type:"custom",[O]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...N({},{...Mt.textList,label:e}),render:({value:r,onChange:l})=>i(Il,{label:e,icon:$(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:l,markup:o==="markup"})}}function Il({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:l=!1}){const a=z(null),[c,d]=q(null),p=f=>f.map(u=>({text:u?.text??""})),h=f=>{const u=_l(n,f,c);u===null&&(a.current=null),d(u),r(p(f))};return i(co,{label:s(e),icon:t,noun:s("item"),items:n,onChange:h,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:l?i(wt,{target:a,value:Cl(n,c),onChange:f=>r(yl(n,c??-1,f)),disabled:c===null,label:c===null?s("Formatting — click a row first"):s("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(f,u,g)=>i("input",{type:"text",className:l&&c===u?"sf-list-marking":void 0,value:f?.text??"",placeholder:s(o),"aria-label":s("{label} {n}",{label:s(e),n:u+1}),onChange:m=>g({text:m.target.value}),onFocus:m=>{a.current=m.currentTarget,d(u)}})})}function xc(e,t){const n=`${e.label} — row ${t+1}`;return G({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:r})=>i(H,{value:o,onChange:r,label:s("{label} — row {n}",{label:s(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function Cc(e){return{_gCards:T("Cards"),coverIndex:X("Cover image",i(Un,{}),$o,String(Xo),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Ei("Image background",Dr),cardImage:El()}}function yc(){return{outline:X("Card outline",i(jn,{}),Wo,Ko),indexBadge:X("Card number",i(ot,{}),Mo,Uo),showBadge:tn("Product badge",!0,i(dt,{noun:"tag"}))}}function _c(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...Q,label:ue.find(l=>l.id===r).label}),o=r=>N(Fo(We),n(r));return{_gShowOnCard:T("Show on a card"),[We]:N({type:"custom",render:()=>i(Tl,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(We)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const We="showCardPrice",ue=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function Tl({rest:e}){const t=F(),n=Ri(),o=a=>typeof t[a]=="boolean"?t[a]:void 0,r=a=>o(a)??e[a],l=ue.some(({id:a})=>o(a)!==void 0&&o(a)!==e[a]);return i(Ue,{parts:ue,changed:l,shown:r,onPress:(a,c)=>n({[a]:c}),onReset:()=>n(Object.fromEntries(ue.map(({id:a})=>[a,void 0])))})}function Ic(e,t="display"){const n=U(t);return{[t]:I("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Ue,{parts:e,changed:po(o),shown:l=>fo(o,l),onPress:(l,a)=>r(go(o,l,a)),onReset:()=>r(void 0)})}),[n]:I("mobile",{type:"custom",render:({value:o,onChange:r})=>i(Ol,{parts:e,desktopKey:t,value:o,onChange:r})})}}function Ue({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:l,disabledReason:a}){const c=s("Display");return i(S,{label:c,icon:i(Pn,{}),changed:t,action:i(y,{words:C()?.panel,label:c,changed:t,detail:l,onReset:r}),children:i(uo,{label:c,items:e.map(d=>({id:d.id,label:s(d.label),shown:n(d.id),...a?{disabled:!0,disabledReason:s(a)}:{}})),onChange:o})})}function Ol({parts:e,desktopKey:t,value:n,onChange:o}){const r=F()[t];return i(Ue,{parts:e,changed:mo(n),shown:l=>ho(r,n,l),onPress:(l,a)=>o(bo(n,l,a)),onReset:()=>o(Ho),detail:s("the same as Desktop")})}function El(){return Kt("Card image",{min:W,max:Ze,step:bn,icon:i(nt,{}),hint:"Rounds the picture. The card's own corner is in Styles."})}function Tc(){return De({sidesKey:"cornerSides",step:Sn,useFollowed:()=>W,mark:i(Rl,{label:wn}),hint:s("Rounds the picture. Left alone it stays square.")})}function Rl({label:e,changed:t=!1,onReset:n=()=>{}}){return i(y,{words:C()?.panel,label:s(e),changed:t,onReset:n})}function Oc(){return{type:"custom",render:({value:e,onChange:t})=>i(Fl,{value:typeof e=="string"?e:"",onChange:t})}}function Nl({layout:e,width:t}){const n=_n(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:In(e).map(([r,l],a)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${l}`,aspectRatio:o}},a))})}const kl={width:"3.5rem",height:"2.5rem"},Pl=200;function Fl({value:e,onChange:t}){const[n,o]=q(null),[r,l]=q(4),a=z(null);on(()=>{const u=a.current;if(!u||typeof ResizeObserver!="function")return;const g=()=>l(u.getBoundingClientRect().width>=Pl?4:3);g();const m=new ResizeObserver(g);return m.observe(u),()=>m.disconnect()},[]);const c=e&&e in ne?e:"",d=Qe(n,c),p=Qe(n,"").length,h=Tn("no-symbol"),f=[{value:"",label:s("Not chosen"),icon:si(h,s("Not chosen"))},...d.map(u=>({value:u,label:s(ne[u].label),icon:i(Nl,{layout:ne[u],width:40})}))];return i(S,{label:s("Layout"),icon:i(Wn,{}),value:c?s(ne[c].label):void 0,children:i("div",{ref:a,style:{flex:"1 1 auto",minWidth:0},children:i(ft,{label:s("Layout"),value:c,options:f,onChange:t,columns:r,cell:kl,header:L("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:s("Photos in a row")}),i(ro,{options:[{id:"all",label:s("All")},...Cn.map(u=>({id:String(u),label:String(u)}))],value:n===null?"all":String(n),ariaLabel:s("Photos in a row"),onChange:u=>o(u==="all"?null:Number(u))}),i("span",{className:"text-2xs text-ink-faint",children:s("{n} of {total} layouts",{n:p,total:yn.length})})]})})})})}export{Si as BOUND_TO_POST,Sa as BOUND_TO_POST_NOTE,Oa as BUCKET_ICONS,mc as CUSTOM_FIELD_MEDIA,gc as CoordsField,Gt as DESKTOP_GAP_NOT_OVERLAP,Ue as DisplayRow,sc as EDGE_ARROWS,Io as FOCAL_DEFAULT,gl as FOCAL_POINTS,fe as FOLD_FIELD_MARKER,bl as FocalPicker,Aa as GroupLabel,wi as HIGHLIGHT_HINT,H as HidableTextField,Ye as LINK_FIELD_MARKER,sa as Label,ze as MEDIA_FIELD_MARKER,pc as MEDIA_TYPE_OPTIONS,wa as NOT_BOUND_TO_POST,La as PanelBand,yi as PanelNoteLine,Yi as RowPropsContext,qe as SCAFFOLD_FIELD_MARKER,kc as SCALAR_TEXT_CONTROLS,di as SiteGapDefaultReset,V as Slider,Ii as Swatches,Nc as TEXT_CONTROL_KINDS,O as TEXT_FIELD_MARKER,Sc as TICKER_ITEMS_ROW,Il as TextListField,fl as ThemeFillRow,ae as WIDTH_LABEL,gi as WidthDefaultReset,_l as aimAfterListChange,Qa as anchorFields,D as backTo,va as backgroundField,Ua as boxBlockSpacingField,Xa as boxColumnsFields,ic as boxFillField,Vi as boxPhoneRowField,$i as boxShareField,Ka as boxSharePhoneField,$a as boxShareTabletField,ml as boxThemeIndexOf,Na as bucketHeader,Ga as buttonWordsEntryField,Ui as cardCornersField,Ei as cardImageBackgroundField,El as cardImageField,Cc as cardMediaFields,Wa as cardShapeFields,_c as cardShowFields,yc as cardStyleFields,Va as cellWidthFields,oc as checkbox,rc as colorInput,ca as containerDirectionField,ui as containerGapField,pi as containerGapPhoneField,aa as containerGapRows,fi as containerGapTabletField,xl as coordsResultTip,_a as copyText,Xt as cornerSidesField,De as cornersRowField,tc as date,ec as dateTime,ka as designGroupHeader,Ic as displayFields,ac as edgePad,Ge as fillSlotChoices,bc as focusAfterRemove,lc as focusKeptField,Pa as foldMarker,he as foldMetaOf,_i as foldTitleOf,nl as followedHeightPatch,ul as followedStickPatch,Oc as galleryLayoutField,Ja as heightFields,ce as heightFollowedBy,da as heroGroupPlacementPoints,Ve as hidableText,Ci as hintIsWhileTyping,Tc as imageCornersField,ba as inOwnBox,Ra as isBucketHeader,$t as keptBy,Ia as linkField,Sl as loadingRowHint,fc as loadingShowsField,cc as multiSelect,nc as pageBackgroundField,Ea as panelNote,Ji as phoneOverrideField,ya as plainText,Ta as plainTextarea,Kt as pxField,Fa as quietMarker,je as readHidable,Cl as rowText,dc as searchSelect,Oi as sectionBandChoices,Ha as sectionBorderField,Fi as sectionCornersField,Da as sectionShapeFields,Ba as sectionThemeFields,yl as setRowText,ja as sizeField,uc as sourceField,Ya as spacingFields,Za as stickFields,za as swapPadding,Ma as templateField,xa as text,hn as textFieldIdentifier,fa as textFieldOffPage,ma as textFieldPanelOnly,wc as textList,xc as textListRowField,Ca as textarea,tn as toggle,hc as upload,Ri as useSelectedPatch,F as useSelectedProps,P as useSelectedSibling,ci as useSiteGapDetail,qa as widthField,ga as withIdentifier,pa as withOffPage,ha as withPanelOnly,ua as withScaffold};
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 Cn,fromDateKey as _n}from"efficient-shell/format";import{say as a,editorEaselWords as _}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 Rn}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 E,foldMetaOf as Se,textFieldIdentifier as En}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 Ce,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 _e,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 Ct,CORNER_SIDE_POINTS as ho,SECTION_CORNERS_ROW as _t,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 C,SettingsGroup as So,SettingsSegmented as Co,SettingsBorder as _o,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 Ro,partShownOnDesktop as Eo,partShownOnPhone as No,phoneDisplayChanged as ko,withDesktopPart as Po,withPhonePart as Ao}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as Lo,ColorSwatch as Fo,CornersInput as vo,DatePicker as Bo,DateTimePicker as Do,FOCAL_DEFAULT as Ho,IconPicker as It,COLUMN_COUNT_MAX as Ot,COLUMN_SHARE_MIN as Go,COLUMN_SHARES_EQUAL as Mo,resolveColumnShares as Tt,WidthsBar as Wo,useShellStrings as Uo,IconButton as Rt,InputNumber as Et,Slider as Ko,Tooltip as Te}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as $o}from"./geocode-resolve.js";import{ColourRow as se,InheritedColourRow as Nt}from"./ColourControl.js";import{fillThemeColors as Xo,slotFill as le}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as Re}from"../../../format/lib/document/part-inks.js";import{keptByRow as Ee}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 Vo,NoControlMark as jo,noControlField as Pt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as zo}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as Yo,PANEL_ONLY_FIELD as qo}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as Jo,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 Zo}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Qo,CARD_OUTLINE_OPTIONS as er,DEFAULT_CARD_INDEX_FORMAT as tr,DEFAULT_CARD_OUTLINE as nr}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as or,DEFAULT_COVER_INDEX as rr}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as ir}from"efficient-easel/draw";import sr from"../../components/MediaUploadField.js";import lr from"../../components/MultiSelectField.js";import ar from"../../components/SectionThemePicker.js";import cr from"../../components/SearchSelectField.js";import ur 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 dr}from"../../../render/lib/content/button-look.js";import{usePreviewParts as pr}from"efficient-easel/draw/client";import{encodePartId as fr}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as hr,useEaselStrings as mr}from"efficient-easel/strings";import{hasPhoneHeight as gr,hasTabletHeight as Ae,resolveSectionMinHeight as br,resolveTabletHeight as wr}from"../../../format/lib/content/section-min-height.js";import{INTRO_OLD_STICKY_PINS as Sr,SECTION_PIN_ABOVE_HINT as Cr,SECTION_PIN_ABOVE_KEY as _r,SECTION_PIN_ABOVE_LABEL as yr,SECTION_PIN_GROUP as xr,SECTION_PIN_LABEL as Lt,SECTION_PIN_SCREENS_KEY as Le,SECTION_PIN_SCREENS_LABEL as Ft,SECTION_PIN_STOP_DEFAULT as Ir,SECTION_PIN_STOP_HINT as Or,SECTION_PIN_STOP_KEY as Tr,SECTION_PIN_STOP_LABEL as Rr,SECTION_PIN_STOP_OPTIONS as Er,SECTION_STICK_DISTANCE as D,SECTION_STICK_DISTANCE_ROW as Fe,SOME_VIEW_PINS as vt,hasPhoneStick as Nr,hasTabletStick as kr,resolveSectionStick as ae,sectionPinStopOf as Pr,sectionPinStopWrite as Ar}from"../../../format/lib/content/section-sticky.js";import{cssLengthOf as Lr}from"../../../format/lib/content/css-length.js";import{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 R,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,useLengthUnit as bi}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as wi,directionField as Si,gapField as Ue,iconPickerRow as Ci,lengthUnitFields as ue,pickerCellIcon as _i,pickerNoneIcon as yi,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 xi}from"../../../format/lib/content/view-tier.js";function Na({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 Ii(){const{blockGap:e}=H();return e===null?a("this container's own spacing"):W(`${e}px`,a("Styles"))}function Oi({inherited:e,onReset:t,label:n}){return i(y,{words:_()?.panel,label:a(n),changed:!e,detail:Ii(),onReset:t})}function Ti(e){return Ue({...gi,builtIn:jr[e],resolve:(t,n)=>jt(e,t,n?.siteGap),action:(t,n)=>i(Oi,{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(ki,{container:e,...t})}),Qt)}function Ei(e){return lt(T("tablet",{[He]:e,type:"custom",render:t=>i(Ni,{container:e,...t})}),Qt)}const Qt={not:{field:"gap",in:Array.from({length:-Vt.min},(e,t)=>Vt.min+t)}};function ka(e){return{gap:T("desktop",Ti(e)),[ke("gap")]:Ei(e),[X("gap")]:Ri(e)}}function Ni({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:_()?.panel,label:a("Gap"),changed:Ge(l),detail:G(u=>a(u),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function ki({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:_()?.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 Pa(e){return Si({offered:Br(e),fallback:Bt(e,void 0),resolve:t=>Bt(e,t)})}function Aa(e,t){return Un(t?Wn(e,t):[],t)}function Pi({inherited:e,onReset:t,label:n}){return i(y,{words:_()?.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?Bi(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(C,{label:a(n),icon:i(co,{}),htmlFor:b,className:g?"is-hidden":void 0,hint:S,action:l?i(Te,{content:w,children:i(Rt,{"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 La(e,t){return{...e,[st]:t}}function Fa(e){const t=e[E];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[E]:{...t,offPage:!0}}}function va(e){return!e||typeof e!="object"?!1:e[E]?.offPage===!0}function Ba(e){if(!e[E])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[qo]:!0}}function Da(e){return Yo(e)}function Ha(e){const t=e[E];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[E]:{...t,identifier:!0}}}import{TEXT_CONTROL_KINDS as zc,SCALAR_TEXT_CONTROLS as Yc}from"efficient-easel/draw";function Ga(e,t){if(!e[E])throw new Error("inOwnBox: the field holds no authored text");const{[Vo]:o,...r}=e;return{...r,[zo]:!0,render:t}}const Ai=new Set(ir),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,[E]:e},{...en[e.control],label:e.label});if(!Ai.has(e.control))return n;const o=t.render;return{...Pt(n,"authored-copy"),render:r=>i(Zo,{name:r.name,children:o(r)})}},Ma="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Li={field:"source.slug",set:!0},Wa={not:Li},Fi="Select a word, then press the highlighter.",vi=new Set([Fi]),Bi=e=>vi.has(e);function Ua(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 Ka(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 $a(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 Xa(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 Va(e){return{type:"custom",[rt]:{label:e},...L({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(ur,{value:ot(t),onChange:n,label:e})}}function ja(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 za={Design:Xn,Animation:jn};function Ya(e){return{type:"custom",render:()=>i(Di,{text:e})}}function Di({text:e}){return i("p",{className:"sf-note",children:a(e)})}function qa(e){return Se(e)!==null&&e?.tabs!==void 0}const tn=new Map;function Ja(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 Za(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 Hi(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function Qa(e,t){return Hi(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(P,{})}}function ec(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 tc({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 Gi({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(Fo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":u})},c)}),i("span",{className:"sf-swatch-hex",children:l})]})}function nc(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(Mi,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function Mi({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=Wi(s,t,l,c,u,r),b=W(d.toUpperCase(),m),S=Re(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 Wi(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(Re(e)??"",n,o,s)]}function Ui(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=ei(r,t);return i(C,{label:a(e),icon:i(ye,{}),changed:!s,action:i(y,{words:_()?.panel,label:a(e),changed:!s,detail:a("the theme's image stage"),onReset:()=>o(qr)}),children:Gi({swatches:Qr,current:s?ni:ti(r,t),onPick:o,names:Zr})})}}}function oc(e=n=>n,t){return ee({_gSectionTheme:R(li),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(ar,{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??os(n,r);return bi({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:wi,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(Ko,{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 Ki(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(C,{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:_()?.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",$i={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(C,{label:a(te),icon:i(pt,{}),changed:s,action:be(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:i(Xi,{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(jo,{})},"always")}function fe(){const e=v();return t=>e?.onChangeMany(t)}function Xi({tier:e,px:t,name:n,onRadius:o}){const r=e.useFollowed(),[s,l]=F(e.sidesKey),c=fe(),u=pe({row:e.row??$i,label:te,grid:{min:A,max:Ce,step:e.step??1},valueKey:n??"",view:"desktop"}),p=yt(s)??[...Ct];return i(vo,{label:a(te),value:p,corners:ho,onChange:h=>{const d=yt(h)??[];l(d.length===Ct.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??Ce,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 Vi({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=H(),r=typeof o=="number"?`${o}px`:a("not set");return i(y,{words:_()?.panel,label:a(e),changed:t,detail:o==null?a("the built-in corners"):W(r,a("Styles")),onReset:n})}function ji(){const{cornerRadiusPx:e}=H();return typeof e=="number"?e:A}function zi(){return Ve({sidesKey:"sectionCornerSides",row:_t,useFollowed:ji,mark:i(Vi,{label:te}),hint:Yi})}const Yi="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function rc(){return ee({_gShape:R("Shape"),sectionCorners:zi(),...rn(_t,"sectionCorners"),sectionCornerSides:sn(),...B("sectionBorder",ns),...ue(Kt,"sectionBorder",{tablet:!0,phone:!0})})}const qi=()=>({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 Ji(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Zi(){let e;try{const t=Xt(H().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||Kr.line}function Qi({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=qi(),f=m=>Ji(r&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return i(C,{label:a("Border"),icon:i(zn,{}),action:r?i(yo,{each:p,label:a("Each side"),onChange:h}):void 0,children:i(_o,{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 es({value:e,onChange:t,view:n}){const[o]=F("sectionBorder"),[r]=F(ke("sectionBorder")),s=Zi(),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]:ts(m,f)}:{}}});return i(Qi,{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 ts(e,t){const n={...e};for(const o of ln){const r=$(n[o]);r!==void 0&&(n[o]=t(r))}return n}function ns(e){return{type:"custom",render:({value:t,onChange:n})=>i(es,{value:t,onChange:n,view:e})}}function os(e,t){let n=$e[e];for(;n&&$e[n]!==null&&!t(n);)n=$e[n];return n??e}function ic(e){return{type:"custom",render:()=>i(rs,{partKey:e})}}function rs({partKey:e}){const[t]=F("id"),[n]=F("_partStyles"),{textStyles:o}=H(),r=mr();let s=null;try{s=pr().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:dr(l,c,{noStyle:a("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??hr.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(fr(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 is({label:e,changed:t=!1,onReset:n=()=>{}}){const o=an(A);return i(y,{words:_()?.panel,label:a(e),changed:t,detail:W(`${o}px`,a("the section")),onReset:n})}function ss(){return i(P,{children:a("Follows the section's Corners until you set a number here.")})}function ls(){return Ve({sidesKey:"cardCornerSides",row:xt,useFollowed:()=>an(A),mark:i(is,{label:te}),hint:i(ss,{})})}function as(){return{type:"custom",render:()=>i(Nn,{})}}function sc(){return{_gShape:R("Shape"),cardCorners:ls(),...rn(xt,"cardCorners"),cardCornerSides:sn(),cardCornersApplyAll:as()}}function cs(){return L({type:"custom",render:e=>i(ds,{...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 us(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 ds(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=()=>[...Mo[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=Uo().widths.hint(r,Go);return i(C,{label:a(V),icon:i(_e,{}),changed:b,hint:u!=="custom"?void 0:p?S:g,action:i(y,{words:_()?.panel,label:a(V),changed:b,disabled:e.readOnly===!0,detail:s?G(w=>a(w),us(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:_i(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(Wo,{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 lc(){return z(Dr,i(to,{}),Dt,Dt[0].value)}function ac(){return T("mobile",Ci(V,i(_e,{}),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 cc(){return We("share",cs(),Jt)[ke("share")]}function ps(){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 uc(){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:ps()});return{...t,phoneRow:n.phoneRow}}function dc(e,t,n,o,r,s,l){return{type:"custom",render:({value:c,onChange:u,name:p})=>i(fs,{label:e,min:t,max:n,step:o,fallback:r,role:s,value:c,onChange:u,name:p??"",length:l})}}function fs({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(C,{label:a(e),icon:i(St,{noun:s}),action:i(y,{words:_()?.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 pc(){return{_gCellWidth:R("Cell width"),gridSpan:z("Positions",i(_e,{}),[{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(hs),t=oe(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const hs=wn(null);function ms({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 gs({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:_()?.panel,label:a(e),changed:r,detail:G(u=>a(u),`${c}${o}`),onReset:s})}function bs(e){return Ki(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(gs,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(ms,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const ws={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Ss={Top:xe,Bottom:mt,Left:gt,Right:bt},Cs=e=>{const t=Ss[e];return i(t,{})};function fc(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=S=>ws[S],s=S=>M(r("Top"),i(xe,{}),N.min,N.max,N.step,S,"px"),l=(S,w,x,q=N)=>T("mobile",bs({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:R("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 hc(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 mc(e,t=di,n=!0){const o=t.map(r=>({label:pi[r],value:r}));return ee({...n?{_gWidth:R(he)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(C,{label:a(he),icon:i(uo,{}),action:n?i(Pi,{inherited:s?.inherited??!1,onReset:()=>r(fi),label:he}):void 0,children:Ke({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:he})})}})}function gc(){const e=(o,r)=>({type:"custom",render:({value:s,onChange:l})=>i(_s,{value:s,onChange:l,view:o,badge:r})}),t=()=>Ee("sectionHeightMode"),n=()=>Ee("sectionHeightMode");return ee({_gHeight:R(Q),...B("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>i(Os,{view:o,onClear:()=>r(void 0)}))),...B("sectionHeightValue",t),...B("sectionHeightUnit",n)})}function _s({value:e,onChange:t,view:n,badge:o}){const r=O(),{mode:s,number:l,unit:c}=ys(n,r,e);return i(C,{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"}],value:s,onChange:t,ariaLabel:Q}),l?i(Is,{view:n,mode:s,menu:c}):null]})})}function pn(e,t){return e==="phone"&&Ae(t)?wr(t):br(t)}function me(e,t){return e==="desktop"||(e==="tablet"?Ae(t):gr(t))?null:pn(e,t)}function ys(e,t,n){const r=(s=>["auto","fixed","screen"].includes(s))(n)?n:me(e,t)?.mode??"auto";return{mode:r,number:r!=="auto",unit:r==="fixed"}}function xs(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=xs(e,c,t,l);return u===null?{[I(t,e)]:l}:Object.keys(u).length?u:null})}}function Is({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 Os({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:_()?.panel,label:a(Q),changed:o,detail:l,onReset:t})}function bc(e={}){const t=e.intro===!0,n=s=>({type:"custom",render:({value:l,onChange:c,id:u,name:p})=>i(As,{value:l,onChange:c,labelId:`${u??p??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:l,onChange:c})=>i(Ns,{value:l,onChange:c,view:s,intro:t})}),r=s=>({type:"custom",render:({value:l,onChange:c})=>i(ks,{value:l,onChange:c,view:s,intro:t})});return{_gStick:R(xr,{dot:t?Es:vt}),...B("stickTop",n),...B("stickTopDistance",o),...ue(Fe,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?B(Le,r):{},...t?{}:{[Tr]:Ts()},...t||e.above===!1?{}:{[_r]:Rs()}}}function Ts(){const e=z(Rr,i(xe,{}),Er,Ir);return T("desktop",{...e,render:t=>{const n=e.render({...t,value:Pr(t.value),onChange:o=>t.onChange(Ar(o))});return be(n,{hint:a(Or)})}})}function Rs(){const e=gn(yr,!1,i(wt,{}),Cr);return T("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}const Es={any:[vt,Sr]};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=Ps(e,h,p,t,o),f=d===null?{[I(t,e)]:p}:d;return Object.keys(f).length?{...f,...r?.(p)??{}}:null}):n}}function Ns({value:e,onChange:t,view:n,intro:o}){const r=O(),s=ae(r,{intro:o}),l=h=>{const d=xi(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 ks({value:e,onChange:t,view:n,intro:o}){const{followed:r,write:s}=hn(n,Le,t,o);return i(C,{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"?kr(t):Nr(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 Ps(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 As({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?Lr(p.distance,p.unit):a("Off");return i(C,{label:a(Lt),labelId:n,icon:j(i(wt,{})),action:k(P,{children:[o!=="desktop"?i(y,{words:_()?.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 wc(){return{_gAnchor:R("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 Sc(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(C,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(Do,{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(C,{label:a(e),icon:t,htmlFor:c,hint:n===void 0?void 0:a(n),children:i(Bo,{id:c,value:_n(typeof o=="string"?o:null),onChange:u=>r(u?Cn(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(C,{label:a(e),labelId:g,icon:n,hint:o===void 0?void 0:a(o),action:p?k(P,{children:[i(y,{words:_()?.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(Ls,{label:"Background",icon:i(so,{}),id:r,value:e,shown:po(e),onChange:t})}}}function yc(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(se,{label:a(e),icon:n,value:o||t,onChange:r})}}function Ls({label:e,icon:t,id:n,value:o,shown:r,onChange:s}){const{colors:l,n:c}=qe(),u=Re(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 xc(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(Fs,{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 Xo(t,n).map(s=>({label:s.label,color:s.value,selected:r===s.name,onPick:()=>o(s.name)}))}function Fs({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 vs(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?vs(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}}const Bs=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function Ds({label:e,value:t,onChange:n,points:o=Bs}){const r=o.map(s=>({...s,label:a(s.label),...s.title?{title:a(s.title)}:null}));return i(Lo,{label:a(e),value:t,points:r,onChange:n})}function Ic(){return on()}const Oc={top:i(Qn,{}),right:i(Zn,{}),bottom:i(qn,{}),left:i(Jn,{})};function Tc(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(C,{label:a(e),icon:r,value:c(m)?.label?a(c(m).label):l?a(l):"",children:Ds({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(lr,{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(cr,{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 Nc(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const kc=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Pc(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(Rn),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(C,{label:a(e),icon:j(t),hint:Hs(s,h,c?.hasUnsavedEdits??!1),children:Ke({options:n,value:l,onChange:o,ariaLabel:e})})}function Ac(e,t,n,o={}){const r={type:"custom",[it]:!0,render:({value:s,onChange:l,name:c})=>i(sr,{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 Lc={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 Fc({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(C,{label:a(n),icon:i(ht,{}),action:u?i(Te,{content:a("Find from the address (OpenStreetMap)"),children:i(Rt,{"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($o):a(o.status),hint:Ms(o)}):null}),i(C,{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(C,{label:a("Latitude, longitude"),icon:i(ht,{}),children:k("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(Et,{value:typeof o.lat=="number"?o.lat:null,onChange:d=>h("lat",d),min:-90,max:90,step:1e-4,placeholder:a("Latitude")}),i(Et,{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 vc(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 Bc={label:"Ticker items",icon:i(io,{})};function Dc(e,t,n,o){return{type:"custom",[E]:{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 Hc(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 Gc(e){return{_gCards:R("Cards"),coverIndex:z("Cover image",i(ro,{}),or,String(rr),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:Ui("Image background",Jr),cardImage:bn()}}function Mc(){return{outline:z("Card outline",i(ao,{}),er,nr),indexBadge:z("Card number",i(oo,{}),Qo,tr),showBadge:gn("Product badge",!0,i(St,{noun:"tag"}))}}function Wc(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(Ee(Je),n(r));return{_gShowOnCard:R("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",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 Xs({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 Uc(e,t="display"){const n=X(t);return{[t]:T("desktop",{type:"custom",render:({value:o,onChange:r})=>i(Ze,{parts:e,changed:Ro(o),shown:s=>Eo(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(C,{label:c,icon:i(Vn,{}),changed:t,action:i(y,{words:_()?.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(Jo),detail:a("the same as Desktop")})}function bn(e=kn){return M("Card image",i(pt,{}),A,Ce,Pn,A,e,{clear:{hint:A},hint:"Rounds the picture. The card's own corner is in Styles."})}function js(){return ue(at,"cardImage")}function Kc(){return{cardImage:bn(at),...js()}}function $c(){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:_()?.panel,label:a(e),changed:t,onReset:n})}function Xc(){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 f=l.current;if(!f||typeof ResizeObserver!="function")return;const m=()=>s(f.getBoundingClientRect().width>=Js?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:yi(h,a("Not chosen"))},...u.map(f=>({value:f,label:a(ie[f].label),icon:i(Ys,{layout:ie[f],width:40})}))];return i(C,{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: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(Co,{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{Li as BOUND_TO_POST,Ma as BOUND_TO_POST_NOTE,za as BUCKET_ICONS,Lc as CUSTOM_FIELD_MEDIA,Fc as CoordsField,Qt as DESKTOP_GAP_NOT_OVERLAP,Ze as DisplayRow,Oc as EDGE_ARROWS,Ho as FOCAL_DEFAULT,Bs as FOCAL_POINTS,we as FOLD_FIELD_MARKER,Ds as FocalPicker,Fi as HIGHLIGHT_HINT,U as HidableTextField,rt as LINK_FIELD_MARKER,Na as Label,it as MEDIA_FIELD_MARKER,kc as MEDIA_TYPE_OPTIONS,Wa as NOT_BOUND_TO_POST,tc as PanelBand,Di as PanelNoteLine,hs as RowPropsContext,st as SCAFFOLD_FIELD_MARKER,Yc as SCALAR_TEXT_CONTROLS,Oi as SiteGapDefaultReset,Y as Slider,Gi as Swatches,zc as TEXT_CONTROL_KINDS,E as TEXT_FIELD_MARKER,Bc as TICKER_ITEMS_ROW,$s as TextListField,Ls as ThemeFillRow,he as WIDTH_LABEL,Pi as WidthDefaultReset,Ks as aimAfterListChange,wc as anchorFields,W as backTo,nc as backgroundField,lc as boxBlockSpacingField,uc as boxColumnsFields,xc as boxFillField,ps as boxPhoneRowField,cs as boxShareField,ac as boxSharePhoneField,cc as boxShareTabletField,vs as boxThemeIndexOf,Ja as bucketHeader,ic as buttonWordsEntryField,ls as cardCornersField,Ui as cardImageBackgroundField,bn as cardImageField,Kc as cardImageFields,Gc as cardMediaFields,sc as cardShapeFields,Wc as cardShowFields,Mc as cardStyleFields,pc as cellWidthFields,yc as colorInput,Pa as containerDirectionField,Ti as containerGapField,Ri as containerGapPhoneField,ka as containerGapRows,Ei as containerGapTabletField,Ms as coordsResultTip,Xa as copyText,sn as cornerSidesField,Ve as cornersRowField,rn as cornersUnitFields,Cc as date,Sc as dateTime,Za as designGroupHeader,Uc as displayFields,Tc as edgePad,Ye as fillSlotChoices,vc as focusAfterRemove,Ic as focusKeptField,Qa as foldMarker,Se as foldMetaOf,Hi as foldTitleOf,xs as followedHeightPatch,Ps as followedStickPatch,Xc as galleryLayoutField,gc as heightFields,me as heightFollowedBy,ys as heightLayersAt,Aa as heroGroupPlacementPoints,ot as hidableText,Bi as hintIsWhileTyping,$c as imageCornersField,Ga as inOwnBox,qa as isBucketHeader,on as keptBy,Va as linkField,Hs as loadingRowHint,Pc as loadingShowsField,Rc as multiSelect,_c as pageBackgroundField,Ya as panelNote,bs as phoneOverrideField,$a as plainText,ja as plainTextarea,Ki as pxField,ec as quietMarker,nt as readHidable,Ws as rowText,Ec as searchSelect,Wi as sectionBandChoices,zi as sectionCornersField,rc as sectionShapeFields,oc as sectionThemeFields,Us as setRowText,dc as sizeField,Nc as sourceField,fc as spacingFields,bc as stickFields,hc as swapPadding,Ua as text,En as textFieldIdentifier,va as textFieldOffPage,Da as textFieldPanelOnly,Dc as textList,Hc as textListRowField,Ka as textarea,gn as toggle,Ac as upload,pe as useLengthRow,fe as useSelectedPatch,O as useSelectedProps,F as useSelectedSibling,Ii as useSiteGapDetail,mc as widthField,Ha as withIdentifier,Fa as withOffPage,Ba as withPanelOnly,La as withScaffold};
@@ -20,13 +20,10 @@ export declare const SECTION_THEME_FIELD_KEYS: readonly string[];
20
20
  export declare const SECTION_SHAPE_FIELD_KEYS: readonly string[];
21
21
  export declare const SECTION_ANIM_FIELD_KEYS: readonly string[];
22
22
  export declare const CARD_MEDIA_FIELD_KEYS: readonly string[];
23
- export declare const BOUND_CARD_MEDIA_FIELD_KEYS: readonly string[];
24
- export declare const CARD_STYLE_FIELD_KEYS: readonly string[];
25
23
  export declare const CARD_SHOW_FIELD_KEYS: readonly string[];
26
24
  export declare const RETIRED: Readonly<Record<string, string>>;
27
25
  export declare const PLACE_WORDS: Readonly<Record<Place, readonly string[]>>;
28
26
  export declare const INJECTED_RETIRED: Readonly<Record<string, string>>;
29
- export declare function foldTopTier(fields: Record<string, unknown>): 1 | 2;
30
27
  export declare function retiredHeadings(where: string): string[];
31
28
  export declare function assignSectionGroups<T extends Record<string, unknown>>(fields: T, where: string): T;
32
29
  export declare function seatDesignBucket<T extends Record<string, unknown>>(fields: T): T;
@@ -1 +1 @@
1
- import{anchorFields as m,bucketHeader as L,cardMediaFields as Y,cardShowFields as U,cardStyleFields as W,designGroupHeader as F,foldMarker as z,foldMetaOf as h,quietMarker as q,heightFields as E,sectionShapeFields as w,sectionThemeFields as O,stickFields as x,widthField as D}from"./controls.js";import{group as J}from"efficient-easel/screen/lib/document/box-fields";import{sidesPaddingFields as T}from"./box-fields.js";import{deviceField as Q,deviceMetaOf as P}from"efficient-easel/screen/lib/document/device-fields";import{entranceFields as A}from"../animation/entrance-fields.js";import{DESIGN_GROUPS as k,SETTINGS_BUCKETS as V}from"efficient-easel/panel";import{BUCKET_KEY as d,DESIGN_GROUP_KEY as b}from"efficient-easel/screen/lib/document/field-buckets";const B=V;function X(e){return e==="Animation"?"Animation":"Design"}const Z="Editor only — not shown live",I={"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"},$={"AlloyWheelsListing._gCards":"Design"},H={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function _(e,t,o){const a=`${e}.${t}`;return H[a]??$[a]??I[o]}function pe(e,t,o){const a=_(e,t,o);return a?X(a):void 0}function G(e){return e==="Animation"?[d.Animation]:[d.Design,b[e]]}function S(...e){const t=[];for(const o of e)for(const a of Object.values(o)){const C=P(a),p=h(C?C.inner:a),l=p?I[p.label]:void 0;if(l)for(const g of G(l))t.includes(g)||t.push(g)}return t}const ge=[...S(T({tablet:!0}),D("full"),E(),m(),x()),...Object.keys(T({tablet:!0})),...Object.keys(D("full")),...Object.keys(E()),...Object.keys(m()),...Object.keys(x())],ye=[...S(O()),...Object.keys(O())],ke=[...S(w()),...Object.keys(w())],_e=[...S(A()),...Object.keys(A())],ee=Object.keys(Y()),te=new Set(["cardImage","imageBackground"]),Se=[...G(_("ProductGrid","_gCards","Cards")??"Design"),...ee.filter(e=>e.startsWith("_g")||te.has(e))],ve=Object.keys(W()),fe=Object.keys(U()),ne={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","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 e={...T({tablet:!0}),...D("full"),...E(),...m(),...O(),...w(),...A()};for(const t of Object.keys(M)){const o=h(e[t]),a=o?I[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 "${t}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale — a list that quietly matches nothing is worse than no list.`)}}const oe=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),ae=new Map([[d.Design,"Content"],[d.Animation,"Animation"],...k.map(e=>[b[e],e])]);function me(e){const t=new Set([...Object.values(d),b.Content]);for(const[o,a]of Object.entries(e))if(!t.has(o)&&h(a)?.level===1)return 1;return 2}function ie(e){const t=`${e}.`;return Object.keys(ne).filter(o=>o.startsWith(t)).map(o=>o.slice(t.length))}function re(e,t){const o=P(e),a=J(t);return o?Q(o.tier,a):a}function de(e,t){const o=h(t);return o?e==="Content"||e==="Animation"?z(t,o.label):q(t):t}function j(e){return e==="Design"?k:["Animation"]}function Le(e,t){const o=[],a=new Set(ie(t)),C=new Set;let p=!1,l=null;for(const[n,r]of Object.entries(e)){const i=h(r);if(oe.has(n))throw new Error(`${t}.${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=ae.get(n);if(c!==void 0){if(i?.level!==1)throw new Error(`${t}.${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)&&(p=!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 M){const s=_(t,n,i.label);if(i.level!==2||!s||!K[s].includes(i.label))throw new Error(`${t}.${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)&&C.add(n),o.push(l={place:s,entries:[]});continue}const u=_(t,n,i.label);if(!u)throw new Error(`${t}.${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:re(r,i.label)]]})}const g=new Set(Object.entries(e).filter(([,n])=>h(n)).map(([n])=>n));for(const[n,r]of[["BLOCK_KEY_GROUP",H],["KEY_GROUP",$]]){const i=Object.keys(r).filter(c=>c.startsWith(`${t}.`)).filter(c=>!g.has(c.slice(t.length+1)));if(i.length)throw new Error(`${t}: ${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=p?[]:[...a].filter(n=>!C.has(n));if(v.length)throw new Error(`${t}: 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 R=new Set(o.filter(n=>n.entries.length>0).map(n=>n.place)),f=B.filter(n=>j(n).some(r=>R.has(r))),y={};for(const n of f){y[d[n]]=L(n,n===f[0]?f:null);for(const r of j(n)){if(!R.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[b[r]]=F(r));for(const u of i)for(const[s,N]of u.entries)y[s]=de(r,N)}}return y}function Ee(e){return d.Design in e?e:{[d.Design]:L("Design",null),[b.Content]:F("Content"),...e}}function we(e){return B.some(t=>d[t]in e)}function Oe(e){const t=B.filter(a=>d[a]in e);if(t.length===0)return e;const o={...e};for(const a of t)o[d[a]]=L(a,a===t[0]?t:null);return o}export{H as BLOCK_KEY_GROUP,Se as BOUND_CARD_MEDIA_FIELD_KEYS,B as BUCKETS,d as BUCKET_KEY,ee as CARD_MEDIA_FIELD_KEYS,fe as CARD_SHOW_FIELD_KEYS,ve as CARD_STYLE_FIELD_KEYS,k as DESIGN_GROUPS,b as DESIGN_GROUP_KEY,Z as EDITOR_ONLY_GROUP,M as INJECTED_RETIRED,$ as KEY_GROUP,I as LABEL_GROUP,ge as LAYOUT_FIELD_KEYS,K as PLACE_WORDS,ne as RETIRED,_e as SECTION_ANIM_FIELD_KEYS,ke as SECTION_SHAPE_FIELD_KEYS,ye as SECTION_THEME_FIELD_KEYS,Le as assignSectionGroups,pe as bucketOf,X as bucketOfPlace,me as foldTopTier,we as hasBucketTabs,S as headerKeysOf,G as headerKeysOfPlace,_ as placeOf,Oe as reseatBucketTabs,ie as retiredHeadings,Ee as seatDesignBucket};
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 +1 @@
1
- import r from"../../../components/PreviewPartAnchors.js";import{animationTabFields as e}from"../../animation/fields.js";import{BLOCK_THEME_FOLLOW_LABEL as t,SECTION_THEME_FOLLOW_LABEL as s}from"../../../components/SectionThemePicker.js";import{anchorFields as m,cardShapeFields as d,cellWidthFields as p,heightFields as l,sectionShapeFields as F,sectionThemeFields as n,spacingFields as a,stickFields as c,widthField as S}from"../controls.js";import{blockSizeFieldSet as h}from"efficient-easel/screen/lib/document/block-size-fields";import{VIEW_KEY_ACCESS as f}from"efficient-easel/screen/lib/document/box-fields";import{rowSay as E,sidesPaddingFields as L}from"../box-fields.js";import{assignSectionGroups as _}from"../field-groups.js";import{boxGutterFields as O}from"../box-gutter-field.js";import{sectionOwnWidthFields as w}from"../section-own-width-fields.js";import{dropEmptyHeadings as A}from"../panel-drop-empty-headings.js";import{rowsShownForNode as P}from"../show-when-resolve.js";const x={spacingFields:a,sidesPaddingFields:L,sectionShapeFields:F,cardShapeFields:d,cellWidthFields:p,widthField:S,boxGutterFields:O,sectionOwnWidthFields:w,heightFields:l,anchorFields:m,stickFields:c,sectionThemeFields:n,animationTabFields:e,blockSizeFields:({tablet:i,...o}={})=>h({...o,say:E,...i?{phone:f}:{}}),assignSectionGroups:_,dropEmptyHeadings:A,rowsShownForNode:P,SECTION_THEME_FOLLOW_LABEL:s,BLOCK_THEME_FOLLOW_LABEL:t,PartAnchors:r};export{x as PASS_INSPECTOR};
1
+ import r from"../../../components/PreviewPartAnchors.js";import{animationTabFields as e}from"../../animation/fields.js";import{BLOCK_THEME_FOLLOW_LABEL as t,SECTION_THEME_FOLLOW_LABEL as s}from"../../../components/SectionThemePicker.js";import{anchorFields as m,cardShapeFields as d,cellWidthFields as l,heightFields as p,sectionShapeFields as n,sectionThemeFields as F,spacingFields as a,stickFields as S,widthField as c}from"../controls.js";import{blockSizeFieldSet as h}from"efficient-easel/screen/lib/document/block-size-fields";import{VIEW_KEY_ACCESS as E}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_UNITS_TABLE as f,rowSay as L,sidesPaddingFields as _}from"../box-fields.js";import{assignSectionGroups as T}from"../field-groups.js";import{boxGutterFields as O}from"../box-gutter-field.js";import{sectionOwnWidthFields as A}from"../section-own-width-fields.js";import{dropEmptyHeadings as g}from"../panel-drop-empty-headings.js";import{rowsShownForNode as w}from"../show-when-resolve.js";const x={spacingFields:a,sidesPaddingFields:_,sectionShapeFields:n,cardShapeFields:d,cellWidthFields:l,widthField:c,boxGutterFields:O,sectionOwnWidthFields:A,heightFields:p,anchorFields:m,stickFields:S,sectionThemeFields:F,animationTabFields:e,blockSizeFields:({tablet:i,...o}={})=>h({...o,say:L,lengthUnits:f,...i?{phone:E}:{}}),assignSectionGroups:T,dropEmptyHeadings:g,rowsShownForNode:w,SECTION_THEME_FOLLOW_LABEL:s,BLOCK_THEME_FOLLOW_LABEL:t,PartAnchors:r};export{x as PASS_INSPECTOR};
@@ -1 +1 @@
1
- "use client";import{jsx as i}from"react/jsx-runtime";import{group as k,sharedStyleKinds as l}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as x}from"efficient-easel/screen/lib/document/device-fields";import{usePreviewHeader as R}from"../../../render/components/PreviewHeaderContext.js";import{BackgroundWidthRow as b,ContentWidthRow as S}from"../../components/SectionWidthRows.js";import{PAGE_WIDTH as h}from"../../../format/lib/content/page-width.js";import{SECTION_WIDTH_KEYS as s,chromeOwnWidth as _,ownSectionWidth as m,sectionBackgroundPatch as E,sectionContentMaxPatch as I,sectionContentPatch as P,sectionWidthResetPatch as f}from"../../../format/lib/content/section-width.js";import{say as F}from"../../../format/lib/editor-words.js";import{finiteNumber as N}from"../../../format/lib/finite-number.js";import{WIDTH_LABEL as T,keptBy as w,useSelectedPatch as p,useSelectedProps as g}from"./controls.js";const B="Content cannot be wider than the background.",u=t=>F(t==="content"?"Content width":"Full width");function W(t){const{siteWidth:n,sectionBackgroundWidth:r,sectionContentWidth:e,themeFromDocument:o}=R(),c=N(n)??h.default;return t.drawsFullOnItsOwn?{px:c,background:"full",content:"full"}:{px:c,background:(o?null:r)??"full",content:(o?null:e)??"content"}}const D={read:m},H={read:m,drawsFullOnItsOwn:!0},M={read:_,clearOnContent:{fullWidth:void 0}};function A({source:t}){const n=t.read(g()),r=p(),e=W(t);return i(b,{value:n.background??e.background,changed:n.background!==null,detail:u(e.background),onChange:o=>r(E(o)),onReset:()=>r(f("background"))})}function U({source:t}){const n=t.read(g()),r=p(),e=d=>r({...d,...t.clearOnContent}),o=W(t),c=(n.background??o.background)==="content",a=n.content??o.content;return i(S,{mode:c&&a==="full"?"content":a,px:n.contentMax??o.px,max:c?o.px:h.max,changed:n.content!==null,detail:o.content==="full"?u("full"):`${u("content")} ${o.px}px`,fullClosed:c,hint:c?B:void 0,onMode:d=>e(P(d)),onPx:d=>e(I(d)),onReset:()=>e(f("content"))})}const C=(t,n)=>x("desktop",{type:"custom",render:()=>i(t,{source:n})}),O=t=>({[s.background]:C(A,t),[s.content]:C(U,t),[s.contentMax]:w()});function J(t){const n=t?.drawsFullOnItsOwn?H:D;return l({_gWidth:k(T),...O(n)})}function Q(){return l({...O(M),fullWidth:w()})}export{Q as chromeOwnWidthFields,J as sectionOwnWidthFields};
1
+ "use client";import{jsx as l}from"react/jsx-runtime";import{group as R,sharedStyleKinds as h}from"efficient-easel/screen/lib/document/box-fields";import{lengthUnitFields as _}from"./box-fields.js";import{deviceField as b}from"efficient-easel/screen/lib/document/device-fields";import{usePreviewHeader as E}from"../../../render/components/PreviewHeaderContext.js";import{BackgroundWidthRow as S,CONTENT_LABEL as I,ContentWidthRow as N}from"../../components/SectionWidthRows.js";import{PAGE_WIDTH as d}from"../../../format/lib/content/page-width.js";import{SECTION_CONTENT_MAX_ROW as f,SECTION_WIDTH_KEYS as s,chromeOwnWidth as T,ownSectionWidth as w,sectionBackgroundPatch as P,sectionContentMaxPatch as F,sectionContentPatch as M,sectionWidthResetPatch as p}from"../../../format/lib/content/section-width.js";import{say as B}from"../../../format/lib/editor-words.js";import{finiteNumber as A}from"../../../format/lib/finite-number.js";import{WIDTH_LABEL as D,keptBy as g,useLengthRow as H,useSelectedPatch as O,useSelectedProps as C}from"./controls.js";const U="Content cannot be wider than the background.",a=t=>B(t==="content"?"Content width":"Full width");function x(t){const{siteWidth:n,sectionBackgroundWidth:r,sectionContentWidth:e,themeFromDocument:o}=E(),c=A(n)??d.default;return t.drawsFullOnItsOwn?{px:c,background:"full",content:"full"}:{px:c,background:(o?null:r)??"full",content:(o?null:e)??"content"}}const v={read:w},y={read:w,drawsFullOnItsOwn:!0},K={read:T,clearOnContent:{fullWidth:void 0}};function L({source:t}){const n=t.read(C()),r=O(),e=x(t);return l(S,{value:n.background??e.background,changed:n.background!==null,detail:a(e.background),onChange:o=>r(P(o)),onReset:()=>r(p("background"))})}function j({source:t}){const n=t.read(C()),r=O(),e=i=>r({...i,...t.clearOnContent}),o=x(t),c=(n.background??o.background)==="content",u=H({row:f,label:I,grid:{min:d.min,max:c?o.px:d.max,step:d.step},valueKey:s.contentMax,view:"desktop",numbersIn:()=>n.contentMax!==null}),m=n.content??o.content;return l(N,{mode:c&&m==="full"?"content":m,px:n.contentMax??o.px,max:c?o.px:d.max,changed:n.content!==null,detail:o.content==="full"?a("full"):`${a("content")} ${o.px}px`,fullClosed:c,hint:c?U:void 0,onMode:i=>e(M(i)),onPx:i=>e({...F(i),...u?.unitPatch(!1)}),...u?{length:u}:{},onReset:()=>e(p("content"))})}const W=(t,n)=>b("desktop",{type:"custom",render:()=>l(t,{source:n})}),k=t=>({[s.background]:W(L,t),[s.content]:W(j,t),[s.contentMax]:g(),..._(f,s.content)});function nt(t){const n=t?.drawsFullOnItsOwn?y:v;return h({_gWidth:R(D),...k(n)})}function ot(){return h({...k(K),fullWidth:g()})}export{ot as chromeOwnWidthFields,nt as sectionOwnWidthFields};