efficient-web-builder 59.2.0 → 60.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 (153) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/dist/editor/components/SectionThumbnail.js +1 -1
  3. package/dist/editor/components/storefront-editor.css +21 -7
  4. package/dist/editor/lib/animation/fields.js +1 -1
  5. package/dist/editor/lib/animation/hover-fields.js +1 -1
  6. package/dist/editor/lib/document/blocks/general/Flex/fields.js +1 -1
  7. package/dist/editor/lib/document/blocks/general/Footprint/fields.js +1 -1
  8. package/dist/editor/lib/document/blocks/general/ListSearch/fields.js +1 -1
  9. package/dist/editor/lib/document/canvas-typing.js +1 -1
  10. package/dist/editor/lib/document/card-display-chips.d.ts +4 -2
  11. package/dist/editor/lib/document/card-display-chips.js +1 -1
  12. package/dist/editor/lib/document/card-row-fields.d.ts +3 -1
  13. package/dist/editor/lib/document/card-row-fields.js +1 -1
  14. package/dist/editor/lib/document/controls.js +1 -1
  15. package/dist/editor/lib/document/field-groups.js +1 -1
  16. package/dist/editor/lib/document/mirror-cards-field.js +1 -1
  17. package/dist/format/lib/animation/hover.d.ts +23 -1
  18. package/dist/format/lib/animation/hover.js +1 -1
  19. package/dist/format/lib/content/block-align.d.ts +3 -1
  20. package/dist/format/lib/content/block-align.js +1 -1
  21. package/dist/format/lib/content/box-background.d.ts +7 -0
  22. package/dist/format/lib/content/box-background.js +1 -1
  23. package/dist/format/lib/content/box-card-rule.d.ts +7 -0
  24. package/dist/format/lib/content/box-card-rule.js +1 -0
  25. package/dist/format/lib/content/box-layout.js +1 -1
  26. package/dist/format/lib/content/box-phone-place.d.ts +4 -4
  27. package/dist/format/lib/content/box-phone-place.js +1 -1
  28. package/dist/format/lib/content/box-shape.d.ts +1 -1
  29. package/dist/format/lib/content/box-shape.js +1 -1
  30. package/dist/format/lib/content/box-side-space.d.ts +2 -1
  31. package/dist/format/lib/content/box-side-space.js +1 -1
  32. package/dist/format/lib/content/button-icon.d.ts +3 -1
  33. package/dist/format/lib/content/button-icon.js +1 -1
  34. package/dist/format/lib/content/card-template.d.ts +9 -1
  35. package/dist/format/lib/content/card-template.js +1 -1
  36. package/dist/format/lib/content/cell-picture-sizes.js +1 -1
  37. package/dist/format/lib/content/footprint.d.ts +2 -0
  38. package/dist/format/lib/content/footprint.js +1 -1
  39. package/dist/format/lib/content/gallery-card-layout.d.ts +6 -1
  40. package/dist/format/lib/content/gallery-card-layout.js +1 -1
  41. package/dist/format/lib/content/hover-media.d.ts +30 -0
  42. package/dist/format/lib/content/hover-media.js +1 -0
  43. package/dist/format/lib/content/image-aspect.d.ts +3 -3
  44. package/dist/format/lib/content/image-aspect.js +1 -1
  45. package/dist/format/lib/content/ink.d.ts +3 -0
  46. package/dist/format/lib/content/ink.js +1 -1
  47. package/dist/format/lib/content/list-position.d.ts +3 -0
  48. package/dist/format/lib/content/list-position.js +1 -0
  49. package/dist/format/lib/content/list-query.d.ts +2 -0
  50. package/dist/format/lib/content/list-query.js +1 -1
  51. package/dist/format/lib/content/mirror-cards.d.ts +3 -0
  52. package/dist/format/lib/content/mirror-cards.js +1 -1
  53. package/dist/format/lib/content/part-display.d.ts +2 -1
  54. package/dist/format/lib/content/part-display.js +1 -1
  55. package/dist/format/lib/content/site-gutter.d.ts +2 -0
  56. package/dist/format/lib/content/site-gutter.js +1 -1
  57. package/dist/format/lib/content/view-hide-class.d.ts +5 -2
  58. package/dist/format/lib/content/view-hide-class.js +1 -1
  59. package/dist/format/lib/content/view-lines.d.ts +2 -1
  60. package/dist/format/lib/content/view-lines.js +1 -1
  61. package/dist/format/lib/document/blocks/general/Footprint/card-seed.d.ts +3 -0
  62. package/dist/format/lib/document/blocks/general/Footprint/card-seed.js +1 -1
  63. package/dist/format/lib/document/blocks/general/text-part-shapes.json +7 -0
  64. package/dist/format/lib/document/card-content-switch.js +1 -1
  65. package/dist/format/lib/document/panel-only.d.ts +2 -0
  66. package/dist/format/lib/document/panel-only.js +1 -0
  67. package/dist/format/lib/document/row-hand.js +1 -1
  68. package/dist/format/lib/document/section-catalog.d.ts +2 -1
  69. package/dist/format/lib/document/section-catalog.js +10 -10
  70. package/dist/format/lib/document/section-descriptions.js +1 -1
  71. package/dist/format/lib/document/seed-shape.d.ts +2 -0
  72. package/dist/format/lib/document/seed-shape.js +1 -0
  73. package/dist/format/lib/editor-words-catalogue.d.ts +21 -0
  74. package/dist/format/lib/editor-words-catalogue.js +4 -4
  75. package/dist/format/lib/editor-words-kept.js +1 -1
  76. package/dist/format/lib/fit-words.d.ts +1 -0
  77. package/dist/format/lib/fit-words.js +9 -8
  78. package/dist/format/lib/sized-image.js +1 -1
  79. package/dist/format/lib/source-rules/one-phone-edge.d.ts +13 -0
  80. package/dist/format/lib/source-rules/one-phone-edge.js +8 -0
  81. package/dist/format/lib/source-rules/published-mounts.d.ts +22 -0
  82. package/dist/format/lib/source-rules/published-mounts.js +58 -0
  83. package/dist/format/lib/source-rules/support/panel-select-cascade.js +1 -2
  84. package/dist/format/lib/source-rules/support/ts-program.d.ts +4 -0
  85. package/dist/format/lib/source-rules/support/ts-program.js +2 -0
  86. package/dist/format/lib/theme.d.ts +1 -0
  87. package/dist/format/lib/theme.js +3 -3
  88. package/dist/render/components/ButtonBlock.js +1 -1
  89. package/dist/render/components/CardRowContext.d.ts +5 -2
  90. package/dist/render/components/CardRowContext.js +1 -1
  91. package/dist/render/components/DealerFinder.js +1 -1
  92. package/dist/render/components/Eyebrow.js +1 -1
  93. package/dist/render/components/Flex.d.ts +2 -1
  94. package/dist/render/components/Flex.js +1 -1
  95. package/dist/render/components/Footprint.js +1 -1
  96. package/dist/render/components/HeroArrows.d.ts +6 -3
  97. package/dist/render/components/HeroArrows.js +1 -1
  98. package/dist/render/components/HeroPictures.js +1 -1
  99. package/dist/render/components/HoverMediaLayer.d.ts +9 -0
  100. package/dist/render/components/HoverMediaLayer.js +1 -0
  101. package/dist/render/components/InBoxContext.d.ts +3 -0
  102. package/dist/render/components/InBoxContext.js +1 -1
  103. package/dist/render/components/ListSearchBox.d.ts +2 -1
  104. package/dist/render/components/ListSearchBox.js +1 -1
  105. package/dist/render/components/LogoBlock.js +1 -1
  106. package/dist/render/components/Logos.js +1 -1
  107. package/dist/render/components/PublishedPartStylesContext.d.ts +2 -1
  108. package/dist/render/components/PublishedPartStylesContext.js +1 -1
  109. package/dist/render/components/SectionAnimation.d.ts +4 -2
  110. package/dist/render/components/SectionAnimation.js +1 -1
  111. package/dist/render/components/SideListLayout.d.ts +14 -0
  112. package/dist/render/components/SideListLayout.js +1 -0
  113. package/dist/render/components/Split.js +1 -1
  114. package/dist/render/components/Text.js +1 -1
  115. package/dist/render/components/TitleWithButtons.js +1 -1
  116. package/dist/render/components/ViewHideRoot.d.ts +7 -1
  117. package/dist/render/components/ViewHideRoot.js +1 -1
  118. package/dist/render/lib/content/block-size.d.ts +4 -1
  119. package/dist/render/lib/content/block-size.js +1 -1
  120. package/dist/render/lib/content/box-cell-bound.js +1 -1
  121. package/dist/render/lib/content/box-shared-columns.js +1 -1
  122. package/dist/render/lib/content/box-stack-line.d.ts +1 -0
  123. package/dist/render/lib/content/box-stack-line.js +1 -1
  124. package/dist/render/lib/content/view-values.d.ts +2 -0
  125. package/dist/render/lib/content/view-values.js +1 -1
  126. package/dist/render/lib/dealer-source.d.ts +3 -2
  127. package/dist/render/lib/dealer-source.js +1 -1
  128. package/dist/render/lib/document/blocks/general/CardList/render.js +1 -1
  129. package/dist/render/lib/document/blocks/general/Cards/render.js +1 -1
  130. package/dist/render/lib/document/blocks/general/Flex/render.js +1 -1
  131. package/dist/render/lib/document/blocks/general/ImageBlock/render.js +1 -1
  132. package/dist/render/lib/document/blocks/general/ListSearch/render.js +1 -1
  133. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.d.ts +1 -0
  134. package/dist/render/lib/document/blocks/general/section-to-box-row-parts.js +1 -1
  135. package/dist/render/lib/document/blocks/general/section-to-box-rows-cards.js +1 -1
  136. package/dist/render/lib/document/blocks/general/section-to-box-rows-forms.js +1 -1
  137. package/dist/render/lib/document/blocks/general/section-to-box-rows-head.js +1 -1
  138. package/dist/render/lib/document/blocks/general/section-to-box-rows-proof.js +1 -1
  139. package/dist/render/lib/document/page-render.js +1 -1
  140. package/dist/render/lib/document/part-styles.d.ts +3 -1
  141. package/dist/render/lib/document/part-styles.js +2 -2
  142. package/dist/render/lib/document/passes/block-size.js +1 -1
  143. package/dist/render/lib/document/passes/clickable-parts.js +1 -1
  144. package/dist/render/lib/document/passes/hidden-nodes.js +1 -1
  145. package/dist/render/lib/document/passes/section-animation.js +1 -1
  146. package/dist/render/lib/document/passes/section-width.js +1 -1
  147. package/dist/render/lib/document/published-passes.d.ts +13 -0
  148. package/dist/render/lib/document/published-passes.js +1 -0
  149. package/dist/render/lib/document/text-parts.d.ts +1 -0
  150. package/dist/render/lib/document/text-parts.js +1 -1
  151. package/dist/render/lib/sections/section-to-box.d.ts +4 -0
  152. package/dist/render/lib/sections/section-to-box.js +1 -1
  153. package/package.json +1 -1
