efficient-storefront-blocks 0.130.15 → 0.131.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 (29) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/chunks/{CustomHtmlCodeWindow-DHCKPXRN.js → CustomHtmlCodeWindow-JINOMDUB.js} +1 -1
  3. package/dist/chunks/{EditorPreviewCheckout-WPWX5CLZ.js → EditorPreviewCheckout-B5B4BHEG.js} +1 -1
  4. package/dist/chunks/SiteEditorProvider-CJRYE2LF.js +1 -0
  5. package/dist/chunks/{chunk-66NNRDRA.js → chunk-3QCDDPXL.js} +1 -1
  6. package/dist/chunks/{chunk-HEKC2QYZ.js → chunk-43XANC6T.js} +1 -1
  7. package/dist/chunks/{chunk-AL6K3KD7.js → chunk-7W33H2GG.js} +1 -1
  8. package/dist/chunks/{chunk-LSEWOQRA.js → chunk-GVSVEV2H.js} +8 -8
  9. package/dist/chunks/{chunk-43DAA6QE.js → chunk-PJVO662Y.js} +1 -1
  10. package/dist/chunks/chunk-QYTBEMMG.js +337 -0
  11. package/dist/chunks/{chunk-4J3EMW4L.js → chunk-R5FDAR72.js} +1 -1
  12. package/dist/chunks/{chunk-NOV6LTTJ.js → chunk-SV3VVDBH.js} +1 -1
  13. package/dist/chunks/{fitment-data-JY77OFQP.js → fitment-data-FRSLYOCL.js} +1 -1
  14. package/dist/chunks/{section-css-style-TB33NIO4.js → section-css-style-3IQWMPDP.js} +1 -1
  15. package/dist/index.js +26 -26
  16. package/dist/links.js +1 -1
  17. package/dist/render/built-with.json +1 -1
  18. package/dist/routine-index.json +1 -1
  19. package/dist/value-index.json +1 -1
  20. package/dist/words.d.ts +8 -0
  21. package/dist/words.js +4 -4
  22. package/package.json +4 -4
  23. package/dist/chunks/SiteEditorProvider-CKIUIYEI.js +0 -1
  24. package/dist/chunks/chunk-KZNWKZDS.js +0 -337
  25. /package/dist/chunks/{chunk-HEKC2QYZ.js.LEGAL.txt → chunk-43XANC6T.js.LEGAL.txt} +0 -0
  26. /package/dist/chunks/{chunk-5OXXOEE7.js → chunk-FVHAKC6L.js} +0 -0
  27. /package/dist/chunks/{chunk-KZNWKZDS.js.LEGAL.txt → chunk-QYTBEMMG.js.LEGAL.txt} +0 -0
  28. /package/dist/chunks/{chunk-RCXMXKPT.js → chunk-T5PQ7BY4.js} +0 -0
  29. /package/dist/chunks/{chunk-3DKV2YJ6.js → chunk-TICXZI44.js} +0 -0
@@ -1,9 +1,9 @@
1
- import{b as hu,c as gu,d as ku,e as Au,g as Ks,h as Iu,i as Ru}from"./chunk-NOV6LTTJ.js";import{$ as be,$f as eu,$h as wo,Aa as Ic,Ac as Ps,Af as qe,Ag as lu,Bc as _o,Bg as Gs,Bh as _u,Ca as O,Cc as Dc,Da as bo,Db as Nc,Dc as Fc,De as jc,E as vc,Ec as Bc,Ed as Is,Fb as $t,Fc as ks,Gb as He,Gc as Hc,Ia as ws,Jd as le,Jf as qc,Ka as Rc,Kf as Bs,Lf as ke,Lg as ht,Lh as Ws,Md as Uc,Mf as Zc,Mh as vo,Nf as Jc,Ng as cu,Nh as Eu,Of as Wt,Oh as U,Pb as yo,Pf as ce,Pg as uu,Rg as du,Sc as Mc,Sf as Kt,Sh as Tu,Tc as As,Td as $c,Tf as jt,Tg as pu,Th as xu,Uh as vu,Vh as wu,Wd as Gc,Wf as Qc,Xg as fu,Xh as Cu,Yg as mu,Ze as To,Zf as Hs,Zh as Yt,_h as Ou,aa as wc,ag as Ms,ah as gt,ai as Pu,b as W,ba as Cc,bh as zs,c as Ye,ca as Oc,dg as tu,ea as dt,eg as nu,eh as bu,fe as Rs,ff as Ds,ga as go,i as bc,ic as Lc,ka as _n,l as mo,lg as ou,m as yc,me as Eo,mg as Us,mi as B,n as Sc,oa as pt,oe as Gt,og as au,p as _c,pc as ft,pe as mt,pf as M,pg as ae,q as Ec,qf as F,qg as su,qh as yu,r as Tc,rc as Cs,rf as Vc,rg as ru,ri as Lu,sc as Os,se as zc,sf as zt,sg as Ae,t as ho,te as Ns,tf as Yc,tg as Vt,u as xc,uc as So,ue as Wc,uf as Fs,va as Pc,vf as Tn,wa as kc,wf as Xc,wg as iu,wh as Su,xa as Ac,xe as Kc,xg as $s,yb as En,ye as Ls,za as vs,zf as Xe,zh as xo}from"./chunk-66NNRDRA.js";import{a as j,b as ge}from"./chunk-5OXXOEE7.js";import{d as Nu}from"./chunk-3DKV2YJ6.js";var Fu="en",Co=null,Bu=Fu,Hu=null;function n0(e,t,n){Co=e??null,Bu=t||Fu,Hu=n??null}function P(){return Hu}function o0(){return Bu}function a0(){return Co}function Du(e,t){return t?e.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(n,o)=>ge(t,o)?String(j(t,o)):n):e}function c(e,t){let n=Co?j(Co,e):void 0;if(typeof n=="function"){try{let o=W(n(t??{}));if(o)return o}catch{}return Du(e,t)}return Du(W(n)??e,t)}function xn(e,t,n,o){return c(n===1?e:t,{...o,n})}import{parseHexColor as zu}from"efficient-shell/format";import{COLOR_SLOTS as Wu,FILL_COLOR_SLOTS as ey,colorRole as ty,fillColorRole as Ku}from"efficient-shell/markup";import{parseHexColor as Mu}from"efficient-shell/format";import{FILL_COLOR_SLOTS as qb}from"efficient-shell/markup";var Oo=e=>{let t=pu.find(n=>n.role===e);return t?`var(${t.token})`:""},Zb=e=>Oo(e)?`var(--theme-${e})`:"",Jb={main:{ink:pt.accent,page:pt.accent,key:"accent",label:()=>c("Main"),words:e=>c("Theme {n} main color",{n:e})},text:{ink:pt.text,page:pt.text,key:"text",label:()=>c("Text"),words:e=>c("Theme {n} text color",{n:e})},background:{ink:Oo("bg"),page:Zb("bg"),key:"background",label:()=>c("Background"),words:e=>c("Theme {n} background",{n:e})},muted:{ink:pt.labels,page:pt.labels,key:"muted",label:()=>c("Muted"),words:e=>c("Theme {n} muted color",{n:e})},surface:{ink:Oo("surface"),page:Oo("surface"),key:"surface",label:()=>c("Surface"),words:e=>c("Theme {n} surface color",{n:e})}};function Ze(e){return j(Jb,e)}var js="#9ca3af";function Xt(e,t,n){let o=Ze(e);return o?{hex:Mu(t[o.key]??"")??"",words:o.words(n)}:null}function Uu(e,t){return qb.flatMap(n=>{let o=Xt(n,e,t);return o&&Ze(n)?.ink?[{name:n,label:o.words,value:o.hex||js}]:[]})}var Qb=["main","text","background"];function $u(e){let t=new Set,n=[];return ke(e).themes.forEach((o,a)=>{for(let s of Qb){let r=Ze(s),i=r?o[r.key]:void 0,l=typeof i=="string"&&i?Mu(i):null;!r||!l||t.has(l)||(t.add(l),n.push({value:l,label:r.words(a+1)}))}}),n}function Me(e){return Ze(e)?.ink??""}function Ie(e){if(typeof e!="string")return null;let t=Ku(e.trim());return t?.kind==="slot"&&Me(t.slot)?t.slot:null}var ny={accent:"main",labels:"muted"};function Ue(e){return j(ny,e)??e}function Po(e){if(!e)return"";if(e.startsWith("#"))return zu(e)===e.toLowerCase()?e:"";let t=ty(Ue(e));return t?.kind==="slot"?Me(t.slot):""}function ju(e,t=Wu){return t.flatMap(n=>{let o=Ze(n);return o?.ink?[{name:n,label:o.label(),value:e?.[n]||js}]:[]})}function Vu(e){let t=Ku(Ue(e));return t?.kind==="slot"?Me(t.slot):""}function y0(e){let t=e?.trim();return t?ey.find(n=>Me(n)===t)??null:null}function S0(e){let t={},n=e.ownerDocument,o=n?.defaultView;if(!n||!o)return t;let a=o.getComputedStyle(e),s=n.createElement("canvas").getContext("2d");for(let r of Wu){let i=Me(r);if(!i)continue;let l=i.replace(/^var\((--[\w-]+)\)$/,"$1"),u=a.getPropertyValue(l).trim();if(!u)continue;let d=Gu(u);!d&&s&&(s.fillStyle="#000000",s.fillStyle=u,d=Gu(String(s.fillStyle))),d&&(t[r]=d)}return t}function Gu(e){let t=e.trim().toLowerCase();if(t.startsWith("#"))return zu(t);let n=t.match(/^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)/);return n?`#${n.slice(1,4).map(o=>Math.min(255,Number(o)).toString(16).padStart(2,"0")).join("")}`:null}var ko="sf.gapContainer",$e={min:-32,max:64,step:2},ed={Grid:{sm:12,md:24,lg:40},Flex:{sm:12,md:24,lg:40},FooterGroup:{sm:8,md:16,lg:32},HeroGroup:null,Events:null,GalleryB:null,ProductGrid:null},qt={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},oy=new Set(["Events","GalleryB"]);function vn(e,t,n){if(typeof t=="number"&&Number.isFinite(t)&&t>=$e.min)return t;if(typeof t=="string"){let o=ed[e]?.[t];if(typeof o=="number")return o}return typeof n=="number"&&Number.isFinite(n)?n:qt[e]}var ay="sf-gap-overlap",sy="--sf-gap-overlap",Vs="--sf-block-gap",Yu="--sf-block-gap-rem",ye={min:0,max:$e.max,step:$e.step};function wn(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.min(Math.max(Math.round(e),ye.min),ye.max);return t-t%ye.step}function T0(e,t){let n=Tn(e,t,"gap",ye);if(n!==null)return{[Vs]:n,[Yu]:n};let o=wn(e);return o===null?{}:{[Vs]:`${o}px`,[Yu]:`${o/16}rem`}}var Xu="--sf-block-gap-phone",qu="--sf-block-gap-phone-rem",ry="--sf-block-gap-on-phone",iy="max-view-tablet:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]",ly="max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";function x0(e,t){let n=Tn(e,t,"gap",ye);if(n!==null)return{[Xu]:n,[qu]:n};let o=wn(e);return o===null?{}:{[Xu]:`${o}px`,[qu]:`${o/16}rem`}}function v0(e){return wn(e)===null?"":`${iy} ${ly}`}var Zu="sf-gap-zone",Ju="--sf-gap-len";function Ao(e,t){return typeof t=="number"&&Number.isFinite(t)&&t>=$e.min?!0:typeof t=="string"&&typeof ed[e]?.[t]=="number"}var Qu="--sf-gap-len-phone",cy="--sf-gap-len-tablet",Cn={min:0,max:$e.max,step:$e.step};function Je(e){return typeof e=="number"&&Number.isFinite(e)&&e>=Cn.min}function Ys(e){return e/2}function Xs(e,t,n){return Je(n)&&!Ao(e,t)}function qs(e,t,n,o,a){return Je(t)?t:Xs(e,n,a)?a:Ys(vn(e,n,o))}var uy={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function w0(e,t,n,o,a){let s={...Je(o)?{[Qu]:`${o}px`}:null,...Je(a)?{[cy]:`${a}px`}:null};if(!Ao(e,t)){let i=`${qt[e]}px`,l=oy.has(e)?`var(--sf-card-gap, ${i})`:i;return{className:` ${Zu}`,style:{[Ju]:`var(${Vs}, ${l})`,[Qu]:`var(${ry})`,...s}}}let r=vn(e,t);return r>=0?{className:` ${Zu}`,style:{[Ju]:`${r}px`,...s}}:{className:` ${ay} ${uy[n]}`,style:{gap:"0px",[sy]:`${-r/2}px`}}}import{jsx as Js,Fragment as yy,jsxs as Sy}from"react/jsx-runtime";import{createContext as _y,useContext as Ey,useMemo as Ty}from"react";var dy=4,py={sans:"Arial",condensed:"Arial Narrow",serif:"Times New Roman",mono:"Courier New"},fy={sans:"sans-serif",serif:"serif",mono:"monospace"},my="latin",hy=/^\/(?![\/\\])[^\s"'()\\<>:]+$/,gy=/^U\+[0-9A-Fa-f?]{1,6}(?:-[0-9A-Fa-f]{1,6})?(?:\s*,\s*U\+[0-9A-Fa-f?]{1,6}(?:-[0-9A-Fa-f]{1,6})?)*$/,Zs=e=>`"${Iu(e)}"`,td=e=>`${e} Fallback`;function by(e){return typeof e?.url=="string"&&hy.test(e.url)&&typeof e.unicodeRange=="string"&&gy.test(e.unicodeRange.trim())&&Number.isInteger(e.weight)&&e.weight>=1&&e.weight<=1e3&&(e.style==="normal"||e.style==="italic")}var Io=e=>`${e}%`,Ro=e=>typeof e=="number"&&Number.isFinite(e);function nd(e,t){let n={css:"",vars:{},preload:[]};if(e.siteFonts.size===0)return n;let o=[],a=[];for(let s of new Set(t)){let r=e.siteFonts.get(s),i=e.byKey.get(s);if(!r||!i)continue;let l=Zs(r.family);for(let p of r.files??[])by(p)&&(o.push(`@font-face { font-family: ${l}; src: url("${p.url}") format("woff2"); font-weight: ${p.weight}; font-style: ${p.style}; unicode-range: ${p.unicodeRange.trim()}; font-display: swap; }`),p.subset===my&&a.push(p));let u=r.fallbackMetrics,d=!!u&&Ro(u.ascent)&&Ro(u.descent)&&Ro(u.lineGap)&&Ro(u.sizeAdjust);if(d){let p=py[r.condensed?"condensed":i.category];o.push(`@font-face { font-family: ${Zs(td(r.family))}; src: local("${p}"); ascent-override: ${Io(u.ascent)}; descent-override: ${Io(u.descent)}; line-gap-override: ${Io(u.lineGap)}; size-adjust: ${Io(u.sizeAdjust)}; }`)}n.vars[i.cssVar]=Ks([l,...d?[Zs(td(r.family))]:[],fy[i.category]].join(", "))}return n.css=Ks(o.join(`
2
- `)),n.preload=[...a.filter(s=>s.style==="normal"),...a.filter(s=>s.style!=="normal")].slice(0,dy),n}var ad=_y(be);function L0({siteFonts:e,children:t}){let n=Ty(()=>wc(e),[e]);return Js(ad.Provider,{value:n,children:t})}function On(){return Ey(ad)}var od="sf-site-fonts";function D0({usedKeys:e,preload:t=!0}){let n=On(),o=nd(n,e),a=Object.entries(o.vars),s=[o.css,a.length?`:root { ${a.map(([r,i])=>`${r}: ${i}`).join("; ")} }`:""].filter(Boolean).join(`
3
- `);return s?Sy(yy,{children:[(t?o.preload:[]).map(r=>Js("link",{rel:"preload",as:"font",type:"font/woff2",href:r.url,crossOrigin:""},r.id)),Js("style",{href:`${od}-${Ru(s)}`,precedence:od,dangerouslySetInnerHTML:{__html:s}})]}):null}import{jsx as Y,jsxs as yt,Fragment as fS}from"react/jsx-runtime";import{useCallback as Sd,useContext as mS,useId as Td,useRef as _d,useState as Ed}from"react";import{ThemeIcon as hS}from"efficient-easel/icons";import{Button as gS,useClickOutside as bS}from"efficient-shell/ui";import{SettingsField as yS}from"efficient-easel/panel";import{ScreenDocumentContext as SS}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as k,jsxs as et,Fragment as jy}from"react/jsx-runtime";import{parseHexColor as Vy}from"efficient-shell/format";import{Button as nr,IconButton as Yy,Tooltip as Xy}from"efficient-shell/ui";import{jsx as Qe,jsxs as Hy}from"react/jsx-runtime";import{AccentIcon as My}from"efficient-easel/icons";import{Button as Uy,Tooltip as $y}from"efficient-shell/ui";import{jsx as se,jsxs as er}from"react/jsx-runtime";import{useRef as xy}from"react";import{ColorPicker as vy,ColorPickerPanel as wy,ColorSwatch as Cy,HexInput as Oy,Popover as Py,Tooltip as ky,colorFill as Ay,colorSwatchClasses as Iy,useShellStrings as Ry}from"efficient-shell/ui";import{SettingsDefaultReset as Ny,SettingsField as Ly}from"efficient-easel/panel";import{typedHex as Qs}from"efficient-easel/pick";var sd="Not set";function rd({value:e,onChange:t,label:n,id:o,caption:a,inherited:s,ariaLabel:r,choices:i}){return se(Fy,{value:e,onChange:t,label:c(r??n),id:o,caption:a,inherited:s,choices:i})}function Dy(){let{theme:e}=B();return $u(e)}function Fy({value:e,onChange:t,label:n,id:o,caption:a,inherited:s,choices:r}){let i=Dy(),l=e?null:Qs(s??""),u=a!==void 0&&(!e||Qs(a)!==Qs(e))?a:null,d=p=>{p!==e&&t(p)};return er("div",{className:"sf-colour",children:[r?se(By,{id:o,value:e,onChange:t,label:n,presets:i,follows:l,choices:r}):se(vy,{id:o,value:e,onChange:d,label:n,presets:i,fallback:l??void 0,size:"md",align:"start"}),u!==null?se("span",{className:"sf-colour-caption",children:u}):se("span",{className:"sf-colour-hexwrap",children:se(Oy,{value:e||l||"",onChange:d,label:c("{label} hex code",{label:n}),placeholder:e||l?void 0:c(sd),className:l?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function By({value:e,onChange:t,label:n,id:o,presets:a,follows:s,choices:r}){let i=Ry().color,l=e||s||"",u=r.findIndex(f=>f.selected),d=u>=0,p=xy(u);return d&&(p.current=u),se(Py,{id:o,trigger:se("span",{"aria-hidden":"true",className:"absolute inset-0",style:Ay(l)}),triggerLabel:i.swatch(n,l.toUpperCase()||i.none),triggerClassName:Iy({size:"md"}),"aria-label":i.panel(n),align:"start",children:er("div",{className:"sf-colour-window",children:[se("div",{role:"group","aria-label":n,className:"sf-colour-choices",children:r.map(f=>se(ky,{content:f.label,children:se(Cy,{color:f.color,"aria-label":f.label,selected:f.selected,onClick:()=>{f.selected||f.onPick()}})},f.label))}),se(wy,{value:d?"":e,onChange:t,label:n,presets:a,fallback:(d?l:s)??void 0},p.current)]})})}function Se({label:e,icon:t,changed:n,hint:o,onReset:a,resetTo:s,children:r,...i}){return se(Ly,{label:e,icon:t,htmlFor:i.id,changed:n,hint:o,action:a?se(Ny,{words:P()?.panel,label:e,changed:!!n,detail:s,onReset:a}):void 0,children:r?er("div",{className:"es-width-stack",children:[rd({...i,label:e}),r]}):rd({...i,label:e})})}function Pn({label:e,icon:t,value:n,inherited:o,resetTo:a,onChange:s,onReset:r,hint:i,choices:l,children:u}){let d=!!n;return se(Se,{label:e,icon:t,value:n,inherited:d?void 0:o,onChange:s,changed:d,onReset:r,resetTo:a,hint:i,choices:l,children:u})}function tr(e){return ce(e).background}function Gy(e){let t=Xe(e.accent,tr(e));return t===null?null:{ratio:t,grade:jt(t)}}function zy(e){let t=tr(e),n=Xe(e.accent,t);return n===null?[]:Qc(e.accent).filter(o=>{let a=Xe(o,t);return a!==null&&a>n&&jt(a)==="good"})}var Wy={good:"Easy to read","large-only":Kt["large-only"],hard:Kt.hard};function id({value:e,onChange:t}){let n=Gy(e),o=n?.grade,a=n&&n.grade!=="good"?zy(e):[];return Qe(Se,{label:c("Main color"),icon:Qe(My,{}),hint:n?c(Wy[n.grade]):void 0,value:e.accent,onChange:s=>t({...e,accent:s}),children:a.length>0?Qe("div",{className:"w-full min-w-0",children:Hy("div",{className:"sf-readability",children:[Qe("p",{className:"sf-readability-advice",children:Ky(o,!0)}),Qe("div",{className:"sf-readability-suggestions",children:a.map(s=>{let r=Xe(s,tr(e));return Qe($y,{content:c("Use {colour}",{colour:s.toUpperCase()}),children:Qe(Uy,{variant:"secondary",className:"sf-readability-suggestion",leftIcon:Qe("span",{className:"sf-readability-chip",style:{background:s},"aria-hidden":!0}),onClick:()=>t({...e,accent:s}),children:r?`${r.toFixed(1)}:1`:s.toUpperCase()})},s)})})]})}):null})}function Ky(e,t){return e?e==="good"?c("This color reads clearly on your pages."):t?c("This color is hard to read on this theme's page. The buttons below are the same hue, darkened."):c("This color is hard to read on your page background. Pick one further from it \u2014 lighter if your pages are dark, deeper if they are light."):c("Pick a color to see how it reads.")}import{ButtonIcon as qy,ChevronDownIcon as cd,ChevronUpIcon as Zy,GroundIcon as Jy,LayoutIcon as Qy,SquareIcon as eS,TextSmallIcon as tS,TypeIcon as ld}from"efficient-easel/icons";var kn=e=>c("Theme {n}",{n:e+1});function ud({colors:e}){let t=ce(e),n=Hs(e)??t.accent;return et("span",{className:"sf-theme-page",style:{background:t.background,color:t.text},"aria-hidden":!0,children:[k("span",{className:"sf-theme-eyebrow",style:{color:t.muted},children:c("label")}),et("span",{className:"sf-theme-headline",children:[c("Heading")," ",k("span",{style:{color:t.accent},children:c("main")})]}),k("span",{className:"sf-theme-body",children:c("body text")}),et("span",{className:"sf-theme-row",children:[k("span",{className:"sf-theme-btn",style:{background:n,color:Ms(e,t.accent)},children:c("button")}),k("span",{className:"sf-theme-mini",style:{background:t.surface,borderColor:t.line},children:c("card")})]})]})}var or={"Text color":k(ld,{}),"Label color":k(tS,{}),Background:k(Jy,{}),"Panels & cards":k(Qy,{}),Borders:k(eS,{}),"Button color":k(qy,{}),"Button text color":k(ld,{})};function nS({label:e,colorKey:t,value:n,onChange:o,idPrefix:a="sf-theme-ink"}){let s=`${a}-${t}`;return k(Se,{label:c(e),icon:or[e],id:s,value:n,onChange:r=>o(t,r)})}function oS({value:e,accent:t,onChange:n,idPrefix:o="sf-theme-ink"}){let a=`${o}-button`,s=e!==void 0&&Vy(e)===e.toLowerCase(),r=s?e:t;return k(Se,{label:c("Button color"),icon:or["Button color"],id:a,value:r,caption:s?r:c("Main"),onChange:n})}function aS({colors:e,accent:t,onChange:n,idPrefix:o="sf-theme-ink"}){let a=`${o}-button-ink`,s=eu(e),r=Ms(e,t),i=Hs(e)??t,l=jt(Xe(r,i)??0);return k(Se,{label:c("Button text color"),icon:or["Button text color"],hint:s&&l!=="good"?c("{grade} on the button",{grade:c(Kt[l])}):void 0,id:a,value:r,caption:s?r:c("Auto"),onChange:n})}var sS=[{colour:!0},{label:"Text color",key:"text"},{label:"Label color",key:"muted"},{button:!0},{buttonInk:!0},{moduleBreak:!0},{label:"Background",key:"background"},{label:"Panels & cards",key:"surface"},{label:"Borders",key:"line"}];function ar({colors:e,onChange:t,idPrefix:n}){let o=ce(e);return k(jy,{children:sS.map(a=>"colour"in a?k(id,{value:e,onChange:t},"colour"):"moduleBreak"in a?k("div",{className:"sf-theme-module-break","aria-hidden":"true"},"module-break"):"button"in a?k(oS,{value:e.button,accent:o.accent,onChange:s=>t({...e,button:s}),idPrefix:n},"button"):"buttonInk"in a?k(aS,{colors:e,accent:o.accent,onChange:s=>t({...e,buttonInk:s}),idPrefix:n},"buttonInk"):k(nS,{label:a.label,colorKey:a.key,value:o[a.key],onChange:(s,r)=>t({...e,[s]:r}),idPrefix:n},a.key))})}function No({index:e,colors:t,selected:n,role:o="radio",open:a,editable:s=!0,onPick:r,onEdit:i,onChangeColors:l}){let u=ce(t),d=kn(e),p=e<Bs.length&&!t.brandInk?Bs[e]:null,f=jt(Xe(u.text,u.background)??0),m=p?JSON.stringify(t)!==JSON.stringify(p):!1,b=a!==void 0;return et("div",{className:`sf-theme-card${n?" is-selected":""}`,children:[k("button",{type:"button",role:o,"aria-checked":o==="radio"?n:void 0,"aria-selected":o==="option"?n:void 0,"aria-label":d,className:"sf-theme-pick",onClick:r,children:k(ud,{colors:t})}),et("div",{className:"sf-theme-foot",children:[k("span",{className:"sf-theme-name",children:d}),f!=="good"&&k("span",{className:"sf-theme-warn",children:c(Kt[f])}),s&&i&&b&&k("span",{className:"sf-theme-edit",children:k(Xy,{content:a?c("Collapse"):c("Edit colors"),children:k(Yy,{size:"sm","aria-expanded":a,"aria-controls":`sf-theme-colours-${e}`,"aria-label":a?c("Collapse {name}",{name:d}):c("Edit colors for {name}",{name:d}),onClick:i,children:a?k(Zy,{size:14}):k(cd,{size:14})})})}),s&&i&&!b&&k(nr,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":c("Edit {name}",{name:d}),onClick:i,children:c("Edit")})]}),a&&et("div",{id:`sf-theme-colours-${e}`,className:"sf-theme-colours",children:[k(ar,{colors:t,onChange:y=>l?.(y)}),p&&k(nr,{variant:"link",size:"sm",className:"sf-theme-reset",disabled:!m,onClick:()=>l?.({...p}),children:m?c("Reset {name} to the preset",{name:d}):c("Not changed")})]})]})}function dd({colors:e,name:t,nameId:n,open:o,menuId:a,labelId:s,buttonRef:r,onClick:i,onKeyDown:l,onEdit:u}){return et("div",{className:"sf-secttheme-btn",children:[k("button",{ref:r,type:"button",className:"sf-theme-pick","aria-expanded":o,"aria-controls":a,"aria-labelledby":`${s} ${n}`,onClick:i,onKeyDown:l,children:e?k(ud,{colors:e}):k("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),et("div",{className:"sf-theme-foot",children:[k("span",{id:n,className:"sf-theme-name",children:t}),u&&k(nr,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":c("Edit {name}",{name:t}),onClick:u,children:c("Edit")}),k("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:i,children:k(cd,{size:12,className:"sf-multi-caret","aria-hidden":"true"})})]})]})}import{useCallback as cr,useEffect as gd,useRef as Do}from"react";import{currentEaselSession as cS}from"efficient-easel/screen/lib/session";import{backendOf as rS}from"efficient-easel/screen/lib/session";var xe=rS,dN=e=>e.blocks;import{useEaselSession as uS}from"efficient-easel/screen/lib/session-context";import{useSyncExternalStore as iS}from"react";var fd,sr=null,bt=null,Lo=0,rr=new Set;function ir(e){fd=e;for(let t of rr)t()}function mN(e){sr=e,Lo+=1,bt&&clearTimeout(bt),bt=null,ir(void 0)}function hN(e){Lo+=1,ir(e)}function md(e=250){sr&&(bt&&clearTimeout(bt),bt=setTimeout(()=>{bt=null;let t=sr;if(!t)return;let n=++Lo;t().then(o=>{n===Lo&&ir(o)}).catch(()=>{})},e))}function pd(){return fd}function lS(e){return rr.add(e),()=>{rr.delete(e)}}function gN(){return iS(lS,pd,pd)}var lr=new Set;function hd(e){return lr.add(e),()=>{lr.delete(e)}}async function yN(){let e=(await Promise.allSettled([...lr].map(async t=>t()))).find(t=>t.status==="rejected");if(e)throw e.reason}import{WebsiteBackendError as dS}from"efficient-easel/screen/lib/backend-error";function bd(e=cS()){return(t,n,o)=>{let a=xe(e).theme;return a?a.update(t,o?{siteId:o}:void 0):Promise.reject(new dS("invalid","This backend stores no site theme."))}}function yd(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function pS(e,t=bd()){let{themeFromDocument:n,token:o,siteId:a,patch:s}=e,r=yd({themeFromDocument:n,token:o});if(r)return r;if(Object.keys(s).length===0)return{status:"skipped",reason:"empty"};try{return await t(s,o,a??void 0),{status:"saved"}}catch(i){return{status:"failed",error:i}}}function Fo({themeFromDocument:e,tokenRef:t,siteId:n,onResult:o}){let a=Do(null),s=Do({}),r=uS(),i=Do(o);i.current=o;let l=Do(null),u=cr(f=>{if(f.status==="skipped"){let m=`skipped:${f.reason}`;if(l.current===m)return;l.current=m}else l.current=null;i.current?.(f)},[]),d=cr(async()=>{a.current&&(clearTimeout(a.current),a.current=null);let f=s.current;s.current={};let m=await pS({themeFromDocument:e,token:t?.current,siteId:n,patch:f},bd(r));return u(m),m.status==="saved"&&md(),m.status==="failed"&&(s.current={...f,...s.current}),m},[e,t,n,u,r]),p=cr((f,m=!1)=>{let b=yd({themeFromDocument:e,token:t?.current});if(b){u(b);return}s.current={...s.current,...f},a.current&&clearTimeout(a.current),m?d():a.current=setTimeout(()=>{d()},500)},[e,t,d,u]);return gd(()=>()=>{d()},[d]),gd(()=>hd(async()=>{if(!a.current&&Object.keys(s.current).length===0)return;let f=await d();if(f.status==="failed")throw f.error}),[d]),{persist:p,flush:d}}var _S="Follow the page",UN="Follow the slideshow",ES=e=>c("Editing {name} changes it everywhere.",{name:e});function TS({colors:e}){if(!e)return Y("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});let t=ce(e);return yt("span",{className:"sf-secttheme-chip","aria-hidden":"true",children:[Y("i",{style:{background:t.background}}),Y("i",{className:"sf-secttheme-chip-accent",style:{background:t.accent}})]})}function xS({themes:e,value:t,onPick:n,onEdit:o,menuId:a,followLabel:s}){return yt("div",{className:"sf-multi-menu sf-secttheme-menu",id:a,role:"listbox",children:[s!==void 0&&yt(fS,{children:[yt("button",{type:"button",role:"option","aria-selected":t===null,className:`sf-secttheme-item${t===null?" is-active":""}`,onClick:()=>n(fu),children:[Y(TS,{}),Y("span",{className:"sf-secttheme-name",children:c(s)})]}),Y("div",{className:"sf-secttheme-sep",role:"presentation"})]}),t!==null&&e[t]&&Y("p",{className:"sf-secttheme-oncard",role:"presentation",children:c("{name} is on this section",{name:kn(t)})}),e.map((r,i)=>i===t?null:Y(No,{role:"option",index:i,colors:r,selected:!1,onPick:()=>n(i),onEdit:o?()=>o(i):void 0},i))]})}function vS({index:e,colors:t,onChange:n,onDone:o}){let a=kn(e),s=Td();return yt("div",{className:"sf-secttheme-sheet",children:[yt("div",{className:"sf-secttheme-sheet-head",children:[Y("span",{children:a}),Y(gS,{variant:"secondary",className:"sf-secttheme-done",onClick:o,children:c("Done")})]}),Y("div",{className:"sf-secttheme-rows",children:Y(ar,{colors:t,onChange:n,idPrefix:s})}),Y("p",{className:"sf-secttheme-warn",children:ES(a)})]})}function xd({value:e,onChange:t,followLabel:n,hint:o,canEdit:a=!0}){let{theme:s,setTheme:r}=B(),i=ke(s),l=mS(SS),u=l?.tokenRef,d=l?.siteId??null,p=!l?.capabilities?.hasSiteTheme,{persist:f,flush:m}=Fo({themeFromDocument:p,tokenRef:u,siteId:d}),b=ke(i),y=b.themes,E=gt(e),S=E!==null?y[E]:void 0,T=S??(y.length?Wt(b):void 0),[x,v]=Ed(!1),[w,R]=Ed(null),C=_d(null),D=_d(null),z=Td(),Te=Sd(()=>{v(!1),R(null)},[]),uo=Sd(()=>{!x&&w===null||(m(),Te())},[x,w,Te,m]);bS(C,uo);let po=X=>{t(X),Te()},fo=X=>{if(w===null)return;let Vb=y.map((Yb,Xb)=>Xb===w?X:Yb),xs={...b,themes:Vb};r(xs),f({selected_preset:xs.selected,theme_presets:xs.themes})};return yt("div",{className:"sf-secttheme",ref:C,children:[Y(yS,{label:c("Theme"),icon:Y(hS,{}),labelId:`${z}-label`,hint:o,children:Y(dd,{colors:T,onEdit:a&&E!==null?()=>{R(E),v(!1)}:void 0,name:S?kn(E):c(n??_S),nameId:`${z}-value`,labelId:`${z}-label`,open:x,menuId:z,buttonRef:D,onClick:()=>{R(null),v(X=>!X)},onKeyDown:X=>{X.key==="Escape"&&(x||w!==null)&&(X.preventDefault(),Te())}})}),x&&w===null&&Y("div",{onKeyDown:X=>{X.key==="Escape"&&(X.preventDefault(),Te(),D.current?.focus())},children:Y(xS,{themes:y,value:E,onPick:po,onEdit:a?X=>{R(X),v(!1)}:void 0,menuId:z,followLabel:n})}),a&&w!==null&&y[w]&&Y(vS,{index:w,colors:y[w],onChange:fo,onDone:()=>{m(),Te(),D.current?.focus()}})]})}import{defaultTextStyles as np,textStyleCaseCss as X_}from"efficient-easel/text-styles/model";import{resolveViewValue as op}from"efficient-easel/draw";import{VIEW_DESKTOP_MIN as vd,VIEW_TABLET_MIN as wd}from"efficient-easel/draw";var Bo=.02,Cd=`(min-width: ${En}px) and (max-width: ${vd-Bo}px)`,Od=`(max-width: ${En-Bo}px)`,Ho=`(min-width: ${wd}px) and (max-width: ${vd-Bo}px)`,Mo=`(max-width: ${wd-Bo}px)`;import{textStyleCaseCss as KS,textStyleCaseOfCss as jS,viewKeyAt as qd}from"efficient-easel/draw";function Uo(e,t){return t?`${e}[${t.index}].${t.rowKey}`:e}function wS(e){let t=/^([A-Za-z0-9_$]+)\[(\d+)\]\.([A-Za-z0-9_$]+)$/u.exec(e);return t?{key:t[1],row:{index:Number(t[2]),rowKey:t[3]}}:{key:e,row:null}}import{decodePartId as fr,encodePartId as g1}from"efficient-easel/draw";import{LINK_FIELD_MARKER as Hd,SCAFFOLD_FIELD_MARKER as Fd,TEXT_FIELD_MARKER as Wo}from"efficient-easel/draw";import{readHidable as Md}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as HS}from"efficient-easel/draw";var Pd={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},kd={Events:["posts"],SubscribeBlogs:["posts"]};var CS=["anchor"],OS=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function An(e){return CS.includes(e)||OS.test(e)}var PS={Gallery:{source:{verb:"snapshot",keep:[]}},ProductHero:{source:{verb:"snapshot",keep:[]}},SpecTable:{source:{verb:"snapshot",keep:[]},wheel:{verb:"reference"},finish:{verb:"reference"},size:{verb:"reference"}},CollectionCard:{collection:{verb:"snapshot",keep:[]}},FooterMenu:{menu:{verb:"snapshot",keep:[]}},MenuBlock:{menu:{verb:"snapshot",keep:[]}},ProductGrid:{design_codes:{verb:"reference"}},ProductRef:{code:{verb:"reference"},finish:{verb:"reference"}},FitmentTable:{wheel:{verb:"reference"}},GalleryItem:{fromProduct:{verb:"reference"}},Footprint:{"offices[].group":{verb:"groupKey"},"offices[].lat":{verb:"pii"},"offices[].lng":{verb:"pii"},"offices[].geocode":{verb:"pii"}}};PS.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var qN=Object.fromEntries(Object.entries(Pd).map(([e,t])=>[e,Object.keys(t)])),ZN=Object.fromEntries(Object.entries(kd).map(([e,t])=>[e,[...t]]));var ur="__ownBox";function Ad(e){return!!e&&typeof e=="object"&&e[ur]===!0}var dr="sfPanelOnly";function $o(e){return!!e&&typeof e=="object"&&e[dr]===!0}import{TEXT_FIELD_MARKER as LS}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as Id}from"efficient-easel/draw";import{readHidable as Rd}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as kS}from"efficient-easel/draw";var AS=kS,IS=["text","textarea"],RS=["textarea","plainTextarea"];function NS(e){return!e||typeof e!="object"?null:e[Id]?.control??null}function Nd(e){let t=NS(e);return t&&AS.includes(t)?t:null}function a1(e){return RS.includes(e)}function s1(e){return!e||typeof e!="object"?void 0:e[Id]?.placeholder}function Go(e){return Rd(e).text}function pr(e,t,n){return IS.includes(e)?{text:n,hidden:Rd(t).hidden}:n}function r1(e,t,n,o){return Go(e[t])===o?null:{...e,[t]:pr(n,e[t],o)}}function Ld(e){if(!(!e||typeof e!="object"))return e[LS]}function DS(e){if(!e||typeof e!="object")return null;let t=e.arrayFields;return t&&typeof t=="object"?t:null}function Dd(e,t){if(!Array.isArray(t))return[];let n=Ld(e),o=[];if(n?.control==="textList"){let s=n.itemKey??"text";return t.forEach((r,i)=>{let l=W(r?.[s]);l&&o.push({row:{index:i,rowKey:s},text:l})}),o}let a=DS(e);return a?(t.forEach((s,r)=>{for(let[i,l]of Object.entries(a)){if(!Nd(l))continue;let u=Go(s?.[i])||Ld(l)?.placeholder||"";u&&o.push({row:{index:r,rowKey:i},text:u})}}),o):[]}function FS(e,t){if(Array.isArray(e))return e[t.index]?.[t.rowKey]}function BS(e,t,n,o){let a=e[t];return!Array.isArray(a)||n.index<0||n.index>=a.length?null:{...e,[t]:a.map((s,r)=>r===n.index?{...s,[n.rowKey]:o}:s)}}function p1(e,t,n,o,a){let s=FS(e[t],n);return Go(s)===a?null:BS(e,t,n,pr(o,s,a))}function f1(e,t){return t?`${e} \xB7 row ${t.index+1}`:e}var C1="data-sf-part",O1="data-sf-region-part",P1="data-sf-part-row";function k1(e,t){return`${e}[${t}]`}var A1="data-sf-part-kind",MS="data-sf-part-style-owner",US="data-sf-part-style-kind";function I1(e){for(let t=e;t;t=t.parentElement){let n=t.getAttribute(MS),o=t.getAttribute(US);if(n&&o)return{owner:n,kind:o};if(t.getAttribute("data-easel-block"))return null}return null}var Bd=2;function Zt(e){return vs(e).replace(/\s+/gu,"")}function zo(e,t,n){let o=e[Wo];if(o){if(o.control==="textList"){let s=o.itemKey??"text";if(!Array.isArray(t))return;for(let r of t){let i=r?.[s];typeof i=="string"&&n.push(i)}return}let{text:a}=Md(t);a?n.push(a):o.placeholder&&n.push(o.placeholder);return}if(!e[Hd]){if(e.type==="text"||e.type==="textarea"){let a=W(t);a&&n.push(a);return}if(e.arrayFields&&Array.isArray(t)){for(let a of t)for(let[s,r]of Object.entries(e.arrayFields))zo(r,a?.[s],n);return}if(e.objectFields&&t&&typeof t=="object")for(let[a,s]of Object.entries(e.objectFields))zo(s,t[a],n)}}function $S(e){if(!e||typeof e!="object")return!1;let t=e;return t[Hd]?!1:!!t[Wo]||t.type==="text"||t.type==="textarea"}function Ud(e,t){let n=e[Wo];return n?.label?n.label:typeof e.label=="string"?e.label:t}function GS(e){let t=e.indexOf(" (");return(t>0?e.slice(0,t):e).trim()}function R1(e,t,n){if(!e)return[];let o=[];for(let[a,s]of Object.entries(e)){if(!s||typeof s!="object"||An(a))continue;let r=s,i=[];zo(r,t?.[a],i),!i.length&&r[Fd]!==void 0&&zo(r,r[Fd],i);let l=Ud(r,a);if(n?.(a)&&$S(r)){i.length&&o.push({key:a,label:l,texts:[],keyed:!0});continue}let u=new Set;for(let{row:f,text:m}of Dd(r,t?.[a])){let b=Zt(m);b.length<Bd||(u.add(b),o.push({key:a,label:l,texts:[b],row:f}))}let d=new Set(u),p=[];for(let f of i){let m=Zt(f);m.length<Bd||d.has(m)||(d.add(m),p.push(m))}p.length&&o.push({key:a,label:l,texts:p})}return o}function zS(e){return!e.offPage&&!e.hidden&&e.panelOnly!==!0}var WS=HS;function $d(e,t){if(!t||typeof t!="object"||An(e)||Ad(t))return null;let n=t[Wo];return!n||!WS.includes(n.control)?null:n}function N1(e,t){let n=$d(e,t);return n!==null&&n.identifier!==!0}function L1(e,t){if(!e)return[];let n=[];for(let[o,a]of Object.entries(e)){let s=$d(o,a);if(!s)continue;let{text:r,hidden:i}=Md(t?.[o]);if(zS({offPage:s.offPage===!0,hidden:!!i,panelOnly:$o(a)}))continue;let l=r||s.placeholder||"",u=vs(l).replace(/\s+/gu," ").trim();n.push({key:o,label:GS(Ud(a,o)),preview:u,offPage:s.offPage===!0,identifier:s.identifier===!0,hidden:!!i})}return n}function Jt(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function Ko(e,t){return Jt(e?.[t])??{}}function Gd(e,t,n){let o=Ko(e,t);return Jt(j(o,n))??{}}function zd(e,t,n,o){let{[n]:a,...s}=Ko(e,t),r=o?{...s,[n]:o}:s,{[t]:i,...l}=e;return Object.keys(r).length?{...l,[t]:r}:l}import{isLengthUnit as Sr}from"efficient-easel/screen/lib/content/length-units";var _r="_partStyles",VS="data-sf-part-styled",jo="data-sf-text-style",YS=/^(heading|body)-[1-7]$/;function Tt(e){return typeof e=="string"&&YS.test(e)}var Vo={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function XS(e){if(!e)return null;for(let[t,n]of Object.entries(Vo))if(n===e)return t;return null}function X1(e){if(Tt(e.textStyle))return e.textStyle;let t=dt(e.role);return t?Vo[t]:void 0}var qS=[400,500,600,700],Rn=["left","center","right","justify"],mr=5,hr=1e3,ZS=-5,JS=10,QS=0,e_=64,t_=2,Wd={size:{min:mr,max:hr,step:1},sizeTablet:{min:mr,max:hr,step:1},sizePhone:{min:mr,max:hr,step:1},padding:{min:QS,max:e_,step:t_}},n_=.05,o_=.01,a_=["line","letter"],s_=.5,r_=2.5,i_=-1,l_=1,c_=0,u_=400,d_=[...new Set(Object.values(go))];function q1(e){return[`${e} { transition: translate var(--page-motion-hover-duration) var(--page-ease-media) var(--page-motion-hover-delay) }`,`${e}:hover, ${e}:active { translate: 0 calc(-1 * var(--page-hover-lift)) }`]}function Z1(e){return Ko(e,_r)}function p_(e,t){return Gd(e,_r,t)}function Zd(e,t,n){return zd(e,_r,t,f_(n).length?n:null)}function f_(e){return Object.entries(e).filter(([,t])=>t!==void 0)}function m_(e){return a_.includes(e)}var In=(e,t,n)=>Math.min(n,Math.max(t,e)),h_=["sizeUnit","sizeUnitTablet","sizeUnitPhone"];function gr(e){let t=qd("sizeUnit",e),n=h_.find(o=>o===t);if(!n)throw new Error(`a part stores no unit key ${t}`);return n}var St={size:gr("desktop"),sizeTablet:gr("tablet"),sizePhone:gr("mobile"),paragraphSpacing:"paragraphSpacingUnit",padding:"paddingUnit"},Jd=Object.values(St);function Re(e,t){return F(e[St[t]])}function g_(e,t,n={}){if(Jd.includes(e))return Sr(t)&&t!=="px"?t:null;if(ge(St,e)&&Re(n,e)!=="px"){let o=Et(Number(t),2);return!Number.isFinite(o)||o<0||o===0&&e!=="padding"?null:o}if(m_(e)){let o=Math.round(Number(t));return!Number.isFinite(o)||o===0?null:In(o,ZS,JS)}if(e==="lineHeight"){let o=Number(t);return Number.isFinite(o)?Et(In(o,s_,r_),3):null}if(e==="letterSpacing"){let o=Number(t);return Number.isFinite(o)?Et(In(o,i_,l_),4):null}if(e==="paragraphSpacing"){let o=Math.round(Number(t));return!Number.isFinite(o)||o<=0?null:In(o,c_,u_)}if(ge(Wd,e)){let{min:o,max:a}=Wd[e],s=Math.round(Number(t));return Number.isFinite(s)?In(s,o,a):null}return e==="italic"?typeof t=="boolean"?t:null:e==="role"||e==="fontRole"?dt(t)?t:null:e==="sizeToken"?Er(t)?t:null:e==="textStyle"?Tt(t)?t:null:e==="alignPhone"||e==="alignTablet"?Rn.includes(t)?t:null:t}var b_=["weight","size","sizeTablet","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function Qt(e){let t=null,n=o=>{t??={...e},delete t[o]};for(let o of b_){let a=e[o];a!==void 0&&!(typeof a=="number"&&Number.isFinite(a))&&n(o)}e.align!==void 0&&!Rn.includes(e.align)&&n("align"),e.alignTablet!==void 0&&!Rn.includes(e.alignTablet)&&n("alignTablet"),e.alignPhone!==void 0&&!Rn.includes(e.alignPhone)&&n("alignPhone"),e.textStyle!==void 0&&!Tt(e.textStyle)&&n("textStyle"),e.sizeToken!==void 0&&!Er(e.sizeToken)&&n("sizeToken"),e.fontRole!==void 0&&!dt(e.fontRole)&&n("fontRole");for(let o of Jd)e[o]!==void 0&&!Sr(e[o])&&n(o);return t??e}function Er(e){if(!e||typeof e!="object")return!1;let{step:t,px:n,stepPhone:o,pxPhone:a,fluid:s}=e,r=l=>typeof l=="number"&&Number.isFinite(l)&&l>0,i=l=>typeof l=="string"&&d_.includes(l);return i(t)&&r(n)&&(o===void 0||i(o))&&(a===void 0||r(a))&&(s===void 0||y_(s,n))}function y_(e,t){if(!e||typeof e!="object"||Array.isArray(e))return!1;let{minPx:n,vw:o,...a}=e;return Object.keys(a).length===0&&typeof n=="number"&&Number.isFinite(n)&&n>0&&n<t&&typeof o=="number"&&Number.isFinite(o)&&o>0&&o<=100}function Tr(e){return e?.pxPhone&&Er(e)?{step:e.stepPhone??e.step,px:e.pxPhone}:null}function Qd({step:e,px:t,fluid:n}){let o=n?`clamp(${n.minPx}px, ${n.vw}vw, ${t}px)`:`${t}px`,a=`var(--size-${e}, ${o})`;return e.startsWith("heading")?`min(${a}, var(--sf-heading-max,9999px))`:a}var S_=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function __(e){let t=[];for(let[n,o]of S_)n===e?t.push(o):o===e&&t.push(n);return t}function J1(e,t,n,o){let a={...p_(e,t)},s=o==null?null:g_(n,o,a);if(s===null)delete a[n];else{a[n]=s;for(let r of __(n))delete a[r]}return Zd(e,t,a)}function Q1(e,t){return Zd(e,t,{})}function E_(e){return jS(e)??"none"}function T_(e){return KS(e)??""}var Kd={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function x_(e,t){return dt(e.role)||(t?.blockDrawsStyle?null:XS(e.textStyle))}var v_="--sf-part-size-cap";function xr(e,t){return e&&t?.sizeCap?`min(${e}, var(${v_}, ${e}))`:e}function eL(e,t){return e?.[t]===!0}function tL(e,t){return e==="Text"&&t==="text"}var w_={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function C_(e){let t=go[e],n=j(w_,t);return n?`var(--size-${t}, ${n})`:`var(--size-${t})`}function vr(e){let t={};return typeof e.lineHeight=="number"?t.lineHeight=e.lineHeight:e.line&&(t.lineHeight=Et(O_+e.line*n_,3)),typeof e.letterSpacing=="number"?t.letterSpacingEm=e.letterSpacing:e.letter&&(t.letterSpacingEm=Et(e.letter*o_,4)),t}var O_=1,_t="--sf-part-para";function P_(e,t){e=Qt(e);let n={};if(typeof e.sizePhone=="number"&&e.sizePhone>0)n.fontSize=M(e.sizePhone,Re(e,"sizePhone"));else{let a=Tr(e.sizeToken);if(a)n.fontSize=Qd(a);else{let s=Xo(e);s!==void 0&&(n.fontSize=M(s,Re(e,"sizeTablet")))}}n.fontSize&&(n.fontSize=xr(n.fontSize,t));let o=e.alignPhone??Yo(e);return o&&(n.textAlign=o),n}function Yo(e){return e.alignTablet&&e.alignTablet!==e.align?e.alignTablet:void 0}function Xo(e){let t=e.sizeTablet!==void 0&&Re(e,"sizeTablet")!==Re(e,"size")?e.sizeTablet:He("textSize",e.size,e.sizeTablet,void 0).tablet;return t&&t>0?t:void 0}function k_(e,t){let n=Qt(e),o={},a=Xo(n);a!==void 0&&(o.fontSize=xr(M(a,Re(n,"sizeTablet")),t));let s=Yo(n);return s&&(o.textAlign=s),o}function nL(e,t){if(t==="desktop")return;let n=Qt(e);return(t==="mobile"?Yo(n):void 0)??n.align}function A_(e,t){if(t==="desktop")return e;let n=Qt(e),o=Xo(n),a=Yo(n);if(t==="tablet"){let i=e;return o!==void 0&&(i={...i,size:o,sizeUnit:n[St.sizeTablet]}),a&&(i={...i,align:a}),i}let s=e;if(typeof n.sizePhone=="number"&&n.sizePhone>0)s={...s,size:n.sizePhone,sizeUnit:n[St.sizePhone]};else{let i=Tr(n.sizeToken);i?s={...s,size:void 0,sizeToken:i}:o!==void 0&&(s={...s,size:o,sizeUnit:n[St.sizeTablet]})}let r=n.alignPhone??a;return r&&(s={...s,align:r}),s}function wr(e,t,n){return Cr(A_(e,t),qo,n)}function I_(e){return qd("size",e)}function oL(e,t){if(t==="desktop")return null;let n=Qt(e);if(t==="mobile"){if(Tr(n.sizeToken))return null;let o=Xo(n);if(o!==void 0)return{px:o,view:"tablet"}}return typeof n.size=="number"&&n.size>0?{px:n.size,view:"desktop"}:null}function ep(e,t){let n=I_(t);if(!ge(e,n))return e;let o={...e};return delete o[n],o}function aL(e,t,n){let o=wr(ep(e,t),t,n);return{fontFamily:o.fontFamily,fontSize:o.fontSize}}function Cr(e,t,n){e=Qt(e);let o=x_(e,n),a=vr(e),s=xr(e.size?M(e.size,Re(e,"size")):e.sizeToken?Qd(e.sizeToken):o?C_(o):"",n);return{fontFamily:e.font?D_(e.font,n?.fonts):e.fontRole?`var(${Kd[e.fontRole]})`:o?`var(${Kd[o]})`:"",fontWeight:e.weight?String(e.weight):"",fontSize:s,minWidth:s?"0":"",overflowWrap:s?"break-word":"",lineHeight:a.lineHeight!==void 0?String(a.lineHeight):"",letterSpacing:a.letterSpacingEm!==void 0?`${a.letterSpacingEm}em`:"",[_t]:e.paragraphSpacing?M(e.paragraphSpacing,Re(e,"paragraphSpacing")):"",textTransform:T_(e.case),textAlign:e.align??"",paddingTop:jd(e.padding,Re(e,"padding")),paddingBottom:jd(e.padding,Re(e,"padding")),color:R_(e.color),fontStyle:e.italic===!0?"italic":e.italic===!1?"normal":""}}var R_=e=>Po(e),jd=(e,t)=>e===void 0?"":M(e,t),Et=(e,t)=>Number(e.toFixed(t));function sL(e,t){let n=Number.parseFloat(e.fontSize)||16,o=Number.parseFloat(e.lineHeight),a=Number.parseFloat(e.letterSpacing),s=Number.parseFloat(e.paddingTop);return{fontKey:t,sizePx:n,weight:N_(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(o)?Et(o/n,3):1.2,letterEm:Number.isFinite(a)?Et(a/n,4):0,align:L_(e.textAlign),case:E_(e.textTransform),paddingPx:Number.isFinite(s)?Math.round(s):0}}function N_(e){return Number.isFinite(e)?qS.reduce((t,n)=>Math.abs(n-e)<Math.abs(t-e)?n:t):400}function L_(e){for(let t of Rn)if(t===e)return t;return e==="end"?"right":"left"}function rL(e,t,n=be){let o=Vd(e);if(!o)return"";for(let a of n.options)if(Vd(t(a.cssVar))===o)return a.key;return""}var Vd=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function D_(e,t=be){let n=Oc(e,t);return n?`var(${n.cssVar})`:""}function iL(e,t,n,o){return!t||fr(t)?.nodeId!==e?null:n.find(a=>o(a.getAttribute("class")))??n[0]??null}function F_(e,t){return Jt(j(e,t))??{}}function lL(e,t,n=()=>qo,o=u=>u,a=M_,s="desktop",r=()=>!1,i=()=>!1,l=be){let u=0;for(let{element:d,partId:p}of e){let f=fr(p)?.propKey;if(!f)continue;let m=F_(t,o(f)),b=wr(m,s,{blockDrawsStyle:r(f),sizeCap:i(f),fonts:l});Tt(m.textStyle)?d.setAttribute?.(jo,m.textStyle):d.removeAttribute?.(jo);let y=br.some(S=>d.style[S]),E=!1;for(let[S,T]of Object.entries(b))G_(d,S,T),T&&(E=!0);if(y||br.some(S=>b[S]))for(let S of B_(d,a))for(let T of br)S.style[T]=b[T]??"";E&&(u+=1)}return u}function B_(e,t){let n=Zt(e.textContent??""),o=[],a=e;for(let s=0;s<H_&&t(a);s+=1){let r=a.parentElement;if(!r||Zt(r.textContent??"")!==n)break;o.push(r),a=r}return o}var H_=8;function M_(e){let t=e;return typeof window>"u"||!t?.ownerDocument?!1:window.getComputedStyle(t).display==="inline"}var qo={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function U_(e){if(!e||typeof e!="object")return null;let t={};Tt(e.textStyle)&&(t.textStyle=e.textStyle),typeof e.size=="number"&&e.size>0&&(t.size=e.size),typeof e.sizeTablet=="number"&&e.sizeTablet>0&&(t.sizeTablet=e.sizeTablet),typeof e.sizePhone=="number"&&e.sizePhone>0&&(t.sizePhone=e.sizePhone);for(let n of["size","sizeTablet","sizePhone"]){let o=St[n];t[n]!==void 0&&Sr(e[o])&&(t[o]=e[o])}return Object.keys(t).length?t:null}function $_(e,t,n){let o=U_(e);if(!o)return{};let a=wr(o,t,{...n?.sizeCap?{sizeCap:!0}:{},...n?.fonts?{fonts:n.fonts}:{}});return{...a.fontFamily?{fontFamily:a.fontFamily}:{},...a.fontSize?{fontSize:a.fontSize}:{}}}function cL(e){return Tt(e?.textStyle)||!!e?.role||typeof e?.size=="number"&&e.size>0}function uL(e,t,n,o){if(!e||typeof e!="object")return{};let a=Gc(e.role,t,go)??{},s=t.sized?$_(ep(e,n),n,o?{fonts:o}:void 0):{};return{...a,...s}}function dL(e,t,n){n.fontFamily&&e.fontFamily===n.fontFamily&&(e.fontFamily=t.fontFamily),n.fontSize&&e.fontSize===n.fontSize&&(e.fontSize=t.fontSize)}function G_(e,t,n){if(!t.startsWith("--")){e.style[t]=n;return}let o=e.style;typeof o.setProperty=="function"?n?o.setProperty(t,n):o.removeProperty?.(t):o[t]=n;let a=e;t===_t&&(n?a.setAttribute?.(Yd,""):a.removeAttribute?.(Yd))}var Yd="data-sf-part-para",z_=Object.keys(Cr({},qo)),yr=new Set(["color","overflowWrap",_t,"fontStyle"]),br=z_.filter(e=>!yr.has(e));function pL(e,t,n,o=u=>u,a=()=>!1,s=()=>null,r=[],i=()=>!1,l=be){let u=new Map;for(let m of e){let b=Uo(m.key,m.row);for(let y of m.texts){let E=u.get(y);E?(E.keys.add(m.key),E.partKeys.add(b)):u.set(y,{keys:new Set([m.key]),partKeys:new Set([b])})}}let d=new Map;for(let m of new Set([...Object.keys(t),...r])){if(!W_(m))continue;let b=Xd(n,m,Jt(t[m])??{},{blockDrawsStyle:!1,sizeCap:i(m),fonts:l},s(m));b&&d.set(m,b)}let p=m=>{let b=o(m),y=s(b);if(!ge(t,b)&&!y)return null;let E=Jt(t[b])??{};return Xd(n,m,E,{blockDrawsStyle:a(m),sizeCap:i(m),fonts:l},y)},f=new Map;for(let[m,{keys:b,partKeys:y}]of u){let E=y.size===1?[...y][0]:b.size===1?[...b][0]:null;if(!E)continue;let S=p(E);S&&f.set(m,S)}for(let m of e){if(!m.keyed)continue;let b=p(Uo(m.key,m.row));b&&d.set(m.key,b)}return f.size||d.size?{rules:f,kindRules:d,drawn:new Set(u.keys())}:null}function Xd(e,t,n,o,a){let s=Cr(n,qo,o),r=k_(n,o),i=P_(n,o),l=Tt(n.textStyle)?n.textStyle:void 0;return!Object.values(s).some(Boolean)&&!Object.keys(r).length&&!Object.keys(i).length&&!l&&!a?null:{stamp:K_(e,t),declarations:s,...Object.keys(r).length?{tablet:r}:{},...Object.keys(i).length?{phone:i}:{},...l?{textStyle:l}:{},...a?{motion:a}:{}}}function W_(e){return e.startsWith("@")}function fL(e,t){return e?.kindRules.get(t)??null}function K_(e,t){let n=o=>o.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(e)}~${n(t)}`}function j_(e){return e?{tablet:Cd,phone:Od}:{tablet:Ho,phone:Mo}}function mL(e,{inBox:t=!1}={}){let{tablet:n,phone:o}=j_(t),a=[],s=new Set,r=i=>{let{stamp:l,declarations:u}=i;if(s.has(l))return;s.add(l);let d=Object.entries(u).filter(([,S])=>S!==""),p=S=>S.map(([T,x])=>`${V_(T)}: ${x}`).join("; "),f=`[${VS}="${l}"]`,m=d.filter(([S])=>!yr.has(S)),b=d.filter(([S])=>yr.has(S));m.length&&a.push(`${f}, *:has(> ${f}) { ${p(m)} }`),b.length&&a.push(`${f} { ${p(b)} }`),u[_t]&&(a.push(`*:has(> ${f}) { ${_t}: ${u[_t]} }`),a.push(...Zo(f,`*:has(> ${f})`)));let y=Object.entries(i.tablet??{}).filter(([,S])=>S!=="");y.length&&a.push(`@media ${n} { ${f}, *:has(> ${f}) { ${p(y)} } }`);let E=Object.entries(i.phone??{}).filter(([,S])=>S!=="");E.length&&a.push(`@media ${o} { ${f}, *:has(> ${f}) { ${p(E)} } }`)};for(let i of e.rules.values())r(i);for(let i of e.kindRules.values())r(i);return a.join(`
4
- `)}function Zo(e,t){let n=`var(${_t})`,o=":is([data-sf-bullet], [data-sf-number])";return[`${e} br:not(br + br) { display: block; content: ""; margin-top: ${n} }`,`${e} ${o}:not(:first-child) { margin-top: ${n} }`,`${e} ${o}:not(:last-child) { margin-bottom: ${n} }`,`:is(${t}) + :is(${t}) { margin-top: ${n} }`]}var V_=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);function hL(e,t){if(!e)return null;let n=Zt(t),o=e.rules.get(n);if(o)return o;if(n.length<Y_||e.drawn.has(n))return null;let a=null;for(let[s,r]of e.rules)if(s.includes(n)){if(a&&a.stamp!==r.stamp)return null;a=r}return a}var Y_=8;var Or=e=>e==="sentence"?"none":void 0,ap=["font","color","size","sizeTablet","sizePhone","weight","italic","lineHeight","lineHeightTablet","lineHeightPhone","letterSpacing","letterSpacingTablet","letterSpacingPhone","paragraphSpacing","paragraphSpacingTablet","paragraphSpacingPhone","letterCase","largestSize","largestSizeTablet","largestSizePhone"],en=["desktop","tablet","phone"],xt=(e,t)=>U(e,t);function Ar(e,t,n,o=$t()){return op("textSize",t,e.sizeTablet,e.sizePhone,o)[n]}var q_=[["lineSpacing","lineHeight","line"],["letterSpacing","letterSpacing","letter"]];function Pr(e){for(let[t,n,o]of q_)for(let a of en)if(e===xt(t,a))return{key:U(n,a),view:a,spacing:o};return{key:e,view:"desktop",spacing:null}}function Ne(e){let t={};for(let n of ap)e[n]!==void 0&&(t[n]=e[n]);return t}function Ir(e,t){let{auto:n,...o}=e,a=new Set(t??[]),s=ap.filter(r=>a.has(r)&&e.values[r]===void 0);return s.length?{...o,auto:s}:o}function sp(e){let t=e.fonts,n=e.sizes,o=e.typography,a=cu(e.compression),s={"heading-1":{font:W(t.heading),size:O(n.headingLarge),weight:O(o.weight),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Or(o.case),largestSize:O(o.maxPx)},"heading-2":{font:W(t.heading2),size:O(n.headingMedium),weight:O(o.weight2),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Or(o.case2)},"heading-3":{font:W(t.heading3),size:O(n.headingSmall),weight:O(o.weight3),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Or(o.case3)},"body-1":{font:W(t.body),size:O(n.body)},"body-5":{font:W(t.label),size:O(n.label)}};return np().map(({id:r,kind:i,name:l})=>({id:r,kind:i,name:l,values:Ne(s[r]??{})}))}function Rr(e){return Array.isArray(e)&&e.every(t=>t&&typeof t=="object"&&typeof t.id=="string"&&(t.kind==="heading"||t.kind==="body")&&typeof t.name=="string")?e.map(t=>Ir({...t,values:Ne(t.values??{})},Array.isArray(t.auto)?t.auto:void 0)):null}function PL(e){return Rr(e)??[]}function rp(e){return Rr(e)??np().map(({id:t,kind:n,name:o})=>({id:t,kind:n,name:o,values:{}}))}function nn(e,t){let n=sp(t),o=Rr(e);return o?o.map(a=>{let s={...kr(n,a.id)};for(let r of a.auto??[])delete s[r];return{...a,values:Ne({...s,...a.values})}}):n}var kr=(e,t)=>e.find(n=>n.id===t)?.values??{},tp=["heading-1","heading-2","heading-3"];function ip({saved:e,old:t,cur:n,next:o,sizeOf:a,panelView:s="desktop"}){let r=sp(t),i=rp(e),l=nn(i,t),u=[],d=o.map(f=>{let m=n.find(w=>w.id===f.id),b=i.find(w=>w.id===f.id);if(!m||!b){let w=Z_([f],a,s)[0],R=w.values.color;return R===void 0?w:{...w,values:{...w.values,color:Ue(R)}}}let y={...b.values},E=new Set(b.auto??[]),S=f.values,T=m.values,x=[...new Set([...Object.keys(S),...Object.keys(T)])].filter(w=>JSON.stringify(S[w])!==JSON.stringify(T[w])),v=w=>Pr(w).spacing==="letter";x.sort((w,R)=>Number(v(w))-Number(v(R)));for(let w of x){let{key:R,view:C,spacing:D}=Pr(w),z=R,Te=S[w];if(Te===void 0){delete y[z],kr(r,f.id)[z]!==void 0&&(u.push([f.id,z]),E.add(z));continue}if(E.delete(z),D==="line")y[z]=tn(Te/100,3);else if(D==="letter"){let uo={...l.find(X=>X.id===f.id)?.values??{}};for(let X of x)S[X]===void 0&&delete uo[Pr(X).key];let po=Ne({...uo,...y}),fo=Ar(po,a({...f,values:po}),C);y[z]=fo?tn(Te/fo,4):0}else y[z]=Te}return Ir({id:f.id,kind:f.kind,name:f.name,values:Ne(y)},E)}),p=t.compression;if(u.some(([f,m])=>(m==="lineHeight"||m==="letterSpacing")&&tp.includes(f))&&ht(p)!=="normal"){for(let f of tp){let m=d.find(y=>y.id===f);if(!m)continue;let b={...m.values};for(let y of["lineHeight","letterSpacing"])u.some(([E,S])=>E===f&&S===y)||b[y]===void 0&&!(m.auto??[]).includes(y)&&(b[y]=kr(r,f)[y]);m.values=Ne(b)}p="normal"}return{saved:d,old:{...t,compression:p}}}function lp(e,t){let n={text_styles:e.saved};return e.old.compression!==t.compression&&(n.heading_compression=ht(e.old.compression)),n}var tn=(e,t)=>Number(e.toFixed(t)),cp=(e,t)=>en.indexOf(e)<en.indexOf(t)?t:e;function up(e,t,n="desktop"){return e.map(o=>{let a={...o.values},s=t(o);for(let r of en){let i=U("lineHeight",r),l=o.values[i],u=o.values[U("letterSpacing",r)];delete a[i],l!==void 0&&(a[xt("lineSpacing",r)]=tn(l*100,1));let d=cp(r,n);u!==void 0&&(a[xt("letterSpacing",r)]=tn(u*Ar(o.values,s,d),d===r?2:4))}return{id:o.id,kind:o.kind,name:o.name,values:a}})}function Z_(e,t,n="desktop"){return e.map(o=>{let a=o.values,s={...a};for(let u of en)delete s[xt("lineSpacing",u)],delete s[xt("letterSpacing",u)];let r={id:o.id,kind:o.kind,name:o.name,values:Ne(s)},i={...r.values},l=t({...r,values:{...r.values}});for(let u of en){let d=a[xt("lineSpacing",u)],p=a[xt("letterSpacing",u)];if(typeof d=="number"&&(i[U("lineHeight",u)]=tn(d/100,3)),typeof p=="number"){let f=Ar(r.values,l,cp(u,n));i[U("letterSpacing",u)]=f?tn(p/f,4):0}}return{...r,values:Ne(i)}})}function kL(e,t=be){let n={fonts:_n({heading:e.heading_font??void 0,heading2:e.heading_2_font??void 0,heading3:e.heading_3_font??void 0,body:e.body_font??void 0,accent:e.accent_font??void 0,label:e.label_font??void 0},t),sizes:Us({headingLarge:e.heading_size_large_px,headingMedium:e.heading_size_medium_px,headingSmall:e.heading_size_small_px,accent:e.accent_size_px,body:e.body_size_px,label:e.label_size_px}),compression:ht(e.heading_compression),typography:du(e)},o=e.text_styles??null,a=Array.isArray(o)?Nr(nn(o,n),n):n;return{fonts:_n(a.fonts,t),sizes:Us(a.sizes),compression:ht(a.compression),typography:a.typography,textStyles:o}}function Nr(e,t){let n=f=>e.find(m=>m.id===f)?.values??{},o=n("heading-1"),a=n("heading-2"),s=n("heading-3"),r=n("body-1"),i=n("body-5"),l=t.fonts,u=t.sizes,d=t.typography,p=f=>f==="none"?"sentence":"authored";return{fonts:{...l,heading:o.font??l.heading,heading2:a.font??o.font??l.heading2,heading3:s.font??o.font??l.heading3,body:r.font??l.body,label:i.font??l.label},sizes:{...u,headingLarge:o.size??null,headingMedium:a.size??null,headingSmall:s.size??null,body:r.size??null,label:i.size??null},compression:t.compression,typography:{...d,case:p(o.letterCase),weight:o.weight??null,maxPx:o.largestSize??null,weight2:a.weight??null,weight3:s.weight??null,case2:p(a.letterCase),case3:p(s.letterCase)}}}function AL(e,t=be){let n=[];for(let o of e){let a=o.values,s=`.${ku(o)}`,r=`[${jo}="${o.id}"]`,i=`${s}, ${r}`,l=[],u=a.font!==void 0?t.byKey.get(a.font)?.cssVar:void 0;if(u&&l.push(`font-family: var(${u})`),a.size!==void 0){let m=a.largestSize!==void 0?Math.min(a.size,a.largestSize):a.size;l.push(`font-size: ${m}px`)}let d=Po(a.color);d&&l.push(`color: ${d}`),a.italic===!0&&l.push("font-style: italic"),a.weight!==void 0&&l.push(`font-weight: ${a.weight}`);let p=[];a.lineHeight!==void 0&&p.push(`line-height: ${a.lineHeight}`),a.letterSpacing!==void 0&&p.push(`letter-spacing: ${a.letterSpacing}em`),o.kind==="body"&&l.push(...p);let f=X_(a.letterCase);f&&o.kind==="body"&&l.push(`text-transform: ${f}`),a.paragraphSpacing&&l.push(`--sf-part-para: ${a.paragraphSpacing}px`),l.length&&n.push(`${i} { ${l.join("; ")} }`),o.kind==="heading"&&p.length&&n.push(`${i}, ${s}:is(h1, h2, h3, h4), ${r}:is(h1, h2, h3, h4) { ${p.join("; ")} }`),o.kind==="heading"&&f&&n.push(`${r}, ${s}:is(h1, h2, h3, h4) { text-transform: ${f} }`),a.paragraphSpacing&&(n.push(`*:has(> ${r}) { --sf-part-para: ${a.paragraphSpacing}px }`),n.push(...Zo(`:is(${i})`,`*:has(> ${r})`))),n.push(...J_(o,i,s,r))}return n.join(`
5
- `)}function J_(e,t,n,o){let a=e.values,s=He("textSize",a.size,a.sizeTablet,a.sizePhone),r=He("textSize",a.largestSize,a.largestSizeTablet,a.largestSizePhone),i=He("same",a.lineHeight,a.lineHeightTablet,a.lineHeightPhone),l=He("same",a.letterSpacing,a.letterSpacingTablet,a.letterSpacingPhone),u=He("spacing",a.paragraphSpacing,a.paragraphSpacingTablet,a.paragraphSpacingPhone),d=op("textSize",a.size,a.sizeTablet,a.sizePhone,$t()),p=Q_[e.id],f=[];for(let[m,b]of[["tablet",Ho],["phone",Mo]]){let y=[],E=[],S=d[m],T=r[m],x=s[m]===void 0&&T===void 0||S===void 0?void 0:T===void 0?S:Math.min(S,T);x!==void 0&&E.push(`font-size: ${x}px`);let v=[];i[m]!==void 0&&v.push(`line-height: ${i[m]}`),l[m]!==void 0&&v.push(`letter-spacing: ${l[m]}em`),e.kind==="body"&&E.push(...v),u[m]!==void 0&&E.push(`--sf-part-para: ${u[m]}px`),E.length&&y.push(`${t} { ${E.join("; ")} }`),e.kind==="heading"&&v.length&&y.push(`${t}, ${n}:is(h1, h2, h3, h4), ${o}:is(h1, h2, h3, h4) { ${v.join("; ")} }`),u[m]!==void 0&&y.push(`*:has(> ${o}) { --sf-part-para: ${u[m]}px }`),u[m]!==void 0&&!a.paragraphSpacing&&y.push(...Zo(`:is(${t})`,`*:has(> ${o})`)),x!==void 0&&p&&y.push(`.sf-themed-content { --size-${p}: ${x}px !important }`),y.length&&f.push(`@media ${b} { ${y.join(" ")} }`)}return f}var Q_=Object.fromEntries(Object.entries(Au).map(([e,{step:t}])=>[e,t]));function IL(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function RL(e){return e?Vo[e]:void 0}function eE(e){let t=vr(e);return Ne({font:e.font,color:e.color===void 0?void 0:Ue(e.color),size:e.size,weight:e.weight,italic:e.italic,lineHeight:t.lineHeight,letterSpacing:t.letterSpacingEm,paragraphSpacing:e.paragraphSpacing,letterCase:e.case})}function NL(e){return Object.keys(eE(e)).length>0}function LL({saved:e,old:t,styleId:n,values:o}){let a=rp(e);return{saved:tE(a,n,o),old:t}}function tE(e,t,n){return e.map(o=>o.id===t?Ir({...o,values:Ne({...o.values,...n})},o.auto):o)}import{jsx as nE}from"react/jsx-runtime";import{useMemo as oE,useState as aE}from"react";import{TextStylesList as sE}from"efficient-easel/text-styles";import{usePreviewDevice as rE}from"efficient-easel/draw/client";var dp=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],iE=["size","lineSpacing","letterSpacing","letterCase"],lE=500;function Jo(e=be){return Cc(e).map(t=>({value:t.key,label:t.label,family:`var(${t.cssVar})`,italic:t.italicLoaded}))}var WL=Jo();function pp({saved:e,old:t,colours:n,colourNameOf:o,sizeOf:a,onChange:s,openId:r,onOpenChange:i,readOnly:l=!1,withoutSize:u=!1,onPick:d}){let p=rE(),f=On(),m=oE(()=>Jo(f),[f]),[b,y]=aE(null),E=nn(e,t),S=vo(p),T=up(E,a,S);return nE(sE,{styles:T,onChange:x=>s(ip({saved:e,old:t,cur:T,next:x,sizeOf:a,panelView:S})),fonts:m,colours:n,colourNameOf:o,settings:u?dp.filter(x=>x!=="size"):dp,auto:iE,openId:r===void 0?b:r,onOpenChange:i??y,readOnly:l,device:S,onPick:d?x=>{let v=E.find(w=>w.id===x.id);v&&d(v)}:void 0,fallback:x=>{let v=E.find(R=>R.id===(x.kind==="heading"?"heading-1":"body-1")),w={};return v?.values.font&&x.id!==v.id&&(w.font=v.values.font),x.kind==="heading"&&(w.weight=lE),w}})}var fp="background";function mp(e){let t=ce(Wt(e));return ju({main:t.accent,text:t.text,background:t.background,muted:t.muted}).map(n=>({key:n.name,name:n.label??n.name,value:n.value}))}function hp(e){return mp(e).filter(t=>t.key!==fp)}function gp(e){let t=mp(e).filter(n=>n.key===fp);return n=>{let o=Ue(n);return t.find(a=>a.key===o)?.value??o}}import{useEasel as cE}from"efficient-easel/easel";function bp({themeFromDocument:e,persist:t}){let{appState:n,dispatch:o}=cE(C=>C),{fonts:a,setFonts:s,sizes:r,setSizes:i,headingCompression:l,setHeadingCompression:u,headingTypography:d,setHeadingTypography:p,textStyles:f,setTextStyles:m}=B(),b=n.data,y=b.root?.props??{},E=e?_n(y.fonts):a,S=e?ou:r,T=e?ht(y.headingCompression):l,x=e?uu(y.headingTypography):d,v={fonts:E,sizes:S,compression:T,typography:x},w=e?y.textStyles:f,R=C=>o({type:"replaceRoot",root:{...b.root,props:{...y,...C}},recordHistory:!0});return{fonts:E,sizes:S,compression:T,typography:x,old:v,saved:w,write:(C,D)=>{let z=Nr(nn(C.saved,C.old),C.old);e?R({textStyles:C.saved,fonts:z.fonts,headingCompression:z.compression,headingTypography:z.typography}):(m(C.saved),s(z.fonts),i(z.sizes),u(z.compression),p(z.typography)),t(lp(C,v),D)},writeRoot:R}}import{jsx as L,Fragment as Sn,jsxs as Ut}from"react/jsx-runtime";import{useEasel as Kb,useRootFields as mR}from"efficient-easel/easel";import{Inspector as hR}from"efficient-easel/fields";import{SettingsGroup as gR}from"efficient-easel/panel";import{useEffect as bR,useRef as yR,useState as hc}from"react";import{jsx as vt,Fragment as fE,jsxs as mE}from"react/jsx-runtime";import{useState as Ep}from"react";import{SettingsDefaultReset as hE,SettingsField as gE}from"efficient-easel/panel";import{useEaselStrings as bE}from"efficient-easel/strings";import{AddIcon as yE}from"efficient-easel/icons";import{Button as SE}from"efficient-shell/ui";import{iconOf as _E,noGlyph as EE}from"efficient-easel/screen/lib/document/box-fields";import{jsx as Qo,Fragment as uE,jsxs as yp}from"react/jsx-runtime";import{Button as Sp,Dialog as dE}from"efficient-shell/ui";function pE(e){return xn("This site has {n} color theme of its own. Clearing takes them away and puts back the four the shop supplies.","This site has {n} color themes of its own. Clearing takes them away and puts back the four the shop supplies.",e)}function _p({count:e,onCancel:t,onConfirm:n}){return yp(dE,{open:!0,onClose:t,role:"alertdialog",size:"sm",title:c("Clear this site\u2019s colors?"),footer:yp(uE,{children:[Qo(Sp,{variant:"secondary",onClick:t,children:c("Cancel")}),Qo(Sp,{variant:"danger",onClick:n,children:c("Clear colors")})]}),children:[Qo("p",{children:pE(e)}),Qo("p",{className:"mt-2 font-medium",children:c("This cannot be undone.")})]})}var TE=EE("the row's whole content is an action; the gutter names a subject and this row has none \u2014 the button's label is the name GG, 2026-09-23"),xE="Reset color",vE={selected:0,themes:[]};function wE(e){e(vE)}function Tp({value:e,onChange:t}){let n=e?.themes??[],o=n.length===0,a=ke(e),[s,r]=Ep(!1),i=bE(),[l,u]=Ep(null),d=(S,T)=>{t({...a,themes:a.themes.map((x,v)=>v===S?T:x)})},p=Wt(a).accent,f=new Set(a.themes.map(S=>S.brandInk).filter(Boolean)),m=Zc.filter(S=>!f.has(S)).map(S=>Jc(p,S)),b=[...a.themes,...m],y=S=>{if(S<a.themes.length)return t({...a,selected:S});let T=[...a.themes,b[S]];t({...a,themes:T,selected:T.length-1})},E=()=>{let S=[...a.themes,{...ce(a.themes[a.selected])}];t({...a,themes:S,selected:S.length-1}),u(S.length-1)};return mE(fE,{children:[o?null:vt(gE,{label:c(xE),icon:_E(TE),labelId:"sf-theme-reset",action:vt(hE,{label:c("all theme colors"),words:i.panel,changed:!0,onReset:()=>r(!0)})}),s&&vt(_p,{count:n.length,onCancel:()=>r(!1),onConfirm:()=>{r(!1),wE(t)}}),vt("div",{className:"sf-theme-list",role:"radiogroup","aria-label":c("Theme"),children:b.map((S,T)=>vt(No,{index:T,colors:S,selected:T===a.selected,open:l===T&&T<a.themes.length,editable:T<a.themes.length,onPick:()=>y(T),onEdit:()=>u(x=>x===T?null:T),onChangeColors:x=>d(T,x)},T))}),vt(SE,{variant:"secondary",leftIcon:vt(yE,{}),onClick:E,className:"sf-theme-add",children:c("Add new theme")})]})}import{jsx as ls}from"react/jsx-runtime";import{SettingsDefaultReset as _A,SettingsField as EA}from"efficient-easel/panel";import{SquareIcon as TA}from"efficient-easel/icons";import{jsx as g,jsxs as Ke,Fragment as Ve}from"react/jsx-runtime";import{parseOption as vp}from"efficient-shell/format";var Lr=["image","video"],wp={image:"imageFocal",image2:"imageFocal2"},CE={HeroSingle:"image",HeroSlide:"video"};function yD(e,t){return vp(Lr,CE[e],t)}var Cp=["one","side","stacked"],OE="one",SD={one:"One",side:"Side by side",stacked:"Stacked"};function Op(e){return vp(Cp,OE,e)}function xp(e){return e==="one"?1:2}function PE(e,t){if(Cp.includes(e))return e;let n=Op(t);return n==="side"?"stacked":n}function _D(e){let t=Op(e.mediaLayout);return Math.max(xp(t),xp(PE(e.mediaLayoutPhone,t)))}import{cloneElement as Rl,createContext as $O,useContext as cg,useEffect as GO,useId as ug,useRef as no,useState as oo}from"react";import{useEasel as as,useSelectedHost as Lt}from"efficient-easel/easel";import{PIN_LENGTH as Za,toDateKey as wW,fromDateKey as CW,parseOption as zO}from"efficient-shell/format";function kE(e){return!!e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.src=="string"}function re(e){return typeof e=="string"?e:kE(e)?e.src:""}function TD(e,t,n){return Dr(e,t.split("."),n)}function Dr(e,t,n){if(t.length===0)return n(e);let[o,...a]=t,s=o.endsWith("[]"),r=s?o.slice(0,-2):o;if(!e||typeof e!="object"||Array.isArray(e))return e;let i=e;if(!(r in i))return e;let l=i[r];if(s){if(!Array.isArray(l))return e;let d=!1,p=l.map(f=>{let m=Dr(f,a,n);return m!==f&&(d=!0),m});return d?{...i,[r]:p}:e}let u=Dr(l,a,n);return u===l?e:{...i,[r]:u}}import{parseOption as kp}from"efficient-shell/format";var AE=["upload","youtube"],IE="upload",CD={upload:"Upload",youtube:"YouTube"},RE=["background","click"],NE="background",OD={background:"Background",click:"Click to play"};function PD(e){return kp(AE,IE,e)}function kD(e){return kp(RE,NE,e)}var Pp=/^[A-Za-z0-9_-]{11}$/,LE=/^(?:www\.|m\.|music\.)?(?:youtube\.com|youtube-nocookie\.com|youtu\.be)$/;function AD(e){let t=typeof e=="string"?e.trim():"";if(!t)return null;if(Pp.test(t))return t;let n;try{n=new URL(/^[a-z]+:\/\//i.test(t)?t:`https://${t}`)}catch{return null}if(n.protocol!=="https:"&&n.protocol!=="http:"||!LE.test(n.hostname))return null;let o=n.pathname.split("/").filter(Boolean),a=n.hostname.endsWith("youtu.be")?o[0]:o[0]==="watch"?n.searchParams.get("v"):o[0]==="embed"||o[0]==="shorts"||o[0]==="live"||o[0]==="v"?o[1]:null;return a&&Pp.test(a)?a:null}function ID(e,t){let n=t==="click"?"autoplay=1&playsinline=1&rel=0":`autoplay=1&mute=1&loop=1&playlist=${e}&controls=0&playsinline=1&rel=0&disablekb=1`;return`https://www.youtube-nocookie.com/embed/${e}?${n}`}function RD(e){return`https://i.ytimg.com/vi/${e}/maxresdefault.jpg`}function ND(e){return`https://i.ytimg.com/vi/${e}/hqdefault.jpg`}var LD="Play video";var Fr={frame:"Video frame",image:"Image"},DD={any:[{field:"loadingShows",is:"image"},{all:[{not:{field:"loadingShows",set:!0}},{field:"poster",set:!0}]}]};function Nn(e){let t=e.loadingShows;return t==="image"?"image":t!=null&&t!==""?"frame":re(e.poster)?"image":"frame"}function FD(e,t="desktop"){let[n,o]=t==="phone"?[e.posterPhone,e.videoFramePhone]:[e.poster,e.videoFrame],[a,s]=Nn(e)==="image"?[n,o]:[o,n];return re(a)||re(s)||void 0}function Ap(e){if(re(e.mediaVideo)){if(Nn(e)==="frame")return re(e.videoFrame)?void 0:re(e.poster)?"frame-missing-image":"frame-missing-surface";if(!re(e.poster))return re(e.videoFrame)?"image-missing-frame":"image-missing-surface"}}var ea="videoFrames",Br="videoFramesNotOwn";function Ip(e,t,n){let o=re(e.mediaVideo);if(!o||!t||Nn(e)!=="frame"||re(e.videoFrame))return;let a=t[o],s=!!re(e.poster);if(a?.state==="ready")return null;if(s)return!a||a.state==="pending"?void 0:"image-no-frame";if(!a)return n?"save-makes-frame":void 0;switch(a.state){case"pending":return a.noted!=="save"&&n?"save-makes-frame":null;case"dark":return"starts-dark";case"outside":return"outside";case"unsupported":return"unsupported";case"failed":return"failed";default:return null}}function DE(e,t){let n=re(e),o=n&&t?t[n]:void 0;return o?.state==="ready"&&o.frame?o.frame:void 0}function BD(e,t,n){let o=n?.[Br];if(!(Array.isArray(o)&&o.includes(e)))return DE(t,n?.[ea])}import{useSyncExternalStore as FE}from"react";function Rp(){let e=new Map,t=new Set,n=o=>(t.add(o),()=>{t.delete(o)});return{get:o=>e.get(o),has:o=>e.has(o),set(o,a){if(!(e.has(o)&&e.get(o)===a)){e.set(o,a);for(let s of t)s()}},use(o){let a=()=>o?e.get(o):void 0;return FE(n,a,a)}}}import{zoneKey as BE}from"efficient-easel/data";var ve="SiteHeader",Ge="SiteFooter",Hr="sections",GD=[ve,Ge],ta=e=>e===ve||e===Ge,zD=e=>BE({parentId:e,slot:Hr});function WD(e,t,n=[]){return{type:e,props:{id:t,[Hr]:n}}}var HE=new Set(["Footer",ve,Ge]);function na(e){let t=new Set,n=!1,o=e.filter(a=>{let s=a?.type??"";return s==="Header"?(n=!0,!1):HE.has(s)?t.has(s)?(n=!0,!1):(t.add(s),!0):!0});return n?o:e}function KD(e,t){return e.some(n=>n?.type===t.type)?e:t.type===ve?[t,...e]:[...e,t]}var Np={[ve]:{max:3,takes:["Flex","Ticker"]},[Ge]:{max:6,takes:["Flex","Prose","Logos","Divider"]}};function jD(e,t,n){if(!ta(e))return!0;let o=Np[e];return n<o.max&&o.takes.includes(t)}function VD(e,t){let n=t,o=n?.props?.id;if(o==null)return null;let a=e?.content;if(!Array.isArray(a))return null;for(let s of a){if(!ta(s?.type))continue;let r=s.props?.[Hr];if(!Array.isArray(r)||!r.some(l=>l?.props?.id===o))continue;let i=Np[s.type];return i.takes.includes(n?.type??"")?r.length>=i.max?{group:s.type,why:"full"}:null:{group:s.type,why:"type"}}return null}import{locateNode as ME}from"efficient-easel/draw";function Mr(e){if(!e)return null;let t=e.lastIndexOf(":");return t>0?{ownerId:e.slice(0,t),slot:e.slice(t+1)}:null}function oa(e,t,n){let o=Mr(n?.zone),a=o?ME(e,t,o.ownerId):null;return a&&o?{...a,slot:o.slot}:null}import{isNode as mT}from"efficient-easel/data";import{convertLength as UE,rowGrid as $E}from"efficient-easel/screen/lib/content/length-units";var V={min:1e3,max:2e3,step:50,default:1600};function GE(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}var Gr="--sf-site-width",Wr=`var(${Gr},${V.default}px)`,eF="100vw",tF=`max-w-[${Wr}]`,nF=`max-w-[${V.default}px]`;function Dp(e){return typeof e!="number"||!Number.isFinite(e)?V.default:Math.round(Math.min(Math.max(e,V.min),V.max))}function oF(e,t){let n=Tn(e,t,"size",V);if(n!==null)return{[Gr]:n};let o=Dp(e);return o===V.default?{}:{[Gr]:`${o}px`}}var ie={min:0,max:80,step:4,default:40,typedMax:Number.POSITIVE_INFINITY},zr="--sf-site-gutter",Le={min:0,max:24,step:4,typedMax:Number.POSITIVE_INFINITY},zE=$E({kind:"spacing"},"vw",ie).max;function Fp(e,t){return e<=t?`${e}px`:`min(${e}px, ${zE}vw)`}var Lp="--sf-site-gutter-phone",WE="max-view-tablet:[--sf-site-gutter:var(--sf-site-gutter-phone)]!",KE="max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-site-gutter:var(--sf-site-gutter-phone)]",we=`var(${zr},${ie.default}px)`,jE=`px-[${we}]`;var tt={md:`min(24px,${we})`,sm:`min(20px,${we})`,frame:`min(24px,${we})`,tabs:`min(16px,${we})`},aF=[[`max-view-desktop:px-[${tt.md}]`,"max-view-desktop:px-6"],[`max-view-desktop:px-[${tt.tabs}]`,"max-view-desktop:px-4"],[`max-[960px]:px-[${tt.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${tt.md}]`,"max-[900px]:px-6"],[`max-view-wide:px-[${tt.md}]`,"max-view-wide:px-6"],[`max-view-tablet:px-[${tt.sm}]`,"max-view-tablet:px-5"],[`max-view-wide:px-[${tt.sm}]`,"max-view-wide:px-5"],[`max-[640px]:px-[${tt.sm}]`,"max-[640px]:px-5"],[`view-wide:px-[${we}]`,"view-wide:px-10"],[`max-view-tablet:px-[min(24px,${we})]`,"max-view-tablet:px-6"],[`max-view-wide:-mx-[min(20px,${we})]`,"max-view-wide:-mx-5"],[`max-view-tablet:-mx-[min(20px,${we})]`,"max-view-tablet:-mx-5"],[`-mx-[${we}]`,"-mx-10"],[jE,"px-10"]];var wt="sideSpaceOnce",sF="data-sf-side",VE="once";function rF(e){if(!(!e||typeof e!="object"))return e[wt]===!0?VE:void 0}var Bp="max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";function Kr(e){return Dn[e??"box"]}var aa="[[data-sf-side=once]_&]:max-view-wide:px-[var(--sf-site-gutter-phone,min(24px,var(--sf-site-gutter,40px)))]",Ln="[[data-sf-side=once]_&]:max-view-wide:px-[var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]",sa={"max-[960px]":aa,"max-[900px]":aa,"max-view-desktop":aa,"max-[1100px]":aa,"max-view-wide":Ln,"max-view-tablet":Ln,"max-[720px]":Ln,"max-[640px]":Ln,"max-[800px]":Ln},Ur="var(--sf-pad-site,var(--sf-box-g,var(--sf-site-gutter,40px)))",$r="[--sf-edge-g:var(--sf-pad-site)]",Dn={box:{className:"[--sf-pad-site:var(--sf-box-g,var(--sf-site-gutter,40px))] max-[960px]:[--sf-pad-site:min(24px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:Ur,edge:$r,frame:"max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",once:"[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(24px,var(--sf-box-g,var(--sf-site-gutter,40px))))]",onceFrame:sa["max-[960px]"],onceGutter:"[[data-sf-side=once]_&]:max-[960px]:[--sf-box-g:min(24px,var(--sf-site-gutter,40px))] [[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(24px,var(--sf-site-gutter,40px)))]"},site:{className:"[--sf-pad-site:var(--sf-box-g,var(--sf-site-gutter,40px))] max-view-wide:[--sf-pad-site:min(20px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:Ur,edge:$r,frame:Bp,once:"[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(20px,var(--sf-box-g,var(--sf-site-gutter,40px))))]",onceFrame:sa["max-view-wide"],onceGutter:"[[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]"},none:{className:"[--sf-pad-site:0px] max-view-wide:[--sf-pad-site:min(20px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:Ur,edge:$r,frame:"view-wide:px-0 max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]",once:"[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(20px,var(--sf-box-g,var(--sf-site-gutter,40px))))]",onceFrame:sa["max-view-wide"],onceGutter:"[[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]"}},iF=`mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] ${Bp}`,lF="[--sf-box-g:var(--sf-site-gutter,40px)] [&>*]:[--sf-site-gutter:0px]",YE="[[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter-phone:0px]";function cF(e){return`${YE} ${Dn[e].onceGutter}`}var XE="[[data-sf-side=once]_&]:[--sf-box-g:var(--sf-site-gutter,40px)] [[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter:0px] [[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter-phone:0px]",qE="[[data-sf-side=once]_&]:max-view-wide:-mx-[var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]",ZE=/^([^\s:]+):px-\[min\((?:20|24)px,var\(--sf-site-gutter,40px\)\)\]$/,JE="max-view-wide:-mx-[min(20px,var(--sf-site-gutter,40px))]";function QE(e){if(!e)return"";let t=[];for(let n of e.split(/\s+/)){let o=ZE.exec(n)?.[1],a=o?j(sa,o):void 0;a?t.push(a):n===JE&&t.push(qE)}return t.join(" ")}var uF="[[data-sf-side=once]_&]:[--sf-pad-site:inherit]",dF="[[data-sf-side=once]_&]:[--sf-edge-g:var(--sf-box-g,var(--sf-site-gutter,40px))]";function eT(e){if(!e)return"";let t=e.split(" "),n=["none","site","box"].find(o=>Dn[o].className.split(" ").every(a=>t.includes(a)));return n?`${XE} ${Dn[n].once} ${Dn[n].onceGutter}`:""}function pF(e,t){let n=t?[eT(e),QE(e)].filter(Boolean).join(" "):"";return n?`${e} ${n}`:e}var fF="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]";function Hp(e){return typeof e!="number"||!Number.isFinite(e)?ie.default:Math.round(Math.min(Math.max(e,ie.min),ie.typedMax))}function Mp(e,t,n){let o=Fs(e,t,"spacing",n);return o===null?null:M(o,"vw")}function mF(e,t){let n=Mp(e,t,ie);if(n!==null)return{[zr]:n};let o=Hp(e);return o===ie.default?{}:{[zr]:Fp(o,ie.max)}}function Up(e){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,Le.min),Le.typedMax))}function $p(e){return typeof e=="number"&&Number.isFinite(e)?Dp(e):null}function hF(e,t){let n=Mp(e,t,Le);if(n!==null)return{[Lp]:n};let o=Up(e);return o===null?{}:{[Lp]:Fp(o,Le.max)}}function gF(e){return Up(e)===null?"":`${WE} ${KE}`}function Gp(e,t){let n=Fs(e,t,"spacing",ie),o=n===null?Hp(e):UE(n,F(t),"px","mobile",Le);return Math.min(Le.max,o)}var zp=Wr,bF=`max-w-[${zp}]`,yF=`max-w-[min(var(--sf-page-cap,${V.default}px),${V.default}px)]`,Wp="--sf-hero-cap",tT=`var(${Wp},none)`,SF=`max-w-[${tT}]`,nT="--sf-hero-bleed-m",oT="--sf-hero-bleed-w",aT="--sf-hero-chrome-x",sT="--sf-hero-chrome-cap";function _F(e){return e===!0?{[Wp]:zp,[nT]:"auto",[oT]:"100%",[aT]:"24px",[sT]:"none"}:{}}var jr=`calc(${Wr} - ${we}*2)`,EF=`max-w-[${jr.replace(/ /g,"_")}]`;var rT="--sf-chrome-cap",iT=`var(${rT},${jr})`,TF="data-page-width";function xF(e){return e==="full"?"full":null}function vF(e){return e==="full"?null:GE(e==="content"?jr:iT)}function wF(e){if(e==="full")return"full";if(e==="content")return"content"}var PF="data-sf-site-css",lT="site",Fn="siteCustomCss";function cT(e){return e&&typeof e=="object"?gu(e,Fn):""}function kF(e){return cT(e)?lT:void 0}var uT=["tall","square","wide"],dT="tall";function RF(e){return uT.includes(String(e??""))?String(e):dT}var NF={sectionNumber:"\xB7 Locations",heading:"Our *locations.*",tagline:"Visit us in person \u2014 find your nearest studio below.",galleryKicker:"Gallery",galleryHint:"Hover to see in colour \xB7 click to jump",mapTheme:"auto"},LF=[{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
1
+ import{b as hu,c as gu,d as ku,e as Au,g as Ks,h as Ru,i as Iu}from"./chunk-SV3VVDBH.js";import{$ as be,$f as eu,$h as wo,Aa as Rc,Ac as Ps,Af as qe,Ag as lu,Bc as _o,Bg as Gs,Bh as _u,Ca as O,Cc as Dc,Da as bo,Db as Nc,Dc as Fc,De as jc,E as vc,Ec as Bc,Ed as Rs,Fb as $t,Fc as ks,Gb as He,Gc as Hc,Ia as ws,Jd as le,Jf as qc,Ka as Ic,Kf as Bs,Lf as ke,Lg as ht,Lh as Ws,Md as Uc,Mf as Zc,Mh as vo,Nf as Jc,Ng as cu,Nh as Eu,Of as Wt,Oh as U,Pb as yo,Pf as ce,Pg as uu,Rg as du,Sc as Mc,Sf as Kt,Sh as Tu,Tc as As,Td as $c,Tf as jt,Tg as pu,Th as xu,Uh as vu,Vh as wu,Wd as Gc,Wf as Qc,Xg as fu,Xh as Cu,Yg as mu,Ze as To,Zf as Hs,Zh as Yt,_h as Ou,aa as wc,ag as Ms,ah as gt,ai as Pu,b as W,ba as Cc,bh as zs,c as Ye,ca as Oc,dg as tu,ea as dt,eg as nu,eh as bu,fe as Is,ff as Ds,ga as go,i as bc,ic as Lc,ka as _n,l as mo,lg as ou,m as yc,me as Eo,mg as Us,mi as B,n as Sc,oa as pt,oe as Gt,og as au,p as _c,pc as ft,pe as mt,pf as M,pg as ae,q as Ec,qf as F,qg as su,qh as yu,r as Tc,rc as Cs,rf as Vc,rg as ru,ri as Lu,sc as Os,se as zc,sf as zt,sg as Ae,t as ho,te as Ns,tf as Yc,tg as Vt,u as xc,uc as So,ue as Wc,uf as Fs,va as Pc,vf as Tn,wa as kc,wf as Xc,wg as iu,wh as Su,xa as Ac,xe as Kc,xg as $s,yb as En,ye as Ls,za as vs,zf as Xe,zh as xo}from"./chunk-3QCDDPXL.js";import{a as j,b as ge}from"./chunk-FVHAKC6L.js";import{d as Nu}from"./chunk-TICXZI44.js";var Fu="en",Co=null,Bu=Fu,Hu=null;function o0(e,t,n){Co=e??null,Bu=t||Fu,Hu=n??null}function P(){return Hu}function a0(){return Bu}function s0(){return Co}function Du(e,t){return t?e.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(n,o)=>ge(t,o)?String(j(t,o)):n):e}function c(e,t){let n=Co?j(Co,e):void 0;if(typeof n=="function"){try{let o=W(n(t??{}));if(o)return o}catch{}return Du(e,t)}return Du(W(n)??e,t)}function xn(e,t,n,o){return c(n===1?e:t,{...o,n})}import{parseHexColor as zu}from"efficient-shell/format";import{COLOR_SLOTS as Wu,FILL_COLOR_SLOTS as ey,colorRole as ty,fillColorRole as Ku}from"efficient-shell/markup";import{parseHexColor as Mu}from"efficient-shell/format";import{FILL_COLOR_SLOTS as qb}from"efficient-shell/markup";var Oo=e=>{let t=pu.find(n=>n.role===e);return t?`var(${t.token})`:""},Zb=e=>Oo(e)?`var(--theme-${e})`:"",Jb={main:{ink:pt.accent,page:pt.accent,key:"accent",label:()=>c("Main"),words:e=>c("Theme {n} main color",{n:e})},text:{ink:pt.text,page:pt.text,key:"text",label:()=>c("Text"),words:e=>c("Theme {n} text color",{n:e})},background:{ink:Oo("bg"),page:Zb("bg"),key:"background",label:()=>c("Background"),words:e=>c("Theme {n} background",{n:e})},muted:{ink:pt.labels,page:pt.labels,key:"muted",label:()=>c("Muted"),words:e=>c("Theme {n} muted color",{n:e})},surface:{ink:Oo("surface"),page:Oo("surface"),key:"surface",label:()=>c("Surface"),words:e=>c("Theme {n} surface color",{n:e})}};function Ze(e){return j(Jb,e)}var js="#9ca3af";function Xt(e,t,n){let o=Ze(e);return o?{hex:Mu(t[o.key]??"")??"",words:o.words(n)}:null}function Uu(e,t){return qb.flatMap(n=>{let o=Xt(n,e,t);return o&&Ze(n)?.ink?[{name:n,label:o.words,value:o.hex||js}]:[]})}var Qb=["main","text","background"];function $u(e){let t=new Set,n=[];return ke(e).themes.forEach((o,a)=>{for(let s of Qb){let r=Ze(s),i=r?o[r.key]:void 0,l=typeof i=="string"&&i?Mu(i):null;!r||!l||t.has(l)||(t.add(l),n.push({value:l,label:r.words(a+1)}))}}),n}function Me(e){return Ze(e)?.ink??""}function Re(e){if(typeof e!="string")return null;let t=Ku(e.trim());return t?.kind==="slot"&&Me(t.slot)?t.slot:null}var ny={accent:"main",labels:"muted"};function Ue(e){return j(ny,e)??e}function Po(e){if(!e)return"";if(e.startsWith("#"))return zu(e)===e.toLowerCase()?e:"";let t=ty(Ue(e));return t?.kind==="slot"?Me(t.slot):""}function ju(e,t=Wu){return t.flatMap(n=>{let o=Ze(n);return o?.ink?[{name:n,label:o.label(),value:e?.[n]||js}]:[]})}function Vu(e){let t=Ku(Ue(e));return t?.kind==="slot"?Me(t.slot):""}function S0(e){let t=e?.trim();return t?ey.find(n=>Me(n)===t)??null:null}function _0(e){let t={},n=e.ownerDocument,o=n?.defaultView;if(!n||!o)return t;let a=o.getComputedStyle(e),s=n.createElement("canvas").getContext("2d");for(let r of Wu){let i=Me(r);if(!i)continue;let l=i.replace(/^var\((--[\w-]+)\)$/,"$1"),u=a.getPropertyValue(l).trim();if(!u)continue;let d=Gu(u);!d&&s&&(s.fillStyle="#000000",s.fillStyle=u,d=Gu(String(s.fillStyle))),d&&(t[r]=d)}return t}function Gu(e){let t=e.trim().toLowerCase();if(t.startsWith("#"))return zu(t);let n=t.match(/^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)/);return n?`#${n.slice(1,4).map(o=>Math.min(255,Number(o)).toString(16).padStart(2,"0")).join("")}`:null}var ko="sf.gapContainer",$e={min:-32,max:64,step:2},ed={Grid:{sm:12,md:24,lg:40},Flex:{sm:12,md:24,lg:40},FooterGroup:{sm:8,md:16,lg:32},HeroGroup:null,Events:null,GalleryB:null,ProductGrid:null},qt={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},oy=new Set(["Events","GalleryB"]);function vn(e,t,n){if(typeof t=="number"&&Number.isFinite(t)&&t>=$e.min)return t;if(typeof t=="string"){let o=ed[e]?.[t];if(typeof o=="number")return o}return typeof n=="number"&&Number.isFinite(n)?n:qt[e]}var ay="sf-gap-overlap",sy="--sf-gap-overlap",Vs="--sf-block-gap",Yu="--sf-block-gap-rem",ye={min:0,max:$e.max,step:$e.step};function wn(e){if(typeof e!="number"||!Number.isFinite(e))return null;let t=Math.min(Math.max(Math.round(e),ye.min),ye.max);return t-t%ye.step}function x0(e,t){let n=Tn(e,t,"gap",ye);if(n!==null)return{[Vs]:n,[Yu]:n};let o=wn(e);return o===null?{}:{[Vs]:`${o}px`,[Yu]:`${o/16}rem`}}var Xu="--sf-block-gap-phone",qu="--sf-block-gap-phone-rem",ry="--sf-block-gap-on-phone",iy="max-view-tablet:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]",ly="max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-block-gap-on-phone:var(--sf-block-gap-phone)]";function v0(e,t){let n=Tn(e,t,"gap",ye);if(n!==null)return{[Xu]:n,[qu]:n};let o=wn(e);return o===null?{}:{[Xu]:`${o}px`,[qu]:`${o/16}rem`}}function w0(e){return wn(e)===null?"":`${iy} ${ly}`}var Zu="sf-gap-zone",Ju="--sf-gap-len";function Ao(e,t){return typeof t=="number"&&Number.isFinite(t)&&t>=$e.min?!0:typeof t=="string"&&typeof ed[e]?.[t]=="number"}var Qu="--sf-gap-len-phone",cy="--sf-gap-len-tablet",Cn={min:0,max:$e.max,step:$e.step};function Je(e){return typeof e=="number"&&Number.isFinite(e)&&e>=Cn.min}function Ys(e){return e/2}function Xs(e,t,n){return Je(n)&&!Ao(e,t)}function qs(e,t,n,o,a){return Je(t)?t:Xs(e,n,a)?a:Ys(vn(e,n,o))}var uy={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function C0(e,t,n,o,a){let s={...Je(o)?{[Qu]:`${o}px`}:null,...Je(a)?{[cy]:`${a}px`}:null};if(!Ao(e,t)){let i=`${qt[e]}px`,l=oy.has(e)?`var(--sf-card-gap, ${i})`:i;return{className:` ${Zu}`,style:{[Ju]:`var(${Vs}, ${l})`,[Qu]:`var(${ry})`,...s}}}let r=vn(e,t);return r>=0?{className:` ${Zu}`,style:{[Ju]:`${r}px`,...s}}:{className:` ${ay} ${uy[n]}`,style:{gap:"0px",[sy]:`${-r/2}px`}}}import{jsx as Js,Fragment as yy,jsxs as Sy}from"react/jsx-runtime";import{createContext as _y,useContext as Ey,useMemo as Ty}from"react";var dy=4,py={sans:"Arial",condensed:"Arial Narrow",serif:"Times New Roman",mono:"Courier New"},fy={sans:"sans-serif",serif:"serif",mono:"monospace"},my="latin",hy=/^\/(?![\/\\])[^\s"'()\\<>:]+$/,gy=/^U\+[0-9A-Fa-f?]{1,6}(?:-[0-9A-Fa-f]{1,6})?(?:\s*,\s*U\+[0-9A-Fa-f?]{1,6}(?:-[0-9A-Fa-f]{1,6})?)*$/,Zs=e=>`"${Ru(e)}"`,td=e=>`${e} Fallback`;function by(e){return typeof e?.url=="string"&&hy.test(e.url)&&typeof e.unicodeRange=="string"&&gy.test(e.unicodeRange.trim())&&Number.isInteger(e.weight)&&e.weight>=1&&e.weight<=1e3&&(e.style==="normal"||e.style==="italic")}var Ro=e=>`${e}%`,Io=e=>typeof e=="number"&&Number.isFinite(e);function nd(e,t){let n={css:"",vars:{},preload:[]};if(e.siteFonts.size===0)return n;let o=[],a=[];for(let s of new Set(t)){let r=e.siteFonts.get(s),i=e.byKey.get(s);if(!r||!i)continue;let l=Zs(r.family);for(let p of r.files??[])by(p)&&(o.push(`@font-face { font-family: ${l}; src: url("${p.url}") format("woff2"); font-weight: ${p.weight}; font-style: ${p.style}; unicode-range: ${p.unicodeRange.trim()}; font-display: swap; }`),p.subset===my&&a.push(p));let u=r.fallbackMetrics,d=!!u&&Io(u.ascent)&&Io(u.descent)&&Io(u.lineGap)&&Io(u.sizeAdjust);if(d){let p=py[r.condensed?"condensed":i.category];o.push(`@font-face { font-family: ${Zs(td(r.family))}; src: local("${p}"); ascent-override: ${Ro(u.ascent)}; descent-override: ${Ro(u.descent)}; line-gap-override: ${Ro(u.lineGap)}; size-adjust: ${Ro(u.sizeAdjust)}; }`)}n.vars[i.cssVar]=Ks([l,...d?[Zs(td(r.family))]:[],fy[i.category]].join(", "))}return n.css=Ks(o.join(`
2
+ `)),n.preload=[...a.filter(s=>s.style==="normal"),...a.filter(s=>s.style!=="normal")].slice(0,dy),n}var ad=_y(be);function D0({siteFonts:e,children:t}){let n=Ty(()=>wc(e),[e]);return Js(ad.Provider,{value:n,children:t})}function On(){return Ey(ad)}var od="sf-site-fonts";function F0({usedKeys:e,preload:t=!0}){let n=On(),o=nd(n,e),a=Object.entries(o.vars),s=[o.css,a.length?`:root { ${a.map(([r,i])=>`${r}: ${i}`).join("; ")} }`:""].filter(Boolean).join(`
3
+ `);return s?Sy(yy,{children:[(t?o.preload:[]).map(r=>Js("link",{rel:"preload",as:"font",type:"font/woff2",href:r.url,crossOrigin:""},r.id)),Js("style",{href:`${od}-${Iu(s)}`,precedence:od,dangerouslySetInnerHTML:{__html:s}})]}):null}import{jsx as Y,jsxs as yt,Fragment as fS}from"react/jsx-runtime";import{useCallback as Sd,useContext as mS,useId as Td,useRef as _d,useState as Ed}from"react";import{ThemeIcon as hS}from"efficient-easel/icons";import{Button as gS,useClickOutside as bS}from"efficient-shell/ui";import{SettingsField as yS}from"efficient-easel/panel";import{ScreenDocumentContext as SS}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as k,jsxs as et,Fragment as jy}from"react/jsx-runtime";import{parseHexColor as Vy}from"efficient-shell/format";import{Button as nr,IconButton as Yy,Tooltip as Xy}from"efficient-shell/ui";import{jsx as Qe,jsxs as Hy}from"react/jsx-runtime";import{AccentIcon as My}from"efficient-easel/icons";import{Button as Uy,Tooltip as $y}from"efficient-shell/ui";import{jsx as se,jsxs as er}from"react/jsx-runtime";import{useRef as xy}from"react";import{ColorPicker as vy,ColorPickerPanel as wy,ColorSwatch as Cy,HexInput as Oy,Popover as Py,Tooltip as ky,colorFill as Ay,colorSwatchClasses as Ry,useShellStrings as Iy}from"efficient-shell/ui";import{SettingsDefaultReset as Ny,SettingsField as Ly}from"efficient-easel/panel";import{typedHex as Qs}from"efficient-easel/pick";var sd="Not set";function rd({value:e,onChange:t,label:n,id:o,caption:a,inherited:s,ariaLabel:r,choices:i}){return se(Fy,{value:e,onChange:t,label:c(r??n),id:o,caption:a,inherited:s,choices:i})}function Dy(){let{theme:e}=B();return $u(e)}function Fy({value:e,onChange:t,label:n,id:o,caption:a,inherited:s,choices:r}){let i=Dy(),l=e?null:Qs(s??""),u=a!==void 0&&(!e||Qs(a)!==Qs(e))?a:null,d=p=>{p!==e&&t(p)};return er("div",{className:"sf-colour",children:[r?se(By,{id:o,value:e,onChange:t,label:n,presets:i,follows:l,choices:r}):se(vy,{id:o,value:e,onChange:d,label:n,presets:i,fallback:l??void 0,size:"md",align:"start"}),u!==null?se("span",{className:"sf-colour-caption",children:u}):se("span",{className:"sf-colour-hexwrap",children:se(Oy,{value:e||l||"",onChange:d,label:c("{label} hex code",{label:n}),placeholder:e||l?void 0:c(sd),className:l?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function By({value:e,onChange:t,label:n,id:o,presets:a,follows:s,choices:r}){let i=Iy().color,l=e||s||"",u=r.findIndex(f=>f.selected),d=u>=0,p=xy(u);return d&&(p.current=u),se(Py,{id:o,trigger:se("span",{"aria-hidden":"true",className:"absolute inset-0",style:Ay(l)}),triggerLabel:i.swatch(n,l.toUpperCase()||i.none),triggerClassName:Ry({size:"md"}),"aria-label":i.panel(n),align:"start",children:er("div",{className:"sf-colour-window",children:[se("div",{role:"group","aria-label":n,className:"sf-colour-choices",children:r.map(f=>se(ky,{content:f.label,children:se(Cy,{color:f.color,"aria-label":f.label,selected:f.selected,onClick:()=>{f.selected||f.onPick()}})},f.label))}),se(wy,{value:d?"":e,onChange:t,label:n,presets:a,fallback:(d?l:s)??void 0},p.current)]})})}function Se({label:e,icon:t,changed:n,hint:o,onReset:a,resetTo:s,children:r,...i}){return se(Ly,{label:e,icon:t,htmlFor:i.id,changed:n,hint:o,action:a?se(Ny,{words:P()?.panel,label:e,changed:!!n,detail:s,onReset:a}):void 0,children:r?er("div",{className:"es-width-stack",children:[rd({...i,label:e}),r]}):rd({...i,label:e})})}function Pn({label:e,icon:t,value:n,inherited:o,resetTo:a,onChange:s,onReset:r,hint:i,choices:l,children:u}){let d=!!n;return se(Se,{label:e,icon:t,value:n,inherited:d?void 0:o,onChange:s,changed:d,onReset:r,resetTo:a,hint:i,choices:l,children:u})}function tr(e){return ce(e).background}function Gy(e){let t=Xe(e.accent,tr(e));return t===null?null:{ratio:t,grade:jt(t)}}function zy(e){let t=tr(e),n=Xe(e.accent,t);return n===null?[]:Qc(e.accent).filter(o=>{let a=Xe(o,t);return a!==null&&a>n&&jt(a)==="good"})}var Wy={good:"Easy to read","large-only":Kt["large-only"],hard:Kt.hard};function id({value:e,onChange:t}){let n=Gy(e),o=n?.grade,a=n&&n.grade!=="good"?zy(e):[];return Qe(Se,{label:c("Main color"),icon:Qe(My,{}),hint:n?c(Wy[n.grade]):void 0,value:e.accent,onChange:s=>t({...e,accent:s}),children:a.length>0?Qe("div",{className:"w-full min-w-0",children:Hy("div",{className:"sf-readability",children:[Qe("p",{className:"sf-readability-advice",children:Ky(o,!0)}),Qe("div",{className:"sf-readability-suggestions",children:a.map(s=>{let r=Xe(s,tr(e));return Qe($y,{content:c("Use {colour}",{colour:s.toUpperCase()}),children:Qe(Uy,{variant:"secondary",className:"sf-readability-suggestion",leftIcon:Qe("span",{className:"sf-readability-chip",style:{background:s},"aria-hidden":!0}),onClick:()=>t({...e,accent:s}),children:r?`${r.toFixed(1)}:1`:s.toUpperCase()})},s)})})]})}):null})}function Ky(e,t){return e?e==="good"?c("This color reads clearly on your pages."):t?c("This color is hard to read on this theme's page. The buttons below are the same hue, darkened."):c("This color is hard to read on your page background. Pick one further from it \u2014 lighter if your pages are dark, deeper if they are light."):c("Pick a color to see how it reads.")}import{ButtonIcon as qy,ChevronDownIcon as cd,ChevronUpIcon as Zy,GroundIcon as Jy,LayoutIcon as Qy,SquareIcon as eS,TextSmallIcon as tS,TypeIcon as ld}from"efficient-easel/icons";var kn=e=>c("Theme {n}",{n:e+1});function ud({colors:e}){let t=ce(e),n=Hs(e)??t.accent;return et("span",{className:"sf-theme-page",style:{background:t.background,color:t.text},"aria-hidden":!0,children:[k("span",{className:"sf-theme-eyebrow",style:{color:t.muted},children:c("label")}),et("span",{className:"sf-theme-headline",children:[c("Heading")," ",k("span",{style:{color:t.accent},children:c("main")})]}),k("span",{className:"sf-theme-body",children:c("body text")}),et("span",{className:"sf-theme-row",children:[k("span",{className:"sf-theme-btn",style:{background:n,color:Ms(e,t.accent)},children:c("button")}),k("span",{className:"sf-theme-mini",style:{background:t.surface,borderColor:t.line},children:c("card")})]})]})}var or={"Text color":k(ld,{}),"Label color":k(tS,{}),Background:k(Jy,{}),"Panels & cards":k(Qy,{}),Borders:k(eS,{}),"Button color":k(qy,{}),"Button text color":k(ld,{})};function nS({label:e,colorKey:t,value:n,onChange:o,idPrefix:a="sf-theme-ink"}){let s=`${a}-${t}`;return k(Se,{label:c(e),icon:or[e],id:s,value:n,onChange:r=>o(t,r)})}function oS({value:e,accent:t,onChange:n,idPrefix:o="sf-theme-ink"}){let a=`${o}-button`,s=e!==void 0&&Vy(e)===e.toLowerCase(),r=s?e:t;return k(Se,{label:c("Button color"),icon:or["Button color"],id:a,value:r,caption:s?r:c("Main"),onChange:n})}function aS({colors:e,accent:t,onChange:n,idPrefix:o="sf-theme-ink"}){let a=`${o}-button-ink`,s=eu(e),r=Ms(e,t),i=Hs(e)??t,l=jt(Xe(r,i)??0);return k(Se,{label:c("Button text color"),icon:or["Button text color"],hint:s&&l!=="good"?c("{grade} on the button",{grade:c(Kt[l])}):void 0,id:a,value:r,caption:s?r:c("Auto"),onChange:n})}var sS=[{colour:!0},{label:"Text color",key:"text"},{label:"Label color",key:"muted"},{button:!0},{buttonInk:!0},{moduleBreak:!0},{label:"Background",key:"background"},{label:"Panels & cards",key:"surface"},{label:"Borders",key:"line"}];function ar({colors:e,onChange:t,idPrefix:n}){let o=ce(e);return k(jy,{children:sS.map(a=>"colour"in a?k(id,{value:e,onChange:t},"colour"):"moduleBreak"in a?k("div",{className:"sf-theme-module-break","aria-hidden":"true"},"module-break"):"button"in a?k(oS,{value:e.button,accent:o.accent,onChange:s=>t({...e,button:s}),idPrefix:n},"button"):"buttonInk"in a?k(aS,{colors:e,accent:o.accent,onChange:s=>t({...e,buttonInk:s}),idPrefix:n},"buttonInk"):k(nS,{label:a.label,colorKey:a.key,value:o[a.key],onChange:(s,r)=>t({...e,[s]:r}),idPrefix:n},a.key))})}function No({index:e,colors:t,selected:n,role:o="radio",open:a,editable:s=!0,onPick:r,onEdit:i,onChangeColors:l}){let u=ce(t),d=kn(e),p=e<Bs.length&&!t.brandInk?Bs[e]:null,f=jt(Xe(u.text,u.background)??0),m=p?JSON.stringify(t)!==JSON.stringify(p):!1,b=a!==void 0;return et("div",{className:`sf-theme-card${n?" is-selected":""}`,children:[k("button",{type:"button",role:o,"aria-checked":o==="radio"?n:void 0,"aria-selected":o==="option"?n:void 0,"aria-label":d,className:"sf-theme-pick",onClick:r,children:k(ud,{colors:t})}),et("div",{className:"sf-theme-foot",children:[k("span",{className:"sf-theme-name",children:d}),f!=="good"&&k("span",{className:"sf-theme-warn",children:c(Kt[f])}),s&&i&&b&&k("span",{className:"sf-theme-edit",children:k(Xy,{content:a?c("Collapse"):c("Edit colors"),children:k(Yy,{size:"sm","aria-expanded":a,"aria-controls":`sf-theme-colours-${e}`,"aria-label":a?c("Collapse {name}",{name:d}):c("Edit colors for {name}",{name:d}),onClick:i,children:a?k(Zy,{size:14}):k(cd,{size:14})})})}),s&&i&&!b&&k(nr,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":c("Edit {name}",{name:d}),onClick:i,children:c("Edit")})]}),a&&et("div",{id:`sf-theme-colours-${e}`,className:"sf-theme-colours",children:[k(ar,{colors:t,onChange:y=>l?.(y)}),p&&k(nr,{variant:"link",size:"sm",className:"sf-theme-reset",disabled:!m,onClick:()=>l?.({...p}),children:m?c("Reset {name} to the preset",{name:d}):c("Not changed")})]})]})}function dd({colors:e,name:t,nameId:n,open:o,menuId:a,labelId:s,buttonRef:r,onClick:i,onKeyDown:l,onEdit:u}){return et("div",{className:"sf-secttheme-btn",children:[k("button",{ref:r,type:"button",className:"sf-theme-pick","aria-expanded":o,"aria-controls":a,"aria-labelledby":`${s} ${n}`,onClick:i,onKeyDown:l,children:e?k(ud,{colors:e}):k("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),et("div",{className:"sf-theme-foot",children:[k("span",{id:n,className:"sf-theme-name",children:t}),u&&k(nr,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":c("Edit {name}",{name:t}),onClick:u,children:c("Edit")}),k("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:i,children:k(cd,{size:12,className:"sf-multi-caret","aria-hidden":"true"})})]})]})}import{useCallback as cr,useEffect as gd,useRef as Do}from"react";import{currentEaselSession as cS}from"efficient-easel/screen/lib/session";import{backendOf as rS}from"efficient-easel/screen/lib/session";var xe=rS,pN=e=>e.blocks;import{useEaselSession as uS}from"efficient-easel/screen/lib/session-context";import{useSyncExternalStore as iS}from"react";var fd,sr=null,bt=null,Lo=0,rr=new Set;function ir(e){fd=e;for(let t of rr)t()}function hN(e){sr=e,Lo+=1,bt&&clearTimeout(bt),bt=null,ir(void 0)}function gN(e){Lo+=1,ir(e)}function md(e=250){sr&&(bt&&clearTimeout(bt),bt=setTimeout(()=>{bt=null;let t=sr;if(!t)return;let n=++Lo;t().then(o=>{n===Lo&&ir(o)}).catch(()=>{})},e))}function pd(){return fd}function lS(e){return rr.add(e),()=>{rr.delete(e)}}function bN(){return iS(lS,pd,pd)}var lr=new Set;function hd(e){return lr.add(e),()=>{lr.delete(e)}}async function SN(){let e=(await Promise.allSettled([...lr].map(async t=>t()))).find(t=>t.status==="rejected");if(e)throw e.reason}import{WebsiteBackendError as dS}from"efficient-easel/screen/lib/backend-error";function bd(e=cS()){return(t,n,o)=>{let a=xe(e).theme;return a?a.update(t,o?{siteId:o}:void 0):Promise.reject(new dS("invalid","This backend stores no site theme."))}}function yd(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function pS(e,t=bd()){let{themeFromDocument:n,token:o,siteId:a,patch:s}=e,r=yd({themeFromDocument:n,token:o});if(r)return r;if(Object.keys(s).length===0)return{status:"skipped",reason:"empty"};try{return await t(s,o,a??void 0),{status:"saved"}}catch(i){return{status:"failed",error:i}}}function Fo({themeFromDocument:e,tokenRef:t,siteId:n,onResult:o}){let a=Do(null),s=Do({}),r=uS(),i=Do(o);i.current=o;let l=Do(null),u=cr(f=>{if(f.status==="skipped"){let m=`skipped:${f.reason}`;if(l.current===m)return;l.current=m}else l.current=null;i.current?.(f)},[]),d=cr(async()=>{a.current&&(clearTimeout(a.current),a.current=null);let f=s.current;s.current={};let m=await pS({themeFromDocument:e,token:t?.current,siteId:n,patch:f},bd(r));return u(m),m.status==="saved"&&md(),m.status==="failed"&&(s.current={...f,...s.current}),m},[e,t,n,u,r]),p=cr((f,m=!1)=>{let b=yd({themeFromDocument:e,token:t?.current});if(b){u(b);return}s.current={...s.current,...f},a.current&&clearTimeout(a.current),m?d():a.current=setTimeout(()=>{d()},500)},[e,t,d,u]);return gd(()=>()=>{d()},[d]),gd(()=>hd(async()=>{if(!a.current&&Object.keys(s.current).length===0)return;let f=await d();if(f.status==="failed")throw f.error}),[d]),{persist:p,flush:d}}var _S="Follow the page",$N="Follow the slideshow",ES=e=>c("Editing {name} changes it everywhere.",{name:e});function TS({colors:e}){if(!e)return Y("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});let t=ce(e);return yt("span",{className:"sf-secttheme-chip","aria-hidden":"true",children:[Y("i",{style:{background:t.background}}),Y("i",{className:"sf-secttheme-chip-accent",style:{background:t.accent}})]})}function xS({themes:e,value:t,onPick:n,onEdit:o,menuId:a,followLabel:s}){return yt("div",{className:"sf-multi-menu sf-secttheme-menu",id:a,role:"listbox",children:[s!==void 0&&yt(fS,{children:[yt("button",{type:"button",role:"option","aria-selected":t===null,className:`sf-secttheme-item${t===null?" is-active":""}`,onClick:()=>n(fu),children:[Y(TS,{}),Y("span",{className:"sf-secttheme-name",children:c(s)})]}),Y("div",{className:"sf-secttheme-sep",role:"presentation"})]}),t!==null&&e[t]&&Y("p",{className:"sf-secttheme-oncard",role:"presentation",children:c("{name} is on this section",{name:kn(t)})}),e.map((r,i)=>i===t?null:Y(No,{role:"option",index:i,colors:r,selected:!1,onPick:()=>n(i),onEdit:o?()=>o(i):void 0},i))]})}function vS({index:e,colors:t,onChange:n,onDone:o}){let a=kn(e),s=Td();return yt("div",{className:"sf-secttheme-sheet",children:[yt("div",{className:"sf-secttheme-sheet-head",children:[Y("span",{children:a}),Y(gS,{variant:"secondary",className:"sf-secttheme-done",onClick:o,children:c("Done")})]}),Y("div",{className:"sf-secttheme-rows",children:Y(ar,{colors:t,onChange:n,idPrefix:s})}),Y("p",{className:"sf-secttheme-warn",children:ES(a)})]})}function xd({value:e,onChange:t,followLabel:n,hint:o,canEdit:a=!0}){let{theme:s,setTheme:r}=B(),i=ke(s),l=mS(SS),u=l?.tokenRef,d=l?.siteId??null,p=!l?.capabilities?.hasSiteTheme,{persist:f,flush:m}=Fo({themeFromDocument:p,tokenRef:u,siteId:d}),b=ke(i),y=b.themes,E=gt(e),S=E!==null?y[E]:void 0,T=S??(y.length?Wt(b):void 0),[x,v]=Ed(!1),[w,I]=Ed(null),C=_d(null),D=_d(null),z=Td(),Te=Sd(()=>{v(!1),I(null)},[]),uo=Sd(()=>{!x&&w===null||(m(),Te())},[x,w,Te,m]);bS(C,uo);let po=X=>{t(X),Te()},fo=X=>{if(w===null)return;let Vb=y.map((Yb,Xb)=>Xb===w?X:Yb),xs={...b,themes:Vb};r(xs),f({selected_preset:xs.selected,theme_presets:xs.themes})};return yt("div",{className:"sf-secttheme",ref:C,children:[Y(yS,{label:c("Theme"),icon:Y(hS,{}),labelId:`${z}-label`,hint:o,children:Y(dd,{colors:T,onEdit:a&&E!==null?()=>{I(E),v(!1)}:void 0,name:S?kn(E):c(n??_S),nameId:`${z}-value`,labelId:`${z}-label`,open:x,menuId:z,buttonRef:D,onClick:()=>{I(null),v(X=>!X)},onKeyDown:X=>{X.key==="Escape"&&(x||w!==null)&&(X.preventDefault(),Te())}})}),x&&w===null&&Y("div",{onKeyDown:X=>{X.key==="Escape"&&(X.preventDefault(),Te(),D.current?.focus())},children:Y(xS,{themes:y,value:E,onPick:po,onEdit:a?X=>{I(X),v(!1)}:void 0,menuId:z,followLabel:n})}),a&&w!==null&&y[w]&&Y(vS,{index:w,colors:y[w],onChange:fo,onDone:()=>{m(),Te(),D.current?.focus()}})]})}import{defaultTextStyles as np,textStyleCaseCss as X_}from"efficient-easel/text-styles/model";import{resolveViewValue as op}from"efficient-easel/draw";import{VIEW_DESKTOP_MIN as vd,VIEW_TABLET_MIN as wd}from"efficient-easel/draw";var Bo=.02,Cd=`(min-width: ${En}px) and (max-width: ${vd-Bo}px)`,Od=`(max-width: ${En-Bo}px)`,Ho=`(min-width: ${wd}px) and (max-width: ${vd-Bo}px)`,Mo=`(max-width: ${wd-Bo}px)`;import{textStyleCaseCss as KS,textStyleCaseOfCss as jS,viewKeyAt as qd}from"efficient-easel/draw";function Uo(e,t){return t?`${e}[${t.index}].${t.rowKey}`:e}function wS(e){let t=/^([A-Za-z0-9_$]+)\[(\d+)\]\.([A-Za-z0-9_$]+)$/u.exec(e);return t?{key:t[1],row:{index:Number(t[2]),rowKey:t[3]}}:{key:e,row:null}}import{decodePartId as fr,encodePartId as b1}from"efficient-easel/draw";import{LINK_FIELD_MARKER as Hd,SCAFFOLD_FIELD_MARKER as Fd,TEXT_FIELD_MARKER as Wo}from"efficient-easel/draw";import{readHidable as Md}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as HS}from"efficient-easel/draw";var Pd={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},kd={Events:["posts"],SubscribeBlogs:["posts"]};var CS=["anchor"],OS=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function An(e){return CS.includes(e)||OS.test(e)}var PS={Gallery:{source:{verb:"snapshot",keep:[]}},ProductHero:{source:{verb:"snapshot",keep:[]}},SpecTable:{source:{verb:"snapshot",keep:[]},wheel:{verb:"reference"},finish:{verb:"reference"},size:{verb:"reference"}},CollectionCard:{collection:{verb:"snapshot",keep:[]}},FooterMenu:{menu:{verb:"snapshot",keep:[]}},MenuBlock:{menu:{verb:"snapshot",keep:[]}},ProductGrid:{design_codes:{verb:"reference"}},ProductRef:{code:{verb:"reference"},finish:{verb:"reference"}},FitmentTable:{wheel:{verb:"reference"}},GalleryItem:{fromProduct:{verb:"reference"}},Footprint:{"offices[].group":{verb:"groupKey"},"offices[].lat":{verb:"pii"},"offices[].lng":{verb:"pii"},"offices[].geocode":{verb:"pii"}}};PS.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var ZN=Object.fromEntries(Object.entries(Pd).map(([e,t])=>[e,Object.keys(t)])),JN=Object.fromEntries(Object.entries(kd).map(([e,t])=>[e,[...t]]));var ur="__ownBox";function Ad(e){return!!e&&typeof e=="object"&&e[ur]===!0}var dr="sfPanelOnly";function $o(e){return!!e&&typeof e=="object"&&e[dr]===!0}import{TEXT_FIELD_MARKER as LS}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as Rd}from"efficient-easel/draw";import{readHidable as Id}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as kS}from"efficient-easel/draw";var AS=kS,RS=["text","textarea"],IS=["textarea","plainTextarea"];function NS(e){return!e||typeof e!="object"?null:e[Rd]?.control??null}function Nd(e){let t=NS(e);return t&&AS.includes(t)?t:null}function s1(e){return IS.includes(e)}function r1(e){return!e||typeof e!="object"?void 0:e[Rd]?.placeholder}function Go(e){return Id(e).text}function pr(e,t,n){return RS.includes(e)?{text:n,hidden:Id(t).hidden}:n}function i1(e,t,n,o){return Go(e[t])===o?null:{...e,[t]:pr(n,e[t],o)}}function Ld(e){if(!(!e||typeof e!="object"))return e[LS]}function DS(e){if(!e||typeof e!="object")return null;let t=e.arrayFields;return t&&typeof t=="object"?t:null}function Dd(e,t){if(!Array.isArray(t))return[];let n=Ld(e),o=[];if(n?.control==="textList"){let s=n.itemKey??"text";return t.forEach((r,i)=>{let l=W(r?.[s]);l&&o.push({row:{index:i,rowKey:s},text:l})}),o}let a=DS(e);return a?(t.forEach((s,r)=>{for(let[i,l]of Object.entries(a)){if(!Nd(l))continue;let u=Go(s?.[i])||Ld(l)?.placeholder||"";u&&o.push({row:{index:r,rowKey:i},text:u})}}),o):[]}function FS(e,t){if(Array.isArray(e))return e[t.index]?.[t.rowKey]}function BS(e,t,n,o){let a=e[t];return!Array.isArray(a)||n.index<0||n.index>=a.length?null:{...e,[t]:a.map((s,r)=>r===n.index?{...s,[n.rowKey]:o}:s)}}function f1(e,t,n,o,a){let s=FS(e[t],n);return Go(s)===a?null:BS(e,t,n,pr(o,s,a))}function m1(e,t){return t?`${e} \xB7 row ${t.index+1}`:e}var O1="data-sf-part",P1="data-sf-region-part",k1="data-sf-part-row";function A1(e,t){return`${e}[${t}]`}var R1="data-sf-part-kind",MS="data-sf-part-style-owner",US="data-sf-part-style-kind";function I1(e){for(let t=e;t;t=t.parentElement){let n=t.getAttribute(MS),o=t.getAttribute(US);if(n&&o)return{owner:n,kind:o};if(t.getAttribute("data-easel-block"))return null}return null}var Bd=2;function Zt(e){return vs(e).replace(/\s+/gu,"")}function zo(e,t,n){let o=e[Wo];if(o){if(o.control==="textList"){let s=o.itemKey??"text";if(!Array.isArray(t))return;for(let r of t){let i=r?.[s];typeof i=="string"&&n.push(i)}return}let{text:a}=Md(t);a?n.push(a):o.placeholder&&n.push(o.placeholder);return}if(!e[Hd]){if(e.type==="text"||e.type==="textarea"){let a=W(t);a&&n.push(a);return}if(e.arrayFields&&Array.isArray(t)){for(let a of t)for(let[s,r]of Object.entries(e.arrayFields))zo(r,a?.[s],n);return}if(e.objectFields&&t&&typeof t=="object")for(let[a,s]of Object.entries(e.objectFields))zo(s,t[a],n)}}function $S(e){if(!e||typeof e!="object")return!1;let t=e;return t[Hd]?!1:!!t[Wo]||t.type==="text"||t.type==="textarea"}function Ud(e,t){let n=e[Wo];return n?.label?n.label:typeof e.label=="string"?e.label:t}function GS(e){let t=e.indexOf(" (");return(t>0?e.slice(0,t):e).trim()}function N1(e,t,n){if(!e)return[];let o=[];for(let[a,s]of Object.entries(e)){if(!s||typeof s!="object"||An(a))continue;let r=s,i=[];zo(r,t?.[a],i),!i.length&&r[Fd]!==void 0&&zo(r,r[Fd],i);let l=Ud(r,a);if(n?.(a)&&$S(r)){i.length&&o.push({key:a,label:l,texts:[],keyed:!0});continue}let u=new Set;for(let{row:f,text:m}of Dd(r,t?.[a])){let b=Zt(m);b.length<Bd||(u.add(b),o.push({key:a,label:l,texts:[b],row:f}))}let d=new Set(u),p=[];for(let f of i){let m=Zt(f);m.length<Bd||d.has(m)||(d.add(m),p.push(m))}p.length&&o.push({key:a,label:l,texts:p})}return o}function zS(e){return!e.offPage&&!e.hidden&&e.panelOnly!==!0}var WS=HS;function $d(e,t){if(!t||typeof t!="object"||An(e)||Ad(t))return null;let n=t[Wo];return!n||!WS.includes(n.control)?null:n}function L1(e,t){let n=$d(e,t);return n!==null&&n.identifier!==!0}function D1(e,t){if(!e)return[];let n=[];for(let[o,a]of Object.entries(e)){let s=$d(o,a);if(!s)continue;let{text:r,hidden:i}=Md(t?.[o]);if(zS({offPage:s.offPage===!0,hidden:!!i,panelOnly:$o(a)}))continue;let l=r||s.placeholder||"",u=vs(l).replace(/\s+/gu," ").trim();n.push({key:o,label:GS(Ud(a,o)),preview:u,offPage:s.offPage===!0,identifier:s.identifier===!0,hidden:!!i})}return n}function Jt(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function Ko(e,t){return Jt(e?.[t])??{}}function Gd(e,t,n){let o=Ko(e,t);return Jt(j(o,n))??{}}function zd(e,t,n,o){let{[n]:a,...s}=Ko(e,t),r=o?{...s,[n]:o}:s,{[t]:i,...l}=e;return Object.keys(r).length?{...l,[t]:r}:l}import{isLengthUnit as Sr}from"efficient-easel/screen/lib/content/length-units";var _r="_partStyles",VS="data-sf-part-styled",jo="data-sf-text-style",YS=/^(heading|body)-[1-7]$/;function Tt(e){return typeof e=="string"&&YS.test(e)}var Vo={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function XS(e){if(!e)return null;for(let[t,n]of Object.entries(Vo))if(n===e)return t;return null}function q1(e){if(Tt(e.textStyle))return e.textStyle;let t=dt(e.role);return t?Vo[t]:void 0}var qS=[400,500,600,700],In=["left","center","right","justify"],mr=5,hr=1e3,ZS=-5,JS=10,QS=0,e_=64,t_=2,Wd={size:{min:mr,max:hr,step:1},sizeTablet:{min:mr,max:hr,step:1},sizePhone:{min:mr,max:hr,step:1},padding:{min:QS,max:e_,step:t_}},n_=.05,o_=.01,a_=["line","letter"],s_=.5,r_=2.5,i_=-1,l_=1,c_=0,u_=400,d_=[...new Set(Object.values(go))];function Z1(e){return[`${e} { transition: translate var(--page-motion-hover-duration) var(--page-ease-media) var(--page-motion-hover-delay) }`,`${e}:hover, ${e}:active { translate: 0 calc(-1 * var(--page-hover-lift)) }`]}function J1(e){return Ko(e,_r)}function p_(e,t){return Gd(e,_r,t)}function Zd(e,t,n){return zd(e,_r,t,f_(n).length?n:null)}function f_(e){return Object.entries(e).filter(([,t])=>t!==void 0)}function m_(e){return a_.includes(e)}var Rn=(e,t,n)=>Math.min(n,Math.max(t,e)),h_=["sizeUnit","sizeUnitTablet","sizeUnitPhone"];function gr(e){let t=qd("sizeUnit",e),n=h_.find(o=>o===t);if(!n)throw new Error(`a part stores no unit key ${t}`);return n}var St={size:gr("desktop"),sizeTablet:gr("tablet"),sizePhone:gr("mobile"),paragraphSpacing:"paragraphSpacingUnit",padding:"paddingUnit"},Jd=Object.values(St);function Ie(e,t){return F(e[St[t]])}function g_(e,t,n={}){if(Jd.includes(e))return Sr(t)&&t!=="px"?t:null;if(ge(St,e)&&Ie(n,e)!=="px"){let o=Et(Number(t),2);return!Number.isFinite(o)||o<0||o===0&&e!=="padding"?null:o}if(m_(e)){let o=Math.round(Number(t));return!Number.isFinite(o)||o===0?null:Rn(o,ZS,JS)}if(e==="lineHeight"){let o=Number(t);return Number.isFinite(o)?Et(Rn(o,s_,r_),3):null}if(e==="letterSpacing"){let o=Number(t);return Number.isFinite(o)?Et(Rn(o,i_,l_),4):null}if(e==="paragraphSpacing"){let o=Math.round(Number(t));return!Number.isFinite(o)||o<=0?null:Rn(o,c_,u_)}if(ge(Wd,e)){let{min:o,max:a}=Wd[e],s=Math.round(Number(t));return Number.isFinite(s)?Rn(s,o,a):null}return e==="italic"?typeof t=="boolean"?t:null:e==="role"||e==="fontRole"?dt(t)?t:null:e==="sizeToken"?Er(t)?t:null:e==="textStyle"?Tt(t)?t:null:e==="alignPhone"||e==="alignTablet"?In.includes(t)?t:null:t}var b_=["weight","size","sizeTablet","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding"];function Qt(e){let t=null,n=o=>{t??={...e},delete t[o]};for(let o of b_){let a=e[o];a!==void 0&&!(typeof a=="number"&&Number.isFinite(a))&&n(o)}e.align!==void 0&&!In.includes(e.align)&&n("align"),e.alignTablet!==void 0&&!In.includes(e.alignTablet)&&n("alignTablet"),e.alignPhone!==void 0&&!In.includes(e.alignPhone)&&n("alignPhone"),e.textStyle!==void 0&&!Tt(e.textStyle)&&n("textStyle"),e.sizeToken!==void 0&&!Er(e.sizeToken)&&n("sizeToken"),e.fontRole!==void 0&&!dt(e.fontRole)&&n("fontRole");for(let o of Jd)e[o]!==void 0&&!Sr(e[o])&&n(o);return t??e}function Er(e){if(!e||typeof e!="object")return!1;let{step:t,px:n,stepPhone:o,pxPhone:a,fluid:s}=e,r=l=>typeof l=="number"&&Number.isFinite(l)&&l>0,i=l=>typeof l=="string"&&d_.includes(l);return i(t)&&r(n)&&(o===void 0||i(o))&&(a===void 0||r(a))&&(s===void 0||y_(s,n))}function y_(e,t){if(!e||typeof e!="object"||Array.isArray(e))return!1;let{minPx:n,vw:o,...a}=e;return Object.keys(a).length===0&&typeof n=="number"&&Number.isFinite(n)&&n>0&&n<t&&typeof o=="number"&&Number.isFinite(o)&&o>0&&o<=100}function Tr(e){return e?.pxPhone&&Er(e)?{step:e.stepPhone??e.step,px:e.pxPhone}:null}function Qd({step:e,px:t,fluid:n}){let o=n?`clamp(${n.minPx}px, ${n.vw}vw, ${t}px)`:`${t}px`,a=`var(--size-${e}, ${o})`;return e.startsWith("heading")?`min(${a}, var(--sf-heading-max,9999px))`:a}var S_=[["font","role"],["font","fontRole"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function __(e){let t=[];for(let[n,o]of S_)n===e?t.push(o):o===e&&t.push(n);return t}function Q1(e,t,n,o){let a={...p_(e,t)},s=o==null?null:g_(n,o,a);if(s===null)delete a[n];else{a[n]=s;for(let r of __(n))delete a[r]}return Zd(e,t,a)}function eL(e,t){return Zd(e,t,{})}function E_(e){return jS(e)??"none"}function T_(e){return KS(e)??""}var Kd={heading:"--font-role-heading",heading2:"--font-role-heading2",heading3:"--font-role-heading3",body:"--font-role-body",accent:"--font-role-accent",label:"--font-role-label"};function x_(e,t){return dt(e.role)||(t?.blockDrawsStyle?null:XS(e.textStyle))}var v_="--sf-part-size-cap";function xr(e,t){return e&&t?.sizeCap?`min(${e}, var(${v_}, ${e}))`:e}function tL(e,t){return e?.[t]===!0}function nL(e,t){return e==="Text"&&t==="text"}var w_={headingLarge:"min(clamp(64px,9vw,144px), var(--sf-heading-max,9999px))",headingMedium:"min(32px, var(--sf-heading-max,9999px))",headingSmall:"min(24px, var(--sf-heading-max,9999px))",accent:"32px",body:"14px",label:"12px"};function C_(e){let t=go[e],n=j(w_,t);return n?`var(--size-${t}, ${n})`:`var(--size-${t})`}function vr(e){let t={};return typeof e.lineHeight=="number"?t.lineHeight=e.lineHeight:e.line&&(t.lineHeight=Et(O_+e.line*n_,3)),typeof e.letterSpacing=="number"?t.letterSpacingEm=e.letterSpacing:e.letter&&(t.letterSpacingEm=Et(e.letter*o_,4)),t}var O_=1,_t="--sf-part-para";function P_(e,t){e=Qt(e);let n={};if(typeof e.sizePhone=="number"&&e.sizePhone>0)n.fontSize=M(e.sizePhone,Ie(e,"sizePhone"));else{let a=Tr(e.sizeToken);if(a)n.fontSize=Qd(a);else{let s=Xo(e);s!==void 0&&(n.fontSize=M(s,Ie(e,"sizeTablet")))}}n.fontSize&&(n.fontSize=xr(n.fontSize,t));let o=e.alignPhone??Yo(e);return o&&(n.textAlign=o),n}function Yo(e){return e.alignTablet&&e.alignTablet!==e.align?e.alignTablet:void 0}function Xo(e){let t=e.sizeTablet!==void 0&&Ie(e,"sizeTablet")!==Ie(e,"size")?e.sizeTablet:He("textSize",e.size,e.sizeTablet,void 0).tablet;return t&&t>0?t:void 0}function k_(e,t){let n=Qt(e),o={},a=Xo(n);a!==void 0&&(o.fontSize=xr(M(a,Ie(n,"sizeTablet")),t));let s=Yo(n);return s&&(o.textAlign=s),o}function oL(e,t){if(t==="desktop")return;let n=Qt(e);return(t==="mobile"?Yo(n):void 0)??n.align}function A_(e,t){if(t==="desktop")return e;let n=Qt(e),o=Xo(n),a=Yo(n);if(t==="tablet"){let i=e;return o!==void 0&&(i={...i,size:o,sizeUnit:n[St.sizeTablet]}),a&&(i={...i,align:a}),i}let s=e;if(typeof n.sizePhone=="number"&&n.sizePhone>0)s={...s,size:n.sizePhone,sizeUnit:n[St.sizePhone]};else{let i=Tr(n.sizeToken);i?s={...s,size:void 0,sizeToken:i}:o!==void 0&&(s={...s,size:o,sizeUnit:n[St.sizeTablet]})}let r=n.alignPhone??a;return r&&(s={...s,align:r}),s}function wr(e,t,n){return Cr(A_(e,t),qo,n)}function R_(e){return qd("size",e)}function aL(e,t){if(t==="desktop")return null;let n=Qt(e);if(t==="mobile"){if(Tr(n.sizeToken))return null;let o=Xo(n);if(o!==void 0)return{px:o,view:"tablet"}}return typeof n.size=="number"&&n.size>0?{px:n.size,view:"desktop"}:null}function ep(e,t){let n=R_(t);if(!ge(e,n))return e;let o={...e};return delete o[n],o}function sL(e,t,n){let o=wr(ep(e,t),t,n);return{fontFamily:o.fontFamily,fontSize:o.fontSize}}function Cr(e,t,n){e=Qt(e);let o=x_(e,n),a=vr(e),s=xr(e.size?M(e.size,Ie(e,"size")):e.sizeToken?Qd(e.sizeToken):o?C_(o):"",n);return{fontFamily:e.font?D_(e.font,n?.fonts):e.fontRole?`var(${Kd[e.fontRole]})`:o?`var(${Kd[o]})`:"",fontWeight:e.weight?String(e.weight):"",fontSize:s,minWidth:s?"0":"",overflowWrap:s?"break-word":"",lineHeight:a.lineHeight!==void 0?String(a.lineHeight):"",letterSpacing:a.letterSpacingEm!==void 0?`${a.letterSpacingEm}em`:"",[_t]:e.paragraphSpacing?M(e.paragraphSpacing,Ie(e,"paragraphSpacing")):"",textTransform:T_(e.case),textAlign:e.align??"",paddingTop:jd(e.padding,Ie(e,"padding")),paddingBottom:jd(e.padding,Ie(e,"padding")),color:I_(e.color),fontStyle:e.italic===!0?"italic":e.italic===!1?"normal":""}}var I_=e=>Po(e),jd=(e,t)=>e===void 0?"":M(e,t),Et=(e,t)=>Number(e.toFixed(t));function rL(e,t){let n=Number.parseFloat(e.fontSize)||16,o=Number.parseFloat(e.lineHeight),a=Number.parseFloat(e.letterSpacing),s=Number.parseFloat(e.paddingTop);return{fontKey:t,sizePx:n,weight:N_(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(o)?Et(o/n,3):1.2,letterEm:Number.isFinite(a)?Et(a/n,4):0,align:L_(e.textAlign),case:E_(e.textTransform),paddingPx:Number.isFinite(s)?Math.round(s):0}}function N_(e){return Number.isFinite(e)?qS.reduce((t,n)=>Math.abs(n-e)<Math.abs(t-e)?n:t):400}function L_(e){for(let t of In)if(t===e)return t;return e==="end"?"right":"left"}function iL(e,t,n=be){let o=Vd(e);if(!o)return"";for(let a of n.options)if(Vd(t(a.cssVar))===o)return a.key;return""}var Vd=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function D_(e,t=be){let n=Oc(e,t);return n?`var(${n.cssVar})`:""}function lL(e,t,n,o){return!t||fr(t)?.nodeId!==e?null:n.find(a=>o(a.getAttribute("class")))??n[0]??null}function F_(e,t){return Jt(j(e,t))??{}}function cL(e,t,n=()=>qo,o=u=>u,a=M_,s="desktop",r=()=>!1,i=()=>!1,l=be){let u=0;for(let{element:d,partId:p}of e){let f=fr(p)?.propKey;if(!f)continue;let m=F_(t,o(f)),b=wr(m,s,{blockDrawsStyle:r(f),sizeCap:i(f),fonts:l});Tt(m.textStyle)?d.setAttribute?.(jo,m.textStyle):d.removeAttribute?.(jo);let y=br.some(S=>d.style[S]),E=!1;for(let[S,T]of Object.entries(b))G_(d,S,T),T&&(E=!0);if(y||br.some(S=>b[S]))for(let S of B_(d,a))for(let T of br)S.style[T]=b[T]??"";E&&(u+=1)}return u}function B_(e,t){let n=Zt(e.textContent??""),o=[],a=e;for(let s=0;s<H_&&t(a);s+=1){let r=a.parentElement;if(!r||Zt(r.textContent??"")!==n)break;o.push(r),a=r}return o}var H_=8;function M_(e){let t=e;return typeof window>"u"||!t?.ownerDocument?!1:window.getComputedStyle(t).display==="inline"}var qo={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0};function U_(e){if(!e||typeof e!="object")return null;let t={};Tt(e.textStyle)&&(t.textStyle=e.textStyle),typeof e.size=="number"&&e.size>0&&(t.size=e.size),typeof e.sizeTablet=="number"&&e.sizeTablet>0&&(t.sizeTablet=e.sizeTablet),typeof e.sizePhone=="number"&&e.sizePhone>0&&(t.sizePhone=e.sizePhone);for(let n of["size","sizeTablet","sizePhone"]){let o=St[n];t[n]!==void 0&&Sr(e[o])&&(t[o]=e[o])}return Object.keys(t).length?t:null}function $_(e,t,n){let o=U_(e);if(!o)return{};let a=wr(o,t,{...n?.sizeCap?{sizeCap:!0}:{},...n?.fonts?{fonts:n.fonts}:{}});return{...a.fontFamily?{fontFamily:a.fontFamily}:{},...a.fontSize?{fontSize:a.fontSize}:{}}}function uL(e){return Tt(e?.textStyle)||!!e?.role||typeof e?.size=="number"&&e.size>0}function dL(e,t,n,o){if(!e||typeof e!="object")return{};let a=Gc(e.role,t,go)??{},s=t.sized?$_(ep(e,n),n,o?{fonts:o}:void 0):{};return{...a,...s}}function pL(e,t,n){n.fontFamily&&e.fontFamily===n.fontFamily&&(e.fontFamily=t.fontFamily),n.fontSize&&e.fontSize===n.fontSize&&(e.fontSize=t.fontSize)}function G_(e,t,n){if(!t.startsWith("--")){e.style[t]=n;return}let o=e.style;typeof o.setProperty=="function"?n?o.setProperty(t,n):o.removeProperty?.(t):o[t]=n;let a=e;t===_t&&(n?a.setAttribute?.(Yd,""):a.removeAttribute?.(Yd))}var Yd="data-sf-part-para",z_=Object.keys(Cr({},qo)),yr=new Set(["color","overflowWrap",_t,"fontStyle"]),br=z_.filter(e=>!yr.has(e));function fL(e,t,n,o=u=>u,a=()=>!1,s=()=>null,r=[],i=()=>!1,l=be){let u=new Map;for(let m of e){let b=Uo(m.key,m.row);for(let y of m.texts){let E=u.get(y);E?(E.keys.add(m.key),E.partKeys.add(b)):u.set(y,{keys:new Set([m.key]),partKeys:new Set([b])})}}let d=new Map;for(let m of new Set([...Object.keys(t),...r])){if(!W_(m))continue;let b=Xd(n,m,Jt(t[m])??{},{blockDrawsStyle:!1,sizeCap:i(m),fonts:l},s(m));b&&d.set(m,b)}let p=m=>{let b=o(m),y=s(b);if(!ge(t,b)&&!y)return null;let E=Jt(t[b])??{};return Xd(n,m,E,{blockDrawsStyle:a(m),sizeCap:i(m),fonts:l},y)},f=new Map;for(let[m,{keys:b,partKeys:y}]of u){let E=y.size===1?[...y][0]:b.size===1?[...b][0]:null;if(!E)continue;let S=p(E);S&&f.set(m,S)}for(let m of e){if(!m.keyed)continue;let b=p(Uo(m.key,m.row));b&&d.set(m.key,b)}return f.size||d.size?{rules:f,kindRules:d,drawn:new Set(u.keys())}:null}function Xd(e,t,n,o,a){let s=Cr(n,qo,o),r=k_(n,o),i=P_(n,o),l=Tt(n.textStyle)?n.textStyle:void 0;return!Object.values(s).some(Boolean)&&!Object.keys(r).length&&!Object.keys(i).length&&!l&&!a?null:{stamp:K_(e,t),declarations:s,...Object.keys(r).length?{tablet:r}:{},...Object.keys(i).length?{phone:i}:{},...l?{textStyle:l}:{},...a?{motion:a}:{}}}function W_(e){return e.startsWith("@")}function mL(e,t){return e?.kindRules.get(t)??null}function K_(e,t){let n=o=>o.replace(/[^A-Za-z0-9_-]+/g,"-");return`${n(e)}~${n(t)}`}function j_(e){return e?{tablet:Cd,phone:Od}:{tablet:Ho,phone:Mo}}function hL(e,{inBox:t=!1}={}){let{tablet:n,phone:o}=j_(t),a=[],s=new Set,r=i=>{let{stamp:l,declarations:u}=i;if(s.has(l))return;s.add(l);let d=Object.entries(u).filter(([,S])=>S!==""),p=S=>S.map(([T,x])=>`${V_(T)}: ${x}`).join("; "),f=`[${VS}="${l}"]`,m=d.filter(([S])=>!yr.has(S)),b=d.filter(([S])=>yr.has(S));m.length&&a.push(`${f}, *:has(> ${f}) { ${p(m)} }`),b.length&&a.push(`${f} { ${p(b)} }`),u[_t]&&(a.push(`*:has(> ${f}) { ${_t}: ${u[_t]} }`),a.push(...Zo(f,`*:has(> ${f})`)));let y=Object.entries(i.tablet??{}).filter(([,S])=>S!=="");y.length&&a.push(`@media ${n} { ${f}, *:has(> ${f}) { ${p(y)} } }`);let E=Object.entries(i.phone??{}).filter(([,S])=>S!=="");E.length&&a.push(`@media ${o} { ${f}, *:has(> ${f}) { ${p(E)} } }`)};for(let i of e.rules.values())r(i);for(let i of e.kindRules.values())r(i);return a.join(`
4
+ `)}function Zo(e,t){let n=`var(${_t})`,o=":is([data-sf-bullet], [data-sf-number])";return[`${e} br:not(br + br) { display: block; content: ""; margin-top: ${n} }`,`${e} ${o}:not(:first-child) { margin-top: ${n} }`,`${e} ${o}:not(:last-child) { margin-bottom: ${n} }`,`:is(${t}) + :is(${t}) { margin-top: ${n} }`]}var V_=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`);function gL(e,t){if(!e)return null;let n=Zt(t),o=e.rules.get(n);if(o)return o;if(n.length<Y_||e.drawn.has(n))return null;let a=null;for(let[s,r]of e.rules)if(s.includes(n)){if(a&&a.stamp!==r.stamp)return null;a=r}return a}var Y_=8;var Or=e=>e==="sentence"?"none":void 0,ap=["font","color","size","sizeTablet","sizePhone","weight","italic","lineHeight","lineHeightTablet","lineHeightPhone","letterSpacing","letterSpacingTablet","letterSpacingPhone","paragraphSpacing","paragraphSpacingTablet","paragraphSpacingPhone","letterCase","largestSize","largestSizeTablet","largestSizePhone"],en=["desktop","tablet","phone"],xt=(e,t)=>U(e,t);function Ar(e,t,n,o=$t()){return op("textSize",t,e.sizeTablet,e.sizePhone,o)[n]}var q_=[["lineSpacing","lineHeight","line"],["letterSpacing","letterSpacing","letter"]];function Pr(e){for(let[t,n,o]of q_)for(let a of en)if(e===xt(t,a))return{key:U(n,a),view:a,spacing:o};return{key:e,view:"desktop",spacing:null}}function Ne(e){let t={};for(let n of ap)e[n]!==void 0&&(t[n]=e[n]);return t}function Rr(e,t){let{auto:n,...o}=e,a=new Set(t??[]),s=ap.filter(r=>a.has(r)&&e.values[r]===void 0);return s.length?{...o,auto:s}:o}function sp(e){let t=e.fonts,n=e.sizes,o=e.typography,a=cu(e.compression),s={"heading-1":{font:W(t.heading),size:O(n.headingLarge),weight:O(o.weight),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Or(o.case),largestSize:O(o.maxPx)},"heading-2":{font:W(t.heading2),size:O(n.headingMedium),weight:O(o.weight2),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Or(o.case2)},"heading-3":{font:W(t.heading3),size:O(n.headingSmall),weight:O(o.weight3),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Or(o.case3)},"body-1":{font:W(t.body),size:O(n.body)},"body-5":{font:W(t.label),size:O(n.label)}};return np().map(({id:r,kind:i,name:l})=>({id:r,kind:i,name:l,values:Ne(s[r]??{})}))}function Ir(e){return Array.isArray(e)&&e.every(t=>t&&typeof t=="object"&&typeof t.id=="string"&&(t.kind==="heading"||t.kind==="body")&&typeof t.name=="string")?e.map(t=>Rr({...t,values:Ne(t.values??{})},Array.isArray(t.auto)?t.auto:void 0)):null}function kL(e){return Ir(e)??[]}function rp(e){return Ir(e)??np().map(({id:t,kind:n,name:o})=>({id:t,kind:n,name:o,values:{}}))}function nn(e,t){let n=sp(t),o=Ir(e);return o?o.map(a=>{let s={...kr(n,a.id)};for(let r of a.auto??[])delete s[r];return{...a,values:Ne({...s,...a.values})}}):n}var kr=(e,t)=>e.find(n=>n.id===t)?.values??{},tp=["heading-1","heading-2","heading-3"];function ip({saved:e,old:t,cur:n,next:o,sizeOf:a,panelView:s="desktop"}){let r=sp(t),i=rp(e),l=nn(i,t),u=[],d=o.map(f=>{let m=n.find(w=>w.id===f.id),b=i.find(w=>w.id===f.id);if(!m||!b){let w=Z_([f],a,s)[0],I=w.values.color;return I===void 0?w:{...w,values:{...w.values,color:Ue(I)}}}let y={...b.values},E=new Set(b.auto??[]),S=f.values,T=m.values,x=[...new Set([...Object.keys(S),...Object.keys(T)])].filter(w=>JSON.stringify(S[w])!==JSON.stringify(T[w])),v=w=>Pr(w).spacing==="letter";x.sort((w,I)=>Number(v(w))-Number(v(I)));for(let w of x){let{key:I,view:C,spacing:D}=Pr(w),z=I,Te=S[w];if(Te===void 0){delete y[z],kr(r,f.id)[z]!==void 0&&(u.push([f.id,z]),E.add(z));continue}if(E.delete(z),D==="line")y[z]=tn(Te/100,3);else if(D==="letter"){let uo={...l.find(X=>X.id===f.id)?.values??{}};for(let X of x)S[X]===void 0&&delete uo[Pr(X).key];let po=Ne({...uo,...y}),fo=Ar(po,a({...f,values:po}),C);y[z]=fo?tn(Te/fo,4):0}else y[z]=Te}return Rr({id:f.id,kind:f.kind,name:f.name,values:Ne(y)},E)}),p=t.compression;if(u.some(([f,m])=>(m==="lineHeight"||m==="letterSpacing")&&tp.includes(f))&&ht(p)!=="normal"){for(let f of tp){let m=d.find(y=>y.id===f);if(!m)continue;let b={...m.values};for(let y of["lineHeight","letterSpacing"])u.some(([E,S])=>E===f&&S===y)||b[y]===void 0&&!(m.auto??[]).includes(y)&&(b[y]=kr(r,f)[y]);m.values=Ne(b)}p="normal"}return{saved:d,old:{...t,compression:p}}}function lp(e,t){let n={text_styles:e.saved};return e.old.compression!==t.compression&&(n.heading_compression=ht(e.old.compression)),n}var tn=(e,t)=>Number(e.toFixed(t)),cp=(e,t)=>en.indexOf(e)<en.indexOf(t)?t:e;function up(e,t,n="desktop"){return e.map(o=>{let a={...o.values},s=t(o);for(let r of en){let i=U("lineHeight",r),l=o.values[i],u=o.values[U("letterSpacing",r)];delete a[i],l!==void 0&&(a[xt("lineSpacing",r)]=tn(l*100,1));let d=cp(r,n);u!==void 0&&(a[xt("letterSpacing",r)]=tn(u*Ar(o.values,s,d),d===r?2:4))}return{id:o.id,kind:o.kind,name:o.name,values:a}})}function Z_(e,t,n="desktop"){return e.map(o=>{let a=o.values,s={...a};for(let u of en)delete s[xt("lineSpacing",u)],delete s[xt("letterSpacing",u)];let r={id:o.id,kind:o.kind,name:o.name,values:Ne(s)},i={...r.values},l=t({...r,values:{...r.values}});for(let u of en){let d=a[xt("lineSpacing",u)],p=a[xt("letterSpacing",u)];if(typeof d=="number"&&(i[U("lineHeight",u)]=tn(d/100,3)),typeof p=="number"){let f=Ar(r.values,l,cp(u,n));i[U("letterSpacing",u)]=f?tn(p/f,4):0}}return{...r,values:Ne(i)}})}function AL(e,t=be){let n={fonts:_n({heading:e.heading_font??void 0,heading2:e.heading_2_font??void 0,heading3:e.heading_3_font??void 0,body:e.body_font??void 0,accent:e.accent_font??void 0,label:e.label_font??void 0},t),sizes:Us({headingLarge:e.heading_size_large_px,headingMedium:e.heading_size_medium_px,headingSmall:e.heading_size_small_px,accent:e.accent_size_px,body:e.body_size_px,label:e.label_size_px}),compression:ht(e.heading_compression),typography:du(e)},o=e.text_styles??null,a=Array.isArray(o)?Nr(nn(o,n),n):n;return{fonts:_n(a.fonts,t),sizes:Us(a.sizes),compression:ht(a.compression),typography:a.typography,textStyles:o}}function Nr(e,t){let n=f=>e.find(m=>m.id===f)?.values??{},o=n("heading-1"),a=n("heading-2"),s=n("heading-3"),r=n("body-1"),i=n("body-5"),l=t.fonts,u=t.sizes,d=t.typography,p=f=>f==="none"?"sentence":"authored";return{fonts:{...l,heading:o.font??l.heading,heading2:a.font??o.font??l.heading2,heading3:s.font??o.font??l.heading3,body:r.font??l.body,label:i.font??l.label},sizes:{...u,headingLarge:o.size??null,headingMedium:a.size??null,headingSmall:s.size??null,body:r.size??null,label:i.size??null},compression:t.compression,typography:{...d,case:p(o.letterCase),weight:o.weight??null,maxPx:o.largestSize??null,weight2:a.weight??null,weight3:s.weight??null,case2:p(a.letterCase),case3:p(s.letterCase)}}}function RL(e,t=be){let n=[];for(let o of e){let a=o.values,s=`.${ku(o)}`,r=`[${jo}="${o.id}"]`,i=`${s}, ${r}`,l=[],u=a.font!==void 0?t.byKey.get(a.font)?.cssVar:void 0;if(u&&l.push(`font-family: var(${u})`),a.size!==void 0){let m=a.largestSize!==void 0?Math.min(a.size,a.largestSize):a.size;l.push(`font-size: ${m}px`)}let d=Po(a.color);d&&l.push(`color: ${d}`),a.italic===!0&&l.push("font-style: italic"),a.weight!==void 0&&l.push(`font-weight: ${a.weight}`);let p=[];a.lineHeight!==void 0&&p.push(`line-height: ${a.lineHeight}`),a.letterSpacing!==void 0&&p.push(`letter-spacing: ${a.letterSpacing}em`),o.kind==="body"&&l.push(...p);let f=X_(a.letterCase);f&&o.kind==="body"&&l.push(`text-transform: ${f}`),a.paragraphSpacing&&l.push(`--sf-part-para: ${a.paragraphSpacing}px`),l.length&&n.push(`${i} { ${l.join("; ")} }`),o.kind==="heading"&&p.length&&n.push(`${i}, ${s}:is(h1, h2, h3, h4), ${r}:is(h1, h2, h3, h4) { ${p.join("; ")} }`),o.kind==="heading"&&f&&n.push(`${r}, ${s}:is(h1, h2, h3, h4) { text-transform: ${f} }`),a.paragraphSpacing&&(n.push(`*:has(> ${r}) { --sf-part-para: ${a.paragraphSpacing}px }`),n.push(...Zo(`:is(${i})`,`*:has(> ${r})`))),n.push(...J_(o,i,s,r))}return n.join(`
5
+ `)}function J_(e,t,n,o){let a=e.values,s=He("textSize",a.size,a.sizeTablet,a.sizePhone),r=He("textSize",a.largestSize,a.largestSizeTablet,a.largestSizePhone),i=He("same",a.lineHeight,a.lineHeightTablet,a.lineHeightPhone),l=He("same",a.letterSpacing,a.letterSpacingTablet,a.letterSpacingPhone),u=He("spacing",a.paragraphSpacing,a.paragraphSpacingTablet,a.paragraphSpacingPhone),d=op("textSize",a.size,a.sizeTablet,a.sizePhone,$t()),p=Q_[e.id],f=[];for(let[m,b]of[["tablet",Ho],["phone",Mo]]){let y=[],E=[],S=d[m],T=r[m],x=s[m]===void 0&&T===void 0||S===void 0?void 0:T===void 0?S:Math.min(S,T);x!==void 0&&E.push(`font-size: ${x}px`);let v=[];i[m]!==void 0&&v.push(`line-height: ${i[m]}`),l[m]!==void 0&&v.push(`letter-spacing: ${l[m]}em`),e.kind==="body"&&E.push(...v),u[m]!==void 0&&E.push(`--sf-part-para: ${u[m]}px`),E.length&&y.push(`${t} { ${E.join("; ")} }`),e.kind==="heading"&&v.length&&y.push(`${t}, ${n}:is(h1, h2, h3, h4), ${o}:is(h1, h2, h3, h4) { ${v.join("; ")} }`),u[m]!==void 0&&y.push(`*:has(> ${o}) { --sf-part-para: ${u[m]}px }`),u[m]!==void 0&&!a.paragraphSpacing&&y.push(...Zo(`:is(${t})`,`*:has(> ${o})`)),x!==void 0&&p&&y.push(`.sf-themed-content { --size-${p}: ${x}px !important }`),y.length&&f.push(`@media ${b} { ${y.join(" ")} }`)}return f}var Q_=Object.fromEntries(Object.entries(Au).map(([e,{step:t}])=>[e,t]));function IL(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function NL(e){return e?Vo[e]:void 0}function eE(e){let t=vr(e);return Ne({font:e.font,color:e.color===void 0?void 0:Ue(e.color),size:e.size,weight:e.weight,italic:e.italic,lineHeight:t.lineHeight,letterSpacing:t.letterSpacingEm,paragraphSpacing:e.paragraphSpacing,letterCase:e.case})}function LL(e){return Object.keys(eE(e)).length>0}function DL({saved:e,old:t,styleId:n,values:o}){let a=rp(e);return{saved:tE(a,n,o),old:t}}function tE(e,t,n){return e.map(o=>o.id===t?Rr({...o,values:Ne({...o.values,...n})},o.auto):o)}import{jsx as nE}from"react/jsx-runtime";import{useMemo as oE,useState as aE}from"react";import{TextStylesList as sE}from"efficient-easel/text-styles";import{usePreviewDevice as rE}from"efficient-easel/draw/client";var dp=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],iE=["size","lineSpacing","letterSpacing","letterCase"],lE=500;function Jo(e=be){return Cc(e).map(t=>({value:t.key,label:t.label,family:`var(${t.cssVar})`,italic:t.italicLoaded}))}var KL=Jo();function pp({saved:e,old:t,colours:n,colourNameOf:o,sizeOf:a,onChange:s,openId:r,onOpenChange:i,readOnly:l=!1,withoutSize:u=!1,onPick:d}){let p=rE(),f=On(),m=oE(()=>Jo(f),[f]),[b,y]=aE(null),E=nn(e,t),S=vo(p),T=up(E,a,S);return nE(sE,{styles:T,onChange:x=>s(ip({saved:e,old:t,cur:T,next:x,sizeOf:a,panelView:S})),fonts:m,colours:n,colourNameOf:o,settings:u?dp.filter(x=>x!=="size"):dp,auto:iE,openId:r===void 0?b:r,onOpenChange:i??y,readOnly:l,device:S,onPick:d?x=>{let v=E.find(w=>w.id===x.id);v&&d(v)}:void 0,fallback:x=>{let v=E.find(I=>I.id===(x.kind==="heading"?"heading-1":"body-1")),w={};return v?.values.font&&x.id!==v.id&&(w.font=v.values.font),x.kind==="heading"&&(w.weight=lE),w}})}var fp="background";function mp(e){let t=ce(Wt(e));return ju({main:t.accent,text:t.text,background:t.background,muted:t.muted}).map(n=>({key:n.name,name:n.label??n.name,value:n.value}))}function hp(e){return mp(e).filter(t=>t.key!==fp)}function gp(e){let t=mp(e).filter(n=>n.key===fp);return n=>{let o=Ue(n);return t.find(a=>a.key===o)?.value??o}}import{useEasel as cE}from"efficient-easel/easel";function bp({themeFromDocument:e,persist:t}){let{appState:n,dispatch:o}=cE(C=>C),{fonts:a,setFonts:s,sizes:r,setSizes:i,headingCompression:l,setHeadingCompression:u,headingTypography:d,setHeadingTypography:p,textStyles:f,setTextStyles:m}=B(),b=n.data,y=b.root?.props??{},E=e?_n(y.fonts):a,S=e?ou:r,T=e?ht(y.headingCompression):l,x=e?uu(y.headingTypography):d,v={fonts:E,sizes:S,compression:T,typography:x},w=e?y.textStyles:f,I=C=>o({type:"replaceRoot",root:{...b.root,props:{...y,...C}},recordHistory:!0});return{fonts:E,sizes:S,compression:T,typography:x,old:v,saved:w,write:(C,D)=>{let z=Nr(nn(C.saved,C.old),C.old);e?I({textStyles:C.saved,fonts:z.fonts,headingCompression:z.compression,headingTypography:z.typography}):(m(C.saved),s(z.fonts),i(z.sizes),u(z.compression),p(z.typography)),t(lp(C,v),D)},writeRoot:I}}import{jsx as L,Fragment as Sn,jsxs as Ut}from"react/jsx-runtime";import{useEasel as Kb,useRootFields as hI}from"efficient-easel/easel";import{Inspector as gI}from"efficient-easel/fields";import{SettingsGroup as bI}from"efficient-easel/panel";import{useEffect as yI,useRef as SI,useState as hc}from"react";import{jsx as vt,Fragment as fE,jsxs as mE}from"react/jsx-runtime";import{useState as Ep}from"react";import{SettingsDefaultReset as hE,SettingsField as gE}from"efficient-easel/panel";import{useEaselStrings as bE}from"efficient-easel/strings";import{AddIcon as yE}from"efficient-easel/icons";import{Button as SE}from"efficient-shell/ui";import{iconOf as _E,noGlyph as EE}from"efficient-easel/screen/lib/document/box-fields";import{jsx as Qo,Fragment as uE,jsxs as yp}from"react/jsx-runtime";import{Button as Sp,Dialog as dE}from"efficient-shell/ui";function pE(e){return xn("This site has {n} color theme of its own. Clearing takes them away and puts back the four the shop supplies.","This site has {n} color themes of its own. Clearing takes them away and puts back the four the shop supplies.",e)}function _p({count:e,onCancel:t,onConfirm:n}){return yp(dE,{open:!0,onClose:t,role:"alertdialog",size:"sm",title:c("Clear this site\u2019s colors?"),footer:yp(uE,{children:[Qo(Sp,{variant:"secondary",onClick:t,children:c("Cancel")}),Qo(Sp,{variant:"danger",onClick:n,children:c("Clear colors")})]}),children:[Qo("p",{children:pE(e)}),Qo("p",{className:"mt-2 font-medium",children:c("This cannot be undone.")})]})}var TE=EE("the row's whole content is an action; the gutter names a subject and this row has none \u2014 the button's label is the name GG, 2026-09-23"),xE="Reset color",vE={selected:0,themes:[]};function wE(e){e(vE)}function Tp({value:e,onChange:t}){let n=e?.themes??[],o=n.length===0,a=ke(e),[s,r]=Ep(!1),i=bE(),[l,u]=Ep(null),d=(S,T)=>{t({...a,themes:a.themes.map((x,v)=>v===S?T:x)})},p=Wt(a).accent,f=new Set(a.themes.map(S=>S.brandInk).filter(Boolean)),m=Zc.filter(S=>!f.has(S)).map(S=>Jc(p,S)),b=[...a.themes,...m],y=S=>{if(S<a.themes.length)return t({...a,selected:S});let T=[...a.themes,b[S]];t({...a,themes:T,selected:T.length-1})},E=()=>{let S=[...a.themes,{...ce(a.themes[a.selected])}];t({...a,themes:S,selected:S.length-1}),u(S.length-1)};return mE(fE,{children:[o?null:vt(gE,{label:c(xE),icon:_E(TE),labelId:"sf-theme-reset",action:vt(hE,{label:c("all theme colors"),words:i.panel,changed:!0,onReset:()=>r(!0)})}),s&&vt(_p,{count:n.length,onCancel:()=>r(!1),onConfirm:()=>{r(!1),wE(t)}}),vt("div",{className:"sf-theme-list",role:"radiogroup","aria-label":c("Theme"),children:b.map((S,T)=>vt(No,{index:T,colors:S,selected:T===a.selected,open:l===T&&T<a.themes.length,editable:T<a.themes.length,onPick:()=>y(T),onEdit:()=>u(x=>x===T?null:T),onChangeColors:x=>d(T,x)},T))}),vt(SE,{variant:"secondary",leftIcon:vt(yE,{}),onClick:E,className:"sf-theme-add",children:c("Add new theme")})]})}import{jsx as ls}from"react/jsx-runtime";import{SettingsDefaultReset as EA,SettingsField as TA}from"efficient-easel/panel";import{SquareIcon as xA}from"efficient-easel/icons";import{jsx as g,jsxs as Ke,Fragment as Ve}from"react/jsx-runtime";import{parseOption as vp}from"efficient-shell/format";var Lr=["image","video"],wp={image:"imageFocal",image2:"imageFocal2"},CE={HeroSingle:"image",HeroSlide:"video"};function SD(e,t){return vp(Lr,CE[e],t)}var Cp=["one","side","stacked"],OE="one",_D={one:"One",side:"Side by side",stacked:"Stacked"};function Op(e){return vp(Cp,OE,e)}function xp(e){return e==="one"?1:2}function PE(e,t){if(Cp.includes(e))return e;let n=Op(t);return n==="side"?"stacked":n}function ED(e){let t=Op(e.mediaLayout);return Math.max(xp(t),xp(PE(e.mediaLayoutPhone,t)))}import{cloneElement as Il,createContext as GO,useContext as cg,useEffect as zO,useId as ug,useRef as no,useState as oo}from"react";import{useEasel as as,useSelectedHost as Lt}from"efficient-easel/easel";import{PIN_LENGTH as Za,toDateKey as PW,fromDateKey as kW,parseOption as WO}from"efficient-shell/format";function kE(e){return!!e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.src=="string"}function re(e){return typeof e=="string"?e:kE(e)?e.src:""}function xD(e,t,n){return Dr(e,t.split("."),n)}function Dr(e,t,n){if(t.length===0)return n(e);let[o,...a]=t,s=o.endsWith("[]"),r=s?o.slice(0,-2):o;if(!e||typeof e!="object"||Array.isArray(e))return e;let i=e;if(!(r in i))return e;let l=i[r];if(s){if(!Array.isArray(l))return e;let d=!1,p=l.map(f=>{let m=Dr(f,a,n);return m!==f&&(d=!0),m});return d?{...i,[r]:p}:e}let u=Dr(l,a,n);return u===l?e:{...i,[r]:u}}import{parseOption as kp}from"efficient-shell/format";var AE=["upload","youtube"],RE="upload",OD={upload:"Upload",youtube:"YouTube"},IE=["background","click","scroll"],NE="background",PD={background:"Background",click:"Click to play",scroll:"Follows the scroll"},LE=["none","bar","names"],kD={none:"None",bar:"Bar",names:"Names"};function AD(e,t,n){return n||t==="click"?"none":typeof e=="string"&&LE.includes(e)?e:t==="scroll"?"bar":"none"}function RD(e){return kp(AE,RE,e)}function ID(e){return kp(IE,NE,e)}var Pp=/^[A-Za-z0-9_-]{11}$/,DE=/^(?:www\.|m\.|music\.)?(?:youtube\.com|youtube-nocookie\.com|youtu\.be)$/;function ND(e){let t=typeof e=="string"?e.trim():"";if(!t)return null;if(Pp.test(t))return t;let n;try{n=new URL(/^[a-z]+:\/\//i.test(t)?t:`https://${t}`)}catch{return null}if(n.protocol!=="https:"&&n.protocol!=="http:"||!DE.test(n.hostname))return null;let o=n.pathname.split("/").filter(Boolean),a=n.hostname.endsWith("youtu.be")?o[0]:o[0]==="watch"?n.searchParams.get("v"):o[0]==="embed"||o[0]==="shorts"||o[0]==="live"||o[0]==="v"?o[1]:null;return a&&Pp.test(a)?a:null}function LD(e,t){let n=t==="click"?"autoplay=1&playsinline=1&rel=0":`autoplay=1&mute=1&loop=1&playlist=${e}&controls=0&playsinline=1&rel=0&disablekb=1`;return`https://www.youtube-nocookie.com/embed/${e}?${n}`}function DD(e){return`https://i.ytimg.com/vi/${e}/maxresdefault.jpg`}function FD(e){return`https://i.ytimg.com/vi/${e}/hqdefault.jpg`}var BD="Play video";var Fr={frame:"Video frame",image:"Image"},HD={any:[{field:"loadingShows",is:"image"},{all:[{not:{field:"loadingShows",set:!0}},{field:"poster",set:!0}]}]};function Nn(e){let t=e.loadingShows;return t==="image"?"image":t!=null&&t!==""?"frame":re(e.poster)?"image":"frame"}function MD(e,t="desktop"){let[n,o]=t==="phone"?[e.posterPhone,e.videoFramePhone]:[e.poster,e.videoFrame],[a,s]=Nn(e)==="image"?[n,o]:[o,n];return re(a)||re(s)||void 0}function Ap(e){if(re(e.mediaVideo)){if(Nn(e)==="frame")return re(e.videoFrame)?void 0:re(e.poster)?"frame-missing-image":"frame-missing-surface";if(!re(e.poster))return re(e.videoFrame)?"image-missing-frame":"image-missing-surface"}}var ea="videoFrames",Br="videoFramesNotOwn";function Rp(e,t,n){let o=re(e.mediaVideo);if(!o||!t||Nn(e)!=="frame"||re(e.videoFrame))return;let a=t[o],s=!!re(e.poster);if(a?.state==="ready")return null;if(s)return!a||a.state==="pending"?void 0:"image-no-frame";if(!a)return n?"save-makes-frame":void 0;switch(a.state){case"pending":return a.noted!=="save"&&n?"save-makes-frame":null;case"dark":return"starts-dark";case"outside":return"outside";case"unsupported":return"unsupported";case"failed":return"failed";default:return null}}function FE(e,t){let n=re(e),o=n&&t?t[n]:void 0;return o?.state==="ready"&&o.frame?o.frame:void 0}function UD(e,t,n){let o=n?.[Br];if(!(Array.isArray(o)&&o.includes(e)))return FE(t,n?.[ea])}import{useSyncExternalStore as BE}from"react";function Ip(){let e=new Map,t=new Set,n=o=>(t.add(o),()=>{t.delete(o)});return{get:o=>e.get(o),has:o=>e.has(o),set(o,a){if(!(e.has(o)&&e.get(o)===a)){e.set(o,a);for(let s of t)s()}},use(o){let a=()=>o?e.get(o):void 0;return BE(n,a,a)}}}import{zoneKey as HE}from"efficient-easel/data";var ve="SiteHeader",Ge="SiteFooter",Hr="sections",KD=[ve,Ge],ta=e=>e===ve||e===Ge,jD=e=>HE({parentId:e,slot:Hr});function VD(e,t,n=[]){return{type:e,props:{id:t,[Hr]:n}}}var ME=new Set(["Footer",ve,Ge]);function na(e){let t=new Set,n=!1,o=e.filter(a=>{let s=a?.type??"";return s==="Header"?(n=!0,!1):ME.has(s)?t.has(s)?(n=!0,!1):(t.add(s),!0):!0});return n?o:e}function YD(e,t){return e.some(n=>n?.type===t.type)?e:t.type===ve?[t,...e]:[...e,t]}var Np={[ve]:{max:3,takes:["Flex","Ticker"]},[Ge]:{max:6,takes:["Flex","Prose","Logos","Divider"]}};function XD(e,t,n){if(!ta(e))return!0;let o=Np[e];return n<o.max&&o.takes.includes(t)}function qD(e,t){let n=t,o=n?.props?.id;if(o==null)return null;let a=e?.content;if(!Array.isArray(a))return null;for(let s of a){if(!ta(s?.type))continue;let r=s.props?.[Hr];if(!Array.isArray(r)||!r.some(l=>l?.props?.id===o))continue;let i=Np[s.type];return i.takes.includes(n?.type??"")?r.length>=i.max?{group:s.type,why:"full"}:null:{group:s.type,why:"type"}}return null}import{locateNode as UE}from"efficient-easel/draw";function Mr(e){if(!e)return null;let t=e.lastIndexOf(":");return t>0?{ownerId:e.slice(0,t),slot:e.slice(t+1)}:null}function oa(e,t,n){let o=Mr(n?.zone),a=o?UE(e,t,o.ownerId):null;return a&&o?{...a,slot:o.slot}:null}import{isNode as hT}from"efficient-easel/data";import{convertLength as $E,rowGrid as GE}from"efficient-easel/screen/lib/content/length-units";var V={min:1e3,max:2e3,step:50,default:1600};function zE(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}var Gr="--sf-site-width",Wr=`var(${Gr},${V.default}px)`,oF="100vw",aF=`max-w-[${Wr}]`,sF=`max-w-[${V.default}px]`;function Dp(e){return typeof e!="number"||!Number.isFinite(e)?V.default:Math.round(Math.min(Math.max(e,V.min),V.max))}function rF(e,t){let n=Tn(e,t,"size",V);if(n!==null)return{[Gr]:n};let o=Dp(e);return o===V.default?{}:{[Gr]:`${o}px`}}var ie={min:0,max:80,step:4,default:40,typedMax:Number.POSITIVE_INFINITY},zr="--sf-site-gutter",Le={min:0,max:24,step:4,typedMax:Number.POSITIVE_INFINITY},WE=GE({kind:"spacing"},"vw",ie).max;function Fp(e,t){return e<=t?`${e}px`:`min(${e}px, ${WE}vw)`}var Lp="--sf-site-gutter-phone",KE="max-view-tablet:[--sf-site-gutter:var(--sf-site-gutter-phone)]!",jE="max-view-wide:[&_[data-sf-line~=edge]:not([data-sf-line~=edge]_*)]:[--sf-site-gutter:var(--sf-site-gutter-phone)]",we=`var(${zr},${ie.default}px)`,VE=`px-[${we}]`;var tt={md:`min(24px,${we})`,sm:`min(20px,${we})`,frame:`min(24px,${we})`,tabs:`min(16px,${we})`},iF=[[`max-view-desktop:px-[${tt.md}]`,"max-view-desktop:px-6"],[`max-view-desktop:px-[${tt.tabs}]`,"max-view-desktop:px-4"],[`max-[960px]:px-[${tt.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${tt.md}]`,"max-[900px]:px-6"],[`max-view-wide:px-[${tt.md}]`,"max-view-wide:px-6"],[`max-view-tablet:px-[${tt.sm}]`,"max-view-tablet:px-5"],[`max-view-wide:px-[${tt.sm}]`,"max-view-wide:px-5"],[`max-[640px]:px-[${tt.sm}]`,"max-[640px]:px-5"],[`view-wide:px-[${we}]`,"view-wide:px-10"],[`max-view-tablet:px-[min(24px,${we})]`,"max-view-tablet:px-6"],[`max-view-wide:-mx-[min(20px,${we})]`,"max-view-wide:-mx-5"],[`max-view-tablet:-mx-[min(20px,${we})]`,"max-view-tablet:-mx-5"],[`-mx-[${we}]`,"-mx-10"],[VE,"px-10"]];var wt="sideSpaceOnce",lF="data-sf-side",YE="once";function cF(e){if(!(!e||typeof e!="object"))return e[wt]===!0?YE:void 0}var Bp="max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]";function Kr(e){return Dn[e??"box"]}var aa="[[data-sf-side=once]_&]:max-view-wide:px-[var(--sf-site-gutter-phone,min(24px,var(--sf-site-gutter,40px)))]",Ln="[[data-sf-side=once]_&]:max-view-wide:px-[var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]",sa={"max-[960px]":aa,"max-[900px]":aa,"max-view-desktop":aa,"max-[1100px]":aa,"max-view-wide":Ln,"max-view-tablet":Ln,"max-[720px]":Ln,"max-[640px]":Ln,"max-[800px]":Ln},Ur="var(--sf-pad-site,var(--sf-box-g,var(--sf-site-gutter,40px)))",$r="[--sf-edge-g:var(--sf-pad-site)]",Dn={box:{className:"[--sf-pad-site:var(--sf-box-g,var(--sf-site-gutter,40px))] max-[960px]:[--sf-pad-site:min(24px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:Ur,edge:$r,frame:"max-[960px]:px-[min(24px,var(--sf-site-gutter,40px))]",once:"[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(24px,var(--sf-box-g,var(--sf-site-gutter,40px))))]",onceFrame:sa["max-[960px]"],onceGutter:"[[data-sf-side=once]_&]:max-[960px]:[--sf-box-g:min(24px,var(--sf-site-gutter,40px))] [[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(24px,var(--sf-site-gutter,40px)))]"},site:{className:"[--sf-pad-site:var(--sf-box-g,var(--sf-site-gutter,40px))] max-view-wide:[--sf-pad-site:min(20px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:Ur,edge:$r,frame:Bp,once:"[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(20px,var(--sf-box-g,var(--sf-site-gutter,40px))))]",onceFrame:sa["max-view-wide"],onceGutter:"[[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]"},none:{className:"[--sf-pad-site:0px] max-view-wide:[--sf-pad-site:min(20px,var(--sf-box-g,var(--sf-site-gutter,40px)))]",value:Ur,edge:$r,frame:"view-wide:px-0 max-view-wide:px-[min(20px,var(--sf-site-gutter,40px))]",once:"[[data-sf-side=once]_&]:max-view-wide:[--sf-pad-site:var(--sf-site-gutter-phone,min(20px,var(--sf-box-g,var(--sf-site-gutter,40px))))]",onceFrame:sa["max-view-wide"],onceGutter:"[[data-sf-side=once]_&]:max-view-wide:[--sf-box-g:var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]"}},uF=`mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] ${Bp}`,dF="[--sf-box-g:var(--sf-site-gutter,40px)] [&>*]:[--sf-site-gutter:0px]",XE="[[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter-phone:0px]";function pF(e){return`${XE} ${Dn[e].onceGutter}`}var qE="[[data-sf-side=once]_&]:[--sf-box-g:var(--sf-site-gutter,40px)] [[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter:0px] [[data-sf-side=once]_&]:[&>*]:[--sf-site-gutter-phone:0px]",ZE="[[data-sf-side=once]_&]:max-view-wide:-mx-[var(--sf-site-gutter-phone,min(20px,var(--sf-site-gutter,40px)))]",JE=/^([^\s:]+):px-\[min\((?:20|24)px,var\(--sf-site-gutter,40px\)\)\]$/,QE="max-view-wide:-mx-[min(20px,var(--sf-site-gutter,40px))]";function eT(e){if(!e)return"";let t=[];for(let n of e.split(/\s+/)){let o=JE.exec(n)?.[1],a=o?j(sa,o):void 0;a?t.push(a):n===QE&&t.push(ZE)}return t.join(" ")}var fF="[[data-sf-side=once]_&]:[--sf-pad-site:inherit]",mF="[[data-sf-side=once]_&]:[--sf-edge-g:var(--sf-box-g,var(--sf-site-gutter,40px))]";function tT(e){if(!e)return"";let t=e.split(" "),n=["none","site","box"].find(o=>Dn[o].className.split(" ").every(a=>t.includes(a)));return n?`${qE} ${Dn[n].once} ${Dn[n].onceGutter}`:""}function hF(e,t){let n=t?[tT(e),eT(e)].filter(Boolean).join(" "):"";return n?`${e} ${n}`:e}var gF="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-view-desktop:px-[min(24px,var(--sf-site-gutter,40px))]";function Hp(e){return typeof e!="number"||!Number.isFinite(e)?ie.default:Math.round(Math.min(Math.max(e,ie.min),ie.typedMax))}function Mp(e,t,n){let o=Fs(e,t,"spacing",n);return o===null?null:M(o,"vw")}function bF(e,t){let n=Mp(e,t,ie);if(n!==null)return{[zr]:n};let o=Hp(e);return o===ie.default?{}:{[zr]:Fp(o,ie.max)}}function Up(e){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,Le.min),Le.typedMax))}function $p(e){return typeof e=="number"&&Number.isFinite(e)?Dp(e):null}function yF(e,t){let n=Mp(e,t,Le);if(n!==null)return{[Lp]:n};let o=Up(e);return o===null?{}:{[Lp]:Fp(o,Le.max)}}function SF(e){return Up(e)===null?"":`${KE} ${jE}`}function Gp(e,t){let n=Fs(e,t,"spacing",ie),o=n===null?Hp(e):$E(n,F(t),"px","mobile",Le);return Math.min(Le.max,o)}var zp=Wr,_F=`max-w-[${zp}]`,EF=`max-w-[min(var(--sf-page-cap,${V.default}px),${V.default}px)]`,Wp="--sf-hero-cap",nT=`var(${Wp},none)`,TF=`max-w-[${nT}]`,oT="--sf-hero-bleed-m",aT="--sf-hero-bleed-w",sT="--sf-hero-chrome-x",rT="--sf-hero-chrome-cap";function xF(e){return e===!0?{[Wp]:zp,[oT]:"auto",[aT]:"100%",[sT]:"24px",[rT]:"none"}:{}}var jr=`calc(${Wr} - ${we}*2)`,vF=`max-w-[${jr.replace(/ /g,"_")}]`;var iT="--sf-chrome-cap",lT=`var(${iT},${jr})`,wF="data-page-width";function CF(e){return e==="full"?"full":null}function OF(e){return e==="full"?null:zE(e==="content"?jr:lT)}function PF(e){if(e==="full")return"full";if(e==="content")return"content"}var RF="data-sf-site-css",cT="site",Fn="siteCustomCss";function uT(e){return e&&typeof e=="object"?gu(e,Fn):""}function IF(e){return uT(e)?cT:void 0}var dT=["tall","square","wide"],pT="tall";function DF(e){return dT.includes(String(e??""))?String(e):pT}var FF={sectionNumber:"\xB7 Locations",heading:"Our *locations.*",tagline:"Visit us in person \u2014 find your nearest studio below.",galleryKicker:"Gallery",galleryHint:"Hover to see in colour \xB7 click to jump",mapTheme:"auto"},BF=[{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
6
6
  Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""},{photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
7
- Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""}],pT=/^https?:\/\//i;function DF(e){let t=(e.mapsUrl??"").trim();return{photo:"",group:"",groupName:"",name:e.name??"",state:e.state??"",country:e.country??"",timezone:"",address:e.address??"",phone:e.phone??"",hours:e.hours??"",lat:Rs(e.lat),lng:Rs(e.lng),mapsUrl:pT.test(t)?t:""}}function Kp(e){let t=String(e??"").split(" \xB7 ");return{state:(t[0]??"").trim(),country:(t[1]??"").trim()}}var FF="other",BF={routingNumber:"02 \xB7 Routing",routingTagline:"What can we help you with?",groups:[{id:"fitment",eyebrow:"A \xB7 Label",title:"Group one",copy:"Short description of this routing group.",response:"< 48h"},{id:"trade",eyebrow:"B \xB7 Label",title:"Group two",copy:"Short description of this routing group.",response:"< 24h"},{id:"press",eyebrow:"C \xB7 Label",title:"Group three",copy:"Short description of this routing group.",response:"< 48h"},{id:"order",eyebrow:"D \xB7 Label",title:"Group four",copy:"Short description of this routing group.",response:"< 24h"}],formNumber:"03 \xB7 Message",formHeading:"Send *a note.*",metaLines:["Encrypted in transit","Stored 12 months"],showOther:!0,otherLabel:"Other",otherNoteTitle:"No matching team",otherNoteBody:"Tell us what you need in the message field below \u2014 we'll route it to whoever can help.",buttonText:"Send Message \u2192",consent:"By submitting, you agree to our privacy policy. We never share contact details with third parties.",channels:[{label:"Team one",value:"team-one@email.com",href:"mailto:team-one@email.com",sub:"Detail \xB7 Detail",groupId:"fitment"},{label:"Team two",value:"team-two@email.com",href:"mailto:team-two@email.com",sub:"Detail \xB7 Detail",groupId:"trade"},{label:"Team three",value:"team-three@email.com",href:"mailto:team-three@email.com",sub:"Detail \xB7 Detail",groupId:"press"},{label:"Team four",value:"team-four@email.com",href:"mailto:team-four@email.com",sub:"Detail \xB7 Detail",groupId:"order"},{label:"Phone",value:"+1 (000) 000-0000",href:"tel:+10000000000",sub:"Mon\u2013Fri \xB7 9:00\u201318:00"}]};var nt="siteOffices",on=e=>typeof e=="string"?e:"",jp=e=>O(e)??0;function fT(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t=e;return{role:on(t.role),city:on(t.city),country:on(t.country),address:on(t.address),phone:on(t.phone),group:on(t.group),hq:t.hq===!0,lat:jp(t.lat),lng:jp(t.lng)}}function GF(e){let t=e&&typeof e=="object"?e[nt]:void 0;return Array.isArray(t)?t.map(fT).filter(n=>n!==null):[]}function zF(e){let{state:t,country:n}=e.country.includes(" \xB7 ")?Kp(e.country):{state:"",country:e.country.trim()};return{photo:"",group:e.group??"",groupName:"",name:e.city,state:t,country:n,timezone:"",address:e.address??"",phone:e.phone??"",hours:"",lat:e.lat,lng:e.lng,mapsUrl:""}}var Vp={key:yc,label:"Site offices",blocks:["Footprint","ContactLocations"]};var Yr="Footer",Yp=[ve,Yr,Ge],Bn=[wt,nt,Fn],hT=[Ge,Yr],Xr=e=>hT.includes(e?.type??"");function gT(e){let t=e?.props;if(!t||!Bn.some(o=>o in t))return e;let n={};for(let[o,a]of Object.entries(t))Bn.includes(o)||(n[o]=a);return{...e,props:n}}function bT(e,t){let n=Bn.filter(a=>t&&a in t);if(!n.length)return e;let o={...e.props??{}};for(let a of n)o[a]=t[a];return{...e,props:o}}function ZF(e){return Array.isArray(e)?e.find(t=>Xr(t))?.props??null:null}function yT(e,t){if(!t)return e;let n=Bn.filter(a=>a in t&&(!e||JSON.stringify(e[a])!==JSON.stringify(t[a])));if(!n.length)return e;let o={...e??{}};for(let a of n)o[a]=t[a];return o}var ot=e=>{let t=e?.content;return Array.isArray(t)?t:[]},at=e=>{let t=e?.zones;return t&&typeof t=="object"&&!Array.isArray(t)?t:null},an=e=>{let t=e?.props?.id;return typeof t=="string"?t:void 0},Xp=e=>Mr(e)?.ownerId??"";function qp(e){let t=na(ot(e)),n=t.some(o=>o?.type===Ge);return t.filter(o=>o?.type===ve||o?.type===Ge||o?.type===Yr&&!n)}function ra(e,t){let n=new Set,o=a=>{if(Array.isArray(a)){for(let s of a)o(s);return}if(!(!a||typeof a!="object")){if(mT(a)){let s=an(a);s&&n.add(s)}for(let s of Object.values(a))o(s)}};if(o(e),t){let a=!0,s=new Set;for(;a;){a=!1;for(let[r,i]of Object.entries(t))s.has(r)||!n.has(Xp(r))||(s.add(r),o(i),a=!0)}}return n}function Zp(e,t){let n=ot(e).filter(o=>{let a=an(o);return typeof o?.type=="string"&&Yp.includes(o.type)||a!==void 0&&t(a)});return n.length?ra(n,at(e)):new Set}function Vr(e,t){let n={},o={};for(let[a,s]of Object.entries(e??{}))(t.has(Xp(a))?n:o)[a]=s;return{owned:n,rest:o}}function Jp(e){let t=e?.root,n=t&&typeof t=="object"?t.props:void 0;return n&&typeof n=="object"&&!Array.isArray(n)?n:null}function JF(e,t){if(!t)return e;let n=qp(t);if(!n.length)return e;let o=n.filter(l=>l.type===ve),a=Jp(t),s=n.filter(l=>l.type!==ve).map(l=>Xr(l)?bT(l,a):l),r={...e,content:[...o,...ot(e),...s]},{owned:i}=Vr(at(t),ra(n,at(t)));return Object.keys(i).length&&(r.zones={...at(e)??{},...i}),r}function QF(e,t){if(!t)return{page:e,chrome:null};let n=qp(t),o=new Set(n.map(an).filter(v=>!!v)),a=[],s=[],r=null;for(let v of ot(e)){let w=an(v),R=w&&o.has(w)||ta(v?.type);if(R&&Xr(v)&&!r){r={};for(let D of Bn)v.props&&D in v.props&&(r[D]=v.props[D])}let C=gT(v);R?s.push(C):a.push(C)}let i=new Map(s.map(v=>[an(v),v])),l=new Set,u=na(ot(t)).flatMap(v=>{let w=an(v);if(!w||!o.has(w))return[v];let R=i.get(w);return R?(l.add(R),[R]):[]});for(let v of s)l.has(v)||u.some(w=>w?.type===v.type)||(u=v.type===ve?[v,...u]:[...u,v]);u=na(u);let d=u.length===ot(t).length&&u.every((v,w)=>v===ot(t)[w]||JSON.stringify(v)===JSON.stringify(ot(t)[w])),p=at(e),f=ra(u,p),{owned:m,rest:b}=Vr(p,f),y=Vr(at(t),ra(n,at(t))).owned,E={...t,content:d?t.content:[...u]},S=ST(t,r);S!==t.root&&(E.root=S);let T=at(t);if(T||Object.keys(m).length){let v={};for(let[w,R]of Object.entries(T??{}))w in y?w in m&&(v[w]=m[w]):v[w]=R;for(let[w,R]of Object.entries(m))w in v||(v[w]=R);E.zones=v,T&&_T(E.zones,T)&&(E.zones=T)}let x={...e,content:a};return p&&(Object.keys(b).length||!Object.keys(y).length?x.zones=b:delete x.zones),{page:x,chrome:E}}function ST(e,t){let n=Jp(e),o=yT(n,t);return o===n?e.root:{...e.root&&typeof e.root=="object"?e.root:{},props:o}}function _T(e,t){let n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every((a,s)=>a===o[s]&&e[a]===t[a])}function eB(e,t){return n=>e(n)||n!==void 0&&Yp.includes(n)&&t()}var Qp=null;function nB(e){Qp=e}function ef(){return Qp}var tf=null;function oB(e){tf=e}function aB(){return tf}var qr=Rp();function nf(e,t,n){if(!t)return;let o={...qr.get(e)};for(let[a,s]of Object.entries(t))o[a]={...s,noted:n};qr.set(e,o)}function uB(e,t){nf(e,t,"load")}function dB(e,t){nf(e,t,"save")}function of(e){return qr.use(e)}var Zr=e=>!!ef()?.sectionOf(e);function af(e,t=Zr){return Zp(e,t)}function sf(e,t,n,o=Zr){if(n)return e&&af(t,o).has(e)?void 0:n}function pB(e,t,n=Zr){if(!e)return{};let o=[...af(t,n)];return o.length?{[ea]:e,[Br]:o}:{[ea]:e}}import{ScreenDocumentContext as WO}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as KO,hidableText as jO}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as dg,LINK_FIELD_MARKER as VO,MEDIA_FIELD_MARKER as YO,SCAFFOLD_FIELD_MARKER as XO,TEXT_FIELD_MARKER as je,foldMetaOf as pg,textFieldIdentifier as LW}from"efficient-easel/draw";import{jsx as ff}from"react/jsx-runtime";import{useCallback as wT}from"react";import{useEasel as CT}from"efficient-easel/easel";import{SettingsAction as OT}from"efficient-easel/panel";import{isLengthUnit as xT}from"efficient-easel/screen/lib/content/length-units";import{CORNER_SIDES as ia,hasCornerSubset as Hn,normalizeCornerSides as De}from"efficient-easel/screen/lib/content/style-keys";import{isLengthUnit as ET}from"efficient-easel/screen/lib/content/length-units";var Jr={kind:"radius",unitKey:"sectionCornersUnit"};function Qr(e){return typeof e=="number"&&Number.isFinite(e)}function bB(e,t,n){if(!Qr(e))return;let o=ET(n)&&n!=="px"?Vt(e,n):Vt(Ae(e));if(Object.keys(o).length===0)return;let a=o[ei];if(typeof a!="string")return o;let s=Hn(t)?Ct(a,De(t)??[]):a;return{...o,[TT]:s}}var TT="--sf-section-radius",ei="--sf-card-radius";function Ct(e,t){return ia.map(n=>t.includes(n)?e:"0").join(" ")}var rf=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];var Mn={kind:"radius",unitKey:"cardCornersUnit"},vT="--sf-card-box-radius";function ti(e){return typeof e=="number"&&Number.isFinite(e)}function TB(e,t,n){if(!ti(e))return;let o=(xT(n)&&n!=="px"?Vt(e,n):Vt(Ae(e)))[ei];if(typeof o!="string")return;let a=Hn(t)?Ct(o,De(t)??[]):o;return{[vT]:a}}function lf(e,t){let n=e.find(r=>r?.props?.id===t);if(!n)return[...e];let o=n.props?.cardCorners,a=n.props?.cardCornerSides,s=n.props?.[Mn.unitKey];return e.map(r=>r?.props?.id===t?r:{...r,props:{...r.props,cardCorners:o,cardCornerSides:a,[Mn.unitKey]:s}})}function cf(e,t,n){let o=oa(e,t,n),a=o?.slot??"",s=o&&Array.isArray(o.item.props[a])?o.item.props[a]:[],r=n?.index??-1,i=r>=0?s[r]:void 0,l=i?.props?.id?String(i.props.id):"",u=Math.max(s.length-1,0);return!o||!l?{can:!1,reason:"unreachable",others:0}:s.length<=1?{can:!1,reason:"alone",others:u}:ti(i?.props?.cardCorners)?{can:!0,others:u,zone:o.zone,index:o.index,data:{...o.item,props:{...o.item.props,[a]:lf(s,l)}}}:{can:!1,reason:"unset",others:u}}function uf(e){return e.can?xn("Gives the other card this card's Corners.","Gives the other {n} cards this card's Corners.",e.others):e.reason==="alone"?c("This is the only card in the section."):e.reason==="unset"?c("Set this card's corners first."):c("This card is not in a section that can share corners.")}function df(e){return xn("Applied to {n} card","Applied to {n} cards",e)}function pf(e,t){e.can&&t(e.zone,e.index,e.data)}import{useSectionOps as PT}from"efficient-easel/screen/lib/document/use-section-ops";var kT="apply-corners-to-siblings",AT="Apply to all cards";function IT({plan:e,onPress:t}){return ff(OT,{id:kT,label:c(AT),note:uf(e),disabled:!e.can,doneLabel:df(e.others),onPress:t})}function mf(){let{appState:e,config:t}=CT(s=>s),n=PT(),o=cf(t,e.data.content??[],e.ui.itemSelector),a=wT(()=>{pf(o,n.replaceComponent)},[o,n]);return ff(IT,{plan:o,onPress:a})}import{isShown as xf,lazyShowWhenContext as jT}from"efficient-shell/format";var st="product",la="recordType",hf={key:st,label:"Product",fields:[]},RT=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,NT=/^[a-z][A-Za-z0-9]*$/,LT=["text","date","images"],ni=new Map,gf=0;function DT(e){if(typeof e.key!="string"||!RT.test(e.key))throw new Error(`A record type key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(e.key===st)throw new Error("The product record type is the builder's own and is not declared by a host.");if(typeof e.label!="string"||!e.label.trim())throw new Error(`The record type ${e.key} has no label.`);let t=new Set;for(let n of e.fields){if(typeof n.key!="string"||!NT.test(n.key)||t.has(n.key))throw new Error(`The record type ${e.key} has a field key it cannot use: ${JSON.stringify(n.key)}.`);if(!LT.includes(n.kind))throw new Error(`The field ${n.key} of ${e.key} has no kind ${JSON.stringify(n.kind)}.`);t.add(n.key)}return{key:e.key,label:e.label.trim(),fields:e.fields.map(n=>({...n}))}}function FB(e){let t=e.map(DT);for(let n of t)ni.set(n.key,n);t.length&&(gf+=1)}function oi(){return[hf,...ni.values()]}function FT(e){return e===st?hf:ni.get(e)??null}function ai(){return gf}function Un(e){let t=e?.[la];return typeof t!="string"?st:t.trim()||st}function si(e){return Un(e)===st}function BB(e,t){let n=FT(e)?.fields??[];return t?n.filter(o=>t.includes(o.kind)):n}var ca="product",bf="tyre",BT=[ca,bf];function UB(e){return BT.includes(e)}var HT="productType",MT={[ca]:"alloy-wheel",[bf]:"tyre"},UT=["alloy-wheel","tyre"];function yf(e,t){return si(t)?Sf(t)??MT[e]??null:null}function Sf(e){if(!si(e))return null;let t=e?.[HT];return typeof t=="string"&&UT.includes(t)?t:null}function $B(e){let t=e?.root;return Sf(t?.props)}var $T="Main Pages",GT="Dynamic Pages",zT="dynamic",WT="dynamic";function ri(e){return e.kind===WT}var ii="lightbox";function zB(e){return e.kind===ii}function WB(e){let t=[],n=[];for(let o of e){if(ri(o)){n.push(o);continue}let a=o.groupKey??(o.group?`folder:${o.group}`:"top"),s=t[t.length-1];s&&s.key===a?s.rows.push(o):t.push({key:a,label:o.group??$T,rows:[o]})}if(n.length){let o=t.findIndex(a=>a.key.startsWith("system:"));t.splice(o===-1?t.length:o,0,{key:zT,label:GT,rows:n})}return t}var ua=null,_f=null;function KT(e,t){ua=e,_f=t}function XB(e){KT(e,null)}function qB(){return ua}function $n(){return ri({kind:_f})||ua===ca}function ZB(e){return yf(ua??"",e)??"alloy-wheel"}function Ef(e){return $n()?Un(e):null}function cH(e,t,n){let o=!1,a={};for(let[s,r]of Object.entries(e)){if(!xf(Is(r),t??{},n)){o=!0;continue}let i=VT(r,t?.[s],t??{},n);i!==r&&(o=!0),a[s]=i}return o?a:e}function VT(e,t,n,o){let a=e?.options;if(!Array.isArray(a))return e;let s=a.filter(r=>r?.value===t||!r?.showWhen||xf(r.showWhen,n,o));return s.length===a.length?e:{...e,options:s}}function uH(e,t,n,o){let a=oa(t,n,o);return{device:e,parentType:a?.item.type,parent:a?.item.props}}function Tf(e,t){if(!e||typeof e!="object")return!1;let n=e;if(typeof n.context=="string"&&(n.context===t||n.context.startsWith(`${t}.`)))return!0;if("not"in n)return Tf(n.not,t);for(let o of[n.all,n.any])if(Array.isArray(o)&&o.some(a=>Tf(a,t)))return!0;return!1}function dH(e,t={}){return jT({parentType:()=>e.parent?.type??void 0,parent:()=>e.parent?.props??void 0,dynamicPage:()=>$n(),root:()=>e.appState?.data?.root?.props,...t})}import{isLengthUnit as YT}from"efficient-easel/screen/lib/content/length-units";var vf=1,XT="cardImageUnit",li={kind:"radius",unitKey:XT},wf={kind:"radius"};function qT(e){return Ae(e)}function bH(e,t){if(YT(t)&&t!=="px"){let o=O(e);return o!==void 0&&o>=0?{"--sf-card-image-radius":M(o,t)}:{}}let n=qT(e);return n===null?{}:{"--sf-card-image-radius":`${n}px`}}import{isLengthUnit as ZT}from"efficient-easel/screen/lib/content/length-units";var Cf={kind:"radius",unitKey:"cornersUnit"},Of=1,Pf="Corners";function JT(e){return Ae(e)}function vH(e,t,n){let o=ZT(n)&&n!=="px"?O(e):void 0,a=o===void 0?JT(e):null;if(o===void 0&&a===null)return null;let s=o!==void 0?M(Math.max(0,o),n):`${a}px`;return{borderRadius:Hn(t)?Ct(s,De(t)??[]):s}}import{phoneKey as Ff}from"efficient-easel/screen/lib/content/view-tiers";var Af=12,sn=6,QT=En,da={twoAcross:{label:"Two across",across:2,acrossPhone:2,desktop:[[6,1],[6,1]],phone:[[3,1],[3,1]]},zigzag:{label:"Zigzag",across:2,acrossPhone:2,desktop:[[8,1],[4,1],[4,1],[8,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},brick:{label:"Brick",across:2,acrossPhone:2,desktop:[[5,1],[7,1],[7,1],[5,1]],phone:[[2,1],[4,1],[4,1],[2,1]]},twoTall:{label:"Two tall",across:2,acrossPhone:2,desktop:[[6,2],[6,2]],phone:[[3,2],[3,2]]},offsetTall:{label:"Offset tall",across:2,acrossPhone:2,desktop:[[5,2],[7,1],[3,1],[4,1]],phone:[[3,2],[3,1],[3,1]]},ladder:{label:"Ladder",across:2,acrossPhone:2,desktop:[[3,2],[9,1],[5,1],[4,1]],phone:[[2,2],[4,1],[2,1],[2,1]]},threeAcross:{label:"Three across",across:3,acrossPhone:3,desktop:[[4,1],[4,1],[4,1]],phone:[[2,1],[2,1],[2,1]]},bigLeft:{label:"Big left",across:3,acrossPhone:3,desktop:[[6,1],[3,1],[3,1]],phone:[[4,1],[1,1],[1,1]]},bigRight:{label:"Big right",across:3,acrossPhone:3,desktop:[[3,1],[3,1],[6,1]],phone:[[1,1],[1,1],[4,1]]},threeStagger:{label:"Three stagger",across:3,acrossPhone:3,desktop:[[5,1],[4,1],[3,1],[3,1],[4,1],[5,1]],phone:[[3,1],[2,1],[1,1],[1,1],[2,1],[3,1]]},threeLadder:{label:"Three ladder",across:3,acrossPhone:3,desktop:[[3,1],[4,1],[5,1],[5,1],[4,1],[3,1]],phone:[[1,1],[2,1],[3,1],[3,1],[2,1],[1,1]]},tallMiddle:{label:"Tall middle",across:3,acrossPhone:3,desktop:[[4,1],[4,2],[4,1],[4,1],[4,1]],phone:[[2,1],[2,2],[2,1],[2,1],[2,1]]},fourAcross:{label:"Four across",across:4,acrossPhone:2,desktop:[[3,1],[3,1],[3,1],[3,1]],phone:[[3,1],[3,1]]},bigFirst:{label:"Big first",across:4,acrossPhone:2,desktop:[[6,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},fourStagger:{label:"Four stagger",across:4,acrossPhone:2,desktop:[[4,1],[3,1],[2,1],[3,1],[2,1],[3,1],[4,1],[3,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},tallFirst:{label:"Tall first",across:4,acrossPhone:2,desktop:[[3,2],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[3,2],[3,1],[3,1]]},oneThenFour:{label:"One then four",across:4,acrossPhone:2,desktop:[[12,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},sixAcross:{label:"Six across",across:6,acrossPhone:3,desktop:[[2,1],[2,1],[2,1],[2,1],[2,1],[2,1]],phone:[[2,1],[2,1],[2,1]]},sixStagger:{label:"Six stagger",across:6,acrossPhone:6,desktop:[[3,1],[2,1],[1,1],[2,1],[1,1],[3,1],[1,1],[3,1],[2,1],[2,1],[1,1],[3,1]],phone:[[1,1],[1,1],[1,1],[1,1],[1,1],[1,1]]},twoThenThrees:{label:"Two, then threes",across:3,acrossPhone:3,lead:[[6,1],[6,1]],desktop:[[4,1],[4,1],[4,1]],leadPhone:[[3,1],[3,1]],phone:[[2,1],[2,1],[2,1]]},twoThenThreesPhoto:{label:"Two, then threes \xB7 photo",across:3,acrossPhone:1,lead:[[6,1],[6,1]],desktop:[[4,1],[4,1],[4,1]],phone:[[6,1]],ratio:"landscape"}},If=["phone","acrossPhone","leadPhone"];var ex=new Set(If),Gn=Object.fromEntries(Object.entries(da).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).filter(([n])=>!ex.has(n)))])),ci=Object.keys(da),Rf=[2,3,4,6];function ui(e,t){return ci.filter(n=>n===t||e===null||Gn[n].across===e)}function Nf(e){let t=e.layout;return typeof t=="string"&&ge(da,t)?t:null}function di(e){let t=Nf(e);return t?tx(t,e.layoutPhone):null}var pa={oneAcross:{label:"One across",phone:[[sn,2]],acrossPhone:1}};function Lf(e){return typeof e=="string"&&ge(pa,e)?e:null}function kf(e,t){return t?sn/e.acrossPhone:Af/e.across}function pi(e){return e.ratio?_u.find(t=>t.shape===e.ratio)?.ratio??null:null}function Df(e){return[...e.lead??[],...e.desktop]}function tx(e,t){let n=da[e],o=Lf(t);if(!o)return n;let{phone:a,acrossPhone:s}=pa[o],r=Object.fromEntries(If.map(i=>[i,void 0]));return{...n,...r,phone:a,acrossPhone:s}}var nx="sf-wall--";function ox(e){let t=Nf(e);if(!t)return"";let n=Lf(e.layoutPhone);return`${nx}${t}${n?`--${n}`:""}`}function kH(e){let t=di(e);if(!t)return"";let n=`.${ox(e)}`,o=[],a=(i,l,u)=>`${n}:has(> :nth-child(${i}n+${l+u}):last-child) > :nth-last-child(-n+${u})`,s=(i,l,u=[])=>{let d=[],p=i.length,f=u.length;u.forEach(([m,b],y)=>{d.push(`${n} > :nth-child(${y+1}){grid-column:span ${m};grid-row:span ${b}}`)}),i.forEach(([m,b],y)=>{d.push(`${n} > :nth-child(${p}n+${f+y+1}){grid-column:span ${m};grid-row:span ${b}}`)});for(let m=1;m<p;m+=1)d.push(`${a(p,f,m)}{grid-column:span ${l};grid-row:span 1}`);return d};o.push(`${n}{grid-template-columns:repeat(${Af},minmax(0,1fr))}`);let r=pi(t);if(r&&(o.push(`${n}${n}{grid-auto-rows:auto}`),o.push(`${n}${n} > *{aspect-ratio:${r[0]}/${r[1]};height:auto}`)),o.push(...s(t.desktop,kf(t,!1),t.lead)),o.push(`@media (max-width:${QT}px){`),o.push(`${n}{grid-template-columns:repeat(${sn},minmax(0,1fr))}`),o.push(...s(t.phone,kf(t,!0),t.leadPhone)),t.phone.length===1&&!t.leadPhone?.length){let[i,l]=t.phone[0],u=t.lead?.length??0;for(let d=1;d<t.desktop.length;d+=1)o.push(`${a(t.desktop.length,u,d)}{grid-column:span ${i};grid-row:span ${l}}`)}return o.push("}"),o.join("")}var fa=12,Bf=1,ma=3;var ax=3;function rn(e,t,n){let o=typeof e=="number"?e:Number.parseInt(String(e??""),10);return Number.isFinite(o)?Math.min(n,Math.max(t,Math.trunc(o))):null}function sx(e){return rn(e,1,fa)??ax}function NH(e,t){return rn(e,Bf,ma)??(sx(t)===4?2:Bf)}function LH(e){return e==null||e===""?null:rn(e,1,fa)}var DH="data-sf-span",ha=4;function rx(e){return e==null||e===""?null:rn(e,1,ha)}var FH="data-sf-row-span",fi="gridTileAt",mi=48;function BH(e){return e==null||e===""?null:rn(e,1,mi)}var HH="--sf-tile-at";function MH(e){return e==null||e===""?null:rn(e,1,ma)}function UH(e){return rx(e)}var $H="data-sf-span-phone",GH="data-sf-row-span-phone",zH=["gridSpan","gridRowSpan",fi,Ff("gridSpan"),Ff("gridRowSpan")];function WH(e,t){if(!e)return!1;if(ix(e,t)||e.type==="Grid")return!0;if(e.type==="GalleryB"){if(di(e.props??{}))return!1;let n=e.props?.columns;return n!=null&&n!==""}return!1}var Hf=new Map;function KH(e,t){Hf.set(e,[...t])}function ix(e,t){if(!e||typeof e.type!="string"||typeof t!="string")return!1;let n=Hf.get(e.type);return n?n.some(o=>{let a=e.props?.[o];return Array.isArray(a)&&a.some(s=>s?.props?.id===t)}):!1}import{jsx as lx}from"react/jsx-runtime";import*as cx from"efficient-easel/icons";function Mf(e){let t=e.replace(/(^|-)([a-z])/g,(o,a,s)=>s.toUpperCase()),n=cx[`${t}Icon`];return n?lx(n,{size:16}):null}import{jsx as rt,Fragment as px,jsxs as Yf}from"react/jsx-runtime";import{useContext as fx,useEffect as mx,useId as hx,useState as Xf}from"react";import{SettingsField as gx,SettingsSwitch as bx}from"efficient-easel/panel";import{AnchorIcon as yx}from"efficient-easel/icons";import{ScreenDocumentContext as Sx}from"efficient-easel/screen/components/ScreenDocumentContext";import{Snippet as _x}from"efficient-shell/ui";import{slugify as Ex}from"efficient-shell/format";import{slugify as ux}from"efficient-shell/format";function hi(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}var qH=e=>ux(hi(e));var Uf="homepage";import{slugify as dx}from"efficient-shell/format";var $f=[{value:"page",label:"Page"},{value:"anchor",label:"Anchor"},{value:"blog",label:"Blog post",needs:"service"},{value:"product",label:"Product",needs:"commerce"},{value:"popup",label:"Popup"},{value:"custom",label:"Custom URL"}];function Gf(e){return e.offersCommerce&&e.offersService?$f:$f.filter(t=>!t.needs||(t.needs==="commerce"?e.offersCommerce:e.offersService))}var gi="#popup:";function zf(e){return`${gi}${e}`}function Wf(e){return e.startsWith(gi)&&e.slice(gi.length).trim()||null}function zn(e){return e===Uf?"/":`/${e}`}function Kf(e){return`/journal/${e}`}function nM(e){return`/wheels/${e}`}function ga(e,t){return`${zn(e)}#${t}`}function jf(...e){let t=new Set,n=[];for(let o of e)for(let a of o?.content??[]){let s=hi(a?.props?.anchor);if(!s)continue;let r=dx(s);!r||t.has(r)||(t.add(r),n.push({slug:r,name:s}))}return n}function oM(e){let t=e.indexOf("#"),n=t===-1?e:e.slice(0,t),o=n.indexOf("?");return o===-1?n:n.slice(0,o)}function Vf(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}import{readHidable as Tx}from"efficient-easel/draw";function qf({value:e,onChange:t,nameBox:n}){let o=Tx(e).text,[a,s]=Xf(!1),r=a||o.trim()!=="",i=hx();return Yf(px,{children:[rt(gx,{label:c("Add an anchor"),labelId:i,icon:rt(yx,{}),action:rt(bx,{checked:r,ariaLabelledBy:i,onChange:l=>{s(l),!l&&o!==""&&t("")}})}),r&&n(e,t),r&&rt(xx,{name:o})]})}function xx({name:e}){let t=fx(Sx),n=t?.templateId?"":t?.currentSlug??"",[o,a]=Xf("");mx(()=>a(Nu()),[]);let s=Ex(e);if(!s||!n)return null;let r=`${o}${ga(n,s)}`,i=r.replace(/^https?:\/\//,""),l=i.lastIndexOf("#");return rt("div",{className:"sf-anchor-link",children:rt(_x,{value:r,label:c("link"),size:"sm",children:Yf("span",{className:"sf-anchor-link-text",children:[rt("span",{className:"sf-anchor-link-path",children:i.slice(0,l)}),rt("span",{className:"sf-anchor-link-hash",children:i.slice(l)})]})})})}import{jsx as Fe,jsxs as vx}from"react/jsx-runtime";import{Fragment as wx}from"react";import{Button as ba,Tooltip as Cx}from"efficient-shell/ui";function ya({status:e,statusText:t,onRefresh:n,busy:o=!1,edit:a,hint:s,spaced:r=!0,compact:i=!1,oneLine:l=!1}){return i?Fe("div",{className:`sf-blogsource sf-blogsource--compact${l?" sf-blogsource--line":""}`,style:r?{marginTop:8}:void 0,children:Fe(Cx,{content:s,className:l?"sf-name-tip":void 0,children:Fe("p",{className:"sf-blogsource-status","data-state":e,children:[t?Fe(wx,{children:t},"status"):null,n?Fe(ba,{variant:"link",size:"sm",className:"sf-blogsource-link",onClick:n,disabled:o,children:c("Refresh now")},"refresh"):null,a?Fe(ba,{variant:"link",size:"sm",className:"sf-blogsource-link",onClick:a.onClick,children:a.label},"edit"):null].filter(Boolean).flatMap((u,d)=>d?[" \xB7 ",u]:[u])})})}):vx("div",{className:"sf-blogsource",style:r?{marginTop:9}:void 0,children:[Fe("p",{className:"sf-blogsource-status","data-state":e,children:t}),n?Fe(ba,{variant:"secondary",className:"sf-blogsource-action",onClick:n,disabled:o,children:c("Refresh now")}):null,a?Fe(ba,{variant:"secondary",className:"sf-blogsource-action",onClick:a.onClick,children:a.label}):null,Fe("p",{className:"es-field-hint",children:s})]})}import{AdjustIcon as qO,EyeIcon as ZO,AnimationIcon as JO,BackgroundIcon as Jh,BorderAllIcon as QO,BlockSectionIcon as eP,ColumnWidthsIcon as ts,ColumnsIcon as fg,CornerIcon as mg,DirectionDownIcon as tP,DirectionLeftIcon as nP,DirectionRightIcon as oP,DirectionUpIcon as hg,EditIcon as aP,GapIcon as sP,GridIcon as gg,GroundIcon as kl,HashIcon as bg,HeightIcon as ns,ImageIcon as rP,ListIcon as iP,LocationIcon as Qh,PaddingBottomIcon as yg,PaddingLeftIcon as Sg,PaddingRightIcon as _g,PaddingTopIcon as Nl,PageIcon as lP,PhoneIcon as cP,StickyIcon as Eg,SearchIcon as uP,SquareIcon as dP,TypeIcon as pP,WidthIcon as fP}from"efficient-easel/icons";import{jsx as $,Fragment as Ot,jsxs as Pt}from"react/jsx-runtime";import{CaptionIcon as Ox,DateIcon as Px,FlagIcon as kx,TitleIcon as Ax,ButtonIcon as Ix,DollarIcon as Rx,HashIcon as Nx,LinkIcon as Lx,NoteIcon as Dx,TagIcon as Fx,TextLinesIcon as Bx}from"efficient-easel/icons";var Zf={body:Bx,button:Ix,link:Lx,label:Fx,number:Nx,price:Rx,note:Dx,name:kx,date:Px,caption:Ox,title:Ax},Jf={eyebrow:Pt(Ot,{children:[$("path",{d:"M5 6.5h5"}),$("path",{d:"M5 12.5h14"}),$("path",{d:"M5 18h11"})]}),heading:Pt(Ot,{children:[$("path",{d:"M6.5 5v14"}),$("path",{d:"M17.5 5v14"}),$("path",{d:"M6.5 12h11"})]}),intro:Pt(Ot,{children:[$("path",{d:"M4 5.5v13"}),$("path",{d:"M8 7.5h12"}),$("path",{d:"M8 12h12"}),$("path",{d:"M8 16.5h8"})]}),value:Pt(Ot,{children:[$("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),$("path",{d:"M6.5 12h7"})]}),quote:Pt(Ot,{children:[$("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),$("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:Pt(Ot,{children:[$("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),$("path",{d:"M8 9.5h8"}),$("path",{d:"M12 9.5v5"})]}),meta:Pt(Ot,{children:[$("path",{d:"M4 7h16"}),$("path",{d:"M4 14h3.5"}),$("path",{d:"M10.5 14h3"}),$("path",{d:"M17 14h3"})]})};function bi({noun:e,size:t=14,strokeWidth:n=1.8,className:o,style:a}){let s=Zf[e];return s?$("span",{className:o,style:{display:"inline-flex",...a},"aria-hidden":"true",children:$(s,{size:t})}):$("svg",{className:o,style:a,width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:Jf[e]})}var vM=Object.keys(Zf);var wM=Object.keys(Jf);import{parseHexColor as Hx}from"efficient-shell/format";var Mx="#ffffff";function yi(e){return Qf(e)||(Ux(e)?e:Mx)}function Qf(e){let t=Ie(e);return t?Ze(t)?.page??"":""}function Ux(e){return typeof e=="string"&&Hx(e)===e.toLowerCase()||Qf(e)!==""}function AM(e){return{"--bg":yi(e)}}import{parseHexColor as $x}from"efficient-shell/format";import{fillColorRole as Gx}from"efficient-shell/markup";function kt(e,t,n,o){let a=o??n??t,s=n!==null&&n!==t,r=a!==null&&a!==t;return{className:[s?e.tabletClass:"",r?e.phoneClass:""].filter(Boolean).join(" "),style:{...s?{[e.tabletVar]:n}:{},...r?{[e.phoneVar]:a}:{}}}}var Si=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}];var zM="sf-card",WM="[--sf-card-lift:none] [--sf-card-shadow-hover:var(--sf-card-shadow,none)]",em={min:0,max:100,step:5,fallback:0,unit:"%"},zx="68%",jM={desktop:20,phone:20,side:40,sidePhone:24},VM="sf-box-sides";function Wx(e){return typeof e=="string"&&e.trim()!==""}function YM(e){return Wx(typeof e?.bgImage=="string"?e.bgImage:null)||nm(e)}function nm(e){return To(e,yo)!==""}function XM(e,t){return t||!nm(e)?e:{...e,[yo]:""}}function qM(e,t){return Ds(t,To(e,yo))?.trim()||null}function tm(e,t){let n=typeof e=="number"?e:Number.parseFloat(String(e??""));if(!Number.isFinite(n)||n<=0)return null;let o=(Math.min(em.max,Math.max(em.min,n))/100).toFixed(2);return t!=="bottom"?{background:xo(Number(o))}:{background:`linear-gradient(0deg, ${xo(Number(o))} 0%, ${xo(0)} ${zx})`}}var Sa=[{label:"Flat",value:"",hint:"One colour from top to bottom"},{label:"Fade",value:"down",hint:"The colour fades into the page colour at the bottom"}],om="fillFade",_i=Sa[1].value,_a=e=>e===_i?_i:Sa[0].value,Kx=[{mix:"12%",at:"50%"},{mix:"19%",at:"70%"},{mix:"50%",at:"95%"}];function ZM(e){return _a(e)!==_i?null:{backgroundImage:`linear-gradient(to bottom, transparent, ${Kx.map(t=>`color-mix(in srgb, var(--bg) ${t.mix}, transparent) ${t.at}`).join(", ")})`}}var Ea=e=>typeof e=="string"?$x(e.trim()):null,Wn=e=>{let t=Ea(e);if(t!==null||typeof e!="string")return t;let n=e.trim();return n&&!n.startsWith("#")&&Vu(n)||null},Ta=e=>{if(typeof e!="string")return null;let t=Gx(Ue(e.trim()));return t?.kind==="slot"?t.slot:null},Ei="swatch";function JM(e,t){if(!t)return null;let n=Ds(t,To(e,Ei)),o=Ie(n);return Ea(n)??(o&&Me(o)||null)}var jx={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function QM(e,t,n){return kt(jx,Wn(e),Wn(t),Wn(n))}var Vx={tabletClass:"sf-wash-tablet",tabletVar:"--sf-wash-tablet",phoneClass:"sf-wash-phone",phoneVar:"--sf-wash-phone"};function eU(e){let t=tm(e.darken,e.darkenStyle);if(!t)return{className:"",style:{}};let n=(p,f)=>String(tm(p,f)?.background??"none"),o=p=>(typeof p=="number"||typeof p=="string"&&p.trim()!=="")&&Number.isFinite(Number(p))?p:void 0,a=p=>Si.some(f=>f.value===p)?p:void 0,[s,r,i,l]=[o(e.darkenTablet),a(e.darkenStyleTablet),o(e.darkenPhone),a(e.darkenStylePhone)],u=s??e.darken,d=r??e.darkenStyle;return kt(Vx,String(t.background),s!==void 0||r!==void 0?n(u,d):null,i!==void 0||l!==void 0?n(i??u,l??d):null)}function tU(e,t){let n={"top-left":["start","start"],"top-center":["center","start"],"top-right":["end","start"],left:["start","center"],center:["center","center"],right:["end","center"],"bottom-left":["start","end"],"bottom-center":["center","end"],"bottom-right":["end","end"]},[o,a]=n[e]??n.center,[s,r]=t==="column"?[a,o]:[o,a];return Lc(s,r)}function am(e,t){let n=e?.content;if(!Array.isArray(n))return null;for(let o of n){if(!o||typeof o!="object")continue;let{type:a,props:s}=o;if(s?.id===t)return null;if(Ti(o,t,0))return{type:typeof a=="string"?a:"",props:s??{}}}return null}function Ti(e,t,n){if(n>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(a=>Ti(a,t,n+1));let o=e.props;return o&&typeof o=="object"&&o.id===t?!0:Object.values(e).some(a=>Ti(a,t,n+1))}function sm(e,t){let n=e?.content;return Array.isArray(n)?xa(n,t,0)??[]:[]}function xa(e,t,n){if(n>12||!e||typeof e!="object")return null;if(Array.isArray(e)){for(let a of e){let s=xa(a,t,n+1);if(s)return s}return null}let o=e.props;if(o&&typeof o=="object"){if(o.id===t)return[];for(let a of Object.values(o)){let s=xa(a,t,n+1);if(s)return[o,...s]}return null}for(let a of Object.values(e)){let s=xa(a,t,n+1);if(s)return s}return null}import{SettingsDefaultReset as oe,SettingsDrill as mP,SettingsField as K,SettingsGroup as hP,SettingsSegmented as gP,SettingsBorder as bP,SettingsSidesEach as yP,SettingsSwitch as Ll,borderSides as SP,borderStartEach as _P}from"efficient-easel/panel";import{ListField as EP}from"efficient-easel/fields";import{CodeIcon as TP}from"efficient-shell/icons/efficient";import{DisplayChips as xP}from"efficient-shell/ui";import{HIDDEN_KEY as Yx,hiddenInEveryView as Xx,hiddenInView as xi,hiddenKeyOf as rm}from"efficient-easel/screen/lib/content/view-hide";import{VIEW_TIERS as qx}from"efficient-easel/screen/lib/content/view-tiers";var Zx={"000":"",100:"view-desktop:hidden","010":"view-wide:max-view-desktop:hidden","001":"max-view-wide:hidden",110:"view-wide:hidden","011":"max-view-desktop:hidden",101:"view-desktop:hidden max-view-wide:hidden",111:"hidden"},Jx={"000":"",100:"view-desktop:hidden","010":"view-tablet:max-view-desktop:hidden","001":"max-view-tablet:hidden",110:"view-tablet:hidden","011":"max-view-desktop:hidden",101:"view-desktop:hidden max-view-tablet:hidden",111:"hidden"},im=e=>(e.desktop?"1":"0")+(e.tablet?"1":"0")+(e.mobile?"1":"0");function lm(e,{atSectionLine:t=!1}={}){return(t?Jx:Zx)[im(e)]}var rU=[Yx,rm("tablet"),rm("mobile")];function cm(e){return{desktop:xi(e,"desktop"),tablet:xi(e,"tablet"),mobile:xi(e,"mobile")}}function iU(e){return Xx(e)}function lU(e){let t=cm(e);return qx.filter(n=>t[n]).join(" ")}var Qx={"000":"",100:"view-desktop:hidden!","010":"view-wide:max-view-desktop:hidden!","001":"max-view-wide:hidden!",110:"view-wide:hidden!","011":"max-view-desktop:hidden!",101:"view-desktop:hidden! max-view-wide:hidden!",111:"hidden!"},ev={"000":"",100:"view-desktop:hidden!","010":"view-tablet:max-view-desktop:hidden!","001":"max-view-tablet:hidden!",110:"view-tablet:hidden!","011":"max-view-desktop:hidden!",101:"view-desktop:hidden! max-view-tablet:hidden!",111:"hidden!"};function cU(e,{atSectionLine:t=!1}={}){return(t?ev:Qx)[im(cm(e))]}function ln(e){if(!e||typeof e!="object"||Array.isArray(e))return{};let t={};for(let[n,o]of Object.entries(e))typeof o=="boolean"&&(t[n]=o);return t}function va(e,t){return ln(e)[t]!==!1}function vi(e,t,n){let o=ln(t)[n];return typeof o=="boolean"?o:va(e,n)}function um(e){return Object.values(ln(e)).some(t=>t===!1)}function dm(e){return Object.keys(ln(e)).length>0}function pm(e,t,n){let o={...ln(e)};return n?delete o[t]:o[t]=!1,Object.keys(o).length?o:void 0}function fm(e,t,n){return{...ln(e),[t]:n}}function pU(e,t,n,{atSectionLine:o=!0}={}){let a=!va(e,n);return lm({desktop:a,tablet:a,mobile:!vi(e,t,n)},{atSectionLine:o})}import{ColorSwatch as vP,CornersInput as wP,DatePicker as s4,DateTimePicker as CP,FOCAL_DEFAULT as r4,IconPicker as Tg,COLUMN_COUNT_MAX as eg,COLUMN_SHARE_MIN as OP,COLUMN_SHARES_EQUAL as PP,resolveColumnShares as xg,WidthsBar as kP,useShellStrings as AP,IconButton as vg,InputNumber as tg,Slider as IP,Textarea as RP,Tooltip as Dl}from"efficient-shell/ui";async function mm(e){let t=e.trim();if(!t)return null;let n=xe().geocode;if(!n)throw new Error("geocode_unavailable");return n.locate(t)}var wi="Lookup busy \u2014 try again in a moment.",wa=e=>typeof e=="number"&&Number.isFinite(e);function Ca(e){return e.some(t=>{let n=t?.geocode;return n?n.pending||n.manual&&n.lat===void 0&&n.lng===void 0?!0:wa(n.lat)&&n.lat!==t.lat||wa(n.lng)&&n.lng!==t.lng:!1})}async function hm(e,t,{geocode:n=mm,courtesyGapMs:o=1100}={}){let a=r=>new Promise(i=>setTimeout(i,r)),s=e.slice();if(e.some(r=>r?.geocode?.pending)){let r=[],i=!1;for(let l of e){if(!l?.geocode?.pending){r.push(l);continue}i&&o>0&&await a(o),i=!0;try{let u=await n(t(l));r.push(u?{...l,lat:u.lat,lng:u.lng,geocode:{...l.geocode,pending:!1,ok:!0,status:`Found \u2014 ${u.label.split(",").slice(0,3).join(",").trim()}`,lat:u.lat,lng:u.lng}}:{...l,geocode:{...l.geocode,pending:!1,ok:!1,status:"No match \u2014 check the address and try again."}})}catch{r.push({...l,geocode:{...l.geocode,pending:!1,ok:!1,status:wi}})}}s=r}return s.map(r=>{let i=r?.geocode;if(!i)return r;if(i.manual&&i.lat===void 0&&i.lng===void 0)return{...r,geocode:{...i,lat:r.lat,lng:r.lng}};let l=wa(i.lat)&&i.lat!==r.lat?i.lat:r.lat,u=wa(i.lng)&&i.lng!==r.lng?i.lng:r.lng;return l!==r.lat||u!==r.lng?{...r,lat:l,lng:u}:r})}import{keptByRow as Al}from"efficient-easel/screen/lib/document/style-fields";import{jsx as tv}from"react/jsx-runtime";import{useEffect as nv,useState as ov}from"react";import{clearRangeOf as av,markSelection as sv,useCaretEdit as rv}from"efficient-easel/copy";import{TextToolbar as iv}from"efficient-shell/ui";function lv(e,t,n){return sv(e,t,n,kc)}function gm(e,t){let n=av(t,e.length),o=Ic(e,n.start,n.end);return o.text===e?null:o}function cv(e){let[t,n]=ov(null);return nv(()=>{let o=e.current?.ownerDocument??(typeof document>"u"?null:document);if(!o)return;let a=()=>{let s=e.current;if(!s||o.activeElement!==s)return;let r=s.selectionStart??s.value.length,i=s.selectionEnd??r;n(l=>l&&l.start===r&&l.end===i?l:{start:r,end:i})};return o.addEventListener("selectionchange",a),()=>o.removeEventListener("selectionchange",a)},[e]),[t,n]}function uv({target:e,value:t,onChange:n,disabled:o=!1,label:a="Formatting"}){let s=rv({target:e,onChange:n}),[r,i]=cv(e),l=f=>s(m=>{let b=lv(t,f,m);return i({start:b.selectionStart,end:b.selectionEnd}),b}),u=Pc(),d={};if(r)for(let f of u)d[f.style]=Ac(t,r.start,r.end,f.style);let p=o?null:gm(t,r);return tv(iv,{offered:new Set(u.map(f=>f.style)),onMark:f=>l(f),pressed:d,disabled:o,"aria-label":c(a),className:"sf-markup-bar",clear:p?{onClear:()=>s(()=>{let f=e.current,m=f&&f.ownerDocument.activeElement===f?{start:f.selectionStart??0,end:f.selectionEnd??0}:null,b=gm(t,m)??{text:t,selectionStart:m?.start??0,selectionEnd:m?.end??0};return i({start:b.selectionStart,end:b.selectionEnd}),b})}:void 0})}var Ci=uv;import{deviceField as te}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as NP,NoControlMark as LP,noControlField as wg}from"efficient-easel/screen/lib/document/panel-no-control-mark";function Oa(e,t,n){return typeof e=="number"?e:typeof t=="number"?t:n}var Pa=void 0;import{phoneKey as it,tabletKey as Fl,viewKeyAt as Bl}from"efficient-easel/draw";import{jsx as ka,Fragment as dv,jsxs as pv}from"react/jsx-runtime";import{useRef as fv}from"react";import{SettingsDefaultReset as mv}from"efficient-easel/panel";import{effectTiles as hv}from"efficient-easel/screen/lib/document/effect-tiles";import{VIEW_KEY_ACCESS as bm,describedAs as gv,onDesktopWords as bv,phoneTwinFields as ym}from"efficient-easel/screen/lib/document/box-fields";function yv({row:e,read:t,...n}){let o=t(Z(),n.followsView??"desktop");return e({...n,follows:o})}function ze(e,t){return Object.fromEntries(Eu.map(n=>{let o=U(e,n);return[o,ym(e,t(n),bm)[o]]}))}function LU(e,t,n){let o=t.render,a={...t,render:s=>ka(yv,{...s,row:o,read:n})};return ze(e,s=>s==="desktop"?t:a)}function Sv({spec:e,...t}){let n=e.values.includes(t.value),o="follows"in t,a=e.read(Z(),t.followsView??"desktop"),s=n?t.value:a,r=fv(null),{preview:i}=e,l=hv({label:c(e.label),options:e.values.map(d=>({value:d,label:c(e.word(d)),picture:e.picture(d)})),fallback:e.fallback,onPreview:i?d=>r.current&&i(r.current,d):void 0}).render,u=l({value:s,onChange:d=>t.onChange(d??e.fallback)});return pv(dv,{children:[i?ka("div",{ref:r,style:{display:"contents"},children:u}):u,o&&n&&ka(mv,{words:P()?.panel,label:c(e.tileWord),changed:!0,detail:bv(d=>c(d),c(e.word(a)),t.followsView),onReset:()=>t.onChange(void 0)})]})}function DU(e,t){let n=gv({type:"custom",render:o=>ka(Sv,{...o,spec:t})},{type:"select",label:t.label,options:t.values.map(o=>({value:o,label:t.word(o)}))});return ym(e,n,bm)}import{jsx as Oi,Fragment as _v}from"react/jsx-runtime";import{createContext as Ev,useContext as Tv}from"react";import{NoControlMark as xv}from"efficient-easel/screen/lib/document/panel-no-control-mark";var Sm=Ev(!1);function $U({children:e}){return Oi(Sm.Provider,{value:!0,children:e})}function vv(){return Tv(Sm)}function _m({name:e,children:t}){return!vv()||!e||!wv(e)||An(e)?Oi(_v,{children:t}):Oi(xv,{})}function wv(e){return/^[A-Za-z0-9_$]+$/u.test(e)}import{parseOption as Cv}from"efficient-shell/format";var Pi="off",Tm="none",ki=[{label:"None",value:"off"},{label:"1, 2, 3",value:"plain"},{label:"01, 02, 03",value:"padded"},{label:"N\xB001, N\xB002",value:"numero"}],xm=[{label:"None",value:"none"},{label:"Hairline",value:"hairline"}];function WU(e){return Cv(ki,Pi,e)}var Em="sf-card-index",Kn="sf-card-index",KU="pointer-events-none absolute left-[18px] top-[18px] z-10 border border-line bg-bg/70 px-2 py-1 font-mono text-[length:var(--size-label,10px)] uppercase tracking-[0.16em] text-fg-dim",Ov={plain:`counter(${Kn})`,padded:`counter(${Kn}, decimal-leading-zero)`,numero:`"N\xB0" counter(${Kn}, decimal-leading-zero)`};function jU(e,t){return t==="off"?"":`.${e}{counter-reset:${Kn}}.${e} .${Em}{counter-increment:${Kn}}.${e} .${Em}::before{content:${Ov[t]}}`}function VU(e){return e==="hairline"?"border border-line hover:border-accent":""}var vm=[{value:"1",label:"1st rendering"},{value:"2",label:"2nd rendering"},{value:"3",label:"3rd rendering"},{value:"4",label:"4th rendering"},{value:"5",label:"5th rendering"}];import{SCALAR_TEXT_CONTROLS as DP}from"efficient-easel/draw";import{jsx as ue}from"react/jsx-runtime";import{SettingsDefaultReset as Dv,SettingsField as Ai}from"efficient-easel/panel";import{useSelectedHost as Fv}from"efficient-easel/easel";import{FOCAL_DEFAULT as Bv}from"efficient-shell/format";import{ImageIcon as Ii,PlayIcon as wm}from"efficient-easel/icons";import{ImageFocusPoint as Hv,MediaUploadField as Mv}from"efficient-shell/ui";import{useContext as Uv}from"react";import{ScreenDocumentContext as $v}from"efficient-easel/screen/components/ScreenDocumentContext";import{tabletKey as Gv,viewKeyAt as zv}from"efficient-easel/draw";import{usePreviewDevice as Wv}from"efficient-easel/draw/client";import{formatFocal as Pv,parseFocal as kv}from"efficient-shell/format";var Av="sf-focus-phone",Iv="--sf-focus-phone",Rv="sf-focus-tablet",Nv="--sf-focus-tablet",jn=e=>{if(typeof e!="string"||!/^\s*-?\d+(\.\d+)?%\s+-?\d+(\.\d+)?%\s*$/.test(e))return null;let{x:t,y:n}=kv(e);return Pv(t,n)};function JU(e,t){return kt(Lv,null,jn(t),jn(e))}var Lv={tabletClass:Rv,tabletVar:Nv,phoneClass:Av,phoneVar:Iv};import{shownTier as Ri}from"efficient-easel/screen/lib/document/device-fields";import{onDesktopWords as Kv}from"efficient-easel/screen/lib/document/box-fields";import{requestMediaPick as jv}from"efficient-easel/screen/lib/media-picker";import{useEaselHost as Vv}from"efficient-easel/screen/lib/host";import{useEaselSession as Yv}from"efficient-easel/screen/lib/session-context";function Xv(e,t,n,o=!0){let a=Ri(n),s=typeof e[t]=="string"&&e[t]?String(e[t]):Bv;if(a==="desktop")return{ownView:!1,followed:s,followsView:"desktop",own:void 0,focus:s,key:t};let r=zv(t,a),i=jn(e[r])??void 0,l=a==="mobile"&&o?jn(e[Gv(t)])??void 0:void 0,u=l??s;return{ownView:!0,followed:u,followsView:l?"tablet":"desktop",own:i,focus:i??u,key:r}}function qv(e,t,n){let o=Fv();if(!t||!o)return null;let a=o.values??{};if(n&&!n(a,Ri(e)))return null;let s=Xv(a,t,e,n?n(a,"tablet"):!0),r=o.onChange;return{...s,set:i=>r(s.key,i),clear:()=>r(s.key,Pa)}}function Cm({value:e,onChange:t,label:n,accept:o,placeholder:a,focusKey:s,focusWhen:r,frameKey:i,fieldKey:l}){let u=Vv(),d=Yv(),p=c(n),f=Wv(),m=o.startsWith("video"),b=qv(f,m?void 0:s,r),y=!!s&&Ri(f)!=="desktop",E=Uv($v),S=cn(),T=i&&l?{video:l,frame:i}:null,x=C=>jv(u,{accept:o,title:p,...C?{file:C}:{}}).then(D=>!D||!T?D?.url??null:(S({[T.video]:D.url,[T.frame]:D.posterUrl??""}),null)),v=T?C=>C?t(C):S({[T.video]:"",[T.frame]:""}):t,w=re(e);if(y&&(!b||!w))return null;if(E&&!E.capabilities.mediaEditing)return ue(Ai,{label:p,icon:m?ue(wm,{}):ue(Ii,{}),children:ue("div",{className:"sf-image-slot-inert",children:m?c("Templates don\u2019t store videos \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created."):c("Templates don\u2019t store images \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created.")})});let R=b?.ownView&&w?ue(Dv,{words:P()?.panel,label:c("Image focus"),changed:!!b.own,detail:Kv(C=>c(C),b.followed,b.followsView),onReset:b.clear}):void 0;return y&&b?ue(Ai,{label:p,icon:ue(Ii,{}),action:R,children:ue("div",{style:{flex:"1 1 auto",minWidth:0},children:ue(Hv,{value:b.focus,onChange:b.set,label:c("Image focus"),image:w,hint:null})})}):ue(Ai,{label:p,icon:m?ue(wm,{}):ue(Ii,{}),children:ue("div",{style:{flex:"1 1 auto",minWidth:0},children:ue(Mv,{value:w,onChange:v,onPick:x,accept:m?"video/*":"image/*",kind:m?"video":"image",placeholder:a===void 0?void 0:c(a),maxSizeBytes:xe(d).media.maxUploadBytes,...b?{focus:b.focus,onFocusChange:b.set}:{}})})})}import{jsx as Om}from"react/jsx-runtime";import{useId as Zv}from"react";import{FieldSelect as Jv}from"efficient-easel/fields";import{SettingsField as Qv}from"efficient-easel/panel";function ew(e){return e.map(({value:t,label:n,note:o})=>({value:t,label:n,...o?{meta:o}:{}}))}function Pm({label:e,options:t,value:n,onChange:o,emptyLabel:a,icon:s,hint:r}){let i=Zv(),l=`${i}-label`,u=`${i}-button`,d=Array.isArray(n)?n:[];return Om(Qv,{label:c(e),labelId:l,icon:s,hint:r,children:Om(Jv,{id:u,multiple:!0,value:d,options:ew(t),onChange:o,placeholder:a===void 0?c("None"):c(a),ariaLabelledBy:`${l} ${u}`,inline:!0})})}import{jsx as km}from"react/jsx-runtime";import{useId as tw}from"react";import{FieldSelect as nw}from"efficient-easel/fields";import{SettingsField as ow}from"efficient-easel/panel";function aw(e){return e.map(({value:t,label:n,group:o,thumb:a,meta:s})=>({value:t,label:n,...o!==void 0?{group:o}:{},...a!==void 0?{thumb:a}:{},...s!==void 0?{meta:s}:{}}))}function N$({label:e,options:t,fallback:n,value:o,onChange:a,placeholder:s,bare:r=!1,icon:i}){let l=tw(),u=`${l}-label`,d=`${l}-button`,p=o??"",f=t.some(E=>E.value===p)?p:n,m=c(e),b=s===void 0?void 0:c(s),y=km(nw,{id:d,value:f,options:aw(t),onChange:a,placeholder:b,searchPlaceholder:b,...r?{ariaLabel:m}:{ariaLabelledBy:`${u} ${d}`},searchable:!0,groupCount:!0,inline:!0});return r?y:km(ow,{label:m,labelId:u,icon:i,children:y})}import{jsx as It,jsxs as Mw}from"react/jsx-runtime";import{SettingsField as Zm}from"efficient-easel/panel";import{LinkIcon as Uw}from"efficient-easel/icons";import{LinkPicker as $w,TextLinkField as Gw}from"efficient-shell/ui";import{useEffect as qm,useMemo as Na,useRef as zw,useState as Ra}from"react";import{currentEaselSession as sw}from"efficient-easel/screen/lib/session";function Am(){return sw().auth.token}import{currentEaselSession as Ww}from"efficient-easel/screen/lib/session";import{useScreenDocument as Kw}from"efficient-easel/screen/components/ScreenDocumentContext";var rw=()=>({choosePage:c("Choose a page"),chooseSection:c("Choose a section"),noSections:c("No section anchors yet"),sectionHint:c("Jumps to a section on that page."),choosePost:c("Choose a post"),chooseProduct:c("Choose a product"),choosePopup:c("Choose a popup")});function Im(e,t,n){if(!e)return"page";if(Wf(e))return"popup";if(e.startsWith("/journal/"))return"blog";if(Vf(e))return"product";if(e.includes("#")){let o=e.slice(0,e.indexOf("#"));if(o===""||o==="/"||t.includes(o))return"anchor"}return e==="/"||t.includes(e)||n&&n.listingPaths.includes(n.targetOf(e))?"page":"custom"}function Ni(e,t){let n=rw(),o=e.pages.map(d=>({value:zn(d.slug),label:d.title})),a=t?.pageOptions?t.pageOptions(o):o,s=a.map(d=>d.value),r=e.pages.map(d=>({label:d.title,options:jf(...d.docs).map(p=>({value:ga(d.slug,p.slug),label:p.name}))})).filter(d=>d.options.length>0),i=d=>{switch(d){case"page":return{type:"select",options:a,placeholder:n.choosePage};case"anchor":return{type:"groups",groups:r,placeholder:r.length?n.chooseSection:n.noSections};case"blog":return{type:"select",options:e.posts.map(p=>({value:Kf(p.slug),label:p.title||p.slug})),placeholder:n.choosePost};case"product":return{type:"select",options:e.products.map(p=>({value:p.href,label:p.name||p.href})),placeholder:n.chooseProduct};case"popup":return{type:"select",options:(e.popups??[]).map(p=>({value:zf(p.slug),label:p.title||p.slug})),placeholder:n.choosePopup};case"custom":return{type:"text"}}},l=Gf(e.offers).map(d=>({value:d.value,label:c(d.label),target:i(d.value),...d.value==="anchor"?{hint:n.sectionHint}:{},...d.value==="blog"||d.value==="product"||d.value==="popup"?{hideWhenEmpty:!0}:{}}));if(!t)return{kinds:l,rules:{kindOf:d=>Im(d,s),targetOf:d=>d,readFilter:()=>null,withFilter:d=>d}};let u=d=>{let p=t.withFilter(d,null);return t.listingPaths.includes(p)?p:d};return{kinds:l,rules:{kindOf:d=>Im(d,s,{listingPaths:t.listingPaths,targetOf:u}),targetOf:u,readFilter:t.readFilter,withFilter:t.withFilter},filtersFor:d=>t.listingPaths.includes(d)?t.filtersFor(d):null}}import{useEaselSession as jw}from"efficient-easel/screen/lib/session-context";function J(e,t){if(typeof e=="string")return e||t;if(e&&typeof e=="object"&&"text"in e){let n=e.text;return W(n)??t}return t}function Rm(e,t){return O(e)??t}function We(e,t){return typeof e=="boolean"?e:t}function Aa(e,t){if(!Array.isArray(e))return t;let n=e.map(o=>typeof o=="string"?o:J(o?.text,"")).map(o=>o.trim()).filter(Boolean);return n.length?n:t}var Lm=["delay","scroll","exit"],Dm=["all","chosen","except"],Fm=["visit","days","never","once"],iw=["all","desktop","phone"],lw=["stop","continue"],Bm={min:0,max:60},Hm={min:10,max:90},Mm={min:1,max:90},Ce={autoOpen:!1,trigger:"delay",autoOpenDelaySec:15,scrollPercent:50,showOn:"all",showOnPages:[],devices:"all",hideAfter:"days",hideDays:7,afterSubmit:"stop",startDate:null,endDate:null};function fe(e,t,n){return typeof t=="string"&&e.includes(t)?t:n}function un(e,t,n){let o=Rm(e,n);return Math.min(t.max,Math.max(t.min,Math.round(o)))}function cw(e){return typeof e.hideAfter=="string"?fe(Fm,e.hideAfter,Ce.hideAfter):e.oncePerSession===!0?"visit":e.oncePerSession===!1?"never":Ce.hideAfter}function uw(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t.trim():"").filter(Boolean).map(t=>t.startsWith("/")?t:`/${t}`):[]}function Nm(e){if(typeof e!="string")return null;let t=e.trim();return/^\d{4}-\d{2}-\d{2}$/.test(t)?t:null}function Um(e){let t=e??{},n=Ce;return{autoOpen:We(t.autoOpen,n.autoOpen),trigger:fe(Lm,t.trigger,n.trigger),autoOpenDelaySec:un(t.autoOpenDelaySec,Bm,n.autoOpenDelaySec),scrollPercent:un(t.scrollPercent,Hm,n.scrollPercent),showOn:fe(Dm,t.showOn,n.showOn),showOnPages:uw(t.showOnPages),devices:fe(iw,t.devices,n.devices),hideAfter:cw(t),hideDays:un(t.hideDays,Mm,n.hideDays),afterSubmit:fe(lw,t.afterSubmit,n.afterSubmit),startDate:Nm(t.startDate),endDate:Nm(t.endDate)}}import{parseHexColor as dw}from"efficient-shell/format";var $m="#000000";var Li="popup",pw=bu,fw=["auto","full"],mw=["inside","outside","none"],hw={min:240,max:1440},gw={min:0,max:100},Vn={placement:"center",fullWidth:!1,width:720,height:"auto",tintColor:$m,tintOpacity:60,outsideClick:!0,closeButton:"inside"};function bw(e,t){let n=typeof e=="string"?e.trim():"";return n&&dw(n)===n.toLowerCase()?n:t}function Di(e,t=Vn){let n=e??{},o=t;return{placement:fe(pw,n.placement,o.placement),fullWidth:We(n.fullWidth,o.fullWidth),width:un(n.width,hw,o.width),height:fe(fw,n.height,o.height),tintColor:bw(n.tintColor,o.tintColor),tintOpacity:un(n.tintOpacity,gw,o.tintOpacity),outsideClick:We(n.outsideClick,o.outsideClick),closeButton:fe(mw,n.closeButton,o.closeButton)}}var Gm="cart-drawer",tG="cart-drawer",yw={kickerBadge:"",kickerText:"Your order",titleLead:"Your",titleAccent:"cart.",subtitleEmpty:"Empty for now.",subtitleOne:"One set in your cart.",subtitleMany:"{count} sets in your cart.",leadTimeValue:"",shipsToFallback:"",promises:[],emptyKicker:"No wheels yet",emptyBody:"Your cart is empty. Pick a wheel to get started."};function nG(e,t){return t===0?e.subtitleEmpty:t===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(t))}function oG(e){let t=e??{},n=yw;return{kickerBadge:J(t.kickerBadge,n.kickerBadge),kickerText:J(t.kickerText,n.kickerText),titleLead:J(t.titleLead,n.titleLead),titleAccent:J(t.titleAccent,n.titleAccent),subtitleEmpty:J(t.subtitleEmpty,n.subtitleEmpty),subtitleOne:J(t.subtitleOne,n.subtitleOne),subtitleMany:J(t.subtitleMany,n.subtitleMany),leadTimeValue:J(t.leadTimeValue,n.leadTimeValue),shipsToFallback:J(t.shipsToFallback,n.shipsToFallback),promises:Aa(t.promises,n.promises),emptyKicker:J(t.emptyKicker,n.emptyKicker),emptyBody:J(t.emptyBody,n.emptyBody)}}var Sw=["right","left"],_w={...Vn,width:520,tintOpacity:68};function aG(e){let t=e??{};return{...Di(t,_w),placement:fe(Sw,t.placement,"right"),height:"full",fullWidth:!1,autoOpen:We(t.autoOpen,!0)}}var Wm="consent-banner",lG="consent-banner";var Ew=[{value:"bar",label:"Bar"},{value:"card",label:"Card"}],cG="Layout",zm={layout:"bar"},Tw=e=>Ew.some(t=>t.value===e);function uG(e){let t=J((e??{}).layout,zm.layout);return{layout:Tw(t)?t:zm.layout}}var dG={...Vn,placement:"bottom-center",fullWidth:!0,width:440,tintOpacity:0,outsideClick:!1,closeButton:"none"};var xw="consentWords",vw=["eyebrow","notice","accept","reject","choose"];function ww(e){let t=(e??{})[xw];return typeof t=="string"&&vw.includes(t)?t:null}function Cw(e){let t=e?.props;return t?ww(t)!==null?!0:Object.values(t).some(n=>Array.isArray(n)&&n.some(o=>o&&typeof o=="object"&&"props"in o&&Cw(o))):!1}var Ow=["meta","eyebrow","heading","body","statName","statValue","formEyebrow","formHeading","formIntro","fieldLabel","option","finePrint","dismiss","doneHeading","doneBody"],mG={meta:"Meta line",eyebrow:"Eyebrow",heading:"Heading",body:"Body",statName:"Stat name",statValue:"Stat value",formEyebrow:"Form eyebrow",formHeading:"Form heading",formIntro:"Form intro",fieldLabel:"Field label",option:"Option",finePrint:"Fine print",dismiss:"Dismiss link",doneHeading:"Success heading",doneBody:"Success message"},Pw={meta:"styleMeta",eyebrow:"styleEyebrow",heading:"styleHeading",body:"styleBody",statName:"styleStatName",statValue:"styleStatValue",formEyebrow:"styleFormEyebrow",formHeading:"styleFormHeading",formIntro:"styleFormIntro",fieldLabel:"styleFieldLabel",option:"styleOption",finePrint:"styleFinePrint",dismiss:"styleDismiss",doneHeading:"styleDoneHeading",doneBody:"styleDoneBody"},hG={meta:{font:"--pp-meta-font",size:"--pp-meta-size"},eyebrow:{font:"--pp-eyebrow-font",size:"--pp-eyebrow-size"},heading:{font:"--pp-heading-font",size:"--pp-heading-size"},body:{font:"--pp-body-font",size:"--pp-body-size"},statName:{font:"--pp-statname-font",size:"--pp-statname-size"},statValue:{font:"--pp-statvalue-font",size:"--pp-statvalue-size"},formEyebrow:{font:"--pp-formeyebrow-font",size:"--pp-formeyebrow-size"},formHeading:{font:"--pp-formheading-font",size:"--pp-formheading-size"},formIntro:{font:"--pp-formintro-font",size:"--pp-formintro-size"},fieldLabel:{font:"--pp-fieldlabel-font",size:"--pp-fieldlabel-size"},option:{font:"--pp-option-font",size:"--pp-option-size"},finePrint:{font:"--pp-fineprint-font",size:"--pp-fineprint-size"},dismiss:{font:"--pp-dismiss-font",size:"--pp-dismiss-size"},doneHeading:{font:"--pp-doneheading-font",size:"--pp-doneheading-size"},doneBody:{font:"--pp-donebody-font",size:"--pp-donebody-size"}};function Km(e){let t={};for(let n of Ow){let o=dt(e[Pw[n]]);o&&(t[n]=o)}return t}var yG={heading:"Join our email list",placeholder:"Email address",buttonLabel:"Subscribe"},kw={lead:"We accept"},SG={...kw,methods:[],size:"sm",align:"start",dataSource:bc},Bi="site-footer";var Hi=Bi,_G={desktop:!0,tablet:!0,mobile:!0},EG={desktop:!1,tablet:!1,mobile:!1},Fi=1,jm=6,TG=Array.from({length:jm-Fi+1},(e,t)=>Fi+t),Ia={desktop:6,tablet:3,mobile:2},Aw={2:{desktop:2,tablet:2,mobile:1},3:{desktop:3,tablet:3,mobile:1},4:{desktop:4,tablet:2,mobile:2},5:{desktop:5,tablet:3,mobile:2},6:{desktop:6,tablet:3,mobile:2}},At=e=>Math.min(Math.max(Math.round(e),Fi),jm);function xG(e){if(typeof e=="number")return Aw[At(e)]??{desktop:At(e),tablet:At(e),mobile:At(e)};if(e&&typeof e=="object"){let t=e;return{desktop:At(t.desktop??Ia.desktop),tablet:At(t.tablet??Ia.tablet),mobile:At(t.mobile??Ia.mobile)}}return{...Ia}}var Mi="subscribe-popup",IG="subscribe-popup",Iw=[Mi,Bi,Gm,Wm];function Ym(e){return Iw.includes(e)}var Rw=["right","left"],Nw={metaLabel:"Meta label",issueLabel:"Label",issueNumber:"00",kicker:"Kicker",heading:`Main heading
8
- *Highlight line*`,deck:"Add a sentence or two of supporting copy.",stats:[{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"}],formLabel:"Section label",formHeading:"Main heading *highlight*",formIntro:"Add a sentence or two of supporting copy.",firstNameLabel:"Field label",firstNamePlaceholder:"Placeholder",emailLabel:"Field label",emailPlaceholder:"Placeholder",interestsLabel:"Field label",interests:["Option one","Option two","Option three"],frequencyLabel:"Field label",frequencies:["Option one","Option two","Option three"],submitText:"Button label",finePrint:"Fine print",dismissText:"Dismiss link",emailInvalidText:"Enter a valid email address.",submitErrorText:"Could not subscribe right now. Please try again.",successHeading:"Main heading *highlight*",successBody:"Add a sentence or two of supporting copy \u2014 the {email} and {issue} tokens are substituted here.",keepBrowsingText:"Button label",autoOpen:Ce.autoOpen,autoOpenDelaySec:Ce.autoOpenDelaySec,formSlug:"",trigger:Ce.trigger,scrollPercent:Ce.scrollPercent,showOn:Ce.showOn,showOnPages:[],hideAfter:Ce.hideAfter,hideDays:Ce.hideDays,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},G=J,Lw=We,Xm=Aa;function Vm(e,t){if(e==null)return t;let n=o=>o.trim()?o:"";if(typeof e=="string")return n(e);if(typeof e=="object"&&"text"in e){let o=e.text;return typeof o=="string"?n(o):""}return t}function Dw(e,t){return Array.isArray(e)?Xm(e,[]):t}function Fw(e,t){return Array.isArray(e)?e.map(n=>{let o=n??{};return{label:G(o.label,""),value:G(o.value,"")}}).filter(n=>n.label||n.value):t}function NG(e){let t=e??{},n=Nw,o=Um(t);return{metaLabel:G(t.metaLabel,n.metaLabel),issueLabel:Vm(t.issueLabel,n.issueLabel),issueNumber:Vm(t.issueNumber,n.issueNumber),kicker:G(t.kicker,n.kicker),heading:G(t.heading,n.heading),deck:G(t.deck,n.deck),stats:Fw(t.stats,n.stats),formLabel:G(t.formLabel,n.formLabel),formHeading:G(t.formHeading,n.formHeading),formIntro:G(t.formIntro,n.formIntro),firstNameLabel:G(t.firstNameLabel,n.firstNameLabel),firstNamePlaceholder:G(t.firstNamePlaceholder,n.firstNamePlaceholder),emailLabel:G(t.emailLabel,n.emailLabel),emailPlaceholder:G(t.emailPlaceholder,n.emailPlaceholder),interestsLabel:G(t.interestsLabel,n.interestsLabel),interests:Xm(t.interests,n.interests),frequencyLabel:G(t.frequencyLabel,n.frequencyLabel),frequencies:Dw(t.frequencies,n.frequencies),submitText:G(t.submitText,n.submitText),finePrint:G(t.finePrint,n.finePrint),dismissText:G(t.dismissText,n.dismissText),emailInvalidText:G(t.emailInvalidText,n.emailInvalidText),submitErrorText:G(t.submitErrorText,n.submitErrorText),successHeading:G(t.successHeading,n.successHeading),successBody:G(t.successBody,n.successBody),keepBrowsingText:G(t.keepBrowsingText,n.keepBrowsingText),formSlug:typeof t.formSlug=="string"?t.formSlug.trim():n.formSlug,autoOpen:o.autoOpen,autoOpenDelaySec:o.autoOpenDelaySec,trigger:o.trigger,scrollPercent:o.scrollPercent,showOn:o.showOn,showOnPages:o.showOnPages,hideAfter:o.hideAfter,hideDays:o.hideDays,formSide:fe(Rw,t.formSide,n.formSide),valuePanelOnPhone:Lw(t.valuePanelOnPhone,n.valuePanelOnPhone),sectionAccent:t.sectionAccent,sectionCorners:t.sectionCorners,sectionCornerSides:t.sectionCornerSides,textStyles:Km(t)}}function Bw(e,t=Math.random){for(;;){let n=`popup-${Math.floor(t()*2176782336).toString(36).padStart(6,"0")}`;if(!e.has(n))return n}}function Hw(e){return{root:{props:{title:e,kind:Li}},content:[],zones:{}}}function BG(e,t,n){return{slug:Bw(t,n),title:e,kind:ii,layout:Hw(e)}}function Ui(e){return e?.root?.props?.kind===Li}function Jm(e){let t=new Map;return(n="")=>{let o=Am(),a=t.get(n);if(!a||a.token===null&&o!==null){let s=o||!Ww().usesBridgedToken?e(o??"",n).catch(()=>[]):Promise.resolve([]);return t.set(n,{promise:s,token:o}),s}return a.promise}}var Vw=Jm(async(e,t)=>{let n=t?{siteId:t}:void 0,{pages:o}=xe();return o.linkTargets?o.linkTargets(n):(await o.list(n)).map(a=>({id:a.id,slug:a.slug,label:a.label,layout:null}))}),Yw=Jm(async(e,t)=>await xe().blog?.posts(t?{siteId:t}:void 0)??[]);function Xw({value:e,onChange:t,label:n="Link",data:o,filters:a}){let s=Na(()=>Ni(o,a),[o,a]),r=c(n);return It(Zm,{label:r,icon:It(Uw,{}),children:It($w,{value:e,onChange:i=>t(i),kinds:s.kinds,rules:s.rules,filtersFor:s.filtersFor,label:r})})}function Qm(){let{siteId:e,capabilities:t}=Kw(),{offersCommerce:n,hasBlog:o}=t,[a,s]=Ra([]),[r,i]=Ra([]),[l,u]=Ra([]),[d,p]=Ra(null),f=jw().chrome,m=f?.products?.list,b=f?.linkFilters,y=b?void 0:f?.linkRow,E=zw(!0);qm(()=>(E.current=!0,()=>{E.current=!1}),[]),qm(()=>{let x=!0;return Vw(e??void 0).then(v=>x&&E.current&&s(v)),o&&Yw(e??void 0).then(v=>x&&E.current&&i(v)),n&&m?.().then(v=>x&&E.current&&u(v)),n&&b?b.load(e).catch(()=>null).then(v=>x&&E.current&&p(()=>v)):p(null),()=>{x=!1}},[e,n,o,m,b]);let S=Na(()=>({pages:a.filter(x=>!Ym(x.slug)&&!Ui(x.layout)).map(x=>({slug:x.slug,title:x.label,docs:[x.layout]})),popups:a.filter(x=>x.slug===Mi||Ui(x.layout)).map(x=>({slug:x.slug,title:x.label})),posts:o?r.map(x=>({slug:x.slug,title:x.title})):[],products:n?l.map(x=>({href:x.href,name:x.name})):[],offers:{offersCommerce:n,offersService:o}}),[a,r,l,n,o]),T=Na(()=>d?d(S.pages):null,[d,S]);return{data:S,filters:T,pages:a,offersCommerce:n,HostLinkRow:y}}function e2({label:e,icon:t,text:n,onTextChange:o,link:a,onLinkChange:s}){let{data:r,filters:i}=Qm(),l=Na(()=>Ni(r,i),[r,i]),u=c(e);return It(Zm,{label:u,icon:t,children:It(Gw,{label:u,text:n,onTextChange:o,link:a,onLinkChange:d=>s(d),kinds:l.kinds,rules:l.rules,filtersFor:l.filtersFor})})}function eh({value:e,onChange:t,label:n="Link"}){let o=typeof e=="string"?e:"",{data:a,filters:s,pages:r,offersCommerce:i,HostLinkRow:l}=Qm(),u=a.pages.map(p=>zn(p.slug)),d=i&&l&&(o==="/"||u.includes(o))?l:void 0;return Mw("div",{children:[It(Xw,{value:o,onChange:t,label:n,data:a,filters:s}),d&&It(d,{value:o,onChange:t,pages:r})]})}import{UiIcon as ng}from"efficient-easel/draw/client";import{VIEW_TIERS as Fa,phoneKey as th,resolveViewValue as qw,tabletKey as nh,viewKeyAt as H}from"efficient-easel/draw";import{SECTION_PAD_UNIT_KEY as rh,SITE_SIDE as Zw,VIEW_ABOVE as Jw,convertLength as ih,isLengthUnit as Qw,isSiteSide as lh,sideLengthAt as eC,sideValueAt as tC,withLength as Ba}from"efficient-easel/screen/lib/content/length-units";var me={min:10,max:200,step:10};function nC(e,t,n,o=0){let a=O(e),s=O(t);if(a===void 0&&s===void 0)return;let r=Rt(n),i=l=>l===void 0?void 0:r==="px"?l:Ba(l,r,o);return{paddingTop:i(a),paddingBottom:i(s)}}var Rt=e=>F(e),$i=(e,t)=>typeof e=="object"?e[t]:e??0,oC=e=>typeof e=="object"&&e!==null&&"top"in e,Yn=(e,t,n)=>oC(e)?$i(e[t],n):$i(e,n),aC={top:"top",bottom:"bottom"};function sC(e,t,n,o){let a=O(e),s=O(t);if(a===void 0&&s===void 0)return;let r=Rt(n),i=(l,u)=>l===void 0?void 0:r==="px"?l:Ba(l,r,u);return{paddingTop:i(a,o("top","desktop")),paddingBottom:i(s,o("bottom","desktop"))}}var rC="sf-pad-top-phone",iC="sf-pad-bottom-phone",lC="--sf-pad-t-phone",cC="--sf-pad-b-phone",uC="sf-pad-left-phone",dC="sf-pad-right-phone",pC="--sf-pad-l-phone",fC="--sf-pad-r-phone",mC="sf-pad-top-tablet",hC="sf-pad-bottom-tablet",gC="sf-pad-left-tablet",bC="sf-pad-right-tablet",yC="--sf-pad-t-tablet",SC="--sf-pad-b-tablet",_C="--sf-pad-l-tablet",EC="--sf-pad-r-tablet",Ki="sf-section-pad";function ji(e){let t={desktop:e.unit,tablet:e.unitTablet,phone:e.unitPhone},n=e.totals?.length||typeof e.frame=="object"?(s,r)=>e.totals?.includes(H(s,r))?0:Yn(e.frame,s,r):e.frame,o=typeof n=="function"?sC(e.top,e.bottom,e.unit,n):nC(e.top,e.bottom,e.unit,n),a=Vi({left:e.left,right:e.right},{top:e.topPhone,bottom:e.bottomPhone,left:e.leftPhone,right:e.rightPhone},{top:e.topTablet,bottom:e.bottomTablet,left:e.leftTablet,right:e.rightTablet},{top:e.top,bottom:e.bottom,left:e.left,right:e.right},t,n,e.sideSpace);return o===void 0&&!a.classes.length&&!Object.keys(a.style).length?null:{className:[Ki,...a.classes].join(" "),style:{...o,...a.style}}}var TC=e=>lh(e)?e:O(e),xC=[["top","paddingTop",[mC,yC],[rC,lC]],["bottom","paddingBottom",[hC,SC],[iC,cC]],["left","paddingLeft",[gC,_C],[uC,pC]],["right","paddingRight",[bC,EC],[dC,fC]]];function Gi(e,t,n){return!Qw(t)||t==="px"?e:ih(e,"px",t,n,{min:0,max:me.max,step:1})}var ch=e=>{let t=Jw[e];return t?[e,...ch(t)]:[e]},La=Object.fromEntries(Fa.map(e=>[e,ch(e)]));function vC(e,t,n,o={},a=0){let s={desktop:!0,tablet:t!==void 0,mobile:n!==void 0},r=(b,y,E)=>{if(y==="px")return`${b}px`;let S=La[E].find(x=>s[x])??"desktop",T=Ba(b,y,$i(a,S));return typeof T=="number"?`${T}px`:T},i={n:e,[nh("n")]:t,[th("n")]:n,u:o.desktop,[nh("u")]:o.tablet,[th("u")]:o.phone},l=qw("spacing",O(e),O(t),O(n),$t()),u=(b,y,E)=>{if(tC(i,{side:"n"},b,"side",["side"])?.value===Zw)return Kr().value;let S=eC(i,{side:"n"},"u",b,"side");if(!S)return;let T=y!==null&&!E&&S.unit==="px"&&typeof l[y]=="number";return r(T?l[y]:S.value,S.unit,b)},d=u("desktop",null,!0),p={},f=u("tablet","tablet",t!==void 0);f!==void 0&&(t!==void 0||f!==d)&&(p.tablet=f);let m=u("mobile","phone",n!==void 0);return m!==void 0&&(n!==void 0||m!==d)&&(p.phone=m),p}function Vi(e,t,n={},o=e,a={},s=0,r="box"){let i={},l={},u=[],d=Kr(r),p=!1;for(let[f,m,...b]of xC){let y=f==="left"||f==="right"?TC:O,E=y(e[f]),S=j(aC,f),T=S?typeof s=="function"?{desktop:s(S,"desktop"),tablet:s(S,"tablet"),mobile:s(S,"mobile")}:s:0,x=typeof T=="object"?T.desktop:T;lh(E)?(i[m]=d.value,p=!0):E!==void 0&&(i[m]=Rt(a.desktop)==="px"?E:Ba(E,Rt(a.desktop),x));let v=vC(y(o[f]),y(n[f]),y(t[f]),a,T);for(let[w,[R,C]]of[["tablet",b[0]],["phone",b[1]]]){let D=v[w];D!==void 0&&(u.push(R),l[C]=D,D===d.value&&(p=!0))}}return p&&u.push(...d.className.split(" ")),{classes:u,style:{...i,...l}}}var uh={top:"padTop",bottom:"padBottom",left:"padLeft",right:"padRight"},Yi="padUnit";function wC(e,t){let n=e[Yi],o=(a,s,r)=>{let i=O(a)??(r===void 0?void 0:Gi(r,n,"desktop")),l=O(s);return l===void 0?i:(i??0)+Gi(l,n,"desktop")};return{top:o(e.padTop,e.sectionPaddingTop,t.top),bottom:o(e.padBottom,e.sectionPaddingBottom,t.bottom)}}function u2(e,t,n={}){let o=wC(e,t),a={...CC(e,uh,!0,Yi),top:o.top,bottom:o.bottom};n.noTop&&Object.assign(a,{top:0,topTablet:void 0,topPhone:void 0});let s=ji(a),r=s?s.className.split(" ").filter(i=>i!==Ki):[];return{...r.length?{className:r.join(" ")}:{},style:s?.style??{}}}var Da={top:"sectionPaddingTop",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft",right:"sectionPaddingRight"},d2=[...["top","bottom","left","right"].map(e=>[uh[e],Da[e]]),[Yi,rh]].flatMap(([e,t])=>[[e,t],...["tablet","mobile"].map(n=>[H(e,n),H(t,n)])]);function CC(e,t=Da,n=!0,o=t===Da?rh:void 0){let a={};if(o){e[o]!==void 0&&(a.unit=e[o]);for(let r of["tablet","mobile"])e[H(o,r)]!==void 0&&(a[H("unit",r)]=e[H(o,r)])}for(let r of n?["top","bottom","left","right"]:["top","bottom"]){a[r]=e[t[r]];for(let i of["tablet","mobile"])a[H(r,i)]=e[H(t[r],i)]}let s=e[OC];if(Array.isArray(s)){let r=dh.flatMap(i=>Fa.filter(l=>s.includes(H(t[i],l))).map(l=>H(i,l)));r.length&&(a.totals=r)}return a}var OC="padTotal",dh=["top","bottom"];function p2(e=Da){return dh.flatMap(t=>Fa.map(n=>H(e[t],n)))}var zi=16,Wi=24,PC={text:zi,heading:Wi,line:0},oh={all:{12:"py-3",16:"py-4",24:"py-6"},edge:{12:"max-view-wide:py-3"}},kC={[zi]:oh.all[zi],[Wi]:oh.all[Wi],[PC.line]:""};function f2(e,t){return{className:kC[t]??"",...e?{pad:{values:e,frame:t}}:{}}}var m2=e=>({desktop:e.top,tablet:e.top,mobile:e.topPhone});function h2(e,t){if(!t)return{root:sh(e.values,e.frame),outer:null};if(!e.values.totals?.length)return{root:null,outer:ah(e.values)};let n=e.values,{top:o,bottom:a,topTablet:s,bottomTablet:r,topPhone:i,bottomPhone:l,left:u,right:d,leftTablet:p,rightTablet:f,leftPhone:m,rightPhone:b,...y}=n,E={...y,top:o,bottom:a,topTablet:s,bottomTablet:r,topPhone:i,bottomPhone:l},S=sh(e.drawsFrame?AC(E,e.frame):E,e.frame),T=S&&e.drawsFrame?{...S,className:S.className.split(" ").filter(v=>v!==Ki).join(" ")}:S,x=["tablet","mobile"].some(v=>["top","bottom"].some(w=>typeof n[H(w,v)]=="number"&&!n.totals?.includes(H(w,v))));return{root:T&&e.edge&&T.className&&!x?{...T,attrs:Nc}:T,outer:ah({...y,totals:void 0,left:u,right:d,leftTablet:p,rightTablet:f,leftPhone:m,rightPhone:b})}}function AC(e,t){let n={...e},o=[...e.totals??[]];for(let a of Fa)for(let s of["top","bottom"]){if(La[a].some(l=>O(e[H(s,l)])!==void 0))continue;let r=l=>Yn(t,s,l),i=La[a][1];i&&r(i)===r(a)||(n[H(s,a)]=Gi(r(a),e[H("unit",a)],a),o.push(H(s,a)))}return{...n,totals:o}}function IC(e,t){let n={...e};for(let o of["tablet","mobile"]){let a=H("unit",o),s=["top","bottom","left","right"].some(r=>O(e[H(r,o)])!==void 0);for(let r of["top","bottom"]){if(O(n[H(r,o)])!==void 0)continue;let i=La[o].slice(1).find(d=>O(n[H(r,d)])!==void 0);if(!i||Yn(t,r,i)===Yn(t,r,o)||e.totals?.includes(H(r,i)))continue;let l=O(n[H(r,i)]),u=Rt(n[H("unit",i)]);if(s){let d=Rt(n[a]);n[H(r,o)]=u===d?l:ih(l,u,d,o,{min:0,max:me.max,step:1})}else n[H(r,o)]=l,n[a]=n[H("unit",i)]}}return n}function ah(e){return ji(e)}function sh(e,t){let n=typeof t=="object"?IC(e,t):e,o=(a,s,r,i,l)=>typeof a!="number"?void 0:Rt(s)==="px"&&!n.totals?.includes(r)?a+Yn(t,i,l):a;return ji({...n,frame:t,top:o(n.top,n.unit,"top","top","desktop"),bottom:o(n.bottom,n.unit,"bottom","bottom","desktop"),topTablet:o(n.topTablet,n.unitTablet,"topTablet","top","tablet"),bottomTablet:o(n.bottomTablet,n.unitTablet,"bottomTablet","bottom","tablet"),topPhone:o(n.topPhone,n.unitPhone,"topPhone","top","mobile"),bottomPhone:o(n.bottomPhone,n.unitPhone,"bottomPhone","bottom","mobile")})}import{BUTTON_PAD_KEYS as Ha,buttonBorderOf as RC,buttonFillOpacityOf as NC,buttonPadSidesOf as LC,viewKeyAt as DC}from"efficient-easel/draw";import{BUTTON_PAD_UNIT_KEY as Xi,lengthOf as FC}from"efficient-easel/screen/lib/content/length-units";var BC="px-6 py-4",HC=4,Ma=e=>{let t=new RegExp(`\\bp${e}-(?:\\[(\\d+)px\\]|(\\d+))`).exec(BC);if(!t)throw new Error(`BUTTON_PAD_CLASSES has no p${e}`);return t[1]!==void 0?Number(t[1]):Number(t[2])*HC},v2={top:Ma("y"),right:Ma("x"),bottom:Ma("y"),left:Ma("x")},fh="var(--btn)";function MC(e){let t=e.variant==="ghost",n=NC(e.buttonFillOpacity),o=RC(e.buttonBorder),a=W(e.buttonColor);return{fillOpacity:n??(t?0:100),border:{width:o?.width??1,color:o?.color??a??(t?"currentColor":fh)},changed:n!==void 0||o!==void 0}}function w2(e){let t=MC(e);if(!t.changed)return null;let n=W(e.buttonColor)??fh;return{background:t.fillOpacity===0?"transparent":t.fillOpacity===100?n:`color-mix(in srgb, ${n} ${t.fillOpacity}%, transparent)`,borderWidth:FC(t.border.width,F(e.buttonBorderUnit)),borderStyle:"solid",borderColor:t.border.color}}var UC="var(--sf-button-radius, 0)";function C2(e){let t=O(e.buttonCorners),n=De(e.buttonCornerSides);if(t===void 0&&n===null)return null;let o=t===void 0?UC:M(Math.max(0,t),e.buttonCornersUnit);return{borderRadius:n===null?o:Ct(o,n)}}function O2(e){let t=(r,i)=>e[DC(r,i)],n=r=>LC({top:t(Ha.top,r),right:t(Ha.right,r),bottom:t(Ha.bottom,r),left:t(Ha.left,r)})??{},o={desktop:t(Xi,"desktop"),tablet:t(Xi,"tablet"),phone:t(Xi,"mobile")},{classes:a,style:s}=Vi(n("desktop"),n("mobile"),n("tablet"),void 0,o);return Object.keys(s).length?{className:a.join(" "),style:s}:null}var ph="upper";function mh(e,t,n){let o=e&&typeof e=="object"?e:{},a=W(o.textStyle),s=a?W(t?.find(d=>d?.id===a)?.name):void 0,r=a?/^(heading|body)-(\d+)$/.exec(a):null,i=a?s||(r?n.styleName({kind:r[1],n:Number(r[2])}):a):n.noStyle,{cases:l}=n,u=W(o.case)??ph;return`${i} \xB7 ${l[u]??l[ph]}`}import{usePreviewParts as FP}from"efficient-easel/draw/client";import{encodePartId as BP}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as HP,useEaselStrings as MP}from"efficient-easel/strings";import{PIN_STICK_VAR as $C,PIN_TRACK_POSITION_VAR as GC,pinAttrs as hh,pinStickVars as zC,readPin as Ji,readPinEnd as gh}from"efficient-shell/format";var N2="Stick to top",_e={min:0,max:200,step:4,fallback:0},Xn={kind:"position",unitKey:"stickTopDistanceUnit"},bh=zt(Xn),[WC,KC,jC]=bh,el="Pin while scrolling",yh="Scroll",Oe={distance:"--sf-pin-distance",position:"--sf-pin-position",on:"--sf-pin-on",length:"--sf-pin-length",stick:"--sf-pin-stick",trackPosition:"--sf-pin-track-position",header:"--sf-pin-header"},qn="stickTopScreens",VC=[qn,"stickTopScreensTablet","stickTopScreensPhone"],tl="Screens",nl="stickTopStop",dn="screen",Sh="Pin stops at",_h=[{value:"header",label:"Under the header"},{value:dn,label:"Screen top"}],Eh="header",Th="Under the header: the section stops below the site header. Screen top: it stops at the top edge of the screen, under a see-through header.";function ol(e){return e===dn?dn:"header"}function xh(e){return e===dn?dn:void 0}var al="stickAbove",vh="Stays above",wh="On: the pinned box stays on top, and the sections after it scroll under it.";function YC(e){return e.stickAbove===!0}var sl="stickEnd",Qi="away",Ch="Pin ends",Oh=[{value:"over",label:"Next slides over"},{value:Qi,label:"Scrolls away"}],Ph="over",kh="Next slides over: the next section covers this one before it moves. Scrolls away: this section goes up with the page, and the next section follows under it.";function rl(e){return gh(e)}function Ah(e){return gh(e)===Qi?Qi:void 0}var L2=["stickTop","stickTopDistance","stickTopTablet","stickTopDistanceTablet","stickTopPhone","stickTopDistancePhone",...bh,...VC,nl,al,sl],D2=new Set(["IntroBleed"]),F2=new Set(["CategoryBar","DocTabs","Contents"]);function XC(e){return typeof e.stickTop=="boolean"?e.stickTop:e.sticky!==!1}var qi=e=>Ji(!0,e).length,il={any:["stickTop","stickTopTablet","stickTopPhone"].map(e=>({field:e,is:!0}))},Ih={all:[{not:{field:"stickTop",in:[!0,!1]}},{not:{field:"sticky",is:!1}}]};function Zi(e,t="px"){let n=O(e)??_e.fallback;return t!=="px"?Math.max(_e.min,n):Math.min(_e.max,Math.max(_e.min,Math.round(n)))}function ll(e){return typeof e.stickTopTablet=="boolean"}function cl(e){return typeof e.stickTopPhone=="boolean"}function pn(e,t={}){let n=t.intro?XC(e):e.stickTop===!0,o=e,a=F(o[WC]),s=Zi(e.stickTopDistance,a),r=qi(e.stickTopScreens),i=ll(e),l=i?e.stickTopTablet===!0:n,u=i?F(o[KC]):a,d=i?Zi(e.stickTopDistanceTablet,u):s,p=i?qi(e.stickTopScreensTablet):r,f=cl(e),m=f?e.stickTopPhone===!0:l,b=f?F(o[jC]):u,y=f?Zi(e.stickTopDistancePhone,b):d,E=f?qi(e.stickTopScreensPhone):p;return{desktop:n,desktopDistance:s,desktopUnit:a,desktopScreens:r,tablet:l,tabletDistance:d,tabletUnit:u,tabletScreens:p,ownTablet:i,phone:m,phoneDistance:y,phoneUnit:b,phoneScreens:E,ownPhone:f}}function B2(e,t={}){let n=pn(e,{intro:t.atScreenTop});if(!n.desktop&&!n.tablet&&!n.phone)return null;let o=t.atScreenTop===!0&&typeof e.stickTop!="boolean",a=n.desktop&&n.desktopScreens>0||n.tablet&&n.tabletScreens>0||n.phone&&n.phoneScreens>0,s=t.above===!0&&YC(e),r=t.track===!0&&!o&&a&&!s,i=(p,f,m,b)=>kt({tabletClass:"",tabletVar:`${p}-tablet`,phoneClass:"",phoneVar:`${p}-phone`},f,m,b).style,l={...t.atScreenTop||ol(e.stickTopStop)===dn?{[Oe.header]:"0px"}:{},[Oe.distance]:M(n.desktopDistance,n.desktopUnit),...i(Oe.distance,M(n.desktopDistance,n.desktopUnit),M(n.tabletDistance,n.tabletUnit),M(n.phoneDistance,n.phoneUnit))};if(r){let p=b=>b?"1":"0",f={...l,...n.desktop?{}:{[Oe.on]:"0"},...i(Oe.on,p(n.desktop),p(n.tablet),p(n.phone)),[Oe.length]:String(n.desktopScreens),...i(Oe.length,String(n.desktopScreens),String(n.tabletScreens),String(n.phoneScreens)),...qC(n.desktop&&n.desktopScreens===0,n.tablet&&n.tabletScreens===0,n.phone&&n.phoneScreens===0,i)},m=hh(Ji(!0),"track",{end:rl(e.stickEnd)});return{attrs:m.attrs,style:{...f,...m.style}}}let u=p=>p?"sticky":"static",d={...l,...n.desktop?{}:{[Oe.position]:"static"},...i(Oe.position,u(n.desktop),u(n.tablet),u(n.phone))};return{attrs:hh(Ji(!0),"stick",s?{above:s}:{}).attrs,style:d}}function qC(e,t,n,o){let a=[[Oe.stick,$C],[Oe.trackPosition,GC]],[s,r,i]=[e,t,n].map(zC);return Object.fromEntries(a.flatMap(([l,u])=>[...e?[[l,s[u]]]:[],...Object.entries(o(l,s[u],r[u],i[u]))]))}import{parseOption as ZC}from"efficient-shell/format";var JC=["column","row","tabs","accordion"];var QC={column:"Stacked",row:"One row",tabs:"Tabs",accordion:"Accordion"},Rh={Flex:JC,HeroGroup:["column","row"]},eO={Flex:"row",HeroGroup:"column"},tO={column:"flex-col",row:"flex-row",tabs:"flex-col",accordion:"flex-col"};function Ua(e,t){return ZC(Rh[e],eO[e],t)}function U2(e,t){return tO[Ua(e,t)]}function Nh(e){return Rh[e].map(t=>({label:QC[t],value:t}))}import{viewKeyAt as ul}from"efficient-easel/screen/lib/content/view-tiers";import{BORDER_WIDTH_MAX as Ga}from"efficient-easel/screen/lib/content/style-keys";var nO=["solid","dashed","dotted"],za=["top","right","bottom","left"],K2="sf-section-border",j2="sf-section-border-self",oO=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,aO=e=>typeof e=="number"&&Number.isFinite(e)?`${Math.min(Ga,Math.max(0,Math.round(e)))}px`:void 0,Zn={kind:"border",unitKey:"sectionBorderUnit"},V2=zt(Zn);function Y2(e){let t=Zn.unitKey;return{desktop:e[ul(t,"desktop")],tablet:e[ul(t,"tablet")],phone:e[ul(t,"mobile")]}}var Lh=(e,t)=>t==="px"?aO(e):typeof e=="number"&&Number.isFinite(e)?M(Math.max(0,e),t):void 0;function $a(e,{phone:t=!1,tablet:n=!1,unit:o}={}){if(!e||typeof e!="object")return;let a=t?"-phone":n?"-tablet":"",s={},r=F(o);for(let i of za){let l=Lh(e[i],r)??Lh(e.width,r);l!==void 0&&(s[`--sf-border-${i}-width${a}`]=l)}return typeof e.style=="string"&&nO.includes(e.style)&&(s[`--sf-border-style${a}`]=e.style),typeof e.color=="string"&&oO.test(e.color)&&(s[`--sf-border-color${a}`]=e.color.toLowerCase()),Object.keys(s).length?s:void 0}function dl(e){let{width:t,...n}=e;return typeof t!="number"?e:{...n,...Object.fromEntries(za.map(o=>[o,n[o]??t]))}}function X2(e,t,n,o={}){let a=$a(e,{unit:o.desktop}),s=$a(n,{tablet:!0,unit:o.tablet}),r=$a(n,{phone:!0,unit:o.tablet}),i=$a(t,{phone:!0,unit:o.phone}),l=r||i?{...r,...i}:void 0;return a||s||l?{...a,...s,...l}:void 0}import{parseHexColor as sO}from"efficient-shell/format";var fn="var(--section-bg)",pl="inherit";function fl(e,t){return e===pl?fn:e===void 0?t:Wa(e)}var rO=/var\(\s*--(surface-2|surface|line)\s*(?=[,)])/g;function Wa(e){let t=Ie(e);return t?Me(t):e.replace(rO,"var(--site-$1")}var iO={"var(--section-bg)":"band","var(--site-surface)":"surface","var(--site-surface-2)":"surface2"};function ml(e,t,n){let o=fl(e,t);if(!o||o==="transparent")return n.background.toLowerCase();let a=o.trim(),s=a.startsWith("#")?sO(a):null;if(s)return s.toLowerCase();let r=iO[a.replace(/\s+/g,"")];return(r?n[r]:n.background).toLowerCase()}var hl="transparent";function Dh(e,t){let n=fl(e,t);return!n||n===hl?"none":n===fn?"band":null}function Fh(e,t,n=t){let o=s=>!s||s==="transparent",a=fl(e,t);return a===n||o(a)&&o(n)}var Bh=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],Hh={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},mn="var(--wheel-stage)",Ka="transparent",Jn="inherit";function tz(e,t){return Wa(gl(e,t))}function gl(e,t){return e===Jn?mn:e==null?t:e===!0?mn:e===!1?Ka:e}function nz(e){return typeof e=="string"&&e!==Jn?Wa(e):mn}function oz(e){return e!==Ka&&e!=="none"&&e!==""}function Mh(e,t){return e===Jn||e===!0?!0:e==null?t===mn:!1}var Uh="inherit",ja="fixed",$h=e=>typeof e!="number"&&e!==ja,lO="var(--sf-heading-max, 9999px)";function rz(e,t,n,o,a){if(typeof e=="number")return M(e,a);if(e===ja)return t;let s=o?`var(--size-${o}, ${t})`:t;return n==="heading"?`min(${s}, ${lO})`:s}var bl={kind:"fontSize",unitKey:"titleSizeUnit"},yl={kind:"fontSize",unitKey:"bodySizeUnit"},cO=["desktop","mobile"],iz=[bl,yl].flatMap(e=>zt(e,cO));function lz(e){let t=(n,o)=>Vc(e,n,o);return{titleDesktop:t(bl,"desktop"),titleMobile:t(bl,"mobile"),bodyDesktop:t(yl,"desktop"),bodyMobile:t(yl,"mobile")}}var uO=["page","full"],Gh=["full","page"],Nt={full:"Full",page:"Content"},Sl="inherit",dO=e=>typeof e=="string"&&uO.includes(e),pO=e=>e===Sl;function fO(e,t){return pO(e.widthMode)?{mode:"full",inherited:!0}:dO(e.widthMode)?{mode:e.widthMode,inherited:!1}:{mode:t,inherited:t==="full"}}function fz(e){return fO(e,"page").mode==="full"}var mO={CustomHTML:"rawMarkup",Hero:"hero",HeroSingle:"hero",IntroBleed:"scrollOver",SpecStrip:"background",Timeline:"background",Footprint:"background",Prose:"background",ParagraphsA:"background",Cards:"background",KeyFeatures:"background",Chart:"background",Mockup:"background",Testimonials:"background",TitleWithButtons:"background",Countdown:"background",DocMasthead:"background",DocBody:"background",DocMetaCards:"background",Gallery:"background",GalleryB:"background",Reviews:"background",ReviewForm:"background",Form:"background",AppointmentBooking:"background",FAQ:"background",Events:"background",Split:"both",Breadcrumb:"both",Collections:"both",CatalogFilterBar:"both",AlloyWheelsListing:"both",Banner:"contained",Stats:"contained",Logos:"contained",Divider:"contained",OrderSummary:"contained",DeliveryOptions:"contained",PaymentBadges:"contained",CheckoutCTA:"contained",Flex:"contained",Grid:"contained",ContactCards:"contained",MessagingCards:"contained",OpeningHours:"contained",RateTable:"contained",Manifesto:"contentColumn",SectionHeader:"contentFull",ProductHero:"contentFull",ProductGrid:"productGrid",TimelineTrack:"capped",DetailRows:"capped",FitmentTable:"capped",TyreSizes:"capped",TyreFitment:"capped",EuTyreLabel:"capped",BundleOffer:"capped",CompatibleTyres:"capped",RelatedProducts:"capped",ProcessSteps:"capped",StatsParagraph:"capped",Masthead:"capped",FeaturedCover:"capped",LongRead:"capped",Series:"capped",ContactLocations:"capped",FitmentFinder:"capped",SpecTable:"capped",Subscribe:"capped",SubscribeBlogs:"capped",ContactRouting:"capped",SubmitBuild:"capped"};function mz(e){return ge(mO,e)}var ne={background:"sectionBackgroundWidth",content:"sectionContentWidth",contentMax:"sectionContentMax",contentMaxUnit:"sectionContentMaxUnit"},hz={kind:"size",unitKey:ne.contentMaxUnit};function hO(e){let t=e[ne.contentMaxUnit],n=F(t),o=e[ne.contentMax],a=n==="px"?$p(o):typeof o=="number"&&Number.isFinite(o)&&o>0?o:null,s=hn(e[ne.content])??(a===null?null:"content");return{background:hn(e[ne.background]),content:s,contentMax:s==="content"?a:null,contentMaxUnit:n}}function gz(e){let t=hO(e);return t.content===null&&e.fullWidth===!0?{...t,content:"full"}:t}function bz(e){return e.background!==null||e.content!==null}var yz=e=>({[ne.background]:e}),Sz=e=>e==="full"?{[ne.content]:e,[ne.contentMax]:void 0,[ne.contentMaxUnit]:void 0}:{[ne.content]:e},_z=e=>({[ne.content]:"content",[ne.contentMax]:e}),Ez=e=>e==="background"?{[ne.background]:void 0}:{[ne.content]:void 0,[ne.contentMax]:void 0,[ne.contentMaxUnit]:void 0},zh="siteWidths",gO=e=>e==="full"||e==="content";function hn(e){return gO(e)?e:null}function Tz(e,t){return{[zh]:{background:hn(e),content:hn(t)}}}function xz(e){let t=e.editor?.metadata?.[zh];return{background:hn(t?.background),content:hn(t?.content)}}import{useEaselSession as UP}from"efficient-easel/screen/lib/session-context";import{BOX_GAP as $P,describedAs as lt,group as Ee,iconOf as Dt,sharedStyleKinds as ro}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Cg,onDesktopWords as Ft,phoneTwinFields as Il,saidAlignmentGrid as GP,useLengthUnit as zP}from"efficient-easel/screen/lib/document/box-fields";import{createElement as de}from"react";import{SettingsDefaultReset as bO,SettingsField as Wh}from"efficient-easel/panel";import{boxFieldBuilders as yO,describedAs as Kh,iconOf as jh,onDesktopWords as SO}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_KIND_UNITS as _O}from"efficient-easel/screen/lib/content/length-units";import{IconPicker as EO,PictureTiles as TO,Tooltip as xO,useShellStrings as vO}from"efficient-shell/ui";import{RotateIcon as wO}from"efficient-easel/icons";var Vh=e=>c(e),Qn=_O,q=yO(Vh,{lengthUnits:Qn}),Be=q.slider,Q=q.select,eo=q.Segmented,gn=q.segmented,Nz=q.alignmentField,Lz=q.alignmentFields,Dz=q.blockAlignmentField,Fz=q.blockAlignmentFields,Bz=q.boxJustifyField,Hz=q.boxAlignField,Mz=q.boxWrapField,Yh=q.directionField,Va=q.gapField,Uz=q.placementField,$z=q.PlacementGridView,Gz=q.positionFields,zz=q.sidesPaddingFields,to=q.lengthUnitFields;function Wz(e,t){return Be("Angle",de(wO),bo.min,bo.max,bo.step,e,"\xB0",t)}var _l=Symbol("efficient-web-builder.picture-picker-row"),CO={width:"3.5rem",height:"2.75rem",words:!0};function OO({value:e}){return vO().iconNames[e]??e}function El(e,t,n){return de(xO,{content:n,className:"sf-pick-tip",children:de("span",{className:"sf-pick"},de("span",{className:"sf-pick-pic"},e),de("span",{className:"sf-pick-cap"},t))})}function PO(e){let t=n=>n.label===void 0?de(OO,{value:n.value}):c(n.label);return e.map(n=>({value:n.value,...n.label===void 0?{}:{label:c(n.hint??n.label)},icon:El(n.picture,t(n),n.hint===void 0?t(n):c(n.hint))}))}function Xh(e,t){return de("span",{className:"sf-pick"},de("span",{className:"sf-pick-pic"},e),de("span",{className:"sf-pick-cap sf-pick-cap-closed"},t))}function Kz(e,t,n,o){let a=r=>n.some(i=>i.value===r),s=n.map(r=>({value:r.value,label:r.label}));return{type:"custom",...Kh({},{type:"radio",label:e,options:s}),options:s,render:r=>{let i=r.field?.currentValue,l=a(r.value)?r.value:a(i)?i:o;return de(Wh,{label:c(e),icon:jh(t)},de(TO,{label:c(e),captions:!0,columns:n.length,className:"sf-tiles-row",value:l,onChange:u=>{r.readOnly!==!0&&r.onChange(u)},options:n.map(u=>({value:u.value,label:c(u.label),picture:u.picture}))}))}}}function Tl(e,t,n,o,a={}){let s=l=>n.some(u=>u.value===l),r=l=>a.resolve?a.resolve(l):s(l)?l:void 0,i=n.map(l=>({value:l.value,...l.label===void 0?{}:{label:l.label},...l.showWhen?{showWhen:l.showWhen}:{}}));return{type:"custom",[_l]:!0,...Kh({},{type:"radio",label:e,options:i}),options:i,render:l=>{let{value:u,onChange:d,field:p}=l,f=p?.options,m=PO(n.filter(v=>!f||f.some(w=>w.value===v.value))),b="follows"in l,y=b?r(a.phoneRest?a.phoneRest(l.follows):l.follows)??o:void 0,E=p?.currentValue,S=r(u)??y??r(E)??o,T=u!=null&&u!=="",x=y===void 0?void 0:n.find(v=>v.value===y);return de(Wh,{label:c(e),icon:jh(t),action:b?de(bO,{words:P()?.panel,label:c(e),changed:T,detail:x?.label!==void 0?SO(Vh,c(x.label),l.followsView):void 0,disabled:l.readOnly===!0,onReset:()=>d(void 0)}):void 0},de(EO,{label:c(e),value:S,options:m,onChange:d,columns:a.columns,cell:a.cell??CO,tooltips:!1,disabled:l.readOnly===!0}))}}}import{VIEW_ABOVE as wl}from"efficient-easel/screen/lib/content/length-units";import{jsx as h,jsxs as I}from"react/jsx-runtime";import{NoSymbolIcon as BO}from"efficient-easel/icons";import{useId as HO}from"react";import{parseOption as qh}from"efficient-shell/format";var kO="line",AO=[{label:"None",value:"none"},{label:"Line",value:"line"},{label:"Stripes \xB7 fine",value:"stripes-fine"},{label:"Stripes \xB7 medium",value:"stripes-medium"},{label:"Stripes \xB7 bold",value:"stripes-bold"}],xl={"stripes-fine":{ink:4,period:12},"stripes-medium":{ink:8,period:18},"stripes-bold":{ink:14,period:28}},Yz=28,IO="-45deg",RO="color-mix(in oklab, var(--accent) 50%, var(--bg))";function NO(e){return e!=="line"&&e!=="none"}var LO={sm:24,md:48,lg:80},DO="md",FO=Object.keys(LO);function Xz(e){return qh(FO,DO,e)}function qz(e){return qh(AO,kO,e)}function Zz(e){if(!NO(e))return null;let{ink:t,period:n}=xl[e];return`repeating-linear-gradient(${IO}, ${RO} 0 ${t}px, transparent ${t}px ${n}px)`}var Jz={kind:"border",unitKey:"thicknessUnit"},Qz={kind:"size",base:"%",unitKey:"lengthPctUnit"};var Ya=44,Xa=28;function A({children:e}){return h("svg",{width:Ya,height:Xa,viewBox:`0 0 ${Ya} ${Xa}`,"aria-hidden":"true",fill:"currentColor",stroke:"currentColor",strokeWidth:1.25,children:e})}var _=({x:e,y:t,w:n,t:o=2,faint:a=!1})=>h("rect",{x:e,y:t,width:n,height:o,rx:o/2,stroke:"none",opacity:a?.45:1}),N=({x:e,y:t,w:n,h:o})=>h("rect",{x:e,y:t,width:n,height:o,rx:2,fill:"none"}),he=({x:e,y:t})=>h("circle",{cx:e,cy:t,r:1.75,stroke:"none"}),ee=({x1:e,y1:t,x2:n,y2:o})=>h("line",{x1:e,y1:t,x2:n,y2:o});function vl(e){let t=20/sn,n=5,o=1,a=[],s=0,r=0,i=0;for(let[d,p]of e)s+d>sn&&(r+=i*(n+o),s=0,i=0),a.push({x:12+s*t,y:r,w:d*t-o,h:p*n+(p-1)*o}),s+=d,i=Math.max(i,p);let l=r+i*(n+o)-o,u=(Xa-l)/2;return h(A,{children:a.map((d,p)=>h("rect",{x:d.x,y:u+d.y,width:d.w,height:d.h,rx:1,stroke:"none",opacity:.6},p))})}var rW={bars:I(A,{children:[h(_,{x:8,y:14,w:5,t:10}),h(_,{x:16,y:8,w:5,t:16}),h(_,{x:24,y:18,w:5,t:6}),h(_,{x:32,y:11,w:5,t:13})]}),line:I(A,{children:[h("polyline",{points:"6,22 14,15 22,18 30,8 38,11",fill:"none",strokeWidth:1.75,strokeLinejoin:"round"}),h(ee,{x1:6,y1:25,x2:38,y2:25})]}),donut:I(A,{children:[h("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,opacity:.45}),h("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,strokeDasharray:"34 57",transform:"rotate(-90 22 14)"})]})};function iW(e){if(e==="none")return h("span",{style:{display:"flex",width:Ya,height:Xa,alignItems:"center",justifyContent:"center"},children:h(BO,{size:20})});if(e==="line")return h(A,{children:h(ee,{x1:4,y1:14,x2:40,y2:14})});let{ink:t,period:n}=xl[e],o=.4,a=[];for(let s=-12;s<Ya;s+=n*o)a.push(h("polygon",{points:`${s},22 ${s+t*o},22 ${s+t*o+10},6 ${s+10},6`,stroke:"none"},s));return h(MO,{children:a})}function MO({children:e}){let t=`sf-div-${HO().replace(/[^\w-]/g,"")}`;return I(A,{children:[h("clipPath",{id:t,children:h("rect",{x:4,y:6,width:36,height:16,rx:2})}),h("g",{clipPath:`url(#${t})`,children:e})]})}var qa=({x:e,y:t,w:n,h:o})=>h("rect",{x:e,y:t,width:n,height:o,rx:2,stroke:"none",opacity:.3}),lW={tabs:I(A,{children:[h(_,{x:5,y:10,w:9}),h(_,{x:18,y:10,w:9,faint:!0}),h(_,{x:31,y:10,w:9,faint:!0}),h(ee,{x1:4,y1:17,x2:40,y2:17}),h(_,{x:4,y:16,w:11,t:2})]}),largeTabs:I(A,{children:[h(ee,{x1:4,y1:5,x2:40,y2:5}),h(he,{x:7,y:10}),h(_,{x:11,y:9,w:16}),h(_,{x:31,y:9,w:9,faint:!0}),h(ee,{x1:4,y1:14,x2:40,y2:14}),h(he,{x:7,y:19}),h(_,{x:11,y:18,w:13,faint:!0}),h(_,{x:31,y:18,w:9,faint:!0}),h(ee,{x1:4,y1:23,x2:40,y2:23})]})},cW={card:I(A,{children:[h(N,{x:10,y:3,w:24,h:22}),h(qa,{x:12,y:5,w:20,h:10}),h(_,{x:13,y:18,w:16}),h(_,{x:13,y:21,w:11,t:1.5,faint:!0})]}),cover:I(A,{children:[h(qa,{x:10,y:3,w:24,h:22}),h(N,{x:10,y:3,w:24,h:22}),h(_,{x:13,y:17,w:16}),h(_,{x:13,y:21,w:11,t:1.5})]})},uW={cards:I(A,{children:[h(N,{x:3,y:5,w:11,h:18}),h(N,{x:17,y:5,w:11,h:18}),h(N,{x:31,y:5,w:11,h:18}),h(_,{x:5,y:9,w:7}),h(_,{x:19,y:9,w:7}),h(_,{x:33,y:9,w:7}),h(_,{x:5,y:13,w:5,t:1.5,faint:!0}),h(_,{x:19,y:13,w:5,t:1.5,faint:!0}),h(_,{x:33,y:13,w:5,t:1.5,faint:!0})]}),"label-only":I(A,{children:[h("path",{d:"M8.5 7l3 3-3 3-3-3zM22.5 7l3 3-3 3-3-3zM36.5 7l3 3-3 3-3-3z",stroke:"none"}),h(_,{x:5,y:18,w:7}),h(_,{x:19,y:18,w:7}),h(_,{x:33,y:18,w:7})]})},dW={table:I(A,{children:[h(N,{x:3,y:5,w:38,h:18}),h(ee,{x1:15.7,y1:5,x2:15.7,y2:23}),h(ee,{x1:28.3,y1:5,x2:28.3,y2:23}),h("path",{d:"M15.7 5v18M28.3 5v18",fill:"none",strokeWidth:2.5}),h(_,{x:6,y:9,w:6,t:3}),h(_,{x:19,y:9,w:6,t:3}),h(_,{x:31,y:9,w:6,t:3}),h(_,{x:6,y:18,w:7,t:1.5,faint:!0}),h(_,{x:19,y:18,w:7,t:1.5,faint:!0}),h(_,{x:31,y:18,w:7,t:1.5,faint:!0})]}),list:I(A,{children:[h(ee,{x1:3,y1:7,x2:13,y2:7}),h(ee,{x1:17,y1:7,x2:27,y2:7}),h(ee,{x1:31,y1:7,x2:41,y2:7}),h(_,{x:3,y:11,w:6,t:3}),h(_,{x:17,y:11,w:6,t:3}),h(_,{x:31,y:11,w:6,t:3}),h(_,{x:3,y:17,w:8,t:1.5,faint:!0}),h(_,{x:17,y:17,w:8,t:1.5,faint:!0}),h(_,{x:31,y:17,w:8,t:1.5,faint:!0})]})},pW={plain:I(A,{children:[h(_,{x:5,y:12,w:9,t:4}),h(_,{x:18,y:12,w:9,t:4}),h(_,{x:31,y:12,w:9,t:4})]}),cards:I(A,{children:[h(N,{x:3,y:7,w:11,h:14}),h(N,{x:17,y:7,w:11,h:14}),h(N,{x:31,y:7,w:11,h:14}),h(_,{x:5,y:13,w:7}),h(_,{x:19,y:13,w:7}),h(_,{x:33,y:13,w:7})]}),marks:I(A,{children:[h(_,{x:8,y:12,w:6,t:4}),h(_,{x:17,y:12,w:6,t:4}),h(_,{x:26,y:12,w:6,t:4}),h(_,{x:35,y:12,w:3,t:4})]}),chips:I(A,{children:[h(N,{x:3,y:9,w:18,h:10}),h(N,{x:23,y:9,w:18,h:10}),h(he,{x:7,y:14}),h(_,{x:10,y:13,w:8}),h(he,{x:27,y:14}),h(_,{x:30,y:13,w:8})]})},fW={overlay:I(A,{children:[h(qa,{x:4,y:3,w:36,h:22}),h(N,{x:4,y:3,w:36,h:22}),h(_,{x:8,y:15,w:18,t:3}),h(_,{x:8,y:20,w:12})]}),stacked:I(A,{children:[h(_,{x:4,y:3,w:18,t:3}),h(_,{x:4,y:8,w:12}),h(qa,{x:4,y:13,w:36,h:12}),h(N,{x:4,y:13,w:36,h:12})]})},mW={split:I(A,{children:[h(_,{x:4,y:6,w:12,t:3}),h(_,{x:4,y:11,w:9,faint:!0}),h(ee,{x1:20,y1:4,x2:20,y2:24}),h(_,{x:24,y:6,w:16}),h(_,{x:24,y:10,w:11,faint:!0}),h(_,{x:24,y:17,w:16}),h(_,{x:24,y:21,w:11,faint:!0})]}),spine:I(A,{children:[h(ee,{x1:9,y1:4,x2:9,y2:24}),h(he,{x:9,y:8}),h(_,{x:14,y:7,w:24}),h(he,{x:9,y:14}),h(_,{x:14,y:13,w:20}),h(he,{x:9,y:20}),h(_,{x:14,y:19,w:24})]}),alternating:I(A,{children:[h(ee,{x1:22,y1:4,x2:22,y2:24}),h(he,{x:22,y:8}),h(_,{x:4,y:7,w:14}),h(he,{x:22,y:14}),h(_,{x:26,y:13,w:14}),h(he,{x:22,y:20}),h(_,{x:4,y:19,w:14})]}),track:I(A,{children:[h(ee,{x1:4,y1:12,x2:40,y2:12}),h(he,{x:8,y:12}),h(he,{x:22,y:12}),h(he,{x:36,y:12}),h(_,{x:4,y:17,w:8}),h(_,{x:18,y:17,w:8}),h(_,{x:32,y:17,w:8}),h(_,{x:4,y:21,w:6,faint:!0}),h(_,{x:18,y:21,w:6,faint:!0}),h(_,{x:32,y:21,w:6,faint:!0})]})},hW={standard:I(A,{children:[h(_,{x:4,y:5,w:10,t:1.5,faint:!0}),h(_,{x:4,y:10,w:28,t:4}),h(_,{x:4,y:18,w:34,faint:!0}),h(_,{x:4,y:22,w:24,faint:!0})]}),editorial:I(A,{children:[h(_,{x:4,y:5,w:5,t:1.5,faint:!0}),h(_,{x:4,y:10,w:20,t:5}),h(_,{x:28,y:11,w:12,faint:!0}),h(_,{x:28,y:15,w:9,faint:!0}),h(ee,{x1:4,y1:22,x2:40,y2:22})]}),simple:I(A,{children:[h(_,{x:4,y:8,w:10,t:1.5,faint:!0}),h(_,{x:4,y:13,w:26,t:4})]}),statement:I(A,{children:[h(_,{x:4,y:6,w:36,t:7}),h(_,{x:4,y:16,w:24,t:7})]}),natural:I(A,{children:[h(_,{x:4,y:8,w:22,t:3}),h(_,{x:4,y:15,w:34,faint:!0}),h(_,{x:4,y:19,w:28,faint:!0})]}),essay:I(A,{children:[h(_,{x:4,y:5,w:24,t:4}),h(_,{x:4,y:13,w:36,faint:!0}),h(_,{x:4,y:17,w:36,faint:!0}),h(_,{x:4,y:21,w:30,faint:!0})]})},gW={"spec-card":I(A,{children:[h(N,{x:4,y:3,w:36,h:22}),h(_,{x:8,y:7,w:14}),h(N,{x:8,y:12,w:8,h:9}),h(N,{x:18,y:12,w:8,h:9}),h(N,{x:28,y:12,w:8,h:9})]}),fitment:I(A,{children:[h(N,{x:4,y:4,w:10,h:5}),h(N,{x:16,y:4,w:10,h:5}),h(N,{x:28,y:4,w:10,h:5}),h(_,{x:4,y:14,w:34,faint:!0}),h(_,{x:4,y:18,w:34,faint:!0}),h(_,{x:4,y:22,w:34,faint:!0})]}),portal:I(A,{children:[h(N,{x:4,y:3,w:36,h:22}),h(_,{x:8,y:7,w:10,t:4}),h(_,{x:8,y:14,w:16,faint:!0}),h(_,{x:26,y:18,w:10,t:4})]}),kanban:I(A,{children:[h(N,{x:4,y:3,w:10,h:22}),h(N,{x:17,y:3,w:10,h:22}),h(N,{x:30,y:3,w:10,h:22}),h(_,{x:6,y:6,w:6,t:4}),h(_,{x:6,y:12,w:6,t:4}),h(_,{x:19,y:6,w:6,t:4}),h(_,{x:32,y:6,w:6,t:4}),h(_,{x:32,y:12,w:6,t:4})]}),claims:I(A,{children:[h(_,{x:4,y:5,w:12,faint:!0}),h(_,{x:20,y:4,w:18,t:4}),h(_,{x:4,y:12,w:12,faint:!0}),h(_,{x:20,y:11,w:10,t:4}),h(_,{x:4,y:19,w:12,faint:!0}),h(_,{x:20,y:18,w:14,t:4})]}),browser:I(A,{children:[h(N,{x:4,y:3,w:36,h:22}),h(ee,{x1:4,y1:8,x2:40,y2:8}),h(_,{x:8,y:11,w:28,t:5,faint:!0}),h(N,{x:8,y:18,w:8,h:4}),h(N,{x:18,y:18,w:8,h:4}),h(N,{x:28,y:18,w:8,h:4})]}),terminal:I(A,{children:[h(N,{x:4,y:3,w:36,h:22}),h("polyline",{points:"8,9 11,11 8,13",fill:"none"}),h(_,{x:13,y:10,w:14}),h(_,{x:8,y:16,w:22,faint:!0}),h(_,{x:8,y:20,w:16,faint:!0})]})},Zh={width:"5.75rem",height:"3.75rem",words:!0},bW={width:"8.5rem",height:"3.75rem",words:!0},yW={columns:I(A,{children:[h(N,{x:3,y:4,w:11,h:8}),h(N,{x:17,y:4,w:11,h:8}),h(N,{x:31,y:4,w:11,h:8}),h(_,{x:3,y:16,w:9}),h(_,{x:17,y:16,w:9}),h(_,{x:31,y:16,w:9}),h(_,{x:3,y:20,w:7,t:1.5,faint:!0}),h(_,{x:17,y:20,w:7,t:1.5,faint:!0}),h(_,{x:31,y:20,w:7,t:1.5,faint:!0})]}),"rows-left":I(A,{children:[h(N,{x:6,y:3,w:14,h:9}),h(_,{x:24,y:5,w:14}),h(_,{x:24,y:9,w:10,t:1.5,faint:!0}),h(N,{x:24,y:16,w:14,h:9}),h(_,{x:6,y:18,w:14}),h(_,{x:6,y:22,w:10,t:1.5,faint:!0})]}),"rows-right":I(A,{children:[h(N,{x:24,y:3,w:14,h:9}),h(_,{x:6,y:5,w:14}),h(_,{x:6,y:9,w:10,t:1.5,faint:!0}),h(N,{x:6,y:16,w:14,h:9}),h(_,{x:24,y:18,w:14}),h(_,{x:24,y:22,w:10,t:1.5,faint:!0})]})};import{TEXT_CONTROL_KINDS as mK,SCALAR_TEXT_CONTROLS as hK}from"efficient-easel/draw";function Bt(e,t){return c("{value} from {from}",{value:e,from:t})}function WP(){let{blockGap:e}=B();return e===null?c("this container's own spacing"):Bt(`${e}px`,c("Styles"))}function KP({inherited:e,onReset:t,label:n}){return g(oe,{words:P()?.panel,label:c(n),changed:!e,detail:WP(),onReset:t})}function jP(e){return Va({...$P,builtIn:qt[e],resolve:(t,n)=>vn(e,t,n?.siteGap),action:(t,n)=>g(KP,{inherited:!Ao(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[ko]:e}})}function VP(e){return le(te("mobile",{[ko]:e,type:"custom",render:t=>g(qP,{container:e,...t})}),Og)}function YP(e){return le(te("tablet",{[ko]:e,type:"custom",render:t=>g(XP,{container:e,...t})}),Og)}var Og={not:{field:"gap",in:Array.from({length:-$e.min},(e,t)=>$e.min+t)}};function sK(e){return{gap:te("desktop",jP(e)),[Fl("gap")]:YP(e),[it("gap")]:VP(e)}}function XP({container:e,...t}){let[n]=Pe("gap"),{siteGap:o}=t.field??{},a=Math.max(Cn.min,vn(e,n,o));return Va({...Cn,builtIn:a,resolve:s=>Je(s)?s:a,action:(s,r)=>g(oe,{words:P()?.panel,label:c("Gap"),changed:Je(s),detail:Ft(i=>c(i),`${a}px`),onReset:()=>r(void 0)})}).render(t)}function qP({container:e,...t}){let[n]=Pe("gap"),{siteGap:o,siteGapPhone:a}=t.field??{},s=qs(e,void 0,n,o,a);return Va({...Cn,builtIn:s,resolve:r=>qs(e,r,n,o,a),action:(r,i)=>g(oe,{words:P()?.panel,label:c("Gap"),changed:Je(r),detail:Bt(`${s}px`,Xs(e,n,a)?c("Styles"):c("Desktop")),onReset:()=>i(void 0)})}).render(t)}function rK(e){return Yh({offered:Nh(e),fallback:Ua(e,void 0),resolve:t=>Ua(e,t)})}function iK(e,t){return yu(t?Su(e,t):[],t)}function ZP({inherited:e,onReset:t,label:n}){return g(oe,{words:P()?.panel,label:c(n),changed:!e,detail:Bt(c("Full"),c("the page")),onReset:t})}function Ht({value:e,onChange:t,label:n,placeholder:o,hint:a,multiline:s,hideable:r=!0,markup:i=!0}){let{text:l,hidden:u}=KO(e),d=no(null),p=no(null),f=T=>t(r?{text:T,hidden:u}:T),m=()=>t({text:l,hidden:!u}),b=r&&u,y=ug(),E=a?nk(a)?g("span",{className:"sf-hint-while-typing",children:c(a)}):c(a):void 0,S=u?c("Show {label} on the slide",{label:c(n)}):c("Hide {label} on the slide",{label:c(n)});return g(K,{label:c(n),icon:g(pP,{}),htmlFor:y,className:b?"is-hidden":void 0,hint:E,action:r?g(Dl,{content:S,children:g(vg,{"aria-pressed":u,"aria-label":S,onClick:m,children:u?g(ng,{name:"eye-off",size:14}):g(ng,{name:"eye",size:14})})}):void 0,children:Ke("div",{className:"sf-copybox",children:[i&&g(Ci,{target:s?p:d,value:l,onChange:f}),s?g("textarea",{id:y,ref:p,value:l,placeholder:o===void 0?void 0:c(o),onChange:T=>f(T.target.value)}):g("input",{id:y,ref:d,type:"text",value:l,placeholder:o===void 0?void 0:c(o),onChange:T=>f(T.target.value)})]})})}function lK(e,t){return{...e,[XO]:t}}function cK(e){let t=e[je];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[je]:{...t,offPage:!0}}}function uK(e){return!e||typeof e!="object"?!1:e[je]?.offPage===!0}function Hl(e){if(!e[je])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[dr]:!0}}function dK(e){return $o(e)}function pK(e){let t=e[je];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[je]:{...t,identifier:!0}}}function gK(e,t){if(!e[je])throw new Error("inOwnBox: the field holds no authored text");let{[NP]:n,...o}=e;return{...o,[ur]:!0,render:t}}var JP=new Set(DP),os={type:"radio",options:[{value:!0},{value:!1}]},Pg={text:{type:"object",objectFields:{text:{type:"text"},hidden:os}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:os}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},Mt=(e,t)=>{let n=lt({...t,[je]:e},{...Pg[e.control],label:e.label});if(!JP.has(e.control))return n;let o=t.render;return{...wg(n,"authored-copy"),render:a=>g(_m,{name:a.name,children:o(a)})}},bK="Everything else on this block comes from the linked post. Unlink it to edit by hand.",QP={field:"source.slug",set:!0},yK={not:QP},ek="Select a word, then press the highlighter.",tk=new Set([ek]),nk=e=>tk.has(e);function ss(e,t,n){return Mt({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:e,placeholder:t,hint:n})})}function Ml(e,t,n){return Mt({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:e,placeholder:t,hint:n,multiline:!0})})}function bn(e,t,n){return Mt({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function kg(e,t,n){return Mt({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:e,placeholder:t,hint:n,hideable:!1})})}function SK(e){return{type:"custom",[VO]:{label:e},...lt({},{type:"text",label:e}),render:({value:t,onChange:n})=>g(eh,{value:jO(t),onChange:n,label:e})}}function _K(e,t,n){return Mt({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}var EK={Design:qO,Animation:JO};function TK(e,t){return{type:"custom",render:()=>g(ok,{text:e,values:t})}}function ok({text:e,values:t}){return g("p",{className:"sf-note",children:c(e,t)})}function xK(e){return pg(e)!==null&&e?.tabs!==void 0}var og=new Map;function vK(e,t){let n=`${e}\0${t?t.join(""):""}`,o=og.get(n)??{type:"custom",tabs:t,[dg]:{label:e,level:1},bucket:e,marker:!0,render:()=>g(Ve,{})};return og.set(n,o),o}var ag=new Map;function wK(e){let t=ag.get(e)??{type:"custom",[dg]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>g(Ve,{})};return ag.set(e,t),t}function ak(e){let t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function CK(e,t){return ak(e)===t?e:{...e,marker:!0,fold:t,render:()=>g(Ve,{})}}function OK(e){let t=e;if(t.marker===!0&&t.fold===void 0)return e;let{fold:n,...o}=e;return{...o,marker:!0,render:()=>g(Ve,{})}}function PK({title:e,children:t}){let[n,o]=oo(()=>!Cl.has(e));return g(hP,{title:e,open:n,onToggle:a=>{o(a),a?Cl.delete(e):Cl.add(e)},children:t})}var Cl=new Set;function sk({swatches:e,current:t,onPick:n,names:o}){let a=e.find(i=>i.toLowerCase()===t.toLowerCase()),s=a?o?.[a]:void 0,r=s?c(s):t;return Ke("div",{className:"sf-swatches",children:[e.map(i=>{let l=o?.[i]?c(o[i]):i;return g(Dl,{content:l,children:g(vP,{color:i,selected:t.toLowerCase()===i.toLowerCase(),onClick:()=>n(i),"aria-label":l})},i)}),g("span",{className:"sf-swatch-hex",children:r})]})}function kK(e,t,n=!1){return{type:"custom",render:({value:o,onChange:a})=>g(rk,{label:e,builtIn:t,followsBand:n,value:o,onChange:a})}}function rk({label:e,builtIn:t,followsBand:n,value:o,onChange:a}){let s=typeof o=="string"?o:void 0,{colors:r,n:i}=Wl(),l={background:r.background,surface:r.surface,surface2:tu(r),band:nu(r)},u=n?fn:t,d=Fh(s,t,u),p=ml(void 0,u,l),f=n?pl:void 0,m=u===fn?c("the theme's section background"):c("Theme {n} background",{n:i}),b=ik(s,t,r,i,l,a),y=Bt(p.toUpperCase(),m),E=Ie(s),S=E?Xt(E,r,i):null;return S?g(Se,{label:c(e),icon:g(Jh,{}),value:S.hex,caption:S.words,onChange:a,changed:!0,onReset:()=>a(f),resetTo:y,choices:b}):g(Pn,{label:c(e),icon:g(Jh,{}),value:d?"":ml(s,t,l),inherited:p,resetTo:y,onChange:a,onReset:()=>a(f),choices:b})}function ik(e,t,n,o,a,s){let r=Dh(e,t);return[{label:c("No fill"),color:"",selected:r==="none",onPick:()=>s(hl)},{label:`${c("Section band")} \xB7 ${a.band.toUpperCase()}`,color:a.band,selected:r==="band",onPick:()=>s(fn)},...zl(Ie(e)??"",n,o,s)]}function lk(e,t){return{type:"custom",render:({value:n,onChange:o})=>{let a=n,s=Mh(a,t);return g(K,{label:c(e),icon:g(kl,{}),changed:!s,action:g(oe,{words:P()?.panel,label:c(e),changed:!s,detail:c("the theme's image stage"),onReset:()=>o(Jn)}),children:sk({swatches:Bh,current:s?mn:gl(a,t),onPick:o,names:Hh})})}}}function AK(e=n=>n,t){return ro({_gSectionTheme:Ee(mu),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>g(xd,{value:e(n),onChange:o,followLabel:t})}})}function rs(e){let t=Z(),n=Ws(e?.view),o=r=>Bl(e.valueKey,r),a=e.numbersIn??(r=>O(t[o(r)])!==void 0),s=e.followsView??xk(n,a);return zP({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Qn,label:c(e.label),grid:e.grid,hasOwn:a(n),view:{tier:n,numbersIn:a,followsView:s},convertTo:e.convertTo??(r=>{let i=O(t[o(n)]);return i===void 0?{}:{[o(n)]:r(i)}})})}function pe({min:e,max:t,step:n,value:o,onChange:a,suffix:s="",readout:r=!0,notch:i,ariaLabel:l,disabled:u=!1,placeholder:d,placeholderWord:p,onClear:f,units:m,inputMax:b}){let y=i!==void 0&&Number.isFinite(i)&&i>=e&&i<=t;return g("div",{className:y?"sf-slider has-notch":"sf-slider",style:y?{"--sf-notch":(i-e)/(t-e)}:void 0,children:g(IP,{min:e,max:t,step:n,value:o,...o===null&&d!==void 0?{placeholderValue:d}:{},...p?{emptyLabel:c(p)}:{},suffix:s||void 0,...m?{units:m}:{},...b!==void 0?{inputMax:b}:{},showInput:r,label:l===void 0?void 0:c(l),disabled:u,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:E=>{E===null?f?.():E!==o&&a(E)}})})}function ck(e,t){let{min:n,max:o,step:a=1,unsetLabel:s,hint:r,restTrack:i,unsetMark:l,icon:u,unit:d="px"}=t;return{type:"custom",render:({value:p,onChange:f})=>{let m=typeof p=="number"?p:null,b=m===null;return g(K,{label:c(e),icon:u?Dt(u):void 0,value:b?l||s===void 0?void 0:c(s):`${m}${d}`,changed:!b,action:l?Rl(l,{changed:!b,onReset:()=>f(null)}):g(oe,{words:P()?.panel,label:c(e),changed:!b,onReset:()=>f(null)}),hint:typeof r=="string"?c(r):r,children:i?i({min:n,max:o,step:a,px:m,label:e,onChange:f}):pe({min:n,max:o,step:a,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}var ao="Corners",uk={kind:"radius"};function Ul(e){return{type:"custom",render:t=>{let{value:n,onChange:o}=t,a=typeof n=="number"&&Number.isFinite(n)?n:null,s=a!==null;return g(K,{label:c(ao),icon:g(mg,{}),changed:s,action:Rl(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:g(dk,{tier:e,px:a,name:t.name,onRadius:o})})}}}function Pe(e){let t=Lt();return[t?.values?.[e],n=>t?.onChange(e,n)]}function Ag(){return wg({type:"custom",render:()=>g(LP,{})},"always")}function cn(){let e=Lt();return t=>e?.onChangeMany(t)}function dk({tier:e,px:t,name:n,onRadius:o}){let a=e.useFollowed(),[s,r]=Pe(e.sidesKey),i=cn(),l=rs({row:e.row??uk,label:ao,grid:{min:ae,max:qe,step:e.step??1},valueKey:n??"",view:"desktop"}),u=De(s)??[...ia];return g(wP,{label:c(ao),value:u,corners:rf,onChange:d=>{let p=De(d)??[];r(p.length===ia.length?null:p)},radius:t,onRadiusChange:l&&n?d=>i({[n]:d,...l.unitPatch(d===null)}):o,radiusMin:l?.grid.min??ae,radiusMax:l?.grid.max??qe,radiusStep:l?.grid.step??e.step??1,radiusPlaceholder:l&&l.unit!=="px"?"\u2013":String(a),...l?{radiusUnit:l.unit,units:l.units}:{}})}function Ig(e,t){return to(e,t)}function Rg(){return Ag()}function pk({label:e,changed:t=!1,onReset:n=()=>{}}){let{cornerRadiusPx:o}=B(),a=typeof o=="number"?`${o}px`:c("not set");return g(oe,{words:P()?.panel,label:c(e),changed:t,detail:o==null?c("the built-in corners"):Bt(a,c("Styles")),onReset:n})}function fk(){let{cornerRadiusPx:e}=B();return typeof e=="number"?e:ae}function mk(){return Ul({sidesKey:"sectionCornerSides",row:Jr,useFollowed:fk,mark:g(pk,{label:ao}),hint:hk})}var hk="Follows Styles \u25B8 Basics \u25B8 Corners until you set a number here.";function IK(){return ro({_gShape:Ee("Shape"),sectionCorners:mk(),...Ig(Jr,"sectionCorners"),sectionCornerSides:Rg(),...ze("sectionBorder",Tk),...to(Zn,"sectionBorder",{tablet:!0,phone:!0})})}var gk=()=>({width:c("Border width"),sides:{top:c("Border top"),right:c("Border right"),bottom:c("Border bottom"),left:c("Border left")},style:c("Border style"),styles:{solid:c("Solid"),dashed:c("Dashed"),dotted:c("Dotted")},color:c("Border color"),unit:"px"});function bk(e){let t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function yk(){let e;try{let t=ke(B().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||qc.line}function Sk({value:e,onChange:t,placeholder:n,presets:o,sides:a=!0,styles:s=!0,above:r={},length:i}){let l=e&&typeof e=="object"?e:{},[u,d]=oo(()=>a?_P(l,r):!1),p=gk(),f=m=>bk(a&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return g(K,{label:c("Border"),icon:g(QO,{}),action:a?g(yP,{each:u,label:c("Each side"),onChange:d}):void 0,children:g(bP,{label:c("Border"),value:l,each:u,onChange:m=>t(f(m)),placeholder:n,presets:o,words:i?{...p,unit:i.unit}:p,styles:s,max:i?.grid.max??Ga,...i?{step:i.grid.step,units:i.units}:{}})})}function _k({value:e,onChange:t,view:n}){let[o]=Pe("sectionBorder"),[a]=Pe(Fl("sectionBorder")),s=yk(),r=f=>f&&typeof f=="object"?f:{},i=n==="phone"?{...dl(r(o)),...dl(r(a))}:n==="tablet"?r(o):{},l=Z(),u=cn(),d=U("sectionBorder",n),p=rs({row:Zn,label:"Border",grid:{min:0,max:Ga,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>Ol(l[Bl("sectionBorder",f)]),convertTo:f=>{let m=r(l[d]);return Ol(m)?{[d]:Ek(m,f)}:{}}});return g(Sk,{value:e,length:p,onChange:p?f=>u({[d]:f,...p.unitPatch(!Ol(f))}):t,placeholder:{sides:SP(i),style:i.style??"solid",color:i.color||s},presets:[s],above:i})}var Ng=["width",...za];function Ol(e){if(!e||typeof e!="object")return!1;let t=e;return Ng.some(n=>O(t[n])!==void 0)}function Ek(e,t){let n={...e};for(let o of Ng){let a=O(n[o]);a!==void 0&&(n[o]=t(a))}return n}function Tk(e){return{type:"custom",render:({value:t,onChange:n})=>g(_k,{value:t,onChange:n,view:e})}}function xk(e,t){let n=wl[e];for(;n&&wl[n]!==null&&!t(n);)n=wl[n];return n??e}function RK(e){return{type:"custom",render:()=>g(vk,{partKey:e})}}function vk({partKey:e}){let[t]=Pe("id"),[n]=Pe("_partStyles"),{textStyles:o}=B(),a=MP(),s=null;try{s=FP().select}catch{s=null}let r=n&&typeof n=="object"?n[e]:void 0,i=Array.isArray(o)?o:null;return g(mP,{name:c("Text"),preview:mh(r,i,{noStyle:c("No style"),styleName:a.textStyles.styleName,cases:(a.copy.panel??HP.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(BP(t,e))}})}function Lg(e){let{cornerRadiusPx:t}=B(),n=typeof t=="number"?t:e,o=null;try{let{appState:s,selectedItem:r}=as(l=>l),i=r?.props?.id?String(r.props.id):void 0;o=i?am(s?.data,i)?.props??null:null}catch{o=null}if(!o)return n;let a=o.sectionCorners;return Qr(a)?a:n}function wk({label:e,changed:t=!1,onReset:n=()=>{}}){let o=Lg(ae);return g(oe,{words:P()?.panel,label:c(e),changed:t,detail:Bt(`${o}px`,c("the section")),onReset:n})}function Ck(){return g(Ve,{children:c("Follows the section's Corners until you set a number here.")})}function Ok(){return Ul({sidesKey:"cardCornerSides",row:Mn,useFollowed:()=>Lg(ae),mark:g(wk,{label:ao}),hint:g(Ck,{})})}function Pk(){return{type:"custom",render:()=>g(mf,{})}}function NK(){return{_gShape:Ee("Shape"),cardCorners:Ok(),...Ig(Mn,"cardCorners"),cardCornerSides:Rg(),cardCornersApplyAll:Pk()}}function kk(){return lt({type:"custom",[_l]:!0,render:e=>g(Ik,{...e})},{type:"select",label:ft,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 Ak(e,t){let n=Os(e);if(n!=="custom")return c(Cs.find(a=>a.value===n)?.label??"");let o=xg(So(e,t),t);return o?[...o,100-o.reduce((a,s)=>a+s,0)].join(" / "):c("Custom")}function Ik(e){let{value:t,onChange:n}=e,[o]=Pe("content"),a=Array.isArray(o)?o.length:0,s="follows"in e,r=t!=null,i=r?t:s?e.follows:void 0,l=Os(i),u=a>=2&&a<=eg,d=()=>[...PP[a]??[]],p=no(null),f=S=>{let T=p.current;T&&JSON.stringify(S)===JSON.stringify(T.shares)?n(T.value):S&&n(S)},m=S=>{S===l||S==="custom"&&!u||n(S==="custom"?d():S)},b=c("The width bar works for 2 to {count} blocks.",{count:eg}),y=r&&(s||t!=="content"),E=AP().widths.hint(a,OP);return g(K,{label:c(ft),icon:g(ts,{}),changed:y,hint:l!=="custom"?void 0:u?E:b,action:g(oe,{words:P()?.panel,label:c(ft),changed:y,disabled:e.readOnly===!0,detail:s?Ft(S=>c(S),Ak(e.follows,a),e.followsView):c("Fit content"),onReset:()=>n(void 0)}),children:Ke("div",{className:"sf-share-row",children:[g("div",{className:"sf-share-pick",children:g(Tg,{label:c(ft),value:l,options:Cs.map(S=>({value:S.value,label:S.value==="custom"&&!u?b:c(S.label),icon:El(g("span",{className:"sf-gallery-pic sf-share-pic",children:Dg(S.weights).map((T,x)=>g("i",{style:{gridColumn:`span ${T}`}},x))}),c(S.label),S.value==="custom"&&!u?b:c(S.label))})),onChange:m,columns:3,cell:Fg,tooltips:!1,disabled:e.readOnly===!0})}),l==="custom"&&u?g("div",{onFocus:()=>{p.current={value:t,shares:xg(So(i,a),a)}},onBlur:()=>{p.current=null},children:g(kP,{label:c(ft),count:a,value:So(i,a),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function Dg(e){if(!e)return[3,4];let t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function LK(){return Q(Mc,g(sP,{}),As,As[0].value)}function DK(e){return Q("On a phone",g(cP,{}),[{label:"In the header",value:"header"},{label:"In the menu",value:"menu"}],e)}function FK(){return te("mobile",Tl(ft,g(ts,{}),Fc.map(e=>({label:e.label,value:e.value,picture:g("span",{className:"sf-gallery-pic sf-share-pic",children:Dg(e.weights).map((t,n)=>g("i",{style:{gridColumn:`span ${t}`}},n))})})),Bc,{columns:2,cell:Fg}))}var Fg={width:"5.75rem",height:"3.25rem",words:!0};function BK(){return Il("share",kk(),Cg)[Fl("share")]}function Rk(){return te("mobile",Be(Ps,g(fg,{}),_o,Dc,1,_o,"",{clear:{phoneFollows:!1,hint:_o}}))}var sg={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function HK(){let e=Be(Ps,g(fg,{}),ks,Hc,1,ks,"",{clear:{emptyLabel:"Auto"}}),t=Il("columns",e,{...sg,tablet:Cg.tablet}),n=Il("columns",e,sg,{phoneRow:Rk()});return{...t,phoneRow:n.phoneRow}}function MK(e,t,n,o,a,s,r){return{type:"custom",render:({value:i,onChange:l,name:u})=>g(Nk,{label:e,min:t,max:n,step:o,fallback:a,role:s,value:i,onChange:l,name:u??"",length:r})}}function Nk({label:e,min:t,max:n,step:o,fallback:a,role:s,value:r,onChange:i,name:l,length:u}){let d=Z(),p=cn(),f=Ws(u?.view),m=rs({row:u?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:u?l:"",view:u?.view??"desktop",numbersIn:y=>y===f&&typeof d[l]=="number",followsView:f,convertTo:y=>typeof d[l]=="number"?{[l]:y(d[l])}:{}}),b=y=>m?p({[l]:y,...m.unitPatch(typeof y!="number")}):i(y);return g(K,{label:c(e),icon:g(bi,{noun:s}),action:g(oe,{words:P()?.panel,label:c(e),changed:!$h(r),detail:c("the Text style in Styles"),onReset:()=>b(Uh),defaultAction:{onPress:()=>b(ja),title:c("Keep this section's own built-in size"),icon:g(eP,{})}}),children:pe({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof r=="number"?r:a,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:b})})}function Ja(e,t,n){return[{label:"Auto",value:""},...Array.from({length:e},(o,a)=>({label:a===0?`1 ${t}`:`${a+1} ${n}`,value:String(a+1)}))]}function UK(){return{_gCellWidth:Ee("Cell size"),gridSpan:te("desktop",Q("Positions",g(ts,{}),Ja(fa,"position","positions"),"")),gridRowSpan:te("desktop",Q("Rows tall",g(ns,{}),Ja(ha,"row","rows"),"")),[fi]:Be("At card",g(bg,{}),1,mi,1,1,""),[it("gridSpan")]:te("mobile",Q("Positions",g(ts,{}),[{label:"Full row",value:""},...Ja(ma,"position","positions").slice(1)],"")),[it("gridRowSpan")]:te("mobile",Q("Rows tall",g(ns,{}),Ja(ha,"row","rows"),""))}}function Z(){let e=null,t=null;try{e=cg(Lk),t=as(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}var Lk=$O(null);function Dk({min:e,max:t,step:n,px:o,label:a,onChange:s,desktopKey:r,fallback:i}){let l=Z()[r],u=Oa(void 0,l,i);return g(Ve,{children:pe({min:e,max:t,step:n,value:Oa(o,l,i),readout:!1,ariaLabel:a,notch:u,onChange:s})})}function Fk({label:e,desktopKey:t,fallback:n,unit:o="px",changed:a=!1,onReset:s=()=>{}}){let r=Z()[t],i=Oa(void 0,r,n);return g(oe,{words:P()?.panel,label:c(e),changed:a,detail:Ft(l=>c(l),`${i}${o}`),onReset:s})}function Bk(e){return ck(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:g(Fk,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>g(Dk,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}var Hk={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Mk={Top:Nl,Bottom:yg,Left:Sg,Right:_g},Uk=e=>{let t=Mk[e];return g(t,{})};function $K(e={}){let t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,a=E=>Hk[E],s=E=>Be(a("Top"),g(Nl,{}),me.min,me.max,me.step,E,"px"),r=(E,S,T,x=me)=>te("mobile",Bk({label:a(E),icon:Uk(E),desktopKey:S,min:x.min,max:x.max,step:x.step,fallback:T})),i=e.top??me.min,l=e.bottom??me.min,u="sectionPaddingLeft",d="sectionPaddingRight",p=e.sideBounds??me,f=e.side??p.min,m=e.sidePhone??f,b=e.phone===!0,y=E=>b?te("desktop",E):E;return ro({...o?{_gSpacing:Ee("Padding")}:{},[t]:y(s(i)),...b?{[it(t)]:r("Top",t,i)}:{},...e.only==="top"?{}:{[n]:y(Be(a("Bottom"),g(yg,{}),me.min,me.max,me.step,l,"px")),...b?{[it(n)]:r("Bottom",n,l)}:{}},...e.sides?{[u]:y(Be(a("Left"),g(Sg,{}),p.min,p.max,p.step,f,"px")),...b?{[it(u)]:r("Left",u,m,p)}:{},[d]:y(Be(a("Right"),g(_g,{}),p.min,p.max,p.step,f,"px")),...b?{[it(d)]:r("Right",d,m,p)}:{}}:{}})}function GK(e,t){let n=Object.fromEntries(Object.entries(t).map(([s,r])=>[s,s in e&&pg(r)?e[s]:r])),o={},a=!1;for(let[s,r]of Object.entries(e)){if(s in t){a||Object.assign(o,n),a=!0;continue}o[s]=r}return a||Object.assign(o,n),o}var Qa="Width";function zK(e,t=Gh,n=!0){let o=t.map(a=>({label:Nt[a],value:a}));return ro({...n?{_gWidth:Ee(Qa)}:{},widthMode:{type:"custom",render:({onChange:a,field:s})=>g(K,{label:c(Qa),icon:g(fP,{}),action:n?g(ZP,{inherited:s?.inherited??!1,onReset:()=>a(Sl),label:Qa}):void 0,children:eo({options:o,value:s?.currentValue||e,onChange:a,ariaLabel:Qa})})}})}function WK({fill:e=!1}={}){let t=(a,s)=>({type:"custom",render:({value:r,onChange:i})=>g($k,{value:r,onChange:i,view:a,badge:s,fill:e})}),n=()=>Al("sectionHeightMode"),o=()=>Al("sectionHeightMode");return ro({_gHeight:Ee(Yt),...ze("sectionHeightMode",a=>a==="desktop"?t(a):t(a,s=>g(Kk,{view:a,onClear:()=>s(void 0)}))),...ze("sectionHeightValue",n),...ze("sectionHeightUnit",o)})}function $k({value:e,onChange:t,view:n,badge:o,fill:a=!1}){let s=Z(),{mode:r,number:i,unit:l}=Gk(n,s,e);return g(K,{label:Yt,icon:Dt(g(ns,{})),action:o?o(t):void 0,children:Ke("div",{className:"es-width-stack",children:[eo({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...a?[{label:"Fill",value:"fill"}]:[]],value:r,onChange:t,ariaLabel:Yt}),i?g(Wk,{view:n,mode:r,menu:l}):null]})})}function Bg(e,t){return e==="phone"&&wo(t)?Pu(t):Cu(t)}function is(e,t){return e==="desktop"||(e==="tablet"?wo(t):Ou(t))?null:Bg(e,t)}function Gk(e,t,n){let o=(a=>Tu.includes(a))(n)?n:is(e,t)?.mode??"auto";return{mode:o,number:o!=="auto"&&o!=="fill",unit:o==="fixed"}}function zk(e,t,n,o){let a=is(e,t);return!a||e==="desktop"?null:o===void 0?{}:{[U("sectionHeightMode",e)]:a.mode,...a.mode==="fixed"?{[U("sectionHeightUnit",e)]:a.unit}:{},...n==="sectionHeightUnit"?{[U("sectionHeightValue",e)]:a.value}:{},[U(n,e)]:o}}function rg(e,t,n){let o=Lt(),a=is(e,Z());return!o||!a?{followed:null,write:n}:{followed:a,write:s=>o.onChangeMany(r=>{let i=zk(e,r,t,s);return i===null?{[U(t,e)]:s}:Object.keys(i).length?i:null})}}function Wk({view:e,mode:t,menu:n}){let o=Lt(),a=Z(),s=U("sectionHeightValue",e),r=U("sectionHeightUnit",e),i=E=>S=>o?.onChangeMany(()=>({[E]:S})),{followed:l,write:u}=rg(e,"sectionHeightValue",i(s)),{write:d}=rg(e,"sectionHeightUnit",i(r)),p=t==="screen"?"%":a[r],f=zO(xu,"px",l?l.unit:p),m=f==="%"?wu:vu,b=a[s],y=n?{options:["px","%"],label:c("Unit"),onChange:E=>d(E)}:void 0;return pe({min:m.min,max:m.max,step:m.step,value:l?null:typeof b=="number"?b:m.fallback,...l?{placeholder:l.value}:{},suffix:f,...y?{units:y}:{},ariaLabel:Yt,onChange:u})}function Kk({view:e,onClear:t}){let n=Z(),o=is(e,n)===null,a=e==="phone"&&wo(n),s=Bg(e,n),r=Ft(i=>c(i),s.mode==="auto"?c("Auto"):`${s.value}${s.unit}`,a?"tablet":"desktop");return g(oe,{words:P()?.panel,label:c(Yt),changed:o,detail:r,onReset:t})}function KK(e={}){let t=e.intro===!0,n=s=>({type:"custom",render:({value:r,onChange:i,id:l,name:u})=>g(Qk,{value:r,onChange:i,labelId:`${l??u??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:r,onChange:i})=>g(qk,{value:r,onChange:i,view:s,intro:t})}),a=s=>({type:"custom",render:({value:r,onChange:i})=>g(Zk,{value:r,onChange:i,view:s,intro:t})});return{_gStick:Ee(yh,{dot:t?Xk:il}),...ze("stickTop",n),...ze("stickTopDistance",o),...to(Xn,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?ze(qn,a):{},...e.screens?{[sl]:Vk()}:{},...t?{}:{[nl]:jk()},...t||e.above===!1?{}:{[al]:Yk()}}}function jk(){return Hg(Q(Sh,g(Nl,{}),_h,Eh),Th,ol,xh)}function Vk(){return Hg(Q(Ch,g(hg,{}),Oh,Ph),kh,rl,Ah)}function Hg(e,t,n,o){return te("desktop",{...e,render:a=>{let s=e.render({...a,value:n(a.value),onChange:r=>a.onChange(o(r))});return Rl(s,{hint:c(t)})}})}function Yk(){let e=ct(vh,!1,g(Eg,{}),wh);return te("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}var Xk={any:[il,Ih]};function Mg(e,t,n,o,a){let s=Lt(),r=Z(),i=e==="desktop"||so(e,r)?null:$l(e,pn(r,{intro:o}));return{followed:i,write:(i||a)&&s?l=>s.onChangeMany(u=>{let d=Jk(e,u,l,t,o),p=d===null?{[U(t,e)]:l}:d;return Object.keys(p).length?{...p,...a?.(l)??{}}:null}):n}}function qk({value:e,onChange:t,view:n,intro:o}){let a=Z(),s=pn(a,{intro:o}),r=d=>{let p=vo(d);return p==="desktop"||so(p,a)},i=rs({row:Xn,label:"Distance from top",grid:{min:_e.min,max:_e.max,step:_e.step},valueKey:"stickTopDistance",view:n,numbersIn:d=>r(d)&&O(a[Bl("stickTopDistance",d)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:l,write:u}=Mg(n,"stickTopDistance",t,o,i?d=>i.unitPatch(d===void 0):void 0);return g("div",{className:"sf-field",children:pe({min:i?.grid.min??_e.min,max:i?.grid.max??_e.max,step:i?.grid.step??_e.step,value:l?null:typeof e=="number"?e:_e.fallback,...l?{placeholder:l.distance}:{},...i?{suffix:i.unit,units:i.units}:{suffix:"px"},ariaLabel:c("Distance from top"),onChange:u})})}function Zk({value:e,onChange:t,view:n,intro:o}){let{followed:a,write:s}=Mg(n,qn,t,o);return g(K,{label:c(tl),icon:Dt(g(ns,{})),children:pe({min:Za.min,max:Za.max,step:Za.step,value:a?null:O(e)??Za.default,...a?{placeholder:a.screens}:{},ariaLabel:c(tl),onChange:s})})}function so(e,t){return e==="tablet"?ll(t):cl(t)}function $l(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function Jk(e,t,n,o="stickTopDistance",a=!1){if(e==="desktop"||so(e,t))return null;if(n===void 0)return{};let s=$l(e,pn(t,{intro:a})),r=e==="phone"&&so("tablet",t)?d=>U(d,"tablet"):d=>d,i=(d,p)=>t[r(d)]==null?{}:{[U(d,e)]:p},l=Xn.unitKey,u=t[r(l)]==null?{}:{[U(l,e)]:s.unit};return{[U("stickTop",e)]:!0,...i("stickTopDistance",s.distance),...u,...i(qn,s.screens),[U(o,e)]:n}}function Qk({value:e,onChange:t,labelId:n,view:o,intro:a}){let s=Z(),r=pn(s,{intro:a}),i=o==="phone"?r.phone:o==="tablet"?r.tablet:a?r.desktop:e===!0,l=o==="phone"&&r.ownTablet,u=o==="desktop"?null:$l(o,r),d=u?.on?M(u.distance,u.unit):c("Off");return g(K,{label:c(el),labelId:n,icon:Dt(g(Eg,{})),action:Ke(Ve,{children:[o!=="desktop"?g(oe,{words:P()?.panel,label:c(el),changed:so(o,s),detail:Ft(p=>c(p),d,l?"tablet":"desktop"),onReset:()=>t(void 0)}):null,g(Ll,{checked:i,onChange:t,ariaLabelledBy:n})]})})}var ig="e.g. about";function jK(){return{_gAnchor:Ee("Anchor"),anchor:Mt({control:"plainText",label:"Name",placeholder:ig},{type:"custom",render:({value:e,onChange:t})=>g(qf,{value:e,onChange:t,nameBox:(n,o)=>g(Ht,{value:n,onChange:o,label:"Name",placeholder:ig,hideable:!1,markup:!1})})})}}function VK(){return{_gAdvanced:Ee("Advanced"),[hu]:Gl}}var Gl={type:"custom",render:({value:e,onChange:t})=>g(K,{label:c("Custom CSS"),icon:Dt(g(TP,{})),children:g(RP,{"aria-label":c("Custom CSS"),spellCheck:!1,autoGrow:!0,className:"font-mono",value:typeof e=="string"?e:"",onChange:n=>t(n.target.value)})})};function YK(e,t,n){return{type:"custom",render:({value:o,onChange:a,id:s,name:r})=>{let i=`${s??r??e}-datetime`,l=Date.parse(typeof o=="string"?o:"");return g(K,{label:c(e),icon:t,htmlFor:i,hint:n===void 0?void 0:c(n),children:g(CP,{id:i,value:Number.isFinite(l)?new Date(l):null,onChange:u=>a(u?u.toISOString():"")})})}}}function ct(e,t,n,o){return{type:"custom",...lt({},{...os,label:e}),render:a=>{let{value:s,onChange:r,id:i,name:l}=a,u="follows"in a,d=a,p=typeof s=="boolean",f=typeof d.follows=="boolean"?d.follows:t,m=p?s:u?f:t,b=`${i??l??e}-label`,y=d.readOnly===!0,E=g(Ll,{checked:m,onChange:r,disabled:y,ariaLabelledBy:b});return g(K,{label:c(e),labelId:b,icon:n,hint:o===void 0?void 0:c(o),action:u?Ke(Ve,{children:[g(oe,{words:P()?.panel,label:c(e),changed:p,detail:d.followsNoView?c(f?"On":"Off"):Ft(S=>c(S),c(f?"On":"Off"),d.followsView),disabled:y,onReset:()=>r(void 0)}),E]}):E})}}}function Ug(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{let a=`${String(n??o??"pageBackground")}-colour`;return g(eA,{label:"Background",icon:g(lP,{}),id:a,value:e,shown:yi(e),onChange:t})}}}function XK(e,t,n){return{type:"custom",render:({value:o,onChange:a})=>g(Se,{label:c(e),icon:n,value:o||t,onChange:a})}}function eA({label:e,icon:t,id:n,value:o,shown:a,onChange:s}){let{colors:r,n:i}=Wl(),l=Ie(o),u=l?Xt(l,r,i):null;return g(Se,{label:c(e),icon:t,id:n,value:u?u.hex:a,caption:u?.words,onChange:s,choices:zl(l??"",r,i,s)})}function qK(){return{type:"custom",render:e=>{let{value:t,onChange:n}=e,o=e;return g(tA,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function zl(e,t,n,o){let a=Ta(e);return Uu(t,n).map(s=>({label:s.label,color:s.value,selected:a===s.name,onPick:()=>o(s.name)}))}function tA({value:e,onChange:t,twin:n}){let{colors:o,n:a}=Wl(),s=o.background,r=Bt(s.toUpperCase(),c("Theme {n} background",{n:a})),[i,l]=Pe(om),[u]=Pe(Ei),d=typeof u=="string"&&u.trim()!=="",p=_a(i),f=v=>l(_a(v)||void 0),m=Ta(e),b=m?Xt(m,o,a):null,y=zl(e,o,a,t),E=n?()=>t(void 0):()=>t(""),S=s,T=r;if(n){let v=Ta(n.follows),w=Ea(n.follows),R=v?Xt(v,o,a):w?{hex:w,words:w.toUpperCase()}:null;S=R?.hex??s,T=Ft(C=>c(C),R?R.words:r,n.view)}let x=!n&&(Wn(e)||d)?g(nA,{value:p,onChange:f}):null;return b?g(Se,{label:c("Fill"),icon:g(kl,{}),value:b.hex,caption:b.words,onChange:t,changed:!0,onReset:E,resetTo:T,choices:y,children:x}):g(Pn,{label:c("Fill"),icon:g(kl,{}),value:e,inherited:S,resetTo:T,onChange:t,onReset:E,choices:y,children:x})}function nA({value:e,onChange:t}){return eo({options:Sa.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:c("Fill")})}function oA(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return gt(n);let o=sm(e,t);if(o.length===0)return null;let a=gt(zs(n));if(a!==null)return a;for(let s=o.length-1;s>0;s-=1){let r=gt(zs(o[s].sectionAccent));if(r!==null)return r}return gt(o[0].sectionAccent)}function Wl(){let e=ke(B().theme),[t]=Pe("sectionAccent"),n=null;try{let{appState:a,selectedItem:s}=as(i=>i),r=s?.props?.id?String(s.props.id):void 0;n=r?oA(a?.data,r,t):null}catch{n=null}let o=n!==null&&e.themes[n]?n:e.selected;return{colors:ce(e.themes[o]),n:o+1}}function ZK(){return Ag()}var JK={top:g(hg,{}),right:g(oP,{}),bottom:g(tP,{}),left:g(nP,{})};function QK(e,t,n,o,a,s,r){let i=p=>t.find(f=>f.value===p),l=p=>({value:p,label:"",disabled:!0,title:o}),u=p=>{let f=t.find(b=>b.cell===p);if(!f)return l(`missing-${p}`);let m=s?.[p];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},d=[l("corner-top-left"),u("top"),l("corner-top-right"),u("left"),l("centre"),u("right"),l("corner-bottom-left"),u("bottom"),l("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:f})=>{let m=t.some(b=>b.value===p)?p:n;return g(K,{label:c(e),icon:a,value:i(m)?.label?c(i(m).label):r?c(r):"",children:GP(c,{label:e,value:m,onChange:f,points:d})})}}}function ej(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:a,field:s})=>g(Pm,{label:e,options:(s.options??t).map(r=>({...r,label:c(r.label)})),value:Array.isArray(o)?o:[],onChange:a,...n?{emptyLabel:c(n)}:{}})}}function $g(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{let a={value:n,onChange:o,...t};return g(e,{...a})}}}var aA={image:"Image",video:"Video"},tj=Lr.map(e=>({label:aA[e],value:e}));function nj(e,t,n){let o=Object.keys(Fr).map(a=>({label:Fr[a],value:a,picture:n[a]}));return{type:"custom",...lt({},{type:"radio",label:e,options:o.map(a=>({value:a.value,label:a.label}))}),render:({onChange:a})=>g(rA,{label:e,icon:t,options:o,onChange:a})}}function sA(e,t,n){let o=Ip(e,t,n);if(o!==void 0)return o==="save-makes-frame"?c("A frame is made from this video when you save the page."):o==="starts-dark"?c("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"?c("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"?c("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"?c("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"?c("The slide shows your Image while the video loads, because this video has no frame."):void 0;let a=Ap(e);return a==="frame-missing-image"?c("This video has no frame yet. The slide shows its image until one is made."):a==="frame-missing-surface"?c("This video has no frame yet. The slide shows its background colour until one is made."):a==="image-missing-frame"?c("No image yet. The slide shows the video's frame until you choose one."):a==="image-missing-surface"?c("No image yet. The slide shows its background colour until you choose one."):void 0}function rA({label:e,icon:t,options:n,onChange:o}){let a=Lt(),s=a?.values??{},r=Nn(s),i=cg(WO),l=of(i?.docId??null),u=null;try{u=as(p=>p.appState.data)}catch{u=null}let d=sf(a?.id,u,l);return g(K,{label:c(e),icon:Dt(t),hint:sA(s,d,i?.hasUnsavedEdits??!1),children:eo({options:n,value:r,onChange:o,ariaLabel:e})})}function oj(e,t,n,o={}){let a={type:"custom",[YO]:!0,render:({value:s,onChange:r,name:i})=>g(Cm,{value:s||"",onChange:r,fieldKey:i,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?te("each",a):a}var aj={HeroSingle:[wp.image],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function iA(e){let t=c(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} \xB7 ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Gg({value:e,onChange:t,label:n}){let o=e||{},a=Lt(),s=a?a.values!==a.node.props:!0,r=!!o.pending&&s,i=!!o.pending&&!s,l=!!xe(UP()).geocode,u=ug(),d=(p,f)=>t({...o,[p]:f??void 0});return Ke(Ve,{children:[g(K,{label:c(n),icon:g(Qh,{}),action:l?g(Dl,{content:c("Find from the address (OpenStreetMap)"),children:g(vg,{"aria-label":c("Find from the address"),"aria-busy":r||void 0,disabled:r,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding\u2026"}),children:g(uP,{})})}):void 0,children:l&&o.status?g(ya,{compact:!0,oneLine:!0,spaced:!1,status:r?"busy":o.ok&&!i?"found":"notfound",statusText:r?c("Finding\u2026"):i?c(wi):c(o.status),hint:iA(o)}):null}),g(K,{label:c("Enter by hand"),labelId:u,icon:g(aP,{}),action:g(Ll,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:u})}),o.manual&&g(K,{label:c("Latitude, longitude"),icon:g(Qh,{}),children:Ke("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[g(tg,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>d("lat",p),min:-90,max:90,step:1e-4,placeholder:c("Latitude")}),g(tg,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>d("lng",p),min:-180,max:180,step:1e-4,placeholder:c("Longitude")})]})})]})}function lA(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function cA(e,t,n){let o=e.map(a=>({text:a?.text??""}));return t===null||t<0||t>=e.length?o:o.map((a,s)=>s===t?{text:n}:a)}function uA(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}var sj={label:"Ticker items",icon:g(iP,{})};function rj(e,t,n,o){return{type:"custom",[je]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...lt({},{...Pg.textList,label:e}),render:({value:a,onChange:s})=>g(dA,{label:e,icon:Dt(t),items:Array.isArray(a)?a:[],placeholder:n,onChange:s,markup:o==="markup"})}}function dA({label:e,icon:t,items:n,placeholder:o,onChange:a,markup:s=!1}){let r=no(null),[i,l]=oo(null),u=p=>p.map(f=>({text:f?.text??""})),d=p=>{let f=uA(n,p,i);f===null&&(r.current=null),l(f),a(u(p))};return g(EP,{label:c(e),icon:t,noun:c("item"),items:n,onChange:d,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?g(Ci,{target:r,value:lA(n,i),onChange:p=>a(cA(n,i??-1,p)),disabled:i===null,label:i===null?c("Formatting \u2014 click a row first"):c("Formatting \u2014 row {n}",{n:i+1})}):void 0,renderRow:(p,f,m)=>g("input",{type:"text",className:s&&i===f?"sf-list-marking":void 0,value:p?.text??"",placeholder:c(o),"aria-label":c("{label} {n}",{label:c(e),n:f+1}),onChange:b=>m({text:b.target.value}),onFocus:b=>{r.current=b.currentTarget,l(f)}})})}function ij(e,t){let n=`${e.label} \u2014 row ${t+1}`;return Mt({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:c("{label} \u2014 row {n}",{label:c(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function lj(e){return{_gCards:Ee("Cards"),coverIndex:Q("Cover image",g(rP,{}),vm,String(1),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:lk("Image background",Ka),cardImage:zg()}}function cj(){return{outline:Q("Card outline",g(dP,{}),xm,Tm),indexBadge:Q("Card number",g(bg,{}),ki,Pi),showBadge:ct("Product badge",!0,g(bi,{noun:"tag"}))}}function uj(e){let t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=a=>({...os,label:es.find(s=>s.id===a).label}),o=a=>lt(Al(Pl),n(a));return{_gShowOnCard:Ee("Show on a card"),[Pl]:lt({type:"custom",render:()=>g(pA,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(Pl)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}var Pl="showCardPrice",es=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function pA({rest:e}){let t=Z(),n=cn(),o=r=>typeof t[r]=="boolean"?t[r]:void 0,a=r=>o(r)??e[r],s=es.some(({id:r})=>o(r)!==void 0&&o(r)!==e[r]);return g(Kl,{parts:es,changed:s,shown:a,onPress:(r,i)=>n({[r]:i}),onReset:()=>n(Object.fromEntries(es.map(({id:r})=>[r,void 0])))})}function dj(e,t="display"){let n=it(t);return{[t]:te("desktop",{type:"custom",render:({value:o,onChange:a})=>g(Kl,{parts:e,changed:um(o),shown:s=>va(o,s),onPress:(s,r)=>a(pm(o,s,r)),onReset:()=>a(void 0)})}),[n]:te("mobile",{type:"custom",render:({value:o,onChange:a})=>g(fA,{parts:e,desktopKey:t,value:o,onChange:a})})}}function Kl({parts:e,changed:t,shown:n,onPress:o,onReset:a,detail:s,disabledReason:r}){let i=c("Display");return g(K,{label:i,icon:g(ZO,{}),changed:t,action:g(oe,{words:P()?.panel,label:i,changed:t,detail:s,onReset:a}),children:g(xP,{label:i,items:e.map(l=>({id:l.id,label:c(l.label),shown:n(l.id),...r?{disabled:!0,disabledReason:c(r)}:{}})),onChange:o})})}function fA({parts:e,desktopKey:t,value:n,onChange:o}){let a=Z()[t];return g(Kl,{parts:e,changed:dm(n),shown:s=>vi(a,n,s),onPress:(s,r)=>o(fm(n,s,r)),onReset:()=>o(Pa),detail:c("the same as Desktop")})}function zg(e=wf){return Be("Card image",g(mg,{}),ae,qe,vf,ae,e,{clear:{hint:ae},hint:"Rounds the picture. The card's own corner is in Styles."})}function mA(){return to(li,"cardImage")}function pj(){return{cardImage:zg(li),...mA()}}function fj(){return Ul({sidesKey:"cornerSides",row:Cf,step:Of,useFollowed:()=>ae,mark:g(hA,{label:Pf}),hint:c("Rounds the picture. Left alone it stays square.")})}function hA({label:e,changed:t=!1,onReset:n=()=>{}}){return g(oe,{words:P()?.panel,label:c(e),changed:t,onReset:n})}function mj(){return{type:"custom",render:({value:e,onChange:t})=>g(SA,{value:typeof e=="string"?e:"",onChange:t})}}var lg="own";function hj(){let e=[{value:lg,label:"Layout's own",picture:vl(Array.from({length:8},()=>[3,1]))},...Object.entries(pa).map(([t,n])=>({value:t,label:n.label,picture:vl([...n.phone,...n.phone])}))];return te("mobile",Tl("Layout",g(gg,{}),e,lg,{columns:2,cell:Zh}))}function gA({layout:e,width:t}){let n=pi(e),o=n?`${n[0]}/${n[1]}`:void 0;return g("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:Df(e).map(([a,s],r)=>g("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${a}`,gridRow:`span ${s}`,aspectRatio:o}},r))})}var bA={width:"3.5rem",height:"2.5rem",words:!1},yA=200;function SA({value:e,onChange:t}){let[n,o]=oo(null),[a,s]=oo(4),r=no(null);GO(()=>{let m=r.current;if(!m||typeof ResizeObserver!="function")return;let b=()=>s(m.getBoundingClientRect().width>=yA?4:3);b();let y=new ResizeObserver(b);return y.observe(m),()=>y.disconnect()},[]);let i=e?j(Gn,e):void 0,l=i?e:"",u=ui(n,l),d=ui(n,"").length,p=Mf("no-symbol"),f=[{value:"",label:c("Not chosen"),icon:Xh(p,c("Not chosen"))},...u.map(m=>({value:m,label:c(Gn[m].label),icon:g(gA,{layout:Gn[m],width:40})}))];return g(K,{label:c("Layout"),icon:g(gg,{}),value:i?c(i.label):void 0,children:g("div",{ref:r,style:{flex:"1 1 auto",minWidth:0},children:g(Tg,{label:c("Layout"),value:l,options:f,onChange:t,columns:a,cell:bA,header:Ke("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[g("span",{className:"text-2xs text-ink-faint",children:c("Photos in a row")}),g(gP,{options:[{id:"all",label:c("All")},...Rf.map(m=>({id:String(m),label:String(m)}))],value:n===null?"all":String(n),ariaLabel:c("Photos in a row"),onChange:m=>o(m==="all"?null:Number(m))}),g("span",{className:"text-2xs text-ink-faint",children:c("{n} of {total} layouts",{n:d,total:ci.length})})]})})})})}var xA="Applies to panels, cards, inputs and buttons. Round things \u2014 color swatches, switches, status dots \u2014 stay round.",jl="Corners";function Wg({value:e,onChange:t,length:n}){let o=e===null;return ls(EA,{label:c(jl),icon:ls(TA,{}),changed:!o,action:ls(_A,{words:P()?.panel,label:c(jl),changed:!o,detail:c("the built-in corners"),onReset:()=>t(null)}),hint:c(xA),children:ls(pe,{min:n?.grid.min??ae,max:n?.grid.max??qe,step:n?.grid.step??1,value:e,...e===null?{}:{suffix:n?.unit??"px",...n?{units:n.units}:{}},placeholder:ae,placeholderWord:"Auto",onClear:()=>t(null),ariaLabel:c(jl),onChange:t})})}import{jsx as io}from"react/jsx-runtime";import{SettingsDefaultReset as vA,SettingsField as wA}from"efficient-easel/panel";import{IconPicker as CA}from"efficient-shell/ui";import{ShadowIcon as OA}from"efficient-easel/icons";import{SHADOW_PREVIEW as PA}from"efficient-easel/screen/lib/document/shadow-values";var Vl={none:"None",soft:"Soft",lifted:"Lifted"},kA="Applies to cards \u2014 products, brands, journal entries and filter cells. Round things like swatches and status dots are never shadowed.";function Kg({value:e,onChange:t}){let n=e===null,o=e??$s;return io(wA,{label:c("Card shadow"),icon:io(OA,{}),value:c(Vl[o]),changed:!n,action:io(vA,{words:P()?.panel,label:c("Card shadow"),changed:!n,detail:c(Vl[$s]),onReset:()=>t(null)}),hint:c(kA),children:io(CA,{label:c("Card shadow"),value:o,options:iu.map(a=>({value:a,label:c(Vl[a]),icon:io("span",{className:"sf-shadow-chip border border-line bg-surface",style:{boxShadow:PA[a]}})})),onChange:t})})}import{jsx as jg}from"react/jsx-runtime";import{ShadowIcon as AA}from"efficient-easel/icons";import{DEFAULT_SHADOW_COLOR as Vg}from"efficient-easel/screen/lib/document/shadow-values";var IA="Most useful on a dark theme, where a black shadow cannot be seen. Also used by the Lift hover, even with the card shadow off.";function Yg({value:e,onChange:t}){let n=e===null;return jg(Pn,{label:c("Shadow color"),icon:jg(AA,{}),value:e??"",inherited:Vg,resetTo:Vg,onChange:t,onReset:()=>t(null),hint:c(IA)})}import{jsx as us}from"react/jsx-runtime";import{SettingsDefaultReset as RA,SettingsField as NA}from"efficient-easel/panel";import{AlignSeparateIcon as LA}from"efficient-easel/icons";function cs(e,t){return e==="tablet"?null:e==="mobile"?t.phone:t.desktop}var DA="The space between the blocks inside a row, a grid or a box. Auto means each one keeps the spacing it already has.",FA="The space between the blocks inside a row, a grid or a box, on a phone. Until you set it, a phone uses half the desktop gap.",Yl="Block gap",Xg=qt.Grid;function qg(e,t){return cs(e,{desktop:{key:"block_gap",value:t.gap,followsPx:null},phone:{key:"block_gap_phone",value:t.phone,followsPx:t.gap===null?null:Ys(t.gap)}})}function Zg({value:e,onChange:t,followsPx:n=null,length:o,followsUnit:a="px"}){let s=e===null,r=n===null?null:`${n}${a}`,i=a==="px"&&(o?.unit??"px")==="px",l=n===null?Xg:i?wn(n)??Xg:n;return us(NA,{label:c(Yl),labelId:"sf-block-gap",icon:us(LA,{}),changed:!s,action:us(RA,{words:P()?.panel,label:c(Yl),changed:!s,detail:r??c("each block's own spacing"),onReset:()=>t(null)}),hint:c(r===null?DA:FA),children:us(pe,{min:(o?.grid??ye).min,max:(o?.grid??ye).max,step:(o?.grid??ye).step,value:e,...e===null&&n===null?{}:{suffix:o?.unit??"px",...o?{units:o.units}:{}},placeholder:l,...n===null?{placeholderWord:"Auto"}:i&&n===l?{}:{placeholderWord:String(n)},onClear:()=>t(null),ariaLabel:c(Yl),onChange:t})})}import{jsx as ds}from"react/jsx-runtime";import{SettingsDefaultReset as BA,SettingsField as HA,SettingsSegmented as MA}from"efficient-easel/panel";import{HoverIcon as UA}from"efficient-easel/icons";var Xl={none:ws.none,lift:ws.lift,highlight:Rc},$A="What a card does when a shopper points at it \u2014 or taps it, on a phone. Highlight is the effect your cards already use.";function Jg({value:e,onChange:t}){let n=e===null,o=e??Gs;return ds(HA,{label:c("Hover effect"),icon:ds(UA,{}),value:c(Xl[o]),changed:!n,action:ds(BA,{words:P()?.panel,label:c("Hover effect"),changed:!n,detail:c(Xl[Gs]),onReset:()=>t(null)}),hint:c($A),children:ds(MA,{options:lu.map(a=>({id:a,label:c(Xl[a])})),value:o,ariaLabel:c("Hover effect"),onChange:t})})}import{jsx as ps}from"react/jsx-runtime";import{SettingsDefaultReset as GA,SettingsField as zA,SettingsSegmented as WA}from"efficient-easel/panel";import{DropIcon as KA}from"efficient-easel/icons";var ql="Photography",Qg={shot:"As shot",mono:"Black and white"},Zl=[{grayscale:!1,label:Qg.shot},{grayscale:!0,label:Qg.mono}],jA="Black and white photographs return to color on hover. Wheels and tyres keep their real finish either way.";function eb({value:e,onChange:t}){let n=e===null,o=e??!1;return ps(zA,{label:c(ql),icon:ps(KA,{}),value:c(Zl.find(a=>a.grayscale===o).label),changed:!n,action:ps(GA,{words:P()?.panel,label:c(ql),changed:!n,detail:c(Zl.find(a=>!a.grayscale).label),onReset:()=>t(null)}),hint:c(jA),children:ps(WA,{options:Zl.map(a=>({id:a.grayscale,label:c(a.label)})),value:o,ariaLabel:c(ql),onChange:t})})}import{jsx as Jl}from"react/jsx-runtime";import{useId as VA}from"react";import{SettingsField as YA,SettingsSwitch as XA}from"efficient-easel/panel";import{ShareIcon as qA}from"efficient-easel/icons";var ZA="Share button",JA="On every blog post.";function tb({value:e,onChange:t}){let n=VA();return Jl(YA,{label:c(ZA),labelId:n,icon:Jl(qA,{}),action:Jl(XA,{checked:e===!0,onChange:t,ariaLabelledBy:n}),hint:c(JA)})}import{usePreviewDevice as gc}from"efficient-easel/draw/client";import{jsx as fs}from"react/jsx-runtime";import{SettingsDefaultReset as QA,SettingsField as eI}from"efficient-easel/panel";import{PaddingXIcon as tI}from"efficient-easel/icons";var Ql="Side space",nb=ie.default,nI="The room left at the left and right edge of every page.";function ob(e,t){return cs(e,{desktop:{key:"site_gutter",value:t.gutter,unsetPx:nb,bounds:ie},phone:{key:"site_gutter_phone",value:t.phone,unsetPx:Gp(t.gutter,t.gutterUnit),bounds:Le}})}function ab({value:e,onChange:t,unsetPx:n=nb,bounds:o=ie,length:a,restsOn:s=n}){let r=e===null;return fs(eI,{label:c(Ql),labelId:"sf-side-space",icon:fs(tI,{}),changed:!r,action:fs(QA,{words:P()?.panel,label:c(Ql),changed:!r,detail:`${n}px`,onReset:()=>t(null)}),hint:c(nI),children:fs(pe,{min:(a?.grid??o).min,max:(a?.grid??o).max,step:(a?.grid??o).step,value:e,suffix:a?.unit??"px",...a?{units:a.units}:{},...o.typedMax!==void 0&&(a?.unit??"px")==="px"?{inputMax:o.typedMax}:{},placeholder:s,onClear:()=>t(null),ariaLabel:c(Ql),onChange:t})})}import{jsx as ec}from"react/jsx-runtime";import{BACKGROUND_WIDTHS as E3,SettingsBackgroundWidth as oI,SettingsContentWidth as aI}from"efficient-easel/panel";var sI="Background width",rI="Content width";var ms=e=>c(Nt[e==="content"?"page":"full"]),sb="The width of every section's background.",rb="The width of every section's content.";function ib({value:e,changed:t,detail:n,onChange:o,onReset:a,hint:s,labelId:r}){return ec(oI,{value:e,changed:t,detail:n,onChange:o,onReset:a,hint:s?c(s):void 0,labelId:r,words:{label:c(sI),full:ms("full"),content:ms("content")},resetWords:P()?.panel})}function lb({mode:e,px:t,max:n=V.max,min:o=V.min,changed:a,detail:s,fullClosed:r,onMode:i,onPx:l,onReset:u,hint:d,labelId:p,length:f}){let m=c(rI),b=f?.grid.min??o,y=f?.grid.max??n,E=e!=="full"?ec(pe,{min:b,max:y,step:f?.grid.step??V.step,value:Math.min(Math.max(t,b),y),onChange:l,...f?{suffix:f.unit,units:f.units}:{suffix:"px"},ariaLabel:m}):null;return ec(aI,{mode:e,onMode:i,number:E,changed:a,detail:s,fullClosed:r,onReset:u,hint:d?c(d):void 0,labelId:p,words:{label:m,full:ms("full"),content:ms("content")},resetWords:P()?.panel})}import{jsx as cb}from"react/jsx-runtime";import{useMemo as iI}from"react";import{TextStyleItem as lI,TextStylesGroup as cI}from"efficient-easel/text-styles";var ub=["font","size","weight","emphasis"],uI=500;function dI({font:e,size:t,weight:n,italic:o}){let a={font:e};return t!==null&&(a.size=t),n!==null&&(a.weight=n),o!==null&&(a.italic=o),{id:"accent",kind:"heading",name:c("Emphasis"),values:a}}function pI(e,t){let n=[],o=e.values,a=t.values;return a.font!==o.font&&a.font!==void 0&&n.push({key:"font",value:a.font}),a.size!==o.size&&n.push({key:"size",value:a.size??null}),a.weight!==o.weight&&n.push({key:"weight",value:a.weight??null}),a.italic!==o.italic&&n.push({key:"italic",value:a.italic??null}),n}function db(e){let{headingWeight:t,open:n,onOpenChange:o,onChange:a,withoutSize:s=!1}=e,r=dI(e),i=On(),l=iI(()=>Jo(i),[i]);return cb(cI,{label:c("Emphasis"),children:cb(lI,{style:r,fonts:l,settings:s?ub.filter(u=>u!=="size"):ub,auto:["size"],fallback:()=>({weight:t??uI}),open:n,onOpenChange:o,onChange:u=>pI(r,u).forEach(a)})})}import{viewKeyAt as gb}from"efficient-easel/draw";import{shownUnitAt as yI,unitKeyOnWrite as SI}from"efficient-easel/screen/lib/content/length-units";import{convertRowLength as fI,rowUnits as mI,unitPickPatch as hI}from"efficient-easel/screen/lib/content/length-units";import{viewKeyAt as gI}from"efficient-easel/draw";var bI=["cornerRadius","siteWidth","siteGutter","siteGutterPhone","blockGap","blockGapPhone"],hs={cornerRadius:{number:"corner_radius_px",kind:"radius",grid:su,tier:"desktop"},siteWidth:{number:"site_width",kind:"size",grid:V,tier:"desktop"},siteGutter:{number:"site_gutter",kind:"spacing",grid:ie,tier:"desktop"},siteGutterPhone:{number:"site_gutter_phone",kind:"spacing",grid:Le,tier:"mobile"},blockGap:{number:"block_gap",kind:"gap",grid:ye,tier:"desktop"},blockGapPhone:{number:"block_gap_phone",kind:"gap",grid:ye,tier:"mobile"}};function gs(e){return{number:hs[e].number,unit:Xc[`${e}Unit`]}}function pb(e,t,n){let o=F(n),{number:a,unit:s}=gs(e);return{[a]:t,[s]:t===null||o==="px"?null:o}}function bs(e,t,n,o){let{kind:a,grid:s,tier:r}=hs[e],i=F(n),l=F(o),u=s.typedMax,d=u!==void 0&&l==="px"?{...s,max:u}:s;return i===l?t:fI(t,i,l,r,{kind:a},d)}function fb(e,t,n,o){let{number:a,unit:s}=gs(e),r=hI({[a]:t},i=>bs(e,i,n,o),s,F(o),"px");return{[a]:r[a],[s]:r[s]??null}}function mb(e,t){let{kind:n,grid:o}=hs[e];return Yc(n,F(t),o)}function hb(e){return mI({kind:hs[e].kind},Qn)}function tc(e,t){let n=gI(e,t);if(!bI.includes(n))throw new Error(`no site length row ${n}`);return n}function lo(e,t,n,o,a){let{siteLengthUnits:s,setSiteLengthUnits:r}=B(),i=`${e}Unit`,l=s[i],u=yI({n:a?.figure??null,u:a?.unit??null,[gb("n","mobile")]:t,[gb("u","mobile")]:l??null},{n:"n"},"u","mobile"),d=b=>r({[i]:b==="px"?null:b}),p=b=>{n(b);let y=SI(i,l,u,"px",b===null);i in y&&d(y[i]==null?null:F(y[i])),o(pb(e,b,u),b===null)},f=b=>{let y=F(b);if(y===u||(d(y),t===null))return;let E=fb(e,t,u,y);n(E[gs(e).number]),o(E,!0)},m=a?a.unit===u?a.figure:bs(e,a.figure,a.unit,u):null;return{length:{unit:u,grid:mb(e,u),units:{options:hb(e),onChange:f,label:c("Unit")}},write:p,rest:m,shown:b=>bs(e,b,"px",u)}}import{EmptyState as SR,SliderGroup as _R,Tabs as ER,Tooltip as o5,tabButtonId as TR,tabPanelId as xR}from"efficient-shell/ui";import{ContrastIcon as vR,SettingsIcon as wR,TypeIcon as CR}from"efficient-easel/icons";function bb(e){switch(e.status){case"saved":return null;case"failed":return{msg:c("Not saved. Try again."),tone:"error"};case"skipped":switch(e.reason){case"empty":return null;case"no-token":return{msg:c("Not saved. Reload the page."),tone:"error"};case"template":return{msg:c("Templates keep their look. Press Done."),tone:"success"}}}}import{jsx as Es}from"react/jsx-runtime";import{ListIcon as nR,PaddingTopIcon as oR,PaddingXIcon as aR}from"efficient-easel/icons";import{jsx as ys}from"react/jsx-runtime";import{SettingsDefaultReset as _I,SettingsField as EI,SettingsSegmented as TI}from"efficient-easel/panel";import{WidthIcon as xI}from"efficient-easel/icons";function yb({value:e,resolved:t,onChange:n,label:o="Width",labelId:a,followsLabel:s,hint:r}){let i=e===void 0,l=i?t:e,u=c(o);return ys(EI,{label:u,labelId:a,icon:ys(xI,{}),value:i?s:void 0,changed:!i,action:ys(_I,{words:P()?.panel,label:u,changed:!i,onReset:()=>n(void 0)}),hint:r,children:ys(TI,{options:[{label:c(Nt.full),id:"full"},{label:c(Nt.page),id:"content"}],value:l,ariaLabel:u,onChange:n})})}import{group as sR}from"efficient-easel/screen/lib/document/box-fields";import{jsx as ut}from"react/jsx-runtime";import{ColumnsIcon as DI,HeadquartersIcon as FI,HeightIcon as BI,LayoutIcon as HI,LocationIcon as MI,MapIcon as UI,SearchIcon as $I,ThemeIcon as GI}from"efficient-easel/icons";import{group as sc}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as yn}from"efficient-easel/screen/lib/document/device-fields";import{jsx as oc}from"react/jsx-runtime";import{ListIcon as vI}from"efficient-easel/icons";import{NoControlMark as wI,noControlField as CI}from"efficient-easel/screen/lib/document/panel-no-control-mark";function Cb(e,t){return Q(e,oc(vI,{}),[{label:t,value:""}],"")}var OI="_sourceEdit";function pV(){return CI({type:"custom",render:()=>oc(wI,{})},"always")}var Sb=new Map,_b=new WeakMap,Eb=(e,t)=>({type:"custom",render:()=>oc(ya,{compact:!0,status:"ok",hint:c("Where this content is edited."),edit:{label:e,onClick:t}})});function PI(e){if(Sc(e)){let o=_b.get(e.open);o||_b.set(e.open,o=new Map);let a=o.get(e.label);return a||o.set(e.label,a=Eb(e.label,e.open)),a}let t=`${e.label}\0${e.href}`,n=Sb.get(t);return n||(n=Eb(e.label,()=>window.open(e.href,"_blank","noopener")),Sb.set(t,n)),n}var Tb=new WeakMap,xb=-1,nc={},vb=new WeakMap;function Ob(e,t,n){return Ec(e).filter(o=>!o.records||o.key===t||n!==null&&o.records.includes(n))}function kI(e,t,n,o){xb!==ho()&&(xb=ho(),nc={});let a=Tb.get(t);(!a||vb.get(a)!==nc)&&(a=new Map,vb.set(a,nc),Tb.set(t,a));let s=Ob(e,n,o),r=n&&!s.some(u=>u.key===n)?n:"",i=`${e}\0${r}\0${o??""}\0${s.map(u=>u.key).join(",")}`,l=a.get(i);return l||(l={...t,options:[...t.options,...s.map(u=>({label:u.label,value:u.key})),...r?[{label:r,value:r}]:[]]},a.set(i,l)),l}var wb=new WeakMap,AI={not:{field:Ye,set:!0}};function Pb(e,t,n,o={}){let a=t[Ye];if(!a)return t;let s=xc(n),r=Ef(o.root),i=Ob(e,s,r).length>0||s!=="",l=i?kI(e,a,s,r):null,u=wb.get(t);u||wb.set(t,u=new Map);let d=`${ho()}\0${i?"1":"0"}\0${s}\0${(o.hides??[]).join(",")}\0${r??""}`,p=u.get(d);if(p)return p;let f=new Set(o.hides??[]),m=s?Tc(s)?.edit:void 0,b={};for(let[y,E]of Object.entries(t))y===Ye?l&&(b[y]=l):y===OI?m&&(b[y]=PI(m)):b[y]=f.has(y)&&E&&typeof E=="object"?le(E,AI):E;return u.set(d,b),b}import{createContext as II,useContext as RI}from"react";var kb=II(null),gV=kb.Provider,bV=()=>RI(kb);function yV(e){let t=[];for(let n of e)n.placement!=="located"&&n.placement!=="approximate"||n.lat===null||n.lng===null||t.push({key:n.id,label:n.name,lat:n.lat,lng:n.lng,glyph:"",tone:"",approximate:n.placement==="approximate"});return t}function NI(e){return e===null||!Number.isFinite(e)?"":e<10?`${e.toFixed(1)} km`:`${Math.round(e)} km`}function SV(e,t){let n=[e.city,[e.state,e.postcode].filter(Boolean).join(" ")].filter(Boolean).join(" ");return{name:e.name,address:e.address,place:n,distance:t?NI(e.distanceKm):"",phone:e.phone,phoneHref:e.phone?`tel:${e.phone.replace(/[^\d+]/g,"")}`:"",website:e.website.replace(/^https?:\/\//,"").replace(/\/$/,""),websiteHref:e.website&&!/^[a-z][a-z\d+.-]*:/i.test(e.website)?`https://${e.website}`:e.website}}var LI=[{key:"name",label:"Dealer name",plain:!0},{key:"address",label:"Address"},{key:"place",label:"City \xB7 state \xB7 postcode",plain:!0},{key:"distance",label:"Distance",plain:!0},{key:"phone",label:"Phone"},{key:"phoneHref",label:"Phone link",kind:"link"},{key:"website",label:"Website",plain:!0},{key:"websiteHref",label:"Website link",kind:"link"}],Ab={key:mo,label:"Dealers",blocks:["Footprint"],fields:LI};function _V(e){return[e.name,e.city].filter(Boolean).join(", ")}var TV={text:"Button label",href:"#"},xV=e=>e.replace(/\*([^*]+)\*/g,"==$1=="),co={eyebrow:"Eyebrow",heading:"Main heading",accent:"Highlight line",body:"Add a sentence or two of supporting copy.",button:"Button label",link:"#",sectionHeading:"Section heading",slideName:"Slide name",boxName:"Box name",headingAccent:"Section heading *here.*",sectionNumber:"Section number",imageCaption:"Image caption",bookingConfirmation:"Thanks \u2014 we'll email you to confirm.",imageMeta:"Image meta",label:"Label",value:"Value",viewAll:"View all",date:"Month DD, YYYY",category:"Category"};var Ss={sectionNumber:co.sectionNumber,heading:`${co.heading}
9
- *${co.accent}*`,tagline:co.body},ac=vc.Footprint,PV={label:"Locations Map",fields:ac,defaultProps:{sectionNumber:"",heading:"",tagline:"",offices:[],mapTheme:Eo.mapTheme,padTop:120,padBottom:120,search:!1,searchHint:"",noMatchText:"",listPosition:"below",showDistance:!0}};var Rb={field:Ye,is:mo,default:""},rc={field:Gt,is:mt,default:mt},zI={field:Gt,is:"list",default:mt},WI={field:Gt,is:"map",default:mt},Nb={all:[rc,{field:"listPosition",in:["left","right"],default:"below"}]},Lb={any:[{all:[Rb,{not:WI}]},Nb]},KI={any:[{all:[rc,{field:"listPosition",is:"below",default:"below"}]},zI]},Ib={all:[Lb,{field:"search",is:!0,default:!1}]};_c([Ab,Vp]);async function ic(e){return Ca(e)?hm(e,t=>[t.address,t.city,t.country].map(n=>String(n??"").replace(/\*/g,"").trim()).filter(Boolean).join(", ")):e}var jI={fields:{_gContent:sc("Section"),sectionNumber:ss("Section number",Ss.sectionNumber),heading:Ml("Heading",Ss.heading),tagline:Ml("Body",Ss.tagline),_gOffices:sc("Offices"),[Ye]:Cb("Office content","Manual"),offices:{type:"array",label:"Offices",arrayFields:{role:bn("Role"),city:bn("City"),country:bn("Region \xB7 country"),address:kg("Address"),phone:bn("Phone"),group:bn("Group"),hq:ct("HQ",!1,ut(FI,{})),geocode:$g(Gg,{label:"Coordinates"})},defaultItemProps:{role:"Sales & Distribution",city:"City",country:"Country",address:"",phone:"",group:"",hq:!1,lat:0,lng:0},getItemSummary:e=>e?.city||"Office"},...ac,[Gt]:gn("Shows",ut(UI,{}),[{label:"Map and list",value:mt},{label:"Map only",value:"map"},{label:"List only",value:"list"}],mt),mapTheme:gn("Map theme",ut(GI,{}),[{label:"Auto",value:"auto"},{label:"Dark",value:"dark"},{label:"Light",value:"light"}],Eo.mapTheme),_gList:sc("List"),listPosition:yn("desktop",le(gn("Position",ut(HI,{}),[{label:"Left",value:"left"},{label:"Right",value:"right"},{label:"Below",value:"below"}],"below"),rc)),listColumns:yn("desktop",le(gn("Columns",ut(DI,{}),[{label:"Auto",value:Ls},...Kc.map(e=>({label:String(e),value:String(e)}))],Ls),KI)),[zc]:yn("desktop",le(gn("Map height",ut(BI,{}),[{label:"Fixed",value:Ns},{label:"Full height",value:Wc}],Ns),Nb)),search:yn("desktop",le(ct("Search",!1,ut($I,{})),Lb)),searchHint:yn("desktop",le(Hl(ss("Hint","Type a postcode or address")),Ib)),noMatchText:yn("desktop",le(Hl(ss("No match","No place found. Try another postcode.")),Ib)),showDistance:le(ct("Distance",!0,ut(MI,{})),Rb)},resolveData:async(e,t)=>{let n=t?.changed,o=e.props;if(n?.listPosition===!0||n?.[Gt]===!0||n?.[Ye]===!0){let i=jc(o);i!==o&&(e={...e,props:i})}let a=e.props,s=a.offices??[],r=await ic(s);return r===s?e:{...e,props:{...a,offices:[...r]}}},resolveFields:(e,{fields:t})=>$c(Pb("Footprint",t,e.props,{hides:["offices"]}),e.props.headPlacement,Uc.Footprint.headRows)},Db=jI.fields.offices;var _s=null;function VV(e){_s=e}function YV(){return!!(_s&&_s.state().lockHolder)}function lc(){return _s!==null}import{BUCKET_KEY as rR}from"efficient-easel/screen/lib/document/field-buckets";import{HEADER_TYPE as cc,FOOTER_TYPE as VI}from"efficient-easel/draw";import{parseOption as YI}from"efficient-shell/format";var XI=new Set(["Hero","HeroSingle","IntroBleed"]),Fb={min:56,max:140,default:88},JV={min:0,max:120,step:2,default:32},QV=`var(--sf-header-h, ${Fb.default}px)`,qI="--sf-header-set-h",eY="--sf-header-h",tY=`var(${qI}, ${Fb.default}px)`,nY="sf-header-clearance",oY="sf-sticky-underheader";function ZI(e){return e?.find(t=>t?.type&&t.type!==cc)??null}function Bb(e){let t=ZI(e)?.type;return!t||!XI.has(t)}function aY(e){return!Bb(e)}function sY(e){return!!e?.some(t=>t?.type===cc)}function rY(e){return!e||e.length===0?!1:!e.some(t=>t?.type===cc||t?.type===VI)}var JI=["auto","shared","own"],uc="auto",QI="topSpace",iY="data-top-space";function eR(e){return YI(JI,uc,e)}function tR(e,t){let n=eR(e?.props?.[QI]);return n==="own"?!0:n==="shared"?!1:Bb(t)}function lY(e,t){return tR(e,t)?"own":null}function iR(){return{type:"custom",render:({value:e,onChange:t})=>Es(yb,{value:e==="full"?"full":e==="content"?"content":void 0,resolved:"content",label:"Page width",followsLabel:c("Follows the site"),hint:c("Whether this page sits on the site's content column, or runs edge to edge."),onChange:n=>t(n)})}}var lR=[{label:"Auto",value:"auto"},{label:"Shared",value:"shared"},{label:"Its own",value:"own"}],PY={pageBackground:Ug(),topSpace:Q("Top space",Es(oR,{}),lR,uc),widthChoice:iR()},Gb=["pageBackground","topSpace","widthChoice"],cR="Record type",dc=new Map,Hb=-1;function uR(e){Hb!==ai()&&(dc.clear(),Hb=ai());let t=oi(),n=t.some(a=>a.key===e)?"":e,o=dc.get(n);return o||(o=Q(cR,Es(nR,{}),[...t.map(a=>({label:a.label,value:a.key})),...n?[{label:n,value:n}]:[]],st),dc.set(n,o)),o}var Mb=new WeakMap;function kY(e,t){if(!$n()||oi().length<2||la in e)return e;let n=uR(Un(t)),o=Mb.get(e);if(o&&o.row===n)return o.fields;let a={[la]:n,...e};return Mb.set(e,{row:n,fields:a}),a}var dR="On: the site's Side space is counted once at each edge of every page. Off: as before.",pR=ct("Count side space once",!1,Es(aR,{}),dR),pc={_gWebsite:sR("Website"),[wt]:pR,[nt]:Db,[Fn]:Gl},Ub=new WeakMap;function AY(e,t){if(t?.kind!==Hi||wt in e)return e;let n=Ub.get(e);return n||(n={...e,...pc},Ub.set(e,n)),n}function IY(e){if(!lc()||wt in e)return e;let t=$b.get(e);if(!t){t={};let n=!1;for(let[o,a]of Object.entries(e))o===fR&&!n&&(Object.assign(t,pc),n=!0),t[o]=a;n||Object.assign(t,pc),$b.set(e,t)}return t}var fR=rR.Animation,$b=new WeakMap;function RY(e){return lc()?zb(e):e}function zb(e){let t=e?.props;if(!t||!Array.isArray(t[nt]))return e;let n=t[nt];return Ca(n)?ic(n).then(o=>({...e,props:{...t,[nt]:[...o]}})):e}function NY(e){return e?.props?.kind===Hi?zb(e):e}import{previewFrame as OR}from"efficient-easel/screen/lib/document/preview-dom";import{pictureShadowColor as PR}from"efficient-easel/screen/lib/document/shadow-values";var mc="sf-site-styles",kR="sf-site-styles-tabpanel",y5="text",jb="basics",Wb="this-page-group",Ts=[{id:jb,label:"Basics",icon:L(wR,{})},{id:"theme",label:"Theme",icon:L(vR,{})},{id:"text",label:"Text",icon:L(CR,{})}];function AR({themeFromDocument:e,persist:t}){let{appState:n,dispatch:o}=Kb(u=>u),{theme:a,setTheme:s}=B(),r=n.data,i=r.root?.props??{},l=u=>{if(e){let d={...i,theme:u};o({type:"replaceRoot",root:{...r.root,props:d},recordHistory:!0})}else s(u);t({selected_preset:u.selected,theme_presets:u.themes})};return L(Tp,{value:e?i.theme:a,onChange:l})}function IR({themeFromDocument:e,persist:t}){let[n,o]=hc(null),{theme:a,setFonts:s,setSizes:r,setHeadingTypography:i}=B(),l=bp({themeFromDocument:e,persist:t}),{old:u,saved:d,writeRoot:p}=l,f=l.fonts,m=l.sizes,b=l.typography,y=LR,E=C=>l.write(C),S=hp(a),T=gp(a),x=C=>{let D={...f,accent:C};e?p({fonts:D}):s(D),t({accent_font:C})},v=C=>{r({...m,accent:C}),t({accent_size_px:C})},w=C=>{let D={...b,weightStrong:C};e?p({headingTypography:D}):i(D),t({heading_weight_strong:C})},R=C=>{let D={...b,italicStrong:C};e?p({headingTypography:D}):i(D),t({accent_italic:C})};return Ut(Sn,{children:[L(pp,{saved:d,old:u,colours:S,colourNameOf:T,sizeOf:y,onChange:E,openId:n===fc?null:n,onOpenChange:o,withoutSize:e}),L(db,{font:f.accent,size:m.accent,weight:b.weightStrong,italic:b.italicStrong,headingWeight:b.weight,open:n===fc,onOpenChange:C=>o(C?fc:null),onChange:C=>{C.key==="font"?x(C.value):C.key==="size"?v(C.value):C.key==="weight"?w(C.value):R(C.value)},withoutSize:e})]})}var fc="accent",RR={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},NR={heading:32,body:14};function LR(e){return e.values.size??FR(j(RR,e.id)??"body")??NR[e.kind]}var DR={heading:"main h1, main h2",heading2:"main h1, main h2",heading3:"main h1, main h2",accent:"main h1 em, main h2 em",body:"main p",label:"main .mono-eyebrow"};function FR(e){if(typeof document>"u")return null;let t=(OR()?.contentDocument??document).querySelector(DR[e]);if(!t)return null;let n=parseFloat(getComputedStyle(t).fontSize);return Number.isFinite(n)?n:null}function BR({themeFromDocument:e,persist:t}){let{appState:n,dispatch:o}=Kb(f=>f),{cornerRadiusPx:a,setCornerRadiusPx:s}=B(),r=n.data,i=r.root?.props??{},l=i.cornerRadiusPx===void 0?ru[au(i.cornerStyle)]:Ae(i.cornerRadiusPx),u=e?l:a,d=lo("cornerRadius",a,s,t),p=f=>o({type:"replaceRoot",root:{...r.root,props:{...i,...f}},recordHistory:!0});return L(Wg,{value:u,onChange:f=>{e?(p({cornerRadiusPx:f}),t({corner_radius_px:f})):d.write(f)},...e?{}:{length:d.length}})}function HR({persist:e}){let{siteWidth:t,setSiteWidth:n,sectionBackgroundWidth:o,setSectionBackgroundWidth:a,sectionContentWidth:s,setSectionContentWidth:r}=B(),i=gc(),l=lo("siteWidth",t??null,n,e);if(i!=="desktop")return null;let u=typeof t=="number"?t:l.shown(V.default),d=l.write,p=m=>{a(m),e({section_background_width:m},!0)},f=m=>{r(m),e({section_content_width:m},!0)};return Ut(Sn,{children:[L(ib,{value:o??"full",changed:o!==null,detail:c("Full width"),onChange:p,onReset:()=>p(null),hint:sb}),L(lb,{mode:s??"content",px:u,min:V.min,max:V.max,changed:typeof t=="number"||s!==null,detail:`${c("Content width")} ${V.default}px`,onMode:f,onPx:m=>d(m),onReset:()=>{f(null),d(null)},hint:rb,length:l.length})]})}function MR({persist:e}){let{siteGutter:t,siteGutterPhone:n,setSiteGutter:o,setSiteGutterPhone:a,siteLengthUnits:s}=B(),r=ob(gc(),{gutter:t,phone:n,gutterUnit:s.siteGutterUnit}),i=r?.key==="site_gutter_phone",l=lo(tc("siteGutter",i?"mobile":"desktop"),r?.value??null,i?a:o,e);return r?L(ab,{value:r.value,onChange:l.write,unsetPx:r.unsetPx,restsOn:l.shown(r.unsetPx),bounds:r.bounds,length:l.length}):null}function UR({persist:e}){let{blockGap:t,blockGapPhone:n,setBlockGap:o,setBlockGapPhone:a,siteLengthUnits:s}=B(),r=qg(gc(),{gap:t,phone:n}),i=r?.key==="block_gap_phone",l=r?.followsPx==null?null:{figure:r.followsPx,unit:F(s.blockGapUnit)},u=lo(tc("blockGap",i?"mobile":"desktop"),r?.value??null,i?a:o,e,l);return r?L(Zg,{value:r.value,onChange:u.write,followsPx:u.rest,followsUnit:u.length.unit,length:u.length}):null}function $R({persist:e}){return Ut(Sn,{children:[L(HR,{persist:e}),L(MR,{persist:e}),L(UR,{persist:e})]})}function GR(e){return{card_shadow:e}}function zR(e){return e===null?{shadow_color:null}:{shadow_color:PR(e)}}function WR(e){return{hover_effect:e}}function KR({persist:e}){let{cardShadow:t,setCardShadow:n,shadowColor:o,setShadowColor:a,hoverEffect:s,setHoverEffect:r}=B();return Ut(Sn,{children:[L(Kg,{value:t,onChange:i=>{n(i),e(GR(i),!0)}}),L(Yg,{value:o,onChange:i=>{a(i),e(zR(i),i===null)}}),L(Jg,{value:s,onChange:i=>{r(i),e(WR(i),!0)}})]})}function jR(e){return{photography_grayscale:e}}function VR({persist:e}){let{photographyGrayscale:t,setPhotographyGrayscale:n}=B();return L(eb,{value:t,onChange:o=>{n(o),e(jR(o),!0)}})}function YR({persist:e}){return L(Sn,{children:L(VR,{persist:e})})}function XR(e){return{share_button_on_posts:e}}function qR({persist:e}){let{shareButtonOnPosts:t,setShareButtonOnPosts:n}=B();return L(tb,{value:t,onChange:o=>{n(o),e(XR(o),!0)}})}function S5(){let{websiteName:e}=B();return e?.trim()||Lu}function _5({themeFromDocument:e=!1,tokenRef:t,siteId:n,onNotify:o,tab:a,onTabChange:s,initialTab:r,revealPageGroup:i=!1,onPageGroupRevealed:l}){let{persist:u}=Fo({themeFromDocument:e,tokenRef:t,siteId:n,onResult:E=>{let S=bb(E);S&&o?.(S.msg,S.tone)}}),[d,p]=hc(r??Ts[0].id),f=a!==void 0,m=f?a:d,b=f?s??(()=>{}):p,y=Ts.find(E=>E.id===m)??Ts[0];return Ut(_R,{children:[L(QR,{activeId:y.id,onSelect:b}),Ut("div",{id:xR(mc,y.id),className:kR,role:"tabpanel","aria-labelledby":TR(mc,y.id),children:[m===jb&&Ut(Sn,{children:[L(BR,{themeFromDocument:e,persist:u}),!e&&L(KR,{persist:u}),!e&&L($R,{persist:u}),!e&&L(YR,{persist:u}),!e&&L(qR,{persist:u}),L(ZR,{reveal:i,onRevealed:l})]}),m==="theme"&&L(AR,{themeFromDocument:e,persist:u}),m==="text"&&L(IR,{themeFromDocument:e,persist:u})]})]})}function ZR({reveal:e,onRevealed:t}){let[n,o]=hc(!0),a=yR(t);return a.current=t,bR(()=>{if(!e)return;o(!0);let s=requestAnimationFrame(()=>{document.getElementById(Wb)?.scrollIntoView({block:"start"}),a.current?.()});return()=>cancelAnimationFrame(s)},[e]),L(gR,{title:c("This page"),open:n,onToggle:o,id:Wb,children:L(JR,{})})}function JR(){let{fields:e,values:t,readOnly:n,onChange:o}=mR(),a=Object.fromEntries(Gb.filter(s=>s in e).map(s=>[s,e[s]]));return Object.keys(a).length===0?L(SR,{variant:"none",icon:!1,message:c("This page has no look of its own to set.")}):L(hR,{fields:a,values:t,onChange:o,readOnly:n,tabs:!1,idPrefix:"this-page",ariaLabel:c("This page")})}function QR({activeId:e,onSelect:t}){return L("div",{className:"es-insp-tabs",children:L(ER,{variant:"underline",block:!0,labelsFit:!0,"aria-label":c("Styles"),idPrefix:mc,value:e,onChange:t,items:Ts.map(n=>{let o=c(n.label);return{id:n.id,icon:n.icon,label:o}})})})}export{xe as a,dN as b,n0 as c,P as d,o0 as e,a0 as f,c as g,xn as h,V as i,GE as j,Wr as k,eF as l,Dp as m,oF as n,ie as o,Le as p,we as q,tt as r,sF as s,VE as t,rF as u,Kr as v,iF as w,lF as x,cF as y,XE as z,uF as A,dF as B,pF as C,fF as D,Hp as E,mF as F,Up as G,hF as H,gF as I,Gp as J,zp as K,Wp as L,aT as M,sT as N,_F as O,TF as P,xF as Q,vF as R,wF as S,Gh as T,Nt as U,fO as V,fz as W,mO as X,mz as Y,ne as Z,hz as _,hO as $,gz as aa,bz as ba,yz as ca,Sz as da,_z as ea,Ez as fa,hn as ga,Tz as ha,xz as ia,ci as ja,di as ka,kf as la,pi as ma,ox as na,kH as oa,fa as pa,Bf as qa,ma as ra,ax as sa,sx as ta,NH as ua,LH as va,DH as wa,rx as xa,FH as ya,fi as za,BH as Aa,HH as Ba,MH as Ca,UH as Da,$H as Ea,GH as Fa,zH as Ga,WH as Ha,KH as Ia,ix as Ja,Lr as Ka,wp as La,CE as Ma,yD as Na,Cp as Oa,OE as Pa,SD as Qa,Op as Ra,PE as Sa,_D as Ta,N2 as Ua,qn as Va,VC as Wa,nl as Xa,dn as Ya,al as Za,sl as _a,L2 as $a,D2 as ab,F2 as bb,il as cb,Ih as db,B2 as eb,De as fb,Jr as gb,bB as hb,Ct as ib,K2 as jb,j2 as kb,V2 as lb,Y2 as mb,X2 as nb,Yn as ob,ji as pb,TC as qb,Gi as rb,Vi as sb,uh as tb,Yi as ub,wC as vb,u2 as wb,Da as xb,d2 as yb,CC as zb,OC as Ab,p2 as Bb,PC as Cb,oh as Db,f2 as Eb,m2 as Fb,h2 as Gb,PF as Hb,lT as Ib,cT as Jb,kF as Kb,Ue as Lb,Po as Mb,ju as Nb,y0 as Ob,S0 as Pb,Gu as Qb,Si as Rb,zM as Sb,WM as Tb,em as Ub,jM as Vb,VM as Wb,Wx as Xb,YM as Yb,nm as Zb,XM as _b,qM as $b,tm as ac,om as bc,ZM as cc,Wn as dc,Ei as ec,JM as fc,QM as gc,eU as hc,tU as ic,Uo as jc,wS as kc,Pd as lc,kd as mc,An as nc,PS as oc,$o as pc,Nd as qc,a1 as rc,s1 as sc,pr as tc,r1 as uc,Ld as vc,DS as wc,FS as xc,BS as yc,p1 as zc,f1 as Ac,fr as Bc,g1 as Cc,C1 as Dc,O1 as Ec,P1 as Fc,k1 as Gc,A1 as Hc,MS as Ic,US as Jc,I1 as Kc,Zt as Lc,$S as Mc,Ud as Nc,GS as Oc,R1 as Pc,zS as Qc,N1 as Rc,L1 as Sc,Od as Tc,Mo as Uc,Ko as Vc,Gd as Wc,zd as Xc,_r as Yc,VS as Zc,jo as _c,Tt as $c,X1 as ad,QS as bd,e_ as cd,t_ as dd,q1 as ed,Z1 as fd,p_ as gd,St as hd,J1 as id,Q1 as jd,v_ as kd,eL as ld,tL as md,vr as nd,nL as od,wr as pd,I_ as qd,oL as rd,aL as sd,Cr as td,sL as ud,rL as vd,iL as wd,F_ as xd,lL as yd,U_ as zd,$_ as Ad,cL as Bd,uL as Cd,dL as Dd,z_ as Ed,pL as Fd,fL as Gd,j_ as Hd,mL as Id,hL as Jd,fn as Kd,pl as Ld,fl as Md,lm as Nd,rU as Od,cm as Pd,iU as Qd,lU as Rd,cU as Sd,hi as Td,qH as Ud,yG as Vd,kw as Wd,SG as Xd,Bi as Yd,Hi as Zd,_G as _d,EG as $d,TG as ae,Ia as be,xG as ce,ko as de,qt as ee,vn as fe,Vs as ge,wn as he,T0 as ie,x0 as je,v0 as ke,Zu as le,Ju as me,Qu as ne,w0 as oe,ve as pe,Ge as qe,Hr as re,GD as se,ta as te,zD as ue,WD as ve,na as we,KD as xe,jD as ye,VD as ze,L0 as Ae,On as Be,D0 as Ce,TV as De,xV as Ee,co as Fe,RF as Ge,NF as He,LF as Ie,DF as Je,Kp as Ke,FF as Le,BF as Me,Uh as Ne,rz as Oe,bl as Pe,yl as Qe,iz as Re,lz as Se,JU as Te,Fb as Ue,JV as Ve,QV as We,qI as Xe,eY as Ye,tY as Ze,nY as _e,oY as $e,ZI as af,aY as bf,sY as cf,rY as df,iY as ef,tR as ff,lY as gf,st as hf,FB as if,FT as jf,ai as kf,Un as lf,BB as mf,UB as nf,HT as of,yf as pf,$B as qf,$T as rf,zT as sf,ri as tf,zB as uf,WB as vf,KT as wf,XB as xf,qB as yf,$n as zf,ZB as Af,Ef as Bf,Mr as Cf,cH as Df,uH as Ef,Tf as Ff,dH as Gf,kE as Hf,re as If,TD as Jf,AE as Kf,IE as Lf,CD as Mf,RE as Nf,NE as Of,OD as Pf,PD as Qf,kD as Rf,AD as Sf,ID as Tf,RD as Uf,ND as Vf,LD as Wf,DD as Xf,FD as Yf,BD as Zf,$m as _f,QC as $f,Ua as ag,U2 as bg,TB as cg,Vh as dg,Qn as eg,Be as fg,Q as gg,eo as hg,gn as ig,Nz as jg,Lz as kg,Fz as lg,Bz as mg,Hz as ng,Mz as og,Uz as pg,Gz as qg,zz as rg,to as sg,Wz as tg,OO as ug,PO as vg,Xh as wg,Kz as xg,Tl as yg,Rp as zg,GF as Ag,zF as Bg,hT as Cg,gT as Dg,ZF as Eg,yT as Fg,Jp as Gg,JF as Hg,QF as Ig,eB as Jg,nB as Kg,ef as Lg,oB as Mg,aB as Ng,uB as Og,dB as Pg,of as Qg,pB as Rg,bH as Sg,Cf as Tg,vH as Ug,Mf as Vg,Uf as Wg,zn as Xg,Kf as Yg,nM as Zg,oM as _g,ya as $g,bi as ah,Ux as bh,AM as ch,sm as dh,pU as eh,Ca as fh,hm as gh,Dy as hh,Se as ih,Pn as jh,$U as kh,Pi as lh,ki as mh,WU as nh,Em as oh,KU as ph,jU as qh,VU as rh,Cm as sh,Pm as th,mN as uh,hN as vh,md as wh,gN as xh,hd as yh,yN as zh,Fo as Ah,_S as Bh,UN as Ch,xd as Dh,N$ as Eh,Am as Fh,Lm as Gh,Dm as Hh,Fm as Ih,Bm as Jh,Hm as Kh,Mm as Lh,Li as Mh,hw as Nh,gw as Oh,Vn as Ph,Di as Qh,Gm as Rh,tG as Sh,yw as Th,nG as Uh,oG as Vh,aG as Wh,Wm as Xh,lG as Yh,Ew as Zh,cG as _h,uG as $h,xw as ai,ww as bi,Cw as ci,Ow as di,mG as ei,Pw as fi,hG as gi,Mi as hi,IG as ii,Ym as ji,Nw as ki,NG as li,BG as mi,Ui as ni,Vw as oi,e2 as pi,BC as qi,v2 as ri,MC as si,w2 as ti,C2 as ui,O2 as vi,mn as wi,Ka as xi,tz as yi,nz as zi,oz as Ai,kO as Bi,AO as Ci,Yz as Di,LO as Ei,DO as Fi,Xz as Gi,qz as Hi,Zz as Ii,Jz as Ji,Qz as Ki,rW as Li,iW as Mi,lW as Ni,cW as Oi,uW as Pi,dW as Qi,pW as Ri,fW as Si,mW as Ti,hW as Ui,gW as Vi,Zh as Wi,bW as Xi,yW as Yi,KO as Zi,jO as _i,pg as $i,Bt as aj,sK as bj,rK as cj,iK as dj,lK as ej,cK as fj,uK as gj,Hl as hj,dK as ij,pK as jj,gK as kj,bK as lj,QP as mj,yK as nj,ss as oj,Ml as pj,bn as qj,kg as rj,SK as sj,_K as tj,EK as uj,TK as vj,ok as wj,xK as xj,vK as yj,wK as zj,CK as Aj,OK as Bj,PK as Cj,kK as Dj,AK as Ej,rs as Fj,pe as Gj,Pe as Hj,Ag as Ij,cn as Jj,Ig as Kj,Rg as Lj,IK as Mj,RK as Nj,NK as Oj,kk as Pj,LK as Qj,DK as Rj,FK as Sj,BK as Tj,HK as Uj,MK as Vj,UK as Wj,Z as Xj,Lk as Yj,$K as Zj,GK as _j,Qa as $j,zK as ak,WK as bk,KK as ck,jK as dk,VK as ek,YK as fk,ct as gk,XK as hk,eA as ik,qK as jk,ZK as kk,JK as lk,QK as mk,ej as nk,$g as ok,tj as pk,nj as qk,oj as rk,Gg as sk,sj as tk,rj as uk,dA as vk,ij as wk,lj as xk,cj as yk,uj as zk,dj as Ak,Kl as Bk,zg as Ck,pj as Dk,fj as Ek,mj as Fk,hj as Gk,LU as Hk,DU as Ik,VV as Jk,YV as Kk,lc as Lk,rI as Mk,ib as Nk,lb as Ok,Ql as Pk,PL as Qk,nn as Rk,kL as Sk,AL as Tk,IL as Uk,RL as Vk,eE as Wk,NL as Xk,LL as Yk,pp as Zk,yb as _k,Cb as $k,OI as al,pV as bl,AI as cl,Pb as dl,bV as el,yV as fl,SV as gl,LI as hl,_V as il,Ss as jl,PV as kl,jI as ll,PY as ml,Gb as nl,kY as ol,AY as pl,IY as ql,RY as rl,NY as sl,hp as tl,gp as ul,bp as vl,y5 as wl,jb as xl,Ts as yl,LR as zl,S5 as Al,_5 as Bl};
7
+ Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""}],fT=/^https?:\/\//i;function HF(e){let t=(e.mapsUrl??"").trim();return{photo:"",group:"",groupName:"",name:e.name??"",state:e.state??"",country:e.country??"",timezone:"",address:e.address??"",phone:e.phone??"",hours:e.hours??"",lat:Is(e.lat),lng:Is(e.lng),mapsUrl:fT.test(t)?t:""}}function Kp(e){let t=String(e??"").split(" \xB7 ");return{state:(t[0]??"").trim(),country:(t[1]??"").trim()}}var MF="other",UF={routingNumber:"02 \xB7 Routing",routingTagline:"What can we help you with?",groups:[{id:"fitment",eyebrow:"A \xB7 Label",title:"Group one",copy:"Short description of this routing group.",response:"< 48h"},{id:"trade",eyebrow:"B \xB7 Label",title:"Group two",copy:"Short description of this routing group.",response:"< 24h"},{id:"press",eyebrow:"C \xB7 Label",title:"Group three",copy:"Short description of this routing group.",response:"< 48h"},{id:"order",eyebrow:"D \xB7 Label",title:"Group four",copy:"Short description of this routing group.",response:"< 24h"}],formNumber:"03 \xB7 Message",formHeading:"Send *a note.*",metaLines:["Encrypted in transit","Stored 12 months"],showOther:!0,otherLabel:"Other",otherNoteTitle:"No matching team",otherNoteBody:"Tell us what you need in the message field below \u2014 we'll route it to whoever can help.",buttonText:"Send Message \u2192",consent:"By submitting, you agree to our privacy policy. We never share contact details with third parties.",channels:[{label:"Team one",value:"team-one@email.com",href:"mailto:team-one@email.com",sub:"Detail \xB7 Detail",groupId:"fitment"},{label:"Team two",value:"team-two@email.com",href:"mailto:team-two@email.com",sub:"Detail \xB7 Detail",groupId:"trade"},{label:"Team three",value:"team-three@email.com",href:"mailto:team-three@email.com",sub:"Detail \xB7 Detail",groupId:"press"},{label:"Team four",value:"team-four@email.com",href:"mailto:team-four@email.com",sub:"Detail \xB7 Detail",groupId:"order"},{label:"Phone",value:"+1 (000) 000-0000",href:"tel:+10000000000",sub:"Mon\u2013Fri \xB7 9:00\u201318:00"}]};var nt="siteOffices",on=e=>typeof e=="string"?e:"",jp=e=>O(e)??0;function mT(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t=e;return{role:on(t.role),city:on(t.city),country:on(t.country),address:on(t.address),phone:on(t.phone),group:on(t.group),hq:t.hq===!0,lat:jp(t.lat),lng:jp(t.lng)}}function KF(e){let t=e&&typeof e=="object"?e[nt]:void 0;return Array.isArray(t)?t.map(mT).filter(n=>n!==null):[]}function jF(e){let{state:t,country:n}=e.country.includes(" \xB7 ")?Kp(e.country):{state:"",country:e.country.trim()};return{photo:"",group:e.group??"",groupName:"",name:e.city,state:t,country:n,timezone:"",address:e.address??"",phone:e.phone??"",hours:"",lat:e.lat,lng:e.lng,mapsUrl:""}}var Vp={key:yc,label:"Site offices",blocks:["Footprint","ContactLocations"]};var Yr="Footer",Yp=[ve,Yr,Ge],Bn=[wt,nt,Fn],gT=[Ge,Yr],Xr=e=>gT.includes(e?.type??"");function bT(e){let t=e?.props;if(!t||!Bn.some(o=>o in t))return e;let n={};for(let[o,a]of Object.entries(t))Bn.includes(o)||(n[o]=a);return{...e,props:n}}function yT(e,t){let n=Bn.filter(a=>t&&a in t);if(!n.length)return e;let o={...e.props??{}};for(let a of n)o[a]=t[a];return{...e,props:o}}function eB(e){return Array.isArray(e)?e.find(t=>Xr(t))?.props??null:null}function ST(e,t){if(!t)return e;let n=Bn.filter(a=>a in t&&(!e||JSON.stringify(e[a])!==JSON.stringify(t[a])));if(!n.length)return e;let o={...e??{}};for(let a of n)o[a]=t[a];return o}var ot=e=>{let t=e?.content;return Array.isArray(t)?t:[]},at=e=>{let t=e?.zones;return t&&typeof t=="object"&&!Array.isArray(t)?t:null},an=e=>{let t=e?.props?.id;return typeof t=="string"?t:void 0},Xp=e=>Mr(e)?.ownerId??"";function qp(e){let t=na(ot(e)),n=t.some(o=>o?.type===Ge);return t.filter(o=>o?.type===ve||o?.type===Ge||o?.type===Yr&&!n)}function ra(e,t){let n=new Set,o=a=>{if(Array.isArray(a)){for(let s of a)o(s);return}if(!(!a||typeof a!="object")){if(hT(a)){let s=an(a);s&&n.add(s)}for(let s of Object.values(a))o(s)}};if(o(e),t){let a=!0,s=new Set;for(;a;){a=!1;for(let[r,i]of Object.entries(t))s.has(r)||!n.has(Xp(r))||(s.add(r),o(i),a=!0)}}return n}function Zp(e,t){let n=ot(e).filter(o=>{let a=an(o);return typeof o?.type=="string"&&Yp.includes(o.type)||a!==void 0&&t(a)});return n.length?ra(n,at(e)):new Set}function Vr(e,t){let n={},o={};for(let[a,s]of Object.entries(e??{}))(t.has(Xp(a))?n:o)[a]=s;return{owned:n,rest:o}}function Jp(e){let t=e?.root,n=t&&typeof t=="object"?t.props:void 0;return n&&typeof n=="object"&&!Array.isArray(n)?n:null}function tB(e,t){if(!t)return e;let n=qp(t);if(!n.length)return e;let o=n.filter(l=>l.type===ve),a=Jp(t),s=n.filter(l=>l.type!==ve).map(l=>Xr(l)?yT(l,a):l),r={...e,content:[...o,...ot(e),...s]},{owned:i}=Vr(at(t),ra(n,at(t)));return Object.keys(i).length&&(r.zones={...at(e)??{},...i}),r}function nB(e,t){if(!t)return{page:e,chrome:null};let n=qp(t),o=new Set(n.map(an).filter(v=>!!v)),a=[],s=[],r=null;for(let v of ot(e)){let w=an(v),I=w&&o.has(w)||ta(v?.type);if(I&&Xr(v)&&!r){r={};for(let D of Bn)v.props&&D in v.props&&(r[D]=v.props[D])}let C=bT(v);I?s.push(C):a.push(C)}let i=new Map(s.map(v=>[an(v),v])),l=new Set,u=na(ot(t)).flatMap(v=>{let w=an(v);if(!w||!o.has(w))return[v];let I=i.get(w);return I?(l.add(I),[I]):[]});for(let v of s)l.has(v)||u.some(w=>w?.type===v.type)||(u=v.type===ve?[v,...u]:[...u,v]);u=na(u);let d=u.length===ot(t).length&&u.every((v,w)=>v===ot(t)[w]||JSON.stringify(v)===JSON.stringify(ot(t)[w])),p=at(e),f=ra(u,p),{owned:m,rest:b}=Vr(p,f),y=Vr(at(t),ra(n,at(t))).owned,E={...t,content:d?t.content:[...u]},S=_T(t,r);S!==t.root&&(E.root=S);let T=at(t);if(T||Object.keys(m).length){let v={};for(let[w,I]of Object.entries(T??{}))w in y?w in m&&(v[w]=m[w]):v[w]=I;for(let[w,I]of Object.entries(m))w in v||(v[w]=I);E.zones=v,T&&ET(E.zones,T)&&(E.zones=T)}let x={...e,content:a};return p&&(Object.keys(b).length||!Object.keys(y).length?x.zones=b:delete x.zones),{page:x,chrome:E}}function _T(e,t){let n=Jp(e),o=ST(n,t);return o===n?e.root:{...e.root&&typeof e.root=="object"?e.root:{},props:o}}function ET(e,t){let n=Object.keys(e),o=Object.keys(t);return n.length===o.length&&n.every((a,s)=>a===o[s]&&e[a]===t[a])}function oB(e,t){return n=>e(n)||n!==void 0&&Yp.includes(n)&&t()}var Qp=null;function sB(e){Qp=e}function ef(){return Qp}var tf=null;function rB(e){tf=e}function iB(){return tf}var qr=Ip();function nf(e,t,n){if(!t)return;let o={...qr.get(e)};for(let[a,s]of Object.entries(t))o[a]={...s,noted:n};qr.set(e,o)}function fB(e,t){nf(e,t,"load")}function mB(e,t){nf(e,t,"save")}function of(e){return qr.use(e)}var Zr=e=>!!ef()?.sectionOf(e);function af(e,t=Zr){return Zp(e,t)}function sf(e,t,n,o=Zr){if(n)return e&&af(t,o).has(e)?void 0:n}function hB(e,t,n=Zr){if(!e)return{};let o=[...af(t,n)];return o.length?{[ea]:e,[Br]:o}:{[ea]:e}}import{ScreenDocumentContext as KO}from"efficient-easel/screen/components/ScreenDocumentContext";import{readHidable as jO,hidableText as VO}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as dg,LINK_FIELD_MARKER as YO,MEDIA_FIELD_MARKER as XO,SCAFFOLD_FIELD_MARKER as qO,TEXT_FIELD_MARKER as je,foldMetaOf as pg,textFieldIdentifier as BW}from"efficient-easel/draw";import{jsx as ff}from"react/jsx-runtime";import{useCallback as CT}from"react";import{useEasel as OT}from"efficient-easel/easel";import{SettingsAction as PT}from"efficient-easel/panel";import{isLengthUnit as vT}from"efficient-easel/screen/lib/content/length-units";import{CORNER_SIDES as ia,hasCornerSubset as Hn,normalizeCornerSides as De}from"efficient-easel/screen/lib/content/style-keys";import{isLengthUnit as TT}from"efficient-easel/screen/lib/content/length-units";var Jr={kind:"radius",unitKey:"sectionCornersUnit"};function Qr(e){return typeof e=="number"&&Number.isFinite(e)}function _B(e,t,n){if(!Qr(e))return;let o=TT(n)&&n!=="px"?Vt(e,n):Vt(Ae(e));if(Object.keys(o).length===0)return;let a=o[ei];if(typeof a!="string")return o;let s=Hn(t)?Ct(a,De(t)??[]):a;return{...o,[xT]:s}}var xT="--sf-section-radius",ei="--sf-card-radius";function Ct(e,t){return ia.map(n=>t.includes(n)?e:"0").join(" ")}var rf=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];var Mn={kind:"radius",unitKey:"cardCornersUnit"},wT="--sf-card-box-radius";function ti(e){return typeof e=="number"&&Number.isFinite(e)}function wB(e,t,n){if(!ti(e))return;let o=(vT(n)&&n!=="px"?Vt(e,n):Vt(Ae(e)))[ei];if(typeof o!="string")return;let a=Hn(t)?Ct(o,De(t)??[]):o;return{[wT]:a}}function lf(e,t){let n=e.find(r=>r?.props?.id===t);if(!n)return[...e];let o=n.props?.cardCorners,a=n.props?.cardCornerSides,s=n.props?.[Mn.unitKey];return e.map(r=>r?.props?.id===t?r:{...r,props:{...r.props,cardCorners:o,cardCornerSides:a,[Mn.unitKey]:s}})}function cf(e,t,n){let o=oa(e,t,n),a=o?.slot??"",s=o&&Array.isArray(o.item.props[a])?o.item.props[a]:[],r=n?.index??-1,i=r>=0?s[r]:void 0,l=i?.props?.id?String(i.props.id):"",u=Math.max(s.length-1,0);return!o||!l?{can:!1,reason:"unreachable",others:0}:s.length<=1?{can:!1,reason:"alone",others:u}:ti(i?.props?.cardCorners)?{can:!0,others:u,zone:o.zone,index:o.index,data:{...o.item,props:{...o.item.props,[a]:lf(s,l)}}}:{can:!1,reason:"unset",others:u}}function uf(e){return e.can?xn("Gives the other card this card's Corners.","Gives the other {n} cards this card's Corners.",e.others):e.reason==="alone"?c("This is the only card in the section."):e.reason==="unset"?c("Set this card's corners first."):c("This card is not in a section that can share corners.")}function df(e){return xn("Applied to {n} card","Applied to {n} cards",e)}function pf(e,t){e.can&&t(e.zone,e.index,e.data)}import{useSectionOps as kT}from"efficient-easel/screen/lib/document/use-section-ops";var AT="apply-corners-to-siblings",RT="Apply to all cards";function IT({plan:e,onPress:t}){return ff(PT,{id:AT,label:c(RT),note:uf(e),disabled:!e.can,doneLabel:df(e.others),onPress:t})}function mf(){let{appState:e,config:t}=OT(s=>s),n=kT(),o=cf(t,e.data.content??[],e.ui.itemSelector),a=CT(()=>{pf(o,n.replaceComponent)},[o,n]);return ff(IT,{plan:o,onPress:a})}import{isShown as xf,lazyShowWhenContext as VT}from"efficient-shell/format";var st="product",la="recordType",hf={key:st,label:"Product",fields:[]},NT=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,LT=/^[a-z][A-Za-z0-9]*$/,DT=["text","date","images"],ni=new Map,gf=0;function FT(e){if(typeof e.key!="string"||!NT.test(e.key))throw new Error(`A record type key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(e.key===st)throw new Error("The product record type is the builder's own and is not declared by a host.");if(typeof e.label!="string"||!e.label.trim())throw new Error(`The record type ${e.key} has no label.`);let t=new Set;for(let n of e.fields){if(typeof n.key!="string"||!LT.test(n.key)||t.has(n.key))throw new Error(`The record type ${e.key} has a field key it cannot use: ${JSON.stringify(n.key)}.`);if(!DT.includes(n.kind))throw new Error(`The field ${n.key} of ${e.key} has no kind ${JSON.stringify(n.kind)}.`);t.add(n.key)}return{key:e.key,label:e.label.trim(),fields:e.fields.map(n=>({...n}))}}function MB(e){let t=e.map(FT);for(let n of t)ni.set(n.key,n);t.length&&(gf+=1)}function oi(){return[hf,...ni.values()]}function BT(e){return e===st?hf:ni.get(e)??null}function ai(){return gf}function Un(e){let t=e?.[la];return typeof t!="string"?st:t.trim()||st}function si(e){return Un(e)===st}function UB(e,t){let n=BT(e)?.fields??[];return t?n.filter(o=>t.includes(o.kind)):n}var ca="product",bf="tyre",HT=[ca,bf];function zB(e){return HT.includes(e)}var MT="productType",UT={[ca]:"alloy-wheel",[bf]:"tyre"},$T=["alloy-wheel","tyre"];function yf(e,t){return si(t)?Sf(t)??UT[e]??null:null}function Sf(e){if(!si(e))return null;let t=e?.[MT];return typeof t=="string"&&$T.includes(t)?t:null}function WB(e){let t=e?.root;return Sf(t?.props)}var GT="Main Pages",zT="Dynamic Pages",WT="dynamic",KT="dynamic";function ri(e){return e.kind===KT}var ii="lightbox";function jB(e){return e.kind===ii}function VB(e){let t=[],n=[];for(let o of e){if(ri(o)){n.push(o);continue}let a=o.groupKey??(o.group?`folder:${o.group}`:"top"),s=t[t.length-1];s&&s.key===a?s.rows.push(o):t.push({key:a,label:o.group??GT,rows:[o]})}if(n.length){let o=t.findIndex(a=>a.key.startsWith("system:"));t.splice(o===-1?t.length:o,0,{key:WT,label:zT,rows:n})}return t}var ua=null,_f=null;function jT(e,t){ua=e,_f=t}function JB(e){jT(e,null)}function QB(){return ua}function $n(){return ri({kind:_f})||ua===ca}function eH(e){return yf(ua??"",e)??"alloy-wheel"}function Ef(e){return $n()?Un(e):null}function pH(e,t,n){let o=!1,a={};for(let[s,r]of Object.entries(e)){if(!xf(Rs(r),t??{},n)){o=!0;continue}let i=YT(r,t?.[s],t??{},n);i!==r&&(o=!0),a[s]=i}return o?a:e}function YT(e,t,n,o){let a=e?.options;if(!Array.isArray(a))return e;let s=a.filter(r=>r?.value===t||!r?.showWhen||xf(r.showWhen,n,o));return s.length===a.length?e:{...e,options:s}}function fH(e,t,n,o){let a=oa(t,n,o);return{device:e,parentType:a?.item.type,parent:a?.item.props}}function Tf(e,t){if(!e||typeof e!="object")return!1;let n=e;if(typeof n.context=="string"&&(n.context===t||n.context.startsWith(`${t}.`)))return!0;if("not"in n)return Tf(n.not,t);for(let o of[n.all,n.any])if(Array.isArray(o)&&o.some(a=>Tf(a,t)))return!0;return!1}function mH(e,t={}){return VT({parentType:()=>e.parent?.type??void 0,parent:()=>e.parent?.props??void 0,dynamicPage:()=>$n(),root:()=>e.appState?.data?.root?.props,...t})}import{isLengthUnit as XT}from"efficient-easel/screen/lib/content/length-units";var vf=1,qT="cardImageUnit",li={kind:"radius",unitKey:qT},wf={kind:"radius"};function ZT(e){return Ae(e)}function _H(e,t){if(XT(t)&&t!=="px"){let o=O(e);return o!==void 0&&o>=0?{"--sf-card-image-radius":M(o,t)}:{}}let n=ZT(e);return n===null?{}:{"--sf-card-image-radius":`${n}px`}}import{isLengthUnit as JT}from"efficient-easel/screen/lib/content/length-units";var Cf={kind:"radius",unitKey:"cornersUnit"},Of=1,Pf="Corners";function QT(e){return Ae(e)}function OH(e,t,n){let o=JT(n)&&n!=="px"?O(e):void 0,a=o===void 0?QT(e):null;if(o===void 0&&a===null)return null;let s=o!==void 0?M(Math.max(0,o),n):`${a}px`;return{borderRadius:Hn(t)?Ct(s,De(t)??[]):s}}import{phoneKey as Ff}from"efficient-easel/screen/lib/content/view-tiers";var Af=12,sn=6,ex=En,da={twoAcross:{label:"Two across",across:2,acrossPhone:2,desktop:[[6,1],[6,1]],phone:[[3,1],[3,1]]},zigzag:{label:"Zigzag",across:2,acrossPhone:2,desktop:[[8,1],[4,1],[4,1],[8,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},brick:{label:"Brick",across:2,acrossPhone:2,desktop:[[5,1],[7,1],[7,1],[5,1]],phone:[[2,1],[4,1],[4,1],[2,1]]},twoTall:{label:"Two tall",across:2,acrossPhone:2,desktop:[[6,2],[6,2]],phone:[[3,2],[3,2]]},offsetTall:{label:"Offset tall",across:2,acrossPhone:2,desktop:[[5,2],[7,1],[3,1],[4,1]],phone:[[3,2],[3,1],[3,1]]},ladder:{label:"Ladder",across:2,acrossPhone:2,desktop:[[3,2],[9,1],[5,1],[4,1]],phone:[[2,2],[4,1],[2,1],[2,1]]},threeAcross:{label:"Three across",across:3,acrossPhone:3,desktop:[[4,1],[4,1],[4,1]],phone:[[2,1],[2,1],[2,1]]},bigLeft:{label:"Big left",across:3,acrossPhone:3,desktop:[[6,1],[3,1],[3,1]],phone:[[4,1],[1,1],[1,1]]},bigRight:{label:"Big right",across:3,acrossPhone:3,desktop:[[3,1],[3,1],[6,1]],phone:[[1,1],[1,1],[4,1]]},threeStagger:{label:"Three stagger",across:3,acrossPhone:3,desktop:[[5,1],[4,1],[3,1],[3,1],[4,1],[5,1]],phone:[[3,1],[2,1],[1,1],[1,1],[2,1],[3,1]]},threeLadder:{label:"Three ladder",across:3,acrossPhone:3,desktop:[[3,1],[4,1],[5,1],[5,1],[4,1],[3,1]],phone:[[1,1],[2,1],[3,1],[3,1],[2,1],[1,1]]},tallMiddle:{label:"Tall middle",across:3,acrossPhone:3,desktop:[[4,1],[4,2],[4,1],[4,1],[4,1]],phone:[[2,1],[2,2],[2,1],[2,1],[2,1]]},fourAcross:{label:"Four across",across:4,acrossPhone:2,desktop:[[3,1],[3,1],[3,1],[3,1]],phone:[[3,1],[3,1]]},bigFirst:{label:"Big first",across:4,acrossPhone:2,desktop:[[6,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},fourStagger:{label:"Four stagger",across:4,acrossPhone:2,desktop:[[4,1],[3,1],[2,1],[3,1],[2,1],[3,1],[4,1],[3,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},tallFirst:{label:"Tall first",across:4,acrossPhone:2,desktop:[[3,2],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[3,2],[3,1],[3,1]]},oneThenFour:{label:"One then four",across:4,acrossPhone:2,desktop:[[12,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},sixAcross:{label:"Six across",across:6,acrossPhone:3,desktop:[[2,1],[2,1],[2,1],[2,1],[2,1],[2,1]],phone:[[2,1],[2,1],[2,1]]},sixStagger:{label:"Six stagger",across:6,acrossPhone:6,desktop:[[3,1],[2,1],[1,1],[2,1],[1,1],[3,1],[1,1],[3,1],[2,1],[2,1],[1,1],[3,1]],phone:[[1,1],[1,1],[1,1],[1,1],[1,1],[1,1]]},twoThenThrees:{label:"Two, then threes",across:3,acrossPhone:3,lead:[[6,1],[6,1]],desktop:[[4,1],[4,1],[4,1]],leadPhone:[[3,1],[3,1]],phone:[[2,1],[2,1],[2,1]]},twoThenThreesPhoto:{label:"Two, then threes \xB7 photo",across:3,acrossPhone:1,lead:[[6,1],[6,1]],desktop:[[4,1],[4,1],[4,1]],phone:[[6,1]],ratio:"landscape"}},Rf=["phone","acrossPhone","leadPhone"];var tx=new Set(Rf),Gn=Object.fromEntries(Object.entries(da).map(([e,t])=>[e,Object.fromEntries(Object.entries(t).filter(([n])=>!tx.has(n)))])),ci=Object.keys(da),If=[2,3,4,6];function ui(e,t){return ci.filter(n=>n===t||e===null||Gn[n].across===e)}function Nf(e){let t=e.layout;return typeof t=="string"&&ge(da,t)?t:null}function di(e){let t=Nf(e);return t?nx(t,e.layoutPhone):null}var pa={oneAcross:{label:"One across",phone:[[sn,2]],acrossPhone:1}};function Lf(e){return typeof e=="string"&&ge(pa,e)?e:null}function kf(e,t){return t?sn/e.acrossPhone:Af/e.across}function pi(e){return e.ratio?_u.find(t=>t.shape===e.ratio)?.ratio??null:null}function Df(e){return[...e.lead??[],...e.desktop]}function nx(e,t){let n=da[e],o=Lf(t);if(!o)return n;let{phone:a,acrossPhone:s}=pa[o],r=Object.fromEntries(Rf.map(i=>[i,void 0]));return{...n,...r,phone:a,acrossPhone:s}}var ox="sf-wall--";function ax(e){let t=Nf(e);if(!t)return"";let n=Lf(e.layoutPhone);return`${ox}${t}${n?`--${n}`:""}`}function IH(e){let t=di(e);if(!t)return"";let n=`.${ax(e)}`,o=[],a=(i,l,u)=>`${n}:has(> :nth-child(${i}n+${l+u}):last-child) > :nth-last-child(-n+${u})`,s=(i,l,u=[])=>{let d=[],p=i.length,f=u.length;u.forEach(([m,b],y)=>{d.push(`${n} > :nth-child(${y+1}){grid-column:span ${m};grid-row:span ${b}}`)}),i.forEach(([m,b],y)=>{d.push(`${n} > :nth-child(${p}n+${f+y+1}){grid-column:span ${m};grid-row:span ${b}}`)});for(let m=1;m<p;m+=1)d.push(`${a(p,f,m)}{grid-column:span ${l};grid-row:span 1}`);return d};o.push(`${n}{grid-template-columns:repeat(${Af},minmax(0,1fr))}`);let r=pi(t);if(r&&(o.push(`${n}${n}{grid-auto-rows:auto}`),o.push(`${n}${n} > *{aspect-ratio:${r[0]}/${r[1]};height:auto}`)),o.push(...s(t.desktop,kf(t,!1),t.lead)),o.push(`@media (max-width:${ex}px){`),o.push(`${n}{grid-template-columns:repeat(${sn},minmax(0,1fr))}`),o.push(...s(t.phone,kf(t,!0),t.leadPhone)),t.phone.length===1&&!t.leadPhone?.length){let[i,l]=t.phone[0],u=t.lead?.length??0;for(let d=1;d<t.desktop.length;d+=1)o.push(`${a(t.desktop.length,u,d)}{grid-column:span ${i};grid-row:span ${l}}`)}return o.push("}"),o.join("")}var fa=12,Bf=1,ma=3;var sx=3;function rn(e,t,n){let o=typeof e=="number"?e:Number.parseInt(String(e??""),10);return Number.isFinite(o)?Math.min(n,Math.max(t,Math.trunc(o))):null}function rx(e){return rn(e,1,fa)??sx}function FH(e,t){return rn(e,Bf,ma)??(rx(t)===4?2:Bf)}function BH(e){return e==null||e===""?null:rn(e,1,fa)}var HH="data-sf-span",ha=4;function ix(e){return e==null||e===""?null:rn(e,1,ha)}var MH="data-sf-row-span",fi="gridTileAt",mi=48;function UH(e){return e==null||e===""?null:rn(e,1,mi)}var $H="--sf-tile-at";function GH(e){return e==null||e===""?null:rn(e,1,ma)}function zH(e){return ix(e)}var WH="data-sf-span-phone",KH="data-sf-row-span-phone",jH=["gridSpan","gridRowSpan",fi,Ff("gridSpan"),Ff("gridRowSpan")];function VH(e,t){if(!e)return!1;if(lx(e,t)||e.type==="Grid")return!0;if(e.type==="GalleryB"){if(di(e.props??{}))return!1;let n=e.props?.columns;return n!=null&&n!==""}return!1}var Hf=new Map;function YH(e,t){Hf.set(e,[...t])}function lx(e,t){if(!e||typeof e.type!="string"||typeof t!="string")return!1;let n=Hf.get(e.type);return n?n.some(o=>{let a=e.props?.[o];return Array.isArray(a)&&a.some(s=>s?.props?.id===t)}):!1}import{jsx as cx}from"react/jsx-runtime";import*as ux from"efficient-easel/icons";function Mf(e){let t=e.replace(/(^|-)([a-z])/g,(o,a,s)=>s.toUpperCase()),n=ux[`${t}Icon`];return n?cx(n,{size:16}):null}import{jsx as rt,Fragment as fx,jsxs as Yf}from"react/jsx-runtime";import{useContext as mx,useEffect as hx,useId as gx,useState as Xf}from"react";import{SettingsField as bx,SettingsSwitch as yx}from"efficient-easel/panel";import{AnchorIcon as Sx}from"efficient-easel/icons";import{ScreenDocumentContext as _x}from"efficient-easel/screen/components/ScreenDocumentContext";import{Snippet as Ex}from"efficient-shell/ui";import{slugify as Tx}from"efficient-shell/format";import{slugify as dx}from"efficient-shell/format";function hi(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}var QH=e=>dx(hi(e));var Uf="homepage";import{slugify as px}from"efficient-shell/format";var $f=[{value:"page",label:"Page"},{value:"anchor",label:"Anchor"},{value:"blog",label:"Blog post",needs:"service"},{value:"product",label:"Product",needs:"commerce"},{value:"popup",label:"Popup"},{value:"custom",label:"Custom URL"}];function Gf(e){return e.offersCommerce&&e.offersService?$f:$f.filter(t=>!t.needs||(t.needs==="commerce"?e.offersCommerce:e.offersService))}var gi="#popup:";function zf(e){return`${gi}${e}`}function Wf(e){return e.startsWith(gi)&&e.slice(gi.length).trim()||null}function zn(e){return e===Uf?"/":`/${e}`}function Kf(e){return`/journal/${e}`}function sM(e){return`/wheels/${e}`}function ga(e,t){return`${zn(e)}#${t}`}function jf(...e){let t=new Set,n=[];for(let o of e)for(let a of o?.content??[]){let s=hi(a?.props?.anchor);if(!s)continue;let r=px(s);!r||t.has(r)||(t.add(r),n.push({slug:r,name:s}))}return n}function rM(e){let t=e.indexOf("#"),n=t===-1?e:e.slice(0,t),o=n.indexOf("?");return o===-1?n:n.slice(0,o)}function Vf(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}import{readHidable as xx}from"efficient-easel/draw";function qf({value:e,onChange:t,nameBox:n}){let o=xx(e).text,[a,s]=Xf(!1),r=a||o.trim()!=="",i=gx();return Yf(fx,{children:[rt(bx,{label:c("Add an anchor"),labelId:i,icon:rt(Sx,{}),action:rt(yx,{checked:r,ariaLabelledBy:i,onChange:l=>{s(l),!l&&o!==""&&t("")}})}),r&&n(e,t),r&&rt(vx,{name:o})]})}function vx({name:e}){let t=mx(_x),n=t?.templateId?"":t?.currentSlug??"",[o,a]=Xf("");hx(()=>a(Nu()),[]);let s=Tx(e);if(!s||!n)return null;let r=`${o}${ga(n,s)}`,i=r.replace(/^https?:\/\//,""),l=i.lastIndexOf("#");return rt("div",{className:"sf-anchor-link",children:rt(Ex,{value:r,label:c("link"),size:"sm",children:Yf("span",{className:"sf-anchor-link-text",children:[rt("span",{className:"sf-anchor-link-path",children:i.slice(0,l)}),rt("span",{className:"sf-anchor-link-hash",children:i.slice(l)})]})})})}import{jsx as Fe,jsxs as wx}from"react/jsx-runtime";import{Fragment as Cx}from"react";import{Button as ba,Tooltip as Ox}from"efficient-shell/ui";function ya({status:e,statusText:t,onRefresh:n,busy:o=!1,edit:a,hint:s,spaced:r=!0,compact:i=!1,oneLine:l=!1}){return i?Fe("div",{className:`sf-blogsource sf-blogsource--compact${l?" sf-blogsource--line":""}`,style:r?{marginTop:8}:void 0,children:Fe(Ox,{content:s,className:l?"sf-name-tip":void 0,children:Fe("p",{className:"sf-blogsource-status","data-state":e,children:[t?Fe(Cx,{children:t},"status"):null,n?Fe(ba,{variant:"link",size:"sm",className:"sf-blogsource-link",onClick:n,disabled:o,children:c("Refresh now")},"refresh"):null,a?Fe(ba,{variant:"link",size:"sm",className:"sf-blogsource-link",onClick:a.onClick,children:a.label},"edit"):null].filter(Boolean).flatMap((u,d)=>d?[" \xB7 ",u]:[u])})})}):wx("div",{className:"sf-blogsource",style:r?{marginTop:9}:void 0,children:[Fe("p",{className:"sf-blogsource-status","data-state":e,children:t}),n?Fe(ba,{variant:"secondary",className:"sf-blogsource-action",onClick:n,disabled:o,children:c("Refresh now")}):null,a?Fe(ba,{variant:"secondary",className:"sf-blogsource-action",onClick:a.onClick,children:a.label}):null,Fe("p",{className:"es-field-hint",children:s})]})}import{AdjustIcon as ZO,EyeIcon as JO,AnimationIcon as QO,BackgroundIcon as Jh,BorderAllIcon as eP,BlockSectionIcon as tP,ColumnWidthsIcon as ts,ColumnsIcon as fg,CornerIcon as mg,DirectionDownIcon as nP,DirectionLeftIcon as oP,DirectionRightIcon as aP,DirectionUpIcon as hg,EditIcon as sP,GapIcon as rP,GridIcon as gg,GroundIcon as kl,HashIcon as bg,HeightIcon as ns,ImageIcon as iP,ListIcon as lP,LocationIcon as Qh,PaddingBottomIcon as yg,PaddingLeftIcon as Sg,PaddingRightIcon as _g,PaddingTopIcon as Nl,PageIcon as cP,PhoneIcon as uP,StickyIcon as Eg,SearchIcon as dP,SquareIcon as pP,TypeIcon as fP,WidthIcon as mP}from"efficient-easel/icons";import{jsx as $,Fragment as Ot,jsxs as Pt}from"react/jsx-runtime";import{CaptionIcon as Px,DateIcon as kx,FlagIcon as Ax,TitleIcon as Rx,ButtonIcon as Ix,DollarIcon as Nx,HashIcon as Lx,LinkIcon as Dx,NoteIcon as Fx,TagIcon as Bx,TextLinesIcon as Hx}from"efficient-easel/icons";var Zf={body:Hx,button:Ix,link:Dx,label:Bx,number:Lx,price:Nx,note:Fx,name:Ax,date:kx,caption:Px,title:Rx},Jf={eyebrow:Pt(Ot,{children:[$("path",{d:"M5 6.5h5"}),$("path",{d:"M5 12.5h14"}),$("path",{d:"M5 18h11"})]}),heading:Pt(Ot,{children:[$("path",{d:"M6.5 5v14"}),$("path",{d:"M17.5 5v14"}),$("path",{d:"M6.5 12h11"})]}),intro:Pt(Ot,{children:[$("path",{d:"M4 5.5v13"}),$("path",{d:"M8 7.5h12"}),$("path",{d:"M8 12h12"}),$("path",{d:"M8 16.5h8"})]}),value:Pt(Ot,{children:[$("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),$("path",{d:"M6.5 12h7"})]}),quote:Pt(Ot,{children:[$("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),$("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:Pt(Ot,{children:[$("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),$("path",{d:"M8 9.5h8"}),$("path",{d:"M12 9.5v5"})]}),meta:Pt(Ot,{children:[$("path",{d:"M4 7h16"}),$("path",{d:"M4 14h3.5"}),$("path",{d:"M10.5 14h3"}),$("path",{d:"M17 14h3"})]})};function bi({noun:e,size:t=14,strokeWidth:n=1.8,className:o,style:a}){let s=Zf[e];return s?$("span",{className:o,style:{display:"inline-flex",...a},"aria-hidden":"true",children:$(s,{size:t})}):$("svg",{className:o,style:a,width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:Jf[e]})}var OM=Object.keys(Zf);var PM=Object.keys(Jf);import{parseHexColor as Mx}from"efficient-shell/format";var Ux="#ffffff";function yi(e){return Qf(e)||($x(e)?e:Ux)}function Qf(e){let t=Re(e);return t?Ze(t)?.page??"":""}function $x(e){return typeof e=="string"&&Mx(e)===e.toLowerCase()||Qf(e)!==""}function NM(e){return{"--bg":yi(e)}}import{parseHexColor as Gx}from"efficient-shell/format";import{fillColorRole as zx}from"efficient-shell/markup";function kt(e,t,n,o){let a=o??n??t,s=n!==null&&n!==t,r=a!==null&&a!==t;return{className:[s?e.tabletClass:"",r?e.phoneClass:""].filter(Boolean).join(" "),style:{...s?{[e.tabletVar]:n}:{},...r?{[e.phoneVar]:a}:{}}}}var Si=[{label:"Even",value:"even"},{label:"From the bottom",value:"bottom"}];var jM="sf-card",VM="[--sf-card-lift:none] [--sf-card-shadow-hover:var(--sf-card-shadow,none)]",em={min:0,max:100,step:5,fallback:0,unit:"%"},Wx="68%",XM={desktop:20,phone:20,side:40,sidePhone:24},qM="sf-box-sides";function Kx(e){return typeof e=="string"&&e.trim()!==""}function ZM(e){return Kx(typeof e?.bgImage=="string"?e.bgImage:null)||nm(e)}function nm(e){return To(e,yo)!==""}function JM(e,t){return t||!nm(e)?e:{...e,[yo]:""}}function QM(e,t){return Ds(t,To(e,yo))?.trim()||null}function tm(e,t){let n=typeof e=="number"?e:Number.parseFloat(String(e??""));if(!Number.isFinite(n)||n<=0)return null;let o=(Math.min(em.max,Math.max(em.min,n))/100).toFixed(2);return t!=="bottom"?{background:xo(Number(o))}:{background:`linear-gradient(0deg, ${xo(Number(o))} 0%, ${xo(0)} ${Wx})`}}var Sa=[{label:"Flat",value:"",hint:"One colour from top to bottom"},{label:"Fade",value:"down",hint:"The colour fades into the page colour at the bottom"}],om="fillFade",_i=Sa[1].value,_a=e=>e===_i?_i:Sa[0].value,jx=[{mix:"12%",at:"50%"},{mix:"19%",at:"70%"},{mix:"50%",at:"95%"}];function eU(e){return _a(e)!==_i?null:{backgroundImage:`linear-gradient(to bottom, transparent, ${jx.map(t=>`color-mix(in srgb, var(--bg) ${t.mix}, transparent) ${t.at}`).join(", ")})`}}var Ea=e=>typeof e=="string"?Gx(e.trim()):null,Wn=e=>{let t=Ea(e);if(t!==null||typeof e!="string")return t;let n=e.trim();return n&&!n.startsWith("#")&&Vu(n)||null},Ta=e=>{if(typeof e!="string")return null;let t=zx(Ue(e.trim()));return t?.kind==="slot"?t.slot:null},Ei="swatch";function tU(e,t){if(!t)return null;let n=Ds(t,To(e,Ei)),o=Re(n);return Ea(n)??(o&&Me(o)||null)}var Vx={tabletClass:"sf-fill-tablet",tabletVar:"--sf-fill-tablet",phoneClass:"sf-fill-phone",phoneVar:"--sf-fill-phone"};function nU(e,t,n){return kt(Vx,Wn(e),Wn(t),Wn(n))}var Yx={tabletClass:"sf-wash-tablet",tabletVar:"--sf-wash-tablet",phoneClass:"sf-wash-phone",phoneVar:"--sf-wash-phone"};function oU(e){let t=tm(e.darken,e.darkenStyle);if(!t)return{className:"",style:{}};let n=(p,f)=>String(tm(p,f)?.background??"none"),o=p=>(typeof p=="number"||typeof p=="string"&&p.trim()!=="")&&Number.isFinite(Number(p))?p:void 0,a=p=>Si.some(f=>f.value===p)?p:void 0,[s,r,i,l]=[o(e.darkenTablet),a(e.darkenStyleTablet),o(e.darkenPhone),a(e.darkenStylePhone)],u=s??e.darken,d=r??e.darkenStyle;return kt(Yx,String(t.background),s!==void 0||r!==void 0?n(u,d):null,i!==void 0||l!==void 0?n(i??u,l??d):null)}function aU(e,t){let n={"top-left":["start","start"],"top-center":["center","start"],"top-right":["end","start"],left:["start","center"],center:["center","center"],right:["end","center"],"bottom-left":["start","end"],"bottom-center":["center","end"],"bottom-right":["end","end"]},[o,a]=n[e]??n.center,[s,r]=t==="column"?[a,o]:[o,a];return Lc(s,r)}function am(e,t){let n=e?.content;if(!Array.isArray(n))return null;for(let o of n){if(!o||typeof o!="object")continue;let{type:a,props:s}=o;if(s?.id===t)return null;if(Ti(o,t,0))return{type:typeof a=="string"?a:"",props:s??{}}}return null}function Ti(e,t,n){if(n>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(a=>Ti(a,t,n+1));let o=e.props;return o&&typeof o=="object"&&o.id===t?!0:Object.values(e).some(a=>Ti(a,t,n+1))}function sm(e,t){let n=e?.content;return Array.isArray(n)?xa(n,t,0)??[]:[]}function xa(e,t,n){if(n>12||!e||typeof e!="object")return null;if(Array.isArray(e)){for(let a of e){let s=xa(a,t,n+1);if(s)return s}return null}let o=e.props;if(o&&typeof o=="object"){if(o.id===t)return[];for(let a of Object.values(o)){let s=xa(a,t,n+1);if(s)return[o,...s]}return null}for(let a of Object.values(e)){let s=xa(a,t,n+1);if(s)return s}return null}import{SettingsDefaultReset as oe,SettingsDrill as hP,SettingsField as K,SettingsGroup as gP,SettingsSegmented as bP,SettingsBorder as yP,SettingsSidesEach as SP,SettingsSwitch as Ll,borderSides as _P,borderStartEach as EP}from"efficient-easel/panel";import{ListField as TP}from"efficient-easel/fields";import{CodeIcon as xP}from"efficient-shell/icons/efficient";import{DisplayChips as vP}from"efficient-shell/ui";import{HIDDEN_KEY as Xx,hiddenInEveryView as qx,hiddenInView as xi,hiddenKeyOf as rm}from"efficient-easel/screen/lib/content/view-hide";import{VIEW_TIERS as Zx}from"efficient-easel/screen/lib/content/view-tiers";var Jx={"000":"",100:"view-desktop:hidden","010":"view-wide:max-view-desktop:hidden","001":"max-view-wide:hidden",110:"view-wide:hidden","011":"max-view-desktop:hidden",101:"view-desktop:hidden max-view-wide:hidden",111:"hidden"},Qx={"000":"",100:"view-desktop:hidden","010":"view-tablet:max-view-desktop:hidden","001":"max-view-tablet:hidden",110:"view-tablet:hidden","011":"max-view-desktop:hidden",101:"view-desktop:hidden max-view-tablet:hidden",111:"hidden"},im=e=>(e.desktop?"1":"0")+(e.tablet?"1":"0")+(e.mobile?"1":"0");function lm(e,{atSectionLine:t=!1}={}){return(t?Qx:Jx)[im(e)]}var cU=[Xx,rm("tablet"),rm("mobile")];function cm(e){return{desktop:xi(e,"desktop"),tablet:xi(e,"tablet"),mobile:xi(e,"mobile")}}function uU(e){return qx(e)}function dU(e){let t=cm(e);return Zx.filter(n=>t[n]).join(" ")}var ev={"000":"",100:"view-desktop:hidden!","010":"view-wide:max-view-desktop:hidden!","001":"max-view-wide:hidden!",110:"view-wide:hidden!","011":"max-view-desktop:hidden!",101:"view-desktop:hidden! max-view-wide:hidden!",111:"hidden!"},tv={"000":"",100:"view-desktop:hidden!","010":"view-tablet:max-view-desktop:hidden!","001":"max-view-tablet:hidden!",110:"view-tablet:hidden!","011":"max-view-desktop:hidden!",101:"view-desktop:hidden! max-view-tablet:hidden!",111:"hidden!"};function pU(e,{atSectionLine:t=!1}={}){return(t?tv:ev)[im(cm(e))]}function ln(e){if(!e||typeof e!="object"||Array.isArray(e))return{};let t={};for(let[n,o]of Object.entries(e))typeof o=="boolean"&&(t[n]=o);return t}function va(e,t){return ln(e)[t]!==!1}function vi(e,t,n){let o=ln(t)[n];return typeof o=="boolean"?o:va(e,n)}function um(e){return Object.values(ln(e)).some(t=>t===!1)}function dm(e){return Object.keys(ln(e)).length>0}function pm(e,t,n){let o={...ln(e)};return n?delete o[t]:o[t]=!1,Object.keys(o).length?o:void 0}function fm(e,t,n){return{...ln(e),[t]:n}}function hU(e,t,n,{atSectionLine:o=!0}={}){let a=!va(e,n);return lm({desktop:a,tablet:a,mobile:!vi(e,t,n)},{atSectionLine:o})}import{ColorSwatch as wP,CornersInput as CP,DatePicker as l4,DateTimePicker as OP,FOCAL_DEFAULT as c4,IconPicker as Tg,COLUMN_COUNT_MAX as eg,COLUMN_SHARE_MIN as PP,COLUMN_SHARES_EQUAL as kP,resolveColumnShares as xg,WidthsBar as AP,useShellStrings as RP,IconButton as vg,InputNumber as tg,Slider as IP,Textarea as NP,Tooltip as Dl}from"efficient-shell/ui";async function mm(e){let t=e.trim();if(!t)return null;let n=xe().geocode;if(!n)throw new Error("geocode_unavailable");return n.locate(t)}var wi="Lookup busy \u2014 try again in a moment.",wa=e=>typeof e=="number"&&Number.isFinite(e);function Ca(e){return e.some(t=>{let n=t?.geocode;return n?n.pending||n.manual&&n.lat===void 0&&n.lng===void 0?!0:wa(n.lat)&&n.lat!==t.lat||wa(n.lng)&&n.lng!==t.lng:!1})}async function hm(e,t,{geocode:n=mm,courtesyGapMs:o=1100}={}){let a=r=>new Promise(i=>setTimeout(i,r)),s=e.slice();if(e.some(r=>r?.geocode?.pending)){let r=[],i=!1;for(let l of e){if(!l?.geocode?.pending){r.push(l);continue}i&&o>0&&await a(o),i=!0;try{let u=await n(t(l));r.push(u?{...l,lat:u.lat,lng:u.lng,geocode:{...l.geocode,pending:!1,ok:!0,status:`Found \u2014 ${u.label.split(",").slice(0,3).join(",").trim()}`,lat:u.lat,lng:u.lng}}:{...l,geocode:{...l.geocode,pending:!1,ok:!1,status:"No match \u2014 check the address and try again."}})}catch{r.push({...l,geocode:{...l.geocode,pending:!1,ok:!1,status:wi}})}}s=r}return s.map(r=>{let i=r?.geocode;if(!i)return r;if(i.manual&&i.lat===void 0&&i.lng===void 0)return{...r,geocode:{...i,lat:r.lat,lng:r.lng}};let l=wa(i.lat)&&i.lat!==r.lat?i.lat:r.lat,u=wa(i.lng)&&i.lng!==r.lng?i.lng:r.lng;return l!==r.lat||u!==r.lng?{...r,lat:l,lng:u}:r})}import{keptByRow as Al}from"efficient-easel/screen/lib/document/style-fields";import{jsx as nv}from"react/jsx-runtime";import{useEffect as ov,useState as av}from"react";import{clearRangeOf as sv,markSelection as rv,useCaretEdit as iv}from"efficient-easel/copy";import{TextToolbar as lv}from"efficient-shell/ui";function cv(e,t,n){return rv(e,t,n,kc)}function gm(e,t){let n=sv(t,e.length),o=Rc(e,n.start,n.end);return o.text===e?null:o}function uv(e){let[t,n]=av(null);return ov(()=>{let o=e.current?.ownerDocument??(typeof document>"u"?null:document);if(!o)return;let a=()=>{let s=e.current;if(!s||o.activeElement!==s)return;let r=s.selectionStart??s.value.length,i=s.selectionEnd??r;n(l=>l&&l.start===r&&l.end===i?l:{start:r,end:i})};return o.addEventListener("selectionchange",a),()=>o.removeEventListener("selectionchange",a)},[e]),[t,n]}function dv({target:e,value:t,onChange:n,disabled:o=!1,label:a="Formatting"}){let s=iv({target:e,onChange:n}),[r,i]=uv(e),l=f=>s(m=>{let b=cv(t,f,m);return i({start:b.selectionStart,end:b.selectionEnd}),b}),u=Pc(),d={};if(r)for(let f of u)d[f.style]=Ac(t,r.start,r.end,f.style);let p=o?null:gm(t,r);return nv(lv,{offered:new Set(u.map(f=>f.style)),onMark:f=>l(f),pressed:d,disabled:o,"aria-label":c(a),className:"sf-markup-bar",clear:p?{onClear:()=>s(()=>{let f=e.current,m=f&&f.ownerDocument.activeElement===f?{start:f.selectionStart??0,end:f.selectionEnd??0}:null,b=gm(t,m)??{text:t,selectionStart:m?.start??0,selectionEnd:m?.end??0};return i({start:b.selectionStart,end:b.selectionEnd}),b})}:void 0})}var Ci=dv;import{deviceField as te}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as LP,NoControlMark as DP,noControlField as wg}from"efficient-easel/screen/lib/document/panel-no-control-mark";function Oa(e,t,n){return typeof e=="number"?e:typeof t=="number"?t:n}var Pa=void 0;import{phoneKey as it,tabletKey as Fl,viewKeyAt as Bl}from"efficient-easel/draw";import{jsx as ka,Fragment as pv,jsxs as fv}from"react/jsx-runtime";import{useRef as mv}from"react";import{SettingsDefaultReset as hv}from"efficient-easel/panel";import{effectTiles as gv}from"efficient-easel/screen/lib/document/effect-tiles";import{VIEW_KEY_ACCESS as bm,describedAs as bv,onDesktopWords as yv,phoneTwinFields as ym}from"efficient-easel/screen/lib/document/box-fields";function Sv({row:e,read:t,...n}){let o=t(Z(),n.followsView??"desktop");return e({...n,follows:o})}function ze(e,t){return Object.fromEntries(Eu.map(n=>{let o=U(e,n);return[o,ym(e,t(n),bm)[o]]}))}function BU(e,t,n){let o=t.render,a={...t,render:s=>ka(Sv,{...s,row:o,read:n})};return ze(e,s=>s==="desktop"?t:a)}function _v({spec:e,...t}){let n=e.values.includes(t.value),o="follows"in t,a=e.read(Z(),t.followsView??"desktop"),s=n?t.value:a,r=mv(null),{preview:i}=e,l=gv({label:c(e.label),options:e.values.map(d=>({value:d,label:c(e.word(d)),picture:e.picture(d)})),fallback:e.fallback,onPreview:i?d=>r.current&&i(r.current,d):void 0}).render,u=l({value:s,onChange:d=>t.onChange(d??e.fallback)});return fv(pv,{children:[i?ka("div",{ref:r,style:{display:"contents"},children:u}):u,o&&n&&ka(hv,{words:P()?.panel,label:c(e.tileWord),changed:!0,detail:yv(d=>c(d),c(e.word(a)),t.followsView),onReset:()=>t.onChange(void 0)})]})}function HU(e,t){let n=bv({type:"custom",render:o=>ka(_v,{...o,spec:t})},{type:"select",label:t.label,options:t.values.map(o=>({value:o,label:t.word(o)}))});return ym(e,n,bm)}import{jsx as Oi,Fragment as Ev}from"react/jsx-runtime";import{createContext as Tv,useContext as xv}from"react";import{NoControlMark as vv}from"efficient-easel/screen/lib/document/panel-no-control-mark";var Sm=Tv(!1);function WU({children:e}){return Oi(Sm.Provider,{value:!0,children:e})}function wv(){return xv(Sm)}function _m({name:e,children:t}){return!wv()||!e||!Cv(e)||An(e)?Oi(Ev,{children:t}):Oi(vv,{})}function Cv(e){return/^[A-Za-z0-9_$]+$/u.test(e)}import{parseOption as Ov}from"efficient-shell/format";var Pi="off",Tm="none",ki=[{label:"None",value:"off"},{label:"1, 2, 3",value:"plain"},{label:"01, 02, 03",value:"padded"},{label:"N\xB001, N\xB002",value:"numero"}],xm=[{label:"None",value:"none"},{label:"Hairline",value:"hairline"}];function VU(e){return Ov(ki,Pi,e)}var Em="sf-card-index",Kn="sf-card-index",YU="pointer-events-none absolute left-[18px] top-[18px] z-10 border border-line bg-bg/70 px-2 py-1 font-mono text-[length:var(--size-label,10px)] uppercase tracking-[0.16em] text-fg-dim",Pv={plain:`counter(${Kn})`,padded:`counter(${Kn}, decimal-leading-zero)`,numero:`"N\xB0" counter(${Kn}, decimal-leading-zero)`};function XU(e,t){return t==="off"?"":`.${e}{counter-reset:${Kn}}.${e} .${Em}{counter-increment:${Kn}}.${e} .${Em}::before{content:${Pv[t]}}`}function qU(e){return e==="hairline"?"border border-line hover:border-accent":""}var vm=[{value:"1",label:"1st rendering"},{value:"2",label:"2nd rendering"},{value:"3",label:"3rd rendering"},{value:"4",label:"4th rendering"},{value:"5",label:"5th rendering"}];import{SCALAR_TEXT_CONTROLS as FP}from"efficient-easel/draw";import{jsx as ue}from"react/jsx-runtime";import{SettingsDefaultReset as Fv,SettingsField as Ai}from"efficient-easel/panel";import{useSelectedHost as Bv}from"efficient-easel/easel";import{FOCAL_DEFAULT as Hv}from"efficient-shell/format";import{ImageIcon as Ri,PlayIcon as wm}from"efficient-easel/icons";import{ImageFocusPoint as Mv,MediaUploadField as Uv}from"efficient-shell/ui";import{useContext as $v}from"react";import{ScreenDocumentContext as Gv}from"efficient-easel/screen/components/ScreenDocumentContext";import{tabletKey as zv,viewKeyAt as Wv}from"efficient-easel/draw";import{usePreviewDevice as Kv}from"efficient-easel/draw/client";import{formatFocal as kv,parseFocal as Av}from"efficient-shell/format";var Rv="sf-focus-phone",Iv="--sf-focus-phone",Nv="sf-focus-tablet",Lv="--sf-focus-tablet",jn=e=>{if(typeof e!="string"||!/^\s*-?\d+(\.\d+)?%\s+-?\d+(\.\d+)?%\s*$/.test(e))return null;let{x:t,y:n}=Av(e);return kv(t,n)};function t$(e,t){return kt(Dv,null,jn(t),jn(e))}var Dv={tabletClass:Nv,tabletVar:Lv,phoneClass:Rv,phoneVar:Iv};import{shownTier as Ii}from"efficient-easel/screen/lib/document/device-fields";import{onDesktopWords as jv}from"efficient-easel/screen/lib/document/box-fields";import{requestMediaPick as Vv}from"efficient-easel/screen/lib/media-picker";import{useEaselHost as Yv}from"efficient-easel/screen/lib/host";import{useEaselSession as Xv}from"efficient-easel/screen/lib/session-context";function qv(e,t,n,o=!0){let a=Ii(n),s=typeof e[t]=="string"&&e[t]?String(e[t]):Hv;if(a==="desktop")return{ownView:!1,followed:s,followsView:"desktop",own:void 0,focus:s,key:t};let r=Wv(t,a),i=jn(e[r])??void 0,l=a==="mobile"&&o?jn(e[zv(t)])??void 0:void 0,u=l??s;return{ownView:!0,followed:u,followsView:l?"tablet":"desktop",own:i,focus:i??u,key:r}}function Zv(e,t,n){let o=Bv();if(!t||!o)return null;let a=o.values??{};if(n&&!n(a,Ii(e)))return null;let s=qv(a,t,e,n?n(a,"tablet"):!0),r=o.onChange;return{...s,set:i=>r(s.key,i),clear:()=>r(s.key,Pa)}}function Cm({value:e,onChange:t,label:n,accept:o,placeholder:a,focusKey:s,focusWhen:r,frameKey:i,fieldKey:l}){let u=Yv(),d=Xv(),p=c(n),f=Kv(),m=o.startsWith("video"),b=Zv(f,m?void 0:s,r),y=!!s&&Ii(f)!=="desktop",E=$v(Gv),S=cn(),T=i&&l?{video:l,frame:i}:null,x=C=>Vv(u,{accept:o,title:p,...C?{file:C}:{}}).then(D=>!D||!T?D?.url??null:(S({[T.video]:D.url,[T.frame]:D.posterUrl??""}),null)),v=T?C=>C?t(C):S({[T.video]:"",[T.frame]:""}):t,w=re(e);if(y&&(!b||!w))return null;if(E&&!E.capabilities.mediaEditing)return ue(Ai,{label:p,icon:m?ue(wm,{}):ue(Ri,{}),children:ue("div",{className:"sf-image-slot-inert",children:m?c("Templates don\u2019t store videos \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created."):c("Templates don\u2019t store images \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created.")})});let I=b?.ownView&&w?ue(Fv,{words:P()?.panel,label:c("Image focus"),changed:!!b.own,detail:jv(C=>c(C),b.followed,b.followsView),onReset:b.clear}):void 0;return y&&b?ue(Ai,{label:p,icon:ue(Ri,{}),action:I,children:ue("div",{style:{flex:"1 1 auto",minWidth:0},children:ue(Mv,{value:b.focus,onChange:b.set,label:c("Image focus"),image:w,hint:null})})}):ue(Ai,{label:p,icon:m?ue(wm,{}):ue(Ri,{}),children:ue("div",{style:{flex:"1 1 auto",minWidth:0},children:ue(Uv,{value:w,onChange:v,onPick:x,accept:m?"video/*":"image/*",kind:m?"video":"image",placeholder:a===void 0?void 0:c(a),maxSizeBytes:xe(d).media.maxUploadBytes,...b?{focus:b.focus,onFocusChange:b.set}:{}})})})}import{jsx as Om}from"react/jsx-runtime";import{useId as Jv}from"react";import{FieldSelect as Qv}from"efficient-easel/fields";import{SettingsField as ew}from"efficient-easel/panel";function tw(e){return e.map(({value:t,label:n,note:o})=>({value:t,label:n,...o?{meta:o}:{}}))}function Pm({label:e,options:t,value:n,onChange:o,emptyLabel:a,icon:s,hint:r}){let i=Jv(),l=`${i}-label`,u=`${i}-button`,d=Array.isArray(n)?n:[];return Om(ew,{label:c(e),labelId:l,icon:s,hint:r,children:Om(Qv,{id:u,multiple:!0,value:d,options:tw(t),onChange:o,placeholder:a===void 0?c("None"):c(a),ariaLabelledBy:`${l} ${u}`,inline:!0})})}import{jsx as km}from"react/jsx-runtime";import{useId as nw}from"react";import{FieldSelect as ow}from"efficient-easel/fields";import{SettingsField as aw}from"efficient-easel/panel";function sw(e){return e.map(({value:t,label:n,group:o,thumb:a,meta:s})=>({value:t,label:n,...o!==void 0?{group:o}:{},...a!==void 0?{thumb:a}:{},...s!==void 0?{meta:s}:{}}))}function F$({label:e,options:t,fallback:n,value:o,onChange:a,placeholder:s,bare:r=!1,icon:i}){let l=nw(),u=`${l}-label`,d=`${l}-button`,p=o??"",f=t.some(E=>E.value===p)?p:n,m=c(e),b=s===void 0?void 0:c(s),y=km(ow,{id:d,value:f,options:sw(t),onChange:a,placeholder:b,searchPlaceholder:b,...r?{ariaLabel:m}:{ariaLabelledBy:`${u} ${d}`},searchable:!0,groupCount:!0,inline:!0});return r?y:km(aw,{label:m,labelId:u,icon:i,children:y})}import{jsx as Rt,jsxs as Uw}from"react/jsx-runtime";import{SettingsField as Zm}from"efficient-easel/panel";import{LinkIcon as $w}from"efficient-easel/icons";import{LinkPicker as Gw,TextLinkField as zw}from"efficient-shell/ui";import{useEffect as qm,useMemo as Na,useRef as Ww,useState as Ia}from"react";import{currentEaselSession as rw}from"efficient-easel/screen/lib/session";function Am(){return rw().auth.token}import{currentEaselSession as Kw}from"efficient-easel/screen/lib/session";import{useScreenDocument as jw}from"efficient-easel/screen/components/ScreenDocumentContext";var iw=()=>({choosePage:c("Choose a page"),chooseSection:c("Choose a section"),noSections:c("No section anchors yet"),sectionHint:c("Jumps to a section on that page."),choosePost:c("Choose a post"),chooseProduct:c("Choose a product"),choosePopup:c("Choose a popup")});function Rm(e,t,n){if(!e)return"page";if(Wf(e))return"popup";if(e.startsWith("/journal/"))return"blog";if(Vf(e))return"product";if(e.includes("#")){let o=e.slice(0,e.indexOf("#"));if(o===""||o==="/"||t.includes(o))return"anchor"}return e==="/"||t.includes(e)||n&&n.listingPaths.includes(n.targetOf(e))?"page":"custom"}function Ni(e,t){let n=iw(),o=e.pages.map(d=>({value:zn(d.slug),label:d.title})),a=t?.pageOptions?t.pageOptions(o):o,s=a.map(d=>d.value),r=e.pages.map(d=>({label:d.title,options:jf(...d.docs).map(p=>({value:ga(d.slug,p.slug),label:p.name}))})).filter(d=>d.options.length>0),i=d=>{switch(d){case"page":return{type:"select",options:a,placeholder:n.choosePage};case"anchor":return{type:"groups",groups:r,placeholder:r.length?n.chooseSection:n.noSections};case"blog":return{type:"select",options:e.posts.map(p=>({value:Kf(p.slug),label:p.title||p.slug})),placeholder:n.choosePost};case"product":return{type:"select",options:e.products.map(p=>({value:p.href,label:p.name||p.href})),placeholder:n.chooseProduct};case"popup":return{type:"select",options:(e.popups??[]).map(p=>({value:zf(p.slug),label:p.title||p.slug})),placeholder:n.choosePopup};case"custom":return{type:"text"}}},l=Gf(e.offers).map(d=>({value:d.value,label:c(d.label),target:i(d.value),...d.value==="anchor"?{hint:n.sectionHint}:{},...d.value==="blog"||d.value==="product"||d.value==="popup"?{hideWhenEmpty:!0}:{}}));if(!t)return{kinds:l,rules:{kindOf:d=>Rm(d,s),targetOf:d=>d,readFilter:()=>null,withFilter:d=>d}};let u=d=>{let p=t.withFilter(d,null);return t.listingPaths.includes(p)?p:d};return{kinds:l,rules:{kindOf:d=>Rm(d,s,{listingPaths:t.listingPaths,targetOf:u}),targetOf:u,readFilter:t.readFilter,withFilter:t.withFilter},filtersFor:d=>t.listingPaths.includes(d)?t.filtersFor(d):null}}import{useEaselSession as Vw}from"efficient-easel/screen/lib/session-context";function J(e,t){if(typeof e=="string")return e||t;if(e&&typeof e=="object"&&"text"in e){let n=e.text;return W(n)??t}return t}function Im(e,t){return O(e)??t}function We(e,t){return typeof e=="boolean"?e:t}function Aa(e,t){if(!Array.isArray(e))return t;let n=e.map(o=>typeof o=="string"?o:J(o?.text,"")).map(o=>o.trim()).filter(Boolean);return n.length?n:t}var Lm=["delay","scroll","exit"],Dm=["all","chosen","except"],Fm=["visit","days","never","once"],lw=["all","desktop","phone"],cw=["stop","continue"],Bm={min:0,max:60},Hm={min:10,max:90},Mm={min:1,max:90},Ce={autoOpen:!1,trigger:"delay",autoOpenDelaySec:15,scrollPercent:50,showOn:"all",showOnPages:[],devices:"all",hideAfter:"days",hideDays:7,afterSubmit:"stop",startDate:null,endDate:null};function fe(e,t,n){return typeof t=="string"&&e.includes(t)?t:n}function un(e,t,n){let o=Im(e,n);return Math.min(t.max,Math.max(t.min,Math.round(o)))}function uw(e){return typeof e.hideAfter=="string"?fe(Fm,e.hideAfter,Ce.hideAfter):e.oncePerSession===!0?"visit":e.oncePerSession===!1?"never":Ce.hideAfter}function dw(e){return Array.isArray(e)?e.map(t=>typeof t=="string"?t.trim():"").filter(Boolean).map(t=>t.startsWith("/")?t:`/${t}`):[]}function Nm(e){if(typeof e!="string")return null;let t=e.trim();return/^\d{4}-\d{2}-\d{2}$/.test(t)?t:null}function Um(e){let t=e??{},n=Ce;return{autoOpen:We(t.autoOpen,n.autoOpen),trigger:fe(Lm,t.trigger,n.trigger),autoOpenDelaySec:un(t.autoOpenDelaySec,Bm,n.autoOpenDelaySec),scrollPercent:un(t.scrollPercent,Hm,n.scrollPercent),showOn:fe(Dm,t.showOn,n.showOn),showOnPages:dw(t.showOnPages),devices:fe(lw,t.devices,n.devices),hideAfter:uw(t),hideDays:un(t.hideDays,Mm,n.hideDays),afterSubmit:fe(cw,t.afterSubmit,n.afterSubmit),startDate:Nm(t.startDate),endDate:Nm(t.endDate)}}import{parseHexColor as pw}from"efficient-shell/format";var $m="#000000";var Li="popup",fw=bu,mw=["auto","full"],hw=["inside","outside","none"],gw={min:240,max:1440},bw={min:0,max:100},Vn={placement:"center",fullWidth:!1,width:720,height:"auto",tintColor:$m,tintOpacity:60,outsideClick:!0,closeButton:"inside"};function yw(e,t){let n=typeof e=="string"?e.trim():"";return n&&pw(n)===n.toLowerCase()?n:t}function Di(e,t=Vn){let n=e??{},o=t;return{placement:fe(fw,n.placement,o.placement),fullWidth:We(n.fullWidth,o.fullWidth),width:un(n.width,gw,o.width),height:fe(mw,n.height,o.height),tintColor:yw(n.tintColor,o.tintColor),tintOpacity:un(n.tintOpacity,bw,o.tintOpacity),outsideClick:We(n.outsideClick,o.outsideClick),closeButton:fe(hw,n.closeButton,o.closeButton)}}var Gm="cart-drawer",aG="cart-drawer",Sw={kickerBadge:"",kickerText:"Your order",titleLead:"Your",titleAccent:"cart.",subtitleEmpty:"Empty for now.",subtitleOne:"One set in your cart.",subtitleMany:"{count} sets in your cart.",leadTimeValue:"",shipsToFallback:"",promises:[],emptyKicker:"No wheels yet",emptyBody:"Your cart is empty. Pick a wheel to get started."};function sG(e,t){return t===0?e.subtitleEmpty:t===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(t))}function rG(e){let t=e??{},n=Sw;return{kickerBadge:J(t.kickerBadge,n.kickerBadge),kickerText:J(t.kickerText,n.kickerText),titleLead:J(t.titleLead,n.titleLead),titleAccent:J(t.titleAccent,n.titleAccent),subtitleEmpty:J(t.subtitleEmpty,n.subtitleEmpty),subtitleOne:J(t.subtitleOne,n.subtitleOne),subtitleMany:J(t.subtitleMany,n.subtitleMany),leadTimeValue:J(t.leadTimeValue,n.leadTimeValue),shipsToFallback:J(t.shipsToFallback,n.shipsToFallback),promises:Aa(t.promises,n.promises),emptyKicker:J(t.emptyKicker,n.emptyKicker),emptyBody:J(t.emptyBody,n.emptyBody)}}var _w=["right","left"],Ew={...Vn,width:520,tintOpacity:68};function iG(e){let t=e??{};return{...Di(t,Ew),placement:fe(_w,t.placement,"right"),height:"full",fullWidth:!1,autoOpen:We(t.autoOpen,!0)}}var Wm="consent-banner",dG="consent-banner";var Tw=[{value:"bar",label:"Bar"},{value:"card",label:"Card"}],pG="Layout",zm={layout:"bar"},xw=e=>Tw.some(t=>t.value===e);function fG(e){let t=J((e??{}).layout,zm.layout);return{layout:xw(t)?t:zm.layout}}var mG={...Vn,placement:"bottom-center",fullWidth:!0,width:440,tintOpacity:0,outsideClick:!1,closeButton:"none"};var vw="consentWords",ww=["eyebrow","notice","accept","reject","choose"];function Cw(e){let t=(e??{})[vw];return typeof t=="string"&&ww.includes(t)?t:null}function Ow(e){let t=e?.props;return t?Cw(t)!==null?!0:Object.values(t).some(n=>Array.isArray(n)&&n.some(o=>o&&typeof o=="object"&&"props"in o&&Ow(o))):!1}var Pw=["meta","eyebrow","heading","body","statName","statValue","formEyebrow","formHeading","formIntro","fieldLabel","option","finePrint","dismiss","doneHeading","doneBody"],bG={meta:"Meta line",eyebrow:"Eyebrow",heading:"Heading",body:"Body",statName:"Stat name",statValue:"Stat value",formEyebrow:"Form eyebrow",formHeading:"Form heading",formIntro:"Form intro",fieldLabel:"Field label",option:"Option",finePrint:"Fine print",dismiss:"Dismiss link",doneHeading:"Success heading",doneBody:"Success message"},kw={meta:"styleMeta",eyebrow:"styleEyebrow",heading:"styleHeading",body:"styleBody",statName:"styleStatName",statValue:"styleStatValue",formEyebrow:"styleFormEyebrow",formHeading:"styleFormHeading",formIntro:"styleFormIntro",fieldLabel:"styleFieldLabel",option:"styleOption",finePrint:"styleFinePrint",dismiss:"styleDismiss",doneHeading:"styleDoneHeading",doneBody:"styleDoneBody"},yG={meta:{font:"--pp-meta-font",size:"--pp-meta-size"},eyebrow:{font:"--pp-eyebrow-font",size:"--pp-eyebrow-size"},heading:{font:"--pp-heading-font",size:"--pp-heading-size"},body:{font:"--pp-body-font",size:"--pp-body-size"},statName:{font:"--pp-statname-font",size:"--pp-statname-size"},statValue:{font:"--pp-statvalue-font",size:"--pp-statvalue-size"},formEyebrow:{font:"--pp-formeyebrow-font",size:"--pp-formeyebrow-size"},formHeading:{font:"--pp-formheading-font",size:"--pp-formheading-size"},formIntro:{font:"--pp-formintro-font",size:"--pp-formintro-size"},fieldLabel:{font:"--pp-fieldlabel-font",size:"--pp-fieldlabel-size"},option:{font:"--pp-option-font",size:"--pp-option-size"},finePrint:{font:"--pp-fineprint-font",size:"--pp-fineprint-size"},dismiss:{font:"--pp-dismiss-font",size:"--pp-dismiss-size"},doneHeading:{font:"--pp-doneheading-font",size:"--pp-doneheading-size"},doneBody:{font:"--pp-donebody-font",size:"--pp-donebody-size"}};function Km(e){let t={};for(let n of Pw){let o=dt(e[kw[n]]);o&&(t[n]=o)}return t}var EG={heading:"Join our email list",placeholder:"Email address",buttonLabel:"Subscribe"},Aw={lead:"We accept"},TG={...Aw,methods:[],size:"sm",align:"start",dataSource:bc},Bi="site-footer";var Hi=Bi,xG={desktop:!0,tablet:!0,mobile:!0},vG={desktop:!1,tablet:!1,mobile:!1},Fi=1,jm=6,wG=Array.from({length:jm-Fi+1},(e,t)=>Fi+t),Ra={desktop:6,tablet:3,mobile:2},Rw={2:{desktop:2,tablet:2,mobile:1},3:{desktop:3,tablet:3,mobile:1},4:{desktop:4,tablet:2,mobile:2},5:{desktop:5,tablet:3,mobile:2},6:{desktop:6,tablet:3,mobile:2}},At=e=>Math.min(Math.max(Math.round(e),Fi),jm);function CG(e){if(typeof e=="number")return Rw[At(e)]??{desktop:At(e),tablet:At(e),mobile:At(e)};if(e&&typeof e=="object"){let t=e;return{desktop:At(t.desktop??Ra.desktop),tablet:At(t.tablet??Ra.tablet),mobile:At(t.mobile??Ra.mobile)}}return{...Ra}}var Mi="subscribe-popup",LG="subscribe-popup",Iw=[Mi,Bi,Gm,Wm];function Ym(e){return Iw.includes(e)}var Nw=["right","left"],Lw={metaLabel:"Meta label",issueLabel:"Label",issueNumber:"00",kicker:"Kicker",heading:`Main heading
8
+ *Highlight line*`,deck:"Add a sentence or two of supporting copy.",stats:[{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"}],formLabel:"Section label",formHeading:"Main heading *highlight*",formIntro:"Add a sentence or two of supporting copy.",firstNameLabel:"Field label",firstNamePlaceholder:"Placeholder",emailLabel:"Field label",emailPlaceholder:"Placeholder",interestsLabel:"Field label",interests:["Option one","Option two","Option three"],frequencyLabel:"Field label",frequencies:["Option one","Option two","Option three"],submitText:"Button label",finePrint:"Fine print",dismissText:"Dismiss link",emailInvalidText:"Enter a valid email address.",submitErrorText:"Could not subscribe right now. Please try again.",successHeading:"Main heading *highlight*",successBody:"Add a sentence or two of supporting copy \u2014 the {email} and {issue} tokens are substituted here.",keepBrowsingText:"Button label",autoOpen:Ce.autoOpen,autoOpenDelaySec:Ce.autoOpenDelaySec,formSlug:"",trigger:Ce.trigger,scrollPercent:Ce.scrollPercent,showOn:Ce.showOn,showOnPages:[],hideAfter:Ce.hideAfter,hideDays:Ce.hideDays,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},G=J,Dw=We,Xm=Aa;function Vm(e,t){if(e==null)return t;let n=o=>o.trim()?o:"";if(typeof e=="string")return n(e);if(typeof e=="object"&&"text"in e){let o=e.text;return typeof o=="string"?n(o):""}return t}function Fw(e,t){return Array.isArray(e)?Xm(e,[]):t}function Bw(e,t){return Array.isArray(e)?e.map(n=>{let o=n??{};return{label:G(o.label,""),value:G(o.value,"")}}).filter(n=>n.label||n.value):t}function FG(e){let t=e??{},n=Lw,o=Um(t);return{metaLabel:G(t.metaLabel,n.metaLabel),issueLabel:Vm(t.issueLabel,n.issueLabel),issueNumber:Vm(t.issueNumber,n.issueNumber),kicker:G(t.kicker,n.kicker),heading:G(t.heading,n.heading),deck:G(t.deck,n.deck),stats:Bw(t.stats,n.stats),formLabel:G(t.formLabel,n.formLabel),formHeading:G(t.formHeading,n.formHeading),formIntro:G(t.formIntro,n.formIntro),firstNameLabel:G(t.firstNameLabel,n.firstNameLabel),firstNamePlaceholder:G(t.firstNamePlaceholder,n.firstNamePlaceholder),emailLabel:G(t.emailLabel,n.emailLabel),emailPlaceholder:G(t.emailPlaceholder,n.emailPlaceholder),interestsLabel:G(t.interestsLabel,n.interestsLabel),interests:Xm(t.interests,n.interests),frequencyLabel:G(t.frequencyLabel,n.frequencyLabel),frequencies:Fw(t.frequencies,n.frequencies),submitText:G(t.submitText,n.submitText),finePrint:G(t.finePrint,n.finePrint),dismissText:G(t.dismissText,n.dismissText),emailInvalidText:G(t.emailInvalidText,n.emailInvalidText),submitErrorText:G(t.submitErrorText,n.submitErrorText),successHeading:G(t.successHeading,n.successHeading),successBody:G(t.successBody,n.successBody),keepBrowsingText:G(t.keepBrowsingText,n.keepBrowsingText),formSlug:typeof t.formSlug=="string"?t.formSlug.trim():n.formSlug,autoOpen:o.autoOpen,autoOpenDelaySec:o.autoOpenDelaySec,trigger:o.trigger,scrollPercent:o.scrollPercent,showOn:o.showOn,showOnPages:o.showOnPages,hideAfter:o.hideAfter,hideDays:o.hideDays,formSide:fe(Nw,t.formSide,n.formSide),valuePanelOnPhone:Dw(t.valuePanelOnPhone,n.valuePanelOnPhone),sectionAccent:t.sectionAccent,sectionCorners:t.sectionCorners,sectionCornerSides:t.sectionCornerSides,textStyles:Km(t)}}function Hw(e,t=Math.random){for(;;){let n=`popup-${Math.floor(t()*2176782336).toString(36).padStart(6,"0")}`;if(!e.has(n))return n}}function Mw(e){return{root:{props:{title:e,kind:Li}},content:[],zones:{}}}function UG(e,t,n){return{slug:Hw(t,n),title:e,kind:ii,layout:Mw(e)}}function Ui(e){return e?.root?.props?.kind===Li}function Jm(e){let t=new Map;return(n="")=>{let o=Am(),a=t.get(n);if(!a||a.token===null&&o!==null){let s=o||!Kw().usesBridgedToken?e(o??"",n).catch(()=>[]):Promise.resolve([]);return t.set(n,{promise:s,token:o}),s}return a.promise}}var Yw=Jm(async(e,t)=>{let n=t?{siteId:t}:void 0,{pages:o}=xe();return o.linkTargets?o.linkTargets(n):(await o.list(n)).map(a=>({id:a.id,slug:a.slug,label:a.label,layout:null}))}),Xw=Jm(async(e,t)=>await xe().blog?.posts(t?{siteId:t}:void 0)??[]);function qw({value:e,onChange:t,label:n="Link",data:o,filters:a}){let s=Na(()=>Ni(o,a),[o,a]),r=c(n);return Rt(Zm,{label:r,icon:Rt($w,{}),children:Rt(Gw,{value:e,onChange:i=>t(i),kinds:s.kinds,rules:s.rules,filtersFor:s.filtersFor,label:r})})}function Qm(){let{siteId:e,capabilities:t}=jw(),{offersCommerce:n,hasBlog:o}=t,[a,s]=Ia([]),[r,i]=Ia([]),[l,u]=Ia([]),[d,p]=Ia(null),f=Vw().chrome,m=f?.products?.list,b=f?.linkFilters,y=b?void 0:f?.linkRow,E=Ww(!0);qm(()=>(E.current=!0,()=>{E.current=!1}),[]),qm(()=>{let x=!0;return Yw(e??void 0).then(v=>x&&E.current&&s(v)),o&&Xw(e??void 0).then(v=>x&&E.current&&i(v)),n&&m?.().then(v=>x&&E.current&&u(v)),n&&b?b.load(e).catch(()=>null).then(v=>x&&E.current&&p(()=>v)):p(null),()=>{x=!1}},[e,n,o,m,b]);let S=Na(()=>({pages:a.filter(x=>!Ym(x.slug)&&!Ui(x.layout)).map(x=>({slug:x.slug,title:x.label,docs:[x.layout]})),popups:a.filter(x=>x.slug===Mi||Ui(x.layout)).map(x=>({slug:x.slug,title:x.label})),posts:o?r.map(x=>({slug:x.slug,title:x.title})):[],products:n?l.map(x=>({href:x.href,name:x.name})):[],offers:{offersCommerce:n,offersService:o}}),[a,r,l,n,o]),T=Na(()=>d?d(S.pages):null,[d,S]);return{data:S,filters:T,pages:a,offersCommerce:n,HostLinkRow:y}}function o2({label:e,icon:t,text:n,onTextChange:o,link:a,onLinkChange:s}){let{data:r,filters:i}=Qm(),l=Na(()=>Ni(r,i),[r,i]),u=c(e);return Rt(Zm,{label:u,icon:t,children:Rt(zw,{label:u,text:n,onTextChange:o,link:a,onLinkChange:d=>s(d),kinds:l.kinds,rules:l.rules,filtersFor:l.filtersFor})})}function eh({value:e,onChange:t,label:n="Link"}){let o=typeof e=="string"?e:"",{data:a,filters:s,pages:r,offersCommerce:i,HostLinkRow:l}=Qm(),u=a.pages.map(p=>zn(p.slug)),d=i&&l&&(o==="/"||u.includes(o))?l:void 0;return Uw("div",{children:[Rt(qw,{value:o,onChange:t,label:n,data:a,filters:s}),d&&Rt(d,{value:o,onChange:t,pages:r})]})}import{UiIcon as ng}from"efficient-easel/draw/client";import{VIEW_TIERS as Fa,phoneKey as th,resolveViewValue as Zw,tabletKey as nh,viewKeyAt as H}from"efficient-easel/draw";import{SECTION_PAD_UNIT_KEY as rh,SITE_SIDE as Jw,VIEW_ABOVE as Qw,convertLength as ih,isLengthUnit as eC,isSiteSide as lh,sideLengthAt as tC,sideValueAt as nC,withLength as Ba}from"efficient-easel/screen/lib/content/length-units";var me={min:10,max:200,step:10};function oC(e,t,n,o=0){let a=O(e),s=O(t);if(a===void 0&&s===void 0)return;let r=It(n),i=l=>l===void 0?void 0:r==="px"?l:Ba(l,r,o);return{paddingTop:i(a),paddingBottom:i(s)}}var It=e=>F(e),$i=(e,t)=>typeof e=="object"?e[t]:e??0,aC=e=>typeof e=="object"&&e!==null&&"top"in e,Yn=(e,t,n)=>aC(e)?$i(e[t],n):$i(e,n),sC={top:"top",bottom:"bottom"};function rC(e,t,n,o){let a=O(e),s=O(t);if(a===void 0&&s===void 0)return;let r=It(n),i=(l,u)=>l===void 0?void 0:r==="px"?l:Ba(l,r,u);return{paddingTop:i(a,o("top","desktop")),paddingBottom:i(s,o("bottom","desktop"))}}var iC="sf-pad-top-phone",lC="sf-pad-bottom-phone",cC="--sf-pad-t-phone",uC="--sf-pad-b-phone",dC="sf-pad-left-phone",pC="sf-pad-right-phone",fC="--sf-pad-l-phone",mC="--sf-pad-r-phone",hC="sf-pad-top-tablet",gC="sf-pad-bottom-tablet",bC="sf-pad-left-tablet",yC="sf-pad-right-tablet",SC="--sf-pad-t-tablet",_C="--sf-pad-b-tablet",EC="--sf-pad-l-tablet",TC="--sf-pad-r-tablet",Ki="sf-section-pad";function ji(e){let t={desktop:e.unit,tablet:e.unitTablet,phone:e.unitPhone},n=e.totals?.length||typeof e.frame=="object"?(s,r)=>e.totals?.includes(H(s,r))?0:Yn(e.frame,s,r):e.frame,o=typeof n=="function"?rC(e.top,e.bottom,e.unit,n):oC(e.top,e.bottom,e.unit,n),a=Vi({left:e.left,right:e.right},{top:e.topPhone,bottom:e.bottomPhone,left:e.leftPhone,right:e.rightPhone},{top:e.topTablet,bottom:e.bottomTablet,left:e.leftTablet,right:e.rightTablet},{top:e.top,bottom:e.bottom,left:e.left,right:e.right},t,n,e.sideSpace);return o===void 0&&!a.classes.length&&!Object.keys(a.style).length?null:{className:[Ki,...a.classes].join(" "),style:{...o,...a.style}}}var xC=e=>lh(e)?e:O(e),vC=[["top","paddingTop",[hC,SC],[iC,cC]],["bottom","paddingBottom",[gC,_C],[lC,uC]],["left","paddingLeft",[bC,EC],[dC,fC]],["right","paddingRight",[yC,TC],[pC,mC]]];function Gi(e,t,n){return!eC(t)||t==="px"?e:ih(e,"px",t,n,{min:0,max:me.max,step:1})}var ch=e=>{let t=Qw[e];return t?[e,...ch(t)]:[e]},La=Object.fromEntries(Fa.map(e=>[e,ch(e)]));function wC(e,t,n,o={},a=0){let s={desktop:!0,tablet:t!==void 0,mobile:n!==void 0},r=(b,y,E)=>{if(y==="px")return`${b}px`;let S=La[E].find(x=>s[x])??"desktop",T=Ba(b,y,$i(a,S));return typeof T=="number"?`${T}px`:T},i={n:e,[nh("n")]:t,[th("n")]:n,u:o.desktop,[nh("u")]:o.tablet,[th("u")]:o.phone},l=Zw("spacing",O(e),O(t),O(n),$t()),u=(b,y,E)=>{if(nC(i,{side:"n"},b,"side",["side"])?.value===Jw)return Kr().value;let S=tC(i,{side:"n"},"u",b,"side");if(!S)return;let T=y!==null&&!E&&S.unit==="px"&&typeof l[y]=="number";return r(T?l[y]:S.value,S.unit,b)},d=u("desktop",null,!0),p={},f=u("tablet","tablet",t!==void 0);f!==void 0&&(t!==void 0||f!==d)&&(p.tablet=f);let m=u("mobile","phone",n!==void 0);return m!==void 0&&(n!==void 0||m!==d)&&(p.phone=m),p}function Vi(e,t,n={},o=e,a={},s=0,r="box"){let i={},l={},u=[],d=Kr(r),p=!1;for(let[f,m,...b]of vC){let y=f==="left"||f==="right"?xC:O,E=y(e[f]),S=j(sC,f),T=S?typeof s=="function"?{desktop:s(S,"desktop"),tablet:s(S,"tablet"),mobile:s(S,"mobile")}:s:0,x=typeof T=="object"?T.desktop:T;lh(E)?(i[m]=d.value,p=!0):E!==void 0&&(i[m]=It(a.desktop)==="px"?E:Ba(E,It(a.desktop),x));let v=wC(y(o[f]),y(n[f]),y(t[f]),a,T);for(let[w,[I,C]]of[["tablet",b[0]],["phone",b[1]]]){let D=v[w];D!==void 0&&(u.push(I),l[C]=D,D===d.value&&(p=!0))}}return p&&u.push(...d.className.split(" ")),{classes:u,style:{...i,...l}}}var uh={top:"padTop",bottom:"padBottom",left:"padLeft",right:"padRight"},Yi="padUnit";function CC(e,t){let n=e[Yi],o=(a,s,r)=>{let i=O(a)??(r===void 0?void 0:Gi(r,n,"desktop")),l=O(s);return l===void 0?i:(i??0)+Gi(l,n,"desktop")};return{top:o(e.padTop,e.sectionPaddingTop,t.top),bottom:o(e.padBottom,e.sectionPaddingBottom,t.bottom)}}function f2(e,t,n={}){let o=CC(e,t),a={...OC(e,uh,!0,Yi),top:o.top,bottom:o.bottom};n.noTop&&Object.assign(a,{top:0,topTablet:void 0,topPhone:void 0});let s=ji(a),r=s?s.className.split(" ").filter(i=>i!==Ki):[];return{...r.length?{className:r.join(" ")}:{},style:s?.style??{}}}var Da={top:"sectionPaddingTop",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft",right:"sectionPaddingRight"},m2=[...["top","bottom","left","right"].map(e=>[uh[e],Da[e]]),[Yi,rh]].flatMap(([e,t])=>[[e,t],...["tablet","mobile"].map(n=>[H(e,n),H(t,n)])]);function OC(e,t=Da,n=!0,o=t===Da?rh:void 0){let a={};if(o){e[o]!==void 0&&(a.unit=e[o]);for(let r of["tablet","mobile"])e[H(o,r)]!==void 0&&(a[H("unit",r)]=e[H(o,r)])}for(let r of n?["top","bottom","left","right"]:["top","bottom"]){a[r]=e[t[r]];for(let i of["tablet","mobile"])a[H(r,i)]=e[H(t[r],i)]}let s=e[PC];if(Array.isArray(s)){let r=dh.flatMap(i=>Fa.filter(l=>s.includes(H(t[i],l))).map(l=>H(i,l)));r.length&&(a.totals=r)}return a}var PC="padTotal",dh=["top","bottom"];function h2(e=Da){return dh.flatMap(t=>Fa.map(n=>H(e[t],n)))}var zi=16,Wi=24,kC={text:zi,heading:Wi,line:0},oh={all:{12:"py-3",16:"py-4",24:"py-6"},edge:{12:"max-view-wide:py-3"}},AC={[zi]:oh.all[zi],[Wi]:oh.all[Wi],[kC.line]:""};function g2(e,t){return{className:AC[t]??"",...e?{pad:{values:e,frame:t}}:{}}}var b2=e=>({desktop:e.top,tablet:e.top,mobile:e.topPhone});function y2(e,t){if(!t)return{root:sh(e.values,e.frame),outer:null};if(!e.values.totals?.length)return{root:null,outer:ah(e.values)};let n=e.values,{top:o,bottom:a,topTablet:s,bottomTablet:r,topPhone:i,bottomPhone:l,left:u,right:d,leftTablet:p,rightTablet:f,leftPhone:m,rightPhone:b,...y}=n,E={...y,top:o,bottom:a,topTablet:s,bottomTablet:r,topPhone:i,bottomPhone:l},S=sh(e.drawsFrame?RC(E,e.frame):E,e.frame),T=S&&e.drawsFrame?{...S,className:S.className.split(" ").filter(v=>v!==Ki).join(" ")}:S,x=["tablet","mobile"].some(v=>["top","bottom"].some(w=>typeof n[H(w,v)]=="number"&&!n.totals?.includes(H(w,v))));return{root:T&&e.edge&&T.className&&!x?{...T,attrs:Nc}:T,outer:ah({...y,totals:void 0,left:u,right:d,leftTablet:p,rightTablet:f,leftPhone:m,rightPhone:b})}}function RC(e,t){let n={...e},o=[...e.totals??[]];for(let a of Fa)for(let s of["top","bottom"]){if(La[a].some(l=>O(e[H(s,l)])!==void 0))continue;let r=l=>Yn(t,s,l),i=La[a][1];i&&r(i)===r(a)||(n[H(s,a)]=Gi(r(a),e[H("unit",a)],a),o.push(H(s,a)))}return{...n,totals:o}}function IC(e,t){let n={...e};for(let o of["tablet","mobile"]){let a=H("unit",o),s=["top","bottom","left","right"].some(r=>O(e[H(r,o)])!==void 0);for(let r of["top","bottom"]){if(O(n[H(r,o)])!==void 0)continue;let i=La[o].slice(1).find(d=>O(n[H(r,d)])!==void 0);if(!i||Yn(t,r,i)===Yn(t,r,o)||e.totals?.includes(H(r,i)))continue;let l=O(n[H(r,i)]),u=It(n[H("unit",i)]);if(s){let d=It(n[a]);n[H(r,o)]=u===d?l:ih(l,u,d,o,{min:0,max:me.max,step:1})}else n[H(r,o)]=l,n[a]=n[H("unit",i)]}}return n}function ah(e){return ji(e)}function sh(e,t){let n=typeof t=="object"?IC(e,t):e,o=(a,s,r,i,l)=>typeof a!="number"?void 0:It(s)==="px"&&!n.totals?.includes(r)?a+Yn(t,i,l):a;return ji({...n,frame:t,top:o(n.top,n.unit,"top","top","desktop"),bottom:o(n.bottom,n.unit,"bottom","bottom","desktop"),topTablet:o(n.topTablet,n.unitTablet,"topTablet","top","tablet"),bottomTablet:o(n.bottomTablet,n.unitTablet,"bottomTablet","bottom","tablet"),topPhone:o(n.topPhone,n.unitPhone,"topPhone","top","mobile"),bottomPhone:o(n.bottomPhone,n.unitPhone,"bottomPhone","bottom","mobile")})}import{BUTTON_PAD_KEYS as Ha,buttonBorderOf as NC,buttonFillOpacityOf as LC,buttonPadSidesOf as DC,viewKeyAt as FC}from"efficient-easel/draw";import{BUTTON_PAD_UNIT_KEY as Xi,lengthOf as BC}from"efficient-easel/screen/lib/content/length-units";var HC="px-6 py-4",MC=4,Ma=e=>{let t=new RegExp(`\\bp${e}-(?:\\[(\\d+)px\\]|(\\d+))`).exec(HC);if(!t)throw new Error(`BUTTON_PAD_CLASSES has no p${e}`);return t[1]!==void 0?Number(t[1]):Number(t[2])*MC},O2={top:Ma("y"),right:Ma("x"),bottom:Ma("y"),left:Ma("x")},fh="var(--btn)";function UC(e){let t=e.variant==="ghost",n=LC(e.buttonFillOpacity),o=NC(e.buttonBorder),a=W(e.buttonColor);return{fillOpacity:n??(t?0:100),border:{width:o?.width??1,color:o?.color??a??(t?"currentColor":fh)},changed:n!==void 0||o!==void 0}}function P2(e){let t=UC(e);if(!t.changed)return null;let n=W(e.buttonColor)??fh;return{background:t.fillOpacity===0?"transparent":t.fillOpacity===100?n:`color-mix(in srgb, ${n} ${t.fillOpacity}%, transparent)`,borderWidth:BC(t.border.width,F(e.buttonBorderUnit)),borderStyle:"solid",borderColor:t.border.color}}var $C="var(--sf-button-radius, 0)";function k2(e){let t=O(e.buttonCorners),n=De(e.buttonCornerSides);if(t===void 0&&n===null)return null;let o=t===void 0?$C:M(Math.max(0,t),e.buttonCornersUnit);return{borderRadius:n===null?o:Ct(o,n)}}function A2(e){let t=(r,i)=>e[FC(r,i)],n=r=>DC({top:t(Ha.top,r),right:t(Ha.right,r),bottom:t(Ha.bottom,r),left:t(Ha.left,r)})??{},o={desktop:t(Xi,"desktop"),tablet:t(Xi,"tablet"),phone:t(Xi,"mobile")},{classes:a,style:s}=Vi(n("desktop"),n("mobile"),n("tablet"),void 0,o);return Object.keys(s).length?{className:a.join(" "),style:s}:null}var ph="upper";function mh(e,t,n){let o=e&&typeof e=="object"?e:{},a=W(o.textStyle),s=a?W(t?.find(d=>d?.id===a)?.name):void 0,r=a?/^(heading|body)-(\d+)$/.exec(a):null,i=a?s||(r?n.styleName({kind:r[1],n:Number(r[2])}):a):n.noStyle,{cases:l}=n,u=W(o.case)??ph;return`${i} \xB7 ${l[u]??l[ph]}`}import{usePreviewParts as BP}from"efficient-easel/draw/client";import{encodePartId as HP}from"efficient-easel/draw";import{DEFAULT_EASEL_STRINGS as MP,useEaselStrings as UP}from"efficient-easel/strings";import{PIN_STICK_VAR as GC,PIN_TRACK_POSITION_VAR as zC,pinAttrs as hh,pinStickVars as WC,readPin as Ji,readPinEnd as gh}from"efficient-shell/format";var F2="Stick to top",_e={min:0,max:200,step:4,fallback:0},Xn={kind:"position",unitKey:"stickTopDistanceUnit"},bh=zt(Xn),[KC,jC,VC]=bh,el="Pin while scrolling",yh="Scroll",Oe={distance:"--sf-pin-distance",position:"--sf-pin-position",on:"--sf-pin-on",length:"--sf-pin-length",stick:"--sf-pin-stick",trackPosition:"--sf-pin-track-position",header:"--sf-pin-header"},qn="stickTopScreens",YC=[qn,"stickTopScreensTablet","stickTopScreensPhone"],tl="Screens",nl="stickTopStop",dn="screen",Sh="Pin stops at",_h=[{value:"header",label:"Under the header"},{value:dn,label:"Screen top"}],Eh="header",Th="Under the header: the section stops below the site header. Screen top: it stops at the top edge of the screen, under a see-through header.";function ol(e){return e===dn?dn:"header"}function xh(e){return e===dn?dn:void 0}var al="stickAbove",vh="Stays above",wh="On: the pinned box stays on top, and the sections after it scroll under it.";function XC(e){return e.stickAbove===!0}var sl="stickEnd",Qi="away",Ch="Pin ends",Oh=[{value:"over",label:"Next slides over"},{value:Qi,label:"Scrolls away"}],Ph="over",kh="Next slides over: the next section covers this one before it moves. Scrolls away: this section goes up with the page, and the next section follows under it.";function rl(e){return gh(e)}function Ah(e){return gh(e)===Qi?Qi:void 0}var B2=["stickTop","stickTopDistance","stickTopTablet","stickTopDistanceTablet","stickTopPhone","stickTopDistancePhone",...bh,...YC,nl,al,sl],H2=new Set(["IntroBleed"]),M2=new Set(["CategoryBar","DocTabs","Contents"]);function qC(e){return typeof e.stickTop=="boolean"?e.stickTop:e.sticky!==!1}var qi=e=>Ji(!0,e).length,il={any:["stickTop","stickTopTablet","stickTopPhone"].map(e=>({field:e,is:!0}))},Rh={all:[{not:{field:"stickTop",in:[!0,!1]}},{not:{field:"sticky",is:!1}}]};function Zi(e,t="px"){let n=O(e)??_e.fallback;return t!=="px"?Math.max(_e.min,n):Math.min(_e.max,Math.max(_e.min,Math.round(n)))}function ll(e){return typeof e.stickTopTablet=="boolean"}function cl(e){return typeof e.stickTopPhone=="boolean"}function pn(e,t={}){let n=t.intro?qC(e):e.stickTop===!0,o=e,a=F(o[KC]),s=Zi(e.stickTopDistance,a),r=qi(e.stickTopScreens),i=ll(e),l=i?e.stickTopTablet===!0:n,u=i?F(o[jC]):a,d=i?Zi(e.stickTopDistanceTablet,u):s,p=i?qi(e.stickTopScreensTablet):r,f=cl(e),m=f?e.stickTopPhone===!0:l,b=f?F(o[VC]):u,y=f?Zi(e.stickTopDistancePhone,b):d,E=f?qi(e.stickTopScreensPhone):p;return{desktop:n,desktopDistance:s,desktopUnit:a,desktopScreens:r,tablet:l,tabletDistance:d,tabletUnit:u,tabletScreens:p,ownTablet:i,phone:m,phoneDistance:y,phoneUnit:b,phoneScreens:E,ownPhone:f}}function U2(e,t={}){let n=pn(e,{intro:t.atScreenTop});if(!n.desktop&&!n.tablet&&!n.phone)return null;let o=t.atScreenTop===!0&&typeof e.stickTop!="boolean",a=n.desktop&&n.desktopScreens>0||n.tablet&&n.tabletScreens>0||n.phone&&n.phoneScreens>0,s=t.above===!0&&XC(e),r=t.track===!0&&!o&&a&&!s,i=(p,f,m,b)=>kt({tabletClass:"",tabletVar:`${p}-tablet`,phoneClass:"",phoneVar:`${p}-phone`},f,m,b).style,l={...t.atScreenTop||ol(e.stickTopStop)===dn?{[Oe.header]:"0px"}:{},[Oe.distance]:M(n.desktopDistance,n.desktopUnit),...i(Oe.distance,M(n.desktopDistance,n.desktopUnit),M(n.tabletDistance,n.tabletUnit),M(n.phoneDistance,n.phoneUnit))};if(r){let p=b=>b?"1":"0",f={...l,...n.desktop?{}:{[Oe.on]:"0"},...i(Oe.on,p(n.desktop),p(n.tablet),p(n.phone)),[Oe.length]:String(n.desktopScreens),...i(Oe.length,String(n.desktopScreens),String(n.tabletScreens),String(n.phoneScreens)),...ZC(n.desktop&&n.desktopScreens===0,n.tablet&&n.tabletScreens===0,n.phone&&n.phoneScreens===0,i)},m=hh(Ji(!0),"track",{end:rl(e.stickEnd)});return{attrs:m.attrs,style:{...f,...m.style}}}let u=p=>p?"sticky":"static",d={...l,...n.desktop?{}:{[Oe.position]:"static"},...i(Oe.position,u(n.desktop),u(n.tablet),u(n.phone))};return{attrs:hh(Ji(!0),"stick",s?{above:s}:{}).attrs,style:d}}function ZC(e,t,n,o){let a=[[Oe.stick,GC],[Oe.trackPosition,zC]],[s,r,i]=[e,t,n].map(WC);return Object.fromEntries(a.flatMap(([l,u])=>[...e?[[l,s[u]]]:[],...Object.entries(o(l,s[u],r[u],i[u]))]))}import{parseOption as JC}from"efficient-shell/format";var QC=["column","row","tabs","accordion"];var eO={column:"Stacked",row:"One row",tabs:"Tabs",accordion:"Accordion"},Ih={Flex:QC,HeroGroup:["column","row"]},tO={Flex:"row",HeroGroup:"column"},nO={column:"flex-col",row:"flex-row",tabs:"flex-col",accordion:"flex-col"};function Ua(e,t){return JC(Ih[e],tO[e],t)}function z2(e,t){return nO[Ua(e,t)]}function Nh(e){return Ih[e].map(t=>({label:eO[t],value:t}))}import{viewKeyAt as ul}from"efficient-easel/screen/lib/content/view-tiers";import{BORDER_WIDTH_MAX as Ga}from"efficient-easel/screen/lib/content/style-keys";var oO=["solid","dashed","dotted"],za=["top","right","bottom","left"],Y2="sf-section-border",X2="sf-section-border-self",aO=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,sO=e=>typeof e=="number"&&Number.isFinite(e)?`${Math.min(Ga,Math.max(0,Math.round(e)))}px`:void 0,Zn={kind:"border",unitKey:"sectionBorderUnit"},q2=zt(Zn);function Z2(e){let t=Zn.unitKey;return{desktop:e[ul(t,"desktop")],tablet:e[ul(t,"tablet")],phone:e[ul(t,"mobile")]}}var Lh=(e,t)=>t==="px"?sO(e):typeof e=="number"&&Number.isFinite(e)?M(Math.max(0,e),t):void 0;function $a(e,{phone:t=!1,tablet:n=!1,unit:o}={}){if(!e||typeof e!="object")return;let a=t?"-phone":n?"-tablet":"",s={},r=F(o);for(let i of za){let l=Lh(e[i],r)??Lh(e.width,r);l!==void 0&&(s[`--sf-border-${i}-width${a}`]=l)}return typeof e.style=="string"&&oO.includes(e.style)&&(s[`--sf-border-style${a}`]=e.style),typeof e.color=="string"&&aO.test(e.color)&&(s[`--sf-border-color${a}`]=e.color.toLowerCase()),Object.keys(s).length?s:void 0}function dl(e){let{width:t,...n}=e;return typeof t!="number"?e:{...n,...Object.fromEntries(za.map(o=>[o,n[o]??t]))}}function J2(e,t,n,o={}){let a=$a(e,{unit:o.desktop}),s=$a(n,{tablet:!0,unit:o.tablet}),r=$a(n,{phone:!0,unit:o.tablet}),i=$a(t,{phone:!0,unit:o.phone}),l=r||i?{...r,...i}:void 0;return a||s||l?{...a,...s,...l}:void 0}import{parseHexColor as rO}from"efficient-shell/format";var fn="var(--section-bg)",pl="inherit";function fl(e,t){return e===pl?fn:e===void 0?t:Wa(e)}var iO=/var\(\s*--(surface-2|surface|line)\s*(?=[,)])/g;function Wa(e){let t=Re(e);return t?Me(t):e.replace(iO,"var(--site-$1")}var lO={"var(--section-bg)":"band","var(--site-surface)":"surface","var(--site-surface-2)":"surface2"};function ml(e,t,n){let o=fl(e,t);if(!o||o==="transparent")return n.background.toLowerCase();let a=o.trim(),s=a.startsWith("#")?rO(a):null;if(s)return s.toLowerCase();let r=lO[a.replace(/\s+/g,"")];return(r?n[r]:n.background).toLowerCase()}var hl="transparent";function Dh(e,t){let n=fl(e,t);return!n||n===hl?"none":n===fn?"band":null}function Fh(e,t,n=t){let o=s=>!s||s==="transparent",a=fl(e,t);return a===n||o(a)&&o(n)}var Bh=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],Hh={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},mn="var(--wheel-stage)",Ka="transparent",Jn="inherit";function az(e,t){return Wa(gl(e,t))}function gl(e,t){return e===Jn?mn:e==null?t:e===!0?mn:e===!1?Ka:e}function sz(e){return typeof e=="string"&&e!==Jn?Wa(e):mn}function rz(e){return e!==Ka&&e!=="none"&&e!==""}function Mh(e,t){return e===Jn||e===!0?!0:e==null?t===mn:!1}var Uh="inherit",ja="fixed",$h=e=>typeof e!="number"&&e!==ja,cO="var(--sf-heading-max, 9999px)";function cz(e,t,n,o,a){if(typeof e=="number")return M(e,a);if(e===ja)return t;let s=o?`var(--size-${o}, ${t})`:t;return n==="heading"?`min(${s}, ${cO})`:s}var bl={kind:"fontSize",unitKey:"titleSizeUnit"},yl={kind:"fontSize",unitKey:"bodySizeUnit"},uO=["desktop","mobile"],uz=[bl,yl].flatMap(e=>zt(e,uO));function dz(e){let t=(n,o)=>Vc(e,n,o);return{titleDesktop:t(bl,"desktop"),titleMobile:t(bl,"mobile"),bodyDesktop:t(yl,"desktop"),bodyMobile:t(yl,"mobile")}}var dO=["page","full"],Gh=["full","page"],Nt={full:"Full",page:"Content"},Sl="inherit",pO=e=>typeof e=="string"&&dO.includes(e),fO=e=>e===Sl;function mO(e,t){return fO(e.widthMode)?{mode:"full",inherited:!0}:pO(e.widthMode)?{mode:e.widthMode,inherited:!1}:{mode:t,inherited:t==="full"}}function gz(e){return mO(e,"page").mode==="full"}var hO={CustomHTML:"rawMarkup",Hero:"hero",HeroSingle:"hero",IntroBleed:"scrollOver",SpecStrip:"background",Timeline:"background",Footprint:"background",Prose:"background",ParagraphsA:"background",Cards:"background",KeyFeatures:"background",Chart:"background",Mockup:"background",Testimonials:"background",TitleWithButtons:"background",Countdown:"background",DocMasthead:"background",DocBody:"background",DocMetaCards:"background",Gallery:"background",GalleryB:"background",Reviews:"background",ReviewForm:"background",Form:"background",AppointmentBooking:"background",FAQ:"background",Events:"background",Split:"both",Breadcrumb:"both",Collections:"both",CatalogFilterBar:"both",AlloyWheelsListing:"both",Banner:"contained",Stats:"contained",Logos:"contained",Divider:"contained",OrderSummary:"contained",DeliveryOptions:"contained",PaymentBadges:"contained",CheckoutCTA:"contained",Flex:"contained",Grid:"contained",ContactCards:"contained",MessagingCards:"contained",OpeningHours:"contained",RateTable:"contained",Manifesto:"contentColumn",SectionHeader:"contentFull",ProductHero:"contentFull",ProductGrid:"productGrid",TimelineTrack:"capped",DetailRows:"capped",FitmentTable:"capped",TyreSizes:"capped",TyreFitment:"capped",EuTyreLabel:"capped",BundleOffer:"capped",CompatibleTyres:"capped",RelatedProducts:"capped",ProcessSteps:"capped",StatsParagraph:"capped",Masthead:"capped",FeaturedCover:"capped",LongRead:"capped",Series:"capped",ContactLocations:"capped",FitmentFinder:"capped",SpecTable:"capped",Subscribe:"capped",SubscribeBlogs:"capped",ContactRouting:"capped",SubmitBuild:"capped"};function bz(e){return ge(hO,e)}var ne={background:"sectionBackgroundWidth",content:"sectionContentWidth",contentMax:"sectionContentMax",contentMaxUnit:"sectionContentMaxUnit"},yz={kind:"size",unitKey:ne.contentMaxUnit};function gO(e){let t=e[ne.contentMaxUnit],n=F(t),o=e[ne.contentMax],a=n==="px"?$p(o):typeof o=="number"&&Number.isFinite(o)&&o>0?o:null,s=hn(e[ne.content])??(a===null?null:"content");return{background:hn(e[ne.background]),content:s,contentMax:s==="content"?a:null,contentMaxUnit:n}}function Sz(e){let t=gO(e);return t.content===null&&e.fullWidth===!0?{...t,content:"full"}:t}function _z(e){return e.background!==null||e.content!==null}var Ez=e=>({[ne.background]:e}),Tz=e=>e==="full"?{[ne.content]:e,[ne.contentMax]:void 0,[ne.contentMaxUnit]:void 0}:{[ne.content]:e},xz=e=>({[ne.content]:"content",[ne.contentMax]:e}),vz=e=>e==="background"?{[ne.background]:void 0}:{[ne.content]:void 0,[ne.contentMax]:void 0,[ne.contentMaxUnit]:void 0},zh="siteWidths",bO=e=>e==="full"||e==="content";function hn(e){return bO(e)?e:null}function wz(e,t){return{[zh]:{background:hn(e),content:hn(t)}}}function Cz(e){let t=e.editor?.metadata?.[zh];return{background:hn(t?.background),content:hn(t?.content)}}import{useEaselSession as $P}from"efficient-easel/screen/lib/session-context";import{BOX_GAP as GP,describedAs as lt,group as Ee,iconOf as Dt,sharedStyleKinds as ro}from"efficient-easel/screen/lib/document/box-fields";import{VIEW_KEY_ACCESS as Cg,onDesktopWords as Ft,phoneTwinFields as Rl,saidAlignmentGrid as zP,useLengthUnit as WP}from"efficient-easel/screen/lib/document/box-fields";import{createElement as de}from"react";import{SettingsDefaultReset as yO,SettingsField as Wh}from"efficient-easel/panel";import{boxFieldBuilders as SO,describedAs as Kh,iconOf as jh,onDesktopWords as _O}from"efficient-easel/screen/lib/document/box-fields";import{LENGTH_KIND_UNITS as EO}from"efficient-easel/screen/lib/content/length-units";import{IconPicker as TO,PictureTiles as xO,Tooltip as vO,useShellStrings as wO}from"efficient-shell/ui";import{RotateIcon as CO}from"efficient-easel/icons";var Vh=e=>c(e),Qn=EO,q=SO(Vh,{lengthUnits:Qn}),Be=q.slider,Q=q.select,eo=q.Segmented,gn=q.segmented,Fz=q.alignmentField,Bz=q.alignmentFields,Hz=q.blockAlignmentField,Mz=q.blockAlignmentFields,Uz=q.boxJustifyField,$z=q.boxAlignField,Gz=q.boxWrapField,Yh=q.directionField,Va=q.gapField,zz=q.placementField,Wz=q.PlacementGridView,Kz=q.positionFields,jz=q.sidesPaddingFields,to=q.lengthUnitFields;function Vz(e,t){return Be("Angle",de(CO),bo.min,bo.max,bo.step,e,"\xB0",t)}var _l=Symbol("efficient-web-builder.picture-picker-row"),OO={width:"3.5rem",height:"2.75rem",words:!0};function PO({value:e}){return wO().iconNames[e]??e}function El(e,t,n){return de(vO,{content:n,className:"sf-pick-tip",children:de("span",{className:"sf-pick"},de("span",{className:"sf-pick-pic"},e),de("span",{className:"sf-pick-cap"},t))})}function kO(e){let t=n=>n.label===void 0?de(PO,{value:n.value}):c(n.label);return e.map(n=>({value:n.value,...n.label===void 0?{}:{label:c(n.hint??n.label)},icon:El(n.picture,t(n),n.hint===void 0?t(n):c(n.hint))}))}function Xh(e,t){return de("span",{className:"sf-pick"},de("span",{className:"sf-pick-pic"},e),de("span",{className:"sf-pick-cap sf-pick-cap-closed"},t))}function Yz(e,t,n,o){let a=r=>n.some(i=>i.value===r),s=n.map(r=>({value:r.value,label:r.label}));return{type:"custom",...Kh({},{type:"radio",label:e,options:s}),options:s,render:r=>{let i=r.field?.currentValue,l=a(r.value)?r.value:a(i)?i:o;return de(Wh,{label:c(e),icon:jh(t)},de(xO,{label:c(e),captions:!0,columns:n.length,className:"sf-tiles-row",value:l,onChange:u=>{r.readOnly!==!0&&r.onChange(u)},options:n.map(u=>({value:u.value,label:c(u.label),picture:u.picture}))}))}}}function Tl(e,t,n,o,a={}){let s=l=>n.some(u=>u.value===l),r=l=>a.resolve?a.resolve(l):s(l)?l:void 0,i=n.map(l=>({value:l.value,...l.label===void 0?{}:{label:l.label},...l.showWhen?{showWhen:l.showWhen}:{}}));return{type:"custom",[_l]:!0,...Kh({},{type:"radio",label:e,options:i}),options:i,render:l=>{let{value:u,onChange:d,field:p}=l,f=p?.options,m=kO(n.filter(v=>!f||f.some(w=>w.value===v.value))),b="follows"in l,y=b?r(a.phoneRest?a.phoneRest(l.follows):l.follows)??o:void 0,E=p?.currentValue,S=r(u)??y??r(E)??o,T=u!=null&&u!=="",x=y===void 0?void 0:n.find(v=>v.value===y);return de(Wh,{label:c(e),icon:jh(t),action:b?de(yO,{words:P()?.panel,label:c(e),changed:T,detail:x?.label!==void 0?_O(Vh,c(x.label),l.followsView):void 0,disabled:l.readOnly===!0,onReset:()=>d(void 0)}):void 0},de(TO,{label:c(e),value:S,options:m,onChange:d,columns:a.columns,cell:a.cell??OO,tooltips:!1,disabled:l.readOnly===!0}))}}}import{VIEW_ABOVE as wl}from"efficient-easel/screen/lib/content/length-units";import{jsx as h,jsxs as R}from"react/jsx-runtime";import{NoSymbolIcon as HO}from"efficient-easel/icons";import{useId as MO}from"react";import{parseOption as qh}from"efficient-shell/format";var AO="line",RO=[{label:"None",value:"none"},{label:"Line",value:"line"},{label:"Stripes \xB7 fine",value:"stripes-fine"},{label:"Stripes \xB7 medium",value:"stripes-medium"},{label:"Stripes \xB7 bold",value:"stripes-bold"}],xl={"stripes-fine":{ink:4,period:12},"stripes-medium":{ink:8,period:18},"stripes-bold":{ink:14,period:28}},Zz=28,IO="-45deg",NO="color-mix(in oklab, var(--accent) 50%, var(--bg))";function LO(e){return e!=="line"&&e!=="none"}var DO={sm:24,md:48,lg:80},FO="md",BO=Object.keys(DO);function Jz(e){return qh(BO,FO,e)}function Qz(e){return qh(RO,AO,e)}function eW(e){if(!LO(e))return null;let{ink:t,period:n}=xl[e];return`repeating-linear-gradient(${IO}, ${NO} 0 ${t}px, transparent ${t}px ${n}px)`}var tW={kind:"border",unitKey:"thicknessUnit"},nW={kind:"size",base:"%",unitKey:"lengthPctUnit"};var Ya=44,Xa=28;function A({children:e}){return h("svg",{width:Ya,height:Xa,viewBox:`0 0 ${Ya} ${Xa}`,"aria-hidden":"true",fill:"currentColor",stroke:"currentColor",strokeWidth:1.25,children:e})}var _=({x:e,y:t,w:n,t:o=2,faint:a=!1})=>h("rect",{x:e,y:t,width:n,height:o,rx:o/2,stroke:"none",opacity:a?.45:1}),N=({x:e,y:t,w:n,h:o})=>h("rect",{x:e,y:t,width:n,height:o,rx:2,fill:"none"}),he=({x:e,y:t})=>h("circle",{cx:e,cy:t,r:1.75,stroke:"none"}),ee=({x1:e,y1:t,x2:n,y2:o})=>h("line",{x1:e,y1:t,x2:n,y2:o});function vl(e){let t=20/sn,n=5,o=1,a=[],s=0,r=0,i=0;for(let[d,p]of e)s+d>sn&&(r+=i*(n+o),s=0,i=0),a.push({x:12+s*t,y:r,w:d*t-o,h:p*n+(p-1)*o}),s+=d,i=Math.max(i,p);let l=r+i*(n+o)-o,u=(Xa-l)/2;return h(A,{children:a.map((d,p)=>h("rect",{x:d.x,y:u+d.y,width:d.w,height:d.h,rx:1,stroke:"none",opacity:.6},p))})}var cW={bars:R(A,{children:[h(_,{x:8,y:14,w:5,t:10}),h(_,{x:16,y:8,w:5,t:16}),h(_,{x:24,y:18,w:5,t:6}),h(_,{x:32,y:11,w:5,t:13})]}),line:R(A,{children:[h("polyline",{points:"6,22 14,15 22,18 30,8 38,11",fill:"none",strokeWidth:1.75,strokeLinejoin:"round"}),h(ee,{x1:6,y1:25,x2:38,y2:25})]}),donut:R(A,{children:[h("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,opacity:.45}),h("circle",{cx:22,cy:14,r:9,fill:"none",strokeWidth:5,strokeDasharray:"34 57",transform:"rotate(-90 22 14)"})]})};function uW(e){if(e==="none")return h("span",{style:{display:"flex",width:Ya,height:Xa,alignItems:"center",justifyContent:"center"},children:h(HO,{size:20})});if(e==="line")return h(A,{children:h(ee,{x1:4,y1:14,x2:40,y2:14})});let{ink:t,period:n}=xl[e],o=.4,a=[];for(let s=-12;s<Ya;s+=n*o)a.push(h("polygon",{points:`${s},22 ${s+t*o},22 ${s+t*o+10},6 ${s+10},6`,stroke:"none"},s));return h(UO,{children:a})}function UO({children:e}){let t=`sf-div-${MO().replace(/[^\w-]/g,"")}`;return R(A,{children:[h("clipPath",{id:t,children:h("rect",{x:4,y:6,width:36,height:16,rx:2})}),h("g",{clipPath:`url(#${t})`,children:e})]})}var qa=({x:e,y:t,w:n,h:o})=>h("rect",{x:e,y:t,width:n,height:o,rx:2,stroke:"none",opacity:.3}),dW={tabs:R(A,{children:[h(_,{x:5,y:10,w:9}),h(_,{x:18,y:10,w:9,faint:!0}),h(_,{x:31,y:10,w:9,faint:!0}),h(ee,{x1:4,y1:17,x2:40,y2:17}),h(_,{x:4,y:16,w:11,t:2})]}),largeTabs:R(A,{children:[h(ee,{x1:4,y1:5,x2:40,y2:5}),h(he,{x:7,y:10}),h(_,{x:11,y:9,w:16}),h(_,{x:31,y:9,w:9,faint:!0}),h(ee,{x1:4,y1:14,x2:40,y2:14}),h(he,{x:7,y:19}),h(_,{x:11,y:18,w:13,faint:!0}),h(_,{x:31,y:18,w:9,faint:!0}),h(ee,{x1:4,y1:23,x2:40,y2:23})]})},pW={card:R(A,{children:[h(N,{x:10,y:3,w:24,h:22}),h(qa,{x:12,y:5,w:20,h:10}),h(_,{x:13,y:18,w:16}),h(_,{x:13,y:21,w:11,t:1.5,faint:!0})]}),cover:R(A,{children:[h(qa,{x:10,y:3,w:24,h:22}),h(N,{x:10,y:3,w:24,h:22}),h(_,{x:13,y:17,w:16}),h(_,{x:13,y:21,w:11,t:1.5})]})},fW={cards:R(A,{children:[h(N,{x:3,y:5,w:11,h:18}),h(N,{x:17,y:5,w:11,h:18}),h(N,{x:31,y:5,w:11,h:18}),h(_,{x:5,y:9,w:7}),h(_,{x:19,y:9,w:7}),h(_,{x:33,y:9,w:7}),h(_,{x:5,y:13,w:5,t:1.5,faint:!0}),h(_,{x:19,y:13,w:5,t:1.5,faint:!0}),h(_,{x:33,y:13,w:5,t:1.5,faint:!0})]}),"label-only":R(A,{children:[h("path",{d:"M8.5 7l3 3-3 3-3-3zM22.5 7l3 3-3 3-3-3zM36.5 7l3 3-3 3-3-3z",stroke:"none"}),h(_,{x:5,y:18,w:7}),h(_,{x:19,y:18,w:7}),h(_,{x:33,y:18,w:7})]})},mW={table:R(A,{children:[h(N,{x:3,y:5,w:38,h:18}),h(ee,{x1:15.7,y1:5,x2:15.7,y2:23}),h(ee,{x1:28.3,y1:5,x2:28.3,y2:23}),h("path",{d:"M15.7 5v18M28.3 5v18",fill:"none",strokeWidth:2.5}),h(_,{x:6,y:9,w:6,t:3}),h(_,{x:19,y:9,w:6,t:3}),h(_,{x:31,y:9,w:6,t:3}),h(_,{x:6,y:18,w:7,t:1.5,faint:!0}),h(_,{x:19,y:18,w:7,t:1.5,faint:!0}),h(_,{x:31,y:18,w:7,t:1.5,faint:!0})]}),list:R(A,{children:[h(ee,{x1:3,y1:7,x2:13,y2:7}),h(ee,{x1:17,y1:7,x2:27,y2:7}),h(ee,{x1:31,y1:7,x2:41,y2:7}),h(_,{x:3,y:11,w:6,t:3}),h(_,{x:17,y:11,w:6,t:3}),h(_,{x:31,y:11,w:6,t:3}),h(_,{x:3,y:17,w:8,t:1.5,faint:!0}),h(_,{x:17,y:17,w:8,t:1.5,faint:!0}),h(_,{x:31,y:17,w:8,t:1.5,faint:!0})]})},hW={plain:R(A,{children:[h(_,{x:5,y:12,w:9,t:4}),h(_,{x:18,y:12,w:9,t:4}),h(_,{x:31,y:12,w:9,t:4})]}),cards:R(A,{children:[h(N,{x:3,y:7,w:11,h:14}),h(N,{x:17,y:7,w:11,h:14}),h(N,{x:31,y:7,w:11,h:14}),h(_,{x:5,y:13,w:7}),h(_,{x:19,y:13,w:7}),h(_,{x:33,y:13,w:7})]}),marks:R(A,{children:[h(_,{x:8,y:12,w:6,t:4}),h(_,{x:17,y:12,w:6,t:4}),h(_,{x:26,y:12,w:6,t:4}),h(_,{x:35,y:12,w:3,t:4})]}),chips:R(A,{children:[h(N,{x:3,y:9,w:18,h:10}),h(N,{x:23,y:9,w:18,h:10}),h(he,{x:7,y:14}),h(_,{x:10,y:13,w:8}),h(he,{x:27,y:14}),h(_,{x:30,y:13,w:8})]})},gW={overlay:R(A,{children:[h(qa,{x:4,y:3,w:36,h:22}),h(N,{x:4,y:3,w:36,h:22}),h(_,{x:8,y:15,w:18,t:3}),h(_,{x:8,y:20,w:12})]}),stacked:R(A,{children:[h(_,{x:4,y:3,w:18,t:3}),h(_,{x:4,y:8,w:12}),h(qa,{x:4,y:13,w:36,h:12}),h(N,{x:4,y:13,w:36,h:12})]})},bW={split:R(A,{children:[h(_,{x:4,y:6,w:12,t:3}),h(_,{x:4,y:11,w:9,faint:!0}),h(ee,{x1:20,y1:4,x2:20,y2:24}),h(_,{x:24,y:6,w:16}),h(_,{x:24,y:10,w:11,faint:!0}),h(_,{x:24,y:17,w:16}),h(_,{x:24,y:21,w:11,faint:!0})]}),spine:R(A,{children:[h(ee,{x1:9,y1:4,x2:9,y2:24}),h(he,{x:9,y:8}),h(_,{x:14,y:7,w:24}),h(he,{x:9,y:14}),h(_,{x:14,y:13,w:20}),h(he,{x:9,y:20}),h(_,{x:14,y:19,w:24})]}),alternating:R(A,{children:[h(ee,{x1:22,y1:4,x2:22,y2:24}),h(he,{x:22,y:8}),h(_,{x:4,y:7,w:14}),h(he,{x:22,y:14}),h(_,{x:26,y:13,w:14}),h(he,{x:22,y:20}),h(_,{x:4,y:19,w:14})]}),track:R(A,{children:[h(ee,{x1:4,y1:12,x2:40,y2:12}),h(he,{x:8,y:12}),h(he,{x:22,y:12}),h(he,{x:36,y:12}),h(_,{x:4,y:17,w:8}),h(_,{x:18,y:17,w:8}),h(_,{x:32,y:17,w:8}),h(_,{x:4,y:21,w:6,faint:!0}),h(_,{x:18,y:21,w:6,faint:!0}),h(_,{x:32,y:21,w:6,faint:!0})]})},yW={standard:R(A,{children:[h(_,{x:4,y:5,w:10,t:1.5,faint:!0}),h(_,{x:4,y:10,w:28,t:4}),h(_,{x:4,y:18,w:34,faint:!0}),h(_,{x:4,y:22,w:24,faint:!0})]}),editorial:R(A,{children:[h(_,{x:4,y:5,w:5,t:1.5,faint:!0}),h(_,{x:4,y:10,w:20,t:5}),h(_,{x:28,y:11,w:12,faint:!0}),h(_,{x:28,y:15,w:9,faint:!0}),h(ee,{x1:4,y1:22,x2:40,y2:22})]}),simple:R(A,{children:[h(_,{x:4,y:8,w:10,t:1.5,faint:!0}),h(_,{x:4,y:13,w:26,t:4})]}),statement:R(A,{children:[h(_,{x:4,y:6,w:36,t:7}),h(_,{x:4,y:16,w:24,t:7})]}),natural:R(A,{children:[h(_,{x:4,y:8,w:22,t:3}),h(_,{x:4,y:15,w:34,faint:!0}),h(_,{x:4,y:19,w:28,faint:!0})]}),essay:R(A,{children:[h(_,{x:4,y:5,w:24,t:4}),h(_,{x:4,y:13,w:36,faint:!0}),h(_,{x:4,y:17,w:36,faint:!0}),h(_,{x:4,y:21,w:30,faint:!0})]})},SW={"spec-card":R(A,{children:[h(N,{x:4,y:3,w:36,h:22}),h(_,{x:8,y:7,w:14}),h(N,{x:8,y:12,w:8,h:9}),h(N,{x:18,y:12,w:8,h:9}),h(N,{x:28,y:12,w:8,h:9})]}),fitment:R(A,{children:[h(N,{x:4,y:4,w:10,h:5}),h(N,{x:16,y:4,w:10,h:5}),h(N,{x:28,y:4,w:10,h:5}),h(_,{x:4,y:14,w:34,faint:!0}),h(_,{x:4,y:18,w:34,faint:!0}),h(_,{x:4,y:22,w:34,faint:!0})]}),portal:R(A,{children:[h(N,{x:4,y:3,w:36,h:22}),h(_,{x:8,y:7,w:10,t:4}),h(_,{x:8,y:14,w:16,faint:!0}),h(_,{x:26,y:18,w:10,t:4})]}),kanban:R(A,{children:[h(N,{x:4,y:3,w:10,h:22}),h(N,{x:17,y:3,w:10,h:22}),h(N,{x:30,y:3,w:10,h:22}),h(_,{x:6,y:6,w:6,t:4}),h(_,{x:6,y:12,w:6,t:4}),h(_,{x:19,y:6,w:6,t:4}),h(_,{x:32,y:6,w:6,t:4}),h(_,{x:32,y:12,w:6,t:4})]}),claims:R(A,{children:[h(_,{x:4,y:5,w:12,faint:!0}),h(_,{x:20,y:4,w:18,t:4}),h(_,{x:4,y:12,w:12,faint:!0}),h(_,{x:20,y:11,w:10,t:4}),h(_,{x:4,y:19,w:12,faint:!0}),h(_,{x:20,y:18,w:14,t:4})]}),browser:R(A,{children:[h(N,{x:4,y:3,w:36,h:22}),h(ee,{x1:4,y1:8,x2:40,y2:8}),h(_,{x:8,y:11,w:28,t:5,faint:!0}),h(N,{x:8,y:18,w:8,h:4}),h(N,{x:18,y:18,w:8,h:4}),h(N,{x:28,y:18,w:8,h:4})]}),terminal:R(A,{children:[h(N,{x:4,y:3,w:36,h:22}),h("polyline",{points:"8,9 11,11 8,13",fill:"none"}),h(_,{x:13,y:10,w:14}),h(_,{x:8,y:16,w:22,faint:!0}),h(_,{x:8,y:20,w:16,faint:!0})]})},Zh={width:"5.75rem",height:"3.75rem",words:!0},_W={width:"8.5rem",height:"3.75rem",words:!0},EW={columns:R(A,{children:[h(N,{x:3,y:4,w:11,h:8}),h(N,{x:17,y:4,w:11,h:8}),h(N,{x:31,y:4,w:11,h:8}),h(_,{x:3,y:16,w:9}),h(_,{x:17,y:16,w:9}),h(_,{x:31,y:16,w:9}),h(_,{x:3,y:20,w:7,t:1.5,faint:!0}),h(_,{x:17,y:20,w:7,t:1.5,faint:!0}),h(_,{x:31,y:20,w:7,t:1.5,faint:!0})]}),"rows-left":R(A,{children:[h(N,{x:6,y:3,w:14,h:9}),h(_,{x:24,y:5,w:14}),h(_,{x:24,y:9,w:10,t:1.5,faint:!0}),h(N,{x:24,y:16,w:14,h:9}),h(_,{x:6,y:18,w:14}),h(_,{x:6,y:22,w:10,t:1.5,faint:!0})]}),"rows-right":R(A,{children:[h(N,{x:24,y:3,w:14,h:9}),h(_,{x:6,y:5,w:14}),h(_,{x:6,y:9,w:10,t:1.5,faint:!0}),h(N,{x:6,y:16,w:14,h:9}),h(_,{x:24,y:18,w:14}),h(_,{x:24,y:22,w:10,t:1.5,faint:!0})]})};import{TEXT_CONTROL_KINDS as bK,SCALAR_TEXT_CONTROLS as yK}from"efficient-easel/draw";function Bt(e,t){return c("{value} from {from}",{value:e,from:t})}function KP(){let{blockGap:e}=B();return e===null?c("this container's own spacing"):Bt(`${e}px`,c("Styles"))}function jP({inherited:e,onReset:t,label:n}){return g(oe,{words:P()?.panel,label:c(n),changed:!e,detail:KP(),onReset:t})}function VP(e){return Va({...GP,builtIn:qt[e],resolve:(t,n)=>vn(e,t,n?.siteGap),action:(t,n)=>g(jP,{inherited:!Ao(e,t),onReset:()=>n(void 0),label:"Gap"}),mark:{[ko]:e}})}function YP(e){return le(te("mobile",{[ko]:e,type:"custom",render:t=>g(ZP,{container:e,...t})}),Og)}function XP(e){return le(te("tablet",{[ko]:e,type:"custom",render:t=>g(qP,{container:e,...t})}),Og)}var Og={not:{field:"gap",in:Array.from({length:-$e.min},(e,t)=>$e.min+t)}};function lK(e){return{gap:te("desktop",VP(e)),[Fl("gap")]:XP(e),[it("gap")]:YP(e)}}function qP({container:e,...t}){let[n]=Pe("gap"),{siteGap:o}=t.field??{},a=Math.max(Cn.min,vn(e,n,o));return Va({...Cn,builtIn:a,resolve:s=>Je(s)?s:a,action:(s,r)=>g(oe,{words:P()?.panel,label:c("Gap"),changed:Je(s),detail:Ft(i=>c(i),`${a}px`),onReset:()=>r(void 0)})}).render(t)}function ZP({container:e,...t}){let[n]=Pe("gap"),{siteGap:o,siteGapPhone:a}=t.field??{},s=qs(e,void 0,n,o,a);return Va({...Cn,builtIn:s,resolve:r=>qs(e,r,n,o,a),action:(r,i)=>g(oe,{words:P()?.panel,label:c("Gap"),changed:Je(r),detail:Bt(`${s}px`,Xs(e,n,a)?c("Styles"):c("Desktop")),onReset:()=>i(void 0)})}).render(t)}function cK(e){return Yh({offered:Nh(e),fallback:Ua(e,void 0),resolve:t=>Ua(e,t)})}function uK(e,t){return yu(t?Su(e,t):[],t)}function JP({inherited:e,onReset:t,label:n}){return g(oe,{words:P()?.panel,label:c(n),changed:!e,detail:Bt(c("Full"),c("the page")),onReset:t})}function Ht({value:e,onChange:t,label:n,placeholder:o,hint:a,multiline:s,hideable:r=!0,markup:i=!0}){let{text:l,hidden:u}=jO(e),d=no(null),p=no(null),f=T=>t(r?{text:T,hidden:u}:T),m=()=>t({text:l,hidden:!u}),b=r&&u,y=ug(),E=a?ok(a)?g("span",{className:"sf-hint-while-typing",children:c(a)}):c(a):void 0,S=u?c("Show {label} on the slide",{label:c(n)}):c("Hide {label} on the slide",{label:c(n)});return g(K,{label:c(n),icon:g(fP,{}),htmlFor:y,className:b?"is-hidden":void 0,hint:E,action:r?g(Dl,{content:S,children:g(vg,{"aria-pressed":u,"aria-label":S,onClick:m,children:u?g(ng,{name:"eye-off",size:14}):g(ng,{name:"eye",size:14})})}):void 0,children:Ke("div",{className:"sf-copybox",children:[i&&g(Ci,{target:s?p:d,value:l,onChange:f}),s?g("textarea",{id:y,ref:p,value:l,placeholder:o===void 0?void 0:c(o),onChange:T=>f(T.target.value)}):g("input",{id:y,ref:d,type:"text",value:l,placeholder:o===void 0?void 0:c(o),onChange:T=>f(T.target.value)})]})})}function dK(e,t){return{...e,[qO]:t}}function pK(e){let t=e[je];if(!t)throw new Error("withOffPage: the field holds no authored text");return{...e,[je]:{...t,offPage:!0}}}function fK(e){return!e||typeof e!="object"?!1:e[je]?.offPage===!0}function Hl(e){if(!e[je])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[dr]:!0}}function mK(e){return $o(e)}function hK(e){let t=e[je];if(!t)throw new Error("withIdentifier: the field holds no authored text");return{...e,[je]:{...t,identifier:!0}}}function SK(e,t){if(!e[je])throw new Error("inOwnBox: the field holds no authored text");let{[LP]:n,...o}=e;return{...o,[ur]:!0,render:t}}var QP=new Set(FP),os={type:"radio",options:[{value:!0},{value:!1}]},Pg={text:{type:"object",objectFields:{text:{type:"text"},hidden:os}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:os}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},Mt=(e,t)=>{let n=lt({...t,[je]:e},{...Pg[e.control],label:e.label});if(!QP.has(e.control))return n;let o=t.render;return{...wg(n,"authored-copy"),render:a=>g(_m,{name:a.name,children:o(a)})}},_K="Everything else on this block comes from the linked post. Unlink it to edit by hand.",ek={field:"source.slug",set:!0},EK={not:ek},tk="Select a word, then press the highlighter.",nk=new Set([tk]),ok=e=>nk.has(e);function ss(e,t,n){return Mt({control:"text",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:e,placeholder:t,hint:n})})}function Ml(e,t,n){return Mt({control:"textarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:e,placeholder:t,hint:n,multiline:!0})})}function bn(e,t,n){return Mt({control:"plainText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:e,placeholder:t,hint:n,hideable:!1,markup:!1})})}function kg(e,t,n){return Mt({control:"copyText",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:e,placeholder:t,hint:n,hideable:!1})})}function TK(e){return{type:"custom",[YO]:{label:e},...lt({},{type:"text",label:e}),render:({value:t,onChange:n})=>g(eh,{value:VO(t),onChange:n,label:e})}}function xK(e,t,n){return Mt({control:"plainTextarea",label:e,placeholder:t,hint:n},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:e,placeholder:t,hint:n,multiline:!0,hideable:!1})})}var vK={Design:ZO,Animation:QO};function wK(e,t){return{type:"custom",render:()=>g(ak,{text:e,values:t})}}function ak({text:e,values:t}){return g("p",{className:"sf-note",children:c(e,t)})}function CK(e){return pg(e)!==null&&e?.tabs!==void 0}var og=new Map;function OK(e,t){let n=`${e}\0${t?t.join(""):""}`,o=og.get(n)??{type:"custom",tabs:t,[dg]:{label:e,level:1},bucket:e,marker:!0,render:()=>g(Ve,{})};return og.set(n,o),o}var ag=new Map;function PK(e){let t=ag.get(e)??{type:"custom",[dg]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>g(Ve,{})};return ag.set(e,t),t}function sk(e){let t=e;return t?.marker===!0&&typeof t.fold=="string"?t.fold:null}function kK(e,t){return sk(e)===t?e:{...e,marker:!0,fold:t,render:()=>g(Ve,{})}}function AK(e){let t=e;if(t.marker===!0&&t.fold===void 0)return e;let{fold:n,...o}=e;return{...o,marker:!0,render:()=>g(Ve,{})}}function RK({title:e,children:t}){let[n,o]=oo(()=>!Cl.has(e));return g(gP,{title:e,open:n,onToggle:a=>{o(a),a?Cl.delete(e):Cl.add(e)},children:t})}var Cl=new Set;function rk({swatches:e,current:t,onPick:n,names:o}){let a=e.find(i=>i.toLowerCase()===t.toLowerCase()),s=a?o?.[a]:void 0,r=s?c(s):t;return Ke("div",{className:"sf-swatches",children:[e.map(i=>{let l=o?.[i]?c(o[i]):i;return g(Dl,{content:l,children:g(wP,{color:i,selected:t.toLowerCase()===i.toLowerCase(),onClick:()=>n(i),"aria-label":l})},i)}),g("span",{className:"sf-swatch-hex",children:r})]})}function IK(e,t,n=!1){return{type:"custom",render:({value:o,onChange:a})=>g(ik,{label:e,builtIn:t,followsBand:n,value:o,onChange:a})}}function ik({label:e,builtIn:t,followsBand:n,value:o,onChange:a}){let s=typeof o=="string"?o:void 0,{colors:r,n:i}=Wl(),l={background:r.background,surface:r.surface,surface2:tu(r),band:nu(r)},u=n?fn:t,d=Fh(s,t,u),p=ml(void 0,u,l),f=n?pl:void 0,m=u===fn?c("the theme's section background"):c("Theme {n} background",{n:i}),b=lk(s,t,r,i,l,a),y=Bt(p.toUpperCase(),m),E=Re(s),S=E?Xt(E,r,i):null;return S?g(Se,{label:c(e),icon:g(Jh,{}),value:S.hex,caption:S.words,onChange:a,changed:!0,onReset:()=>a(f),resetTo:y,choices:b}):g(Pn,{label:c(e),icon:g(Jh,{}),value:d?"":ml(s,t,l),inherited:p,resetTo:y,onChange:a,onReset:()=>a(f),choices:b})}function lk(e,t,n,o,a,s){let r=Dh(e,t);return[{label:c("No fill"),color:"",selected:r==="none",onPick:()=>s(hl)},{label:`${c("Section band")} \xB7 ${a.band.toUpperCase()}`,color:a.band,selected:r==="band",onPick:()=>s(fn)},...zl(Re(e)??"",n,o,s)]}function ck(e,t){return{type:"custom",render:({value:n,onChange:o})=>{let a=n,s=Mh(a,t);return g(K,{label:c(e),icon:g(kl,{}),changed:!s,action:g(oe,{words:P()?.panel,label:c(e),changed:!s,detail:c("the theme's image stage"),onReset:()=>o(Jn)}),children:rk({swatches:Bh,current:s?mn:gl(a,t),onPick:o,names:Hh})})}}}function NK(e=n=>n,t){return ro({_gSectionTheme:Ee(mu),sectionAccent:{type:"custom",render:({value:n,onChange:o})=>g(xd,{value:e(n),onChange:o,followLabel:t})}})}function rs(e){let t=Z(),n=Ws(e?.view),o=r=>Bl(e.valueKey,r),a=e.numbersIn??(r=>O(t[o(r)])!==void 0),s=e.followsView??vk(n,a);return WP({props:{value:void 0,onChange:()=>{},field:{}},row:e.valueKey?e.row:void 0,table:Qn,label:c(e.label),grid:e.grid,hasOwn:a(n),view:{tier:n,numbersIn:a,followsView:s},convertTo:e.convertTo??(r=>{let i=O(t[o(n)]);return i===void 0?{}:{[o(n)]:r(i)}})})}function pe({min:e,max:t,step:n,value:o,onChange:a,suffix:s="",readout:r=!0,notch:i,ariaLabel:l,disabled:u=!1,placeholder:d,placeholderWord:p,onClear:f,units:m,inputMax:b}){let y=i!==void 0&&Number.isFinite(i)&&i>=e&&i<=t;return g("div",{className:y?"sf-slider has-notch":"sf-slider",style:y?{"--sf-notch":(i-e)/(t-e)}:void 0,children:g(IP,{min:e,max:t,step:n,value:o,...o===null&&d!==void 0?{placeholderValue:d}:{},...p?{emptyLabel:c(p)}:{},suffix:s||void 0,...m?{units:m}:{},...b!==void 0?{inputMax:b}:{},showInput:r,label:l===void 0?void 0:c(l),disabled:u,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:E=>{E===null?f?.():E!==o&&a(E)}})})}function uk(e,t){let{min:n,max:o,step:a=1,unsetLabel:s,hint:r,restTrack:i,unsetMark:l,icon:u,unit:d="px"}=t;return{type:"custom",render:({value:p,onChange:f})=>{let m=typeof p=="number"?p:null,b=m===null;return g(K,{label:c(e),icon:u?Dt(u):void 0,value:b?l||s===void 0?void 0:c(s):`${m}${d}`,changed:!b,action:l?Il(l,{changed:!b,onReset:()=>f(null)}):g(oe,{words:P()?.panel,label:c(e),changed:!b,onReset:()=>f(null)}),hint:typeof r=="string"?c(r):r,children:i?i({min:n,max:o,step:a,px:m,label:e,onChange:f}):pe({min:n,max:o,step:a,value:m??n,readout:!1,ariaLabel:e,onChange:f})})}}}var ao="Corners",dk={kind:"radius"};function Ul(e){return{type:"custom",render:t=>{let{value:n,onChange:o}=t,a=typeof n=="number"&&Number.isFinite(n)?n:null,s=a!==null;return g(K,{label:c(ao),icon:g(mg,{}),changed:s,action:Il(e.mark,{changed:s,onReset:()=>o(null)}),hint:e.hint,children:g(pk,{tier:e,px:a,name:t.name,onRadius:o})})}}}function Pe(e){let t=Lt();return[t?.values?.[e],n=>t?.onChange(e,n)]}function Ag(){return wg({type:"custom",render:()=>g(DP,{})},"always")}function cn(){let e=Lt();return t=>e?.onChangeMany(t)}function pk({tier:e,px:t,name:n,onRadius:o}){let a=e.useFollowed(),[s,r]=Pe(e.sidesKey),i=cn(),l=rs({row:e.row??dk,label:ao,grid:{min:ae,max:qe,step:e.step??1},valueKey:n??"",view:"desktop"}),u=De(s)??[...ia];return g(CP,{label:c(ao),value:u,corners:rf,onChange:d=>{let p=De(d)??[];r(p.length===ia.length?null:p)},radius:t,onRadiusChange:l&&n?d=>i({[n]:d,...l.unitPatch(d===null)}):o,radiusMin:l?.grid.min??ae,radiusMax:l?.grid.max??qe,radiusStep:l?.grid.step??e.step??1,radiusPlaceholder:l&&l.unit!=="px"?"\u2013":String(a),...l?{radiusUnit:l.unit,units:l.units}:{}})}function Rg(e,t){return to(e,t)}function Ig(){return Ag()}function fk({label:e,changed:t=!1,onReset:n=()=>{}}){let{cornerRadiusPx:o}=B(),a=typeof o=="number"?`${o}px`:c("not set");return g(oe,{words:P()?.panel,label:c(e),changed:t,detail:o==null?c("the built-in corners"):Bt(a,c("Styles")),onReset:n})}function mk(){let{cornerRadiusPx:e}=B();return typeof e=="number"?e:ae}function hk(){return Ul({sidesKey:"sectionCornerSides",row:Jr,useFollowed:mk,mark:g(fk,{label:ao}),hint:gk})}var gk="Follows Styles \u25B8 Basics \u25B8 Corners until you set a number here.";function LK(){return ro({_gShape:Ee("Shape"),sectionCorners:hk(),...Rg(Jr,"sectionCorners"),sectionCornerSides:Ig(),...ze("sectionBorder",xk),...to(Zn,"sectionBorder",{tablet:!0,phone:!0})})}var bk=()=>({width:c("Border width"),sides:{top:c("Border top"),right:c("Border right"),bottom:c("Border bottom"),left:c("Border left")},style:c("Border style"),styles:{solid:c("Solid"),dashed:c("Dashed"),dotted:c("Dotted")},color:c("Border color"),unit:"px"});function yk(e){let t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""));return Object.keys(t).length?t:void 0}function Sk(){let e;try{let t=ke(B().theme);e=t.themes[t.selected]?.line}catch{e=void 0}return e||qc.line}function _k({value:e,onChange:t,placeholder:n,presets:o,sides:a=!0,styles:s=!0,above:r={},length:i}){let l=e&&typeof e=="object"?e:{},[u,d]=oo(()=>a?EP(l,r):!1),p=bk(),f=m=>yk(a&&s?m:{width:m.width,color:m.color,...s?{style:m.style}:{}});return g(K,{label:c("Border"),icon:g(eP,{}),action:a?g(SP,{each:u,label:c("Each side"),onChange:d}):void 0,children:g(yP,{label:c("Border"),value:l,each:u,onChange:m=>t(f(m)),placeholder:n,presets:o,words:i?{...p,unit:i.unit}:p,styles:s,max:i?.grid.max??Ga,...i?{step:i.grid.step,units:i.units}:{}})})}function Ek({value:e,onChange:t,view:n}){let[o]=Pe("sectionBorder"),[a]=Pe(Fl("sectionBorder")),s=Sk(),r=f=>f&&typeof f=="object"?f:{},i=n==="phone"?{...dl(r(o)),...dl(r(a))}:n==="tablet"?r(o):{},l=Z(),u=cn(),d=U("sectionBorder",n),p=rs({row:Zn,label:"Border",grid:{min:0,max:Ga,step:1},valueKey:"sectionBorder",view:n,numbersIn:f=>Ol(l[Bl("sectionBorder",f)]),convertTo:f=>{let m=r(l[d]);return Ol(m)?{[d]:Tk(m,f)}:{}}});return g(_k,{value:e,length:p,onChange:p?f=>u({[d]:f,...p.unitPatch(!Ol(f))}):t,placeholder:{sides:_P(i),style:i.style??"solid",color:i.color||s},presets:[s],above:i})}var Ng=["width",...za];function Ol(e){if(!e||typeof e!="object")return!1;let t=e;return Ng.some(n=>O(t[n])!==void 0)}function Tk(e,t){let n={...e};for(let o of Ng){let a=O(n[o]);a!==void 0&&(n[o]=t(a))}return n}function xk(e){return{type:"custom",render:({value:t,onChange:n})=>g(Ek,{value:t,onChange:n,view:e})}}function vk(e,t){let n=wl[e];for(;n&&wl[n]!==null&&!t(n);)n=wl[n];return n??e}function DK(e){return{type:"custom",render:()=>g(wk,{partKey:e})}}function wk({partKey:e}){let[t]=Pe("id"),[n]=Pe("_partStyles"),{textStyles:o}=B(),a=UP(),s=null;try{s=BP().select}catch{s=null}let r=n&&typeof n=="object"?n[e]:void 0,i=Array.isArray(o)?o:null;return g(hP,{name:c("Text"),preview:mh(r,i,{noStyle:c("No style"),styleName:a.textStyles.styleName,cases:(a.copy.panel??MP.copy.panel).cases}),onOpen:()=>{s&&typeof t=="string"&&s(HP(t,e))}})}function Lg(e){let{cornerRadiusPx:t}=B(),n=typeof t=="number"?t:e,o=null;try{let{appState:s,selectedItem:r}=as(l=>l),i=r?.props?.id?String(r.props.id):void 0;o=i?am(s?.data,i)?.props??null:null}catch{o=null}if(!o)return n;let a=o.sectionCorners;return Qr(a)?a:n}function Ck({label:e,changed:t=!1,onReset:n=()=>{}}){let o=Lg(ae);return g(oe,{words:P()?.panel,label:c(e),changed:t,detail:Bt(`${o}px`,c("the section")),onReset:n})}function Ok(){return g(Ve,{children:c("Follows the section's Corners until you set a number here.")})}function Pk(){return Ul({sidesKey:"cardCornerSides",row:Mn,useFollowed:()=>Lg(ae),mark:g(Ck,{label:ao}),hint:g(Ok,{})})}function kk(){return{type:"custom",render:()=>g(mf,{})}}function FK(){return{_gShape:Ee("Shape"),cardCorners:Pk(),...Rg(Mn,"cardCorners"),cardCornerSides:Ig(),cardCornersApplyAll:kk()}}function Ak(){return lt({type:"custom",[_l]:!0,render:e=>g(Ik,{...e})},{type:"select",label:ft,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 Rk(e,t){let n=Os(e);if(n!=="custom")return c(Cs.find(a=>a.value===n)?.label??"");let o=xg(So(e,t),t);return o?[...o,100-o.reduce((a,s)=>a+s,0)].join(" / "):c("Custom")}function Ik(e){let{value:t,onChange:n}=e,[o]=Pe("content"),a=Array.isArray(o)?o.length:0,s="follows"in e,r=t!=null,i=r?t:s?e.follows:void 0,l=Os(i),u=a>=2&&a<=eg,d=()=>[...kP[a]??[]],p=no(null),f=S=>{let T=p.current;T&&JSON.stringify(S)===JSON.stringify(T.shares)?n(T.value):S&&n(S)},m=S=>{S===l||S==="custom"&&!u||n(S==="custom"?d():S)},b=c("The width bar works for 2 to {count} blocks.",{count:eg}),y=r&&(s||t!=="content"),E=RP().widths.hint(a,PP);return g(K,{label:c(ft),icon:g(ts,{}),changed:y,hint:l!=="custom"?void 0:u?E:b,action:g(oe,{words:P()?.panel,label:c(ft),changed:y,disabled:e.readOnly===!0,detail:s?Ft(S=>c(S),Rk(e.follows,a),e.followsView):c("Fit content"),onReset:()=>n(void 0)}),children:Ke("div",{className:"sf-share-row",children:[g("div",{className:"sf-share-pick",children:g(Tg,{label:c(ft),value:l,options:Cs.map(S=>({value:S.value,label:S.value==="custom"&&!u?b:c(S.label),icon:El(g("span",{className:"sf-gallery-pic sf-share-pic",children:Dg(S.weights).map((T,x)=>g("i",{style:{gridColumn:`span ${T}`}},x))}),c(S.label),S.value==="custom"&&!u?b:c(S.label))})),onChange:m,columns:3,cell:Fg,tooltips:!1,disabled:e.readOnly===!0})}),l==="custom"&&u?g("div",{onFocus:()=>{p.current={value:t,shares:xg(So(i,a),a)}},onBlur:()=>{p.current=null},children:g(AP,{label:c(ft),count:a,value:So(i,a),onChange:f,readOnly:e.readOnly===!0})}):null]})})}function Dg(e){if(!e)return[3,4];let t=e.reduce((n,o)=>n+o,0);return e.map(n=>Math.round(n/t*12))}function BK(){return Q(Mc,g(rP,{}),As,As[0].value)}function HK(e){return Q("On a phone",g(uP,{}),[{label:"In the header",value:"header"},{label:"In the menu",value:"menu"}],e)}function MK(){return te("mobile",Tl(ft,g(ts,{}),Fc.map(e=>({label:e.label,value:e.value,picture:g("span",{className:"sf-gallery-pic sf-share-pic",children:Dg(e.weights).map((t,n)=>g("i",{style:{gridColumn:`span ${t}`}},n))})})),Bc,{columns:2,cell:Fg}))}var Fg={width:"5.75rem",height:"3.25rem",words:!0};function UK(){return Rl("share",Ak(),Cg)[Fl("share")]}function Nk(){return te("mobile",Be(Ps,g(fg,{}),_o,Dc,1,_o,"",{clear:{phoneFollows:!1,hint:_o}}))}var sg={read:e=>e.phoneRow,write:(e,t,n)=>({phoneRow:n}),fieldKey:()=>"phoneRow",ownField:!0};function $K(){let e=Be(Ps,g(fg,{}),ks,Hc,1,ks,"",{clear:{emptyLabel:"Auto"}}),t=Rl("columns",e,{...sg,tablet:Cg.tablet}),n=Rl("columns",e,sg,{phoneRow:Nk()});return{...t,phoneRow:n.phoneRow}}function GK(e,t,n,o,a,s,r){return{type:"custom",render:({value:i,onChange:l,name:u})=>g(Lk,{label:e,min:t,max:n,step:o,fallback:a,role:s,value:i,onChange:l,name:u??"",length:r})}}function Lk({label:e,min:t,max:n,step:o,fallback:a,role:s,value:r,onChange:i,name:l,length:u}){let d=Z(),p=cn(),f=Ws(u?.view),m=rs({row:u?.row??{kind:"fontSize"},label:e,grid:{min:t,max:n,step:o},valueKey:u?l:"",view:u?.view??"desktop",numbersIn:y=>y===f&&typeof d[l]=="number",followsView:f,convertTo:y=>typeof d[l]=="number"?{[l]:y(d[l])}:{}}),b=y=>m?p({[l]:y,...m.unitPatch(typeof y!="number")}):i(y);return g(K,{label:c(e),icon:g(bi,{noun:s}),action:g(oe,{words:P()?.panel,label:c(e),changed:!$h(r),detail:c("the Text style in Styles"),onReset:()=>b(Uh),defaultAction:{onPress:()=>b(ja),title:c("Keep this section's own built-in size"),icon:g(tP,{})}}),children:pe({min:m?.grid.min??t,max:m?.grid.max??n,step:m?.grid.step??o,value:typeof r=="number"?r:a,...m?{suffix:m.unit,units:m.units}:{suffix:"px"},ariaLabel:e,onChange:b})})}function Ja(e,t,n){return[{label:"Auto",value:""},...Array.from({length:e},(o,a)=>({label:a===0?`1 ${t}`:`${a+1} ${n}`,value:String(a+1)}))]}function zK(){return{_gCellWidth:Ee("Cell size"),gridSpan:te("desktop",Q("Positions",g(ts,{}),Ja(fa,"position","positions"),"")),gridRowSpan:te("desktop",Q("Rows tall",g(ns,{}),Ja(ha,"row","rows"),"")),[fi]:Be("At card",g(bg,{}),1,mi,1,1,""),[it("gridSpan")]:te("mobile",Q("Positions",g(ts,{}),[{label:"Full row",value:""},...Ja(ma,"position","positions").slice(1)],"")),[it("gridRowSpan")]:te("mobile",Q("Rows tall",g(ns,{}),Ja(ha,"row","rows"),""))}}function Z(){let e=null,t=null;try{e=cg(Dk),t=as(n=>n).selectedItem}catch{t=null}return e??t?.props??{}}var Dk=GO(null);function Fk({min:e,max:t,step:n,px:o,label:a,onChange:s,desktopKey:r,fallback:i}){let l=Z()[r],u=Oa(void 0,l,i);return g(Ve,{children:pe({min:e,max:t,step:n,value:Oa(o,l,i),readout:!1,ariaLabel:a,notch:u,onChange:s})})}function Bk({label:e,desktopKey:t,fallback:n,unit:o="px",changed:a=!1,onReset:s=()=>{}}){let r=Z()[t],i=Oa(void 0,r,n);return g(oe,{words:P()?.panel,label:c(e),changed:a,detail:Ft(l=>c(l),`${i}${o}`),onReset:s})}function Hk(e){return uk(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unit:e.unit,unsetLabel:"Follows Desktop",unsetMark:g(Bk,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback,unit:e.unit}),restTrack:t=>g(Fk,{...t,desktopKey:e.desktopKey,fallback:e.fallback})})}var Mk={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},Uk={Top:Nl,Bottom:yg,Left:Sg,Right:_g},$k=e=>{let t=Uk[e];return g(t,{})};function WK(e={}){let t=e.keys?.top??"sectionPaddingTop",n=e.keys?.bottom??"sectionPaddingBottom",o=e.group!==!1,a=E=>Mk[E],s=E=>Be(a("Top"),g(Nl,{}),me.min,me.max,me.step,E,"px"),r=(E,S,T,x=me)=>te("mobile",Hk({label:a(E),icon:$k(E),desktopKey:S,min:x.min,max:x.max,step:x.step,fallback:T})),i=e.top??me.min,l=e.bottom??me.min,u="sectionPaddingLeft",d="sectionPaddingRight",p=e.sideBounds??me,f=e.side??p.min,m=e.sidePhone??f,b=e.phone===!0,y=E=>b?te("desktop",E):E;return ro({...o?{_gSpacing:Ee("Padding")}:{},[t]:y(s(i)),...b?{[it(t)]:r("Top",t,i)}:{},...e.only==="top"?{}:{[n]:y(Be(a("Bottom"),g(yg,{}),me.min,me.max,me.step,l,"px")),...b?{[it(n)]:r("Bottom",n,l)}:{}},...e.sides?{[u]:y(Be(a("Left"),g(Sg,{}),p.min,p.max,p.step,f,"px")),...b?{[it(u)]:r("Left",u,m,p)}:{},[d]:y(Be(a("Right"),g(_g,{}),p.min,p.max,p.step,f,"px")),...b?{[it(d)]:r("Right",d,m,p)}:{}}:{}})}function KK(e,t){let n=Object.fromEntries(Object.entries(t).map(([s,r])=>[s,s in e&&pg(r)?e[s]:r])),o={},a=!1;for(let[s,r]of Object.entries(e)){if(s in t){a||Object.assign(o,n),a=!0;continue}o[s]=r}return a||Object.assign(o,n),o}var Qa="Width";function jK(e,t=Gh,n=!0){let o=t.map(a=>({label:Nt[a],value:a}));return ro({...n?{_gWidth:Ee(Qa)}:{},widthMode:{type:"custom",render:({onChange:a,field:s})=>g(K,{label:c(Qa),icon:g(mP,{}),action:n?g(JP,{inherited:s?.inherited??!1,onReset:()=>a(Sl),label:Qa}):void 0,children:eo({options:o,value:s?.currentValue||e,onChange:a,ariaLabel:Qa})})}})}function VK({fill:e=!1}={}){let t=(a,s)=>({type:"custom",render:({value:r,onChange:i})=>g(Gk,{value:r,onChange:i,view:a,badge:s,fill:e})}),n=()=>Al("sectionHeightMode"),o=()=>Al("sectionHeightMode");return ro({_gHeight:Ee(Yt),...ze("sectionHeightMode",a=>a==="desktop"?t(a):t(a,s=>g(jk,{view:a,onClear:()=>s(void 0)}))),...ze("sectionHeightValue",n),...ze("sectionHeightUnit",o)})}function Gk({value:e,onChange:t,view:n,badge:o,fill:a=!1}){let s=Z(),{mode:r,number:i,unit:l}=zk(n,s,e);return g(K,{label:Yt,icon:Dt(g(ns,{})),action:o?o(t):void 0,children:Ke("div",{className:"es-width-stack",children:[eo({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"},...a?[{label:"Fill",value:"fill"}]:[]],value:r,onChange:t,ariaLabel:Yt}),i?g(Kk,{view:n,mode:r,menu:l}):null]})})}function Bg(e,t){return e==="phone"&&wo(t)?Pu(t):Cu(t)}function is(e,t){return e==="desktop"||(e==="tablet"?wo(t):Ou(t))?null:Bg(e,t)}function zk(e,t,n){let o=(a=>Tu.includes(a))(n)?n:is(e,t)?.mode??"auto";return{mode:o,number:o!=="auto"&&o!=="fill",unit:o==="fixed"}}function Wk(e,t,n,o){let a=is(e,t);return!a||e==="desktop"?null:o===void 0?{}:{[U("sectionHeightMode",e)]:a.mode,...a.mode==="fixed"?{[U("sectionHeightUnit",e)]:a.unit}:{},...n==="sectionHeightUnit"?{[U("sectionHeightValue",e)]:a.value}:{},[U(n,e)]:o}}function rg(e,t,n){let o=Lt(),a=is(e,Z());return!o||!a?{followed:null,write:n}:{followed:a,write:s=>o.onChangeMany(r=>{let i=Wk(e,r,t,s);return i===null?{[U(t,e)]:s}:Object.keys(i).length?i:null})}}function Kk({view:e,mode:t,menu:n}){let o=Lt(),a=Z(),s=U("sectionHeightValue",e),r=U("sectionHeightUnit",e),i=E=>S=>o?.onChangeMany(()=>({[E]:S})),{followed:l,write:u}=rg(e,"sectionHeightValue",i(s)),{write:d}=rg(e,"sectionHeightUnit",i(r)),p=t==="screen"?"%":a[r],f=WO(xu,"px",l?l.unit:p),m=f==="%"?wu:vu,b=a[s],y=n?{options:["px","%"],label:c("Unit"),onChange:E=>d(E)}:void 0;return pe({min:m.min,max:m.max,step:m.step,value:l?null:typeof b=="number"?b:m.fallback,...l?{placeholder:l.value}:{},suffix:f,...y?{units:y}:{},ariaLabel:Yt,onChange:u})}function jk({view:e,onClear:t}){let n=Z(),o=is(e,n)===null,a=e==="phone"&&wo(n),s=Bg(e,n),r=Ft(i=>c(i),s.mode==="auto"?c("Auto"):`${s.value}${s.unit}`,a?"tablet":"desktop");return g(oe,{words:P()?.panel,label:c(Yt),changed:o,detail:r,onReset:t})}function YK(e={}){let t=e.intro===!0,n=s=>({type:"custom",render:({value:r,onChange:i,id:l,name:u})=>g(eA,{value:r,onChange:i,labelId:`${l??u??"stickTop"}-label`,view:s,intro:t})}),o=s=>({type:"custom",render:({value:r,onChange:i})=>g(Zk,{value:r,onChange:i,view:s,intro:t})}),a=s=>({type:"custom",render:({value:r,onChange:i})=>g(Jk,{value:r,onChange:i,view:s,intro:t})});return{_gStick:Ee(yh,{dot:t?qk:il}),...ze("stickTop",n),...ze("stickTopDistance",o),...to(Xn,"stickTopDistance",{tablet:!0,phone:!0}),...e.screens?ze(qn,a):{},...e.screens?{[sl]:Yk()}:{},...t?{}:{[nl]:Vk()},...t||e.above===!1?{}:{[al]:Xk()}}}function Vk(){return Hg(Q(Sh,g(Nl,{}),_h,Eh),Th,ol,xh)}function Yk(){return Hg(Q(Ch,g(hg,{}),Oh,Ph),kh,rl,Ah)}function Hg(e,t,n,o){return te("desktop",{...e,render:a=>{let s=e.render({...a,value:n(a.value),onChange:r=>a.onChange(o(r))});return Il(s,{hint:c(t)})}})}function Xk(){let e=ct(vh,!1,g(Eg,{}),wh);return te("desktop",{...e,render:t=>e.render({...t,onChange:n=>t.onChange(n===!0?!0:void 0)})})}var qk={any:[il,Rh]};function Mg(e,t,n,o,a){let s=Lt(),r=Z(),i=e==="desktop"||so(e,r)?null:$l(e,pn(r,{intro:o}));return{followed:i,write:(i||a)&&s?l=>s.onChangeMany(u=>{let d=Qk(e,u,l,t,o),p=d===null?{[U(t,e)]:l}:d;return Object.keys(p).length?{...p,...a?.(l)??{}}:null}):n}}function Zk({value:e,onChange:t,view:n,intro:o}){let a=Z(),s=pn(a,{intro:o}),r=d=>{let p=vo(d);return p==="desktop"||so(p,a)},i=rs({row:Xn,label:"Distance from top",grid:{min:_e.min,max:_e.max,step:_e.step},valueKey:"stickTopDistance",view:n,numbersIn:d=>r(d)&&O(a[Bl("stickTopDistance",d)])!==void 0,followsView:n==="phone"&&s.ownTablet?"tablet":"desktop"}),{followed:l,write:u}=Mg(n,"stickTopDistance",t,o,i?d=>i.unitPatch(d===void 0):void 0);return g("div",{className:"sf-field",children:pe({min:i?.grid.min??_e.min,max:i?.grid.max??_e.max,step:i?.grid.step??_e.step,value:l?null:typeof e=="number"?e:_e.fallback,...l?{placeholder:l.distance}:{},...i?{suffix:i.unit,units:i.units}:{suffix:"px"},ariaLabel:c("Distance from top"),onChange:u})})}function Jk({value:e,onChange:t,view:n,intro:o}){let{followed:a,write:s}=Mg(n,qn,t,o);return g(K,{label:c(tl),icon:Dt(g(ns,{})),children:pe({min:Za.min,max:Za.max,step:Za.step,value:a?null:O(e)??Za.default,...a?{placeholder:a.screens}:{},ariaLabel:c(tl),onChange:s})})}function so(e,t){return e==="tablet"?ll(t):cl(t)}function $l(e,t){return e==="phone"?{on:t.tablet,distance:t.tabletDistance,unit:t.tabletUnit,screens:t.tabletScreens}:{on:t.desktop,distance:t.desktopDistance,unit:t.desktopUnit,screens:t.desktopScreens}}function Qk(e,t,n,o="stickTopDistance",a=!1){if(e==="desktop"||so(e,t))return null;if(n===void 0)return{};let s=$l(e,pn(t,{intro:a})),r=e==="phone"&&so("tablet",t)?d=>U(d,"tablet"):d=>d,i=(d,p)=>t[r(d)]==null?{}:{[U(d,e)]:p},l=Xn.unitKey,u=t[r(l)]==null?{}:{[U(l,e)]:s.unit};return{[U("stickTop",e)]:!0,...i("stickTopDistance",s.distance),...u,...i(qn,s.screens),[U(o,e)]:n}}function eA({value:e,onChange:t,labelId:n,view:o,intro:a}){let s=Z(),r=pn(s,{intro:a}),i=o==="phone"?r.phone:o==="tablet"?r.tablet:a?r.desktop:e===!0,l=o==="phone"&&r.ownTablet,u=o==="desktop"?null:$l(o,r),d=u?.on?M(u.distance,u.unit):c("Off");return g(K,{label:c(el),labelId:n,icon:Dt(g(Eg,{})),action:Ke(Ve,{children:[o!=="desktop"?g(oe,{words:P()?.panel,label:c(el),changed:so(o,s),detail:Ft(p=>c(p),d,l?"tablet":"desktop"),onReset:()=>t(void 0)}):null,g(Ll,{checked:i,onChange:t,ariaLabelledBy:n})]})})}var ig="e.g. about";function XK(){return{_gAnchor:Ee("Anchor"),anchor:Mt({control:"plainText",label:"Name",placeholder:ig},{type:"custom",render:({value:e,onChange:t})=>g(qf,{value:e,onChange:t,nameBox:(n,o)=>g(Ht,{value:n,onChange:o,label:"Name",placeholder:ig,hideable:!1,markup:!1})})})}}function qK(){return{_gAdvanced:Ee("Advanced"),[hu]:Gl}}var Gl={type:"custom",render:({value:e,onChange:t})=>g(K,{label:c("Custom CSS"),icon:Dt(g(xP,{})),children:g(NP,{"aria-label":c("Custom CSS"),spellCheck:!1,autoGrow:!0,className:"font-mono",value:typeof e=="string"?e:"",onChange:n=>t(n.target.value)})})};function ZK(e,t,n){return{type:"custom",render:({value:o,onChange:a,id:s,name:r})=>{let i=`${s??r??e}-datetime`,l=Date.parse(typeof o=="string"?o:"");return g(K,{label:c(e),icon:t,htmlFor:i,hint:n===void 0?void 0:c(n),children:g(OP,{id:i,value:Number.isFinite(l)?new Date(l):null,onChange:u=>a(u?u.toISOString():"")})})}}}function ct(e,t,n,o){return{type:"custom",...lt({},{...os,label:e}),render:a=>{let{value:s,onChange:r,id:i,name:l}=a,u="follows"in a,d=a,p=typeof s=="boolean",f=typeof d.follows=="boolean"?d.follows:t,m=p?s:u?f:t,b=`${i??l??e}-label`,y=d.readOnly===!0,E=g(Ll,{checked:m,onChange:r,disabled:y,ariaLabelledBy:b});return g(K,{label:c(e),labelId:b,icon:n,hint:o===void 0?void 0:c(o),action:u?Ke(Ve,{children:[g(oe,{words:P()?.panel,label:c(e),changed:p,detail:d.followsNoView?c(f?"On":"Off"):Ft(S=>c(S),c(f?"On":"Off"),d.followsView),disabled:y,onReset:()=>r(void 0)}),E]}):E})}}}function Ug(){return{type:"custom",render:({value:e,onChange:t,id:n,name:o})=>{let a=`${String(n??o??"pageBackground")}-colour`;return g(tA,{label:"Background",icon:g(cP,{}),id:a,value:e,shown:yi(e),onChange:t})}}}function JK(e,t,n){return{type:"custom",render:({value:o,onChange:a})=>g(Se,{label:c(e),icon:n,value:o||t,onChange:a})}}function tA({label:e,icon:t,id:n,value:o,shown:a,onChange:s}){let{colors:r,n:i}=Wl(),l=Re(o),u=l?Xt(l,r,i):null;return g(Se,{label:c(e),icon:t,id:n,value:u?u.hex:a,caption:u?.words,onChange:s,choices:zl(l??"",r,i,s)})}function QK(){return{type:"custom",render:e=>{let{value:t,onChange:n}=e,o=e;return g(nA,{value:typeof t=="string"?t:"",onChange:n,twin:"follows"in e?{follows:o.follows,view:o.followsView}:void 0})}}}function zl(e,t,n,o){let a=Ta(e);return Uu(t,n).map(s=>({label:s.label,color:s.value,selected:a===s.name,onPick:()=>o(s.name)}))}function nA({value:e,onChange:t,twin:n}){let{colors:o,n:a}=Wl(),s=o.background,r=Bt(s.toUpperCase(),c("Theme {n} background",{n:a})),[i,l]=Pe(om),[u]=Pe(Ei),d=typeof u=="string"&&u.trim()!=="",p=_a(i),f=v=>l(_a(v)||void 0),m=Ta(e),b=m?Xt(m,o,a):null,y=zl(e,o,a,t),E=n?()=>t(void 0):()=>t(""),S=s,T=r;if(n){let v=Ta(n.follows),w=Ea(n.follows),I=v?Xt(v,o,a):w?{hex:w,words:w.toUpperCase()}:null;S=I?.hex??s,T=Ft(C=>c(C),I?I.words:r,n.view)}let x=!n&&(Wn(e)||d)?g(oA,{value:p,onChange:f}):null;return b?g(Se,{label:c("Fill"),icon:g(kl,{}),value:b.hex,caption:b.words,onChange:t,changed:!0,onReset:E,resetTo:T,choices:y,children:x}):g(Pn,{label:c("Fill"),icon:g(kl,{}),value:e,inherited:S,resetTo:T,onChange:t,onReset:E,choices:y,children:x})}function oA({value:e,onChange:t}){return eo({options:Sa.map(n=>({label:n.label,value:n.value,hint:n.hint})),value:e,onChange:t,ariaLabel:c("Fill")})}function aA(e,t,n){if((e?.content??[]).some(s=>s?.props?.id===t))return gt(n);let o=sm(e,t);if(o.length===0)return null;let a=gt(zs(n));if(a!==null)return a;for(let s=o.length-1;s>0;s-=1){let r=gt(zs(o[s].sectionAccent));if(r!==null)return r}return gt(o[0].sectionAccent)}function Wl(){let e=ke(B().theme),[t]=Pe("sectionAccent"),n=null;try{let{appState:a,selectedItem:s}=as(i=>i),r=s?.props?.id?String(s.props.id):void 0;n=r?aA(a?.data,r,t):null}catch{n=null}let o=n!==null&&e.themes[n]?n:e.selected;return{colors:ce(e.themes[o]),n:o+1}}function ej(){return Ag()}var tj={top:g(hg,{}),right:g(aP,{}),bottom:g(nP,{}),left:g(oP,{})};function nj(e,t,n,o,a,s,r){let i=p=>t.find(f=>f.value===p),l=p=>({value:p,label:"",disabled:!0,title:o}),u=p=>{let f=t.find(b=>b.cell===p);if(!f)return l(`missing-${p}`);let m=s?.[p];return m?{value:f.value,label:f.label,icon:m}:{value:f.value,label:f.label}},d=[l("corner-top-left"),u("top"),l("corner-top-right"),u("left"),l("centre"),u("right"),l("corner-bottom-left"),u("bottom"),l("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:f})=>{let m=t.some(b=>b.value===p)?p:n;return g(K,{label:c(e),icon:a,value:i(m)?.label?c(i(m).label):r?c(r):"",children:zP(c,{label:e,value:m,onChange:f,points:d})})}}}function oj(e,t,n){return{type:"custom",options:t,render:({value:o,onChange:a,field:s})=>g(Pm,{label:e,options:(s.options??t).map(r=>({...r,label:c(r.label)})),value:Array.isArray(o)?o:[],onChange:a,...n?{emptyLabel:c(n)}:{}})}}function $g(e,t={}){return{type:"custom",render:({value:n,onChange:o})=>{let a={value:n,onChange:o,...t};return g(e,{...a})}}}var sA={image:"Image",video:"Video"},aj=Lr.map(e=>({label:sA[e],value:e}));function sj(e,t,n){let o=Object.keys(Fr).map(a=>({label:Fr[a],value:a,picture:n[a]}));return{type:"custom",...lt({},{type:"radio",label:e,options:o.map(a=>({value:a.value,label:a.label}))}),render:({onChange:a})=>g(iA,{label:e,icon:t,options:o,onChange:a})}}function rA(e,t,n){let o=Rp(e,t,n);if(o!==void 0)return o==="save-makes-frame"?c("A frame is made from this video when you save the page."):o==="starts-dark"?c("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"?c("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"?c("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"?c("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"?c("The slide shows your Image while the video loads, because this video has no frame."):void 0;let a=Ap(e);return a==="frame-missing-image"?c("This video has no frame yet. The slide shows its image until one is made."):a==="frame-missing-surface"?c("This video has no frame yet. The slide shows its background colour until one is made."):a==="image-missing-frame"?c("No image yet. The slide shows the video's frame until you choose one."):a==="image-missing-surface"?c("No image yet. The slide shows its background colour until you choose one."):void 0}function iA({label:e,icon:t,options:n,onChange:o}){let a=Lt(),s=a?.values??{},r=Nn(s),i=cg(KO),l=of(i?.docId??null),u=null;try{u=as(p=>p.appState.data)}catch{u=null}let d=sf(a?.id,u,l);return g(K,{label:c(e),icon:Dt(t),hint:rA(s,d,i?.hasUnsavedEdits??!1),children:eo({options:n,value:r,onChange:o,ariaLabel:e})})}function rj(e,t,n,o={}){let a={type:"custom",[XO]:!0,render:({value:s,onChange:r,name:i})=>g(Cm,{value:s||"",onChange:r,fieldKey:i,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?te("each",a):a}var ij={HeroSingle:[wp.image],HeroSlide:["videoFrame","videoFramePhone"],ContactLocations:["locations[].photo"],ProcessSteps:["steps[].image"]};function lA(e){let t=c(e.status??"");return e.ok&&typeof e.lat=="number"&&typeof e.lng=="number"?`${t} \xB7 ${e.lat.toFixed(4)}, ${e.lng.toFixed(4)}`:t}function Gg({value:e,onChange:t,label:n}){let o=e||{},a=Lt(),s=a?a.values!==a.node.props:!0,r=!!o.pending&&s,i=!!o.pending&&!s,l=!!xe($P()).geocode,u=ug(),d=(p,f)=>t({...o,[p]:f??void 0});return Ke(Ve,{children:[g(K,{label:c(n),icon:g(Qh,{}),action:l?g(Dl,{content:c("Find from the address (OpenStreetMap)"),children:g(vg,{"aria-label":c("Find from the address"),"aria-busy":r||void 0,disabled:r,onClick:()=>t({...o,pending:!0,ok:!1,status:"Finding\u2026"}),children:g(dP,{})})}):void 0,children:l&&o.status?g(ya,{compact:!0,oneLine:!0,spaced:!1,status:r?"busy":o.ok&&!i?"found":"notfound",statusText:r?c("Finding\u2026"):i?c(wi):c(o.status),hint:lA(o)}):null}),g(K,{label:c("Enter by hand"),labelId:u,icon:g(sP,{}),action:g(Ll,{checked:!!o.manual,onChange:p=>t({...o,manual:p}),ariaLabelledBy:u})}),o.manual&&g(K,{label:c("Latitude, longitude"),icon:g(Qh,{}),children:Ke("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8,width:"100%",minWidth:0},children:[g(tg,{value:typeof o.lat=="number"?o.lat:null,onChange:p=>d("lat",p),min:-90,max:90,step:1e-4,placeholder:c("Latitude")}),g(tg,{value:typeof o.lng=="number"?o.lng:null,onChange:p=>d("lng",p),min:-180,max:180,step:1e-4,placeholder:c("Longitude")})]})})]})}function cA(e,t){return t===null||t<0||t>=e.length?"":e[t]?.text??""}function uA(e,t,n){let o=e.map(a=>({text:a?.text??""}));return t===null||t<0||t>=e.length?o:o.map((a,s)=>s===t?{text:n}:a)}function dA(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}var lj={label:"Ticker items",icon:g(lP,{})};function cj(e,t,n,o){return{type:"custom",[je]:{control:"textList",label:e,placeholder:n,itemKey:"text",rendering:o},...lt({},{...Pg.textList,label:e}),render:({value:a,onChange:s})=>g(pA,{label:e,icon:Dt(t),items:Array.isArray(a)?a:[],placeholder:n,onChange:s,markup:o==="markup"})}}function pA({label:e,icon:t,items:n,placeholder:o,onChange:a,markup:s=!1}){let r=no(null),[i,l]=oo(null),u=p=>p.map(f=>({text:f?.text??""})),d=p=>{let f=dA(n,p,i);f===null&&(r.current=null),l(f),a(u(p))};return g(TP,{label:c(e),icon:t,noun:c("item"),items:n,onChange:d,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:s?g(Ci,{target:r,value:cA(n,i),onChange:p=>a(uA(n,i??-1,p)),disabled:i===null,label:i===null?c("Formatting \u2014 click a row first"):c("Formatting \u2014 row {n}",{n:i+1})}):void 0,renderRow:(p,f,m)=>g("input",{type:"text",className:s&&i===f?"sf-list-marking":void 0,value:p?.text??"",placeholder:c(o),"aria-label":c("{label} {n}",{label:c(e),n:f+1}),onChange:b=>m({text:b.target.value}),onFocus:b=>{r.current=b.currentTarget,l(f)}})})}function uj(e,t){let n=`${e.label} \u2014 row ${t+1}`;return Mt({control:"plainText",label:n,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:o,onChange:a})=>g(Ht,{value:o,onChange:a,label:c("{label} \u2014 row {n}",{label:c(e.label),n:t+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function dj(e){return{_gCards:Ee("Cards"),coverIndex:Q("Cover image",g(iP,{}),vm,String(1),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:ck("Image background",Ka),cardImage:zg()}}function pj(){return{outline:Q("Card outline",g(pP,{}),xm,Tm),indexBadge:Q("Card number",g(bg,{}),ki,Pi),showBadge:ct("Product badge",!0,g(bi,{noun:"tag"}))}}function fj(e){let t=e?.defaults??{showCardSizes:!0,showCardBuy:!0,showCardPage:!0},n=a=>({...os,label:es.find(s=>s.id===a).label}),o=a=>lt(Al(Pl),n(a));return{_gShowOnCard:Ee("Show on a card"),[Pl]:lt({type:"custom",render:()=>g(fA,{rest:{showCardPrice:!0,showCardFinishes:!0,...t}})},n(Pl)),showCardFinishes:o("showCardFinishes"),showCardSizes:o("showCardSizes"),showCardBuy:o("showCardBuy"),showCardPage:o("showCardPage")}}var Pl="showCardPrice",es=[{id:"showCardPrice",label:"Price"},{id:"showCardFinishes",label:"Finish swatches"},{id:"showCardSizes",label:"Sizes"},{id:"showCardBuy",label:"Buy button"},{id:"showCardPage",label:"Page button"}];function fA({rest:e}){let t=Z(),n=cn(),o=r=>typeof t[r]=="boolean"?t[r]:void 0,a=r=>o(r)??e[r],s=es.some(({id:r})=>o(r)!==void 0&&o(r)!==e[r]);return g(Kl,{parts:es,changed:s,shown:a,onPress:(r,i)=>n({[r]:i}),onReset:()=>n(Object.fromEntries(es.map(({id:r})=>[r,void 0])))})}function mj(e,t="display"){let n=it(t);return{[t]:te("desktop",{type:"custom",render:({value:o,onChange:a})=>g(Kl,{parts:e,changed:um(o),shown:s=>va(o,s),onPress:(s,r)=>a(pm(o,s,r)),onReset:()=>a(void 0)})}),[n]:te("mobile",{type:"custom",render:({value:o,onChange:a})=>g(mA,{parts:e,desktopKey:t,value:o,onChange:a})})}}function Kl({parts:e,changed:t,shown:n,onPress:o,onReset:a,detail:s,disabledReason:r}){let i=c("Display");return g(K,{label:i,icon:g(JO,{}),changed:t,action:g(oe,{words:P()?.panel,label:i,changed:t,detail:s,onReset:a}),children:g(vP,{label:i,items:e.map(l=>({id:l.id,label:c(l.label),shown:n(l.id),...r?{disabled:!0,disabledReason:c(r)}:{}})),onChange:o})})}function mA({parts:e,desktopKey:t,value:n,onChange:o}){let a=Z()[t];return g(Kl,{parts:e,changed:dm(n),shown:s=>vi(a,n,s),onPress:(s,r)=>o(fm(n,s,r)),onReset:()=>o(Pa),detail:c("the same as Desktop")})}function zg(e=wf){return Be("Card image",g(mg,{}),ae,qe,vf,ae,e,{clear:{hint:ae},hint:"Rounds the picture. The card's own corner is in Styles."})}function hA(){return to(li,"cardImage")}function hj(){return{cardImage:zg(li),...hA()}}function gj(){return Ul({sidesKey:"cornerSides",row:Cf,step:Of,useFollowed:()=>ae,mark:g(gA,{label:Pf}),hint:c("Rounds the picture. Left alone it stays square.")})}function gA({label:e,changed:t=!1,onReset:n=()=>{}}){return g(oe,{words:P()?.panel,label:c(e),changed:t,onReset:n})}function bj(){return{type:"custom",render:({value:e,onChange:t})=>g(_A,{value:typeof e=="string"?e:"",onChange:t})}}var lg="own";function yj(){let e=[{value:lg,label:"Layout's own",picture:vl(Array.from({length:8},()=>[3,1]))},...Object.entries(pa).map(([t,n])=>({value:t,label:n.label,picture:vl([...n.phone,...n.phone])}))];return te("mobile",Tl("Layout",g(gg,{}),e,lg,{columns:2,cell:Zh}))}function bA({layout:e,width:t}){let n=pi(e),o=n?`${n[0]}/${n[1]}`:void 0;return g("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:Df(e).map(([a,s],r)=>g("i",{className:"block rounded-xs bg-current opacity-60",style:{gridColumn:`span ${a}`,gridRow:`span ${s}`,aspectRatio:o}},r))})}var yA={width:"3.5rem",height:"2.5rem",words:!1},SA=200;function _A({value:e,onChange:t}){let[n,o]=oo(null),[a,s]=oo(4),r=no(null);zO(()=>{let m=r.current;if(!m||typeof ResizeObserver!="function")return;let b=()=>s(m.getBoundingClientRect().width>=SA?4:3);b();let y=new ResizeObserver(b);return y.observe(m),()=>y.disconnect()},[]);let i=e?j(Gn,e):void 0,l=i?e:"",u=ui(n,l),d=ui(n,"").length,p=Mf("no-symbol"),f=[{value:"",label:c("Not chosen"),icon:Xh(p,c("Not chosen"))},...u.map(m=>({value:m,label:c(Gn[m].label),icon:g(bA,{layout:Gn[m],width:40})}))];return g(K,{label:c("Layout"),icon:g(gg,{}),value:i?c(i.label):void 0,children:g("div",{ref:r,style:{flex:"1 1 auto",minWidth:0},children:g(Tg,{label:c("Layout"),value:l,options:f,onChange:t,columns:a,cell:yA,header:Ke("div",{className:"mb-2 flex flex-col gap-1",style:{minWidth:"11rem"},children:[g("span",{className:"text-2xs text-ink-faint",children:c("Photos in a row")}),g(bP,{options:[{id:"all",label:c("All")},...If.map(m=>({id:String(m),label:String(m)}))],value:n===null?"all":String(n),ariaLabel:c("Photos in a row"),onChange:m=>o(m==="all"?null:Number(m))}),g("span",{className:"text-2xs text-ink-faint",children:c("{n} of {total} layouts",{n:d,total:ci.length})})]})})})})}var vA="Applies to panels, cards, inputs and buttons. Round things \u2014 color swatches, switches, status dots \u2014 stay round.",jl="Corners";function Wg({value:e,onChange:t,length:n}){let o=e===null;return ls(TA,{label:c(jl),icon:ls(xA,{}),changed:!o,action:ls(EA,{words:P()?.panel,label:c(jl),changed:!o,detail:c("the built-in corners"),onReset:()=>t(null)}),hint:c(vA),children:ls(pe,{min:n?.grid.min??ae,max:n?.grid.max??qe,step:n?.grid.step??1,value:e,...e===null?{}:{suffix:n?.unit??"px",...n?{units:n.units}:{}},placeholder:ae,placeholderWord:"Auto",onClear:()=>t(null),ariaLabel:c(jl),onChange:t})})}import{jsx as io}from"react/jsx-runtime";import{SettingsDefaultReset as wA,SettingsField as CA}from"efficient-easel/panel";import{IconPicker as OA}from"efficient-shell/ui";import{ShadowIcon as PA}from"efficient-easel/icons";import{SHADOW_PREVIEW as kA}from"efficient-easel/screen/lib/document/shadow-values";var Vl={none:"None",soft:"Soft",lifted:"Lifted"},AA="Applies to cards \u2014 products, brands, journal entries and filter cells. Round things like swatches and status dots are never shadowed.";function Kg({value:e,onChange:t}){let n=e===null,o=e??$s;return io(CA,{label:c("Card shadow"),icon:io(PA,{}),value:c(Vl[o]),changed:!n,action:io(wA,{words:P()?.panel,label:c("Card shadow"),changed:!n,detail:c(Vl[$s]),onReset:()=>t(null)}),hint:c(AA),children:io(OA,{label:c("Card shadow"),value:o,options:iu.map(a=>({value:a,label:c(Vl[a]),icon:io("span",{className:"sf-shadow-chip border border-line bg-surface",style:{boxShadow:kA[a]}})})),onChange:t})})}import{jsx as jg}from"react/jsx-runtime";import{ShadowIcon as RA}from"efficient-easel/icons";import{DEFAULT_SHADOW_COLOR as Vg}from"efficient-easel/screen/lib/document/shadow-values";var IA="Most useful on a dark theme, where a black shadow cannot be seen. Also used by the Lift hover, even with the card shadow off.";function Yg({value:e,onChange:t}){let n=e===null;return jg(Pn,{label:c("Shadow color"),icon:jg(RA,{}),value:e??"",inherited:Vg,resetTo:Vg,onChange:t,onReset:()=>t(null),hint:c(IA)})}import{jsx as us}from"react/jsx-runtime";import{SettingsDefaultReset as NA,SettingsField as LA}from"efficient-easel/panel";import{AlignSeparateIcon as DA}from"efficient-easel/icons";function cs(e,t){return e==="tablet"?null:e==="mobile"?t.phone:t.desktop}var FA="The space between the blocks inside a row, a grid or a box. Auto means each one keeps the spacing it already has.",BA="The space between the blocks inside a row, a grid or a box, on a phone. Until you set it, a phone uses half the desktop gap.",Yl="Block gap",Xg=qt.Grid;function qg(e,t){return cs(e,{desktop:{key:"block_gap",value:t.gap,followsPx:null},phone:{key:"block_gap_phone",value:t.phone,followsPx:t.gap===null?null:Ys(t.gap)}})}function Zg({value:e,onChange:t,followsPx:n=null,length:o,followsUnit:a="px"}){let s=e===null,r=n===null?null:`${n}${a}`,i=a==="px"&&(o?.unit??"px")==="px",l=n===null?Xg:i?wn(n)??Xg:n;return us(LA,{label:c(Yl),labelId:"sf-block-gap",icon:us(DA,{}),changed:!s,action:us(NA,{words:P()?.panel,label:c(Yl),changed:!s,detail:r??c("each block's own spacing"),onReset:()=>t(null)}),hint:c(r===null?FA:BA),children:us(pe,{min:(o?.grid??ye).min,max:(o?.grid??ye).max,step:(o?.grid??ye).step,value:e,...e===null&&n===null?{}:{suffix:o?.unit??"px",...o?{units:o.units}:{}},placeholder:l,...n===null?{placeholderWord:"Auto"}:i&&n===l?{}:{placeholderWord:String(n)},onClear:()=>t(null),ariaLabel:c(Yl),onChange:t})})}import{jsx as ds}from"react/jsx-runtime";import{SettingsDefaultReset as HA,SettingsField as MA,SettingsSegmented as UA}from"efficient-easel/panel";import{HoverIcon as $A}from"efficient-easel/icons";var Xl={none:ws.none,lift:ws.lift,highlight:Ic},GA="What a card does when a shopper points at it \u2014 or taps it, on a phone. Highlight is the effect your cards already use.";function Jg({value:e,onChange:t}){let n=e===null,o=e??Gs;return ds(MA,{label:c("Hover effect"),icon:ds($A,{}),value:c(Xl[o]),changed:!n,action:ds(HA,{words:P()?.panel,label:c("Hover effect"),changed:!n,detail:c(Xl[Gs]),onReset:()=>t(null)}),hint:c(GA),children:ds(UA,{options:lu.map(a=>({id:a,label:c(Xl[a])})),value:o,ariaLabel:c("Hover effect"),onChange:t})})}import{jsx as ps}from"react/jsx-runtime";import{SettingsDefaultReset as zA,SettingsField as WA,SettingsSegmented as KA}from"efficient-easel/panel";import{DropIcon as jA}from"efficient-easel/icons";var ql="Photography",Qg={shot:"As shot",mono:"Black and white"},Zl=[{grayscale:!1,label:Qg.shot},{grayscale:!0,label:Qg.mono}],VA="Black and white photographs return to color on hover. Wheels and tyres keep their real finish either way.";function eb({value:e,onChange:t}){let n=e===null,o=e??!1;return ps(WA,{label:c(ql),icon:ps(jA,{}),value:c(Zl.find(a=>a.grayscale===o).label),changed:!n,action:ps(zA,{words:P()?.panel,label:c(ql),changed:!n,detail:c(Zl.find(a=>!a.grayscale).label),onReset:()=>t(null)}),hint:c(VA),children:ps(KA,{options:Zl.map(a=>({id:a.grayscale,label:c(a.label)})),value:o,ariaLabel:c(ql),onChange:t})})}import{jsx as Jl}from"react/jsx-runtime";import{useId as YA}from"react";import{SettingsField as XA,SettingsSwitch as qA}from"efficient-easel/panel";import{ShareIcon as ZA}from"efficient-easel/icons";var JA="Share button",QA="On every blog post.";function tb({value:e,onChange:t}){let n=YA();return Jl(XA,{label:c(JA),labelId:n,icon:Jl(ZA,{}),action:Jl(qA,{checked:e===!0,onChange:t,ariaLabelledBy:n}),hint:c(QA)})}import{usePreviewDevice as gc}from"efficient-easel/draw/client";import{jsx as fs}from"react/jsx-runtime";import{SettingsDefaultReset as eR,SettingsField as tR}from"efficient-easel/panel";import{PaddingXIcon as nR}from"efficient-easel/icons";var Ql="Side space",nb=ie.default,oR="The room left at the left and right edge of every page.";function ob(e,t){return cs(e,{desktop:{key:"site_gutter",value:t.gutter,unsetPx:nb,bounds:ie},phone:{key:"site_gutter_phone",value:t.phone,unsetPx:Gp(t.gutter,t.gutterUnit),bounds:Le}})}function ab({value:e,onChange:t,unsetPx:n=nb,bounds:o=ie,length:a,restsOn:s=n}){let r=e===null;return fs(tR,{label:c(Ql),labelId:"sf-side-space",icon:fs(nR,{}),changed:!r,action:fs(eR,{words:P()?.panel,label:c(Ql),changed:!r,detail:`${n}px`,onReset:()=>t(null)}),hint:c(oR),children:fs(pe,{min:(a?.grid??o).min,max:(a?.grid??o).max,step:(a?.grid??o).step,value:e,suffix:a?.unit??"px",...a?{units:a.units}:{},...o.typedMax!==void 0&&(a?.unit??"px")==="px"?{inputMax:o.typedMax}:{},placeholder:s,onClear:()=>t(null),ariaLabel:c(Ql),onChange:t})})}import{jsx as ec}from"react/jsx-runtime";import{BACKGROUND_WIDTHS as v3,SettingsBackgroundWidth as aR,SettingsContentWidth as sR}from"efficient-easel/panel";var rR="Background width",iR="Content width";var ms=e=>c(Nt[e==="content"?"page":"full"]),sb="The width of every section's background.",rb="The width of every section's content.";function ib({value:e,changed:t,detail:n,onChange:o,onReset:a,hint:s,labelId:r}){return ec(aR,{value:e,changed:t,detail:n,onChange:o,onReset:a,hint:s?c(s):void 0,labelId:r,words:{label:c(rR),full:ms("full"),content:ms("content")},resetWords:P()?.panel})}function lb({mode:e,px:t,max:n=V.max,min:o=V.min,changed:a,detail:s,fullClosed:r,onMode:i,onPx:l,onReset:u,hint:d,labelId:p,length:f}){let m=c(iR),b=f?.grid.min??o,y=f?.grid.max??n,E=e!=="full"?ec(pe,{min:b,max:y,step:f?.grid.step??V.step,value:Math.min(Math.max(t,b),y),onChange:l,...f?{suffix:f.unit,units:f.units}:{suffix:"px"},ariaLabel:m}):null;return ec(sR,{mode:e,onMode:i,number:E,changed:a,detail:s,fullClosed:r,onReset:u,hint:d?c(d):void 0,labelId:p,words:{label:m,full:ms("full"),content:ms("content")},resetWords:P()?.panel})}import{jsx as cb}from"react/jsx-runtime";import{useMemo as lR}from"react";import{TextStyleItem as cR,TextStylesGroup as uR}from"efficient-easel/text-styles";var ub=["font","size","weight","emphasis"],dR=500;function pR({font:e,size:t,weight:n,italic:o}){let a={font:e};return t!==null&&(a.size=t),n!==null&&(a.weight=n),o!==null&&(a.italic=o),{id:"accent",kind:"heading",name:c("Emphasis"),values:a}}function fR(e,t){let n=[],o=e.values,a=t.values;return a.font!==o.font&&a.font!==void 0&&n.push({key:"font",value:a.font}),a.size!==o.size&&n.push({key:"size",value:a.size??null}),a.weight!==o.weight&&n.push({key:"weight",value:a.weight??null}),a.italic!==o.italic&&n.push({key:"italic",value:a.italic??null}),n}function db(e){let{headingWeight:t,open:n,onOpenChange:o,onChange:a,withoutSize:s=!1}=e,r=pR(e),i=On(),l=lR(()=>Jo(i),[i]);return cb(uR,{label:c("Emphasis"),children:cb(cR,{style:r,fonts:l,settings:s?ub.filter(u=>u!=="size"):ub,auto:["size"],fallback:()=>({weight:t??dR}),open:n,onOpenChange:o,onChange:u=>fR(r,u).forEach(a)})})}import{viewKeyAt as gb}from"efficient-easel/draw";import{shownUnitAt as SR,unitKeyOnWrite as _R}from"efficient-easel/screen/lib/content/length-units";import{convertRowLength as mR,rowUnits as hR,unitPickPatch as gR}from"efficient-easel/screen/lib/content/length-units";import{viewKeyAt as bR}from"efficient-easel/draw";var yR=["cornerRadius","siteWidth","siteGutter","siteGutterPhone","blockGap","blockGapPhone"],hs={cornerRadius:{number:"corner_radius_px",kind:"radius",grid:su,tier:"desktop"},siteWidth:{number:"site_width",kind:"size",grid:V,tier:"desktop"},siteGutter:{number:"site_gutter",kind:"spacing",grid:ie,tier:"desktop"},siteGutterPhone:{number:"site_gutter_phone",kind:"spacing",grid:Le,tier:"mobile"},blockGap:{number:"block_gap",kind:"gap",grid:ye,tier:"desktop"},blockGapPhone:{number:"block_gap_phone",kind:"gap",grid:ye,tier:"mobile"}};function gs(e){return{number:hs[e].number,unit:Xc[`${e}Unit`]}}function pb(e,t,n){let o=F(n),{number:a,unit:s}=gs(e);return{[a]:t,[s]:t===null||o==="px"?null:o}}function bs(e,t,n,o){let{kind:a,grid:s,tier:r}=hs[e],i=F(n),l=F(o),u=s.typedMax,d=u!==void 0&&l==="px"?{...s,max:u}:s;return i===l?t:mR(t,i,l,r,{kind:a},d)}function fb(e,t,n,o){let{number:a,unit:s}=gs(e),r=gR({[a]:t},i=>bs(e,i,n,o),s,F(o),"px");return{[a]:r[a],[s]:r[s]??null}}function mb(e,t){let{kind:n,grid:o}=hs[e];return Yc(n,F(t),o)}function hb(e){return hR({kind:hs[e].kind},Qn)}function tc(e,t){let n=bR(e,t);if(!yR.includes(n))throw new Error(`no site length row ${n}`);return n}function lo(e,t,n,o,a){let{siteLengthUnits:s,setSiteLengthUnits:r}=B(),i=`${e}Unit`,l=s[i],u=SR({n:a?.figure??null,u:a?.unit??null,[gb("n","mobile")]:t,[gb("u","mobile")]:l??null},{n:"n"},"u","mobile"),d=b=>r({[i]:b==="px"?null:b}),p=b=>{n(b);let y=_R(i,l,u,"px",b===null);i in y&&d(y[i]==null?null:F(y[i])),o(pb(e,b,u),b===null)},f=b=>{let y=F(b);if(y===u||(d(y),t===null))return;let E=fb(e,t,u,y);n(E[gs(e).number]),o(E,!0)},m=a?a.unit===u?a.figure:bs(e,a.figure,a.unit,u):null;return{length:{unit:u,grid:mb(e,u),units:{options:hb(e),onChange:f,label:c("Unit")}},write:p,rest:m,shown:b=>bs(e,b,"px",u)}}import{EmptyState as _I,SliderGroup as EI,Tabs as TI,Tooltip as r5,tabButtonId as xI,tabPanelId as vI}from"efficient-shell/ui";import{ContrastIcon as wI,SettingsIcon as CI,TypeIcon as OI}from"efficient-easel/icons";function bb(e){switch(e.status){case"saved":return null;case"failed":return{msg:c("Not saved. Try again."),tone:"error"};case"skipped":switch(e.reason){case"empty":return null;case"no-token":return{msg:c("Not saved. Reload the page."),tone:"error"};case"template":return{msg:c("Templates keep their look. Press Done."),tone:"success"}}}}import{jsx as Es}from"react/jsx-runtime";import{ListIcon as oI,PaddingTopIcon as aI,PaddingXIcon as sI}from"efficient-easel/icons";import{jsx as ys}from"react/jsx-runtime";import{SettingsDefaultReset as ER,SettingsField as TR,SettingsSegmented as xR}from"efficient-easel/panel";import{WidthIcon as vR}from"efficient-easel/icons";function yb({value:e,resolved:t,onChange:n,label:o="Width",labelId:a,followsLabel:s,hint:r}){let i=e===void 0,l=i?t:e,u=c(o);return ys(TR,{label:u,labelId:a,icon:ys(vR,{}),value:i?s:void 0,changed:!i,action:ys(ER,{words:P()?.panel,label:u,changed:!i,onReset:()=>n(void 0)}),hint:r,children:ys(xR,{options:[{label:c(Nt.full),id:"full"},{label:c(Nt.page),id:"content"}],value:l,ariaLabel:u,onChange:n})})}import{group as rI}from"efficient-easel/screen/lib/document/box-fields";import{jsx as ut}from"react/jsx-runtime";import{ColumnsIcon as FR,HeadquartersIcon as BR,HeightIcon as HR,LayoutIcon as MR,LocationIcon as UR,MapIcon as $R,SearchIcon as GR,ThemeIcon as zR}from"efficient-easel/icons";import{group as sc}from"efficient-easel/screen/lib/document/box-fields";import{deviceField as yn}from"efficient-easel/screen/lib/document/device-fields";import{jsx as oc}from"react/jsx-runtime";import{ListIcon as wR}from"efficient-easel/icons";import{NoControlMark as CR,noControlField as OR}from"efficient-easel/screen/lib/document/panel-no-control-mark";function Cb(e,t){return Q(e,oc(wR,{}),[{label:t,value:""}],"")}var PR="_sourceEdit";function hV(){return OR({type:"custom",render:()=>oc(CR,{})},"always")}var Sb=new Map,_b=new WeakMap,Eb=(e,t)=>({type:"custom",render:()=>oc(ya,{compact:!0,status:"ok",hint:c("Where this content is edited."),edit:{label:e,onClick:t}})});function kR(e){if(Sc(e)){let o=_b.get(e.open);o||_b.set(e.open,o=new Map);let a=o.get(e.label);return a||o.set(e.label,a=Eb(e.label,e.open)),a}let t=`${e.label}\0${e.href}`,n=Sb.get(t);return n||(n=Eb(e.label,()=>window.open(e.href,"_blank","noopener")),Sb.set(t,n)),n}var Tb=new WeakMap,xb=-1,nc={},vb=new WeakMap;function Ob(e,t,n){return Ec(e).filter(o=>!o.records||o.key===t||n!==null&&o.records.includes(n))}function AR(e,t,n,o){xb!==ho()&&(xb=ho(),nc={});let a=Tb.get(t);(!a||vb.get(a)!==nc)&&(a=new Map,vb.set(a,nc),Tb.set(t,a));let s=Ob(e,n,o),r=n&&!s.some(u=>u.key===n)?n:"",i=`${e}\0${r}\0${o??""}\0${s.map(u=>u.key).join(",")}`,l=a.get(i);return l||(l={...t,options:[...t.options,...s.map(u=>({label:u.label,value:u.key})),...r?[{label:r,value:r}]:[]]},a.set(i,l)),l}var wb=new WeakMap,RR={not:{field:Ye,set:!0}};function Pb(e,t,n,o={}){let a=t[Ye];if(!a)return t;let s=xc(n),r=Ef(o.root),i=Ob(e,s,r).length>0||s!=="",l=i?AR(e,a,s,r):null,u=wb.get(t);u||wb.set(t,u=new Map);let d=`${ho()}\0${i?"1":"0"}\0${s}\0${(o.hides??[]).join(",")}\0${r??""}`,p=u.get(d);if(p)return p;let f=new Set(o.hides??[]),m=s?Tc(s)?.edit:void 0,b={};for(let[y,E]of Object.entries(t))y===Ye?l&&(b[y]=l):y===PR?m&&(b[y]=kR(m)):b[y]=f.has(y)&&E&&typeof E=="object"?le(E,RR):E;return u.set(d,b),b}import{createContext as IR,useContext as NR}from"react";var kb=IR(null),SV=kb.Provider,_V=()=>NR(kb);function EV(e){let t=[];for(let n of e)n.placement!=="located"&&n.placement!=="approximate"||n.lat===null||n.lng===null||t.push({key:n.id,label:n.name,lat:n.lat,lng:n.lng,glyph:"",tone:"",approximate:n.placement==="approximate"});return t}function LR(e){return e===null||!Number.isFinite(e)?"":e<10?`${e.toFixed(1)} km`:`${Math.round(e)} km`}function TV(e,t){let n=[e.city,[e.state,e.postcode].filter(Boolean).join(" ")].filter(Boolean).join(" ");return{name:e.name,address:e.address,place:n,distance:t?LR(e.distanceKm):"",phone:e.phone,phoneHref:e.phone?`tel:${e.phone.replace(/[^\d+]/g,"")}`:"",website:e.website.replace(/^https?:\/\//,"").replace(/\/$/,""),websiteHref:e.website&&!/^[a-z][a-z\d+.-]*:/i.test(e.website)?`https://${e.website}`:e.website}}var DR=[{key:"name",label:"Dealer name",plain:!0},{key:"address",label:"Address"},{key:"place",label:"City \xB7 state \xB7 postcode",plain:!0},{key:"distance",label:"Distance",plain:!0},{key:"phone",label:"Phone"},{key:"phoneHref",label:"Phone link",kind:"link"},{key:"website",label:"Website",plain:!0},{key:"websiteHref",label:"Website link",kind:"link"}],Ab={key:mo,label:"Dealers",blocks:["Footprint"],fields:DR};function xV(e){return[e.name,e.city].filter(Boolean).join(", ")}var wV={text:"Button label",href:"#"},CV=e=>e.replace(/\*([^*]+)\*/g,"==$1=="),co={eyebrow:"Eyebrow",heading:"Main heading",accent:"Highlight line",body:"Add a sentence or two of supporting copy.",button:"Button label",link:"#",sectionHeading:"Section heading",slideName:"Slide name",boxName:"Box name",headingAccent:"Section heading *here.*",sectionNumber:"Section number",imageCaption:"Image caption",bookingConfirmation:"Thanks \u2014 we'll email you to confirm.",imageMeta:"Image meta",label:"Label",value:"Value",viewAll:"View all",date:"Month DD, YYYY",category:"Category"};var Ss={sectionNumber:co.sectionNumber,heading:`${co.heading}
9
+ *${co.accent}*`,tagline:co.body},ac=vc.Footprint,RV={label:"Locations Map",fields:ac,defaultProps:{sectionNumber:"",heading:"",tagline:"",offices:[],mapTheme:Eo.mapTheme,padTop:120,padBottom:120,search:!1,searchHint:"",noMatchText:"",listPosition:"below",showDistance:!0}};var Ib={field:Ye,is:mo,default:""},rc={field:Gt,is:mt,default:mt},WR={field:Gt,is:"list",default:mt},KR={field:Gt,is:"map",default:mt},Nb={all:[rc,{field:"listPosition",in:["left","right"],default:"below"}]},Lb={any:[{all:[Ib,{not:KR}]},Nb]},jR={any:[{all:[rc,{field:"listPosition",is:"below",default:"below"}]},WR]},Rb={all:[Lb,{field:"search",is:!0,default:!1}]};_c([Ab,Vp]);async function ic(e){return Ca(e)?hm(e,t=>[t.address,t.city,t.country].map(n=>String(n??"").replace(/\*/g,"").trim()).filter(Boolean).join(", ")):e}var VR={fields:{_gContent:sc("Section"),sectionNumber:ss("Section number",Ss.sectionNumber),heading:Ml("Heading",Ss.heading),tagline:Ml("Body",Ss.tagline),_gOffices:sc("Offices"),[Ye]:Cb("Office content","Manual"),offices:{type:"array",label:"Offices",arrayFields:{role:bn("Role"),city:bn("City"),country:bn("Region \xB7 country"),address:kg("Address"),phone:bn("Phone"),group:bn("Group"),hq:ct("HQ",!1,ut(BR,{})),geocode:$g(Gg,{label:"Coordinates"})},defaultItemProps:{role:"Sales & Distribution",city:"City",country:"Country",address:"",phone:"",group:"",hq:!1,lat:0,lng:0},getItemSummary:e=>e?.city||"Office"},...ac,[Gt]:gn("Shows",ut($R,{}),[{label:"Map and list",value:mt},{label:"Map only",value:"map"},{label:"List only",value:"list"}],mt),mapTheme:gn("Map theme",ut(zR,{}),[{label:"Auto",value:"auto"},{label:"Dark",value:"dark"},{label:"Light",value:"light"}],Eo.mapTheme),_gList:sc("List"),listPosition:yn("desktop",le(gn("Position",ut(MR,{}),[{label:"Left",value:"left"},{label:"Right",value:"right"},{label:"Below",value:"below"}],"below"),rc)),listColumns:yn("desktop",le(gn("Columns",ut(FR,{}),[{label:"Auto",value:Ls},...Kc.map(e=>({label:String(e),value:String(e)}))],Ls),jR)),[zc]:yn("desktop",le(gn("Map height",ut(HR,{}),[{label:"Fixed",value:Ns},{label:"Full height",value:Wc}],Ns),Nb)),search:yn("desktop",le(ct("Search",!1,ut(GR,{})),Lb)),searchHint:yn("desktop",le(Hl(ss("Hint","Type a postcode or address")),Rb)),noMatchText:yn("desktop",le(Hl(ss("No match","No place found. Try another postcode.")),Rb)),showDistance:le(ct("Distance",!0,ut(UR,{})),Ib)},resolveData:async(e,t)=>{let n=t?.changed,o=e.props;if(n?.listPosition===!0||n?.[Gt]===!0||n?.[Ye]===!0){let i=jc(o);i!==o&&(e={...e,props:i})}let a=e.props,s=a.offices??[],r=await ic(s);return r===s?e:{...e,props:{...a,offices:[...r]}}},resolveFields:(e,{fields:t})=>$c(Pb("Footprint",t,e.props,{hides:["offices"]}),e.props.headPlacement,Uc.Footprint.headRows)},Db=VR.fields.offices;var _s=null;function qV(e){_s=e}function ZV(){return!!(_s&&_s.state().lockHolder)}function lc(){return _s!==null}import{BUCKET_KEY as iI}from"efficient-easel/screen/lib/document/field-buckets";import{HEADER_TYPE as cc,FOOTER_TYPE as YR}from"efficient-easel/draw";import{parseOption as XR}from"efficient-shell/format";var qR=new Set(["Hero","HeroSingle","IntroBleed"]),Fb={min:56,max:140,default:88},tY={min:0,max:120,step:2,default:32},nY=`var(--sf-header-h, ${Fb.default}px)`,ZR="--sf-header-set-h",oY="--sf-header-h",aY=`var(${ZR}, ${Fb.default}px)`,sY="sf-header-clearance",rY="sf-sticky-underheader";function JR(e){return e?.find(t=>t?.type&&t.type!==cc)??null}function Bb(e){let t=JR(e)?.type;return!t||!qR.has(t)}function iY(e){return!Bb(e)}function lY(e){return!!e?.some(t=>t?.type===cc)}function cY(e){return!e||e.length===0?!1:!e.some(t=>t?.type===cc||t?.type===YR)}var QR=["auto","shared","own"],uc="auto",eI="topSpace",uY="data-top-space";function tI(e){return XR(QR,uc,e)}function nI(e,t){let n=tI(e?.props?.[eI]);return n==="own"?!0:n==="shared"?!1:Bb(t)}function dY(e,t){return nI(e,t)?"own":null}function lI(){return{type:"custom",render:({value:e,onChange:t})=>Es(yb,{value:e==="full"?"full":e==="content"?"content":void 0,resolved:"content",label:"Page width",followsLabel:c("Follows the site"),hint:c("Whether this page sits on the site's content column, or runs edge to edge."),onChange:n=>t(n)})}}var cI=[{label:"Auto",value:"auto"},{label:"Shared",value:"shared"},{label:"Its own",value:"own"}],RY={pageBackground:Ug(),topSpace:Q("Top space",Es(aI,{}),cI,uc),widthChoice:lI()},Gb=["pageBackground","topSpace","widthChoice"],uI="Record type",dc=new Map,Hb=-1;function dI(e){Hb!==ai()&&(dc.clear(),Hb=ai());let t=oi(),n=t.some(a=>a.key===e)?"":e,o=dc.get(n);return o||(o=Q(uI,Es(oI,{}),[...t.map(a=>({label:a.label,value:a.key})),...n?[{label:n,value:n}]:[]],st),dc.set(n,o)),o}var Mb=new WeakMap;function IY(e,t){if(!$n()||oi().length<2||la in e)return e;let n=dI(Un(t)),o=Mb.get(e);if(o&&o.row===n)return o.fields;let a={[la]:n,...e};return Mb.set(e,{row:n,fields:a}),a}var pI="On: the site's Side space is counted once at each edge of every page. Off: as before.",fI=ct("Count side space once",!1,Es(sI,{}),pI),pc={_gWebsite:rI("Website"),[wt]:fI,[nt]:Db,[Fn]:Gl},Ub=new WeakMap;function NY(e,t){if(t?.kind!==Hi||wt in e)return e;let n=Ub.get(e);return n||(n={...e,...pc},Ub.set(e,n)),n}function LY(e){if(!lc()||wt in e)return e;let t=$b.get(e);if(!t){t={};let n=!1;for(let[o,a]of Object.entries(e))o===mI&&!n&&(Object.assign(t,pc),n=!0),t[o]=a;n||Object.assign(t,pc),$b.set(e,t)}return t}var mI=iI.Animation,$b=new WeakMap;function DY(e){return lc()?zb(e):e}function zb(e){let t=e?.props;if(!t||!Array.isArray(t[nt]))return e;let n=t[nt];return Ca(n)?ic(n).then(o=>({...e,props:{...t,[nt]:[...o]}})):e}function FY(e){return e?.props?.kind===Hi?zb(e):e}import{previewFrame as PI}from"efficient-easel/screen/lib/document/preview-dom";import{pictureShadowColor as kI}from"efficient-easel/screen/lib/document/shadow-values";var mc="sf-site-styles",AI="sf-site-styles-tabpanel",E5="text",jb="basics",Wb="this-page-group",Ts=[{id:jb,label:"Basics",icon:L(CI,{})},{id:"theme",label:"Theme",icon:L(wI,{})},{id:"text",label:"Text",icon:L(OI,{})}];function RI({themeFromDocument:e,persist:t}){let{appState:n,dispatch:o}=Kb(u=>u),{theme:a,setTheme:s}=B(),r=n.data,i=r.root?.props??{},l=u=>{if(e){let d={...i,theme:u};o({type:"replaceRoot",root:{...r.root,props:d},recordHistory:!0})}else s(u);t({selected_preset:u.selected,theme_presets:u.themes})};return L(Tp,{value:e?i.theme:a,onChange:l})}function II({themeFromDocument:e,persist:t}){let[n,o]=hc(null),{theme:a,setFonts:s,setSizes:r,setHeadingTypography:i}=B(),l=bp({themeFromDocument:e,persist:t}),{old:u,saved:d,writeRoot:p}=l,f=l.fonts,m=l.sizes,b=l.typography,y=DI,E=C=>l.write(C),S=hp(a),T=gp(a),x=C=>{let D={...f,accent:C};e?p({fonts:D}):s(D),t({accent_font:C})},v=C=>{r({...m,accent:C}),t({accent_size_px:C})},w=C=>{let D={...b,weightStrong:C};e?p({headingTypography:D}):i(D),t({heading_weight_strong:C})},I=C=>{let D={...b,italicStrong:C};e?p({headingTypography:D}):i(D),t({accent_italic:C})};return Ut(Sn,{children:[L(pp,{saved:d,old:u,colours:S,colourNameOf:T,sizeOf:y,onChange:E,openId:n===fc?null:n,onOpenChange:o,withoutSize:e}),L(db,{font:f.accent,size:m.accent,weight:b.weightStrong,italic:b.italicStrong,headingWeight:b.weight,open:n===fc,onOpenChange:C=>o(C?fc:null),onChange:C=>{C.key==="font"?x(C.value):C.key==="size"?v(C.value):C.key==="weight"?w(C.value):I(C.value)},withoutSize:e})]})}var fc="accent",NI={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},LI={heading:32,body:14};function DI(e){return e.values.size??BI(j(NI,e.id)??"body")??LI[e.kind]}var FI={heading:"main h1, main h2",heading2:"main h1, main h2",heading3:"main h1, main h2",accent:"main h1 em, main h2 em",body:"main p",label:"main .mono-eyebrow"};function BI(e){if(typeof document>"u")return null;let t=(PI()?.contentDocument??document).querySelector(FI[e]);if(!t)return null;let n=parseFloat(getComputedStyle(t).fontSize);return Number.isFinite(n)?n:null}function HI({themeFromDocument:e,persist:t}){let{appState:n,dispatch:o}=Kb(f=>f),{cornerRadiusPx:a,setCornerRadiusPx:s}=B(),r=n.data,i=r.root?.props??{},l=i.cornerRadiusPx===void 0?ru[au(i.cornerStyle)]:Ae(i.cornerRadiusPx),u=e?l:a,d=lo("cornerRadius",a,s,t),p=f=>o({type:"replaceRoot",root:{...r.root,props:{...i,...f}},recordHistory:!0});return L(Wg,{value:u,onChange:f=>{e?(p({cornerRadiusPx:f}),t({corner_radius_px:f})):d.write(f)},...e?{}:{length:d.length}})}function MI({persist:e}){let{siteWidth:t,setSiteWidth:n,sectionBackgroundWidth:o,setSectionBackgroundWidth:a,sectionContentWidth:s,setSectionContentWidth:r}=B(),i=gc(),l=lo("siteWidth",t??null,n,e);if(i!=="desktop")return null;let u=typeof t=="number"?t:l.shown(V.default),d=l.write,p=m=>{a(m),e({section_background_width:m},!0)},f=m=>{r(m),e({section_content_width:m},!0)};return Ut(Sn,{children:[L(ib,{value:o??"full",changed:o!==null,detail:c("Full width"),onChange:p,onReset:()=>p(null),hint:sb}),L(lb,{mode:s??"content",px:u,min:V.min,max:V.max,changed:typeof t=="number"||s!==null,detail:`${c("Content width")} ${V.default}px`,onMode:f,onPx:m=>d(m),onReset:()=>{f(null),d(null)},hint:rb,length:l.length})]})}function UI({persist:e}){let{siteGutter:t,siteGutterPhone:n,setSiteGutter:o,setSiteGutterPhone:a,siteLengthUnits:s}=B(),r=ob(gc(),{gutter:t,phone:n,gutterUnit:s.siteGutterUnit}),i=r?.key==="site_gutter_phone",l=lo(tc("siteGutter",i?"mobile":"desktop"),r?.value??null,i?a:o,e);return r?L(ab,{value:r.value,onChange:l.write,unsetPx:r.unsetPx,restsOn:l.shown(r.unsetPx),bounds:r.bounds,length:l.length}):null}function $I({persist:e}){let{blockGap:t,blockGapPhone:n,setBlockGap:o,setBlockGapPhone:a,siteLengthUnits:s}=B(),r=qg(gc(),{gap:t,phone:n}),i=r?.key==="block_gap_phone",l=r?.followsPx==null?null:{figure:r.followsPx,unit:F(s.blockGapUnit)},u=lo(tc("blockGap",i?"mobile":"desktop"),r?.value??null,i?a:o,e,l);return r?L(Zg,{value:r.value,onChange:u.write,followsPx:u.rest,followsUnit:u.length.unit,length:u.length}):null}function GI({persist:e}){return Ut(Sn,{children:[L(MI,{persist:e}),L(UI,{persist:e}),L($I,{persist:e})]})}function zI(e){return{card_shadow:e}}function WI(e){return e===null?{shadow_color:null}:{shadow_color:kI(e)}}function KI(e){return{hover_effect:e}}function jI({persist:e}){let{cardShadow:t,setCardShadow:n,shadowColor:o,setShadowColor:a,hoverEffect:s,setHoverEffect:r}=B();return Ut(Sn,{children:[L(Kg,{value:t,onChange:i=>{n(i),e(zI(i),!0)}}),L(Yg,{value:o,onChange:i=>{a(i),e(WI(i),i===null)}}),L(Jg,{value:s,onChange:i=>{r(i),e(KI(i),!0)}})]})}function VI(e){return{photography_grayscale:e}}function YI({persist:e}){let{photographyGrayscale:t,setPhotographyGrayscale:n}=B();return L(eb,{value:t,onChange:o=>{n(o),e(VI(o),!0)}})}function XI({persist:e}){return L(Sn,{children:L(YI,{persist:e})})}function qI(e){return{share_button_on_posts:e}}function ZI({persist:e}){let{shareButtonOnPosts:t,setShareButtonOnPosts:n}=B();return L(tb,{value:t,onChange:o=>{n(o),e(qI(o),!0)}})}function T5(){let{websiteName:e}=B();return e?.trim()||Lu}function x5({themeFromDocument:e=!1,tokenRef:t,siteId:n,onNotify:o,tab:a,onTabChange:s,initialTab:r,revealPageGroup:i=!1,onPageGroupRevealed:l}){let{persist:u}=Fo({themeFromDocument:e,tokenRef:t,siteId:n,onResult:E=>{let S=bb(E);S&&o?.(S.msg,S.tone)}}),[d,p]=hc(r??Ts[0].id),f=a!==void 0,m=f?a:d,b=f?s??(()=>{}):p,y=Ts.find(E=>E.id===m)??Ts[0];return Ut(EI,{children:[L(e0,{activeId:y.id,onSelect:b}),Ut("div",{id:vI(mc,y.id),className:AI,role:"tabpanel","aria-labelledby":xI(mc,y.id),children:[m===jb&&Ut(Sn,{children:[L(HI,{themeFromDocument:e,persist:u}),!e&&L(jI,{persist:u}),!e&&L(GI,{persist:u}),!e&&L(XI,{persist:u}),!e&&L(ZI,{persist:u}),L(JI,{reveal:i,onRevealed:l})]}),m==="theme"&&L(RI,{themeFromDocument:e,persist:u}),m==="text"&&L(II,{themeFromDocument:e,persist:u})]})]})}function JI({reveal:e,onRevealed:t}){let[n,o]=hc(!0),a=SI(t);return a.current=t,yI(()=>{if(!e)return;o(!0);let s=requestAnimationFrame(()=>{document.getElementById(Wb)?.scrollIntoView({block:"start"}),a.current?.()});return()=>cancelAnimationFrame(s)},[e]),L(bI,{title:c("This page"),open:n,onToggle:o,id:Wb,children:L(QI,{})})}function QI(){let{fields:e,values:t,readOnly:n,onChange:o}=hI(),a=Object.fromEntries(Gb.filter(s=>s in e).map(s=>[s,e[s]]));return Object.keys(a).length===0?L(_I,{variant:"none",icon:!1,message:c("This page has no look of its own to set.")}):L(gI,{fields:a,values:t,onChange:o,readOnly:n,tabs:!1,idPrefix:"this-page",ariaLabel:c("This page")})}function e0({activeId:e,onSelect:t}){return L("div",{className:"es-insp-tabs",children:L(TI,{variant:"underline",block:!0,labelsFit:!0,"aria-label":c("Styles"),idPrefix:mc,value:e,onChange:t,items:Ts.map(n=>{let o=c(n.label);return{id:n.id,icon:n.icon,label:o}})})})}export{xe as a,pN as b,o0 as c,P as d,a0 as e,s0 as f,c as g,xn as h,V as i,zE as j,Wr as k,oF as l,Dp as m,rF as n,ie as o,zr as p,Le as q,we as r,tt as s,lF as t,YE as u,cF as v,Kr as w,uF as x,dF as y,pF as z,qE as A,fF as B,mF as C,hF as D,gF as E,Hp as F,bF as G,Up as H,yF as I,SF as J,Gp as K,zp as L,Wp as M,sT as N,rT as O,xF as P,wF as Q,CF as R,OF as S,PF as T,Gh as U,Nt as V,mO as W,gz as X,hO as Y,bz as Z,ne as _,yz as $,gO as aa,Sz as ba,_z as ca,Ez as da,Tz as ea,xz as fa,vz as ga,hn as ha,wz as ia,Cz as ja,ci as ka,di as la,kf as ma,pi as na,ax as oa,IH as pa,fa as qa,Bf as ra,ma as sa,sx as ta,rx as ua,FH as va,BH as wa,HH as xa,ix as ya,MH as za,fi as Aa,UH as Ba,$H as Ca,GH as Da,zH as Ea,WH as Fa,KH as Ga,jH as Ha,VH as Ia,YH as Ja,lx as Ka,Lr as La,wp as Ma,CE as Na,SD as Oa,Cp as Pa,OE as Qa,_D as Ra,Op as Sa,PE as Ta,ED as Ua,F2 as Va,qn as Wa,YC as Xa,nl as Ya,dn as Za,al as _a,sl as $a,B2 as ab,H2 as bb,M2 as cb,il as db,Rh as eb,U2 as fb,De as gb,Jr as hb,_B as ib,Ct as jb,Y2 as kb,X2 as lb,q2 as mb,Z2 as nb,J2 as ob,Yn as pb,ji as qb,xC as rb,Gi as sb,Vi as tb,uh as ub,Yi as vb,CC as wb,f2 as xb,Da as yb,m2 as zb,OC as Ab,PC as Bb,h2 as Cb,kC as Db,oh as Eb,g2 as Fb,b2 as Gb,y2 as Hb,RF as Ib,cT as Jb,uT as Kb,IF as Lb,Ue as Mb,Po as Nb,ju as Ob,S0 as Pb,_0 as Qb,Gu as Rb,Si as Sb,jM as Tb,VM as Ub,em as Vb,XM as Wb,qM as Xb,Kx as Yb,ZM as Zb,nm as _b,JM as $b,QM as ac,tm as bc,om as cc,eU as dc,Wn as ec,Ei as fc,tU as gc,nU as hc,oU as ic,aU as jc,Uo as kc,wS as lc,Pd as mc,kd as nc,An as oc,PS as pc,$o as qc,Nd as rc,s1 as sc,r1 as tc,pr as uc,i1 as vc,Ld as wc,DS as xc,FS as yc,BS as zc,f1 as Ac,m1 as Bc,fr as Cc,b1 as Dc,O1 as Ec,P1 as Fc,k1 as Gc,A1 as Hc,R1 as Ic,MS as Jc,US as Kc,I1 as Lc,Zt as Mc,$S as Nc,Ud as Oc,GS as Pc,N1 as Qc,zS as Rc,L1 as Sc,D1 as Tc,Od as Uc,Mo as Vc,Ko as Wc,Gd as Xc,zd as Yc,_r as Zc,VS as _c,jo as $c,Tt as ad,q1 as bd,QS as cd,e_ as dd,t_ as ed,Z1 as fd,J1 as gd,p_ as hd,St as id,Q1 as jd,eL as kd,v_ as ld,tL as md,nL as nd,vr as od,oL as pd,wr as qd,R_ as rd,aL as sd,sL as td,Cr as ud,rL as vd,iL as wd,lL as xd,F_ as yd,cL as zd,U_ as Ad,$_ as Bd,uL as Cd,dL as Dd,pL as Ed,z_ as Fd,fL as Gd,mL as Hd,j_ as Id,hL as Jd,gL as Kd,fn as Ld,pl as Md,fl as Nd,lm as Od,cU as Pd,cm as Qd,uU as Rd,dU as Sd,pU as Td,hi as Ud,QH as Vd,EG as Wd,Aw as Xd,TG as Yd,Bi as Zd,Hi as _d,xG as $d,vG as ae,wG as be,Ra as ce,CG as de,ko as ee,qt as fe,vn as ge,Vs as he,wn as ie,x0 as je,v0 as ke,w0 as le,Zu as me,Ju as ne,Qu as oe,C0 as pe,ve as qe,Ge as re,Hr as se,KD as te,ta as ue,jD as ve,VD as we,na as xe,YD as ye,XD as ze,qD as Ae,D0 as Be,On as Ce,F0 as De,wV as Ee,CV as Fe,co as Ge,DF as He,FF as Ie,BF as Je,HF as Ke,Kp as Le,MF as Me,UF as Ne,Uh as Oe,cz as Pe,bl as Qe,yl as Re,uz as Se,dz as Te,t$ as Ue,Fb as Ve,tY as We,nY as Xe,ZR as Ye,oY as Ze,aY as _e,sY as $e,rY as af,JR as bf,iY as cf,lY as df,cY as ef,uY as ff,nI as gf,dY as hf,st as if,MB as jf,BT as kf,ai as lf,Un as mf,UB as nf,zB as of,MT as pf,yf as qf,WB as rf,GT as sf,WT as tf,ri as uf,jB as vf,VB as wf,jT as xf,JB as yf,QB as zf,$n as Af,eH as Bf,Ef as Cf,Mr as Df,pH as Ef,fH as Ff,Tf as Gf,mH as Hf,kE as If,re as Jf,xD as Kf,AE as Lf,RE as Mf,OD as Nf,IE as Of,NE as Pf,PD as Qf,LE as Rf,kD as Sf,AD as Tf,RD as Uf,ID as Vf,ND as Wf,LD as Xf,DD as Yf,FD as Zf,BD as _f,HD as $f,MD as ag,UD as bg,$m as cg,eO as dg,Ua as eg,z2 as fg,wB as gg,Vh as hg,Qn as ig,Be as jg,Q as kg,eo as lg,gn as mg,Fz as ng,Bz as og,Mz as pg,Uz as qg,$z as rg,Gz as sg,zz as tg,Kz as ug,jz as vg,to as wg,Vz as xg,PO as yg,kO as zg,Xh as Ag,Yz as Bg,Tl as Cg,Ip as Dg,KF as Eg,jF as Fg,gT as Gg,bT as Hg,eB as Ig,ST as Jg,Jp as Kg,tB as Lg,nB as Mg,oB as Ng,sB as Og,ef as Pg,rB as Qg,iB as Rg,fB as Sg,mB as Tg,of as Ug,hB as Vg,_H as Wg,Cf as Xg,OH as Yg,Mf as Zg,Uf as _g,zn as $g,Kf as ah,sM as bh,rM as ch,ya as dh,bi as eh,$x as fh,NM as gh,sm as hh,hU as ih,Ca as jh,hm as kh,Dy as lh,Se as mh,Pn as nh,WU as oh,Pi as ph,ki as qh,VU as rh,Em as sh,YU as th,XU as uh,qU as vh,Cm as wh,Pm as xh,hN as yh,gN as zh,md as Ah,bN as Bh,hd as Ch,SN as Dh,Fo as Eh,_S as Fh,$N as Gh,xd as Hh,F$ as Ih,Am as Jh,Lm as Kh,Dm as Lh,Fm as Mh,Bm as Nh,Hm as Oh,Mm as Ph,Li as Qh,gw as Rh,bw as Sh,Vn as Th,Di as Uh,Gm as Vh,aG as Wh,Sw as Xh,sG as Yh,rG as Zh,iG as _h,Wm as $h,dG as ai,Tw as bi,pG as ci,fG as di,vw as ei,Cw as fi,Ow as gi,Pw as hi,bG as ii,kw as ji,yG as ki,Mi as li,LG as mi,Ym as ni,Lw as oi,FG as pi,UG as qi,Ui as ri,Yw as si,o2 as ti,HC as ui,O2 as vi,UC as wi,P2 as xi,k2 as yi,A2 as zi,mn as Ai,Ka as Bi,az as Ci,sz as Di,rz as Ei,AO as Fi,RO as Gi,Zz as Hi,DO as Ii,FO as Ji,Jz as Ki,Qz as Li,eW as Mi,tW as Ni,nW as Oi,cW as Pi,uW as Qi,dW as Ri,pW as Si,fW as Ti,mW as Ui,hW as Vi,gW as Wi,bW as Xi,yW as Yi,SW as Zi,Zh as _i,_W as $i,EW as aj,jO as bj,VO as cj,pg as dj,Bt as ej,lK as fj,cK as gj,uK as hj,dK as ij,pK as jj,fK as kj,Hl as lj,mK as mj,hK as nj,SK as oj,_K as pj,ek as qj,EK as rj,ss as sj,Ml as tj,bn as uj,kg as vj,TK as wj,xK as xj,vK as yj,wK as zj,ak as Aj,CK as Bj,OK as Cj,PK as Dj,kK as Ej,AK as Fj,RK as Gj,IK as Hj,NK as Ij,rs as Jj,pe as Kj,Pe as Lj,Ag as Mj,cn as Nj,Rg as Oj,Ig as Pj,LK as Qj,DK as Rj,FK as Sj,Ak as Tj,BK as Uj,HK as Vj,MK as Wj,UK as Xj,$K as Yj,GK as Zj,zK as _j,Z as $j,Dk as ak,WK as bk,KK as ck,Qa as dk,jK as ek,VK as fk,YK as gk,XK as hk,qK as ik,ZK as jk,ct as kk,JK as lk,tA as mk,QK as nk,ej as ok,tj as pk,nj as qk,oj as rk,$g as sk,aj as tk,sj as uk,rj as vk,Gg as wk,lj as xk,cj as yk,pA as zk,uj as Ak,dj as Bk,pj as Ck,fj as Dk,mj as Ek,Kl as Fk,zg as Gk,hj as Hk,gj as Ik,bj as Jk,yj as Kk,BU as Lk,HU as Mk,qV as Nk,ZV as Ok,lc as Pk,iR as Qk,ib as Rk,lb as Sk,Ql as Tk,kL as Uk,nn as Vk,AL as Wk,RL as Xk,IL as Yk,NL as Zk,eE as _k,LL as $k,DL as al,pp as bl,yb as cl,Cb as dl,PR as el,hV as fl,RR as gl,Pb as hl,_V as il,EV as jl,TV as kl,DR as ll,xV as ml,Ss as nl,RV as ol,VR as pl,RY as ql,Gb as rl,IY as sl,NY as tl,LY as ul,DY as vl,FY as wl,hp as xl,gp as yl,bp as zl,E5 as Al,jb as Bl,Ts as Cl,DI as Dl,T5 as El,x5 as Fl};