efficient-storefront-blocks 0.62.0 → 0.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/chunks/{EditorPreviewCheckout-BQFPYYBS.js → EditorPreviewCheckout-WYXRKJ6R.js} +1 -1
- package/dist/chunks/{SiteEditorProvider-3E6XWZIS.js → SiteEditorProvider-ZYGNRWSB.js} +1 -1
- package/dist/chunks/{chunk-OJ4OD3N6.js → chunk-FTBCGDXD.js} +1 -1
- package/dist/chunks/{chunk-MT5KWSYX.js → chunk-OU2WWXMT.js} +1 -1
- package/dist/chunks/chunk-YAO6XQYA.js +250 -0
- package/dist/chunks/{fitment-data-PWZAAUFK.js → fitment-data-IKFCBT6E.js} +1 -1
- package/dist/editor/components/StorefrontEditorFurniture.d.ts +1 -1
- package/dist/editor/components/StorefrontEditorFurniture.js +1 -1
- package/dist/editor/lib/efficient-backend.d.ts +3 -2
- package/dist/editor/lib/efficient-backend.js +1 -1
- package/dist/editor/lib/efficient-block-sources.d.ts +2 -0
- package/dist/editor/lib/efficient-block-sources.js +1 -1
- package/dist/editor/lib/puck/blocks/service/FooterText/fields.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +6 -1
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/index.js +44 -43
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/FooterText.d.ts +2 -1
- package/dist/render/components/FooterText.js +1 -1
- package/dist/render/lib/api/index.d.ts +19 -0
- package/dist/render/lib/api/index.js +1 -1
- package/dist/render/lib/puck/blocks/service/FooterText/render.js +1 -1
- package/dist/words.d.ts +10 -1
- package/dist/words.js +3 -3
- package/package.json +3 -3
- package/dist/chunks/chunk-4BQ44OLC.js +0 -250
- /package/dist/chunks/{chunk-FZFBLN7K.js → chunk-B44XQA2J.js} +0 -0
- /package/dist/chunks/{chunk-TRUOK5AD.js → chunk-I7BIOONR.js} +0 -0
- /package/dist/chunks/{chunk-4BQ44OLC.js.LEGAL.txt → chunk-YAO6XQYA.js.LEGAL.txt} +0 -0
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import{$ as Fs,A as Uo,Aa as yu,B as Ut,C as $t,Ca as Ya,Da as bu,E as au,Ea as Su,H as Lr,J as nu,Ja as Cu,K as Ts,L as lu,N as su,O as iu,Q as fu,R as Ps,T as cu,U as Ue,V as ft,W as du,X as ho,Y as Ka,_ as uu,a as Yd,c as Xd,ca as pu,d as Xe,da as Es,e as zt,f as Oo,fa as Os,g as ws,h as Jd,ja as mu,l as Or,n as vs,pa as ct,ra as xu,s as eu,t as ou,ta as Iu,u as ks,v as He,va as hu,w as tu,x as ru,y as Gt,z as Io,za as V}from"./chunk-I7BIOONR.js";import{d as Zd,e as Er,f as Qd,g as gu,j as Va,n as Ls}from"./chunk-B44XQA2J.js";var Xa=null,vu="en",ku=null;function GH(e,o,t){Xa=e??null,vu=o||"en",ku=t??null}function X(){return ku}function Rs(){return vu}function Tu(){return Xa}function wu(e,o){return o?e.replace(/\{([A-Za-z][A-Za-z0-9_]*)\}/g,(t,r)=>Object.prototype.hasOwnProperty.call(o,r)?String(o[r]):t):e}function l(e,o){let t=Xa?Xa[e]:void 0;if(typeof t=="function"){try{let r=t(o??{});if(typeof r=="string"&&r)return r}catch{}return wu(e,o)}return wu(typeof t=="string"&&t?t:e,o)}function $e(e,o,t,r){return l(t===1?e:o,{...r,n:t})}import{jsx as As,Fragment as bw,jsxs as Sw}from"react/jsx-runtime";import{createContext as Cw,useContext as ww}from"react";var vw={mirrorHostStyles:!0,css:null,fontHrefs:[]},Pu=Cw(vw);function jH({value:e,children:o}){return As(Pu.Provider,{value:e,children:o})}function Bs(){return ww(Pu)}function Fu(){let{css:e,fontHrefs:o}=Bs();return Sw(bw,{children:[o.map(t=>As("link",{rel:"stylesheet",href:t},t)),e?As("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as kw}from"react/jsx-runtime";import{createContext as Tw,useContext as Pw}from"react";var Eu=Tw(void 0);function XH({metadata:e,children:o}){return kw(Eu.Provider,{value:e,children:o})}var Ou=()=>Pw(Eu);import{jsx as me,Fragment as nw,jsxs as Ua}from"react/jsx-runtime";import{useCallback as $a,useEffect as Ke,useRef as pH,useState as mH}from"react";import{Button as xH,Tooltip as IH}from"efficient-shell/ui";import{SettingsSwitch as hH}from"efficient-easel/panel";import{PagesIcon as gH,StylesIcon as yH}from"efficient-easel/rail";import{PaletteIcon as bH}from"efficient-shell/icons/efficient";import{TemplateIcon as SH}from"efficient-easel/icons";import{Subtree as CH,TreeRow as lw}from"efficient-easel/tree";import{useEasel as sw}from"efficient-easel/easel";import{useEaselStrings as iw}from"efficient-easel/strings";import{createContext as Fw,useContext as Ew}from"react";var Ds=Fw(!1),JH=()=>Ew(Ds);import{jsx as ee,Fragment as Yh,jsxs as na}from"react/jsx-runtime";import{Fragment as KL,useEffect as VL,useId as YL,useMemo as Xh,useRef as XL,useState as at}from"react";import{useScreenDocument as ZL}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as kl}from"efficient-easel/draw/client";import QL from"efficient-easel/screen/components/SidePanelHead";import{jsx as Q,jsxs as rt,Fragment as Et}from"react/jsx-runtime";import{useEasel as Bh}from"efficient-easel/easel";import{useState as jf}from"react";import{jsx as tr,jsxs as TI,Fragment as M1}from"react/jsx-runtime";import{useState as PI}from"react";import{SettingsDefaultReset as H1,SettingsField as W1}from"efficient-easel/panel";import{useEaselStrings as z1}from"efficient-easel/strings";import{AddIcon as G1}from"efficient-easel/icons";import{jsx as h,jsxs as Do,Fragment as oo}from"react/jsx-runtime";import{cloneElement as zx,useId as LP,useRef as Ji,useState as jr}from"react";import{useEasel as Kr,useSelectedFields as of}from"efficient-easel/easel";import{readHidable as Jo,hidableText as RP}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as tf,LINK_FIELD_MARKER as AP,MEDIA_FIELD_MARKER as BP,SCAFFOLD_FIELD_MARKER as DP,TEXT_FIELD_MARKER as _o,foldMetaOf as No,textFieldIdentifier as FG}from"efficient-easel/draw";import{jsx as Nu}from"react/jsx-runtime";import{useCallback as Bw,useEffect as Dw,useRef as _w,useState as Nw}from"react";import{useEasel as Mw}from"efficient-easel/easel";import{SettingsAction as Hw}from"efficient-easel/panel";function _s(e){return typeof e=="number"&&Number.isFinite(e)}function t5(e,o){if(!_s(e))return;let t=Ka(ho(e));if(Object.keys(t).length===0)return;let r=t[Za];if(typeof r!="string")return t;let a=Rr(o)?Ar(r,Lo(o)??[]):r;return{...t,[Ow]:a}}var Ow="--sf-section-radius",Za="--sf-card-radius",dt=["tl","tr","br","bl"];function Lo(e){if(!Array.isArray(e))return null;let o=e.filter(t=>dt.includes(t));return dt.filter(t=>o.includes(t))}function Rr(e){let o=Lo(e);return o!==null&&o.length<dt.length}function Ar(e,o){return dt.map(t=>o.includes(t)?e:"0").join(" ")}var Lu=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];var Lw="--sf-card-box-radius",Rw="--sf-site-card-radius",l5="sf-section-bleeds";function Ns(e){return typeof e=="number"&&Number.isFinite(e)}function s5(e,o){if(!Ns(e))return;let t=Ka(ho(e))[Za];if(typeof t!="string")return;let r=Rr(o)?Ar(t,Lo(o)??[]):t;return{[Lw]:r}}function i5(e){let o=e[Za];return typeof o=="string"?{[Rw]:o}:{}}function Ru(e,o){let t=e.find(n=>n?.props?.id===o);if(!t)return[...e];let r=t.props?.cardCorners,a=t.props?.cardCornerSides;return e.map(n=>n?.props?.id===o?n:{...n,props:{...n.props,cardCorners:r,cardCornerSides:a}})}import{locateNode as Aw}from"efficient-easel/draw";function Br(e){if(!e)return null;let o=e.lastIndexOf(":");return o>0?{ownerId:e.slice(0,o),slot:e.slice(o+1)}:null}function Qa(e,o,t){let r=Br(t?.zone),a=r?Aw(e,o,r.ownerId):null;return a&&r?{...a,slot:r.slot}:null}function Au(e,o,t){let r=Qa(e,o,t),a=r?.slot??"",n=r&&Array.isArray(r.item.props[a])?r.item.props[a]:[],s=t?.index??-1,i=s>=0?n[s]:void 0,f=i?.props?.id?String(i.props.id):"",d=Math.max(n.length-1,0);return!r||!f?{can:!1,reason:"unreachable",others:0}:n.length<=1?{can:!1,reason:"alone",others:d}:Ns(i?.props?.cardCorners)?{can:!0,others:d,zone:r.zone,index:r.index,data:{...r.item,props:{...r.item.props,[a]:Ru(n,f)}}}:{can:!1,reason:"unset",others:d}}function Bu(e){return e.can?$e("Gives the other card this card's Corners.","Gives the other {n} cards this card's Corners.",e.others):e.reason==="alone"?l("This is the only card in the section."):e.reason==="unset"?l("Set this card's corners first."):l("This card is not in a section that can share corners.")}function Du(e){return $e("Applied to {n} card","Applied to {n} cards",e)}function _u(e,o){e.can&&o(e.zone,e.index,e.data)}import{useSectionOps as Ww}from"efficient-easel/screen/lib/puck/use-section-ops";var zw=2200,Gw="apply-corners-to-siblings",Uw="Apply to all cards";function $w({plan:e,doneCount:o,onPress:t}){return Nu(Hw,{id:Gw,label:l(Uw),note:Bu(e),disabled:!e.can,done:o!==null,doneLabel:Du(o??0),onPress:t})}function Mu(){let{appState:e,config:o}=Mw(f=>f),t=Ww(),[r,a]=Nw(null),n=_w(null);Dw(()=>()=>{n.current&&clearTimeout(n.current)},[]);let s=Au(o,e.data.content??[],e.ui.itemSelector),i=Bw(()=>{_u(s,t.replaceComponent),s.can&&(a(s.others),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>a(null),zw))},[s,t]);return Nu($w,{plan:s,doneCount:r,onPress:i})}var Hu=1;function qw(e){return ho(e)}function k5(e){let o=qw(e);return o===null?{}:{"--sf-card-image-radius":`${o}px`}}var Wu=1,zu="Corners";function jw(e){return ho(e)}function E5(e,o){let t=jw(e);if(t===null)return null;let r=`${t}px`;return{borderRadius:Rr(o)?Ar(r,Lo(o)??[]):r}}var Ro={twoAcross:{label:"Two across",across:2,acrossPhone:2,desktop:[[6,1],[6,1]],phone:[[3,1],[3,1]]},zigzag:{label:"Zigzag",across:2,acrossPhone:2,desktop:[[8,1],[4,1],[4,1],[8,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},brick:{label:"Brick",across:2,acrossPhone:2,desktop:[[5,1],[7,1],[7,1],[5,1]],phone:[[2,1],[4,1],[4,1],[2,1]]},twoTall:{label:"Two tall",across:2,acrossPhone:2,desktop:[[6,2],[6,2]],phone:[[3,2],[3,2]]},offsetTall:{label:"Offset tall",across:2,acrossPhone:2,desktop:[[5,2],[7,1],[3,1],[4,1]],phone:[[3,2],[3,1],[3,1]]},ladder:{label:"Ladder",across:2,acrossPhone:2,desktop:[[3,2],[9,1],[5,1],[4,1]],phone:[[2,2],[4,1],[2,1],[2,1]]},threeAcross:{label:"Three across",across:3,acrossPhone:3,desktop:[[4,1],[4,1],[4,1]],phone:[[2,1],[2,1],[2,1]]},bigLeft:{label:"Big left",across:3,acrossPhone:3,desktop:[[6,1],[3,1],[3,1]],phone:[[4,1],[1,1],[1,1]]},bigRight:{label:"Big right",across:3,acrossPhone:3,desktop:[[3,1],[3,1],[6,1]],phone:[[1,1],[1,1],[4,1]]},threeStagger:{label:"Three stagger",across:3,acrossPhone:3,desktop:[[5,1],[4,1],[3,1],[3,1],[4,1],[5,1]],phone:[[3,1],[2,1],[1,1],[1,1],[2,1],[3,1]]},threeLadder:{label:"Three ladder",across:3,acrossPhone:3,desktop:[[3,1],[4,1],[5,1],[5,1],[4,1],[3,1]],phone:[[1,1],[2,1],[3,1],[3,1],[2,1],[1,1]]},tallMiddle:{label:"Tall middle",across:3,acrossPhone:3,desktop:[[4,1],[4,2],[4,1],[4,1],[4,1]],phone:[[2,1],[2,2],[2,1],[2,1],[2,1]]},fourAcross:{label:"Four across",across:4,acrossPhone:2,desktop:[[3,1],[3,1],[3,1],[3,1]],phone:[[3,1],[3,1]]},bigFirst:{label:"Big first",across:4,acrossPhone:2,desktop:[[6,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},fourStagger:{label:"Four stagger",across:4,acrossPhone:2,desktop:[[4,1],[3,1],[2,1],[3,1],[2,1],[3,1],[4,1],[3,1]],phone:[[4,1],[2,1],[2,1],[4,1]]},tallFirst:{label:"Tall first",across:4,acrossPhone:2,desktop:[[3,2],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1]],phone:[[3,2],[3,1],[3,1]]},oneThenFour:{label:"One then four",across:4,acrossPhone:2,desktop:[[12,1],[3,1],[3,1],[3,1],[3,1]],phone:[[6,1],[3,1],[3,1]]},sixAcross:{label:"Six across",across:6,acrossPhone:3,desktop:[[2,1],[2,1],[2,1],[2,1],[2,1],[2,1]],phone:[[2,1],[2,1],[2,1]]},sixStagger:{label:"Six stagger",across:6,acrossPhone:6,desktop:[[3,1],[2,1],[1,1],[2,1],[1,1],[3,1],[1,1],[3,1],[2,1],[2,1],[1,1],[3,1]],phone:[[1,1],[1,1],[1,1],[1,1],[1,1],[1,1]]}},Ms=Object.keys(Ro),Uu=[2,3,4,6];function $u(e){return typeof e!="string"||e===""?null:Ro[e]??null}function Gu(e,o){return o?6/e.acrossPhone:12/e.across}var Kw="sf-wall--";function Vw(e){return`${Kw}${e}`}function L5(e){let o=Ro[e],t=`.${Vw(e)}`,r=[],a=(n,s)=>{let i=[],f=n.length;n.forEach(([d,p],m)=>{i.push(`${t} > :nth-child(${f}n+${m+1}){grid-column:span ${d};grid-row:span ${p}}`)});for(let d=1;d<f;d+=1)i.push(`${t}:has(> :nth-child(${f}n+${d}):last-child) > :nth-last-child(-n+${d}){grid-column:span ${s};grid-row:span 1}`);return i};return r.push(`${t}{grid-template-columns:repeat(12,minmax(0,1fr))}`),r.push(...a(o.desktop,Gu(o,!1))),r.push("@media (max-width:800px){"),r.push(`${t}{grid-template-columns:repeat(6,minmax(0,1fr))}`),r.push(...a(o.phone,Gu(o,!0))),r.push("}"),r.join("")}var Ja=12,qu=1,Yw=3;var Xw=3;function Hs(e,o,t){let r=typeof e=="number"?e:Number.parseInt(String(e??""),10);return Number.isFinite(r)?Math.min(t,Math.max(o,Math.trunc(r))):null}function Zw(e){return Hs(e,1,Ja)??Xw}function B5(e,o){return Hs(e,qu,Yw)??(Zw(o)===4?2:qu)}function D5(e){return e==null||e===""?null:Hs(e,1,Ja)}var _5="data-sf-span";function N5(e){if(!e)return!1;if(e.type==="Grid")return!0;if(e.type==="GalleryB"){if($u(e.props?.layout))return!1;let o=e.props?.columns;return o!=null&&o!==""}return!1}var $o=["top-left","top-center","top-right","left","center","right","bottom-left","bottom-center","bottom-right"],en="bottom-left";var Ws={"top-left":"Top left","top-center":"Top center","top-right":"Top right",left:"Left",center:"Center",right:"Right","bottom-left":"Bottom left","bottom-center":"Bottom center","bottom-right":"Bottom right"};function Qw(e){let o=$o.indexOf(ut(e));return{band:Math.floor(o/3),column:["start","center","end"][o%3]}}function Jw(e){return 1+Qw(e).band*6}function H5(e){return Jw(e)+1}function ut(e){return $o.includes(e)?e:en}function W5(e){let o=typeof e=="number"&&Number.isFinite(e)?e:0;return Math.max(-40,Math.min(40,Math.round(o)))}function z5(e,o=60){let t=typeof e=="number"&&Number.isFinite(e)?e:o;return Math.max(30,Math.min(100,Math.round(t)))}function zs(e,o){let t=ut(o);return e.filter(r=>ut(r?.props?.placement)===t).length}function ju(e){return`${Ws[ut(e)]} already holds 4 boxes. Move one somewhere else first.`}function Gs(e,o){let t=e.filter(r=>r?.props?.id!==o);return $o.map(r=>{let a=zs(t,r)>=4,n=Ws[r];return a?{value:r,label:n,disabled:!0,title:ju(r)}:{value:r,label:n}})}function on(e,o){let t=o===void 0?en:ut(o?.props?.placement);return zs(e,t)>=4?ju(t):null}var tn="HeroGroup";function ev(e){return $o.map(o=>{let t=zs(e,o);return{anchor:o,total:t,hidden:t-4}}).filter(o=>o.hidden>0)}function Us(e){let o=ev(e);return o.length===0?null:o.map(({anchor:t,total:r,hidden:a})=>{let n=Ws[t],s=a===1?"1 is not shown":`${a} are not shown`;return`${n} holds ${r} boxes. The published page draws the first 4, so ${s}. ${a===1?"Move it":"Move them"} somewhere else.`}).join(" ")}function Ku(e,o){let t=o;if(t?.type!==tn)return null;let r=t.props?.id===void 0?"":String(t.props.id);return r?on($s(e,r),t):null}function $s(e,o){let t=Yu(e,o);return t&&t.ownerType===tv?t.siblings:[]}function Vu(e,o){let t=Yu(e,o);return t?t.ancestorTypes.filter(r=>r===tn).length:ov}var ov=1,tv="HeroSlide";function Yu(e,o){let t=a=>Array.isArray(a)&&a.length>0&&a.every(n=>!!n&&typeof n=="object"&&typeof n.type=="string"),r=(a,n,s)=>{if(n>12||!a||typeof a!="object")return null;if(t(a)){if(a.some(i=>i?.props?.id===o))return{siblings:a,ownerType:s.at(-1)??null,ancestorTypes:s};for(let i of a){let f=i.type,d=r(i,n+1,[...s,String(f)]);if(d)return d}return null}for(let i of Object.values(a)){let f=r(i,n+1,s);if(f)return f}return null};return r(e,0,[])}import{jsx as rv}from"react/jsx-runtime";var av="sf-hint-keep";function Xu({children:e}){return rv("span",{className:av,children:e})}import{jsx as qo,Fragment as lv,jsxs as ap}from"react/jsx-runtime";import{useContext as sv,useEffect as iv,useId as fv,useState as np}from"react";import{SettingsField as cv,SettingsSwitch as dv}from"efficient-easel/panel";import{AnchorIcon as uv}from"efficient-easel/icons";import{ScreenDocumentContext as pv}from"efficient-easel/screen/components/ScreenDocumentContext";import{Snippet as mv}from"efficient-shell/ui";var rn="homepage";function pt(e){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}var Zu=[{value:"page",label:"Page"},{value:"anchor",label:"Anchor"},{value:"blog",label:"Blog post",needs:"service"},{value:"product",label:"Product",needs:"commerce"},{value:"popup",label:"Popup"},{value:"custom",label:"Custom URL"}];function Qu(e){return e.offersCommerce&&e.offersService?Zu:Zu.filter(o=>!o.needs||(o.needs==="commerce"?e.offersCommerce:e.offersService))}var qs="#popup:";function Ju(e){return`${qs}${e}`}function ep(e){return e.startsWith(qs)&&e.slice(qs.length).trim()||null}function Dr(e){return e===rn?"/":`/${e}`}function op(e){return`/journal/${e}`}function Y5(e){return`/wheels/${e}`}function an(e,o){return`${Dr(e)}#${o}`}function js(e){return pt(e)}function nv(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}function tp(...e){let o=new Set,t=[];for(let r of e)for(let a of r?.content??[]){let n=nv(a?.props?.anchor);if(!n)continue;let s=js(n);!s||o.has(s)||(o.add(s),t.push({slug:s,name:n}))}return t}function X5(e){let o=e.indexOf("#"),t=o===-1?e:e.slice(0,o),r=t.indexOf("?");return r===-1?t:t.slice(0,r)}function rp(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}import{readHidable as xv}from"efficient-easel/draw";function lp({value:e,onChange:o,nameBox:t}){let r=xv(e).text,[a,n]=np(!1),s=a||r.trim()!=="",i=fv();return ap(lv,{children:[qo(cv,{label:l("Add an anchor"),labelId:i,icon:qo(uv,{}),action:qo(dv,{checked:s,ariaLabelledBy:i,onChange:f=>{n(f),!f&&r!==""&&o("")}})}),s&&t(e,o),s&&qo(Iv,{name:r})]})}function Iv({name:e}){let o=sv(pv),t=o?.templateId?"":o?.currentSlug??"",[r,a]=np("");iv(()=>a(Va()||window.location.origin),[]);let n=js(e);if(!n||!t)return null;let s=`${r}${an(t,n)}`,i=s.replace(/^https?:\/\//,""),f=i.lastIndexOf("#");return qo("div",{className:"sf-anchor-link",children:qo(mv,{value:s,label:l("link"),size:"sm",children:ap("span",{className:"sf-anchor-link-text",children:[qo("span",{className:"sf-anchor-link-path",children:i.slice(0,f)}),qo("span",{className:"sf-anchor-link-hash",children:i.slice(f)})]})})})}import{AdjustIcon as _P,AlignLeftIcon as NP,EyeIcon as MP,AlignSeparateIcon as HP,AnimationIcon as Gx,BackgroundIcon as WP,BorderAllIcon as zP,BlockSectionIcon as GP,CartIcon as UP,ColumnWidthsIcon as Ux,ColumnsIcon as $P,CornerIcon as qP,DirectionDownIcon as jP,DirectionLeftIcon as KP,DirectionRightIcon as VP,DirectionUpIcon as YP,DollarIcon as XP,FinishIcon as ZP,GapIcon as $x,GridIcon as QP,GroundIcon as JP,HashIcon as qx,HeightIcon as eF,ImageIcon as oF,ListIcon as tF,LocationIcon as Zi,NudgeIcon as rF,PaddingAllIcon as aF,PaddingBottomIcon as jx,PaddingLeftIcon as Kx,PaddingRightIcon as Vx,PaddingTopIcon as Yx,PageIcon as Xx,PhoneIcon as nF,PlacementIcon as lF,ProductSizeIcon as sF,StickyIcon as iF,RotateIcon as fF,SquareIcon as cF,TypeIcon as dF,WidthIcon as uF,WrapIcon as pF}from"efficient-easel/icons";import{jsx as J,Fragment as go,jsxs as yo}from"react/jsx-runtime";import{TitleIcon as hv,ButtonIcon as gv,DollarIcon as yv,HashIcon as bv,LinkIcon as Sv,NoteIcon as Cv,TagIcon as wv,TextLinesIcon as vv}from"efficient-easel/icons";var sp={body:vv,button:gv,link:Sv,label:wv,number:bv,price:yv,note:Cv,title:hv},ip={eyebrow:yo(go,{children:[J("path",{d:"M5 6.5h5"}),J("path",{d:"M5 12.5h14"}),J("path",{d:"M5 18h11"})]}),heading:yo(go,{children:[J("path",{d:"M6.5 5v14"}),J("path",{d:"M17.5 5v14"}),J("path",{d:"M6.5 12h11"})]}),intro:yo(go,{children:[J("path",{d:"M4 5.5v13"}),J("path",{d:"M8 7.5h12"}),J("path",{d:"M8 12h12"}),J("path",{d:"M8 16.5h8"})]}),value:yo(go,{children:[J("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),J("path",{d:"M6.5 12h7"})]}),name:yo(go,{children:[J("path",{d:"M6 3.5v17"}),J("path",{d:"M6 5h11.5l-2.6 3.6L17.5 12H6z"})]}),date:yo(go,{children:[J("rect",{x:"4",y:"5.5",width:"16",height:"15",rx:"2"}),J("path",{d:"M4 10.5h16"}),J("path",{d:"M9 3.2v4.4"}),J("path",{d:"M15 3.2v4.4"})]}),caption:yo(go,{children:[J("rect",{x:"3.5",y:"4.5",width:"17",height:"11",rx:"2"}),J("path",{d:"M3.5 12.8l4.2-3.2 3.6 2.8 3.4-2.4 5.8 4"}),J("path",{d:"M6.5 19.5h11"})]}),quote:yo(go,{children:[J("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),J("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:yo(go,{children:[J("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),J("path",{d:"M8 9.5h8"}),J("path",{d:"M12 9.5v5"})]}),meta:yo(go,{children:[J("path",{d:"M4 7h16"}),J("path",{d:"M4 14h3.5"}),J("path",{d:"M10.5 14h3"}),J("path",{d:"M17 14h3"})]})};function Ks({noun:e,size:o=14,strokeWidth:t=1.8,className:r,style:a}){let n=sp[e];return n?J("span",{className:r,style:{display:"inline-flex",...a},"aria-hidden":"true",children:J(n,{size:o})}):J("svg",{className:r,style:a,width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:t,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:ip[e]})}var d3=Object.keys(sp);var u3=Object.keys(ip);var kv="#ffffff",Tv=/^#[0-9a-fA-F]{6}$/;function Vs(e){return Pv(e)?e:kv}function Pv(e){return typeof e=="string"&&Tv.test(e)}function m3(e){return{"--bg":Vs(e)}}var Ys=[{role:"bg",token:"--bg",ink:!1},{role:"fg",token:"--fg",ink:!0},{role:"surface",token:"--site-surface",ink:!1},{role:"surface-2",token:"--site-surface-2",ink:!1},{role:"line",token:"--site-line",ink:!0},{role:"muted",token:"--fg-dim",ink:!0}],Fv=Ys.filter(e=>e.ink);function Ev(e){let o={color:e.fg};for(let{role:t,token:r}of Fv)o[r]=e[t];return o}var Ov={fg:"var(--overlay-fg)",line:"color-mix(in srgb, var(--overlay-fg) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg) 76%, transparent)"},fp=Object.freeze(Ev(Ov));var nn=-1,Lv="sf-section-accent",cp="Color",dp=new Set(["CategoryBar","DocTabs"]),g3=new Set(["Flex"]),Rv=0;function Xs(e){return e===nn?null:typeof e=="number"&&Number.isInteger(e)&&e>=0?e:Rv}function y3(e){return e??nn}function Av(e){let o=`--theme-preset-${e}`,t={"--sf-sec-accent":`var(${o}-accent)`,"--sf-sec-accent-2":`var(${o}-accent-2)`,"--sf-sec-accent-ink":`var(${o}-accent-ink)`};for(let{role:r}of Ys)t[`--sf-sec-${r}`]=`var(${o}-${r}, var(--theme-${r}))`;return t}function b3(e){let o=Xs(e.sectionAccent);return o===null?null:{className:Lv,style:Av(o)}}var Bv=["fade","rise","scale"],Zs="none",up=[{label:"None",value:Zs},{label:"Fade",value:"fade"},{label:"Rise",value:"rise"},{label:"Scale",value:"scale"}];function w3(e){return Bv.includes(e)?e:null}var pp="data-sf-anim",_r="data-sf-anim-state";function v3(e){let o=()=>{};if(typeof IntersectionObserver>"u"||!e.getAttribute(pp))return o;let t=window.innerHeight||document.documentElement.clientHeight;if(e.getBoundingClientRect().top<t)return o;e.setAttribute(_r,"armed");let r=new IntersectionObserver(a=>{for(let n of a)if(n.isIntersecting){r.disconnect(),Dv(e);break}},{threshold:0});return r.observe(e),()=>{r.disconnect(),e.removeAttribute(_r)}}function Dv(e){if(!e.getAttribute(pp))return;e.removeAttribute(_r),e.offsetWidth,e.setAttribute(_r,"play");let o=t=>{t.target===e&&(e.removeAttribute(_r),e.removeEventListener("animationend",o))};e.addEventListener("animationend",o)}var k3=dp;function Js(e,o){let t=e?.content;if(!Array.isArray(t))return null;for(let r of t){if(!r||typeof r!="object")continue;let a=r.props;if(a?.id===o)return null;if(Qs(r,o,0))return a??{}}return null}function Qs(e,o,t){if(t>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(a=>Qs(a,o,t+1));let r=e.props;return r&&typeof r=="object"&&r.id===o?!0:Object.values(e).some(a=>Qs(a,o,t+1))}import{SettingsDefaultReset as Ee,SettingsField as re,SettingsGroup as mF,SettingsGroupSub as xF,SettingsBorder as IF,SettingsSegmented as hF,SettingsSides as gF,SettingsSidesEach as Zx,sidesStartEach as yF,SettingsSwitch as Qx,borderSides as bF,borderStartEach as SF}from"efficient-easel/panel";import{FieldSelect as CF,ListField as wF}from"efficient-easel/fields";import{DisplayChips as vF}from"efficient-shell/ui";function qt(e){if(!e||typeof e!="object"||Array.isArray(e))return{};let o={};for(let[t,r]of Object.entries(e))typeof r=="boolean"&&(o[t]=r);return o}function ln(e,o){return qt(e)[o]!==!1}function ei(e,o,t){let r=qt(o)[t];return typeof r=="boolean"?r:ln(e,t)}function mp(e){return Object.values(qt(e)).some(o=>o===!1)}function xp(e){return Object.keys(qt(e)).length>0}function Ip(e,o,t){let r={...qt(e)};return t?delete r[o]:r[o]=!1,Object.keys(r).length?r:void 0}function hp(e,o,t){return{...qt(e),[o]:t}}function F3(e,o,t){let r=ln(e,t),a=ei(e,o,t);return r&&a?"":!r&&!a?"hidden":r?"max-[720px]:hidden":"min-[720px]:hidden"}import{AlignmentGrid as kF,Checkbox as VG,CornersInput as TF,DateTimePicker as PF,FOCAL_DEFAULT as YG,PictureTiles as Jx,PositionInput as FF,Slider as EF,Tooltip as eI}from"efficient-shell/ui";import{jsx as mt,jsxs as yp}from"react/jsx-runtime";import{ColorPicker as Nv,HexInput as Mv}from"efficient-shell/ui";import{SettingsDefaultReset as Hv,SettingsField as Wv}from"efficient-easel/panel";import{typedHex as oi}from"efficient-easel/pick";import{typedHex as _v}from"efficient-easel/pick";function gp(e){let o=new Set,t=[];return He(e).themes.forEach((r,a)=>{let n=[[l("Theme {n} main color",{n:a+1}),r.accent],[l("Theme {n} text color",{n:a+1}),r.text],[l("Theme {n} background",{n:a+1}),r.background]];for(let[s,i]of n){let f=i?_v(i):null;!f||o.has(f)||(o.add(f),t.push({name:s,value:f}))}}),t}function zv({value:e,onChange:o,label:t,id:r,caption:a,inherited:n,ariaLabel:s}){return mt(Uv,{value:e,onChange:o,label:l(s??t),id:r,caption:a,inherited:n})}function Gv(){let{theme:e}=V();return gp(e).map(o=>({value:o.value,label:o.name}))}function Uv({value:e,onChange:o,label:t,id:r,caption:a,inherited:n}){let s=Gv(),i=e?null:oi(n??""),f=a!==void 0&&(!e||oi(a)!==oi(e))?a:null,d=p=>{p!==e&&o(p)};return yp("div",{className:"sf-colour",children:[mt(Nv,{id:r,value:e,onChange:d,label:t,presets:s,fallback:i??void 0,size:"md",align:"start"}),f!==null?mt("span",{className:"sf-colour-caption",children:f}):mt("span",{className:"sf-colour-hexwrap",children:mt(Mv,{value:e||i||"",onChange:d,label:l("{label} hex code",{label:t}),placeholder:e||i?void 0:l("Not set"),className:i?"sf-colour-hex is-inherited":"sf-colour-hex",size:"md"})})]})}function qe({label:e,icon:o,changed:t,hint:r,onReset:a,resetTo:n,children:s,...i}){return yp(Wv,{label:e,icon:o,htmlFor:i.id,changed:t,hint:r,action:a?mt(Hv,{words:X()?.panel,label:e,changed:!!t,detail:n,onReset:a}):void 0,children:[zv({...i,label:e}),s]})}function sn({label:e,icon:o,value:t,inherited:r,resetTo:a,onChange:n,onReset:s,hint:i}){let f=!!t;return mt(qe,{label:e,icon:o,value:t,inherited:f?void 0:r,onChange:n,changed:f,onReset:s,resetTo:a,hint:i})}import{jsx as Nr}from"react/jsx-runtime";import{useEffect as pk,useState as mk}from"react";import{markSelection as xk,useCaretEdit as Ik}from"efficient-easel/copy";import{RevertIcon as hk}from"efficient-easel/icons";import{IconButton as gk,TextToolbar as yk,Tooltip as bk}from"efficient-shell/ui";import{applyMark as Y3,markupTools as X3,MARKUP_TOOLS as Z3,COPY_FIELD_TOOLS as Q3,STOREFRONT_MARKUP as J3,tokenizeInline as e4,stripInline as o4,isSafeLinkHref as t4}from"efficient-shell/markup";import{applyMark as ok,markedAt as tk,markupTools as rk,MARKUP_TOOLS as ak,parseMarkup as nk,RETIRED_MARKS as lk,STOREFRONT_MARKUP as sk,tokenizeInline as a4}from"efficient-shell/markup";var xt=["highlight","strong","quiet"],It={highlight:"Highlight",strong:"Bold",quiet:"Quiet"},bo={highlight:{kind:"wordHighlight",delimiter:"@@"},strong:{kind:"wordStrong",delimiter:"++"},quiet:{kind:"wordQuiet",delimiter:"^^"}},U3=Object.fromEntries(xt.map(e=>[bo[e].kind,e])),$3="data-sf-ws",fn=["accent","text","labels"],wp={accent:"Accent",text:"Text",labels:"Labels"},jt={accent:"var(--accent)",text:"var(--fg)",labels:"var(--fg-dim)"},$v=80,qv=120,jv=100,Kv=900,Vv=.5,Yv=3,Xv=-.1,Zv=.5,Qv=3,ti={font:null,size:null,weight:null,bold:null,italic:null,lineGap:null,textGap:null,colour:null},Jv={highlight:{...ti},strong:{...ti},quiet:{...ti}};function bp(e,o,t){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,o),t))}function Sp(e,o,t){if(typeof e!="number"||!Number.isFinite(e))return null;let r=10**Qv;return Math.round(Math.min(Math.max(e,o),t)*r)/r}function Cp(e){return typeof e=="boolean"?e:null}function ek(e){let o=typeof e?.font=="string"&&Xe.some(r=>r.key===e.font)?e.font:null,t=typeof e?.colour=="string"&&fn.includes(e.colour)?e.colour:null;return{font:o,size:bp(e?.size,$v,qv),weight:bp(e?.weight,jv,Kv),bold:Cp(e?.bold),italic:Cp(e?.italic),lineGap:Sp(e?.lineGap,Vv,Yv),textGap:Sp(e?.textGap,Xv,Zv),colour:t}}function vp(e){let o={};for(let t of xt)o[t]=e&&t in e&&e[t]?ek(e[t]):{...Jv[t]};return o}function q3(e){let o=vp(e),t={};for(let r of xt){let a=o[r],n=`--sf-ws-${r}`;if(a.font){let s=Xe.find(i=>i.key===a.font);s&&(t[`${n}-font`]=`var(${s.cssVar})`)}a.size!==null&&(t[`${n}-size`]=`${a.size/100}em`),a.weight!==null&&(t[`${n}-weight`]=String(a.weight)),a.bold!==null&&(t[`${n}-weight-bold`]=a.bold?"700":"400"),a.italic!==null&&(t[`${n}-style`]=a.italic?"italic":"normal"),a.lineGap!==null&&(t[`${n}-line`]=String(a.lineGap)),a.textGap!==null&&(t[`${n}-track`]=`${a.textGap}em`),a.colour!==null&&(t[`${n}-color`]=jt[a.colour])}return t}function j3(e){let o=e?.word_styles??void 0,t={};for(let r of xt)o&&r in o&&(t[r]=o[r]??null);return vp(t)}var ik=new Set(["strong"]),kp=xt.map(e=>({open:bo[e].delimiter,close:bo[e].delimiter,kind:bo[e].kind,...ik.has(e)?{wordStart:!0}:{}})),l4=[{style:bo.highlight.kind,label:It.highlight,title:`${It.highlight} word style`},{style:bo.strong.kind,label:It.strong,title:`${It.strong} word style`},{style:bo.quiet.kind,label:It.quiet,title:`${It.quiet} word style`}],fk=new Set(kp.map(e=>e.open)),Kt=[...sk.filter(e=>!fk.has(e.open)),...kp];function ck(e){return e.bullet?"- ":e.number!=null?`${e.number}. `:""}function dk(e){return nk(typeof e=="string"?e:"",Kt)}var uk=ak.map(e=>e.style).filter(e=>!lk.includes(e)).filter(e=>Kt.some(o=>o.kind===e));function Tp(){return rk(uk)}var Pp=Object.fromEntries(xt.map(e=>[bo[e].kind,bo[e].delimiter]));function Fp(e,o,t,r){let a=Pp[r];if(!a)return ok(e,o,t,r);let n=e.slice(o,t),s=e.slice(Math.max(0,o-a.length),o),i=e.slice(t,t+a.length);if(s===a&&i===a)return{text:e.slice(0,o-a.length)+n+e.slice(t+a.length),selectionStart:o-a.length,selectionEnd:o-a.length+n.length};let f=n||"styled text";return{text:e.slice(0,o)+a+f+a+e.slice(t),selectionStart:o+a.length,selectionEnd:o+a.length+f.length}}function Ep(e,o,t,r){let a=Pp[r];return a?o>=a.length&&e.slice(o-a.length,o)===a&&e.slice(t,t+a.length)===a:tk(e,o,t,r)}function ht(e){return dk(e).map(o=>ck(o)+Op(o.children)).join(`
|
|
2
|
+
`)}function Op(e){return e.map(o=>o.kind==="text"?o.text:Op(o.children)).join("")}var Lp="Clear formatting";function Sk(e,o,t){return xk(e,o,t,Fp)}function Ck(e){let[o,t]=mk(null);return pk(()=>{let r=e.current?.ownerDocument??(typeof document>"u"?null:document);if(!r)return;let a=()=>{let n=e.current;if(!n||r.activeElement!==n)return;let s=n.selectionStart??n.value.length,i=n.selectionEnd??s;t(f=>f&&f.start===s&&f.end===i?f:{start:s,end:i})};return r.addEventListener("selectionchange",a),()=>r.removeEventListener("selectionchange",a)},[e]),[o,t]}function wk({target:e,value:o,onChange:t,disabled:r=!1,label:a="Formatting"}){let n=Ik({target:e,onChange:t}),[s,i]=Ck(e),f=x=>n(I=>{let y=Sk(o,x,I);return i({start:y.selectionStart,end:y.selectionEnd}),y}),d=Tp(),p={};if(s)for(let x of d)p[x.style]=Ep(o,s.start,s.end,x.style);let m=ht(o);return Nr(yk,{offered:new Set(d.map(x=>x.style)),onMark:x=>f(x),pressed:p,disabled:r,"aria-label":l(a),className:"sf-markup-bar",last:Nr("span",{className:"sf-markup-clear",children:Nr(bk,{content:l(Lp),children:Nr(gk,{size:"sm",onMouseDown:x=>x.preventDefault(),onClick:()=>t(m),disabled:r||m===o,"aria-label":l(Lp),children:Nr(hk,{size:14})})})})})}var ri=wk;import{deviceField as we}from"efficient-easel/screen/lib/puck/device-fields";import{NO_CONTROL_FIELD as OF,NoControlMark as Dn,noControlField as Vr}from"efficient-easel/screen/lib/puck/panel-no-control-mark";var ai="__ownBox";function Rp(e){return!!e&&typeof e=="object"&&e[ai]===!0}function Ao(e){return`${e}Phone`}function cn(e,o,t){return typeof e=="number"?e:typeof o=="number"?o:t}var dn=void 0;import{jsx as li,Fragment as Tk}from"react/jsx-runtime";import{createContext as Pk,useContext as Fk}from"react";var un={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},pn={Events:["posts"],SubscribeBlogs:["posts"]};var vk=["anchor"],kk=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function Mr(e){return vk.includes(e)||kk.test(e)}var ni={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"}}};ni.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var b4=Object.fromEntries(Object.entries(un).map(([e,o])=>[e,Object.keys(o)])),S4=Object.fromEntries(Object.entries(pn).map(([e,o])=>[e,[...o]]));import{NoControlMark as Ek}from"efficient-easel/screen/lib/puck/panel-no-control-mark";var Ap=Pk(!1);function Bp({children:e}){return li(Ap.Provider,{value:!0,children:e})}function Ok(){return Fk(Ap)}function Dp({name:e,children:o}){return!Ok()||!e||!Lk(e)||Mr(e)?li(Tk,{children:o}):li(Ek,{})}function Lk(e){return/^[A-Za-z0-9_$]+$/u.test(e)}function jo(e,o,t){return e.some(r=>(typeof r=="object"?r.value:r)===t)?t:o}var si="off",ii="none",fi=[{label:"None",value:"off"},{label:"1, 2, 3",value:"plain"},{label:"01, 02, 03",value:"padded"},{label:"N\xB001, N\xB002",value:"numero"}],ci=[{label:"None",value:"none"},{label:"Hairline",value:"hairline"}];function O4(e){return jo(fi,si,e)}function L4(e){return jo(ci,ii,e)}var _p="sf-card-index",Hr="sf-card-index",R4="pointer-events-none absolute left-[18px] top-[18px] z-10 border border-line bg-bg/70 px-2 py-1 font-mono text-[length:var(--size-label,10px)] uppercase tracking-[0.16em] text-fg-dim",Rk={plain:`counter(${Hr})`,padded:`counter(${Hr}, decimal-leading-zero)`,numero:`"N\xB0" counter(${Hr}, decimal-leading-zero)`};function A4(e,o){return o==="off"?"":`.${e}{counter-reset:${Hr}}.${e} .${_p}{counter-increment:${Hr}}.${e} .${_p}::before{content:${Rk[o]}}`}function B4(e){return e==="hairline"?"border border-line hover:border-accent":""}var Np=[{value:"1",label:"1st rendering"},{value:"2",label:"2nd rendering"},{value:"3",label:"3rd rendering"},{value:"4",label:"4th rendering"},{value:"5",label:"5th rendering"}];import{SCALAR_TEXT_CONTROLS as LF}from"efficient-easel/draw";import{jsx as So}from"react/jsx-runtime";import{SettingsDefaultReset as Dk,SettingsField as Hp}from"efficient-easel/panel";import{useSelectedFields as _k}from"efficient-easel/easel";import{FOCAL_DEFAULT as Nk}from"efficient-shell/format";import{ImageIcon as Wp,PlayIcon as zp}from"efficient-easel/icons";import{MediaUploadField as Mk}from"efficient-shell/ui";import{useContext as Hk}from"react";import{ScreenDocumentContext as Wk}from"efficient-easel/screen/components/ScreenDocumentContext";import{usePreviewDevice as zk}from"efficient-easel/draw/client";import{requestMediaPick as Gk}from"efficient-easel/screen/lib/media-picker";import{useEaselHost as Uk}from"efficient-easel/screen/lib/host";function Ak(e){return!!e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.src=="string"}function Mp(e){return typeof e=="string"?e:Ak(e)?e.src:""}function N4(e,o,t){return di(e,o.split("."),t)}function di(e,o,t){if(o.length===0)return t(e);let[r,...a]=o,n=r.endsWith("[]"),s=n?r.slice(0,-2):r;if(!e||typeof e!="object"||Array.isArray(e))return e;let i=e;if(!(s in i))return e;let f=i[s];if(n){if(!Array.isArray(f))return e;let p=!1,m=f.map(x=>{let I=di(x,a,t);return I!==x&&(p=!0),I});return p?{...i,[s]:m}:e}let d=di(f,a,t);return d===f?e:{...i,[s]:d}}import{backendOf as Bk}from"efficient-easel/screen/lib/session";var Se=Bk,mn=e=>e.blocks;import{useEaselSession as $k}from"efficient-easel/screen/lib/session-context";function qk(e,o){let t=null;try{t=_k()}catch{t=null}let r=zk()==="mobile";if(!e||!t||o&&!o(t.values??{}))return null;let a=typeof t.values?.[e]=="string"&&t.values[e]?String(t.values[e]):Nk,n=Ao(e),s=typeof t.values?.[n]=="string"&&t.values[n]?String(t.values[n]):void 0,i=t.onChange;return{phone:r,desktop:a,own:s,focus:r?s??a:a,set:f=>i(r?n:e,f),clear:()=>i(n,dn)}}function Gp({value:e,onChange:o,label:t,accept:r,placeholder:a,focusKey:n,focusWhen:s}){let i=Uk(),f=$k(),d=l(t),p=r.startsWith("video"),m=qk(p?void 0:n,s),x=Hk(Wk),I=v=>Gk(i,{accept:r,title:d,...v?{file:v}:{}}).then(k=>k?.url??null);if(x&&!x.capabilities.mediaEditing)return So(Hp,{label:d,icon:p?So(zp,{}):So(Wp,{}),children:So("div",{className:"sf-image-slot-inert",children:p?l("Templates don\u2019t store videos \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created."):l("Templates don\u2019t store images \u2014 this slot stays a placeholder. Each website picks its own after it\u2019s created.")})});let y=Mp(e),w=m?.phone&&y?So(Dk,{words:X()?.panel,label:l("Image focus"),changed:!!m.own,detail:l("{value} on desktop",{value:m.desktop}),onReset:m.clear}):void 0;return So(Hp,{label:d,icon:p?So(zp,{}):So(Wp,{}),action:w,children:So("div",{style:{flex:"1 1 auto",minWidth:0},children:So(Mk,{value:y,onChange:o,onPick:I,accept:p?"video/*":"image/*",kind:p?"video":"image",placeholder:a===void 0?void 0:l(a),maxSizeBytes:Se(f).media.maxUploadBytes,...m?{focus:m.focus,onFocusChange:m.set}:{}})})})}import{jsx as Up}from"react/jsx-runtime";import{useId as jk}from"react";import{FieldSelect as Kk}from"efficient-easel/fields";import{SettingsField as Vk}from"efficient-easel/panel";function Yk(e){return e.map(({value:o,label:t,note:r})=>({value:o,label:t,...r?{meta:r}:{}}))}function $p({label:e,options:o,value:t,onChange:r,emptyLabel:a,icon:n,hint:s}){let i=jk(),f=`${i}-label`,d=`${i}-button`,p=Array.isArray(t)?t:[];return Up(Vk,{label:l(e),labelId:f,icon:n,hint:s,children:Up(Kk,{id:d,multiple:!0,value:p,options:Yk(o),onChange:r,placeholder:a===void 0?l("None"):l(a),ariaLabelledBy:`${f} ${d}`,inline:!0})})}import{jsx as ge,jsxs as bt,Fragment as CT}from"react/jsx-runtime";import{useCallback as wT,useContext as vT,useEffect as kT,useId as nm,useRef as rm,useState as am}from"react";import{ThemeIcon as TT}from"efficient-easel/icons";import{SettingsField as PT}from"efficient-easel/panel";import{ScreenDocumentContext as FT}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as j,jsxs as Ko,Fragment as tT}from"react/jsx-runtime";import{Button as pi,IconButton as rT,Tooltip as aT}from"efficient-shell/ui";import{jsx as gt,jsxs as qp}from"react/jsx-runtime";import{AccentIcon as Xk}from"efficient-easel/icons";import{Tooltip as Zk}from"efficient-shell/ui";function ui(e){return Io(e).background}function Qk(e){let o=Uo(e.accent,ui(e));return o===null?null:{ratio:o,grade:$t(o)}}function Jk(e){let o=ui(e),t=Uo(e.accent,o);return t===null?[]:au(e.accent).filter(r=>{let a=Uo(r,o);return a!==null&&a>t&&$t(a)==="good"})}var eT={good:"Easy to read","large-only":Ut["large-only"],hard:Ut.hard};function jp({value:e,onChange:o}){let t=Qk(e),r=t?.grade,a=t&&t.grade!=="good"?Jk(e):[];return gt(qe,{label:l("Main color"),icon:gt(Xk,{}),hint:t?l(eT[t.grade]):void 0,value:e.accent,onChange:n=>o({...e,accent:n}),children:a.length>0?gt("div",{className:"w-full min-w-0",children:qp("div",{className:"sf-readability",children:[gt("p",{className:"sf-readability-advice",children:oT(r,!0)}),gt("div",{className:"sf-readability-suggestions",children:a.map(n=>{let s=Uo(n,ui(e));return gt(Zk,{content:l("Use {colour}",{colour:n.toUpperCase()}),children:qp("button",{type:"button",className:"sf-readability-suggestion",onClick:()=>o({...e,accent:n}),children:[gt("span",{className:"sf-readability-chip",style:{background:n},"aria-hidden":!0}),s?`${s.toFixed(1)}:1`:n.toUpperCase()]})},n)})})]})}):null})}function oT(e,o){return e?e==="good"?l("This color reads clearly on your pages."):o?l("This color is hard to read on this theme's page. The buttons below are the same hue, darkened."):l("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."):l("Pick a color to see how it reads.")}import{ButtonIcon as nT,ChevronDownIcon as lT,ChevronUpIcon as sT,GroundIcon as iT,LayoutIcon as fT,SquareIcon as cT,TextSmallIcon as dT,TypeIcon as Kp}from"efficient-easel/icons";var Wr=e=>l("Theme {n}",{n:e+1});function Vp({colors:e}){let o=Io(e),t=Lr(e)??o.accent;return Ko("span",{className:"sf-theme-page",style:{background:o.background,color:o.text},"aria-hidden":!0,children:[j("span",{className:"sf-theme-eyebrow",style:{color:o.muted},children:l("label")}),Ko("span",{className:"sf-theme-headline",children:[l("Heading")," ",j("span",{style:{color:o.accent},children:l("accent")})]}),j("span",{className:"sf-theme-body",children:l("body text")}),Ko("span",{className:"sf-theme-row",children:[j("span",{className:"sf-theme-btn",style:{background:t,color:Ts(e,o.accent)},children:l("button")}),j("span",{className:"sf-theme-mini",style:{background:o.surface,borderColor:o.line},children:l("card")})]})]})}var mi={"Text color":j(Kp,{}),"Label color":j(dT,{}),Background:j(iT,{}),"Panels & cards":j(fT,{}),Borders:j(cT,{}),"Button color":j(nT,{}),"Button text color":j(Kp,{})};function uT({label:e,colorKey:o,value:t,onChange:r,idPrefix:a="sf-theme-ink"}){let n=`${a}-${o}`;return j(qe,{label:l(e),icon:mi[e],id:n,value:t,onChange:s=>r(o,s)})}function pT({value:e,accent:o,onChange:t,idPrefix:r="sf-theme-ink"}){let a=`${r}-button`,n=/^#[0-9a-fA-F]{6}$/.test(e??""),s=n?e:o;return j(qe,{label:l("Button color"),icon:mi["Button color"],id:a,value:s,caption:n?s:l("Main"),onChange:t})}function mT({colors:e,accent:o,onChange:t,idPrefix:r="sf-theme-ink"}){let a=`${r}-button-ink`,n=nu(e),s=Ts(e,o),i=Lr(e)??o,f=$t(Uo(s,i)??0);return j(qe,{label:l("Button text color"),icon:mi["Button text color"],hint:n&&f!=="good"?l("{grade} on the button",{grade:l(Ut[f])}):void 0,id:a,value:s,caption:n?s:l("Auto"),onChange:t})}var xT=[{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 xi({colors:e,onChange:o,idPrefix:t}){let r=Io(e);return j(tT,{children:xT.map(a=>"colour"in a?j(jp,{value:e,onChange:o},"colour"):"moduleBreak"in a?j("div",{className:"sf-theme-module-break","aria-hidden":"true"},"module-break"):"button"in a?j(pT,{value:e.button,accent:r.accent,onChange:n=>o({...e,button:n}),idPrefix:t},"button"):"buttonInk"in a?j(mT,{colors:e,accent:r.accent,onChange:n=>o({...e,buttonInk:n}),idPrefix:t},"buttonInk"):j(uT,{label:a.label,colorKey:a.key,value:r[a.key],onChange:(n,s)=>o({...e,[n]:s}),idPrefix:t},a.key))})}function xn({index:e,colors:o,selected:t,role:r="radio",open:a,editable:n=!0,onPick:s,onEdit:i,onChangeColors:f}){let d=Io(o),p=Wr(e),m=e<ks.length&&!o.brandInk?ks[e]:null,x=$t(Uo(d.text,d.background)??0),I=m?JSON.stringify(o)!==JSON.stringify(m):!1,y=a!==void 0;return Ko("div",{className:`sf-theme-card${t?" is-selected":""}`,children:[j("button",{type:"button",role:r,"aria-checked":r==="radio"?t:void 0,"aria-selected":r==="option"?t:void 0,"aria-label":p,className:"sf-theme-pick",onClick:s,children:j(Vp,{colors:o})}),Ko("div",{className:"sf-theme-foot",children:[j("span",{className:"sf-theme-name",children:p}),x!=="good"&&j("span",{className:"sf-theme-warn",children:l(Ut[x])}),n&&i&&y&&j("span",{className:"sf-theme-edit",children:j(aT,{content:a?l("Collapse"):l("Edit colors"),children:j(rT,{size:"sm","aria-expanded":a,"aria-controls":`sf-theme-colours-${e}`,"aria-label":a?l("Collapse {name}",{name:p}):l("Edit colors for {name}",{name:p}),onClick:i,children:a?j(sT,{size:14}):j(lT,{size:14})})})}),n&&i&&!y&&j(pi,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":l("Edit {name}",{name:p}),onClick:i,children:l("Edit")})]}),a&&Ko("div",{id:`sf-theme-colours-${e}`,className:"sf-theme-colours",children:[j(xi,{colors:o,onChange:w=>f?.(w)}),m&&j(pi,{variant:"link",size:"sm",className:"sf-theme-reset",disabled:!I,onClick:()=>f?.({...m}),children:I?l("Reset {name} to the preset",{name:p}):l("Not changed")})]})]})}function Yp({colors:e,name:o,nameId:t,open:r,menuId:a,labelId:n,buttonRef:s,onClick:i,onKeyDown:f,onEdit:d}){return Ko("div",{className:"sf-secttheme-btn",children:[j("button",{ref:s,type:"button",className:"sf-theme-pick","aria-expanded":r,"aria-controls":a,"aria-labelledby":`${n} ${t}`,onClick:i,onKeyDown:f,children:e?j(Vp,{colors:e}):j("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),Ko("div",{className:"sf-theme-foot",children:[j("span",{id:t,className:"sf-theme-name",children:o}),d&&j(pi,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":l("Edit {name}",{name:o}),onClick:d,children:l("Edit")}),j("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:i,children:j("span",{className:"sf-multi-caret",children:"\u25BE"})})]})]})}import{useCallback as Si,useEffect as em,useRef as yn}from"react";import{currentEaselSession as gT}from"efficient-easel/screen/lib/session";import{useEaselSession as yT}from"efficient-easel/screen/lib/session-context";import{useSyncExternalStore as IT}from"react";var Zp,Ii=null,yt=null,In=0,hi=new Set;function gi(e){Zp=e;for(let o of hi)o()}function yi(e){Ii=e,In+=1,yt&&clearTimeout(yt),yt=null,gi(void 0)}function Qp(e){In+=1,gi(e)}function hn(e=250){Ii&&(yt&&clearTimeout(yt),yt=setTimeout(()=>{yt=null;let o=Ii;if(!o)return;let t=++In;o().then(r=>{t===In&&gi(r)}).catch(()=>{})},e))}function Xp(){return Zp}function hT(e){return hi.add(e),()=>{hi.delete(e)}}function gn(){return IT(hT,Xp,Xp)}var bi=new Set;function Jp(e){return bi.add(e),()=>{bi.delete(e)}}async function P6(){let e=(await Promise.allSettled([...bi].map(async o=>o()))).find(o=>o.status==="rejected");if(e)throw e.reason}import{WebsiteBackendError as bT}from"efficient-easel/screen/lib/backend-error";function om(e=gT()){return(o,t,r)=>{let a=Se(e).theme;return a?a.update(o,r?{siteId:r}:void 0):Promise.reject(new bT("invalid","This backend stores no site theme."))}}function tm(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function ST(e,o=om()){let{themeFromDocument:t,token:r,siteId:a,patch:n}=e,s=tm({themeFromDocument:t,token:r});if(s)return s;if(Object.keys(n).length===0)return{status:"skipped",reason:"empty"};try{return await o(n,r,a??void 0),{status:"saved"}}catch(i){return{status:"failed",error:i}}}function Vt({themeFromDocument:e,tokenRef:o,siteId:t,onResult:r}){let a=yn(null),n=yn({}),s=yT(),i=yn(r);i.current=r;let f=yn(null),d=Si(x=>{if(x.status==="skipped"){let I=`skipped:${x.reason}`;if(f.current===I)return;f.current=I}else f.current=null;i.current?.(x)},[]),p=Si(async()=>{a.current&&(clearTimeout(a.current),a.current=null);let x=n.current;n.current={};let I=await ST({themeFromDocument:e,token:o?.current,siteId:t,patch:x},om(s));return d(I),I.status==="saved"&&hn(),I.status==="failed"&&(n.current={...x,...n.current}),I},[e,o,t,d,s]),m=Si((x,I=!1)=>{let y=tm({themeFromDocument:e,token:o?.current});if(y){d(y);return}n.current={...n.current,...x},a.current&&clearTimeout(a.current),I?p():a.current=setTimeout(()=>{p()},500)},[e,o,p,d]);return em(()=>()=>{p()},[p]),em(()=>Jp(async()=>{if(!a.current&&Object.keys(n.current).length===0)return;let x=await p();if(x.status==="failed")throw x.error}),[p]),{persist:m,flush:p}}var ET="Follow the page",V6="Follow the slideshow",OT=e=>l("Editing {name} changes it everywhere.",{name:e});function LT({colors:e}){if(!e)return ge("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});let o=Io(e);return bt("span",{className:"sf-secttheme-chip","aria-hidden":"true",children:[ge("i",{style:{background:o.background}}),ge("i",{className:"sf-secttheme-chip-accent",style:{background:o.accent}})]})}function RT({themes:e,value:o,onPick:t,onEdit:r,menuId:a,followLabel:n}){return bt("div",{className:"sf-multi-menu sf-secttheme-menu",id:a,role:"listbox",children:[n!==void 0&&bt(CT,{children:[bt("button",{type:"button",role:"option","aria-selected":o===null,className:`sf-secttheme-item${o===null?" is-active":""}`,onClick:()=>t(nn),children:[ge(LT,{}),ge("span",{className:"sf-secttheme-name",children:l(n)})]}),ge("div",{className:"sf-secttheme-sep",role:"presentation"})]}),o!==null&&e[o]&&ge("p",{className:"sf-secttheme-oncard",role:"presentation",children:l("{name} is on this section",{name:Wr(o)})}),e.map((s,i)=>i===o?null:ge(xn,{role:"option",index:i,colors:s,selected:!1,onPick:()=>t(i),onEdit:()=>r(i)},i))]})}function AT({index:e,colors:o,onChange:t,onDone:r}){let a=Wr(e),n=nm();return bt("div",{className:"sf-secttheme-sheet",children:[bt("div",{className:"sf-secttheme-sheet-head",children:[ge("span",{children:a}),ge("button",{type:"button",className:"sf-secttheme-done",onClick:r,children:l("Done")})]}),ge("div",{className:"sf-secttheme-rows",children:ge(xi,{colors:o,onChange:t,idPrefix:n})}),ge("p",{className:"sf-secttheme-warn",children:OT(a)})]})}function lm({value:e,onChange:o,followLabel:t,hint:r}){let{theme:a,setTheme:n}=V(),s=He(a),i=vT(FT),f=i?.tokenRef,d=i?.siteId??null,p=!i?.capabilities?.hasSiteTheme,{persist:m,flush:x}=Vt({themeFromDocument:p,tokenRef:f,siteId:d}),I=He(s),y=I.themes,w=Xs(e),v=w!==null?y[w]:void 0,k=v??(y.length?Gt(I):void 0),[C,g]=am(!1),[b,O]=am(null),F=rm(null),L=rm(null),P=nm(),M=wT(()=>{g(!1),O(null)},[]);kT(()=>{if(!C&&b===null)return;let A=W=>{F.current&&!F.current.contains(W.target)&&(x(),M())};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[C,b,M,x]);let z=A=>{o(A),M()},B=A=>{if(b===null)return;let W=y.map((te,ie)=>ie===b?A:te),D={...I,themes:W};n(D),m({selected_preset:D.selected,theme_presets:D.themes})};return bt("div",{className:"sf-secttheme",ref:F,children:[ge(PT,{label:l("Theme"),icon:ge(TT,{}),labelId:`${P}-label`,hint:r,children:ge(Yp,{colors:k,onEdit:w!==null?()=>{O(w),g(!1)}:void 0,name:v?Wr(w):l(t??ET),nameId:`${P}-value`,labelId:`${P}-label`,open:C,menuId:P,buttonRef:L,onClick:()=>{O(null),g(A=>!A)},onKeyDown:A=>{A.key==="Escape"&&(C||b!==null)&&(A.preventDefault(),M())}})}),C&&b===null&&ge("div",{onKeyDown:A=>{A.key==="Escape"&&(A.preventDefault(),M(),L.current?.focus())},children:ge(RT,{themes:y,value:w,onPick:z,onEdit:A=>{O(A),g(!1)},menuId:P,followLabel:t})}),b!==null&&y[b]&&ge(AT,{index:b,colors:y[b],onChange:B,onDone:()=>{x(),M(),L.current?.focus()}})]})}import{jsx as sm}from"react/jsx-runtime";import{useId as BT}from"react";import{FieldSelect as DT}from"efficient-easel/fields";import{SettingsField as _T}from"efficient-easel/panel";function NT(e){return e.map(({value:o,label:t,group:r,thumb:a,meta:n})=>({value:o,label:t,...r!==void 0?{group:r}:{},...a!==void 0?{thumb:a}:{},...n!==void 0?{meta:n}:{}}))}function oW({label:e,options:o,fallback:t,value:r,onChange:a,placeholder:n,bare:s=!1,icon:i}){let f=BT(),d=`${f}-label`,p=`${f}-button`,m=r??"",x=o.some(v=>v.value===m)?m:t,I=l(e),y=n===void 0?void 0:l(n),w=sm(DT,{id:p,value:x,options:NT(o),onChange:a,placeholder:y,searchPlaceholder:y,...s?{ariaLabel:I}:{ariaLabelledBy:`${d} ${p}`},searchable:!0,groupCount:!0,inline:!0});return s?w:sm(_T,{label:I,labelId:d,icon:i,children:w})}import{jsx as wt,jsxs as u0}from"react/jsx-runtime";import{SettingsField as Em}from"efficient-easel/panel";import{LinkIcon as p0}from"efficient-easel/icons";import{LinkPicker as m0,TextLinkField as x0}from"efficient-shell/ui";import{useEffect as Fm,useMemo as wn,useRef as I0,useState as Cn}from"react";import{currentEaselSession as MT}from"efficient-easel/screen/lib/session";function im(){return MT().auth.token}import{currentEaselSession as h0}from"efficient-easel/screen/lib/session";import{useScreenDocument as g0}from"efficient-easel/screen/components/ScreenDocumentContext";var HT=()=>({choosePage:l("Choose a page"),chooseSection:l("Choose a section"),noSections:l("No section anchors yet"),sectionHint:l("Jumps to a section on that page."),choosePost:l("Choose a post"),chooseProduct:l("Choose a product"),choosePopup:l("Choose a popup")});function fm(e,o,t){if(!e)return"page";if(ep(e))return"popup";if(e.startsWith("/journal/"))return"blog";if(rp(e))return"product";if(e.includes("#")){let r=e.slice(0,e.indexOf("#"));if(r===""||r==="/"||o.includes(r))return"anchor"}return e==="/"||o.includes(e)||t&&t.listingPaths.includes(t.targetOf(e))?"page":"custom"}function Ci(e,o){let t=HT(),r=e.pages.map(p=>({value:Dr(p.slug),label:p.title})),a=o?.pageOptions?o.pageOptions(r):r,n=a.map(p=>p.value),s=e.pages.map(p=>({label:p.title,options:tp(...p.docs).map(m=>({value:an(p.slug,m.slug),label:m.name}))})).filter(p=>p.options.length>0),i=p=>{switch(p){case"page":return{type:"select",options:a,placeholder:t.choosePage};case"anchor":return{type:"groups",groups:s,placeholder:s.length?t.chooseSection:t.noSections};case"blog":return{type:"select",options:e.posts.map(m=>({value:op(m.slug),label:m.title||m.slug})),placeholder:t.choosePost};case"product":return{type:"select",options:e.products.map(m=>({value:m.href,label:m.name||m.href})),placeholder:t.chooseProduct};case"popup":return{type:"select",options:(e.popups??[]).map(m=>({value:Ju(m.slug),label:m.title||m.slug})),placeholder:t.choosePopup};case"custom":return{type:"text"}}},f=Qu(e.offers).map(p=>({value:p.value,label:l(p.label),target:i(p.value),...p.value==="anchor"?{hint:t.sectionHint}:{},...p.value==="blog"||p.value==="product"||p.value==="popup"?{hideWhenEmpty:!0}:{}}));if(!o)return{kinds:f,rules:{kindOf:p=>fm(p,n),targetOf:p=>p,readFilter:()=>null,withFilter:p=>p}};let d=p=>{let m=o.withFilter(p,null);return o.listingPaths.includes(m)?m:p};return{kinds:f,rules:{kindOf:p=>fm(p,n,{listingPaths:o.listingPaths,targetOf:d}),targetOf:d,readFilter:o.readFilter,withFilter:o.withFilter},filtersFor:p=>o.listingPaths.includes(p)?o.filtersFor(p):null}}import{useEaselSession as y0}from"efficient-easel/screen/lib/session-context";function Ce(e,o){if(typeof e=="string")return e||o;if(e&&typeof e=="object"&&"text"in e){let t=e.text;return typeof t=="string"&&t?t:o}return o}function cm(e,o){return typeof e=="number"&&Number.isFinite(e)?e:o}function St(e,o){return typeof e=="boolean"?e:o}function bn(e,o){if(!Array.isArray(e))return o;let t=e.map(r=>typeof r=="string"?r:Ce(r?.text,"")).map(r=>r.trim()).filter(Boolean);return t.length?t:o}var dm="cart-drawer",cW="cart-drawer";var WT={kickerBadge:"",kickerText:"Your order",titleLead:"Your",titleAccent:"cart.",subtitleEmpty:"Empty for now.",subtitleOne:"One set in your cart.",subtitleMany:"{count} sets in your cart.",leadTimeValue:"",shipsToFallback:"",promises:[],emptyKicker:"No wheels yet",emptyBody:"Your cart is empty. Pick a wheel to get started."};function dW(e,o){return o===0?e.subtitleEmpty:o===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(o))}function uW(e){let o=e??{},t=WT;return{kickerBadge:Ce(o.kickerBadge,t.kickerBadge),kickerText:Ce(o.kickerText,t.kickerText),titleLead:Ce(o.titleLead,t.titleLead),titleAccent:Ce(o.titleAccent,t.titleAccent),subtitleEmpty:Ce(o.subtitleEmpty,t.subtitleEmpty),subtitleOne:Ce(o.subtitleOne,t.subtitleOne),subtitleMany:Ce(o.subtitleMany,t.subtitleMany),leadTimeValue:Ce(o.leadTimeValue,t.leadTimeValue),shipsToFallback:Ce(o.shipsToFallback,t.shipsToFallback),promises:bn(o.promises,t.promises),emptyKicker:Ce(o.emptyKicker,t.emptyKicker),emptyBody:Ce(o.emptyBody,t.emptyBody)}}var pm="consent-banner",xW="consent-banner";var zT=[{value:"bar",label:"Bar"},{value:"card",label:"Card"}],IW="Layout",um={layout:"bar"},GT=e=>zT.some(o=>o.value===e);function hW(e){let o=Ce((e??{}).layout,um.layout);return{layout:GT(o)?o:um.layout}}var UT=["meta","eyebrow","heading","body","statName","statValue","formEyebrow","formHeading","formIntro","fieldLabel","option","finePrint","dismiss","doneHeading","doneBody"],bW={meta:"Meta line",eyebrow:"Eyebrow",heading:"Heading",body:"Body",statName:"Stat name",statValue:"Stat value",formEyebrow:"Form eyebrow",formHeading:"Form heading",formIntro:"Form intro",fieldLabel:"Field label",option:"Option",finePrint:"Fine print",dismiss:"Dismiss link",doneHeading:"Success heading",doneBody:"Success message"},$T={meta:"styleMeta",eyebrow:"styleEyebrow",heading:"styleHeading",body:"styleBody",statName:"styleStatName",statValue:"styleStatValue",formEyebrow:"styleFormEyebrow",formHeading:"styleFormHeading",formIntro:"styleFormIntro",fieldLabel:"styleFieldLabel",option:"styleOption",finePrint:"styleFinePrint",dismiss:"styleDismiss",doneHeading:"styleDoneHeading",doneBody:"styleDoneBody"},SW={meta:{font:"--pp-meta-font",size:"--pp-meta-size"},eyebrow:{font:"--pp-eyebrow-font",size:"--pp-eyebrow-size"},heading:{font:"--pp-heading-font",size:"--pp-heading-size"},body:{font:"--pp-body-font",size:"--pp-body-size"},statName:{font:"--pp-statname-font",size:"--pp-statname-size"},statValue:{font:"--pp-statvalue-font",size:"--pp-statvalue-size"},formEyebrow:{font:"--pp-formeyebrow-font",size:"--pp-formeyebrow-size"},formHeading:{font:"--pp-formheading-font",size:"--pp-formheading-size"},formIntro:{font:"--pp-formintro-font",size:"--pp-formintro-size"},fieldLabel:{font:"--pp-fieldlabel-font",size:"--pp-fieldlabel-size"},option:{font:"--pp-option-font",size:"--pp-option-size"},finePrint:{font:"--pp-fineprint-font",size:"--pp-fineprint-size"},dismiss:{font:"--pp-dismiss-font",size:"--pp-dismiss-size"},doneHeading:{font:"--pp-doneheading-font",size:"--pp-doneheading-size"},doneBody:{font:"--pp-donebody-font",size:"--pp-donebody-size"}};function qT(e){return typeof e=="string"&&Oo.includes(e)?e:null}function mm(e){let o={};for(let t of UT){let r=qT(e[$T[t]]);r&&(o[t]=r)}return o}var Im=["delay","scroll","exit"],hm=["all","chosen","except"],gm=["visit","days","never","once"],jT=["all","desktop","phone"],KT=["stop","continue"],ym={min:0,max:60},bm={min:10,max:90},Sm={min:1,max:90},Qe={autoOpen:!1,trigger:"delay",autoOpenDelaySec:15,scrollPercent:50,showOn:"all",showOnPages:[],devices:"all",hideAfter:"days",hideDays:7,afterSubmit:"stop",startDate:null,endDate:null};function Ze(e,o,t){return typeof o=="string"&&e.includes(o)?o:t}function Yt(e,o,t){let r=cm(e,t);return Math.min(o.max,Math.max(o.min,Math.round(r)))}function VT(e){return typeof e.hideAfter=="string"?Ze(gm,e.hideAfter,Qe.hideAfter):e.oncePerSession===!0?"visit":e.oncePerSession===!1?"never":Qe.hideAfter}function YT(e){return Array.isArray(e)?e.map(o=>typeof o=="string"?o.trim():"").filter(Boolean).map(o=>o.startsWith("/")?o:`/${o}`):[]}function xm(e){if(typeof e!="string")return null;let o=e.trim();return/^\d{4}-\d{2}-\d{2}$/.test(o)?o:null}function Cm(e){let o=e??{},t=Qe;return{autoOpen:St(o.autoOpen,t.autoOpen),trigger:Ze(Im,o.trigger,t.trigger),autoOpenDelaySec:Yt(o.autoOpenDelaySec,ym,t.autoOpenDelaySec),scrollPercent:Yt(o.scrollPercent,bm,t.scrollPercent),showOn:Ze(hm,o.showOn,t.showOn),showOnPages:YT(o.showOnPages),devices:Ze(jT,o.devices,t.devices),hideAfter:VT(o),hideDays:Yt(o.hideDays,Sm,t.hideDays),afterSubmit:Ze(KT,o.afterSubmit,t.afterSubmit),startDate:xm(o.startDate),endDate:xm(o.endDate)}}var Xt="site-footer";var kW=Xt,TW={desktop:!0,tablet:!0,mobile:!0},PW={desktop:!1,tablet:!1,mobile:!1},wi=1,wm=6,FW=Array.from({length:wm-wi+1},(e,o)=>wi+o),Sn={desktop:6,tablet:3,mobile:2},XT={2:{desktop:2,tablet:2,mobile:1},3:{desktop:3,tablet:3,mobile:1},4:{desktop:4,tablet:2,mobile:2},5:{desktop:5,tablet:3,mobile:2},6:{desktop:6,tablet:3,mobile:2}},Ct=e=>Math.min(Math.max(Math.round(e),wi),wm);function EW(e){if(typeof e=="number")return XT[Ct(e)]??{desktop:Ct(e),tablet:Ct(e),mobile:Ct(e)};if(e&&typeof e=="object"){let o=e;return{desktop:Ct(o.desktop??Sn.desktop),tablet:Ct(o.tablet??Sn.tablet),mobile:Ct(o.mobile??Sn.mobile)}}return{...Sn}}var vi="subscribe-popup",NW="subscribe-popup";var ZT=[vi,Xt,dm,pm];function km(e){return ZT.includes(e)}var QT=["right","left"],JT={metaLabel:"Meta label",issueLabel:"Label",issueNumber:"00",kicker:"Kicker",heading:`Main heading
|
|
3
|
+
*Highlight line*`,deck:"Add a sentence or two of supporting copy.",stats:[{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"},{label:"Label",value:"Value"}],formLabel:"Section label",formHeading:"Main heading *highlight*",formIntro:"Add a sentence or two of supporting copy.",firstNameLabel:"Field label",firstNamePlaceholder:"Placeholder",emailLabel:"Field label",emailPlaceholder:"Placeholder",interestsLabel:"Field label",interests:["Option one","Option two","Option three"],frequencyLabel:"Field label",frequencies:["Option one","Option two","Option three"],submitText:"Button label",finePrint:"Fine print",dismissText:"Dismiss link",emailInvalidText:"Enter a valid email address.",submitErrorText:"Could not subscribe right now. Please try again.",successHeading:"Main heading *highlight*",successBody:"Add a sentence or two of supporting copy \u2014 the {email} and {issue} tokens are substituted here.",keepBrowsingText:"Button label",autoOpen:Qe.autoOpen,autoOpenDelaySec:Qe.autoOpenDelaySec,formSlug:"",trigger:Qe.trigger,scrollPercent:Qe.scrollPercent,showOn:Qe.showOn,showOnPages:[],hideAfter:Qe.hideAfter,hideDays:Qe.hideDays,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},ce=Ce,e0=St,Tm=bn;function vm(e,o){if(e==null)return o;let t=r=>r.trim()?r:"";if(typeof e=="string")return t(e);if(typeof e=="object"&&"text"in e){let r=e.text;return typeof r=="string"?t(r):""}return o}function o0(e,o){return Array.isArray(e)?Tm(e,[]):o}function t0(e,o){return Array.isArray(e)?e.map(t=>{let r=t??{};return{label:ce(r.label,""),value:ce(r.value,"")}}).filter(t=>t.label||t.value):o}function HW(e){let o=e??{},t=JT,r=Cm(o);return{metaLabel:ce(o.metaLabel,t.metaLabel),issueLabel:vm(o.issueLabel,t.issueLabel),issueNumber:vm(o.issueNumber,t.issueNumber),kicker:ce(o.kicker,t.kicker),heading:ce(o.heading,t.heading),deck:ce(o.deck,t.deck),stats:t0(o.stats,t.stats),formLabel:ce(o.formLabel,t.formLabel),formHeading:ce(o.formHeading,t.formHeading),formIntro:ce(o.formIntro,t.formIntro),firstNameLabel:ce(o.firstNameLabel,t.firstNameLabel),firstNamePlaceholder:ce(o.firstNamePlaceholder,t.firstNamePlaceholder),emailLabel:ce(o.emailLabel,t.emailLabel),emailPlaceholder:ce(o.emailPlaceholder,t.emailPlaceholder),interestsLabel:ce(o.interestsLabel,t.interestsLabel),interests:Tm(o.interests,t.interests),frequencyLabel:ce(o.frequencyLabel,t.frequencyLabel),frequencies:o0(o.frequencies,t.frequencies),submitText:ce(o.submitText,t.submitText),finePrint:ce(o.finePrint,t.finePrint),dismissText:ce(o.dismissText,t.dismissText),emailInvalidText:ce(o.emailInvalidText,t.emailInvalidText),submitErrorText:ce(o.submitErrorText,t.submitErrorText),successHeading:ce(o.successHeading,t.successHeading),successBody:ce(o.successBody,t.successBody),keepBrowsingText:ce(o.keepBrowsingText,t.keepBrowsingText),formSlug:typeof o.formSlug=="string"?o.formSlug.trim():t.formSlug,autoOpen:r.autoOpen,autoOpenDelaySec:r.autoOpenDelaySec,trigger:r.trigger,scrollPercent:r.scrollPercent,showOn:r.showOn,showOnPages:r.showOnPages,hideAfter:r.hideAfter,hideDays:r.hideDays,formSide:Ze(QT,o.formSide,t.formSide),valuePanelOnPhone:e0(o.valuePanelOnPhone,t.valuePanelOnPhone),sectionAccent:o.sectionAccent,sectionCorners:o.sectionCorners,sectionCornerSides:o.sectionCornerSides,textStyles:mm(o)}}var ki="popup",r0=$o,a0=["auto","full"],n0=["inside","outside","none"],l0={min:240,max:1440},s0={min:0,max:100},i0={placement:"center",fullWidth:!1,width:720,height:"auto",tintColor:"#000000",tintOpacity:60,outsideClick:!0,closeButton:"inside"};function f0(e,o){return typeof e=="string"&&/^#[0-9a-fA-F]{6}$/.test(e.trim())?e.trim():o}function $W(e){let o=e??{},t=i0;return{placement:Ze(r0,o.placement,t.placement),fullWidth:St(o.fullWidth,t.fullWidth),width:Yt(o.width,l0,t.width),height:Ze(a0,o.height,t.height),tintColor:f0(o.tintColor,t.tintColor),tintOpacity:Yt(o.tintOpacity,s0,t.tintOpacity),outsideClick:St(o.outsideClick,t.outsideClick),closeButton:Ze(n0,o.closeButton,t.closeButton)}}function c0(e,o=Math.random){for(;;){let t=`popup-${Math.floor(o()*2176782336).toString(36).padStart(6,"0")}`;if(!e.has(t))return t}}function d0(e){return{root:{props:{title:e,kind:ki}},content:[],zones:{}}}function Pm(e,o,t){return{slug:c0(o,t),title:e,kind:"lightbox",layout:d0(e)}}function Ti(e){return e?.root?.props?.kind===ki}function Om(e){let o=new Map;return(t="")=>{let r=im(),a=o.get(t);if(!a||a.token===null&&r!==null){let n=r||!h0().usesBridgedToken?e(r??"",t).catch(()=>[]):Promise.resolve([]);return o.set(t,{promise:n,token:r}),n}return a.promise}}var b0=Om(async(e,o)=>{let t=o?{siteId:o}:void 0,{pages:r}=Se();return r.linkTargets?r.linkTargets(t):(await r.list(t)).map(a=>({id:a.id,slug:a.slug,label:a.label,layout:null}))}),S0=Om(async(e,o)=>await Se().blog?.posts(o?{siteId:o}:void 0)??[]);function C0({value:e,onChange:o,label:t="Link",data:r,filters:a}){let n=wn(()=>Ci(r,a),[r,a]),s=l(t);return wt(Em,{label:s,icon:wt(p0,{}),children:wt(m0,{value:e,onChange:i=>o(i),kinds:n.kinds,rules:n.rules,filtersFor:n.filtersFor,label:s})})}function Lm(){let{siteId:e,capabilities:o}=g0(),{offersCommerce:t,hasBlog:r}=o,[a,n]=Cn([]),[s,i]=Cn([]),[f,d]=Cn([]),[p,m]=Cn(null),x=y0().chrome,I=x?.products?.list,y=x?.linkFilters,w=y?void 0:x?.linkRow,v=I0(!0);Fm(()=>(v.current=!0,()=>{v.current=!1}),[]),Fm(()=>{let g=!0;return b0(e??void 0).then(b=>g&&v.current&&n(b)),r&&S0(e??void 0).then(b=>g&&v.current&&i(b)),t&&I?.().then(b=>g&&v.current&&d(b)),t&&y?y.load(e).catch(()=>null).then(b=>g&&v.current&&m(()=>b)):m(null),()=>{g=!1}},[e,t,r,I,y]);let k=wn(()=>({pages:a.filter(g=>!km(g.slug)&&!Ti(g.layout)).map(g=>({slug:g.slug,title:g.label,docs:[g.layout]})),popups:a.filter(g=>g.slug===vi||Ti(g.layout)).map(g=>({slug:g.slug,title:g.label})),posts:r?s.map(g=>({slug:g.slug,title:g.title})):[],products:t?f.map(g=>({href:g.href,name:g.name})):[],offers:{offersCommerce:t,offersService:r}}),[a,s,f,t,r]),C=wn(()=>p?p(k.pages):null,[p,k]);return{data:k,filters:C,pages:a,offersCommerce:t,HostLinkRow:w}}function fz({label:e,icon:o,text:t,onTextChange:r,link:a,onLinkChange:n}){let{data:s,filters:i}=Lm(),f=wn(()=>Ci(s,i),[s,i]),d=l(e);return wt(Em,{label:d,icon:o,children:wt(x0,{label:d,text:t,onTextChange:r,link:a,onLinkChange:p=>n(p),kinds:f.kinds,rules:f.rules,filtersFor:f.filtersFor})})}function Rm({value:e,onChange:o,label:t="Link"}){let r=typeof e=="string"?e:"",{data:a,filters:n,pages:s,offersCommerce:i,HostLinkRow:f}=Lm(),d=a.pages.map(m=>Dr(m.slug)),p=i&&f&&(r==="/"||d.includes(r))?f:void 0;return u0("div",{children:[wt(C0,{value:r,onChange:o,label:t,data:a,filters:n}),p&&wt(p,{value:r,onChange:o,pages:s})]})}import{UiIcon as Bx}from"efficient-easel/draw/client";var Je={min:10,max:200,step:10};function Am(e,o){let t=typeof e=="number"?e:void 0,r=typeof o=="number"?o:void 0;if(!(t===void 0&&r===void 0))return{paddingTop:t,paddingBottom:r}}var w0="sf-pad-top-phone",v0="sf-pad-bottom-phone",k0="--sf-pad-t-phone",T0="--sf-pad-b-phone",P0="sf-pad-left-phone",F0="sf-pad-right-phone",E0="--sf-pad-l-phone",O0="--sf-pad-r-phone";function _m(e,o,t,r,a,n,s,i){let f=Am(e,o)??{},d={},p=["sf-section-pad"];typeof t=="number"&&(p.push(w0),d[k0]=`${t}px`),typeof r=="number"&&(p.push(v0),d[T0]=`${r}px`);let m={};return typeof a=="number"&&(m.paddingLeft=a),typeof n=="number"&&(m.paddingRight=n),typeof s=="number"&&(p.push(P0),d[E0]=`${s}px`),typeof i=="number"&&(p.push(F0),d[O0]=`${i}px`),p.length===1&&Am(e,o)===void 0&&!Object.keys(m).length?null:{className:p.join(" "),style:{...f,...m,...d}}}var Bm=e=>typeof e=="number"?e:void 0;function Dm(e,o,t){let r=Bm(e)??t,a=Bm(o);return r===void 0?a:a===void 0?r:r+a}function dz(e,o={}){return{top:Dm(e.padTop,e.sectionPaddingTop,o.top),bottom:Dm(e.padBottom,e.sectionPaddingBottom,o.bottom)}}function uz(e){return{top:e.sectionPaddingTop,bottom:e.sectionPaddingBottom,topPhone:e.sectionPaddingTopPhone,bottomPhone:e.sectionPaddingBottomPhone,left:e.sectionPaddingLeft,right:e.sectionPaddingRight,leftPhone:e.sectionPaddingLeftPhone,rightPhone:e.sectionPaddingRightPhone}}function pz(e){return _m(e.top,e.bottom,e.topPhone,e.bottomPhone,e.left,e.right,e.leftPhone,e.rightPhone)}function mz(e,o){let t=r=>typeof r=="number"?r+o:void 0;return _m(t(e.top),t(e.bottom),t(e.topPhone),t(e.bottomPhone),e.left,e.right,e.leftPhone,e.rightPhone)}var L0=["auto","fixed","screen"],R0=["px","%"];var A0="var(--sf-header-h, 88px)",Pi={min:40,max:2e3,step:10,fallback:600},Fi={min:10,max:200,step:5,fallback:100},B0="sf-section-minh",Nm={base:"--sf-section-minh",small:"--sf-section-minh-s"},Hm=e=>typeof e=="string"&&L0.includes(e),D0=e=>typeof e=="string"&&R0.includes(e);function vn(e){let o=Hm(e.sectionHeightMode)?e.sectionHeightMode:"auto",t=o==="screen"?"%":D0(e.sectionHeightUnit)?e.sectionHeightUnit:"px",r=o==="screen"?Fi.fallback:Pi.fallback,a=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:r;return{mode:o,value:a,unit:t}}function Wm(e){let{mode:o,value:t,unit:r}=vn(e);if(o==="auto")return;if(o==="fixed"&&r==="px")return[`${t}px`,null];let a=t/100,n=s=>o==="screen"?`(100${s} - ${A0})`:`100${s}`;return[`calc(${n("vh")} * ${a})`,`calc(${n("svh")} * ${a})`]}function _0(e){let o=Wm(e);if(!o)return;let[t,r]=o;return{display:"grid",[Nm.base]:t,...r?{[Nm.small]:r}:{}}}var Iz=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),Zt="Height",N0="sf-section-minh-phone",Mm={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function Ei(e){return Hm(e.sectionHeightModePhone)}function hz(e){return vn({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}function M0(e){let o=_0(e),t=Ei(e)?Wm({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone}):void 0;if(!o&&!t)return null;let r=[B0],a={...o??{}};return t&&(r.push(N0),a[Mm.base]=t[0],t[1]&&(a[Mm.small]=t[1])),{className:r.join(" "),style:a}}function gz(e){return M0(e)!==null}var kn="Stick to top",Vo={min:0,max:200,step:4,fallback:0},H0="sf-section-stick",W0="sf-section-stick-phone-on",z0="sf-section-stick-phone-off",zm={desktop:"--sf-stick-distance",phone:"--sf-stick-distance-phone"},bz=new Set(["CategoryBar","DocTabs","IntroBleed"]);function Gm(e){let o=typeof e=="number"&&Number.isFinite(e)?e:Vo.fallback;return Math.min(Vo.max,Math.max(Vo.min,Math.round(o)))}function Oi(e){return typeof e.stickTopPhone=="boolean"}function Li(e){let o=e.stickTop===!0,t=Gm(e.stickTopDistance),r=Oi(e),a=r?e.stickTopPhone===!0:o,n=r?Gm(e.stickTopDistancePhone):t;return{desktop:o,desktopDistance:t,phone:a,phoneDistance:n,ownPhone:r}}function Sz(e){let o=Li(e);if(!o.desktop&&!o.phone)return null;let t=[H0],r={};return o.desktop&&(r[zm.desktop]=`${o.desktopDistance}px`),(o.ownPhone||o.phone!==o.desktop)&&(t.push(o.phone?W0:z0),o.phone&&(r[zm.phone]=`${o.phoneDistance}px`)),o.desktop||t.push("sf-section-stick-desktop-off"),{className:t.join(" "),style:r}}var G0=["column","row","tabs"],Um="Direction",U0={column:"Stacked",row:"One row",tabs:"Tabs"},$m={Flex:G0,HeroGroup:["column","row"]},$0={Flex:"row",HeroGroup:"column"},q0={column:"flex-col",row:"flex-row",tabs:"flex-col"};function Tn(e,o){return $m[e].includes(o)?o:$0[e]}function wz(e,o){return q0[Tn(e,o)]}function qm(e){return $m[e].map(o=>({label:U0[o],value:o}))}var Ri=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Space between",value:"between"},{label:"End",value:"end"}],Vm=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"End",value:"end"},{label:"Stretch",value:"stretch"}],Ym="Wrap",Ai=[{label:"Wrap",value:"wrap"},{label:"No wrap",value:"nowrap"}],jm={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},Km={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function kz(e,o){let t=typeof e=="string"&&e in jm?jm[e]:"",r=typeof o=="string"&&o in Km?Km[o]:"";return[t,r].filter(Boolean).join(" ")}function Tz(e){return e===!0||e==="wrap"?"flex-wrap":""}var Bi="Block widths",Pn=[{label:"Fit content",value:"content",weights:null},{label:"Equal",value:"equal",weights:[1,1]},{label:"Big left",value:"bigLeft",weights:[2,1]},{label:"Big right",value:"bigRight",weights:[1,2]},{label:"Bigger left",value:"biggerLeft",weights:[3,1]},{label:"Bigger right",value:"biggerRight",weights:[1,3]}],zr="[&>*]:min-w-0 [&>*]:flex-1 [&>*]:basis-0",j0={equal:zr,bigLeft:`${zr} [&>*:first-child]:min-[800px]:grow-[2]`,bigRight:`${zr} [&>*:last-child]:min-[800px]:grow-[2]`,biggerLeft:`${zr} [&>*:first-child]:min-[800px]:grow-[3]`,biggerRight:`${zr} [&>*:last-child]:min-[800px]:grow-[3]`};function Pz(e){return typeof e=="string"?j0[e]??"":""}var Xm="Columns on phone",Di=1,Zm=3,K0={2:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px))/2)]",3:"max-[800px]:flex-wrap [&>*]:max-[800px]:min-w-0 [&>*]:max-[800px]:basis-[calc((100%_-_var(--sf-gap-len,0px)_*_2)/3)]"};function Fz(e){let o=Number(e);return K0[o]??"max-[800px]:flex-col"}var Qm="Block spacing",_i=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],V0="sf-box-gap-only";function Ez(e){return e==="gap"?V0:""}var Y0=["solid","dashed","dotted"],X0=["top","right","bottom","left"],Lz="sf-section-border",Rz="sf-section-border-self",Z0=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,Jm=e=>typeof e=="number"&&Number.isFinite(e)?`${Math.min(20,Math.max(0,Math.round(e)))}px`:void 0;function ex(e,{phone:o=!1}={}){if(!e||typeof e!="object")return;let t=o?"-phone":"",r={};for(let a of X0){let n=Jm(e[a])??Jm(e.width);n!==void 0&&(r[`--sf-border-${a}-width${t}`]=n)}return typeof e.style=="string"&&Y0.includes(e.style)&&(r[`--sf-border-style${t}`]=e.style),typeof e.color=="string"&&Z0.test(e.color)&&(r[`--sf-border-color${t}`]=e.color.toLowerCase()),Object.keys(r).length?r:void 0}function Az(e,o){let t=ex(e),r=ex(o,{phone:!0});return t||r?{...t,...r}:void 0}var rx="sf.gapContainer",Yo={min:-32,max:64,step:2},ax={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},Q0=new Set(["Events","GalleryB"]);function Gr(e,o,t){if(typeof o=="number"&&Number.isFinite(o)&&o>=Yo.min)return o;if(typeof o=="string"){let r=ax[e]?.[o];if(typeof r=="number")return r}return typeof t=="number"&&Number.isFinite(t)?t:Qt[e]}var J0="sf-gap-overlap",eP="--sf-gap-overlap",nx="--sf-block-gap",oP="--sf-block-gap-rem",vt={min:0,max:Yo.max,step:Yo.step};function tP(e){if(typeof e!="number"||!Number.isFinite(e))return null;let o=Math.min(Math.max(Math.round(e),vt.min),vt.max);return o-o%vt.step}function Dz(e){let o=tP(e);return o===null?{}:{[nx]:`${o}px`,[oP]:`${o/16}rem`}}var ox="sf-gap-zone",tx="--sf-gap-len";function Ni(e,o){return typeof o=="number"&&Number.isFinite(o)&&o>=Yo.min?!0:typeof o=="string"&&typeof ax[e]?.[o]=="number"}var rP={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function _z(e,o,t){if(!Ni(e,o)){let a=`${Qt[e]}px`,n=Q0.has(e)?`var(--sf-card-gap, ${a})`:a;return{className:` ${ox}`,style:{[tx]:`var(${nx}, ${n})`}}}let r=Gr(e,o);return r>=0?{className:` ${ox}`,style:{[tx]:`${r}px`}}:{className:` ${J0} ${rP[t]}`,style:{gap:"0px",[eP]:`${-r/2}px`}}}var lx=["transparent","var(--section-bg)","var(--surface)","var(--surface-2)"],sx={transparent:"No fill","var(--section-bg)":"Section band","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},Fn="var(--section-bg)",En="inherit";function Mz(e,o){return e===En?Fn:e===void 0?o:On(e)}var aP=/var\(\s*--(surface-2|surface|line)\s*(?=[,)])/g;function On(e){return e.replace(aP,"var(--site-$1")}function ix(e,o){return e===En?!0:e===void 0&&o===Fn}var fx=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],cx={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},Jt="var(--wheel-stage)",Ln="transparent",Ur="inherit";function zz(e,o){return On(Mi(e,o))}function Mi(e,o){return e===Ur?Jt:e==null?o:e===!0?Jt:e===!1?Ln:e}function Gz(e){return typeof e=="string"&&e!==Ur?On(e):Jt}function Uz(e){return e!==Ln&&e!=="none"&&e!==""}function dx(e,o){return e===Ur||e===!0?!0:e==null?o===Jt:!1}var ux="inherit",Rn="fixed",px=e=>typeof e!="number"&&e!==Rn,nP="var(--sf-heading-max, 9999px)";function qz(e,o,t,r){if(typeof e=="number")return`${e}px`;if(e===Rn)return o;let a=r?`var(--size-${r}, ${o})`:o;return t==="heading"?`min(${a}, ${nP})`:a}var pe={min:1e3,max:2e3,step:50,default:1600};function lP(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}var mx="--sf-site-width",Hi=`var(${mx},${pe.default}px)`,Kz=`max-w-[${Hi}]`,Vz=`max-w-[${pe.default}px]`;function sP(e){return typeof e!="number"||!Number.isFinite(e)?pe.default:Math.round(Math.min(Math.max(e,pe.min),pe.max))}function Yz(e){let o=sP(e);return o===pe.default?{}:{[mx]:`${o}px`}}var Co={min:0,max:80,step:4,default:40},xx="--sf-site-gutter",eo=`var(${xx},${Co.default}px)`,iP=`px-[${eo}]`;var Xo={md:`min(24px,${eo})`,sm:`min(20px,${eo})`,frame:`min(24px,${eo})`,tabs:`min(16px,${eo})`},Xz=[[`max-[1100px]:px-[${Xo.md}]`,"max-[1100px]:px-6"],[`max-[1100px]:px-[${Xo.tabs}]`,"max-[1100px]:px-4"],[`max-[960px]:px-[${Xo.frame}]`,"max-[960px]:px-6"],[`max-[900px]:px-[${Xo.md}]`,"max-[900px]:px-6"],[`max-[800px]:px-[${Xo.md}]`,"max-[800px]:px-6"],[`max-[720px]:px-[${Xo.sm}]`,"max-[720px]:px-5"],[`max-[800px]:px-[${Xo.sm}]`,"max-[800px]:px-5"],[`max-[640px]:px-[${Xo.sm}]`,"max-[640px]:px-5"],[`min-[800px]:px-[${eo}]`,"min-[800px]:px-10"],[`max-[720px]:px-[min(24px,${eo})]`,"max-[720px]:px-6"],[`max-[800px]:-mx-[min(20px,${eo})]`,"max-[800px]:-mx-5"],[`max-[720px]:-mx-[min(20px,${eo})]`,"max-[720px]:-mx-5"],[`-mx-[${eo}]`,"-mx-10"],[iP,"px-10"]];var Zz="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[800px]:px-[min(20px,var(--sf-site-gutter,40px))]",Qz="mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] max-[1100px]:px-[min(24px,var(--sf-site-gutter,40px))]";function fP(e){return typeof e!="number"||!Number.isFinite(e)?Co.default:Math.round(Math.min(Math.max(e,Co.min),Co.max))}function Jz(e){let o=fP(e);return o===Co.default?{}:{[xx]:`${o}px`}}var Ix=Hi,eG=`max-w-[${Ix}]`,oG=`max-w-[min(var(--sf-page-cap,${pe.default}px),${pe.default}px)]`,hx="--sf-hero-cap",cP=`var(${hx},none)`,tG=`max-w-[${cP}]`,Wi="--sf-hero-bleed-m",zi="--sf-hero-bleed-w",rG=`var(${Wi},calc(50% - 50vw))`,aG=`var(${zi},100vw)`,nG=`mx-[var(${Wi},calc(50%_-_50vw))]`,lG=`w-[var(${zi},100vw)]`,dP="--sf-hero-chrome-x",uP="--sf-hero-chrome-cap";function sG(e){return e===!0?{[hx]:Ix,[Wi]:"auto",[zi]:"100%",[dP]:"24px",[uP]:"none"}:{}}var Gi=`calc(${Hi} - ${eo}*2)`,iG=`max-w-[${Gi.replace(/ /g,"_")}]`;var pP="--sf-chrome-cap",mP=`var(${pP},${Gi})`,fG="data-page-width";function cG(e){return e==="full"?"full":null}function dG(e){return e==="full"?null:lP(e==="content"?Gi:mP)}function uG(e){if(e==="full")return"full";if(e==="content")return"content"}var xP=["contained","page","full"],yx=["full","page"],er={full:"Full width",page:"Content width"},$i="inherit",IP=e=>typeof e=="string"&&xP.includes(e),bx=e=>e===$i;function Bo(e,o){let t=typeof e.pageWidth=="number"?e.pageWidth:pe.default;return bx(e.widthMode)?{mode:"full",pageWidth:t,inherited:!0}:e.widthMode==="contained"?{mode:"page",pageWidth:t,inherited:!1}:IP(e.widthMode)?{mode:e.widthMode,pageWidth:t,inherited:!1}:e.contained===!0?{mode:"page",pageWidth:t,inherited:!1}:typeof e.fullWidth=="boolean"?{mode:e.fullWidth?"full":"page",pageWidth:t,inherited:!1}:e.contained===!1?{mode:"full",pageWidth:t,inherited:!1}:{mode:o,pageWidth:t,inherited:o==="full"}}function qi(e){return Bo(e,"page").mode==="full"}var $r="site",Sx={Hero:"hero",HeroSingle:"hero",IntroBleed:"scrollOver",SpecStrip:"background",Timeline:"background",Footprint:"background",Prose:"background",ParagraphsA:"background",Cards:"background",KeyFeatures:"background",Chart:"background",Mockup:"background",Testimonials:"background",TitleWithButtons:"background",Countdown:"background",DocMasthead:"background",DocBody:"background",DocMetaCards:"background",Gallery:"background",GalleryB:"background",Reviews:"background",ReviewForm:"background",Form:"background",AppointmentBooking:"background",FAQ:"background",Events:"background",Split:"both",Breadcrumb:"both",Collections:"both",CatalogFilterBar:"both",AlloyWheelsListing:"both",Banner:"contained",Stats:"contained",Logos:"contained",Divider:"contained",OrderSummary:"contained",DeliveryOptions:"contained",PaymentBadges:"contained",CheckoutCTA:"contained",Flex:"contained",Grid:"contained",Manifesto:"contentColumn",SectionHeader:"contentFull",ProductHero:"contentFull",ProductGrid:"productGrid",TimelineTrack:"capped",DetailRows:"capped",FitmentTable:"capped",TyreSizes:"capped",TyreFitment:"capped",EuTyreLabel:"capped",BundleOffer:"capped",CompatibleTyres:"capped",RelatedProducts:"capped",ProcessSteps:"capped",StatsParagraph:"capped",Masthead:"capped",FeaturedCover:"capped",LongRead:"capped",Series:"capped",ContactLocations:"capped",FitmentFinder:"capped",SpecTable:"capped",Subscribe:"capped",SubscribeBlogs:"capped",ContactRouting:"capped",SubmitBuild:"capped"};function hP(e){return Object.prototype.hasOwnProperty.call(Sx,e)}var Ui=e=>e==="full"||e==="content",gP=e=>typeof e=="number"&&Number.isFinite(e)&&e>0,gx=({widthMode:e,fullWidth:o,pageWidth:t})=>({widthMode:e,fullWidth:o,pageWidth:t});function yP(e,o){let t={background:null,content:null,contentMax:null};switch(e){case"hero":return bx(o.widthMode)||o.widthMode!=="full"?t:{...t,background:"full"};case"scrollOver":return o.fullWidth===!1?t:{...t,content:"full"};case"background":return Bo(o,"full").mode==="full"?t:{...t,background:"content"};case"both":return Bo(o,"full").mode==="full"?{...t,content:"full"}:{...t,background:"content"};case"contained":return Bo(o,"page").mode==="full"?{...t,content:"full"}:{...t,background:"content"};case"contentColumn":return Bo(gx(o),"page").mode==="full"?{...t,content:"full"}:t;case"contentFull":return Bo(gx(o),"full").mode==="full"?{...t,content:"full"}:t;case"productGrid":{let r=Bo(o,"full");return r.mode==="full"?{...t,content:"full"}:{background:"content",content:"content",contentMax:r.pageWidth}}case"capped":return{...t,background:"content"}}}function ji(e,o){if(!hP(e))return{background:null,content:null,contentMax:null};let t=Sx[e],r=o,a=yP(t,r),n=r.backgroundWidth===$r?null:Ui(r.backgroundWidth)?r.backgroundWidth:a.background;return r.contentWidth===$r?{background:n,content:null,contentMax:null}:Ui(r.contentWidth)?{background:n,content:r.contentWidth,contentMax:r.contentWidth==="content"&&gP(r.contentMax)?r.contentMax:null}:{background:n,content:a.content,contentMax:a.contentMax}}var Cx="siteWidths";function An(e){return Ui(e)?e:null}function wx(e,o){return{[Cx]:{background:An(e),content:An(o)}}}function xG(e){let o=e.puck?.metadata?.[Cx];return{background:An(o?.background),content:An(o?.content)}}import{jsx as bP}from"react/jsx-runtime";import{createContext as SP,useContext as CP}from"react";var wP=2,vP=wP+1,vx=SP(2);function kx({tier:e,children:o}){return bP(vx.Provider,{value:e,children:o})}function Tx(e){let o=CP(vx);return vP+Math.max(0,e-o)}import{withStyleKind as RF}from"efficient-easel/style-clipboard";import{useEaselSession as AF}from"efficient-easel/screen/lib/session-context";var Ki=e=>!!e&&typeof e=="object"&&typeof e.type=="string"&&!!e.props&&typeof e.props=="object";function Vi(e,o){let t=e.components[o]?.label;return typeof t=="string"&&t.trim()?t.trim():o}function kP(e){return e.length>3&&e.endsWith("s")?e.slice(0,-1):e}function Yi(e,o,t,r){e.forEach((a,n)=>{if(Ki(a)){r.push({node:a,list:e,index:n,parent:o,slot:t});for(let[s,i]of Object.entries(a.props))Array.isArray(i)&&i.some(Ki)&&Yi(i,a,s,r)}})}function TP(e){let o=[];Yi(Array.isArray(e.content)?e.content:[],null,"",o);for(let t of Object.values(e.zones??{}))Array.isArray(t)&&Yi(t,null,"",o);return o}function Fx(e,o){return TP(e).find(t=>String(t.node.props.id)===o)}function Ex(e,o,t){if(!t)return null;let r=Fx(o,t);if(!r)return null;let a=Vi(e,r.node.type),n=r.parent?`${Vi(e,r.parent.type)} \xB7 ${kP(r.slot)} ${r.index+1}`:a;return{blockId:t,type:r.node.type,label:n,path:""}}var Ox="sfDescribedAs";function Zo(e,o){return{...e,[Ox]:o}}var PP=e=>e.filter(o=>!!o&&typeof o=="object"&&"value"in o).map(o=>typeof o.label=="string"?{value:o.value,label:o.label}:{value:o.value});function FP(e){if(!e||typeof e!="object")return null;let o=e;if(typeof o.type!="string")return null;let t=o.type==="custom"?o[Ox]:void 0,r={type:t?.type??o.type},a=t?.label??o.label;typeof a=="string"&&(r.label=a);let n=t?.options??o.options;Array.isArray(n)&&(r.options=PP(n));for(let s of["arrayFields","objectFields"]){let i=t?.[s]??o[s];i&&typeof i=="object"&&(r[s]=Lx(i))}return r}function Lx(e){let o={};for(let[t,r]of Object.entries(e??{})){let a=FP(r);a&&(o[t]=a)}return o}function Rx(e){let o={};for(let[t,r]of Object.entries(e.components))r&&(o[t]={label:Vi(e,t),fields:Lx(r.fields)});return o}function EP(e,o){let t=e;for(let r of o?o.split("."):[]){let a=/^([A-Za-z_][A-Za-z0-9_]*)(?:\[(\d+)\])?$/.exec(r);if(!a||!t||typeof t!="object")return null;t=t[a[1]],a[2]!==void 0&&(t=Array.isArray(t)?t[Number(a[2])]:void 0)}return t&&typeof t=="object"&&!Array.isArray(t)?t:null}function Xi(e,o){return e.findIndex(t=>Ki(t)&&String(t.props.id)===o)}function Px(e,o,t){let r=o||t;if(!r)return e.length;let a=Xi(e,r);if(a<0)throw new Error(`there is no top-level block ${r}`);return o?a+1:a}function Ax(e,o,t,r){let a=structuredClone(o),n=Array.isArray(a.content)?a.content:a.content=[];try{t.forEach((s,i)=>{let f=d=>{throw new Error(`change ${i+1}: ${d}`)};switch(s.op){case"set_props":{let d=Fx(a,s.block_id)??f(`there is no block ${s.block_id}`);"id"in s.props&&f("a block's id is never changed");let p=EP(d.node.props,s.path)??f(`there is no ${s.path} in that block`);Object.assign(p,structuredClone(s.props));break}case"insert_block":{let d=e.components[s.type]??f(`there is no block type ${s.type}`),p=d.defaultProps&&typeof d.defaultProps=="object"?d.defaultProps:{},m={type:s.type,props:{...structuredClone(p),...structuredClone(s.props),id:r(s.type)}};n.splice(Px(n,s.after,s.before),0,m);break}case"remove_block":{let d=Xi(n,s.block_id);d<0&&f(`there is no top-level block ${s.block_id}`),n.splice(d,1);break}case"move_block":{let d=Xi(n,s.block_id);d<0&&f(`there is no top-level block ${s.block_id}`);let[p]=n.splice(d,1);n.splice(Px(n,s.after,s.before),0,p);break}default:f(`"${s.op}" is not a change this editor makes`)}})}catch(s){return{ok:!1,reason:s instanceof Error?s.message:String(s)}}return{ok:!0,document:a}}import{TEXT_CONTROL_KINDS as DU,SCALAR_TEXT_CONTROLS as _U}from"efficient-easel/draw";function et(e){for(let[o,t]of Object.entries(e))t&&typeof t=="object"&&!No(t)&&RF(t,`section:${o}`);return e}function oI(){return null}function rf(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return h(oI,{},e)}function BF(e){return e.type===oI}function wo(e){return BF(e)?void 0:e}function Tt(e,o){return l("{value} from {from}",{value:e,from:o})}function DF(){let{appState:e}=Kr(a=>a),o=e.data.root?.props??{},{mode:t,pageWidth:r}=Bo(o,"full");return t==="page"?Tt(`${r}px`,l("the page")):t==="contained"?Tt(l("Contained"),l("the page")):Tt(l("Full"),l("the page"))}function _F(){let{blockGap:e}=V();return e===null?l("this container's own spacing"):Tt(`${e}px`,l("Styles"))}function NF({inherited:e,onReset:o,label:t}){return h(Ee,{words:X()?.panel,label:l(t),changed:!e,detail:_F(),onReset:o})}function MF({inherited:e,onReset:o,label:t}){return h(Ee,{words:X()?.panel,label:l(t),changed:!e,detail:DF(),onReset:o})}function Pt({value:e,onChange:o,label:t,placeholder:r,hint:a,multiline:n,hideable:s=!0,markup:i=!0}){let{text:f,hidden:d}=Jo(e),p=Ji(null),m=Ji(null),x=C=>o(s?{text:C,hidden:d}:C),I=()=>o({text:f,hidden:!d}),y=s&&d,w=LP(),v=a?UF(a)?h("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(a)}):h(Xu,{children:l(a)}):void 0,k=d?l("Show {label} on the slide",{label:l(t)}):l("Hide {label} on the slide",{label:l(t)});return h(re,{label:l(t),icon:h(dF,{}),htmlFor:w,className:y?"is-hidden":void 0,hint:v,action:s?h(eI,{content:k,children:h("button",{type:"button",className:"sf-field-eye","aria-pressed":d,"aria-label":k,onClick:I,children:d?h(Bx,{name:"eye-off",size:14}):h(Bx,{name:"eye",size:14})})}):void 0,children:Do("div",{className:"sf-copybox",children:[i&&h(ri,{target:n?m:p,value:f,onChange:x}),n?h("textarea",{id:w,ref:m,value:f,placeholder:r===void 0?void 0:l(r),onChange:C=>x(C.target.value)}):h("input",{id:w,ref:p,type:"text",value:f,placeholder:r===void 0?void 0:l(r),onChange:C=>x(C.target.value)})]})})}function OU(e,o){return{...e,[DP]:o}}function LU(e){let o=e[_o];if(!o)throw new Error("withOffPage: the field holds no authored text");return{...e,[_o]:{...o,offPage:!0}}}function _n(e){return!e||typeof e!="object"?!1:e[_o]?.offPage===!0}var tI="sfPanelOnly";function RU(e){if(!e[_o])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[tI]:!0}}function rI(e){return!!e&&typeof e=="object"&&e[tI]===!0}function AU(e){let o=e[_o];if(!o)throw new Error("withIdentifier: the field holds no authored text");return{...e,[_o]:{...o,identifier:!0}}}function NU(e,o){if(!e[_o])throw new Error("inOwnBox: the field holds no authored text");let{[OF]:t,...r}=e;return{...r,[ai]:!0,render:o}}var HF=new Set(LF),ef={type:"radio",options:[{value:!0},{value:!1}]},aI={text:{type:"object",objectFields:{text:{type:"text"},hidden:ef}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:ef}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},Ft=(e,o)=>{let t=Zo({...o,[_o]:e},{...aI[e.control],label:e.label});if(!HF.has(e.control))return t;let r=o.render;return{...Vr(t,"authored-copy"),render:a=>h(Dp,{name:a.name,children:r(a)})}},MU="Everything else on this block comes from the linked post. Unlink it to edit by hand.",WF={field:"source.slug",set:!0},HU={not:WF},zF="Select a word, then press the highlighter.",GF=new Set([zF]),UF=e=>GF.has(e);function WU(e,o,t){return Ft({control:"text",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>h(Pt,{value:r,onChange:a,label:e,placeholder:o,hint:t})})}function zU(e,o,t){return Ft({control:"textarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>h(Pt,{value:r,onChange:a,label:e,placeholder:o,hint:t,multiline:!0})})}function GU(e,o,t){return Ft({control:"plainText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>h(Pt,{value:r,onChange:a,label:e,placeholder:o,hint:t,hideable:!1,markup:!1})})}function UU(e,o,t){return Ft({control:"copyText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>h(Pt,{value:r,onChange:a,label:e,placeholder:o,hint:t,hideable:!1})})}function $U(e){return{type:"custom",[AP]:{label:e},...Zo({},{type:"text",label:e}),render:({value:o,onChange:t})=>h(Rm,{value:RP(o),onChange:t,label:e})}}function qU(e,o,t){return Ft({control:"plainTextarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>h(Pt,{value:r,onChange:a,label:e,placeholder:o,hint:t,multiline:!0,hideable:!1})})}var nI={Design:_P,Animation:Gx};function lI(e,o){return e.includes("Design")?o!=="Design":null}function sI(e,o){return{type:"custom",[tf]:{label:e,level:o},marker:!0,fold:e,render:()=>h(oo,{})}}function ve(e){return sI(e,2)}function jU(e){return{type:"custom",render:()=>h($F,{text:e})}}function $F({text:e}){return h("p",{className:"sf-note",children:l(e)})}function KU(e){return sI(e,1)}function VU(e){return No(e)!==null&&e?.tabs!==void 0}var Dx=new Map;function Nn(e,o){let t=`${e}\0${o?o.join(""):""}`,r=Dx.get(t)??{type:"custom",tabs:o,[tf]:{label:e,level:1},bucket:e,marker:!0,render:()=>h(oo,{})};return Dx.set(t,r),r}var _x=new Map;function af(e){let o=_x.get(e)??{type:"custom",[tf]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>h(oo,{})};return _x.set(e,o),o}function qF(e){let o=e;return o?.marker===!0&&typeof o.fold=="string"?o.fold:null}function iI(e,o){return qF(e)===o?e:{...e,marker:!0,fold:o,render:()=>h(oo,{})}}function fI(e){let o=e;if(o.marker===!0&&o.fold===void 0)return e;let{fold:t,...r}=e;return{...r,marker:!0,render:()=>h(oo,{})}}function nf({title:e,children:o}){let[t,r]=jr(()=>!Qi.has(e));return h(mF,{title:e,open:t,onToggle:a=>{r(a),a?Qi.delete(e):Qi.add(e)},children:o})}var Qi=new Set;function YU({label:e}){return h(xF,{title:l(e),level:Tx(2)})}function cI({swatches:e,current:o,onPick:t,names:r}){let a=e.find(i=>i.toLowerCase()===o.toLowerCase()),n=a?r?.[a]:void 0,s=n?l(n):o;return Do("div",{className:"sf-swatches",children:[e.map(i=>{let f=r?.[i]?l(r[i]):i;return h(eI,{content:f,children:h("button",{type:"button","aria-pressed":o.toLowerCase()===i.toLowerCase(),className:`sf-swatch ${o.toLowerCase()===i.toLowerCase()?"is-active":""}`,style:{background:i},onClick:()=>t(i),"aria-label":f})},i)}),h("span",{className:"sf-swatch-hex",children:s})]})}function XU(e,o){return{type:"custom",render:({value:t,onChange:r})=>{let a=ix(t,o);return h(re,{label:l(e),icon:h(WP,{}),changed:!a,action:h(Ee,{words:X()?.panel,label:l(e),changed:!a,detail:l("the theme's section background"),onReset:()=>r(En)}),children:cI({swatches:lx,current:a?Fn:t??o??"",onPick:r,names:sx})})}}}function jF(e,o){return{type:"custom",render:({value:t,onChange:r})=>{let a=t,n=dx(a,o);return h(re,{label:l(e),icon:h(JP,{}),changed:!n,action:h(Ee,{words:X()?.panel,label:l(e),changed:!n,detail:l("the theme's image stage"),onReset:()=>r(Ur)}),children:cI({swatches:fx,current:n?Jt:Mi(a,o),onPick:r,names:cx})})}}}function Mn(e=t=>t,o){return et({_gSectionTheme:ve(cp),sectionAccent:{type:"custom",render:({value:t,onChange:r})=>h(lm,{value:e(t),onChange:r,followLabel:o})}})}function Ae({min:e,max:o,step:t,value:r,onChange:a,suffix:n="",readout:s=!0,notch:i,ariaLabel:f,disabled:d=!1}){let p=i!==void 0&&Number.isFinite(i)&&i>=e&&i<=o;return h("div",{className:p?"sf-slider has-notch":"sf-slider",style:p?{"--sf-notch":(i-e)/(o-e)}:void 0,children:h(EF,{min:e,max:o,step:t,value:r,suffix:n||void 0,showInput:s,label:f===void 0?void 0:l(f),disabled:d,size:"sm",boxSize:"md",className:"sf-slider-track",onChange:m=>{m!==null&&m!==r&&a(m)}})})}function or(e,o,t,r,a,n,s="",i){return{type:"custom",...Zo({},{type:"number",label:e}),render:f=>h(re,{label:l(e),icon:wo(o),action:i?i("storedValue"in f?f.storedValue:f.value,f.onChange):void 0,children:Ae({min:t,max:r,step:a,value:typeof f.value=="number"?f.value:n,suffix:s,ariaLabel:e,onChange:f.onChange})})}}function dI(e,o){let{min:t,max:r,step:a=1,unsetLabel:n,hint:s,restTrack:i,unsetMark:f,icon:d}=o;return{type:"custom",render:({value:p,onChange:m})=>{let x=typeof p=="number"?p:null,I=x===null;return h(re,{label:l(e),icon:d?wo(d):void 0,value:I?f||n===void 0?void 0:l(n):`${x}px`,changed:!I,action:f?zx(f,{changed:!I,onReset:()=>m(null)}):h(Ee,{words:X()?.panel,label:l(e),changed:!I,onReset:()=>m(null)}),hint:typeof s=="string"?l(s):s,children:i?i({min:t,max:r,step:a,px:x,label:e,onChange:m}):Ae({min:t,max:r,step:a,value:x??t,readout:!1,ariaLabel:e,onChange:m})})}}}function ZU(e){let o=or("Gap",h($x,{}),Yo.min,Yo.max,Yo.step,Qt[e],"px",(t,r)=>h(NF,{inherited:!Ni(e,t),onReset:()=>r(void 0),label:"Gap"}));return{type:"custom",[rx]:e,render:t=>o.render({...t,value:Gr(e,t.value,t.field?.siteGap),storedValue:t.value,onChange:r=>t.onChange(r)})}}var Hn="Corners";function lf(e){return{type:"custom",render:({value:o,onChange:t})=>{let r=typeof o=="number"&&Number.isFinite(o)?o:null,a=r!==null;return h(re,{label:l(Hn),icon:h(qP,{}),changed:a,action:zx(e.mark,{changed:a,onReset:()=>t(null)}),hint:e.hint,children:h(KF,{tier:e,px:r,onRadius:t})})}}}function Wn(e){let o=null;try{o=of()}catch{o=null}return[o?.values?.[e],t=>o?.onChange(e,t)]}function KF({tier:e,px:o,onRadius:t}){let r=e.useFollowed(),a=e.useClosedReason?e.useClosedReason():null,[n,s]=Wn(e.sidesKey),i=Lo(n)??[...dt];return h(TF,{label:l(Hn),value:i,corners:Lu,onChange:f=>{let d=Lo(f)??[];s(d.length===dt.length?null:d)},radius:o,onRadiusChange:t,radiusMin:Ue,radiusMax:ft,radiusStep:e.step??1,radiusPlaceholder:String(r),disabled:a!==null,disabledReason:a??void 0})}function uI(){return Vr({type:"custom",render:()=>h(Dn,{})},"always")}function VF({label:e,changed:o=!1,onReset:t=()=>{}}){let{cornerRadiusPx:r}=V(),a=typeof r=="number"?`${r}px`:l("not set");return h(Ee,{words:X()?.panel,label:l(e),changed:o,detail:r==null?l("the built-in corners"):Tt(a,l("Styles")),onReset:t})}function YF(){let{cornerRadiusPx:e}=V();return typeof e=="number"?e:Ue}function XF(){return lf({sidesKey:"sectionCornerSides",useFollowed:YF,useClosedReason:()=>mI()?l(pI):null,mark:h(VF,{label:Hn}),hint:h(ZF,{})})}var pI="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function mI(){return qi(vo())}function ZF(){return h(oo,{children:mI()?pI:"Follows Styles \u25B8 Basics \u25B8 Corners until you set a number here."})}function zn(){return et({_gShape:ve("Shape"),sectionCorners:XF(),sectionCornerSides:uI(),sectionBorder:Nx("desktop"),sectionBorderPhone:Nx("mobile")})}var QF=()=>({width:l("Border width"),sides:{top:l("Border top"),right:l("Border right"),bottom:l("Border bottom"),left:l("Border left")},style:l("Border style"),styles:{solid:l("Solid"),dashed:l("Dashed"),dotted:l("Dotted")},color:l("Border color"),unit:"px"});function JF(e){let o=Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null&&t!==""));return Object.keys(o).length?o:void 0}function e1(){let e;try{let o=He(V().theme);e=o.themes[o.selected]?.line}catch{e=void 0}return e||ou.line}function o1({value:e,onChange:o,tier:t}){let[r]=Wn("sectionBorder"),a=e1(),n=e&&typeof e=="object"?e:{},s=t==="mobile"?r&&typeof r=="object"?r:{}:{},[i,f]=jr(()=>SF(n,s)),d=QF();return h(re,{label:l("Border"),icon:h(zP,{}),action:h(Zx,{each:i,label:l("Each side"),onChange:f}),children:h(IF,{label:l("Border"),value:n,each:i,onChange:p=>o(JF(p)),placeholder:{sides:bF(s),style:s.style??"solid",color:s.color||a},presets:[a],words:d,max:20})})}function Nx(e){return we(e,{type:"custom",render:({value:o,onChange:t})=>h(o1,{value:o,onChange:t,tier:e})})}function Gn(){return{_gMotion:ve("Motion"),sectionAnimation:cf("Entrance",h(Gx,{}),[...up],Zs)}}function sf(){let e=null;try{let{appState:o,selectedItem:t}=Kr(a=>a),r=t?.props?.id?String(t.props.id):void 0;e=r?Js(o?.data,r):null}catch{e=null}return e!==null&&qi(e)}function xI(e){let{cornerRadiusPx:o}=V(),t=sf(),r=typeof o=="number"?o:e,a=null;try{let{appState:s,selectedItem:i}=Kr(d=>d),f=i?.props?.id?String(i.props.id):void 0;a=f?Js(s?.data,f):null}catch{a=null}if(t||!a)return r;let n=a.sectionCorners;return _s(n)?n:r}function t1({label:e,changed:o=!1,onReset:t=()=>{}}){let r=sf(),a=xI(Ue),n=r?"Site":"Section";return h(Ee,{words:X()?.panel,label:l(e),changed:o,detail:Tt(`${a}px`,r?l("Styles"):l("the section")),onReset:t})}function r1(){return h(oo,{children:sf()?l("The section is full width, so this card follows Styles \u25B8 Basics \u25B8 Corners."):l("Follows the section's Corners until you set a number here.")})}function a1(){return lf({sidesKey:"cardCornerSides",useFollowed:()=>xI(Ue),mark:h(t1,{label:Hn}),hint:h(r1,{})})}function n1(){return{type:"custom",render:()=>h(Mu,{})}}function QU(){return{_gShape:ve("Shape"),cardCorners:a1(),cardCornerSides:uI(),cardCornersApplyAll:n1()}}function JU(){return Qo("Justify",h(HP,{}),Ri,Ri[0].value)}function e$(){return Qo("Item alignment",h(NP,{}),Vm,"stretch")}function o$(){return Qo(Ym,h(pF,{}),Ai,Ai[0].value)}function t$(){return{type:"custom",render:({value:e,onChange:o})=>{let t=Pn.find(r=>r.value===e)??Pn[0];return h(re,{label:l(Bi),icon:h(Ux,{}),value:l(t.label),children:h(Jx,{className:"sf-gallery-layouts",label:l(Bi),value:t.value,onChange:o,options:Pn.map(r=>({value:r.value,label:l(r.label),picture:h("span",{className:"sf-gallery-pic",children:l1(r.weights).map((a,n)=>h("i",{style:{gridColumn:`span ${a}`}},n))})}))})})}}}function l1(e){if(!e)return[3,4];let o=e.reduce((t,r)=>t+r,0);return e.map(t=>Math.round(t/o*12))}function r$(){return Qo(Qm,h($x,{}),_i,_i[0].value)}function a$(){return or(Xm,h(nF,{}),Di,Zm,1,Di)}function n$(e){let o=cf(Um,rf("`Direction` names how a container's children run \u2014 a MODIFIER, not a thing. doc/naming.md N10.1 gives the idea a dash in its Glyph column; editor-shell's own `direction` meaning says the bare row is CORRECT and not an omission (SS seat, 2026-09-11)."),qm(e),Tn(e,void 0));return{type:"custom",render:t=>o.render({...t,value:Tn(e,t.value),onChange:r=>t.onChange(r)})}}function l$(e,o,t,r,a,n){return{type:"custom",render:({value:s,onChange:i})=>h(re,{label:l(e),icon:h(Ks,{noun:n}),action:h(Ee,{words:X()?.panel,label:l(e),changed:!px(s),detail:l("the Text style in Styles"),onReset:()=>i(ux),defaultAction:{onPress:()=>i(Rn),title:l("Keep this section's own built-in size"),icon:h(GP,{})}}),children:Ae({min:o,max:t,step:r,value:typeof s=="number"?s:a,suffix:"px",ariaLabel:e,onChange:i})})}}function s$(){return{_gCellWidth:ve("Cell width"),gridSpan:Qo("Positions",h(Ux,{}),[{label:"Auto",value:""},...Array.from({length:Ja},(e,o)=>({label:o===0?"1 position":`${o+1} positions`,value:String(o+1)}))],"")}}function vo(){let e=null;try{e=Kr(o=>o).selectedItem}catch{e=null}return e?.props??{}}function s1({min:e,max:o,step:t,px:r,label:a,onChange:n,desktopKey:s,fallback:i}){let f=vo()[s],d=cn(void 0,f,i);return h(oo,{children:Ae({min:e,max:o,step:t,value:cn(r,f,i),readout:!1,ariaLabel:a,notch:d,onChange:n})})}function i1({label:e,desktopKey:o,fallback:t,changed:r=!1,onReset:a=()=>{}}){let n=vo()[o],s=cn(void 0,n,t);return h(Ee,{words:X()?.panel,label:l(e),changed:r,detail:l("{value} on desktop",{value:`${s}px`}),onReset:a})}function f1(e){return dI(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:h(i1,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:o=>h(s1,{...o,desktopKey:e.desktopKey,fallback:e.fallback})})}function i$(e){return{type:"custom",render:({value:o,onChange:t})=>h(d1,{...e,value:o,onChange:t})}}function c1({label:e,icon:o,options:t,value:r,resolved:a,restWord:n,onChange:s}){let i=t.some(f=>f.value===r);return h(re,{label:l(e),icon:wo(o),action:h(Ee,{words:X()?.panel,label:l(e),changed:i,detail:l("{value} on desktop",{value:l(n)}),onReset:()=>s(void 0)}),children:Kn({options:t,value:i?r:a,onChange:f=>s(f),ariaLabel:e})})}function d1({label:e,icon:o,options:t,desktopKey:r,resolve:a,value:n,onChange:s}){let i=vo()[r],f=a(void 0,i),d=t.find(p=>p.value===f)?.label??"";return h(c1,{label:e,icon:o,options:t,value:n,resolved:f,restWord:d,onChange:s})}var u1={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},p1={Top:Yx,Bottom:jx,Left:Kx,Right:Vx},m1=e=>{let o=p1[e];return h(o,{})};function f$(e={}){let o=e.keys?.top??"sectionPaddingTop",t=e.keys?.bottom??"sectionPaddingBottom",r=e.group!==!1,a=v=>u1[v],n=v=>or(a("Top"),h(Yx,{}),Je.min,Je.max,Je.step,v,"px"),s=(v,k,C,g=Je)=>we("mobile",f1({label:a(v),icon:m1(v),desktopKey:k,min:g.min,max:g.max,step:g.step,fallback:C})),i=e.top??Je.min,f=e.bottom??Je.min,d="sectionPaddingLeft",p="sectionPaddingRight",m=e.sideBounds??Je,x=e.side??m.min,I=e.sidePhone??x,y=e.phone===!0,w=v=>y?we("desktop",v):v;return et({...r?{_gSpacing:ve("Padding")}:{},[o]:w(n(i)),...y?{[Ao(o)]:s("Top",o,i)}:{},...e.only==="top"?{}:{[t]:w(or(a("Bottom"),h(jx,{}),Je.min,Je.max,Je.step,f,"px")),...y?{[Ao(t)]:s("Bottom",t,f)}:{}},...e.sides?{[d]:w(or(a("Left"),h(Kx,{}),m.min,m.max,m.step,x,"px")),...y?{[Ao(d)]:s("Left",d,I,m)}:{},[p]:w(or(a("Right"),h(Vx,{}),m.min,m.max,m.step,x,"px")),...y?{[Ao(p)]:s("Right",p,I,m)}:{}}:{}})}var qr=["top","right","bottom","left"],x1={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},Mx=e=>typeof e=="number"?e:null;function I1(e,o,t){let r={};for(let a of qr)t[a]!==o[a]&&(r[e[a]]=t[a]??void 0);return r}function h1({tier:e,o}){let t=null;try{t=of()}catch{t=null}let r=t?.values??{},a=e==="mobile"?o.phoneKeys:o.keys,n=Object.fromEntries(qr.map(d=>[d,Mx(r[a[d]])])),s=Object.fromEntries(qr.map(d=>[d,String(e==="mobile"?Mx(r[o.keys[d]])??o.fallback[d]:o.fallback[d])])),[i,f]=jr(()=>yF(n,s));return h(re,{label:l("Padding"),icon:h(aF,{}),action:h(Zx,{each:i,label:l("Each side"),onChange:f}),children:h(gF,{label:l("Padding"),each:i,value:n,placeholder:s,min:o.min,max:o.max,step:o.step,onChange:d=>{let p=I1(a,n,d);Object.keys(p).length&&t?.onChangeMany(p)},words:{sides:{top:l("Padding top"),right:l("Padding right"),bottom:l("Padding bottom"),left:l("Padding left")},vertical:l("Top and bottom"),horizontal:l("Left and right"),unit:"px"}})})}function Un(e={}){let o={...x1,...e.keys},t={keys:o,phoneKeys:Object.fromEntries(qr.map(i=>[i,Ao(o[i])])),fallback:{top:0,right:0,bottom:0,left:0,...e.fallback},min:e.min??0,max:e.max??200,step:e.step??4},r=e.phone!==!1,a=i=>{let f={type:"custom",render:()=>h(h1,{tier:i,o:t})};return r?we(i,f):f},n=()=>Vr({type:"custom",render:()=>h(Dn,{})},"always"),s=qr.filter(i=>i!=="top");return et({...e.group===!1?{}:{_gSpacing:ve("Padding")},[t.keys.top]:a("desktop"),...r?{[t.phoneKeys.top]:a("mobile")}:{},...Object.fromEntries(s.map(i=>[t.keys[i],{...n(),reachedBy:t.keys.top}])),...r?Object.fromEntries(s.map(i=>[t.phoneKeys[i],we("mobile",n())])):{}})}var Hx=e=>typeof e=="number"?e:null;function g1(e,o,t){let r={};for(let a of["x","y"])t[a]!==o[a]&&(r[e[a]]=t[a]??void 0);return r}function y1({o:e}){let o=null;try{o=of()}catch{o=null}let t=o?.values??{},r={x:Hx(t[e.keys.x]),y:Hx(t[e.keys.y])},a=l(e.label??"Position"),n=!!(r.x||r.y),s=d=>{let p=g1(e.keys,r,d);Object.keys(p).length&&o?.onChangeMany(p)},i=h(FF,{label:a,value:r,onChange:s,words:{x:l("Left and right"),y:l("Up and down"),unit:"px"},placeholder:{x:"0",y:"0"},min:e.min,max:e.max,step:e.step??1}),f=h(Ee,{words:X()?.panel,label:a,changed:n,detail:"0 px, 0 px",onReset:()=>s({x:null,y:null})});return e.label===null?Do("div",{className:"sf-position-line",children:[i,f]}):h(re,{label:a,icon:h(rF,{}),changed:n,action:f,children:i})}function c$(e){return{[e.keys.x]:{type:"custom",render:()=>h(y1,{o:e})},[e.keys.y]:{...Vr({type:"custom",render:()=>h(Dn,{})},"always"),reachedBy:e.keys.x}}}var b1={contained:"Contained",page:"Page",full:"Full"},Bn="Width";function $n(e,o=yx,t=!0){let r=o.map(a=>({label:er[a]??b1[a],value:a}));return et({...t?{_gWidth:ve(Bn)}:{},widthMode:{type:"custom",render:({onChange:a,field:n})=>h(re,{label:l(Bn),icon:h(uF,{}),action:t?h(MF,{inherited:n?.inherited??!1,onReset:()=>a($i),label:Bn}):void 0,children:Kn({options:r,value:n?.currentValue||e,onChange:a,ariaLabel:Bn})})}})}function qn(){let e=r=>({type:"custom",render:({value:a,onChange:n})=>h(re,{label:Zt,icon:wo(h(eF,{})),action:r?r(n):void 0,children:Kn({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(a)?a:"auto",onChange:n,ariaLabel:Zt})})}),o=()=>({type:"custom",render:({value:r,onChange:a,field:n})=>{let s=n?.unit==="%"?"%":"px",i=s==="%"?Fi:Pi;return h("div",{className:"sf-field",children:Ae({min:i.min,max:i.max,step:i.step,value:typeof r=="number"?r:i.fallback,suffix:s,ariaLabel:Zt,onChange:a})})}}),t=()=>cf("Unit",h(qx,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return et({_gHeight:ve(Zt),sectionHeightMode:we("desktop",e()),sectionHeightValue:we("desktop",o()),sectionHeightUnit:we("desktop",t()),sectionHeightModePhone:we("mobile",e(r=>h(S1,{onClear:()=>r(void 0)}))),sectionHeightValuePhone:we("mobile",o()),sectionHeightUnitPhone:we("mobile",t())})}function S1({onClear:e}){let o=vo(),t=Ei(o),r=vn(o),a=l("{value} on desktop",{value:r.mode==="auto"?l("Auto"):`${r.value}${r.unit}`});return h(Ee,{words:X()?.panel,label:l(Zt),changed:t,detail:a,onReset:e})}function ff(){let e=t=>({type:"custom",render:({value:r,onChange:a,id:n,name:s})=>h(C1,{value:r,onChange:a,labelId:`${n??s??"stickTop"}-label`,phone:t})}),o=()=>({type:"custom",render:({value:t,onChange:r})=>h("div",{className:"sf-field",children:Ae({min:Vo.min,max:Vo.max,step:Vo.step,value:typeof t=="number"?t:Vo.fallback,suffix:"px",ariaLabel:l("Distance from top"),onChange:r})})});return{_gStick:ve(kn),stickTop:we("desktop",e(!1)),stickTopDistance:we("desktop",o()),stickTopPhone:we("mobile",e(!0)),stickTopDistancePhone:we("mobile",o())}}function C1({value:e,onChange:o,labelId:t,phone:r}){let a=vo(),n=Li(a),s=r?n.phone:e===!0;return h(re,{label:l(kn),labelId:t,icon:wo(h(iF,{})),action:Do(oo,{children:[r?h(Ee,{words:X()?.panel,label:l(kn),changed:Oi(a),detail:l("{value} on desktop",{value:n.desktop?`${n.desktopDistance}px`:l("Off")}),onReset:()=>o(void 0)}):null,h(Qx,{checked:s,onChange:o,ariaLabelledBy:t})]})})}var Wx="e.g. about";function jn(){return{_gAnchor:ve("Anchor"),anchor:Ft({control:"plainText",label:"Name",placeholder:Wx},{type:"custom",render:({value:e,onChange:o})=>h(lp,{value:e,onChange:o,nameBox:(t,r)=>h(Pt,{value:t,onChange:r,label:"Name",placeholder:Wx,hideable:!1,markup:!1})})})}}function d$(e,o,t){return{type:"custom",render:({value:r,onChange:a,id:n,name:s})=>{let i=`${n??s??e}-datetime`,f=Date.parse(typeof r=="string"?r:"");return h(re,{label:l(e),icon:o,htmlFor:i,hint:t===void 0?void 0:l(t),children:h(PF,{id:i,value:Number.isFinite(f)?new Date(f):null,onChange:d=>a(d?d.toISOString():"")})})}}}function kt(e,o,t){return{type:"custom",...Zo({},{...ef,label:e}),render:({value:r,onChange:a,id:n,name:s})=>{let i=typeof r=="boolean"?r:o,f=`${n??s??e}-label`;return h(re,{label:l(e),labelId:f,icon:t,action:h(Qx,{checked:i,onChange:a,ariaLabelledBy:f})})}}}function u$(){return{type:"custom",render:({value:e,onChange:o,id:t,name:r})=>{let a=`${String(t??r??"pageBackground")}-colour`;return h(qe,{label:l("Background"),icon:h(Xx,{}),id:a,value:Vs(e),onChange:o})}}}var p$={follows:"fill"},m$={follows:"ink"};function x$(e,o,t){if(typeof o!="string"){let r=o.follows;return{type:"custom",render:({value:a,onChange:n})=>h(w1,{label:e,part:r,icon:t,value:a,onChange:n})}}return{type:"custom",render:({value:r,onChange:a})=>h(qe,{label:l(e),icon:t,value:r||o,onChange:a})}}function w1({label:e,part:o,icon:t,value:r,onChange:a}){let n=lu(V().theme),s=o==="fill"?n.fill:n.ink;return h(sn,{label:l(e),icon:t,value:r||"",inherited:s,resetTo:Tt(s.toUpperCase(),l("Styles")),onChange:a,onReset:()=>a("")})}var v1=[{value:"0% 0%",label:"Top left"},{value:"50% 0%",label:"Top"},{value:"100% 0%",label:"Top right"},{value:"0% 50%",label:"Left"},{value:"50% 50%",label:"Center"},{value:"100% 50%",label:"Right"},{value:"0% 100%",label:"Bottom left"},{value:"50% 100%",label:"Bottom"},{value:"100% 100%",label:"Bottom right"}];function II({label:e,value:o,onChange:t,points:r=v1}){let a=r.map(n=>({...n,label:l(n.label),...n.title?{title:l(n.title)}:null}));return h(kF,{label:l(e),value:o,points:a,onChange:t})}function I$(){return Vr({type:"custom",render:()=>h(Dn,{})},"always")}var k1=Gs([]);function h$(e,{stacking:o,fallback:t=en}){return{type:"custom",render:({value:r,onChange:a})=>{let n=$o.includes(r)?r:t;return o?h(T1,{label:e,value:n,onChange:a}):hI({label:e,value:n,onChange:a,points:k1})}}}function T1({label:e,value:o,onChange:t}){let{appState:r,selectedItem:a}=Kr(i=>i),n=a?.props?.id?String(a.props.id):void 0,s=n?$s(r?.data,n):[];return hI({label:e,value:o,onChange:t,points:Gs(s,n)})}function hI({label:e,value:o,onChange:t,points:r}){let a=r.find(n=>n.disabled);return h(re,{label:l(e),icon:h(lF,{}),hint:a?.title?l(a.title):void 0,children:II({label:e,value:ut(o),onChange:t,points:r})})}var g$={top:h(YP,{}),right:h(VP,{}),bottom:h(jP,{}),left:h(KP,{})};function y$(e,o,t,r,a,n){let s=p=>o.find(m=>m.value===p),i=p=>({value:p,label:"",disabled:!0,title:r}),f=p=>{let m=o.find(I=>I.cell===p);if(!m)return i(`missing-${p}`);let x=n?.[p];return x?{value:m.value,label:m.label,icon:x}:{value:m.value,label:m.label}},d=[i("corner-top-left"),f("top"),i("corner-top-right"),f("left"),i("centre"),f("right"),i("corner-bottom-left"),f("bottom"),i("corner-bottom-right")];return{type:"custom",render:({value:p,onChange:m})=>{let x=o.some(I=>I.value===p)?p:t;return h(re,{label:l(e),icon:a,value:s(x)?.label?l(s(x).label):"",children:II({label:e,value:x,onChange:m,points:d})})}}}var P1="\0note";function Qo(e,o,t,r,a){return{type:"custom",options:t,fallback:r,...a?{note:a}:{},...Zo({},{type:"select",label:e}),render:({value:n,onChange:s,field:i})=>{let f=i.options??t,d=i.fallback??r,p=f.some(m=>m.value===n)?n:d;return h(re,{label:l(e),icon:wo(o),children:h(CF,{value:p,ariaLabel:l(e),onChange:s,options:[...a?[{label:l(a),value:P1,disabled:!0}]:[],...f.map(m=>({label:l(m.label),value:m.value}))]})})}}}function b$(e,o,t){return{type:"custom",options:o,render:({value:r,onChange:a,field:n})=>h($p,{label:e,options:(n.options??o).map(s=>({...s,label:l(s.label)})),value:Array.isArray(r)?r:[],onChange:a,...t?{emptyLabel:l(t)}:{}})}}function S$(e,o={}){return{type:"custom",render:({value:t,onChange:r})=>{let a={value:t,onChange:r,...o};return h(e,{...a})}}}function Kn({options:e,value:o,onChange:t,ariaLabel:r,disabled:a=!1}){return h(hF,{options:e.map(n=>n.picture?{id:n.value,label:n.picture,title:l(n.title??n.label)}:{id:n.value,label:l(n.label),title:n.title===void 0?void 0:l(n.title)}),value:o,onChange:t,ariaLabel:l(r),disabled:a})}var C$=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function cf(e,o,t,r){let a=t.map(n=>typeof n=="string"?{label:n,value:n}:n);return{type:"custom",...Zo({},{type:"radio",label:e,options:a.map(n=>({value:n.value,label:n.label}))}),render:({value:n,onChange:s,field:i})=>h(re,{label:l(e),icon:wo(o),children:Kn({options:a,value:a.some(f=>f.value===n)?n:n||i?.currentValue||r,onChange:s,ariaLabel:e})})}}function w$(e,o,t,r={}){return{type:"custom",[BP]:!0,render:({value:a,onChange:n})=>h(Gp,{value:a||"",onChange:n,label:e,accept:o,placeholder:t,focusKey:r.focus,focusWhen:r.focusWhen})}}function v$({value:e,onChange:o,label:t}){let r=e||{},a=!!r.pending,n=a?"var(--fg-dim, #888)":r.ok?"#1d9e75":"#d85a30",s=!!Se(AF()).geocode,i=(f,d)=>o({...r,[f]:d===""?void 0:Number(d)});return Do(re,{label:l(t),icon:h(Zi,{}),children:[s&&Do(oo,{children:[h("button",{type:"button",disabled:a,onClick:()=>o({...r,pending:!0,ok:!1,status:"Finding\u2026"}),style:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:6,padding:"8px 10px",fontSize:13,cursor:a?"default":"pointer",opacity:a?.6:1,border:"1px solid var(--border-strong, #ccc)",borderRadius:6,background:"transparent",color:"inherit"},children:a?l("Finding\u2026"):l("Find coordinates")}),r.status&&h("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:n},children:l(r.status)}),h("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:l("Coordinates from OpenStreetMap")})]}),h("button",{type:"button",onClick:()=>o({...r,manual:!r.manual}),style:{marginTop:8,padding:0,border:"none",background:"none",font:"inherit",fontSize:12,color:"var(--sf-accent, #2563eb)",cursor:"pointer",textDecoration:"underline"},children:r.manual?l("Hide manual coordinates"):l("Enter coordinates manually")}),r.manual&&Do("div",{style:{marginTop:8,display:"grid",gap:8},children:[h(re,{label:l("Latitude"),icon:h(Zi,{}),children:h("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"34.0990198"}),value:typeof r.lat=="number"?r.lat:"",onChange:f=>i("lat",f.target.value)})}),h(re,{label:l("Longitude"),icon:h(Zi,{}),children:h("input",{type:"number",step:"any",placeholder:l("e.g. {example}",{example:"-117.9842833"}),value:typeof r.lng=="number"?r.lng:"",onChange:f=>i("lng",f.target.value)})})]})]})}function F1(e,o){return o===null||o<0||o>=e.length?"":e[o]?.text??""}function E1(e,o,t){let r=e.map(a=>({text:a?.text??""}));return o===null||o<0||o>=e.length?r:r.map((a,n)=>n===o?{text:t}:a)}function O1(e,o,t){if(t===null||t>=o.length)return null;for(let r=0;r<t;r+=1)if(e[r]!==o[r])return null;return e[t]!==o[t]&&o.includes(e[t])||e[t]!==o[t]&&o.length!==e.length?null:t}var df={label:"Ticker items",icon:h(tF,{})};function k$(e,o,t,r){return{type:"custom",[_o]:{control:"textList",label:e,placeholder:t,itemKey:"text",rendering:r},...Zo({},{...aI.textList,label:e}),render:({value:a,onChange:n})=>h(uf,{label:e,icon:wo(o),items:Array.isArray(a)?a:[],placeholder:t,onChange:n,markup:r==="markup"})}}function uf({label:e,icon:o,items:t,placeholder:r,onChange:a,markup:n=!1}){let s=Ji(null),[i,f]=jr(null),d=m=>m.map(x=>({text:x?.text??""})),p=m=>{let x=O1(t,m,i);x===null&&(s.current=null),f(x),a(d(m))};return h(wF,{label:l(e),icon:o,noun:l("item"),items:t,onChange:p,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:n?h(ri,{target:s,value:F1(t,i),onChange:m=>a(E1(t,i??-1,m)),disabled:i===null,label:i===null?l("Formatting \u2014 click a row first"):l("Formatting \u2014 row {n}",{n:i+1})}):void 0,renderRow:(m,x,I)=>h("input",{type:"text",className:n&&i===x?"sf-list-marking":void 0,value:m?.text??"",placeholder:l(r),"aria-label":l("{label} {n}",{label:l(e),n:x+1}),onChange:y=>I({text:y.target.value}),onFocus:y=>{s.current=y.currentTarget,f(x)}})})}function gI(e,o){let t=`${e.label} \u2014 row ${o+1}`;return Ft({control:"plainText",label:t,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:r,onChange:a})=>h(Pt,{value:r,onChange:a,label:l("{label} \u2014 row {n}",{label:l(e.label),n:o+1}),placeholder:e.placeholder,hideable:!1,markup:e.rendering==="markup"})})}function yI(e){return{_gCards:ve("Cards"),coverIndex:Qo("Cover image",h(oF,{}),Np,String(1),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:jF("Image background",Ln),cardImage:R1(),spinOnHover:kt("Rotate on hover",e?.spinDefault??!0,h(fF,{}))}}function bI(){return{outline:Qo("Card outline",h(cF,{}),ci,ii),indexBadge:Qo("Card number",h(qx,{}),fi,si),showBadge:kt("Product badge",!0,h(Ks,{noun:"tag"}))}}function SI(e){let o=e&&"bottomDefault"in e?e.bottomDefault:!0,t=e&&"defaults"in e?e.defaults:{showCardSizes:o,showCardBuy:o,showCardPage:o};return{_gShowOnCard:ve("Show on a card"),showCardPrice:kt("Price",!0,h(XP,{})),showCardFinishes:kt("Finish swatches",!0,h(ZP,{})),showCardSizes:kt("Sizes",t.showCardSizes,h(sF,{})),showCardBuy:kt("Buy button",t.showCardBuy,h(UP,{})),showCardPage:kt("Page button",t.showCardPage,h(Xx,{}))}}function T$(e,o="display"){let t=Ao(o);return{[o]:we("desktop",{type:"custom",render:({value:r,onChange:a})=>h(CI,{parts:e,changed:mp(r),shown:n=>ln(r,n),onPress:(n,s)=>a(Ip(r,n,s)),onReset:()=>a(void 0)})}),[t]:we("mobile",{type:"custom",render:({value:r,onChange:a})=>h(L1,{parts:e,desktopKey:o,value:r,onChange:a})})}}function CI({parts:e,changed:o,shown:t,onPress:r,onReset:a,detail:n}){let s=l("Display");return h(re,{label:s,icon:h(MP,{}),changed:o,action:h(Ee,{words:X()?.panel,label:s,changed:o,detail:n,onReset:a}),children:h(vF,{label:s,items:e.map(i=>({id:i.id,label:l(i.label),shown:t(i.id)})),onChange:r})})}function L1({parts:e,desktopKey:o,value:t,onChange:r}){let a=vo()[o];return h(CI,{parts:e,changed:xp(t),shown:n=>ei(a,t,n),onPress:(n,s)=>r(hp(t,n,s)),onReset:()=>r(dn),detail:l("the same as Desktop")})}function R1(){return dI("Card image",{min:Ue,max:ft,step:Hu,hint:"Rounds the picture. The card's own corner is in Styles."})}function P$(){return lf({sidesKey:"cornerSides",step:Wu,useFollowed:()=>Ue,mark:h(A1,{label:zu}),hint:l("Rounds the picture. Left alone it stays square.")})}function A1({label:e,changed:o=!1,onReset:t=()=>{}}){return h(Ee,{words:X()?.panel,label:l(e),changed:o,onReset:t})}function F$(){return{type:"custom",render:({value:e,onChange:o})=>h(B1,{value:typeof e=="string"?e:"",onChange:o})}}function B1({value:e,onChange:o}){let[t,r]=jr(null),a=Ms.filter(s=>t===null||Ro[s].across===t),n=e&&e in Ro?Ro[e]:null;return Do(oo,{children:[h(re,{label:l("Photos in a row"),icon:h($P,{}),children:Do("div",{className:"sf-gallery-filter",children:[h("button",{type:"button","aria-pressed":t===null,onClick:()=>r(null),children:l("All")}),Uu.map(s=>h("button",{type:"button","aria-pressed":t===s,onClick:()=>r(s),children:s},s))]})}),h(re,{label:l("Layout"),icon:h(QP,{}),value:n?l(n.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:a.length,total:Ms.length}),children:h(Jx,{className:"sf-gallery-layouts",label:l("Layout"),value:e,onChange:o,onClear:()=>o(""),options:a.map(s=>({value:s,label:l(Ro[s].label),picture:h("span",{className:"sf-gallery-pic",children:Ro[s].desktop.map(([i,f],d)=>h("i",{style:{gridColumn:`span ${i}`,gridRow:`span ${f}`}},d))})}))})})]})}import{jsx as Vn,Fragment as D1,jsxs as wI}from"react/jsx-runtime";import{Button as vI,Dialog as _1}from"efficient-shell/ui";function N1(e){return $e("This site has {n} color theme of its own. Clearing takes them away and puts back the four the shop supplies.","This site has {n} color themes of its own. Clearing takes them away and puts back the four the shop supplies.",e)}function kI({count:e,onCancel:o,onConfirm:t}){return wI(_1,{open:!0,onClose:o,role:"alertdialog",size:"sm",title:l("Clear this site\u2019s colors?"),footer:wI(D1,{children:[Vn(vI,{variant:"secondary",onClick:o,children:l("Cancel")}),Vn(vI,{variant:"danger",onClick:t,children:l("Clear colors")})]}),children:[Vn("p",{children:N1(e)}),Vn("p",{className:"mt-2 font-medium",children:l("This cannot be undone.")})]})}var U1=rf("the row's whole content is an action; the gutter names a subject and this row has none \u2014 the button's label is the name GG, 2026-09-23"),$1="Reset color",q1={selected:0,themes:[]};function j1(e){e(q1)}function FI({value:e,onChange:o}){let t=e?.themes??[],r=t.length===0,a=He(e),[n,s]=PI(!1),i=z1(),[f,d]=PI(null),p=(k,C)=>{o({...a,themes:a.themes.map((g,b)=>b===k?C:g)})},m=Gt(a).accent,x=new Set(a.themes.map(k=>k.brandInk).filter(Boolean)),I=tu.filter(k=>!x.has(k)).map(k=>ru(m,k)),y=[...a.themes,...I],w=k=>{if(k<a.themes.length)return o({...a,selected:k});let C=[...a.themes,y[k]];o({...a,themes:C,selected:C.length-1})},v=()=>{let k=[...a.themes,{...Io(a.themes[a.selected])}];o({...a,themes:k,selected:k.length-1}),d(k.length-1)};return TI(M1,{children:[r?null:tr(W1,{label:l($1),icon:wo(U1),labelId:"sf-theme-reset",action:tr(H1,{label:l("all theme colors"),words:i.panel,changed:!0,onReset:()=>s(!0)})}),n&&tr(kI,{count:t.length,onCancel:()=>s(!1),onConfirm:()=>{s(!1),j1(o)}}),tr("div",{className:"sf-theme-list",role:"radiogroup","aria-label":l("Theme"),children:y.map((k,C)=>tr(xn,{index:C,colors:k,selected:C===a.selected,open:f===C&&C<a.themes.length,editable:C<a.themes.length,onPick:()=>w(C),onEdit:()=>d(g=>g===C?null:C),onChangeColors:g=>p(C,g)},C))}),TI("button",{type:"button",onClick:v,className:"sf-theme-add",children:[tr(G1,{size:12}),l("Add new theme")]})]})}import{jsx as Yn}from"react/jsx-runtime";import{SettingsDefaultReset as K1,SettingsField as V1}from"efficient-easel/panel";import{SquareIcon as Y1}from"efficient-easel/icons";var X1="Applies to panels, cards, inputs and buttons. Round things \u2014 color swatches, switches, status dots \u2014 stay round.",pf="Corners";function EI({value:e,onChange:o,showHint:t=!0}){let r=e===null;return Yn(V1,{label:l(pf),icon:Yn(Y1,{}),value:r?l("Default"):`${e}px`,changed:!r,action:Yn(K1,{words:X()?.panel,label:l(pf),changed:!r,detail:l("the built-in corners"),onReset:()=>o(null)}),hint:t?l(X1):void 0,children:Yn(Ae,{min:Ue,max:ft,step:1,value:e??Ue,readout:!1,ariaLabel:l(pf),onChange:o})})}import{jsx as Yr}from"react/jsx-runtime";import{SettingsDefaultReset as Z1,SettingsField as Q1,SettingsSegmented as J1}from"efficient-easel/panel";import{ShadowIcon as eE}from"efficient-easel/icons";var mf={none:"None",soft:"Soft",lifted:"Lifted"},oE="Applies to cards \u2014 products, brands, journal entries and filter cells. Round things like swatches and status dots are never shadowed.",tE={none:"none",soft:"0 1px 1px rgba(20, 20, 22, 0.10), 0 2px 4px -1px rgba(20, 20, 22, 0.14)",lifted:"0 1px 2px rgba(20, 20, 22, 0.10), 0 4px 7px -2px rgba(20, 20, 22, 0.30)"},rE={labelsPx:90.25,widestLabelPx:34.6};function OI({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??Fs;return Yr(Q1,{label:l("Card shadow"),icon:Yr(eE,{}),value:l(mf[a]),changed:!r,action:Yr(Z1,{words:X()?.panel,label:l("Card shadow"),changed:!r,detail:l(mf[Fs]),onReset:()=>o(null)}),hint:t?l(oE):void 0,children:Yr(J1,{options:uu.map(n=>({id:n,label:l(mf[n]),icon:Yr("span",{className:"sf-shadow-chip",style:{boxShadow:tE[n]}})})),value:a,ariaLabel:l("Card shadow"),fit:rE,onChange:o})})}import{jsx as LI}from"react/jsx-runtime";import{ShadowIcon as aE}from"efficient-easel/icons";var nE="Most useful on a dark theme, where a black shadow cannot be seen. Also used by the Lift hover, even with the card shadow off.";function RI({value:e,onChange:o,showHint:t=!0}){let r=e===null;return LI(sn,{label:l("Shadow color"),icon:LI(aE,{}),value:e??"",inherited:Os,resetTo:Os,onChange:o,onReset:()=>o(null),hint:t?l(nE):void 0})}import{jsx as Xn}from"react/jsx-runtime";import{SettingsDefaultReset as lE,SettingsField as sE}from"efficient-easel/panel";import{AlignSeparateIcon as iE}from"efficient-easel/icons";var fE="The space between the blocks inside a row, a grid or a box. Default means each one keeps the spacing it already has.",xf="Block gap",cE=Qt.Grid;function AI({value:e,onChange:o,showHint:t=!0}){let r=e===null;return Xn(sE,{label:l(xf),labelId:"sf-block-gap",icon:Xn(iE,{}),value:r?l("Default"):`${e}px`,changed:!r,action:Xn(lE,{words:X()?.panel,label:l(xf),changed:!r,detail:l("each block's own spacing"),onReset:()=>o(null)}),hint:t?l(fE):void 0,children:Xn(Ae,{min:vt.min,max:vt.max,step:vt.step,value:r?cE:e,readout:!1,ariaLabel:l(xf),onChange:o})})}import{jsx as Zn}from"react/jsx-runtime";import{SettingsDefaultReset as dE,SettingsField as uE,SettingsSegmented as pE}from"efficient-easel/panel";import{HoverIcon as mE}from"efficient-easel/icons";var If={none:"None",lift:"Lift",highlight:"Highlight"},xE="What a card does when a shopper points at it \u2014 or taps it, on a phone. Highlight is the effect your cards already use.";function BI({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??Es;return Zn(uE,{label:l("Hover effect"),icon:Zn(mE,{}),value:l(If[a]),changed:!r,action:Zn(dE,{words:X()?.panel,label:l("Hover effect"),changed:!r,detail:l(If[Es]),onReset:()=>o(null)}),hint:t?l(xE):void 0,children:Zn(pE,{options:pu.map(n=>({id:n,label:l(If[n])})),value:a,ariaLabel:l("Hover effect"),onChange:o})})}import{jsx as Qn}from"react/jsx-runtime";import{SettingsDefaultReset as IE,SettingsField as hE,SettingsSegmented as gE}from"efficient-easel/panel";import{DropIcon as yE}from"efficient-easel/icons";var hf="Photography",DI={shot:"As shot",mono:"Black and white"},gf=[{grayscale:!1,label:DI.shot},{grayscale:!0,label:DI.mono}],bE="Black and white photographs return to color on hover. Wheels and tyres keep their real finish either way.";function _I({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??!1;return Qn(hE,{label:l(hf),icon:Qn(yE,{}),value:l(gf.find(n=>n.grayscale===a).label),changed:!r,action:Qn(IE,{words:X()?.panel,label:l(hf),changed:!r,detail:l(gf.find(n=>!n.grayscale).label),onReset:()=>o(null)}),hint:t?l(bE):void 0,children:Qn(gE,{options:gf.map(n=>({id:n.grayscale,label:l(n.label)})),value:a,ariaLabel:l(hf),onChange:o})})}import{jsx as yf}from"react/jsx-runtime";import{useId as SE}from"react";import{SettingsField as CE,SettingsSwitch as wE}from"efficient-easel/panel";import{ShareIcon as vE}from"efficient-easel/icons";var kE="Share button",TE="On every blog post.";function NI({value:e,onChange:o,showHint:t=!0}){let r=SE();return yf(CE,{label:l(kE),labelId:r,icon:yf(vE,{}),action:yf(wE,{checked:e===!0,onChange:o,ariaLabelledBy:r}),hint:t?l(TE):void 0})}import{jsx as Jn}from"react/jsx-runtime";import{SettingsDefaultReset as PE,SettingsField as FE}from"efficient-easel/panel";import{PaddingXIcon as EE}from"efficient-easel/icons";var bf="Side space",Sf=Co.default,OE="The room left at the left and right edge of every page.";function MI({value:e,onChange:o,showHint:t=!0}){let r=e===null;return Jn(FE,{label:l(bf),labelId:"sf-side-space",icon:Jn(EE,{}),value:`${e??Sf}px`,changed:!r,action:Jn(PE,{words:X()?.panel,label:l(bf),changed:!r,detail:`${Sf}px`,onReset:()=>o(null)}),hint:t?l(OE):void 0,children:Jn(Ae,{min:Co.min,max:Co.max,step:Co.step,value:e??Sf,readout:!1,ariaLabel:l(bf),onChange:o})})}import{jsx as Cf}from"react/jsx-runtime";import{BACKGROUND_WIDTHS as U7,SettingsBackgroundWidth as LE,SettingsContentWidth as RE}from"efficient-easel/panel";var HI="Width",AE="Background width",BE="Content width";var el=e=>l(er[e==="content"?"page":"full"]),DE=400,WI="Content cannot be wider than the background.",zI="The width of every section's background, until the section sets its own.",GI="The width of every section's content, until the section sets its own.",UI="On phones, content always fills the screen.";function ol({value:e,changed:o,detail:t,onChange:r,onReset:a,disabled:n=!1,hint:s,labelId:i}){return Cf(LE,{value:e,changed:o,detail:t,onChange:r,onReset:a,disabled:n,hint:s?l(s):void 0,labelId:i,words:{label:l(AE),full:el("full"),content:el("content")},resetWords:X()?.panel})}function tl({mode:e,px:o,max:t=pe.max,min:r=DE,changed:a,detail:n,onMode:s,onPx:i,onReset:f,fullClosed:d=!1,disabled:p=!1,hint:m,labelId:x}){let I=l(BE),y=e!=="full"?Cf(Ae,{min:r,max:t,step:pe.step,value:Math.min(Math.max(o,r),t),onChange:i,suffix:"px",ariaLabel:I,disabled:p}):null;return Cf(RE,{mode:s?e:void 0,onMode:s,number:y,changed:a,detail:n,onReset:f,fullClosed:d,disabled:p,hint:m?l(m):void 0,labelId:x,words:{label:I,full:el("full"),content:el("content")},resetWords:X()?.panel})}import{jsx as Oh}from"react/jsx-runtime";import{TextStyleItem as VO,TextStylesGroup as YO}from"efficient-easel/text-styles";import{jsx as GO}from"react/jsx-runtime";import{useState as UO}from"react";import{TextStylesList as $O}from"efficient-easel/text-styles";import{usePreviewDevice as qO}from"efficient-easel/draw/client";import{defaultTextStyles as _O,textStyleCaseCss as NO}from"efficient-easel/text-styles/model";import{textStyleCaseCss as jE,textStyleCaseOfCss as KE}from"efficient-easel/draw";function wf(e,o){return o?`${e}[${o.index}].${o.rowKey}`:e}function to(e){let o=/^([A-Za-z0-9_$]+)\[(\d+)\]\.([A-Za-z0-9_$]+)$/u.exec(e);return o?{key:o[1],row:{index:Number(o[2]),rowKey:o[3]}}:{key:e,row:null}}import{decodePartId as sl,encodePartId as il}from"efficient-easel/draw";import{LINK_FIELD_MARKER as JI,SCAFFOLD_FIELD_MARKER as ZI,TEXT_FIELD_MARKER as fl}from"efficient-easel/draw";import{readHidable as eh}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as GE}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as zE}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as $I}from"efficient-easel/draw";import{readHidable as qI}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as _E}from"efficient-easel/draw";var NE=_E,ME=["text","textarea"],HE=["textarea","plainTextarea"];function WE(e){return!e||typeof e!="object"?null:e[$I]?.control??null}function rr(e){let o=WE(e);return o&&NE.includes(o)?o:null}function rl(e){return HE.includes(e)}function jI(e){return!e||typeof e!="object"?void 0:e[$I]?.placeholder}function al(e){return qI(e).text}function vf(e,o,t){return ME.includes(e)?{text:t,hidden:qI(o).hidden}:t}function KI(e,o,t,r){return al(e[o])===r?null:{...e,[o]:vf(t,e[o],r)}}function nl(e){if(!(!e||typeof e!="object"))return e[zE]}function kf(e){if(!e||typeof e!="object")return null;let o=e.arrayFields;return o&&typeof o=="object"?o:null}function VI(e,o){if(!Array.isArray(o))return[];let t=nl(e),r=[];if(t?.control==="textList"){let n=t.itemKey??"text";return o.forEach((s,i)=>{let f=s?.[n];typeof f=="string"&&f&&r.push({row:{index:i,rowKey:n},text:f})}),r}let a=kf(e);return a?(o.forEach((n,s)=>{for(let[i,f]of Object.entries(a)){if(!rr(f))continue;let d=al(n?.[i])||nl(f)?.placeholder||"";d&&r.push({row:{index:s,rowKey:i},text:d})}}),r):[]}function Xr(e,o){if(Array.isArray(e))return e[o.index]?.[o.rowKey]}function Tf(e,o,t,r){let a=e[o];return!Array.isArray(a)||t.index<0||t.index>=a.length?null:{...e,[o]:a.map((n,s)=>s===t.index?{...n,[t.rowKey]:r}:n)}}function YI(e,o,t,r,a){let n=Xr(e[o],t);return al(n)===a?null:Tf(e,o,t,vf(r,n,a))}function XI(e,o){return o?`${e} \xB7 row ${o.index+1}`:e}var ro="data-sf-part",uq="data-sf-region-part",pq="data-sf-part-row";function mq(e,o){return`${e}[${o}]`}var Be="data-sf-part-selected",xq="data-sf-part-kind",UE="data-sf-part-style-owner",$E="data-sf-part-style-kind";function Iq(e){for(let o=e;o;o=o.parentElement){let t=o.getAttribute(UE),r=o.getAttribute($E);if(t&&r)return{owner:t,kind:r};if(o.getAttribute("data-puck-component"))return null}return null}var QI=2;function oh(e,o){if(!e)return!1;let t=sl(e);return!!t?.propKey&&t.nodeId===o}function ar(e){return ht(e).replace(/\s+/gu,"")}function ll(e,o,t){let r=e[fl];if(r){if(r.control==="textList"){let n=r.itemKey??"text";if(!Array.isArray(o))return;for(let s of o){let i=s?.[n];typeof i=="string"&&t.push(i)}return}let{text:a}=eh(o);a?t.push(a):r.placeholder&&t.push(r.placeholder);return}if(!e[JI]){if(e.type==="text"||e.type==="textarea"){typeof o=="string"&&o&&t.push(o);return}if(e.arrayFields&&Array.isArray(o)){for(let a of o)for(let[n,s]of Object.entries(e.arrayFields))ll(s,a?.[n],t);return}if(e.objectFields&&o&&typeof o=="object")for(let[a,n]of Object.entries(e.objectFields))ll(n,o[a],t)}}function th(e){if(!e||typeof e!="object")return!1;let o=e;return o[JI]?!1:!!o[fl]||o.type==="text"||o.type==="textarea"}function cl(e,o){let t=e[fl];return t?.label?t.label:typeof e.label=="string"?e.label:o}function Pf(e){let o=e.indexOf(" (");return(o>0?e.slice(0,o):e).trim()}function hq(e,o){if(!e)return[];let t=[];for(let[r,a]of Object.entries(e)){if(!a||typeof a!="object"||Mr(r))continue;let n=a,s=[];ll(n,o?.[r],s),!s.length&&n[ZI]!==void 0&&ll(n,n[ZI],s);let i=cl(n,r),f=new Set;for(let{row:m,text:x}of VI(n,o?.[r])){let I=ar(x);I.length<QI||(f.add(I),t.push({key:r,label:i,texts:[I],row:m}))}let d=new Set(f),p=[];for(let m of s){let x=ar(m);x.length<QI||d.has(x)||(d.add(x),p.push(x))}p.length&&t.push({key:r,label:i,texts:p})}return t}var qE=GE;function rh(e,o){if(!o||typeof o!="object"||Mr(e)||Rp(o))return null;let t=o[fl];return!t||!qE.includes(t.control)?null:t}function gq(e,o){let t=rh(e,o);return t!==null&&t.identifier!==!0}function ah(e,o){if(!e)return[];let t=[];for(let[r,a]of Object.entries(e)){let n=rh(r,a);if(!n)continue;let{text:s,hidden:i}=eh(o?.[r]),f=s||n.placeholder||"",d=ht(f).replace(/\s+/gu," ").trim();t.push({key:r,label:Pf(cl(a,r)),preview:d,offPage:n.offPage===!0,identifier:n.identifier===!0,hidden:!!i})}return t}var Of="_partStyles",VE="data-sf-part-styled",dl="data-sf-text-style",YE=/^(heading|body)-[1-7]$/;function nr(e){return typeof e=="string"&&YE.test(e)}var pl={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function XE(e){if(!e)return null;for(let[o,t]of Object.entries(pl))if(t===e)return o;return null}function uh(e){if(nr(e.textStyle))return e.textStyle;let o=e.role&&Oo.includes(e.role)?e.role:null;return o?pl[o]:void 0}var ZE=[400,500,600,700],ph=["left","center","right","justify"],nh=5,lh=1e3,QE=-5,JE=10,Rf=0,Af=64,Bf=2,Df=120,ot=1280,_f=10,sh={size:{min:nh,max:lh,step:1},sizePhone:{min:nh,max:lh,step:1},padding:{min:Rf,max:Af,step:Bf},width:{min:Df,max:ot,step:_f}},eO=.05,oO=.01,tO=["line","letter"],rO=.5,aO=2.5,nO=-1,lO=1,sO=0,iO=400;function Qr(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function mh(e){return Qr(e?.[Of])??{}}function ml(e,o){let t=mh(e);return Object.hasOwn(t,o)?Qr(t[o])??{}:{}}function xh(e,o,t){let r={...mh(e)};if(fO(t).length?r[o]=t:delete r[o],!Object.keys(r).length){let{[Of]:a,...n}=e;return n}return{...e,[Of]:r}}function fO(e){return Object.entries(e).filter(([,o])=>o!==void 0)}function cO(e){return tO.includes(e)}var Zr=(e,o,t)=>Math.min(t,Math.max(o,e));function dO(e,o){if(cO(e)){let t=Math.round(Number(o));return!Number.isFinite(t)||t===0?null:Zr(t,QE,JE)}if(e==="lineHeight"){let t=Number(o);return Number.isFinite(t)?lr(Zr(t,rO,aO),3):null}if(e==="letterSpacing"){let t=Number(o);return Number.isFinite(t)?lr(Zr(t,nO,lO),4):null}if(e==="paragraphSpacing"){let t=Math.round(Number(o));return!Number.isFinite(t)||t<=0?null:Zr(t,sO,iO)}if(Object.hasOwn(sh,e)){let{min:t,max:r}=sh[e],a=Math.round(Number(o));return Number.isFinite(a)?Zr(a,t,r):null}return e==="italic"?typeof o=="boolean"?o:null:e==="role"?Oo.includes(String(o))?o:null:e==="textStyle"?nr(o)?o:null:o}var uO=["weight","size","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding","width"];function Ih(e){let o=null,t=r=>{o??={...e},delete o[r]};for(let r of uO){let a=e[r];a!==void 0&&!(typeof a=="number"&&Number.isFinite(a))&&t(r)}return e.align!==void 0&&!ph.includes(e.align)&&t("align"),e.textStyle!==void 0&&!nr(e.textStyle)&&t("textStyle"),o??e}var pO=[["font","role"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function mO(e){let o=[];for(let[t,r]of pO)t===e?o.push(r):r===e&&o.push(t);return o}function sr(e,o,t,r){let a={...ml(e,o)},n=r==null?null:dO(t,r);if(n===null)delete a[t];else{a[t]=n;for(let s of mO(t))delete a[s]}return xh(e,o,a)}function hh(e,o){return xh(e,o,{})}function xO(e){return KE(e)??"none"}function IO(e){return jE(e)??""}var hO={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 gO(e,o){let t=e.role;return t&&Oo.includes(t)?t:o?.blockDrawsStyle?null:XE(e.textStyle)}function kq(e,o){return e==="Text"&&o==="text"}var yO={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 bO(e){let o=Jd[e],t=yO[o];return t?`var(--size-${o}, ${t})`:`var(--size-${o})`}function ea(e){let o={};return typeof e.lineHeight=="number"?o.lineHeight=e.lineHeight:e.line&&(o.lineHeight=lr(SO+e.line*eO,3)),typeof e.letterSpacing=="number"?o.letterSpacingEm=e.letterSpacing:e.letter&&(o.letterSpacingEm=lr(e.letter*oO,4)),o}var SO=1,oa="--sf-part-para",Nf="(max-width: 719.98px)";function ih(e){return e=Ih(e),typeof e.sizePhone=="number"&&e.sizePhone>0?{fontSize:`${e.sizePhone}px`}:{}}function CO(e,o){return o&&typeof e.sizePhone=="number"&&e.sizePhone>0?{...e,size:e.sizePhone}:e}function ul(e,o,t){e=Ih(e);let r=gO(e,t),a=ea(e),n=e.size?`${e.size}px`:r?bO(r):"";return{fontFamily:e.font?TO(e.font):r?`var(${hO[r]})`:"",fontWeight:e.weight?String(e.weight):"",fontSize:n,minWidth:n?"0":"",overflowWrap:n?"break-word":"",lineHeight:a.lineHeight!==void 0?String(a.lineHeight):"",letterSpacing:a.letterSpacingEm!==void 0?`${a.letterSpacingEm}em`:"",[oa]:e.paragraphSpacing?`${e.paragraphSpacing}px`:"",textTransform:IO(e.case),textAlign:e.align??"",paddingTop:Ff(e.padding),paddingBottom:Ff(e.padding),maxWidth:Ff(e.width),color:wO(e.color),fontStyle:e.italic===!0?"italic":e.italic===!1?"normal":""}}var wO=e=>e===void 0||e===""?"":Object.hasOwn(jt,e)?jt[e]:gh.test(e)?e:"",gh=/^#[0-9a-fA-F]{6}$/;function Tq(e){return gh.test(e)}var Ff=e=>e===void 0?"":`${e}px`,lr=(e,o)=>Number(e.toFixed(o));function Pq(e,o){let t=Number.parseFloat(e.fontSize)||16,r=Number.parseFloat(e.lineHeight),a=Number.parseFloat(e.letterSpacing),n=Number.parseFloat(e.paddingTop),s=Number.parseFloat(e.maxWidth);return{fontKey:o,sizePx:t,weight:vO(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(r)?lr(r/t,3):1.2,letterEm:Number.isFinite(a)?lr(a/t,4):0,align:kO(e.textAlign),case:xO(e.textTransform),paddingPx:Number.isFinite(n)?Math.round(n):0,widthPx:Number.isFinite(s)&&s<ot?Math.round(s):ot}}function vO(e){return Number.isFinite(e)?ZE.reduce((o,t)=>Math.abs(t-e)<Math.abs(o-e)?t:o):400}function kO(e){for(let o of ph)if(o===e)return o;return e==="end"?"right":"left"}function Fq(e,o){let t=fh(e);if(!t)return"";for(let r of Xe)if(fh(o(r.cssVar))===t)return r.key;return""}var fh=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function TO(e){let o=zt(e);return o?`var(${o.cssVar})`:""}function Eq(e,o,t,r){return!o||sl(o)?.nodeId!==e?null:t.find(a=>r(a.getAttribute("class")))??t[0]??null}function Oq(e,o,t=()=>Jr,r=i=>i,a=EO,n=!1,s=()=>!1){let i=0;for(let{element:f,partId:d}of e){let p=sl(d)?.propKey;if(!p)continue;let m=r(p),x=Object.hasOwn(o,m)?Qr(o[m])??{}:{},I=ul(CO(x,n),Jr,{blockDrawsStyle:s(p)});nr(x.textStyle)?f.setAttribute?.(dl,x.textStyle):f.removeAttribute?.(dl);let y=Ef.some(v=>f.style[v]),w=!1;for(let[v,k]of Object.entries(I))OO(f,v,k),k&&(w=!0);if(y||Ef.some(v=>I[v]))for(let v of PO(f,a))for(let k of Ef)v.style[k]=I[k]??"";w&&(i+=1)}return i}function PO(e,o){let t=ar(e.textContent??""),r=[],a=e;for(let n=0;n<FO&&o(a);n+=1){let s=a.parentElement;if(!s||ar(s.textContent??"")!==t)break;r.push(s),a=s}return r}var FO=8;function EO(e){let o=e;return typeof window>"u"||!o?.ownerDocument?!1:window.getComputedStyle(o).display==="inline"}var Jr={fontKey:"",sizePx:16,weight:400,lineRatio:1,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:ot};function OO(e,o,t){if(!o.startsWith("--")){e.style[o]=t;return}let r=e.style;typeof r.setProperty=="function"?t?r.setProperty(o,t):r.removeProperty?.(o):r[o]=t;let a=e;o===oa&&(t?a.setAttribute?.(ch,""):a.removeAttribute?.(ch))}var ch="data-sf-part-para",LO=Object.keys(ul({},Jr)),Lf=new Set(["color","overflowWrap",oa,"fontStyle"]),Ef=LO.filter(e=>!Lf.has(e));function Lq(e,o,t,r=n=>n,a=()=>!1){let n=new Map;for(let f of e){let d=wf(f.key,f.row);for(let p of f.texts){let m=n.get(p);m?(m.keys.add(f.key),m.partKeys.add(d)):n.set(p,{keys:new Set([f.key]),partKeys:new Set([d])})}}let s=new Map;for(let f of Object.keys(o)){if(!RO(f))continue;let d=Qr(o[f])??{},p=ul(d,Jr),m=ih(d),x=nr(d.textStyle)?d.textStyle:void 0;!Object.values(p).some(Boolean)&&!Object.keys(m).length&&!x||s.set(f,{stamp:dh(t,f),declarations:p,...Object.keys(m).length?{phone:m}:{},...x?{textStyle:x}:{}})}let i=new Map;for(let[f,{keys:d,partKeys:p}]of n){let m=p.size===1?[...p][0]:d.size===1?[...d][0]:null;if(!m)continue;let x=r(m);if(!Object.hasOwn(o,x))continue;let I=Qr(o[x])??{},y=ul(I,Jr,{blockDrawsStyle:a(m)}),w=ih(I),v=nr(I.textStyle)?I.textStyle:void 0;!Object.values(y).some(Boolean)&&!Object.keys(w).length&&!v||i.set(f,{stamp:dh(t,m),declarations:y,...Object.keys(w).length?{phone:w}:{},...v?{textStyle:v}:{}})}return i.size||s.size?{rules:i,kindRules:s,drawn:new Set(n.keys())}:null}function RO(e){return e.startsWith("@")}function Rq(e,o){return e?.kindRules.get(o)??null}function dh(e,o){let t=r=>r.replace(/[^A-Za-z0-9_-]+/g,"-");return`${t(e)}~${t(o)}`}function Aq(e){let o=[],t=new Set,r=a=>{let{stamp:n,declarations:s}=a;if(t.has(n))return;t.add(n);let i=Object.entries(s).filter(([,I])=>I!==""),f=I=>I.map(([y,w])=>`${BO(y)}: ${w}`).join("; "),d=`[${VE}="${n}"]`,p=i.filter(([I])=>!Lf.has(I)),m=i.filter(([I])=>Lf.has(I));p.length&&o.push(`${d}, *:has(> ${d}) { ${f(p)} }`),m.length&&o.push(`${d} { ${f(m)} }`),s[oa]&&o.push(...AO(d));let x=Object.entries(a.phone??{}).filter(([,I])=>I!=="");x.length&&o.push(`@media ${Nf} { ${d}, *:has(> ${d}) { ${f(x)} } }`)};for(let a of e.rules.values())r(a);for(let a of e.kindRules.values())r(a);return o.join(`
|
|
4
|
+
`)}function AO(e){let o=`var(${oa})`,t=":is([data-sf-bullet], [data-sf-number])";return[`${e} br:not(br + br) { display: block; content: ""; margin-top: ${o} }`,`${e} ${t}:not(:first-child) { margin-top: ${o} }`,`${e} ${t}:not(:last-child) { margin-bottom: ${o} }`]}var BO=e=>e.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`);function Bq(e,o){if(!e)return null;let t=ar(o),r=e.rules.get(t);if(r)return r;if(t.length<DO||e.drawn.has(t))return null;let a=null;for(let[n,s]of e.rules)if(n.includes(t)){if(a&&a.stamp!==s.stamp)return null;a=s}return a}var DO=8;function yh(e){switch(e.id){case"heading-1":return"font-display";case"heading-2":return"font-heading2";case"heading-3":return"font-heading3";case"body-1":return"font-body";case"body-5":return"font-mono";default:return`font-${e.id}`}}var Mf=e=>e==="sentence"?"none":void 0,Mo=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,ta=e=>typeof e=="string"&&e?e:void 0,Sh=["font","color","size","sizePhone","weight","italic","lineHeight","letterSpacing","paragraphSpacing","letterCase","largestSize"];function ko(e){let o={};for(let t of Sh)e[t]!==void 0&&(o[t]=e[t]);return o}function Wf(e,o){let{auto:t,...r}=e,a=new Set(o??[]),n=Sh.filter(s=>a.has(s)&&e.values[s]===void 0);return n.length?{...r,auto:n}:r}function zf(e){let o=e.fonts,t=e.sizes,r=e.typography,a=xu(e.compression),n={"heading-1":{font:ta(o.heading),size:Mo(t.headingLarge),weight:Mo(r.weight),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Mf(r.case),largestSize:Mo(r.maxPx)},"heading-2":{font:ta(o.heading2),size:Mo(t.headingMedium),weight:Mo(r.weight2),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Mf(r.case2)},"heading-3":{font:ta(o.heading3),size:Mo(t.headingSmall),weight:Mo(r.weight3),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Mf(r.case3)},"body-1":{font:ta(o.body),size:Mo(t.body)},"body-5":{font:ta(o.label),size:Mo(t.label)}};return _O().map(({id:s,kind:i,name:f})=>({id:s,kind:i,name:f,values:ko(n[s]??{})}))}function xl(e){return Array.isArray(e)&&e.every(o=>o&&typeof o=="object"&&typeof o.id=="string"&&(o.kind==="heading"||o.kind==="body")&&typeof o.name=="string")?e.map(o=>Wf({...o,values:ko(o.values??{})},Array.isArray(o.auto)?o.auto:void 0)):null}function Gq(e){return xl(e)??[]}function tt(e,o){let t=zf(o),r=xl(e);return r?r.map(a=>{let n={...Hf(t,a.id)};for(let s of a.auto??[])delete n[s];return{...a,values:ko({...n,...a.values})}}):t}var Hf=(e,o)=>e.find(t=>t.id===o)?.values??{},bh=["heading-1","heading-2","heading-3"];function Ch({saved:e,old:o,cur:t,next:r,sizeOf:a}){let n=zf(o),s=xl(e)??n.map(m=>({...m,values:{}})),i=tt(s,o),f=[],d=r.map(m=>{let x=t.find(g=>g.id===m.id),I=s.find(g=>g.id===m.id);if(!x||!I)return MO([m],a)[0];let y={...I.values},w=new Set(I.auto??[]),v=m.values,k=x.values,C=[...new Set([...Object.keys(v),...Object.keys(k)])].filter(g=>JSON.stringify(v[g])!==JSON.stringify(k[g]));C.sort((g,b)=>+(g==="letterSpacing")-+(b==="letterSpacing"));for(let g of C){let b=g==="lineSpacing"?"lineHeight":g,O=v[g];if(O===void 0){delete y[b],Hf(n,m.id)[b]!==void 0&&(f.push([m.id,b]),w.add(b));continue}if(w.delete(b),g==="lineSpacing")y.lineHeight=ir(O/100,3);else if(g==="letterSpacing"){let F=i.find(P=>P.id===m.id),L=a({...m,values:ko({...F?.values??{},...y})});y.letterSpacing=L?ir(O/L,4):0}else y[b]=O}return Wf({id:m.id,kind:m.kind,name:m.name,values:ko(y)},w)}),p=o.compression;if(f.some(([m,x])=>(x==="lineHeight"||x==="letterSpacing")&&bh.includes(m))&&ct(p)!=="normal"){for(let m of bh){let x=d.find(y=>y.id===m);if(!x)continue;let I={...x.values};for(let y of["lineHeight","letterSpacing"])f.some(([w,v])=>w===m&&v===y)||I[y]===void 0&&!(x.auto??[]).includes(y)&&(I[y]=Hf(n,m)[y]);x.values=ko(I)}p="normal"}return{saved:d,old:{...o,compression:p}}}function wh(e,o){let t={text_styles:e.saved};return e.old.compression!==o.compression&&(t.heading_compression=ct(e.old.compression)),t}var ir=(e,o)=>Number(e.toFixed(o));function vh(e,o){return e.map(t=>{let{lineHeight:r,letterSpacing:a,...n}=t.values,s={...n};return r!==void 0&&(s.lineSpacing=ir(r*100,1)),a!==void 0&&(s.letterSpacing=ir(a*o(t),2)),{id:t.id,kind:t.kind,name:t.name,values:s}})}function MO(e,o){return e.map(t=>{let{lineSpacing:r,letterSpacing:a,...n}=t.values,s={id:t.id,kind:t.kind,name:t.name,values:ko({...n})},i={...s.values};if(r!==void 0&&(i.lineHeight=ir(r/100,3)),a!==void 0){let f=o({...s,values:{...s.values}});i.letterSpacing=f?ir(a/f,4):0}return{...s,values:ko(i)}})}function Uq(e){let o={fonts:Or({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}),sizes:Ps({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:ct(e.heading_compression),typography:hu(e)},t=e.text_styles??null,r=Array.isArray(t)?Gf(tt(t,o),o):o;return{fonts:Or(r.fonts),sizes:Ps(r.sizes),compression:ct(r.compression),typography:r.typography,textStyles:t}}function Gf(e,o){let t=x=>e.find(I=>I.id===x)?.values??{},r=t("heading-1"),a=t("heading-2"),n=t("heading-3"),s=t("body-1"),i=t("body-5"),f=o.fonts,d=o.sizes,p=o.typography,m=x=>x==="none"?"sentence":"authored";return{fonts:{...f,heading:r.font??f.heading,heading2:a.font??r.font??f.heading2,heading3:n.font??r.font??f.heading3,body:s.font??f.body,label:i.font??f.label},sizes:{...d,headingLarge:r.size??null,headingMedium:a.size??null,headingSmall:n.size??null,body:s.size??null,label:i.size??null},compression:o.compression,typography:{...p,case:m(r.letterCase),weight:r.weight??null,maxPx:r.largestSize??null,weight2:a.weight??null,weight3:n.weight??null,case2:m(a.letterCase),case3:m(n.letterCase)}}}function HO(e){return e==="accent"?"var(--accent)":e==="text"?"var(--fg)":e==="labels"?"var(--fg-dim)":/^#[0-9a-f]{6}$/i.test(e)?e:null}function WO(e){let o=":is([data-sf-bullet], [data-sf-number])";return[`${e} br:not(br + br) { display: block; content: ""; margin-top: var(--sf-part-para) }`,`${e} ${o}:not(:first-child) { margin-top: var(--sf-part-para) }`,`${e} ${o}:not(:last-child) { margin-bottom: var(--sf-part-para) }`]}function $q(e){let o=[];for(let t of e){let r=t.values,a=`.${yh(t)}`,n=`[${dl}="${t.id}"]`,s=`${a}, ${n}`,i=[],f=r.font!==void 0?Xe.find(x=>x.key===r.font)?.cssVar:void 0;if(f&&i.push(`font-family: var(${f})`),r.size!==void 0){let x=r.largestSize!==void 0?Math.min(r.size,r.largestSize):r.size;i.push(`font-size: ${x}px`)}let d=r.color!==void 0?HO(r.color):null;d&&i.push(`color: ${d}`),r.italic===!0&&i.push("font-style: italic"),r.weight!==void 0&&i.push(`font-weight: ${r.weight}`);let p=[];r.lineHeight!==void 0&&p.push(`line-height: ${r.lineHeight}`),r.letterSpacing!==void 0&&p.push(`letter-spacing: ${r.letterSpacing}em`),t.kind==="body"&&i.push(...p);let m=NO(r.letterCase);if(m&&i.push(`text-transform: ${m}`),r.paragraphSpacing&&i.push(`--sf-part-para: ${r.paragraphSpacing}px`),i.length&&o.push(`${s} { ${i.join("; ")} }`),t.kind==="heading"&&p.length&&o.push(`${s}, ${a}:is(h1, h2, h3, h4), ${n}:is(h1, h2, h3, h4) { ${p.join("; ")} }`),r.paragraphSpacing&&o.push(...WO(`:is(${s})`)),r.sizePhone!==void 0){let x=zO[t.id],I=[`${s} { font-size: ${r.sizePhone}px }`];x&&I.push(`.sf-themed-content { --size-${x}: ${r.sizePhone}px !important }`),o.push(`@media ${Nf} { ${I.join(" ")} }`)}}return o.join(`
|
|
5
|
+
`)}var zO={"heading-1":"headingLarge","heading-2":"headingMedium","heading-3":"headingSmall","body-1":"body","body-5":"label"};function qq(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function kh(e){return e?pl[e]:void 0}function Uf(e){let o=ea(e);return ko({font:e.font,color:e.color,size:e.size,weight:e.weight,italic:e.italic,lineHeight:o.lineHeight,letterSpacing:o.letterSpacingEm,paragraphSpacing:e.paragraphSpacing,letterCase:e.case})}function Th(e){return Object.keys(Uf(e)).length>0}function Ph({saved:e,old:o,styleId:t,values:r}){return{saved:(xl(e)??zf(o).map(a=>({...a,values:{}}))).map(a=>a.id===t?Wf({...a,values:ko({...a.values,...r})},a.auto):a),old:o}}var Fh=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],jO=["size","lineSpacing","letterSpacing","letterCase"],KO=500,$f=Xe.map(e=>({value:e.key,label:e.label,family:`var(${e.cssVar})`,italic:e.italicLoaded}));function Eh({saved:e,old:o,colours:t,sizeOf:r,onChange:a,openId:n,onOpenChange:s,readOnly:i=!1,withoutSize:f=!1}){let[d,p]=UO(null),m=qO()==="mobile",x=tt(e,o),I=vh(x,r);return GO($O,{styles:I,onChange:y=>a(Ch({saved:e,old:o,cur:I,next:y,sizeOf:r})),fonts:$f,colours:t,settings:f?Fh.filter(y=>y!=="size"):Fh,auto:jO,openId:n===void 0?d:n,onOpenChange:s??p,readOnly:i,device:m?"phone":"desktop",fallback:y=>{let w=x.find(k=>k.id===(y.kind==="heading"?"heading-1":"body-1")),v={};return w?.values.font&&y.id!==w.id&&(v.font=w.values.font),y.kind==="heading"&&(v.weight=KO),v}})}var Lh=["font","size","weight","emphasis"],XO=500;function ZO({font:e,size:o,weight:t,italic:r}){let a={font:e};return o!==null&&(a.size=o),t!==null&&(a.weight=t),r!==null&&(a.italic=r),{id:"accent",kind:"heading",name:l("Accent"),values:a}}function QO(e,o){let t=[],r=e.values,a=o.values;return a.font!==r.font&&a.font!==void 0&&t.push({key:"font",value:a.font}),a.size!==r.size&&t.push({key:"size",value:a.size??null}),a.weight!==r.weight&&t.push({key:"weight",value:a.weight??null}),a.italic!==r.italic&&t.push({key:"italic",value:a.italic??null}),t}function Rh(e){let{headingWeight:o,open:t,onOpenChange:r,onChange:a,withoutSize:n=!1}=e,s=ZO(e);return Oh(YO,{label:l("Accent"),children:Oh(VO,{style:s,fonts:$f,settings:n?Lh.filter(i=>i!=="size"):Lh,auto:["size"],fallback:()=>({weight:o??XO}),open:t,onOpenChange:r,onChange:i=>QO(s,i).forEach(a)})})}import{Tabs as eL,Tooltip as O8,tabButtonId as oL,tabPanelId as tL}from"efficient-shell/ui";import{ContrastIcon as rL,NoteIcon as aL,SettingsIcon as nL,TypeIcon as lL}from"efficient-easel/icons";function Ah(e){switch(e.status){case"saved":return null;case"failed":return{msg:l("Not saved. Try again."),tone:"error"};case"skipped":switch(e.reason){case"empty":return null;case"no-token":return{msg:l("Not saved. Reload the page."),tone:"error"};case"template":return{msg:l("Templates keep their look. Press Done."),tone:"success"}}}}import{previewFrame as sL}from"efficient-easel/screen/lib/puck/preview-dom";import{useEasel as JO}from"efficient-easel/easel";function Il({themeFromDocument:e,persist:o}){let{appState:t,dispatch:r}=JO(L=>L),{fonts:a,setFonts:n,sizes:s,setSizes:i,headingCompression:f,setHeadingCompression:d,headingTypography:p,setHeadingTypography:m,textStyles:x,setTextStyles:I}=V(),y=t.data,w=y.root?.props??{},v=e?Or(w.fonts):a,k=e?fu:s,C=e?ct(w.headingCompression):f,g=e?Iu(w.headingTypography):p,b={fonts:v,sizes:k,compression:C,typography:g},O=e?w.textStyles:x,F=L=>r({type:"replaceRoot",root:{...y.root,props:{...w,...L}},recordHistory:!0});return{fonts:v,sizes:k,compression:C,typography:g,old:b,saved:O,write:(L,P)=>{let M=Gf(tt(L.saved,L.old),L.old);e?F({textStyles:L.saved,fonts:M.fonts,headingCompression:M.compression,headingTypography:M.typography}):(I(L.saved),n(M.fonts),i(M.sizes),d(M.compression),m(M.typography)),o(wh(L,b),P)},writeRoot:F}}var Kf="sf-site-styles",iL="sf-site-styles-tabpanel",Vf=!1,fL="Show hints";function Yf({shown:e,onChange:o}){return Q("div",{className:"sf-hints",children:rt("button",{type:"button","aria-pressed":e,onClick:()=>o(!e),className:`sf-rung sf-hints-toggle${e?" is-active":""}`,children:[Q(aL,{size:13}),l(fL)]})})}var Dh="text",fr=[{id:"basics",label:"Basics",icon:Q(nL,{})},{id:"theme",label:"Theme",icon:Q(rL,{})},{id:"text",label:"Text",icon:Q(lL,{})}];function cL({themeFromDocument:e,persist:o}){let{appState:t,dispatch:r}=Bh(d=>d),{theme:a,setTheme:n}=V(),s=t.data,i=s.root?.props??{},f=d=>{if(e){let p={...i,theme:d};r({type:"replaceRoot",root:{...s.root,props:p},recordHistory:!0})}else n(d);o({selected_preset:d.selected,theme_presets:d.themes})};return Q(FI,{value:e?i.theme:a,onChange:f})}function dL({themeFromDocument:e,persist:o}){let[t,r]=jf(null),{theme:a,setFonts:n,setSizes:s,setHeadingTypography:i}=V(),f=Il({themeFromDocument:e,persist:o}),{old:d,saved:p,writeRoot:m}=f,x=f.fonts,I=f.sizes,y=f.typography,w=F=>F.values.size??IL(pL[F.id]??"body")??mL[F.kind],v=F=>f.write(F),k=uL(a),C=F=>{let L={...x,accent:F};e?m({fonts:L}):n(L),o({accent_font:F})},g=F=>{s({...I,accent:F}),o({accent_size_px:F})},b=F=>{let L={...y,weightStrong:F};e?m({headingTypography:L}):i(L),o({heading_weight_strong:F})},O=F=>{let L={...y,italicStrong:F};e?m({headingTypography:L}):i(L),o({accent_italic:F})};return rt(Et,{children:[Q(Eh,{saved:p,old:d,colours:k,sizeOf:w,onChange:v,openId:t===qf?null:t,onOpenChange:r,withoutSize:e}),Q(Rh,{font:x.accent,size:I.accent,weight:y.weightStrong,italic:y.italicStrong,headingWeight:y.weight,open:t===qf,onOpenChange:F=>r(F?qf:null),onChange:F=>{F.key==="font"?C(F.value):F.key==="size"?g(F.value):F.key==="weight"?b(F.value):O(F.value)},withoutSize:e})]})}var qf="accent";function uL(e){let o=Gt(e);return[{key:"accent",name:l("Accent"),value:o.accent},{key:"text",name:l("Text"),value:o.text},{key:"labels",name:l("Labels"),value:o.muted??o.text}]}var pL={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},mL={heading:32,body:14},xL={heading:"main h1, main h2",heading2:"main h1, main h2",heading3:"main h1, main h2",accent:"main h1 em, main h2 em",body:"main p",label:"main .mono-eyebrow"};function IL(e){if(typeof document>"u")return null;let o=(sL()?.contentDocument??document).querySelector(xL[e]);if(!o)return null;let t=parseFloat(getComputedStyle(o).fontSize);return Number.isFinite(t)?t:null}function hL({themeFromDocument:e,persist:o,showHint:t}){let{appState:r,dispatch:a}=Bh(x=>x),{cornerRadiusPx:n,setCornerRadiusPx:s}=V(),i=r.data,f=i.root?.props??{},d=f.cornerRadiusPx===void 0?du[cu(f.cornerStyle)]:ho(f.cornerRadiusPx),p=e?d:n,m=x=>a({type:"replaceRoot",root:{...i.root,props:{...f,...x}},recordHistory:!0});return Q(EI,{value:p,onChange:x=>{e?m({cornerRadiusPx:x}):s(x),o({corner_radius_px:x})},showHint:t})}function gL(e){return{site_width:e}}function yL({persist:e,showHint:o}){let{siteWidth:t,setSiteWidth:r,sectionBackgroundWidth:a,setSectionBackgroundWidth:n,sectionContentWidth:s,setSectionContentWidth:i}=V(),f=typeof t=="number"?t:pe.default,d=x=>{r(x),e(gL(x),x===null)},p=x=>{n(x),e({section_background_width:x},!0)},m=x=>{i(x),e({section_content_width:x},!0)};return rt(Et,{children:[Q(ol,{value:a??"full",changed:a!==null,detail:l("Full width"),onChange:p,onReset:()=>p(null),hint:o?zI:void 0}),Q(tl,{mode:s??"content",px:f,min:pe.min,max:pe.max,changed:typeof t=="number"||s!==null,detail:`${l("Content width")} ${pe.default}px`,onMode:m,onPx:x=>d(x),onReset:()=>{m(null),d(null)},hint:o?GI:void 0})]})}function bL(e){return{block_gap:e}}function SL(e){return{site_gutter:e}}function CL({persist:e,showHint:o}){let{siteGutter:t,setSiteGutter:r}=V();return Q(MI,{value:t,onChange:a=>{r(a),e(SL(a),a===null)},showHint:o})}function wL({persist:e,showHint:o}){let{blockGap:t,setBlockGap:r}=V();return Q(AI,{value:t,onChange:a=>{r(a),e(bL(a),a===null)},showHint:o})}function vL({persist:e,showHint:o=!0}){return rt(Et,{children:[Q(yL,{persist:e,showHint:o}),Q(CL,{persist:e,showHint:o}),Q(wL,{persist:e,showHint:o})]})}function kL(e){return{card_shadow:e}}function TL(e){return e===null?{shadow_color:null}:{shadow_color:mu(e)}}function PL(e){return{hover_effect:e}}function FL({persist:e,showHint:o=!0}){let{cardShadow:t,setCardShadow:r,shadowColor:a,setShadowColor:n,hoverEffect:s,setHoverEffect:i}=V();return rt(Et,{children:[Q(OI,{value:t,onChange:f=>{r(f),e(kL(f),!0)},showHint:o}),Q(RI,{value:a,onChange:f=>{n(f),e(TL(f),f===null)},showHint:o}),Q(BI,{value:s,onChange:f=>{i(f),e(PL(f),!0)},showHint:o})]})}function EL(e){return{photography_grayscale:e}}function OL({persist:e,showHint:o}){let{photographyGrayscale:t,setPhotographyGrayscale:r}=V();return Q(_I,{value:t,onChange:a=>{r(a),e(EL(a),!0)},showHint:o})}function LL({persist:e,showHint:o=!0}){return Q(Et,{children:Q(OL,{persist:e,showHint:o})})}function RL(e){return{share_button_on_posts:e}}function AL({persist:e,showHint:o=!0}){let{shareButtonOnPosts:t,setShareButtonOnPosts:r}=V();return Q(NI,{value:t,onChange:a=>{r(a),e(RL(a),!0)},showHint:o})}function cr(){let{websiteName:e}=V();return e?.trim()||yu}function hl({themeFromDocument:e=!1,tokenRef:o,siteId:t,onNotify:r,tab:a,onTabChange:n}){let{persist:s}=Vt({themeFromDocument:e,tokenRef:o,siteId:t,onResult:w=>{let v=Ah(w);v&&r?.(v.msg,v.tone)}}),[i,f]=jf(fr[0].id),d=a!==void 0,p=d?a:i,m=d?n??(()=>{}):f,x=fr.find(w=>w.id===p)??fr[0],[I,y]=jf(Vf);return rt(Et,{children:[Q(BL,{activeId:x.id,onSelect:m}),rt("div",{id:tL(Kf,x.id),className:iL,role:"tabpanel","aria-labelledby":oL(Kf,x.id),children:[p==="basics"&&rt(Et,{children:[Q(hL,{themeFromDocument:e,persist:s,showHint:I}),!e&&Q(FL,{persist:s,showHint:I}),!e&&Q(vL,{persist:s,showHint:I}),!e&&Q(LL,{persist:s,showHint:I}),!e&&Q(AL,{persist:s,showHint:I}),Q(Yf,{shown:I,onChange:y})]}),p==="theme"&&Q(cL,{themeFromDocument:e,persist:s}),p==="text"&&Q(dL,{themeFromDocument:e,persist:s})]})]})}function BL({activeId:e,onSelect:o}){return Q("div",{className:"es-insp-tabs",children:Q(eL,{variant:"underline",block:!0,labelsFit:!0,"aria-label":l("Styles"),idPrefix:Kf,value:e,onChange:o,items:fr.map(t=>{let r=l(t.label);return{id:t.id,icon:t.icon,label:r}})})})}import{InspectorIconButton as JL}from"efficient-easel/chrome";import{Button as Zh,Dialog as eR,FormField as oR,Input as Qh,PopupMenu as tR,PopupMenuItem as Jh,toast as eg}from"efficient-shell/ui";import{LayersTree as rR,TreeGroupLabel as aR,TreeRow as og,TreeRowAction as Tl}from"efficient-easel/tree";import{AddIcon as nR,DuplicateIcon as lR,PageIcon as sR}from"efficient-easel/icons";import{PagesIcon as iR}from"efficient-easel/rail";import{useEaselHost as fR}from"efficient-easel/screen/lib/host";var Xf="Main Pages",DL="Dynamic Pages",Zf="dynamic",_L="dynamic";function Qf(e){return e.kind===_L}function _h(e){let o=[],t=[];for(let r of e){if(Qf(r)){t.push(r);continue}let a=r.groupKey??(r.group?`folder:${r.group}`:"top"),n=o[o.length-1];n&&n.key===a?n.rows.push(r):o.push({key:a,label:r.group??Xf,rows:[r]})}if(t.length){let r=o.findIndex(a=>a.key.startsWith("system:"));o.splice(r===-1?o.length:r,0,{key:Zf,label:DL,rows:t})}return o}import{useEaselSession as cR}from"efficient-easel/screen/lib/session-context";import{useCallback as gl,useEffect as NL,useSyncExternalStore as ML}from"react";import{useScreenDocument as Wh}from"efficient-easel/screen/components/ScreenDocumentContext";var Nh=new WeakMap;function ra(e){let o=Nh.get(e);return o||(o={rows:null,loading:null,listeners:new Set},Nh.set(e,o)),o}function Jf(e,o){e.rows=o;for(let t of e.listeners)t()}var yl=new Set;function bl(e,o){o?yl.add(e):yl.delete(e)}function Mh(e){let o=ra(e),t=e.listPages().then(r=>Jf(o,yl.size?r.filter(a=>!yl.has(a.id)):r),()=>Jf(o,[])).finally(()=>{o.loading===t&&(o.loading=null)});return o.loading=t,t}var Hh=()=>null,HL=()=>()=>{};function aa(){let{adapter:e,ready:o}=Wh(),t=gl(i=>{let{listeners:f}=ra(e);return f.add(i),()=>f.delete(i)},[e]),r=gl(()=>ra(e).rows,[e]),a=ML(o?t:HL,o?r:Hh,Hh);NL(()=>{if(!o)return;let i=ra(e);i.rows===null&&!i.loading&&Mh(e)},[e,o]);let n=gl(()=>o?Mh(e):Promise.resolve(),[e,o]),s=gl(i=>Jf(ra(e),i),[e]);return{rows:a,reload:n,setRows:s,getRows:r}}function WL(e,o){return e?.find(t=>t.slug===o)?.label?.trim()||`/${o}`}function zh(){let{currentSlug:e}=Wh(),{rows:o}=aa();return WL(o,e)}import{useEaselSession as zL}from"efficient-easel/screen/lib/session-context";import{useScreenDocument as GL}from"efficient-easel/screen/components/ScreenDocumentContext";var UL=new Set(["normal","dynamic"]);function Sl(e){return!e.kind||UL.has(e.kind)}function Cl(e,o){let t=pt(e)||"page";if(!o.has(t))return t;let r=2;for(;o.has(`${t}-${r}`);)r+=1;return`${t}-${r}`}function Gh(e,o){return o.has(e)}function Uh(e,o){return{title:`${e.label||e.slug} copy`,slug:Cl(`${e.slug}-copy`,o)}}function wl(){let e=zL(),{siteId:o,templateId:t}=GL(),r=Se(e).pages;if(!(!r.duplicate||t))return(a,n)=>r.duplicate(a.id,{...n,...o?{siteId:o}:{}})}import{jsx as Ot,jsxs as $h,Fragment as $L}from"react/jsx-runtime";import{useId as qh,useState as dr}from"react";import{Button as jh,Dialog as qL,FormField as Kh,Input as Vh,Stack as jL}from"efficient-shell/ui";function vl({source:e,taken:o,duplicate:t,onClose:r,onDuplicated:a}){let n=qh(),s=qh(),[i,f]=dr(null),[d,p]=dr(""),[m,x]=dr(""),[I,y]=dr(!1),[w,v]=dr(!1),[k,C]=dr(null);if(e!==i&&(f(e),e)){let F=Uh(e,o);p(F.title),x(F.slug),y(!1),C(null)}let g=Gh(m,o),b=!!(e&&d.trim()&&m&&!g&&!w),O=async()=>{if(!(!e||!b)){v(!0),C(null);try{let F=await t(e,{title:d.trim(),slug:m});a(F)}catch{C(l("Couldn\u2019t duplicate the page \u2014 please retry."))}finally{v(!1)}}};return Ot(qL,{open:e!==null,onClose:()=>{w||r()},size:"sm",title:l("Duplicate \u201C{name}\u201D",{name:e?.label??""}),description:l("The copy is a draft and stays hidden until you publish it. It opens in the editor."),footer:$h($L,{children:[Ot(jh,{variant:"secondary",onClick:r,disabled:w,children:l("Cancel")}),Ot(jh,{onClick:()=>{O()},disabled:!b,loading:w,children:l("Duplicate page")})]}),children:$h(jL,{gap:4,children:[Ot(Kh,{label:l("Title"),htmlFor:n,error:k??void 0,children:Ot(Vh,{id:n,value:d,invalid:!!k,onChange:F=>{p(F.target.value),I||x(pt(F.target.value))},onKeyDown:F=>{F.key==="Enter"&&O()}})}),Ot(Kh,{label:l("URL handle"),htmlFor:s,hint:g?void 0:l("URL: /{slug}",{slug:m}),error:g?l("Another page uses this URL handle."):void 0,children:Ot(Vh,{id:s,value:m,invalid:g,onChange:F=>{y(!0),x(pt(F.target.value))},onKeyDown:F=>{F.key==="Enter"&&O()}})})]})})}var tg="sf-editor-pages-collapsed-groups";function rg({onNavigate:e,onClose:o,activeSurface:t,onPreviewSurface:r}){let a=cR().chrome?.pageRows,n=fR(),{adapter:s,capabilities:i,ready:f,currentSlug:d}=ZL(),p=cr(),{rows:m,reload:x,setRows:I,getRows:y}=aa(),[w,v]=at(""),[k,C]=at(!1),[g,b]=at(null),[O,F]=at(!1),[L,P]=at(""),M=YL(),z=wl(),[B,A]=at(null),[W,D]=at(()=>{if(typeof window>"u")return new Set;try{let E=window.localStorage.getItem(tg);return new Set(E?JSON.parse(E):[])}catch{return new Set}});VL(()=>{try{window.localStorage.setItem(tg,JSON.stringify([...W]))}catch{}},[W]);let te=E=>D($=>{let q=new Set($);return q.has(E)?q.delete(E):q.add(E),q}),ie=Xh(()=>_h(m??[]),[m]),de=w.trim().toLowerCase(),lo=E=>!de||E.toLowerCase().includes(de),so=E=>de?!0:!W.has(E),Le=Xh(()=>new Set((m??[]).map(E=>E.slug)),[m]),io=()=>{if(i.pageCreationInAdminForm){n.send("storefront-editor:new-page");return}P(""),b(null),F(!0)},_e=async()=>{let E=L.trim();if(!(!E||!f||k||!s.createPage)){C(!0),b(null);try{let $=await s.createPage({slug:Cl(E,Le),title:E,layout:{}});await x(),F(!1),P(""),e($.slug)}catch{b(l("Couldn\u2019t add the page \u2014 please retry."))}finally{C(!1)}}},Te=i.hasSiteSettings&&!!s.createPage,xe=async()=>{if(!(!f||k||!s.createPage)){C(!0),b(null);try{let E=await s.createPage(Pm(l("New popup"),Le));await x(),e(E.slug)}catch{b(l("Couldn\u2019t add the popup \u2014 please retry."))}finally{C(!1)}}},he=XL(null),[Ne,Pe]=at(null),fo=()=>{if(!Te)return io();if(Ne)return Pe(null);let E=he.current?.getBoundingClientRect();E&&Pe({top:E.bottom+6,right:Math.max(8,window.innerWidth-E.right)})},Me=E=>{let $=m??[],q=s.deletePage;if(!f||k||!q||$.length<=1)return;let Re=$.findIndex(Fe=>Fe.id===E.id),mo=$.filter(Fe=>Fe.id!==E.id),Ye=E.slug===d;bl(E.id,!0),I(mo),b(null),Ye&&mo[0]&&e(mo[0].slug);let Ht=()=>{bl(E.id,!1);let Fe=y()??[];if(Fe.some(qa=>qa.id===E.id))return;let Eo=[...Fe];Eo.splice(Math.max(0,Math.min(Re,Eo.length)),0,E),I(Eo)};eg.undoable(l("Deleted \u201C{name}\u201D",{name:E.label}),{actionLabel:l("Undo"),commit:async Fe=>{await q(E.id,Fe),bl(E.id,!1)},undo:()=>{Ht(),Ye&&e(E.slug)},onFail:()=>{Ht(),eg.error(l("Couldn\u2019t delete the page \u2014 please retry."))}})},Ge=E=>n.send("storefront-editor:open-page",{slug:E}),co=E=>{if(!lo(E.label))return null;let $=!t&&E.slug===d,q=i.canDeletePagesInline&&(m??[]).length>1,Re=Qf(E),mo=E.kind==="lightbox",Ye=[...Re?[{label:l("Dynamic"),tone:"info"}]:[],...mo?[{label:l("Lightbox"),tone:"success"}]:[],...E.draft?[{label:l("draft"),tone:"draft"}]:[]],Ht=Ye.length>0?Ye:void 0,Fe=!!z&&Sl(E),Eo=Fe||i.pageCreationInAdminForm||q?na(Yh,{children:[Fe&&ee(Tl,{kind:"plain",label:l("Duplicate \u201C{name}\u201D",{name:E.label}),disabled:k,onClick:()=>A(E),children:ee(lR,{size:13})}),i.pageCreationInAdminForm&&ee(Tl,{kind:"plain",label:l("Edit \u201C{name}\u201D in {place}",{name:E.label,place:l("the admin")}),onClick:()=>Ge(E.slug),children:ee(kl,{name:"pencil",size:13,strokeWidth:1.7,rounded:!0})}),q&&ee(Tl,{kind:"delete",label:l("Delete \u201C{name}\u201D",{name:E.label}),disabled:k,onClick:()=>Me(E),children:ee(kl,{name:"trash",size:13,strokeWidth:1.7,rounded:!0})})]}):void 0;return ee(og,{icon:ee(sR,{size:14}),name:E.label,selected:$,onSelect:()=>e(E.slug),badge:Ht,actions:Eo,rowProps:{"data-page-slug":E.slug}},E.id)},uo=(E,$,q)=>{let Re=q.filter(Boolean);if(Re.length===0)return null;let mo=so(E);return na(KL,{children:[ee(aR,{count:Re.length,expanded:mo,onToggle:()=>te(E),children:$}),mo&&Re]},E)},Fo=(a?.rows??[]).filter(E=>lo(E.label)).map(E=>{let $=t===E.key;return ee(og,{icon:E.icon,name:E.label,selected:$,onSelect:()=>r(E.key),badge:{label:l("Preview"),tone:"warning"},actions:ee(Tl,{kind:"plain",label:l("Open the {name} in a new tab",{name:E.label}),onClick:()=>window.open(E.href,"_blank","noopener,noreferrer"),children:ee(kl,{name:"external-link",size:13,strokeWidth:1.7,rounded:!0})}),rowProps:{"data-shop-surface":E.key}},E.key)}),Ve=i.hasSiteSettings&&!!a,po=(()=>{if(m===null)return null;let E=[],$=!1;for(let q of ie){Ve&&!$&&q.key.startsWith("system:")&&(E.push(uo("shop",a.title,Fo)),$=!0);let Re=q.key===Zf||q.label===Xf?l(q.label):q.label;E.push(uo(q.key,Re,q.rows.map(co)))}return Ve&&!$&&E.push(uo("shop",a.title,Fo)),E})();return na("div",{className:"sf-pages",children:[ee(QL,{icon:ee(iR,{}),title:l("Pages"),context:p,actions:ee(JL,{buttonRef:he,label:Te?l("Add"):l("New page"),hasPopup:Te?"menu":void 0,expanded:Te?Ne!==null:void 0,onClick:fo,children:ee(nR,{size:15})})}),Ne&&ee(tR,{portal:!0,style:{top:Ne.top,right:Ne.right},onClose:()=>Pe(null),children:na("div",{role:"menu","aria-label":l("Add"),children:[ee(Jh,{role:"menuitem",onClick:()=>{Pe(null),io()},children:l("Page")}),ee(Jh,{role:"menuitem",disabled:k,onClick:()=>{Pe(null),xe()},children:l("Popup")})]})}),ee("div",{className:"sf-pages-find",children:ee(Qh,{type:"search",leftIcon:ee(kl,{name:"search",size:14,rounded:!0}),placeholder:l("Search all pages\u2026"),value:w,onChange:E=>v(E.target.value),"aria-label":l("Search all pages")})}),g&&!O&&ee("div",{className:"sf-note sf-note--error",role:"alert",children:g}),po===null?ee("div",{className:"sf-note",children:l("Loading\u2026")}):po.some(Boolean)?ee(rR,{ariaLabel:l("Pages"),className:"sf-scroll",children:po}):ee("div",{className:"sf-note",children:w.trim()?l("No pages match your search"):l("No pages yet. Add one with + above.")}),z&&ee(vl,{source:B,taken:Le,duplicate:z,onClose:()=>A(null),onDuplicated:E=>{A(null),x(),e(E.slug)}}),ee(eR,{open:O,onClose:()=>F(!1),size:"sm",title:l("Add a page"),description:l("Give the new template page a name. It starts blank \u2014 add sections once it opens."),footer:na(Yh,{children:[ee(Zh,{variant:"secondary",onClick:()=>F(!1),children:l("Cancel")}),ee(Zh,{onClick:()=>{_e()},disabled:k||!L.trim(),loading:k,children:l("Add page")})]}),children:ee(oR,{label:l("Page name"),htmlFor:M,hint:L.trim()?l("URL: /{slug}",{slug:Cl(L,Le)}):void 0,error:g??void 0,children:ee(Qh,{id:M,value:L,invalid:!!g,onChange:E=>P(E.target.value),onKeyDown:E=>{E.key==="Enter"&&_e()},placeholder:l("e.g. About")})})})]})}import{jsx as dR}from"react/jsx-runtime";import{createContext as uR,useCallback as pR,useContext as mR,useState as xR}from"react";import{useSelectHandler as IR}from"efficient-easel/draw/client";var Pl=["chat-bubble-left-right","chat-bubble-oval-left-ellipsis","chat","megaphone","phone","sparkles"],ur=Pl[0];var Lt="right";function Fl(e){return Pl.includes(e??"")?e:ur}function ag(e){return e==="left"?"left":Lt}function ng(e){return/^#[0-9a-fA-F]{6}$/.test(e??"")?e.toLowerCase():""}var El={enabled:!0,title:"",subtitle:"",greeting:"",launcherColor:"",launcherIcon:"",launcherPosition:Lt,launcherLabel:"",showOnPhones:!0};function F9(e){return{enabled:e.enabled,title:e.title,subtitle:e.subtitle,greeting:e.greeting,launcherColor:ng(e.launcherColor),launcherIcon:e.launcherIcon?Fl(e.launcherIcon):"",launcherPosition:ag(e.launcherPosition),launcherLabel:e.launcherLabel??"",showOnPhones:e.showOnPhones!==!1}}var lg=uR({chat:El,setChat:()=>{},selected:!1,setSelected:()=>{},select:()=>{},setSelectHandler:()=>{}});function E9({children:e,chat:o=El,onChatChange:t}){let[r,a]=xR(!1),n=pR(f=>t?.(f),[t]),{select:s,setSelectHandler:i}=IR();return dR(lg.Provider,{value:{chat:o,setChat:n,selected:r,setSelected:a,select:s,setSelectHandler:i},children:e})}var Ol=()=>mR(lg);import{jsx as ec}from"react/jsx-runtime";import{DesktopIcon as hR,PhoneIcon as gR,TabletIcon as yR}from"efficient-easel/icons";import{VIEW_TIERS as bR,VIEW_TIER_LABEL as SR}from"efficient-easel/draw";var CR={desktop:ec(hR,{}),tablet:ec(yR,{}),mobile:ec(gR,{})},sg=bR.map(e=>({id:e,get label(){return l(SR[e])},icon:CR[e]}));import{PreviewDeviceContext as wH}from"efficient-easel/draw/client";import{jsx as wR}from"react/jsx-runtime";import{createContext as vR,useCallback as ig,useContext as kR,useMemo as TR,useRef as PR}from"react";var FR=Object.fromEntries(Ya.map(e=>[e,{value:"",error:null}])),fg=vR({links:Su,rows:FR,canSave:!1,saveLink:async()=>({ok:!1,error:"There is no website to save to."}),openPanel:()=>{},setOpenHandler:()=>{}});function H9({children:e,value:o}){let t=PR(()=>{}),r=ig(()=>t.current(),[]),a=ig(s=>{t.current=s},[]),n=TR(()=>({...o,openPanel:r,setOpenHandler:a}),[o,r,a]);return wR(fg.Provider,{value:n,children:e})}var la=()=>kR(fg);import{jsx as ER}from"react/jsx-runtime";import{createContext as OR,useContext as LR,useMemo as RR,useState as AR}from"react";var cg=OR(null);function U9({children:e}){let[o,t]=AR(null),r=RR(()=>({surface:o,setSurface:t}),[o]);return ER(cg.Provider,{value:r,children:e})}function dg(){return LR(cg)??{surface:null,setSurface:()=>{}}}import{createPreviewSelectionContext as BR}from"efficient-easel/draw/client";var sa="Scrolling Bar",{Provider:j9,useSelection:ug}=BR("selectedHeroId");import{createPreviewSelectionContext as DR}from"efficient-easel/draw/client";var{Provider:Y9,useSelection:Ll}=DR("selectedHeroPart");import{isShown as JR,lazyShowWhenContext as eA}from"efficient-shell/format";var ia="product",_R="recordType",NR={key:ia,label:"Product",fields:[]},MR=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,HR=/^[a-z][A-Za-z0-9]*$/,WR=["text","date"],pg=new Map,mg=0;function zR(e){if(typeof e.key!="string"||!MR.test(e.key))throw new Error(`A record type key is lower-case words joined by hyphens, not ${JSON.stringify(e.key)}.`);if(e.key===ia)throw new Error("The product record type is the builder's own and is not declared by a host.");if(typeof e.label!="string"||!e.label.trim())throw new Error(`The record type ${e.key} has no label.`);let o=new Set;for(let t of e.fields){if(typeof t.key!="string"||!HR.test(t.key)||o.has(t.key))throw new Error(`The record type ${e.key} has a field key it cannot use: ${JSON.stringify(t.key)}.`);if(!WR.includes(t.kind))throw new Error(`The field ${t.key} of ${e.key} has no kind ${JSON.stringify(t.kind)}.`);o.add(t.key)}return{key:e.key,label:e.label.trim(),fields:e.fields.map(t=>({...t}))}}function Z9(e){let o=e.map(zR);for(let t of o)pg.set(t.key,t);o.length&&(mg+=1)}function Q9(){return[NR,...pg.values()]}function J9(){return mg}function GR(e){let o=e?.[_R];return typeof o!="string"?ia:o.trim()||ia}function oc(e){return GR(e)===ia}var tc="product",UR="tyre";var $R="productType",qR={[tc]:"alloy-wheel",[UR]:"tyre"},jR=["alloy-wheel","tyre"];function xg(e,o){return oc(o)?KR(o)??qR[e]??null:null}function KR(e){if(!oc(e))return null;let o=e?.[$R];return typeof o=="string"&&jR.includes(o)?o:null}var Rl=null,Ig=null;function VR(e,o){Rl=e,Ig=o}function aj(e){VR(e,null)}function nj(){return Rl}function hg(){return Ig==="dynamic"||Rl===tc}function lj(e){return xg(Rl??"",e)??"alloy-wheel"}import{addShowWhenFacts as YR}from"efficient-shell/format";import{showWhenOf as rc,shownForOption as XR,truthy as ZR,withRowRules as QR,withRowsShownWhen as Al,withShowWhen as Bl}from"efficient-shell/format";var cj=YR;function yg(e,o,t){let r=!1,a={};for(let[n,s]of Object.entries(e))JR(rc(s),o??{},t)?a[n]=s:r=!0;return r?a:e}function bg(e,o,t,r){let a=Qa(o,t,r);return{device:e,parentType:a?.item.type,parent:a?.item.props}}function gg(e,o){if(!e||typeof e!="object")return!1;let t=e;if(typeof t.context=="string"&&(t.context===o||t.context.startsWith(`${o}.`)))return!0;if("not"in t)return gg(t.not,o);for(let r of[t.all,t.any])if(Array.isArray(r)&&r.some(a=>gg(a,o)))return!0;return!1}function hj(e,o={}){return eA({parentType:()=>e.parent?.type??void 0,parent:()=>e.parent?.props??void 0,dynamicPage:()=>hg(),root:()=>e.appState?.data?.root?.props,...o})}var Cg=["one","side","stacked"];var yj={one:"One",side:"Side by side",stacked:"Stacked"};function wg(e){return Cg.includes(e)?e:"one"}function Sg(e){return e==="one"?1:2}function oA(e,o){if(Cg.includes(e))return e;let t=wg(o);return t==="side"?"stacked":t}function ac(e){let o=wg(e.mediaLayout);return Math.max(Sg(o),Sg(oA(e.mediaLayoutPhone,o)))}var fa=["media","image","image2"],pr={media:"Media",image:"Image",image2:"Image 2"},ca={media:"heroMedia",image:"heroImage",image2:"heroImage2"};function Dl(e,o){return e==="image"&&ac(o)>1?"Image 1":pr[e]}var wj="Video file",vj="Upload a video file";function tA(e,o){return{field:"mediaType",is:e,default:o}}var rA=new Set(["HeroSingle"]),vg="heroPart";function aA(e,o){return{...o,[vg]:e}}function kj(e,{parts:o={},onlyFor:t,fallback:r,rules:a}){let n={...e};for(let s of["image","video"])for(let i of t[s])n[i]=Bl(n[i],tA(s,r));for(let[s,i]of Object.entries(a??{}))i&&(n[s]=Bl(n[s],i));for(let s of fa)for(let i of o[s]??[])n[i]=aA(s,n[i]);return n}function nA(e){let o=e?.[vg];return fa.includes(o)?o:null}function kg(e,o){let t={};for(let[r,a]of Object.entries(e))nA(a)===o&&(t[r]=a);return t}function Tg(e){if(!rA.has(e.type))return[];let o=[{part:"media",label:pr.media,depth:0}];return(e.props.mediaType??"image")!=="video"&&(o.push({part:"image",label:Dl("image",e.props),depth:1}),ac(e.props)>1&&o.push({part:"image2",label:Dl("image2",e.props),depth:1})),o}function da(e,o){return`${e}::${o}`}function Pg(e){if(!e)return null;let o=e.lastIndexOf("::");if(o<=0)return null;let t=e.slice(o+2);return fa.includes(t)?{nodeId:e.slice(0,o),part:t}:null}var Tj="data-sf-hero-part";import{jsx as Z,jsxs as nt,Fragment as os}from"react/jsx-runtime";import{useState as rb}from"react";import{useEasel as M_}from"efficient-easel/easel";import{headWords as lb,InspectorHead as H_,InspectorIconButton as od}from"efficient-easel/chrome";import{DuplicateIcon as ab,TrashIcon as W_}from"efficient-easel/icons";import{panelFieldsOf as z_}from"efficient-easel/screen/lib/puck/panel-fields";import{jsx as T,Fragment as K,jsxs as Y}from"react/jsx-runtime";import{BlockBannerIcon as iA,BlockBoxIcon as fA,BlockButtonIcon as cA,BlockDividerIcon as Eg,BlockFooterIcon as Og,BlockHeadingIcon as dA,BlockProductIcon as uA,BlockSocialIcon as pA,BlockTextIcon as mA,ChatIcon as xA,GridIcon as IA,ImageIcon as lc,MediaIcon as hA,PageIcon as gA}from"efficient-easel/icons";import{jsx as nc,Fragment as lA,jsxs as sA}from"react/jsx-runtime";var Fg=sA(lA,{children:[nc("circle",{cx:"9",cy:"20",r:"1.3"}),nc("circle",{cx:"18",cy:"20",r:"1.3"}),nc("path",{d:"M2.5 3.5h3l2.3 11.3a1.6 1.6 0 0 0 1.6 1.3h8.1a1.6 1.6 0 0 0 1.6-1.2L21 7H6"})]});var yA={header:Y(K,{children:[T("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),T("path",{d:"M3 9.5h18"})]}),website:Y(K,{children:[T("circle",{cx:"12",cy:"12",r:"9"}),T("path",{d:"M3 12h18M12 3c2.6 2.7 2.6 15.3 0 18M12 3c-2.6 2.7-2.6 15.3 0 18"})]}),social:Y(K,{children:[T("circle",{cx:"6",cy:"12",r:"2.5"}),T("circle",{cx:"18",cy:"6",r:"2.5"}),T("circle",{cx:"18",cy:"18",r:"2.5"}),T("path",{d:"M8.2 10.8l7.6-3.6M8.2 13.2l7.6 3.6"})]}),ticker:Y(K,{children:[T("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),T("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),FooterLogo:Y(K,{children:[T("path",{d:"M4 15.5h6M4 18h4"}),T("path",{d:"M14 8.5l3 7 3-7"})]}),FooterMenu:T("path",{d:"M6 7h12M6 11h12M6 15h8M6 19h8"}),FooterGroup:Y(K,{children:[T("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",strokeDasharray:"3 2.5"}),T("path",{d:"M8 9h8M8 13h8M8 16h5"})]}),FooterText:T("path",{d:"M5 7h14M5 12h14M5 17h9"}),FooterEmailSignup:Y(K,{children:[T("rect",{x:"3",y:"6",width:"18",height:"12",rx:"2"}),T("path",{d:"M3.5 7l8.5 6 8.5-6"})]}),SearchBlock:Y(K,{children:[T("circle",{cx:"11",cy:"11",r:"6"}),T("path",{d:"M20 20l-4.2-4.2"})]}),CartBlock:Fg,CountrySwitchBlock:Y(K,{children:[T("circle",{cx:"12",cy:"12",r:"8.5"}),T("path",{d:"M3.5 12h17M12 3.5c2.6 2.4 3.6 5.2 3.6 8.5s-1 6.1-3.6 8.5M12 3.5c-2.6 2.4-3.6 5.2-3.6 8.5s1 6.1 3.6 8.5"})]}),AccountBlock:Y(K,{children:[T("circle",{cx:"12",cy:"8",r:"4"}),T("path",{d:"M4.5 20c.8-3.8 3.8-6 7.5-6s6.7 2.2 7.5 6"})]}),ThemeSwitchBlock:Y(K,{children:[T("circle",{cx:"12",cy:"12",r:"8.5"}),T("path",{d:"M12 3.5v17M12 5.5l6 6M12 10.5l5.2 5.2M12 15.5l2.8 2.8"})]}),LegalLineBlock:Y(K,{children:[T("path",{d:"M3 9h18"}),T("path",{d:"M3 14h8M14 14h2M18 14h3"})]}),Hero:Y(K,{children:[T("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),T("path",{d:"M7 13.5h7M7 16.5h10"})]}),HeroSlide:Y(K,{children:[T("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),T("path",{d:"M7 15h6M16 9.5h.01M9.5 12l-2.5 3"})]}),HeroSingle:Y(K,{children:[T("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),T("path",{d:"M10.5 8.5l4 2.5-4 2.5z"}),T("path",{d:"M7 17h7"})]}),Collections:Y(K,{children:[T("rect",{x:"3",y:"5",width:"4.6",height:"14",rx:"1.3"}),T("rect",{x:"9.7",y:"5",width:"4.6",height:"14",rx:"1.3"}),T("rect",{x:"16.4",y:"5",width:"4.6",height:"14",rx:"1.3"})]}),CollectionCard:Y(K,{children:[T("rect",{x:"6",y:"4",width:"12",height:"16",rx:"2"}),T("path",{d:"M9 15h6M9 17.5h4"})]}),AlloyWheelsListing:Y(K,{children:[T("path",{d:"M3 5h5M3 9h5M3 13h5M3 17h5"}),T("rect",{x:"11.5",y:"5",width:"4.2",height:"5",rx:"1"}),T("rect",{x:"17.3",y:"5",width:"4.2",height:"5",rx:"1"}),T("rect",{x:"11.5",y:"12",width:"4.2",height:"5",rx:"1"}),T("rect",{x:"17.3",y:"12",width:"4.2",height:"5",rx:"1"})]}),CatalogFilterBar:Y(K,{children:[T("path",{d:"M3 7h9M15.5 7H21"}),T("circle",{cx:"13.5",cy:"7",r:"1.7"}),T("path",{d:"M3 12h4M10.5 12H21"}),T("circle",{cx:"8.5",cy:"12",r:"1.7"}),T("path",{d:"M3 17h9M15.5 17H21"}),T("circle",{cx:"13.5",cy:"17",r:"1.7"})]}),ProductGrid:Y(K,{children:[T("rect",{x:"3",y:"5",width:"4.8",height:"6",rx:"1"}),T("rect",{x:"9.6",y:"5",width:"4.8",height:"6",rx:"1"}),T("rect",{x:"16.2",y:"5",width:"4.8",height:"6",rx:"1"}),T("rect",{x:"3",y:"13",width:"4.8",height:"6",rx:"1"}),T("rect",{x:"9.6",y:"13",width:"4.8",height:"6",rx:"1"}),T("rect",{x:"16.2",y:"13",width:"4.8",height:"6",rx:"1"})]}),RelatedProducts:Y(K,{children:[T("path",{d:"M3 5h10"}),T("rect",{x:"3",y:"9.5",width:"5",height:"9",rx:"1"}),T("rect",{x:"9.5",y:"9.5",width:"5",height:"9",rx:"1"}),T("rect",{x:"16",y:"9.5",width:"5",height:"9",rx:"1"})]}),Gallery:Y(K,{children:[T("rect",{x:"3",y:"4",width:"11",height:"16",rx:"2"}),T("rect",{x:"15.5",y:"4",width:"5.5",height:"7.5",rx:"1.5"}),T("rect",{x:"15.5",y:"12.5",width:"5.5",height:"7.5",rx:"1.5"})]}),GalleryB:Y(K,{children:[T("rect",{x:"3.5",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),T("rect",{x:"13",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),T("rect",{x:"3.5",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"}),T("rect",{x:"13",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"})]}),GalleryItem:Y(K,{children:[T("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"}),T("circle",{cx:"9",cy:"10",r:"1.6"}),T("path",{d:"M20 15.5l-4.5-4L7 19"})]}),Events:Y(K,{children:[T("rect",{x:"4",y:"5",width:"16",height:"15",rx:"2"}),T("path",{d:"M4 9.5h16M8.5 3v4M15.5 3v4M8 14h2M14 14h2"})]}),PostCard:Y(K,{children:[T("rect",{x:"4",y:"3.5",width:"16",height:"17",rx:"2"}),T("rect",{x:"6.5",y:"6",width:"11",height:"6",rx:"1"}),T("path",{d:"M6.5 14.5h11M6.5 17.5h7"})]}),Manifesto:Y(K,{children:[T("path",{d:"M7 8h3.2v4c0 1.6-1 2.6-3 3.2"}),T("path",{d:"M14 8h3.2v4c0 1.6-1 2.6-3 3.2"})]}),Stats:Y(K,{children:[T("path",{d:"M3.5 20h17"}),T("path",{d:"M6 20v-7M11 20V7M16 20v-5M20.5 20v-9"})]}),Logos:Y(K,{children:[T("circle",{cx:"6",cy:"12",r:"2.6"}),T("rect",{x:"10",y:"9.4",width:"5.2",height:"5.2",rx:"1.2"}),T("path",{d:"M19 9.2l2.4 5h-4.8z"})]}),Ticker:Y(K,{children:[T("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),T("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),SectionHeader:Y(K,{children:[T("rect",{x:"3.5",y:"6",width:"5",height:"5",rx:"1.2"}),T("path",{d:"M11 8.5h9M3.5 15.5h17"})]}),IntroBleed:Y(K,{children:[T("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),T("path",{d:"M3 13.5h18M7 16.8h6"})]}),Split:Y(K,{children:[T("rect",{x:"3",y:"5",width:"8",height:"14",rx:"1.5"}),T("path",{d:"M14 8.5h6M14 12h6M14 15.5h4"})]}),Eyebrow:Y(K,{children:[T("path",{d:"M4 8.5h4.5M11 8.5h9"}),T("path",{d:"M4 14.5h16"})]}),HeroGroup:Y(K,{children:[T("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2"}),T("path",{d:"M7 9h8M7 12.5h10M7 16h6"})]}),Form:Y(K,{children:[T("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),T("path",{d:"M6.5 9h11M6.5 12.5h11"}),T("rect",{x:"6.5",y:"15",width:"6.5",height:"2.6",rx:"1.3"})]}),LogoBlock:T(K,{children:T("path",{d:"M12 3.5l7.5 3.2v5.1c0 4.2-3.2 7.1-7.5 8.7-4.3-1.6-7.5-4.5-7.5-8.7V6.7z"})}),Spacer:Y(K,{children:[T("path",{d:"M12 4v6M9.5 6.5L12 4l2.5 2.5M12 20v-6M9.5 17.5L12 20l2.5-2.5"}),T("path",{d:"M5 13h14",strokeDasharray:"2 2.5"})]}),ContactRouting:Y(K,{children:[T("rect",{x:"3",y:"4",width:"5",height:"5",rx:"1"}),T("rect",{x:"9.5",y:"4",width:"5",height:"5",rx:"1"}),T("rect",{x:"16",y:"4",width:"5",height:"5",rx:"1"}),T("path",{d:"M4 13.5h11M4 17.5h7"}),T("path",{d:"M17 15l3 2-3 2"})]}),CustomHTML:T("path",{d:"M9 8l-4 4 4 4M15 8l4 4-4 4"})},bA=T("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2.5"}),SA={footer:Og,Footer:Og,Divider:Eg,FooterDivider:Eg,Banner:iA,Flex:fA,FooterSocial:pA,page:gA,chat:xA,Heading:dA,Text:mA,ImageBlock:lc,ButtonBlock:cA,Grid:IA,ProductRef:uA,heroMedia:hA,heroImage:lc,heroImage2:lc},CA={MenuBlock:"FooterMenu",EmailFormBlock:"FooterEmailSignup",SocialLogosBlock:"FooterSocial",SiteHeader:"header",SiteFooter:"footer"};function Rt({type:e,size:o=16,className:t}){let r=CA[e]??e,a=SA[r];return a?T(a,{size:o,className:t}):T("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.7,strokeLinecap:"round",strokeLinejoin:"round",className:t,"aria-hidden":"true",children:yA[r]??bA})}import{PanelHideButton as td}from"efficient-easel/screen/components/SidePanelHead";import{useEaselSession as G_}from"efficient-easel/screen/lib/session-context";import{jsx as oe,jsxs as ua,Fragment as wA}from"react/jsx-runtime";import{useEffect as vA,useId as Lg,useState as kA}from"react";import{IconPicker as TA}from"efficient-shell/ui";import{SettingsDefaultReset as PA,SettingsField as pa,SettingsSegmented as FA,SettingsSwitch as Rg}from"efficient-easel/panel";import*as EA from"efficient-easel/icons";import{ButtonIcon as OA,ButtonIconIcon as LA,EyeIcon as RA,PhoneIcon as AA,PlacementIcon as BA,TypeIcon as DA}from"efficient-easel/icons";var _A="Chat with us",NA="We usually reply within a few minutes",MA="Hi! Ask us anything \u2014 about a wheel, an order, or fitment. Leave your details and we\u2019ll reply.";function _l({label:e,value:o,placeholder:t,onCommit:r,multiline:a=!1,hint:n}){let[s,i]=kA(o);vA(()=>i(o),[o]);let f=()=>{s!==o&&r(s)};return oe(pa,{label:e,icon:oe(DA,{}),changed:o!=="",action:oe(ma,{label:e,changed:o!=="",onReset:()=>r("")}),hint:n,children:a?oe("textarea",{value:s,placeholder:t,rows:3,onChange:d=>i(d.target.value),onBlur:f,"aria-label":e}):oe("input",{type:"text",value:s,placeholder:t,onChange:d=>i(d.target.value),onBlur:f,onKeyDown:d=>{d.key==="Enter"&&d.currentTarget.blur()},"aria-label":e,autoComplete:"off"})})}function ma({label:e,changed:o,onReset:t}){return oe(PA,{words:X()?.panel,label:e,changed:o,onReset:t})}function HA({label:e,icon:o,checked:t,fallback:r,onChange:a,hint:n}){let s=Lg();return oe(pa,{label:e,labelId:s,icon:o,changed:t!==r,action:ua("span",{className:"inline-flex items-center gap-2",children:[oe(Rg,{checked:t,onChange:a,ariaLabelledBy:s}),oe(ma,{label:e,changed:t!==r,onReset:()=>a(r)})]}),hint:n})}function WA(e){let o=e.replace(/(^|-)([a-z])/g,(r,a,n)=>n.toUpperCase()),t=EA[`${o}Icon`];return t?oe(t,{size:16}):null}var zA=Pl.map(e=>({value:e,icon:WA(e)}));function GA(){let{theme:e}=V(),o=He(e).themes[0];return Lr(o)??o?.accent??""}function Ag(){let{chat:e,setChat:o}=Ol(),t=Lg(),r=GA(),a=e.launcherIcon?Fl(e.launcherIcon):ur;return ua(wA,{children:[oe(pa,{label:l("Show the chat bubble"),labelId:t,icon:oe(RA,{}),changed:!e.enabled,action:ua("span",{className:"inline-flex items-center gap-2",children:[oe(Rg,{checked:e.enabled,onChange:n=>o({enabled:n}),ariaLabelledBy:t}),oe(ma,{label:l("Show the chat bubble"),changed:!e.enabled,onReset:()=>o({enabled:!0})})]}),hint:e.enabled?l("The floating chat bubble shows in the corner of every page."):l("The chat bubble is hidden across the whole site.")}),ua(nf,{title:l("Look"),children:[oe(qe,{label:l("Button color"),icon:oe(OA,{}),changed:e.launcherColor!=="",value:e.launcherColor,inherited:r,caption:e.launcherColor?void 0:l("Site button color"),onChange:n=>o({launcherColor:n}),onReset:()=>o({launcherColor:""})}),oe(pa,{label:l("Icon"),icon:oe(LA,{}),changed:a!==ur,action:oe(ma,{label:l("Icon"),changed:a!==ur,onReset:()=>o({launcherIcon:""})}),children:oe(TA,{label:l("Icon"),value:a,options:zA,onChange:n=>o({launcherIcon:n===ur?"":n})})}),oe(pa,{label:l("Position"),icon:oe(BA,{}),changed:e.launcherPosition!==Lt,action:oe(ma,{label:l("Position"),changed:e.launcherPosition!==Lt,onReset:()=>o({launcherPosition:Lt})}),children:oe(FA,{options:[{label:l("Right"),id:"right"},{label:l("Left"),id:"left"}],value:e.launcherPosition,ariaLabel:l("Position"),onChange:n=>o({launcherPosition:n})})}),oe(_l,{label:l("Label"),value:e.launcherLabel,placeholder:l("Icon only"),onCommit:n=>o({launcherLabel:n}),hint:l("Shows when a visitor points at the button")}),oe(HA,{label:l("Show on phones"),icon:oe(AA,{}),checked:e.showOnPhones,fallback:El.showOnPhones,onChange:n=>o({showOnPhones:n})})]}),ua(nf,{title:l("Wording"),children:[oe(_l,{label:l("Title"),value:e.title,placeholder:_A,onCommit:n=>o({title:n})}),oe(_l,{label:l("Subtitle"),value:e.subtitle,placeholder:NA,onCommit:n=>o({subtitle:n})}),oe(_l,{label:l("Greeting message"),value:e.greeting,placeholder:MA,onCommit:n=>o({greeting:n}),multiline:!0}),oe("p",{className:"es-field-hint sf-hint-keep",children:l("Leave a field blank to use the built-in wording.")})]})]})}import{jsx as At,Fragment as Fc,jsxs as Mg}from"react/jsx-runtime";import{useEffect as gB,useId as _g,useState as Ng}from"react";import{SettingsField as yB}from"efficient-easel/panel";import{jsx as fB}from"react/jsx-runtime";import{forwardRef as UA,createElement as sc}from"react";var Bg={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};var U=(e,o,t,r)=>{let a=UA(({color:n="currentColor",size:s=24,stroke:i=2,title:f,className:d,children:p,...m},x)=>sc("svg",{ref:x,...Bg[e],width:s,height:s,className:["tabler-icon",`tabler-icon-${o}`,d].filter(Boolean).join(" "),...e==="filled"?{fill:n}:{strokeWidth:i,stroke:n},...m},[f&&sc("title",{key:"svg-title"},f),...r.map(([I,y])=>sc(I,y)),...Array.isArray(p)?p:[p]]));return a.displayName=`${t}`,a};var $A=[["path",{d:"M7 10v4h3v7h4v-7h3l1 -4h-4v-2a1 1 0 0 1 1 -1h3v-4h-3a5 5 0 0 0 -5 5v2h-3",key:"svg-0"}]],ic=U("outline","brand-facebook","BrandFacebook",$A);var qA=[["path",{d:"M3 7a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v10a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4l0 -10",key:"svg-0"}],["path",{d:"M8.5 12a3.5 3.5 0 1 0 7 0a3.5 3.5 0 0 0 -7 0",key:"svg-1"}],["path",{d:"M17 7v.01",key:"svg-2"}]],fc=U("outline","brand-instagram","BrandInstagram",qA);var jA=[["path",{d:"M21 10.663c0 -4.224 -4.041 -7.663 -9 -7.663s-9 3.439 -9 7.663c0 3.783 3.201 6.958 7.527 7.56c1.053 .239 .932 .644 .696 2.133c-.039 .238 -.184 .932 .777 .512c.96 -.42 5.18 -3.201 7.073 -5.48c1.304 -1.504 1.927 -3.029 1.927 -4.715v-.01",key:"svg-0"}]],cc=U("outline","brand-line","BrandLine",jA);var KA=[["path",{d:"M8 11v5",key:"svg-0"}],["path",{d:"M8 8v.01",key:"svg-1"}],["path",{d:"M12 16v-5",key:"svg-2"}],["path",{d:"M16 16v-3a2 2 0 1 0 -4 0",key:"svg-3"}],["path",{d:"M3 7a4 4 0 0 1 4 -4h10a4 4 0 0 1 4 4v10a4 4 0 0 1 -4 4h-10a4 4 0 0 1 -4 -4l0 -10",key:"svg-4"}]],dc=U("outline","brand-linkedin","BrandLinkedin",KA);var VA=[["path",{d:"M8 20l4 -9",key:"svg-0"}],["path",{d:"M10.7 14c.437 1.263 1.43 2 2.55 2c2.071 0 3.75 -1.554 3.75 -4a5 5 0 1 0 -9.7 1.7",key:"svg-1"}],["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-2"}]],uc=U("outline","brand-pinterest","BrandPinterest",VA);var YA=[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]],pc=U("outline","brand-telegram","BrandTelegram",YA);var XA=[["path",{d:"M21 7.917v4.034a9.948 9.948 0 0 1 -5 -1.951v4.5a6.5 6.5 0 1 1 -8 -6.326v4.326a2.5 2.5 0 1 0 4 2v-11.5h4.083a6.005 6.005 0 0 0 4.917 4.917",key:"svg-0"}]],mc=U("outline","brand-tiktok","BrandTiktok",XA);var ZA=[["path",{d:"M16.5 10c3.038 0 5.5 2.015 5.5 4.5c0 1.397 -.778 2.645 -2 3.47l0 2.03l-1.964 -1.178a6.649 6.649 0 0 1 -1.536 .178c-3.038 0 -5.5 -2.015 -5.5 -4.5s2.462 -4.5 5.5 -4.5",key:"svg-0"}],["path",{d:"M11.197 15.698c-.69 .196 -1.43 .302 -2.197 .302a8.008 8.008 0 0 1 -2.612 -.432l-2.388 1.432v-2.801c-1.237 -1.082 -2 -2.564 -2 -4.199c0 -3.314 3.134 -6 7 -6c3.782 0 6.863 2.57 7 5.785l0 .233",key:"svg-1"}],["path",{d:"M10 8h.01",key:"svg-2"}],["path",{d:"M7 8h.01",key:"svg-3"}],["path",{d:"M15 14h.01",key:"svg-4"}],["path",{d:"M18 14h.01",key:"svg-5"}]],xc=U("outline","brand-wechat","BrandWechat",ZA);var QA=[["path",{d:"M3 21l1.65 -3.8a9 9 0 1 1 3.4 2.9l-5.05 .9",key:"svg-0"}],["path",{d:"M9 10a.5 .5 0 0 0 1 0v-1a.5 .5 0 0 0 -1 0v1a5 5 0 0 0 5 5h1a.5 .5 0 0 0 0 -1h-1a.5 .5 0 0 0 0 1",key:"svg-1"}]],Ic=U("outline","brand-whatsapp","BrandWhatsapp",QA);var JA=[["path",{d:"M4 4l11.733 16h4.267l-11.733 -16l-4.267 0",key:"svg-0"}],["path",{d:"M4 20l6.768 -6.768m2.46 -2.46l6.772 -6.772",key:"svg-1"}]],hc=U("outline","brand-x","BrandX",JA);var eB=[["path",{d:"M2 8a4 4 0 0 1 4 -4h12a4 4 0 0 1 4 4v8a4 4 0 0 1 -4 4h-12a4 4 0 0 1 -4 -4v-8",key:"svg-0"}],["path",{d:"M10 9l5 3l-5 3l0 -6",key:"svg-1"}]],gc=U("outline","brand-youtube","BrandYoutube",eB);var oB=[["path",{d:"M18 2a1 1 0 0 1 .993 .883l.007 .117v4a1 1 0 0 1 -.883 .993l-.117 .007h-3v1h3a1 1 0 0 1 .991 1.131l-.02 .112l-1 4a1 1 0 0 1 -.858 .75l-.113 .007h-2v6a1 1 0 0 1 -.883 .993l-.117 .007h-4a1 1 0 0 1 -.993 -.883l-.007 -.117v-6h-2a1 1 0 0 1 -.993 -.883l-.007 -.117v-4a1 1 0 0 1 .883 -.993l.117 -.007h2v-1a6 6 0 0 1 5.775 -5.996l.225 -.004h3z",key:"svg-0"}]],yc=U("filled","brand-facebook-filled","BrandFacebookFilled",oB);var tB=[["path",{d:"M16 3a5 5 0 0 1 5 5v8a5 5 0 0 1 -5 5h-8a5 5 0 0 1 -5 -5v-8a5 5 0 0 1 5 -5zm-4 5a4 4 0 0 0 -3.995 3.8l-.005 .2a4 4 0 1 0 4 -4m4.5 -1.5a1 1 0 0 0 -.993 .883l-.007 .127a1 1 0 0 0 1.993 .117l.007 -.127a1 1 0 0 0 -1 -1",key:"svg-0"}]],bc=U("filled","brand-instagram-filled","BrandInstagramFilled",tB);var rB=[["path",{d:"M17 2a5 5 0 0 1 5 5v10a5 5 0 0 1 -5 5h-10a5 5 0 0 1 -5 -5v-10a5 5 0 0 1 5 -5zm-9 8a1 1 0 0 0 -1 1v5a1 1 0 0 0 2 0v-5a1 1 0 0 0 -1 -1m6 0a3 3 0 0 0 -1.168 .236l-.125 .057a1 1 0 0 0 -1.707 .707v5a1 1 0 0 0 2 0v-3a1 1 0 0 1 2 0v3a1 1 0 0 0 2 0v-3a3 3 0 0 0 -3 -3m-6 -3a1 1 0 0 0 -.993 .883l-.007 .127a1 1 0 0 0 1.993 .117l.007 -.127a1 1 0 0 0 -1 -1",key:"svg-0"}]],Sc=U("filled","brand-linkedin-filled","BrandLinkedinFilled",rB);var aB=[["path",{d:"M17 3.34a10 10 0 0 1 -8.512 18.023l2.364 -5.315a3.5 3.5 0 0 0 2.398 .952c2.708 0 4.75 -2.089 4.75 -5a6 6 0 1 0 -11.64 2.041a1 1 0 1 0 1.88 -.682a4 4 0 1 1 7.76 -1.36c0 1.818 -1.156 3.001 -2.75 3.001c-.609 0 -1.153 -.361 -1.478 -1.022l1.142 -2.572a1 1 0 0 0 -1.828 -.812l-4.392 9.882a10 10 0 0 1 -4.694 -8.476l.005 -.324a10 10 0 0 1 14.995 -8.336",key:"svg-0"}]],Cc=U("filled","brand-pinterest-filled","BrandPinterestFilled",aB);var nB=[["path",{d:"M16.083 2h-4.083a1 1 0 0 0 -1 1v11.5a1.5 1.5 0 1 1 -2.519 -1.1l.12 -.1a1 1 0 0 0 .399 -.8v-4.326a1 1 0 0 0 -1.23 -.974a7.5 7.5 0 0 0 1.73 14.8l.243 -.005a7.5 7.5 0 0 0 7.257 -7.495v-2.7l.311 .153c1.122 .53 2.333 .868 3.59 .993a1 1 0 0 0 1.099 -.996v-4.033a1 1 0 0 0 -.834 -.986a5.005 5.005 0 0 1 -4.097 -4.096a1 1 0 0 0 -.986 -.835z",key:"svg-0"}]],wc=U("filled","brand-tiktok-filled","BrandTiktokFilled",nB);var lB=[["path",{d:"M18.497 4.409a10 10 0 0 1 -10.36 16.828l-.223 -.098l-4.759 .849l-.11 .011a1 1 0 0 1 -.11 0l-.102 -.013l-.108 -.024l-.105 -.037l-.099 -.047l-.093 -.058l-.014 -.011l-.012 -.007l-.086 -.073l-.077 -.08l-.067 -.088l-.056 -.094l-.034 -.07l-.04 -.108l-.028 -.128l-.012 -.102a1 1 0 0 1 0 -.125l.012 -.1l.024 -.11l.045 -.122l1.433 -3.304l-.009 -.014a10 10 0 0 1 1.549 -12.454l.215 -.203a10 10 0 0 1 13.226 -.217m-8.997 3.09a1.5 1.5 0 0 0 -1.5 1.5v1a6 6 0 0 0 6 6h1a1.5 1.5 0 0 0 0 -3h-1l-.144 .007a1.5 1.5 0 0 0 -1.128 .697l-.042 .074l-.022 -.007a4.01 4.01 0 0 1 -2.435 -2.435l-.008 -.023l.075 -.041a1.5 1.5 0 0 0 .704 -1.272v-1a1.5 1.5 0 0 0 -1.5 -1.5",key:"svg-0"}]],vc=U("filled","brand-whatsapp-filled","BrandWhatsappFilled",lB);var sB=[["path",{d:"M8.267 3a1 1 0 0 1 .73 .317l.076 .092l4.274 5.828l5.946 -5.944a1 1 0 0 1 1.497 1.32l-.083 .094l-6.163 6.162l6.262 8.54a1 1 0 0 1 -.697 1.585l-.109 .006h-4.267a1 1 0 0 1 -.73 -.317l-.076 -.092l-4.276 -5.829l-5.944 5.945a1 1 0 0 1 -1.497 -1.32l.083 -.094l6.161 -6.163l-6.26 -8.539a1 1 0 0 1 .697 -1.585l.109 -.006h4.267z",key:"svg-0"}]],kc=U("filled","brand-x-filled","BrandXFilled",sB);var iB=[["path",{d:"M18 3a5 5 0 0 1 5 5v8a5 5 0 0 1 -5 5h-12a5 5 0 0 1 -5 -5v-8a5 5 0 0 1 5 -5zm-9 6v6a1 1 0 0 0 1.514 .857l5 -3a1 1 0 0 0 0 -1.714l-5 -3a1 1 0 0 0 -1.514 .857z",key:"svg-0"}]],Tc=U("filled","brand-youtube-filled","BrandYoutubeFilled",iB);var aV="outline",Nl={fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},cB={},Pc={fillRule:"evenodd"},dB=[["path",{...Nl,d:"M21 4L3 11L7 13L9 19L12 15L17 20z"}],["path",{...Pc,d:"M21 4L3 11L7 13L9 19L12 15L17 20zM15.212 8.939 10.576 13.576 11.424 14.424 16.061 9.788z"}]],uB=[["path",{...Nl,d:["M21 10.663c0 -4.224 -4.041 -7.663 -9 -7.663s-9 3.439 -9 7.663","c0 3.783 3.201 6.958 7.527 7.56c1.053 .239 .932 .644 .696 2.133","c-.039 .238 -.184 .932 .777 .512c.96 -.42 5.18 -3.201 7.073 -5.48","c1.304 -1.504 1.927 -3.029 1.927 -4.715v-.01z"].join("")}],["path",{...cB,d:["M21 10.663c0 -4.224 -4.041 -7.663 -9 -7.663s-9 3.439 -9 7.663","c0 3.783 3.201 6.958 7.527 7.56c1.053 .239 .932 .644 .696 2.133","c-.039 .238 -.184 .932 .777 .512c.96 -.42 5.18 -3.201 7.073 -5.48","c1.304 -1.504 1.927 -3.029 1.927 -4.715v-.01z"].join("")}]],pB=[["path",{...Nl,d:["M16.5 10c3.038 0 5.5 2.015 5.5 4.5c0 1.397 -.778 2.645 -2 3.47l0 2.03l-1.964 -1.178","a6.649 6.649 0 0 1 -1.536 .178c-3.038 0 -5.5 -2.015 -5.5 -4.5s2.462 -4.5 5.5 -4.5z"].join("")}],["path",{...Nl,d:["M8.319 15.972L7.84 15.918L7.349 15.832L6.865 15.715L6.388 15.568L4 17L4 14.199","L3.559 13.775L3.197 13.356L2.877 12.91L2.603 12.439L2.376 11.946L2.201 11.433","L2.079 10.902L2.016 10.405L2.001 9.897L2.036 9.386L2.12 8.889L2.25 8.405L2.425 7.937","L2.642 7.486L2.9 7.055L3.195 6.645L3.459 6.333L3.744 6.037L4.05 5.757L4.377 5.495","L4.723 5.25L5.086 5.025L5.467 4.819L5.864 4.634L6.275 4.471L6.701 4.331L7.139 4.214","L7.589 4.122L8.05 4.055L8.521 4.014L9.352 4.007L9.815 4.04L10.269 4.098L10.713 4.181","L11.146 4.287L11.567 4.416L11.975 4.567L12.369 4.739L12.748 4.932L13.112 5.143","L13.459 5.374L13.788 5.622L14.172 5.956L14.458 6.241L14.722 6.542L14.965 6.856","L15.217 7.237A8.35 7.35 0 0 0 8.319 15.972z"].join("")}],["path",{...Pc,d:["M8.319 15.972L7.84 15.918L7.349 15.832L6.865 15.715L6.388 15.568L4 17L4 14.199","L3.559 13.775L3.197 13.356L2.877 12.91L2.603 12.439L2.376 11.946L2.201 11.433","L2.079 10.902L2.016 10.405L2.001 9.897L2.036 9.386L2.12 8.889L2.25 8.405L2.425 7.937","L2.642 7.486L2.9 7.055L3.195 6.645L3.459 6.333L3.744 6.037L4.05 5.757L4.377 5.495","L4.723 5.25L5.086 5.025L5.467 4.819L5.864 4.634L6.275 4.471L6.701 4.331L7.139 4.214","L7.589 4.122L8.05 4.055L8.521 4.014L9.352 4.007L9.815 4.04L10.269 4.098L10.713 4.181","L11.146 4.287L11.567 4.416L11.975 4.567L12.369 4.739L12.748 4.932L13.112 5.143","L13.459 5.374L13.788 5.622L14.172 5.956L14.458 6.241L14.722 6.542L14.965 6.856","L15.217 7.237A8.35 7.35 0 0 0 8.319 15.972zM5.25 7.9a0.85 0.85 0 1 0 1.7 0","a0.85 0.85 0 1 0 -1.7 0zM8.25 7.9a0.85 0.85 0 1 0 1.7 0a0.85 0.85 0 1 0 -1.7 0z"].join("")}],["path",{...Pc,d:["M16.5 10c3.038 0 5.5 2.015 5.5 4.5c0 1.397 -.778 2.645 -2 3.47l0 2.03l-1.964 -1.178","a6.649 6.649 0 0 1 -1.536 .178c-3.038 0 -5.5 -2.015 -5.5 -4.5s2.462 -4.5 5.5 -4.5z","M14.15 14a0.85 0.85 0 1 0 1.7 0a0.85 0.85 0 1 0 -1.7 0zM17.15 14","a0.85 0.85 0 1 0 1.7 0a0.85 0.85 0 1 0 -1.7 0z"].join("")}]],mB=U("filled","brand-telegram-filled","BrandTelegramFilled",dB),xB=U("filled","brand-line-filled","BrandLineFilled",uB),IB=U("filled","brand-wechat-filled","BrandWechatFilled",pB),hB={instagram:{outline:fc,solid:bc},facebook:{outline:ic,solid:yc},tiktok:{outline:mc,solid:wc},youtube:{outline:gc,solid:Tc},x:{outline:hc,solid:kc},linkedin:{outline:dc,solid:Sc},pinterest:{outline:uc,solid:Cc},whatsapp:{outline:Ic,solid:vc},telegram:{outline:pc,solid:mB},line:{outline:cc,solid:xB},wechat:{outline:xc,solid:IB}};function Dg({platform:e,iconStyle:o,size:t}){let r=hB[e][o];return fB(r,{size:t,stroke:1.75,"aria-hidden":"true",focusable:"false"})}var bB={instagram:"instagram.com/yourshop",facebook:"facebook.com/yourshop",tiktok:"tiktok.com/@yourshop",youtube:"youtube.com/@yourshop",x:"x.com/yourshop",linkedin:"linkedin.com/company/yourshop",pinterest:"pinterest.com/yourshop",whatsapp:"wa.me/61400000000",telegram:"t.me/yourshop",line:"line.me/ti/p/~yourshop",wechat:"u.wechat.com/your-qr-code-link"};function SB({platform:e}){let{rows:o,saveLink:t}=la(),{value:r,error:a}=o[e],[n,s]=Ng(r),[i,f]=Ng(!1),d=_g(),p=_g();gB(()=>s(r),[r]);let m=async()=>{if(n.trim()===r){n!==r&&s(r);return}f(!0),await t(e,n),f(!1)},x=bu[e];return Mg(Fc,{children:[At(yB,{label:l(x),htmlFor:d,icon:At(Dg,{platform:e,iconStyle:"outline",size:18}),children:At("input",{id:d,type:"text",inputMode:"url",value:n,placeholder:bB[e],onChange:I=>s(I.target.value),onBlur:()=>{m()},onKeyDown:I=>{I.key==="Enter"&&I.currentTarget.blur(),I.key==="Escape"&&(s(r),I.currentTarget.blur())},"aria-invalid":a?!0:void 0,"aria-describedby":a?p:void 0,"aria-busy":i||void 0,autoComplete:"off",spellCheck:!1})}),a&&At("p",{id:p,className:"sf-note sf-note--error",role:"alert",children:a})]})}function Hg({unavailable:e}){let{canSave:o}=la();return!o&&e?At(Fc,{children:e}):Mg(Fc,{children:[At("p",{className:"es-field-hint sf-hint-keep",children:l("Paste a link to each profile. A platform left empty shows nothing on the site.")}),Ya.map(t=>At(SB,{platform:t},t))]})}import{jsx as xa,jsxs as CB}from"react/jsx-runtime";import{useId as wB,useMemo as vB}from"react";import{useEasel as kB}from"efficient-easel/easel";import{SettingsField as TB,SettingsSwitch as PB}from"efficient-easel/panel";import{EyeIcon as FB}from"efficient-easel/icons";var Wg=["","","","","",""];var EB="root:default-zone";function zg({heroId:e}){let{appState:o,dispatch:t}=kB(p=>p),r=o.data.content??[],a=r.findIndex(p=>p.props.id===e),n=a>=0?r[a]:null,s=n?n.props.showTicker??!0:!0,i=vB(()=>{let p=n?.props.tickerItems;return Array.isArray(p)?p:Wg.map(m=>({text:m}))},[n]),f=wB();if(!n)return xa("p",{className:"sf-note",children:l("This ticker\u2019s hero is no longer on the page.")});let d=p=>t({type:"replace",destinationZone:EB,destinationIndex:a,data:{...n,props:{...n.props,...p}}});return CB("div",{children:[xa(TB,{label:l("Show ticker"),labelId:f,icon:xa(FB,{}),action:xa(PB,{checked:s,onChange:p=>d({showTicker:p}),ariaLabelledBy:f})}),xa(uf,{label:df.label,icon:df.icon,items:i,placeholder:"item",onChange:p=>d({tickerItems:p}),markup:!0})]})}import{jsx as G,Fragment as Hc,jsxs as To}from"react/jsx-runtime";import{useContext as sD,useEffect as _c,useRef as iD,useState as py}from"react";import{FieldSelect as fD,InspectorField as cD}from"efficient-easel/fields";import{SettingsField as dD}from"efficient-easel/panel";import{InspectorUpLevel as Ul}from"efficient-easel/chrome";import{StylesIcon as uD,TypeIcon as pD}from"efficient-easel/icons";import{useEasel as mD}from"efficient-easel/easel";import{TextPartPanel as xD}from"efficient-easel/copy";import{Tooltip as ID}from"efficient-shell/ui";import{jsx as Ac,jsxs as NB}from"react/jsx-runtime";import{COPY_CELLS as Ia,CopyBox as MB}from"efficient-easel/copy";import{PaddingYIcon as HB,WidthIcon as WB}from"efficient-easel/icons";import{useSyncExternalStore as OB}from"react";import{decodePartId as LB}from"efficient-easel/draw";function mr(e,o){let t=nl(e);return t?.control==="textList"?o.rowKey===(t.itemKey??"text")?gI(t,o.index):null:kf(e)?.[o.rowKey]??null}function Ml(e,o,t){let r=e.node.props,{key:a,row:n}=to(e.propKey),s=n?YI(r,a,n,e.kind,o):KI(r,a,e.kind,o);return s?(t(e.zone,e.index,{...e.node,props:s}),!0):!1}var RB=["bold","italic","underline","strike","link","sup","sub"],AB=["bullet","number"];function Lc(e,o){return e?[...RB,...o?AB:[]]:[]}function Gg(e,o){let t=LB(e);if(!t?.propKey)return null;let{nodeId:r,propKey:a}=t,n=o.getItemById(r),s=o.getSelectorForId(r);if(!n||!s)return null;let{key:i,row:f}=to(a),d=o.components[n.type]?.fields?.[i],p=f?mr(d,f):d,m=rr(p);if(!m)return null;let x=n.props??{};if(f&&!(Array.isArray(x[i])&&f.index<x[i].length))return null;let I=f?Xr(x[i],f):x[i];return{node:n,selector:s,propKey:a,kind:m,stored:I,offPage:_n(p)}}function Ug(e,o){let t=Gg(e,o);if(!t||t.offPage)return null;let{text:r,hidden:a}=Jo(t.stored);if(a)return null;let n=rl(t.kind);return{partId:e,value:r,rules:Kt,multiline:n,offered:Lc(t.kind!=="plainText",n),write:s=>{let i=Gg(e,o);i&&Ml({node:i.node,propKey:i.propKey,kind:i.kind,zone:i.selector.zone,index:i.selector.index},s,o.replace)}}}function $g(e,o,t){return e?.isConnected&&e.getAttribute(ro)===t?e:o?.querySelector(`[${ro}="${BB(t)}"]`)??null}function BB(e){return e.replace(/["\\]/g,"\\$&")}function qg(e){let o=e.activeElement;return o?o.tagName==="IFRAME"||!!o.closest(".es-canvas"):!1}var Ec=null,Oc=new Set;function DB(){return Ec}function Rc(e){if(e!==Ec){Ec=e;for(let o of Oc)o()}}function _B(e){return Oc.add(e),()=>{Oc.delete(e)}}function jg(){return OB(_B,DB,()=>null)}var zB=["left","center","right","justify"];function Bc(e,o,t,r={}){let a=ea(e),n=(r.phone?e.sizePhone:void 0)??e.size??o.sizePx;return[r.phone?{...Ia.fontSize,value:e.sizePhone,styleValue:Math.round(o.sizePx),onChange:s=>t({sizePhone:s??null})}:{...Ia.fontSize,value:e.size,styleValue:Math.round(o.sizePx),onChange:s=>t({size:s??null})},{...Ia.lineHeight,value:a.lineHeight,styleValue:o.lineRatio,onChange:s=>t(s===void 0?{lineHeight:null,line:null}:{lineHeight:s})},{...Ia.letterSpacing,scale:n,value:a.letterSpacingEm,styleValue:o.letterEm,onChange:s=>t(s===void 0?{letterSpacing:null,letter:null}:{letterSpacing:s})},{...Ia.paragraphSpacing,value:e.paragraphSpacing,styleValue:0,onChange:s=>t({paragraphSpacing:s??null})},{key:"padding",name:l("Padding"),icon:Ac(HB,{}),unit:"px",step:Bf,shiftStep:10,min:Rf,max:Af,value:e.padding,styleValue:o.paddingPx,onChange:s=>t({padding:s??null})},{key:"width",name:l("Width"),icon:Ac(WB,{}),unit:"px",step:_f,shiftStep:100,min:Df,max:ot,value:e.width,styleValue:o.widthPx,onChange:s=>t({width:s??null})}]}function Kg({text:e,onTextChange:o,multiline:t,markup:r=!0,styled:a=!0,style:n,base:s,setValue:i,colors:f,placeholder:d,ariaLabel:p,head:m,typedOnCanvas:x=!1}){let I=Bc(n,s,i),y=Lc(r,t);return NB("div",{className:"sf-part-textbox",children:[m,Ac(MB,{value:e,onChange:o,multiline:t,placeholder:d,ariaLabel:p,rules:Kt,tools:y,barShows:x?"focus":"always",colors:r?f:[],align:a?{value:n.align??s.align,allow:zB,onChange:w=>i({align:w})}:void 0,letterCase:a?{value:n.case==="capitalize"?"":n.case??"",onChange:w=>i({case:w||null})}:void 0,cells:a?I:void 0})]})}import{UiIcon as my}from"efficient-easel/draw/client";import{jsx as Hl,Fragment as GB,jsxs as UB}from"react/jsx-runtime";import{Button as Vg,Dialog as $B}from"efficient-shell/ui";function Yg({styleName:e,onCancel:o,onConfirm:t}){return Hl($B,{open:!0,onClose:o,role:"alertdialog",size:"sm",title:l("Update {style}?",{style:e}),footer:UB(GB,{children:[Hl(Vg,{variant:"secondary",onClick:o,children:l("Cancel")}),Hl(Vg,{variant:"primary",onClick:t,children:l("Update style")})]}),children:Hl("p",{children:l("Every text on the site that follows {style} changes to look like this one. This text\u2019s own changes are cleared, and it keeps following {style}.",{style:e})})})}import{ScreenDocumentContext as hD}from"efficient-easel/screen/components/ScreenDocumentContext";import{usePreviewDevice as gD}from"efficient-easel/draw/client";import{jsx as qB}from"react/jsx-runtime";import{createContext as jB,useContext as KB,useMemo as VB,useState as YB}from"react";var XB={partStyle:null,setPartStyle:()=>{}},Xg=jB(XB);function eY({children:e}){let[o,t]=YB(null),r=VB(()=>({partStyle:o,setPartStyle:t}),[o]);return qB(Xg.Provider,{value:r,children:e})}function Zg(){return KB(Xg)}import{TEXT_FIELD_MARKER as yD}from"efficient-easel/draw";import{useSectionOps as bD}from"efficient-easel/screen/lib/puck/use-section-ops";var ZB="#9ca3af";function QB(e){return fn.map(o=>({key:o,name:wp[o],value:e?.[o]||ZB}))}function Wl(e){return QB(e).map(o=>({name:o.key,label:l(o.name),value:o.value}))}function Jg(e){let o={},t=e.ownerDocument,r=t?.defaultView;if(!t||!r)return o;let a=r.getComputedStyle(e),n=t.createElement("canvas").getContext("2d");for(let s of fn){let i=jt[s].replace(/^var\((--[\w-]+)\)$/,"$1"),f=a.getPropertyValue(i).trim();if(!f)continue;let d=Qg(f);!d&&n&&(n.fillStyle="#000000",n.fillStyle=f,d=Qg(String(n.fillStyle))),d&&(o[s]=d)}return o}function Qg(e){let o=e.trim().toLowerCase();if(/^#[0-9a-f]{6}$/.test(o))return o;if(/^#[0-9a-f]{3}$/.test(o))return`#${[...o.slice(1)].map(r=>r+r).join("")}`;let t=o.match(/^rgba?\(\s*(\d+)[\s,]+(\d+)[\s,]+(\d+)/);return t?`#${t.slice(1,4).map(r=>Math.min(255,Number(r)).toString(16).padStart(2,"0")).join("")}`:null}var ha="@name",ey="@body",oy="@value",lY={[ha]:"Name",[ey]:"Body",[oy]:"Value"},JB={TimelineTrack:{"entries.date":ha,"entries.title":ha,"entries.blurb":ey},Footprint:{"offices.city":ha},Stats:{"items.label":ha,"items.value":oy}};function eD(e){let{key:o,row:t}=to(e);return t?`${o}.${t.rowKey}`:null}function ty(e,o){if(!e)return o;let t=eD(o);return t?JB[e]?.[t]??o:o}import{useEaselHost as SD}from"efficient-easel/screen/lib/host";function oD(e){let o=new Set([...Object.keys(un[e]??{}),...pn[e]??[]]);for(let[t,r]of Object.entries(ni[e]??{}))r.verb==="snapshot"&&o.add(t);return[...o].sort()}var tD={CollectionCard:"product",FooterMenu:"menu",Gallery:"product",GalleryItem:"product",ProductGrid:"product",ProductHero:"product",SpecTable:"product",Events:"blog",FeaturedCover:"blog",LongRead:"blog",SubscribeBlogs:"blog"},ry={product:"Synced from the product.",blog:"Synced from the blog post.",menu:"Synced from the site menu."},ay="Open",ny={product:{type:"storefront-editor:open-product",needsSlug:!0},blog:{type:"storefront-editor:open-post",needsSlug:!0},menu:{type:"storefront-editor:open-menus",needsSlug:!1}};function ga(e){let o=e?.source?.slug;return typeof o=="string"&&o.length>0?o:void 0}function ya(e){return tD[e]??null}function ly(e,o){let t=ya(e);return t&&oD(e).includes(o)?t:null}function zl(e){let o=e?.menu?.id;return typeof o=="string"&&o.length>0?o:void 0}var sy="data-sf-spec-region";function dY(e,o,t){if(!e)return;let r=t[e];if(r)return{fontFamily:`var(--font-role-${e})`,fontSize:`var(--size-${r}, ${o.builtIn})`}}function xr(e){let o=/var\(--size-[A-Za-z]+, ?([0-9.]+px)\)/.exec(e);if(!o)throw new Error(`builtInOf: no --size-* fallback in ${e}`);return o[1]}function rD(e){return`@${e}`}function Dc(e,o){if(!o.startsWith("@"))return null;let t=o.slice(1);return t in e?t:null}function aD(e,o){return o&&o in e?o:null}var ba={tag:"text-[length:var(--size-label,13px)]",name:"text-[length:min(var(--size-headingMedium,48px),var(--sf-heading-max,9999px))]",namePhone:"max-[800px]:text-[length:min(var(--size-headingMedium,36px),var(--sf-heading-max,9999px))]",body:"text-[length:var(--size-body,14px)]",price:"text-[length:var(--size-label,15px)]",link:"text-[length:var(--size-label,14px)]"},nD={tag:{label:"Tag",follows:"Labels",builtIn:xr(ba.tag),writable:!0},name:{label:"Name",follows:"Heading 2",builtIn:xr(ba.name),writable:!0},body:{label:"Body",follows:"Body",builtIn:xr(ba.body),writable:!0},price:{label:"Price",follows:"Labels",builtIn:xr(ba.price),writable:!0},link:{label:"Link",follows:"Labels",builtIn:xr(ba.link),writable:!0}},iy=nD;var lD={number:{label:"Number",follows:"Labels",builtIn:"14px",writable:!0},question:{label:"Question",follows:"Body",builtIn:"18px",writable:!0},answer:{label:"Answer",follows:"Body",builtIn:"15px",writable:!0}},fy=lD;var yY=sy;var cy={rowLabel:{label:"Spec row name",follows:"Labels",builtIn:"14px"},rowValue:{label:"Spec row value",follows:"Labels",builtIn:"14px"},diagramTitle:{label:"Diagram title",follows:"Labels",builtIn:"12px"},diagramCallout:{label:"Diagram measurement",follows:"Labels",builtIn:"12px"},diagramStatLabel:{label:"Diagram stat name",follows:"Labels",builtIn:"11px"},diagramStatValue:{label:"Diagram stat value",follows:"Labels",builtIn:"11px"}};var dy={SpecTable:cy,FAQ:fy,Collections:iy};function uy(e){return e&&Object.hasOwn(dy,e)?dy[e]:null}function Mc(e){return e?l(e):null}function xy(e){return e.kind==="role"?ws[e.role]:e.kind==="custom"?"Custom":null}function CD(e){let o=e.role;return o&&Oo.includes(o)?{kind:"role",role:o}:null}function wD(e,o){if(!e)return{kind:"unread"};let{faceRole:t,base:r}=e;if(o[t]===r.fontKey)return{kind:"role",role:t};let a=Object.keys(o).filter(n=>o[n]===r.fontKey);return a.length===1?{kind:"role",role:a[0]}:{kind:"custom"}}function Nc(e,o,t,r){return CD(ml(e,o))??wD(t,r)}function vD(e,o){if(!e.length)return null;let t=o(e[0]);return e.every(r=>o(r)===t)?t:null}var Gl="";function kD({face:e,base:o,onPick:t}){let r=e.kind==="role"?e.role:Gl,a=[{label:l("No style"),value:Gl},...Oo.map(n=>({label:l(ws[n]),value:n}))];return G(fD,{ariaLabel:l("Style"),value:r,options:a,inline:!0,onChange:n=>t(n===Gl?null:n),renderOption:n=>n.value===Gl?To(Hc,{children:[G("span",{className:"es-fsel-label sf-part-style-keep",children:n.label}),G("span",{className:"sf-part-style-aside","aria-hidden":"true",children:l("Section\u2019s own")})]}):G("span",{className:"es-fsel-label",style:{fontFamily:`var(--font-role-${n.value})`},children:n.label}),renderValue:()=>G("span",{style:{fontFamily:o?.fontKey?`var(${zt(o.fontKey)?.cssVar})`:void 0,fontWeight:o?.weight},children:Mc(xy(e))}),valueText:n=>Mc(xy(e))??n?.label??""})}function TD({sectionName:e,onBack:o,textEditor:t,styleRow:r,children:a}){return To("div",{className:"sf-part-panel",children:[G(Ul,{inline:!0,name:l(e),onSelect:o}),t,r,a]})}function $l({source:e,slug:o,menuId:t}){let r=SD(),a=ny[e],n=!a.needsSlug||!!o;return G("div",{className:"sf-note sf-note--source",children:To("p",{className:"es-field-hint sf-hint-keep",children:[l(ry[e]),n?To(Hc,{children:[" ",G("button",{type:"button",className:"sf-source-open",onClick:()=>{a.type==="storefront-editor:open-menus"?r.send(a.type,{menuId:t??null}):o&&r.send(a.type,{slug:o})},children:l(ay)})]}):null]})})}var Iy=4,PD=120;function FD({region:e,sizePx:o,face:t,base:r,onFollowStyle:a,source:n,slug:s,onBack:i}){let f=e.follows;return To("div",{className:"sf-note",children:[G("p",{children:G("strong",{children:l(e.label)})}),G("p",{children:o?l("Its size follows Styles \u25B8 {follows} \u2014 {px}px right now.",{follows:l(f),px:Math.round(o)}):l("Its size follows Styles \u25B8 {follows}.",{follows:l(f)})}),a?G(Hc,{children:G(dD,{label:l("Style"),icon:G(uD,{}),hint:l("Every {part} in this section follows it. The face and the size change; the letter case is the section\u2019s own and stays as it is.",{part:l(e.label).toLowerCase()}),children:G(kD,{face:t,base:r,onPick:a})})}):G("p",{className:"es-field-hint sf-hint-keep",children:l("Only the size follows a site style. This section sets its own font, weight and letter case.")}),n?G($l,{source:n,slug:s}):null,G(Ul,{inline:!0,name:l("Page"),onSelect:i})]})}function ED({onBack:e}){return To("div",{className:"sf-note",children:[G("p",{children:G("strong",{children:l("This part is no longer here.")})}),G("p",{children:l("The section it belonged to has been changed or removed.")}),G(Ul,{inline:!0,name:l("Page"),onSelect:e})]})}function OD({onBack:e,partId:o,why:t}){return To("div",{className:"sf-note",children:[G("p",{children:G("strong",{children:l("This part's settings did not open.")})}),G("p",{children:l("The words are still on your page and nothing has been lost. The editor could not work out which control belongs to them, which is a fault on our side. Go back and click the section to open its settings instead.")}),G("p",{className:"sf-note-detail",children:To("code",{children:[o," \u2014 ",t]})}),G(Ul,{inline:!0,name:l("Page"),onSelect:e})]})}function hy({nodeId:e,propKey:o,onBack:t,onEditStyle:r}){let{getItemById:a,getSelectorForId:n,config:s}=mD(_=>_),i=bD(),f=jg(),{partStyle:d}=Zg(),{fonts:p,textStyles:m}=V(),x=sD(hD),I=!x?.capabilities?.hasSiteTheme,{persist:y}=Vt({themeFromDocument:I,tokenRef:x?.tokenRef,siteId:x?.siteId??null}),w=Il({themeFromDocument:I,persist:y}),[v,k]=py(!1),C=gD()==="mobile",g=iD(null),b=a(e),O=n(e),F=b?s.components[b.type]:void 0,{key:L,row:P}=to(o),M=F?.fields?.[L],z=P?mr(M,P):M,B=il(e,o),A=b?.props??{},W=rr(z),D=_n(z),te=th(z),ie=b?ya(b.type):null,de=b?ly(b.type,L):null,lo=P?Xr(A[L],P):A[L],so=!!P&&!(Array.isArray(A[L])&&P.index<A[L].length);_c(()=>{qg(document)||g.current?.querySelector(".es-copy [contenteditable='true'], .es-copy textarea, .sf-copybox textarea, .sf-copybox input")?.focus()},[B]);let[Le,io]=py(0);_c(()=>io(0),[B]);let _e=!!b&&!so&&(!O||!z);_c(()=>{if(!_e||Le>=Iy)return;let _=setTimeout(()=>io(Ie=>Ie+1),PD);return()=>clearTimeout(_)},[_e,Le]);let Te=_e&&Le<Iy;if(!b||so)return G(ED,{onBack:t});let xe=uy(b.type),he=xe?Dc(xe,o):null;if(xe&&he){let _=d?.partId===B?d:null,Ie=xe[he],xo=Ie.writable===!0&&!!O,Go=Cs=>{O&&i.replaceComponent(O.zone,O.index,{...b,props:sr(A,o,"role",Cs)})};return G(FD,{region:Ie,sizePx:_?.base.sizePx??null,face:Nc(A,o,_,p),base:_?.base??null,onFollowStyle:xo?Go:void 0,source:ie,slug:ga(A),onBack:t})}if(!O||!z)return Te?G("div",{className:"sf-note","aria-busy":"true"}):G(OD,{onBack:t,partId:B,why:O?"no field":"no selector"});let Ne=_=>{i.replaceComponent(O.zone,O.index,{...b,props:_})},Pe=_=>{if(Jo(_).hidden!==Jo(lo).hidden||!W){let Ie=P?Tf(A,L,P,_):{...A,[L]:_};Ie&&Ne(Ie);return}Ml({node:b,propKey:o,kind:W,zone:O.zone,index:O.index},Jo(_).text,i.replaceComponent)},fo=lo,Me=d?.partId===B?d:null,Ge=Me?.styleOwner,co=Ge?a(Ge.owner):null,uo=Ge&&co?n(Ge.owner):null,Fo=!!(Ge&&co&&uo),Ve=Fo?co.props??{}:A,po=Fo?_=>i.replaceComponent(uo.zone,uo.index,{...co,props:_}):Ne,E=Fo?Ge.kind:ty(b?.type,o),$=ml(Ve,E),q=[{partKey:E,face:Nc(Ve,E,Me,p),sizeGroup:Me?.sizeGroup??null,base:Me?.base??RD,style:$}],Re=vD(q,_=>_.sizeGroup),mo=Wl(Me?.inks),Ye=(_,Ie)=>{let xo=Ve;for(let Go of q)xo=sr(xo,Go.partKey,_,Ie);po(xo)},Ht=_=>_?Ye("textStyle",_):Fe({textStyle:null,role:null}),Fe=_=>{let Ie=Ve;for(let xo of q)for(let[Go,Cs]of Object.entries(_))Ie=sr(Ie,xo.partKey,Go,Cs??null);po(Ie)},Eo=W==="text"||W==="textarea",{text:qa,hidden:Wt}=Jo(lo),ja=z?.[yD]?.label??o,$d=Wt?l("Show {label} on the slide",{label:l(ja)}):l("Hide {label} on the slide",{label:l(ja)}),qd=To("div",{className:"sf-field-head",children:[G(pD,{}),G("span",{className:"sf-field-label sf-field-label--inline",children:l(ja)}),Eo&&G(ID,{content:$d,children:G("button",{type:"button",className:"sf-field-eye","aria-pressed":Wt,"aria-label":$d,onClick:()=>Pe({text:qa,hidden:!Wt}),children:Wt?G(my,{name:"eye-off",size:14}):G(my,{name:"eye",size:14})})})]}),jd=!D&&te,pw=!!W&&(rI(z)||D||Wt||!te),Kd=Nc(Ve,E,Me,p),mw=Kd.kind==="role"?Kd.role:null,Ss=uh($)??kh(mw),Vd=tt(w.saved,w.old),xw=Object.entries($).filter(([_,Ie])=>_!=="role"&&_!=="textStyle"&&Ie!==void 0).length,Iw=()=>{let _=Ve;for(let Ie of q){let{role:xo,textStyle:Go}=Ie.style;_=hh(_,Ie.partKey),xo&&(_=sr(_,Ie.partKey,"role",xo)),Go&&(_=sr(_,Ie.partKey,"textStyle",Go))}po(_)},it=Ss,hw=Th(q[0].style),gw=it?Vd.find(_=>_.id===it)?.name??it:"",yw=()=>{k(!1),it&&(w.write(Ph({saved:w.saved,old:w.old,styleId:it,values:Uf(q[0].style)}),!0),Iw())};return To(TD,{sectionName:F?.label??b.type,onBack:t,textEditor:G("div",{ref:g,className:"sf-part-text",children:pw?G(Kg,{text:qa,onTextChange:_=>Pe(Eo?{text:_,hidden:Wt}:_),multiline:rl(W),markup:W!=="plainText",styled:!1,style:q[0].style,base:q[0].base,setValue:Fe,colors:mo,placeholder:Mc(jI(z))??void 0,ariaLabel:l(ja),head:qd,typedOnCanvas:f===B}):W?Eo?qd:null:G(cD,{field:z,name:o,value:fo,onChange:Pe,id:`sf-part-${e}-${o}`})}),children:[de&&G($l,{source:de,slug:ga(A),menuId:zl(A)}),jd&&G(xD,{style:{value:Ss??"",options:[{value:"",label:l("No style"),description:l("Section\u2019s own")},...Vd.map(_=>({value:_.id,label:_.name,description:_.values.font?zt(_.values.font)?.label:void 0}))],onChange:_=>Ht(_||null),changed:xw>0,onEditStyles:r,onUpdateStyle:it&&hw?()=>k(!0):void 0},font:{value:$.font??"",styleValue:zt(q[0].base.fontKey)?.label,options:Xe.map(_=>({label:_.label,value:_.key})),onChange:_=>Ye("font",_||null)},italic:{value:$.italic,styleValue:LD(m,Ss),onChange:_=>Ye("italic",_??null)},cells:Bc(q[0].style,q[0].base,Fe,{phone:C}),align:{value:$.align??"",styleValue:q[0].base.align,onChange:_=>Ye("align",_||null)},letterCase:{value:$.case??"",styleValue:q[0].base.case,onChange:_=>Ye("case",_||null)}}),v&&it&&G(Yg,{styleName:gw,onCancel:()=>k(!1),onConfirm:yw}),jd&&Re===null&&G("p",{className:"es-field-hint sf-hint-keep",children:l("Fixed size \u2014 the site\u2019s Text setting doesn\u2019t resize this.")})]})}function LD(e,o){return!o||!Array.isArray(e)?!1:e.find(t=>t?.id===o)?.values?.italic===!0}var RD={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:ot};import{jsx as ao,jsxs as Wc,Fragment as AD}from"react/jsx-runtime";import{useCallback as BD,useRef as DD,useState as Sa}from"react";import{InspectorIconButton as _D}from"efficient-easel/chrome";import{PopupMenu as ND,PopupMenuItem as MD,PopupMenuLabel as ql}from"efficient-shell/ui";import{CopyToPageIcon as HD}from"efficient-easel/icons";import{useEaselSession as WD}from"efficient-easel/screen/lib/session-context";import{cloneNodeWithFreshIds as zD}from"efficient-easel/screen/lib/puck/section-doc";import{FOOTER_TYPE as GD}from"efficient-easel/draw";function gy({node:e,currentSlug:o,siteId:t,tokenRef:r,runAuthed:a,onNotify:n}){let[s,i]=Sa(!1),[f,d]=Sa(null),p=WD(),[m,x]=Sa(!1),[I,y]=Sa(null),w=DD(null),[v,k]=Sa(null),C=BD(async()=>{if(p.usesBridgedToken&&!r.current){x(!0);return}try{d(await Se(p).pages.list(t?{siteId:t}:void 0))}catch{x(!0)}},[r,t,p]),g=()=>{if(s){i(!1);return}let F=w.current?.getBoundingClientRect();F&&k({top:F.bottom+6,right:Math.max(8,window.innerWidth-F.right)}),d(null),x(!1),C(),i(!0)},b=(f??[]).filter(F=>F.slug!==o),O=async F=>{if(I)return;y(F.slug);let L=zD(e),P=p.documentHooks?.storedNode?.(L)??L,M=Se(p).pages,z=await a(async()=>{let B=await M.load({id:F.id});if(!B)throw new Error(`Page "${F.slug}" no longer exists.`);let A=B.layout??{},W=Array.isArray(A.content)?[...A.content]:[],D=W.findIndex(te=>te?.type===GD);W.splice(D===-1?W.length:D,0,P),await M.save(F.id,{layout:{root:{},zones:{},...A,content:W}},{version:B.version,clientId:""})});y(null),i(!1),n?.(z?l("Duplicated to \u201C{name}\u201D",{name:F.label}):l("Couldn\u2019t duplicate the section \u2014 please retry"),z?"success":"error")};return Wc(AD,{children:[ao("span",{"data-menu-toggle":!0,style:{display:"contents"},children:ao(_D,{buttonRef:w,label:l("Duplicate to another page"),hasPopup:"menu",expanded:s,onClick:g,children:ao(HD,{size:15})})}),s&&v&&ao(ND,{portal:!0,style:{top:v.top,right:v.right},onClose:()=>i(!1),children:Wc("div",{role:"menu","aria-label":l("Duplicate to page"),children:[ao(ql,{children:l("Duplicate to page")}),m?ao(ql,{children:l("Couldn\u2019t load pages")}):f===null?ao(ql,{children:l("Loading\u2026")}):b.length===0?ao(ql,{children:l("No other pages")}):b.map(F=>Wc(MD,{role:"menuitem",disabled:I!==null,onClick:()=>{O(F)},children:[ao("span",{className:"min-w-0 flex-1 truncate",children:F.label}),I===F.slug?ao("span",{className:"shrink-0 text-xs",children:l("Copying\u2026")}):F.draft&&ao("span",{className:"shrink-0 text-xs",children:l("draft")})]},F.id))]})})]})}import{useScreenDocument as U_}from"efficient-easel/screen/components/ScreenDocumentContext";import{useSectionOps as $_}from"efficient-easel/screen/lib/puck/use-section-ops";import{SELECTION_MODE as q_}from"efficient-easel/screen/lib/screen-parts";import{usePreviewParts as j_}from"efficient-easel/draw/client";import{jsx as Ca,jsxs as UD}from"react/jsx-runtime";import{SettingsDrill as $D}from"efficient-easel/panel";import{UiIcon as qD}from"efficient-easel/draw/client";var jD="Not shown on the page";function KD({part:e,onOpen:o}){return Ca($D,{name:l(e.label),preview:e.offPage?l(jD):e.preview||l("Empty"),offPage:e.offPage,status:e.hidden?Ca("span",{className:"sf-entry-eye",role:"img","aria-label":l("Hidden on the page"),children:Ca(qD,{name:"eye-off",size:14})}):void 0,onOpen:()=>o(e.key)})}function zc(e){return e.filter(o=>!o.identifier)}function yy({parts:e,onOpen:o,heading:t=!0}){let r=zc(e);return r.length?UD("div",{className:"sf-entries",children:[t?Ca("h3",{className:"sf-entries-head",children:l("Text")}):null,r.map(a=>Ca(KD,{part:a,onOpen:o},a.key))]}):null}import{HEADER_TYPE as K_,ROOT_ZONE as nb}from"efficient-easel/draw";import{HEADER_TYPE as De,FOOTER_TYPE as le,newNodeId as VD}from"efficient-easel/draw";function jl(){return{type:De,props:{id:VD(De)}}}var by=[{type:"FooterLogo",label:"Logo"},{type:"FooterMenu",label:"Menu"},{type:"FooterText",label:"Text"},{type:"FooterEmailSignup",label:"Email Form"},{type:"FooterSocial",label:"Social Logos"},{type:"FooterGroup",label:"Footer Box"},{type:"FooterDivider",label:"Divider"}],YD=by.filter(e=>e.type!=="FooterLogo"&&e.type!=="FooterGroup"),XD="FooterGroup",Sy="blocks";function Cy(e){return e===le?by:e===XD?YD:null}function Kl(){let e=(o,t)=>({type:o,props:{id:`${o}-${crypto.randomUUID()}`,...t}});return[e("FooterLogo",{widthPct:100,align:"left",tagline:""}),e("FooterGroup",{direction:"vertical",align:"start",blocks:[e("FooterText",{text:"Join our email list",size:"md",tone:"default"}),e("FooterEmailSignup",{heading:"",placeholder:"Email address",buttonLabel:"Subscribe"})]})]}var se="SiteHeader",ae="SiteFooter",Gc="sections",PX=[se,ae],Ir=e=>e===se||e===ae,wy=e=>`${e}:${Gc}`;function vy(e,o,t=[]){return{type:e,props:{id:o,[Gc]:t}}}var ZD=new Set(["Footer",se,ae]);function hr(e){let o=new Set,t=!1,r=e.filter(a=>{let n=a?.type??"";return n==="Header"?(t=!0,!1):ZD.has(n)?o.has(n)?(t=!0,!1):(o.add(n),!0):!0});return t?r:e}function Vl(e,o){return e.some(t=>t?.type===o.type)?e:o.type===se?[o,...e]:[...e,o]}var ky={[se]:{max:3,takes:["Flex","Ticker"]},[ae]:{max:6,takes:["Flex","Prose","Logos","Divider"]}};function Ty(e,o,t){if(!Ir(e))return!0;let r=ky[e];return t<r.max&&r.takes.includes(o)}function Py(e,o){let t=o,r=t?.props?.id;if(r==null)return null;let a=e?.content;if(!Array.isArray(a))return null;for(let n of a){if(!Ir(n?.type))continue;let s=n.props?.[Gc];if(!Array.isArray(s)||!s.some(f=>f?.props?.id===r))continue;let i=ky[n.type];return i.takes.includes(t?.type??"")?s.length>=i.max?{group:n.type,why:"full"}:null:{group:n.type,why:"type"}}return null}function Uc(e){switch(e?.type){case se:case ae:return l("On every page");case De:case le:return l("On every page \xB7 old style");default:return null}}var Fy=()=>null,Ey=()=>l("Changed on every page");function Yl(e,o){let t=Ku(e,o);if(t)return t;let r=Py(e,o);if(!r)return null;let a=r.group===se;return r.why==="type"?a?l("The header cannot take another one of these"):l("The footer cannot take another one of these"):a?l("The header holds at most 3 sections"):l("The footer holds at most 6 sections")}import{jsx as Ql,Fragment as l_,jsxs as s_}from"react/jsx-runtime";import{useState as i_}from"react";import{createNode as f_,newId as c_}from"efficient-easel/data";import{useEasel as d_}from"efficient-easel/easel";import{Banner as u_,Button as $c}from"efficient-shell/ui";import{useScreenDocument as p_}from"efficient-easel/screen/components/ScreenDocumentContext";var Xl="Flex",QD={FooterMenu:"MenuBlock",FooterEmailSignup:"EmailFormBlock",FooterSocial:"SocialLogosBlock"},JD=e=>{let{id:o,...t}=e;return t},Oy=e=>typeof e=="string"?e:"",Zl=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0,Ly={sm:12,md:13,lg:15},e_="md",Ry=1.5,o_={size:13,lineHeight:Ry,width:280},t_=14,r_=40,a_=e=>e==="center"||e==="right"?e:"left";function n_(e){let o={},t=[["padTop","sectionPaddingTop"],["padRight","sectionPaddingRight"],["padBottom","sectionPaddingBottom"],["padLeft","sectionPaddingLeft"]];for(let[r,a]of t){let n=Zl(e[r]);n&&(o[a]=n)}return o}function Ay(e,o){let t=e.props??{},r=QD[e.type];if(r)return[o(r,JD(t))];switch(e.type){case"FooterLogo":{let a=a_(t.align),n=o("LogoBlock",{...t.reverse?{reverse:t.reverse}:{},...typeof t.customColor=="string"&&t.customColor?{customColor:t.customColor}:{},heightPx:Math.round(Cu*((Zl(t.widthPct)??100)/100)),href:"/",align:a,...n_(t)}),s=Oy(t.tagline).trim();return s?[n,o("Text",{text:s,tone:"dim",align:a,_partStyles:{text:{...o_}}})]:[n]}case"FooterText":{let a=typeof t.size=="string"&&t.size in Ly?t.size:e_;return[o("Text",{text:Oy(t.text),tone:typeof t.tone=="string"?t.tone:"default",_partStyles:{text:{size:Ly[a],lineHeight:Ry}}})]}case"FooterDivider":{let a=Zl(t.thickness),n=Zl(t.lengthPct);return[o("Divider",{...a!==void 0?{thickness:a}:{},...n!==void 0?{lengthPct:n}:{},...t.hideOnMobile===!0?{hideOnMobile:!0}:{}})]}case"FooterGroup":{let a=Array.isArray(t.blocks)?t.blocks:[];return[o(Xl,{direction:t.direction==="horizontal"?"row":"column",gap:Gr("FooterGroup",t.gap),align:t.align==="center"||t.align==="end"?t.align:"start",content:a.flatMap(n=>Ay(n,o))})]}default:return[]}}function wa(e,o,t){let r=e&&Array.isArray(e.props?.blocks)?e.props.blocks:[],a=d=>o(Xl,{direction:"row",wrap:!0,share:"equal",gap:r_,content:d}),n=[],s=[];for(let d of r){let p=Ay(d,o);if(d.type==="FooterDivider"){s.length&&n.push(a(s)),s=[],n.push(...p);continue}p.length<=1?s.push(...p):s.push(o(Xl,{direction:"column",gap:t_,align:"stretch",content:p}))}(s.length||!n.length)&&n.push(a(s));let i=o(Xl,{direction:"column",content:[o("LegalLineBlock")]}),f=vy(ae,t,[...n,i]);return{...f,props:{...f.props,...e?.props?.width==="full"?{fullWidth:!0}:{}}}}function By(){let{appState:e,dispatch:o,config:t}=d_(p=>p),{readOnly:r}=p_(),[a,n]=i_(!1),s=e.data.content;if(r||s.some(p=>p.type===ae))return null;let i=s.find(p=>p.type===le)??null,f=(p,m)=>f_(t,p,m),d=()=>{let p=wa(i,f,c_(ae));o({type:"setData",data:m=>({...m,content:[...Vl(m.content,p)]}),recordHistory:!0}),n(!1)};return Ql(u_,{tone:"info",title:l("This footer uses the old layout"),action:a?s_(l_,{children:[Ql($c,{variant:"primary",size:"sm",onClick:d,children:l("Switch now")}),Ql($c,{variant:"secondary",size:"sm",onClick:()=>n(!1),children:l("Cancel")})]}):Ql($c,{variant:"secondary",size:"sm",onClick:()=>n(!0),children:l("Switch to Box footer")}),children:l("Build this footer out of Boxes and blocks, like a page: the same menus, signup, social links and logo, with the copyright as a Legal Line. Your current footer is kept.")})}import{jsx as Jc}from"react/jsx-runtime";import{useLayoutEffect as E_,useMemo as Jy,useRef as O_,useState as Zc}from"react";import{useEasel as L_,useSelectedFields as R_}from"efficient-easel/easel";import{Inspector as A_,planFields as eb}from"efficient-easel/fields";import{jsx as gr}from"react/jsx-runtime";import{usePreviewDevice as m_}from"efficient-easel/draw/client";import{NoControlMark as Dy,noControlField as _y}from"efficient-easel/screen/lib/puck/panel-no-control-mark";var qc=e=>l(er[e==="content"?"page":"full"]),Ny=e=>`${e} ${l("from Styles")}`;function My(){let{siteWidth:e,sectionBackgroundWidth:o,sectionContentWidth:t}=V();return{px:typeof e=="number"?e:pe.default,background:o??"full",content:t??"content"}}function Hy(){try{return m_()==="mobile"}catch{return!1}}function x_({type:e,onChange:o}){let t=vo(),r=My(),a=Hy(),n=ji(e,t).background;return gr(ol,{value:n??r.background,changed:n!==null,detail:Ny(qc(r.background)),onChange:s=>o(s),onReset:()=>o($r),disabled:a})}function I_({type:e,onChange:o}){let t=vo(),[,r]=Wn("contentMax"),a=My(),n=Hy(),s=ji(e,t),i=(s.background??a.background)==="content",f=s.content??a.content;return gr(tl,{mode:i&&f==="full"?"content":f,px:s.contentMax??a.px,max:i?a.px:pe.max,changed:s.content!==null,detail:Ny(a.content==="full"?qc("full"):`${qc("content")} ${a.px}px`),fullClosed:i,disabled:n,hint:n?UI:i?WI:void 0,onMode:d=>{o(d),d==="full"&&r(null)},onPx:d=>{o("content"),r(d===a.px?null:d)},onReset:()=>{o($r),r(null)}})}function h_(e){return et({_gWidth:ve(HI),backgroundWidth:{type:"custom",render:({onChange:o})=>gr(x_,{type:e,onChange:o})},contentWidth:{type:"custom",render:({onChange:o})=>gr(I_,{type:e,onChange:o})},contentMax:{..._y({type:"custom",render:()=>gr(Dy,{})},"always"),reachedBy:"contentWidth"},widthMode:{..._y({type:"custom",render:()=>gr(Dy,{})},"always"),reachedBy:"backgroundWidth"}})}var Wy=Object.keys(h_(""));import{deviceField as g_,deviceMetaOf as Gy}from"efficient-easel/screen/lib/puck/device-fields";import{DESIGN_GROUPS as Kc,SETTINGS_BUCKETS as y_}from"efficient-easel/panel";import{BUCKET_KEY as We,DESIGN_GROUP_KEY as va}from"efficient-easel/screen/lib/puck/field-buckets";var ka=y_;var b_="Editor only \u2014 not shown live",Vc={"Archive link":"Content",Article:"Content",Blocks:"Content","Blog posts":"Content","Browser mock":"Content",Button:"Content","Call to action":"Content","Car prompt":"Content","Card link":"Content",Cards:"Content","Claims bars":"Content","Contact info":"Content",Content:"Content","Content source":"Content",Contents:"Content",Filters:"Content","Show on a card":"Content",Footnote:"Content",Form:"Content",Founders:"Content","Gallery A":"Content","Gallery B":"Content","Gallery link":"Content",Header:"Content","Header link":"Content","Image caption":"Content","In this issue":"Content",Items:"Content","Kanban columns":"Content",Lead:"Content","Left panel":"Content",Link:"Content",Links:"Content",List:"Content","Message form":"Content",Metadata:"Content",Milestones:"Content","Mockup card":"Content","Newsletter panel":"Content",Offices:"Content",Options:"Content","Others gallery":"Content","Overlay button":"Content",Product:"Content","Product page":"Content",Products:"Content","Pull quote":"Content",Questions:"Content","Recent issues":"Content","Recent posts":"Content",Reviews:"Content","Right panel \xB7 actions":"Content","Right panel \xB7 choices":"Content","Right panel \xB7 form":"Content","Routing groups":"Content",Rows:"Content",Search:"Content",Section:"Content","Section header":"Content",Sections:"Content","Signup form":"Content","Source product":"Content","Stat & note":"Content",Stats:"Content","Submit button":"Content","Success state":"Content",Wheel:"Content",Terminal:"Content",Text:"Content","Text column":"Content","Timeline entries":"Content","Top row":"Content",Total:"Content","Trailing note":"Content","\u201COther\u201D reason":"Content","Background images":"Design",Gallery:"Content",Image:"Content","Image column":"Content",Images:"Content",Logo:"Content",Media:"Content","Background image":"Design",Color:"Design","Image tint":"Design",Style:"Design",Shape:"Design",Texture:"Design","Text style":"Design",Motion:"Animation",Anchor:"Anchor",Arrangement:"Layout","Auto-slide":"Layout",Bar:"Layout","Cell width":"Size",Behavior:"Layout",Controls:"Layout",Diagram:"Layout",[b_]:"Layout","Filters shown":"Layout","Slide picker":"Layout",Arrows:"Layout","On a phone":"Layout",Nudge:"Position","Stick to top":"Position","Image gallery":"Layout",Grid:"Layout",Layout:"Layout",Padding:"Layout",Price:"Layout",Preview:"Layout",Setup:"Layout","Show / hide elements":"Layout","Show in the buy box":"Layout",Visibility:"Layout",Width:"Size",Height:"Size"},Uy={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},$y={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function jc(e,o,t){let r=`${e}.${o}`;return $y[r]??Uy[r]??Vc[t]}function qy(e){return e==="Animation"?[We.Animation]:[We.Design,va[e]]}function Jl(...e){let o=[];for(let t of e)for(let r of Object.values(t)){let a=Gy(r),n=No(a?a.inner:r),s=n?Vc[n.label]:void 0;if(s)for(let i of qy(s))o.includes(i)||o.push(i)}return o}var cZ=[...Jl(Un(),$n("full"),qn(),jn(),ff()),...Object.keys(Un()),...Object.keys($n("full")),...Object.keys(qn()),...Object.keys(jn()),...Object.keys(ff()),...Wy],dZ=[...Jl(Mn()),...Object.keys(Mn())],uZ=[...Jl(zn()),...Object.keys(zn())],pZ=[...Jl(Gn()),...Object.keys(Gn())],S_=Object.keys(yI()),C_=new Set(["cardImage","imageBackground"]),mZ=[...qy(jc("ProductGrid","_gCards","Cards")??"Design"),...S_.filter(e=>e.startsWith("_g")||C_.has(e))],xZ=Object.keys(bI()),IZ=Object.keys(SI({bottomDefault:!0})),w_={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","EmailFormBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","SocialLogosBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","SocialLogosBlock._gLayout":"duplicated the Layout bucket header above it (born tabbed, H.1)","SearchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CartBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.2)","CountrySwitchBlock._gStyle":"duplicated the Style bucket header above it (born tabbed with its Show as, 2026-10-17)","Split._gContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gVehicleContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gWheelContent":"duplicated the Content bucket header above it (2026-09-04)","Gallery._gOthersContent":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gHeadCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gLeftCopy":"duplicated the Content bucket header above it (2026-09-04)","Subscribe._gRightCopy":"duplicated the Content bucket header above it (2026-09-04)","CollectionCard._gContent":"duplicated the Content bucket header above it (A Card Sets Its Own Corners)","HeroSlide._gContent":"duplicated the Content bucket header above it (Hero Slide Tabs And Theme)","KeyFeatures._gContent":"duplicated the Content bucket header above it (66049)","KeyFeatures._gStyle":"duplicated the Style bucket header above it (66049)","ParagraphsA._gContent":"duplicated the Content bucket header above it (66049)","ParagraphsA._gStyle":"duplicated the Style bucket header above it (66049)","Chart._gContent":"duplicated the Content bucket header above it (66049)","Chart._gStyle":"duplicated the Style bucket header above it (66049)","Logos._gContent":"duplicated the Content bucket header above it (66049)","Logos._gStyle":"duplicated the Style bucket header above it (66049)","Mockup._gContent":"duplicated the Content bucket header above it (66049)","Mockup._gStyle":"duplicated the Style bucket header above it (66049)","Stats._gContent":"duplicated the Content bucket header above it (66049)","Stats._gStyle":"duplicated the Style bucket header above it (66049)","StatsParagraph._gContent":"duplicated the Content bucket header above it (66049)","StatsParagraph._gStyle":"duplicated the Style bucket header above it (66049)","Testimonials._gContent":"duplicated the Content bucket header above it (66049)","Testimonials._gStyle":"duplicated the Style bucket header above it (66049)","AppointmentBooking._gContent":"duplicated the Content bucket header above it (66050)","BookingBox._gContent":"duplicated the Content bucket header above it ([SPLIT] Booking Form Into Three Boxes) \u2014 the same fault its own section retired in 66050, one level down","FAQ._gContent":"duplicated the Content bucket header above it (66050, family sweep)","FAQ._gLayout":"duplicated the Layout bucket header above it (66050, family sweep)","Form._gContent":"duplicated the Content bucket header above it (66050)","ReviewForm._gContent":"duplicated the Content bucket header above it (66050)","SubmitBuild._gContent":"duplicated the Content bucket header above it (66050)","SubmitBox._gContent":"duplicated the Content bucket header above it ([SPLIT] SubmitBuild Keeps Its Two Columns) \u2014 the same fault its own section retired in 66050, one level down","CheckoutCTA._gContent":"duplicated the Content bucket header above it (66051)","CheckoutCTA._gLayout":"duplicated the Layout bucket header above it (66051)","DeliveryOptions._gContent":"duplicated the Content bucket header above it (66051)","DeliveryOptions._gLayout":"duplicated the Layout bucket header above it (66051)","OrderSummary._gContent":"duplicated the Content bucket header above it (66051)","OrderSummary._gLayout":"duplicated the Layout bucket header above it (66051)","PaymentBadges._gContent":"duplicated the Content bucket header above it (66051)","PaymentBadges._gLayout":"duplicated the Layout bucket header above it (66051)","Collections._gContent":"duplicated the Content bucket header above it (66052)","Collections._gLayout":"duplicated the Layout bucket header above it (66052)","DocMasthead._gContent":"duplicated the Content bucket header above it (66053)","Events._gContent":"duplicated the Content bucket header above it (66054)","Events._gLayout":"duplicated the Layout bucket header above it (66054)","FeaturedCover._gContent":"duplicated the Content bucket header above it (66054)","Series._gStyle":"duplicated the Style bucket header above it (66054)","Flex._gContent":"duplicated the Content bucket header above it (66055)","Flex._gLayout":"duplicated the Layout bucket header above it (66055)","SectionHeader._gContent":"duplicated the Content bucket header above it (66055)","Breadcrumb._gContent":"duplicated the Content bucket header above it (66056)","CategoryBar._gStyle":"duplicated the Style bucket header above it (66056)","Hero._gContent":"duplicated the Content bucket header above it (66056)","Hero._gStyle":"duplicated the Style bucket header above it (66056)","HeroSingle._gStyle":"duplicated the Style bucket header above it (66056)","IntroBleed._gContent":"duplicated the Content bucket header above it (66056)","IntroBleed._gLayout":"duplicated the Layout bucket header above it (66056)","BundleOffer._gLayout":"duplicated the Layout bucket header above it (66059)","ProcessSteps._gContent":"duplicated the Content bucket header above it (66059)","Banner._gContent":"duplicated the Content bucket header above it (66060.1)","Banner._gLayout":"duplicated the Layout bucket header above it, and governed no controls (66060.1)","Manifesto._gContent":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gHeadCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gLeftCopy":"duplicated the Content bucket header above it (66060.1)","SubscribeBlogs._gRightCopy":"duplicated the Content bucket header above it (66060.1)","Ticker._gContent":"duplicated the Content bucket header above it (66060.1)","Ticker._gStyle":"duplicated the Style bucket header above it (66060.1)","Timeline._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gContent":"duplicated the Content bucket header above it (66060.1)","TitleWithButtons._gStyle":"duplicated the Style bucket header above it (66060.1)","Cards._gContent":"duplicated the Content bucket header above it (66218)","Cards._gStyle":"duplicated the Style bucket header above it (66218)","Prose._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gContent":"duplicated the Content bucket header above it (66218)","Reviews._gStyle":"duplicated the Style bucket header above it (66218)"},jy={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},Ky={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{let e={...Un(),...$n("full"),...qn(),...jn(),...Mn(),...zn(),...Gn()};for(let o of Object.keys(Ky)){let t=No(e[o]),r=t?Vc[t.label]:void 0;if(!t||t.level!==2||!r||!jy[r].includes(t.label))throw new Error(`INJECTED_RETIRED (lib/puck/field-groups.ts) lists "${o}", but no uniform builder makes a level-2 heading by that key whose label repeats its place's word. The heading was renamed, moved or removed and the row is stale \u2014 a list that quietly matches nothing is worse than no list.`)}}var v_=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),k_=new Map([[We.Design,"Content"],[We.Animation,"Animation"],...Kc.map(e=>[va[e],e])]);function Vy(e){let o=new Set([...Object.values(We),va.Content]);for(let[t,r]of Object.entries(e))if(!o.has(t)&&No(r)?.level===1)return 1;return 2}function T_(e){let o=`${e}.`;return Object.keys(w_).filter(t=>t.startsWith(o)).map(t=>t.slice(o.length))}function P_(e,o){let t=Gy(e),r=ve(o);return t?g_(t.tier,r):r}function F_(e,o){let t=No(o);return t?e==="Content"||e==="Animation"?iI(o,t.label):fI(o):o}function zy(e){return e==="Design"?Kc:["Animation"]}function hZ(e,o){let t=[],r=new Set(T_(o)),a=new Set,n=!1,s=null;for(let[x,I]of Object.entries(e)){let y=No(I);if(v_.has(x))throw new Error(`${o}.${x}: that key was a tab header until efficient-web-builder 11.0.0, when the panel moved to two tabs (Design \xB7 Animation). Its tab is gone, so the key may not come back. Give the heading a key of the section's own (\`_g\u2026\`), or open a Design group with its own key (\`_dDesign: section("Design")\`, \`_dLayout: section("Layout")\`).`);let w=k_.get(x);if(w!==void 0){if(y?.level!==1)throw new Error(`${o}.${x}: that key is reserved for the ${w} heading of the settings panel, but this field is ${y?`a level-${y.level} "${y.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(x===We.Design||x===We.Animation)&&(n=!0),t.push(s={place:w,entries:[],adopted:!0});continue}if(!y){s||t.push(s={place:"Content",entries:[]}),s.entries.push([x,I]);continue}if(r.has(x)||x in Ky){let k=jc(o,x,y.label);if(y.level!==2||!k||!jy[k].includes(y.label))throw new Error(`${o}.${x}: ${r.has(x)?"RETIRED":"INJECTED_RETIRED"} (lib/puck/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${y.level} "${y.label}" header in the ${k??"(unclassified)"} place. Only a level-2 header whose label is one of its place's words (PLACE_WORDS) may be retired \u2014 anything else is a heading a merchant reads for its own sake. Fix the row or drop it.`);r.has(x)&&a.add(x),t.push(s={place:k,entries:[]});continue}let v=jc(o,x,y.label);if(!v)throw new Error(`${o}.${x}: the inspector group "${y.label}" is not classified in LABEL_GROUP (lib/puck/field-groups.ts), so there is no way to say which of ${[...Kc,"Animation"].join(" / ")} its controls belong under. Classify it \u2014 an unclassified group silently lands wherever it was declared, which is the whole bug.`);t.push(s={place:v,entries:[[x,y.level===2?I:P_(I,y.label)]]})}let i=new Set(Object.entries(e).filter(([,x])=>No(x)).map(([x])=>x));for(let[x,I]of[["BLOCK_KEY_GROUP",$y],["KEY_GROUP",Uy]]){let y=Object.keys(I).filter(w=>w.startsWith(`${o}.`)).filter(w=>!i.has(w.slice(o.length+1)));if(y.length)throw new Error(`${o}: ${x} (lib/puck/field-groups.ts) lists ${JSON.stringify(y)}, but no fold header by that key is in this section's panel. Either the heading was renamed or removed and the row is stale, or the row names the wrong key \u2014 an override that quietly matches nothing is worse than no override.`)}let f=n?[]:[...r].filter(x=>!a.has(x));if(f.length)throw new Error(`${o}: RETIRED (lib/puck/field-groups.ts) lists ${JSON.stringify(f)}, but this section has no such fold header${f.length>1?"s":""}. Either the heading was renamed or removed and the row is stale, or the row names the wrong section \u2014 a list that quietly matches nothing is worse than no list.`);let d=new Set(t.filter(x=>x.entries.length>0).map(x=>x.place)),p=ka.filter(x=>zy(x).some(I=>d.has(I))),m={};for(let x of p){m[We[x]]=Nn(x,x===p[0]?p:null);for(let I of zy(x)){if(!d.has(I))continue;let y=t.filter(v=>v.place===I),w=y.findIndex(v=>v.adopted);w>0&&y.unshift(...y.splice(w,1)),x==="Design"&&(m[va[I]]=af(I));for(let v of y)for(let[k,C]of v.entries)m[k]=F_(I,C)}}return m}function gZ(e){return We.Design in e?e:{[We.Design]:Nn("Design",null),[va.Content]:af("Content"),...e}}function yZ(e){return ka.some(o=>We[o]in e)}function bZ(e){let o=ka.filter(r=>We[r]in e);if(o.length===0)return e;let t={...e};for(let r of o)t[We[r]]=Nn(r,r===o[0]?o:null);return t}import{usePreviewDevice as B_}from"efficient-easel/draw/client";var Yc=" text",Yy="Text";function Xc(e){let o=e.rows.filter(t=>t.shown);return o.length===0||o.length===1&&o[0].labelled}function Xy(e){return e.filter(Xc).map(o=>o.key)}function Zy(e,o){let t=null;for(let r of o){let a=e[r];!a||a.marker!==!0||typeof a.fold!="string"||(t??={...e},t[r]={...a,fold:!1})}return t??e}function Qy(e,o){if(e.size!==o.size)return!1;for(let t of e)if(!o.has(t))return!1;return!0}var Qc=new Map,es=new Set;function D_(e,o){let t=new Map;for(let a of e.querySelectorAll(".es-insp-row[data-field]"))t.set(a.getAttribute("data-field")??"",a);let r=[];for(let[a,n]of o)r.push({key:a,rows:n.map(s=>{let i=t.get(s),f=!!i&&[...i.children].some(p=>!p.hidden),d=i?.querySelector(".es-field-label, .es-list-label")?.textContent?.trim();return{shown:f,labelled:f&&!!d}})});return r}var __=Object.fromEntries(ka.map(e=>{let o=nI[e];return[e,Jc(o,{},e)]}));function Ta({entries:e,entryCount:o=0,part:t=null}){let{id:r,fields:a,values:n,readOnly:s,onChange:i}=R_(),f=B_(),{appState:d,config:p}=L_(W=>W),m=bg(f,p,d.data.content??[],d.ui.itemSelector),x=kg(a,t),I=yg(x,n,m),[y,w]=Zc(()=>new Set(es)),[v,k]=Zc(()=>new Set),C=O_(null),g=Jy(()=>{let W=new Map;for(let D of eb(I).rows){if(!D.fold)continue;let te=W.get(D.fold.key)??[];te.push(D.name),W.set(D.fold.key,te)}return W},[I]);E_(()=>{let W=C.current?.parentElement;if(!W)return;let D=new Set(Xy(D_(W,g)));k(te=>Qy(te,D)?te:D)});let b=Jy(()=>Zy(I,v),[I,v]),O={key:Yc,rows:Array.from({length:o},()=>({shown:!0,labelled:!0}))},F=Xc(O)?void 0:{key:Yc,title:Yy},[L,P]=Zc(()=>Qc.get(r)),M=Qc.get(r),z=eb(I).buckets,B=M&&z.includes(M)?M:L&&z.includes(L)?L:z[0],A=B===void 0||lI(z,B)!==!0;return Jc(A_,{fields:b,values:n,onChange:i,readOnly:s,showWhenContext:{...m,node:n},tab:B,onTab:W=>{Qc.set(r,W),P(W)},tabIcons:__,idPrefix:r,ariaLabel:l("Section settings"),lead:A?e:null,leadFold:F,closedFolds:y,onFold:(W,D)=>{D?es.delete(W):es.add(W),w(new Set(es))},children:Jc("span",{ref:C,hidden:!0})})}import{jsx as ed,jsxs as N_}from"react/jsx-runtime";import{InspectorUpLevel as ob}from"efficient-easel/chrome";function tb({nodeId:e,part:o,sectionName:t,onUpToSection:r}){let{select:a}=Ll();return N_("div",{children:[o!=="media"?ed(ob,{inline:!0,name:l(pr.media),onSelect:()=>a(da(e,"media"))}):ed(ob,{inline:!0,name:l(t),onSelect:r}),ed(Ta,{part:o})]})}import{SettingsSwitch as V_}from"efficient-easel/panel";var sb=q_,ad={kind:"header"},nd={kind:"website"},ib={kind:"chat"},fb={kind:"social"},Pa="Part";function Y_(e){return l("Part of {name}",{name:l(e)})}function X_(e,o,t){let r=e.describeNode(o);return{name:t,kindLabel:r?Y_(r.label):l(Pa)}}function Z_(e){switch(e){case"Header":return{title:l("Header settings belong to a website."),own:l("Each website created from this template sets its own header afterwards.")};case"Appearance":return{title:l("Appearance settings belong to a website."),own:l("Each website created from this template sets its own appearance afterwards.")};case"Live chat":return{title:l("Live chat settings belong to a website."),own:l("Each website created from this template sets its own live chat afterwards.")};case"Social link":return{title:l("Social link settings belong to a website."),own:l("Each website created from this template sets its own social link afterwards.")};default:return{title:l("{what} settings belong to a website.",{what:e}),own:l("Each website created from this template sets its own {what} afterwards.",{what:e.toLowerCase()})}}}function cb({what:e}){let o=Z_(e);return nt("div",{className:"sf-note",children:[Z("p",{children:Z("strong",{children:o.title})}),nt("p",{children:[l("A template is a blueprint \u2014 it has no website of its own, so there is nothing here to change.")," ",o.own]})]})}function rd(e){let o=ca[e];return{name:pr[e],kindLabel:Pa,icon:o,head:(t,r)=>{if(t.kind!==o)return null;let a=r.describeNode(t.nodeId);if(!a)return null;let n=lb({name:l(Dl(e,a.props)),tier:"part",of:l(a.label)},{partOf:({name:s})=>l("Part of {name}",{name:s})});return{name:n.name,kindLabel:n.kind}},render:(t,r)=>t.kind===o?Z(tb,{nodeId:t.nodeId,part:e,sectionName:r.describeNode(t.nodeId)?.label??"Hero",onUpToSection:()=>r.onSelectNode(t.nodeId)}):null}}var Q_={header:{name:"Header",kindLabel:"Site settings",icon:"header",render:(e,o)=>{let t=o.hostPanels?.header;return t?Z(t,{placeholderMode:o.capabilities.placeholderFrames,tokenRef:o.tokenRef,siteId:o.siteId,websiteName:o.websiteName,onOpenWebsiteSettings:o.onOpenWebsiteSettings,onAuthExpired:()=>o.notifyParent("storefront-editor:auth-expired")}):null}},website:{name:"Appearance",kindLabel:"Site settings",icon:"website",render:(e,o)=>Z(hl,{themeFromDocument:!o.capabilities.hasSiteTheme,tokenRef:o.tokenRef,siteId:o.siteId,onNotify:o.onNotify})},chat:{name:"Live chat",kindLabel:"Site settings",icon:"chat",render:()=>Z(Ag,{})},social:{name:"Social links",kindLabel:"Site settings",icon:"social",render:()=>Z(Hg,{unavailable:Z(cb,{what:"Social link"})})},ticker:{name:sa,kindLabel:Pa,icon:"ticker",head:(e,o)=>e.kind==="ticker"?X_(o,e.heroId,l(sa)):null,render:e=>Z(zg,{heroId:e.kind==="ticker"?e.heroId:""})},heroMedia:rd("media"),heroImage:rd("image"),heroImage2:rd("image2"),part:{name:Pa,kindLabel:Pa,icon:"Text",head:(e,o)=>{if(e.kind!=="part")return null;let t=o.describeNode(e.nodeId);if(!t)return null;let{key:r,row:a}=to(e.propKey),n=a?mr(t.fields[r],a):t.fields[r],s=XI(l(Pf(cl(n??{},r))),a),i=lb({name:s,tier:"part",of:l(t.label)},{partOf:({name:f})=>l("Part of {name}",{name:f})});return{name:i.name,kindLabel:i.kind}},render:(e,o)=>e.kind==="part"?Z(hy,{nodeId:e.nodeId,propKey:e.propKey,onBack:()=>o.onSelectNode(e.nodeId),onEditStyle:o.onOpenSiteStyles}):null}},J_=new Set(["header","website","chat"]);function eN(e,o){if(e==="puck")return null;let t=Q_[e];return J_.has(e)&&!o.hasSiteSettings?{...t,kindLabel:"Not part of a template",render:()=>Z(cb,{what:t.name})}:t}function db({mode:e,onOpenWebsiteSettings:o,onOpenSiteStyles:t,onSelectNode:r,hideNodeActions:a=!1,onNotify:n,onHidePanel:s}){let{capabilities:i,tokenRef:f,notifyParent:d,currentSlug:p,siteId:m,runAuthed:x,readOnly:I,navigate:y}=U_(),w=wl(),{rows:v,reload:k}=aa(),C=v?.find($=>$.slug===p)??null,[g,b]=rb(null),{websiteName:O}=V(),F=$_({readOnly:I}),{select:L}=j_(),{selectedItem:P,getItemById:M,getSelectorForId:z,config:B,appState:A}=M_($=>$),W=z_(B,P?{type:P.type,props:P.props}:null),D=P?ah(W??B.components[P.type]?.fields,P.props):[],te=$=>B.components[$]?.label??$,ie=P?z(P.props.id):void 0,de=eN(e.kind,i),lo=G_(),so={capabilities:i,tokenRef:f,hostPanels:lo.chrome?.panels,describeNode:$=>{let q=M($);if(!q)return null;let Re=B.components[q.type];return{type:q.type,label:Re?.label??q.type,fields:Re?.fields??{},props:q.props??{}}},siteId:m,websiteName:O??null,notifyParent:d,onNotify:n,onOpenWebsiteSettings:o,onOpenSiteStyles:t,onSelectNode:r},Le=de?.head?.(e,so)??null,io=Le?.name??(de?l(de.name):P?l(te(P.type)):l("Page settings")),_e=Le?.kindLabel??(de?l(de.kindLabel):P?ie&&ie.zone!==nb?l("Block"):l("Section"):l("Page")),Te=de?de.icon:P?P.type:"page",xe=de?null:P?B.components[P.type]?.fields??null:B.root?.fields??null,he=xe?Vy(xe):2,Ne=e.kind==="puck"&&P?ya(P.type):null,Pe=!!P&&!!ie&&ie.zone===nb&&P.type!==le&&P.type!==K_,fo=Yl(A?.data,P),Me=()=>{fo||ie&&F.duplicateComponent(ie.zone,ie.index)},Ge=()=>{ie&&(F.removeComponent(ie.zone,ie.index),F.select(null))},co=P?B.components[P.type]?.defaultProps?.previewHover:void 0,uo=e.kind==="puck"&&!!P&&!!ie&&co!==void 0,Fo=uo&&P.props.previewHover===!0,Ve=()=>{!P||!ie||F.replaceComponent(ie.zone,ie.index,{...P,props:{...P.props,previewHover:!Fo}})},[po,E]=rb(Vf);return nt("div",{className:`es-sidepanel es-sidepanel--right sf-panel sf-panel--right${po||!(!de&&P)?"":" sf-hints-folded"}`,children:[Z(H_,{icon:Z(Rt,{type:Te,size:15}),name:io,kind:_e,actions:!a&&e.kind==="puck"&&P&&P.type!==le?nt(os,{children:[Z(od,{label:l("Duplicate section"),title:fo??void 0,disabled:fo!==null,onClick:Me,children:Z(ab,{size:15})}),Pe&&i.hasSiteSettings&&Z(gy,{node:P,currentSlug:p,siteId:m??void 0,tokenRef:f,runAuthed:x,onNotify:n}),Z(od,{label:l("Remove section"),danger:!0,onClick:Ge,children:Z(W_,{size:15})}),s?Z(td,{side:"right",onHide:s,divider:!0}):null]}):!de&&!P&&e.kind==="puck"&&w&&C&&Sl(C)?nt(os,{children:[Z(od,{label:l("Duplicate page"),onClick:()=>b(C),children:Z(ab,{size:15})}),s?Z(td,{side:"right",onHide:s,divider:!0}):null]}):s?Z(td,{side:"right",onHide:s}):void 0}),w&&Z(vl,{source:g,taken:new Set((v??[]).map($=>$.slug)),duplicate:w,onClose:()=>b(null),onDuplicated:$=>{b(null),k(),y({kind:"page",slug:$.slug,siteId:m??void 0})}}),uo&&nt("div",{className:"sf-preview-pin",children:[nt("div",{className:"sf-preview-pin-text",children:[Z("span",{className:"sf-preview-pin-label",children:l("Preview hover state")}),Z("span",{className:"sf-preview-pin-hint",children:l("not shown live")})]}),Z(V_,{checked:Fo,onChange:Ve,ariaLabel:l("Preview hover state")})]}),Z(kx,{tier:he,children:Z("div",{className:"sf-insp-body es-insp-body sf-scroll",children:de?de.render(e,so):P?nt(os,{children:[P.type===le&&i.hasSiteSettings&&Z(By,{}),Z(Bp,{children:Z(Ta,{entries:Z(yy,{parts:D,heading:!1,onOpen:$=>L(il(P.props.id,$))}),entryCount:zc(D).length})}),Ne&&Z($l,{source:Ne,slug:ga(P?.props),menuId:zl(P?.props)}),Z(Yf,{shown:po,onChange:E})]}):Z(os,{children:Z(Ta,{})})})})]})}import{jsx as c,jsxs as S,Fragment as Ib}from"react/jsx-runtime";var ye={dark:"var(--sf-thumb-bar-dark)",soft:"var(--sf-thumb-bar-light)",accent:"var(--sf-thumb-accent)",tint:"var(--sf-thumb-accent-tint)",block:"var(--sf-thumb-block)",line:"var(--sf-thumb-border)",card:"var(--sf-thumb-card)"},ld="repeating-linear-gradient(135deg,var(--sf-thumb-hatch1) 0,var(--sf-thumb-hatch1) 5px,var(--sf-thumb-hatch2) 5px,var(--sf-thumb-hatch2) 10px)";function R({w:e,h:o,tone:t="dark",r=2,style:a}){return c("div",{style:{width:e,height:o,borderRadius:r,background:ye[t],flex:"none",...a}})}var oN={Hero:"hero",HeroSingle:"herosingle",IntroBleed:"intro",Collections:"collections",AlloyWheelsListing:"wheelslisting",CatalogFilterBar:"catalogfilterbar",ProductGrid:"productgrid",FitmentFinder:"fitmentfinder",Gallery:"gallery",GalleryB:"gallerygrid",SpecStrip:"specstrip",ProductHero:"producthero",SpecTable:"spectable",ProcessSteps:"processsteps",DetailRows:"detailrows",FitmentTable:"fitmenttable",CompatibleTyres:"compatibletyres",TyreSizes:"tyresizes",TyreFitment:"tyrefitment",EuTyreLabel:"eutyrelabel",RelatedProducts:"productgrid",BundleOffer:"bundleoffer",OrderSummary:"ordersummary",DeliveryOptions:"deliveryoptions",PaymentBadges:"paymentbadges",CheckoutCTA:"checkoutcta",Manifesto:"manifesto",ParagraphsA:"paragraphs",Prose:"prose",StatsParagraph:"statsparagraph",Chart:"chart",Mockup:"mockup",Footprint:"footprint",Timeline:"timeline",TimelineTrack:"timelinetrack",TitleWithButtons:"titlewithbuttons",Split:"split",Cards:"cards",FAQ:"faq",Testimonials:"testimonials",Masthead:"masthead",Breadcrumb:"breadcrumb",CategoryBar:"categorybar",FeaturedCover:"featuredcover",LongRead:"longread",Series:"series",Subscribe:"subscribe",SubscribeBlogs:"subscribe",Events:"events",DocMasthead:"docmasthead",DocTabs:"doctabs",DocBody:"docbody",DocMetaCards:"docmetacards",Banner:"banner",Stats:"stats",KeyFeatures:"keyfeatures",Logos:"logos",Ticker:"ticker",Countdown:"countdown",Reviews:"reviews",SubmitBuild:"submitbuild",ReviewForm:"reviewform",Form:"form",AppointmentBooking:"appointmentbooking",ContactRouting:"contact",ContactLocations:"contactlocations",Header:"header",Footer:"footer",SectionHeader:"sectionheader",Grid:"grid",Flex:"blanksection",Spacer:"spacer",Divider:"divider",CustomHTML:"customhtml",Heading:"heading",Text:"text",ImageBlock:"image",ButtonBlock:"button",MenuBlock:"menu",EmailFormBlock:"emailform",SocialLogosBlock:"sociallogos",LegalLineBlock:"legalline",SearchBlock:"search",CartBlock:"cart",CountrySwitchBlock:"countryswitch"},N={position:"absolute",inset:0},u={ink:"var(--sf-thumb-ink)",ink2:"var(--sf-thumb-ink-2)",inkSoft:"var(--sf-thumb-ink-soft)",inkSoft2:"var(--sf-thumb-ink-soft-2)",paper:"var(--sf-thumb-paper)",paper2:"var(--sf-thumb-paper-2)",warm:"var(--sf-thumb-warm)",rust:"var(--sf-thumb-rust)",onInk:"var(--sf-thumb-on-ink)",text:"var(--sf-thumb-scene-text)",muted:"var(--sf-thumb-scene-muted)",rule:"var(--sf-thumb-scene-rule)",mark1:"var(--sf-thumb-mark-1)",mark2:"var(--sf-thumb-mark-2)",card:"var(--sf-thumb-card)",scrim:"var(--sf-thumb-scrim)"},fe=(e,o,t=160)=>({background:`linear-gradient(${t}deg,${e},${o})`});function Wo({size:e,style:o}){let t=Math.max(2,Math.round(e*.13)),r=(a,n,s)=>({position:"absolute",inset:a,background:n,borderRadius:t,...s?{mixBlendMode:s}:null});return S("span",{style:{position:"absolute",display:"block",width:e,height:e,...o},children:[c("span",{style:r("8% 26% 30% 6%",u.mark1)}),c("span",{style:r("26% 6% 8% 30%",u.mark2,"multiply")})]})}function rs({children:e}){return c("span",{style:{fontSize:"4.64cqw",fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:u.muted},children:e})}function ub({over:e,overTone:o,head:t,headSize:r=11.5,cta:a,ctaBg:n,ctaFg:s,tone:i}){return S(Ib,{children:[e&&c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:o},children:e}),c("span",{style:{fontSize:r,lineHeight:1.15,fontWeight:700,maxWidth:"78%",color:i},children:t}),a&&c("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"4px 8px",borderRadius:2,marginTop:2,background:n,color:s},children:a})]})}function sd({name:e,price:o}){return S("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[c("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",...fe(u.paper,u.paper2,150)},children:c(Wo,{size:34,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),c("span",{style:{fontSize:"3.65cqw",fontWeight:600,color:u.text},children:e}),c("span",{style:{fontSize:"3.65cqw",color:u.muted},children:o})]})}function Ho({k:e,v:o,ok:t}){return S("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,padding:"3.5px 2px",borderBottom:`1px solid ${u.rule}`,fontSize:"3.98cqw",color:u.muted},children:[c("span",{children:e}),S("span",{style:{display:"flex",gap:6,alignItems:"center"},children:[c("b",{style:{color:u.text,fontWeight:700},children:o}),t&&c("span",{style:{color:u.rust,fontWeight:700},children:"\u2713"})]})]})}function ne({title:e,children:o}){return S("div",{style:{...N,background:u.card,padding:"9px 10px",display:"flex",flexDirection:"column",gap:6},children:[c(rs,{children:e}),o]})}function pb({size:e=14}){return c("span",{style:{width:e,height:e,borderRadius:"50%",flex:"none",display:"block",background:`linear-gradient(150deg,${u.mark1},${u.mark2})`}})}function id({filled:e=5,size:o=6}){return S("span",{style:{fontSize:o,letterSpacing:"0.06em",color:u.rust,lineHeight:1},children:["\u2605".repeat(e),c("span",{style:{color:u.mark1},children:"\u2605".repeat(5-e)})]})}function Fa({n:e,label:o,tone:t=u.text}){return S("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[c("b",{style:{fontSize:"8.16cqw",lineHeight:1,color:t},children:e}),c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",opacity:.62,color:t},children:o})]})}function ke({children:e,w:o}){return c("span",{style:{fontSize:"3.98cqw",lineHeight:1.45,color:u.muted,width:o,display:"block"},children:e})}function ts({label:e,w:o="100%",filled:t}){return S("div",{style:{width:o,display:"flex",flexDirection:"column",gap:2},children:[c("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:u.muted},children:e}),c("span",{style:{height:9,borderRadius:3,border:`1px solid ${u.rule}`,background:t?u.paper:u.card}})]})}function mb({children:e}){return c("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:u.text,color:u.onInk},children:e})}var tN={wheelslisting:c(ne,{title:"All wheels",children:c("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[["Ridge 19","20\xD79 +12","$365"],["Ridge 29","18\xD79 +20","$410"],["Ridge 39","17\xD78 \u221210","$455"]].map(([e,o,t])=>S("div",{style:{display:"flex",alignItems:"center",gap:6},children:[c("span",{style:{width:20,height:15,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",...fe(u.paper,u.paper2,150)},children:c(Wo,{size:12,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),c("b",{style:{flex:1,fontSize:"4.31cqw",color:u.text},children:e}),c("span",{style:{fontSize:"3.65cqw",color:u.muted},children:o}),c("b",{style:{fontSize:"4.31cqw",color:u.text,width:26,textAlign:"right"},children:t})]},e))})}),catalogfilterbar:S("div",{style:{...N,background:u.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[S("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[["20 inch","6\xD7139.7","Black"].map(e=>S("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"4px 7px",borderRadius:99,background:u.text,color:u.onInk,display:"flex",gap:4,alignItems:"center"},children:[e,c("span",{style:{opacity:.6},children:"\u2715"})]},e)),c("span",{style:{fontSize:"3.65cqw",color:u.rust,fontWeight:700},children:"Clear"})]}),S("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c("span",{style:{fontSize:"3.65cqw",color:u.muted},children:"128 results"}),c("span",{style:{fontSize:"3.65cqw",color:u.muted,border:`1px solid ${u.rule}`,borderRadius:3,padding:"3px 6px"},children:"Sort: Price \u25BE"})]})]}),fitmentfinder:S("div",{style:{...N,padding:"10px 12px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center",...fe(u.ink,u.inkSoft)},children:[c("span",{style:{fontSize:"5.31cqw",fontWeight:700,color:u.onInk},children:"Will it fit your rig?"}),S("div",{style:{display:"flex",gap:4},children:[["2021","Toyota","Hilux"].map(e=>S("span",{style:{flex:1,fontSize:"3.65cqw",color:u.text,background:u.card,borderRadius:3,padding:"5px 6px",display:"flex",justifyContent:"space-between"},children:[e," ",c("span",{style:{color:u.muted},children:"\u25BE"})]},e)),c("span",{style:{fontSize:"3.65cqw",fontWeight:700,letterSpacing:"0.08em",background:u.warm,color:u.ink,borderRadius:3,padding:"5px 7px"},children:"GO"})]})]}),compatibletyres:c(ne,{title:"Tyres that suit",children:c("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Ridge Grappler","$489"],["Trail Grappler","$525"],["Terra Grappler","$438"]].map(([e,o])=>S("div",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[c("div",{style:{flex:1,minHeight:0,borderRadius:3,position:"relative",overflow:"hidden",background:u.ink},children:c("span",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%,-50%)",width:26,height:26,borderRadius:"50%",border:`5px solid ${u.mark2}`,boxSizing:"border-box"}})}),c("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:u.text,overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:e}),c("span",{style:{fontSize:"3.32cqw",color:u.muted},children:o})]},e))})}),tyresizes:c(ne,{title:"Available sizes",children:c("div",{style:{flex:1,display:"flex",flexWrap:"wrap",gap:4,alignContent:"center"},children:["265/65R17","285/70R17","265/60R18","275/55R20"].map((e,o)=>c("span",{style:{fontSize:"3.65cqw",fontWeight:600,padding:"5px 7px",borderRadius:3,border:`1px solid ${o===0?u.rust:u.rule}`,color:o===0?u.rust:u.text,background:o===0?u.paper:u.card},children:e},e))})}),tyrefitment:S(ne,{title:"Will it fit your car?",children:[c("div",{style:{display:"flex",gap:3},children:["Make","Model","Year","Trim"].map(e=>S("span",{style:{flex:1,minWidth:0,fontSize:"3.32cqw",color:u.muted,background:u.paper,border:`1px solid ${u.rule}`,borderRadius:3,padding:"4px 5px",display:"flex",justifyContent:"space-between",gap:2,overflow:"hidden",whiteSpace:"nowrap"},children:[e," ",c("span",{style:{color:u.muted},children:"\u25BE"})]},e))}),c("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2,justifyContent:"center",minHeight:0},children:[["265/65R17","Fits",!0],["285/70R17","Not your size",!1]].map(([e,o,t])=>S("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline",gap:6,borderTop:`1px solid ${u.rule}`,paddingTop:3},children:[c("span",{style:{fontSize:"3.32cqw",fontWeight:600,color:u.text},children:e}),c("span",{style:{fontSize:"3.32cqw",fontWeight:t?700:400,letterSpacing:"0.06em",color:t?u.warm:u.muted},children:o})]},e))})]}),eutyrelabel:S("div",{style:{...N,background:u.card,padding:"9px 11px",display:"flex",gap:8,alignItems:"center"},children:[c("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1.5},children:[["A","42%"],["B","56%"],["C","70%"],["D","84%"]].map(([e,o],t)=>S("div",{style:{display:"flex",alignItems:"center",gap:3},children:[c("span",{style:{width:o,height:6,borderRadius:"0 2px 2px 0",background:t===1?u.rust:u.mark1}}),c("span",{style:{fontSize:"3.32cqw",fontWeight:700,color:t===1?u.rust:u.muted},children:e})]},e))}),S("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:3,alignItems:"center"},children:[c("b",{style:{fontSize:"6.63cqw",lineHeight:1,color:u.text},children:"72"}),c("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",color:u.muted},children:"dB"})]})]}),bundleoffer:S("div",{style:{...N,background:u.paper,padding:"9px 11px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[c(rs,{children:"Buy it with"}),S("div",{style:{display:"flex",alignItems:"center",gap:5},children:[[0,1].map(e=>c("span",{style:{width:26,height:22,borderRadius:3,flex:"none",position:"relative",overflow:"hidden",background:u.card},children:c(Wo,{size:17,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})},e)),c("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:u.muted},children:"+"}),S("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:1},children:[c("span",{style:{fontSize:"3.65cqw",color:u.muted,textDecoration:"line-through"},children:"$1,024"}),c("b",{style:{fontSize:"6.02cqw",color:u.rust,lineHeight:1},children:"$899"})]})]})]}),checkoutcta:S("div",{style:{...N,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,...fe(u.ink,u.ink2)},children:[S("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",color:u.warm,fontWeight:700},children:"READY TO ORDER"}),c("b",{style:{fontSize:"6.63cqw",color:u.onInk,lineHeight:1},children:"$1,956"}),c("span",{style:{fontSize:"3.65cqw",color:u.onInk,opacity:.65},children:"4 items \xB7 fitted free"})]}),c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"6px 10px",borderRadius:2,background:u.warm,color:u.ink,flex:"none"},children:"CHECKOUT"})]}),contact:c(ne,{title:"Who do you need?",children:c("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[["Fitment help","the workshop"],["Order status","the front desk"],["Trade accounts","sales"]].map(([e,o])=>S("div",{style:{display:"flex",alignItems:"center",gap:5},children:[c("b",{style:{flex:1,fontSize:"4.31cqw",color:u.text},children:e}),c("span",{style:{fontSize:"3.65cqw",color:u.muted},children:o}),c("span",{style:{fontSize:"4.64cqw",color:u.rust,lineHeight:1},children:"\u203A"})]},e))})}),contactlocations:c(ne,{title:"Find us",children:c("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(2,1fr)",gap:5,minHeight:0},children:[["Brisbane","7 Kerry Rd","Mon\u2013Sat"],["Townsville","12 Enterprise","Mon\u2013Fri"]].map(([e,o,t])=>S("div",{style:{border:`1px solid ${u.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[c("b",{style:{fontSize:"4.31cqw",color:u.text},children:e}),c("span",{style:{fontSize:"3.32cqw",color:u.muted},children:o}),c("span",{style:{fontSize:"3.32cqw",color:u.rust,fontWeight:700},children:t})]},e))})}),form:c(ne,{title:"Send us a message",children:S("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[S("div",{style:{display:"flex",gap:5},children:[c(ts,{label:"Name"}),c(ts,{label:"Email"})]}),c(ts,{label:"Message",filled:!0}),c(mb,{children:"SEND"})]})}),appointmentbooking:c(ne,{title:"Book a fitting",children:S("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[c("div",{style:{display:"flex",gap:3},children:["Mon","Tue","Wed","Thu"].map((e,o)=>c("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",fontWeight:o===2?700:500,padding:"4px 0",borderRadius:3,background:o===2?u.text:u.paper,color:o===2?u.onInk:u.muted},children:e},e))}),c("div",{style:{display:"flex",gap:3},children:["8:00","10:30","13:00","15:30"].map((e,o)=>c("span",{style:{flex:1,textAlign:"center",fontSize:"3.32cqw",padding:"4px 0",borderRadius:3,border:`1px solid ${o===1?u.rust:u.rule}`,color:o===1?u.rust:u.muted,background:o===3?u.paper:u.card,textDecoration:o===3?"line-through":"none"},children:e},e))})]})}),reviewform:c(ne,{title:"Leave a review",children:S("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[c(id,{filled:4,size:14}),c(ts,{label:"Your review",filled:!0}),c(mb,{children:"POST"})]})}),submitbuild:c(ne,{title:"Show us your build",children:S("div",{style:{flex:1,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:3,border:`1px dashed ${u.mark1}`,borderRadius:5,background:u.paper},children:[c("span",{style:{fontSize:"6.63cqw",lineHeight:1,color:u.rust,fontWeight:300},children:"+"}),c("span",{style:{fontSize:"3.65cqw",color:u.muted},children:"Drop a photo of your rig"})]})}),masthead:S("div",{style:{...N,background:u.paper,display:"flex",flexDirection:"column",justifyContent:"center",padding:"0 13px",gap:5},children:[c("span",{style:{height:1.5,background:u.text}}),c("span",{style:{fontSize:"7.65cqw",fontWeight:800,letterSpacing:"0.02em",color:u.text,lineHeight:1},children:"THE TRACK"}),S("div",{style:{display:"flex",justifyContent:"space-between",fontSize:"3.65cqw",letterSpacing:"0.1em",textTransform:"uppercase",color:u.muted},children:[c("span",{children:"Issue 14"}),c("span",{children:"Spring 2026"})]}),c("span",{style:{height:1,background:u.rule}})]}),featuredcover:S("div",{style:{...N,overflow:"hidden",...fe(u.ink,u.inkSoft2)},children:[c(Wo,{size:92,style:{right:-18,top:-14}}),c("div",{style:{position:"absolute",inset:0,background:`linear-gradient(0deg,${u.scrim},transparent 62%)`}}),S("div",{style:{position:"absolute",left:12,right:12,bottom:11,display:"flex",flexDirection:"column",gap:3},children:[c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:u.warm},children:"FEATURE"}),c("span",{style:{fontSize:"6.16cqw",lineHeight:1.15,fontWeight:700,color:u.onInk},children:"Four days on the Madigan Line"})]})]}),longread:S("div",{style:{...N,background:u.card,padding:"10px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.14em",fontWeight:700,color:u.rust},children:"12 MIN READ"}),c("span",{style:{fontSize:"6.02cqw",lineHeight:1.15,fontWeight:700,color:u.text},children:"What breaks first, and why"}),c(ke,{children:"Every failure starts in the same place \u2014 not the rim, not"}),c(ke,{w:"62%",children:"the tyre, but the bolt nobody re-torqued."})]}),series:c(ne,{title:"Recurring columns",children:c("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[["Shed Notes","Monthly"],["Track Tested","Fortnightly"],["Reader Rigs","Weekly"]].map(([e,o])=>S("div",{style:{display:"flex",alignItems:"center",gap:6},children:[c("span",{style:{width:3,height:12,borderRadius:2,background:u.rust,flex:"none"}}),c("b",{style:{flex:1,fontSize:"4.64cqw",color:u.text},children:e}),c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:u.muted},children:o})]},e))})}),events:c(ne,{title:"Latest posts",children:c("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[[u.inkSoft,u.inkSoft2,"Madigan Line, four days"],[u.rust,u.warm,"Why offset beats width"]].map(([e,o,t])=>S("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[c("span",{style:{width:24,height:18,borderRadius:3,flex:"none",...fe(e,o,150)}}),S("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[c("b",{style:{fontSize:"4.31cqw",color:u.text},children:t}),c("span",{style:{fontSize:"3.65cqw",color:u.muted},children:"4 Sep \xB7 Shed Notes"})]})]},t))})}),docmasthead:S("div",{style:{...N,background:u.card,padding:"12px 14px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:u.muted},children:"POLICY"}),c("span",{style:{fontSize:"6.49cqw",fontWeight:700,color:u.text,lineHeight:1.1},children:"Returns & refunds"}),c("span",{style:{fontSize:"3.65cqw",color:u.muted},children:"Version 3 \xB7 Updated 4 Sep 2026"}),c("span",{style:{height:2,width:26,background:u.rust,borderRadius:1}})]}),docbody:c("div",{style:{...N,background:u.card,padding:"9px 13px",display:"flex",flexDirection:"column",gap:3,justifyContent:"center"},children:[["1.","You may return an unfitted wheel within 30 days."],["2.","Fitted wheels are covered by the structural warranty."],["3.","Freight on a change of mind is yours."]].map(([e,o])=>S("div",{style:{display:"flex",gap:5},children:[c("b",{style:{fontSize:"3.98cqw",color:u.rust,flex:"none"},children:e}),c(ke,{children:o})]},e))}),docmetacards:c(ne,{title:"At a glance",children:c("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(2,1fr)",gap:5,minHeight:0},children:[["30 days","To return"],["5 years","Structural"],["Free","Fitting"],["48 hrs","Dispatch"]].map(([e,o])=>S("div",{style:{border:`1px solid ${u.rule}`,borderRadius:4,padding:"5px 6px",display:"flex",flexDirection:"column",gap:1},children:[c("b",{style:{fontSize:"5.31cqw",color:u.text,lineHeight:1},children:e}),c("span",{style:{fontSize:"3.32cqw",letterSpacing:"0.08em",textTransform:"uppercase",color:u.muted},children:o})]},o))})}),doctabs:S("div",{style:{...N,background:u.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:0,padding:"0 11px"},children:[c("div",{style:{display:"flex",gap:0},children:["Returns","Warranty","Shipping"].map((e,o)=>c("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,padding:"5px 8px",color:o===0?u.text:u.muted,background:o===0?u.paper:"transparent",borderRadius:"4px 4px 0 0",border:`1px solid ${o===0?u.rule:"transparent"}`,borderBottom:"none"},children:e},e))}),c("span",{style:{height:1,background:u.rule}}),S("div",{style:{paddingTop:6,display:"flex",flexDirection:"column",gap:2},children:[c(ke,{children:"Unfitted wheels come back within 30 days, no questions."}),c(ke,{w:"58%",children:"Freight on a change of mind is yours."})]})]}),paragraphs:S("div",{style:{...N,background:u.card,padding:"11px 14px",display:"flex",gap:10,alignItems:"center"},children:[c("span",{style:{flex:1,fontSize:"5.86cqw",lineHeight:1.2,fontWeight:700,color:u.text},children:"The right wheel is the boring one."}),S("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[c(ke,{children:"Forged, correctly offset, rated for what you actually"}),c(ke,{children:"carry. Everything else is a photograph."})]})]}),keyfeatures:c(ne,{title:"Key features",children:c("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:["Flow-formed barrel","1250 kg per corner","Hub-centric fit"].map(e=>S("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[c("span",{style:{fontSize:"4.64cqw",color:u.rust,fontWeight:700,lineHeight:1},children:"\u2713"}),c("span",{style:{fontSize:"4.31cqw",color:u.text},children:e})]},e))})}),statsparagraph:S("div",{style:{...N,background:u.paper,padding:"10px 12px",display:"flex",gap:10,alignItems:"center"},children:[S("div",{style:{flex:"none",display:"flex",flexDirection:"column",gap:5},children:[c(Fa,{n:"27k",label:"Rigs"}),c(Fa,{n:"4.9",label:"Rating"})]}),S("div",{style:{flex:1,display:"flex",flexDirection:"column"},children:[c(ke,{children:"Twelve years of fitting the same three questions, and the"}),c(ke,{children:"answer has not moved: load rating, offset, then looks."})]})]}),chart:S(ne,{title:"Load vs weight",children:[c("div",{style:{flex:1,display:"flex",alignItems:"flex-end",gap:5,paddingBottom:2},children:[38,62,84,71,96].map((e,o)=>c("span",{style:{flex:1,height:`${e}%`,borderRadius:"2px 2px 0 0",background:o===4?u.rust:u.mark1}},o))}),c("span",{style:{height:1,background:u.rule,marginTop:-4}})]}),mockup:c("div",{style:{...N,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",...fe(u.inkSoft,u.ink)},children:S("div",{style:{width:"72%",height:"74%",borderRadius:4,overflow:"hidden",background:u.card,boxShadow:`0 6px 14px ${u.scrim}`},children:[c("div",{style:{height:9,background:u.paper,display:"flex",alignItems:"center",gap:2,padding:"0 4px"},children:[0,1,2].map(e=>c("span",{style:{width:2.5,height:2.5,borderRadius:"50%",background:u.mark1}},e))}),S("div",{style:{padding:5,display:"flex",flexDirection:"column",gap:3},children:[c("span",{style:{height:4,width:"56%",borderRadius:1,background:u.mark2}}),c("span",{style:{height:14,borderRadius:2,...fe(u.paper,u.paper2,150)}}),c("span",{style:{height:3,width:"38%",borderRadius:1,background:u.rust}})]})]})}),manifesto:c("div",{style:{...N,overflow:"hidden",display:"flex",alignItems:"center",padding:"0 16px",...fe(u.ink,u.ink2)},children:S("span",{style:{fontSize:"6.63cqw",lineHeight:1.2,fontWeight:700,color:u.onInk},children:["We build for the ",c("span",{style:{color:u.warm},children:"last"})," ten percent of the track."]})}),timeline:c(ne,{title:"Our story",children:c("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",gap:6,paddingLeft:4},children:[["1998","One shed, one lathe."],["2009","First forged rim."],["2024","27,000 rigs on."]].map(([e,o],t)=>S("div",{style:{display:"flex",gap:7,alignItems:"flex-start",position:"relative"},children:[t<2&&c("span",{style:{position:"absolute",left:3,top:8,bottom:-8,width:1,background:u.rule}}),c("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",marginTop:1,background:u.rust,zIndex:1}}),S("div",{style:{display:"flex",flexDirection:"column",gap:0,minWidth:0},children:[c("b",{style:{fontSize:"4.64cqw",color:u.text},children:e}),c(ke,{children:o})]})]},e))})}),timelinetrack:S("div",{style:{...N,padding:"0 12px",display:"flex",flexDirection:"column",gap:10,justifyContent:"center",...fe(u.ink,u.inkSoft)},children:[c("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:u.warm},children:"Milestones"}),S("div",{style:{position:"relative",display:"flex",justifyContent:"space-between",paddingTop:7},children:[c("span",{style:{position:"absolute",left:0,right:0,top:3,height:1,background:u.mark2,opacity:.55}}),["1998","2009","2016","2024"].map((e,o)=>S("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:3,position:"relative"},children:[c("span",{style:{position:"absolute",top:-7,width:6,height:6,borderRadius:"50%",background:o===3?u.warm:u.mark1}}),c("span",{style:{fontSize:"4.31cqw",fontWeight:700,color:o===3?u.warm:u.onInk,opacity:o===3?1:.75},children:e})]},e))]})]}),footprint:S("div",{style:{...N,overflow:"hidden",...fe(u.paper,u.paper2,150)},children:[c("span",{style:{position:"absolute",left:"8%",top:"18%",width:"62%",height:"64%",borderRadius:"48% 52% 40% 60% / 55% 45% 55% 45%",background:u.mark1,opacity:.75}}),c("span",{style:{position:"absolute",left:"52%",top:"52%",width:"34%",height:"34%",borderRadius:"58% 42% 55% 45% / 45% 58% 42% 55%",background:u.mark2,opacity:.55}}),[["26%","38%"],["44%","58%"],["62%","34%"]].map(([e,o])=>c("span",{style:{position:"absolute",left:e,top:o,width:7,height:7,borderRadius:"50% 50% 50% 0",transform:"rotate(-45deg)",background:u.rust}},e)),c("span",{style:{position:"absolute",left:11,bottom:9,fontSize:"4.64cqw",fontWeight:700,color:u.text},children:"3 fitting bays"})]}),banner:S("div",{style:{...N,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,background:u.rust},children:[S("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[c("b",{style:{fontSize:"6.02cqw",color:u.onInk},children:"End of season \xB7 20% off"}),c("span",{style:{fontSize:"3.98cqw",color:u.onInk,opacity:.8},children:"Fitted free, this month only."})]}),c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:u.onInk,color:u.text,flex:"none"},children:"SHOP"})]}),titlewithbuttons:S("div",{style:{...N,background:u.paper,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:7,padding:"0 14px",textAlign:"center"},children:[c("span",{style:{fontSize:"6.49cqw",lineHeight:1.15,fontWeight:700,color:u.text},children:"Not sure what fits?"}),S("div",{style:{display:"flex",gap:5},children:[c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,background:u.text,color:u.onInk},children:"FIND MY FIT"}),c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"5px 9px",borderRadius:2,border:`1px solid ${u.text}`,color:u.text},children:"CALL US"})]})]}),ticker:c("div",{style:{...N,overflow:"hidden",background:u.ink,display:"flex",alignItems:"center"},children:c("span",{style:{whiteSpace:"nowrap",fontSize:"6.29cqw",fontWeight:800,letterSpacing:"0.06em",color:u.warm,marginLeft:-14},children:"FREE FITTING \xB7 48HR DISPATCH \xB7 FREE FITTING \xB7 48HR DISPATCH"})}),countdown:S("div",{style:{...N,padding:"10px 12px",display:"flex",flexDirection:"column",alignItems:"center",gap:6,justifyContent:"center",...fe(u.ink,u.ink2)},children:[c("span",{style:{fontSize:"3.65cqw",fontWeight:700,letterSpacing:"0.16em",textTransform:"uppercase",color:u.muted},children:"Back online in"}),c("div",{style:{display:"flex",alignItems:"flex-start",gap:5},children:[["23","Hours"],["59","Minutes"],["48","Seconds"]].map(([e,o],t)=>S("div",{style:{display:"flex",alignItems:"flex-start",gap:5},children:[t>0&&c("b",{style:{fontSize:"9.5cqw",lineHeight:1,color:u.warm},children:":"}),S("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:2},children:[c("b",{style:{fontSize:"11.5cqw",lineHeight:1,color:u.onInk,fontVariantNumeric:"tabular-nums"},children:e}),c("span",{style:{fontSize:"3.2cqw",letterSpacing:"0.1em",textTransform:"uppercase",opacity:.62,color:u.onInk},children:o})]})]},o))})]}),breadcrumb:c("div",{style:{...N,background:u.card,display:"flex",alignItems:"center",padding:"0 13px"},children:S("span",{style:{fontSize:"4.64cqw",color:u.muted},children:["Home ",c("span",{style:{opacity:.5},children:"/"})," Wheels ",c("span",{style:{opacity:.5},children:"/"})," ",c("span",{style:{color:u.text,fontWeight:700},children:"20 inch"})]})}),categorybar:S("div",{style:{...N,background:u.card,display:"flex",flexDirection:"column",justifyContent:"center",gap:7,padding:"0 11px"},children:[c("div",{style:{display:"flex",gap:5},children:["All","Wheels","Tyres","Lift"].map((e,o)=>c("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,padding:"4px 7px",borderRadius:99,background:o===0?u.text:u.paper,color:o===0?u.onInk:u.muted},children:e},e))}),c("span",{style:{height:1,background:u.rule}})]}),intro:S("div",{style:{...N,overflow:"hidden",background:u.card},children:[c("div",{style:{position:"absolute",inset:0,...fe(u.ink,u.inkSoft2)}}),c(Wo,{size:64,style:{right:8,top:6}}),S("div",{style:{position:"absolute",left:16,right:16,bottom:8,top:"46%",background:u.paper,borderRadius:6,padding:"8px 11px",display:"flex",flexDirection:"column",gap:2,boxShadow:`0 -4px 10px ${u.scrim}`},children:[c("span",{style:{fontSize:"5.69cqw",fontWeight:700,color:u.text},children:"Since 1998"}),c(ke,{children:"One shed, one lathe, one idea."}),c(ke,{w:"66%",children:"It turned out to be right."})]})]}),gallerygrid:c(ne,{title:"From our customers",children:c("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gridTemplateRows:"repeat(2,1fr)",gap:4,minHeight:0},children:[[u.rust,u.warm],[u.inkSoft,u.ink],[u.paper2,u.mark2],[u.ink,u.inkSoft2],[u.warm,u.paper2],[u.mark2,u.inkSoft]].map(([e,o],t)=>c("div",{style:{borderRadius:3,...fe(e,o,140+t*22)}},t))})}),gallery:S(ne,{title:"Gallery",children:[c("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:-2},children:["On the truck","Studio","Close-ups"].map((e,o)=>c("span",{style:{fontSize:"3.98cqw",fontWeight:o===0?700:500,color:o===0?u.text:u.muted,borderBottom:`1.5px solid ${o===0?u.rust:"transparent"}`,paddingBottom:2},children:e},e))}),c("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:4,minHeight:0},children:[[u.rust,u.warm],[u.ink,u.inkSoft],[u.paper2,u.mark2]].map(([e,o],t)=>c("div",{style:{borderRadius:3,...fe(e,o,150+t*20)}},t))})]}),ordersummary:S(ne,{title:"Order summary",children:[S("div",{style:{display:"flex",gap:6,alignItems:"center",paddingBottom:4},children:[c("span",{style:{width:26,height:26,borderRadius:4,position:"relative",overflow:"hidden",flex:"none",...fe(u.paper,u.paper2,150)},children:c(Wo,{size:18,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),S("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[c("b",{style:{fontSize:"4.31cqw",color:u.text},children:"Ridge Grappler"}),c("span",{style:{fontSize:"3.65cqw",color:u.muted},children:"20\xD79 +12 \xB7 qty 4"})]})]}),S("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column",justifyContent:"center"},children:[c(Ho,{k:"Subtotal",v:"$1,956"}),c(Ho,{k:"Fitting",v:"Free"}),S("div",{style:{display:"flex",justifyContent:"space-between",paddingTop:5,fontSize:"4.64cqw"},children:[c("b",{style:{color:u.text},children:"Total"}),c("b",{style:{color:u.text,fontSize:"6.02cqw"},children:"$1,956"})]})]})]}),deliveryoptions:c(ne,{title:"Delivery",children:c("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[["Standard","3\u20135 days","Free",!0],["Express","Next day","$19",!1]].map(([e,o,t,r])=>S("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"5px 6px",borderRadius:4,border:`1px solid ${r?u.rust:u.rule}`,background:r?u.paper:u.card},children:[c("span",{style:{width:7,height:7,borderRadius:"50%",flex:"none",border:`1.5px solid ${r?u.rust:u.mark1}`,background:r?u.rust:"transparent"}}),c("span",{style:{flex:1,fontSize:"4.31cqw",fontWeight:600,color:u.text},children:e}),c("span",{style:{fontSize:"3.98cqw",color:u.muted},children:o}),c("b",{style:{fontSize:"4.31cqw",color:u.text},children:t})]},e))})}),paymentbadges:S("div",{style:{...N,background:u.paper,display:"flex",flexDirection:"column",gap:8,justifyContent:"center",padding:"0 12px"},children:[c(rs,{children:"Ways to pay"}),c("div",{style:{display:"flex",gap:5},children:[["VISA",u.ink],["MC",u.rust],["AMEX",u.inkSoft],["PayPal",u.ink2]].map(([e,o])=>c("span",{style:{flex:1,textAlign:"center",fontSize:"3.65cqw",fontWeight:800,letterSpacing:"0.06em",color:u.onInk,borderRadius:3,padding:"6px 0",background:o},children:e},e))})]}),stats:S("div",{style:{...N,padding:"10px 12px",display:"flex",flexDirection:"column",gap:9,justifyContent:"center",...fe(u.ink,u.ink2)},children:[c("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:u.warm},children:"By the numbers"}),S("div",{style:{display:"flex",gap:8},children:[c(Fa,{n:"27k",label:"Rigs fitted",tone:u.onInk}),c(Fa,{n:"12",label:"Years",tone:u.onInk}),c(Fa,{n:"4.9",label:"Avg rating",tone:u.warm})]})]}),testimonials:S("div",{style:{...N,overflow:"hidden",background:u.paper,padding:"10px 11px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center"},children:[c("span",{style:{position:"absolute",right:10,top:2,fontSize:"22.4cqw",lineHeight:1,fontWeight:800,color:u.rust,opacity:.16},children:"\u201D"}),c(id,{filled:5,size:7}),c("span",{style:{position:"relative",fontSize:"5.31cqw",lineHeight:1.35,color:u.text,fontWeight:600},children:"\u201CTook them out to the Simpson and back. Not one chip.\u201D"}),S("div",{style:{display:"flex",alignItems:"center",gap:5},children:[c(pb,{}),c("span",{style:{fontSize:"3.98cqw",color:u.muted},children:"Dave M. \xB7 Hilux N80"})]})]}),reviews:S(ne,{title:"Reviews",children:[c("div",{style:{display:"flex",gap:4,height:22},children:[[u.inkSoft,u.inkSoft2],[u.rust,u.warm],[u.ink,u.inkSoft],[u.mark2,u.mark1]].map(([e,o],t)=>c("div",{style:{flex:1,borderRadius:3,...fe(e,o,140+t*15)}},t))}),c("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[["Dave M.",5,"Not one chip after the Simpson."],["Sara K.",4,"Fitted in an hour, no fuss."]].map(([e,o,t])=>S("div",{style:{display:"flex",gap:5,alignItems:"flex-start"},children:[c(pb,{size:12}),S("div",{style:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[S("div",{style:{display:"flex",gap:4,alignItems:"center"},children:[c("b",{style:{fontSize:"3.98cqw",color:u.text},children:e}),c(id,{filled:o})]}),c(ke,{children:t})]})]},e))})]}),logos:S("div",{style:{...N,display:"flex",flexDirection:"column",gap:9,justifyContent:"center",padding:"0 12px",...fe(u.ink,u.inkSoft)},children:[c("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.14em",textTransform:"uppercase",color:u.warm},children:"As fitted by"}),c("div",{style:{display:"grid",gridTemplateColumns:"repeat(4,1fr)",gap:8},children:["ARB","TJM","IRONMAN","OPPOSITE"].map(e=>c("span",{style:{textAlign:"center",fontSize:"4.31cqw",fontWeight:800,letterSpacing:"0.08em",color:u.onInk,opacity:.82},children:e},e))})]}),prose:S("div",{style:{...N,background:u.paper,padding:"11px 14px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[c("span",{style:{fontSize:"5.86cqw",fontWeight:700,color:u.text},children:"Why offset matters"}),S("div",{style:{display:"flex",gap:6},children:[c("span",{style:{fontSize:"15.3cqw",lineHeight:.78,fontWeight:800,color:u.rust,marginTop:1},children:"T"}),S("div",{style:{display:"flex",flexDirection:"column"},children:[c(ke,{children:"he number on the back of your wheel decides whether the"}),c(ke,{w:"76%",children:"tyre sits under the guard or an inch outside it."})]})]})]}),cards:c(ne,{title:"What you get",children:c("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Fitted free","In store, same day."],["5 yr cover","Structural, no fine print."],["Swap it","30 days, any reason."]].map(([e,o])=>S("div",{style:{border:`1px solid ${u.rule}`,borderRadius:4,padding:6,display:"flex",flexDirection:"column",gap:2},children:[c("span",{style:{width:11,height:11,borderRadius:3,background:u.rust,opacity:.9}}),c("b",{style:{fontSize:"3.98cqw",color:u.text},children:e}),c(ke,{children:o})]},e))})}),faq:c(ne,{title:"Questions",children:c("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[["Will these fit my Hilux?",!0],["Do you fit them for me?",!1],["What if I pick wrong?",!1]].map(([e,o])=>S("div",{style:{borderBottom:`1px solid ${u.rule}`,padding:"4px 2px"},children:[S("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6},children:[c("b",{style:{fontSize:"4.31cqw",color:u.text},children:e}),c("span",{style:{fontSize:"4.64cqw",color:u.muted,lineHeight:1},children:o?"\u2212":"+"})]}),o&&c(ke,{w:"90%",children:"Use the fitment finder \u2014 it reads your build, not just the model."})]},e))})}),hero:S("div",{style:{...N,overflow:"hidden",...fe(u.ink,u.ink2)},children:[c("div",{style:{...N,background:`linear-gradient(90deg,${u.scrim},transparent 70%)`}}),c("div",{style:{position:"relative",height:"100%",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",padding:"12px 14px",gap:5},children:c(ub,{over:"NEW \xB7 SUMMER",overTone:u.warm,head:"Built for the worst road you own",cta:"SHOP ALL",ctaBg:u.warm,ctaFg:u.ink,tone:u.onInk})}),c(Wo,{size:104,style:{right:-24,bottom:-30}})]}),herosingle:S("div",{style:{...N,display:"flex",background:u.paper,overflow:"hidden"},children:[c("div",{style:{flex:1,padding:12,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:c(ub,{over:"ALL-TERRAIN",overTone:u.rust,head:"Grip that does not ask",headSize:12,cta:"EXPLORE",ctaBg:u.text,ctaFg:u.onInk,tone:u.text})}),c("div",{style:{flex:1,position:"relative",...fe(u.inkSoft,u.inkSoft2)},children:c(Wo,{size:74,style:{right:-14,top:16}})})]}),productgrid:c(ne,{title:"Best sellers",children:S("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[c(sd,{name:"Ridge 19",price:"$365"}),c(sd,{name:"Ridge 29",price:"$410"}),c(sd,{name:"Ridge 39",price:"$455"})]})}),collections:c(ne,{title:"Shop by category",children:c("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[["Wheels",u.inkSoft,u.inkSoft2],["Tyres",u.rust,u.warm],["Lift kits",u.ink,u.inkSoft]].map(([e,o,t])=>c("div",{style:{borderRadius:4,display:"flex",alignItems:"flex-end",padding:5,color:u.onInk,...fe(o,t)},children:c("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.04em"},children:e})},e))})}),producthero:S("div",{style:{...N,display:"flex",background:u.card,overflow:"hidden"},children:[c("div",{style:{flex:1.1,position:"relative",...fe(u.paper,u.paper2,150)},children:c(Wo,{size:78,style:{left:"50%",top:"50%",transform:"translate(-50%,-50%)"}})}),S("div",{style:{flex:1,padding:"10px 10px 10px 8px",display:"flex",flexDirection:"column",gap:4,justifyContent:"center"},children:[c("span",{style:{fontSize:"3.65cqw",letterSpacing:"0.16em",fontWeight:700,color:u.rust},children:"NITTO"}),c("b",{style:{fontSize:"6.29cqw",color:u.text},children:"Ridge Grappler"}),c("span",{style:{fontSize:"6.63cqw",fontWeight:700,color:u.text},children:"$489"}),c("span",{style:{alignSelf:"flex-start",fontSize:"3.65cqw",letterSpacing:"0.12em",fontWeight:700,padding:"4px 8px",borderRadius:2,background:u.text,color:u.onInk},children:"ADD TO CART"})]})]}),spectable:c(ne,{title:"Specifications",children:S("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[c(Ho,{k:"Diameter",v:'20"'}),c(Ho,{k:"Width",v:"9.0J"}),c(Ho,{k:"Offset",v:"+12"}),c(Ho,{k:"Load",v:"1250 kg"})]})}),fitmenttable:c(ne,{title:"Will it fit?",children:S("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center"},children:[c(Ho,{k:"Hilux N80",v:"20\xD79 +12",ok:!0}),c(Ho,{k:"Ranger PX3",v:"20\xD79 +12",ok:!0}),c(Ho,{k:"LC79",v:"17\xD78 \u221210",ok:!0})]})}),processsteps:S("div",{style:{...N,background:u.paper,padding:10,display:"flex",flexDirection:"column",gap:7,justifyContent:"center"},children:[c(rs,{children:"How it works"}),c("div",{style:{display:"flex",gap:6},children:["Pick your rig","Match the fit","We fit it"].map((e,o)=>S("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:2},children:[c("span",{style:{width:11,height:11,borderRadius:"50%",background:u.text,color:u.onInk,fontSize:"3.98cqw",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700},children:o+1}),c("span",{style:{fontSize:"3.98cqw",color:u.text,fontWeight:600},children:e})]},e))})]}),detailrows:c("div",{style:{...N,background:u.card,display:"flex",flexDirection:"column",overflow:"hidden"},children:[["Forged, not cast","Half the weight, twice the road.",!1],["Fits your load","Rated to 1250 kg a corner.",!0]].map(([e,o,t])=>{let r=c("div",{style:{flex:1,...fe(t?u.rust:u.inkSoft,t?u.warm:u.inkSoft2)}},"art"),a=S("div",{style:{flex:1.1,padding:8,display:"flex",flexDirection:"column",gap:2,justifyContent:"center"},children:[c("b",{style:{fontSize:"4.64cqw",color:u.text},children:e}),c("span",{style:{fontSize:"3.98cqw",color:u.muted,lineHeight:1.3},children:o})]},"tx");return c("div",{style:{flex:1,display:"flex",minHeight:0},children:t?[a,r]:[r,a]},e)})}),specstrip:c("div",{style:{...N,background:u.ink,color:u.onInk,display:"flex",alignItems:"center",justifyContent:"space-around",padding:"0 8px"},children:[["5 yr","Warranty"],["Free","Fitting"],["48 hr","Dispatch"]].map(([e,o])=>S("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:1},children:[c("b",{style:{fontSize:"5.69cqw",letterSpacing:"0.02em"},children:e}),c("span",{style:{fontSize:"3.65cqw",color:u.mark2,letterSpacing:"0.1em",textTransform:"uppercase"},children:o})]},o))})},xb={subscribe:S("div",{style:{...N,padding:13,display:"flex",flexDirection:"column"},children:[S("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:8},children:[S("div",{style:{display:"flex",alignItems:"center",gap:6},children:[c(R,{w:8,h:8,r:2,tone:"accent"}),c(R,{w:38,h:7,r:3,tone:"dark"}),c(R,{w:16,h:7,r:3,tone:"accent"})]}),c(R,{w:38,h:4,r:2,tone:"soft"})]}),c("div",{style:{height:1,background:ye.line,marginBottom:10}}),S("div",{style:{flex:1,display:"flex",gap:10,border:`1px solid ${ye.line}`,borderRadius:7,padding:10},children:[S("div",{style:{flex:1.1,display:"flex",flexDirection:"column",justifyContent:"center",gap:5},children:[c(R,{w:"46%",h:3,r:2,tone:"accent"}),c(R,{w:"84%",h:8,r:4,tone:"dark"}),c(R,{w:"56%",h:8,r:4,tone:"accent"}),c(R,{w:"96%",h:3,r:2,tone:"soft",style:{marginTop:2}}),S("div",{style:{display:"flex",gap:5,marginTop:4},children:[c("div",{style:{flex:1,height:13,borderRadius:5,border:`1px solid ${ye.line}`,background:ye.block}}),c(R,{w:34,h:13,r:5,tone:"accent"})]})]}),S("div",{style:{flex:1,background:ye.block,borderRadius:6,padding:8,display:"flex",flexDirection:"column",gap:6},children:[c(R,{w:"52%",h:4,r:2,tone:"accent"}),Array.from({length:3}).map((e,o)=>S("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:6,borderTop:o?`1px solid ${ye.line}`:"none",paddingTop:o?4:0},children:[c(R,{w:34,h:4,r:2,tone:"dark"}),c(R,{w:16,h:3,r:2,tone:"soft"})]},o))]})]})]}),split:S("div",{style:{...N,display:"flex"},children:[c("div",{style:{width:"44%",background:ld}}),S("div",{style:{flex:1,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[c(R,{w:"44%",h:5,r:3,tone:"accent"}),c(R,{w:"88%",h:8,r:4,tone:"dark"}),c(R,{w:"70%",h:8,r:4,tone:"dark"}),c(R,{w:"94%",h:5,r:2,tone:"soft",style:{marginTop:2}}),c(R,{w:"80%",h:5,r:2,tone:"soft"}),c(R,{w:"40%",h:13,r:6,tone:"accent",style:{marginTop:5}})]})]}),sectionheader:S(Ib,{children:[c(R,{w:"18%",h:6,r:3,tone:"accent",style:{position:"absolute",top:15,right:16}}),S("div",{style:{...N,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:10},children:[S("div",{style:{display:"flex",alignItems:"center",gap:9},children:[c(R,{w:16,h:16,r:4,tone:"accent"}),c(R,{w:"20%",h:9,r:4,tone:"dark"})]}),c(R,{w:"62%",h:10,r:5,tone:"dark"}),c(R,{w:"42%",h:6,r:3,tone:"soft"})]})]}),header:c("div",{style:{...N,padding:14,display:"flex",flexDirection:"column",justifyContent:"center"},children:S("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[c(R,{w:"22%",h:12,r:4,tone:"dark"}),S("div",{style:{display:"flex",gap:9,alignItems:"center"},children:[c(R,{w:26,h:6,r:3,tone:"soft"}),c(R,{w:26,h:6,r:3,tone:"soft"}),c(R,{w:26,h:6,r:3,tone:"soft"}),c(R,{w:18,h:14,r:5,tone:"accent"})]})]})}),footer:S("div",{style:{...N,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:12},children:[S("div",{style:{display:"flex",gap:14},children:[S("div",{style:{flex:1.4,display:"flex",flexDirection:"column",gap:6},children:[c(R,{w:"60%",h:9,r:4,tone:"dark"}),c(R,{w:"90%",h:5,r:2,tone:"soft"}),c(R,{w:"70%",h:5,r:2,tone:"soft"})]}),[0,1].map(e=>S("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:6},children:[c(R,{w:"50%",h:6,r:3,tone:"dark"}),c(R,{w:"80%",h:5,r:2,tone:"soft"}),c(R,{w:"66%",h:5,r:2,tone:"soft"})]},e))]}),c("div",{style:{height:1,background:ye.line}}),S("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c(R,{w:"30%",h:5,r:2,tone:"soft"}),c(R,{w:"16%",h:5,r:2,tone:"soft"})]})]}),grid:c("div",{style:{...N,padding:14,display:"grid",gridTemplateColumns:"1fr 1fr",gridTemplateRows:"1fr 1fr",gap:9},children:Array.from({length:4}).map((e,o)=>c("div",{style:{borderRadius:6,background:ye.block}},o))}),blanksection:c("div",{style:{...N,padding:14,display:"flex"},children:S("div",{style:{flex:1,border:`1px dashed ${ye.line}`,borderRadius:7,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:[c(R,{w:14,h:2,r:1,tone:"tint"}),c(R,{w:2,h:14,r:1,tone:"tint",style:{position:"absolute"}})]})}),spacer:S("div",{style:{...N,padding:14,display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[c(R,{w:"100%",h:6,r:3,tone:"soft"}),c(R,{w:16,h:22,r:3,tone:"block",style:{alignSelf:"center"}}),c(R,{w:"100%",h:6,r:3,tone:"soft"})]}),divider:c("div",{style:{...N,padding:14,display:"flex",alignItems:"center"},children:c(R,{w:"100%",h:3,r:2,tone:"dark"})}),customhtml:S("div",{style:{...N,display:"flex",alignItems:"center",justifyContent:"center",gap:8,background:ld},children:[c(R,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(-14deg)"}}),c(R,{w:16,h:10,r:3,tone:"accent"}),c(R,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(14deg)"}})]}),heading:c("div",{style:{...N,padding:14,display:"flex",alignItems:"center"},children:c(R,{w:"64%",h:13,r:4,tone:"dark"})}),text:S("div",{style:{...N,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[c(R,{w:"100%",h:6,r:3,tone:"soft"}),c(R,{w:"96%",h:6,r:3,tone:"soft"}),c(R,{w:"100%",h:6,r:3,tone:"soft"}),c(R,{w:"58%",h:6,r:3,tone:"soft"})]}),image:c("div",{style:{position:"absolute",inset:14,borderRadius:7,background:ld}}),button:c("div",{style:{...N,display:"flex",alignItems:"center",justifyContent:"center"},children:c(R,{w:"34%",h:16,r:8,tone:"accent"})}),menu:S("div",{style:{...N,padding:"14px 22%",display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[c(R,{w:"48%",h:7,r:3,tone:"dark"}),c(R,{w:"82%",h:5,r:2,tone:"soft"}),c(R,{w:"66%",h:5,r:2,tone:"soft"}),c(R,{w:"74%",h:5,r:2,tone:"soft"}),c(R,{w:"58%",h:5,r:2,tone:"soft"})]}),emailform:S("div",{style:{...N,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[c(R,{w:"56%",h:8,r:3,tone:"dark"}),S("div",{style:{display:"flex",gap:6},children:[c("div",{style:{flex:1,height:16,borderRadius:5,border:`1px solid ${ye.line}`}}),c(R,{w:"30%",h:16,r:5,tone:"accent"})]})]}),sociallogos:c("div",{style:{...N,display:"flex",alignItems:"center",justifyContent:"center",gap:9},children:[0,1,2,3].map(e=>c(R,{w:16,h:16,r:8,tone:"dark"},e))}),search:c("div",{style:{...N,padding:"0 18%",display:"flex",alignItems:"center"},children:S("div",{style:{flex:1,height:22,borderRadius:11,border:`1px solid ${ye.line}`,display:"flex",alignItems:"center",gap:7,padding:"0 9px"},children:[c("div",{style:{width:9,height:9,borderRadius:5,border:`2px solid ${ye.dark}`}}),c(R,{w:"46%",h:5,r:2,tone:"soft"})]})}),cart:S("div",{style:{...N,display:"flex",alignItems:"center",justifyContent:"center",gap:7},children:[c("div",{style:{width:22,height:18,borderRadius:"3px 3px 6px 6px",border:`2px solid ${ye.dark}`}}),c("div",{style:{padding:"2px 6px",borderRadius:6,border:`1.5px solid ${ye.dark}`},children:c(R,{w:7,h:7,r:2,tone:"dark"})})]}),countryswitch:S("div",{style:{...N,padding:14,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:5},children:[S("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"4px 8px",border:`1px solid ${ye.line}`},children:[c(R,{w:22,h:6,r:2,tone:"dark"}),c(R,{w:6,h:4,r:1,tone:"soft"})]}),S("div",{style:{width:"46%",display:"flex",flexDirection:"column",gap:4,padding:6,border:`1px solid ${ye.line}`},children:[c(R,{w:"80%",h:4,r:2,tone:"accent"}),c(R,{w:"64%",h:4,r:2,tone:"soft"}),c(R,{w:"72%",h:4,r:2,tone:"soft"})]})]}),legalline:S("div",{style:{...N,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[c("div",{style:{height:1,background:ye.line}}),S("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c(R,{w:"38%",h:5,r:2,tone:"soft"}),S("div",{style:{display:"flex",gap:5},children:[c(R,{w:14,h:5,r:2,tone:"soft"}),c(R,{w:14,h:5,r:2,tone:"soft"}),c(R,{w:14,h:5,r:2,tone:"soft"})]})]})]}),fallback:c("div",{style:{position:"absolute",inset:14,borderRadius:8,background:ye.block}})};function hb({type:e}){let o=oN[e]??"",t=tN[o]??xb[o]??xb.fallback;return c("div",{className:"sf-thumb","aria-hidden":"true",style:{position:"absolute",inset:0,background:"var(--sf-thumb-thumb-bg)",pointerEvents:"none",containerType:"inline-size"},children:t})}import{useScreenDocument as bs}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as yr,jsxs as rN}from"react/jsx-runtime";import aN from"efficient-easel/screen/components/SidePanelHead";import{StylesIcon as nN}from"efficient-easel/rail";import{Tooltip as lN}from"efficient-shell/ui";function gb({tokenRef:e,siteId:o,onClose:t,onNotify:r,tab:a,onTabChange:n}){let s=cr();return rN("div",{className:"sf-styles",children:[yr(aN,{icon:yr(nN,{}),title:l("Styles"),context:yr(lN,{content:l("{name} \u2014 renamed in the Console: {place}.",{name:s,place:l("Storefront \u25B8 Sites \u25B8 Settings")}),className:"sf-name-tip",children:yr("span",{className:"sf-name-text",children:s})})}),yr("div",{className:"sf-insp-body es-insp-body sf-scroll",children:yr(hl,{tokenRef:e,siteId:o,onNotify:r,tab:a,onTabChange:n})})]})}import{jsx as be,jsxs as Dt,Fragment as uN}from"react/jsx-runtime";import{Fragment as Ab,useEffect as Bb,useRef as md}from"react";import{useTreeDrag as Db}from"efficient-easel/drag";import{GlobeIcon as pN,ImageIcon as mN,LocationIcon as xN,MapIcon as IN,TextLinesIcon as hN,TrashIcon as _b}from"efficient-easel/icons";import{Subtree as Nb,TreeRow as Oa,TreeRowAction as Mb,TreeSeam as Hb}from"efficient-easel/tree";import{useEaselStrings as gN}from"efficient-easel/strings";import{createPreviewSelectionContext as sN}from"efficient-easel/draw/client";var{Provider:WQ,useSelection:yb}=sN("selectedLocationPartId");function bb(e,o,t){return`${e}::${o}::${t}`}function Sb(e){if(!e)return null;let o=e.split("::");if(o.length<3)return null;let t=o[o.length-1];if(t!=="image"&&t!=="map")return null;let r=Number(o[o.length-2]);if(!Number.isInteger(r)||r<0)return null;let a=o.slice(0,-2).join("::");return a?{nodeId:a,index:r,part:t}:null}import{useSyncExternalStore as iN}from"react";var fN={level:"groups"},wb=fN,fd=new Set;function no(e){wb=e;for(let o of fd)o()}function cN(e){return fd.add(e),()=>{fd.delete(e)}}var Cb=()=>wb;function vb(){return iN(cN,Cb,Cb)}function kb(e,o,t){let r=[];return e.forEach((a,n)=>{let s=o(a),i=r.find(f=>f.key===s);i||(i={key:s,name:t(a),items:[]},r.push(i)),i.items.push({item:a,index:n})}),r}function $Q(e){if(e<=1)return"grid-cols-1";if(e===2)return"grid-cols-2";if(e===3)return"grid-cols-3";if(e===4)return"grid-cols-4";let o=t=>e%t||t;return o(4)>=o(3)?"grid-cols-4":"grid-cols-3"}var Ea=e=>String(e?.group??""),cd=new WeakMap,dN=0;function as(e){let o=cd.get(e);return o||(o=`loc${++dN}`,cd.set(e,o)),o}var Tb=(e,o)=>o||e||"Ungrouped",Pb={photo:"",group:"",groupName:"",name:"City name",state:"State",country:"Country",timezone:"GMT \xB7 UTC +0",address:`Address line one
|
|
6
|
+
Address line two`,phone:"+00 000 0000",hours:"Mon\u2013Fri 9:00\u201318:00",lat:0,lng:0,mapsUrl:""};function Bt(e){return kb(e,Ea,o=>String(o?.groupName??"")).map(o=>({key:o.key,name:o.name,cards:o.items.map(t=>t.item)}))}var dd=e=>e.flatMap(o=>o.cards),Fb=(e,o,t)=>Math.min(Math.max(e,o),t);function ns(e,o,t){let r=0;for(let a=0;a<e.length;a++)if(Ea(e[a])===o){if(r===t)return a;r++}return-1}function ud(e,o,t){let r=Bt(e);if(o<0||o>=r.length)return e;let[a]=r.splice(o,1),n=Fb(o<t?t-1:t,0,r.length);return r.splice(n,0,a),dd(r)}function pd(e,o,t,r,a){let n=Bt(e),s=n.find(m=>m.key===o),i=n.find(m=>m.key===r);if(!s||!i||t<0||t>=s.cards.length)return e;let[f]=s.cards.splice(t,1),d=o===r?f:{...f,group:i.key,groupName:i.name};d!==f&&cd.set(d,as(f));let p=Fb(s===i&&t<a?a-1:a,0,i.cards.length);return i.cards.splice(p,0,d),dd(n)}function Eb(e,o){let t=Bt(e),r=t.find(n=>n.key===o),a={...Pb,group:o,groupName:r?.name??""};return r?(r.cards.push(a),dd(t)):[...e,a]}function Ob(e){let o=new Set(Bt(e).map(a=>a.key)),t=o.size+1,r=`Group ${t}`;for(;o.has(r);)r=`Group ${++t}`;return{cards:[...e,{...Pb,group:r,groupName:""}],key:r}}function Lb(e,o){return e.filter(t=>Ea(t)!==o)}function Rb(e,o,t){let r=ns(e,o,t);return r<0?e:e.filter((a,n)=>n!==r)}function KQ(e,o,t){let r=e.flatMap((s,i)=>Ea(s)===o?[i]:[]),a=e.slice();r.forEach((s,i)=>{a[s]=t[i]});let n=t.slice(r.length);return[...a.filter(s=>s!==void 0),...n]}function VQ(e,o,t){return o.flatMap(r=>{let a=e.filter(n=>Ea(n)===r);return a.length?a:t(r)})}var ss="ContactLocations",ls=e=>({parentId:`locations-${e}`,slot:"groups"}),xd=(e,o)=>({parentId:`locations-${e}`,slot:`cities:${o}`});function Wb(e,o){let{readOnly:t,selected:r}=o,a=gN().tree,n=o.data?.content??[],s=e.kind===sb.kind,i=md(null);Bb(()=>{let g=r?.type===ss?String(r.props.id):null;g&&g!==i.current&&no({level:"groups"}),i.current=g},[r?.props.id]);let{selectedLocationPartId:f,setSelectedLocationPartId:d,setSelectHandler:p}=yb(),m=vb(),x=(g,b)=>{let O=n[g];O&&o.replace(g,{type:O.type,props:{...O.props,locations:b}})},I=g=>{let b=n[g]?.props?.locations;return Array.isArray(b)?b:[]},y=Db({keyOf:g=>`group:${g.si}:${g.index}`,readOnly:!!t,canDrop:(g,b)=>b.parentId===ls(g.si).parentId&&b.slot==="groups",onDrop:(g,b)=>{x(g.si,ud(I(g.si),g.index,b.index)),m.level==="city"&&no({level:"groups"})},onStep:(g,b)=>{x(g.si,ud(I(g.si),g.index,b<0?g.index-1:g.index+2)),m.level==="city"&&no({level:"groups"})}}),w=Db({keyOf:g=>`city:${g.si}:${g.group}:${g.index}`,readOnly:!!t,canDrop:(g,b)=>b.parentId===ls(g.si).parentId&&b.slot.startsWith("cities:"),onDrop:(g,b)=>{let O=b.slot.slice(7);x(g.si,pd(I(g.si),g.group,g.index,O,b.index)),no({level:"group",key:O})},onStep:(g,b)=>{x(g.si,pd(I(g.si),g.group,g.index,g.group,b<0?g.index-1:g.index+2)),m.level==="city"&&no({level:"group",key:g.group})}}),v=md(n);v.current=n;let k=md(()=>{});Bb(()=>{p(g=>{let b=Sb(g);if(!b)return;let O=v.current.findIndex(F=>F.props?.id===b.nodeId);O<0||k.current(O,{level:b.part,index:b.index})})},[p]);let C=(g,b)=>{i.current=n[g]?.props?.id??null,o.select(g),no(b),e.reveal();let O=n[g]?.props?.id;typeof O=="string"&&(b.level==="image"||b.level==="map")?d(bb(O,b.index,b.level)):d(null),typeof O=="string"&&o.scrollTo(O)};return k.current=C,{renderLocationTree:(g,b,{rowClick:O,isCollapsed:F,toggleCollapse:L})=>{let P=I(b),M=Bt(P),z=String(g.props.id),B=s&&r?.props.id===z,A=D=>be(Hb,{...t?{}:y.seam({place:{...ls(b),index:D}})},`seam:${z}:groups:${D}`),W=(D,te)=>be(Hb,{...t?{}:w.seam({place:{...xd(b,D),index:te}})},`seam:${z}:cities:${D}:${te}`);return Dt(uN,{children:[be(Oa,{icon:be(hN,{size:13}),name:l("Texts"),words:a,onSelect:()=>C(b,{level:"texts"}),selected:B&&m.level==="texts",rowProps:{onClick:O(()=>C(b,{level:"texts"}))}}),M.map((D,te)=>{let ie=`${z}::grp::${D.key}`,de=F(ie),lo=B&&m.level==="group"&&m.key===D.key,so=D.name||D.key?Tb(D.key,D.name):l("Ungrouped"),Le={...xd(b,D.key),index:D.cards.length},io=w.row({item:{si:b,group:D.key,index:-1},place:Le,into:Le,canDrag:!1},{onClick:O(()=>C(b,{level:"group",key:D.key}))}),_e=y.row({item:{si:b,index:te},place:{...ls(b),index:te}},io.rowProps);return Dt(Ab,{children:[te===0&&A(0),be(Oa,{icon:be(pN,{size:13}),name:so,words:a,onSelect:()=>C(b,{level:"group",key:D.key}),selected:lo,draggable:_e.draggable,dragging:_e.dragging,drop:_e.drop??io.drop,fold:{open:!de,label:l("group"),onToggle:()=>L(ie)},actions:be(Mb,{kind:"delete",label:$e("Delete {label} group ({n} city)","Delete {label} group ({n} cities)",D.cards.length,{label:so}),onClick:()=>{x(b,Lb(P,D.key)),no({level:"groups"})},children:be(_b,{size:15})}),rowProps:_e.rowProps,children:be("span",{className:"es-group-count",children:D.cards.length})}),!de&&Dt(Nb,{children:[D.cards.map((Te,xe)=>{let he=ns(P,D.key,xe),Ne=B&&m.level==="city"&&m.index===he,Pe=String(Te?.name??"")||l("City"),fo=`${z}::city::${as(Te)}`,Me=F(fo),{rowProps:Ge,...co}=w.row({item:{si:b,group:D.key,index:xe},place:{...xd(b,D.key),index:xe}},{onClick:O(()=>C(b,{level:"city",index:he}))});return Dt(Ab,{children:[xe===0&&W(D.key,0),be(Oa,{icon:be(xN,{size:13}),name:Pe,words:a,onSelect:()=>C(b,{level:"city",index:he}),selected:Ne,...co,fold:{open:!Me,label:Pe,onToggle:()=>L(fo)},actions:be(Mb,{kind:"delete",label:l("Delete {name}",{name:Pe}),onClick:()=>{x(b,Rb(P,D.key,xe)),no({level:"group",key:D.key})},children:be(_b,{size:15})}),rowProps:Ge}),!Me&&Dt(Nb,{children:[be(Oa,{icon:be(mN,{size:13}),name:l("Image"),words:a,onSelect:()=>C(b,{level:"image",index:he}),selected:B&&m.level==="image"&&m.index===he,rowProps:{onClick:O(()=>C(b,{level:"image",index:he}))}}),be(Oa,{icon:be(IN,{size:13}),name:l("Map"),words:a,onSelect:()=>C(b,{level:"map",index:he}),selected:B&&m.level==="map"&&m.index===he,rowProps:{onClick:O(()=>C(b,{level:"map",index:he}))}})]}),W(D.key,xe+1)]},as(Te))}),Dt("button",{type:"button",className:"sf-add-card",onClick:()=>{let Te=Eb(P,D.key);x(b,Te);let xe=Bt(Te).find(he=>he.key===D.key);no(xe&&xe.cards.length?{level:"city",index:ns(Te,D.key,xe.cards.length-1)}:{level:"group",key:D.key})},children:[be("span",{className:"sf-plus sf-plus--sm",children:"+"}),l("Add city")]})]}),A(te+1)]},ie)}),Dt("button",{type:"button",className:"sf-add-card",onClick:()=>{let{cards:D,key:te}=Ob(P);x(b,D),C(b,{level:"group",key:te})},children:[be("span",{className:"sf-plus sf-plus--sm",children:"+"}),l("Add group")]})]})},sectionPressed:g=>{g?.type===ss&&no({level:"groups"})}}}import{useEffect as yN,useRef as bN}from"react";import{createNode as Id,newId as hd}from"efficient-easel/data";import{useEaselApi as SN}from"efficient-easel/easel";import{useScreenDocument as CN}from"efficient-easel/screen/components/ScreenDocumentContext";import{useEaselSession as wN}from"efficient-easel/screen/lib/session-context";import{ROOT_ZONE as br,missingPinnedTypes as vN,pinnedDuplicateIds as gd}from"efficient-easel/draw";function zb(e){return!e.docId||e.saveStatus==="saving"?!1:e.seededDocId!==e.docId}function Gb(e,o){let t=e.some(i=>i?.type===ae),r=e[e.length-1],a=!t&&r?.type===le?r:null,n=e.filter(i=>i?.type===le&&i!==a).map(i=>String(i.props?.id??"")).filter(Boolean),s=o.hasChromeDoc&&!t&&!a;return{remove:n,seedHeader:!e.some(i=>i?.type===De),seedFooter:s,seedSiteHeader:s&&!e.some(i=>i?.type===se)}}async function Ub(e){let o=e.blocks?.seeds?.siteHeader;if(!o)return!1;let t;try{t=await o({make:e.make,id:e.id,siteId:e.siteId,token:e.token})}catch{return!1}if(!t||t.type!==se||!e.stillOpen())return!1;let r=e.latest();return r.some(a=>a?.type===se)?!1:(e.write(Vl(r,t)),!0)}function $b(e,o){let{adapter:t,capabilities:r,currentSlug:a,docId:n,data:s,saveStatus:i,siteId:f,tokenRef:d}=CN(),p=wN(),{hasSiteSettings:m,hasPinnedChrome:x}=r,I=!!r.editsPinnedInPlace&&a!==Xt,y=a===Xt,w=SN().getState,v=bN(null);yN(()=>{if(!zb({docId:n,saveStatus:i,seededDocId:v.current})||(v.current=n,!x))return;let k=w().appState.data,C=k.content,g=s?.content??[],b=(P,M)=>P.some(z=>z?.type===M);if(!m){let P=new Set(gd(C)),M=P.size?C.filter(B=>!P.has(B.props.id)):C;if(P.size&&e.setDocument({...k,content:M}),y)return;let z=vN(M,g);if(z.includes(le)){let B=M.length,A=e.insertSection(le,B);e.replaceComponent(br,B,{type:le,props:{id:A,blocks:Kl()}})}z.includes(De)&&e.insertNode(br,0,jl());return}if(y){let P=hr(C);if(P!==C&&e.setDocument({...k,content:[...P]}),!P.find(M=>M.type===le)&&!b(g,le)&&!b(P,ae)&&!b(g,ae)){let M=(B,A)=>Id(o,B,A),z={type:le,props:{blocks:Kl()}};e.insertNode(br,P.length,wa(z,M,hd(ae)))}return}if(I){let P=!!t?.pinnedChrome?.state().docId,M=Gb(C,{hasChromeDoc:P}),z=new Set([...M.remove,...gd(C.filter(A=>!M.remove.includes(String(A.props.id))))]),B=z.size?C.filter(A=>!z.has(String(A.props.id))):C;if(B.length!==C.length&&e.setDocument({...k,content:B}),M.seedFooter&&!b(g,le)&&!b(g,ae)){let A=(D,te)=>Id(o,D,te),W={type:le,props:{blocks:Kl()}};e.insertNode(br,B.length,wa(W,A,hd(ae)))}if(M.seedHeader&&!b(g,De)){let A=B[0]?.type===se?1:0;e.insertNode(br,A,jl())}if(M.seedSiteHeader&&!b(g,se)&&!b(g,le)&&!b(g,ae)){let A=n;Ub({blocks:mn(p),make:(W,D)=>Id(o,W,D),id:hd(se),siteId:f??null,token:d.current,latest:()=>w().appState.data.content,stillOpen:()=>v.current===A,write:W=>{let D=w().appState.data;e.setDocument({...D,content:[...W]})}})}return}let O=C.filter(P=>P.type!==le),F=new Set(gd(O)),L=F.size?O.filter(P=>!F.has(P.props.id)):O;L.length!==C.length&&e.setDocument({...k,content:L}),!b(L,De)&&!b(g,De)&&e.insertNode(br,0,jl())},[n,i,s,w,e,m,x,y,I,t,p,f,d])}import{useEffect as qb,useMemo as kN,useRef as jb}from"react";import{useEasel as TN}from"efficient-easel/easel";import{useEaselHost as PN}from"efficient-easel/screen/lib/host";var yd=e=>typeof e.requestId=="string"&&e.requestId?e.requestId:null;function Kb(){let e=PN(),{appState:o,selectedItem:t,dispatch:r,history:a,config:n}=TN(x=>x),s=n,i=jb({appState:o,dispatch:r,history:a,blockConfig:s});i.current={appState:o,dispatch:r,history:a,blockConfig:s};let f=jb(new Map),d=t?.props?.id,p=kN(()=>Ex(s,o.data,d),[s,o.data,d]),m=p?JSON.stringify(p):"";qb(()=>{e.connected&&e.send("storefront-editor:selection",{selection:p})},[e,m]),qb(()=>e.subscribe(x=>{let{appState:I,dispatch:y,history:w,blockConfig:v}=i.current;switch(x.type){case"storefront-editor:request-document":{let k=yd(x);if(!k)return;e.send("storefront-editor:document",{requestId:k,document:I.data,blocks:Rx(v)});return}case"storefront-editor:apply-page-edits":{let k=yd(x);if(!k)return;let C=Array.isArray(x.ops)?x.ops:[],g=C.length?Ax(v,I.data,C,b=>`${b}-${crypto.randomUUID()}`):{ok:!1,reason:"no changes"};g.ok&&(y({type:"setData",data:g.document,recordHistory:!0}),f.current.set(k,JSON.stringify(g.document.content??[]))),e.send("storefront-editor:page-edits-result",{requestId:k,applied:g.ok,reason:g.ok?null:g.reason});return}case"storefront-editor:undo-page-edits":{let k=yd(x);if(!k)return;let C=f.current.get(k),g=C!==void 0&&C===JSON.stringify(I.data.content??[]);g&&w.hasPast&&(w.back(),f.current.delete(k)),e.send("storefront-editor:page-edits-result",{requestId:k,applied:g&&w.hasPast,reason:g?null:"the page has changed since"});return}case"storefront-editor:set-right-panel":typeof x.shown=="boolean"&&y({type:"setUi",ui:{rightSideBarVisible:x.shown}});return;default:return}}),[e])}import{useEffect as Xb,useState as Zb}from"react";var is=new Map;async function FN(e,o){try{return(await Se().site.get({siteId:o})).slug?.trim()||null}catch(t){return console.warn("[editor-site-slug] could not resolve the site slug",t),null}}function Vb(e,o){let t=is.get(o);return t||(t=FN(e,o),is.set(o,t),t.catch(()=>{is.get(o)===t&&is.delete(o)})),t}var EN=/^(localhost|(?:[a-z0-9-]+\.)+localhost|127(?:\.\d{1,3}){3}|0\.0\.0\.0|\[::1\]|::1)$/i;function bd(e){return!!e&&EN.test(e)}function Yb(e){let{pageSlug:o,siteSlug:t,hostname:r}=e,a=o===rn?"/":`/${encodeURIComponent(o)}`;if(!bd(r))return a;let n=t?.trim();return n?`${a}?site=${encodeURIComponent(n)}`:a}function Qb(e){let{pageSlug:o,siteId:t,token:r}=e,[a,n]=Zb(null),[s,i]=Zb(null),f=Va();Xb(()=>i(f?new URL(f).hostname:window.location.hostname),[f]),Xb(()=>{if(!bd(s)||!t||!r){n(null);return}let p=!1;return Vb(r,t).then(m=>{p||n(m)}),()=>{p=!0}},[s,t,r]);let d=Yb({pageSlug:o,siteSlug:a,hostname:s});return f?`${f}${d}`:d}import{jsx as La}from"react/jsx-runtime";import{ExternalIcon as Jb}from"efficient-easel/icons";import{EaselIconButton as ON}from"efficient-easel/chrome";import{Tooltip as LN,iconButtonClasses as RN}from"efficient-shell/ui";function AN({pageId:e,liveHref:o,draftLink:t,win:r=window}){let a=r.open("","_blank");if(a)try{a.opener=null}catch{}let n=s=>{a&&!a.closed?a.location.href=s:r.open(s,"_blank","noopener,noreferrer")};return t(e).then(s=>n(s.url??o),()=>n(o))}function eS({liveHref:e,pageId:o,draftLink:t}){return t&&o?La(ON,{label:l("Preview your saved draft in a new tab"),tip:l("Open your saved draft in a new tab. Visitors don't see it."),onClick:()=>{AN({pageId:o,liveHref:e,draftLink:t})},children:La(Jb,{})}):La(LN,{content:l("Preview the live site (opens in a new tab)"),side:"bottom",children:La("a",{className:RN({className:"es-iconbtn"}),href:e,target:"_blank",rel:"noopener noreferrer","aria-label":l("Preview the live site in a new tab"),children:La(Jb,{})})})}import{createElement as WN,useCallback as zN,useEffect as bS,useRef as SS,useState as GN}from"react";import{ClockIcon as UN}from"efficient-shell/icons/efficient";import{useScreenDocument as $N}from"efficient-easel/screen/components/ScreenDocumentContext";import{useSyncExternalStore as BN}from"react";import{useScreenDocument as DN}from"efficient-easel/screen/components/ScreenDocumentContext";var _N=()=>()=>{},oS=()=>null;function fs(e){return BN(e?e.subscribe:_N,e?e.state:oS,e?e.state:oS)}function cs(){let{adapter:e}=DN();return e?.pinnedChrome}import{useSyncExternalStore as aS}from"react";var Ra=!1,Sr=null,Sd=new Set;function Ba(){for(let e of Sd)e()}function nS(e){return Sd.add(e),()=>{Sd.delete(e)}}function lS(){Ra||(Ra=!0,Ba())}function sS(){Ra&&(Ra=!1,Ba())}function tS(){return Ra}function iS(){return aS(nS,tS,tS)}function rS(){return Sr}function ds(){Sr&&(Sr=null,Ba())}function fS(){return aS(nS,rS,rS)}var Aa=class extends Error{constructor(){super("The editor's last changes could not be saved, so nothing was restored."),this.name="HeldEditsNotSaved"}};async function cS(e,o,t,{flushSave:r,reload:a}){if(!await r())throw new Aa;let n=await e.restore(o,t);return Qp(n.liveState),a(),n}async function dS({access:e,version:o,page:t,...r}){let a=await cS(e,o.id,t?{page:t.id}:{},r);Sr={title:NN(o,t??null),undo:a.undo},Ba()}async function uS({access:e,...o}){let t=Sr?.undo;t&&(await cS(e,t,{},o),Sr=null,Ba())}function pS(e){return e.name?e.name:e.kind==="draft_before_restore"?l("Draft before restore"):l("Version {n}",{n:e.number})}function NN(e,o){return e.kind==="draft_before_restore"?l("Your drafts from before the restore are back"):o?l("{page} from version {n} is now your draft",{page:o.name,n:e.number}):l("Version {n} is now your draft",{n:e.number})}function mS(e){let o=e.changes.filter(r=>r.kind==="page").length,t=[...o?[$e("{n} page","{n} pages",o)]:[],...e.changes.filter(r=>r.kind!=="page").map(r=>r.name)];if(!t.length)return"";try{return new Intl.ListFormat(Rs(),{type:"conjunction"}).format(t)}catch{return t.join(", ")}}function xS(e){return e.change==="take_down"?l("{name} (taken down)",{name:e.name}):e.name}function IS(e,o=new Date){let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let r=Rs(),a=new Intl.DateTimeFormat(r,{hour:"numeric",minute:"2-digit"}).format(t);if(t.toDateString()===o.toDateString())return l("Today, {time}",{time:a});let n=new Intl.DateTimeFormat(r,{day:"numeric",month:"short",...t.getFullYear()===o.getFullYear()?{}:{year:"numeric"}}).format(t);return l("{day}, {time}",{day:n,time:a})}import{useSyncExternalStore as MN}from"react";var Cr=new Map,Cd=new Set;function wd(e,o){if(!(Cr.has(e)&&Cr.get(e)===o)){Cr.set(e,o);for(let t of Cd)t()}}function nee(e,o){wd(e,o)}function lee(e,o){let t=Cr.get(e);wd(e,o??(t==="live"?"changed":t))}function see(e,o){wd(e,o??"live")}function iee(e){return Cr.get(e)}function HN(e){return Cd.add(e),()=>{Cd.delete(e)}}function hS(e){let o=()=>e?Cr.get(e):void 0;return MN(HN,o,o)}function gS(e,o){return e==="live"&&o?"changed":e}function vd({live:e,onPress:o,busy:t=!1,pinnedUnpublished:r=!1,goingLive:a}){let n=e==="live"&&!r,s=e==="changed"?l("Changes not live yet"):e==="never"?l("Never published"):r?l("Header and footer not live yet"):e==="live"?l("Everything is live"):null;return{label:l("Publish"),tooltip:e==="never"?l("Put this page on your site"):l("Put your changes on your site"),status:s,quiet:n?{label:l("Published"),reason:l("Everything is live")}:null,...a&&a.length?{goingLive:a}:{},onPress:o,busy:t}}function yS(e){return e.map(o=>o.change==="take_down"?l("{name} (taken down)",{name:o.name}):o.name)}function CS(e){let{docId:o,capabilities:t,hasUnsavedEdits:r,onPublish:a,adapter:n}=$N(),s=gS(hS(o??null),r),i=fs(cs()),f=n.siteLiveState;bS(()=>{if(f)return yi(f),hn(0),()=>yi(null)},[f]);let d=gn(),[p,m]=GN(!1),x=SS(e);x.current=e;let I=SS(!0);bS(()=>(I.current=!0,()=>{I.current=!1}),[]);let y=zN(()=>{m(!0),a(x.current).then(()=>{ds()}).finally(()=>{I.current&&m(!1)})},[a]);if(t.canPublish){if(f){let w=d===void 0?void 0:r||d.state==="changed"?"changed":"live",v=vd({live:w,onPress:y,busy:p,goingLive:yS(d?.changes??[])});return n.siteVersions?{...v,menuItems:qN()}:v}return vd({live:s,onPress:y,busy:p,pinnedUnpublished:i?.unpublished??!1})}}function qN(){return[{key:"version-history",label:l("Version history"),icon:WN(UN),onSelect:lS}]}import{jsx as H,jsxs as ze,Fragment as Na}from"react/jsx-runtime";import{useCallback as jN,useEffect as KN,useId as kS,useRef as VN,useState as je}from"react";import{Avatar as YN,Banner as Da,Button as _t,ColoredBadge as kd,Dialog as TS,Drawer as XN,DropdownMenu as ZN,FormField as PS,iconButtonClasses as QN,Inline as Td,Input as JN,ListRow as eM,Select as oM,SortableList as tM,Stack as _a}from"efficient-shell/ui";import{EditIcon as rM,EyeIcon as wS,MenuIcon as aM,MoreIcon as nM,PageIcon as FS,RevertIcon as vS,StylesIcon as lM}from"efficient-shell/icons/efficient";import{useScreenDocument as ES}from"efficient-easel/screen/components/ScreenDocumentContext";var sM={page:FS,menu:aM};function iM(e,o){return e.pages.find(t=>t.id===o)??e.pages[0]??null}function fM(e,o){let t=window.open("","_blank");if(t)try{t.opener=null}catch{}return e.preview(o).then(({url:r})=>{t&&!t.closed?t.location.href=r:window.open(r,"_blank","noopener,noreferrer")},r=>{throw t?.close(),r})}function cM({version:e,page:o,waiting:t,busy:r,error:a,onCancel:n,onConfirm:s,onPage:i}){let f=kS();if(!e)return null;let d=e.kind==="draft_before_restore",p=e.number,m=mS(e),x=d?l("Put your drafts back?"):o?l("Restore {page} from version {n}?",{page:o.name,n:p}):l("Restore version {n}?",{n:p}),I=d?l("Your drafts go back to how they were before the restore."):o?l("{page} goes back to version {n} as a draft. Nothing else on your website changes.",{page:o.name,n:p}):m?l("The whole website goes back to version {n} as a draft: {what}.",{n:p,what:m}):l("The whole website goes back to version {n} as a draft.",{n:p}),y=e.deletedPictures??0;return H(TS,{open:!0,onClose:()=>{r||n()},size:"sm",title:x,footer:ze(Na,{children:[H(_t,{variant:"secondary",onClick:n,disabled:r,children:l("Cancel")}),H(_t,{onClick:s,loading:r,disabled:r,children:l("Restore as draft")})]}),children:ze(_a,{gap:4,children:[o&&e.pages.length>1?H(PS,{label:l("Page"),htmlFor:f,children:H(oM,{id:f,value:o.id,options:e.pages.map(w=>({value:w.id,label:w.name})),onChange:i,disabled:r})}):null,H("p",{children:I}),H("p",{children:l("Your live website does not change until you press Publish.")}),y>0?H(Da,{tone:"warning",children:$e("{n} picture in this version was deleted from the media library. It stays empty.","{n} pictures in this version were deleted from the media library. They stay empty.",y)}):null,t?H(Da,{tone:"info",title:l("Your unpublished changes are kept"),children:l("They are saved in Version history as \u201CDraft before restore\u201D, so you can get them back.")}):null,a?H(Da,{tone:"danger",children:a}):null]})})}function dM({version:e,onCancel:o,onSave:t}){let r=kS(),[a,n]=je(null),[s,i]=je(""),[f,d]=je(!1),[p,m]=je(null);if(e!==a&&(n(e),i(e?.name??""),m(null)),!e)return null;let x=s.trim()===e.name,I=async()=>{if(!(f||x)){d(!0),m(null);try{await t(s.trim())}catch{m(l("The name was not saved. Try again."))}finally{d(!1)}}};return H(TS,{open:!0,onClose:()=>{f||o()},size:"sm",title:l("Name this version"),footer:ze(Na,{children:[H(_t,{variant:"secondary",onClick:o,disabled:f,children:l("Cancel")}),H(_t,{onClick:()=>{I()},loading:f,disabled:f||x,children:l("Save")})]}),children:H(PS,{label:l("Name"),htmlFor:r,hint:l("Named versions are always kept. Leave it empty to take the name away."),error:p??void 0,children:H(JN,{id:r,value:s,invalid:!!p,onChange:y=>i(y.target.value),onKeyDown:y=>{y.key==="Enter"&&I()}})})})}function uM({version:e,expanded:o,onToggle:t,onPreview:r,onRestore:a,onRestorePage:n,onName:s}){let i=e.kind==="draft_before_restore",f=!e.live,d=e.changes.length,p=[...i?[]:[{key:"preview",label:l("Preview"),icon:H(wS,{}),onSelect:r}],...f?[{key:"restore",label:i?l("Put these drafts back"):l("Restore whole website"),icon:H(vS,{}),onSelect:a}]:[],...f&&!i&&e.pages.length?[{key:"restore-page",label:l("Restore one page only"),icon:H(FS,{}),onSelect:n}]:[],...i?[]:[{type:"divider",key:"divider"},{key:"name",label:l("Name this version"),icon:H(rM,{}),onSelect:s}]];return H(eM,{title:ze("span",{className:"sf-version-title",children:[H("span",{children:pS(e)}),e.live?H(kd,{tone:"success",size:"xs",children:l("Live")}):null,e.name?H(kd,{tone:"neutral",size:"xs",children:l("Version {n}",{n:e.number})}):null,i?H(kd,{tone:"warning",size:"xs",children:l("Not published")}):null]}),expanded:o,onToggle:t,actions:H(ZN,{align:"end","aria-label":l("More"),items:p,triggerClassName:QN({variant:"ghost",size:"sm"}),trigger:H(nM,{})}),below:ze(_a,{gap:3,children:[ze(Td,{gap:2,align:"center",wrap:!0,className:"sf-version-meta",children:[H(YN,{name:e.createdBy,size:"xs"}),H("span",{children:e.createdBy}),H("span",{"aria-hidden":"true",children:"\xB7"}),H("span",{children:IS(e.createdAt)}),d?ze(Na,{children:[H("span",{"aria-hidden":"true",children:"\xB7"}),H("span",{children:$e("{n} change","{n} changes",d)})]}):null]}),o?ze(_a,{gap:3,children:[d?H(_a,{gap:2,children:e.changes.map(m=>{let x=sM[m.kind]??lM;return ze(Td,{gap:2,align:"center",children:[H(x,{size:16}),H("span",{children:xS(m)})]},`${m.kind}:${m.id}`)})}):null,ze(Td,{gap:2,children:[i?null:H(_t,{variant:"secondary",size:"sm",leftIcon:H(wS,{}),onClick:r,children:l("Preview")}),f?H(_t,{variant:"secondary",size:"sm",leftIcon:H(vS,{}),onClick:a,children:l("Restore")}):null]})]}):null]})})}function pM({open:e,onClose:o,access:t,waiting:r}){let{flushSave:a,reloadFromServer:n,docId:s}=ES(),[i,f]=je(null),[d,p]=je(!1),[m,x]=je(null),[I,y]=je(null),[w,v]=je(!1),[k,C]=je(null),[g,b]=je(null),[O,F]=je(!1),L=VN(0),P=jN(()=>{let B=++L.current;p(!1),t.list().then(A=>{B===L.current&&f(A)},()=>{B===L.current&&p(!0)})},[t]);KN(()=>{e&&P()},[e,P]);let M=B=>{F(!1),fM(t,B.id).catch(()=>F(!0))},z=async()=>{if(!(!I||w)){v(!0),C(null);try{await dS({access:t,version:I.version,page:I.page,flushSave:a,reload:n}),y(null),o()}catch(B){C(B instanceof Aa?l("Your last changes did not save, so nothing was restored. Try again."):l("The version was not restored. Nothing changed. Try again."))}finally{v(!1)}}};return ze(Na,{children:[H(XN,{open:e,onClose:o,side:"right",size:"md",title:l("Version history"),description:ze(Na,{children:[l("Every Publish keeps a copy of the whole website: pages, menus and site styles.")," ",l("Products, prices and forms always show as they are now.")]}),footer:H("span",{className:"sf-version-foot",children:l("The newest 30 are kept. Named versions are always kept.")}),children:ze(_a,{gap:3,children:[O?H(Da,{tone:"danger",onDismiss:()=>F(!1),children:l("The preview did not open. Try again.")}):null,d?H(Da,{tone:"danger",action:H(_t,{variant:"secondary",size:"sm",onClick:P,children:l("Try again")}),children:l("Version history did not load.")}):i===null?H("p",{className:"sf-version-foot",children:l("Loading versions")}):i.length===0?H("p",{className:"sf-version-foot",children:l("No versions yet. Every Publish from now on keeps one.")}):H(tM,{"aria-label":l("Versions"),spacing:"comfortable",children:i.map(B=>H(uM,{version:B,expanded:m===B.id,onToggle:()=>x(A=>A===B.id?null:B.id),onPreview:()=>M(B),onRestore:()=>{C(null),y({version:B,page:null})},onRestorePage:()=>{C(null),y({version:B,page:iM(B,s)})},onName:()=>b(B)},B.id))})]})}),H(cM,{version:I?.version??null,page:I?.page??null,waiting:r,busy:w,error:k,onCancel:()=>y(null),onConfirm:()=>{z()},onPage:B=>y(A=>A&&{...A,page:A.version.pages.find(W=>W.id===B)??A.page})}),H(dM,{version:g,onCancel:()=>b(null),onSave:async B=>{await t.name(g.id,B),b(null),P()}})]})}function OS(){let{adapter:e,hasUnsavedEdits:o}=ES(),t=e.siteVersions,r=iS(),a=gn();return t?H(pM,{open:r,onClose:sS,access:t,waiting:o||a?.state==="changed"}):null}import{useEaselSession as fw}from"efficient-easel/screen/lib/session-context";import{buildPaletteSections as Mee,categoryLabel as Hee,paletteWithoutPinned as Wee,pinnedSection as zee}from"efficient-easel/screen/lib/puck/palette-sections";var LS=["general","commerce","service"],wr=[{key:"openers",title:"Hero & intros",defaultExpanded:!0,templateable:!0,sections:[{type:"Hero",label:"Hero Slideshow",set:"general"},{type:"HeroSingle",label:"Hero",set:"general"},{type:"IntroBleed",label:"Scroll-Over Text",set:"general"}]},{key:"shop",title:"Shop & galleries",templateable:!0,sections:[{type:"Collections",label:"Collections",set:"commerce"},{type:"AlloyWheelsListing",label:"List",set:"commerce"},{type:"CatalogFilterBar",label:"Catalog Filter Bar",set:"commerce"},{type:"ProductGrid",label:"Product Grid",set:"commerce"},{type:"FitmentFinder",label:"Fitment Form",set:"commerce"},{type:"Gallery",label:"Tabbed Gallery",set:"commerce"},{type:"GalleryB",label:"Customer Photo Grid",set:"commerce"},{type:"SpecStrip",label:"Spec Strip",set:"general"}]},{key:"product",title:"Product page",templateable:!0,sections:[{type:"ProductHero",label:"Product Hero",set:"commerce"},{type:"SpecTable",label:"Spec Table",set:"commerce"},{type:"ProcessSteps",label:"Image & Text Columns",set:"general"},{type:"DetailRows",label:"Feature Rows",set:"commerce"},{type:"FitmentTable",label:"Fitment Table",set:"commerce"},{type:"TyreSizes",label:"Tyre Sizes",set:"commerce"},{type:"TyreFitment",label:"Tyre Fitment Form",set:"commerce"},{type:"EuTyreLabel",label:"EU Tyre Label",set:"commerce"},{type:"RelatedProducts",label:"Related Products",set:"commerce"},{type:"BundleOffer",label:"Bundle Products",set:"commerce"}]},{key:"checkout",title:"Checkout & ordering",templateable:!0,sections:[{type:"OrderSummary",label:"Order Table",set:"general"},{type:"DeliveryOptions",label:"Delivery Options",set:"commerce"},{type:"PaymentBadges",label:"Payment Methods",set:"general"},{type:"CheckoutCTA",label:"Ready-to-Order Banner",set:"commerce"}]},{key:"about",title:"About & brand story",templateable:!0,sections:[{type:"Manifesto",label:"Brand Text",set:"general"},{type:"Timeline",label:"Story Timeline",set:"general"},{type:"Footprint",label:"Locations Map",set:"general"}]},{key:"content",title:"Text & content",templateable:!0,sections:[{type:"Prose",label:"Editorial Text",set:"general"},{type:"ParagraphsA",label:"Lead Text",set:"general"},{type:"Split",label:"Image & Text Split",set:"general"},{type:"Cards",label:"Cards",set:"general"}]},{key:"proof",title:"Stats & social proof",templateable:!0,sections:[{type:"Stats",label:"Stats",set:"general"},{type:"StatsParagraph",label:"Stats with Text",set:"general"},{type:"Chart",label:"Chart",set:"general"},{type:"Mockup",label:"Mockup Card",set:"general"},{type:"Testimonials",label:"Testimonials",set:"general"},{type:"Reviews",label:"Reviews",set:"service"},{type:"Logos",label:"Logos",set:"general"}]},{key:"promo",title:"Promotions & sign-ups",templateable:!0,sections:[{type:"Banner",label:"Banner",set:"general"},{type:"TitleWithButtons",label:"Call-to-Action Heading",set:"general"},{type:"Ticker",label:"Scrolling Bar",set:"general"},{type:"Countdown",label:"Countdown",set:"general"},{type:"Subscribe",label:"Signup Form",set:"service"}]},{key:"blog",title:"Blog & journal",templateable:!0,sections:[{type:"Masthead",label:"Issue Header",set:"general"},{type:"FeaturedCover",label:"Feature Banner",set:"general"},{type:"LongRead",label:"Article Text",set:"general"},{type:"Series",label:"Recurring Columns",set:"general"},{type:"Events",label:"Latest Posts",set:"service"}]},{key:"navigation",title:"Navigation & wayfinding",templateable:!0,sections:[{type:"Breadcrumb",label:"Breadcrumb",set:"general"},{type:"CategoryBar",label:"Category Bar",set:"general"},{type:"DocTabs",label:"Document Tabs",set:"general"}]},{key:"legal",title:"Legal & documents",templateable:!0,sections:[{type:"DocMasthead",label:"Document Header",set:"general"},{type:"DocBody",label:"Document Text",set:"general"},{type:"DocMetaCards",label:"Document Detail Cards",set:"general"}]},{key:"contact",title:"Contact, FAQ & forms",templateable:!0,sections:[{type:"FAQ",label:"Q&A",set:"general"},{type:"ContactRouting",label:"Contact Form",set:"service"},{type:"ContactLocations",label:"Contact / Locations",set:"general"},{type:"SubmitBuild",label:"Photo Submission Form",set:"service"},{type:"ReviewForm",label:"Review Form",set:"service"},{type:"Form",label:"Form",set:"service"},{type:"AppointmentBooking",label:"Booking Form",set:"service"}]},{key:"structure",title:"Layout, structure & embeds",templateable:!1,sections:[{type:"SectionHeader",label:"Section Header",set:"general"},{type:"Flex",label:"Box",set:"general"},{type:"Spacer",label:"Spacer",set:"general"},{type:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]}];function Fee(){return Object.fromEntries(wr.map(e=>[e.key,{title:e.title,components:e.sections.map(o=>o.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var mM={Grid:'Lewis, 2026-09-14: Box and Grid duplicate each other and it feels confusing. 2026-09-15 he chose the order: give Box uneven widths FIRST, then merge Grid into Box. Shown three ways to pick the widths (mockup "Uneven Box Widths"), he chose A \u2014 shape pictures on the Box\'s `Block widths` row, the same "a row is a shape, pick a picture of it" rule he set for the photo wall on 2026-09-07.\n\nWHAT REPLACES IT: a Box set to One row, with `Block widths` at Equal or a shape (Big left, Big right, Bigger left, Bigger right) and its own `Columns on phone`. Measured on PRODUCTION 2026-09-16 ~09:28 AEST (database `efficient-system`, all 10 tenant schemas, 128 storefront pages, both `layout` and `published_layout` \u2014 256 documents): 2 Grid nodes, and they are ONE Grid counted twice \u2014 the 9DIEM homepage on 9diem.com (`xtreme_mudder` schema), once as draft and once as published. It is top-level, holds three `ImageBlock`s at `columns` 3 \u2014 equal thirds \u2014 and NO block sets `Positions`. A Box draws that with `Block widths` at Equal.\n\n\u26A0\uFE0F THE COUNT MOVES; THE RULE MUST NOT DEPEND ON IT. This entry has already carried three different readings. A local-clone snapshot said no Grid used `Positions`. A PRODUCTION reading on 2026-09-15 ~13:15 AEST found 6 nodes on two sites, 4 of them spanned \u2014 hartesmetal.com.au homepage and about, 4 columns, spans 1 + 3. That one was TRUE when it was taken and stopped being true the same day: those two pages were rebuilt on Box (`Block widths: Bigger right`), and on 2026-09-16 they hold zero Grid nodes and are built from `Flex`. \u26D4 So the rule is NOT "there are still N spanned Grids". NEVER delete the Grid component or its `gridSpan` handling, whatever a census says \u2014 Grid still renders, still edits, still drags, and a merchant may rebuild a page either way on any day. Re-run the census on production before anyone PROPOSES deleting either, and read any number written here as the reading of its own day, not as the state of the world.\n\nWHAT A MERCHANT LOSES: a new Grid, and with it a fixed "N per row" that wraps by itself past three across, and the per-block `Positions` number. Box wraps with `Wrap`, but by content width, not by a fixed count.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Grid still renders through it and can still be edited, dragged and added to; no document is rewritten and NO MIGRATION RUNS \u2014 the owner redoes live sections himself.\n\n\u26A0\uFE0F AND IT STAYS DROPPABLE WHERE IT LIVES. The drop rule in lib/puck/config.tsx read the nestable containers off the catalogue\'s `structure` row, so leaving the catalogue would have made every open slot \u2014 a Box included \u2014 refuse a Grid already stored inside one. `scripts/test-retired-grid-stays-editable.tsx` \xA73 pins it.',CompatibleTyres:'Lewis, 2026-09-09: "Do not bother counting. Delete Compatible Tyres and use the new one. The new one needs complete settings \u2014 it must have every setting our cards have." Shown three ways to finish it, he chose C: retire from the menu now, and take styling the card text as its own card.\n\nWHAT REPLACES IT: `RelatedProducts` with its `Show` dropdown set to "Tyres that fit this product". That block is the GENERIC relationship section from card 1128 \u2014 it knows nothing about wheels or tyres, it asks the registry for a relationship by name. The two have rendered through the SAME renderer (`DynamicRelatedProducts`) since that card; this one is the pre-registry one-off that was never removed.\n\n\u26A0\uFE0F THE SWAP WAS NOT SAFE UNTIL #1305, AND SAYING SO IS THE POINT. The first old-versus-new table put in front of the owner was WRONG. `DynamicRelatedProducts` returns EARLY on a tyre answer and draws this component, so the seven card settings, the head split and the Width control all stopped at that call \u2014 nine settings, measured NO EFFECT, on precisely the relationship that replaces this block. #1283 gave the new block the card settings, #1299 the head split and its own Width, #1305 carried all of it onto the tyre branch. Only then was the claim true.\n\nWHAT WAS MEASURED BEFORE RETIRING, four ways, because the premise decides the card:\n \u2022 settable text kinds (SECTION_TEXT_KINDS): both blocks ABSENT \u2014 the map holds only TimelineTrack and Footprint, both AUTHORED lists\n \u2022 read-only text regions: neither `components/CompatibleTyres` nor `components/TyreCard` stamps one\n \u2022 panel rows through resolveFields: this block 31, `RelatedProducts` 42. This block\'s only style-ish key is `_sStyle`, the bucket HEADER, not a control\n \u2022 head text (num/title/description) is authored on both, so `_partStyles` reaches it identically\nSo on the CARD runs the two are zero against zero \u2014 neither can style them \u2014 and everywhere else the new block is ahead. Styling those runs needs a section-level prop family and a paint path for DERIVED text, which no section has yet: a part is anchored by matching an AUTHORED prop\'s string against the DOM, and `lib/puck/source-bound-parts` keeps hydrated copy unreachable on purpose so a merchant cannot type into a copy of a product name and lose it at the next sync. That is its own card, and `lib/sections/text-regions` is the read-only half that already ships.\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT, the same contract Subscribe, Split and SubscribeBlogs have. Every page holding a `CompatibleTyres` still renders through it, no published document is rewritten, and NO MIGRATION RUNS \u2014 the owner\'s standing ruling of 2026-09-05: he redoes live sections himself and deletes the old ones when he does. He also said explicitly not to count them first.\n\n\u26A0\uFE0F AND THIS COMPONENT IS LOAD-BEARING FOR ITS OWN REPLACEMENT: `DynamicRelatedProducts` draws it for EVERY tyre answer. Deleting it would blank the block that replaces it, not just the pages still holding this one.',TimelineTrack:"Lewis, 2026-10-09/10 (decisions.md ND, approved): the horizontal year rail and the Story Timeline do one job, so the rail becomes the Story Timeline's fourth Display, Track. Retired by card [MERGE] One Text Block And Click Through Parts (2026-10-22).\n\nWHAT REPLACES IT: a Story Timeline (`Timeline`) with Display set to Track. It draws this section's own component (`components/TimelineTrack`), so for the same words it draws the same bytes: the band colour (`Background color`, the same built-in), the padding, the CTA and each milestone's `Upcoming` switch (shown on each entry under Track only). An entry's `Body` is the rail's blurb. `scripts/test-timeline-track-display.tsx` \xA72 holds the bytes.\n\nWHAT A MERCHANT LOSES on a NEW rail, said plainly: (1) the head cannot move into a box of its own (`headPlacement`); the layered rebuild puts a head in one Box with its content anyway. (2) The year and title of every milestone are not one text kind: each run is styled on its own. (3) The Width rows follow the Story Timeline's family (`background`), not the rail's (`capped`).\n\nTHE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Milestone Timeline still renders through it and can still be edited; no document is rewritten and NO MIGRATION RUNS.",KeyFeatures:`Lewis, 2026-10-10 (section-merges.md group 4, approved): one Cards section holds Cards and Key Features; Key Features' diamond cells are the card style "Label only". Retired by card [MERGE] One Text Block And Click Through Parts (2026-10-22).
|
|
7
|
+
|
|
8
|
+
WHAT REPLACES IT: a Cards section with Card style set to Label only. It draws this section's own component (\`components/KeyFeatures\`), so for the same words it draws the same bytes: the pill eyebrow when no look is stored, the columns, each cell's link. A cell's words are the card's \`title\` (row "Feature label"), its link the card's \`href\` (row "Link"), both shown under Label only. \`scripts/test-cards-label-only.tsx\` \xA72 holds the bytes.
|
|
9
|
+
|
|
10
|
+
WHAT A MERCHANT LOSES on a NEW Label only section: nothing this section had. It GAINS the Cards head split (its head can move into a box of its own), which Key Features never had: that head draws the shared \`simple\` head, eyebrow ABOVE the heading, where Key Features drew it beside.
|
|
11
|
+
|
|
12
|
+
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. Every page holding a Key Features still renders through it and can still be edited; no document is rewritten and NO MIGRATION RUNS.`,SubscribeBlogs:"card 66396 \u2014 folded into `Subscribe`, which now chooses its rail's content with a `Type` control (the newsletter's own issues, or live blog posts). The two shared 21 of their fields and rendered THE SAME BYTES from equivalent rows, so offering both asked a merchant to choose between two names for one section. The type key stays because it is stored on published pages, and the component stays because those pages still render through it."},Eee=["Grid"],Oee=Array.from(new Set([...wr.flatMap(e=>e.sections.map(o=>o.type)),...Object.keys(mM)])),Lee=Object.fromEntries(wr.flatMap(e=>e.sections.map(o=>[o.type,o.label]))),xM={Heading:"general",Text:"general",Eyebrow:"general",ImageBlock:"general",LogoBlock:"general",ButtonBlock:"general",PostCard:"general",HeroSlide:"general",HeroGroup:"general",Integrations:"general",Grid:"general",TimelineTrack:"general",KeyFeatures:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"commerce",AccountBlock:"commerce",ThemeSwitchBlock:"commerce",SubmitBox:"service",BookingBox:"service",SubscribeBlogs:"service",Footer:"service",FooterLogo:"service",FooterMenu:"service",FooterDivider:"service",FooterGroup:"service",FooterText:"service",FooterEmailSignup:"service",FooterSocial:"service",MenuBlock:"service",EmailFormBlock:"service",SocialLogosBlock:"service",LegalLineBlock:"service",SiteHeader:"service",SiteFooter:"service"},us={...xM,...Object.fromEntries(wr.flatMap(e=>e.sections.map(o=>[o.type,o.set])))};function RS(e){return Object.prototype.hasOwnProperty.call(us,e)?us[e]:void 0}function Pd(e){return Object.keys(us).filter(o=>us[o]===e).sort()}var Ree=Pd("general"),Aee=Pd("commerce"),Bee=Pd("service"),Fd="Flex",lt="Box",Dee=`${lt}es`;function IM(e){return e==="section"?"Blank section":lt}function Ed(e,o,t){return e===Fd?IM(o):t}var hM={openers:{label:"Hero & intros",icon:"image"},shop:{label:"Shop & galleries",icon:"bag"},product:{label:"Product page",icon:"box"},checkout:{label:"Checkout & ordering",icon:"bag"},about:{label:"About & brand story",icon:"book"},content:{label:"Text & content",icon:"type"},proof:{label:"Stats & social proof",icon:"star"},promo:{label:"Promotions & sign-ups",icon:"sparkles"},blog:{label:"Blog & journal",icon:"newspaper"},navigation:{label:"Navigation & wayfinding",icon:"bookmark"},legal:{label:"Legal & documents",icon:"file"},contact:{label:"Contact, FAQ & forms",icon:"mail"},structure:{label:"Layout, structure & embeds",icon:"grid"}};function AS(e){return hM[e]?.label}var BS=Fd;import{currentEaselSession as gM}from"efficient-easel/screen/lib/session";var yM={general:!0,commerce:!0,service:!0};function Od(e){let o=e?.sets;return o?Object.fromEntries(LS.map(t=>[t,o.includes(t)])):yM}function jee(e=gM()){return Od(e.blocks)}import{currentEaselSession as fC}from"efficient-easel/screen/lib/session";var vr="content",ue="Flex",bM="Text & media",SM="Layout & structure",CM=[{type:"Eyebrow",label:"Eyebrow",retired:!0},{type:"Heading",label:"Heading",retired:!0},{type:"Text",label:"Text"},{type:"ImageBlock",label:"Image"},{type:"LogoBlock",label:"Logo"},{type:"ButtonBlock",label:"Button"},{type:"Form",label:"Form"},{type:"PostCard",label:"Post Card"},{type:"Stats",label:"Stats"},{type:"MenuBlock",label:"Menu"},{type:"EmailFormBlock",label:"Email Form"},{type:"SocialLogosBlock",label:"Social Logos"},{type:"LegalLineBlock",label:"Legal Line"},{type:"SearchBlock",label:"Search"},{type:"CartBlock",label:"Cart"},{type:"CountrySwitchBlock",label:"Country Switch"},{type:"AccountBlock",label:"Account"},{type:"ThemeSwitchBlock",label:"Theme Switch"}].map(e=>({...e,group:bM})),wM=(wr.find(e=>e.key==="structure")?.sections??[]).map(e=>({type:e.type,label:e.label,group:SM})),DS=[...CM,...wM],Ld=[{type:"Eyebrow",label:"Eyebrow",retired:!0},{type:"Heading",label:"Heading",retired:!0},{type:"Text",label:"Text"},{type:"ImageBlock",label:"Image"},{type:"LogoBlock",label:"Logo"},{type:"ButtonBlock",label:"Button"},{type:"HeroGroup",label:lt}],Yee=Ld.map(e=>e.type),vM=1,kM=Ld.filter(e=>e.type!=="HeroGroup");function TM(e){return e<vM?Ld:kM}var PM={Flex:{slot:vr,choices:()=>DS},Grid:{slot:vr,choices:()=>DS},HeroGroup:{slot:vr,choices:TM}};function _S(e,o=0){let t=PM[e];return t?{slot:t.slot,choices:t.choices(o)}:null}var kr=()=>({tag:"h2",_partStyles:{text:{textStyle:"heading-2"}}}),Rd=()=>({_partStyles:{text:{textStyle:"body-5",color:"accent",letterSpacing:.3,case:"upper",lineHeight:1.5}}});function Oe(e,o,t,r={}){return{type:e,props:{...o(e),id:t(e),...r}}}function NS(e,o,t){return Oe(ue,e,o,{...t,sectionPaddingTop:void 0,sectionPaddingBottom:void 0})}var FM={Manifesto:(e,o)=>({type:ue,props:{...e(ue),id:o(ue),direction:"row",share:"equal",sectionHeightMode:"screen",name:"Brand Text",content:[Oe(ue,e,o,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:40,sectionPaddingRight:40,content:[Oe("Text",e,o,Rd()),Oe("Text",e,o,kr()),Oe("Text",e,o),Oe("Stats",e,o)]}),NS(e,o,{direction:"column",name:"Picture",content:[]})]}}),Split:(e,o)=>({type:ue,props:{...e(ue),id:o(ue),direction:"row",share:"equal",sectionHeightMode:"screen",sectionHeightValue:70,name:"Image & Text Split",content:[Oe(ue,e,o,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:60,sectionPaddingRight:60,content:[Oe("Text",e,o,Rd()),Oe("Text",e,o,kr()),Oe("Text",e,o),Oe("ButtonBlock",e,o)]}),NS(e,o,{direction:"column",name:"Image",content:[Oe("ImageBlock",e,o)]})]}}),Subscribe:(e,o)=>({type:ue,props:{...e(ue),id:o(ue),direction:"column",name:"Subscribe",content:[Oe("Text",e,o,kr()),Oe("Text",e,o),Oe("Form",e,o)]}})};function ps(e){return FM[e]??null}import{blockTypesIn as lC}from"efficient-easel/screen/lib/puck/block-types-in";import{jsx as Ha,jsxs as r2}from"react/jsx-runtime";import{createContext as a2,useContext as n2}from"react";import{jsx as Tr,jsxs as VS}from"react/jsx-runtime";import{useEffect as Bd,useRef as qM,useState as Ma}from"react";import{jsx as MS}from"react/jsx-runtime";import{createContext as EM,lazy as noe,Suspense as loe,useContext as OM}from"react";var LM={Link:Xd,Image:Yd},RM=EM(LM);function HS(){return OM(RM)}function soe(e){let{Link:o}=HS();return MS(o,{...e})}function WS(e){let{Image:o}=HS();return MS(o,{...e})}import{jsx as zS,Fragment as AM,jsxs as BM}from"react/jsx-runtime";import{useEffect as DM,useRef as GS,useState as _M}from"react";var NM="#t=0.001",MM=2;function HM(e,o){if(e.readyState<MM||!e.videoWidth||!e.videoHeight)return!1;let t=o.getContext("2d");return t?(o.width=e.videoWidth,o.height=e.videoHeight,t.drawImage(e,0,0,o.width,o.height),!0):!1}function US({src:e,objectPosition:o="50% 50%",onError:t}){let r=GS(null),a=GS(null),[n,s]=_M(!1);return DM(()=>{let i=r.current,f=a.current;if(n||!i||!f)return;let d=()=>{HM(i,f)&&s(!0)};return d(),i.addEventListener("loadeddata",d),i.addEventListener("seeked",d),()=>{i.removeEventListener("loadeddata",d),i.removeEventListener("seeked",d)}},[n]),BM(AM,{children:[zS("canvas",{ref:a,"aria-hidden":!0,className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:o,visibility:n?"visible":"hidden"}}),!n&&zS("video",{ref:r,src:`${e}${NM}`,muted:!0,playsInline:!0,preload:"auto",className:"hidden",onError:t})]})}import{imageCopyUrl as qS,imageSrcSet as WM}from"efficient-shell/image-copies";var $S;function Ad(){return $S===void 0?{}:{host:$S}}var poe="(max-width: 800px) 100vw, min(100vw, 1600px)";function jS(e,{fallbackWidth:o=1280,maxWidth:t}={}){let r=WM(e,{...Ad(),...t===void 0?{}:{maxWidth:t}});return r?{src:qS(e,o,Ad()),srcSet:r}:{src:e}}function moe(e){let o=qS(e,1920,Ad());return o===e?`url(${e})`:`url("${o}")`}import{formatFocal as zM,parseFocal as GM}from"efficient-shell/format";var UM="sf-focus-phone",$M="--sf-focus-phone";function KS(e){if(typeof e!="string"||!/^\s*-?\d+(\.\d+)?%\s+-?\d+(\.\d+)?%\s*$/.test(e))return{className:"",style:{}};let{x:o,y:t}=GM(e);return{className:UM,style:{[$M]:zM(o,t)}}}var jM=.5;function YS({videoSrc:e,posterSrc:o,showVideo:t=!0,playbackRate:r=jM,objectPosition:a="50% 50%",objectPositionPhone:n,quiet:s=!1}){let i=KS(n),f=o||"",d=e||"",[p,m]=Ma(!1),[x,I]=Ma(!1),[y,w]=Ma(!1),[v,k]=Ma(!1),[C,g]=Ma(!1),b=qM(null);Bd(()=>{m(!1),I(!1),w(!1),k(!1)},[e,o]),Bd(()=>{if(typeof window>"u")return;let L=()=>{let P=window;P.requestIdleCallback?P.requestIdleCallback(()=>g(!0),{timeout:2e3}):setTimeout(()=>g(!0),800)};if(document.readyState==="complete"){L();return}return window.addEventListener("load",L,{once:!0}),()=>window.removeEventListener("load",L)},[]),Bd(()=>{let L=b.current;if(!L)return;let P=()=>{L.playbackRate=r};return P(),L.addEventListener("loadedmetadata",P),()=>L.removeEventListener("loadedmetadata",P)},[e,r]);let O=Zd(f),F=f&&O&&!x?jS(f):{src:f};return VS("div",{className:"absolute inset-0 z-[1]",children:[Tr("div",{className:"absolute inset-0",style:{background:"var(--site-surface)"}}),f&&(O?Tr("img",{src:F.src,...F.srcSet?{srcSet:F.srcSet,sizes:"100vw"}:{},alt:"",className:`absolute inset-0 z-[2] h-full w-full object-cover ${i.className}`.trim(),style:{display:p?"none":"block",objectPosition:a,...i.style},onError:()=>F.srcSet?I(!0):m(!0)},f):Tr(WS,{src:f,alt:"",fill:!0,priority:!0,sizes:"100vw",className:`z-[2] object-cover ${i.className}`.trim(),style:{display:p?"none":"block",objectPosition:a,...i.style},onError:()=>m(!0)},f)),t&&!s&&d&&C&&!y&&VS("video",{ref:b,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,preload:"metadata",className:"absolute inset-0 z-[3] h-full w-full object-cover",style:{objectPosition:a},onError:()=>w(!0),children:[Qd(d)&&Tr("source",{src:d.replace(/\.mp4$/,".av1.mp4"),type:'video/mp4; codecs="av01.0.08M.10"'}),Tr("source",{src:d,type:"video/mp4"})]},d),t&&s&&d&&C&&!v&&(!f||p)&&Tr(US,{src:d,objectPosition:a,onError:()=>k(!0)},d)]})}var XS=["top","middle","bottom"],ZS=["left","center","right"],QS="bottom",JS="left",KM={top:"Top",middle:"Middle",bottom:"Bottom"},VM={left:"Left",center:"Center",right:"Right"};var Toe="Up and down",Poe="Sideways",YM={top:"flex-start",middle:"center",bottom:"flex-end"},XM={left:"flex-start",center:"center",right:"flex-end"},ZM="--sf-hero-phone-y",QM="--sf-hero-phone-x";function JM(e){return XS.includes(e)?e:QS}function e2(e){return ZS.includes(e)?e:JS}function eC(e,o){let t=JM(e),r=e2(o),a={};return t!==QS&&(a[ZM]=YM[t]),r!==JS&&(a[QM]=XM[r]),a}function Foe(){return XS.map(e=>({label:KM[e],value:e}))}function Eoe(){return ZS.map(e=>({label:VM[e],value:e}))}var o2="#0A0A0A",t2=[[0,".5"],[30,".1"],[60,".1"],[100,".85"]];function oC(e){let o=e.trim().replace(/^#/,""),t=o.length===3?o.split("").map(a=>a+a).join(""):o;if(!/^[0-9a-fA-F]{6}$/.test(t))return null;let r=Number.parseInt(t,16);return`${r>>16&255},${r>>8&255},${r&255}`}function tC(e){return e==null?!0:e!==!1}function rC(e){let o=(e?oC(e):null)??oC(o2);return`linear-gradient(180deg, ${t2.map(([t,r])=>`rgba(${o},${r}) ${t}%`).join(", ")})`}var l2=a2({});function Hoe({name:e,process:o,mediaType:t="video",mediaSrc:r,videoSpeed:a,poster:n,objectPosition:s,objectPositionPhone:i,tintColor:f="#000000",tintOpacity:d=0,groups:p,editing:m=!1,themeClassName:x,themeStyle:I}){let{alignment:y="left",textureOpacity:w,textureOn:v,textureColor:k,quietVideo:C,phoneUpDown:g,phoneSideways:b}=n2(l2),O=t==="video",F=O?Er(r):void 0,L=O?Er(n):Er(r)??Er(n),P=typeof a=="number"?a/100:1;return r2("section",{className:x?`relative h-full w-full overflow-hidden ${x}`:"relative h-full w-full overflow-hidden",style:I,"data-slide-name":e??"","data-slide-process":o??"","data-slide-media":F?"video":"still",children:[Ha(YS,{videoSrc:F,posterSrc:L,showVideo:O,playbackRate:P,objectPosition:s,objectPositionPhone:O?void 0:i,quiet:C}),d>0&&Ha("div",{className:"absolute inset-0 z-[2]",style:{background:f,opacity:Math.min(Math.max(d,0),100)/100}}),tC(v)&&Ha("div",{className:"absolute inset-0 z-[2]",style:{background:rC(k),...w!==void 0?{opacity:w/100}:null}}),Ha("div",{className:["sf-hero-group-layer absolute inset-0 z-[3] mx-auto max-w-[var(--sf-site-width,1600px)] px-[var(--sf-site-gutter,40px)] pt-[140px] pb-14",m?"sf-hero-group-layer-edit":""].filter(Boolean).join(" "),style:{...fp,...eC(g,b)},children:p&&Ha(p,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}var aC=Array.from({length:3},(e,o)=>({name:`Slide ${o+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));import{newNodeId as nC}from"efficient-easel/draw";var s2="ImageBlock",i2=3,ms=(e,o,t={})=>({type:e,props:{...o?.(e)??{},id:nC(e),...t}}),f2=e=>({...e?.(ue)??{},direction:"column",[vr]:[ms(s2,e),ms(ue,e,{direction:"column",[vr]:[ms("Text",e,kr()),ms("Text",e)]})]}),Po={Hero:{slot:"slides",childType:"HeroSlide",addLabel:"Add slide",slider:!0,seeds:()=>aC.map(e=>({...e}))},HeroSlide:{slot:"groups",childType:"HeroGroup",addLabel:`Add ${lt.toLowerCase()}`,seeds:()=>[],addBlocked:on,notice:Us},HeroSingle:{slot:"boxes",childType:"HeroGroup",addLabel:`Add ${lt.toLowerCase()}`,seeds:()=>[],addBlocked:on,notice:Us},ProcessSteps:{slot:"boxes",childType:ue,addLabel:`Add ${lt.toLowerCase()}`,seeds:e=>Array.from({length:i2},()=>f2(e)),skipSeed:e=>Array.isArray(e.steps)&&e.steps.length>0}};function Koe(e){for(let[o,t]of Object.entries(e)){if(o in Po&&Po[o]!==t)throw new Error(`lib/puck/slot-specs: "${o}" already has a slot spec`);Po[o]=t}}function Voe(e,o){let t=Po[e];return t?{slot:t.slot,children:t.seeds(o).map(r=>({type:t.childType,props:{id:nC(t.childType),...r}}))}:null}var sC=()=>({}),iC=new Map;function c2(e){let o=iC.get(e);if(o)return o;let t=new Set,r=Po[e];if(r)for(let s of r.seeds(sC))for(let i of lC({type:r.childType,props:s}))t.add(i);let a=ps(e);if(a){let s=0;for(let i of lC(a(sC,f=>`${f}-${s+=1}`)))t.add(i)}t.delete(e);let n=[...t].sort();return iC.set(e,n),n}function d2(e){if(!e||!e.sets&&!e.allow&&!e.deny?.length)return null;let o=Od(e),t=e.allow?new Set(e.allow):null,r=new Set(e.deny??[]),a=new Set(Object.keys(e.host??{})),n=f=>{if(r.has(f))return!1;if(a.has(f))return!0;let d=RS(f);return!d||!o[d]?!1:t?t.has(f):!0},s=new Map,i=f=>{let d=s.get(f);if(d!==void 0)return d;s.set(f,!1);let p=n(f)&&c2(f).every(i);return s.set(f,p),p};return{sets:o,offers:i}}var u2="block-offer";function Dd(e=fC()){return e.cache(u2,()=>d2(mn(e)))}function cC(e,o=fC()){let t=Dd(o);return t?t.offers(e):!0}function dC(e,o=0){let t=m2(e,o),r=t?Dd():null;return t&&r?p2(t,r):t}function p2(e,o){if(e.spec)return o.offers(e.spec.childType)?e:null;let t=e.choices??[],r=t.filter(a=>o.offers(a.type));return r.length===t.length?e:r.length>0?{...e,choices:r}:null}function m2(e,o){let t=Po[e];if(t)return{source:"section",slot:t.slot,choices:null,spec:t};let r=_S(e,o);if(r)return{source:"container",slot:r.slot,choices:r.choices,spec:null};let a=Cy(e);return a?{source:"footer",slot:Sy,choices:a,spec:null}:null}import{useSyncExternalStore as x2}from"react";var _d=null,Nd=new Set;function uC(e){if(_d!==e){_d=e;for(let o of Nd)o()}}function I2(e){return Nd.add(e),()=>{Nd.delete(e)}}function dte(){return x2(I2,()=>_d,()=>null)}function pC(e){return Br(e)?.ownerId??null}function mC(e,o){let t=e.props;if(e.type==="FooterMenu"){let r=t.menu;return t.heading||r?.name||l("Menu")}if(e.type==="FooterText"){let r=typeof t.text=="string"?t.text.trim():"";return r?r.length>28?`${r.slice(0,28)}\u2026`:r:l("Text")}return e.type==="FooterEmailSignup"?t.heading||l("Email signup"):o(e.type)}var xC=(e,o,t)=>{if(o!=="block"||e.props?.fromProduct!==!0)return t;let r=e.props.product;return!r?.code||typeof r.name!="string"?t:r.name.trim()||t};var IC="sf-editor-left-view";function hC(){if(typeof window>"u")return"pages";try{let e=window.localStorage.getItem(IC);return e==="sections"||e==="styles"?e:"pages"}catch{return"pages"}}function gC(e){if(!(typeof window>"u"))try{window.localStorage.setItem(IC,e)}catch{}}function yC(e,o){return e==="styles"&&!o?"sections":e}function bC(e,o){return e?"sections":o}var SC="Footer",h2=[se,SC,ae],Pr=e=>{let o=e?.content;return Array.isArray(o)?o:[]},Nt=e=>{let o=e?.zones;return o&&typeof o=="object"&&!Array.isArray(o)?o:null},Wa=e=>{let o=e?.props?.id;return typeof o=="string"?o:void 0},CC=e=>Br(e)?.ownerId??"";function wC(e){let o=hr(Pr(e)),t=o.some(r=>r?.type===ae);return o.filter(r=>r?.type===se||r?.type===ae||r?.type===SC&&!t)}function Md(e,o){let t=new Set,r=a=>{if(Array.isArray(a)){for(let s of a)r(s);return}if(!a||typeof a!="object")return;let n=a;if(typeof n.type=="string"&&n.props&&typeof n.props=="object"){let s=Wa(n);s&&t.add(s)}for(let s of Object.values(a))r(s)};if(r(e),o){let a=!0,n=new Set;for(;a;){a=!1;for(let[s,i]of Object.entries(o))n.has(s)||!t.has(CC(s))||(n.add(s),r(i),a=!0)}}return t}function Hd(e,o){let t={},r={};for(let[a,n]of Object.entries(e??{}))(o.has(CC(a))?t:r)[a]=n;return{owned:t,rest:r}}function yte(e,o){if(!o)return e;let t=wC(o);if(!t.length)return e;let r=t.filter(i=>i.type===se),a=t.filter(i=>i.type!==se),n={...e,content:[...r,...Pr(e),...a]},{owned:s}=Hd(Nt(o),Md(t,Nt(o)));return Object.keys(s).length&&(n.zones={...Nt(e)??{},...s}),n}function bte(e,o){if(!o)return{page:e,chrome:null};let t=wC(o),r=new Set(t.map(Wa).filter(C=>!!C)),a=[],n=[];for(let C of Pr(e)){let g=Wa(C);g&&r.has(g)||Ir(C?.type)?n.push(C):a.push(C)}let s=new Map(n.map(C=>[Wa(C),C])),i=new Set,f=hr(Pr(o)).flatMap(C=>{let g=Wa(C);if(!g||!r.has(g))return[C];let b=s.get(g);return b?(i.add(b),[b]):[]});for(let C of n)i.has(C)||f.some(g=>g?.type===C.type)||(f=C.type===se?[C,...f]:[...f,C]);f=hr(f);let d=f.length===Pr(o).length&&f.every((C,g)=>C===Pr(o)[g]),p=Nt(e),m=Md(f,p),{owned:x,rest:I}=Hd(p,m),y=Hd(Nt(o),Md(t,Nt(o))).owned,w={...o,content:d?o.content:[...f]},v=Nt(o);if(v||Object.keys(x).length){let C={};for(let[g,b]of Object.entries(v??{}))g in y?g in x&&(C[g]=x[g]):C[g]=b;for(let[g,b]of Object.entries(x))g in C||(C[g]=b);w.zones=C,v&&g2(w.zones,v)&&(w.zones=v)}let k={...e,content:a};return p&&(Object.keys(I).length||!Object.keys(y).length?k.zones=I:delete k.zones),{page:k,chrome:w}}function g2(e,o){let t=Object.keys(e),r=Object.keys(o);return t.length===r.length&&t.every((a,n)=>a===r[n]&&e[a]===o[a])}function vC(e,o){return t=>e(t)||t!==void 0&&h2.includes(t)&&o()}var xs=null;function Cte(e){xs=e}function kC(){return!!(xs&&xs.state().lockHolder)}function Mt(){return xs!==null}var y2=new Set(["BookingBox","SubmitBox"]);function b2(e){return typeof e=="string"&&y2.has(e)}var TC=vC(b2,kC);import{copyNode as S2}from"efficient-easel/data";var PC=null;function Pte(e){PC=e}function zo(){return PC}var FC=null;function Wd(e){FC=e}function Is(){return FC}function EC(e){let o=typeof e?.props?.id=="string"?e.props.id:null,t=zo(),r=o&&t?t.sectionOf(o):null;if(!t||!r)return null;let a=t.usedOn(r);return a?a.length===1?l("On 1 page"):l("On {count} pages",{count:a.length}):l("On other pages")}var OC={usedOn:e=>{let o=zo(),t=o?.sectionOf(e.props.id)??null;return!o||!t?null:o.usedOn(t)??[]},openPage:e=>Is()?.openPage(e),adopt:(e,o)=>zo()?.adopt(e.props.id,o),nodeOf:e=>zo()?.place(e)??null,detach:e=>{let o=Is()?.config;return o?S2(e,o):e},removed:()=>Is()?.reload()};import{sharedSectionsOf as vH}from"efficient-easel/screen/lib/shared-sections";import{scrollPreviewToSection as kH,scrollPreviewToTop as tw}from"efficient-easel/screen/lib/puck/preview-dom";import{Fragment as Gd,jsx as za,jsxs as V2}from"react/jsx-runtime";import{useMemo as GC,useRef as UC}from"react";import{EaselCanvas as Y2,useEaselApi as X2}from"efficient-easel/easel";import{jsx as _C,Fragment as O2,jsxs as L2}from"react/jsx-runtime";import{useEffect as NC,useLayoutEffect as R2}from"react";var LC="var(--es-accent, #2563eb)";var hs="data-theme",RC="light";function C2(e){return e.getAttribute(hs)===RC?"light":"dark"}function w2(e,o){return C2(e)===o?!1:(o==="light"?e.setAttribute(hs,RC):e.removeAttribute(hs),!0)}function v2(e){return Ls(e).getItem(vs)}function _te(e,o){Ls(e).setItem(vs,o)}function k2(e,o,t=new Date().getHours()){return eu({mode:o.mode,override:v2(e),switchShown:o.switchShown,hour:t})}function AC(e,o){let t=e.documentElement;if(!t)return()=>{};let r=()=>w2(t,k2(e,o));r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[hs]}),()=>n.disconnect()}var T2="style";function P2(e,o){let t=iu(o),r=!1;for(let a of su){let n=t[a]??"";e.style.getPropertyValue(a)!==n&&(n?e.style.setProperty(a,n):e.style.removeProperty(a),r=!0)}return r}function BC(e,o){let t=e.body;if(!t)return()=>{};let r=()=>P2(t,o);r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[T2]}),()=>n.disconnect()}var F2=String.raw`(function (doc) {
|
|
13
|
+
if (doc.__sfFitWords) return;
|
|
14
|
+
var win = doc.defaultView;
|
|
15
|
+
var SELECTOR = "h1,h2,h3,h4,h5,h6,[class*='font-heading'],[class*='font-display']";
|
|
16
|
+
var MIN_SCALE = 0.3, MIN_PX = 16, SLACK = 1;
|
|
17
|
+
|
|
18
|
+
function measure(el) {
|
|
19
|
+
var widest = 0, current = 0, last = null, split = false, lastBlock = null;
|
|
20
|
+
function blockOf(n) {
|
|
21
|
+
for (var p = n.parentElement; p && p !== el; p = p.parentElement) {
|
|
22
|
+
var d = win.getComputedStyle(p).display;
|
|
23
|
+
if (d.indexOf("inline") !== 0 && d !== "contents") return p;
|
|
24
|
+
}
|
|
25
|
+
return el;
|
|
26
|
+
}
|
|
27
|
+
function close() { if (current > widest) widest = current; current = 0; last = null; }
|
|
28
|
+
var walker = doc.createTreeWalker(el, 5), range = doc.createRange(), node;
|
|
29
|
+
while ((node = walker.nextNode())) {
|
|
30
|
+
if (node.nodeType === 1) {
|
|
31
|
+
if (node.tagName === "BR" || node.tagName === "WBR") close();
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
var block = blockOf(node);
|
|
35
|
+
if (block !== lastBlock) close();
|
|
36
|
+
lastBlock = block;
|
|
37
|
+
var re = /(\S+)|(\s+)/g, m;
|
|
38
|
+
while ((m = re.exec(node.data))) {
|
|
39
|
+
if (m[2]) { close(); continue; }
|
|
40
|
+
range.setStart(node, m.index);
|
|
41
|
+
range.setEnd(node, m.index + m[0].length);
|
|
42
|
+
var rects = range.getClientRects();
|
|
43
|
+
for (var i = 0; i < rects.length; i++) {
|
|
44
|
+
var r = rects[i];
|
|
45
|
+
if (r.width <= 0) continue;
|
|
46
|
+
current += r.width;
|
|
47
|
+
if (last && r.top > last.top + last.height / 2) split = true;
|
|
48
|
+
last = r;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
close();
|
|
53
|
+
return { widest: widest, split: split };
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function lineWidth(el) {
|
|
57
|
+
var cs = win.getComputedStyle(el);
|
|
58
|
+
return el.getBoundingClientRect().width - parseFloat(cs.paddingLeft) - parseFloat(cs.paddingRight)
|
|
59
|
+
- parseFloat(cs.borderLeftWidth) - parseFloat(cs.borderRightWidth);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// ⚠️ THE HEADING ELEMENT IS NEVER TOUCHED — no style="", no data-*. This
|
|
63
|
+
// runs before React hydrates, and React 19 in development reports ANY
|
|
64
|
+
// attribute that differs from what it rendered ("a tree hydrated but some
|
|
65
|
+
// attributes didn't match"): first our inline font-size on the hero (which
|
|
66
|
+
// React owns via --heading-size), then, when that moved to a data-sf-fit
|
|
67
|
+
// attribute, the attribute itself. So the fitted size lives only in this
|
|
68
|
+
// script's own stylesheet, in <head>, addressed to each heading by its
|
|
69
|
+
// POSITION (":root>*:nth-child(2)>…"). A position goes stale when the page's
|
|
70
|
+
// structure changes, so the rules are rewritten in the MutationObserver
|
|
71
|
+
// callback, which runs before the next paint. !important so the size also
|
|
72
|
+
// beats a part's own inline size.
|
|
73
|
+
var head = doc.head || doc.documentElement;
|
|
74
|
+
var fitEl = doc.createElement("style");
|
|
75
|
+
fitEl.id = "storefront-fit-words-sizes";
|
|
76
|
+
head.appendChild(fitEl);
|
|
77
|
+
var fitted = new Map(); // heading -> fitted size, e.g. "43.8px"
|
|
78
|
+
|
|
79
|
+
function pathOf(el) {
|
|
80
|
+
var parts = [];
|
|
81
|
+
for (var e = el; e && e.parentElement; e = e.parentElement) {
|
|
82
|
+
var i = 1, s = e;
|
|
83
|
+
while ((s = s.previousElementSibling)) i++;
|
|
84
|
+
parts.unshift("*:nth-child(" + i + ")");
|
|
85
|
+
}
|
|
86
|
+
return ":root>" + parts.join(">");
|
|
87
|
+
}
|
|
88
|
+
function writeRules() {
|
|
89
|
+
var css = "";
|
|
90
|
+
fitted.forEach(function (size, el) {
|
|
91
|
+
if (!el.isConnected) { fitted.delete(el); return; }
|
|
92
|
+
css += pathOf(el) + "{font-size:" + size + " !important}";
|
|
93
|
+
});
|
|
94
|
+
if (fitEl.textContent !== css) fitEl.textContent = css;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function unfit(el) {
|
|
98
|
+
if (fitted.delete(el)) writeRules();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function fits(el) {
|
|
102
|
+
var m = measure(el);
|
|
103
|
+
return !m.split && m.widest <= lineWidth(el) + SLACK;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function fit(el) {
|
|
107
|
+
unfit(el);
|
|
108
|
+
if (lineWidth(el) <= 0) return; // hidden, or not laid out yet
|
|
109
|
+
if (fits(el)) return;
|
|
110
|
+
var set = parseFloat(win.getComputedStyle(el).fontSize);
|
|
111
|
+
if (!set) return;
|
|
112
|
+
var floor = Math.max(set * MIN_SCALE, MIN_PX);
|
|
113
|
+
if (floor >= set) return;
|
|
114
|
+
function size(px) { return Math.floor(px * 10) / 10 + "px"; }
|
|
115
|
+
// The SEARCH tries sizes on the element's own style and then puts that
|
|
116
|
+
// attribute back byte for byte (or removes it, if it had none), so nothing
|
|
117
|
+
// is left for React to see. A trial in a stylesheet instead restyles the
|
|
118
|
+
// whole page per step: a full pass on the Hartes home took 75–160ms at 4x
|
|
119
|
+
// CPU that way.
|
|
120
|
+
var hadStyle = el.hasAttribute("style"), origStyle = el.getAttribute("style");
|
|
121
|
+
function attempt(px) { el.style.setProperty("font-size", size(px), "important"); }
|
|
122
|
+
function done() { if (hadStyle) el.setAttribute("style", origStyle); else el.removeAttribute("style"); }
|
|
123
|
+
attempt(floor);
|
|
124
|
+
if (!fits(el)) { done(); return; } // even the floor does not fit: leave it as set
|
|
125
|
+
var lo = floor, hi = set;
|
|
126
|
+
for (var i = 0; i < 8; i++) {
|
|
127
|
+
var mid = (lo + hi) / 2;
|
|
128
|
+
attempt(mid);
|
|
129
|
+
if (fits(el)) lo = mid; else hi = mid;
|
|
130
|
+
}
|
|
131
|
+
done();
|
|
132
|
+
fitted.set(el, size(lo));
|
|
133
|
+
writeRules();
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// What each heading measured right after we last fitted it, so the
|
|
137
|
+
// ResizeObserver below can tell a real change (a font swap, a rotate, a
|
|
138
|
+
// container that moved) from the size change our own write just caused.
|
|
139
|
+
var seen = new WeakMap();
|
|
140
|
+
function remember(el) {
|
|
141
|
+
var b = el.getBoundingClientRect();
|
|
142
|
+
seen.set(el, b.width + "x" + b.height);
|
|
143
|
+
}
|
|
144
|
+
function fitAndRemember(el) { fit(el); remember(el); }
|
|
145
|
+
|
|
146
|
+
// ⚠️ A ResizeObserver, NOT fonts.ready or a resize event, and the reason is
|
|
147
|
+
// WHEN it runs: after layout, BEFORE paint. The web font arriving re-wraps a
|
|
148
|
+
// fitted heading, and fonts.ready resolves only after that frame is painted —
|
|
149
|
+
// measured on the Hartes hero: a 42px jump in 2 of 3 loads. A size change
|
|
150
|
+
// reported here is fitted in the same frame, so the broken state is never
|
|
151
|
+
// drawn. It also covers a container that resizes.
|
|
152
|
+
var ro = new win.ResizeObserver(function (entries) {
|
|
153
|
+
for (var i = 0; i < entries.length; i++) {
|
|
154
|
+
var el = entries[i].target;
|
|
155
|
+
var b = el.getBoundingClientRect();
|
|
156
|
+
if (seen.get(el) === b.width + "x" + b.height) continue; // our own write
|
|
157
|
+
fitAndRemember(el);
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
// Its own set, not seen: fitAndRemember has written seen by the
|
|
161
|
+
// time watch runs, so a seen test observed no heading at all, and a
|
|
162
|
+
// heading fitted in the fallback face was never fitted again when the web
|
|
163
|
+
// font arrived (hartesmetal.com.au, "FusionForge." with its "." alone).
|
|
164
|
+
var watched = new WeakSet();
|
|
165
|
+
function watch(el) { if (!watched.has(el)) { watched.add(el); ro.observe(el); } }
|
|
166
|
+
|
|
167
|
+
function fitAll() {
|
|
168
|
+
var els = doc.querySelectorAll(SELECTOR);
|
|
169
|
+
for (var i = 0; i < els.length; i++) { fitAndRemember(els[i]); watch(els[i]); }
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
var queued = 0, all = false, touched = new Set();
|
|
173
|
+
function run() {
|
|
174
|
+
queued = 0;
|
|
175
|
+
if (all) { all = false; touched.clear(); fitAll(); return; }
|
|
176
|
+
var els = Array.from(touched);
|
|
177
|
+
touched.clear();
|
|
178
|
+
for (var i = 0; i < els.length; i++) if (els[i].isConnected) { fitAndRemember(els[i]); watch(els[i]); }
|
|
179
|
+
}
|
|
180
|
+
function schedule() { if (!queued) queued = win.requestAnimationFrame(run); }
|
|
181
|
+
function scheduleAll() { all = true; schedule(); }
|
|
182
|
+
|
|
183
|
+
fitAll();
|
|
184
|
+
// A backstop only: a font that changes widths without changing any
|
|
185
|
+
// heading's box is not seen by the ResizeObserver.
|
|
186
|
+
if (doc.fonts && doc.fonts.ready) doc.fonts.ready.then(scheduleAll, function () {});
|
|
187
|
+
|
|
188
|
+
// …and the viewport WIDTH, which the ResizeObserver cannot stand in for: a
|
|
189
|
+
// heading sized to its own text (fit-content, a flex item) keeps the SAME box
|
|
190
|
+
// when the phone turns to 844, so nothing reports a change and it would stay
|
|
191
|
+
// shrunk. The probe's rotate check caught exactly that.
|
|
192
|
+
var lastWidth = win.innerWidth;
|
|
193
|
+
function onResize() {
|
|
194
|
+
if (win.innerWidth === lastWidth) return; // a phone's toolbar changing HEIGHT is not our business
|
|
195
|
+
lastWidth = win.innerWidth;
|
|
196
|
+
scheduleAll();
|
|
197
|
+
}
|
|
198
|
+
win.addEventListener("resize", onResize);
|
|
199
|
+
|
|
200
|
+
var mo = new win.MutationObserver(function (records) {
|
|
201
|
+
// Positions first: a node added or removed anywhere can shift the
|
|
202
|
+
// nth-child path of a fitted heading, and this callback runs before paint.
|
|
203
|
+
if (fitted.size) {
|
|
204
|
+
for (var q = 0; q < records.length; q++) if (records[q].type === "childList") { writeRules(); break; }
|
|
205
|
+
}
|
|
206
|
+
for (var i = 0; i < records.length; i++) {
|
|
207
|
+
var r = records[i];
|
|
208
|
+
var target = r.target.nodeType === 1 ? r.target : r.target.parentElement;
|
|
209
|
+
var own = target && target.closest(SELECTOR);
|
|
210
|
+
if (own) touched.add(own);
|
|
211
|
+
for (var j = 0; j < r.addedNodes.length; j++) {
|
|
212
|
+
var n = r.addedNodes[j];
|
|
213
|
+
if (n.nodeType !== 1) continue;
|
|
214
|
+
if (n.matches(SELECTOR)) touched.add(n);
|
|
215
|
+
var inner = n.querySelectorAll(SELECTOR);
|
|
216
|
+
for (var k = 0; k < inner.length; k++) touched.add(inner[k]);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
if (touched.size) schedule();
|
|
220
|
+
});
|
|
221
|
+
mo.observe(doc.body, { childList: true, subtree: true, characterData: true });
|
|
222
|
+
|
|
223
|
+
doc.__sfFitWords = function stop() {
|
|
224
|
+
win.removeEventListener("resize", onResize);
|
|
225
|
+
ro.disconnect();
|
|
226
|
+
mo.disconnect();
|
|
227
|
+
if (queued) win.cancelAnimationFrame(queued);
|
|
228
|
+
fitted.clear();
|
|
229
|
+
fitEl.remove();
|
|
230
|
+
delete doc.__sfFitWords;
|
|
231
|
+
};
|
|
232
|
+
// For the probe and for debugging: which headings are fitted, at what size,
|
|
233
|
+
// and the sheet that holds it (disable it to read a heading's set size).
|
|
234
|
+
doc.__sfFitWords.fitted = fitted;
|
|
235
|
+
doc.__sfFitWords.sheet = fitEl;
|
|
236
|
+
})(document);`,E2="storefront-fit-words";function DC(e){let o=e.createElement("script");return o.id=E2,o.textContent=F2,(e.head??e.documentElement).appendChild(o),()=>{e.__sfFitWords?.(),o.remove()}}var A2=`
|
|
237
|
+
[${ro}][${ro}] { cursor: text; }
|
|
238
|
+
[${Be}][${Be}][${Be}] {
|
|
239
|
+
outline: 1px solid ${LC};
|
|
240
|
+
outline-offset: 2px;
|
|
241
|
+
}
|
|
242
|
+
[${Be}][${Be}]:has([${Be}]),
|
|
243
|
+
[data-puck-overlay-portal][data-puck-overlay-portal]:has([${Be}]) {
|
|
244
|
+
outline: none;
|
|
245
|
+
}
|
|
246
|
+
[${Be}][${Be}][${Be}][data-es-typing],
|
|
247
|
+
[data-es-typing] [${Be}][${Be}][${Be}] {
|
|
248
|
+
outline: none;
|
|
249
|
+
}
|
|
250
|
+
`;function MC({children:e,document:o}){let{theme:t,themeMode:r,themeSwitchShown:a}=V(),n=He(t);return NC(()=>{if(o)return AC(o,{mode:r,switchShown:a})},[o,r,a]),NC(()=>{if(o)return BC(o,n)},[o,n]),R2(()=>{if(o)return DC(o)},[o]),L2(O2,{children:[_C(Fu,{}),_C("style",{children:A2}),e]})}import{jsx as zd}from"react/jsx-runtime";import{useEffect as B2,useState as D2}from"react";import{Banner as _2}from"efficient-shell/ui";var gs={load:"The header and footer could not load. They are hidden for now and nothing in them is saved. Reload to try again.",lock:"{name} is editing the header and footer. Nothing you change in them here is saved.",conflict:"The header and footer were changed somewhere else. Nothing you change in them here is saved. Reload to get the latest.",save:"The header and footer did not save. They are sent again with your next change."},N2={load:"{section} could not load. It stays on the page as it was. Reload to try again.",lock:"{name} is editing {section}. Nothing you change in it here is saved.",conflict:"{section} was changed somewhere else. Nothing you change in it here is saved. Reload to get the latest.",save:"{section} did not save. It is sent again with your next change."},M2=gs.load,H2=gs.lock,W2=gs.conflict,z2=gs.save;function G2(e){if(!e)return null;if(e.loadFailed)return l(M2);if(e.lockHolder)return l(H2,{name:e.lockHolder.name||l("Somebody else")});if(e.conflict)return l(W2);if(e.saveFailed)return l(z2);let o=e.sections?.[0];if(!o)return null;let t=o.title||l("A shared section"),r=o.holder?.name||l("Somebody else");return l(N2[o.problem],{section:t,name:r})}function U2({report:e}){let o=G2(fs(e)),[t,r]=D2(null);return B2(()=>{o||r(null)},[o]),!o||t===o?null:zd("aside",{className:"sf-canvas-notice",children:zd(_2,{tone:"warning",onDismiss:()=>r(o),children:o})})}function HC(){return zd(U2,{report:cs()})}import{jsx as ys}from"react/jsx-runtime";import{useState as WC}from"react";import{Banner as $2,Button as q2}from"efficient-shell/ui";import{UndoIcon as j2}from"efficient-shell/icons/efficient";import{useScreenDocument as K2}from"efficient-easel/screen/components/ScreenDocumentContext";function zC(){let e=fS(),{adapter:o,flushSave:t,reloadFromServer:r}=K2(),a=o.siteVersions,[n,s]=WC(!1),[i,f]=WC(!1);if(!e)return null;let d=async()=>{if(!(!a||n)){s(!0),f(!1);try{await uS({access:a,flushSave:t,reload:r})}catch{f(!0)}finally{s(!1)}}};return ys("aside",{className:"sf-canvas-notice",children:ys($2,{tone:i?"danger":"info",title:e.title,onDismiss:ds,action:a&&e.undo?ys(q2,{variant:"secondary",size:"sm",leftIcon:ys(j2,{}),loading:n,disabled:n,onClick:()=>{d()},children:l("Undo")}):void 0,children:i?l("Undo did not work. Nothing changed. Try again."):l("Check it with Preview. Press Publish to put it live.")})})}import{usePreviewParts as $C}from"efficient-easel/draw/client";import{useSectionOps as Z2}from"efficient-easel/screen/lib/puck/use-section-ops";function Q2({children:e,componentId:o}){let{selectedPartId:t}=$C();return oh(t,o)?za(Gd,{}):za(Gd,{children:e})}function qC(e){let{mirrorHostStyles:o}=Bs(),t=Ou(),{sectionBackgroundWidth:r,sectionContentWidth:a,themeFromDocument:n}=V(),s=GC(()=>({...e.metadata??t??{},...wx(n?null:r,n?null:a)}),[e.metadata,t,r,a,n]),i=UC(null),f=J2(i),{onDocument:d}=e,p=m=>{i.current=m,d?.(m)};return V2(Gd,{children:[za(zC,{}),za(HC,{}),za(Y2,{...e,onDocument:p,typing:f,metadata:s,height:"fill",mirrorStyles:o,frameWrapper:MC,overlay:Q2})]})}function J2(e){let o=X2(),t=Z2(),r=$C(),a=UC({ops:t,parts:r});return a.current={ops:t,parts:r},GC(()=>{let n={getItemById:i=>o.getState().getItemById(i),getSelectorForId:i=>o.getState().getSelectorForId(i),get components(){return o.getState().config.components},replace:(i,f,d)=>a.current.ops.replaceComponent(i,f,d)},s=(i,f)=>{let d=Ug(i,n);if(!d)return null;let p=f,m=()=>(p=$g(p,p?.ownerDocument??e.current,i),p),x=m();return x?{element:m,value:d.value,rules:d.rules,multiline:d.multiline,write:d.write,toolbar:{offered:d.offered,colors:d.offered.length>0?Wl(Jg(x)):void 0}}:null};return{at:i=>{let f=i.closest(`[${ro}]`),d=f?.getAttribute(ro);return f&&d?s(d,f):null},atSelection:()=>{let i=a.current.parts.selectedPartId;return i?s(i,null):null},onChange:i=>{if(!i.typing){Rc(null);return}let f=i.element.closest(`[${ro}]`)?.getAttribute(ro)??null;Rc(f),f&&a.current.parts.selectedPartId!==f&&a.current.parts.select(f)}}},[o,e])}var eH=gu.mediaFields,oH=/video|poster|focal|phone/i;function jC(e){return(eH[e]??[]).find(o=>!o.includes("[]")&&!oH.test(o))??null}var KC={adds:{kind:"block",type:"ImageBlock"},takes:e=>jC(e.type)!==null,replace:(e,o)=>{let t=jC(e.type);return t?{...e.props,[t]:o.url}:{...e.props}},create:(e,o)=>({type:"ImageBlock",props:{...o.nodeDefaults("ImageBlock"),id:o.newNodeId("ImageBlock"),src:e.url}})};var VC={Hero:"Full-screen opener with rotating slides.",HeroSingle:"Full-screen image or video with a headline.",IntroBleed:"Full-bleed intro image the next section scrolls over.",Collections:"Product collections in a tidy grid.",AlloyWheelsListing:"A full product-listing page: filter rail, sortable card grid and pagination, from the live catalog. Choose which product types it shows.",CatalogFilterBar:"Filters the collection grids below it \u2014 a sticky row of Pills (the default), or Columns, one per filter you switch on.",ProductGrid:"Hand-picked products in a tidy grid.",FitmentFinder:"A vehicle picker \u2014 make, model, year and trim resolve the OEM stock fitment live.",Gallery:"Two image galleries with tabs and filters.",GalleryB:"Customer photos in a card grid with a click-to-open lightbox.",SpecStrip:"A thin one-line spec strip \u2014 small-caps items spread across the width, as a dark band or a bare hairline row.",ProductHero:"A product hero \u2014 image beside price, bullets and a buy button.",SpecTable:"A spec sheet \u2014 labeled rows of product specifications.",ProcessSteps:"A heading over columns of image, title, blurb and specs.",DetailRows:"Repeating full-width rows \u2014 eyebrow, title and copy beside a numbered close-up image, alternating sides each row.",FitmentTable:"A fitment table \u2014 per-size bolt patterns, offsets and load ratings, filterable by diameter.",CompatibleTyres:"The current product's compatible tyres \u2014 image, size, key specs and price per tyre, with an inquiry link. Display only.",RelatedProducts:"The current product's related items in a tidy row \u2014 the product page's built-in 'Pair with' cross-sell.",OrderSummary:"A display order-summary panel \u2014 items, totals and a note.",DeliveryOptions:"Delivery tiers as cards \u2014 name, window and price, one highlighted.",PaymentBadges:"A payment-methods trust strip with reassurance lines.",CheckoutCTA:"A centered 'ready to order?' headline with the checkout button.",Manifesto:"A bold brand statement beside a full-height image, with a stat strip.",ParagraphsA:"An editorial text panel with a stat strip and founders' note.",StatsParagraph:"An editorial heading and paragraph over a row of theme-color-accented stat cards.",Chart:"A titled chart \u2014 bars, line or donut \u2014 drawn from your own labeled data points.",Mockup:"A headline beside a stylized product-UI mockup card \u2014 spec sheet, fitment, portal, kanban and more.",Prose:"A plain editorial text section \u2014 eyebrow, heading and body copy.",Timeline:"An editorial aside beside a rail-marked timeline of dated entries.",TimelineTrack:"A horizontal year track of milestones \u2014 company history or roadmap.",Footprint:"A world map of your locations with a legend \u2014 designed here, sold worldwide.",TitleWithButtons:"A big headline beside a stack of call-to-action buttons.",Split:"Side-by-side image and text in two columns.",Cards:"A heading over a grid of free-text title-and-blurb cards.",FAQ:"A frequently-asked-questions accordion with a header.",Testimonials:"Customer quotes in a grid \u2014 the quote, a name and a role.",Masthead:"A journal issue header with a lead statement and contents.",Breadcrumb:"A slim trail showing where the reader is (Home / Journal\u2026).",CategoryBar:"A sticky row of category tabs with counts and links.",FeaturedCover:"A featured article \u2014 big cover image beside a headline and dek.",LongRead:"A long-form article spread with a pull-quote and cover image.",Series:"A section heading over a grid of column cards.",Subscribe:"A newsletter signup beside a list of recent issues.",SubscribeBlogs:"A newsletter signup beside your latest blog posts, pulled live.",Events:"Latest journal posts in a three-card row.",DocMasthead:"A document header \u2014 headline, metadata and standfirst.",DocTabs:"A sticky tab bar to switch between documents.",DocBody:"Long-form document body with an 'On this page' contents list.",DocMetaCards:"A three-up meta strip for the foot of a document.",Banner:"Wide promo strip with background image.",Stats:"Highlight key numbers \u2014 years, designs.",Countdown:"Hours, minutes and seconds to a set date and time, then one line.",KeyFeatures:"A theme-color chip and heading over a grid of short feature labels.",Logos:"A row of partner or brand logos.",Ticker:"A scrolling marquee of short phrases, full width.",Reviews:"Approved customer reviews in a star-rated card grid, pulled live.",SubmitBuild:"A 'Show us yours.' headline with a photo-submission form.",ReviewForm:"A write-a-review form \u2014 submissions wait for your approval before they show.",ContactRouting:"Pick who to reach, then a form that routes the message.",ContactLocations:"Your locations as a city gallery plus address and map cards.",SectionHeader:"A numbered section title with optional link.",Grid:"Multi-column container for blocks.",Flex:"An empty section. Add whatever you want inside.",Spacer:"Vertical breathing room between sections.",Divider:"A thin horizontal rule between sections.",CustomHTML:"Drop in your own sanitized HTML.",Heading:"A single heading line.",Text:"A paragraph of body copy.",ImageBlock:"A standalone image, at the width you set.",ButtonBlock:"A call-to-action button."};var tH="Save your page changes first";function YC(e){return e.hasTrustedConsole?e.canCreatePlatformTemplate?!e.capabilities.canPublish||!e.capabilities.hasSiteSettings?{visible:!1,hiddenReason:"not-a-site-page"}:e.siteId?e.hasUnsavedEdits?{visible:!0,enabled:!1,disabledReason:tH}:{visible:!0,enabled:!0}:{visible:!1,hiddenReason:"no-site"}:{visible:!1,hiddenReason:"not-operator"}:{visible:!1,hiddenReason:"no-console"}}var XC="storefront-editor:save-as-template";var rH="plain",ZC=[{label:"Plain",value:"plain"},{label:"Filled",value:"filled"},{label:"Line",value:"line"}],aH="line",nH={KeyFeatures:"filled"};function Ga(e){return nH[e]??rH}function Ore(e,o){return jo(ZC,Ga(o),e)}function Lre(e){return jo(ZC,aH,e)}var lH="inline",sH=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"}];var st={ProductGrid:{num:"num",title:"title",description:"description",headRows:["num","title","titleSize","description","linkText","linkHref"],renderer:"ProductGridSection",padKey:"padTop",linkProp:"link"},TyreSizes:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreSizes"},FitmentFinder:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentFinder"},TyreFitment:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicTyreFitment"},BundleOffer:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicBundleOffer"},CompatibleTyres:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},RelatedProducts:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"DynamicRelatedProducts"},SpecTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"SpecTable"},FAQ:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"FAQ"},GalleryB:{num:"num",title:"title",headRows:["num","title","linkText","linkHref"],renderer:"GalleryGrid"},FitmentTable:{num:"num",title:"title",description:"description",headRows:["num","title","description"],renderer:"FitmentTable"},Events:{num:"num",title:"title",linkProp:"link",headRows:["num","title","linkText","linkHref"],renderer:"Events"},ProcessSteps:{num:"num",title:"title",description:"description",headRows:["num","title","description"],headStyle:"editorial",renderer:"ProcessSteps",padKey:"padTop"},LongRead:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"LongRead"},Series:{num:"headNum",title:"headTitle",description:"headDesc",headRows:["headNum","headTitle","headDesc"],headStyle:"editorial",renderer:"Series"},TimelineTrack:{num:"eyebrow",title:"title",description:"intro",headRows:["eyebrow","title","intro"],headStyle:"editorial",renderer:"TimelineTrack",padKey:"padTop"},StatsParagraph:{num:"eyebrow",title:"title",description:"desc",headRows:["eyebrow","title","desc"],headStyle:"editorial",renderer:"StatsParagraph"},Footprint:{num:"sectionNumber",title:"heading",description:"tagline",headRows:["sectionNumber","heading","tagline"],headStyle:"editorial",renderer:"Footprint",padKey:"padTop"},Collections:{num:"eyebrow",title:"heading",headRows:["eyebrow","heading"],renderer:"Collections"},Cards:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Cards"},Testimonials:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Testimonials"},Reviews:{num:"eyebrow",title:"title",headRows:["eyebrow","eyebrowLook","title"],headStyle:"simple",renderer:"Reviews"},Prose:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"essay",renderer:"Prose"},ReviewForm:{num:"eyebrow",title:"title",headRows:["eyebrow","title"],headStyle:"simple",renderer:"ReviewForm"},DeliveryOptions:{num:"eyebrow",title:"title",description:"body",headRows:["eyebrow","title","body"],headStyle:"natural",headRowGap:"gap-3",headDescriptionSize:"text-[15px]",renderer:"DeliveryOptions"}},Fr="SectionHeader";function QC(e){return e in st}function Dre(e){return jo(sH,lH,e)}var JC=new Set(["Flex"]);function _re(e){return!!e?.type&&JC.has(e.type)}var iH={not:{context:"parentType",in:[...JC]}};function Nre(e,o,t){return Al(e,t,iH)}var fH={not:{field:"headPlacement",is:"own-box"}};function Mre(e,o,t){return Al(e,t,fH)}function ew(e,{nodeDefaults:o,newNodeId:t,sectionLabel:r,blockIsOffered:a}){let n=ps(e);return n?n(o,t):QC(e)&&a(ue)&&a(Fr)?{type:ue,props:{...o(ue),id:t(ue),direction:"column",name:`${r(e)} section`,content:[{type:Fr,props:{...o(Fr),id:t(Fr),...st[e]?.headStyle?{headStyle:st[e].headStyle}:{},...st[e]?.headRowGap?{rowGap:st[e].headRowGap}:{},...st[e]?.headDescriptionSize?{descriptionSize:st[e].headDescriptionSize}:{},...Ga(e)!==Ga(Fr)?{eyebrowLook:Ga(e)}:{}}},{type:e,props:{...o(e),id:t(e),headPlacement:"own-box"}}]}}:Po[e]?.fixed===!0?{type:e,props:{...o(e),id:t(e),layout:"boxes"}}:null}import{useEffect as cH,useState as dH}from"react";import{useEaselSession as uH}from"efficient-easel/screen/lib/session-context";function ow(){let e=uH().chrome?.products?.list,[o,t]=dH(null);return cH(()=>{if(!e)return;let r=!1;return e().then(a=>{r||t(a)}),()=>{r=!0}},[e]),o}function cw({mode:e,open:o}){let{setSelectedHeroId:t,setSelectHandler:r}=ug(),a=iw().tree,n=e,s=n.kind==="ticker"?n.heroId:null,i=$a(f=>{f&&(o({kind:"ticker",heroId:f}),kH(f))},[o]);return Ke(()=>{t(s)},[s,t]),Ke(()=>{r(i)},[r,i]),{partRows:(f,{rowClick:d})=>{let p=String(f.props.id);return f.type==="Hero"&&me(lw,{icon:me(Rt,{type:"ticker",size:13}),name:l(sa),onSelect:()=>i(p),selected:s===p,rowProps:{onClick:d(()=>i(p))},words:a})}}}function dw({mode:e,select:o}){let{setSelectedHeroPart:t,setSelectHandler:r}=Ll(),a=iw().tree,{appState:n}=sw(x=>x),s=n.data.content??[],i=pH(s);i.current=s;let f=e,d=fa.find(x=>ca[x]===f.kind),p=d&&"nodeId"in f?da(String(f.nodeId),d):null,m=$a(x=>{let I=Pg(x);if(!I)return;let y=i.current.findIndex(v=>String(v.props.id)===I.nodeId);if(y<0)return;let w={kind:ca[I.part],nodeId:I.nodeId};o({index:y},w)},[o]);return Ke(()=>{t(p)},[p,t]),Ke(()=>{r(m)},[r,m]),{partRows:(x,{rowClick:I})=>{let y=String(x.props.id),w=Tg(x);if(w.length===0)return null;let v=g=>{let b=da(y,g.part);return me(lw,{icon:me(Rt,{type:g.part==="media"?"heroMedia":"heroImage",size:13}),name:l(g.label),onSelect:()=>m(b),selected:p===b,rowProps:{onClick:I(()=>m(b))},words:a},b)},[k,...C]=w;return Ua(nw,{children:[v(k),C.length>0&&me(CH,{children:C.map(v)})]})}}}function uw(e,o){return{partRows:(t,r)=>Ua(nw,{children:[e.partRows?.(t,r),o.partRows?.(t,r)]})}}function TH(e){let{adapter:o,capabilities:t,currentSlug:r,siteId:a,docId:n,hasUnsavedEdits:s,bridgeCapabilities:i,notifyParent:f,token:d}=bs(),{hasPreviewLink:p}=t,m=Se(fw()).preview?.draftLink,x=CS(e.data),I=YC({hasTrustedConsole:!!d,canCreatePlatformTemplate:i.canCreatePlatformTemplate,capabilities:t,siteId:a,hasUnsavedEdits:s}),y=$a(()=>{!a||!r||f(XC,{siteId:a,slug:r})},[f,a,r]),w=Qb({pageSlug:r,siteId:a,token:d}),v=o.previewHref?.(r)??w;return{barLead:()=>I.visible&&me(IH,{side:"bottom",content:I.enabled?l("Save this website as a platform template"):l(I.disabledReason),children:me("span",{className:"sf-tip-disabled",tabIndex:I.enabled?void 0:0,children:me(xH,{variant:"secondary",disabled:!I.enabled,onClick:y,rightIcon:me(SH,{size:15}),children:l("Save as Template")})})}),barView:()=>p&&r&&me(eS,{liveHref:v,pageId:n??null,draftLink:m}),mainAction:x}}function PH(e,o){let{capabilities:t,templateId:r,siteId:a,tokenRef:n,navigate:s}=bs(),{hasSiteTheme:i,explainsSiteSettings:f}=t,d=k=>o.setView(k),[p,m]=mH(fr[0].id),{surface:x,setSurface:I}=dg(),y=()=>{if(i){d("styles"),o.reveal(),tw();return}e.show(nd),e.reveal(),tw()},w={id:"pages",label:l("Pages"),icon:me(gH,{}),panel:({onHide:k})=>me(rg,{activeSurface:x,onPreviewSurface:I,onNavigate:C=>{I(null),s(r?{kind:"template",id:r,pageSlug:C}:{kind:"page",slug:C,siteId:a??void 0})},onClose:k})},v=[];return!i&&f&&v.push({id:"appearance",label:l("Appearance"),icon:me(bH,{}),active:e.kind==="website",onSelect:y}),i&&v.push({id:"styles",label:l("Styles"),icon:me(yH,{}),panel:({onHide:k,notify:C})=>me(gb,{tokenRef:n,siteId:a??void 0,onClose:k,onNotify:C,tab:p,onTabChange:m})}),{railLead:[w],railTrail:v,resolveLeftView:k=>yC(k,i),openSettings:y,openStyles:()=>{m(Dh),d("styles")}}}function FH(){let{navigate:e,siteId:o,reloadFromServer:t,docId:r}=bs(),a=sw(s=>s.config),n=fw();Ke(()=>(Wd({openPage:s=>e({kind:"page",slug:s.slug,siteId:o??void 0}),reload:()=>{t()},config:a}),()=>Wd(null)),[e,o,t,a]),Ke(()=>{let s=zo();if(!s||!r)return;let i=!1;return vH(n).list().then(f=>{i||s.learn(f)}).catch(()=>{}),()=>{i=!0}},[r,n])}function EH(e,o,t,r){let{kind:a,open:n}=e,{selected:s,zoneOf:i}=o;Ke(()=>{uC(s?.type==="BookingBox"&&s.props.region==="confirm"?pC(i(String(s.props.id))):null)},[s?.props.id]);let f=Wb(e,o),{capabilities:{hasSiteSettings:d}}=bs();FH();let{setSelected:p,setSelectHandler:m}=V(),{chat:x,setChat:I,setSelected:y,setSelectHandler:w}=Ol(),v=a==="header";Ke(()=>{p(v)},[v,p]),Ke(()=>{m(()=>n(ad))},[m,n]);let k=$a(()=>n(ib),[n]),C=a==="chat";Ke(()=>{y(C)},[C,y]),Ke(()=>{w(k)},[w,k]);let{setOpenHandler:g}=la(),b=$a(()=>n(fb),[n]);Ke(()=>{g(b)},[g,b]);let O=uw(cw(e),dw(e)),F=TH(o),L=PH(e,r),P=t.device;return{...O,...F,...L,hasOwnRows:M=>M.type===ss,ownRows:f.renderLocationTree,sectionPressed:f.sectionPressed,wrap:M=>me(Ds.Provider,{value:!0,children:Ua(wH.Provider,{value:P,children:[M,me(OS,{})]})}),addPanelRow:M=>d?Ua("div",{className:"sf-addside-sitewide",children:[me("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:me(Rt,{type:"chat",size:16})}),Ua("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{M(),k()},children:[l("Live chat"),me("span",{className:"sf-addside-sitewide-desc",children:l("A chat bubble on every page")})]}),me(hH,{checked:x.enabled,onChange:z=>I({enabled:z}),ariaLabel:l("Show the chat bubble on the whole site")})]}):void 0}}var rw=null,Ud=new WeakMap;function OH(e){let o=Tu();if(!e||!o)return e;rw!==o&&(rw=o,Ud=new WeakMap);let t=Ud.get(e);return t||(t={...e,choices:e.choices?e.choices.map(r=>({...r,label:l(r.label)})):null,spec:e.spec?{...e.spec,addLabel:l(e.spec.addLabel)}:null},Ud.set(e,t)),t}var LH={isLockedBlock:(e,o)=>TC(e)||!!(o&&zo()?.heldElsewhere(o.props.id)),duplicateBlocked:Yl,nestDepth:(e,o,t)=>o===tn?Vu(e,t):0,newSectionNode:ew,canAddTo:(e,o)=>OH(dC(e,o)),blockIsOffered:cC},RH=new Proxy(VC,{get:(e,o)=>{let t=Reflect.get(e,o);return typeof t=="string"?l(t):t}}),AH={labelAtLevel:(e,o,t)=>l(Ed(e,o,t)),descriptions:RH,categoryLabel:e=>{let o=AS(e);return o===void 0?void 0:l(o)},firstSection:BS,blockRowName:mC,rowName:xC,plainText:ht,Icon:Rt,Thumbnail:hb,useProducts:ow},BH={desktop:2e3,tablet:800,mobile:390},aw="desktop",DH={options:sg,initial:aw,fluid:aw,widths:BH},_H={read:hC,write:e=>gC(e),forSelection:(e,o)=>bC(e,o)},NH={first:De,last:le,firstGroup:se,lastGroup:ae,isSectionGroup:Ir,sectionGroupZone:wy,panelOf:e=>e===De?ad:null,get sharedReach(){return Mt()?HH:void 0},get shared(){return zo()?OC:void 0},get groupTab(){return Mt()?Fy:void 0},get groupBadge(){return Mt()?Uc({type:ae})??void 0:void 0},get changeNotice(){return Mt()?Ey():void 0},get band(){return Mt()?MH:void 0},get groupAccepts(){return Mt()?Ty:void 0}},MH={foldable:!0},HH=e=>Uc(e)??EC(e);function WH(e){return{...uw(cw(e),dw(e)),openSettings:()=>e.show(nd)}}function zH(e,o){$b(e,o),Kb()}var ane={useOwnerName:cr,useDocumentLabel:zh,useBridges:EH,useStandaloneBridges:WH,useDocumentPass:zH,blockRules:LH,blockLook:AH,devices:DH,leftView:_H,pinned:NH,Canvas:qC,canvasDrag:{media:KC},Inspector:db};export{Fee as a,Eee as b,Oee as c,Lee as d,lt as e,Od as f,jee as g,Se as h,mn as i,DS as j,Yee as k,soe as l,WS as m,poe as n,jS as o,moe as p,KS as q,YS as r,QS as s,JS as t,Toe as u,Poe as v,Foe as w,Eoe as x,o2 as y,fp as z,l2 as A,Hoe as B,$o as C,en as D,Qw as E,H5 as F,ut as G,W5 as H,z5 as I,tn as J,Vu as K,Koe as L,Voe as M,d2 as N,$u as O,Vw as P,L5 as Q,Ja as R,qu as S,Yw as T,Xw as U,Zw as V,B5 as W,D5 as X,_5 as Y,N5 as Z,rc as _,XR as $,ZR as aa,QR as ba,Al as ca,Bl as da,cj as ea,se as fa,ae as ga,PX as ha,vy as ia,Vl as ja,jo as ka,st as la,Dre as ma,_re as na,Nre as oa,Mre as pa,wf as qa,U3 as ra,$3 as sa,jt as ta,q3 as ua,j3 as va,ck as wa,dk as xa,ht as ya,Mr as za,sl as Aa,il as Ba,ro as Ca,uq as Da,pq as Ea,mq as Fa,Be as Ga,xq as Ha,UE as Ia,$E as Ja,Iq as Ka,ar as La,hq as Ma,gq as Na,VE as Oa,dl as Pa,nr as Qa,mh as Ra,ml as Sa,kq as Ta,Nf as Ua,ul as Va,Tq as Wa,Pq as Xa,Fq as Ya,Eq as Za,Oq as _a,LO as $a,Lq as ab,Rq as bb,Aq as cb,Bq as db,ha as eb,ey as fb,oy as gb,ty as hb,t5 as ib,l5 as jb,s5 as kb,i5 as lb,pe as mb,lP as nb,Hi as ob,sP as pb,Yz as qb,eo as rb,Zz as sb,Qz as tb,fP as ub,Jz as vb,Ix as wb,hx as xb,dP as yb,uP as zb,sG as Ab,fG as Bb,cG as Cb,dG as Db,uG as Eb,er as Fb,Bo as Gb,qi as Hb,Sx as Ib,hP as Jb,ji as Kb,An as Lb,xG as Mb,Ak as Nb,N4 as Ob,rn as Pb,pt as Qb,Dr as Rb,op as Sb,Y5 as Tb,js as Ub,X5 as Vb,nn as Wb,dp as Xb,g3 as Yb,y3 as Zb,Av as _b,b3 as $b,w3 as ac,pp as bc,v3 as cc,Dv as dc,k3 as ec,L0 as fc,vn as gc,Iz as hc,Ei as ic,hz as jc,M0 as kc,gz as lc,bz as mc,Sz as nc,Lz as oc,Rz as pc,Az as qc,_m as rc,dz as sc,uz as tc,pz as uc,mz as vc,U0 as wc,Tn as xc,wz as yc,qm as zc,GH as Ac,X as Bc,l as Cc,$e as Dc,Jg as Ec,eY as Fc,Zg as Gc,Qp as Hc,hn as Ic,Jp as Jc,P6 as Kc,ET as Lc,V6 as Mc,lm as Nc,k5 as Oc,E5 as Pc,Ks as Qc,Pv as Rc,m3 as Sc,F3 as Tc,si as Uc,ii as Vc,O4 as Wc,L4 as Xc,_p as Yc,R4 as Zc,A4 as _c,B4 as $c,Gp as ad,$p as bd,oW as cd,im as dd,Ce as ed,dm as fd,cW as gd,WT as hd,dW as id,uW as jd,pm as kd,xW as ld,zT as md,IW as nd,hW as od,UT as pd,bW as qd,$T as rd,SW as sd,Im as td,hm as ud,gm as vd,ym as wd,bm as xd,Sm as yd,Xt as zd,kW as Ad,TW as Bd,PW as Cd,FW as Dd,Sn as Ed,EW as Fd,vi as Gd,NW as Hd,km as Id,JT as Jd,HW as Kd,ki as Ld,$W as Md,Ti as Nd,b0 as Od,fz as Pd,kz as Qd,Tz as Rd,Pz as Sd,Fz as Td,Ez as Ud,rx as Vd,tP as Wd,Dz as Xd,ox as Yd,tx as Zd,_z as _d,Fn as $d,En as ae,Mz as be,Jt as ce,Ln as de,zz as ee,Gz as fe,Uz as ge,ux as he,qz as ie,Jo as je,No as ke,rf as le,wo as me,OU as ne,LU as oe,RU as pe,AU as qe,NU as re,MU as se,WF as te,HU as ue,WU as ve,zU as we,GU as xe,UU as ye,$U as ze,qU as Ae,ve as Be,jU as Ce,$F as De,KU as Ee,VU as Fe,YU as Ge,XU as He,Mn as Ie,or as Je,ZU as Ke,uI as Le,zn as Me,Gn as Ne,QU as Oe,JU as Pe,e$ as Qe,o$ as Re,t$ as Se,r$ as Te,a$ as Ue,n$ as Ve,l$ as We,s$ as Xe,i$ as Ye,f$ as Ze,Un as _e,c$ as $e,$n as af,qn as bf,ff as cf,jn as df,d$ as ef,kt as ff,u$ as gf,p$ as hf,m$ as if,x$ as jf,I$ as kf,h$ as lf,g$ as mf,y$ as nf,Qo as of,b$ as pf,S$ as qf,Kn as rf,C$ as sf,cf as tf,w$ as uf,v$ as vf,df as wf,k$ as xf,yI as yf,bI as zf,SI as Af,T$ as Bf,R1 as Cf,P$ as Df,F$ as Ef,h_ as Ff,Wy as Gf,We as Hf,va as If,b_ as Jf,qy as Kf,cZ as Lf,dZ as Mf,uZ as Nf,pZ as Of,mZ as Pf,xZ as Qf,IZ as Rf,hZ as Sf,gZ as Tf,yZ as Uf,bZ as Vf,ia as Wf,_R as Xf,Z9 as Yf,Q9 as Zf,J9 as _f,GR as $f,$R as ag,xg as bg,VR as cg,aj as dg,nj as eg,hg as fg,lj as gg,yg as hg,gg as ig,hj as jg,Fl as kg,ag as lg,ng as mg,El as ng,F9 as og,E9 as pg,Ol as qg,FR as rg,H9 as sg,la as tg,U9 as ug,dg as vg,nee as wg,lee as xg,see as yg,iee as zg,yte as Ag,bte as Bg,Pte as Cg,Cte as Dg,j9 as Eg,ug as Fg,Y9 as Gg,Ll as Hg,WQ as Ig,yb as Jg,bb as Kg,JH as Lg,yh as Mg,Gq as Ng,Uq as Og,$q as Pg,qq as Qg,Vf as Rg,Yf as Sg,Cg as Tg,yj as Ug,wg as Vg,oA as Wg,ac as Xg,wj as Yg,vj as Zg,tA as _g,kj as $g,da as ah,Pg as bh,Tj as ch,Fg as dh,aV as eh,Dg as fh,Wg as gh,sy as hh,dY as ih,rD as jh,aD as kh,ba as lh,nD as mh,lD as nh,yY as oh,uy as ph,le as qh,Kl as rh,no as sh,vb as th,kb as uh,$Q as vh,Ea as wh,Tb as xh,Pb as yh,KQ as zh,VQ as Ah,Vb as Bh,bd as Ch,Yb as Dh,dC as Eh,dte as Fh,LC as Gh,hs as Hh,C2 as Ih,w2 as Jh,_te as Kh,jH as Lh,XH as Mh,rH as Nh,ZC as Oh,aH as Ph,Ga as Qh,Ore as Rh,Lre as Sh,ane as Th};
|