@@ -1 +1 @@
1
- import{group as i}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as t}from"efficient-easel/screen/lib/document/device-fields";import{text as o}from"../../../controls.js";import{LIST_SEARCH_PH as e}from"../../../../../../format/lib/document/blocks/general/ListSearch/meta.js";const d={fields:{_gContent:t("desktop",i("Content")),hint:t("desktop",o("Hint",e.hint)),noMatchText:t("desktop",o("No match",e.noMatchText))}};export{d as ListSearchFields};
1
+ import{group as n}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as t}from"efficient-easel/screen/lib/document/device-fields";import{text as o,withPanelOnly as e}from"../../../controls.js";import{LIST_SEARCH_PH as i}from"../../../../../../format/lib/document/blocks/general/ListSearch/meta.js";const h={fields:{_gContent:t("desktop",n("Content")),hint:t("desktop",e(o("Hint",i.hint))),noMatchText:t("desktop",e(o("No match",i.noMatchText)))}};export{h as ListSearchFields};
@@ -1 +1 @@
1
- import{useSyncExternalStore as g}from"react";import{rowBound as P}from"../../../format/lib/content/card-template.js";import{linkedCount as O}from"../../../format/lib/content/count-numbers.js";import{SHOP_MARKUP as R}from"../../../format/lib/markup.js";import{readHidable as S,textFieldOffPage as k}from"./controls.js";import{decodePartId as v}from"efficient-easel/draw";import{canTypeOnCanvas as K,PART_ATTR as y}from"../../../render/lib/document/text-parts.js";import{partRowField as C}from"./part-row-field.js";import{decodePartKey as b,partRowValue as A}from"../../../render/lib/document/part-rows.js";import{isMultilineKind as E,typeInPlaceKind as _}from"../../../render/lib/document/part-text.js";import{commitPartText as w}from"./part-typing.js";import{consentWordsOf as F}from"../../../format/lib/content/consent-banner.js";import{KICKER_NUMBER_ATTR as I}from"../../../render/lib/content/page-contents.js";const B=`[${I}]`,L=["bold","italic","underline","strike","link","sup","sub"],M=["bullet","number"];function $(e,t){return e?[...L,...t?M:[]]:[]}function T(e,t){const r=v(e);if(!r?.propKey)return null;const{nodeId:u,propKey:s}=r,o=t.getItemById(u),c=t.getSelectorForId(u);if(!o||!c)return null;const{key:n,row:i}=b(s),a=t.components[o.type]?.fields?.[n],d=i?C(a,i):a,m=_(d);if(!m)return null;const l=o.props??{};if(F(l)!==null||!i&&P(o.type,l,n)||o.type==="Text"&&n==="text"&&O(l)||i&&!(Array.isArray(l[n])&&i.index<l[n].length))return null;const x=i?A(l[n],i):l[n];return{node:o,selector:c,propKey:s,kind:m,stored:x,offPage:k(d)}}function ee(e,t){const r=T(e,t);if(!r)return null;const{text:u,hidden:s}=S(r.stored);if(!K({offPage:r.offPage,hidden:!!s}))return null;const o=E(r.kind);return{partId:e,value:u,rules:R,multiline:o,skip:B,offered:$(r.kind!=="plainText",o),write:c=>{const n=T(e,t);n&&w({node:n.node,propKey:n.propKey,kind:n.kind,zone:n.selector.zone,index:n.selector.index},c,t.replace)}}}function te(e,t,r){return e?.isConnected&&e.getAttribute(y)===r?e:t?.querySelector(`[${y}="${h(r)}"]`)??null}function h(e){return e.replace(/["\\]/g,"\\$&")}function ne(e){const t=e.activeElement;return t?t.tagName==="IFRAME"||!!t.closest(".es-canvas"):!1}let f=null;const p=new Set;function N(){return f}function re(e){if(e!==f){f=e;for(const t of p)t()}}function W(e){return p.add(e),()=>{p.delete(e)}}function oe(){return g(W,N,()=>null)}export{N as canvasTypingPart,h as cssString,ne as keysOnCanvas,te as partElement,$ as partTextTools,ee as partTypingTarget,re as setCanvasTypingPart,W as subscribeCanvasTypingPart,oe as useCanvasTypingPart};
1
+ import{useSyncExternalStore as g}from"react";import{rowBound as O}from"../../../format/lib/content/card-template.js";import{linkedCount as P}from"../../../format/lib/content/count-numbers.js";import{SHOP_MARKUP as R}from"../../../format/lib/markup.js";import{readHidable as S,textFieldOffPage as k}from"./controls.js";import{decodePartId as v}from"efficient-easel/draw";import{canTypeOnCanvas as K,PART_ATTR as y}from"../../../render/lib/document/text-parts.js";import{fieldPanelOnly as C}from"../../../format/lib/document/panel-only.js";import{partRowField as b}from"./part-row-field.js";import{decodePartKey as A,partRowValue as E}from"../../../render/lib/document/part-rows.js";import{isMultilineKind as _,typeInPlaceKind as w}from"../../../render/lib/document/part-text.js";import{commitPartText as F}from"./part-typing.js";import{consentWordsOf as I}from"../../../format/lib/content/consent-banner.js";import{KICKER_NUMBER_ATTR as B}from"../../../render/lib/content/page-contents.js";const L=`[${B}]`,M=["bold","italic","underline","strike","link","sup","sub"],$=["bullet","number"];function h(e,n){return e?[...M,...n?$:[]]:[]}function T(e,n){const r=v(e);if(!r?.propKey)return null;const{nodeId:u,propKey:s}=r,o=n.getItemById(u),f=n.getSelectorForId(u);if(!o||!f)return null;const{key:t,row:i}=A(s),d=n.components[o.type]?.fields?.[t],c=i?b(d,i):d,m=w(c);if(!m)return null;const l=o.props??{};if(I(l)!==null||!i&&O(o.type,l,t)||o.type==="Text"&&t==="text"&&P(l)||i&&!(Array.isArray(l[t])&&i.index<l[t].length))return null;const x=i?E(l[t],i):l[t];return{node:o,selector:f,propKey:s,kind:m,stored:x,offPage:k(c),panelOnly:C(c)}}function te(e,n){const r=T(e,n);if(!r)return null;const{text:u,hidden:s}=S(r.stored);if(!K({offPage:r.offPage,hidden:!!s,panelOnly:r.panelOnly}))return null;const o=_(r.kind);return{partId:e,value:u,rules:R,multiline:o,skip:L,offered:h(r.kind!=="plainText",o),write:f=>{const t=T(e,n);t&&F({node:t.node,propKey:t.propKey,kind:t.kind,zone:t.selector.zone,index:t.selector.index},f,n.replace)}}}function re(e,n,r){return e?.isConnected&&e.getAttribute(y)===r?e:n?.querySelector(`[${y}="${N(r)}"]`)??null}function N(e){return e.replace(/["\\]/g,"\\$&")}function oe(e){const n=e.activeElement;return n?n.tagName==="IFRAME"||!!n.closest(".es-canvas"):!1}let p=null;const a=new Set;function W(){return p}function ie(e){if(e!==p){p=e;for(const n of a)n()}}function z(e){return a.add(e),()=>{a.delete(e)}}function le(){return g(z,W,()=>null)}export{W as canvasTypingPart,N as cssString,oe as keysOnCanvas,re as partElement,h as partTextTools,te as partTypingTarget,ie as setCanvasTypingPart,z as subscribeCanvasTypingPart,le as useCanvasTypingPart};
@@ -1,4 +1,5 @@
1
1
  import { type ViewTier } from "efficient-easel/draw";
2
+ import { type CardRowFieldSpec } from "../../../format/lib/content/card-template.js";
2
3
  import { type BlockShowWhenFacts, type ShowWhenRule } from "../../../format/lib/document/show-when-attach.js";
3
4
  export declare const NOT_CARD_OF_TEMPLATE = "notCardOfTemplate";
4
5
  export declare const ON_A_CARD: ShowWhenRule;
@@ -22,11 +23,12 @@ type ChipOwner = {
22
23
  type?: unknown;
23
24
  props?: Record<string, unknown>;
24
25
  } | null | undefined;
25
- export declare function cardChipLabel(child: Child, ownerType: string | undefined, layers: (child: Child) => string, owner?: ChipOwner): string;
26
- export declare function CardDisplayChips({ card, ownerType, owner, labelOf, write, readOnly, view, }: {
26
+ export declare function cardChipLabel(child: Child, ownerType: string | undefined, layers: (child: Child) => string, owner?: ChipOwner, fields?: readonly CardRowFieldSpec[]): string;
27
+ export declare function CardDisplayChips({ card, ownerType, owner, fields, labelOf, write, readOnly, view, }: {
27
28
  card: Card;
28
29
  ownerType: string | undefined;
29
30
  owner?: ChipOwner;
31
+ fields?: readonly CardRowFieldSpec[];
30
32
  labelOf: (type: string) => string;
31
33
  write: (next: (latest: Card) => Card) => void;
32
34
  readOnly?: boolean;
@@ -1 +1 @@
1
- "use client";import{jsx as c}from"react/jsx-runtime";import{isNodeList as b}from"efficient-easel/data";import{useEasel as N}from"efficient-easel/easel";import{hiddenInView as D,hiddenKeyOf as h,hidePatch as S,slotChildName as _,slotChildRowName as A}from"efficient-easel/draw";import{cardTemplateCardOwner as k,cardTemplateField as T,namedRowField as P}from"../../../format/lib/content/card-template.js";import{DisplayRow as g,useSelectedPatch as j}from"./controls.js";import{websiteNodeIsLocked as E}from"./locked-blocks.js";import{stripMarkup as F}from"../../../format/lib/markup.js";import{sourceRowName as L}from"../../../format/lib/document/source-row-name.js";import{withShowWhen as M}from"../../../format/lib/document/show-when-attach.js";import{deviceField as I}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as $}from"efficient-easel/screen/lib/document/panel-no-control-mark";const w="notCardOfTemplate",B={not:{context:w,is:!0}},ae={[w]:(e,n)=>{const t=k(n.appState,e.props?.id);return t===void 0?void 0:t===null}};function m(e){const n=e.props?.content;return b(n)?n:[]}const l=(e,n)=>D(e.props??{},n),H=(e,n)=>e.props?.[h(n)]!==void 0;function x(e,n=()=>!1,t="desktop"){return m(e).flatMap(o=>typeof o?.props?.id!="string"?[]:m(o).length&&!l(o,t)?x(o,n,t):n(o)?[]:[o])}function K(e,n,t,o="desktop"){const r=x(e,t,o).map(p=>({child:p,name:n(p)})),i=new Set(r.map(p=>p.name)),s=new Set;return r.map(({child:p,name:u})=>{let f=u;if(s.has(u)){let a=2;for(;i.has(`${u} ${a}`);)a+=1;f=`${u} ${a}`,i.add(f)}return s.add(u),{id:p.props.id,label:f,shown:!l(p,o)}})}function y(e,n,t){const o=r=>t==="desktop"?l(r,t):H(r,t);return m(e).flatMap(r=>o(r)?n(r)?[]:[r,...y(r,n,t)]:y(r,n,t))}function V(e,n){const t={...e};for(const[r,i]of Object.entries(n))i===void 0||r===h("desktop")&&i===!1?delete t[r]:t[r]=i;return Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>t[r]===e[r])?e:t}function O(e,n,t){const o=m(e);let r=!1;const i=o.map(s=>{if(r)return s;let p=s;if(s?.props?.id===n){const u=V(s.props,t(s.props));u!==s.props&&(p={...s,props:u})}else p=O(s,n,t);return r=p!==s,p});return r?{...e,props:{...e.props,content:i}}:e}function R(e,n,t,o="desktop"){return O(e,n,r=>o==="desktop"&&l({props:r},o)===!t?{}:S(r,o,!t))}function W(e,n,t){return t==="desktop"?R(e,n,!0,t):O(e,n,()=>({[h(t)]:void 0}))}function X(e,n,t,o){return _(e).trim()?t(e):T(n,P(e.props),o)?.label??t(e)}const Y="This page is read-only.";function q({card:e,ownerType:n,owner:t,labelOf:o,write:r,readOnly:i,view:s="desktop"}){const p=a=>A(a,o,F,void 0,L),u=a=>E(a.type,a),f=K(e,a=>X(a,n,p,t),u,s);return f.length?c(g,{parts:f,changed:y(e,u,s).length>0,shown:a=>f.find(d=>d.id===a)?.shown??!0,disabledReason:i?Y:void 0,onPress:(a,d)=>r(C=>R(C,a,d,s)),onReset:()=>r(a=>y(a,u,s).reduce((d,C)=>W(d,String(C.props.id),s),a))}):c($,{})}function z(){try{const e=N(r=>r),n=e.config.components??{},t=e.selectedItem;if(!t)return null;const o=k(e.appState,t.props?.id);return{labelOf:r=>n[r]?.label??r,card:t,ownerType:typeof o?.type=="string"?o.type:void 0,owner:o}}catch{return null}}function G({readOnly:e,view:n}){const t=z(),o=j();return t?c(q,{...t,view:n,readOnly:e,write:r=>{e||o(i=>{const s={...t.card,props:i},p=r(s);return p===s?null:{content:p.props.content}})}}):c(g,{parts:[],changed:!1,shown:()=>!0,onPress:()=>{},onReset:()=>{}})}function ie(e){return M(I(e,{type:"custom",render:({readOnly:n})=>c(G,{readOnly:n,view:e})}),B)}export{ae as CARD_BOX_FACTS,q as CardDisplayChips,w as NOT_CARD_OF_TEMPLATE,B as ON_A_CARD,X as cardChipLabel,ie as cardDisplayField,K as cardDisplayItems,x as cardDisplayParts,R as withChildShown};
1
+ "use client";import{jsx as m}from"react/jsx-runtime";import{isNodeList as S}from"efficient-easel/data";import{useEasel as N}from"efficient-easel/easel";import{hiddenInView as D,hiddenKeyOf as h,hidePatch as _,slotChildName as A,slotChildRowName as T}from"efficient-easel/draw";import{cardListFieldsOf as F,cardTemplateCardOwner as w,namedRowField as P,rowFieldSpec as j}from"../../../format/lib/content/card-template.js";import{DisplayRow as g,useSelectedPatch as E}from"./controls.js";import{websiteNodeIsLocked as L}from"./locked-blocks.js";import{stripMarkup as M}from"../../../format/lib/markup.js";import{sourceRowName as I}from"../../../format/lib/document/source-row-name.js";import{withShowWhen as $}from"../../../format/lib/document/show-when-attach.js";import{deviceField as B}from"efficient-easel/screen/lib/document/device-fields";import{NoControlMark as H}from"efficient-easel/screen/lib/document/panel-no-control-mark";const x="notCardOfTemplate",K={not:{context:x,is:!0}},ue={[x]:(e,n)=>{const t=w(n.appState,e.props?.id);return t===void 0?void 0:t===null}};function l(e){const n=e.props?.content;return S(n)?n:[]}const y=(e,n)=>D(e.props??{},n),V=(e,n)=>e.props?.[h(n)]!==void 0;function R(e,n=()=>!1,t="desktop"){return l(e).flatMap(o=>typeof o?.props?.id!="string"?[]:l(o).length&&!y(o,t)?R(o,n,t):n(o)?[]:[o])}function W(e,n,t,o="desktop"){const r=R(e,t,o).map(s=>({child:s,name:n(s)})),a=new Set(r.map(s=>s.name)),p=new Set;return r.map(({child:s,name:u})=>{let f=u;if(p.has(u)){let d=2;for(;a.has(`${u} ${d}`);)d+=1;f=`${u} ${d}`,a.add(f)}return p.add(u),{id:s.props.id,label:f,shown:!y(s,o)}})}function C(e,n,t){const o=r=>t==="desktop"?y(r,t):V(r,t);return l(e).flatMap(r=>o(r)?n(r)?[]:[r,...C(r,n,t)]:C(r,n,t))}function X(e,n){const t={...e};for(const[r,a]of Object.entries(n))a===void 0||r===h("desktop")&&a===!1?delete t[r]:t[r]=a;return Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>t[r]===e[r])?e:t}function k(e,n,t){const o=l(e);let r=!1;const a=o.map(p=>{if(r)return p;let s=p;if(p?.props?.id===n){const u=X(p.props,t(p.props));u!==p.props&&(s={...p,props:u})}else s=k(p,n,t);return r=s!==p,s});return r?{...e,props:{...e.props,content:a}}:e}function b(e,n,t,o="desktop"){return k(e,n,r=>o==="desktop"&&y({props:r},o)===!t?{}:_(r,o,!t))}function Y(e,n,t){return t==="desktop"?b(e,n,!0,t):k(e,n,()=>({[h(t)]:void 0}))}function q(e,n,t,o,r){return A(e).trim()?t(e):j({ownerType:n,owner:o,fields:r},P(e.props))?.label??t(e)}const z="This page is read-only.";function G({card:e,ownerType:n,owner:t,fields:o,labelOf:r,write:a,readOnly:p,view:s="desktop"}){const u=i=>T(i,r,M,void 0,I),f=i=>L(i.type,i),d=W(e,i=>q(i,n,u,t,o),f,s);return d.length?m(g,{parts:d,changed:C(e,f,s).length>0,shown:i=>d.find(c=>c.id===i)?.shown??!0,disabledReason:p?z:void 0,onPress:(i,c)=>a(O=>b(O,i,c,s)),onReset:()=>a(i=>C(i,f,s).reduce((c,O)=>Y(c,String(O.props.id),s),i))}):m(H,{})}function J(){try{const e=N(r=>r),n=e.config.components??{},t=e.selectedItem;if(!t)return null;const o=w(e.appState,t.props?.id);return{labelOf:r=>n[r]?.label??r,card:t,ownerType:typeof o?.type=="string"?o.type:void 0,owner:o,fields:F(e.appState,o)}}catch{return null}}function Q({readOnly:e,view:n}){const t=J(),o=E();return t?m(G,{...t,view:n,readOnly:e,write:r=>{e||o(a=>{const p={...t.card,props:a},s=r(p);return s===p?null:{content:s.props.content}})}}):m(g,{parts:[],changed:!1,shown:()=>!0,onPress:()=>{},onReset:()=>{}})}function fe(e){return $(B(e,{type:"custom",render:({readOnly:n})=>m(Q,{readOnly:n,view:e})}),K)}export{ue as CARD_BOX_FACTS,G as CardDisplayChips,x as NOT_CARD_OF_TEMPLATE,K as ON_A_CARD,q as cardChipLabel,fe as cardDisplayField,W as cardDisplayItems,R as cardDisplayParts,b as withChildShown};
@@ -5,7 +5,9 @@ import { type BlockShowWhenFacts, type ShowWhenRule } from "../../../format/lib/
5
5
  export declare const OUTSIDE_CARD_TEMPLATE = "outsideCardTemplate";
6
6
  export declare const IN_CARD_TEMPLATE: ShowWhenRule;
7
7
  export declare const CARD_ROW_FACTS: BlockShowWhenFacts;
8
- export declare function cardRowField(label: string, kind: CardRowFieldKind): SelectField;
8
+ export declare function cardRowField(label: string, kind: CardRowFieldKind, opts?: {
9
+ content?: boolean;
10
+ }): SelectField;
9
11
  export declare function cardRowItemField(f: CardRowFieldSpec): CustomField<string> | CustomField<import("efficient-easel/draw").HidableValue>;
10
12
  export declare function cardRowFields<Fields extends Record<string, unknown>>(fields: Fields, data: {
11
13
  props?: Record<string, unknown>;
@@ -1 +1 @@
1
- import{jsx as d}from"react/jsx-runtime";import{GroundIcon as _,ListIcon as M}from"efficient-easel/icons";import{FieldGlyph as P}from"../../components/FieldGlyph.js";import{CARD_LIST_FIELDS as W,CARD_LIST_TYPE as h,cardListFieldsOf as B,cardListShows as G,cardTemplateFieldsOf as N,cardTemplateOwner as b}from"../../../format/lib/content/card-template.js";import{copyText as $,plainText as J,plainTextarea as U,ThemeFillRow as Y,withOffPage as q}from"./controls.js";import{recordRowFields as k}from"../../../format/lib/content/record-row.js";import{recordTypesRevision as z}from"../../../format/lib/content/record-types.js";import{editorRecordType as H}from"../../../format/lib/document/editor-page-context.js";import{blockSourcesRevision as Q,declaredBlockSource as C}from"../../../format/lib/content/block-sources.js";import{select as V}from"./box-fields.js";import{withShowWhen as X}from"../../../format/lib/document/show-when-attach.js";function I(o){const t=o?.data?.root,e=H(t?.props)??"";return e&&k(e,"text").length?e:""}const L="outsideCardTemplate",Z={not:{context:L,is:!0}},wo={[L]:(o,t)=>{const e=b(t.appState,o.props?.id);if(e!==void 0)return e===null&&!I(t.appState)}};function fo(o,t){const e=t==="link"?d(P,{noun:"link"}):t==="colour"?d(_,{}):d(M,{}),a={...V(o,e,[t==="colour"?{label:"Manual",value:""}:{label:"Typed here",value:""}],""),cardRowKind:t};return X(a,Z)}function yo(o){return o.kind==="link"?q(J(o.label)):o.kind==="colour"?oo(o.label):o.multiline?U(o.label):$(o.label)}function oo(o){return{type:"custom",render:({value:t,onChange:e})=>d(Y,{label:o,icon:d(_,{}),value:t,shown:typeof t=="string"?t:"",onChange:e})}}function to(o){return!!(o&&typeof o=="object"&&"cardRowKind"in o)}const O=new WeakMap;function Ro(o,t,e){const a=Object.keys(o).filter(n=>to(o[n]));if(!a.length)return o;const f=t.props??{},r=b(e.appState,f.id),s=typeof r?.type=="string"?r.type:"",l=a.map(n=>typeof f[n]=="string"?f[n].trim():""),A=C(r?.props),c=s===h?b(e.appState,r?.props?.id):null,E=c?G(r?.props,c.type):"",K=c?C(c.props):"",D=c?`${String(c.type??"")}\0${K}`:"",j=s===h&&!c?JSON.stringify(r?.props?.[W]??null):"",y=r?"":I(e.appState),x=[s,A,E,D,j,Q(),y,z(),...l].join("\0");let m=O.get(o);m||O.set(o,m=new Map);const g=m.get(x);if(g)return g;const w={...o};return a.forEach((n,u)=>{const p=o[n],R=s===h?B(e.appState,r,p.cardRowKind):s?N(r,p.cardRowKind):k(y,p.cardRowKind);if(!R.length&&!l[u]&&(!s&&y||p.cardRowKind==="colour")){delete w[n];return}const T=l[u]&&!R.some(i=>i.key===l[u])?l[u]:"",F=p.cardRowKind==="list",v=(i,S)=>F&&S===0&&i.key!==l[u]?"":i.key;w[n]={...p,options:[...F?[]:p.options,...R.map((i,S)=>({label:i.label,value:v(i,S)})),...T?[{label:T,value:T}]:[]]}}),m.set(x,w),w}export{wo as CARD_ROW_FACTS,Z as IN_CARD_TEMPLATE,L as OUTSIDE_CARD_TEMPLATE,fo as cardRowField,Ro as cardRowFields,yo as cardRowItemField};
1
+ import{jsx as m}from"react/jsx-runtime";import{GroundIcon as x,ListIcon as M}from"efficient-easel/icons";import{FieldGlyph as B}from"../../components/FieldGlyph.js";import{BOX_IN_COPY as N,BOX_OUTSIDE_COPY as W}from"../../../format/lib/content/box-card-rule.js";import{CARD_LIST_FIELDS as Y,CARD_LIST_TYPE as h,cardCopyPlace as O,cardListFieldsOf as G,cardListShows as U,cardTemplateFieldsOf as X,cardTemplateOwner as C}from"../../../format/lib/content/card-template.js";import{copyText as $,plainText as J,plainTextarea as q,ThemeFillRow as z,withOffPage as H}from"./controls.js";import{recordRowFields as F}from"../../../format/lib/content/record-row.js";import{recordTypesRevision as Q}from"../../../format/lib/content/record-types.js";import{editorRecordType as V}from"../../../format/lib/document/editor-page-context.js";import{blockSourcesRevision as Z,declaredBlockSource as I}from"../../../format/lib/content/block-sources.js";import{select as tt}from"./box-fields.js";import{withShowWhen as ot}from"../../../format/lib/document/show-when-attach.js";function k(t){const o=t?.data?.root,e=V(o?.props)??"";return e&&F(e,"text").length?e:""}const E="outsideCardTemplate",et={not:{context:E,is:!0}},Rt={[E]:(t,o)=>{const e=C(o.appState,t.props?.id);if(e!==void 0)return e===null&&!k(o.appState)},[W]:(t,o)=>{const e=O(o.appState,t.props?.id);return e===void 0?void 0:!e.inCopy},[N]:(t,o)=>O(o.appState,t.props?.id)?.inCopy};function Tt(t,o,e){const l=o==="colour"||e?.content===!0,d=o==="link"?m(B,{noun:"link"}):o==="colour"?m(x,{}):m(M,{}),n={...tt(t,d,[l?{label:"Manual",value:""}:{label:"Typed here",value:""}],""),cardRowKind:o,...l?{cardRowContent:!0}:null};return ot(n,et)}function St(t){return t.kind==="link"?H(J(t.label)):t.kind==="colour"?nt(t.label):t.multiline?q(t.label):$(t.label)}function nt(t){return{type:"custom",render:({value:o,onChange:e})=>m(z,{label:t,icon:m(x,{}),value:o,shown:typeof o=="string"?o:"",onChange:e})}}function rt(t){return!!(t&&typeof t=="object"&&"cardRowKind"in t)}const L=new WeakMap;function ht(t,o,e){const l=Object.keys(t).filter(r=>rt(t[r]));if(!l.length)return t;const d=o.props??{},n=C(e.appState,d.id),p=typeof n?.type=="string"?n.type:"",a=l.map(r=>typeof d[r]=="string"?d[r].trim():""),A=I(n?.props),c=p===h?C(e.appState,n?.props?.id):null,D=c?U(n?.props,c.type):"",K=c?I(c.props):"",P=c?`${String(c.type??"")}\0${K}`:"",j=p===h&&!c?JSON.stringify(n?.props?.[Y]??null):"",R=n?"":k(e.appState),_=[p,A,D,P,j,Z(),R,Q(),...a].join("\0");let f=L.get(t);f||L.set(t,f=new Map);const b=f.get(_);if(b)return b;const w={...t};return l.forEach((r,u)=>{const i=t[r],y=p===h?G(e.appState,n,i.cardRowKind):p?X(n,i.cardRowKind):F(R,i.cardRowKind);if(!a[u]&&(i.cardRowContent?!p||!y.length:!y.length&&!p&&R)){delete w[r];return}const T=a[u]&&!y.some(s=>s.key===a[u])?a[u]:"",g=i.cardRowKind==="list",v=(s,S)=>g&&S===0&&s.key!==a[u]?"":s.key;w[r]={...i,options:[...g?[]:i.options,...y.map((s,S)=>({label:s.label,value:v(s,S)})),...T?[{label:T,value:T}]:[]]}}),f.set(_,w),w}export{Rt as CARD_ROW_FACTS,et as IN_CARD_TEMPLATE,E as OUTSIDE_CARD_TEMPLATE,Tt as cardRowField,ht as cardRowFields,St as cardRowItemField};
@@ -1 +1 @@
1
- "use client";import{jsx as i,jsxs as N,Fragment as k}from"react/jsx-runtime";import{cloneElement as Ge,createContext as zt,useContext as Me,useEffect as Yt,useId as Ue,useRef as V,useState as z}from"react";import{useEasel as te,useSelectedHost as M}from"efficient-easel/easel";import{toDateKey as qt,fromDateKey as Jt}from"efficient-shell/format";import{say as l,editorEaselWords as y}from"../../../format/lib/editor-words.js";import{LOADING_SHOWS_LABELS as We,firstFrameHint as Zt,loadingShowsOf as Qt,loadingStillHint as en}from"../../../format/lib/hero-video.js";import{pageFramesFor as tn,usePageVideoFrames as nn}from"../page-video-frames.js";import{ScreenDocumentContext as on}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as Ke,hidableText as $e}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as pe,LINK_FIELD_MARKER as Xe,MEDIA_FIELD_MARKER as je,SCAFFOLD_FIELD_MARKER as Ve,TEXT_FIELD_MARKER as O,foldMetaOf as fe,textFieldIdentifier as rn}from"efficient-easel/draw";import ln from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as ze}from"../../../render/lib/document/show-when.js";import sn from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as an,CORNER_RADIUS_MAX as Ye,CORNER_RADIUS_MIN as U}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as cn,IMAGE_CORNERS_LABEL as dn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as un}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as pn,GALLERY_LAYOUTS as ne,GALLERY_LAYOUT_KEYS as fn,galleryChoices as qe,galleryLayoutRatio as hn,galleryPictureCells as mn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as gn}from"./shell-glyph.js";import{anchorSiblingsOf as bn,placementPoints as wn}from"../../../format/lib/hero-group-placement.js";import xn from"../../components/AnchorField.js";import Sn from"../../components/SourceStatus.js";import{AdjustIcon as yn,EyeIcon as Cn,AnimationIcon as _n,BackgroundIcon as Je,BorderAllIcon as Rn,BlockSectionIcon as Tn,ColumnWidthsIcon as he,ColumnsIcon as Ze,CornerIcon as On,DirectionDownIcon as In,DirectionLeftIcon as En,DirectionRightIcon as kn,DirectionUpIcon as Fn,EditIcon as An,GapIcon as Ln,GridIcon as Nn,GroundIcon as me,HashIcon as Qe,HeightIcon as Pn,ImageIcon as vn,ListIcon as Bn,LocationIcon as et,PaddingBottomIcon as tt,PaddingLeftIcon as nt,PaddingRightIcon as ot,PaddingTopIcon as rt,PageIcon as Dn,StickyIcon as Hn,SearchIcon as Gn,SquareIcon as Mn,TypeIcon as Un,WidthIcon as Wn}from"efficient-easel/icons";import{FieldGlyph as it}from"../../components/FieldGlyph.js";import{resolvePageBackground as Kn}from"../../../format/lib/content/page-background.js";import{boxFillOf as $n,boxFillSlot as ge}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as lt,CORNER_SIDE_POINTS as Xn,hasOwnSectionCorners as jn,normalizeCornerSides as st}from"../../../format/lib/content/section-corners.js";import{enclosingPath as Vn,enclosingSection as zn}from"./enclosing-section.js";import{SettingsDefaultReset as C,SettingsDrill as Yn,SettingsField as S,SettingsGroup as qn,SettingsGroupSub as Jn,SettingsSegmented as Zn,SettingsBorder as Qn,SettingsSidesEach as eo,SettingsSwitch as be,borderSides as to,borderStartEach as no}from"efficient-easel/panel";import{ListField as oo}from"efficient-easel/fields";import{DisplayChips as ro}from"efficient-shell/ui";import{desktopDisplayChanged as io,partShownOnDesktop as lo,partShownOnPhone as so,phoneDisplayChanged as ao,withDesktopPart as co,withPhonePart as uo}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as po,Checkbox as fo,ColorSwatch as ho,CornersInput as mo,DatePicker as go,DateTimePicker as bo,FOCAL_DEFAULT as wo,IconPicker as at,COLUMN_COUNT_MAX as ct,COLUMN_SHARE_MIN as xo,COLUMN_SHARES_EQUAL as So,resolveColumnShares as dt,WidthsBar as yo,useShellStrings as Co,IconButton as ut,InputNumber as pt,Slider as _o,Tooltip as we}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as Ro}from"./geocode-resolve.js";import{ColourRow as oe,InheritedColourRow as ft}from"./ColourControl.js";import{fillThemeColors as To,slotFill as re}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as xe}from"../../../format/lib/document/part-inks.js";import{keptByRow as Oo}from"efficient-easel/screen/lib/document/style-fields";import ht from"./MarkupToolbar.js";import{deviceField as R}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Io,NoControlMark as Eo,noControlField as mt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as ko}from"../../../format/lib/document/own-box.js";import{PHONE_CLEAR as Fo,resolvePhoneValue as Se}from"../../../format/lib/document/phone-override.js";import{phoneKey as F,tabletKey as W}from"efficient-easel/draw";import{SuppressibleText as Ao}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Lo,CARD_OUTLINE_OPTIONS as No,DEFAULT_CARD_INDEX_FORMAT as Po,DEFAULT_CARD_OUTLINE as vo}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Bo,DEFAULT_COVER_INDEX as Do}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Ho}from"efficient-easel/draw";import Go from"../../components/MediaUploadField.js";import Mo from"../../components/MultiSelectField.js";import Uo from"../../components/SectionThemePicker.js";import Wo from"../../components/SearchSelectField.js";import Ko from"../../components/StorefrontLinkField.js";import{UiIcon as gt}from"efficient-easel/draw/client";import{SECTION_PADDING as I}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as $o}from"../../../render/lib/content/button-look.js";import{usePreviewParts as Xo}from"efficient-easel/draw/client";import{encodePartId as jo}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as Vo,useEaselStrings as zo}from"efficient-easel/strings";import{hasPhoneHeight as Yo,hasTabletHeight as ye,resolveSectionMinHeight as qo,resolveTabletHeight as Jo}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as ie,SECTION_STICK_LABEL as Ce,hasPhoneStick as Zo,hasTabletStick as Qo,resolveSectionStick as bt}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as er,SECTION_MIN_HEIGHT_GROUP_LABEL as Y,SECTION_SCREEN_PCT as tr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as nr,resolveContainerDirection as wt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as or,BOX_BLOCK_SPACING_POINTS as xt,BOX_PHONE_ROW_LABEL as St,BOX_COLUMNS_MAX as rr,BOX_COLUMNS_MIN as yt,BOX_PHONE_ROW_MAX as ir,BOX_PHONE_ROW_MIN as _e,BOX_SHARE_CHOICES as Ct,BOX_SHARE_LABEL as K,boxShareChoiceOf as _t,boxShareWidthsOf as Re,BOX_SHARE_PHONE_DEFAULT as lr,BOX_SHARE_PHONE_POINTS as sr}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as v}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as ar,borderBySide as Rt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as cr,normalizeTheme as Tt,normalizeThemeColors as dr,sectionBandTone as ur,surfaceTwoTone as pr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as Ot,CONTAINER_GAP_BUILT_IN as fr,CONTAINER_GAP_PHONE as Te,GAP_FIELD_CONTAINER as Oe,followsSitePhoneGap as hr,hasOwnContainerGap as mr,hasOwnPhoneGap as Ie,resolveContainerGap as It,resolvePhoneContainerGap as Et}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as gr,CARD_IMAGE_BG_OFF as br,CARD_IMAGE_BG_SWATCH_NAMES as wr,CARD_IMAGE_BG_SWATCHES as xr,isCardImageBackgroundInheriting as Sr,cardImageBackgroundChoice as yr,THEME_CARD_IMAGE_BG as Cr}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as _r,SECTION_BG_NO_FILL as Rr,sectionBackgroundChoice as Tr,THEME_SECTION_BG as Ee,isSectionBackgroundEmpty as Or,sectionBackgroundHex as kt}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Ir,nestedAccentValue as Ft,resolveSectionAccent as le}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as Er,TYPE_SIZE_INHERIT as kr,isTypeSizeInheriting as Fr}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Ar,WIDTH_CHOICE_LABEL as Lr,WIDTH_INHERIT as Nr}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as Pr}from"./panel-heading-scope.js";import{useEaselSession as vr}from"efficient-easel/screen/lib/session-context";import{backendOf as Br}from"../website-session.js";import{BOX_GAP as Dr,describedAs as E,group as T,iconOf as q,sharedStyleKinds as J}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as ke,onDesktopWords as B,phoneTwinFields as se}from"efficient-easel/screen/lib/document/box-fields";import{directionField as Hr,gapField as Fe,iconPickerRow as Gr,pickerCellIcon as Mr,pickerNoneIcon as Ur,Segmented as Ae,segmented as Wr,select as Z,slider as $}from"./box-fields.js";function Ps({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function D(e,t){return l("{value} from {from}",{value:e,from:t})}function Kr(){const{blockGap:e}=v();return e===null?l("this container's own spacing"):D(`${e}px`,l("Styles"))}function $r({inherited:e,onReset:t,label:n}){return i(C,{words:y()?.panel,label:l(n),changed:!e,detail:Kr(),onReset:t})}function Xr(e){return Fe({...Dr,builtIn:fr[e],resolve:(t,n)=>It(e,t,n?.siteGap),action:(t,n)=>i($r,{inherited:!mr(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Oe]:e}})}function jr(e){return ze(R("mobile",{[Oe]:e,type:"custom",render:t=>i(Yr,{container:e,...t})}),At)}function Vr(e){return ze(R("tablet",{[Oe]:e,type:"custom",render:t=>i(zr,{container:e,...t})}),At)}const At={not:{field:"gap",in:Array.from({length:-Ot.min},(e,t)=>Ot.min+t)}};function vs(e){return{gap:R("desktop",Xr(e)),[W("gap")]:Vr(e),[F("gap")]:jr(e)}}function zr({container:e,...t}){const[n]=A("gap"),{siteGap:o}=t.field??{},r=Math.max(Te.min,It(e,n,o));return Fe({...Te,builtIn:r,resolve:a=>Ie(a)?a:r,action:(a,c)=>i(C,{words:y()?.panel,label:l("Gap"),changed:Ie(a),detail:B(d=>l(d),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function Yr({container:e,...t}){const[n]=A("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=Et(e,void 0,n,o,r);return Fe({...Te,builtIn:s,resolve:c=>Et(e,c,n,o,r),action:(c,d)=>i(C,{words:y()?.panel,label:l("Gap"),changed:Ie(c),detail:D(`${s}px`,hr(e,n,r)?l("Styles"):l("Desktop")),onReset:()=>d(void 0)})}).render(t)}function Bs(e){return Hr({offered:nr(e),fallback:wt(e,void 0),resolve:t=>wt(e,t)})}function Ds(e,t){return wn(t?bn(e,t):[],t)}function qr({inherited:e,onReset:t,label:n}){return i(C,{words:y()?.panel,label:l(n),changed:!e,detail:D(l("Full"),l("the page")),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:a=!0,markup:c=!0}){const{text:d,hidden:f}=Ke(e),m=V(null),p=V(null),u=_=>t(a?{text:_,hidden:f}:_),g=()=>t({text:d,hidden:!f}),h=a&&f,w=Ue(),x=r?ti(r)?i("span",{className:"sf-hint-while-typing",children:l(r)}):l(r):void 0,b=f?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return i(S,{label:l(n),icon:i(Un,{}),htmlFor:w,className:h?"is-hidden":void 0,hint:x,action:a?i(we,{content:b,children:i(ut,{"aria-pressed":f,"aria-label":b,onClick:g,children:f?i(gt,{name:"eye-off",size:14}):i(gt,{name:"eye",size:14})})}):void 0,children:N("div",{className:"sf-copybox",children:[c&&i(ht,{target:s?p:m,value:d,onChange:u}),s?i("textarea",{id:w,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:_=>u(_.target.value)}):i("input",{id:w,ref:m,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:_=>u(_.target.value)})]})})}function Hs(e,t){return{...e,[Ve]:t}}function Gs(e){const t=e[O];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[O]:{...t,offPage:!0}}}function Ms(e){return!e||typeof e!="object"?!1:e[O]?.offPage===!0}const Lt="sfPanelOnly";function Us(e){if(!e[O])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Lt]:!0}}function Ws(e){return!!e&&typeof e=="object"&&e[Lt]===!0}function Ks(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 oc}from"efficient-easel/draw";function $s(e,t){if(!e[O])throw new Error("inOwnBox: the field holds no authored text");const{[Io]:o,...r}=e;return{...r,[ko]:!0,render:t}}const Jr=new Set(Ho),Q={type:"radio",options:[{value:!0},{value:!1}]},Nt={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=E({...t,[O]:e},{...Nt[e.control],label:e.label});if(!Jr.has(e.control))return n;const o=t.render;return{...mt(n,"authored-copy"),render:r=>i(Ao,{name:r.name,children:o(r)})}},Xs="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Zr={field:"source.slug",set:!0},js={not:Zr},Qr="Select a word, then press the highlighter.",ei=new Set([Qr]),ti=e=>ei.has(e);function Vs(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 zs(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 Ys(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 qs(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 Js(e){return{type:"custom",[Xe]:{label:e},...E({},{type:"text",label:e}),render:({value:t,onChange:n})=>i(Ko,{value:$e(t),onChange:n,label:e})}}function Zs(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 Qs={Design:yn,Animation:_n};function ea(e){return{type:"custom",render:()=>i(ni,{text:e})}}function ni({text:e}){return i("p",{className:"sf-note",children:l(e)})}function ta(e){return fe(e)!==null&&e?.tabs!==void 0}const Pt=new Map;function na(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Pt.get(n)??{type:"custom",tabs:t,[pe]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(k,{})};return Pt.set(n,o),o}const vt=new Map;function oa(e){const t=vt.get(e)??{type:"custom",[pe]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(k,{})};return vt.set(e,t),t}function oi(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function ra(e,t){return oi(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(k,{})}}function ia(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]=z(()=>!Le.has(e));return i(qn,{title:e,open:n,onToggle:r=>{o(r),r?Le.delete(e):Le.add(e)},children:t})}const Le=new Set;function sa({label:e}){return i(Jn,{title:l(e),level:Pr(2)})}function ri({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),s=r?o?.[r]:void 0,a=s?l(s):t;return N("div",{className:"sf-swatches",children:[e.map(c=>{const d=o?.[c]?l(o[c]):c;return i(we,{content:d,children:i(ho,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":d})},c)}),i("span",{className:"sf-swatch-hex",children:a})]})}function aa(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(ii,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function ii({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:a,n:c}=Be(),d={background:a.background,surface:a.surface,surface2:pr(a),band:ur(a)},f=n?Ee:t,m=Or(s,t,f),p=kt(void 0,f,d),u=n?_r:void 0,g=f===Ee?l("the theme's section background"):l("Theme {n} background",{n:c}),h=li(s,t,a,c,d,r),w=D(p.toUpperCase(),g),x=xe(s),b=x?re(x,a,c):null;return b?i(oe,{label:l(e),icon:i(Je,{}),value:b.hex,caption:b.words,onChange:r,changed:!0,onReset:()=>r(u),resetTo:w,choices:h}):i(ft,{label:l(e),icon:i(Je,{}),value:m?"":kt(s,t,d),inherited:p,resetTo:w,onChange:r,onReset:()=>r(u),choices:h})}function li(e,t,n,o,r,s){const a=Tr(e,t);return[{label:l("No fill"),color:"",selected:a==="none",onPick:()=>s(Rr)},{label:`${l("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:a==="band",onPick:()=>s(Ee)},...ve(xe(e)??"",n,o,s)]}function si(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=Sr(r,t);return i(S,{label:l(e),icon:i(me,{}),changed:!s,action:i(C,{words:y()?.panel,label:l(e),changed:!s,detail:l("the theme's image stage"),onReset:()=>o(gr)}),children:ri({swatches:xr,current:s?Cr:yr(r,t),onPick:o,names:wr})})}}}function ca(e=n=>n,t){return J({_gSectionTheme:T(Ir),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(Uo,{value:e(n),onChange:o,followLabel:t})}})}function ee({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:a=!0,notch:c,ariaLabel:d,disabled:f=!1,placeholder:m,placeholderWord:p,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(_o,{min:e,max:t,step:n,value:o,...o===null&&m!==void 0?{placeholderValue:m}:{},...p?{emptyLabel:l(p)}:{},suffix:s||void 0,showInput:a,label:d===void 0?void 0:l(d),disabled:f,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:h=>{h===null?u?.():h!==o&&r(h)}})})}function Bt(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:a,restTrack:c,unsetMark:d,icon:f,unit:m="px"}=t;return{type:"custom",render:({value:p,onChange:u})=>{const g=typeof p=="number"?p:null,h=g===null;return i(S,{label:l(e),icon:f?q(f):void 0,value:h?d||s===void 0?void 0:l(s):`${g}${m}`,changed:!h,action:d?Ge(d,{changed:!h,onReset:()=>u(null)}):i(C,{words:y()?.panel,label:l(e),changed:!h,onReset:()=>u(null)}),hint:typeof a=="string"?l(a):a,children:c?c({min:n,max:o,step:r,px:g,label:e,onChange:u}):ee({min:n,max:o,step:r,value:g??n,readout:!1,ariaLabel:e,onChange:u})})}}}const ae="Corners";function Ne(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:l(ae),icon:i(On,{}),changed:r,action:Ge(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(ci,{tier:e,px:o,onRadius:n})})}}}function A(e){const t=M();return[t?.values?.[e],n=>t?.onChange(e,n)]}function Dt(){return mt({type:"custom",render:()=>i(Eo,{})},"always")}function ai(){const e=M();return t=>e?.onChangeMany(t)}function ci({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,s]=A(e.sidesKey),a=st(r)??[...lt];return i(mo,{label:l(ae),value:a,corners:Xn,onChange:c=>{const d=st(c)??[];s(d.length===lt.length?null:d)},radius:t,onRadiusChange:n,radiusMin:U,radiusMax:Ye,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function Ht(){return Dt()}function di({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=v(),r=typeof o=="number"?`${o}px`:l("not set");return i(C,{words:y()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):D(r,l("Styles")),onReset:n})}function ui(){const{cornerRadiusPx:e}=v();return typeof e=="number"?e:U}function pi(){return Ne({sidesKey:"sectionCornerSides",useFollowed:ui,mark:i(di,{label:ae}),hint:fi})}const fi="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function da(){return J({_gShape:T("Shape"),sectionCorners:pi(),sectionCornerSides:Ht(),...X("sectionBorder",Gt)})}const hi=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function mi(e){const t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function gi(){let e;try{const t=Tt(v().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||cr.line}function bi({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:a={}}){const c=e&&typeof e=="object"?e:{},[d,f]=z(()=>r?no(c,a):!1),m=hi(),p=u=>mi(r&&s?u:{width:u.width,color:u.color,...s?{style:u.style}:{}});return i(S,{label:l("Border"),icon:i(Rn,{}),action:r?i(eo,{each:d,label:l("Each side"),onChange:f}):void 0,children:i(Qn,{label:l("Border"),value:c,each:d,onChange:u=>t(p(u)),placeholder:n,presets:o,words:m,styles:s,max:ar})})}function wi({value:e,onChange:t,view:n}){const[o]=A("sectionBorder"),[r]=A(W("sectionBorder")),s=gi(),a=d=>d&&typeof d=="object"?d:{},c=n==="phone"?{...Rt(a(o)),...Rt(a(r))}:n==="tablet"?a(o):{};return i(bi,{value:e,onChange:t,placeholder:{sides:to(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}function ua(e){return R(e,Gt(e==="mobile"?"phone":e))}function Gt(e){return{type:"custom",render:({value:t,onChange:n})=>i(wi,{value:t,onChange:n,view:e})}}function X(e,t){const n=(o,r)=>se(e,t(o),ke)[r];return{[e]:n("desktop",e),[W(e)]:n("tablet",W(e)),[F(e)]:n("phone",F(e))}}function pa(e){return{type:"custom",render:()=>i(xi,{partKey:e})}}function xi({partKey:e}){const[t]=A("id"),[n]=A("_partStyles"),{textStyles:o}=v(),r=zo();let s=null;try{s=Xo().select}catch{s=null}const a=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(Yn,{name:l("Text"),preview:$o(a,c,{noStyle:l("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??Vo.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(jo(t,e))}})}function Mt(e){const{cornerRadiusPx:t}=v(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:a}=te(d=>d),c=a?.props?.id?String(a.props.id):void 0;o=c?zn(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return jn(r)?r:n}function Si({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Mt(U);return i(C,{words:y()?.panel,label:l(e),changed:t,detail:D(`${o}px`,l("the section")),onReset:n})}function yi(){return i(k,{children:l("Follows the section's Corners until you set a number here.")})}function Ci(){return Ne({sidesKey:"cardCornerSides",useFollowed:()=>Mt(U),mark:i(Si,{label:ae}),hint:i(yi,{})})}function _i(){return{type:"custom",render:()=>i(ln,{})}}function fa(e){return{...e,render:t=>i(sn,{render:e.render,props:t})}}function ha(){return{_gShape:T("Shape"),cardCorners:Ci(),cardCornerSides:Ht(),cardCornersApplyAll:_i()}}function Ri(){return E({type:"custom",render:e=>i(Oi,{...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 Ti(e,t){const n=_t(e);if(n!=="custom")return l(Ct.find(r=>r.value===n)?.label??"");const o=dt(Re(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):l("Custom")}function Oi(e){const{value:t,onChange:n}=e,[o]=A("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,a=t!=null,c=a?t:s?e.follows:void 0,d=_t(c),f=r>=2&&r<=ct,m=()=>[...So[r]??[]],p=V(null),u=b=>{const _=p.current;_&&JSON.stringify(b)===JSON.stringify(_.shares)?n(_.value):b&&n(b)},g=b=>{b===d||b==="custom"&&!f||n(b==="custom"?m():b)},h=l("The width bar works for 2 to {count} blocks.",{count:ct}),w=a&&(s||t!=="content"),x=Co().widths.hint(r,xo);return i(S,{label:l(K),icon:i(he,{}),changed:w,hint:d!=="custom"?void 0:f?x:h,action:i(C,{words:y()?.panel,label:l(K),changed:w,disabled:e.readOnly===!0,detail:s?B(b=>l(b),Ti(e.follows,r),e.followsView):l("Fit content"),onReset:()=>n(void 0)}),children:N("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(at,{label:l(K),value:d,options:Ct.map(b=>({value:b.value,label:b.value==="custom"&&!f?h:l(b.label),icon:Mr(i("span",{className:"sf-gallery-pic sf-share-pic",children:Ut(b.weights).map((_,j)=>i("i",{style:{gridColumn:`span ${_}`}},j))}),l(b.label),b.value==="custom"&&!f?h:l(b.label))})),onChange:g,columns:3,cell:Wt,tooltips:!1,disabled:e.readOnly===!0})}),d==="custom"&&f?i("div",{onFocus:()=>{p.current={value:t,shares:dt(Re(c,r),r)}},onBlur:()=>{p.current=null},children:i(yo,{label:l(K),count:r,value:Re(c,r),onChange:u,readOnly:e.readOnly===!0})}):null]})})}function Ut(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 ma(){return Z(or,i(Ln,{}),xt,xt[0].value)}function ga(){return R("mobile",Gr(K,i(he,{}),sr.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:Ut(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),lr,{columns:2,cell:Wt}))}const Wt={width:"5.75rem",height:"3.25rem"};function ba(){return se("share",Ri(),ke)[W("share")]}function Ii(){return R("mobile",$(St,i(Ze,{}),_e,ir,1,_e,"",{clear:{phoneFollows:!1,hint:_e}}))}const Kt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function wa(){const e=$(St,i(Ze,{}),yt,rr,1,yt,"",{clear:{emptyLabel:"Auto"}}),t=se("columns",e,{...Kt,tablet:ke.tablet}),n=se("columns",e,Kt,{phoneRow:Ii()});return{...t,phoneRow:n.phoneRow}}function xa(e,t,n,o,r,s){return{type:"custom",render:({value:a,onChange:c})=>i(S,{label:l(e),icon:i(it,{noun:s}),action:i(C,{words:y()?.panel,label:l(e),changed:!Fr(a),detail:l("the Text style in Styles"),onReset:()=>c(kr),defaultAction:{onPress:()=>c(Er),title:l("Keep this section's own built-in size"),icon:i(Tn,{})}}),children:ee({min:t,max:n,step:o,value:typeof a=="number"?a:r,suffix:"px",ariaLabel:e,onChange:c})})}}function Sa(){return{_gCellWidth:T("Cell width"),gridSpan:Z("Positions",i(he,{}),[{label:"Auto",value:""},...Array.from({length:un},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function L(){let e=null,t=null;try{e=Me(Ei),t=te(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const Ei=zt(null);function ki({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:a,fallback:c}){const d=L()[a],f=Se(void 0,d,c);return i(k,{children:ee({min:e,max:t,step:n,value:Se(o,d,c),readout:!1,ariaLabel:r,notch:f,onChange:s})})}function Fi({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const a=L()[t],c=Se(void 0,a,n);return i(C,{words:y()?.panel,label:l(e),changed:r,detail:B(d=>l(d),`${c}${o}`),onReset:s})}function Ai(e){return Bt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Fi,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(ki,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Li={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Ni={Top:rt,Bottom:tt,Left:nt,Right:ot},Pi=e=>{const t=Ni[e];return i(t,{})};function ya(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=x=>Li[x],s=x=>$(r("Top"),i(rt,{}),I.min,I.max,I.step,x,"px"),a=(x,b,_,j=I)=>R("mobile",Ai({label:r(x),icon:Pi(x),desktopKey:b,min:j.min,max:j.max,step:j.step,fallback:_})),c=e.top??I.min,d=e.bottom??I.min,f="sectionPaddingLeft",m="sectionPaddingRight",p=e.sideBounds??I,u=e.side??p.min,g=e.sidePhone??u,h=e.phone===!0,w=x=>h?R("desktop",x):x;return J({...o?{_gSpacing:T("Padding")}:{},[t]:w(s(c)),...h?{[F(t)]:a("Top",t,c)}:{},...e.only==="top"?{}:{[n]:w($(r("Bottom"),i(tt,{}),I.min,I.max,I.step,d,"px")),...h?{[F(n)]:a("Bottom",n,d)}:{}},...e.sides?{[f]:w($(r("Left"),i(nt,{}),p.min,p.max,p.step,u,"px")),...h?{[F(f)]:a("Left",f,g,p)}:{},[m]:w($(r("Right"),i(ot,{}),p.min,p.max,p.step,u,"px")),...h?{[F(m)]:a("Right",m,g,p)}:{}}:{}})}function Ca(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,a])=>[s,s in e&&fe(a)?e[s]:a])),o={};let r=!1;for(const[s,a]of Object.entries(e)){if(s in t){r||Object.assign(o,n),r=!0;continue}o[s]=a}return r||Object.assign(o,n),o}const ce="Width";function _a(e,t=Ar,n=!0){const o=t.map(r=>({label:Lr[r],value:r}));return J({...n?{_gWidth:T(ce)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(S,{label:l(ce),icon:i(Wn,{}),action:n?i(qr,{inherited:s?.inherited??!1,onReset:()=>r(Nr),label:ce}):void 0,children:Ae({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:ce})})}})}function Ra(){const e=(o,r)=>({type:"custom",render:({value:s,onChange:a})=>i(vi,{value:s,onChange:a,view:o,badge:r})}),t=o=>({type:"custom",render:({value:r,onChange:s,field:a})=>i(Di,{value:r,onChange:s,unit:a?.unit,view:o})}),n=o=>{const r=Wr("Unit",i(Qe,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");if(o==="desktop")return r;const s=r.render;return{...r,render:a=>i(Hi,{props:a,draw:s,view:o})}};return J({_gHeight:T(Y),...X("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>i(Gi,{view:o,onClear:()=>r(void 0)}))),...X("sectionHeightValue",t),...X("sectionHeightUnit",n)})}function vi({value:e,onChange:t,view:n,badge:o}){const r=L(),s=c=>["auto","fixed","screen"].includes(c),a=de(n,r)?.mode??"auto";return i(S,{label:Y,icon:q(i(Pn,{})),action:o?o(t):void 0,children:Ae({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:s(e)?e:a,onChange:t,ariaLabel:Y})})}function $t(e,t){return e==="phone"&&ye(t)?Jo(t):qo(t)}function de(e,t){return e==="desktop"||(e==="tablet"?ye(t):Yo(t))?null:$t(e,t)}const P=(e,t)=>e==="tablet"?W(t):F(t);function Bi(e,t,n,o){const r=de(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[P(e,"sectionHeightMode")]:r.mode,...r.mode==="fixed"?{[P(e,"sectionHeightUnit")]:r.unit}:{},...n==="sectionHeightUnit"?{[P(e,"sectionHeightValue")]:r.value}:{},[P(e,n)]:o}}function Xt(e,t,n){const o=M(),r=de(e,L());return!o||!r?{followed:null,write:n}:{followed:r,write:a=>o.onChangeMany(c=>{const d=Bi(e,c,t,a);return d===null?{[e==="desktop"?t:P(e,t)]:a}:Object.keys(d).length?d:null})}}function Di({value:e,onChange:t,unit:n,view:o}){const{followed:r,write:s}=Xt(o,"sectionHeightValue",t),a=(r?r.unit:n)==="%"?"%":"px",c=a==="%"?tr:er;return i("div",{className:"sf-field",children:ee({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:Y,onChange:s})})}function Hi({props:e,draw:t,view:n}){const{followed:o,write:r}=Xt(n,"sectionHeightUnit",e.onChange);return t({...e,...o?{value:void 0,storedValue:void 0,follows:o.unit}:{},onChange:r})}function Gi({view:e,onClear:t}){const n=L(),o=de(e,n)===null,r=e==="phone"&&ye(n),s=$t(e,n),a=B(c=>l(c),s.mode==="auto"?l("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(C,{words:y()?.panel,label:l(Y),changed:o,detail:a,onReset:t})}function Ta(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:s,name:a})=>i(Wi,{value:o,onChange:r,labelId:`${s??a??"stickTop"}-label`,view:n})}),t=n=>({type:"custom",render:({value:o,onChange:r})=>i(Mi,{value:o,onChange:r,view:n})});return{_gStick:T(Ce),...X("stickTop",e),...X("stickTopDistance",t)}}function Mi({value:e,onChange:t,view:n}){const o=M(),r=L(),s=n==="desktop"||Pe(n,r)?null:jt(n,bt(r)),a=s&&o?c=>o.onChangeMany(d=>{const f=Ui(n,d,c);return f===null?{[P(n,"stickTopDistance")]:c}:Object.keys(f).length?f:null}):t;return i("div",{className:"sf-field",children:ee({min:ie.min,max:ie.max,step:ie.step,value:s?null:typeof e=="number"?e:ie.fallback,...s?{placeholder:s.distance}:{},suffix:"px",ariaLabel:l("Distance from top"),onChange:a})})}function Pe(e,t){return e==="tablet"?Qo(t):Zo(t)}function jt(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance}:{on:t.desktop,distance:t.desktopDistance}}function Ui(e,t,n){return e==="desktop"||Pe(e,t)?null:n===void 0?{}:{[P(e,"stickTop")]:!0,[P(e,"stickTopDistance")]:n}}function Wi({value:e,onChange:t,labelId:n,view:o}){const r=L(),s=bt(r),a=o==="phone"?s.phone:o==="tablet"?s.tablet:e===!0,c=o==="phone"&&s.ownTablet,d=o==="desktop"?null:jt(o,s),f=d?.on?`${d.distance}px`:l("Off");return i(S,{label:l(Ce),labelId:n,icon:q(i(Hn,{})),action:N(k,{children:[o!=="desktop"?i(C,{words:y()?.panel,label:l(Ce),changed:Pe(o,r),detail:B(m=>l(m),f,c?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(be,{checked:a,onChange:t,ariaLabelledBy:n})]})})}const Vt="e.g. about";function Oa(){return{_gAnchor:T("Anchor"),anchor:G({control:"plainText",label:"Name",placeholder:Vt},{type:"custom",render:({value:e,onChange:t})=>i(xn,{value:e,onChange:t,nameBox:(n,o)=>i(H,{value:n,onChange:o,label:"Name",placeholder:Vt,hideable:!1,markup:!1})})})}}function Ia(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:a})=>{const c=`${s??a??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return i(S,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(bo,{id:c,value:Number.isFinite(d)?new Date(d):null,onChange:f=>r(f?f.toISOString():"")})})}}}function Ea(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:a})=>{const c=`${s??a??e}-date`;return i(S,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(go,{id:c,value:Jt(typeof o=="string"?o:null),onChange:d=>r(d?qt(d):"")})})}}}function Ki(e,t,n,o){return{type:"custom",...E({},{...Q,label:e}),render:r=>{const{value:s,onChange:a,id:c,name:d}=r,f="follows"in r,m=r,p=typeof s=="boolean",u=typeof m.follows=="boolean"?m.follows:t,g=p?s:f?u:t,h=`${c??d??e}-label`,w=m.readOnly===!0,x=i(be,{checked:g,onChange:a,disabled:w,ariaLabelledBy:h});return i(S,{label:l(e),labelId:h,icon:n,hint:o===void 0?void 0:l(o),action:f?N(k,{children:[i(C,{words:y()?.panel,label:l(e),changed:p,detail:m.followsNoView?l(u?"On":"Off"):B(b=>l(b),l(u?"On":"Off"),m.followsView),disabled:w,onReset:()=>a(void 0)}),x]}):x})}}}function ka(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i($i,{label:"Background",icon:i(Dn,{}),id:r,value:e,shown:Kn(e),onChange:t})}}}function Fa(e,t){return{type:"custom",...E({},{...Q,label:e}),render:({value:n,onChange:o,id:r})=>{const s=typeof n=="boolean"?n:t,a=`${r??e}-checkbox`;return i(S,{label:l(e),htmlFor:a,className:"sf-checkbox",action:i(fo,{id:a,checked:s,onChange:o})})}}}function Aa(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(oe,{label:l(e),icon:n,value:o||t,onChange:r})}}function $i({label:e,icon:t,id:n,value:o,shown:r,onChange:s}){const{colors:a,n:c}=Be(),d=xe(o),f=d?re(d,a,c):null;return i(oe,{label:l(e),icon:t,id:n,value:f?f.hex:r,caption:f?.words,onChange:s,choices:ve(d??"",a,c,s)})}function La(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(Xi,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function ve(e,t,n,o){const r=ge(e);return To(t,n).map(s=>({label:s.label,color:s.value,selected:r===s.name,onPick:()=>o(s.name)}))}function Xi({value:e,onChange:t,twin:n}){const{colors:o,n:r}=Be(),s=o.background,a=D(s.toUpperCase(),l("Theme {n} background",{n:r})),c=ge(e),d=c?re(c,o,r):null,f=ve(e,o,r,t),m=n?()=>t(void 0):()=>t("");let p=s,u=a;if(n){const g=ge(n.follows),h=$n(n.follows),w=g?re(g,o,r):h?{hex:h,words:h.toUpperCase()}:null;p=w?.hex??s,u=B(x=>l(x),w?w.words:a,n.view)}return d?i(oe,{label:l("Fill"),icon:i(me,{}),value:d.hex,caption:d.words,onChange:t,changed:!0,onReset:m,resetTo:u,choices:f}):i(ft,{label:l("Fill"),icon:i(me,{}),value:e,inherited:p,resetTo:u,onChange:t,onReset:m,choices:f})}function ji(e,t,n){if((e?.content??[]).some(a=>a?.props?.id===t))return le(n);const r=Vn(e,t);if(r.length===0)return null;const s=le(Ft(n));if(s!==null)return s;for(let a=r.length-1;a>0;a-=1){const c=le(Ft(r[a].sectionAccent));if(c!==null)return c}return le(r[0].sectionAccent)}function Be(){const e=Tt(v().theme),[t]=A("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=te(c=>c),a=s?.props?.id?String(s.props.id):void 0;n=a?ji(r?.data,a,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:dr(e.themes[o]),n:o+1}}const Vi=[{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 zi({label:e,value:t,onChange:n,points:o=Vi}){const r=o.map(s=>({...s,label:l(s.label),...s.title?{title:l(s.title)}:null}));return i(po,{label:l(e),value:t,points:r,onChange:n})}function Na(){return Dt()}const Pa={top:i(Fn,{}),right:i(kn,{}),bottom:i(In,{}),left:i(En,{})};function va(e,t,n,o,r,s,a){const c=p=>t.find(u=>u.value===p),d=p=>({value:p,label:"",disabled:!0,title:o}),f=p=>{const u=t.find(h=>h.cell===p);if(!u)return d(`missing-${p}`);const g=s?.[p];return g?{value:u.value,label:u.label,icon:g}:{value:u.value,label:u.label}},m=[d("corner-top-left"),f("top"),d("corner-top-right"),f("left"),d("centre"),f("right"),d("corner-bottom-left"),f("bottom"),d("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:u})=>{const g=t.some(h=>h.value===p)?p:n;return i(S,{label:l(e),icon:r,value:c(g)?.label?l(c(g).label):a?l(a):"",children:zi({label:e,value:g,onChange:u,points:m})})}}}function Ba(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(Mo,{label:e,options:(s.options??t).map(a=>({...a,label:l(a.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:l(n)}:{}})}}function Da(e,t,n,o){return{type:"custom",options:t,fallback:n,...E({},{type:"select",label:e}),render:({value:r,onChange:s,field:a})=>i(Wo,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),fallback:a.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:l(o)})}}function Ha(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Ga=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Ma(e,t,n){const o=Object.keys(We).map(r=>({label:We[r],value:r,picture:n[r]}));return{type:"custom",...E({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(qi,{label:e,icon:t,options:o,onChange:r})}}function Yi(e,t,n){const o=Zt(e,t,n);if(o!==void 0)return o==="save-makes-frame"?l("A frame is made from this video when you save the page."):o==="starts-dark"?l("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"?l("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"?l("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"?l("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"?l("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=en(e);return r==="frame-missing-image"?l("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?l("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?l("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?l("No image yet. The slide shows its background colour until you choose one."):void 0}function qi({label:e,icon:t,options:n,onChange:o}){const r=M(),s=r?.values??{},a=Qt(s),c=Me(on),d=nn(c?.docId??null);let f=null;try{f=te(p=>p.appState.data)}catch{f=null}const m=tn(r?.id,f,d);return i(S,{label:l(e),icon:q(t),hint:Yi(s,m,c?.hasUnsavedEdits??!1),children:Ae({options:n,value:a,onChange:o,ariaLabel:e})})}function Ua(e,t,n,o={}){const r={type:"custom",[je]:!0,render:({value:s,onChange:a,name:c})=>i(Go,{value:s||"",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?R("each",r):r}const Wa={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Ji(e){const t=l(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Ka({value:e,onChange:t,label:n}){const o=e||{},r=M(),s=r?r.values!==r.node.props:!0,a=!!o.pending&&s,c=!!o.pending&&!s,d=!!Br(vr()).geocode,f=Ue(),m=(p,u)=>t({...o,[p]:u??void 0});return N(k,{children:[i(S,{label:l(n),icon:i(et,{}),action:d?i(we,{content:l("Find from the address (OpenStreetMap)"),children:i(ut,{"aria-label":l("Find from the address"),"aria-busy":a||void 0,disabled:a,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(Gn,{})})}):void 0,children:d&&o.status?i(Sn,{compact:!0,oneLine:!0,spaced:!1,status:a?"busy":o.ok&&!c?"found":"notfound",statusText:a?l("Finding…"):c?l(Ro):l(o.status),hint:Ji(o)}):null}),i(S,{label:l("Enter by hand"),labelId:f,icon:i(An,{}),action:i(be,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:f})}),o.manual&&i(S,{label:l("Latitude, longitude"),icon:i(et,{}),children:N("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(pt,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>m("lat",p),min:-90,max:90,step:1e-4,placeholder:l("Latitude")}),i(pt,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>m("lng",p),min:-180,max:180,step:1e-4,placeholder:l("Longitude")})]})})]})}function Zi(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function Qi(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 $a(e,t){return e===null?null:t>e?e:null}function el(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 Xa={label:"Ticker items",icon:i(Bn,{})};function ja(e,t,n,o){return{type:"custom",[O]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...E({},{...Nt.textList,label:e}),render:({value:r,onChange:s})=>i(tl,{label:e,icon:q(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function tl({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const a=V(null),[c,d]=z(null),f=p=>p.map(u=>({text:u?.text??""})),m=p=>{const u=el(n,p,c);u===null&&(a.current=null),d(u),r(f(p))};return i(oo,{label:l(e),icon:t,noun:l("item"),items:n,onChange:m,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(ht,{target:a,value:Zi(n,c),onChange:p=>r(Qi(n,c??-1,p)),disabled:c===null,label:c===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,u,g)=>i("input",{type:"text",className:s&&c===u?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:u+1}),onChange:h=>g({text:h.target.value}),onFocus:h=>{a.current=h.currentTarget,d(u)}})})}function Va(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:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function za(e){return{_gCards:T("Cards"),coverIndex:Z("Cover image",i(vn,{}),Bo,String(Do),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:si("Image background",br),cardImage:rl()}}function Ya(){return{outline:Z("Card outline",i(Mn,{}),No,vo),indexBadge:Z("Card number",i(Qe,{}),Lo,Po),showBadge:Ki("Product badge",!0,i(it,{noun:"tag"}))}}function qa(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...Q,label:ue.find(s=>s.id===r).label}),o=r=>E(Oo(De),n(r));return{_gShowOnCard:T("Show on a card"),[De]:E({type:"custom",render:()=>i(nl,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(De)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const De="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 nl({rest:e}){const t=L(),n=ai(),o=a=>typeof t[a]=="boolean"?t[a]:void 0,r=a=>o(a)??e[a],s=ue.some(({id:a})=>o(a)!==void 0&&o(a)!==e[a]);return i(He,{parts:ue,changed:s,shown:r,onPress:(a,c)=>n({[a]:c}),onReset:()=>n(Object.fromEntries(ue.map(({id:a})=>[a,void 0])))})}function Ja(e,t="display"){const n=F(t);return{[t]:R("desktop",{type:"custom",render:({value:o,onChange:r})=>i(He,{parts:e,changed:io(o),shown:s=>lo(o,s),onPress:(s,a)=>r(co(o,s,a)),onReset:()=>r(void 0)})}),[n]:R("mobile",{type:"custom",render:({value:o,onChange:r})=>i(ol,{parts:e,desktopKey:t,value:o,onChange:r})})}}function He({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:a}){const c=l("Display");return i(S,{label:c,icon:i(Cn,{}),changed:t,action:i(C,{words:y()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(ro,{label:c,items:e.map(d=>({id:d.id,label:l(d.label),shown:n(d.id),...a?{disabled:!0,disabledReason:l(a)}:{}})),onChange:o})})}function ol({parts:e,desktopKey:t,value:n,onChange:o}){const r=L()[t];return i(He,{parts:e,changed:ao(n),shown:s=>so(r,n,s),onPress:(s,a)=>o(uo(n,s,a)),onReset:()=>o(Fo),detail:l("the same as Desktop")})}function rl(){return Bt("Card image",{min:U,max:Ye,step:an,hint:"Rounds the picture. The card's own corner is in Styles."})}function Za(){return Ne({sidesKey:"cornerSides",step:cn,useFollowed:()=>U,mark:i(il,{label:dn}),hint:l("Rounds the picture. Left alone it stays square.")})}function il({label:e,changed:t=!1,onReset:n=()=>{}}){return i(C,{words:y()?.panel,label:l(e),changed:t,onReset:n})}function Qa(){return{type:"custom",render:({value:e,onChange:t})=>i(cl,{value:typeof e=="string"?e:"",onChange:t})}}function ll({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:mn(e).map(([r,s],a)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${s}`,aspectRatio:o}},a))})}const sl={width:"3.5rem",height:"2.5rem"},al=200;function cl({value:e,onChange:t}){const[n,o]=z(null),[r,s]=z(4),a=V(null);Yt(()=>{const u=a.current;if(!u||typeof ResizeObserver!="function")return;const g=()=>s(u.getBoundingClientRect().width>=al?4:3);g();const h=new ResizeObserver(g);return h.observe(u),()=>h.disconnect()},[]);const c=e&&e in ne?e:"",d=qe(n,c),f=qe(n,"").length,m=gn("no-symbol"),p=[{value:"",label:l("Not chosen"),icon:Ur(m,l("Not chosen"))},...d.map(u=>({value:u,label:l(ne[u].label),icon:i(ll,{layout:ne[u],width:40})}))];return i(S,{label:l("Layout"),icon:i(Nn,{}),value:c?l(ne[c].label):void 0,children:i("div",{ref:a,style:{flex:"1 1 auto",minWidth:0},children:i(at,{label:l("Layout"),value:c,options:p,onChange:t,columns:r,cell:sl,header:N("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:l("Photos in a row")}),i(Zn,{options:[{id:"all",label:l("All")},...pn.map(u=>({id:String(u),label:String(u)}))],value:n===null?"all":String(n),ariaLabel:l("Photos in a row"),onChange:u=>o(u==="all"?null:Number(u))}),i("span",{className:"text-2xs text-ink-faint",children:l("{n} of {total} layouts",{n:f,total:fn.length})})]})})})})}export{Zr as BOUND_TO_POST,Xs as BOUND_TO_POST_NOTE,Qs as BUCKET_ICONS,Wa as CUSTOM_FIELD_MEDIA,Ka as CoordsField,At as DESKTOP_GAP_NOT_OVERLAP,He as DisplayRow,Pa as EDGE_ARROWS,wo as FOCAL_DEFAULT,Vi as FOCAL_POINTS,pe as FOLD_FIELD_MARKER,zi as FocalPicker,sa as GroupLabel,Qr as HIGHLIGHT_HINT,H as HidableTextField,Xe as LINK_FIELD_MARKER,Ps as Label,je as MEDIA_FIELD_MARKER,Ga as MEDIA_TYPE_OPTIONS,js as NOT_BOUND_TO_POST,la as PanelBand,ni as PanelNoteLine,Ei as RowPropsContext,Ve as SCAFFOLD_FIELD_MARKER,oc as SCALAR_TEXT_CONTROLS,$r as SiteGapDefaultReset,ee as Slider,ri as Swatches,nc as TEXT_CONTROL_KINDS,O as TEXT_FIELD_MARKER,Xa as TICKER_ITEMS_ROW,tl as TextListField,$i as ThemeFillRow,ce as WIDTH_LABEL,qr as WidthDefaultReset,el as aimAfterListChange,Oa as anchorFields,D as backTo,aa as backgroundField,ma as boxBlockSpacingField,wa as boxColumnsFields,La as boxFillField,Ii as boxPhoneRowField,Ri as boxShareField,ga as boxSharePhoneField,ba as boxShareTabletField,ji as boxThemeIndexOf,na as bucketHeader,pa as buttonWordsEntryField,Ci as cardCornersField,si as cardImageBackgroundField,rl as cardImageField,za as cardMediaFields,ha as cardShapeFields,qa as cardShowFields,Ya as cardStyleFields,Sa as cellWidthFields,Fa as checkbox,Aa as colorInput,Bs as containerDirectionField,Xr as containerGapField,jr as containerGapPhoneField,vs as containerGapRows,Vr as containerGapTabletField,Ji as coordsResultTip,qs as copyText,Ht as cornerSidesField,Ne as cornersRowField,Ea as date,Ia as dateTime,oa as designGroupHeader,Ja as displayFields,va as edgePad,ve as fillSlotChoices,$a as focusAfterRemove,Na as focusKeptField,ra as foldMarker,fe as foldMetaOf,oi as foldTitleOf,Bi as followedHeightPatch,Ui as followedStickPatch,Qa as galleryLayoutField,Ra as heightFields,de as heightFollowedBy,Ds as heroGroupPlacementPoints,$e as hidableText,ti as hintIsWhileTyping,Za as imageCornersField,$s as inOwnBox,ta as isBucketHeader,Dt as keptBy,Js as linkField,Yi as loadingRowHint,Ma as loadingShowsField,Ba as multiSelect,ka as pageBackgroundField,ea as panelNote,Ai as phoneOverrideField,Ys as plainText,Zs as plainTextarea,Bt as pxField,ia as quietMarker,Ke as readHidable,Zi as rowText,Da as searchSelect,li as sectionBandChoices,ua as sectionBorderField,pi as sectionCornersField,da as sectionShapeFields,ca as sectionThemeFields,Qi as setRowText,xa as sizeField,Ha as sourceField,ya as spacingFields,Ta as stickFields,Ca as swapPadding,fa as templateField,Vs as text,rn as textFieldIdentifier,Ms as textFieldOffPage,Ws as textFieldPanelOnly,ja as textList,Va as textListRowField,zs as textarea,Ki as toggle,Ua as upload,ai as useSelectedPatch,L as useSelectedProps,A as useSelectedSibling,Kr as useSiteGapDetail,_a as widthField,Ks as withIdentifier,Gs as withOffPage,Us as withPanelOnly,Hs as withScaffold};
1
+ "use client";import{jsx as i,jsxs as A,Fragment as k}from"react/jsx-runtime";import{cloneElement as Ge,createContext as zt,useContext as Me,useEffect as Yt,useId as Ue,useRef as V,useState as z}from"react";import{useEasel as te,useSelectedHost as M}from"efficient-easel/easel";import{toDateKey as qt,fromDateKey as Jt}from"efficient-shell/format";import{say as l,editorEaselWords as y}from"../../../format/lib/editor-words.js";import{LOADING_SHOWS_LABELS as We,firstFrameHint as Zt,loadingShowsOf as Qt,loadingStillHint as en}from"../../../format/lib/hero-video.js";import{pageFramesFor as tn,usePageVideoFrames as nn}from"../page-video-frames.js";import{ScreenDocumentContext as on}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as Ke,hidableText as $e}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as pe,LINK_FIELD_MARKER as Xe,MEDIA_FIELD_MARKER as je,SCAFFOLD_FIELD_MARKER as Ve,TEXT_FIELD_MARKER as O,foldMetaOf as fe,textFieldIdentifier as rn}from"efficient-easel/draw";import ln from"../../components/ApplyCornersToSiblings.js";import{withShowWhen as ze}from"../../../render/lib/document/show-when.js";import sn from"../../components/TemplateFieldRow.js";import{CARD_IMAGE_RADIUS_STEP as an,CORNER_RADIUS_MAX as Ye,CORNER_RADIUS_MIN as U}from"../../../format/lib/content/card-image-shape.js";import{IMAGE_CORNER_STEP as cn,IMAGE_CORNERS_LABEL as dn}from"../../../format/lib/content/image-corners.js";import{GRID_MAX_COLUMNS as un}from"../../../format/lib/content/grid-span.js";import{GALLERY_ACROSS_BUCKETS as pn,GALLERY_LAYOUTS as ne,GALLERY_LAYOUT_KEYS as fn,galleryChoices as qe,galleryLayoutRatio as hn,galleryPictureCells as mn}from"../../../format/lib/content/gallery-layout.js";import{shellGlyphOf as gn}from"./shell-glyph.js";import{anchorSiblingsOf as bn,placementPoints as wn}from"../../../format/lib/hero-group-placement.js";import xn from"../../components/AnchorField.js";import Sn from"../../components/SourceStatus.js";import{AdjustIcon as yn,EyeIcon as Cn,AnimationIcon as _n,BackgroundIcon as Je,BorderAllIcon as Rn,BlockSectionIcon as Tn,ColumnWidthsIcon as he,ColumnsIcon as Ze,CornerIcon as Qe,DirectionDownIcon as On,DirectionLeftIcon as In,DirectionRightIcon as En,DirectionUpIcon as kn,EditIcon as Fn,GapIcon as Ln,GridIcon as Nn,GroundIcon as me,HashIcon as et,HeightIcon as An,ImageIcon as Pn,ListIcon as vn,LocationIcon as tt,PaddingBottomIcon as nt,PaddingLeftIcon as ot,PaddingRightIcon as rt,PaddingTopIcon as it,PageIcon as Bn,StickyIcon as Dn,SearchIcon as Hn,SquareIcon as Gn,TypeIcon as Mn,WidthIcon as Un}from"efficient-easel/icons";import{FieldGlyph as lt}from"../../components/FieldGlyph.js";import{resolvePageBackground as Wn}from"../../../format/lib/content/page-background.js";import{boxFillOf as Kn,boxFillSlot as ge}from"../../../format/lib/content/box-background.js";import{CORNER_SIDES as st,CORNER_SIDE_POINTS as $n,hasOwnSectionCorners as Xn,normalizeCornerSides as at}from"../../../format/lib/content/section-corners.js";import{enclosingPath as jn,enclosingSection as Vn}from"./enclosing-section.js";import{SettingsDefaultReset as C,SettingsDrill as zn,SettingsField as S,SettingsGroup as Yn,SettingsGroupSub as qn,SettingsSegmented as Jn,SettingsBorder as Zn,SettingsSidesEach as Qn,SettingsSwitch as be,borderSides as eo,borderStartEach as to}from"efficient-easel/panel";import{ListField as no}from"efficient-easel/fields";import{DisplayChips as oo}from"efficient-shell/ui";import{desktopDisplayChanged as ro,partShownOnDesktop as io,partShownOnPhone as lo,phoneDisplayChanged as so,withDesktopPart as ao,withPhonePart as co}from"../../../format/lib/content/part-display.js";import{AlignmentGrid as uo,Checkbox as po,ColorSwatch as fo,CornersInput as ho,DatePicker as mo,DateTimePicker as go,FOCAL_DEFAULT as bo,IconPicker as ct,COLUMN_COUNT_MAX as dt,COLUMN_SHARE_MIN as wo,COLUMN_SHARES_EQUAL as xo,resolveColumnShares as ut,WidthsBar as So,useShellStrings as yo,IconButton as pt,InputNumber as ft,Slider as Co,Tooltip as we}from"efficient-shell/ui";import{LOOKUP_BUSY_NOTE as _o}from"./geocode-resolve.js";import{ColourRow as oe,InheritedColourRow as ht}from"./ColourControl.js";import{fillThemeColors as Ro,slotFill as re}from"../../../format/lib/document/theme-slots.js";import{fillSlotNamed as xe}from"../../../format/lib/document/part-inks.js";import{keptByRow as To}from"efficient-easel/screen/lib/document/style-fields";import mt from"./MarkupToolbar.js";import{deviceField as R}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as Oo,NoControlMark as Io,noControlField as gt}from"efficient-easel/screen/lib/document/panel-no-control-mark";import{OWN_BOX_FIELD as Eo}from"../../../format/lib/document/own-box.js";import{fieldPanelOnly as ko,PANEL_ONLY_FIELD as Fo}from"../../../format/lib/document/panel-only.js";import{PHONE_CLEAR as Lo,resolvePhoneValue as Se}from"../../../format/lib/document/phone-override.js";import{phoneKey as F,tabletKey as W}from"efficient-easel/draw";import{SuppressibleText as No}from"./section-text-suppress.js";import{CARD_INDEX_OPTIONS as Ao,CARD_OUTLINE_OPTIONS as Po,DEFAULT_CARD_INDEX_FORMAT as vo,DEFAULT_CARD_OUTLINE as Bo}from"../../../format/lib/sections/product-card-style.js";import{COVER_INDEX_OPTIONS as Do,DEFAULT_COVER_INDEX as Ho}from"../../../format/lib/sections/card-cover-index.js";import{SCALAR_TEXT_CONTROLS as Go}from"efficient-easel/draw";import Mo from"../../components/MediaUploadField.js";import Uo from"../../components/MultiSelectField.js";import Wo from"../../components/SectionThemePicker.js";import Ko from"../../components/SearchSelectField.js";import $o from"../../components/StorefrontLinkField.js";import{UiIcon as bt}from"efficient-easel/draw/client";import{SECTION_PADDING as I}from"../../../render/lib/content/section-padding.js";import{buttonWordsSummary as Xo}from"../../../render/lib/content/button-look.js";import{usePreviewParts as jo}from"efficient-easel/draw/client";import{encodePartId as Vo}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as zo,useEaselStrings as Yo}from"efficient-easel/strings";import{hasPhoneHeight as qo,hasTabletHeight as ye,resolveSectionMinHeight as Jo,resolveTabletHeight as Zo}from"../../../format/lib/content/section-min-height.js";import{SECTION_STICK_DISTANCE as ie,SECTION_STICK_LABEL as Ce,hasPhoneStick as Qo,hasTabletStick as er,resolveSectionStick as wt}from"../../../format/lib/content/section-sticky.js";import{SECTION_MIN_HEIGHT as tr,SECTION_MIN_HEIGHT_GROUP_LABEL as Y,SECTION_SCREEN_PCT as nr}from"../../../format/lib/content/section-min-height.js";import{containerDirectionPoints as or,resolveContainerDirection as xt}from"../../../format/lib/content/container-direction.js";import{BOX_BLOCK_SPACING_LABEL as rr,BOX_BLOCK_SPACING_POINTS as St,BOX_PHONE_ROW_LABEL as yt,BOX_COLUMNS_MAX as ir,BOX_COLUMNS_MIN as Ct,BOX_PHONE_ROW_MAX as lr,BOX_PHONE_ROW_MIN as _e,BOX_SHARE_CHOICES as _t,BOX_SHARE_LABEL as K,boxShareChoiceOf as Rt,boxShareWidthsOf as Re,BOX_SHARE_PHONE_DEFAULT as sr,BOX_SHARE_PHONE_POINTS as ar}from"../../../format/lib/content/box-layout.js";import{usePreviewHeader as v}from"../../../render/components/PreviewHeaderContext.js";import{BORDER_MAX as cr,borderBySide as Tt}from"../../../format/lib/content/borders.js";import{DEFAULT_SURFACES as dr,normalizeTheme as Ot,normalizeThemeColors as ur,sectionBandTone as pr,surfaceTwoTone as fr}from"../../../format/lib/theme.js";import{CONTAINER_GAP as It,CONTAINER_GAP_BUILT_IN as hr,CONTAINER_GAP_PHONE as Te,GAP_FIELD_CONTAINER as Oe,followsSitePhoneGap as mr,hasOwnContainerGap as gr,hasOwnPhoneGap as Ie,resolveContainerGap as Et,resolvePhoneContainerGap as kt}from"../../../format/lib/content/container-gap.js";import{CARD_IMAGE_BG_INHERIT as br,CARD_IMAGE_BG_OFF as wr,CARD_IMAGE_BG_SWATCH_NAMES as xr,CARD_IMAGE_BG_SWATCHES as Sr,isCardImageBackgroundInheriting as yr,cardImageBackgroundChoice as Cr,THEME_CARD_IMAGE_BG as _r}from"../../../format/lib/content/card-image-background.js";import{SECTION_BG_INHERIT as Rr,SECTION_BG_NO_FILL as Tr,sectionBackgroundChoice as Or,THEME_SECTION_BG as Ee,isSectionBackgroundEmpty as Ir,sectionBackgroundHex as Ft}from"../../../format/lib/content/section-background.js";import{SECTION_THEME_GROUP_LABEL as Er,nestedAccentValue as Lt,resolveSectionAccent as le}from"../../../format/lib/content/section-surface.js";import{TYPE_SIZE_FIXED as kr,TYPE_SIZE_INHERIT as Fr,isTypeSizeInheriting as Lr}from"../../../format/lib/content/section-type-size.js";import{SECTION_WIDTH_CHOICES as Nr,WIDTH_CHOICE_LABEL as Ar,WIDTH_INHERIT as Pr}from"../../../format/lib/content/section-width.js";import{useFoldHeadingLevel as vr}from"./panel-heading-scope.js";import{useEaselSession as Br}from"efficient-easel/screen/lib/session-context";import{backendOf as Dr}from"../website-session.js";import{BOX_GAP as Hr,describedAs as E,group as T,iconOf as q,sharedStyleKinds as J}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as ke,onDesktopWords as B,phoneTwinFields as se}from"efficient-easel/screen/lib/document/box-fields";import{directionField as Gr,gapField as Fe,iconPickerRow as Mr,pickerCellIcon as Ur,pickerNoneIcon as Wr,Segmented as Le,segmented as Kr,select as Z,slider as $}from"./box-fields.js";function Bs({children:e}){return i("div",{className:"sf-field-label",children:typeof e=="string"?l(e):e})}function D(e,t){return l("{value} from {from}",{value:e,from:t})}function $r(){const{blockGap:e}=v();return e===null?l("this container's own spacing"):D(`${e}px`,l("Styles"))}function Xr({inherited:e,onReset:t,label:n}){return i(C,{words:y()?.panel,label:l(n),changed:!e,detail:$r(),onReset:t})}function jr(e){return Fe({...Hr,builtIn:hr[e],resolve:(t,n)=>Et(e,t,n?.siteGap),action:(t,n)=>i(Xr,{inherited:!gr(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[Oe]:e}})}function Vr(e){return ze(R("mobile",{[Oe]:e,type:"custom",render:t=>i(qr,{container:e,...t})}),Nt)}function zr(e){return ze(R("tablet",{[Oe]:e,type:"custom",render:t=>i(Yr,{container:e,...t})}),Nt)}const Nt={not:{field:"gap",in:Array.from({length:-It.min},(e,t)=>It.min+t)}};function Ds(e){return{gap:R("desktop",jr(e)),[W("gap")]:zr(e),[F("gap")]:Vr(e)}}function Yr({container:e,...t}){const[n]=L("gap"),{siteGap:o}=t.field??{},r=Math.max(Te.min,Et(e,n,o));return Fe({...Te,builtIn:r,resolve:a=>Ie(a)?a:r,action:(a,c)=>i(C,{words:y()?.panel,label:l("Gap"),changed:Ie(a),detail:B(d=>l(d),`${r}px`),onReset:()=>c(void 0)})}).render(t)}function qr({container:e,...t}){const[n]=L("gap"),{siteGap:o,siteGapPhone:r}=t.field??{},s=kt(e,void 0,n,o,r);return Fe({...Te,builtIn:s,resolve:c=>kt(e,c,n,o,r),action:(c,d)=>i(C,{words:y()?.panel,label:l("Gap"),changed:Ie(c),detail:D(`${s}px`,mr(e,n,r)?l("Styles"):l("Desktop")),onReset:()=>d(void 0)})}).render(t)}function Hs(e){return Gr({offered:or(e),fallback:xt(e,void 0),resolve:t=>xt(e,t)})}function Gs(e,t){return wn(t?bn(e,t):[],t)}function Jr({inherited:e,onReset:t,label:n}){return i(C,{words:y()?.panel,label:l(n),changed:!e,detail:D(l("Full"),l("the page")),onReset:t})}function H({value:e,onChange:t,label:n,placeholder:o,hint:r,multiline:s,hideable:a=!0,markup:c=!0}){const{text:d,hidden:f}=Ke(e),m=V(null),p=V(null),u=_=>t(a?{text:_,hidden:f}:_),g=()=>t({text:d,hidden:!f}),h=a&&f,w=Ue(),x=r?ni(r)?i("span",{className:"sf-hint-while-typing",children:l(r)}):l(r):void 0,b=f?l("Show {label} on the slide",{label:l(n)}):l("Hide {label} on the slide",{label:l(n)});return i(S,{label:l(n),icon:i(Mn,{}),htmlFor:w,className:h?"is-hidden":void 0,hint:x,action:a?i(we,{content:b,children:i(pt,{"aria-pressed":f,"aria-label":b,onClick:g,children:f?i(bt,{name:"eye-off",size:14}):i(bt,{name:"eye",size:14})})}):void 0,children:A("div",{className:"sf-copybox",children:[c&&i(mt,{target:s?p:m,value:d,onChange:u}),s?i("textarea",{id:w,ref:p,value:d,placeholder:o===void 0?void 0:l(o),onChange:_=>u(_.target.value)}):i("input",{id:w,ref:m,type:"text",value:d,placeholder:o===void 0?void 0:l(o),onChange:_=>u(_.target.value)})]})})}function Ms(e,t){return{...e,[Ve]:t}}function Us(e){const t=e[O];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[O]:{...t,offPage:!0}}}function Ws(e){return!e||typeof e!="object"?!1:e[O]?.offPage===!0}function Ks(e){if(!e[O])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[Fo]:!0}}function $s(e){return ko(e)}function Xs(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 rc,SCALAR_TEXT_CONTROLS as ic}from"efficient-easel/draw";function js(e,t){if(!e[O])throw new Error("inOwnBox: the field holds no authored text");const{[Oo]:o,...r}=e;return{...r,[Eo]:!0,render:t}}const Zr=new Set(Go),Q={type:"radio",options:[{value:!0},{value:!1}]},At={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=E({...t,[O]:e},{...At[e.control],label:e.label});if(!Zr.has(e.control))return n;const o=t.render;return{...gt(n,"authored-copy"),render:r=>i(No,{name:r.name,children:o(r)})}},Vs="Everything else on this block comes from the linked post. Unlink it to edit by hand.",Qr={field:"source.slug",set:!0},zs={not:Qr},ei="Select a word, then press the highlighter.",ti=new Set([ei]),ni=e=>ti.has(e);function Ys(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 qs(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 Js(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 Zs(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 Qs(e){return{type:"custom",[Xe]:{label:e},...E({},{type:"text",label:e}),render:({value:t,onChange:n})=>i($o,{value:$e(t),onChange:n,label:e})}}function ea(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 ta={Design:yn,Animation:_n};function na(e){return{type:"custom",render:()=>i(oi,{text:e})}}function oi({text:e}){return i("p",{className:"sf-note",children:l(e)})}function oa(e){return fe(e)!==null&&e?.tabs!==void 0}const Pt=new Map;function ra(e,t){const n=`${e}\0${t?t.join(""):""}`,o=Pt.get(n)??{type:"custom",tabs:t,[pe]:{label:e,level:1},bucket:e,marker:!0,render:()=>i(k,{})};return Pt.set(n,o),o}const vt=new Map;function ia(e){const t=vt.get(e)??{type:"custom",[pe]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>i(k,{})};return vt.set(e,t),t}function ri(e){const t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function la(e,t){return ri(e)===t?e:{...e,marker:!0,fold:t,render:()=>i(k,{})}}function sa(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 aa({title:e,children:t}){const[n,o]=z(()=>!Ne.has(e));return i(Yn,{title:e,open:n,onToggle:r=>{o(r),r?Ne.delete(e):Ne.add(e)},children:t})}const Ne=new Set;function ca({label:e}){return i(qn,{title:l(e),level:vr(2)})}function ii({swatches:e,current:t,onPick:n,names:o}){const r=e.find(c=>c.toLowerCase()===t.toLowerCase()),s=r?o?.[r]:void 0,a=s?l(s):t;return A("div",{className:"sf-swatches",children:[e.map(c=>{const d=o?.[c]?l(o[c]):c;return i(we,{content:d,children:i(fo,{color:c,selected:t.toLowerCase()===c.toLowerCase(),onClick:()=>n(c),"aria-label":d})},c)}),i("span",{className:"sf-swatch-hex",children:a})]})}function da(e,t,n=!1){return{type:"custom",render:({value:o,onChange:r})=>i(li,{label:e,builtIn:t,followsBand:n,value:o,onChange:r})}}function li({label:e,builtIn:t,followsBand:n,value:o,onChange:r}){const s=typeof o=="string"?o:void 0,{colors:a,n:c}=Be(),d={background:a.background,surface:a.surface,surface2:fr(a),band:pr(a)},f=n?Ee:t,m=Ir(s,t,f),p=Ft(void 0,f,d),u=n?Rr:void 0,g=f===Ee?l("the theme's section background"):l("Theme {n} background",{n:c}),h=si(s,t,a,c,d,r),w=D(p.toUpperCase(),g),x=xe(s),b=x?re(x,a,c):null;return b?i(oe,{label:l(e),icon:i(Je,{}),value:b.hex,caption:b.words,onChange:r,changed:!0,onReset:()=>r(u),resetTo:w,choices:h}):i(ht,{label:l(e),icon:i(Je,{}),value:m?"":Ft(s,t,d),inherited:p,resetTo:w,onChange:r,onReset:()=>r(u),choices:h})}function si(e,t,n,o,r,s){const a=Or(e,t);return[{label:l("No fill"),color:"",selected:a==="none",onPick:()=>s(Tr)},{label:`${l("Section band")} · ${r.band.toUpperCase()}`,color:r.band,selected:a==="band",onPick:()=>s(Ee)},...ve(xe(e)??"",n,o,s)]}function ai(e,t){return{type:"custom",render:({value:n,onChange:o})=>{const r=n,s=yr(r,t);return i(S,{label:l(e),icon:i(me,{}),changed:!s,action:i(C,{words:y()?.panel,label:l(e),changed:!s,detail:l("the theme's image stage"),onReset:()=>o(br)}),children:ii({swatches:Sr,current:s?_r:Cr(r,t),onPick:o,names:xr})})}}}function ua(e=n=>n,t){return J({_gSectionTheme:T(Er),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>i(Wo,{value:e(n),onChange:o,followLabel:t})}})}function ee({min:e,max:t,step:n,value:o,onChange:r,suffix:s="",readout:a=!0,notch:c,ariaLabel:d,disabled:f=!1,placeholder:m,placeholderWord:p,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(Co,{min:e,max:t,step:n,value:o,...o===null&&m!==void 0?{placeholderValue:m}:{},...p?{emptyLabel:l(p)}:{},suffix:s||void 0,showInput:a,label:d===void 0?void 0:l(d),disabled:f,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:h=>{h===null?u?.():h!==o&&r(h)}})})}function Bt(e,t){const{min:n,max:o,step:r=1,unsetLabel:s,hint:a,restTrack:c,unsetMark:d,icon:f,unit:m="px"}=t;return{type:"custom",render:({value:p,onChange:u})=>{const g=typeof p=="number"?p:null,h=g===null;return i(S,{label:l(e),icon:f?q(f):void 0,value:h?d||s===void 0?void 0:l(s):`${g}${m}`,changed:!h,action:d?Ge(d,{changed:!h,onReset:()=>u(null)}):i(C,{words:y()?.panel,label:l(e),changed:!h,onReset:()=>u(null)}),hint:typeof a=="string"?l(a):a,children:c?c({min:n,max:o,step:r,px:g,label:e,onChange:u}):ee({min:n,max:o,step:r,value:g??n,readout:!1,ariaLabel:e,onChange:u})})}}}const ae="Corners";function Ae(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:l(ae),icon:i(Qe,{}),changed:r,action:Ge(e.mark,{changed:r,onReset:()=>n(null)}),hint:e.hint,children:i(di,{tier:e,px:o,onRadius:n})})}}}function L(e){const t=M();return[t?.values?.[e],n=>t?.onChange(e,n)]}function Dt(){return gt({type:"custom",render:()=>i(Io,{})},"always")}function ci(){const e=M();return t=>e?.onChangeMany(t)}function di({tier:e,px:t,onRadius:n}){const o=e.useFollowed(),[r,s]=L(e.sidesKey),a=at(r)??[...st];return i(ho,{label:l(ae),value:a,corners:$n,onChange:c=>{const d=at(c)??[];s(d.length===st.length?null:d)},radius:t,onRadiusChange:n,radiusMin:U,radiusMax:Ye,radiusStep:e.step??1,radiusPlaceholder:String(o)})}function Ht(){return Dt()}function ui({label:e,changed:t=!1,onReset:n=()=>{}}){const{cornerRadiusPx:o}=v(),r=typeof o=="number"?`${o}px`:l("not set");return i(C,{words:y()?.panel,label:l(e),changed:t,detail:o==null?l("the built-in corners"):D(r,l("Styles")),onReset:n})}function pi(){const{cornerRadiusPx:e}=v();return typeof e=="number"?e:U}function fi(){return Ae({sidesKey:"sectionCornerSides",useFollowed:pi,mark:i(ui,{label:ae}),hint:hi})}const hi="Follows Styles ▸ Basics ▸ Corners until you set a number here.";function pa(){return J({_gShape:T("Shape"),sectionCorners:fi(),sectionCornerSides:Ht(),...X("sectionBorder",Gt)})}const mi=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function gi(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=Ot(v().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||dr.line}function wi({value:e,onChange:t,placeholder:n,presets:o,sides:r=!0,styles:s=!0,above:a={}}){const c=e&&typeof e=="object"?e:{},[d,f]=z(()=>r?to(c,a):!1),m=mi(),p=u=>gi(r&&s?u:{width:u.width,color:u.color,...s?{style:u.style}:{}});return i(S,{label:l("Border"),icon:i(Rn,{}),action:r?i(Qn,{each:d,label:l("Each side"),onChange:f}):void 0,children:i(Zn,{label:l("Border"),value:c,each:d,onChange:u=>t(p(u)),placeholder:n,presets:o,words:m,styles:s,max:cr})})}function xi({value:e,onChange:t,view:n}){const[o]=L("sectionBorder"),[r]=L(W("sectionBorder")),s=bi(),a=d=>d&&typeof d=="object"?d:{},c=n==="phone"?{...Tt(a(o)),...Tt(a(r))}:n==="tablet"?a(o):{};return i(wi,{value:e,onChange:t,placeholder:{sides:eo(c),style:c.style??"solid",color:c.color||s},presets:[s],above:c})}function fa(e){return R(e,Gt(e==="mobile"?"phone":e))}function Gt(e){return{type:"custom",render:({value:t,onChange:n})=>i(xi,{value:t,onChange:n,view:e})}}function X(e,t){const n=(o,r)=>se(e,t(o),ke)[r];return{[e]:n("desktop",e),[W(e)]:n("tablet",W(e)),[F(e)]:n("phone",F(e))}}function ha(e){return{type:"custom",render:()=>i(Si,{partKey:e})}}function Si({partKey:e}){const[t]=L("id"),[n]=L("_partStyles"),{textStyles:o}=v(),r=Yo();let s=null;try{s=jo().select}catch{s=null}const a=n&&typeof n=="object"?n[e]:void 0,c=Array.isArray(o)?o:null;return i(zn,{name:l("Text"),preview:Xo(a,c,{noStyle:l("No style"),styleName:r.textStyles.styleName,cases:(r.copy.panel??zo.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(Vo(t,e))}})}function Mt(e){const{cornerRadiusPx:t}=v(),n=typeof t=="number"?t:e;let o=null;try{const{appState:s,selectedItem:a}=te(d=>d),c=a?.props?.id?String(a.props.id):void 0;o=c?Vn(s?.data,c)?.props??null:null}catch{o=null}if(!o)return n;const r=o.sectionCorners;return Xn(r)?r:n}function yi({label:e,changed:t=!1,onReset:n=()=>{}}){const o=Mt(U);return i(C,{words:y()?.panel,label:l(e),changed:t,detail:D(`${o}px`,l("the section")),onReset:n})}function Ci(){return i(k,{children:l("Follows the section's Corners until you set a number here.")})}function _i(){return Ae({sidesKey:"cardCornerSides",useFollowed:()=>Mt(U),mark:i(yi,{label:ae}),hint:i(Ci,{})})}function Ri(){return{type:"custom",render:()=>i(ln,{})}}function ma(e){return{...e,render:t=>i(sn,{render:e.render,props:t})}}function ga(){return{_gShape:T("Shape"),cardCorners:_i(),cardCornerSides:Ht(),cardCornersApplyAll:Ri()}}function Ti(){return E({type:"custom",render:e=>i(Ii,{...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 Oi(e,t){const n=Rt(e);if(n!=="custom")return l(_t.find(r=>r.value===n)?.label??"");const o=ut(Re(e,t),t);return o?[...o,100-o.reduce((r,s)=>r+s,0)].join(" / "):l("Custom")}function Ii(e){const{value:t,onChange:n}=e,[o]=L("content"),r=Array.isArray(o)?o.length:0,s="follows"in e,a=t!=null,c=a?t:s?e.follows:void 0,d=Rt(c),f=r>=2&&r<=dt,m=()=>[...xo[r]??[]],p=V(null),u=b=>{const _=p.current;_&&JSON.stringify(b)===JSON.stringify(_.shares)?n(_.value):b&&n(b)},g=b=>{b===d||b==="custom"&&!f||n(b==="custom"?m():b)},h=l("The width bar works for 2 to {count} blocks.",{count:dt}),w=a&&(s||t!=="content"),x=yo().widths.hint(r,wo);return i(S,{label:l(K),icon:i(he,{}),changed:w,hint:d!=="custom"?void 0:f?x:h,action:i(C,{words:y()?.panel,label:l(K),changed:w,disabled:e.readOnly===!0,detail:s?B(b=>l(b),Oi(e.follows,r),e.followsView):l("Fit content"),onReset:()=>n(void 0)}),children:A("div",{className:"sf-share-row",children:[i("div",{className:"sf-share-pick",children:i(ct,{label:l(K),value:d,options:_t.map(b=>({value:b.value,label:b.value==="custom"&&!f?h:l(b.label),icon:Ur(i("span",{className:"sf-gallery-pic sf-share-pic",children:Ut(b.weights).map((_,j)=>i("i",{style:{gridColumn:`span ${_}`}},j))}),l(b.label),b.value==="custom"&&!f?h:l(b.label))})),onChange:g,columns:3,cell:Wt,tooltips:!1,disabled:e.readOnly===!0})}),d==="custom"&&f?i("div",{onFocus:()=>{p.current={value:t,shares:ut(Re(c,r),r)}},onBlur:()=>{p.current=null},children:i(So,{label:l(K),count:r,value:Re(c,r),onChange:u,readOnly:e.readOnly===!0})}):null]})})}function Ut(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 ba(){return Z(rr,i(Ln,{}),St,St[0].value)}function wa(){return R("mobile",Mr(K,i(he,{}),ar.map(e=>({label:e.label,value:e.value,picture:i("span",{className:"sf-gallery-pic sf-share-pic",children:Ut(e.weights).map((t,n)=>i("i",{style:{gridColumn:`span ${t}`}},n))})})),sr,{columns:2,cell:Wt}))}const Wt={width:"5.75rem",height:"3.25rem"};function xa(){return se("share",Ti(),ke)[W("share")]}function Ei(){return R("mobile",$(yt,i(Ze,{}),_e,lr,1,_e,"",{clear:{phoneFollows:!1,hint:_e}}))}const Kt={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function Sa(){const e=$(yt,i(Ze,{}),Ct,ir,1,Ct,"",{clear:{emptyLabel:"Auto"}}),t=se("columns",e,{...Kt,tablet:ke.tablet}),n=se("columns",e,Kt,{phoneRow:Ei()});return{...t,phoneRow:n.phoneRow}}function ya(e,t,n,o,r,s){return{type:"custom",render:({value:a,onChange:c})=>i(S,{label:l(e),icon:i(lt,{noun:s}),action:i(C,{words:y()?.panel,label:l(e),changed:!Lr(a),detail:l("the Text style in Styles"),onReset:()=>c(Fr),defaultAction:{onPress:()=>c(kr),title:l("Keep this section's own built-in size"),icon:i(Tn,{})}}),children:ee({min:t,max:n,step:o,value:typeof a=="number"?a:r,suffix:"px",ariaLabel:e,onChange:c})})}}function Ca(){return{_gCellWidth:T("Cell width"),gridSpan:Z("Positions",i(he,{}),[{label:"Auto",value:""},...Array.from({length:un},(e,t)=>({label:t===0?"1 position":`${t+1} positions`,value:String(t+1)}))],"")}}function N(){let e=null,t=null;try{e=Me(ki),t=te(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}const ki=zt(null);function Fi({min:e,max:t,step:n,px:o,label:r,onChange:s,desktopKey:a,fallback:c}){const d=N()[a],f=Se(void 0,d,c);return i(k,{children:ee({min:e,max:t,step:n,value:Se(o,d,c),readout:!1,ariaLabel:r,notch:f,onChange:s})})}function Li({label:e,desktopKey:t,fallback:n,unit:o="px",changed:r=!1,onReset:s=()=>{}}){const a=N()[t],c=Se(void 0,a,n);return i(C,{words:y()?.panel,label:l(e),changed:r,detail:B(d=>l(d),`${c}${o}`),onReset:s})}function Ni(e){return Bt(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:i(Li,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>i(Fi,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}const Ai={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Pi={Top:it,Bottom:nt,Left:ot,Right:rt},vi=e=>{const t=Pi[e];return i(t,{})};function _a(e={}){const t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,r=x=>Ai[x],s=x=>$(r("Top"),i(it,{}),I.min,I.max,I.step,x,"px"),a=(x,b,_,j=I)=>R("mobile",Ni({label:r(x),icon:vi(x),desktopKey:b,min:j.min,max:j.max,step:j.step,fallback:_})),c=e.top??I.min,d=e.bottom??I.min,f="sectionPaddingLeft",m="sectionPaddingRight",p=e.sideBounds??I,u=e.side??p.min,g=e.sidePhone??u,h=e.phone===!0,w=x=>h?R("desktop",x):x;return J({...o?{_gSpacing:T("Padding")}:{},[t]:w(s(c)),...h?{[F(t)]:a("Top",t,c)}:{},...e.only==="top"?{}:{[n]:w($(r("Bottom"),i(nt,{}),I.min,I.max,I.step,d,"px")),...h?{[F(n)]:a("Bottom",n,d)}:{}},...e.sides?{[f]:w($(r("Left"),i(ot,{}),p.min,p.max,p.step,u,"px")),...h?{[F(f)]:a("Left",f,g,p)}:{},[m]:w($(r("Right"),i(rt,{}),p.min,p.max,p.step,u,"px")),...h?{[F(m)]:a("Right",m,g,p)}:{}}:{}})}function Ra(e,t){const n=Object.fromEntries(Object.entries(t).map(([s,a])=>[s,s in e&&fe(a)?e[s]:a])),o={};let r=!1;for(const[s,a]of Object.entries(e)){if(s in t){r||Object.assign(o,n),r=!0;continue}o[s]=a}return r||Object.assign(o,n),o}const ce="Width";function Ta(e,t=Nr,n=!0){const o=t.map(r=>({label:Ar[r],value:r}));return J({...n?{_gWidth:T(ce)}:{},widthMode:{type:"custom",render:({onChange:r,field:s})=>i(S,{label:l(ce),icon:i(Un,{}),action:n?i(Jr,{inherited:s?.inherited??!1,onReset:()=>r(Pr),label:ce}):void 0,children:Le({options:o,value:s?.currentValue||e,onChange:r,ariaLabel:ce})})}})}function Oa(){const e=(o,r)=>({type:"custom",render:({value:s,onChange:a})=>i(Bi,{value:s,onChange:a,view:o,badge:r})}),t=o=>({type:"custom",render:({value:r,onChange:s,field:a})=>i(Hi,{value:r,onChange:s,unit:a?.unit,view:o})}),n=o=>{const r=Kr("Unit",i(et,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");if(o==="desktop")return r;const s=r.render;return{...r,render:a=>i(Gi,{props:a,draw:s,view:o})}};return J({_gHeight:T(Y),...X("sectionHeightMode",o=>o==="desktop"?e(o):e(o,r=>i(Mi,{view:o,onClear:()=>r(void 0)}))),...X("sectionHeightValue",t),...X("sectionHeightUnit",n)})}function Bi({value:e,onChange:t,view:n,badge:o}){const r=N(),s=c=>["auto","fixed","screen"].includes(c),a=de(n,r)?.mode??"auto";return i(S,{label:Y,icon:q(i(An,{})),action:o?o(t):void 0,children:Le({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:s(e)?e:a,onChange:t,ariaLabel:Y})})}function $t(e,t){return e==="phone"&&ye(t)?Zo(t):Jo(t)}function de(e,t){return e==="desktop"||(e==="tablet"?ye(t):qo(t))?null:$t(e,t)}const P=(e,t)=>e==="tablet"?W(t):F(t);function Di(e,t,n,o){const r=de(e,t);return!r||e==="desktop"?null:o===void 0?{}:{[P(e,"sectionHeightMode")]:r.mode,...r.mode==="fixed"?{[P(e,"sectionHeightUnit")]:r.unit}:{},...n==="sectionHeightUnit"?{[P(e,"sectionHeightValue")]:r.value}:{},[P(e,n)]:o}}function Xt(e,t,n){const o=M(),r=de(e,N());return!o||!r?{followed:null,write:n}:{followed:r,write:a=>o.onChangeMany(c=>{const d=Di(e,c,t,a);return d===null?{[e==="desktop"?t:P(e,t)]:a}:Object.keys(d).length?d:null})}}function Hi({value:e,onChange:t,unit:n,view:o}){const{followed:r,write:s}=Xt(o,"sectionHeightValue",t),a=(r?r.unit:n)==="%"?"%":"px",c=a==="%"?nr:tr;return i("div",{className:"sf-field",children:ee({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:Y,onChange:s})})}function Gi({props:e,draw:t,view:n}){const{followed:o,write:r}=Xt(n,"sectionHeightUnit",e.onChange);return t({...e,...o?{value:void 0,storedValue:void 0,follows:o.unit}:{},onChange:r})}function Mi({view:e,onClear:t}){const n=N(),o=de(e,n)===null,r=e==="phone"&&ye(n),s=$t(e,n),a=B(c=>l(c),s.mode==="auto"?l("Auto"):`${s.value}${s.unit}`,r?"tablet":"desktop");return i(C,{words:y()?.panel,label:l(Y),changed:o,detail:a,onReset:t})}function Ia(){const e=n=>({type:"custom",render:({value:o,onChange:r,id:s,name:a})=>i(Ki,{value:o,onChange:r,labelId:`${s??a??"stickTop"}-label`,view:n})}),t=n=>({type:"custom",render:({value:o,onChange:r})=>i(Ui,{value:o,onChange:r,view:n})});return{_gStick:T(Ce),...X("stickTop",e),...X("stickTopDistance",t)}}function Ui({value:e,onChange:t,view:n}){const o=M(),r=N(),s=n==="desktop"||Pe(n,r)?null:jt(n,wt(r)),a=s&&o?c=>o.onChangeMany(d=>{const f=Wi(n,d,c);return f===null?{[P(n,"stickTopDistance")]:c}:Object.keys(f).length?f:null}):t;return i("div",{className:"sf-field",children:ee({min:ie.min,max:ie.max,step:ie.step,value:s?null:typeof e=="number"?e:ie.fallback,...s?{placeholder:s.distance}:{},suffix:"px",ariaLabel:l("Distance from top"),onChange:a})})}function Pe(e,t){return e==="tablet"?er(t):Qo(t)}function jt(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance}:{on:t.desktop,distance:t.desktopDistance}}function Wi(e,t,n){return e==="desktop"||Pe(e,t)?null:n===void 0?{}:{[P(e,"stickTop")]:!0,[P(e,"stickTopDistance")]:n}}function Ki({value:e,onChange:t,labelId:n,view:o}){const r=N(),s=wt(r),a=o==="phone"?s.phone:o==="tablet"?s.tablet:e===!0,c=o==="phone"&&s.ownTablet,d=o==="desktop"?null:jt(o,s),f=d?.on?`${d.distance}px`:l("Off");return i(S,{label:l(Ce),labelId:n,icon:q(i(Dn,{})),action:A(k,{children:[o!=="desktop"?i(C,{words:y()?.panel,label:l(Ce),changed:Pe(o,r),detail:B(m=>l(m),f,c?"tablet":"desktop"),onReset:()=>t(void 0)}):null,i(be,{checked:a,onChange:t,ariaLabelledBy:n})]})})}const Vt="e.g. about";function Ea(){return{_gAnchor:T("Anchor"),anchor:G({control:"plainText",label:"Name",placeholder:Vt},{type:"custom",render:({value:e,onChange:t})=>i(xn,{value:e,onChange:t,nameBox:(n,o)=>i(H,{value:n,onChange:o,label:"Name",placeholder:Vt,hideable:!1,markup:!1})})})}}function ka(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:a})=>{const c=`${s??a??e}-datetime`,d=Date.parse(typeof o=="string"?o:"");return i(S,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(go,{id:c,value:Number.isFinite(d)?new Date(d):null,onChange:f=>r(f?f.toISOString():"")})})}}}function Fa(e,t,n){return{type:"custom",render:({value:o,onChange:r,id:s,name:a})=>{const c=`${s??a??e}-date`;return i(S,{label:l(e),icon:t,htmlFor:c,hint:n===void 0?void 0:l(n),children:i(mo,{id:c,value:Jt(typeof o=="string"?o:null),onChange:d=>r(d?qt(d):"")})})}}}function $i(e,t,n,o){return{type:"custom",...E({},{...Q,label:e}),render:r=>{const{value:s,onChange:a,id:c,name:d}=r,f="follows"in r,m=r,p=typeof s=="boolean",u=typeof m.follows=="boolean"?m.follows:t,g=p?s:f?u:t,h=`${c??d??e}-label`,w=m.readOnly===!0,x=i(be,{checked:g,onChange:a,disabled:w,ariaLabelledBy:h});return i(S,{label:l(e),labelId:h,icon:n,hint:o===void 0?void 0:l(o),action:f?A(k,{children:[i(C,{words:y()?.panel,label:l(e),changed:p,detail:m.followsNoView?l(u?"On":"Off"):B(b=>l(b),l(u?"On":"Off"),m.followsView),disabled:w,onReset:()=>a(void 0)}),x]}):x})}}}function La(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{const r=`${String(n??o??"pageBackground")}-colour`;return i(Xi,{label:"Background",icon:i(Bn,{}),id:r,value:e,shown:Wn(e),onChange:t})}}}function Na(e,t){return{type:"custom",...E({},{...Q,label:e}),render:({value:n,onChange:o,id:r})=>{const s=typeof n=="boolean"?n:t,a=`${r??e}-checkbox`;return i(S,{label:l(e),htmlFor:a,className:"sf-checkbox",action:i(po,{id:a,checked:s,onChange:o})})}}}function Aa(e,t,n){return{type:"custom",render:({value:o,onChange:r})=>i(oe,{label:l(e),icon:n,value:o||t,onChange:r})}}function Xi({label:e,icon:t,id:n,value:o,shown:r,onChange:s}){const{colors:a,n:c}=Be(),d=xe(o),f=d?re(d,a,c):null;return i(oe,{label:l(e),icon:t,id:n,value:f?f.hex:r,caption:f?.words,onChange:s,choices:ve(d??"",a,c,s)})}function Pa(){return{type:"custom",render:e=>{const{value:t,onChange:n}=e,o=e;return i(ji,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function ve(e,t,n,o){const r=ge(e);return Ro(t,n).map(s=>({label:s.label,color:s.value,selected:r===s.name,onPick:()=>o(s.name)}))}function ji({value:e,onChange:t,twin:n}){const{colors:o,n:r}=Be(),s=o.background,a=D(s.toUpperCase(),l("Theme {n} background",{n:r})),c=ge(e),d=c?re(c,o,r):null,f=ve(e,o,r,t),m=n?()=>t(void 0):()=>t("");let p=s,u=a;if(n){const g=ge(n.follows),h=Kn(n.follows),w=g?re(g,o,r):h?{hex:h,words:h.toUpperCase()}:null;p=w?.hex??s,u=B(x=>l(x),w?w.words:a,n.view)}return d?i(oe,{label:l("Fill"),icon:i(me,{}),value:d.hex,caption:d.words,onChange:t,changed:!0,onReset:m,resetTo:u,choices:f}):i(ht,{label:l("Fill"),icon:i(me,{}),value:e,inherited:p,resetTo:u,onChange:t,onReset:m,choices:f})}function Vi(e,t,n){if((e?.content??[]).some(a=>a?.props?.id===t))return le(n);const r=jn(e,t);if(r.length===0)return null;const s=le(Lt(n));if(s!==null)return s;for(let a=r.length-1;a>0;a-=1){const c=le(Lt(r[a].sectionAccent));if(c!==null)return c}return le(r[0].sectionAccent)}function Be(){const e=Ot(v().theme),[t]=L("sectionAccent");let n=null;try{const{appState:r,selectedItem:s}=te(c=>c),a=s?.props?.id?String(s.props.id):void 0;n=a?Vi(r?.data,a,t):null}catch{n=null}const o=n!==null&&e.themes[n]?n:e.selected;return{colors:ur(e.themes[o]),n:o+1}}const zi=[{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 Yi({label:e,value:t,onChange:n,points:o=zi}){const r=o.map(s=>({...s,label:l(s.label),...s.title?{title:l(s.title)}:null}));return i(uo,{label:l(e),value:t,points:r,onChange:n})}function va(){return Dt()}const Ba={top:i(kn,{}),right:i(En,{}),bottom:i(On,{}),left:i(In,{})};function Da(e,t,n,o,r,s,a){const c=p=>t.find(u=>u.value===p),d=p=>({value:p,label:"",disabled:!0,title:o}),f=p=>{const u=t.find(h=>h.cell===p);if(!u)return d(`missing-${p}`);const g=s?.[p];return g?{value:u.value,label:u.label,icon:g}:{value:u.value,label:u.label}},m=[d("corner-top-left"),f("top"),d("corner-top-right"),f("left"),d("centre"),f("right"),d("corner-bottom-left"),f("bottom"),d("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:u})=>{const g=t.some(h=>h.value===p)?p:n;return i(S,{label:l(e),icon:r,value:c(g)?.label?l(c(g).label):a?l(a):"",children:Yi({label:e,value:g,onChange:u,points:m})})}}}function Ha(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:r,field:s})=>i(Uo,{label:e,options:(s.options??t).map(a=>({...a,label:l(a.label)})),value:Array.isArray(o)?o:[],onChange:r,...n?{emptyLabel:l(n)}:{}})}}function Ga(e,t,n,o){return{type:"custom",options:t,fallback:n,...E({},{type:"select",label:e}),render:({value:r,onChange:s,field:a})=>i(Ko,{label:e,options:(a.options??t).map(c=>({...c,label:l(c.label)})),fallback:a.fallback??n,value:r,onChange:s,placeholder:o===void 0?void 0:l(o)})}}function Ma(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{const r={value:n,onChange:o,...t};return i(e,{...r})}}}const Ua=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function Wa(e,t,n){const o=Object.keys(We).map(r=>({label:We[r],value:r,picture:n[r]}));return{type:"custom",...E({},{type:"radio",label:e,options:o.map(r=>({value:r.value,label:r.label}))}),render:({onChange:r})=>i(Ji,{label:e,icon:t,options:o,onChange:r})}}function qi(e,t,n){const o=Zt(e,t,n);if(o!==void 0)return o==="save-makes-frame"?l("A frame is made from this video when you save the page."):o==="starts-dark"?l("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"?l("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"?l("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"?l("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"?l("The slide shows your Image while the video loads, because this video has no frame."):void 0;const r=en(e);return r==="frame-missing-image"?l("This video has no frame yet. The slide shows its image until one is made."):r==="frame-missing-surface"?l("This video has no frame yet. The slide shows its background colour until one is made."):r==="image-missing-frame"?l("No image yet. The slide shows the video's frame until you choose one."):r==="image-missing-surface"?l("No image yet. The slide shows its background colour until you choose one."):void 0}function Ji({label:e,icon:t,options:n,onChange:o}){const r=M(),s=r?.values??{},a=Qt(s),c=Me(on),d=nn(c?.docId??null);let f=null;try{f=te(p=>p.appState.data)}catch{f=null}const m=tn(r?.id,f,d);return i(S,{label:l(e),icon:q(t),hint:qi(s,m,c?.hasUnsavedEdits??!1),children:Le({options:n,value:a,onChange:o,ariaLabel:e})})}function Ka(e,t,n,o={}){const r={type:"custom",[je]:!0,render:({value:s,onChange:a,name:c})=>i(Mo,{value:s||"",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?R("each",r):r}const $a={HeroSingle:["imageFocal"],HeroSlide:["videoFrame"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function Zi(e){const t=l(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} · ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Xa({value:e,onChange:t,label:n}){const o=e||{},r=M(),s=r?r.values!==r.node.props:!0,a=!!o.pending&&s,c=!!o.pending&&!s,d=!!Dr(Br()).geocode,f=Ue(),m=(p,u)=>t({...o,[p]:u??void 0});return A(k,{children:[i(S,{label:l(n),icon:i(tt,{}),action:d?i(we,{content:l("Find from the address (OpenStreetMap)"),children:i(pt,{"aria-label":l("Find from the address"),"aria-busy":a||void 0,disabled:a,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding…"}),children:i(Hn,{})})}):void 0,children:d&&o.status?i(Sn,{compact:!0,oneLine:!0,spaced:!1,status:a?"busy":o.ok&&!c?"found":"notfound",statusText:a?l("Finding…"):c?l(_o):l(o.status),hint:Zi(o)}):null}),i(S,{label:l("Enter by hand"),labelId:f,icon:i(Fn,{}),action:i(be,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:f})}),o.manual&&i(S,{label:l("Latitude, longitude"),icon:i(tt,{}),children:A("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[i(ft,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>m("lat",p),min:-90,max:90,step:1e-4,placeholder:l("Latitude")}),i(ft,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>m("lng",p),min:-180,max:180,step:1e-4,placeholder:l("Longitude")})]})})]})}function Qi(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function el(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 ja(e,t){return e===null?null:t>e?e:null}function tl(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 Va={label:"Ticker items",icon:i(vn,{})};function za(e,t,n,o){return{type:"custom",[O]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...E({},{...At.textList,label:e}),render:({value:r,onChange:s})=>i(nl,{label:e,icon:q(t),items:Array.isArray(r)?r:[],placeholder:n,onChange:s,markup:o==="markup"})}}function nl({label:e,icon:t,items:n,placeholder:o,onChange:r,markup:s=!1}){const a=V(null),[c,d]=z(null),f=p=>p.map(u=>({text:u?.text??""})),m=p=>{const u=tl(n,p,c);u===null&&(a.current=null),d(u),r(f(p))};return i(no,{label:l(e),icon:t,noun:l("item"),items:n,onChange:m,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?i(mt,{target:a,value:Qi(n,c),onChange:p=>r(el(n,c??-1,p)),disabled:c===null,label:c===null?l("Formatting — click a row first"):l("Formatting — row {n}",{n:c+1})}):void 0,renderRow:(p,u,g)=>i("input",{type:"text",className:s&&c===u?"sf-list-marking":void 0,value:p?.text??"",placeholder:l(o),"aria-label":l("{label} {n}",{label:l(e),n:u+1}),onChange:h=>g({text:h.target.value}),onFocus:h=>{a.current=h.currentTarget,d(u)}})})}function Ya(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:l("{label} — row {n}",{label:l(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function qa(e){return{_gCards:T("Cards"),coverIndex:Z("Cover image",i(Pn,{}),Do,String(Ho),e?.coverHint??"A card's opening picture — a card pinned to a finish keeps its own."),imageBackground:ai("Image background",wr),cardImage:il()}}function Ja(){return{outline:Z("Card outline",i(Gn,{}),Po,Bo),indexBadge:Z("Card number",i(et,{}),Ao,vo),showBadge:$i("Product badge",!0,i(lt,{noun:"tag"}))}}function Za(e){const t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=r=>({...Q,label:ue.find(s=>s.id===r).label}),o=r=>E(To(De),n(r));return{_gShowOnCard:T("Show on a card"),[De]:E({type:"custom",render:()=>i(ol,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(De)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}const De="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 ol({rest:e}){const t=N(),n=ci(),o=a=>typeof t[a]=="boolean"?t[a]:void 0,r=a=>o(a)??e[a],s=ue.some(({id:a})=>o(a)!==void 0&&o(a)!==e[a]);return i(He,{parts:ue,changed:s,shown:r,onPress:(a,c)=>n({[a]:c}),onReset:()=>n(Object.fromEntries(ue.map(({id:a})=>[a,void 0])))})}function Qa(e,t="display"){const n=F(t);return{[t]:R("desktop",{type:"custom",render:({value:o,onChange:r})=>i(He,{parts:e,changed:ro(o),shown:s=>io(o,s),onPress:(s,a)=>r(ao(o,s,a)),onReset:()=>r(void 0)})}),[n]:R("mobile",{type:"custom",render:({value:o,onChange:r})=>i(rl,{parts:e,desktopKey:t,value:o,onChange:r})})}}function He({parts:e,changed:t,shown:n,onPress:o,onReset:r,detail:s,disabledReason:a}){const c=l("Display");return i(S,{label:c,icon:i(Cn,{}),changed:t,action:i(C,{words:y()?.panel,label:c,changed:t,detail:s,onReset:r}),children:i(oo,{label:c,items:e.map(d=>({id:d.id,label:l(d.label),shown:n(d.id),...a?{disabled:!0,disabledReason:l(a)}:{}})),onChange:o})})}function rl({parts:e,desktopKey:t,value:n,onChange:o}){const r=N()[t];return i(He,{parts:e,changed:so(n),shown:s=>lo(r,n,s),onPress:(s,a)=>o(co(n,s,a)),onReset:()=>o(Lo),detail:l("the same as Desktop")})}function il(){return Bt("Card image",{min:U,max:Ye,step:an,icon:i(Qe,{}),hint:"Rounds the picture. The card's own corner is in Styles."})}function ec(){return Ae({sidesKey:"cornerSides",step:cn,useFollowed:()=>U,mark:i(ll,{label:dn}),hint:l("Rounds the picture. Left alone it stays square.")})}function ll({label:e,changed:t=!1,onReset:n=()=>{}}){return i(C,{words:y()?.panel,label:l(e),changed:t,onReset:n})}function tc(){return{type:"custom",render:({value:e,onChange:t})=>i(dl,{value:typeof e=="string"?e:"",onChange:t})}}function sl({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:mn(e).map(([r,s],a)=>i("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${r}`,gridRow:`span ${s}`,aspectRatio:o}},a))})}const al={width:"3.5rem",height:"2.5rem"},cl=200;function dl({value:e,onChange:t}){const[n,o]=z(null),[r,s]=z(4),a=V(null);Yt(()=>{const u=a.current;if(!u||typeof ResizeObserver!="function")return;const g=()=>s(u.getBoundingClientRect().width>=cl?4:3);g();const h=new ResizeObserver(g);return h.observe(u),()=>h.disconnect()},[]);const c=e&&e in ne?e:"",d=qe(n,c),f=qe(n,"").length,m=gn("no-symbol"),p=[{value:"",label:l("Not chosen"),icon:Wr(m,l("Not chosen"))},...d.map(u=>({value:u,label:l(ne[u].label),icon:i(sl,{layout:ne[u],width:40})}))];return i(S,{label:l("Layout"),icon:i(Nn,{}),value:c?l(ne[c].label):void 0,children:i("div",{ref:a,style:{flex:"1 1 auto",minWidth:0},children:i(ct,{label:l("Layout"),value:c,options:p,onChange:t,columns:r,cell:al,header:A("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[i("span",{className:"text-2xs text-ink-faint",children:l("Photos in a row")}),i(Jn,{options:[{id:"all",label:l("All")},...pn.map(u=>({id:String(u),label:String(u)}))],value:n===null?"all":String(n),ariaLabel:l("Photos in a row"),onChange:u=>o(u==="all"?null:Number(u))}),i("span",{className:"text-2xs text-ink-faint",children:l("{n} of {total} layouts",{n:f,total:fn.length})})]})})})})}export{Qr as BOUND_TO_POST,Vs as BOUND_TO_POST_NOTE,ta as BUCKET_ICONS,$a as CUSTOM_FIELD_MEDIA,Xa as CoordsField,Nt as DESKTOP_GAP_NOT_OVERLAP,He as DisplayRow,Ba as EDGE_ARROWS,bo as FOCAL_DEFAULT,zi as FOCAL_POINTS,pe as FOLD_FIELD_MARKER,Yi as FocalPicker,ca as GroupLabel,ei as HIGHLIGHT_HINT,H as HidableTextField,Xe as LINK_FIELD_MARKER,Bs as Label,je as MEDIA_FIELD_MARKER,Ua as MEDIA_TYPE_OPTIONS,zs as NOT_BOUND_TO_POST,aa as PanelBand,oi as PanelNoteLine,ki as RowPropsContext,Ve as SCAFFOLD_FIELD_MARKER,ic as SCALAR_TEXT_CONTROLS,Xr as SiteGapDefaultReset,ee as Slider,ii as Swatches,rc as TEXT_CONTROL_KINDS,O as TEXT_FIELD_MARKER,Va as TICKER_ITEMS_ROW,nl as TextListField,Xi as ThemeFillRow,ce as WIDTH_LABEL,Jr as WidthDefaultReset,tl as aimAfterListChange,Ea as anchorFields,D as backTo,da as backgroundField,ba as boxBlockSpacingField,Sa as boxColumnsFields,Pa as boxFillField,Ei as boxPhoneRowField,Ti as boxShareField,wa as boxSharePhoneField,xa as boxShareTabletField,Vi as boxThemeIndexOf,ra as bucketHeader,ha as buttonWordsEntryField,_i as cardCornersField,ai as cardImageBackgroundField,il as cardImageField,qa as cardMediaFields,ga as cardShapeFields,Za as cardShowFields,Ja as cardStyleFields,Ca as cellWidthFields,Na as checkbox,Aa as colorInput,Hs as containerDirectionField,jr as containerGapField,Vr as containerGapPhoneField,Ds as containerGapRows,zr as containerGapTabletField,Zi as coordsResultTip,Zs as copyText,Ht as cornerSidesField,Ae as cornersRowField,Fa as date,ka as dateTime,ia as designGroupHeader,Qa as displayFields,Da as edgePad,ve as fillSlotChoices,ja as focusAfterRemove,va as focusKeptField,la as foldMarker,fe as foldMetaOf,ri as foldTitleOf,Di as followedHeightPatch,Wi as followedStickPatch,tc as galleryLayoutField,Oa as heightFields,de as heightFollowedBy,Gs as heroGroupPlacementPoints,$e as hidableText,ni as hintIsWhileTyping,ec as imageCornersField,js as inOwnBox,oa as isBucketHeader,Dt as keptBy,Qs as linkField,qi as loadingRowHint,Wa as loadingShowsField,Ha as multiSelect,La as pageBackgroundField,na as panelNote,Ni as phoneOverrideField,Js as plainText,ea as plainTextarea,Bt as pxField,sa as quietMarker,Ke as readHidable,Qi as rowText,Ga as searchSelect,si as sectionBandChoices,fa as sectionBorderField,fi as sectionCornersField,pa as sectionShapeFields,ua as sectionThemeFields,el as setRowText,ya as sizeField,Ma as sourceField,_a as spacingFields,Ia as stickFields,Ra as swapPadding,ma as templateField,Ys as text,rn as textFieldIdentifier,Ws as textFieldOffPage,$s as textFieldPanelOnly,za as textList,Ya as textListRowField,qs as textarea,$i as toggle,Ka as upload,ci as useSelectedPatch,N as useSelectedProps,L as useSelectedSibling,$r as useSiteGapDetail,Ta as widthField,Xs as withIdentifier,Us as withOffPage,Ks as withPanelOnly,Ms as withScaffold};
@@ -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 B}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 A=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",Search:"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",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(B()),...Object.keys(B())],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(),...B()};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=A.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 A.some(t=>d[t]in e)}function Oe(e){const t=A.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,A 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 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 B}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 A=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",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(B()),...Object.keys(B())],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(),...B()};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=A.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 A.some(t=>d[t]in e)}function Oe(e){const t=A.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,A 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 +1 @@
1
- "use client";import{jsx as s}from"react/jsx-runtime";import{SettingsDefaultReset as O,SettingsField as _}from"efficient-easel/panel";import{Segmented as h}from"efficient-shell/ui";import{SwapIcon as w}from"efficient-easel/icons";import{describedAs as A}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as I}from"efficient-easel/screen/lib/document/device-fields";import{MIRROR_CARDS_LABEL as p,MIRROR_CARDS_OFF as d,MIRROR_CARDS_OPTIONS as u,MIRROR_CARDS_TITLES as b,mirrorCardsActs as a,mirrorCardsOf as R,mirrorChildrenActs as D,mirrorCardsWrite as M,ownsCard as f}from"../../../format/lib/content/mirror-cards.js";import{editorEaselWords as v,say as i}from"../../../format/lib/editor-words.js";import{cardCopyPlace as c}from"../../../format/lib/content/card-template.js";import{sharedColumnsDrawn as l}from"../../../render/lib/content/box-shared-columns.js";import{withShowWhen as x}from"../../../format/lib/document/show-when-attach.js";import{handedRowOf as C,holdsABox as y}from"../../../format/lib/document/row-hand.js";const S="mirrorCardsIdle",F="mirrorCardsMirrors",J={[F]:(r,e)=>{const t=c(e.appState,r.props?.id),o=r.props??{};if(t===void 0)return;const n=C(e.appState,r.props?.id);if(n){const m=n.row?{...o,direction:"row",share:n.row.share}:o;return n.mirror!==null&&a(m,!0,l(m).desktop)}return a(o,f(t),l(o).desktop)&&R(o.mirrorCards)!==null},[S]:(r,e)=>{const t=c(e.appState,r.props?.id),o=r.props??{};if(t!==void 0)return C(e.appState,r.props?.id)?!0:a(o,f(t),l(o).desktop)?!1:!(D(o,t.inCopy)&&y(o))}};function g(r=!1){return u.map(e=>({value:e.value,label:i(e.label),title:e.value===d?void 0:i(b[e.value]),disabled:r}))}function k({value:r,onChange:e,readOnly:t}){const o=R(r)??d;return s(_,{label:i(p),icon:s(w,{}),action:s(O,{words:v()?.panel,label:i(p),changed:o!==d,detail:i("Off"),onReset:()=>e(void 0)}),children:s(h,{size:"sm",block:!0,label:i(p),value:o,onChange:n=>e(M(n)),options:g(t===!0)})})}function K(){return x(I("desktop",{type:"custom",...A({},{type:"radio",label:p,options:u.map(r=>({value:r.value,label:r.label}))}),render:({value:r,onChange:e,readOnly:t})=>s(k,{value:r,onChange:e,readOnly:t})}),{not:{context:S,is:!0}})}export{J as MIRROR_CARDS_FACTS,S as MIRROR_CARDS_IDLE,F as MIRROR_CARDS_MIRRORS,K as mirrorCardsField,g as mirrorCardsOptions};
1
+ "use client";import{jsx as s}from"react/jsx-runtime";import{SettingsDefaultReset as _,SettingsField as h}from"efficient-easel/panel";import{Segmented as w}from"efficient-shell/ui";import{SwapIcon as A}from"efficient-easel/icons";import{describedAs as I}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as b}from"efficient-easel/screen/lib/document/device-fields";import{MIRROR_CARDS_LABEL as p,MIRROR_CARDS_OFF as d,MIRROR_CARDS_OPTIONS as u,MIRROR_CARDS_TITLES as x,mirrorCardsActs as a,mirrorCardsOf as R,mirrorChildrenActs as D,mirrorCardsWrite as M,ownsCard as f}from"../../../format/lib/content/mirror-cards.js";import{editorEaselWords as v,say as i}from"../../../format/lib/editor-words.js";import{boxCardProps as c}from"../../../format/lib/content/box-background.js";import{cardCopyPlace as C}from"../../../format/lib/content/card-template.js";import{sharedColumnsDrawn as l}from"../../../render/lib/content/box-shared-columns.js";import{withShowWhen as y}from"../../../format/lib/document/show-when-attach.js";import{handedRowOf as S,holdsABox as F}from"../../../format/lib/document/row-hand.js";const O="mirrorCardsIdle",g="mirrorCardsMirrors",Q={[g]:(r,e)=>{const t=C(e.appState,r.props?.id);if(t===void 0)return;const o=c(r.props??{},t.inCopy),n=S(e.appState,r.props?.id);if(n){const m=n.row?{...o,direction:"row",share:n.row.share}:o;return n.mirror!==null&&a(m,!0,l(m).desktop)}return a(o,f(t),l(o).desktop)&&R(o.mirrorCards)!==null},[O]:(r,e)=>{const t=C(e.appState,r.props?.id);if(t===void 0)return;const o=c(r.props??{},t.inCopy);return S(e.appState,r.props?.id)?!0:a(o,f(t),l(o).desktop)?!1:!(D(o,t.inCopy)&&F(o))}};function k(r=!1){return u.map(e=>({value:e.value,label:i(e.label),title:e.value===d?void 0:i(x[e.value]),disabled:r}))}function E({value:r,onChange:e,readOnly:t}){const o=R(r)??d;return s(h,{label:i(p),icon:s(A,{}),action:s(_,{words:v()?.panel,label:i(p),changed:o!==d,detail:i("Off"),onReset:()=>e(void 0)}),children:s(w,{size:"sm",block:!0,label:i(p),value:o,onChange:n=>e(M(n)),options:k(t===!0)})})}function U(){return y(b("desktop",{type:"custom",...I({},{type:"radio",label:p,options:u.map(r=>({value:r.value,label:r.label}))}),render:({value:r,onChange:e,readOnly:t})=>s(E,{value:r,onChange:e,readOnly:t})}),{not:{context:O,is:!0}})}export{Q as MIRROR_CARDS_FACTS,O as MIRROR_CARDS_IDLE,g as MIRROR_CARDS_MIRRORS,U as mirrorCardsField,k as mirrorCardsOptions};
@@ -10,17 +10,21 @@ export declare const BOX_HOVER_KINDS: readonly BoxHover[];
10
10
  export declare const BOX_HOVER_LABELS: Readonly<Record<BoxHover, string>>;
11
11
  export declare function boxHoverOf(record: Readonly<Record<string, unknown>>): BoxHover;
12
12
  export declare const BOX_HIGHLIGHT_CLASS = "transition-colors hover:bg-[var(--sf-hl-bg)]! hover:[--fg:var(--sf-hl-ink)] active:bg-[var(--sf-hl-bg)]! active:[--fg:var(--sf-hl-ink)]";
13
+ export declare const BOX_HIGHLIGHT_OVER_ROW_INK_CLASS = "hover:[--fg:var(--sf-hl-ink)]! hover:[--fg-dim:inherit]! hover:[--site-line:inherit]! hover:[color:inherit]! active:[--fg:var(--sf-hl-ink)]! active:[--fg-dim:inherit]! active:[--site-line:inherit]! active:[color:inherit]!";
13
14
  export declare function boxHighlightStyle(record: Readonly<Record<string, unknown>>, ink: (slot: string) => string): Record<string, string> | null;
14
15
  export type PartHover = Extract<HoverKind, "none" | "lift">;
15
16
  export declare const PART_HOVER_KINDS: readonly PartHover[];
16
17
  export declare function hoverOf(record: Readonly<Record<string, unknown>>): PartHover;
17
- export type CardHover = Extract<HoverKind, "none" | "rotate">;
18
+ export type CardHover = Extract<HoverKind, "none" | "nextImage" | "rotate">;
18
19
  export declare const CARD_HOVER_KINDS: readonly CardHover[];
19
20
  export declare const CARD_HOVER_KEYS: {
20
21
  readonly kind: "hover";
21
22
  readonly angle: "hoverAngle";
22
23
  readonly duration: "hoverDuration";
23
24
  readonly delay: "hoverDelay";
25
+ readonly mediaKind: "hoverKind";
26
+ readonly mediaGroup: "hoverGroup";
27
+ readonly cover: "hoverCover";
24
28
  };
25
29
  export declare const OLD_SPIN_KEY = "spinOnHover";
26
30
  export declare const CARD_HOVER_ANGLE: {
@@ -36,7 +40,25 @@ export type CardHoverDrawn = {
36
40
  angle: number | null;
37
41
  duration: number;
38
42
  delay: number;
43
+ media?: CardHoverMedia;
39
44
  };
45
+ export declare const HOVER_MEDIA_KINDS: readonly ["photos", "lifestyle", "renderings", "accessories", "others"];
46
+ export type HoverMediaKind = (typeof HOVER_MEDIA_KINDS)[number];
47
+ export declare const HOVER_MEDIA_KIND_LABELS: Readonly<Record<HoverMediaKind, string>>;
48
+ export declare const HOVER_MEDIA_GROUPS: readonly ["finish", "first"];
49
+ export type HoverMediaGroup = (typeof HOVER_MEDIA_GROUPS)[number];
50
+ export declare const HOVER_MEDIA_GROUP_LABELS: Readonly<Record<HoverMediaGroup, string>>;
51
+ export declare const HOVER_MEDIA_COVERS: readonly ["card", "picture"];
52
+ export type HoverMediaCover = (typeof HOVER_MEDIA_COVERS)[number];
53
+ export declare const HOVER_MEDIA_COVER_LABELS: Readonly<Record<HoverMediaCover, string>>;
54
+ export type CardHoverMedia = {
55
+ kind: HoverMediaKind;
56
+ group: HoverMediaGroup;
57
+ cover: HoverMediaCover;
58
+ };
59
+ export declare const HOVER_MEDIA_DEFAULTS: Readonly<CardHoverMedia>;
60
+ export declare function cardHoverMediaOf(record: Readonly<Record<string, unknown>>): CardHoverMedia;
61
+ export declare function cardShowsNextRule(): ShowWhenRule;
40
62
  export declare function cardHoverKindOf(record: Readonly<Record<string, unknown>>, resting: CardHover): CardHover;
41
63
  export declare function cardHoverAngleOf(stored: unknown): number;
42
64
  export declare function cardHoverOf(record: Readonly<Record<string, unknown>>, blockKey: string): CardHoverDrawn;