efficient-storefront-blocks 0.130.14 → 0.130.15

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.
@@ -1,4 +1,4 @@
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 Ms,$g as gt,$h as Pu,Aa as Ic,Ac as _o,Ag as Gs,Ah as _u,Bc as Dc,Ca as O,Cb as Nc,Cc as Fc,Ce as jc,Da as bo,Dc as Bc,Dd as Is,E as vc,Eb as $t,Ec as ks,Fb as He,Fc as Hc,Ia as ws,Id as le,If as qc,Jf as Bs,Ka as Rc,Kf as ke,Kg as ht,Kh as Ws,Ld as Uc,Lf as Zc,Lh as vo,Mf as Jc,Mg as cu,Mh as Eu,Nf as Wt,Nh as U,Ob as yo,Of as ce,Og as uu,Qg as du,Rc as Mc,Rf as Kt,Rh as Tu,Sc as As,Sd as $c,Sf as jt,Sg as pu,Sh as xu,Th as vu,Uh as wu,Vd as Gc,Vf as Qc,Wg as fu,Wh as Cu,Xg as mu,Ye as To,Yf as Hs,Yh as Yt,Zh as Ou,_f as eu,_h as wo,aa as wc,ah as zs,b as W,ba as Cc,c as Ye,ca as Oc,cg as tu,dg as nu,dh as bu,ea as dt,ee as Rs,ef as Ds,ga as go,hc as Lc,i as bc,ka as _n,kg as ou,l as mo,le as Eo,lg as Us,li as B,m as yc,n as Sc,ne as Gt,ng as au,oa as pt,oc as ft,oe as mt,of as M,og as ae,p as _c,pf as F,pg as su,ph as yu,q as Ec,qc as Cs,qf as Vc,qg as ru,qi as Lu,r as Tc,rc as Os,re as zc,rf as zt,rg as Ae,se as Ns,sf as Yc,sg as Vt,t as ho,tc as So,te as Wc,tf as Fs,u as xc,uf as Tn,va as Pc,vf as Xc,vg as iu,vh as Su,wa as kc,we as Kc,wg as $s,xa as Ac,xb as En,xe as Ls,yf as Xe,yh as xo,za as vs,zc as Ps,zf as qe,zg as lu}from"./chunk-KCZDH44S.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(`
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
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
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
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(`
@@ -1 +1 @@
1
- import{jsx as l,Fragment as j,jsxs as q}from"react/jsx-runtime";import{textKindStyleRows as z}from"./text-kind-style-rows.js";import{assignSectionGroups as A,reseatBucketTabs as R}from"efficient-web-builder/editor/lib/document/field-groups";import{buildBlockCategories as V}from"efficient-web-builder/format/lib/document/section-catalog";import{CONTAINER_DIRECTION_LABELS as v}from"efficient-web-builder/format/lib/content/container-direction";import{SITE_FOOTER_TYPE as X,SITE_HEADER_TYPE as Q}from"efficient-web-builder/format/lib/document/section-groups";import J from"../../components/MenuLinkRangeField.js";import Z from"../../components/EditorPreviewChat.js";import $ from"../../components/EditorPreviewSurface.js";import{isSystemPageSlug as ee,POPUP_DAYS_RANGE as D,POPUP_DELAY_RANGE as w,POPUP_HIDE_AFTER as te,POPUP_SCROLL_RANGE as I,POPUP_SHOW_ON as oe,POPUP_TRIGGERS as N,SUBSCRIBE_POPUP_DEFAULTS as re,SUBSCRIBE_POPUP_KIND as ie}from"efficient-web-builder/format/lib/content/subscribe";import{shownForOption as y,withRowRules as ae,withShowWhen as g}from"efficient-web-builder/render/lib/document/show-when";import{POPUP_KIND_PROP as le,POPUP_TEXT_KIND_LABELS as ne,POPUP_TEXT_KINDS as se}from"efficient-web-builder/format/lib/popup/text-kinds";import{loadPages as ce}from"efficient-web-builder/editor/components/StorefrontLinkField";import{pagePath as me}from"../../../render/lib/links/link-rules.js";import{getEditorSiteId as ue}from"efficient-web-builder/render/lib/editor-site";import{CART_DRAWER_DEFAULTS as de,CART_DRAWER_KIND as B}from"efficient-web-builder/format/lib/content/cart-drawer";import{POPUP_PAGE_KIND as x}from"efficient-web-builder/format/lib/popup/look";import{menuPanelLookFields as pe,popupLookFields as ge}from"./popup-look-fields.js";import{MENU_PANEL_TINT_OPACITY_DEFAULT as Pe,MENU_PANEL_WIDTH_DEFAULT as fe,MENU_STYLE_BUTTON as H,MENU_STYLE_PLAIN as k,MENU_STYLE_TABS as E}from"../../../render/lib/content/menu-row.js";import{CONSENT_BANNER_KIND as M}from"efficient-web-builder/format/lib/content/consent-banner";import{consentBannerLayoutField as Se}from"../../components/ConsentBannerLayoutTiles.js";import{CategoryIcon as be,CheckIcon as Te,ClockIcon as F,ColumnsIcon as he,DirectionIcon as ye,EyeIcon as ke,ListIcon as Be,PageIcon as Ee,PlacementIcon as Fe,ScrollPointIcon as _e,TabsIcon as Le,TriggerIcon as Oe}from"efficient-easel/icons";import{deviceField as U}from"efficient-easel/screen/lib/document/device-fields";import{FieldGlyph as Ce}from"efficient-web-builder/editor/components/FieldGlyph";import{DisplayRow as Ae,multiSelect as Re,panelNote as ve,plainText as a,plainTextarea as p,sectionShapeFields as De,sectionThemeFields as we,textList as _,toggle as G}from"efficient-web-builder/editor/lib/document/controls";import{group as u,phoneTwinFields as Ie}from"efficient-easel/screen/lib/document/box-fields";import{segmented as P,select as Ne,slider as L}from"efficient-web-builder/editor/lib/document/box-fields";import{blockAlignRow as xe}from"./block-align-row.js";import{formPicker as He}from"./blocks/service/controls.js";import{SECTION_THEME_FOLLOW_LABEL as Me}from"efficient-web-builder/editor/components/SectionThemePicker";import{nestedAccentValue as Ue}from"efficient-web-builder/format/lib/content/section-surface";import{isEditorOnDynamicPage as Ge}from"efficient-web-builder/format/lib/document/editor-page-context";import{TEMPLATE_PRODUCT_TYPE_PROP as Ke}from"efficient-web-builder/format/lib/content/product-page";import{PRODUCT_KIND_OPTIONS as We}from"../../../render/lib/catalog/plp-item.js";import{PH as O}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{NO_BLOCK_SOURCE as Ye,blockSourceField as je,blockSourceFields as qe}from"efficient-web-builder/editor/lib/document/block-source-fields";import{menuTemplateFollowsContent as ze}from"../../../render/lib/content/menu-card-seed.js";import"../efficient-backend.js";import"../../../render/lib/document/slot-seeds.js";import"../../../render/lib/document/card-templates.js";import"../../../render/lib/document/section-to-box-rows-reviews.js";import"../../../render/lib/document/section-to-box-rows-spec.js";import"../../../render/lib/document/section-to-box-rows-productgrid.js";import"../../../render/lib/document/section-to-box-rows-events.js";import"../../../render/lib/document/section-to-box-rows-collections.js";import"../../../render/lib/document/section-to-box-rows-gallery.js";import"../../../render/lib/document/section-to-box-rows-producthero.js";import"../../../render/lib/document/section-to-box-rows-fitment.js";import"../../../render/lib/document/section-to-box-rows-detail.js";import"../../../render/lib/document/section-to-box-rows-service.js";import"../../../render/lib/document/section-to-box-rows-listing.js";import"./section-text-regions.js";import{generalBlocks as e}from"efficient-web-builder/editor/lib/document/blocks/general/index";import{commerceBlocks as t}from"./blocks/commerce/index.js";import{serviceBlocks as i}from"./blocks/service/index.js";import{EditorThemedBody as Ve,suppressPreviewNav as Xe}from"efficient-web-builder/editor/lib/document/page-root";import Qe from"../../components/HeaderSection.js";import{addPageBlocksFromFooter as Je,PAGE_MENU_DIRECTION_DEFAULT as C}from"../../../render/lib/document/footer-page-blocks.js";import{drawPopupPage as Ze,drawPublishedStorefrontRoot as $e,drawSystemPage as et,StorefrontPageProviders as tt}from"../../../render/lib/document/storefront-root.js";import ot from"../../components/PostListStartsFromPage.js";import{GENERAL_ROOT_FIELDS as rt}from"efficient-web-builder/editor/lib/document/page-root-fields";import{finishRegistry as it}from"efficient-web-builder/editor/lib/document/registry";import{MENU_BLOCK_TYPE as at}from"../../../render/lib/document/document-nodes.js";const lt="Newsletter (built in)",nt=[{id:"currentPage",label:"Current page"}],Co=[{value:"00",label:O.label},{value:"00",label:O.label},{value:"00",label:O.label}],r=re,S={field:"autoOpen",is:!0},st={all:[y("hideAfter",te,r.hideAfter,["days"]),{not:{all:[{field:"hideAfter",is:null,default:null},{field:"oncePerSession",in:[!0,!1]}]}}]},ct=[[["trigger","showOn","hideAfter"],S],[["autoOpenDelaySec"],{all:[S,y("trigger",N,r.trigger,["delay","exit"])]}],[["scrollPercent"],{all:[S,y("trigger",N,r.trigger,["scroll"])]}],[["showOnPages"],{all:[S,y("showOn",oe,r.showOn,["chosen"])]}],[["hideDays"],{all:[S,st]}]],mt=ae({formSlug:He(void 0,lt),_gLeft:u("Left panel"),metaLabel:a("Meta label",r.metaLabel),issueLabel:a("Issue label",r.issueLabel),issueNumber:a("Issue number",r.issueNumber),kicker:a("Eyebrow",r.kicker),heading:p("Heading",r.heading),deck:p("Deck",r.deck),stats:{type:"array",label:"Stats",arrayFields:{label:a("Label"),value:a("Value")},getItemSummary:o=>o?.label||o?.value||"Stat"},_gForm:u("Right panel · form"),formLabel:a("Section label",r.formLabel),formHeading:a("Heading",r.formHeading),formIntro:p("Intro",r.formIntro),firstNameLabel:a("First-name label",r.firstNameLabel),firstNamePlaceholder:a("First-name placeholder",r.firstNamePlaceholder),emailLabel:a("Email label",r.emailLabel),emailPlaceholder:a("Email placeholder",r.emailPlaceholder),_gChoices:u("Right panel · choices"),interestsLabel:a("Interests label",r.interestsLabel),interests:_("Interest chips",l(Ce,{noun:"tag"}),"Chip label","verbatim"),frequencyLabel:a("Frequency label",r.frequencyLabel),frequencies:_("Frequency options",l(Be,{}),"Option label","verbatim"),_gActions:u("Right panel · actions"),submitText:a("Submit button",r.submitText),finePrint:a("Fine print",r.finePrint),dismissText:a("Dismiss link",r.dismissText),emailInvalidText:a("Invalid-email error",r.emailInvalidText),submitErrorText:a("Submit-failed error",r.submitErrorText),_gSuccess:u("Success state"),successHeading:a("Heading",r.successHeading),successBody:p("Message",r.successBody),keepBrowsingText:a("Dismiss button",r.keepBrowsingText),...we(Ue,Me),...De(),...z(se,le,ne,{unsetLabel:"Popup's own"}),_gBehaviour:u("Behavior"),autoOpen:G("Show by itself",r.autoOpen,l(ke,{})),trigger:P("Trigger",l(Oe,{}),[{label:"Delay",value:"delay"},{label:"Scroll",value:"scroll"},{label:"Exit",value:"exit"}],r.trigger),autoOpenDelaySec:L("Delay",l(F,{}),w.min,w.max,1,r.autoOpenDelaySec,"s"),scrollPercent:L("Scroll",l(_e,{}),I.min,I.max,5,r.scrollPercent,"%"),showOn:P("Pages",l(Ee,{}),[{label:"All",value:"all"},{label:"Chosen",value:"chosen"}],r.showOn),showOnPages:Re("Chosen pages",[],"None"),hideAfter:P("After close",l(F,{}),[{label:"This visit",value:"visit"},{label:"Days",value:"days"},{label:"Never",value:"never"}],r.hideAfter),hideDays:L("Days",l(F,{}),D.min,D.max,1,r.hideDays),_gArrangement:u("Arrangement"),formSide:P("Form side",l(Fe,{}),[{label:"Right",value:"right"},{label:"Left",value:"left"}],r.formSide),_gPhone:U("mobile",u("On a phone")),valuePanelOnPhone:U("mobile",G("Left panel",r.valuePanelOnPhone,l(he,{})))},ct),K=A(mt,"SubscribePopup");async function ut(){return(await ce(ue()??"")).filter(c=>!ee(c.slug)).map(c=>({label:c.label,value:me(c.slug)}))}async function dt(){return R({...K,showOnPages:{...K.showOnPages,options:await ut().catch(()=>[])}})}const d=de,pt={_gHeader:u("Header"),kickerBadge:a("Eyebrow badge",d.kickerBadge),kickerText:a("Eyebrow text",d.kickerText),titleLead:a("Heading",d.titleLead),titleAccent:a("Heading accent",d.titleAccent),subtitleEmpty:p("Sub-line · empty",d.subtitleEmpty),subtitleOne:p("Sub-line · one set",d.subtitleOne),subtitleMany:p("Sub-line · several sets",d.subtitleMany,"{count} becomes the number of sets"),_gStatus:u("Status rail"),leadTimeValue:a("Lead time",d.leadTimeValue),shipsToFallback:a("Ships to · fallback",d.shipsToFallback,"Shown only while the site serves no countries — otherwise the site's default country is stated"),_gPromises:u("Promise row"),promises:_("Trust markers",l(Te,{}),"Marker","verbatim"),_gEmpty:u("Empty basket"),emptyKicker:a("Eyebrow",d.emptyKicker),emptyBody:p("Message",d.emptyBody)},W=(o,c,m)=>R({...o,...A(ge(c),m)}),gt=W(pt,B,"CartDrawer"),Pt={layout:Se,_nConsentWhere:ve("The banner's words follow each visitor's country. Turn consent on or off, and pick the privacy page, in Admin › Storefront › Marketing › Privacy.")};function ft({kind:o}){return l("div",{style:{padding:"14px 18px",fontFamily:"var(--font-mono, monospace)",fontSize:12,letterSpacing:"0.18em",textTransform:"uppercase",color:"var(--fg-dim)",borderBottom:"1px solid var(--site-line)"},children:o===B?"This is the cart drawer — edit its copy in the Settings panel →":o===M?"This is the cookie banner — pick its layout in the Settings panel →":"This is the site popup — edit it in the Settings panel →"})}const b={root:{fields:{...rt},resolveFields:async(o,{fields:c})=>{if(o?.props?.kind===ie)return dt();if(o?.props?.kind===x)return W(c,x,"PopupPage");if(o?.props?.kind===B)return gt;if(o?.props?.kind===M)return Pt;const m=c;return Ge()?{[Ke]:Ne("Product type",l(be,{}),We,"alloy-wheel"),...m}:m},render:o=>{const{editor:c,pageBackground:m,theme:T,fonts:h}=o;if(!c?.isEditing)return $e(o);const f=et(o,l(ft,{kind:o.kind}));if(f)return f;const n=Ze(o,!0);return l(Ve,{propsTheme:T,propsFonts:h,pageBackground:typeof m=="string"?m:void 0,suppressPreviewNav:Xe,overlay:q(j,{children:[l(Z,{}),l($,{})]}),children:l(ot,{children:n??l(tt,{rootProps:o,children:o.children})})})}},categories:V(),components:{Heading:e.Heading,Text:e.Text,Eyebrow:e.Eyebrow,ImageBlock:e.ImageBlock,LogoBlock:e.LogoBlock,ButtonBlock:e.ButtonBlock,Spacer:e.Spacer,Divider:e.Divider,Grid:e.Grid,Flex:e.Flex,Breadcrumb:e.Breadcrumb,Masthead:e.Masthead,CategoryBar:e.CategoryBar,FeaturedCover:e.FeaturedCover,LongRead:e.LongRead,Series:e.Series,Subscribe:i.Subscribe,SubscribeBlogs:i.SubscribeBlogs,Banner:e.Banner,ParagraphsA:e.ParagraphsA,StatsParagraph:e.StatsParagraph,Timeline:e.Timeline,Footprint:e.Footprint,TimelineTrack:e.TimelineTrack,TitleWithButtons:e.TitleWithButtons,Stats:e.Stats,Integrations:e.Integrations,Mockup:e.Mockup,Chart:e.Chart,KeyFeatures:e.KeyFeatures,Testimonials:e.Testimonials,Reviews:i.Reviews,RatingBlock:i.RatingBlock,Prose:e.Prose,Cards:e.Cards,Logos:e.Logos,Ticker:e.Ticker,ContactRouting:i.ContactRouting,ContactLocations:e.ContactLocations,DealerFinder:i.DealerFinder,SignUp:i.SignUp,HeroSingle:e.HeroSingle,Hero:e.Hero,HeroSlide:e.HeroSlide,HeroGroup:e.HeroGroup,Collections:t.Collections,CollectionCard:t.CollectionCard,Events:i.Events,RateTable:i.RateTable,MessagingCards:i.MessagingCards,ContactCards:i.ContactCards,OpeningHours:i.OpeningHours,PostCard:e.PostCard,DocMetaCards:e.DocMetaCards,DocTabs:e.DocTabs,DocMasthead:e.DocMasthead,DocBody:e.DocBody,Contents:e.Contents,ListSearch:e.ListSearch,FAQ:e.FAQ,Gallery:t.Gallery,GalleryB:t.GalleryB,SpecStrip:e.SpecStrip,GalleryItem:t.GalleryItem,Manifesto:e.Manifesto,SectionHeader:e.SectionHeader,IntroBleed:e.IntroBleed,Split:e.Split,SubmitBuild:i.SubmitBuild,SubmitBox:i.SubmitBox,ReviewForm:i.ReviewForm,Form:i.Form,AppointmentBooking:i.AppointmentBooking,BookingBox:i.BookingBox,CatalogFilterBar:t.CatalogFilterBar,AlloyWheelsListing:t.AlloyWheelsListing,ProductGrid:t.ProductGrid,ProductHero:t.ProductHero,ProductGallery:t.ProductGallery,SpecTable:t.SpecTable,ProcessSteps:e.ProcessSteps,DetailRows:t.DetailRows,FitmentTable:t.FitmentTable,RelatedProducts:t.RelatedProducts,BundleOffer:t.BundleOffer,CompatibleTyres:t.CompatibleTyres,TyreSizes:t.TyreSizes,TyreFitment:t.TyreFitment,EuTyreLabel:t.EuTyreLabel,EuTyreLabelBlock:t.EuTyreLabelBlock,WheelDiagram:t.WheelDiagram,ProductSize:t.ProductSize,ProductColour:t.ProductColour,ProductPrice:t.ProductPrice,ProductBuyButton:t.ProductBuyButton,FilterBlock:t.FilterBlock,FilterChipsBlock:t.FilterChipsBlock,ProductPicture:t.ProductPicture,ProductSpecs:t.ProductSpecs,ProductBuy:t.ProductBuy,ProductEyebrow:t.ProductEyebrow,ProductName:t.ProductName,ProductSku:t.ProductSku,FitmentFinder:t.FitmentFinder,FitmentPicker:t.FitmentPicker,StockFitment:t.StockFitment,OrderSummary:e.OrderSummary,DeliveryOptions:t.DeliveryOptions,PaymentBadges:e.PaymentBadges,CheckoutCTA:t.CheckoutCTA,ProductRef:t.ProductRef,CustomHTML:e.CustomHTML,CardList:e.CardList,HostPart:e.HostPart,Header:t.Header,Footer:i.Footer,FooterLogo:i.FooterLogo,FooterMenu:i.FooterMenu,ArticleBody:i.ArticleBody,MenuLinkBlock:i.MenuLinkBlock,FooterDivider:i.FooterDivider,FooterGroup:i.FooterGroup,FooterText:i.FooterText,FooterEmailSignup:i.FooterEmailSignup,FooterSocial:i.FooterSocial,FooterMessaging:i.FooterMessaging,FooterPayment:i.FooterPayment,LegalLineBlock:i.LegalLineBlock,SearchBlock:t.SearchBlock,CartBlock:t.CartBlock,CountrySwitchBlock:t.CountrySwitchBlock,AccountBlock:t.AccountBlock,ThemeSwitchBlock:t.ThemeSwitchBlock,[Q]:i.SiteHeader,[X]:i.SiteFooter}};Je(b.components);{const o=b.components.MenuBlock;o.fields={...o.fields,direction:P("Direction",l(ye,{}),[{label:v.column,value:"column"},{label:v.row,value:"row"}],C)};const c={type:"custom",render:({value:n,onChange:s})=>l(J,{value:n,onChange:s})},m=g({type:"custom",render:({value:n,onChange:s})=>l(Ae,{parts:nt,changed:n===!0,shown:()=>n===!0,onPress:(bt,Y)=>s(Y),onReset:()=>s(void 0)})},{not:{field:"direction",is:"column",default:C}});o.fields=Object.fromEntries(Object.entries(o.fields).flatMap(([n,s])=>n==="menu"?[["dataSource",je("Menu content","Manual")],[n,s],["linkRange",c],["currentPage",m]]:[[n,s]]));const T=o;T.resolveFields=(n,{fields:s})=>qe(at,s,n.props,{hides:["menu"]}),T.resolveData=n=>{const s=ze(n.props);return s===n.props?n:{...n,props:s}},o.fields={...o.fields,linkAlign:xe({label:"Link alignment"}),...Object.fromEntries(Object.entries(Ie("menuStyle",P("Menu style",l(Le,{}),[{label:"Plain",value:k},{label:"Tabs",value:E},{label:"Menu button",value:H}],k))).map(([n,s])=>[n,g(s,{not:{field:"direction",is:"column",default:C}})])),...Object.fromEntries(Object.entries(pe(fe,Pe)).map(([n,s])=>[n,g(s,{all:[{not:{field:"menuStyle",is:k,default:k}},{not:{field:"menuStyle",is:E}}]})]))};const h={not:{field:"menuStyle",is:E}},f={not:{field:"menuStyle",is:H}};o.fields.linkRange=g(o.fields.linkRange,{all:[h,Ye]}),o.fields.linkAlign=g(o.fields.linkAlign,{all:[h,f]}),o.fields.direction=g(o.fields.direction,f)}{const o=b.components.Header,c=o.render;o.render=m=>m.editor?.isEditing?l(Qe,{editing:!0}):c(m)}const St=it(b),Ao=St.sectionGroupAllow;var Ro=b;export{Ao as SECTION_GROUP_ALLOW,b as config,Ro as default,mt as subscribePopupFields};
1
+ import{jsx as l,Fragment as V,jsxs as q}from"react/jsx-runtime";import{textKindStyleRows as X}from"./text-kind-style-rows.js";import{assignSectionGroups as R,reseatBucketTabs as A}from"efficient-web-builder/editor/lib/document/field-groups";import{buildBlockCategories as Q}from"efficient-web-builder/format/lib/document/section-catalog";import{CONTAINER_DIRECTION_LABELS as v}from"efficient-web-builder/format/lib/content/container-direction";import{SITE_FOOTER_TYPE as J,SITE_HEADER_TYPE as Z}from"efficient-web-builder/format/lib/document/section-groups";import $ from"../../components/MenuLinkRangeField.js";import ee from"../../components/EditorPreviewChat.js";import te from"../../components/EditorPreviewSurface.js";import{isSystemPageSlug as oe,POPUP_DAYS_RANGE as D,POPUP_DELAY_RANGE as w,POPUP_HIDE_AFTER as re,POPUP_SCROLL_RANGE as I,POPUP_SHOW_ON as ie,POPUP_TRIGGERS as N,SUBSCRIBE_POPUP_DEFAULTS as ae,SUBSCRIBE_POPUP_KIND as le}from"efficient-web-builder/format/lib/content/subscribe";import{shownForOption as y,withRowRules as ne,withShowWhen as P}from"efficient-web-builder/render/lib/document/show-when";import{POPUP_KIND_PROP as se,POPUP_TEXT_KIND_LABELS as ce,POPUP_TEXT_KINDS as me}from"efficient-web-builder/format/lib/popup/text-kinds";import{loadPages as ue}from"efficient-web-builder/editor/components/StorefrontLinkField";import{pagePath as de}from"../../../render/lib/links/link-rules.js";import{getEditorSiteId as pe}from"efficient-web-builder/render/lib/editor-site";import{CART_DRAWER_DEFAULTS as Pe,CART_DRAWER_KIND as E}from"efficient-web-builder/format/lib/content/cart-drawer";import{POPUP_PAGE_KIND as H}from"efficient-web-builder/format/lib/popup/look";import{menuPanelLookFields as ge,popupLookFields as fe}from"./popup-look-fields.js";import{MENU_PANEL_TINT_OPACITY_DEFAULT as Se,MENU_PANEL_WIDTH_DEFAULT as be,MENU_STYLE_BUTTON as x,MENU_STYLE_PLAIN as k,MENU_STYLE_TABS as B}from"../../../render/lib/content/menu-row.js";import{CONSENT_BANNER_KIND as M}from"efficient-web-builder/format/lib/content/consent-banner";import{consentBannerLayoutField as Te}from"../../components/ConsentBannerLayoutTiles.js";import{CategoryIcon as he,CheckIcon as ye,ClockIcon as F,ColumnsIcon as ke,DirectionIcon as Ee,EyeIcon as Be,ListIcon as Fe,PageIcon as _e,PlacementIcon as Le,ScrollPointIcon as Oe,TabsIcon as Ce,TriggerIcon as Re}from"efficient-easel/icons";import{deviceField as U}from"efficient-easel/screen/lib/document/device-fields";import{FieldGlyph as Ae}from"efficient-web-builder/editor/components/FieldGlyph";import{DisplayRow as ve,multiSelect as De,panelNote as we,plainText as a,plainTextarea as p,sectionShapeFields as Ie,sectionThemeFields as Ne,textList as _,toggle as G}from"efficient-web-builder/editor/lib/document/controls";import{group as u,phoneTwinFields as He}from"efficient-easel/screen/lib/document/box-fields";import{segmented as g,select as xe,slider as L}from"efficient-web-builder/editor/lib/document/box-fields";import{blockAlignRow as Me}from"./block-align-row.js";import{formPicker as Ue}from"./blocks/service/controls.js";import{SECTION_THEME_FOLLOW_LABEL as Ge}from"efficient-web-builder/editor/components/SectionThemePicker";import{nestedAccentValue as Ke}from"efficient-web-builder/format/lib/content/section-surface";import{isEditorOnDynamicPage as We}from"efficient-web-builder/format/lib/document/editor-page-context";import{TEMPLATE_PRODUCT_TYPE_PROP as Ye}from"efficient-web-builder/format/lib/content/product-page";import{PRODUCT_KIND_OPTIONS as je}from"../../../render/lib/catalog/plp-item.js";import{PH as O}from"efficient-web-builder/format/lib/document/blocks/placeholders";import{NO_BLOCK_SOURCE as ze,blockSourceField as Ve,blockSourceFields as qe}from"efficient-web-builder/editor/lib/document/block-source-fields";import{menuTemplateFollowsContent as Xe}from"../../../render/lib/content/menu-card-seed.js";import"../efficient-backend.js";import"../../../render/lib/document/slot-seeds.js";import"../../../render/lib/document/card-templates.js";import"../../../render/lib/document/section-to-box-rows-reviews.js";import"../../../render/lib/document/section-to-box-rows-spec.js";import"../../../render/lib/document/section-to-box-rows-productgrid.js";import"../../../render/lib/document/section-to-box-rows-events.js";import"../../../render/lib/document/section-to-box-rows-collections.js";import"../../../render/lib/document/section-to-box-rows-gallery.js";import"../../../render/lib/document/section-to-box-rows-producthero.js";import"../../../render/lib/document/section-to-box-rows-fitment.js";import"../../../render/lib/document/section-to-box-rows-detail.js";import"../../../render/lib/document/section-to-box-rows-service.js";import"../../../render/lib/document/section-to-box-rows-listing.js";import"./section-text-regions.js";import{generalBlocks as e}from"efficient-web-builder/editor/lib/document/blocks/general/index";import{commerceBlocks as t}from"./blocks/commerce/index.js";import{serviceBlocks as i}from"./blocks/service/index.js";import{EditorThemedBody as Qe,suppressPreviewNav as Je}from"efficient-web-builder/editor/lib/document/page-root";import Ze from"../../components/HeaderSection.js";import{addPageBlocksFromFooter as $e,PAGE_MENU_DIRECTION_DEFAULT as C}from"../../../render/lib/document/footer-page-blocks.js";import{drawPopupPage as et,drawPublishedStorefrontRoot as tt,drawSystemPage as ot,StorefrontPageProviders as rt}from"../../../render/lib/document/storefront-root.js";import it from"../../components/PostListStartsFromPage.js";import{GENERAL_ROOT_FIELDS as at}from"efficient-web-builder/editor/lib/document/page-root-fields";import{finishRegistry as lt}from"efficient-web-builder/editor/lib/document/registry";import{pictureHoverFields as nt}from"efficient-web-builder/editor/lib/animation/hover-fields";import{HOVER_GROUP_KEY as K,PICTURE_HOVER_KEYS as W}from"efficient-web-builder/format/lib/animation/hover";import{MENU_BLOCK_TYPE as st}from"../../../render/lib/document/document-nodes.js";const ct="Newsletter (built in)",mt=[{id:"currentPage",label:"Current page"}],wo=[{value:"00",label:O.label},{value:"00",label:O.label},{value:"00",label:O.label}],r=ae,b={field:"autoOpen",is:!0},ut={all:[y("hideAfter",re,r.hideAfter,["days"]),{not:{all:[{field:"hideAfter",is:null,default:null},{field:"oncePerSession",in:[!0,!1]}]}}]},dt=[[["trigger","showOn","hideAfter"],b],[["autoOpenDelaySec"],{all:[b,y("trigger",N,r.trigger,["delay","exit"])]}],[["scrollPercent"],{all:[b,y("trigger",N,r.trigger,["scroll"])]}],[["showOnPages"],{all:[b,y("showOn",ie,r.showOn,["chosen"])]}],[["hideDays"],{all:[b,ut]}]],pt=ne({formSlug:Ue(void 0,ct),_gLeft:u("Left panel"),metaLabel:a("Meta label",r.metaLabel),issueLabel:a("Issue label",r.issueLabel),issueNumber:a("Issue number",r.issueNumber),kicker:a("Eyebrow",r.kicker),heading:p("Heading",r.heading),deck:p("Deck",r.deck),stats:{type:"array",label:"Stats",arrayFields:{label:a("Label"),value:a("Value")},getItemSummary:o=>o?.label||o?.value||"Stat"},_gForm:u("Right panel · form"),formLabel:a("Section label",r.formLabel),formHeading:a("Heading",r.formHeading),formIntro:p("Intro",r.formIntro),firstNameLabel:a("First-name label",r.firstNameLabel),firstNamePlaceholder:a("First-name placeholder",r.firstNamePlaceholder),emailLabel:a("Email label",r.emailLabel),emailPlaceholder:a("Email placeholder",r.emailPlaceholder),_gChoices:u("Right panel · choices"),interestsLabel:a("Interests label",r.interestsLabel),interests:_("Interest chips",l(Ae,{noun:"tag"}),"Chip label","verbatim"),frequencyLabel:a("Frequency label",r.frequencyLabel),frequencies:_("Frequency options",l(Fe,{}),"Option label","verbatim"),_gActions:u("Right panel · actions"),submitText:a("Submit button",r.submitText),finePrint:a("Fine print",r.finePrint),dismissText:a("Dismiss link",r.dismissText),emailInvalidText:a("Invalid-email error",r.emailInvalidText),submitErrorText:a("Submit-failed error",r.submitErrorText),_gSuccess:u("Success state"),successHeading:a("Heading",r.successHeading),successBody:p("Message",r.successBody),keepBrowsingText:a("Dismiss button",r.keepBrowsingText),...Ne(Ke,Ge),...Ie(),...X(me,se,ce,{unsetLabel:"Popup's own"}),_gBehaviour:u("Behavior"),autoOpen:G("Show by itself",r.autoOpen,l(Be,{})),trigger:g("Trigger",l(Re,{}),[{label:"Delay",value:"delay"},{label:"Scroll",value:"scroll"},{label:"Exit",value:"exit"}],r.trigger),autoOpenDelaySec:L("Delay",l(F,{}),w.min,w.max,1,r.autoOpenDelaySec,"s"),scrollPercent:L("Scroll",l(Oe,{}),I.min,I.max,5,r.scrollPercent,"%"),showOn:g("Pages",l(_e,{}),[{label:"All",value:"all"},{label:"Chosen",value:"chosen"}],r.showOn),showOnPages:De("Chosen pages",[],"None"),hideAfter:g("After close",l(F,{}),[{label:"This visit",value:"visit"},{label:"Days",value:"days"},{label:"Never",value:"never"}],r.hideAfter),hideDays:L("Days",l(F,{}),D.min,D.max,1,r.hideDays),_gArrangement:u("Arrangement"),formSide:g("Form side",l(Le,{}),[{label:"Right",value:"right"},{label:"Left",value:"left"}],r.formSide),_gPhone:U("mobile",u("On a phone")),valuePanelOnPhone:U("mobile",G("Left panel",r.valuePanelOnPhone,l(ke,{})))},dt),Y=R(pt,"SubscribePopup");async function Pt(){return(await ue(pe()??"")).filter(s=>!oe(s.slug)).map(s=>({label:s.label,value:de(s.slug)}))}async function gt(){return A({...Y,showOnPages:{...Y.showOnPages,options:await Pt().catch(()=>[])}})}const d=Pe,ft={_gHeader:u("Header"),kickerBadge:a("Eyebrow badge",d.kickerBadge),kickerText:a("Eyebrow text",d.kickerText),titleLead:a("Heading",d.titleLead),titleAccent:a("Heading accent",d.titleAccent),subtitleEmpty:p("Sub-line · empty",d.subtitleEmpty),subtitleOne:p("Sub-line · one set",d.subtitleOne),subtitleMany:p("Sub-line · several sets",d.subtitleMany,"{count} becomes the number of sets"),_gStatus:u("Status rail"),leadTimeValue:a("Lead time",d.leadTimeValue),shipsToFallback:a("Ships to · fallback",d.shipsToFallback,"Shown only while the site serves no countries — otherwise the site's default country is stated"),_gPromises:u("Promise row"),promises:_("Trust markers",l(ye,{}),"Marker","verbatim"),_gEmpty:u("Empty basket"),emptyKicker:a("Eyebrow",d.emptyKicker),emptyBody:p("Message",d.emptyBody)},j=(o,s,m)=>A({...o,...R(fe(s),m)}),St=j(ft,E,"CartDrawer"),bt={layout:Te,_nConsentWhere:we("The banner's words follow each visitor's country. Turn consent on or off, and pick the privacy page, in Admin › Storefront › Marketing › Privacy.")};function Tt({kind:o}){return l("div",{style:{padding:"14px 18px",fontFamily:"var(--font-mono, monospace)",fontSize:12,letterSpacing:"0.18em",textTransform:"uppercase",color:"var(--fg-dim)",borderBottom:"1px solid var(--site-line)"},children:o===E?"This is the cart drawer — edit its copy in the Settings panel →":o===M?"This is the cookie banner — pick its layout in the Settings panel →":"This is the site popup — edit it in the Settings panel →"})}const f={root:{fields:{...at},resolveFields:async(o,{fields:s})=>{if(o?.props?.kind===le)return gt();if(o?.props?.kind===H)return j(s,H,"PopupPage");if(o?.props?.kind===E)return St;if(o?.props?.kind===M)return bt;const m=s;return We()?{[Ye]:xe("Product type",l(he,{}),je,"alloy-wheel"),...m}:m},render:o=>{const{editor:s,pageBackground:m,theme:T,fonts:h}=o;if(!s?.isEditing)return tt(o);const S=ot(o,l(Tt,{kind:o.kind}));if(S)return S;const n=et(o,!0);return l(Qe,{propsTheme:T,propsFonts:h,pageBackground:typeof m=="string"?m:void 0,suppressPreviewNav:Je,overlay:q(V,{children:[l(ee,{}),l(te,{})]}),children:l(it,{children:n??l(rt,{rootProps:o,children:o.children})})})}},categories:Q(),components:{Heading:e.Heading,Text:e.Text,Eyebrow:e.Eyebrow,ImageBlock:e.ImageBlock,LogoBlock:e.LogoBlock,ButtonBlock:e.ButtonBlock,Spacer:e.Spacer,Divider:e.Divider,Grid:e.Grid,Flex:e.Flex,Breadcrumb:e.Breadcrumb,Masthead:e.Masthead,CategoryBar:e.CategoryBar,FeaturedCover:e.FeaturedCover,LongRead:e.LongRead,Series:e.Series,Subscribe:i.Subscribe,SubscribeBlogs:i.SubscribeBlogs,Banner:e.Banner,ParagraphsA:e.ParagraphsA,StatsParagraph:e.StatsParagraph,Timeline:e.Timeline,Footprint:e.Footprint,TimelineTrack:e.TimelineTrack,TitleWithButtons:e.TitleWithButtons,Stats:e.Stats,Integrations:e.Integrations,Mockup:e.Mockup,Chart:e.Chart,KeyFeatures:e.KeyFeatures,Testimonials:e.Testimonials,Reviews:i.Reviews,RatingBlock:i.RatingBlock,Prose:e.Prose,Cards:e.Cards,Logos:e.Logos,Ticker:e.Ticker,ContactRouting:i.ContactRouting,ContactLocations:e.ContactLocations,DealerFinder:i.DealerFinder,SignUp:i.SignUp,HeroSingle:e.HeroSingle,Hero:e.Hero,HeroSlide:e.HeroSlide,HeroGroup:e.HeroGroup,Collections:t.Collections,CollectionCard:t.CollectionCard,Events:i.Events,RateTable:i.RateTable,MessagingCards:i.MessagingCards,ContactCards:i.ContactCards,OpeningHours:i.OpeningHours,PostCard:e.PostCard,DocMetaCards:e.DocMetaCards,DocTabs:e.DocTabs,DocMasthead:e.DocMasthead,DocBody:e.DocBody,Contents:e.Contents,ListSearch:e.ListSearch,FAQ:e.FAQ,Gallery:t.Gallery,GalleryB:t.GalleryB,SpecStrip:e.SpecStrip,GalleryItem:t.GalleryItem,Manifesto:e.Manifesto,SectionHeader:e.SectionHeader,IntroBleed:e.IntroBleed,Split:e.Split,SubmitBuild:i.SubmitBuild,SubmitBox:i.SubmitBox,ReviewForm:i.ReviewForm,Form:i.Form,AppointmentBooking:i.AppointmentBooking,BookingBox:i.BookingBox,CatalogFilterBar:t.CatalogFilterBar,AlloyWheelsListing:t.AlloyWheelsListing,ProductGrid:t.ProductGrid,ProductHero:t.ProductHero,ProductGallery:t.ProductGallery,SpecTable:t.SpecTable,ProcessSteps:e.ProcessSteps,DetailRows:t.DetailRows,FitmentTable:t.FitmentTable,RelatedProducts:t.RelatedProducts,BundleOffer:t.BundleOffer,CompatibleTyres:t.CompatibleTyres,TyreSizes:t.TyreSizes,TyreFitment:t.TyreFitment,EuTyreLabel:t.EuTyreLabel,EuTyreLabelBlock:t.EuTyreLabelBlock,WheelDiagram:t.WheelDiagram,ProductSize:t.ProductSize,ProductColour:t.ProductColour,ProductPrice:t.ProductPrice,ProductBuyButton:t.ProductBuyButton,FilterBlock:t.FilterBlock,FilterChipsBlock:t.FilterChipsBlock,ProductPicture:t.ProductPicture,ProductSpecs:t.ProductSpecs,ProductBuy:t.ProductBuy,ProductEyebrow:t.ProductEyebrow,ProductName:t.ProductName,ProductSku:t.ProductSku,FitmentFinder:t.FitmentFinder,FitmentPicker:t.FitmentPicker,StockFitment:t.StockFitment,OrderSummary:e.OrderSummary,DeliveryOptions:t.DeliveryOptions,PaymentBadges:e.PaymentBadges,CheckoutCTA:t.CheckoutCTA,ProductRef:t.ProductRef,CustomHTML:e.CustomHTML,CardList:e.CardList,HostPart:e.HostPart,Header:t.Header,Footer:i.Footer,FooterLogo:i.FooterLogo,FooterMenu:i.FooterMenu,ArticleBody:i.ArticleBody,MenuLinkBlock:i.MenuLinkBlock,FooterDivider:i.FooterDivider,FooterGroup:i.FooterGroup,FooterText:i.FooterText,FooterEmailSignup:i.FooterEmailSignup,FooterSocial:i.FooterSocial,FooterMessaging:i.FooterMessaging,FooterPayment:i.FooterPayment,LegalLineBlock:i.LegalLineBlock,SearchBlock:t.SearchBlock,CartBlock:t.CartBlock,CountrySwitchBlock:t.CountrySwitchBlock,AccountBlock:t.AccountBlock,ThemeSwitchBlock:t.ThemeSwitchBlock,[Z]:i.SiteHeader,[J]:i.SiteFooter}};$e(f.components);{const o=f.components.MenuBlock;o.fields={...o.fields,direction:g("Direction",l(Ee,{}),[{label:v.column,value:"column"},{label:v.row,value:"row"}],C)};const s={type:"custom",render:({value:n,onChange:c})=>l($,{value:n,onChange:c})},m=P({type:"custom",render:({value:n,onChange:c})=>l(ve,{parts:mt,changed:n===!0,shown:()=>n===!0,onPress:(yt,z)=>c(z),onReset:()=>c(void 0)})},{not:{field:"direction",is:"column",default:C}});o.fields=Object.fromEntries(Object.entries(o.fields).flatMap(([n,c])=>n==="menu"?[["dataSource",Ve("Menu content","Manual")],[n,c],["linkRange",s],["currentPage",m]]:[[n,c]]));const T=o;T.resolveFields=(n,{fields:c})=>qe(st,c,n.props,{hides:["menu"]}),T.resolveData=n=>{const c=Xe(n.props);return c===n.props?n:{...n,props:c}},o.fields={...o.fields,linkAlign:Me({label:"Link alignment"}),...Object.fromEntries(Object.entries(He("menuStyle",g("Menu style",l(Ce,{}),[{label:"Plain",value:k},{label:"Tabs",value:B},{label:"Menu button",value:x}],k))).map(([n,c])=>[n,P(c,{not:{field:"direction",is:"column",default:C}})])),...Object.fromEntries(Object.entries(ge(be,Se)).map(([n,c])=>[n,P(c,{all:[{not:{field:"menuStyle",is:k,default:k}},{not:{field:"menuStyle",is:B}}]})]))};const h={not:{field:"menuStyle",is:B}},S={not:{field:"menuStyle",is:x}};o.fields.linkRange=P(o.fields.linkRange,{all:[h,ze]}),o.fields.linkAlign=P(o.fields.linkAlign,{all:[h,S]}),o.fields.direction=P(o.fields.direction,S)}{const o=f.components.Header,s=o.render;o.render=m=>m.editor?.isEditing?l(Ze,{editing:!0}):s(m)}const ht=lt(f);{const o=nt("none","ProductPicture",!0),s=f.components.ProductPicture;s.fields={...s.fields,[K]:o[K],[W.zoom]:o[W.zoom]}}const Io=ht.sectionGroupAllow;var No=f;export{Io as SECTION_GROUP_ALLOW,f as config,No as default,pt as subscribePopupFields};