efficient-storefront-blocks 0.70.0 → 0.75.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 +57 -0
- package/dist/chunks/EditorPreviewCheckout-27GNLSNR.js +4 -0
- package/dist/chunks/{SiteEditorProvider-3GKJZDL5.js → SiteEditorProvider-N4T55FAV.js} +1 -1
- package/dist/chunks/chunk-3TBLX25X.js +1 -0
- package/dist/chunks/chunk-4V6BLJSG.js +1 -0
- package/dist/chunks/{chunk-QWHNN7GF.js → chunk-K26JUDGZ.js} +1 -1
- package/dist/chunks/chunk-SJODSVWU.js +1 -0
- package/dist/chunks/chunk-WPHE7RI4.js +246 -0
- package/dist/chunks/{fitment-data-6GK7QQQI.js → fitment-data-5ZSHENM3.js} +1 -1
- package/dist/contract.js +2 -2
- package/dist/editor/components/CategorySource.js +1 -1
- package/dist/editor/components/HeaderSettingsPanel.js +1 -1
- package/dist/editor/components/PreviewHeader.d.ts +0 -1
- package/dist/editor/components/PreviewHeader.js +1 -11
- package/dist/editor/lib/document/blocks/service/ContactCards/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/service/ContactCards/fields.js +1 -0
- package/dist/editor/lib/document/blocks/service/ContactRouting/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/FooterMessaging/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/service/FooterMessaging/fields.js +1 -0
- package/dist/editor/lib/document/blocks/service/FooterPayment/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/service/FooterPayment/fields.js +1 -0
- package/dist/editor/lib/document/blocks/service/MessagingCards/fields.d.ts +2 -0
- package/dist/editor/lib/document/blocks/service/MessagingCards/fields.js +1 -0
- package/dist/editor/lib/document/blocks/service/Reviews/fields.js +1 -1
- package/dist/editor/lib/document/blocks/service/index.d.ts +1 -1
- package/dist/editor/lib/document/blocks/service/index.js +1 -1
- package/dist/editor/lib/document/config.d.ts +2 -0
- package/dist/editor/lib/document/config.js +1 -1
- package/dist/editor/lib/efficient-backend.js +1 -1
- package/dist/editor/lib/efficient-block-sources.js +1 -1
- package/dist/editor/lib/header-settings-source.d.ts +2 -1
- package/dist/editor/lib/header-settings-source.js +1 -1
- package/dist/editor/lib/storefront-editor-words.d.ts +19 -5
- package/dist/editor/lib/storefront-editor-words.js +1 -1
- package/dist/editor.css +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js +296 -200
- package/dist/links.d.ts +0 -2
- package/dist/links.js +1 -1
- package/dist/render/built-with.json +1 -1
- package/dist/render/components/CartContext.d.ts +3 -0
- package/dist/render/components/CartContext.js +1 -1
- package/dist/render/components/ChatLauncher.js +1 -1
- package/dist/render/components/ContactCards.d.ts +13 -0
- package/dist/render/components/ContactCards.js +1 -0
- package/dist/render/components/CopyText.d.ts +4 -0
- package/dist/render/components/CopyText.js +1 -0
- package/dist/render/components/Events.d.ts +3 -0
- package/dist/render/components/Events.js +1 -1
- package/dist/render/components/FooterMessaging.d.ts +5 -0
- package/dist/render/components/FooterMessaging.js +1 -0
- package/dist/render/components/FooterPayment.d.ts +11 -0
- package/dist/render/components/FooterPayment.js +1 -0
- package/dist/render/components/GalleryItem.js +1 -1
- package/dist/render/components/GalleryShowcase.js +1 -1
- package/dist/render/components/Header.d.ts +2 -1
- package/dist/render/components/Header.js +1 -1
- package/dist/render/components/HeaderCallButton.d.ts +9 -0
- package/dist/render/components/HeaderCallButton.js +1 -0
- package/dist/render/components/HeaderToolBlocks.d.ts +1 -2
- package/dist/render/components/HeaderToolBlocks.js +1 -1
- package/dist/render/components/MessagingCards.d.ts +9 -0
- package/dist/render/components/MessagingCards.js +1 -0
- package/dist/render/components/QrCode.d.ts +5 -0
- package/dist/render/components/QrCode.js +1 -0
- package/dist/render/components/Reviews.d.ts +14 -4
- package/dist/render/components/Reviews.js +1 -1
- package/dist/render/components/SectionGroupBody.js +1 -1
- package/dist/render/components/checkout/CheckoutPageClient.d.ts +2 -25
- package/dist/render/components/checkout/CheckoutPageClient.js +1 -3
- package/dist/render/components/checkout/checkout-parts.d.ts +5 -0
- package/dist/render/components/checkout/checkout-parts.js +1 -0
- package/dist/render/components/checkout/checkout-state.d.ts +174 -0
- package/dist/render/components/checkout/checkout-state.js +3 -0
- package/dist/render/lib/api/index.d.ts +1 -8
- package/dist/render/lib/api/index.js +1 -1
- package/dist/render/lib/api/types.d.ts +10 -3
- package/dist/render/lib/content/site.d.ts +1 -1
- package/dist/render/lib/document/blocks/commerce/CountrySwitchBlock/render.js +1 -1
- package/dist/render/lib/document/blocks/service/ContactCards/meta.d.ts +7 -0
- package/dist/render/lib/document/blocks/service/ContactCards/meta.js +1 -0
- package/dist/render/lib/document/blocks/service/ContactCards/render.d.ts +4 -0
- package/dist/render/lib/document/blocks/service/ContactCards/render.js +1 -0
- package/dist/render/lib/document/blocks/service/Events/render.js +1 -1
- package/dist/render/lib/document/blocks/service/Footer/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/FooterGroup/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/FooterMessaging/meta.d.ts +2 -0
- package/dist/render/lib/document/blocks/service/FooterMessaging/meta.js +1 -0
- package/dist/render/lib/document/blocks/service/FooterMessaging/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/service/FooterMessaging/render.js +1 -0
- package/dist/render/lib/document/blocks/service/FooterPayment/meta.d.ts +3 -0
- package/dist/render/lib/document/blocks/service/FooterPayment/meta.js +1 -0
- package/dist/render/lib/document/blocks/service/FooterPayment/render.d.ts +2 -0
- package/dist/render/lib/document/blocks/service/FooterPayment/render.js +1 -0
- package/dist/render/lib/document/blocks/service/MessagingCards/meta.d.ts +2 -0
- package/dist/render/lib/document/blocks/service/MessagingCards/meta.js +1 -0
- package/dist/render/lib/document/blocks/service/MessagingCards/render.d.ts +4 -0
- package/dist/render/lib/document/blocks/service/MessagingCards/render.js +1 -0
- package/dist/render/lib/document/blocks/service/Reviews/meta.d.ts +6 -0
- package/dist/render/lib/document/blocks/service/Reviews/meta.js +1 -1
- package/dist/render/lib/document/blocks/service/Reviews/render.js +1 -1
- package/dist/render/lib/document/blocks/service/metas.d.ts +4 -0
- package/dist/render/lib/document/blocks/service/metas.js +1 -1
- package/dist/render/lib/document/blocks/service/renders.d.ts +4 -0
- package/dist/render/lib/document/blocks/service/renders.js +1 -1
- package/dist/render/lib/document/blocks/text-part-shapes.json +137 -6
- package/dist/render/lib/document/card-templates.d.ts +2 -0
- package/dist/render/lib/document/card-templates.js +1 -0
- package/dist/render/lib/document/footer-page-blocks.d.ts +1 -0
- package/dist/render/lib/document/footer-page-blocks.js +1 -1
- package/dist/render/lib/document/lazy-draws.js +1 -1
- package/dist/render/lib/document/render-config.d.ts +2 -0
- package/dist/render/lib/document/render-config.js +1 -1
- package/dist/render/lib/document/section-to-box-rows-reviews.d.ts +1 -0
- package/dist/render/lib/document/section-to-box-rows-reviews.js +1 -0
- package/dist/render/lib/links/link-rules.d.ts +1 -1
- package/dist/render/lib/links/link-rules.js +1 -1
- package/dist/render/lib/qr.d.ts +5 -0
- package/dist/render/lib/qr.js +1 -0
- package/dist/render/lib/sections/messaging.d.ts +45 -0
- package/dist/render/lib/sections/messaging.js +1 -0
- package/dist/render/lib/sections/reviews.d.ts +1 -0
- package/dist/render/lib/sections/reviews.js +1 -0
- package/dist/render/lib/wheels/catalog-default-layout.js +1 -1
- package/dist/render/lib/wheels/collections.js +1 -1
- package/dist/words.d.ts +42 -10
- package/dist/words.js +4 -4
- package/package.json +7 -4
- package/dist/chunks/EditorPreviewCheckout-XI4VULPL.js +0 -4
- package/dist/chunks/chunk-RPLNV3WM.js +0 -1
- package/dist/chunks/chunk-SQH6XBRG.js +0 -1
- package/dist/chunks/chunk-TXTTPEQA.js +0 -1
- package/dist/chunks/chunk-XF2ZAVNU.js +0 -262
- package/dist/render/components/useStorefrontReviews.d.ts +0 -2
- package/dist/render/components/useStorefrontReviews.js +0 -1
- /package/dist/chunks/{chunk-XF2ZAVNU.js.LEGAL.txt → chunk-WPHE7RI4.js.LEGAL.txt} +0 -0
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
import{$ as As,A as Uo,Aa as Pu,B as $t,C as qt,Ca as Xa,Da as Fu,E as uu,Ea as Eu,H as Lr,J as pu,Ja as Ou,K as Ls,L as mu,N as xu,O as Iu,Q as hu,R as Rs,T as gu,U as $e,V as ct,W as yu,X as go,Y as Va,_ as bu,a as ru,c as au,ca as Su,d as Ze,da as Bs,e as Gt,f as Ao,fa as Ds,g as Fs,h as su,ja as Cu,l as Or,n as Es,pa as dt,ra as wu,s as iu,t as fu,ta as vu,u as Os,v as We,va as ku,w as cu,x as du,y as Ut,z as ho,za as K}from"./chunk-RPLNV3WM.js";import{d as nu,e as Er,f as lu,g as Tu,j as Ya,n as _s}from"./chunk-SQH6XBRG.js";var Za=null,Ru="en",Au=null;function F5(e,o,t){Za=e??null,Ru=o||"en",Au=t??null}function Z(){return Au}function Ns(){return Ru}function Bu(){return Za}function Lu(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=Za?Za[e]:void 0;if(typeof t=="function"){try{let r=t(o??{});if(typeof r=="string"&&r)return r}catch{}return Lu(e,o)}return Lu(typeof t=="string"&&t?t:e,o)}function qe(e,o,t,r){return l(t===1?e:o,{...r,n:t})}import{jsx as Ms,Fragment as Gw,jsxs as Uw}from"react/jsx-runtime";import{createContext as $w,useContext as qw}from"react";var jw={mirrorHostStyles:!0,css:null,fontHrefs:[]},Du=$w(jw);function R5({value:e,children:o}){return Ms(Du.Provider,{value:e,children:o})}function Hs(){return qw(Du)}function _u(){let{css:e,fontHrefs:o}=Hs();return Uw(Gw,{children:[o.map(t=>Ms("link",{rel:"stylesheet",href:t},t)),e?Ms("style",{"data-sf-canvas-css":"",children:e}):null]})}import{jsx as Kw}from"react/jsx-runtime";import{createContext as Vw,useContext as Yw}from"react";var Nu=Vw(void 0);function _5({metadata:e,children:o}){return Kw(Nu.Provider,{value:e,children:o})}var Mu=()=>Yw(Nu);import{jsx as xe,Fragment as Pw,jsxs as $a}from"react/jsx-runtime";import{useCallback as qa,useEffect as Ve,useRef as JH,useState as e5}from"react";import{Button as o5,Tooltip as t5}from"efficient-shell/ui";import{SettingsSwitch as r5}from"efficient-easel/panel";import{PagesIcon as a5,StylesIcon as n5}from"efficient-easel/rail";import{PaletteIcon as l5}from"efficient-shell/icons/efficient";import{TemplateIcon as s5}from"efficient-easel/icons";import{Subtree as i5,TreeRow as Fw}from"efficient-easel/tree";import{useEasel as Ew}from"efficient-easel/easel";import{useEaselStrings as Ow}from"efficient-easel/strings";import{createContext as Xw,useContext as Zw}from"react";var Ws=Xw(!1),H5=()=>Zw(Ws);import{jsx as re,Fragment as cg,jsxs as na}from"react/jsx-runtime";import{Fragment as IR,useEffect as hR,useId as gR,useMemo as dg,useRef as yR,useState as at}from"react";import{useScreenDocument as bR}from"efficient-easel/screen/components/ScreenDocumentContext";import{UiIcon as Tl}from"efficient-easel/draw/client";import SR from"efficient-easel/screen/components/SidePanelHead";import{jsx as ee,jsxs as rt,Fragment as Ot}from"react/jsx-runtime";import{useEasel as Yh}from"efficient-easel/easel";import{useState as Xf}from"react";import{jsx as ar,jsxs as MI,Fragment as s1}from"react/jsx-runtime";import{useState as HI}from"react";import{SettingsDefaultReset as i1,SettingsField as f1}from"efficient-easel/panel";import{useEaselStrings as c1}from"efficient-easel/strings";import{AddIcon as d1}from"efficient-easel/icons";import{jsx as g,jsxs as No,Fragment as to}from"react/jsx-runtime";import{cloneElement as Qx,useId as tF,useRef as rf,useState as jr}from"react";import{useEasel as Kr,useSelectedFields as nf}from"efficient-easel/easel";import{readHidable as Jo,hidableText as rF}from"efficient-easel/draw";import{FOLD_FIELD_MARKER as lf,LINK_FIELD_MARKER as aF,MEDIA_FIELD_MARKER as nF,SCAFFOLD_FIELD_MARKER as lF,TEXT_FIELD_MARKER as Mo,foldMetaOf as vo,textFieldIdentifier as xU}from"efficient-easel/draw";import{jsx as qu}from"react/jsx-runtime";import{useCallback as tv,useEffect as rv,useRef as av,useState as nv}from"react";import{useEasel as lv}from"efficient-easel/easel";import{SettingsAction as sv}from"efficient-easel/panel";function zs(e){return typeof e=="number"&&Number.isFinite(e)}function G5(e,o){if(!zs(e))return;let t=Va(go(e));if(Object.keys(t).length===0)return;let r=t[Qa];if(typeof r!="string")return t;let a=Rr(o)?Ar(r,Bo(o)??[]):r;return{...t,[Qw]:a}}var Qw="--sf-section-radius",Qa="--sf-card-radius",ut=["tl","tr","br","bl"];function Bo(e){if(!Array.isArray(e))return null;let o=e.filter(t=>ut.includes(t));return ut.filter(t=>o.includes(t))}function Rr(e){let o=Bo(e);return o!==null&&o.length<ut.length}function Ar(e,o){return ut.map(t=>o.includes(t)?e:"0").join(" ")}var Hu=[{value:"tl",label:"Top left"},{value:"tr",label:"Top right"},{value:"bl",label:"Bottom left"},{value:"br",label:"Bottom right"}];var Jw="--sf-card-box-radius",ev="--sf-site-card-radius",j5="sf-section-bleeds";function Gs(e){return typeof e=="number"&&Number.isFinite(e)}function K5(e,o){if(!Gs(e))return;let t=Va(go(e))[Qa];if(typeof t!="string")return;let r=Rr(o)?Ar(t,Bo(o)??[]):t;return{[Jw]:r}}function V5(e){let o=e[Qa];return typeof o=="string"?{[ev]:o}:{}}function Wu(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 ov}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 Ja(e,o,t){let r=Br(t?.zone),a=r?ov(e,o,r.ownerId):null;return a&&r?{...a,slot:r.slot}:null}function zu(e,o,t){let r=Ja(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}:Gs(i?.props?.cardCorners)?{can:!0,others:d,zone:r.zone,index:r.index,data:{...r.item,props:{...r.item.props,[a]:Wu(n,f)}}}:{can:!1,reason:"unset",others:d}}function Gu(e){return e.can?qe("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 Uu(e){return qe("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 iv}from"efficient-easel/screen/lib/document/use-section-ops";var fv=2200,cv="apply-corners-to-siblings",dv="Apply to all cards";function uv({plan:e,doneCount:o,onPress:t}){return qu(sv,{id:cv,label:l(dv),note:Gu(e),disabled:!e.can,done:o!==null,doneLabel:Uu(o??0),onPress:t})}function ju(){let{appState:e,config:o}=lv(f=>f),t=iv(),[r,a]=nv(null),n=av(null);rv(()=>()=>{n.current&&clearTimeout(n.current)},[]);let s=zu(o,e.data.content??[],e.ui.itemSelector),i=tv(()=>{$u(s,t.replaceComponent),s.can&&(a(s.others),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>a(null),fv))},[s,t]);return qu(uv,{plan:s,doneCount:r,onPress:i})}var Ku=1;function pv(e){return go(e)}function d3(e){let o=pv(e);return o===null?{}:{"--sf-card-image-radius":`${o}px`}}var Vu=1,Yu="Corners";function mv(e){return go(e)}function x3(e,o){let t=mv(e);if(t===null)return null;let r=`${t}px`;return{borderRadius:Rr(o)?Ar(r,Bo(o)??[]):r}}var Do={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]]}},Us=Object.keys(Do),Zu=[2,3,4,6];function Qu(e){return typeof e!="string"||e===""?null:Do[e]??null}function Xu(e,o){return o?6/e.acrossPhone:12/e.across}var xv="sf-wall--";function Iv(e){return`${xv}${e}`}function h3(e){let o=Do[e],t=`.${Iv(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,Xu(o,!1))),r.push("@media (max-width:800px){"),r.push(`${t}{grid-template-columns:repeat(6,minmax(0,1fr))}`),r.push(...a(o.phone,Xu(o,!0))),r.push("}"),r.join("")}var en=12,Ju=1,hv=3;var gv=3;function $s(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 yv(e){return $s(e,1,en)??gv}function b3(e,o){return $s(e,Ju,hv)??(yv(o)===4?2:Ju)}function S3(e){return e==null||e===""?null:$s(e,1,en)}var C3="data-sf-span";function w3(e){if(!e)return!1;if(e.type==="Grid")return!0;if(e.type==="GalleryB"){if(Qu(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"],on="bottom-left";var qs={"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 bv(e){let o=$o.indexOf(pt(e));return{band:Math.floor(o/3),column:["start","center","end"][o%3]}}function Sv(e){return 1+bv(e).band*6}function k3(e){return Sv(e)+1}function pt(e){return $o.includes(e)?e:on}function T3(e){let o=typeof e=="number"&&Number.isFinite(e)?e:0;return Math.max(-40,Math.min(40,Math.round(o)))}function P3(e,o=60){let t=typeof e=="number"&&Number.isFinite(e)?e:o;return Math.max(30,Math.min(100,Math.round(t)))}function js(e,o){let t=pt(o);return e.filter(r=>pt(r?.props?.placement)===t).length}function ep(e){return`${qs[pt(e)]} already holds 4 boxes. Move one somewhere else first.`}function Ks(e,o){let t=e.filter(r=>r?.props?.id!==o);return $o.map(r=>{let a=js(t,r)>=4,n=qs[r];return a?{value:r,label:n,disabled:!0,title:ep(r)}:{value:r,label:n}})}function tn(e,o){let t=o===void 0?on:pt(o?.props?.placement);return js(e,t)>=4?ep(t):null}var rn="HeroGroup";function Cv(e){return $o.map(o=>{let t=js(e,o);return{anchor:o,total:t,hidden:t-4}}).filter(o=>o.hidden>0)}function Vs(e){let o=Cv(e);return o.length===0?null:o.map(({anchor:t,total:r,hidden:a})=>{let n=qs[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 op(e,o){let t=o;if(t?.type!==rn)return null;let r=t.props?.id===void 0?"":String(t.props.id);return r?tn(Ys(e,r),t):null}function Ys(e,o){let t=rp(e,o);return t&&t.ownerType===vv?t.siblings:[]}function tp(e,o){let t=rp(e,o);return t?t.ancestorTypes.filter(r=>r===rn).length:wv}var wv=1,vv="HeroSlide";function rp(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 kv}from"react/jsx-runtime";var Tv="sf-hint-keep";function ap({children:e}){return kv("span",{className:Tv,children:e})}import{jsx as qo,Fragment as Fv,jsxs as up}from"react/jsx-runtime";import{useContext as Ev,useEffect as Ov,useId as Lv,useState as pp}from"react";import{SettingsField as Rv,SettingsSwitch as Av}from"efficient-easel/panel";import{AnchorIcon as Bv}from"efficient-easel/icons";import{ScreenDocumentContext as Dv}from"efficient-easel/screen/components/ScreenDocumentContext";import{Snippet as _v}from"efficient-shell/ui";var an="homepage";function mt(e){return(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}var np=[{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 lp(e){return e.offersCommerce&&e.offersService?np:np.filter(o=>!o.needs||(o.needs==="commerce"?e.offersCommerce:e.offersService))}var Xs="#popup:";function sp(e){return`${Xs}${e}`}function ip(e){return e.startsWith(Xs)&&e.slice(Xs.length).trim()||null}function Dr(e){return e===an?"/":`/${e}`}function fp(e){return`/journal/${e}`}function D3(e){return`/wheels/${e}`}function nn(e,o){return`${Dr(e)}#${o}`}function Zs(e){return mt(e)}function Pv(e){return typeof e=="string"?e.trim():e&&typeof e=="object"&&typeof e.text=="string"?e.text.trim():""}function cp(...e){let o=new Set,t=[];for(let r of e)for(let a of r?.content??[]){let n=Pv(a?.props?.anchor);if(!n)continue;let s=Zs(n);!s||o.has(s)||(o.add(s),t.push({slug:s,name:n}))}return t}function _3(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 dp(e){return/^\/wheels\/[^/?#]+(?:[?#].*)?$/.test(e)}import{readHidable as Nv}from"efficient-easel/draw";function mp({value:e,onChange:o,nameBox:t}){let r=Nv(e).text,[a,n]=pp(!1),s=a||r.trim()!=="",i=Lv();return up(Fv,{children:[qo(Rv,{label:l("Add an anchor"),labelId:i,icon:qo(Bv,{}),action:qo(Av,{checked:s,ariaLabelledBy:i,onChange:f=>{n(f),!f&&r!==""&&o("")}})}),s&&t(e,o),s&&qo(Mv,{name:r})]})}function Mv({name:e}){let o=Ev(Dv),t=o?.templateId?"":o?.currentSlug??"",[r,a]=pp("");Ov(()=>a(Ya()||window.location.origin),[]);let n=Zs(e);if(!n||!t)return null;let s=`${r}${nn(t,n)}`,i=s.replace(/^https?:\/\//,""),f=i.lastIndexOf("#");return qo("div",{className:"sf-anchor-link",children:qo(_v,{value:s,label:l("link"),size:"sm",children:up("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 sF,AlignLeftIcon as iF,EyeIcon as fF,AlignSeparateIcon as cF,AnimationIcon as Jx,BackgroundIcon as dF,BorderAllIcon as uF,BlockSectionIcon as pF,CartIcon as mF,ColumnWidthsIcon as eI,ColumnsIcon as oI,CornerIcon as xF,DirectionDownIcon as IF,DirectionLeftIcon as hF,DirectionRightIcon as gF,DirectionUpIcon as yF,DollarIcon as bF,FinishIcon as SF,GapIcon as tI,GridIcon as CF,GroundIcon as wF,HashIcon as rI,HeightIcon as vF,ImageIcon as kF,ListIcon as TF,LocationIcon as of,NudgeIcon as PF,PaddingAllIcon as FF,PaddingBottomIcon as aI,PaddingLeftIcon as nI,PaddingRightIcon as lI,PaddingTopIcon as sI,PageIcon as iI,PlacementIcon as EF,ProductSizeIcon as OF,StickyIcon as LF,RotateIcon as RF,SquareIcon as AF,TypeIcon as BF,WidthIcon as DF,WrapIcon as _F}from"efficient-easel/icons";import{jsx as te,Fragment as yo,jsxs as bo}from"react/jsx-runtime";import{TitleIcon as Hv,ButtonIcon as Wv,DollarIcon as zv,HashIcon as Gv,LinkIcon as Uv,NoteIcon as $v,TagIcon as qv,TextLinesIcon as jv}from"efficient-easel/icons";var xp={body:jv,button:Wv,link:Uv,label:qv,number:Gv,price:zv,note:$v,title:Hv},Ip={eyebrow:bo(yo,{children:[te("path",{d:"M5 6.5h5"}),te("path",{d:"M5 12.5h14"}),te("path",{d:"M5 18h11"})]}),heading:bo(yo,{children:[te("path",{d:"M6.5 5v14"}),te("path",{d:"M17.5 5v14"}),te("path",{d:"M6.5 12h11"})]}),intro:bo(yo,{children:[te("path",{d:"M4 5.5v13"}),te("path",{d:"M8 7.5h12"}),te("path",{d:"M8 12h12"}),te("path",{d:"M8 16.5h8"})]}),value:bo(yo,{children:[te("rect",{x:"2.5",y:"7",width:"19",height:"10",rx:"2"}),te("path",{d:"M6.5 12h7"})]}),name:bo(yo,{children:[te("path",{d:"M6 3.5v17"}),te("path",{d:"M6 5h11.5l-2.6 3.6L17.5 12H6z"})]}),date:bo(yo,{children:[te("rect",{x:"4",y:"5.5",width:"16",height:"15",rx:"2"}),te("path",{d:"M4 10.5h16"}),te("path",{d:"M9 3.2v4.4"}),te("path",{d:"M15 3.2v4.4"})]}),caption:bo(yo,{children:[te("rect",{x:"3.5",y:"4.5",width:"17",height:"11",rx:"2"}),te("path",{d:"M3.5 12.8l4.2-3.2 3.6 2.8 3.4-2.4 5.8 4"}),te("path",{d:"M6.5 19.5h11"})]}),quote:bo(yo,{children:[te("path",{d:"M9.5 5.5C7 7.2 5.5 9.7 5.5 12.8h4v5.7h-5v-5.7"}),te("path",{d:"M19.5 5.5c-2.5 1.7-4 4.2-4 7.3h4v5.7h-5v-5.7"})]}),tag:bo(yo,{children:[te("rect",{x:"3",y:"5.5",width:"18",height:"13",rx:"2.5"}),te("path",{d:"M8 9.5h8"}),te("path",{d:"M12 9.5v5"})]}),meta:bo(yo,{children:[te("path",{d:"M4 7h16"}),te("path",{d:"M4 14h3.5"}),te("path",{d:"M10.5 14h3"}),te("path",{d:"M17 14h3"})]})};function Qs({noun:e,size:o=14,strokeWidth:t=1.8,className:r,style:a}){let n=xp[e];return n?te("span",{className:r,style:{display:"inline-flex",...a},"aria-hidden":"true",children:te(n,{size:o})}):te("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 Z3=Object.keys(xp);var Q3=Object.keys(Ip);var Kv="#ffffff",Vv=/^#[0-9a-fA-F]{6}$/;function Js(e){return Yv(e)?e:Kv}function Yv(e){return typeof e=="string"&&Vv.test(e)}function e4(e){return{"--bg":Js(e)}}var ei=[{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}],Xv=ei.filter(e=>e.ink);function Zv(e){let o={color:e.fg};for(let{role:t,token:r}of Xv)o[r]=e[t];return o}var Qv={fg:"var(--overlay-fg)",line:"color-mix(in srgb, var(--overlay-fg) 24%, transparent)",muted:"color-mix(in srgb, var(--overlay-fg) 76%, transparent)"},hp=Object.freeze(Zv(Qv));var ln=-1,Jv="sf-section-accent",gp="Color",yp=new Set(["CategoryBar","DocTabs"]),a4=new Set(["Flex"]),ek=0;function oi(e){return e===ln?null:typeof e=="number"&&Number.isInteger(e)&&e>=0?e:ek}function n4(e){return e??ln}function ok(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 ei)t[`--sf-sec-${r}`]=`var(${o}-${r}, var(--theme-${r}))`;return t}function l4(e){let o=oi(e.sectionAccent);return o===null?null:{className:Jv,style:ok(o)}}var tk=["fade","rise","scale"],ti="none",bp=[{label:"None",value:ti},{label:"Fade",value:"fade"},{label:"Rise",value:"rise"},{label:"Scale",value:"scale"}];function f4(e){return tk.includes(e)?e:null}var Sp="data-sf-anim",_r="data-sf-anim-state";function c4(e){let o=()=>{};if(typeof IntersectionObserver>"u"||!e.getAttribute(Sp))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(),rk(e);break}},{threshold:0});return r.observe(e),()=>{r.disconnect(),e.removeAttribute(_r)}}function rk(e){if(!e.getAttribute(Sp))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 d4=yp;function ai(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(ri(r,o,0))return a??{}}return null}function ri(e,o,t){if(t>12||!e||typeof e!="object")return!1;if(Array.isArray(e))return e.some(a=>ri(a,o,t+1));let r=e.props;return r&&typeof r=="object"&&r.id===o?!0:Object.values(e).some(a=>ri(a,o,t+1))}import{SettingsDefaultReset as Oe,SettingsField as le,SettingsGroup as NF,SettingsGroupSub as MF,SettingsBorder as HF,SettingsSegmented as WF,SettingsSides as zF,SettingsSidesEach as fI,sidesStartEach as GF,SettingsSwitch as cI,borderSides as UF,borderStartEach as $F}from"efficient-easel/panel";import{FieldSelect as qF,ListField as jF}from"efficient-easel/fields";import{DisplayChips as KF}from"efficient-shell/ui";function jt(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 sn(e,o){return jt(e)[o]!==!1}function ni(e,o,t){let r=jt(o)[t];return typeof r=="boolean"?r:sn(e,t)}function Cp(e){return Object.values(jt(e)).some(o=>o===!1)}function wp(e){return Object.keys(jt(e)).length>0}function vp(e,o,t){let r={...jt(e)};return t?delete r[o]:r[o]=!1,Object.keys(r).length?r:void 0}function kp(e,o,t){return{...jt(e),[o]:t}}function m4(e,o,t){let r=sn(e,t),a=ni(e,o,t);return r&&a?"":!r&&!a?"hidden":r?"max-[720px]:hidden":"min-[720px]:hidden"}import{AlignmentGrid as VF,Checkbox as DU,CornersInput as YF,DateTimePicker as XF,FOCAL_DEFAULT as _U,PictureTiles as dI,PositionInput as ZF,Slider as QF,Tooltip as uI}from"efficient-shell/ui";import{jsx as xt,jsxs as Pp}from"react/jsx-runtime";import{ColorPicker as nk,HexInput as lk}from"efficient-shell/ui";import{SettingsDefaultReset as sk,SettingsField as ik}from"efficient-easel/panel";import{typedHex as li}from"efficient-easel/pick";import{typedHex as ak}from"efficient-easel/pick";function Tp(e){let o=new Set,t=[];return We(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?ak(i):null;!f||o.has(f)||(o.add(f),t.push({name:s,value:f}))}}),t}function fk({value:e,onChange:o,label:t,id:r,caption:a,inherited:n,ariaLabel:s}){return xt(dk,{value:e,onChange:o,label:l(s??t),id:r,caption:a,inherited:n})}function ck(){let{theme:e}=K();return Tp(e).map(o=>({value:o.value,label:o.name}))}function dk({value:e,onChange:o,label:t,id:r,caption:a,inherited:n}){let s=ck(),i=e?null:li(n??""),f=a!==void 0&&(!e||li(a)!==li(e))?a:null,d=p=>{p!==e&&o(p)};return Pp("div",{className:"sf-colour",children:[xt(nk,{id:r,value:e,onChange:d,label:t,presets:s,fallback:i??void 0,size:"md",align:"start"}),f!==null?xt("span",{className:"sf-colour-caption",children:f}):xt("span",{className:"sf-colour-hexwrap",children:xt(lk,{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 je({label:e,icon:o,changed:t,hint:r,onReset:a,resetTo:n,children:s,...i}){return Pp(ik,{label:e,icon:o,htmlFor:i.id,changed:t,hint:r,action:a?xt(sk,{words:Z()?.panel,label:e,changed:!!t,detail:n,onReset:a}):void 0,children:[fk({...i,label:e}),s]})}function fn({label:e,icon:o,value:t,inherited:r,resetTo:a,onChange:n,onReset:s,hint:i}){let f=!!t;return xt(je,{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 Dk,useState as _k}from"react";import{markSelection as Nk,useCaretEdit as Mk}from"efficient-easel/copy";import{RevertIcon as Hk}from"efficient-easel/icons";import{IconButton as Wk,TextToolbar as zk,Tooltip as Gk}from"efficient-shell/ui";import{applyMark as D4,markupTools as _4,MARKUP_TOOLS as N4,COPY_FIELD_TOOLS as M4,STOREFRONT_MARKUP as H4,tokenizeInline as W4,stripInline as z4,isSafeLinkHref as G4}from"efficient-shell/markup";import{applyMark as wk,markedAt as vk,markupTools as kk,MARKUP_TOOLS as Tk,parseMarkup as Pk,RETIRED_MARKS as Fk,STOREFRONT_MARKUP as Ek,tokenizeInline as $4}from"efficient-shell/markup";var It=["highlight","strong","quiet"],ht={highlight:"Highlight",strong:"Bold",quiet:"Quiet"},So={highlight:{kind:"wordHighlight",delimiter:"@@"},strong:{kind:"wordStrong",delimiter:"++"},quiet:{kind:"wordQuiet",delimiter:"^^"}},E4=Object.fromEntries(It.map(e=>[So[e].kind,e])),O4="data-sf-ws",cn=["accent","text","labels"],Lp={accent:"Accent",text:"Text",labels:"Labels"},Kt={accent:"var(--accent)",text:"var(--fg)",labels:"var(--fg-dim)"},uk=80,pk=120,mk=100,xk=900,Ik=.5,hk=3,gk=-.1,yk=.5,bk=3,si={font:null,size:null,weight:null,bold:null,italic:null,lineGap:null,textGap:null,colour:null},Sk={highlight:{...si},strong:{...si},quiet:{...si}};function Fp(e,o,t){return typeof e!="number"||!Number.isFinite(e)?null:Math.round(Math.min(Math.max(e,o),t))}function Ep(e,o,t){if(typeof e!="number"||!Number.isFinite(e))return null;let r=10**bk;return Math.round(Math.min(Math.max(e,o),t)*r)/r}function Op(e){return typeof e=="boolean"?e:null}function Ck(e){let o=typeof e?.font=="string"&&Ze.some(r=>r.key===e.font)?e.font:null,t=typeof e?.colour=="string"&&cn.includes(e.colour)?e.colour:null;return{font:o,size:Fp(e?.size,uk,pk),weight:Fp(e?.weight,mk,xk),bold:Op(e?.bold),italic:Op(e?.italic),lineGap:Ep(e?.lineGap,Ik,hk),textGap:Ep(e?.textGap,gk,yk),colour:t}}function Rp(e){let o={};for(let t of It)o[t]=e&&t in e&&e[t]?Ck(e[t]):{...Sk[t]};return o}function L4(e){let o=Rp(e),t={};for(let r of It){let a=o[r],n=`--sf-ws-${r}`;if(a.font){let s=Ze.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`]=Kt[a.colour])}return t}function R4(e){let o=e?.word_styles??void 0,t={};for(let r of It)o&&r in o&&(t[r]=o[r]??null);return Rp(t)}var Ok=new Set(["strong"]),Ap=It.map(e=>({open:So[e].delimiter,close:So[e].delimiter,kind:So[e].kind,...Ok.has(e)?{wordStart:!0}:{}})),j4=[{style:So.highlight.kind,label:ht.highlight,title:`${ht.highlight} word style`},{style:So.strong.kind,label:ht.strong,title:`${ht.strong} word style`},{style:So.quiet.kind,label:ht.quiet,title:`${ht.quiet} word style`}],Lk=new Set(Ap.map(e=>e.open)),Vt=[...Ek.filter(e=>!Lk.has(e.open)),...Ap];function Rk(e){return e.bullet?"- ":e.number!=null?`${e.number}. `:""}function Ak(e){return Pk(typeof e=="string"?e:"",Vt)}var Bk=Tk.map(e=>e.style).filter(e=>!Fk.includes(e)).filter(e=>Vt.some(o=>o.kind===e));function Bp(){return kk(Bk)}var Dp=Object.fromEntries(It.map(e=>[So[e].kind,So[e].delimiter]));function _p(e,o,t,r){let a=Dp[r];if(!a)return wk(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 Np(e,o,t,r){let a=Dp[r];return a?o>=a.length&&e.slice(o-a.length,o)===a&&e.slice(t,t+a.length)===a:vk(e,o,t,r)}function gt(e){return Ak(e).map(o=>Rk(o)+Mp(o.children)).join(`
|
|
2
|
-
`)}function Mp(e){return e.map(o=>o.kind==="text"?o.text:Mp(o.children)).join("")}var Hp="Clear formatting";function Uk(e,o,t){return Nk(e,o,t,_p)}function $k(e){let[o,t]=_k(null);return Dk(()=>{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 qk({target:e,value:o,onChange:t,disabled:r=!1,label:a="Formatting"}){let n=Mk({target:e,onChange:t}),[s,i]=$k(e),f=x=>n(I=>{let b=Uk(o,x,I);return i({start:b.selectionStart,end:b.selectionEnd}),b}),d=Bp(),p={};if(s)for(let x of d)p[x.style]=Np(o,s.start,s.end,x.style);let m=gt(o);return Nr(zk,{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(Gk,{content:l(Hp),children:Nr(Wk,{size:"sm",onMouseDown:x=>x.preventDefault(),onClick:()=>t(m),disabled:r||m===o,"aria-label":l(Hp),children:Nr(Hk,{size:14})})})})})}var ii=qk;import{deviceField as we}from"efficient-easel/screen/lib/document/device-fields";import{NO_CONTROL_FIELD as JF,NoControlMark as Nn,noControlField as Vr}from"efficient-easel/screen/lib/document/panel-no-control-mark";var fi="__ownBox";function Wp(e){return!!e&&typeof e=="object"&&e[fi]===!0}function dn(e,o,t){return typeof e=="number"?e:typeof o=="number"?o:t}var un=void 0;import{phoneKey as tr}from"efficient-easel/draw";import{jsx as di,Fragment as Vk}from"react/jsx-runtime";import{createContext as Yk,useContext as Xk}from"react";var pn={ProductGrid:{source:{keep:["slug"]}},GalleryItem:{product:{keep:["code","finish"]}},FeaturedCover:{source:{keep:["slug"]}},LongRead:{source:{keep:["slug"]}}},mn={Events:["posts"],SubscribeBlogs:["posts"]};var jk=["anchor"],Kk=/^href$|Href$|^url$|Url$|^link$|^mailto$|^tel$/;function Mr(e){return jk.includes(e)||Kk.test(e)}var ci={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"}}};ci.ContactLocations={"locations[].lat":{verb:"pii"},"locations[].lng":{verb:"pii"},"locations[].mapsUrl":{verb:"pii"},"locations[].geocode":{verb:"pii"}};var l6=Object.fromEntries(Object.entries(pn).map(([e,o])=>[e,Object.keys(o)])),s6=Object.fromEntries(Object.entries(mn).map(([e,o])=>[e,[...o]]));import{NoControlMark as Zk}from"efficient-easel/screen/lib/document/panel-no-control-mark";var zp=Yk(!1);function Gp({children:e}){return di(zp.Provider,{value:!0,children:e})}function Qk(){return Xk(zp)}function Up({name:e,children:o}){return!Qk()||!e||!Jk(e)||Mr(e)?di(Vk,{children:o}):di(Zk,{})}function Jk(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 ui="off",pi="none",mi=[{label:"None",value:"off"},{label:"1, 2, 3",value:"plain"},{label:"01, 02, 03",value:"padded"},{label:"N\xB001, N\xB002",value:"numero"}],xi=[{label:"None",value:"none"},{label:"Hairline",value:"hairline"}];function I6(e){return jo(mi,ui,e)}function h6(e){return jo(xi,pi,e)}var $p="sf-card-index",Hr="sf-card-index",g6="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",eT={plain:`counter(${Hr})`,padded:`counter(${Hr}, decimal-leading-zero)`,numero:`"N\xB0" counter(${Hr}, decimal-leading-zero)`};function y6(e,o){return o==="off"?"":`.${e}{counter-reset:${Hr}}.${e} .${$p}{counter-increment:${Hr}}.${e} .${$p}::before{content:${eT[o]}}`}function b6(e){return e==="hairline"?"border border-line hover:border-accent":""}var qp=[{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 eE}from"efficient-easel/draw";import{jsx as Co}from"react/jsx-runtime";import{SettingsDefaultReset as rT,SettingsField as Kp}from"efficient-easel/panel";import{useSelectedFields as aT}from"efficient-easel/easel";import{FOCAL_DEFAULT as nT}from"efficient-shell/format";import{ImageIcon as Vp,PlayIcon as Yp}from"efficient-easel/icons";import{MediaUploadField as lT}from"efficient-shell/ui";import{useContext as sT}from"react";import{ScreenDocumentContext as iT}from"efficient-easel/screen/components/ScreenDocumentContext";import{phoneKey as fT}from"efficient-easel/draw";import{usePreviewDevice as cT}from"efficient-easel/draw/client";import{requestMediaPick as dT}from"efficient-easel/screen/lib/media-picker";import{useEaselHost as uT}from"efficient-easel/screen/lib/host";function oT(e){return!!e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.src=="string"}function jp(e){return typeof e=="string"?e:oT(e)?e.src:""}function w6(e,o,t){return Ii(e,o.split("."),t)}function Ii(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=Ii(x,a,t);return I!==x&&(p=!0),I});return p?{...i,[s]:m}:e}let d=Ii(f,a,t);return d===f?e:{...i,[s]:d}}import{backendOf as tT}from"efficient-easel/screen/lib/session";var Ce=tT,xn=e=>e.blocks;import{useEaselSession as pT}from"efficient-easel/screen/lib/session-context";function mT(e,o){let t=null;try{t=aT()}catch{t=null}let r=cT()==="mobile";if(!e||!t||o&&!o(t.values??{}))return null;let a=typeof t.values?.[e]=="string"&&t.values[e]?String(t.values[e]):nT,n=fT(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,un)}}function Xp({value:e,onChange:o,label:t,accept:r,placeholder:a,focusKey:n,focusWhen:s}){let i=uT(),f=pT(),d=l(t),p=r.startsWith("video"),m=mT(p?void 0:n,s),x=sT(iT),I=k=>dT(i,{accept:r,title:d,...k?{file:k}:{}}).then(T=>T?.url??null);if(x&&!x.capabilities.mediaEditing)return Co(Kp,{label:d,icon:p?Co(Yp,{}):Co(Vp,{}),children:Co("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 b=jp(e),w=m?.phone&&b?Co(rT,{words:Z()?.panel,label:l("Image focus"),changed:!!m.own,detail:l("{value} on desktop",{value:m.desktop}),onReset:m.clear}):void 0;return Co(Kp,{label:d,icon:p?Co(Yp,{}):Co(Vp,{}),action:w,children:Co("div",{style:{flex:"1 1 auto",minWidth:0},children:Co(lT,{value:b,onChange:o,onPick:I,accept:p?"video/*":"image/*",kind:p?"video":"image",placeholder:a===void 0?void 0:l(a),maxSizeBytes:Ce(f).media.maxUploadBytes,...m?{focus:m.focus,onFocusChange:m.set}:{}})})})}import{jsx as Zp}from"react/jsx-runtime";import{useId as xT}from"react";import{FieldSelect as IT}from"efficient-easel/fields";import{SettingsField as hT}from"efficient-easel/panel";function gT(e){return e.map(({value:o,label:t,note:r})=>({value:o,label:t,...r?{meta:r}:{}}))}function Qp({label:e,options:o,value:t,onChange:r,emptyLabel:a,icon:n,hint:s}){let i=xT(),f=`${i}-label`,d=`${i}-button`,p=Array.isArray(t)?t:[];return Zp(hT,{label:l(e),labelId:f,icon:n,hint:s,children:Zp(IT,{id:d,multiple:!0,value:p,options:gT(o),onChange:r,placeholder:a===void 0?l("None"):l(a),ariaLabelledBy:`${f} ${d}`,inline:!0})})}import{jsx as ye,jsxs as St,Fragment as qT}from"react/jsx-runtime";import{useCallback as jT,useContext as KT,useEffect as VT,useId as pm,useRef as dm,useState as um}from"react";import{ThemeIcon as YT}from"efficient-easel/icons";import{SettingsField as XT}from"efficient-easel/panel";import{ScreenDocumentContext as ZT}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as V,jsxs as Ko,Fragment as kT}from"react/jsx-runtime";import{Button as gi,IconButton as TT,Tooltip as PT}from"efficient-shell/ui";import{jsx as yt,jsxs as Jp}from"react/jsx-runtime";import{AccentIcon as yT}from"efficient-easel/icons";import{Tooltip as bT}from"efficient-shell/ui";function hi(e){return ho(e).background}function ST(e){let o=Uo(e.accent,hi(e));return o===null?null:{ratio:o,grade:qt(o)}}function CT(e){let o=hi(e),t=Uo(e.accent,o);return t===null?[]:uu(e.accent).filter(r=>{let a=Uo(r,o);return a!==null&&a>t&&qt(a)==="good"})}var wT={good:"Easy to read","large-only":$t["large-only"],hard:$t.hard};function em({value:e,onChange:o}){let t=ST(e),r=t?.grade,a=t&&t.grade!=="good"?CT(e):[];return yt(je,{label:l("Main color"),icon:yt(yT,{}),hint:t?l(wT[t.grade]):void 0,value:e.accent,onChange:n=>o({...e,accent:n}),children:a.length>0?yt("div",{className:"w-full min-w-0",children:Jp("div",{className:"sf-readability",children:[yt("p",{className:"sf-readability-advice",children:vT(r,!0)}),yt("div",{className:"sf-readability-suggestions",children:a.map(n=>{let s=Uo(n,hi(e));return yt(bT,{content:l("Use {colour}",{colour:n.toUpperCase()}),children:Jp("button",{type:"button",className:"sf-readability-suggestion",onClick:()=>o({...e,accent:n}),children:[yt("span",{className:"sf-readability-chip",style:{background:n},"aria-hidden":!0}),s?`${s.toFixed(1)}:1`:n.toUpperCase()]})},n)})})]})}):null})}function vT(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 FT,ChevronDownIcon as ET,ChevronUpIcon as OT,GroundIcon as LT,LayoutIcon as RT,SquareIcon as AT,TextSmallIcon as BT,TypeIcon as om}from"efficient-easel/icons";var Wr=e=>l("Theme {n}",{n:e+1});function tm({colors:e}){let o=ho(e),t=Lr(e)??o.accent;return Ko("span",{className:"sf-theme-page",style:{background:o.background,color:o.text},"aria-hidden":!0,children:[V("span",{className:"sf-theme-eyebrow",style:{color:o.muted},children:l("label")}),Ko("span",{className:"sf-theme-headline",children:[l("Heading")," ",V("span",{style:{color:o.accent},children:l("accent")})]}),V("span",{className:"sf-theme-body",children:l("body text")}),Ko("span",{className:"sf-theme-row",children:[V("span",{className:"sf-theme-btn",style:{background:t,color:Ls(e,o.accent)},children:l("button")}),V("span",{className:"sf-theme-mini",style:{background:o.surface,borderColor:o.line},children:l("card")})]})]})}var yi={"Text color":V(om,{}),"Label color":V(BT,{}),Background:V(LT,{}),"Panels & cards":V(RT,{}),Borders:V(AT,{}),"Button color":V(FT,{}),"Button text color":V(om,{})};function DT({label:e,colorKey:o,value:t,onChange:r,idPrefix:a="sf-theme-ink"}){let n=`${a}-${o}`;return V(je,{label:l(e),icon:yi[e],id:n,value:t,onChange:s=>r(o,s)})}function _T({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 V(je,{label:l("Button color"),icon:yi["Button color"],id:a,value:s,caption:n?s:l("Main"),onChange:t})}function NT({colors:e,accent:o,onChange:t,idPrefix:r="sf-theme-ink"}){let a=`${r}-button-ink`,n=pu(e),s=Ls(e,o),i=Lr(e)??o,f=qt(Uo(s,i)??0);return V(je,{label:l("Button text color"),icon:yi["Button text color"],hint:n&&f!=="good"?l("{grade} on the button",{grade:l($t[f])}):void 0,id:a,value:s,caption:n?s:l("Auto"),onChange:t})}var MT=[{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 bi({colors:e,onChange:o,idPrefix:t}){let r=ho(e);return V(kT,{children:MT.map(a=>"colour"in a?V(em,{value:e,onChange:o},"colour"):"moduleBreak"in a?V("div",{className:"sf-theme-module-break","aria-hidden":"true"},"module-break"):"button"in a?V(_T,{value:e.button,accent:r.accent,onChange:n=>o({...e,button:n}),idPrefix:t},"button"):"buttonInk"in a?V(NT,{colors:e,accent:r.accent,onChange:n=>o({...e,buttonInk:n}),idPrefix:t},"buttonInk"):V(DT,{label:a.label,colorKey:a.key,value:r[a.key],onChange:(n,s)=>o({...e,[n]:s}),idPrefix:t},a.key))})}function In({index:e,colors:o,selected:t,role:r="radio",open:a,editable:n=!0,onPick:s,onEdit:i,onChangeColors:f}){let d=ho(o),p=Wr(e),m=e<Os.length&&!o.brandInk?Os[e]:null,x=qt(Uo(d.text,d.background)??0),I=m?JSON.stringify(o)!==JSON.stringify(m):!1,b=a!==void 0;return Ko("div",{className:`sf-theme-card${t?" is-selected":""}`,children:[V("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:V(tm,{colors:o})}),Ko("div",{className:"sf-theme-foot",children:[V("span",{className:"sf-theme-name",children:p}),x!=="good"&&V("span",{className:"sf-theme-warn",children:l($t[x])}),n&&i&&b&&V("span",{className:"sf-theme-edit",children:V(PT,{content:a?l("Collapse"):l("Edit colors"),children:V(TT,{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?V(OT,{size:14}):V(ET,{size:14})})})}),n&&i&&!b&&V(gi,{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:[V(bi,{colors:o,onChange:w=>f?.(w)}),m&&V(gi,{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 rm({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:[V("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?V(tm,{colors:e}):V("span",{className:"sf-secttheme-nopreview","aria-hidden":"true"})}),Ko("div",{className:"sf-theme-foot",children:[V("span",{id:t,className:"sf-theme-name",children:o}),d&&V(gi,{variant:"secondary",size:"sm",className:"sf-theme-edit","aria-label":l("Edit {name}",{name:o}),onClick:d,children:l("Edit")}),V("button",{type:"button",className:"sf-secttheme-caret","aria-hidden":"true",tabIndex:-1,onClick:i,children:V("span",{className:"sf-multi-caret",children:"\u25BE"})})]})]})}import{useCallback as Ti,useEffect as im,useRef as bn}from"react";import{currentEaselSession as zT}from"efficient-easel/screen/lib/session";import{useEaselSession as GT}from"efficient-easel/screen/lib/session-context";import{useSyncExternalStore as HT}from"react";var nm,Si=null,bt=null,hn=0,Ci=new Set;function wi(e){nm=e;for(let o of Ci)o()}function vi(e){Si=e,hn+=1,bt&&clearTimeout(bt),bt=null,wi(void 0)}function lm(e){hn+=1,wi(e)}function gn(e=250){Si&&(bt&&clearTimeout(bt),bt=setTimeout(()=>{bt=null;let o=Si;if(!o)return;let t=++hn;o().then(r=>{t===hn&&wi(r)}).catch(()=>{})},e))}function am(){return nm}function WT(e){return Ci.add(e),()=>{Ci.delete(e)}}function yn(){return HT(WT,am,am)}var ki=new Set;function sm(e){return ki.add(e),()=>{ki.delete(e)}}async function mW(){let e=(await Promise.allSettled([...ki].map(async o=>o()))).find(o=>o.status==="rejected");if(e)throw e.reason}import{WebsiteBackendError as UT}from"efficient-easel/screen/lib/backend-error";function fm(e=zT()){return(o,t,r)=>{let a=Ce(e).theme;return a?a.update(o,r?{siteId:r}:void 0):Promise.reject(new UT("invalid","This backend stores no site theme."))}}function cm(e){return e.themeFromDocument?{status:"skipped",reason:"template"}:e.token?null:{status:"skipped",reason:"no-token"}}async function $T(e,o=fm()){let{themeFromDocument:t,token:r,siteId:a,patch:n}=e,s=cm({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 Yt({themeFromDocument:e,tokenRef:o,siteId:t,onResult:r}){let a=bn(null),n=bn({}),s=GT(),i=bn(r);i.current=r;let f=bn(null),d=Ti(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=Ti(async()=>{a.current&&(clearTimeout(a.current),a.current=null);let x=n.current;n.current={};let I=await $T({themeFromDocument:e,token:o?.current,siteId:t,patch:x},fm(s));return d(I),I.status==="saved"&&gn(),I.status==="failed"&&(n.current={...x,...n.current}),I},[e,o,t,d,s]),m=Ti((x,I=!1)=>{let b=cm({themeFromDocument:e,token:o?.current});if(b){d(b);return}n.current={...n.current,...x},a.current&&clearTimeout(a.current),I?p():a.current=setTimeout(()=>{p()},500)},[e,o,p,d]);return im(()=>()=>{p()},[p]),im(()=>sm(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 QT="Follow the page",DW="Follow the slideshow",JT=e=>l("Editing {name} changes it everywhere.",{name:e});function e0({colors:e}){if(!e)return ye("span",{className:"sf-secttheme-chip sf-secttheme-chip--none","aria-hidden":"true"});let o=ho(e);return St("span",{className:"sf-secttheme-chip","aria-hidden":"true",children:[ye("i",{style:{background:o.background}}),ye("i",{className:"sf-secttheme-chip-accent",style:{background:o.accent}})]})}function o0({themes:e,value:o,onPick:t,onEdit:r,menuId:a,followLabel:n}){return St("div",{className:"sf-multi-menu sf-secttheme-menu",id:a,role:"listbox",children:[n!==void 0&&St(qT,{children:[St("button",{type:"button",role:"option","aria-selected":o===null,className:`sf-secttheme-item${o===null?" is-active":""}`,onClick:()=>t(ln),children:[ye(e0,{}),ye("span",{className:"sf-secttheme-name",children:l(n)})]}),ye("div",{className:"sf-secttheme-sep",role:"presentation"})]}),o!==null&&e[o]&&ye("p",{className:"sf-secttheme-oncard",role:"presentation",children:l("{name} is on this section",{name:Wr(o)})}),e.map((s,i)=>i===o?null:ye(In,{role:"option",index:i,colors:s,selected:!1,onPick:()=>t(i),onEdit:()=>r(i)},i))]})}function t0({index:e,colors:o,onChange:t,onDone:r}){let a=Wr(e),n=pm();return St("div",{className:"sf-secttheme-sheet",children:[St("div",{className:"sf-secttheme-sheet-head",children:[ye("span",{children:a}),ye("button",{type:"button",className:"sf-secttheme-done",onClick:r,children:l("Done")})]}),ye("div",{className:"sf-secttheme-rows",children:ye(bi,{colors:o,onChange:t,idPrefix:n})}),ye("p",{className:"sf-secttheme-warn",children:JT(a)})]})}function mm({value:e,onChange:o,followLabel:t,hint:r}){let{theme:a,setTheme:n}=K(),s=We(a),i=KT(ZT),f=i?.tokenRef,d=i?.siteId??null,p=!i?.capabilities?.hasSiteTheme,{persist:m,flush:x}=Yt({themeFromDocument:p,tokenRef:f,siteId:d}),I=We(s),b=I.themes,w=oi(e),k=w!==null?b[w]:void 0,T=k??(b.length?Ut(I):void 0),[C,y]=um(!1),[h,E]=um(null),F=dm(null),R=dm(null),P=pm(),D=jT(()=>{y(!1),E(null)},[]);VT(()=>{if(!C&&h===null)return;let L=_=>{F.current&&!F.current.contains(_.target)&&(x(),D())};return document.addEventListener("mousedown",L),()=>document.removeEventListener("mousedown",L)},[C,h,D,x]);let M=L=>{o(L),D()},v=L=>{if(h===null)return;let _=b.map(($,J)=>J===h?L:$),B={...I,themes:_};n(B),m({selected_preset:B.selected,theme_presets:B.themes})};return St("div",{className:"sf-secttheme",ref:F,children:[ye(XT,{label:l("Theme"),icon:ye(YT,{}),labelId:`${P}-label`,hint:r,children:ye(rm,{colors:T,onEdit:w!==null?()=>{E(w),y(!1)}:void 0,name:k?Wr(w):l(t??QT),nameId:`${P}-value`,labelId:`${P}-label`,open:C,menuId:P,buttonRef:R,onClick:()=>{E(null),y(L=>!L)},onKeyDown:L=>{L.key==="Escape"&&(C||h!==null)&&(L.preventDefault(),D())}})}),C&&h===null&&ye("div",{onKeyDown:L=>{L.key==="Escape"&&(L.preventDefault(),D(),R.current?.focus())},children:ye(o0,{themes:b,value:w,onPick:M,onEdit:L=>{E(L),y(!1)},menuId:P,followLabel:t})}),h!==null&&b[h]&&ye(t0,{index:h,colors:b[h],onChange:v,onDone:()=>{x(),D(),R.current?.focus()}})]})}import{jsx as xm}from"react/jsx-runtime";import{useId as r0}from"react";import{FieldSelect as a0}from"efficient-easel/fields";import{SettingsField as n0}from"efficient-easel/panel";function l0(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 GW({label:e,options:o,fallback:t,value:r,onChange:a,placeholder:n,bare:s=!1,icon:i}){let f=r0(),d=`${f}-label`,p=`${f}-button`,m=r??"",x=o.some(k=>k.value===m)?m:t,I=l(e),b=n===void 0?void 0:l(n),w=xm(a0,{id:p,value:x,options:l0(o),onChange:a,placeholder:b,searchPlaceholder:b,...s?{ariaLabel:I}:{ariaLabelledBy:`${d} ${p}`},searchable:!0,groupCount:!0,inline:!0});return s?w:xm(n0,{label:I,labelId:d,icon:i,children:w})}import{jsx as vt,jsxs as D0}from"react/jsx-runtime";import{SettingsField as Mm}from"efficient-easel/panel";import{LinkIcon as _0}from"efficient-easel/icons";import{LinkPicker as N0,TextLinkField as M0}from"efficient-shell/ui";import{useEffect as Nm,useMemo as vn,useRef as H0,useState as wn}from"react";import{currentEaselSession as s0}from"efficient-easel/screen/lib/session";function Im(){return s0().auth.token}import{currentEaselSession as W0}from"efficient-easel/screen/lib/session";import{useScreenDocument as z0}from"efficient-easel/screen/components/ScreenDocumentContext";var i0=()=>({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 hm(e,o,t){if(!e)return"page";if(ip(e))return"popup";if(e.startsWith("/journal/"))return"blog";if(dp(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 Pi(e,o){let t=i0(),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:cp(...p.docs).map(m=>({value:nn(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:fp(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:sp(m.slug),label:m.title||m.slug})),placeholder:t.choosePopup};case"custom":return{type:"text"}}},f=lp(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=>hm(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=>hm(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 G0}from"efficient-easel/screen/lib/session-context";var ne=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0;function ve(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 gm(e,o){return ne(e)??o}function Ct(e,o){return typeof e=="boolean"?e:o}function Sn(e,o){if(!Array.isArray(e))return o;let t=e.map(r=>typeof r=="string"?r:ve(r?.text,"")).map(r=>r.trim()).filter(Boolean);return t.length?t:o}var ym="cart-drawer",JW="cart-drawer",f0={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 ez(e,o){return o===0?e.subtitleEmpty:o===1?e.subtitleOne:e.subtitleMany.replace("{count}",String(o))}function oz(e){let o=e??{},t=f0;return{kickerBadge:ve(o.kickerBadge,t.kickerBadge),kickerText:ve(o.kickerText,t.kickerText),titleLead:ve(o.titleLead,t.titleLead),titleAccent:ve(o.titleAccent,t.titleAccent),subtitleEmpty:ve(o.subtitleEmpty,t.subtitleEmpty),subtitleOne:ve(o.subtitleOne,t.subtitleOne),subtitleMany:ve(o.subtitleMany,t.subtitleMany),leadTimeValue:ve(o.leadTimeValue,t.leadTimeValue),shipsToFallback:ve(o.shipsToFallback,t.shipsToFallback),promises:Sn(o.promises,t.promises),emptyKicker:ve(o.emptyKicker,t.emptyKicker),emptyBody:ve(o.emptyBody,t.emptyBody)}}var Sm="consent-banner",az="consent-banner";var c0=[{value:"bar",label:"Bar"},{value:"card",label:"Card"}],nz="Layout",bm={layout:"bar"},d0=e=>c0.some(o=>o.value===e);function lz(e){let o=ve((e??{}).layout,bm.layout);return{layout:d0(o)?o:bm.layout}}var u0=["meta","eyebrow","heading","body","statName","statValue","formEyebrow","formHeading","formIntro","fieldLabel","option","finePrint","dismiss","doneHeading","doneBody"],fz={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"},p0={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"},cz={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 m0(e){return typeof e=="string"&&Ao.includes(e)?e:null}function Cm(e){let o={};for(let t of u0){let r=m0(e[p0[t]]);r&&(o[t]=r)}return o}var vm=["delay","scroll","exit"],km=["all","chosen","except"],Tm=["visit","days","never","once"],x0=["all","desktop","phone"],I0=["stop","continue"],Pm={min:0,max:60},Fm={min:10,max:90},Em={min:1,max:90},Je={autoOpen:!1,trigger:"delay",autoOpenDelaySec:15,scrollPercent:50,showOn:"all",showOnPages:[],devices:"all",hideAfter:"days",hideDays:7,afterSubmit:"stop",startDate:null,endDate:null};function Qe(e,o,t){return typeof o=="string"&&e.includes(o)?o:t}function Xt(e,o,t){let r=gm(e,t);return Math.min(o.max,Math.max(o.min,Math.round(r)))}function h0(e){return typeof e.hideAfter=="string"?Qe(Tm,e.hideAfter,Je.hideAfter):e.oncePerSession===!0?"visit":e.oncePerSession===!1?"never":Je.hideAfter}function g0(e){return Array.isArray(e)?e.map(o=>typeof o=="string"?o.trim():"").filter(Boolean).map(o=>o.startsWith("/")?o:`/${o}`):[]}function wm(e){if(typeof e!="string")return null;let o=e.trim();return/^\d{4}-\d{2}-\d{2}$/.test(o)?o:null}function Om(e){let o=e??{},t=Je;return{autoOpen:Ct(o.autoOpen,t.autoOpen),trigger:Qe(vm,o.trigger,t.trigger),autoOpenDelaySec:Xt(o.autoOpenDelaySec,Pm,t.autoOpenDelaySec),scrollPercent:Xt(o.scrollPercent,Fm,t.scrollPercent),showOn:Qe(km,o.showOn,t.showOn),showOnPages:g0(o.showOnPages),devices:Qe(x0,o.devices,t.devices),hideAfter:h0(o),hideDays:Xt(o.hideDays,Em,t.hideDays),afterSubmit:Qe(I0,o.afterSubmit,t.afterSubmit),startDate:wm(o.startDate),endDate:wm(o.endDate)}}var Lm={heading:"Join our email list",placeholder:"Email address",buttonLabel:"Subscribe"},Zt="site-footer";var mz=Zt,xz={desktop:!0,tablet:!0,mobile:!0},Iz={desktop:!1,tablet:!1,mobile:!1},Fi=1,Rm=6,hz=Array.from({length:Rm-Fi+1},(e,o)=>Fi+o),Cn={desktop:6,tablet:3,mobile:2},y0={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}},wt=e=>Math.min(Math.max(Math.round(e),Fi),Rm);function gz(e){if(typeof e=="number")return y0[wt(e)]??{desktop:wt(e),tablet:wt(e),mobile:wt(e)};if(e&&typeof e=="object"){let o=e;return{desktop:wt(o.desktop??Cn.desktop),tablet:wt(o.tablet??Cn.tablet),mobile:wt(o.mobile??Cn.mobile)}}return{...Cn}}var Ei="subscribe-popup",Tz="subscribe-popup",b0=[Ei,Zt,ym,Sm];function Bm(e){return b0.includes(e)}var S0=["right","left"],C0={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:Je.autoOpen,autoOpenDelaySec:Je.autoOpenDelaySec,formSlug:"",trigger:Je.trigger,scrollPercent:Je.scrollPercent,showOn:Je.showOn,showOnPages:[],hideAfter:Je.hideAfter,hideDays:Je.hideDays,formSide:"right",valuePanelOnPhone:!1,sectionAccent:void 0,sectionCorners:void 0,sectionCornerSides:void 0,textStyles:{}},pe=ve,w0=Ct,Dm=Sn;function Am(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 v0(e,o){return Array.isArray(e)?Dm(e,[]):o}function k0(e,o){return Array.isArray(e)?e.map(t=>{let r=t??{};return{label:pe(r.label,""),value:pe(r.value,"")}}).filter(t=>t.label||t.value):o}function Fz(e){let o=e??{},t=C0,r=Om(o);return{metaLabel:pe(o.metaLabel,t.metaLabel),issueLabel:Am(o.issueLabel,t.issueLabel),issueNumber:Am(o.issueNumber,t.issueNumber),kicker:pe(o.kicker,t.kicker),heading:pe(o.heading,t.heading),deck:pe(o.deck,t.deck),stats:k0(o.stats,t.stats),formLabel:pe(o.formLabel,t.formLabel),formHeading:pe(o.formHeading,t.formHeading),formIntro:pe(o.formIntro,t.formIntro),firstNameLabel:pe(o.firstNameLabel,t.firstNameLabel),firstNamePlaceholder:pe(o.firstNamePlaceholder,t.firstNamePlaceholder),emailLabel:pe(o.emailLabel,t.emailLabel),emailPlaceholder:pe(o.emailPlaceholder,t.emailPlaceholder),interestsLabel:pe(o.interestsLabel,t.interestsLabel),interests:Dm(o.interests,t.interests),frequencyLabel:pe(o.frequencyLabel,t.frequencyLabel),frequencies:v0(o.frequencies,t.frequencies),submitText:pe(o.submitText,t.submitText),finePrint:pe(o.finePrint,t.finePrint),dismissText:pe(o.dismissText,t.dismissText),emailInvalidText:pe(o.emailInvalidText,t.emailInvalidText),submitErrorText:pe(o.submitErrorText,t.submitErrorText),successHeading:pe(o.successHeading,t.successHeading),successBody:pe(o.successBody,t.successBody),keepBrowsingText:pe(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:Qe(S0,o.formSide,t.formSide),valuePanelOnPhone:w0(o.valuePanelOnPhone,t.valuePanelOnPhone),sectionAccent:o.sectionAccent,sectionCorners:o.sectionCorners,sectionCornerSides:o.sectionCornerSides,textStyles:Cm(o)}}var Oi="popup",T0=$o,P0=["auto","full"],F0=["inside","outside","none"],E0={min:240,max:1440},O0={min:0,max:100},L0={placement:"center",fullWidth:!1,width:720,height:"auto",tintColor:"#000000",tintOpacity:60,outsideClick:!0,closeButton:"inside"};function R0(e,o){return typeof e=="string"&&/^#[0-9a-fA-F]{6}$/.test(e.trim())?e.trim():o}function Az(e){let o=e??{},t=L0;return{placement:Qe(T0,o.placement,t.placement),fullWidth:Ct(o.fullWidth,t.fullWidth),width:Xt(o.width,E0,t.width),height:Qe(P0,o.height,t.height),tintColor:R0(o.tintColor,t.tintColor),tintOpacity:Xt(o.tintOpacity,O0,t.tintOpacity),outsideClick:Ct(o.outsideClick,t.outsideClick),closeButton:Qe(F0,o.closeButton,t.closeButton)}}function A0(e,o=Math.random){for(;;){let t=`popup-${Math.floor(o()*2176782336).toString(36).padStart(6,"0")}`;if(!e.has(t))return t}}function B0(e){return{root:{props:{title:e,kind:Oi}},content:[],zones:{}}}function _m(e,o,t){return{slug:A0(o,t),title:e,kind:"lightbox",layout:B0(e)}}function Li(e){return e?.root?.props?.kind===Oi}function Hm(e){let o=new Map;return(t="")=>{let r=Im(),a=o.get(t);if(!a||a.token===null&&r!==null){let n=r||!W0().usesBridgedToken?e(r??"",t).catch(()=>[]):Promise.resolve([]);return o.set(t,{promise:n,token:r}),n}return a.promise}}var U0=Hm(async(e,o)=>{let t=o?{siteId:o}:void 0,{pages:r}=Ce();return r.linkTargets?r.linkTargets(t):(await r.list(t)).map(a=>({id:a.id,slug:a.slug,label:a.label,layout:null}))}),$0=Hm(async(e,o)=>await Ce().blog?.posts(o?{siteId:o}:void 0)??[]);function q0({value:e,onChange:o,label:t="Link",data:r,filters:a}){let n=vn(()=>Pi(r,a),[r,a]),s=l(t);return vt(Mm,{label:s,icon:vt(_0,{}),children:vt(N0,{value:e,onChange:i=>o(i),kinds:n.kinds,rules:n.rules,filtersFor:n.filtersFor,label:s})})}function Wm(){let{siteId:e,capabilities:o}=z0(),{offersCommerce:t,hasBlog:r}=o,[a,n]=wn([]),[s,i]=wn([]),[f,d]=wn([]),[p,m]=wn(null),x=G0().chrome,I=x?.products?.list,b=x?.linkFilters,w=b?void 0:x?.linkRow,k=H0(!0);Nm(()=>(k.current=!0,()=>{k.current=!1}),[]),Nm(()=>{let y=!0;return U0(e??void 0).then(h=>y&&k.current&&n(h)),r&&$0(e??void 0).then(h=>y&&k.current&&i(h)),t&&I?.().then(h=>y&&k.current&&d(h)),t&&b?b.load(e).catch(()=>null).then(h=>y&&k.current&&m(()=>h)):m(null),()=>{y=!1}},[e,t,r,I,b]);let T=vn(()=>({pages:a.filter(y=>!Bm(y.slug)&&!Li(y.layout)).map(y=>({slug:y.slug,title:y.label,docs:[y.layout]})),popups:a.filter(y=>y.slug===Ei||Li(y.layout)).map(y=>({slug:y.slug,title:y.label})),posts:r?s.map(y=>({slug:y.slug,title:y.title})):[],products:t?f.map(y=>({href:y.href,name:y.name})):[],offers:{offersCommerce:t,offersService:r}}),[a,s,f,t,r]),C=vn(()=>p?p(T.pages):null,[p,T]);return{data:T,filters:C,pages:a,offersCommerce:t,HostLinkRow:w}}function Qz({label:e,icon:o,text:t,onTextChange:r,link:a,onLinkChange:n}){let{data:s,filters:i}=Wm(),f=vn(()=>Pi(s,i),[s,i]),d=l(e);return vt(Mm,{label:d,icon:o,children:vt(M0,{label:d,text:t,onTextChange:r,link:a,onLinkChange:p=>n(p),kinds:f.kinds,rules:f.rules,filtersFor:f.filtersFor})})}function zm({value:e,onChange:o,label:t="Link"}){let r=typeof e=="string"?e:"",{data:a,filters:n,pages:s,offersCommerce:i,HostLinkRow:f}=Wm(),d=a.pages.map(m=>Dr(m.slug)),p=i&&f&&(r==="/"||d.includes(r))?f:void 0;return D0("div",{children:[vt(q0,{value:r,onChange:o,label:t,data:a,filters:n}),p&&vt(p,{value:r,onChange:o,pages:s})]})}import{UiIcon as qx}from"efficient-easel/draw/client";var eo={min:10,max:200,step:10};function Gm(e,o){let t=ne(e),r=ne(o);if(!(t===void 0&&r===void 0))return{paddingTop:t,paddingBottom:r}}var j0="sf-pad-top-phone",K0="sf-pad-bottom-phone",V0="--sf-pad-t-phone",Y0="--sf-pad-b-phone",X0="sf-pad-left-phone",Z0="sf-pad-right-phone",Q0="--sf-pad-l-phone",J0="--sf-pad-r-phone";function $m(e,o,t,r,a,n,s,i){let f=Gm(e,o)??{},d={},p=["sf-section-pad"];typeof t=="number"&&(p.push(j0),d[V0]=`${t}px`),typeof r=="number"&&(p.push(K0),d[Y0]=`${r}px`);let m={};return typeof a=="number"&&(m.paddingLeft=a),typeof n=="number"&&(m.paddingRight=n),typeof s=="number"&&(p.push(X0),d[Q0]=`${s}px`),typeof i=="number"&&(p.push(Z0),d[J0]=`${i}px`),p.length===1&&Gm(e,o)===void 0&&!Object.keys(m).length?null:{className:p.join(" "),style:{...f,...m,...d}}}function Um(e,o,t){let r=ne(e)??t,a=ne(o);return r===void 0?a:a===void 0?r:r+a}function oG(e,o={}){return{top:Um(e.padTop,e.sectionPaddingTop,o.top),bottom:Um(e.padBottom,e.sectionPaddingBottom,o.bottom)}}function tG(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 rG(e){return $m(e.top,e.bottom,e.topPhone,e.bottomPhone,e.left,e.right,e.leftPhone,e.rightPhone)}function aG(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 eP=["auto","fixed","screen"],oP=["px","%"];var tP="var(--sf-header-h, 88px)",Ri={min:40,max:2e3,step:10,fallback:600},Ai={min:10,max:200,step:5,fallback:100},rP="sf-section-minh",qm={base:"--sf-section-minh",small:"--sf-section-minh-s"},Km=e=>typeof e=="string"&&eP.includes(e),aP=e=>typeof e=="string"&&oP.includes(e);function kn(e){let o=Km(e.sectionHeightMode)?e.sectionHeightMode:"auto",t=o==="screen"?"%":aP(e.sectionHeightUnit)?e.sectionHeightUnit:"px",r=o==="screen"?Ai.fallback:Ri.fallback,a=typeof e.sectionHeightValue=="number"?e.sectionHeightValue:r;return{mode:o,value:a,unit:t}}function Vm(e){let{mode:o,value:t,unit:r}=kn(e);if(o==="auto")return;if(o==="fixed"&&r==="px")return[`${t}px`,null];let a=t/100,n=s=>o==="screen"?`(100${s} - ${tP})`:`100${s}`;return[`calc(${n("vh")} * ${a})`,`calc(${n("svh")} * ${a})`]}function nP(e){let o=Vm(e);if(!o)return;let[t,r]=o;return{display:"grid",[qm.base]:t,...r?{[qm.small]:r}:{}}}var lG=new Set(["Hero","HeroSingle","IntroBleed","CategoryBar","DocTabs"]),Qt="Height",lP="sf-section-minh-phone",jm={base:"--sf-section-minh-p",small:"--sf-section-minh-ps"};function Bi(e){return Km(e.sectionHeightModePhone)}function sG(e){return kn({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone})}function sP(e){let o=nP(e),t=Bi(e)?Vm({sectionHeightMode:e.sectionHeightModePhone,sectionHeightValue:e.sectionHeightValuePhone,sectionHeightUnit:e.sectionHeightUnitPhone}):void 0;if(!o&&!t)return null;let r=[rP],a={...o??{}};return t&&(r.push(lP),a[jm.base]=t[0],t[1]&&(a[jm.small]=t[1])),{className:r.join(" "),style:a}}function iG(e){return sP(e)!==null}var Tn="Stick to top",Vo={min:0,max:200,step:4,fallback:0},iP="sf-section-stick",fP="sf-section-stick-phone-on",cP="sf-section-stick-phone-off",Ym={desktop:"--sf-stick-distance",phone:"--sf-stick-distance-phone"},dG=new Set(["CategoryBar","DocTabs","IntroBleed"]);function Xm(e){let o=ne(e)??Vo.fallback;return Math.min(Vo.max,Math.max(Vo.min,Math.round(o)))}function Di(e){return typeof e.stickTopPhone=="boolean"}function _i(e){let o=e.stickTop===!0,t=Xm(e.stickTopDistance),r=Di(e),a=r?e.stickTopPhone===!0:o,n=r?Xm(e.stickTopDistancePhone):t;return{desktop:o,desktopDistance:t,phone:a,phoneDistance:n,ownPhone:r}}function uG(e){let o=_i(e);if(!o.desktop&&!o.phone)return null;let t=[iP],r={};return o.desktop&&(r[Ym.desktop]=`${o.desktopDistance}px`),(o.ownPhone||o.phone!==o.desktop)&&(t.push(o.phone?fP:cP),o.phone&&(r[Ym.phone]=`${o.phoneDistance}px`)),o.desktop||t.push("sf-section-stick-desktop-off"),{className:t.join(" "),style:r}}var dP=["column","row","tabs"],Zm="Direction",uP={column:"Stacked",row:"One row",tabs:"Tabs"},Qm={Flex:dP,HeroGroup:["column","row"]},pP={Flex:"row",HeroGroup:"column"},mP={column:"flex-col",row:"flex-row",tabs:"flex-col"};function Pn(e,o){return Qm[e].includes(o)?o:pP[e]}function mG(e,o){return mP[Pn(e,o)]}function Jm(e){return Qm[e].map(o=>({label:uP[o],value:o}))}var Ni=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"Space between",value:"between"},{label:"End",value:"end"}],tx=[{label:"Start",value:"start"},{label:"Center",value:"center"},{label:"End",value:"end"},{label:"Stretch",value:"stretch"}],Mi={sectionPaddingTop:0,sectionPaddingBottom:0},rx="Wrap",Hi=[{label:"Wrap",value:"wrap"},{label:"No wrap",value:"nowrap"}],ex={start:"justify-start",center:"justify-center",between:"justify-between",end:"justify-end"},ox={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"};function IG(e,o){let t=typeof e=="string"&&e in ex?ex[e]:"",r=typeof o=="string"&&o in ox?ox[o]:"";return[t,r].filter(Boolean).join(" ")}function hG(e){return e===!0||e==="wrap"?"flex-wrap":""}var Wi="Block widths",Fn=[{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",xP={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 gG(e){return typeof e=="string"?xP[e]??"":""}var ax="Columns",zi=1,nx=3,IP={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 yG(e){let o=Number(e);return IP[o]??"max-[800px]:flex-col"}var lx="Block spacing",Gi=[{label:"Each block",value:"each"},{label:"Gap only",value:"gap"}],hP="sf-box-gap-only";function bG(e){return e==="gap"?hP:""}var gP=["solid","dashed","dotted"],yP=["top","right","bottom","left"],CG="sf-section-border",wG="sf-section-border-self",bP=/^#(?:[0-9a-f]{3}|[0-9a-f]{4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,sx=e=>typeof e=="number"&&Number.isFinite(e)?`${Math.min(20,Math.max(0,Math.round(e)))}px`:void 0;function ix(e,{phone:o=!1}={}){if(!e||typeof e!="object")return;let t=o?"-phone":"",r={};for(let a of yP){let n=sx(e[a])??sx(e.width);n!==void 0&&(r[`--sf-border-${a}-width${t}`]=n)}return typeof e.style=="string"&&gP.includes(e.style)&&(r[`--sf-border-style${t}`]=e.style),typeof e.color=="string"&&bP.test(e.color)&&(r[`--sf-border-color${t}`]=e.color.toLowerCase()),Object.keys(r).length?r:void 0}function vG(e,o){let t=ix(e),r=ix(o,{phone:!0});return t||r?{...t,...r}:void 0}var dx="sf.gapContainer",Yo={min:-32,max:64,step:2},ux={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},Jt={Grid:24,Flex:24,FooterGroup:16,HeroGroup:0,Events:24,GalleryB:8,ProductGrid:2},SP=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=ux[e]?.[o];if(typeof r=="number")return r}return typeof t=="number"&&Number.isFinite(t)?t:Jt[e]}var CP="sf-gap-overlap",wP="--sf-gap-overlap",px="--sf-block-gap",vP="--sf-block-gap-rem",kt={min:0,max:Yo.max,step:Yo.step};function kP(e){if(typeof e!="number"||!Number.isFinite(e))return null;let o=Math.min(Math.max(Math.round(e),kt.min),kt.max);return o-o%kt.step}function TG(e){let o=kP(e);return o===null?{}:{[px]:`${o}px`,[vP]:`${o/16}rem`}}var fx="sf-gap-zone",cx="--sf-gap-len";function Ui(e,o){return typeof o=="number"&&Number.isFinite(o)&&o>=Yo.min?!0:typeof o=="string"&&typeof ux[e]?.[o]=="number"}var TP={block:"sf-gap-overlap-block",inline:"sf-gap-overlap-inline",both:"sf-gap-overlap-both"};function PG(e,o,t){if(!Ui(e,o)){let a=`${Jt[e]}px`,n=SP.has(e)?`var(--sf-card-gap, ${a})`:a;return{className:` ${fx}`,style:{[cx]:`var(${px}, ${n})`}}}let r=Gr(e,o);return r>=0?{className:` ${fx}`,style:{[cx]:`${r}px`}}:{className:` ${CP} ${TP[t]}`,style:{gap:"0px",[wP]:`${-r/2}px`}}}var mx=["transparent","var(--section-bg)","var(--surface)","var(--surface-2)"],xx={transparent:"No fill","var(--section-bg)":"Section band","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},En="var(--section-bg)",On="inherit";function EG(e,o){return e===On?En:e===void 0?o:Ln(e)}var PP=/var\(\s*--(surface-2|surface|line)\s*(?=[,)])/g;function Ln(e){return e.replace(PP,"var(--site-$1")}function Ix(e,o){return e===On?!0:e===void 0&&o===En}var hx=["transparent","var(--wheel-stage)","var(--surface)","var(--surface-2)"],gx={transparent:"No fill","var(--wheel-stage)":"Image stage","var(--surface)":"Panels and cards","var(--surface-2)":"Second surface"},er="var(--wheel-stage)",Rn="transparent",Ur="inherit";function RG(e,o){return Ln($i(e,o))}function $i(e,o){return e===Ur?er:e==null?o:e===!0?er:e===!1?Rn:e}function AG(e){return typeof e=="string"&&e!==Ur?Ln(e):er}function BG(e){return e!==Rn&&e!=="none"&&e!==""}function yx(e,o){return e===Ur||e===!0?!0:e==null?o===er:!1}var bx="inherit",An="fixed",Sx=e=>typeof e!="number"&&e!==An,FP="var(--sf-heading-max, 9999px)";function _G(e,o,t,r){if(typeof e=="number")return`${e}px`;if(e===An)return o;let a=r?`var(--size-${r}, ${o})`:o;return t==="heading"?`min(${a}, ${FP})`:a}var me={min:1e3,max:2e3,step:50,default:1600};function EP(e){return{maxWidth:e,marginInline:"auto",width:"100%"}}var Cx="--sf-site-width",qi=`var(${Cx},${me.default}px)`,MG=`max-w-[${qi}]`,HG=`max-w-[${me.default}px]`;function OP(e){return typeof e!="number"||!Number.isFinite(e)?me.default:Math.round(Math.min(Math.max(e,me.min),me.max))}function WG(e){let o=OP(e);return o===me.default?{}:{[Cx]:`${o}px`}}var wo={min:0,max:80,step:4,default:40},wx="--sf-site-gutter",oo=`var(${wx},${wo.default}px)`,LP=`px-[${oo}]`;var Xo={md:`min(24px,${oo})`,sm:`min(20px,${oo})`,frame:`min(24px,${oo})`,tabs:`min(16px,${oo})`},zG=[[`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-[${oo}]`,"min-[800px]:px-10"],[`max-[720px]:px-[min(24px,${oo})]`,"max-[720px]:px-6"],[`max-[800px]:-mx-[min(20px,${oo})]`,"max-[800px]:-mx-5"],[`max-[720px]:-mx-[min(20px,${oo})]`,"max-[720px]:-mx-5"],[`-mx-[${oo}]`,"-mx-10"],[LP,"px-10"]];var GG="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))]",UG="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 RP(e){return typeof e!="number"||!Number.isFinite(e)?wo.default:Math.round(Math.min(Math.max(e,wo.min),wo.max))}function $G(e){let o=RP(e);return o===wo.default?{}:{[wx]:`${o}px`}}var vx=qi,qG=`max-w-[${vx}]`,jG=`max-w-[min(var(--sf-page-cap,${me.default}px),${me.default}px)]`,kx="--sf-hero-cap",AP=`var(${kx},none)`,KG=`max-w-[${AP}]`,BP="--sf-hero-bleed-m",DP="--sf-hero-bleed-w",_P="--sf-hero-chrome-x",NP="--sf-hero-chrome-cap";function VG(e){return e===!0?{[kx]:vx,[BP]:"auto",[DP]:"100%",[_P]:"24px",[NP]:"none"}:{}}var ji=`calc(${qi} - ${oo}*2)`,YG=`max-w-[${ji.replace(/ /g,"_")}]`;var MP="--sf-chrome-cap",HP=`var(${MP},${ji})`,XG="data-page-width";function ZG(e){return e==="full"?"full":null}function QG(e){return e==="full"?null:EP(e==="content"?ji:HP)}function JG(e){if(e==="full")return"full";if(e==="content")return"content"}var WP=["contained","page","full"],Px=["full","page"],or={full:"Full width",page:"Content width"},Vi="inherit",zP=e=>typeof e=="string"&&WP.includes(e),Fx=e=>e===Vi;function _o(e,o){let t=typeof e.pageWidth=="number"?e.pageWidth:me.default;return Fx(e.widthMode)?{mode:"full",pageWidth:t,inherited:!0}:e.widthMode==="contained"?{mode:"page",pageWidth:t,inherited:!1}:zP(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 Yi(e){return _o(e,"page").mode==="full"}var $r="site",Ex={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 GP(e){return Object.prototype.hasOwnProperty.call(Ex,e)}var Ki=e=>e==="full"||e==="content",UP=e=>typeof e=="number"&&Number.isFinite(e)&&e>0,Tx=({widthMode:e,fullWidth:o,pageWidth:t})=>({widthMode:e,fullWidth:o,pageWidth:t});function $P(e,o){let t={background:null,content:null,contentMax:null};switch(e){case"hero":return Fx(o.widthMode)||o.widthMode!=="full"?t:{...t,background:"full"};case"scrollOver":return o.fullWidth===!1?t:{...t,content:"full"};case"background":return _o(o,"full").mode==="full"?t:{...t,background:"content"};case"both":return _o(o,"full").mode==="full"?{...t,content:"full"}:{...t,background:"content"};case"contained":return _o(o,"page").mode==="full"?{...t,content:"full"}:{...t,background:"content"};case"contentColumn":return _o(Tx(o),"page").mode==="full"?{...t,content:"full"}:t;case"contentFull":return _o(Tx(o),"full").mode==="full"?{...t,content:"full"}:t;case"productGrid":{let r=_o(o,"full");return r.mode==="full"?{...t,content:"full"}:{background:"content",content:"content",contentMax:r.pageWidth}}case"capped":return{...t,background:"content"}}}function Xi(e,o){if(!GP(e))return{background:null,content:null,contentMax:null};let t=Ex[e],r=o,a=$P(t,r),n=r.backgroundWidth===$r?null:Ki(r.backgroundWidth)?r.backgroundWidth:a.background;return r.contentWidth===$r?{background:n,content:null,contentMax:null}:Ki(r.contentWidth)?{background:n,content:r.contentWidth,contentMax:r.contentWidth==="content"&&UP(r.contentMax)?r.contentMax:null}:{background:n,content:a.content,contentMax:a.contentMax}}var Ox="siteWidths";function Bn(e){return Ki(e)?e:null}function Lx(e,o){return{[Ox]:{background:Bn(e),content:Bn(o)}}}function tU(e){let o=e.editor?.metadata?.[Ox];return{background:Bn(o?.background),content:Bn(o?.content)}}var Rx="siteCardTheme";function Ax(e){return typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}function Dn(e){let o=Ax(e);return o===null?{}:{[Rx]:o}}function Bx(e){return Ax(e?.[Rx])}import{jsx as qP}from"react/jsx-runtime";import{createContext as jP,useContext as KP}from"react";var VP=2,YP=VP+1,Dx=jP(2);function _x({tier:e,children:o}){return qP(Dx.Provider,{value:e,children:o})}function Nx(e){let o=KP(Dx);return YP+Math.max(0,e-o)}import{withStyleKind as oE}from"efficient-easel/style-clipboard";import{useEaselSession as tE}from"efficient-easel/screen/lib/session-context";var Zi=e=>!!e&&typeof e=="object"&&typeof e.type=="string"&&!!e.props&&typeof e.props=="object";function Qi(e,o){let t=e.components[o]?.label;return typeof t=="string"&&t.trim()?t.trim():o}function XP(e){return e.length>3&&e.endsWith("s")?e.slice(0,-1):e}function Ji(e,o,t,r){e.forEach((a,n)=>{if(Zi(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(Zi)&&Ji(i,a,s,r)}})}function ZP(e){let o=[];Ji(Array.isArray(e.content)?e.content:[],null,"",o);for(let t of Object.values(e.zones??{}))Array.isArray(t)&&Ji(t,null,"",o);return o}function Hx(e,o){return ZP(e).find(t=>String(t.node.props.id)===o)}function Wx(e,o,t){if(!t)return null;let r=Hx(o,t);if(!r)return null;let a=Qi(e,r.node.type),n=r.parent?`${Qi(e,r.parent.type)} \xB7 ${XP(r.slot)} ${r.index+1}`:a;return{blockId:t,type:r.node.type,label:n,path:""}}var zx="sfDescribedAs";function Zo(e,o){return{...e,[zx]:o}}var QP=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 JP(e){if(!e||typeof e!="object")return null;let o=e;if(typeof o.type!="string")return null;let t=o.type==="custom"?o[zx]: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=QP(n));for(let s of["arrayFields","objectFields"]){let i=t?.[s]??o[s];i&&typeof i=="object"&&(r[s]=Gx(i))}return r}function Gx(e){let o={};for(let[t,r]of Object.entries(e??{})){let a=JP(r);a&&(o[t]=a)}return o}function Ux(e){let o={};for(let[t,r]of Object.entries(e.components))r&&(o[t]={label:Qi(e,t),fields:Gx(r.fields)});return o}function eF(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 ef(e,o){return e.findIndex(t=>Zi(t)&&String(t.props.id)===o)}function Mx(e,o,t){let r=o||t;if(!r)return e.length;let a=ef(e,r);if(a<0)throw new Error(`there is no top-level block ${r}`);return o?a+1:a}function $x(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=Hx(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=eF(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(Mx(n,s.after,s.before),0,m);break}case"remove_block":{let d=ef(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=ef(n,s.block_id);d<0&&f(`there is no top-level block ${s.block_id}`);let[p]=n.splice(d,1);n.splice(Mx(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 w$,SCALAR_TEXT_CONTROLS as v$}from"efficient-easel/draw";function et(e){for(let[o,t]of Object.entries(e))t&&typeof t=="object"&&!vo(t)&&oE(t,`section:${o}`);return e}function pI(){return null}function sf(e){if(!e.trim())throw new Error("noGlyph() needs a reason naming the ruling that decided it.");return g(pI,{},e)}function rE(e){return e.type===pI}function ko(e){return rE(e)?void 0:e}function Pt(e,o){return l("{value} from {from}",{value:e,from:o})}function aE(){let{appState:e}=Kr(a=>a),o=e.data.root?.props??{},{mode:t,pageWidth:r}=_o(o,"full");return t==="page"?Pt(`${r}px`,l("the page")):t==="contained"?Pt(l("Contained"),l("the page")):Pt(l("Full"),l("the page"))}function nE(){let{blockGap:e}=K();return e===null?l("this container's own spacing"):Pt(`${e}px`,l("Styles"))}function lE({inherited:e,onReset:o,label:t}){return g(Oe,{words:Z()?.panel,label:l(t),changed:!e,detail:nE(),onReset:o})}function sE({inherited:e,onReset:o,label:t}){return g(Oe,{words:Z()?.panel,label:l(t),changed:!e,detail:aE(),onReset:o})}function Ft({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=rf(null),m=rf(null),x=C=>o(s?{text:C,hidden:d}:C),I=()=>o({text:f,hidden:!d}),b=s&&d,w=tF(),k=a?uE(a)?g("span",{className:"sf-hint-keep sf-hint-while-typing",children:l(a)}):g(ap,{children:l(a)}):void 0,T=d?l("Show {label} on the slide",{label:l(t)}):l("Hide {label} on the slide",{label:l(t)});return g(le,{label:l(t),icon:g(BF,{}),htmlFor:w,className:b?"is-hidden":void 0,hint:k,action:s?g(uI,{content:T,children:g("button",{type:"button",className:"sf-field-eye","aria-pressed":d,"aria-label":T,onClick:I,children:d?g(qx,{name:"eye-off",size:14}):g(qx,{name:"eye",size:14})})}):void 0,children:No("div",{className:"sf-copybox",children:[i&&g(ii,{target:n?m:p,value:f,onChange:x}),n?g("textarea",{id:w,ref:m,value:f,placeholder:r===void 0?void 0:l(r),onChange:C=>x(C.target.value)}):g("input",{id:w,ref:p,type:"text",value:f,placeholder:r===void 0?void 0:l(r),onChange:C=>x(C.target.value)})]})})}function g$(e,o){return{...e,[lF]:o}}function y$(e){let o=e[Mo];if(!o)throw new Error("withOffPage: the field holds no authored text");return{...e,[Mo]:{...o,offPage:!0}}}function Mn(e){return!e||typeof e!="object"?!1:e[Mo]?.offPage===!0}var mI="sfPanelOnly";function b$(e){if(!e[Mo])throw new Error("withPanelOnly: the field holds no authored text");return{...e,[mI]:!0}}function xI(e){return!!e&&typeof e=="object"&&e[mI]===!0}function S$(e){let o=e[Mo];if(!o)throw new Error("withIdentifier: the field holds no authored text");return{...e,[Mo]:{...o,identifier:!0}}}function k$(e,o){if(!e[Mo])throw new Error("inOwnBox: the field holds no authored text");let{[JF]:t,...r}=e;return{...r,[fi]:!0,render:o}}var iE=new Set(eE),af={type:"radio",options:[{value:!0},{value:!1}]},II={text:{type:"object",objectFields:{text:{type:"text"},hidden:af}},textarea:{type:"object",objectFields:{text:{type:"textarea"},hidden:af}},plainText:{type:"text"},copyText:{type:"text"},plainTextarea:{type:"textarea"},textList:{type:"array",arrayFields:{text:{type:"text"}}}},Et=(e,o)=>{let t=Zo({...o,[Mo]:e},{...II[e.control],label:e.label});if(!iE.has(e.control))return t;let r=o.render;return{...Vr(t,"authored-copy"),render:a=>g(Up,{name:a.name,children:r(a)})}},T$="Everything else on this block comes from the linked post. Unlink it to edit by hand.",fE={field:"source.slug",set:!0},P$={not:fE},cE="Select a word, then press the highlighter.",dE=new Set([cE]),uE=e=>dE.has(e);function F$(e,o,t){return Et({control:"text",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>g(Ft,{value:r,onChange:a,label:e,placeholder:o,hint:t})})}function E$(e,o,t){return Et({control:"textarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>g(Ft,{value:r,onChange:a,label:e,placeholder:o,hint:t,multiline:!0})})}function O$(e,o,t){return Et({control:"plainText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>g(Ft,{value:r,onChange:a,label:e,placeholder:o,hint:t,hideable:!1,markup:!1})})}function L$(e,o,t){return Et({control:"copyText",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>g(Ft,{value:r,onChange:a,label:e,placeholder:o,hint:t,hideable:!1})})}function R$(e){return{type:"custom",[aF]:{label:e},...Zo({},{type:"text",label:e}),render:({value:o,onChange:t})=>g(zm,{value:rF(o),onChange:t,label:e})}}function A$(e,o,t){return Et({control:"plainTextarea",label:e,placeholder:o,hint:t},{type:"custom",render:({value:r,onChange:a})=>g(Ft,{value:r,onChange:a,label:e,placeholder:o,hint:t,multiline:!0,hideable:!1})})}var hI={Design:sF,Animation:Jx};function gI(e,o){return e.includes("Design")?o!=="Design":null}function yI(e,o){return{type:"custom",[lf]:{label:e,level:o},marker:!0,fold:e,render:()=>g(to,{})}}function ke(e){return yI(e,2)}function B$(e){return{type:"custom",render:()=>g(pE,{text:e})}}function pE({text:e}){return g("p",{className:"sf-note",children:l(e)})}function D$(e){return yI(e,1)}function _$(e){return vo(e)!==null&&e?.tabs!==void 0}var jx=new Map;function Hn(e,o){let t=`${e}\0${o?o.join(""):""}`,r=jx.get(t)??{type:"custom",tabs:o,[lf]:{label:e,level:1},bucket:e,marker:!0,render:()=>g(to,{})};return jx.set(t,r),r}var Kx=new Map;function ff(e){let o=Kx.get(e)??{type:"custom",[lf]:{label:e,level:1},designGroup:e,marker:!0,...e==="Content"?{}:{fold:e},render:()=>g(to,{})};return Kx.set(e,o),o}function mE(e){let o=e;return o?.marker===!0&&typeof o.fold=="string"?o.fold:null}function bI(e,o){return mE(e)===o?e:{...e,marker:!0,fold:o,render:()=>g(to,{})}}function SI(e){let o=e;if(o.marker===!0&&o.fold===void 0)return e;let{fold:t,...r}=e;return{...r,marker:!0,render:()=>g(to,{})}}function cf({title:e,children:o}){let[t,r]=jr(()=>!tf.has(e));return g(NF,{title:e,open:t,onToggle:a=>{r(a),a?tf.delete(e):tf.add(e)},children:o})}var tf=new Set;function N$({label:e}){return g(MF,{title:l(e),level:Nx(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 No("div",{className:"sf-swatches",children:[e.map(i=>{let f=r?.[i]?l(r[i]):i;return g(uI,{content:f,children:g("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)}),g("span",{className:"sf-swatch-hex",children:s})]})}function M$(e,o){return{type:"custom",render:({value:t,onChange:r})=>{let a=Ix(t,o);return g(le,{label:l(e),icon:g(dF,{}),changed:!a,action:g(Oe,{words:Z()?.panel,label:l(e),changed:!a,detail:l("the theme's section background"),onReset:()=>r(On)}),children:CI({swatches:mx,current:a?En:t??o??"",onPick:r,names:xx})})}}}function xE(e,o){return{type:"custom",render:({value:t,onChange:r})=>{let a=t,n=yx(a,o);return g(le,{label:l(e),icon:g(wF,{}),changed:!n,action:g(Oe,{words:Z()?.panel,label:l(e),changed:!n,detail:l("the theme's image stage"),onReset:()=>r(Ur)}),children:CI({swatches:hx,current:n?er:$i(a,o),onPick:r,names:gx})})}}}function Wn(e=t=>t,o){return et({_gSectionTheme:ke(gp),sectionAccent:{type:"custom",render:({value:t,onChange:r})=>g(mm,{value:e(t),onChange:r,followLabel:o})}})}function Be({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 g("div",{className:p?"sf-slider has-notch":"sf-slider",style:p?{"--sf-notch":(i-e)/(o-e)}:void 0,children:g(QF,{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 rr(e,o,t,r,a,n,s="",i){return{type:"custom",...Zo({},{type:"number",label:e}),render:f=>g(le,{label:l(e),icon:ko(o),action:i?i("storedValue"in f?f.storedValue:f.value,f.onChange):void 0,children:Be({min:t,max:r,step:a,value:typeof f.value=="number"?f.value:n,suffix:s,ariaLabel:e,onChange:f.onChange})})}}function wI(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 g(le,{label:l(e),icon:d?ko(d):void 0,value:I?f||n===void 0?void 0:l(n):`${x}px`,changed:!I,action:f?Qx(f,{changed:!I,onReset:()=>m(null)}):g(Oe,{words:Z()?.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}):Be({min:t,max:r,step:a,value:x??t,readout:!1,ariaLabel:e,onChange:m})})}}}function H$(e){let o=rr("Gap",g(tI,{}),Yo.min,Yo.max,Yo.step,Jt[e],"px",(t,r)=>g(lE,{inherited:!Ui(e,t),onReset:()=>r(void 0),label:"Gap"}));return{type:"custom",[dx]:e,render:t=>o.render({...t,value:Gr(e,t.value,t.field?.siteGap),storedValue:t.value,onChange:r=>t.onChange(r)})}}var zn="Corners";function df(e){return{type:"custom",render:({value:o,onChange:t})=>{let r=typeof o=="number"&&Number.isFinite(o)?o:null,a=r!==null;return g(le,{label:l(zn),icon:g(xF,{}),changed:a,action:Qx(e.mark,{changed:a,onReset:()=>t(null)}),hint:e.hint,children:g(IE,{tier:e,px:r,onRadius:t})})}}}function Gn(e){let o=null;try{o=nf()}catch{o=null}return[o?.values?.[e],t=>o?.onChange(e,t)]}function IE({tier:e,px:o,onRadius:t}){let r=e.useFollowed(),a=e.useClosedReason?e.useClosedReason():null,[n,s]=Gn(e.sidesKey),i=Bo(n)??[...ut];return g(YF,{label:l(zn),value:i,corners:Hu,onChange:f=>{let d=Bo(f)??[];s(d.length===ut.length?null:d)},radius:o,onRadiusChange:t,radiusMin:$e,radiusMax:ct,radiusStep:e.step??1,radiusPlaceholder:String(r),disabled:a!==null,disabledReason:a??void 0})}function vI(){return Vr({type:"custom",render:()=>g(Nn,{})},"always")}function hE({label:e,changed:o=!1,onReset:t=()=>{}}){let{cornerRadiusPx:r}=K(),a=typeof r=="number"?`${r}px`:l("not set");return g(Oe,{words:Z()?.panel,label:l(e),changed:o,detail:r==null?l("the built-in corners"):Pt(a,l("Styles")),onReset:t})}function gE(){let{cornerRadiusPx:e}=K();return typeof e=="number"?e:$e}function yE(){return df({sidesKey:"sectionCornerSides",useFollowed:gE,useClosedReason:()=>TI()?l(kI):null,mark:g(hE,{label:zn}),hint:g(bE,{})})}var kI="This section runs edge to edge, so its corners sit off the page. Set Width to Content width to use them.";function TI(){return Yi(To())}function bE(){return g(to,{children:TI()?kI:"Follows Styles \u25B8 Basics \u25B8 Corners until you set a number here."})}function Un(){return et({_gShape:ke("Shape"),sectionCorners:yE(),sectionCornerSides:vI(),sectionBorder:Vx("desktop"),sectionBorderPhone:Vx("mobile")})}var SE=()=>({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 CE(e){let o=Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null&&t!==""));return Object.keys(o).length?o:void 0}function wE(){let e;try{let o=We(K().theme);e=o.themes[o.selected]?.line}catch{e=void 0}return e||fu.line}function vE({value:e,onChange:o,tier:t}){let[r]=Gn("sectionBorder"),a=wE(),n=e&&typeof e=="object"?e:{},s=t==="mobile"?r&&typeof r=="object"?r:{}:{},[i,f]=jr(()=>$F(n,s)),d=SE();return g(le,{label:l("Border"),icon:g(uF,{}),action:g(fI,{each:i,label:l("Each side"),onChange:f}),children:g(HF,{label:l("Border"),value:n,each:i,onChange:p=>o(CE(p)),placeholder:{sides:UF(s),style:s.style??"solid",color:s.color||a},presets:[a],words:d,max:20})})}function Vx(e){return we(e,{type:"custom",render:({value:o,onChange:t})=>g(vE,{value:o,onChange:t,tier:e})})}function $n(){return{_gMotion:ke("Motion"),sectionAnimation:mf("Entrance",g(Jx,{}),[...bp],ti)}}function uf(){let e=null;try{let{appState:o,selectedItem:t}=Kr(a=>a),r=t?.props?.id?String(t.props.id):void 0;e=r?ai(o?.data,r):null}catch{e=null}return e!==null&&Yi(e)}function PI(e){let{cornerRadiusPx:o}=K(),t=uf(),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?ai(s?.data,f):null}catch{a=null}if(t||!a)return r;let n=a.sectionCorners;return zs(n)?n:r}function kE({label:e,changed:o=!1,onReset:t=()=>{}}){let r=uf(),a=PI($e),n=r?"Site":"Section";return g(Oe,{words:Z()?.panel,label:l(e),changed:o,detail:Pt(`${a}px`,r?l("Styles"):l("the section")),onReset:t})}function TE(){return g(to,{children:uf()?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 PE(){return df({sidesKey:"cardCornerSides",useFollowed:()=>PI($e),mark:g(kE,{label:zn}),hint:g(TE,{})})}function FE(){return{type:"custom",render:()=>g(ju,{})}}function W$(){return{_gShape:ke("Shape"),cardCorners:PE(),cardCornerSides:vI(),cardCornersApplyAll:FE()}}function z$(){return Qo("Justify",g(cF,{}),Ni,Ni[0].value)}function G$(){return Qo("Item alignment",g(iF,{}),tx,"stretch")}function U$(){return Qo(rx,g(_F,{}),Hi,Hi[0].value)}function $$(){return{type:"custom",render:({value:e,onChange:o})=>{let t=Fn.find(r=>r.value===e)??Fn[0];return g(le,{label:l(Wi),icon:g(eI,{}),value:l(t.label),children:g(dI,{className:"sf-gallery-layouts",label:l(Wi),value:t.value,onChange:o,options:Fn.map(r=>({value:r.value,label:l(r.label),picture:g("span",{className:"sf-gallery-pic",children:EE(r.weights).map((a,n)=>g("i",{style:{gridColumn:`span ${a}`}},n))})}))})})}}}function EE(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 q$(){return Qo(lx,g(tI,{}),Gi,Gi[0].value)}function j$(){return we("mobile",rr(ax,g(oI,{}),zi,nx,1,zi))}function K$(e){let o=mf(Zm,sf("`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)."),Jm(e),Pn(e,void 0));return{type:"custom",render:t=>o.render({...t,value:Pn(e,t.value),onChange:r=>t.onChange(r)})}}function V$(e,o,t,r,a,n){return{type:"custom",render:({value:s,onChange:i})=>g(le,{label:l(e),icon:g(Qs,{noun:n}),action:g(Oe,{words:Z()?.panel,label:l(e),changed:!Sx(s),detail:l("the Text style in Styles"),onReset:()=>i(bx),defaultAction:{onPress:()=>i(An),title:l("Keep this section's own built-in size"),icon:g(pF,{})}}),children:Be({min:o,max:t,step:r,value:typeof s=="number"?s:a,suffix:"px",ariaLabel:e,onChange:i})})}}function Y$(){return{_gCellWidth:ke("Cell width"),gridSpan:Qo("Positions",g(eI,{}),[{label:"Auto",value:""},...Array.from({length:en},(e,o)=>({label:o===0?"1 position":`${o+1} positions`,value:String(o+1)}))],"")}}function To(){let e=null;try{e=Kr(o=>o).selectedItem}catch{e=null}return e?.props??{}}function OE({min:e,max:o,step:t,px:r,label:a,onChange:n,desktopKey:s,fallback:i}){let f=To()[s],d=dn(void 0,f,i);return g(to,{children:Be({min:e,max:o,step:t,value:dn(r,f,i),readout:!1,ariaLabel:a,notch:d,onChange:n})})}function LE({label:e,desktopKey:o,fallback:t,changed:r=!1,onReset:a=()=>{}}){let n=To()[o],s=dn(void 0,n,t);return g(Oe,{words:Z()?.panel,label:l(e),changed:r,detail:l("{value} on desktop",{value:`${s}px`}),onReset:a})}function RE(e){return wI(e.label,{icon:e.icon,min:e.min,max:e.max,step:e.step,unsetLabel:"Follows Desktop",unsetMark:g(LE,{label:e.label,desktopKey:e.desktopKey,fallback:e.fallback}),restTrack:o=>g(OE,{...o,desktopKey:e.desktopKey,fallback:e.fallback})})}function X$(e){return{type:"custom",render:({value:o,onChange:t})=>g(BE,{...e,value:o,onChange:t})}}function AE({label:e,icon:o,options:t,value:r,resolved:a,restWord:n,onChange:s}){let i=t.some(f=>f.value===r);return g(le,{label:l(e),icon:ko(o),action:g(Oe,{words:Z()?.panel,label:l(e),changed:i,detail:l("{value} on desktop",{value:l(n)}),onReset:()=>s(void 0)}),children:Yn({options:t,value:i?r:a,onChange:f=>s(f),ariaLabel:e})})}function BE({label:e,icon:o,options:t,desktopKey:r,resolve:a,value:n,onChange:s}){let i=To()[r],f=a(void 0,i),d=t.find(p=>p.value===f)?.label??"";return g(AE,{label:e,icon:o,options:t,value:n,resolved:f,restWord:d,onChange:s})}var DE={Top:"Padding top",Bottom:"Padding bottom",Left:"Padding left",Right:"Padding right"},_E={Top:sI,Bottom:aI,Left:nI,Right:lI},NE=e=>{let o=_E[e];return g(o,{})};function Z$(e={}){let o=e.keys?.top??"sectionPaddingTop",t=e.keys?.bottom??"sectionPaddingBottom",r=e.group!==!1,a=k=>DE[k],n=k=>rr(a("Top"),g(sI,{}),eo.min,eo.max,eo.step,k,"px"),s=(k,T,C,y=eo)=>we("mobile",RE({label:a(k),icon:NE(k),desktopKey:T,min:y.min,max:y.max,step:y.step,fallback:C})),i=e.top??eo.min,f=e.bottom??eo.min,d="sectionPaddingLeft",p="sectionPaddingRight",m=e.sideBounds??eo,x=e.side??m.min,I=e.sidePhone??x,b=e.phone===!0,w=k=>b?we("desktop",k):k;return et({...r?{_gSpacing:ke("Padding")}:{},[o]:w(n(i)),...b?{[tr(o)]:s("Top",o,i)}:{},...e.only==="top"?{}:{[t]:w(rr(a("Bottom"),g(aI,{}),eo.min,eo.max,eo.step,f,"px")),...b?{[tr(t)]:s("Bottom",t,f)}:{}},...e.sides?{[d]:w(rr(a("Left"),g(nI,{}),m.min,m.max,m.step,x,"px")),...b?{[tr(d)]:s("Left",d,I,m)}:{},[p]:w(rr(a("Right"),g(lI,{}),m.min,m.max,m.step,x,"px")),...b?{[tr(p)]:s("Right",p,I,m)}:{}}:{}})}var qr=["top","right","bottom","left"],ME={top:"sectionPaddingTop",right:"sectionPaddingRight",bottom:"sectionPaddingBottom",left:"sectionPaddingLeft"},Yx=e=>typeof e=="number"?e:null;function HE(e,o,t){let r={};for(let a of qr)t[a]!==o[a]&&(r[e[a]]=t[a]??void 0);return r}function WE({tier:e,o}){let t=null;try{t=nf()}catch{t=null}let r=t?.values??{},a=e==="mobile"?o.phoneKeys:o.keys,n=Object.fromEntries(qr.map(d=>[d,Yx(r[a[d]])])),s=Object.fromEntries(qr.map(d=>[d,String(e==="mobile"?Yx(r[o.keys[d]])??o.fallback[d]:o.fallback[d])])),[i,f]=jr(()=>GF(n,s));return g(le,{label:l("Padding"),icon:g(FF,{}),action:g(fI,{each:i,label:l("Each side"),onChange:f}),children:g(zF,{label:l("Padding"),each:i,value:n,placeholder:s,min:o.min,max:o.max,step:o.step,onChange:d=>{let p=HE(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 qn(e={}){let o={...ME,...e.keys},t={keys:o,phoneKeys:Object.fromEntries(qr.map(i=>[i,tr(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:()=>g(WE,{tier:i,o:t})};return r?we(i,f):f},n=()=>Vr({type:"custom",render:()=>g(Nn,{})},"always"),s=qr.filter(i=>i!=="top");return et({...e.group===!1?{}:{_gSpacing:ke("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())])):{}})}function Q$(e,o){let t=Object.fromEntries(Object.entries(o).map(([n,s])=>[n,n in e&&vo(s)?e[n]:s])),r={},a=!1;for(let[n,s]of Object.entries(e)){if(n in o){a||Object.assign(r,t),a=!0;continue}r[n]=s}return a||Object.assign(r,t),r}var Xx=e=>typeof e=="number"?e:null;function zE(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 GE({o:e}){let o=null;try{o=nf()}catch{o=null}let t=o?.values??{},r={x:Xx(t[e.keys.x]),y:Xx(t[e.keys.y])},a=l(e.label??"Position"),n=!!(r.x||r.y),s=d=>{let p=zE(e.keys,r,d);Object.keys(p).length&&o?.onChangeMany(p)},i=g(ZF,{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=g(Oe,{words:Z()?.panel,label:a,changed:n,detail:"0 px, 0 px",onReset:()=>s({x:null,y:null})});return e.label===null?No("div",{className:"sf-position-line",children:[i,f]}):g(le,{label:a,icon:g(PF,{}),changed:n,action:f,children:i})}function J$(e){return{[e.keys.x]:{type:"custom",render:()=>g(GE,{o:e})},[e.keys.y]:{...Vr({type:"custom",render:()=>g(Nn,{})},"always"),reachedBy:e.keys.x}}}var UE={contained:"Contained",page:"Page",full:"Full"},_n="Width";function jn(e,o=Px,t=!0){let r=o.map(a=>({label:or[a]??UE[a],value:a}));return et({...t?{_gWidth:ke(_n)}:{},widthMode:{type:"custom",render:({onChange:a,field:n})=>g(le,{label:l(_n),icon:g(DF,{}),action:t?g(sE,{inherited:n?.inherited??!1,onReset:()=>a(Vi),label:_n}):void 0,children:Yn({options:r,value:n?.currentValue||e,onChange:a,ariaLabel:_n})})}})}function Kn(){let e=r=>({type:"custom",render:({value:a,onChange:n})=>g(le,{label:Qt,icon:ko(g(vF,{})),action:r?r(n):void 0,children:Yn({options:[{label:"Auto",value:"auto"},{label:"Fixed",value:"fixed"},{label:"Screen",value:"screen"}],value:["auto","fixed","screen"].includes(a)?a:"auto",onChange:n,ariaLabel:Qt})})}),o=()=>({type:"custom",render:({value:r,onChange:a,field:n})=>{let s=n?.unit==="%"?"%":"px",i=s==="%"?Ai:Ri;return g("div",{className:"sf-field",children:Be({min:i.min,max:i.max,step:i.step,value:typeof r=="number"?r:i.fallback,suffix:s,ariaLabel:Qt,onChange:a})})}}),t=()=>mf("Unit",g(rI,{}),[{label:"px",value:"px"},{label:"%",value:"%"}],"px");return et({_gHeight:ke(Qt),sectionHeightMode:we("desktop",e()),sectionHeightValue:we("desktop",o()),sectionHeightUnit:we("desktop",t()),sectionHeightModePhone:we("mobile",e(r=>g($E,{onClear:()=>r(void 0)}))),sectionHeightValuePhone:we("mobile",o()),sectionHeightUnitPhone:we("mobile",t())})}function $E({onClear:e}){let o=To(),t=Bi(o),r=kn(o),a=l("{value} on desktop",{value:r.mode==="auto"?l("Auto"):`${r.value}${r.unit}`});return g(Oe,{words:Z()?.panel,label:l(Qt),changed:t,detail:a,onReset:e})}function pf(){let e=t=>({type:"custom",render:({value:r,onChange:a,id:n,name:s})=>g(qE,{value:r,onChange:a,labelId:`${n??s??"stickTop"}-label`,phone:t})}),o=()=>({type:"custom",render:({value:t,onChange:r})=>g("div",{className:"sf-field",children:Be({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:ke(Tn),stickTop:we("desktop",e(!1)),stickTopDistance:we("desktop",o()),stickTopPhone:we("mobile",e(!0)),stickTopDistancePhone:we("mobile",o())}}function qE({value:e,onChange:o,labelId:t,phone:r}){let a=To(),n=_i(a),s=r?n.phone:e===!0;return g(le,{label:l(Tn),labelId:t,icon:ko(g(LF,{})),action:No(to,{children:[r?g(Oe,{words:Z()?.panel,label:l(Tn),changed:Di(a),detail:l("{value} on desktop",{value:n.desktop?`${n.desktopDistance}px`:l("Off")}),onReset:()=>o(void 0)}):null,g(cI,{checked:s,onChange:o,ariaLabelledBy:t})]})})}var Zx="e.g. about";function Vn(){return{_gAnchor:ke("Anchor"),anchor:Et({control:"plainText",label:"Name",placeholder:Zx},{type:"custom",render:({value:e,onChange:o})=>g(mp,{value:e,onChange:o,nameBox:(t,r)=>g(Ft,{value:t,onChange:r,label:"Name",placeholder:Zx,hideable:!1,markup:!1})})})}}function e7(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 g(le,{label:l(e),icon:o,htmlFor:i,hint:t===void 0?void 0:l(t),children:g(XF,{id:i,value:Number.isFinite(f)?new Date(f):null,onChange:d=>a(d?d.toISOString():"")})})}}}function Tt(e,o,t){return{type:"custom",...Zo({},{...af,label:e}),render:({value:r,onChange:a,id:n,name:s})=>{let i=typeof r=="boolean"?r:o,f=`${n??s??e}-label`;return g(le,{label:l(e),labelId:f,icon:t,action:g(cI,{checked:i,onChange:a,ariaLabelledBy:f})})}}}function o7(){return{type:"custom",render:({value:e,onChange:o,id:t,name:r})=>{let a=`${String(t??r??"pageBackground")}-colour`;return g(je,{label:l("Background"),icon:g(iI,{}),id:a,value:Js(e),onChange:o})}}}var t7={follows:"fill"},r7={follows:"ink"};function a7(e,o,t){if(typeof o!="string"){let r=o.follows;return{type:"custom",render:({value:a,onChange:n})=>g(jE,{label:e,part:r,icon:t,value:a,onChange:n})}}return{type:"custom",render:({value:r,onChange:a})=>g(je,{label:l(e),icon:t,value:r||o,onChange:a})}}function jE({label:e,part:o,icon:t,value:r,onChange:a}){let n=mu(K().theme),s=o==="fill"?n.fill:n.ink;return g(fn,{label:l(e),icon:t,value:r||"",inherited:s,resetTo:Pt(s.toUpperCase(),l("Styles")),onChange:a,onReset:()=>a("")})}var KE=[{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 FI({label:e,value:o,onChange:t,points:r=KE}){let a=r.map(n=>({...n,label:l(n.label),...n.title?{title:l(n.title)}:null}));return g(VF,{label:l(e),value:o,points:a,onChange:t})}function n7(){return Vr({type:"custom",render:()=>g(Nn,{})},"always")}var VE=Ks([]);function l7(e,{stacking:o,fallback:t=on}){return{type:"custom",render:({value:r,onChange:a})=>{let n=$o.includes(r)?r:t;return o?g(YE,{label:e,value:n,onChange:a}):EI({label:e,value:n,onChange:a,points:VE})}}}function YE({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?Ys(r?.data,n):[];return EI({label:e,value:o,onChange:t,points:Ks(s,n)})}function EI({label:e,value:o,onChange:t,points:r}){let a=r.find(n=>n.disabled);return g(le,{label:l(e),icon:g(EF,{}),hint:a?.title?l(a.title):void 0,children:FI({label:e,value:pt(o),onChange:t,points:r})})}var s7={top:g(yF,{}),right:g(gF,{}),bottom:g(IF,{}),left:g(hF,{})};function i7(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 g(le,{label:l(e),icon:a,value:s(x)?.label?l(s(x).label):"",children:FI({label:e,value:x,onChange:m,points:d})})}}}var XE="\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 g(le,{label:l(e),icon:ko(o),children:g(qF,{value:p,ariaLabel:l(e),onChange:s,options:[...a?[{label:l(a),value:XE,disabled:!0}]:[],...f.map(m=>({label:l(m.label),value:m.value}))]})})}}}function f7(e,o,t){return{type:"custom",options:o,render:({value:r,onChange:a,field:n})=>g(Qp,{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 c7(e,o={}){return{type:"custom",render:({value:t,onChange:r})=>{let a={value:t,onChange:r,...o};return g(e,{...a})}}}function Yn({options:e,value:o,onChange:t,ariaLabel:r,disabled:a=!1}){return g(WF,{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 d7=[{label:"Image",value:"image"},{label:"Video",value:"video"}];function mf(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})=>g(le,{label:l(e),icon:ko(o),children:Yn({options:a,value:a.some(f=>f.value===n)?n:n||i?.currentValue||r,onChange:s,ariaLabel:e})})}}function u7(e,o,t,r={}){return{type:"custom",[nF]:!0,render:({value:a,onChange:n})=>g(Xp,{value:a||"",onChange:n,label:e,accept:o,placeholder:t,focusKey:r.focus,focusWhen:r.focusWhen})}}function p7({value:e,onChange:o,label:t}){let r=e||{},a=!!r.pending,n=a?"var(--fg-dim, #888)":r.ok?"#1d9e75":"#d85a30",s=!!Ce(tE()).geocode,i=(f,d)=>o({...r,[f]:d===""?void 0:Number(d)});return No(le,{label:l(t),icon:g(of,{}),children:[s&&No(to,{children:[g("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&&g("div",{style:{marginTop:6,fontSize:12,lineHeight:1.4,color:n},children:l(r.status)}),g("div",{style:{marginTop:6,fontSize:11,color:"var(--fg-dim, #999)"},children:l("Coordinates from OpenStreetMap")})]}),g("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&&No("div",{style:{marginTop:8,display:"grid",gap:8},children:[g(le,{label:l("Latitude"),icon:g(of,{}),children:g("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)})}),g(le,{label:l("Longitude"),icon:g(of,{}),children:g("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 ZE(e,o){return o===null||o<0||o>=e.length?"":e[o]?.text??""}function QE(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 JE(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 xf={label:"Ticker items",icon:g(TF,{})};function m7(e,o,t,r){return{type:"custom",[Mo]:{control:"textList",label:e,placeholder:t,itemKey:"text",rendering:r},...Zo({},{...II.textList,label:e}),render:({value:a,onChange:n})=>g(If,{label:e,icon:ko(o),items:Array.isArray(a)?a:[],placeholder:t,onChange:n,markup:r==="markup"})}}function If({label:e,icon:o,items:t,placeholder:r,onChange:a,markup:n=!1}){let s=rf(null),[i,f]=jr(null),d=m=>m.map(x=>({text:x?.text??""})),p=m=>{let x=JE(t,m,i);x===null&&(s.current=null),f(x),a(d(m))};return g(jF,{label:l(e),icon:o,noun:l("item"),items:t,onChange:p,newItem:()=>({text:""}),open:null,onOpen:()=>{},renderItem:()=>null,above:n?g(ii,{target:s,value:ZE(t,i),onChange:m=>a(QE(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)=>g("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:b=>I({text:b.target.value}),onFocus:b=>{s.current=b.currentTarget,f(x)}})})}function OI(e,o){let t=`${e.label} \u2014 row ${o+1}`;return Et({control:"plainText",label:t,placeholder:e.placeholder,offPage:e.offPage},{type:"custom",render:({value:r,onChange:a})=>g(Ft,{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 LI(e){return{_gCards:ke("Cards"),coverIndex:Qo("Cover image",g(kF,{}),qp,String(1),e?.coverHint??"A card's opening picture \u2014 a card pinned to a finish keeps its own."),imageBackground:xE("Image background",Rn),cardImage:o1(),spinOnHover:Tt("Rotate on hover",e?.spinDefault??!0,g(RF,{}))}}function RI(){return{outline:Qo("Card outline",g(AF,{}),xi,pi),indexBadge:Qo("Card number",g(rI,{}),mi,ui),showBadge:Tt("Product badge",!0,g(Qs,{noun:"tag"}))}}function AI(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:ke("Show on a card"),showCardPrice:Tt("Price",!0,g(bF,{})),showCardFinishes:Tt("Finish swatches",!0,g(SF,{})),showCardSizes:Tt("Sizes",t.showCardSizes,g(OF,{})),showCardBuy:Tt("Buy button",t.showCardBuy,g(mF,{})),showCardPage:Tt("Page button",t.showCardPage,g(iI,{}))}}function x7(e,o="display"){let t=tr(o);return{[o]:we("desktop",{type:"custom",render:({value:r,onChange:a})=>g(BI,{parts:e,changed:Cp(r),shown:n=>sn(r,n),onPress:(n,s)=>a(vp(r,n,s)),onReset:()=>a(void 0)})}),[t]:we("mobile",{type:"custom",render:({value:r,onChange:a})=>g(e1,{parts:e,desktopKey:o,value:r,onChange:a})})}}function BI({parts:e,changed:o,shown:t,onPress:r,onReset:a,detail:n}){let s=l("Display");return g(le,{label:s,icon:g(fF,{}),changed:o,action:g(Oe,{words:Z()?.panel,label:s,changed:o,detail:n,onReset:a}),children:g(KF,{label:s,items:e.map(i=>({id:i.id,label:l(i.label),shown:t(i.id)})),onChange:r})})}function e1({parts:e,desktopKey:o,value:t,onChange:r}){let a=To()[o];return g(BI,{parts:e,changed:wp(t),shown:n=>ni(a,t,n),onPress:(n,s)=>r(kp(t,n,s)),onReset:()=>r(un),detail:l("the same as Desktop")})}function o1(){return wI("Card image",{min:$e,max:ct,step:Ku,hint:"Rounds the picture. The card's own corner is in Styles."})}function I7(){return df({sidesKey:"cornerSides",step:Vu,useFollowed:()=>$e,mark:g(t1,{label:Yu}),hint:l("Rounds the picture. Left alone it stays square.")})}function t1({label:e,changed:o=!1,onReset:t=()=>{}}){return g(Oe,{words:Z()?.panel,label:l(e),changed:o,onReset:t})}function h7(){return{type:"custom",render:({value:e,onChange:o})=>g(r1,{value:typeof e=="string"?e:"",onChange:o})}}function r1({value:e,onChange:o}){let[t,r]=jr(null),a=Us.filter(s=>t===null||Do[s].across===t),n=e&&e in Do?Do[e]:null;return No(to,{children:[g(le,{label:l("Photos in a row"),icon:g(oI,{}),children:No("div",{className:"sf-gallery-filter",children:[g("button",{type:"button","aria-pressed":t===null,onClick:()=>r(null),children:l("All")}),Zu.map(s=>g("button",{type:"button","aria-pressed":t===s,onClick:()=>r(s),children:s},s))]})}),g(le,{label:l("Layout"),icon:g(CF,{}),value:n?l(n.label):l("Not chosen"),hint:l("{n} of {total} layouts",{n:a.length,total:Us.length}),children:g(dI,{className:"sf-gallery-layouts",label:l("Layout"),value:e,onChange:o,onClear:()=>o(""),options:a.map(s=>({value:s,label:l(Do[s].label),picture:g("span",{className:"sf-gallery-pic",children:Do[s].desktop.map(([i,f],d)=>g("i",{style:{gridColumn:`span ${i}`,gridRow:`span ${f}`}},d))})}))})})]})}import{jsx as Xn,Fragment as a1,jsxs as DI}from"react/jsx-runtime";import{Button as _I,Dialog as n1}from"efficient-shell/ui";function l1(e){return qe("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 NI({count:e,onCancel:o,onConfirm:t}){return DI(n1,{open:!0,onClose:o,role:"alertdialog",size:"sm",title:l("Clear this site\u2019s colors?"),footer:DI(a1,{children:[Xn(_I,{variant:"secondary",onClick:o,children:l("Cancel")}),Xn(_I,{variant:"danger",onClick:t,children:l("Clear colors")})]}),children:[Xn("p",{children:l1(e)}),Xn("p",{className:"mt-2 font-medium",children:l("This cannot be undone.")})]})}var u1=sf("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"),p1="Reset color",m1={selected:0,themes:[]};function x1(e){e(m1)}function WI({value:e,onChange:o}){let t=e?.themes??[],r=t.length===0,a=We(e),[n,s]=HI(!1),i=c1(),[f,d]=HI(null),p=(T,C)=>{o({...a,themes:a.themes.map((y,h)=>h===T?C:y)})},m=Ut(a).accent,x=new Set(a.themes.map(T=>T.brandInk).filter(Boolean)),I=cu.filter(T=>!x.has(T)).map(T=>du(m,T)),b=[...a.themes,...I],w=T=>{if(T<a.themes.length)return o({...a,selected:T});let C=[...a.themes,b[T]];o({...a,themes:C,selected:C.length-1})},k=()=>{let T=[...a.themes,{...ho(a.themes[a.selected])}];o({...a,themes:T,selected:T.length-1}),d(T.length-1)};return MI(s1,{children:[r?null:ar(f1,{label:l(p1),icon:ko(u1),labelId:"sf-theme-reset",action:ar(i1,{label:l("all theme colors"),words:i.panel,changed:!0,onReset:()=>s(!0)})}),n&&ar(NI,{count:t.length,onCancel:()=>s(!1),onConfirm:()=>{s(!1),x1(o)}}),ar("div",{className:"sf-theme-list",role:"radiogroup","aria-label":l("Theme"),children:b.map((T,C)=>ar(In,{index:C,colors:T,selected:C===a.selected,open:f===C&&C<a.themes.length,editable:C<a.themes.length,onPick:()=>w(C),onEdit:()=>d(y=>y===C?null:C),onChangeColors:y=>p(C,y)},C))}),MI("button",{type:"button",onClick:k,className:"sf-theme-add",children:[ar(d1,{size:12}),l("Add new theme")]})]})}import{jsx as Zn}from"react/jsx-runtime";import{SettingsDefaultReset as I1,SettingsField as h1}from"efficient-easel/panel";import{SquareIcon as g1}from"efficient-easel/icons";var y1="Applies to panels, cards, inputs and buttons. Round things \u2014 color swatches, switches, status dots \u2014 stay round.",hf="Corners";function zI({value:e,onChange:o,showHint:t=!0}){let r=e===null;return Zn(h1,{label:l(hf),icon:Zn(g1,{}),value:r?l("Default"):`${e}px`,changed:!r,action:Zn(I1,{words:Z()?.panel,label:l(hf),changed:!r,detail:l("the built-in corners"),onReset:()=>o(null)}),hint:t?l(y1):void 0,children:Zn(Be,{min:$e,max:ct,step:1,value:e??$e,readout:!1,ariaLabel:l(hf),onChange:o})})}import{jsx as Yr}from"react/jsx-runtime";import{SettingsDefaultReset as b1,SettingsField as S1,SettingsSegmented as C1}from"efficient-easel/panel";import{ShadowIcon as w1}from"efficient-easel/icons";var gf={none:"None",soft:"Soft",lifted:"Lifted"},v1="Applies to cards \u2014 products, brands, journal entries and filter cells. Round things like swatches and status dots are never shadowed.",k1={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)"},T1={labelsPx:90.25,widestLabelPx:34.6};function GI({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??As;return Yr(S1,{label:l("Card shadow"),icon:Yr(w1,{}),value:l(gf[a]),changed:!r,action:Yr(b1,{words:Z()?.panel,label:l("Card shadow"),changed:!r,detail:l(gf[As]),onReset:()=>o(null)}),hint:t?l(v1):void 0,children:Yr(C1,{options:bu.map(n=>({id:n,label:l(gf[n]),icon:Yr("span",{className:"sf-shadow-chip",style:{boxShadow:k1[n]}})})),value:a,ariaLabel:l("Card shadow"),fit:T1,onChange:o})})}import{jsx as UI}from"react/jsx-runtime";import{ShadowIcon as P1}from"efficient-easel/icons";var F1="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 $I({value:e,onChange:o,showHint:t=!0}){let r=e===null;return UI(fn,{label:l("Shadow color"),icon:UI(P1,{}),value:e??"",inherited:Ds,resetTo:Ds,onChange:o,onReset:()=>o(null),hint:t?l(F1):void 0})}import{jsx as Qn}from"react/jsx-runtime";import{SettingsDefaultReset as E1,SettingsField as O1}from"efficient-easel/panel";import{AlignSeparateIcon as L1}from"efficient-easel/icons";var R1="The space between the blocks inside a row, a grid or a box. Default means each one keeps the spacing it already has.",yf="Block gap",A1=Jt.Grid;function qI({value:e,onChange:o,showHint:t=!0}){let r=e===null;return Qn(O1,{label:l(yf),labelId:"sf-block-gap",icon:Qn(L1,{}),value:r?l("Default"):`${e}px`,changed:!r,action:Qn(E1,{words:Z()?.panel,label:l(yf),changed:!r,detail:l("each block's own spacing"),onReset:()=>o(null)}),hint:t?l(R1):void 0,children:Qn(Be,{min:kt.min,max:kt.max,step:kt.step,value:r?A1:e,readout:!1,ariaLabel:l(yf),onChange:o})})}import{jsx as Jn}from"react/jsx-runtime";import{SettingsDefaultReset as B1,SettingsField as D1,SettingsSegmented as _1}from"efficient-easel/panel";import{HoverIcon as N1}from"efficient-easel/icons";var bf={none:"None",lift:"Lift",highlight:"Highlight"},M1="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 jI({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??Bs;return Jn(D1,{label:l("Hover effect"),icon:Jn(N1,{}),value:l(bf[a]),changed:!r,action:Jn(B1,{words:Z()?.panel,label:l("Hover effect"),changed:!r,detail:l(bf[Bs]),onReset:()=>o(null)}),hint:t?l(M1):void 0,children:Jn(_1,{options:Su.map(n=>({id:n,label:l(bf[n])})),value:a,ariaLabel:l("Hover effect"),onChange:o})})}import{jsx as el}from"react/jsx-runtime";import{SettingsDefaultReset as H1,SettingsField as W1,SettingsSegmented as z1}from"efficient-easel/panel";import{DropIcon as G1}from"efficient-easel/icons";var Sf="Photography",KI={shot:"As shot",mono:"Black and white"},Cf=[{grayscale:!1,label:KI.shot},{grayscale:!0,label:KI.mono}],U1="Black and white photographs return to color on hover. Wheels and tyres keep their real finish either way.";function VI({value:e,onChange:o,showHint:t=!0}){let r=e===null,a=e??!1;return el(W1,{label:l(Sf),icon:el(G1,{}),value:l(Cf.find(n=>n.grayscale===a).label),changed:!r,action:el(H1,{words:Z()?.panel,label:l(Sf),changed:!r,detail:l(Cf.find(n=>!n.grayscale).label),onReset:()=>o(null)}),hint:t?l(U1):void 0,children:el(z1,{options:Cf.map(n=>({id:n.grayscale,label:l(n.label)})),value:a,ariaLabel:l(Sf),onChange:o})})}import{jsx as wf}from"react/jsx-runtime";import{useId as $1}from"react";import{SettingsField as q1,SettingsSwitch as j1}from"efficient-easel/panel";import{ShareIcon as K1}from"efficient-easel/icons";var V1="Share button",Y1="On every blog post.";function YI({value:e,onChange:o,showHint:t=!0}){let r=$1();return wf(q1,{label:l(V1),labelId:r,icon:wf(K1,{}),action:wf(j1,{checked:e===!0,onChange:o,ariaLabelledBy:r}),hint:t?l(Y1):void 0})}import{jsx as ol}from"react/jsx-runtime";import{SettingsDefaultReset as X1,SettingsField as Z1}from"efficient-easel/panel";import{PaddingXIcon as Q1}from"efficient-easel/icons";var vf="Side space",kf=wo.default,J1="The room left at the left and right edge of every page.";function XI({value:e,onChange:o,showHint:t=!0}){let r=e===null;return ol(Z1,{label:l(vf),labelId:"sf-side-space",icon:ol(Q1,{}),value:`${e??kf}px`,changed:!r,action:ol(X1,{words:Z()?.panel,label:l(vf),changed:!r,detail:`${kf}px`,onReset:()=>o(null)}),hint:t?l(J1):void 0,children:ol(Be,{min:wo.min,max:wo.max,step:wo.step,value:e??kf,readout:!1,ariaLabel:l(vf),onChange:o})})}import{jsx as Tf}from"react/jsx-runtime";import{BACKGROUND_WIDTHS as R8,SettingsBackgroundWidth as eO,SettingsContentWidth as oO}from"efficient-easel/panel";var ZI="Width",tO="Background width",rO="Content width";var tl=e=>l(or[e==="content"?"page":"full"]),aO=400,QI="Content cannot be wider than the background.",JI="The width of every section's background, until the section sets its own.",eh="The width of every section's content, until the section sets its own.",oh="On phones, content always fills the screen.";function rl({value:e,changed:o,detail:t,onChange:r,onReset:a,disabled:n=!1,hint:s,labelId:i}){return Tf(eO,{value:e,changed:o,detail:t,onChange:r,onReset:a,disabled:n,hint:s?l(s):void 0,labelId:i,words:{label:l(tO),full:tl("full"),content:tl("content")},resetWords:Z()?.panel})}function al({mode:e,px:o,max:t=me.max,min:r=aO,changed:a,detail:n,onMode:s,onPx:i,onReset:f,fullClosed:d=!1,disabled:p=!1,hint:m,labelId:x}){let I=l(rO),b=e!=="full"?Tf(Be,{min:r,max:t,step:me.step,value:Math.min(Math.max(o,r),t),onChange:i,suffix:"px",ariaLabel:I,disabled:p}):null;return Tf(oO,{mode:s?e:void 0,onMode:s,number:b,changed:a,detail:n,onReset:f,fullClosed:d,disabled:p,hint:m?l(m):void 0,labelId:x,words:{label:I,full:tl("full"),content:tl("content")},resetWords:Z()?.panel})}import{jsx as qh}from"react/jsx-runtime";import{TextStyleItem as hL,TextStylesGroup as gL}from"efficient-easel/text-styles";import{jsx as dL}from"react/jsx-runtime";import{useState as uL}from"react";import{TextStylesList as pL}from"efficient-easel/text-styles";import{usePreviewDevice as mL}from"efficient-easel/draw/client";import{defaultTextStyles as Ah,textStyleCaseCss as nL}from"efficient-easel/text-styles/model";import{textStyleCaseCss as xO,textStyleCaseOfCss as IO}from"efficient-easel/draw";function Pf(e,o){return o?`${e}[${o.index}].${o.rowKey}`:e}function ro(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 fl,encodePartId as cl}from"efficient-easel/draw";import{LINK_FIELD_MARKER as dh,SCAFFOLD_FIELD_MARKER as fh,TEXT_FIELD_MARKER as dl}from"efficient-easel/draw";import{readHidable as uh}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as dO}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as cO}from"efficient-easel/draw";import{TEXT_FIELD_MARKER as th}from"efficient-easel/draw";import{readHidable as rh}from"efficient-easel/draw";import{SCALAR_TEXT_CONTROLS as nO}from"efficient-easel/draw";var lO=nO,sO=["text","textarea"],iO=["textarea","plainTextarea"];function fO(e){return!e||typeof e!="object"?null:e[th]?.control??null}function nr(e){let o=fO(e);return o&&lO.includes(o)?o:null}function nl(e){return iO.includes(e)}function ah(e){return!e||typeof e!="object"?void 0:e[th]?.placeholder}function ll(e){return rh(e).text}function Ff(e,o,t){return sO.includes(e)?{text:t,hidden:rh(o).hidden}:t}function nh(e,o,t,r){return ll(e[o])===r?null:{...e,[o]:Ff(t,e[o],r)}}function sl(e){if(!(!e||typeof e!="object"))return e[cO]}function Ef(e){if(!e||typeof e!="object")return null;let o=e.arrayFields;return o&&typeof o=="object"?o:null}function lh(e,o){if(!Array.isArray(o))return[];let t=sl(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=Ef(e);return a?(o.forEach((n,s)=>{for(let[i,f]of Object.entries(a)){if(!nr(f))continue;let d=ll(n?.[i])||sl(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 Of(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 sh(e,o,t,r,a){let n=Xr(e[o],t);return ll(n)===a?null:Of(e,o,t,Ff(r,n,a))}function ih(e,o){return o?`${e} \xB7 row ${o.index+1}`:e}var ao="data-sf-part",oq="data-sf-region-part",tq="data-sf-part-row";function rq(e,o){return`${e}[${o}]`}var De="data-sf-part-selected",aq="data-sf-part-kind",uO="data-sf-part-style-owner",pO="data-sf-part-style-kind";function nq(e){for(let o=e;o;o=o.parentElement){let t=o.getAttribute(uO),r=o.getAttribute(pO);if(t&&r)return{owner:t,kind:r};if(o.getAttribute("data-easel-block"))return null}return null}var ch=2;function ph(e,o){if(!e)return!1;let t=fl(e);return!!t?.propKey&&t.nodeId===o}function lr(e){return gt(e).replace(/\s+/gu,"")}function il(e,o,t){let r=e[dl];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}=uh(o);a?t.push(a):r.placeholder&&t.push(r.placeholder);return}if(!e[dh]){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))il(s,a?.[n],t);return}if(e.objectFields&&o&&typeof o=="object")for(let[a,n]of Object.entries(e.objectFields))il(n,o[a],t)}}function mh(e){if(!e||typeof e!="object")return!1;let o=e;return o[dh]?!1:!!o[dl]||o.type==="text"||o.type==="textarea"}function ul(e,o){let t=e[dl];return t?.label?t.label:typeof e.label=="string"?e.label:o}function Lf(e){let o=e.indexOf(" (");return(o>0?e.slice(0,o):e).trim()}function lq(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=[];il(n,o?.[r],s),!s.length&&n[fh]!==void 0&&il(n,n[fh],s);let i=ul(n,r),f=new Set;for(let{row:m,text:x}of lh(n,o?.[r])){let I=lr(x);I.length<ch||(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=lr(m);x.length<ch||d.has(x)||(d.add(x),p.push(x))}p.length&&t.push({key:r,label:i,texts:p})}return t}var mO=dO;function xh(e,o){if(!o||typeof o!="object"||Mr(e)||Wp(o))return null;let t=o[dl];return!t||!mO.includes(t.control)?null:t}function sq(e,o){let t=xh(e,o);return t!==null&&t.identifier!==!0}function Ih(e,o){if(!e)return[];let t=[];for(let[r,a]of Object.entries(e)){let n=xh(r,a);if(!n)continue;let{text:s,hidden:i}=uh(o?.[r]),f=s||n.placeholder||"",d=gt(f).replace(/\s+/gu," ").trim();t.push({key:r,label:Lf(ul(a,r)),preview:d,offPage:n.offPage===!0,identifier:n.identifier===!0,hidden:!!i})}return t}var Bf="_partStyles",hO="data-sf-part-styled",pl="data-sf-text-style",gO=/^(heading|body)-[1-7]$/;function sr(e){return typeof e=="string"&&gO.test(e)}var xl={heading:"heading-1",heading2:"heading-2",heading3:"heading-3",body:"body-1",label:"body-5"};function yO(e){if(!e)return null;for(let[o,t]of Object.entries(xl))if(t===e)return o;return null}function vh(e){if(sr(e.textStyle))return e.textStyle;let o=e.role&&Ao.includes(e.role)?e.role:null;return o?xl[o]:void 0}var bO=[400,500,600,700],kh=["left","center","right","justify"],hh=5,gh=1e3,SO=-5,CO=10,_f=0,Nf=64,Mf=2,Hf=120,ot=1280,Wf=10,yh={size:{min:hh,max:gh,step:1},sizePhone:{min:hh,max:gh,step:1},padding:{min:_f,max:Nf,step:Mf},width:{min:Hf,max:ot,step:Wf}},wO=.05,vO=.01,kO=["line","letter"],TO=.5,PO=2.5,FO=-1,EO=1,OO=0,LO=400;function Qr(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function Th(e){return Qr(e?.[Bf])??{}}function Il(e,o){let t=Th(e);return Object.hasOwn(t,o)?Qr(t[o])??{}:{}}function Ph(e,o,t){let r={...Th(e)};if(RO(t).length?r[o]=t:delete r[o],!Object.keys(r).length){let{[Bf]:a,...n}=e;return n}return{...e,[Bf]:r}}function RO(e){return Object.entries(e).filter(([,o])=>o!==void 0)}function AO(e){return kO.includes(e)}var Zr=(e,o,t)=>Math.min(t,Math.max(o,e));function BO(e,o){if(AO(e)){let t=Math.round(Number(o));return!Number.isFinite(t)||t===0?null:Zr(t,SO,CO)}if(e==="lineHeight"){let t=Number(o);return Number.isFinite(t)?ir(Zr(t,TO,PO),3):null}if(e==="letterSpacing"){let t=Number(o);return Number.isFinite(t)?ir(Zr(t,FO,EO),4):null}if(e==="paragraphSpacing"){let t=Math.round(Number(o));return!Number.isFinite(t)||t<=0?null:Zr(t,OO,LO)}if(Object.hasOwn(yh,e)){let{min:t,max:r}=yh[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"?Ao.includes(String(o))?o:null:e==="textStyle"?sr(o)?o:null:o}var DO=["weight","size","sizePhone","line","letter","lineHeight","letterSpacing","paragraphSpacing","padding","width"];function Fh(e){let o=null,t=r=>{o??={...e},delete o[r]};for(let r of DO){let a=e[r];a!==void 0&&!(typeof a=="number"&&Number.isFinite(a))&&t(r)}return e.align!==void 0&&!kh.includes(e.align)&&t("align"),e.textStyle!==void 0&&!sr(e.textStyle)&&t("textStyle"),o??e}var _O=[["font","role"],["role","textStyle"],["line","lineHeight"],["letter","letterSpacing"]];function NO(e){let o=[];for(let[t,r]of _O)t===e?o.push(r):r===e&&o.push(t);return o}function fr(e,o,t,r){let a={...Il(e,o)},n=r==null?null:BO(t,r);if(n===null)delete a[t];else{a[t]=n;for(let s of NO(t))delete a[s]}return Ph(e,o,a)}function Eh(e,o){return Ph(e,o,{})}function MO(e){return IO(e)??"none"}function HO(e){return xO(e)??""}var WO={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 zO(e,o){let t=e.role;return t&&Ao.includes(t)?t:o?.blockDrawsStyle?null:yO(e.textStyle)}function mq(e,o){return e==="Text"&&o==="text"}var GO={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 UO(e){let o=su[e],t=GO[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=ir($O+e.line*wO,3)),typeof e.letterSpacing=="number"?o.letterSpacingEm=e.letterSpacing:e.letter&&(o.letterSpacingEm=ir(e.letter*vO,4)),o}var $O=1,oa="--sf-part-para",zf="(max-width: 719.98px)";function bh(e){return e=Fh(e),typeof e.sizePhone=="number"&&e.sizePhone>0?{fontSize:`${e.sizePhone}px`}:{}}function qO(e,o){return o&&typeof e.sizePhone=="number"&&e.sizePhone>0?{...e,size:e.sizePhone}:e}function ml(e,o,t){e=Fh(e);let r=zO(e,t),a=ea(e),n=e.size?`${e.size}px`:r?UO(r):"";return{fontFamily:e.font?YO(e.font):r?`var(${WO[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:HO(e.case),textAlign:e.align??"",paddingTop:Rf(e.padding),paddingBottom:Rf(e.padding),maxWidth:Rf(e.width),color:jO(e.color),fontStyle:e.italic===!0?"italic":e.italic===!1?"normal":""}}var jO=e=>e===void 0||e===""?"":Object.hasOwn(Kt,e)?Kt[e]:Oh.test(e)?e:"",Oh=/^#[0-9a-fA-F]{6}$/;function xq(e){return Oh.test(e)}var Rf=e=>e===void 0?"":`${e}px`,ir=(e,o)=>Number(e.toFixed(o));function Iq(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:KO(Number.parseInt(e.fontWeight,10)),lineRatio:Number.isFinite(r)?ir(r/t,3):1.2,letterEm:Number.isFinite(a)?ir(a/t,4):0,align:VO(e.textAlign),case:MO(e.textTransform),paddingPx:Number.isFinite(n)?Math.round(n):0,widthPx:Number.isFinite(s)&&s<ot?Math.round(s):ot}}function KO(e){return Number.isFinite(e)?bO.reduce((o,t)=>Math.abs(t-e)<Math.abs(o-e)?t:o):400}function VO(e){for(let o of kh)if(o===e)return o;return e==="end"?"right":"left"}function hq(e,o){let t=Sh(e);if(!t)return"";for(let r of Ze)if(Sh(o(r.cssVar))===t)return r.key;return""}var Sh=e=>(e.split(",")[0]??"").replace(/["']/g,"").replace(/\s+/g," ").trim().toLowerCase();function YO(e){let o=Gt(e);return o?`var(${o.cssVar})`:""}function gq(e,o,t,r){return!o||fl(o)?.nodeId!==e?null:t.find(a=>r(a.getAttribute("class")))??t[0]??null}function yq(e,o,t=()=>Jr,r=i=>i,a=QO,n=!1,s=()=>!1){let i=0;for(let{element:f,partId:d}of e){let p=fl(d)?.propKey;if(!p)continue;let m=r(p),x=Object.hasOwn(o,m)?Qr(o[m])??{}:{},I=ml(qO(x,n),Jr,{blockDrawsStyle:s(p)});sr(x.textStyle)?f.setAttribute?.(pl,x.textStyle):f.removeAttribute?.(pl);let b=Af.some(k=>f.style[k]),w=!1;for(let[k,T]of Object.entries(I))JO(f,k,T),T&&(w=!0);if(b||Af.some(k=>I[k]))for(let k of XO(f,a))for(let T of Af)k.style[T]=I[T]??"";w&&(i+=1)}return i}function XO(e,o){let t=lr(e.textContent??""),r=[],a=e;for(let n=0;n<ZO&&o(a);n+=1){let s=a.parentElement;if(!s||lr(s.textContent??"")!==t)break;r.push(s),a=s}return r}var ZO=8;function QO(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 JO(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",eL=Object.keys(ml({},Jr)),Df=new Set(["color","overflowWrap",oa,"fontStyle"]),Af=eL.filter(e=>!Df.has(e));function bq(e,o,t,r=n=>n,a=()=>!1){let n=new Map;for(let f of e){let d=Pf(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(!oL(f))continue;let d=Qr(o[f])??{},p=ml(d,Jr),m=bh(d),x=sr(d.textStyle)?d.textStyle:void 0;!Object.values(p).some(Boolean)&&!Object.keys(m).length&&!x||s.set(f,{stamp:wh(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])??{},b=ml(I,Jr,{blockDrawsStyle:a(m)}),w=bh(I),k=sr(I.textStyle)?I.textStyle:void 0;!Object.values(b).some(Boolean)&&!Object.keys(w).length&&!k||i.set(f,{stamp:wh(t,m),declarations:b,...Object.keys(w).length?{phone:w}:{},...k?{textStyle:k}:{}})}return i.size||s.size?{rules:i,kindRules:s,drawn:new Set(n.keys())}:null}function oL(e){return e.startsWith("@")}function Sq(e,o){return e?.kindRules.get(o)??null}function wh(e,o){let t=r=>r.replace(/[^A-Za-z0-9_-]+/g,"-");return`${t(e)}~${t(o)}`}function Cq(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(([b,w])=>`${rL(b)}: ${w}`).join("; "),d=`[${hO}="${n}"]`,p=i.filter(([I])=>!Df.has(I)),m=i.filter(([I])=>Df.has(I));p.length&&o.push(`${d}, *:has(> ${d}) { ${f(p)} }`),m.length&&o.push(`${d} { ${f(m)} }`),s[oa]&&o.push(...tL(d));let x=Object.entries(a.phone??{}).filter(([,I])=>I!=="");x.length&&o.push(`@media ${zf} { ${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 tL(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 rL=e=>e.replace(/[A-Z]/g,o=>`-${o.toLowerCase()}`);function wq(e,o){if(!e)return null;let t=lr(o),r=e.rules.get(t);if(r)return r;if(t.length<aL||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 aL=8;function Lh(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 Gf=e=>e==="sentence"?"none":void 0,ta=e=>typeof e=="string"&&e?e:void 0,Bh=["font","color","size","sizePhone","weight","italic","lineHeight","letterSpacing","paragraphSpacing","letterCase","largestSize"];function Po(e){let o={};for(let t of Bh)e[t]!==void 0&&(o[t]=e[t]);return o}function $f(e,o){let{auto:t,...r}=e,a=new Set(o??[]),n=Bh.filter(s=>a.has(s)&&e.values[s]===void 0);return n.length?{...r,auto:n}:r}function Dh(e){let o=e.fonts,t=e.sizes,r=e.typography,a=wu(e.compression),n={"heading-1":{font:ta(o.heading),size:ne(t.headingLarge),weight:ne(r.weight),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Gf(r.case),largestSize:ne(r.maxPx)},"heading-2":{font:ta(o.heading2),size:ne(t.headingMedium),weight:ne(r.weight2),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Gf(r.case2)},"heading-3":{font:ta(o.heading3),size:ne(t.headingSmall),weight:ne(r.weight3),lineHeight:a.lineHeight,letterSpacing:a.letterSpacing,letterCase:Gf(r.case3)},"body-1":{font:ta(o.body),size:ne(t.body)},"body-5":{font:ta(o.label),size:ne(t.label)}};return Ah().map(({id:s,kind:i,name:f})=>({id:s,kind:i,name:f,values:Po(n[s]??{})}))}function qf(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=>$f({...o,values:Po(o.values??{})},Array.isArray(o.auto)?o.auto:void 0)):null}function Rq(e){return qf(e)??[]}function _h(e){return qf(e)??Ah().map(({id:o,kind:t,name:r})=>({id:o,kind:t,name:r,values:{}}))}function tt(e,o){let t=Dh(o),r=qf(e);return r?r.map(a=>{let n={...Uf(t,a.id)};for(let s of a.auto??[])delete n[s];return{...a,values:Po({...n,...a.values})}}):t}var Uf=(e,o)=>e.find(t=>t.id===o)?.values??{},Rh=["heading-1","heading-2","heading-3"];function Nh({saved:e,old:o,cur:t,next:r,sizeOf:a}){let n=Dh(o),s=_h(e),i=tt(s,o),f=[],d=r.map(m=>{let x=t.find(y=>y.id===m.id),I=s.find(y=>y.id===m.id);if(!x||!I)return lL([m],a)[0];let b={...I.values},w=new Set(I.auto??[]),k=m.values,T=x.values,C=[...new Set([...Object.keys(k),...Object.keys(T)])].filter(y=>JSON.stringify(k[y])!==JSON.stringify(T[y]));C.sort((y,h)=>+(y==="letterSpacing")-+(h==="letterSpacing"));for(let y of C){let h=y==="lineSpacing"?"lineHeight":y,E=k[y];if(E===void 0){delete b[h],Uf(n,m.id)[h]!==void 0&&(f.push([m.id,h]),w.add(h));continue}if(w.delete(h),y==="lineSpacing")b.lineHeight=cr(E/100,3);else if(y==="letterSpacing"){let F=i.find(P=>P.id===m.id),R=a({...m,values:Po({...F?.values??{},...b})});b.letterSpacing=R?cr(E/R,4):0}else b[h]=E}return $f({id:m.id,kind:m.kind,name:m.name,values:Po(b)},w)}),p=o.compression;if(f.some(([m,x])=>(x==="lineHeight"||x==="letterSpacing")&&Rh.includes(m))&&dt(p)!=="normal"){for(let m of Rh){let x=d.find(b=>b.id===m);if(!x)continue;let I={...x.values};for(let b of["lineHeight","letterSpacing"])f.some(([w,k])=>w===m&&k===b)||I[b]===void 0&&!(x.auto??[]).includes(b)&&(I[b]=Uf(n,m)[b]);x.values=Po(I)}p="normal"}return{saved:d,old:{...o,compression:p}}}function Mh(e,o){let t={text_styles:e.saved};return e.old.compression!==o.compression&&(t.heading_compression=dt(e.old.compression)),t}var cr=(e,o)=>Number(e.toFixed(o));function Hh(e,o){return e.map(t=>{let{lineHeight:r,letterSpacing:a,...n}=t.values,s={...n};return r!==void 0&&(s.lineSpacing=cr(r*100,1)),a!==void 0&&(s.letterSpacing=cr(a*o(t),2)),{id:t.id,kind:t.kind,name:t.name,values:s}})}function lL(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:Po({...n})},i={...s.values};if(r!==void 0&&(i.lineHeight=cr(r/100,3)),a!==void 0){let f=o({...s,values:{...s.values}});i.letterSpacing=f?cr(a/f,4):0}return{...s,values:Po(i)}})}function Aq(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:Rs({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:dt(e.heading_compression),typography:ku(e)},t=e.text_styles??null,r=Array.isArray(t)?jf(tt(t,o),o):o;return{fonts:Or(r.fonts),sizes:Rs(r.sizes),compression:dt(r.compression),typography:r.typography,textStyles:t}}function jf(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 sL(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 iL(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 Bq(e){let o=[];for(let t of e){let r=t.values,a=`.${Lh(t)}`,n=`[${pl}="${t.id}"]`,s=`${a}, ${n}`,i=[],f=r.font!==void 0?Ze.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?sL(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=nL(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(...iL(`:is(${s})`)),r.sizePhone!==void 0){let x=fL[t.id],I=[`${s} { font-size: ${r.sizePhone}px }`];x&&I.push(`.sf-themed-content { --size-${x}: ${r.sizePhone}px !important }`),o.push(`@media ${zf} { ${I.join(" ")} }`)}}return o.join(`
|
|
5
|
-
`)}var fL={"heading-1":"headingLarge","heading-2":"headingMedium","heading-3":"headingSmall","body-1":"body","body-5":"label"};function Dq(e){return e!==!0&&e!==!1?"":`em.text-accent { font-style: ${e?"italic":"normal"} }`}function Wh(e){return e?xl[e]:void 0}function Kf(e){let o=ea(e);return Po({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 zh(e){return Object.keys(Kf(e)).length>0}function Gh({saved:e,old:o,styleId:t,values:r}){let a=_h(e);return{saved:cL(a,t,r),old:o}}function cL(e,o,t){return e.map(r=>r.id===o?$f({...r,values:Po({...r.values,...t})},r.auto):r)}var Uh=["font","color","size","weight","emphasis","lineSpacing","letterSpacing","paragraphSpacing","letterCase","largestSize"],xL=["size","lineSpacing","letterSpacing","letterCase"],IL=500,Vf=Ze.map(e=>({value:e.key,label:e.label,family:`var(${e.cssVar})`,italic:e.italicLoaded}));function $h({saved:e,old:o,colours:t,sizeOf:r,onChange:a,openId:n,onOpenChange:s,readOnly:i=!1,withoutSize:f=!1}){let[d,p]=uL(null),m=mL()==="mobile",x=tt(e,o),I=Hh(x,r);return dL(pL,{styles:I,onChange:b=>a(Nh({saved:e,old:o,cur:I,next:b,sizeOf:r})),fonts:Vf,colours:t,settings:f?Uh.filter(b=>b!=="size"):Uh,auto:xL,openId:n===void 0?d:n,onOpenChange:s??p,readOnly:i,device:m?"phone":"desktop",fallback:b=>{let w=x.find(T=>T.id===(b.kind==="heading"?"heading-1":"body-1")),k={};return w?.values.font&&b.id!==w.id&&(k.font=w.values.font),b.kind==="heading"&&(k.weight=IL),k}})}var jh=["font","size","weight","emphasis"],yL=500;function bL({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 SL(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 Kh(e){let{headingWeight:o,open:t,onOpenChange:r,onChange:a,withoutSize:n=!1}=e,s=bL(e);return qh(gL,{label:l("Accent"),children:qh(hL,{style:s,fonts:Vf,settings:n?jh.filter(i=>i!=="size"):jh,auto:["size"],fallback:()=>({weight:o??yL}),open:t,onOpenChange:r,onChange:i=>SL(s,i).forEach(a)})})}import{Tabs as wL,Tooltip as b9,tabButtonId as vL,tabPanelId as kL}from"efficient-shell/ui";import{ContrastIcon as TL,NoteIcon as PL,SettingsIcon as FL,TypeIcon as EL}from"efficient-easel/icons";function Vh(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 OL}from"efficient-easel/screen/lib/document/preview-dom";import{useEasel as CL}from"efficient-easel/easel";function hl({themeFromDocument:e,persist:o}){let{appState:t,dispatch:r}=CL(R=>R),{fonts:a,setFonts:n,sizes:s,setSizes:i,headingCompression:f,setHeadingCompression:d,headingTypography:p,setHeadingTypography:m,textStyles:x,setTextStyles:I}=K(),b=t.data,w=b.root?.props??{},k=e?Or(w.fonts):a,T=e?hu:s,C=e?dt(w.headingCompression):f,y=e?vu(w.headingTypography):p,h={fonts:k,sizes:T,compression:C,typography:y},E=e?w.textStyles:x,F=R=>r({type:"replaceRoot",root:{...b.root,props:{...w,...R}},recordHistory:!0});return{fonts:k,sizes:T,compression:C,typography:y,old:h,saved:E,write:(R,P)=>{let D=jf(tt(R.saved,R.old),R.old);e?F({textStyles:R.saved,fonts:D.fonts,headingCompression:D.compression,headingTypography:D.typography}):(I(R.saved),n(D.fonts),i(D.sizes),d(D.compression),m(D.typography)),o(Mh(R,h),P)},writeRoot:F}}var Zf="sf-site-styles",LL="sf-site-styles-tabpanel",Qf=!1,RL="Show hints";function Jf({shown:e,onChange:o}){return ee("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:[ee(PL,{size:13}),l(RL)]})})}var Xh="text",dr=[{id:"basics",label:"Basics",icon:ee(FL,{})},{id:"theme",label:"Theme",icon:ee(TL,{})},{id:"text",label:"Text",icon:ee(EL,{})}];function AL({themeFromDocument:e,persist:o}){let{appState:t,dispatch:r}=Yh(d=>d),{theme:a,setTheme:n}=K(),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 ee(WI,{value:e?i.theme:a,onChange:f})}function BL({themeFromDocument:e,persist:o}){let[t,r]=Xf(null),{theme:a,setFonts:n,setSizes:s,setHeadingTypography:i}=K(),f=hl({themeFromDocument:e,persist:o}),{old:d,saved:p,writeRoot:m}=f,x=f.fonts,I=f.sizes,b=f.typography,w=F=>F.values.size??HL(_L[F.id]??"body")??NL[F.kind],k=F=>f.write(F),T=DL(a),C=F=>{let R={...x,accent:F};e?m({fonts:R}):n(R),o({accent_font:F})},y=F=>{s({...I,accent:F}),o({accent_size_px:F})},h=F=>{let R={...b,weightStrong:F};e?m({headingTypography:R}):i(R),o({heading_weight_strong:F})},E=F=>{let R={...b,italicStrong:F};e?m({headingTypography:R}):i(R),o({accent_italic:F})};return rt(Ot,{children:[ee($h,{saved:p,old:d,colours:T,sizeOf:w,onChange:k,openId:t===Yf?null:t,onOpenChange:r,withoutSize:e}),ee(Kh,{font:x.accent,size:I.accent,weight:b.weightStrong,italic:b.italicStrong,headingWeight:b.weight,open:t===Yf,onOpenChange:F=>r(F?Yf:null),onChange:F=>{F.key==="font"?C(F.value):F.key==="size"?y(F.value):F.key==="weight"?h(F.value):E(F.value)},withoutSize:e})]})}var Yf="accent";function DL(e){let o=Ut(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 _L={"heading-1":"heading","heading-2":"heading2","heading-3":"heading3","body-1":"body","body-5":"label"},NL={heading:32,body:14},ML={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 HL(e){if(typeof document>"u")return null;let o=(OL()?.contentDocument??document).querySelector(ML[e]);if(!o)return null;let t=parseFloat(getComputedStyle(o).fontSize);return Number.isFinite(t)?t:null}function WL({themeFromDocument:e,persist:o,showHint:t}){let{appState:r,dispatch:a}=Yh(x=>x),{cornerRadiusPx:n,setCornerRadiusPx:s}=K(),i=r.data,f=i.root?.props??{},d=f.cornerRadiusPx===void 0?yu[gu(f.cornerStyle)]:go(f.cornerRadiusPx),p=e?d:n,m=x=>a({type:"replaceRoot",root:{...i.root,props:{...f,...x}},recordHistory:!0});return ee(zI,{value:p,onChange:x=>{e?m({cornerRadiusPx:x}):s(x),o({corner_radius_px:x})},showHint:t})}function zL(e){return{site_width:e}}function GL({persist:e,showHint:o}){let{siteWidth:t,setSiteWidth:r,sectionBackgroundWidth:a,setSectionBackgroundWidth:n,sectionContentWidth:s,setSectionContentWidth:i}=K(),f=typeof t=="number"?t:me.default,d=x=>{r(x),e(zL(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(Ot,{children:[ee(rl,{value:a??"full",changed:a!==null,detail:l("Full width"),onChange:p,onReset:()=>p(null),hint:o?JI:void 0}),ee(al,{mode:s??"content",px:f,min:me.min,max:me.max,changed:typeof t=="number"||s!==null,detail:`${l("Content width")} ${me.default}px`,onMode:m,onPx:x=>d(x),onReset:()=>{m(null),d(null)},hint:o?eh:void 0})]})}function UL(e){return{block_gap:e}}function $L(e){return{site_gutter:e}}function qL({persist:e,showHint:o}){let{siteGutter:t,setSiteGutter:r}=K();return ee(XI,{value:t,onChange:a=>{r(a),e($L(a),a===null)},showHint:o})}function jL({persist:e,showHint:o}){let{blockGap:t,setBlockGap:r}=K();return ee(qI,{value:t,onChange:a=>{r(a),e(UL(a),a===null)},showHint:o})}function KL({persist:e,showHint:o=!0}){return rt(Ot,{children:[ee(GL,{persist:e,showHint:o}),ee(qL,{persist:e,showHint:o}),ee(jL,{persist:e,showHint:o})]})}function VL(e){return{card_shadow:e}}function YL(e){return e===null?{shadow_color:null}:{shadow_color:Cu(e)}}function XL(e){return{hover_effect:e}}function ZL({persist:e,showHint:o=!0}){let{cardShadow:t,setCardShadow:r,shadowColor:a,setShadowColor:n,hoverEffect:s,setHoverEffect:i}=K();return rt(Ot,{children:[ee(GI,{value:t,onChange:f=>{r(f),e(VL(f),!0)},showHint:o}),ee($I,{value:a,onChange:f=>{n(f),e(YL(f),f===null)},showHint:o}),ee(jI,{value:s,onChange:f=>{i(f),e(XL(f),!0)},showHint:o})]})}function QL(e){return{photography_grayscale:e}}function JL({persist:e,showHint:o}){let{photographyGrayscale:t,setPhotographyGrayscale:r}=K();return ee(VI,{value:t,onChange:a=>{r(a),e(QL(a),!0)},showHint:o})}function eR({persist:e,showHint:o=!0}){return ee(Ot,{children:ee(JL,{persist:e,showHint:o})})}function oR(e){return{share_button_on_posts:e}}function tR({persist:e,showHint:o=!0}){let{shareButtonOnPosts:t,setShareButtonOnPosts:r}=K();return ee(YI,{value:t,onChange:a=>{r(a),e(oR(a),!0)},showHint:o})}function ur(){let{websiteName:e}=K();return e?.trim()||Pu}function gl({themeFromDocument:e=!1,tokenRef:o,siteId:t,onNotify:r,tab:a,onTabChange:n}){let{persist:s}=Yt({themeFromDocument:e,tokenRef:o,siteId:t,onResult:w=>{let k=Vh(w);k&&r?.(k.msg,k.tone)}}),[i,f]=Xf(dr[0].id),d=a!==void 0,p=d?a:i,m=d?n??(()=>{}):f,x=dr.find(w=>w.id===p)??dr[0],[I,b]=Xf(Qf);return rt(Ot,{children:[ee(rR,{activeId:x.id,onSelect:m}),rt("div",{id:kL(Zf,x.id),className:LL,role:"tabpanel","aria-labelledby":vL(Zf,x.id),children:[p==="basics"&&rt(Ot,{children:[ee(WL,{themeFromDocument:e,persist:s,showHint:I}),!e&&ee(ZL,{persist:s,showHint:I}),!e&&ee(KL,{persist:s,showHint:I}),!e&&ee(eR,{persist:s,showHint:I}),!e&&ee(tR,{persist:s,showHint:I}),ee(Jf,{shown:I,onChange:b})]}),p==="theme"&&ee(AL,{themeFromDocument:e,persist:s}),p==="text"&&ee(BL,{themeFromDocument:e,persist:s})]})]})}function rR({activeId:e,onSelect:o}){return ee("div",{className:"es-insp-tabs",children:ee(wL,{variant:"underline",block:!0,labelsFit:!0,"aria-label":l("Styles"),idPrefix:Zf,value:e,onChange:o,items:dr.map(t=>{let r=l(t.label);return{id:t.id,icon:t.icon,label:r}})})})}import{InspectorIconButton as CR}from"efficient-easel/chrome";import{Button as ug,Dialog as wR,FormField as vR,Input as pg,PopupMenu as kR,PopupMenuItem as mg,toast as xg}from"efficient-shell/ui";import{LayersTree as TR,TreeGroupLabel as PR,TreeRow as Ig,TreeRowAction as Pl}from"efficient-easel/tree";import{AddIcon as FR,DuplicateIcon as ER,PageIcon as OR}from"efficient-easel/icons";import{PagesIcon as LR}from"efficient-easel/rail";import{useEaselHost as RR}from"efficient-easel/screen/lib/host";var ec="Main Pages",aR="Dynamic Pages",oc="dynamic",nR="dynamic";function tc(e){return e.kind===nR}function Zh(e){let o=[],t=[];for(let r of e){if(tc(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??ec,rows:[r]})}if(t.length){let r=o.findIndex(a=>a.key.startsWith("system:"));o.splice(r===-1?o.length:r,0,{key:oc,label:aR,rows:t})}return o}import{useEaselSession as AR}from"efficient-easel/screen/lib/session-context";import{useCallback as yl,useEffect as lR,useSyncExternalStore as sR}from"react";import{useScreenDocument as og}from"efficient-easel/screen/components/ScreenDocumentContext";var Qh=new WeakMap;function ra(e){let o=Qh.get(e);return o||(o={rows:null,loading:null,listeners:new Set},Qh.set(e,o)),o}function rc(e,o){e.rows=o;for(let t of e.listeners)t()}var bl=new Set;function Sl(e,o){o?bl.add(e):bl.delete(e)}function Jh(e){let o=ra(e),t=e.listPages().then(r=>rc(o,bl.size?r.filter(a=>!bl.has(a.id)):r),()=>rc(o,[])).finally(()=>{o.loading===t&&(o.loading=null)});return o.loading=t,t}var eg=()=>null,iR=()=>()=>{};function aa(){let{adapter:e,ready:o}=og(),t=yl(i=>{let{listeners:f}=ra(e);return f.add(i),()=>f.delete(i)},[e]),r=yl(()=>ra(e).rows,[e]),a=sR(o?t:iR,o?r:eg,eg);lR(()=>{if(!o)return;let i=ra(e);i.rows===null&&!i.loading&&Jh(e)},[e,o]);let n=yl(()=>o?Jh(e):Promise.resolve(),[e,o]),s=yl(i=>rc(ra(e),i),[e]);return{rows:a,reload:n,setRows:s,getRows:r}}function fR(e,o){return e?.find(t=>t.slug===o)?.label?.trim()||`/${o}`}function tg(){let{currentSlug:e}=og(),{rows:o}=aa();return fR(o,e)}import{useEaselSession as cR}from"efficient-easel/screen/lib/session-context";import{useScreenDocument as dR}from"efficient-easel/screen/components/ScreenDocumentContext";var uR=new Set(["normal","dynamic"]);function Cl(e){return!e.kind||uR.has(e.kind)}function wl(e,o){let t=mt(e)||"page";if(!o.has(t))return t;let r=2;for(;o.has(`${t}-${r}`);)r+=1;return`${t}-${r}`}function rg(e,o){return o.has(e)}function ag(e,o){return{title:`${e.label||e.slug} copy`,slug:wl(`${e.slug}-copy`,o)}}function vl(){let e=cR(),{siteId:o,templateId:t}=dR(),r=Ce(e).pages;if(!(!r.duplicate||t))return(a,n)=>r.duplicate(a.id,{...n,...o?{siteId:o}:{}})}import{jsx as Lt,jsxs as ng,Fragment as pR}from"react/jsx-runtime";import{useId as lg,useState as pr}from"react";import{Button as sg,Dialog as mR,FormField as ig,Input as fg,Stack as xR}from"efficient-shell/ui";function kl({source:e,taken:o,duplicate:t,onClose:r,onDuplicated:a}){let n=lg(),s=lg(),[i,f]=pr(null),[d,p]=pr(""),[m,x]=pr(""),[I,b]=pr(!1),[w,k]=pr(!1),[T,C]=pr(null);if(e!==i&&(f(e),e)){let F=ag(e,o);p(F.title),x(F.slug),b(!1),C(null)}let y=rg(m,o),h=!!(e&&d.trim()&&m&&!y&&!w),E=async()=>{if(!(!e||!h)){k(!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{k(!1)}}};return Lt(mR,{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:ng(pR,{children:[Lt(sg,{variant:"secondary",onClick:r,disabled:w,children:l("Cancel")}),Lt(sg,{onClick:()=>{E()},disabled:!h,loading:w,children:l("Duplicate page")})]}),children:ng(xR,{gap:4,children:[Lt(ig,{label:l("Title"),htmlFor:n,error:T??void 0,children:Lt(fg,{id:n,value:d,invalid:!!T,onChange:F=>{p(F.target.value),I||x(mt(F.target.value))},onKeyDown:F=>{F.key==="Enter"&&E()}})}),Lt(ig,{label:l("URL handle"),htmlFor:s,hint:y?void 0:l("URL: /{slug}",{slug:m}),error:y?l("Another page uses this URL handle."):void 0,children:Lt(fg,{id:s,value:m,invalid:y,onChange:F=>{b(!0),x(mt(F.target.value))},onKeyDown:F=>{F.key==="Enter"&&E()}})})]})})}var hg="sf-editor-pages-collapsed-groups";function gg({onNavigate:e,onClose:o,activeSurface:t,onPreviewSurface:r}){let a=AR().chrome?.pageRows,n=RR(),{adapter:s,capabilities:i,ready:f,currentSlug:d}=bR(),p=ur(),{rows:m,reload:x,setRows:I,getRows:b}=aa(),[w,k]=at(""),[T,C]=at(!1),[y,h]=at(null),[E,F]=at(!1),[R,P]=at(""),D=gR(),M=vl(),[v,L]=at(null),[_,B]=at(()=>{if(typeof window>"u")return new Set;try{let A=window.localStorage.getItem(hg);return new Set(A?JSON.parse(A):[])}catch{return new Set}});hR(()=>{try{window.localStorage.setItem(hg,JSON.stringify([..._]))}catch{}},[_]);let $=A=>B(q=>{let j=new Set(q);return j.has(A)?j.delete(A):j.add(A),j}),J=dg(()=>Zh(m??[]),[m]),oe=w.trim().toLowerCase(),so=A=>!oe||A.toLowerCase().includes(oe),io=A=>oe?!0:!_.has(A),Re=dg(()=>new Set((m??[]).map(A=>A.slug)),[m]),fo=()=>{if(i.pageCreationInAdminForm){n.send("storefront-editor:new-page");return}P(""),h(null),F(!0)},Ne=async()=>{let A=R.trim();if(!(!A||!f||T||!s.createPage)){C(!0),h(null);try{let q=await s.createPage({slug:wl(A,Re),title:A,layout:{}});await x(),F(!1),P(""),e(q.slug)}catch{h(l("Couldn\u2019t add the page \u2014 please retry."))}finally{C(!1)}}},Pe=i.hasSiteSettings&&!!s.createPage,Ie=async()=>{if(!(!f||T||!s.createPage)){C(!0),h(null);try{let A=await s.createPage(_m(l("New popup"),Re));await x(),e(A.slug)}catch{h(l("Couldn\u2019t add the popup \u2014 please retry."))}finally{C(!1)}}},ge=yR(null),[Me,Fe]=at(null),co=()=>{if(!Pe)return fo();if(Me)return Fe(null);let A=ge.current?.getBoundingClientRect();A&&Fe({top:A.bottom+6,right:Math.max(8,window.innerWidth-A.right)})},He=A=>{let q=m??[],j=s.deletePage;if(!f||T||!j||q.length<=1)return;let Ae=q.findIndex(Ee=>Ee.id===A.id),xo=q.filter(Ee=>Ee.id!==A.id),Xe=A.slug===d;Sl(A.id,!0),I(xo),h(null),Xe&&xo[0]&&e(xo[0].slug);let Wt=()=>{Sl(A.id,!1);let Ee=b()??[];if(Ee.some(ja=>ja.id===A.id))return;let Ro=[...Ee];Ro.splice(Math.max(0,Math.min(Ae,Ro.length)),0,A),I(Ro)};xg.undoable(l("Deleted \u201C{name}\u201D",{name:A.label}),{actionLabel:l("Undo"),commit:async Ee=>{await j(A.id,Ee),Sl(A.id,!1)},undo:()=>{Wt(),Xe&&e(A.slug)},onFail:()=>{Wt(),xg.error(l("Couldn\u2019t delete the page \u2014 please retry."))}})},Ue=A=>n.send("storefront-editor:open-page",{slug:A}),uo=A=>{if(!so(A.label))return null;let q=!t&&A.slug===d,j=i.canDeletePagesInline&&(m??[]).length>1,Ae=tc(A),xo=A.kind==="lightbox",Xe=[...Ae?[{label:l("Dynamic"),tone:"info"}]:[],...xo?[{label:l("Lightbox"),tone:"success"}]:[],...A.draft?[{label:l("draft"),tone:"draft"}]:[]],Wt=Xe.length>0?Xe:void 0,Ee=!!M&&Cl(A),Ro=Ee||i.pageCreationInAdminForm||j?na(cg,{children:[Ee&&re(Pl,{kind:"plain",label:l("Duplicate \u201C{name}\u201D",{name:A.label}),disabled:T,onClick:()=>L(A),children:re(ER,{size:13})}),i.pageCreationInAdminForm&&re(Pl,{kind:"plain",label:l("Edit \u201C{name}\u201D in {place}",{name:A.label,place:l("the admin")}),onClick:()=>Ue(A.slug),children:re(Tl,{name:"pencil",size:13,strokeWidth:1.7,rounded:!0})}),j&&re(Pl,{kind:"delete",label:l("Delete \u201C{name}\u201D",{name:A.label}),disabled:T,onClick:()=>He(A),children:re(Tl,{name:"trash",size:13,strokeWidth:1.7,rounded:!0})})]}):void 0;return re(Ig,{icon:re(OR,{size:14}),name:A.label,selected:q,onSelect:()=>e(A.slug),badge:Wt,actions:Ro,rowProps:{"data-page-slug":A.slug}},A.id)},po=(A,q,j)=>{let Ae=j.filter(Boolean);if(Ae.length===0)return null;let xo=io(A);return na(IR,{children:[re(PR,{count:Ae.length,expanded:xo,onToggle:()=>$(A),children:q}),xo&&Ae]},A)},Lo=(a?.rows??[]).filter(A=>so(A.label)).map(A=>{let q=t===A.key;return re(Ig,{icon:A.icon,name:A.label,selected:q,onSelect:()=>r(A.key),badge:{label:l("Preview"),tone:"warning"},actions:re(Pl,{kind:"plain",label:l("Open the {name} in a new tab",{name:A.label}),onClick:()=>window.open(A.href,"_blank","noopener,noreferrer"),children:re(Tl,{name:"external-link",size:13,strokeWidth:1.7,rounded:!0})}),rowProps:{"data-shop-surface":A.key}},A.key)}),Ye=i.hasSiteSettings&&!!a,mo=(()=>{if(m===null)return null;let A=[],q=!1;for(let j of J){Ye&&!q&&j.key.startsWith("system:")&&(A.push(po("shop",a.title,Lo)),q=!0);let Ae=j.key===oc||j.label===ec?l(j.label):j.label;A.push(po(j.key,Ae,j.rows.map(uo)))}return Ye&&!q&&A.push(po("shop",a.title,Lo)),A})();return na("div",{className:"sf-pages",children:[re(SR,{icon:re(LR,{}),title:l("Pages"),context:p,actions:re(CR,{buttonRef:ge,label:Pe?l("Add"):l("New page"),hasPopup:Pe?"menu":void 0,expanded:Pe?Me!==null:void 0,onClick:co,children:re(FR,{size:15})})}),Me&&re(kR,{portal:!0,style:{top:Me.top,right:Me.right},onClose:()=>Fe(null),children:na("div",{role:"menu","aria-label":l("Add"),children:[re(mg,{role:"menuitem",onClick:()=>{Fe(null),fo()},children:l("Page")}),re(mg,{role:"menuitem",disabled:T,onClick:()=>{Fe(null),Ie()},children:l("Popup")})]})}),re("div",{className:"sf-pages-find",children:re(pg,{type:"search",leftIcon:re(Tl,{name:"search",size:14,rounded:!0}),placeholder:l("Search all pages\u2026"),value:w,onChange:A=>k(A.target.value),"aria-label":l("Search all pages")})}),y&&!E&&re("div",{className:"sf-note sf-note--error",role:"alert",children:y}),mo===null?re("div",{className:"sf-note",children:l("Loading\u2026")}):mo.some(Boolean)?re(TR,{ariaLabel:l("Pages"),className:"sf-scroll",children:mo}):re("div",{className:"sf-note",children:w.trim()?l("No pages match your search"):l("No pages yet. Add one with + above.")}),M&&re(kl,{source:v,taken:Re,duplicate:M,onClose:()=>L(null),onDuplicated:A=>{L(null),x(),e(A.slug)}}),re(wR,{open:E,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(cg,{children:[re(ug,{variant:"secondary",onClick:()=>F(!1),children:l("Cancel")}),re(ug,{onClick:()=>{Ne()},disabled:T||!R.trim(),loading:T,children:l("Add page")})]}),children:re(vR,{label:l("Page name"),htmlFor:D,hint:R.trim()?l("URL: /{slug}",{slug:wl(R,Re)}):void 0,error:y??void 0,children:re(pg,{id:D,value:R,invalid:!!y,onChange:A=>P(A.target.value),onKeyDown:A=>{A.key==="Enter"&&Ne()},placeholder:l("e.g. About")})})})]})}import{jsx as BR}from"react/jsx-runtime";import{createContext as DR,useCallback as _R,useContext as NR,useState as MR}from"react";import{useSelectHandler as HR}from"efficient-easel/draw/client";var Fl=["chat-bubble-left-right","chat-bubble-oval-left-ellipsis","chat","megaphone","phone","sparkles"],mr=Fl[0];var Rt="right";function El(e){return Fl.includes(e??"")?e:mr}function yg(e){return e==="left"?"left":Rt}function bg(e){return/^#[0-9a-fA-F]{6}$/.test(e??"")?e.toLowerCase():""}var Ol={enabled:!0,title:"",subtitle:"",greeting:"",launcherColor:"",launcherIcon:"",launcherPosition:Rt,launcherLabel:"",showOnPhones:!0};function gj(e){return{enabled:e.enabled,title:e.title,subtitle:e.subtitle,greeting:e.greeting,launcherColor:bg(e.launcherColor),launcherIcon:e.launcherIcon?El(e.launcherIcon):"",launcherPosition:yg(e.launcherPosition),launcherLabel:e.launcherLabel??"",showOnPhones:e.showOnPhones!==!1}}var Sg=DR({chat:Ol,setChat:()=>{},selected:!1,setSelected:()=>{},select:()=>{},setSelectHandler:()=>{}});function yj({children:e,chat:o=Ol,onChatChange:t}){let[r,a]=MR(!1),n=_R(f=>t?.(f),[t]),{select:s,setSelectHandler:i}=HR();return BR(Sg.Provider,{value:{chat:o,setChat:n,selected:r,setSelected:a,select:s,setSelectHandler:i},children:e})}var Ll=()=>NR(Sg);import{jsx as ac}from"react/jsx-runtime";import{DesktopIcon as WR,PhoneIcon as zR,TabletIcon as GR}from"efficient-easel/icons";import{VIEW_TIERS as UR,VIEW_TIER_LABEL as $R}from"efficient-easel/draw";var qR={desktop:ac(WR,{}),tablet:ac(GR,{}),mobile:ac(zR,{})},Cg=UR.map(e=>({id:e,get label(){return l($R[e])},icon:qR[e]}));import{PreviewDeviceContext as f5}from"efficient-easel/draw/client";import{jsx as jR}from"react/jsx-runtime";import{createContext as KR,useCallback as wg,useContext as VR,useMemo as YR,useRef as XR}from"react";var ZR=Object.fromEntries(Xa.map(e=>[e,{value:"",error:null}])),vg=KR({links:Eu,rows:ZR,canSave:!1,saveLink:async()=>({ok:!1,error:"There is no website to save to."}),openPanel:()=>{},setOpenHandler:()=>{}});function Ej({children:e,value:o}){let t=XR(()=>{}),r=wg(()=>t.current(),[]),a=wg(s=>{t.current=s},[]),n=YR(()=>({...o,openPanel:r,setOpenHandler:a}),[o,r,a]);return jR(vg.Provider,{value:n,children:e})}var la=()=>VR(vg);import{jsx as QR}from"react/jsx-runtime";import{createContext as JR,useContext as eA,useMemo as oA,useState as tA}from"react";var kg=JR(null);function Aj({children:e}){let[o,t]=tA(null),r=oA(()=>({surface:o,setSurface:t}),[o]);return QR(kg.Provider,{value:r,children:e})}function Tg(){return eA(kg)??{surface:null,setSurface:()=>{}}}import{createPreviewSelectionContext as rA}from"efficient-easel/draw/client";var sa="Scrolling Bar",{Provider:_j,useSelection:Pg}=rA("selectedHeroId");import{createPreviewSelectionContext as aA}from"efficient-easel/draw/client";var{Provider:Hj,useSelection:Rl}=aA("selectedHeroPart");import{isShown as CA,lazyShowWhenContext as wA}from"efficient-shell/format";var ia="product",nA="recordType",lA={key:ia,label:"Product",fields:[]},sA=/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,iA=/^[a-z][A-Za-z0-9]*$/,fA=["text","date"],Fg=new Map,Eg=0;function cA(e){if(typeof e.key!="string"||!sA.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"||!iA.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(!fA.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 zj(e){let o=e.map(cA);for(let t of o)Fg.set(t.key,t);o.length&&(Eg+=1)}function Gj(){return[lA,...Fg.values()]}function Uj(){return Eg}function dA(e){let o=e?.[nA];return typeof o!="string"?ia:o.trim()||ia}function nc(e){return dA(e)===ia}var lc="product",uA="tyre";var pA="productType",mA={[lc]:"alloy-wheel",[uA]:"tyre"},xA=["alloy-wheel","tyre"];function Og(e,o){return nc(o)?IA(o)??mA[e]??null:null}function IA(e){if(!nc(e))return null;let o=e?.[pA];return typeof o=="string"&&xA.includes(o)?o:null}var Al=null,Lg=null;function hA(e,o){Al=e,Lg=o}function Vj(e){hA(e,null)}function Yj(){return Al}function Rg(){return Lg==="dynamic"||Al===lc}function Xj(e){return Og(Al??"",e)??"alloy-wheel"}import{addShowWhenFacts as gA}from"efficient-shell/format";import{showWhenOf as sc,shownForOption as yA,truthy as bA,withRowRules as SA,withRowsShownWhen as Bl,withShowWhen as Dl}from"efficient-shell/format";var eK=gA;function Bg(e,o,t){let r=!1,a={};for(let[n,s]of Object.entries(e))CA(sc(s),o??{},t)?a[n]=s:r=!0;return r?a:e}function Dg(e,o,t,r){let a=Ja(o,t,r);return{device:e,parentType:a?.item.type,parent:a?.item.props}}function Ag(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 Ag(t.not,o);for(let r of[t.all,t.any])if(Array.isArray(r)&&r.some(a=>Ag(a,o)))return!0;return!1}function sK(e,o={}){return wA({parentType:()=>e.parent?.type??void 0,parent:()=>e.parent?.props??void 0,dynamicPage:()=>Rg(),root:()=>e.appState?.data?.root?.props,...o})}var Ng=["one","side","stacked"];var fK={one:"One",side:"Side by side",stacked:"Stacked"};function Mg(e){return Ng.includes(e)?e:"one"}function _g(e){return e==="one"?1:2}function vA(e,o){if(Ng.includes(e))return e;let t=Mg(o);return t==="side"?"stacked":t}function ic(e){let o=Mg(e.mediaLayout);return Math.max(_g(o),_g(vA(e.mediaLayoutPhone,o)))}var fa=["media","image","image2"],xr={media:"Media",image:"Image",image2:"Image 2"},ca={media:"heroMedia",image:"heroImage",image2:"heroImage2"};function _l(e,o){return e==="image"&&ic(o)>1?"Image 1":xr[e]}var pK="Video file",mK="Upload a video file";function kA(e,o){return{field:"mediaType",is:e,default:o}}var TA=new Set(["HeroSingle"]),Hg="heroPart";function PA(e,o){return{...o,[Hg]:e}}function xK(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]=Dl(n[i],kA(s,r));for(let[s,i]of Object.entries(a??{}))i&&(n[s]=Dl(n[s],i));for(let s of fa)for(let i of o[s]??[])n[i]=PA(s,n[i]);return n}function FA(e){let o=e?.[Hg];return fa.includes(o)?o:null}function Wg(e,o){let t={};for(let[r,a]of Object.entries(e))FA(a)===o&&(t[r]=a);return t}function zg(e){if(!TA.has(e.type))return[];let o=[{part:"media",label:xr.media,depth:0}];return(e.props.mediaType??"image")!=="video"&&(o.push({part:"image",label:_l("image",e.props),depth:1}),ic(e.props)>1&&o.push({part:"image2",label:_l("image2",e.props),depth:1})),o}function da(e,o){return`${e}::${o}`}function Gg(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 IK="data-sf-hero-part";import{jsx as Q,jsxs as nt,Fragment as ts}from"react/jsx-runtime";import{useState as Sb}from"react";import{useEasel as uN}from"efficient-easel/easel";import{headWords as vb,InspectorHead as pN,InspectorIconButton as id}from"efficient-easel/chrome";import{DuplicateIcon as Cb,TrashIcon as mN}from"efficient-easel/icons";import{panelFieldsOf as xN}from"efficient-easel/screen/lib/document/panel-fields";import{jsx as O,Fragment as Y,jsxs as X}from"react/jsx-runtime";import{BlockBannerIcon as LA,BlockBoxIcon as RA,BlockButtonIcon as AA,BlockDividerIcon as $g,BlockFooterIcon as qg,BlockHeadingIcon as BA,BlockProductIcon as DA,BlockSocialIcon as _A,BlockTextIcon as NA,ChatIcon as MA,GridIcon as HA,ImageIcon as cc,MediaIcon as WA,PageIcon as zA}from"efficient-easel/icons";import{jsx as fc,Fragment as EA,jsxs as OA}from"react/jsx-runtime";var Ug=OA(EA,{children:[fc("circle",{cx:"9",cy:"20",r:"1.3"}),fc("circle",{cx:"18",cy:"20",r:"1.3"}),fc("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 GA={header:X(Y,{children:[O("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),O("path",{d:"M3 9.5h18"})]}),website:X(Y,{children:[O("circle",{cx:"12",cy:"12",r:"9"}),O("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:X(Y,{children:[O("circle",{cx:"6",cy:"12",r:"2.5"}),O("circle",{cx:"18",cy:"6",r:"2.5"}),O("circle",{cx:"18",cy:"18",r:"2.5"}),O("path",{d:"M8.2 10.8l7.6-3.6M8.2 13.2l7.6 3.6"})]}),ticker:X(Y,{children:[O("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),O("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),FooterLogo:X(Y,{children:[O("path",{d:"M4 15.5h6M4 18h4"}),O("path",{d:"M14 8.5l3 7 3-7"})]}),FooterMenu:O("path",{d:"M6 7h12M6 11h12M6 15h8M6 19h8"}),FooterGroup:X(Y,{children:[O("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",strokeDasharray:"3 2.5"}),O("path",{d:"M8 9h8M8 13h8M8 16h5"})]}),FooterText:O("path",{d:"M5 7h14M5 12h14M5 17h9"}),FooterEmailSignup:X(Y,{children:[O("rect",{x:"3",y:"6",width:"18",height:"12",rx:"2"}),O("path",{d:"M3.5 7l8.5 6 8.5-6"})]}),SearchBlock:X(Y,{children:[O("circle",{cx:"11",cy:"11",r:"6"}),O("path",{d:"M20 20l-4.2-4.2"})]}),CartBlock:Ug,CountrySwitchBlock:X(Y,{children:[O("circle",{cx:"12",cy:"12",r:"8.5"}),O("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:X(Y,{children:[O("circle",{cx:"12",cy:"8",r:"4"}),O("path",{d:"M4.5 20c.8-3.8 3.8-6 7.5-6s6.7 2.2 7.5 6"})]}),ThemeSwitchBlock:X(Y,{children:[O("circle",{cx:"12",cy:"12",r:"8.5"}),O("path",{d:"M12 3.5v17M12 5.5l6 6M12 10.5l5.2 5.2M12 15.5l2.8 2.8"})]}),LegalLineBlock:X(Y,{children:[O("path",{d:"M3 9h18"}),O("path",{d:"M3 14h8M14 14h2M18 14h3"})]}),Hero:X(Y,{children:[O("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),O("path",{d:"M7 13.5h7M7 16.5h10"})]}),HeroSlide:X(Y,{children:[O("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),O("path",{d:"M7 15h6M16 9.5h.01M9.5 12l-2.5 3"})]}),HeroSingle:X(Y,{children:[O("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),O("path",{d:"M10.5 8.5l4 2.5-4 2.5z"}),O("path",{d:"M7 17h7"})]}),Collections:X(Y,{children:[O("rect",{x:"3",y:"5",width:"4.6",height:"14",rx:"1.3"}),O("rect",{x:"9.7",y:"5",width:"4.6",height:"14",rx:"1.3"}),O("rect",{x:"16.4",y:"5",width:"4.6",height:"14",rx:"1.3"})]}),CollectionCard:X(Y,{children:[O("rect",{x:"6",y:"4",width:"12",height:"16",rx:"2"}),O("path",{d:"M9 15h6M9 17.5h4"})]}),AlloyWheelsListing:X(Y,{children:[O("path",{d:"M3 5h5M3 9h5M3 13h5M3 17h5"}),O("rect",{x:"11.5",y:"5",width:"4.2",height:"5",rx:"1"}),O("rect",{x:"17.3",y:"5",width:"4.2",height:"5",rx:"1"}),O("rect",{x:"11.5",y:"12",width:"4.2",height:"5",rx:"1"}),O("rect",{x:"17.3",y:"12",width:"4.2",height:"5",rx:"1"})]}),CatalogFilterBar:X(Y,{children:[O("path",{d:"M3 7h9M15.5 7H21"}),O("circle",{cx:"13.5",cy:"7",r:"1.7"}),O("path",{d:"M3 12h4M10.5 12H21"}),O("circle",{cx:"8.5",cy:"12",r:"1.7"}),O("path",{d:"M3 17h9M15.5 17H21"}),O("circle",{cx:"13.5",cy:"17",r:"1.7"})]}),ProductGrid:X(Y,{children:[O("rect",{x:"3",y:"5",width:"4.8",height:"6",rx:"1"}),O("rect",{x:"9.6",y:"5",width:"4.8",height:"6",rx:"1"}),O("rect",{x:"16.2",y:"5",width:"4.8",height:"6",rx:"1"}),O("rect",{x:"3",y:"13",width:"4.8",height:"6",rx:"1"}),O("rect",{x:"9.6",y:"13",width:"4.8",height:"6",rx:"1"}),O("rect",{x:"16.2",y:"13",width:"4.8",height:"6",rx:"1"})]}),RelatedProducts:X(Y,{children:[O("path",{d:"M3 5h10"}),O("rect",{x:"3",y:"9.5",width:"5",height:"9",rx:"1"}),O("rect",{x:"9.5",y:"9.5",width:"5",height:"9",rx:"1"}),O("rect",{x:"16",y:"9.5",width:"5",height:"9",rx:"1"})]}),Gallery:X(Y,{children:[O("rect",{x:"3",y:"4",width:"11",height:"16",rx:"2"}),O("rect",{x:"15.5",y:"4",width:"5.5",height:"7.5",rx:"1.5"}),O("rect",{x:"15.5",y:"12.5",width:"5.5",height:"7.5",rx:"1.5"})]}),GalleryB:X(Y,{children:[O("rect",{x:"3.5",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),O("rect",{x:"13",y:"4",width:"7.5",height:"7.5",rx:"1.5"}),O("rect",{x:"3.5",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"}),O("rect",{x:"13",y:"12.5",width:"7.5",height:"7.5",rx:"1.5"})]}),GalleryItem:X(Y,{children:[O("rect",{x:"4",y:"5",width:"16",height:"14",rx:"2"}),O("circle",{cx:"9",cy:"10",r:"1.6"}),O("path",{d:"M20 15.5l-4.5-4L7 19"})]}),Events:X(Y,{children:[O("rect",{x:"4",y:"5",width:"16",height:"15",rx:"2"}),O("path",{d:"M4 9.5h16M8.5 3v4M15.5 3v4M8 14h2M14 14h2"})]}),PostCard:X(Y,{children:[O("rect",{x:"4",y:"3.5",width:"16",height:"17",rx:"2"}),O("rect",{x:"6.5",y:"6",width:"11",height:"6",rx:"1"}),O("path",{d:"M6.5 14.5h11M6.5 17.5h7"})]}),Manifesto:X(Y,{children:[O("path",{d:"M7 8h3.2v4c0 1.6-1 2.6-3 3.2"}),O("path",{d:"M14 8h3.2v4c0 1.6-1 2.6-3 3.2"})]}),Stats:X(Y,{children:[O("path",{d:"M3.5 20h17"}),O("path",{d:"M6 20v-7M11 20V7M16 20v-5M20.5 20v-9"})]}),Logos:X(Y,{children:[O("circle",{cx:"6",cy:"12",r:"2.6"}),O("rect",{x:"10",y:"9.4",width:"5.2",height:"5.2",rx:"1.2"}),O("path",{d:"M19 9.2l2.4 5h-4.8z"})]}),Ticker:X(Y,{children:[O("rect",{x:"3",y:"8.5",width:"18",height:"7",rx:"2"}),O("path",{d:"M6 12h3.5M11.5 12h2M15.5 12h2.5"})]}),SectionHeader:X(Y,{children:[O("rect",{x:"3.5",y:"6",width:"5",height:"5",rx:"1.2"}),O("path",{d:"M11 8.5h9M3.5 15.5h17"})]}),IntroBleed:X(Y,{children:[O("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),O("path",{d:"M3 13.5h18M7 16.8h6"})]}),Split:X(Y,{children:[O("rect",{x:"3",y:"5",width:"8",height:"14",rx:"1.5"}),O("path",{d:"M14 8.5h6M14 12h6M14 15.5h4"})]}),Eyebrow:X(Y,{children:[O("path",{d:"M4 8.5h4.5M11 8.5h9"}),O("path",{d:"M4 14.5h16"})]}),HeroGroup:X(Y,{children:[O("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2"}),O("path",{d:"M7 9h8M7 12.5h10M7 16h6"})]}),Form:X(Y,{children:[O("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),O("path",{d:"M6.5 9h11M6.5 12.5h11"}),O("rect",{x:"6.5",y:"15",width:"6.5",height:"2.6",rx:"1.3"})]}),LogoBlock:O(Y,{children:O("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:X(Y,{children:[O("path",{d:"M12 4v6M9.5 6.5L12 4l2.5 2.5M12 20v-6M9.5 17.5L12 20l2.5-2.5"}),O("path",{d:"M5 13h14",strokeDasharray:"2 2.5"})]}),ContactRouting:X(Y,{children:[O("rect",{x:"3",y:"4",width:"5",height:"5",rx:"1"}),O("rect",{x:"9.5",y:"4",width:"5",height:"5",rx:"1"}),O("rect",{x:"16",y:"4",width:"5",height:"5",rx:"1"}),O("path",{d:"M4 13.5h11M4 17.5h7"}),O("path",{d:"M17 15l3 2-3 2"})]}),CustomHTML:O("path",{d:"M9 8l-4 4 4 4M15 8l4 4-4 4"})},UA=O("rect",{x:"4",y:"4",width:"16",height:"16",rx:"2.5"}),$A={footer:qg,Footer:qg,Divider:$g,FooterDivider:$g,Banner:LA,Flex:RA,FooterSocial:_A,page:zA,chat:MA,Heading:BA,Text:NA,ImageBlock:cc,ButtonBlock:AA,Grid:HA,ProductRef:DA,heroMedia:WA,heroImage:cc,heroImage2:cc},qA={MenuBlock:"FooterMenu",EmailFormBlock:"FooterEmailSignup",SocialLogosBlock:"FooterSocial",SiteHeader:"header",SiteFooter:"footer"};function At({type:e,size:o=16,className:t}){let r=qA[e]??e,a=$A[r];return a?O(a,{size:o,className:t}):O("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:GA[r]??UA})}import{PanelHideButton as fd}from"efficient-easel/screen/components/SidePanelHead";import{useEaselSession as IN}from"efficient-easel/screen/lib/session-context";import{jsx as ae,jsxs as ua,Fragment as jA}from"react/jsx-runtime";import{useEffect as KA,useId as jg,useState as VA}from"react";import{IconPicker as YA}from"efficient-shell/ui";import{SettingsDefaultReset as XA,SettingsField as pa,SettingsSegmented as ZA,SettingsSwitch as Kg}from"efficient-easel/panel";import*as QA from"efficient-easel/icons";import{ButtonIcon as JA,ButtonIconIcon as eB,EyeIcon as oB,PhoneIcon as tB,PlacementIcon as rB,TypeIcon as aB}from"efficient-easel/icons";var nB="Chat with us",lB="We usually reply within a few minutes",sB="Hi! Ask us anything \u2014 about a wheel, an order, or fitment. Leave your details and we\u2019ll reply.";function Nl({label:e,value:o,placeholder:t,onCommit:r,multiline:a=!1,hint:n}){let[s,i]=VA(o);KA(()=>i(o),[o]);let f=()=>{s!==o&&r(s)};return ae(pa,{label:e,icon:ae(aB,{}),changed:o!=="",action:ae(ma,{label:e,changed:o!=="",onReset:()=>r("")}),hint:n,children:a?ae("textarea",{value:s,placeholder:t,rows:3,onChange:d=>i(d.target.value),onBlur:f,"aria-label":e}):ae("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 ae(XA,{words:Z()?.panel,label:e,changed:o,onReset:t})}function iB({label:e,icon:o,checked:t,fallback:r,onChange:a,hint:n}){let s=jg();return ae(pa,{label:e,labelId:s,icon:o,changed:t!==r,action:ua("span",{className:"inline-flex items-center gap-2",children:[ae(Kg,{checked:t,onChange:a,ariaLabelledBy:s}),ae(ma,{label:e,changed:t!==r,onReset:()=>a(r)})]}),hint:n})}function fB(e){let o=e.replace(/(^|-)([a-z])/g,(r,a,n)=>n.toUpperCase()),t=QA[`${o}Icon`];return t?ae(t,{size:16}):null}var cB=Fl.map(e=>({value:e,icon:fB(e)}));function dB(){let{theme:e}=K(),o=We(e).themes[0];return Lr(o)??o?.accent??""}function Vg(){let{chat:e,setChat:o}=Ll(),t=jg(),r=dB(),a=e.launcherIcon?El(e.launcherIcon):mr;return ua(jA,{children:[ae(pa,{label:l("Show the chat bubble"),labelId:t,icon:ae(oB,{}),changed:!e.enabled,action:ua("span",{className:"inline-flex items-center gap-2",children:[ae(Kg,{checked:e.enabled,onChange:n=>o({enabled:n}),ariaLabelledBy:t}),ae(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(cf,{title:l("Look"),children:[ae(je,{label:l("Button color"),icon:ae(JA,{}),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:""})}),ae(pa,{label:l("Icon"),icon:ae(eB,{}),changed:a!==mr,action:ae(ma,{label:l("Icon"),changed:a!==mr,onReset:()=>o({launcherIcon:""})}),children:ae(YA,{label:l("Icon"),value:a,options:cB,onChange:n=>o({launcherIcon:n===mr?"":n})})}),ae(pa,{label:l("Position"),icon:ae(rB,{}),changed:e.launcherPosition!==Rt,action:ae(ma,{label:l("Position"),changed:e.launcherPosition!==Rt,onReset:()=>o({launcherPosition:Rt})}),children:ae(ZA,{options:[{label:l("Right"),id:"right"},{label:l("Left"),id:"left"}],value:e.launcherPosition,ariaLabel:l("Position"),onChange:n=>o({launcherPosition:n})})}),ae(Nl,{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")}),ae(iB,{label:l("Show on phones"),icon:ae(tB,{}),checked:e.showOnPhones,fallback:Ol.showOnPhones,onChange:n=>o({showOnPhones:n})})]}),ua(cf,{title:l("Wording"),children:[ae(Nl,{label:l("Title"),value:e.title,placeholder:nB,onCommit:n=>o({title:n})}),ae(Nl,{label:l("Subtitle"),value:e.subtitle,placeholder:lB,onCommit:n=>o({subtitle:n})}),ae(Nl,{label:l("Greeting message"),value:e.greeting,placeholder:sB,onCommit:n=>o({greeting:n}),multiline:!0}),ae("p",{className:"es-field-hint sf-hint-keep",children:l("Leave a field blank to use the built-in wording.")})]})]})}import{jsx as Bt,Fragment as Rc,jsxs as Jg}from"react/jsx-runtime";import{useEffect as zB,useId as Zg,useState as Qg}from"react";import{SettingsField as GB}from"efficient-easel/panel";import{jsx as RB}from"react/jsx-runtime";import{forwardRef as uB,createElement as dc}from"react";var Yg={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=uB(({color:n="currentColor",size:s=24,stroke:i=2,title:f,className:d,children:p,...m},x)=>dc("svg",{ref:x,...Yg[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&&dc("title",{key:"svg-title"},f),...r.map(([I,b])=>dc(I,b)),...Array.isArray(p)?p:[p]]));return a.displayName=`${t}`,a};var pB=[["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"}]],uc=U("outline","brand-facebook","BrandFacebook",pB);var mB=[["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"}]],pc=U("outline","brand-instagram","BrandInstagram",mB);var xB=[["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"}]],mc=U("outline","brand-line","BrandLine",xB);var IB=[["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"}]],xc=U("outline","brand-linkedin","BrandLinkedin",IB);var hB=[["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"}]],Ic=U("outline","brand-pinterest","BrandPinterest",hB);var gB=[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]],hc=U("outline","brand-telegram","BrandTelegram",gB);var yB=[["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"}]],gc=U("outline","brand-tiktok","BrandTiktok",yB);var bB=[["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"}]],yc=U("outline","brand-wechat","BrandWechat",bB);var SB=[["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"}]],bc=U("outline","brand-whatsapp","BrandWhatsapp",SB);var CB=[["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"}]],Sc=U("outline","brand-x","BrandX",CB);var wB=[["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"}]],Cc=U("outline","brand-youtube","BrandYoutube",wB);var vB=[["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"}]],wc=U("filled","brand-facebook-filled","BrandFacebookFilled",vB);var kB=[["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"}]],vc=U("filled","brand-instagram-filled","BrandInstagramFilled",kB);var TB=[["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"}]],kc=U("filled","brand-linkedin-filled","BrandLinkedinFilled",TB);var PB=[["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"}]],Tc=U("filled","brand-pinterest-filled","BrandPinterestFilled",PB);var FB=[["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"}]],Pc=U("filled","brand-tiktok-filled","BrandTiktokFilled",FB);var EB=[["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"}]],Fc=U("filled","brand-whatsapp-filled","BrandWhatsappFilled",EB);var OB=[["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"}]],Ec=U("filled","brand-x-filled","BrandXFilled",OB);var LB=[["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"}]],Oc=U("filled","brand-youtube-filled","BrandYoutubeFilled",LB);var VV="outline",Ml={fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},AB={},Lc={fillRule:"evenodd"},BB=[["path",{...Ml,d:"M21 4L3 11L7 13L9 19L12 15L17 20z"}],["path",{...Lc,d:"M21 4L3 11L7 13L9 19L12 15L17 20zM15.212 8.939 10.576 13.576 11.424 14.424 16.061 9.788z"}]],DB=[["path",{...Ml,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",{...AB,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("")}]],_B=[["path",{...Ml,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",{...Ml,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",{...Lc,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",{...Lc,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("")}]],NB=U("filled","brand-telegram-filled","BrandTelegramFilled",BB),MB=U("filled","brand-line-filled","BrandLineFilled",DB),HB=U("filled","brand-wechat-filled","BrandWechatFilled",_B),WB={instagram:{outline:pc,solid:vc},facebook:{outline:uc,solid:wc},tiktok:{outline:gc,solid:Pc},youtube:{outline:Cc,solid:Oc},x:{outline:Sc,solid:Ec},linkedin:{outline:xc,solid:kc},pinterest:{outline:Ic,solid:Tc},whatsapp:{outline:bc,solid:Fc},telegram:{outline:hc,solid:NB},line:{outline:mc,solid:MB},wechat:{outline:yc,solid:HB}};function Xg({platform:e,iconStyle:o,size:t}){let r=WB[e][o];return RB(r,{size:t,stroke:1.75,"aria-hidden":"true",focusable:"false"})}var UB={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 $B({platform:e}){let{rows:o,saveLink:t}=la(),{value:r,error:a}=o[e],[n,s]=Qg(r),[i,f]=Qg(!1),d=Zg(),p=Zg();zB(()=>s(r),[r]);let m=async()=>{if(n.trim()===r){n!==r&&s(r);return}f(!0),await t(e,n),f(!1)},x=Fu[e];return Jg(Rc,{children:[Bt(GB,{label:l(x),htmlFor:d,icon:Bt(Xg,{platform:e,iconStyle:"outline",size:18}),children:Bt("input",{id:d,type:"text",inputMode:"url",value:n,placeholder:UB[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&&Bt("p",{id:p,className:"sf-note sf-note--error",role:"alert",children:a})]})}function ey({unavailable:e}){let{canSave:o}=la();return!o&&e?Bt(Rc,{children:e}):Jg(Rc,{children:[Bt("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.")}),Xa.map(t=>Bt($B,{platform:t},t))]})}import{jsx as xa,jsxs as qB}from"react/jsx-runtime";import{useId as jB,useMemo as KB}from"react";import{useEasel as VB}from"efficient-easel/easel";import{SettingsField as YB,SettingsSwitch as XB}from"efficient-easel/panel";import{EyeIcon as ZB}from"efficient-easel/icons";var oy=["","","","","",""];var QB="root:default-zone";function ty({heroId:e}){let{appState:o,dispatch:t}=VB(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=KB(()=>{let p=n?.props.tickerItems;return Array.isArray(p)?p:oy.map(m=>({text:m}))},[n]),f=jB();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:QB,destinationIndex:a,data:{...n,props:{...n.props,...p}}});return qB("div",{children:[xa(YB,{label:l("Show ticker"),labelId:f,icon:xa(ZB,{}),action:xa(XB,{checked:s,onChange:p=>d({showTicker:p}),ariaLabelledBy:f})}),xa(If,{label:xf.label,icon:xf.icon,items:i,placeholder:"item",onChange:p=>d({tickerItems:p}),markup:!0})]})}import{jsx as G,Fragment as jc,jsxs as Fo}from"react/jsx-runtime";import{useContext as DD,useEffect as Uc,useRef as _D,useState as Ly}from"react";import{FieldSelect as ND,InspectorField as MD}from"efficient-easel/fields";import{SettingsField as HD}from"efficient-easel/panel";import{InspectorUpLevel as ql}from"efficient-easel/chrome";import{StylesIcon as WD,TypeIcon as zD}from"efficient-easel/icons";import{useEasel as GD}from"efficient-easel/easel";import{TextPartPanel as UD}from"efficient-easel/copy";import{Tooltip as $D}from"efficient-shell/ui";import{jsx as Wc,jsxs as dD}from"react/jsx-runtime";import{COPY_CELLS as Ia,CopyBox as uD}from"efficient-easel/copy";import{PaddingYIcon as pD,WidthIcon as mD}from"efficient-easel/icons";import{useSyncExternalStore as aD}from"react";var Ac="template",ay="Card template",JB=["Text","ImageBlock","ButtonBlock","Flex"],Hl="rowField",eD="rowLinkField";function mY(){return{type:"slot",allow:[...JB]}}var oD=[{block:"OrderSummary",fields:[{key:"label",label:"Item"},{key:"meta",label:"Meta line"},{key:"amount",label:"Amount"}]}],ry=Symbol.for("efficient.card-templates");function Bc(){let e=globalThis,o=e[ry];return o||(o=new Map(oD.map(t=>[t.block,t])),e[ry]=o),o}function Dc(e){return typeof e=="string"&&Bc().has(e)}function xY(e,o){let t=Bc().get(e)?.fields??[];return o?t.filter(r=>(r.kind??"text")===o):t}function IY(e,o){return e?Bc().get(e)?.fields.find(t=>t.key===o)??null:null}function tD(e,o=Hl){let t=e?.[o];return typeof t=="string"?t.trim():""}function hY(e){let o={};if(e&&typeof e=="object"&&!Array.isArray(e))for(let[t,r]of Object.entries(e))typeof r=="string"&&(o[t]=r);return o}var rD={Text:{text:Hl},ImageBlock:{src:Hl},ButtonBlock:{label:Hl,href:eD}};function ny(e,o,t){let r=rD[e]?.[t];return!!(r&&tD(o,r))}function gY(e,o){let t=e?.data?.content;if(!Array.isArray(t)||typeof o!="string")return;let r=(n,s)=>{for(let i of n){if(i?.props?.id===o)return s;for(let[f,d]of Object.entries(i?.props??{})){if(!Array.isArray(d)||!d.length||typeof d[0]!="object"||d[0]===null||!("type"in d[0]))continue;let p=f===Ac&&Dc(i.type)?i:s,m=r(d,p);if(m!==void 0)return m}}},a=r(t,null);return a===void 0?null:a}import{decodePartId as nD}from"efficient-easel/draw";function Ir(e,o){let t=sl(e);return t?.control==="textList"?o.rowKey===(t.itemKey??"text")?OI(t,o.index):null:Ef(e)?.[o.rowKey]??null}function Wl(e,o,t){let r=e.node.props,{key:a,row:n}=ro(e.propKey),s=n?sh(r,a,n,e.kind,o):nh(r,a,e.kind,o);return s?(t(e.zone,e.index,{...e.node,props:s}),!0):!1}var lD=["bold","italic","underline","strike","link","sup","sub"],sD=["bullet","number"];function Mc(e,o){return e?[...lD,...o?sD:[]]:[]}function ly(e,o){let t=nD(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}=ro(a),d=o.components[n.type]?.fields?.[i],p=f?Ir(d,f):d,m=nr(p);if(!m)return null;let x=n.props??{};if(!f&&ny(n.type,x,i)||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:Mn(p)}}function sy(e,o){let t=ly(e,o);if(!t||t.offPage)return null;let{text:r,hidden:a}=Jo(t.stored);if(a)return null;let n=nl(t.kind);return{partId:e,value:r,rules:Vt,multiline:n,offered:Mc(t.kind!=="plainText",n),write:s=>{let i=ly(e,o);i&&Wl({node:i.node,propKey:i.propKey,kind:i.kind,zone:i.selector.zone,index:i.selector.index},s,o.replace)}}}function iy(e,o,t){return e?.isConnected&&e.getAttribute(ao)===t?e:o?.querySelector(`[${ao}="${iD(t)}"]`)??null}function iD(e){return e.replace(/["\\]/g,"\\$&")}function fy(e){let o=e.activeElement;return o?o.tagName==="IFRAME"||!!o.closest(".es-canvas"):!1}var _c=null,Nc=new Set;function fD(){return _c}function Hc(e){if(e!==_c){_c=e;for(let o of Nc)o()}}function cD(e){return Nc.add(e),()=>{Nc.delete(e)}}function cy(){return aD(cD,fD,()=>null)}var xD=["left","center","right","justify"];function zc(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:Wc(pD,{}),unit:"px",step:Mf,shiftStep:10,min:_f,max:Nf,value:e.padding,styleValue:o.paddingPx,onChange:s=>t({padding:s??null})},{key:"width",name:l("Width"),icon:Wc(mD,{}),unit:"px",step:Wf,shiftStep:100,min:Hf,max:ot,value:e.width,styleValue:o.widthPx,onChange:s=>t({width:s??null})}]}function dy({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=zc(n,s,i),b=Mc(r,t);return dD("div",{className:"sf-part-textbox",children:[m,Wc(uD,{value:e,onChange:o,multiline:t,placeholder:d,ariaLabel:p,rules:Vt,tools:b,barShows:x?"focus":"always",colors:r?f:[],align:a?{value:n.align??s.align,allow:xD,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 Ry}from"efficient-easel/draw/client";import{jsx as zl,Fragment as ID,jsxs as hD}from"react/jsx-runtime";import{Button as uy,Dialog as gD}from"efficient-shell/ui";function py({styleName:e,onCancel:o,onConfirm:t}){return zl(gD,{open:!0,onClose:o,role:"alertdialog",size:"sm",title:l("Update {style}?",{style:e}),footer:hD(ID,{children:[zl(uy,{variant:"secondary",onClick:o,children:l("Cancel")}),zl(uy,{variant:"primary",onClick:t,children:l("Update style")})]}),children:zl("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 qD}from"efficient-easel/screen/components/ScreenDocumentContext";import{usePreviewDevice as jD}from"efficient-easel/draw/client";import{jsx as yD}from"react/jsx-runtime";import{createContext as bD,useContext as SD,useMemo as CD,useState as wD}from"react";var vD={partStyle:null,setPartStyle:()=>{}},my=bD(vD);function ZY({children:e}){let[o,t]=wD(null),r=CD(()=>({partStyle:o,setPartStyle:t}),[o]);return yD(my.Provider,{value:r,children:e})}function xy(){return SD(my)}import{TEXT_FIELD_MARKER as KD}from"efficient-easel/draw";import{useSectionOps as VD}from"efficient-easel/screen/lib/document/use-section-ops";var kD="#9ca3af";function TD(e){return cn.map(o=>({key:o,name:Lp[o],value:e?.[o]||kD}))}function Gl(e){return TD(e).map(o=>({name:o.key,label:l(o.name),value:o.value}))}function hy(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 cn){let i=Kt[s].replace(/^var\((--[\w-]+)\)$/,"$1"),f=a.getPropertyValue(i).trim();if(!f)continue;let d=Iy(f);!d&&n&&(n.fillStyle="#000000",n.fillStyle=f,d=Iy(String(n.fillStyle))),d&&(o[s]=d)}return o}function Iy(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",gy="@body",yy="@value",rX={[ha]:"Name",[gy]:"Body",[yy]:"Value"},PD={TimelineTrack:{"entries.date":ha,"entries.title":ha,"entries.blurb":gy},Footprint:{"offices.city":ha},Stats:{"items.label":ha,"items.value":yy}};function FD(e){let{key:o,row:t}=ro(e);return t?`${o}.${t.rowKey}`:null}function by(e,o){if(!e)return o;let t=FD(o);return t?PD[e]?.[t]??o:o}import{useEaselHost as YD}from"efficient-easel/screen/lib/host";function ED(e){let o=new Set([...Object.keys(pn[e]??{}),...mn[e]??[]]);for(let[t,r]of Object.entries(ci[e]??{}))r.verb==="snapshot"&&o.add(t);return[...o].sort()}var OD={CollectionCard:"product",FooterMenu:"menu",Gallery:"product",GalleryItem:"product",ProductGrid:"product",ProductHero:"product",SpecTable:"product",Events:"blog",FeaturedCover:"blog",LongRead:"blog",SubscribeBlogs:"blog"},Sy={product:"Synced from the product.",blog:"Synced from the blog post.",menu:"Synced from the site menu."},Cy="Open",wy={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 OD[e]??null}function vy(e,o){let t=ya(e);return t&&ED(e).includes(o)?t:null}function Ul(e){let o=e?.menu?.id;return typeof o=="string"&&o.length>0?o:void 0}var ky="data-sf-spec-region";function iX(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 hr(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 LD(e){return`@${e}`}function Gc(e,o){if(!o.startsWith("@"))return null;let t=o.slice(1);return t in e?t:null}function RD(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)]"},AD={tag:{label:"Tag",follows:"Labels",builtIn:hr(ba.tag),writable:!0},name:{label:"Name",follows:"Heading 2",builtIn:hr(ba.name),writable:!0},body:{label:"Body",follows:"Body",builtIn:hr(ba.body),writable:!0},price:{label:"Price",follows:"Labels",builtIn:hr(ba.price),writable:!0},link:{label:"Link",follows:"Labels",builtIn:hr(ba.link),writable:!0}},Ty=AD;var BD={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}},Py=BD;var xX=ky,Fy={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 Ey={SpecTable:Fy,FAQ:Py,Collections:Ty};function Oy(e){return e&&Object.hasOwn(Ey,e)?Ey[e]:null}function qc(e){return e?l(e):null}function Ay(e){return e.kind==="role"?Fs[e.role]:e.kind==="custom"?"Custom":null}function XD(e){let o=e.role;return o&&Ao.includes(o)?{kind:"role",role:o}:null}function ZD(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 $c(e,o,t,r){return XD(Il(e,o))??ZD(t,r)}function QD(e,o){if(!e.length)return null;let t=o(e[0]);return e.every(r=>o(r)===t)?t:null}var $l="";function JD({face:e,base:o,onPick:t}){let r=e.kind==="role"?e.role:$l,a=[{label:l("No style"),value:$l},...Ao.map(n=>({label:l(Fs[n]),value:n}))];return G(ND,{ariaLabel:l("Style"),value:r,options:a,inline:!0,onChange:n=>t(n===$l?null:n),renderOption:n=>n.value===$l?Fo(jc,{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(${Gt(o.fontKey)?.cssVar})`:void 0,fontWeight:o?.weight},children:qc(Ay(e))}),valueText:n=>qc(Ay(e))??n?.label??""})}function e_({sectionName:e,onBack:o,textEditor:t,styleRow:r,children:a}){return Fo("div",{className:"sf-part-panel",children:[G(ql,{inline:!0,name:l(e),onSelect:o}),t,r,a]})}function jl({source:e,slug:o,menuId:t}){let r=YD(),a=wy[e],n=!a.needsSlug||!!o;return G("div",{className:"sf-note sf-note--source",children:Fo("p",{className:"es-field-hint sf-hint-keep",children:[l(Sy[e]),n?Fo(jc,{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(Cy)})]}):null]})})}var By=4,o_=120;function t_({region:e,sizePx:o,face:t,base:r,onFollowStyle:a,source:n,slug:s,onBack:i}){let f=e.follows;return Fo("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(jc,{children:G(HD,{label:l("Style"),icon:G(WD,{}),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(JD,{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(jl,{source:n,slug:s}):null,G(ql,{inline:!0,name:l("Page"),onSelect:i})]})}function r_({onBack:e}){return Fo("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(ql,{inline:!0,name:l("Page"),onSelect:e})]})}function a_({onBack:e,partId:o,why:t}){return Fo("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:Fo("code",{children:[o," \u2014 ",t]})}),G(ql,{inline:!0,name:l("Page"),onSelect:e})]})}function Dy({nodeId:e,propKey:o,onBack:t,onEditStyle:r}){let{getItemById:a,getSelectorForId:n,config:s}=GD(H=>H),i=VD(),f=cy(),{partStyle:d}=xy(),{fonts:p,textStyles:m}=K(),x=DD(qD),I=!x?.capabilities?.hasSiteTheme,{persist:b}=Yt({themeFromDocument:I,tokenRef:x?.tokenRef,siteId:x?.siteId??null}),w=hl({themeFromDocument:I,persist:b}),[k,T]=Ly(!1),C=jD()==="mobile",y=_D(null),h=a(e),E=n(e),F=h?s.components[h.type]:void 0,{key:R,row:P}=ro(o),D=F?.fields?.[R],M=P?Ir(D,P):D,v=cl(e,o),L=h?.props??{},_=nr(M),B=Mn(M),$=mh(M),J=h?ya(h.type):null,oe=h?vy(h.type,R):null,so=P?Xr(L[R],P):L[R],io=!!P&&!(Array.isArray(L[R])&&P.index<L[R].length);Uc(()=>{fy(document)||y.current?.querySelector(".es-copy [contenteditable='true'], .es-copy textarea, .sf-copybox textarea, .sf-copybox input")?.focus()},[v]);let[Re,fo]=Ly(0);Uc(()=>fo(0),[v]);let Ne=!!h&&!io&&(!E||!M);Uc(()=>{if(!Ne||Re>=By)return;let H=setTimeout(()=>fo(he=>he+1),o_);return()=>clearTimeout(H)},[Ne,Re]);let Pe=Ne&&Re<By;if(!h||io)return G(r_,{onBack:t});let Ie=Oy(h.type),ge=Ie?Gc(Ie,o):null;if(Ie&&ge){let H=d?.partId===v?d:null,he=Ie[ge],Io=he.writable===!0&&!!E,Go=Ps=>{E&&i.replaceComponent(E.zone,E.index,{...h,props:fr(L,o,"role",Ps)})};return G(t_,{region:he,sizePx:H?.base.sizePx??null,face:$c(L,o,H,p),base:H?.base??null,onFollowStyle:Io?Go:void 0,source:J,slug:ga(L),onBack:t})}if(!E||!M)return Pe?G("div",{className:"sf-note","aria-busy":"true"}):G(a_,{onBack:t,partId:v,why:E?"no field":"no selector"});let Me=H=>{i.replaceComponent(E.zone,E.index,{...h,props:H})},Fe=H=>{if(Jo(H).hidden!==Jo(so).hidden||!_){let he=P?Of(L,R,P,H):{...L,[R]:H};he&&Me(he);return}Wl({node:h,propKey:o,kind:_,zone:E.zone,index:E.index},Jo(H).text,i.replaceComponent)},co=so,He=d?.partId===v?d:null,Ue=He?.styleOwner,uo=Ue?a(Ue.owner):null,po=Ue&&uo?n(Ue.owner):null,Lo=!!(Ue&&uo&&po),Ye=Lo?uo.props??{}:L,mo=Lo?H=>i.replaceComponent(po.zone,po.index,{...uo,props:H}):Me,A=Lo?Ue.kind:by(h?.type,o),q=Il(Ye,A),j=[{partKey:A,face:$c(Ye,A,He,p),sizeGroup:He?.sizeGroup??null,base:He?.base??l_,style:q}],Ae=QD(j,H=>H.sizeGroup),xo=Gl(He?.inks),Xe=(H,he)=>{let Io=Ye;for(let Go of j)Io=fr(Io,Go.partKey,H,he);mo(Io)},Wt=H=>H?Xe("textStyle",H):Ee({textStyle:null,role:null}),Ee=H=>{let he=Ye;for(let Io of j)for(let[Go,Ps]of Object.entries(H))he=fr(he,Io.partKey,Go,Ps??null);mo(he)},Ro=_==="text"||_==="textarea",{text:ja,hidden:zt}=Jo(so),Ka=M?.[KD]?.label??o,Qd=zt?l("Show {label} on the slide",{label:l(Ka)}):l("Hide {label} on the slide",{label:l(Ka)}),Jd=Fo("div",{className:"sf-field-head",children:[G(zD,{}),G("span",{className:"sf-field-label sf-field-label--inline",children:l(Ka)}),Ro&&G($D,{content:Qd,children:G("button",{type:"button",className:"sf-field-eye","aria-pressed":zt,"aria-label":Qd,onClick:()=>Fe({text:ja,hidden:!zt}),children:zt?G(Ry,{name:"eye-off",size:14}):G(Ry,{name:"eye",size:14})})})]}),eu=!B&&$,Dw=!!_&&(xI(M)||B||zt||!$),ou=$c(Ye,A,He,p),_w=ou.kind==="role"?ou.role:null,Ts=vh(q)??Wh(_w),tu=tt(w.saved,w.old),Nw=Object.entries(q).filter(([H,he])=>H!=="role"&&H!=="textStyle"&&he!==void 0).length,Mw=()=>{let H=Ye;for(let he of j){let{role:Io,textStyle:Go}=he.style;H=Eh(H,he.partKey),Io&&(H=fr(H,he.partKey,"role",Io)),Go&&(H=fr(H,he.partKey,"textStyle",Go))}mo(H)},ft=Ts,Hw=zh(j[0].style),Ww=ft?tu.find(H=>H.id===ft)?.name??ft:"",zw=()=>{T(!1),ft&&(w.write(Gh({saved:w.saved,old:w.old,styleId:ft,values:Kf(j[0].style)}),!0),Mw())};return Fo(e_,{sectionName:F?.label??h.type,onBack:t,textEditor:G("div",{ref:y,className:"sf-part-text",children:Dw?G(dy,{text:ja,onTextChange:H=>Fe(Ro?{text:H,hidden:zt}:H),multiline:nl(_),markup:_!=="plainText",styled:!1,style:j[0].style,base:j[0].base,setValue:Ee,colors:xo,placeholder:qc(ah(M))??void 0,ariaLabel:l(Ka),head:Jd,typedOnCanvas:f===v}):_?Ro?Jd:null:G(MD,{field:M,name:o,value:co,onChange:Fe,id:`sf-part-${e}-${o}`})}),children:[oe&&G(jl,{source:oe,slug:ga(L),menuId:Ul(L)}),eu&&G(UD,{style:{value:Ts??"",options:[{value:"",label:l("No style"),description:l("Section\u2019s own")},...tu.map(H=>({value:H.id,label:H.name,description:H.values.font?Gt(H.values.font)?.label:void 0}))],onChange:H=>Wt(H||null),changed:Nw>0,onEditStyles:r,onUpdateStyle:ft&&Hw?()=>T(!0):void 0},font:{value:q.font??"",styleValue:Gt(j[0].base.fontKey)?.label,options:Ze.map(H=>({label:H.label,value:H.key})),onChange:H=>Xe("font",H||null)},italic:{value:q.italic,styleValue:n_(m,Ts),onChange:H=>Xe("italic",H??null)},cells:zc(j[0].style,j[0].base,Ee,{phone:C}),align:{value:q.align??"",styleValue:j[0].base.align,onChange:H=>Xe("align",H||null)},letterCase:{value:q.case??"",styleValue:j[0].base.case,onChange:H=>Xe("case",H||null)}}),k&&ft&&G(py,{styleName:Ww,onCancel:()=>T(!1),onConfirm:zw}),eu&&Ae===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 n_(e,o){return!o||!Array.isArray(e)?!1:e.find(t=>t?.id===o)?.values?.italic===!0}var l_={fontKey:"",sizePx:16,weight:400,lineRatio:1.4,letterEm:0,align:"left",case:"none",paddingPx:0,widthPx:ot};import{jsx as no,jsxs as Kc,Fragment as s_}from"react/jsx-runtime";import{useCallback as i_,useRef as f_,useState as Sa}from"react";import{InspectorIconButton as c_}from"efficient-easel/chrome";import{PopupMenu as d_,PopupMenuItem as u_,PopupMenuLabel as Kl}from"efficient-shell/ui";import{CopyToPageIcon as p_}from"efficient-easel/icons";import{useEaselSession as m_}from"efficient-easel/screen/lib/session-context";import{cloneNodeWithFreshIds as x_}from"efficient-easel/screen/lib/document/section-doc";import{FOOTER_TYPE as I_}from"efficient-easel/draw";function _y({node:e,currentSlug:o,siteId:t,tokenRef:r,runAuthed:a,onNotify:n}){let[s,i]=Sa(!1),[f,d]=Sa(null),p=m_(),[m,x]=Sa(!1),[I,b]=Sa(null),w=f_(null),[k,T]=Sa(null),C=i_(async()=>{if(p.usesBridgedToken&&!r.current){x(!0);return}try{d(await Ce(p).pages.list(t?{siteId:t}:void 0))}catch{x(!0)}},[r,t,p]),y=()=>{if(s){i(!1);return}let F=w.current?.getBoundingClientRect();F&&T({top:F.bottom+6,right:Math.max(8,window.innerWidth-F.right)}),d(null),x(!1),C(),i(!0)},h=(f??[]).filter(F=>F.slug!==o),E=async F=>{if(I)return;b(F.slug);let R=x_(e),P=p.documentHooks?.storedNode?.(R)??R,D=Ce(p).pages,M=await a(async()=>{let v=await D.load({id:F.id});if(!v)throw new Error(`Page "${F.slug}" no longer exists.`);let L=v.layout??{},_=Array.isArray(L.content)?[...L.content]:[],B=_.findIndex($=>$?.type===I_);_.splice(B===-1?_.length:B,0,P),await D.save(F.id,{layout:{root:{},zones:{},...L,content:_}},{version:v.version,clientId:""})});b(null),i(!1),n?.(M?l("Duplicated to \u201C{name}\u201D",{name:F.label}):l("Couldn\u2019t duplicate the section \u2014 please retry"),M?"success":"error")};return Kc(s_,{children:[no("span",{"data-menu-toggle":!0,style:{display:"contents"},children:no(c_,{buttonRef:w,label:l("Duplicate to another page"),hasPopup:"menu",expanded:s,onClick:y,children:no(p_,{size:15})})}),s&&k&&no(d_,{portal:!0,style:{top:k.top,right:k.right},onClose:()=>i(!1),children:Kc("div",{role:"menu","aria-label":l("Duplicate to page"),children:[no(Kl,{children:l("Duplicate to page")}),m?no(Kl,{children:l("Couldn\u2019t load pages")}):f===null?no(Kl,{children:l("Loading\u2026")}):h.length===0?no(Kl,{children:l("No other pages")}):h.map(F=>Kc(u_,{role:"menuitem",disabled:I!==null,onClick:()=>{E(F)},children:[no("span",{className:"min-w-0 flex-1 truncate",children:F.label}),I===F.slug?no("span",{className:"shrink-0 text-xs",children:l("Copying\u2026")}):F.draft&&no("span",{className:"shrink-0 text-xs",children:l("draft")})]},F.id))]})})]})}import{useScreenDocument as hN}from"efficient-easel/screen/components/ScreenDocumentContext";import{useSectionOps as gN}from"efficient-easel/screen/lib/document/use-section-ops";import{SELECTION_MODE as dJ,isSelectionMode as rs}from"efficient-easel/screen/lib/screen-parts";import{usePreviewParts as yN}from"efficient-easel/draw/client";import{jsx as Ca,jsxs as h_}from"react/jsx-runtime";import{SettingsDrill as g_}from"efficient-easel/panel";import{UiIcon as y_}from"efficient-easel/draw/client";var b_="Not shown on the page";function S_({part:e,onOpen:o}){return Ca(g_,{name:l(e.label),preview:e.offPage?l(b_):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(y_,{name:"eye-off",size:14})}):void 0,onOpen:()=>o(e.key)})}function Vc(e){return e.filter(o=>!o.identifier)}function Ny({parts:e,onOpen:o,heading:t=!0}){let r=Vc(e);return r.length?h_("div",{className:"sf-entries",children:[t?Ca("h3",{className:"sf-entries-head",children:l("Text")}):null,r.map(a=>Ca(S_,{part:a,onOpen:o},a.key))]}):null}import{HEADER_TYPE as bN,ROOT_ZONE as wb}from"efficient-easel/draw";import{HEADER_TYPE as _e,FOOTER_TYPE as fe,newNodeId as C_}from"efficient-easel/draw";function Vl(){return{type:_e,props:{id:C_(_e)}}}var My=[{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"}],w_=My.filter(e=>e.type!=="FooterLogo"&&e.type!=="FooterGroup"),v_="FooterGroup",Hy="blocks";function Wy(e){return e===fe?My:e===v_?w_:null}function Yl(){let e=(o,t)=>({type:o,props:{id:`${o}-${crypto.randomUUID()}`,...t}});return[e("FooterLogo",{widthPct:100,align:"left",tagline:""}),e("FooterEmailSignup",{...Lm})]}var ce="SiteHeader",se="SiteFooter",Yc="sections",vZ=[ce,se],gr=e=>e===ce||e===se,zy=e=>`${e}:${Yc}`;function Gy(e,o,t=[]){return{type:e,props:{id:o,[Yc]:t}}}var k_=new Set(["Footer",ce,se]);function yr(e){let o=new Set,t=!1,r=e.filter(a=>{let n=a?.type??"";return n==="Header"?(t=!0,!1):k_.has(n)?o.has(n)?(t=!0,!1):(o.add(n),!0):!0});return t?r:e}function Xl(e,o){return e.some(t=>t?.type===o.type)?e:o.type===ce?[o,...e]:[...e,o]}var Uy={[ce]:{max:3,takes:["Flex","Ticker"]},[se]:{max:6,takes:["Flex","Prose","Logos","Divider"]}};function $y(e,o,t){if(!gr(e))return!0;let r=Uy[e];return t<r.max&&r.takes.includes(o)}function qy(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(!gr(n?.type))continue;let s=n.props?.[Yc];if(!Array.isArray(s)||!s.some(f=>f?.props?.id===r))continue;let i=Uy[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 Xc(e){switch(e?.type){case ce:case se:return l("On every page");case _e:case fe:return l("On every page \xB7 old style");default:return null}}var jy=()=>null,Ky=()=>l("Changed on every page");function Zl(e,o){let t=op(e,o);if(t)return t;let r=qy(e,o);if(!r)return null;let a=r.group===ce;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 Jl,Fragment as B_,jsxs as D_}from"react/jsx-runtime";import{useState as __}from"react";import{createNode as N_,newId as M_}from"efficient-easel/data";import{useEasel as H_}from"efficient-easel/easel";import{Banner as W_,Button as Zc}from"efficient-shell/ui";import{useScreenDocument as z_}from"efficient-easel/screen/components/ScreenDocumentContext";var Ql="Flex",T_={FooterMenu:"MenuBlock",FooterEmailSignup:"EmailFormBlock",FooterSocial:"SocialLogosBlock"},P_=e=>{let{id:o,...t}=e;return t},Vy=e=>typeof e=="string"?e:"",Yy={sm:12,md:13,lg:15},F_="md",Xy=1.5,E_={size:13,lineHeight:Xy,width:280},O_=14,L_=40,R_=e=>e==="center"||e==="right"?e:"left";function A_(e){let o={},t=[["padTop","sectionPaddingTop"],["padRight","sectionPaddingRight"],["padBottom","sectionPaddingBottom"],["padLeft","sectionPaddingLeft"]];for(let[r,a]of t){let n=ne(e[r]);n&&(o[a]=n)}return o}function Zy(e,o){let t=e.props??{},r=T_[e.type];if(r)return[o(r,P_(t))];switch(e.type){case"FooterLogo":{let a=R_(t.align),n=o("LogoBlock",{...t.reverse?{reverse:t.reverse}:{},...typeof t.customColor=="string"&&t.customColor?{customColor:t.customColor}:{},heightPx:Math.round(Ou*((ne(t.widthPct)??100)/100)),href:"/",align:a,...A_(t)}),s=Vy(t.tagline).trim();return s?[n,o("Text",{text:s,tone:"dim",align:a,_partStyles:{text:{...E_}}})]:[n]}case"FooterText":{let a=typeof t.size=="string"&&t.size in Yy?t.size:F_;return[o("Text",{text:Vy(t.text),tone:typeof t.tone=="string"?t.tone:"default",_partStyles:{text:{size:Yy[a],lineHeight:Xy}}})]}case"FooterDivider":{let a=ne(t.thickness),n=ne(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(Ql,{direction:t.direction==="horizontal"?"row":"column",gap:Gr("FooterGroup",t.gap),align:t.align==="center"||t.align==="end"?t.align:"start",...Mi,content:a.flatMap(n=>Zy(n,o))})]}default:return[]}}function wa(e,o,t){let r=e&&Array.isArray(e.props?.blocks)?e.props.blocks:[],a=d=>o(Ql,{direction:"row",wrap:!0,share:"equal",gap:L_,content:d}),n=[],s=[];for(let d of r){let p=Zy(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(Ql,{direction:"column",gap:O_,align:"stretch",...Mi,content:p}))}(s.length||!n.length)&&n.push(a(s));let i=o(Ql,{direction:"column",content:[o("LegalLineBlock")]}),f=Gy(se,t,[...n,i]);return{...f,props:{...f.props,...e?.props?.width==="full"?{fullWidth:!0}:{}}}}function Qy(){let{appState:e,dispatch:o,config:t}=H_(p=>p),{readOnly:r}=z_(),[a,n]=__(!1),s=e.data.content;if(r||s.some(p=>p.type===se))return null;let i=s.find(p=>p.type===fe)??null,f=(p,m)=>N_(t,p,m),d=()=>{let p=wa(i,f,M_(se));o({type:"setData",data:m=>({...m,content:[...Xl(m.content,p)]}),recordHistory:!0}),n(!1)};return Jl(W_,{tone:"info",title:l("This footer uses the old layout"),action:a?D_(B_,{children:[Jl(Zc,{variant:"primary",size:"sm",onClick:d,children:l("Switch now")}),Jl(Zc,{variant:"secondary",size:"sm",onClick:()=>n(!1),children:l("Cancel")})]}):Jl(Zc,{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 ld}from"react/jsx-runtime";import{useLayoutEffect as rN,useMemo as hb,useRef as aN,useState as ad}from"react";import{useEasel as nN,useSelectedFields as lN}from"efficient-easel/easel";import{Inspector as sN,planFields as gb}from"efficient-easel/fields";import{jsx as br}from"react/jsx-runtime";import{usePreviewDevice as G_}from"efficient-easel/draw/client";import{NoControlMark as Jy,noControlField as eb}from"efficient-easel/screen/lib/document/panel-no-control-mark";var Qc=e=>l(or[e==="content"?"page":"full"]),ob=e=>`${e} ${l("from Styles")}`;function tb(){let{siteWidth:e,sectionBackgroundWidth:o,sectionContentWidth:t}=K();return{px:typeof e=="number"?e:me.default,background:o??"full",content:t??"content"}}function rb(){try{return G_()==="mobile"}catch{return!1}}function U_({type:e,onChange:o}){let t=To(),r=tb(),a=rb(),n=Xi(e,t).background;return br(rl,{value:n??r.background,changed:n!==null,detail:ob(Qc(r.background)),onChange:s=>o(s),onReset:()=>o($r),disabled:a})}function $_({type:e,onChange:o}){let t=To(),[,r]=Gn("contentMax"),a=tb(),n=rb(),s=Xi(e,t),i=(s.background??a.background)==="content",f=s.content??a.content;return br(al,{mode:i&&f==="full"?"content":f,px:s.contentMax??a.px,max:i?a.px:me.max,changed:s.content!==null,detail:ob(a.content==="full"?Qc("full"):`${Qc("content")} ${a.px}px`),fullClosed:i,disabled:n,hint:n?oh:i?QI: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 q_(e){return et({_gWidth:ke(ZI),backgroundWidth:{type:"custom",render:({onChange:o})=>br(U_,{type:e,onChange:o})},contentWidth:{type:"custom",render:({onChange:o})=>br($_,{type:e,onChange:o})},contentMax:{...eb({type:"custom",render:()=>br(Jy,{})},"always"),reachedBy:"contentWidth"},widthMode:{...eb({type:"custom",render:()=>br(Jy,{})},"always"),reachedBy:"backgroundWidth"}})}var ab=Object.keys(q_(""));import{deviceField as j_,deviceMetaOf as lb}from"efficient-easel/screen/lib/document/device-fields";import{DESIGN_GROUPS as ed,SETTINGS_BUCKETS as K_}from"efficient-easel/panel";import{BUCKET_KEY as ze,DESIGN_GROUP_KEY as va}from"efficient-easel/screen/lib/document/field-buckets";var ka=K_;var V_="Editor only \u2014 not shown live",od={"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",[V_]:"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"},sb={"AlloyWheelsListing._gCards":"Design","ProductGrid._gCards":"Design"},ib={"Text._gSpacing":"Size","Heading._gSpacing":"Size"};function Jc(e,o,t){let r=`${e}.${o}`;return ib[r]??sb[r]??od[t]}function fb(e){return e==="Animation"?[ze.Animation]:[ze.Design,va[e]]}function es(...e){let o=[];for(let t of e)for(let r of Object.values(t)){let a=lb(r),n=vo(a?a.inner:r),s=n?od[n.label]:void 0;if(s)for(let i of fb(s))o.includes(i)||o.push(i)}return o}var fQ=[...es(qn(),jn("full"),Kn(),Vn(),pf()),...Object.keys(qn()),...Object.keys(jn("full")),...Object.keys(Kn()),...Object.keys(Vn()),...Object.keys(pf()),...ab],cQ=[...es(Wn()),...Object.keys(Wn())],dQ=[...es(Un()),...Object.keys(Un())],uQ=[...es($n()),...Object.keys($n())],Y_=Object.keys(LI()),X_=new Set(["cardImage","imageBackground"]),pQ=[...fb(Jc("ProductGrid","_gCards","Cards")??"Design"),...Y_.filter(e=>e.startsWith("_g")||X_.has(e))],mQ=Object.keys(RI()),xQ=Object.keys(AI({bottomDefault:!0})),Z_={"ImageBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","ButtonBlock._gStyle":"duplicated the Style bucket header above it (2026-09-04)","HeroGroup._gContent":"duplicated the Content bucket header above it (2026-09-04)","HeroGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","Footer._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterLogo._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterLogo._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterMenu._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterMenu._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterGroup._gLayout":"duplicated the Layout bucket header above it (2026-09-04)","FooterText._gContent":"duplicated the Content bucket header above it (2026-09-04)","FooterText._gStyle":"duplicated the Style bucket header above it (2026-09-04)","FooterSocial._gStyle":"duplicated the Style bucket header above it (born tabbed, 2026-09-17)","FooterSocial._gLayout":"duplicated the Layout bucket header above it (born tabbed, 2026-09-17)","MenuBlock._gContent":"duplicated the Content bucket header above it (born tabbed, H.1)","MenuBlock._gStyle":"duplicated the Style bucket header above it (born tabbed, H.1)","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)"},cb={Content:["Content"],Size:["Size"],Design:["Design","Style"],Layout:["Layout"],Position:["Position"],Anchor:["Anchor"],Animation:["Animation"]},db={_gAnchor:"repeated the Anchor group heading above it (two tabs, 11.0.0)"};{let e={...qn(),...jn("full"),...Kn(),...Vn(),...Wn(),...Un(),...$n()};for(let o of Object.keys(db)){let t=vo(e[o]),r=t?od[t.label]:void 0;if(!t||t.level!==2||!r||!cb[r].includes(t.label))throw new Error(`INJECTED_RETIRED (lib/document/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 Q_=new Set(["_sContent","_sStyle","_sLayout","_sMedia"]),J_=new Map([[ze.Design,"Content"],[ze.Animation,"Animation"],...ed.map(e=>[va[e],e])]);function ub(e){let o=new Set([...Object.values(ze),va.Content]);for(let[t,r]of Object.entries(e))if(!o.has(t)&&vo(r)?.level===1)return 1;return 2}function eN(e){let o=`${e}.`;return Object.keys(Z_).filter(t=>t.startsWith(o)).map(t=>t.slice(o.length))}function oN(e,o){let t=lb(e),r=ke(o);return t?j_(t.tier,r):r}function tN(e,o){let t=vo(o);return t?e==="Content"||e==="Animation"?bI(o,t.label):SI(o):o}function nb(e){return e==="Design"?ed:["Animation"]}function IQ(e,o){let t=[],r=new Set(eN(o)),a=new Set,n=!1,s=null;for(let[x,I]of Object.entries(e)){let b=vo(I);if(Q_.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=J_.get(x);if(w!==void 0){if(b?.level!==1)throw new Error(`${o}.${x}: that key is reserved for the ${w} heading of the settings panel, but this field is ${b?`a level-${b.level} "${b.label}" header`:"not a header"}, so it cannot serve as one. Rename the section's own field.`);(x===ze.Design||x===ze.Animation)&&(n=!0),t.push(s={place:w,entries:[],adopted:!0});continue}if(!b){s||t.push(s={place:"Content",entries:[]}),s.entries.push([x,I]);continue}if(r.has(x)||x in db){let T=Jc(o,x,b.label);if(b.level!==2||!T||!cb[T].includes(b.label))throw new Error(`${o}.${x}: ${r.has(x)?"RETIRED":"INJECTED_RETIRED"} (lib/document/field-groups.ts) lists this sub-heading as one whose name repeats the place it sits in, but it is a level-${b.level} "${b.label}" header in the ${T??"(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:T,entries:[]});continue}let k=Jc(o,x,b.label);if(!k)throw new Error(`${o}.${x}: the inspector group "${b.label}" is not classified in LABEL_GROUP (lib/document/field-groups.ts), so there is no way to say which of ${[...ed,"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:k,entries:[[x,b.level===2?I:oN(I,b.label)]]})}let i=new Set(Object.entries(e).filter(([,x])=>vo(x)).map(([x])=>x));for(let[x,I]of[["BLOCK_KEY_GROUP",ib],["KEY_GROUP",sb]]){let b=Object.keys(I).filter(w=>w.startsWith(`${o}.`)).filter(w=>!i.has(w.slice(o.length+1)));if(b.length)throw new Error(`${o}: ${x} (lib/document/field-groups.ts) lists ${JSON.stringify(b)}, 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/document/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=>nb(x).some(I=>d.has(I))),m={};for(let x of p){m[ze[x]]=Hn(x,x===p[0]?p:null);for(let I of nb(x)){if(!d.has(I))continue;let b=t.filter(k=>k.place===I),w=b.findIndex(k=>k.adopted);w>0&&b.unshift(...b.splice(w,1)),x==="Design"&&(m[va[I]]=ff(I));for(let k of b)for(let[T,C]of k.entries)m[T]=tN(I,C)}}return m}function hQ(e){return ze.Design in e?e:{[ze.Design]:Hn("Design",null),[va.Content]:ff("Content"),...e}}function gQ(e){return ka.some(o=>ze[o]in e)}function yQ(e){let o=ka.filter(r=>ze[r]in e);if(o.length===0)return e;let t={...e};for(let r of o)t[ze[r]]=Hn(r,r===o[0]?o:null);return t}import{usePreviewDevice as iN}from"efficient-easel/draw/client";var td=" text",pb="Text";function rd(e){let o=e.rows.filter(t=>t.shown);return o.length===0||o.length===1&&o[0].labelled}function mb(e){return e.filter(rd).map(o=>o.key)}function xb(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 Ib(e,o){if(e.size!==o.size)return!1;for(let t of e)if(!o.has(t))return!1;return!0}var nd=new Map,os=new Set;function fN(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 cN=Object.fromEntries(ka.map(e=>{let o=hI[e];return[e,ld(o,{},e)]}));function Ta({entries:e,entryCount:o=0,part:t=null}){let{id:r,fields:a,values:n,readOnly:s,onChange:i}=lN(),f=iN(),{appState:d,config:p}=nN(_=>_),m=Dg(f,p,d.data.content??[],d.ui.itemSelector),x=Wg(a,t),I=Bg(x,n,m),[b,w]=ad(()=>new Set(os)),[k,T]=ad(()=>new Set),C=aN(null),y=hb(()=>{let _=new Map;for(let B of gb(I).rows){if(!B.fold)continue;let $=_.get(B.fold.key)??[];$.push(B.name),_.set(B.fold.key,$)}return _},[I]);rN(()=>{let _=C.current?.parentElement;if(!_)return;let B=new Set(mb(fN(_,y)));T($=>Ib($,B)?$:B)});let h=hb(()=>xb(I,k),[I,k]),E={key:td,rows:Array.from({length:o},()=>({shown:!0,labelled:!0}))},F=rd(E)?void 0:{key:td,title:pb},[R,P]=ad(()=>nd.get(r)),D=nd.get(r),M=gb(I).buckets,v=D&&M.includes(D)?D:R&&M.includes(R)?R:M[0],L=v===void 0||gI(M,v)!==!0;return ld(sN,{fields:h,values:n,onChange:i,readOnly:s,showWhenContext:{...m,node:n},tab:v,onTab:_=>{nd.set(r,_),P(_)},tabIcons:cN,idPrefix:r,ariaLabel:l("Section settings"),lead:L?e:null,leadFold:F,closedFolds:b,onFold:(_,B)=>{B?os.delete(_):os.add(_),w(new Set(os))},children:ld("span",{ref:C,hidden:!0})})}import{jsx as sd,jsxs as dN}from"react/jsx-runtime";import{InspectorUpLevel as yb}from"efficient-easel/chrome";function bb({nodeId:e,part:o,sectionName:t,onUpToSection:r}){let{select:a}=Rl();return dN("div",{children:[o!=="media"?sd(yb,{inline:!0,name:l(xr.media),onSelect:()=>a(da(e,"media"))}):sd(yb,{inline:!0,name:l(t),onSelect:r}),sd(Ta,{part:o})]})}import{SettingsSwitch as SN}from"efficient-easel/panel";var dd={kind:"header"},ud={kind:"website"},kb={kind:"chat"},Tb={kind:"social"},Pa="Part";function CN(e){return l("Part of {name}",{name:l(e)})}function wN(e,o,t){let r=e.describeNode(o);return{name:t,kindLabel:r?CN(r.label):l(Pa)}}function vN(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 Pb({what:e}){let o=vN(e);return nt("div",{className:"sf-note",children:[Q("p",{children:Q("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 cd(e){let o=ca[e];return{name:xr[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=vb({name:l(_l(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?Q(bb,{nodeId:t.nodeId,part:e,sectionName:r.describeNode(t.nodeId)?.label??"Hero",onUpToSection:()=>r.onSelectNode(t.nodeId)}):null}}var kN={header:{name:"Header",kindLabel:"Site settings",icon:"header",render:(e,o)=>{let t=o.hostPanels?.header;return t?Q(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)=>Q(gl,{themeFromDocument:!o.capabilities.hasSiteTheme,tokenRef:o.tokenRef,siteId:o.siteId,onNotify:o.onNotify})},chat:{name:"Live chat",kindLabel:"Site settings",icon:"chat",render:()=>Q(Vg,{})},social:{name:"Social links",kindLabel:"Site settings",icon:"social",render:()=>Q(ey,{unavailable:Q(Pb,{what:"Social link"})})},ticker:{name:sa,kindLabel:Pa,icon:"ticker",head:(e,o)=>e.kind==="ticker"?wN(o,e.heroId,l(sa)):null,render:e=>Q(ty,{heroId:e.kind==="ticker"?e.heroId:""})},heroMedia:cd("media"),heroImage:cd("image"),heroImage2:cd("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}=ro(e.propKey),n=a?Ir(t.fields[r],a):t.fields[r],s=ih(l(Lf(ul(n??{},r))),a),i=vb({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"?Q(Dy,{nodeId:e.nodeId,propKey:e.propKey,onBack:()=>o.onSelectNode(e.nodeId),onEditStyle:o.onOpenSiteStyles}):null}},TN=new Set(["header","website","chat"]);function PN(e,o){if(e==="selection")return null;let t=kN[e];return TN.has(e)&&!o.hasSiteSettings?{...t,kindLabel:"Not part of a template",render:()=>Q(Pb,{what:t.name})}:t}function Fb({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:b}=hN(),w=vl(),{rows:k,reload:T}=aa(),C=k?.find(q=>q.slug===p)??null,[y,h]=Sb(null),{websiteName:E}=K(),F=gN({readOnly:I}),{select:R}=yN(),{selectedItem:P,getItemById:D,getSelectorForId:M,config:v,appState:L}=uN(q=>q),_=xN(v,P?{type:P.type,props:P.props}:null),B=P?Ih(_??v.components[P.type]?.fields,P.props):[],$=q=>v.components[q]?.label??q,J=P?M(P.props.id):void 0,oe=PN(e.kind,i),so=IN(),io={capabilities:i,tokenRef:f,hostPanels:so.chrome?.panels,describeNode:q=>{let j=D(q);if(!j)return null;let Ae=v.components[j.type];return{type:j.type,label:Ae?.label??j.type,fields:Ae?.fields??{},props:j.props??{}}},siteId:m,websiteName:E??null,notifyParent:d,onNotify:n,onOpenWebsiteSettings:o,onOpenSiteStyles:t,onSelectNode:r},Re=oe?.head?.(e,io)??null,fo=Re?.name??(oe?l(oe.name):P?l($(P.type)):l("Page settings")),Ne=Re?.kindLabel??(oe?l(oe.kindLabel):P?J&&J.zone!==wb?l("Block"):l("Section"):l("Page")),Pe=oe?oe.icon:P?P.type:"page",Ie=oe?null:P?v.components[P.type]?.fields??null:v.root?.fields??null,ge=Ie?ub(Ie):2,Me=rs(e)&&P?ya(P.type):null,Fe=!!P&&!!J&&J.zone===wb&&P.type!==fe&&P.type!==bN,co=Zl(L?.data,P),He=()=>{co||J&&F.duplicateComponent(J.zone,J.index)},Ue=()=>{J&&(F.removeComponent(J.zone,J.index),F.select(null))},uo=P?v.components[P.type]?.defaultProps?.previewHover:void 0,po=rs(e)&&!!P&&!!J&&uo!==void 0,Lo=po&&P.props.previewHover===!0,Ye=()=>{!P||!J||F.replaceComponent(J.zone,J.index,{...P,props:{...P.props,previewHover:!Lo}})},[mo,A]=Sb(Qf);return nt("div",{className:`es-sidepanel es-sidepanel--right sf-panel sf-panel--right${mo||!(!oe&&P)?"":" sf-hints-folded"}`,children:[Q(pN,{icon:Q(At,{type:Pe,size:15}),name:fo,kind:Ne,actions:!a&&rs(e)&&P&&P.type!==fe?nt(ts,{children:[Q(id,{label:l("Duplicate section"),title:co??void 0,disabled:co!==null,onClick:He,children:Q(Cb,{size:15})}),Fe&&i.hasSiteSettings&&Q(_y,{node:P,currentSlug:p,siteId:m??void 0,tokenRef:f,runAuthed:x,onNotify:n}),Q(id,{label:l("Remove section"),danger:!0,onClick:Ue,children:Q(mN,{size:15})}),s?Q(fd,{side:"right",onHide:s,divider:!0}):null]}):!oe&&!P&&rs(e)&&w&&C&&Cl(C)?nt(ts,{children:[Q(id,{label:l("Duplicate page"),onClick:()=>h(C),children:Q(Cb,{size:15})}),s?Q(fd,{side:"right",onHide:s,divider:!0}):null]}):s?Q(fd,{side:"right",onHide:s}):void 0}),w&&Q(kl,{source:y,taken:new Set((k??[]).map(q=>q.slug)),duplicate:w,onClose:()=>h(null),onDuplicated:q=>{h(null),T(),b({kind:"page",slug:q.slug,siteId:m??void 0})}}),po&&nt("div",{className:"sf-preview-pin",children:[nt("div",{className:"sf-preview-pin-text",children:[Q("span",{className:"sf-preview-pin-label",children:l("Preview hover state")}),Q("span",{className:"sf-preview-pin-hint",children:l("not shown live")})]}),Q(SN,{checked:Lo,onChange:Ye,ariaLabel:l("Preview hover state")})]}),Q(_x,{tier:ge,children:Q("div",{className:"sf-insp-body es-insp-body sf-scroll",children:oe?oe.render(e,io):P?nt(ts,{children:[P.type===fe&&i.hasSiteSettings&&Q(Qy,{}),Q(Gp,{children:Q(Ta,{entries:Q(Ny,{parts:B,heading:!1,onOpen:q=>R(cl(P.props.id,q))}),entryCount:Vc(B).length})}),Me&&Q(jl,{source:Me,slug:ga(P?.props),menuId:Ul(P?.props)}),Q(Jf,{shown:mo,onChange:A})]}):Q(ts,{children:Q(Ta,{})})})})]})}import{jsx as c,jsxs as S,Fragment as Ab}from"react/jsx-runtime";var be={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)"},pd="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 N({w:e,h:o,tone:t="dark",r=2,style:a}){return c("div",{style:{width:e,height:o,borderRadius:r,background:be[t],flex:"none",...a}})}var FN={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"},W={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)"},de=(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 ns({children:e}){return c("span",{style:{fontSize:"4.64cqw",fontWeight:700,letterSpacing:"0.06em",textTransform:"uppercase",color:u.muted},children:e})}function Eb({over:e,overTone:o,head:t,headSize:r=11.5,cta:a,ctaBg:n,ctaFg:s,tone:i}){return S(Ab,{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 md({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",...de(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 ie({title:e,children:o}){return S("div",{style:{...W,background:u.card,padding:"9px 10px",display:"flex",flexDirection:"column",gap:6},children:[c(ns,{children:e}),o]})}function Ob({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 xd({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 Te({children:e,w:o}){return c("span",{style:{fontSize:"3.98cqw",lineHeight:1.45,color:u.muted,width:o,display:"block"},children:e})}function as({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 Lb({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 EN={wheelslisting:c(ie,{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",...de(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:{...W,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:{...W,padding:"10px 12px",display:"flex",flexDirection:"column",gap:6,justifyContent:"center",...de(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(ie,{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(ie,{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(ie,{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:{...W,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:{...W,background:u.paper,padding:"9px 11px",display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[c(ns,{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:{...W,display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0 13px",gap:8,...de(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(ie,{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(ie,{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(ie,{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(as,{label:"Name"}),c(as,{label:"Email"})]}),c(as,{label:"Message",filled:!0}),c(Lb,{children:"SEND"})]})}),appointmentbooking:c(ie,{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(ie,{title:"Leave a review",children:S("div",{style:{flex:1,display:"flex",flexDirection:"column",gap:5,justifyContent:"center"},children:[c(xd,{filled:4,size:14}),c(as,{label:"Your review",filled:!0}),c(Lb,{children:"POST"})]})}),submitbuild:c(ie,{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:{...W,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:{...W,overflow:"hidden",...de(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:{...W,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(Te,{children:"Every failure starts in the same place \u2014 not the rim, not"}),c(Te,{w:"62%",children:"the tyre, but the bolt nobody re-torqued."})]}),series:c(ie,{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(ie,{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",...de(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:{...W,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:{...W,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(Te,{children:o})]},e))}),docmetacards:c(ie,{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:{...W,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(Te,{children:"Unfitted wheels come back within 30 days, no questions."}),c(Te,{w:"58%",children:"Freight on a change of mind is yours."})]})]}),paragraphs:S("div",{style:{...W,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(Te,{children:"Forged, correctly offset, rated for what you actually"}),c(Te,{children:"carry. Everything else is a photograph."})]})]}),keyfeatures:c(ie,{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:{...W,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(Te,{children:"Twelve years of fitting the same three questions, and the"}),c(Te,{children:"answer has not moved: load rating, offset, then looks."})]})]}),chart:S(ie,{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:{...W,overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",...de(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,...de(u.paper,u.paper2,150)}}),c("span",{style:{height:3,width:"38%",borderRadius:1,background:u.rust}})]})]})}),manifesto:c("div",{style:{...W,overflow:"hidden",display:"flex",alignItems:"center",padding:"0 16px",...de(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(ie,{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(Te,{children:o})]})]},e))})}),timelinetrack:S("div",{style:{...W,padding:"0 12px",display:"flex",flexDirection:"column",gap:10,justifyContent:"center",...de(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:{...W,overflow:"hidden",...de(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:{...W,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:{...W,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:{...W,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:{...W,padding:"10px 12px",display:"flex",flexDirection:"column",alignItems:"center",gap:6,justifyContent:"center",...de(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:{...W,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:{...W,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:{...W,overflow:"hidden",background:u.card},children:[c("div",{style:{position:"absolute",inset:0,...de(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(Te,{children:"One shed, one lathe, one idea."}),c(Te,{w:"66%",children:"It turned out to be right."})]})]}),gallerygrid:c(ie,{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,...de(e,o,140+t*22)}},t))})}),gallery:S(ie,{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,...de(e,o,150+t*20)}},t))})]}),ordersummary:S(ie,{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",...de(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(ie,{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:{...W,background:u.paper,display:"flex",flexDirection:"column",gap:8,justifyContent:"center",padding:"0 12px"},children:[c(ns,{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:{...W,padding:"10px 12px",display:"flex",flexDirection:"column",gap:9,justifyContent:"center",...de(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:{...W,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(xd,{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(Ob,{}),c("span",{style:{fontSize:"3.98cqw",color:u.muted},children:"Dave M. \xB7 Hilux N80"})]})]}),reviews:S(ie,{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,...de(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(Ob,{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(xd,{filled:o})]}),c(Te,{children:t})]})]},e))})]}),logos:S("div",{style:{...W,display:"flex",flexDirection:"column",gap:9,justifyContent:"center",padding:"0 12px",...de(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:{...W,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(Te,{children:"he number on the back of your wheel decides whether the"}),c(Te,{w:"76%",children:"tyre sits under the guard or an inch outside it."})]})]})]}),cards:c(ie,{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(Te,{children:o})]},e))})}),faq:c(ie,{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(Te,{w:"90%",children:"Use the fitment finder \u2014 it reads your build, not just the model."})]},e))})}),hero:S("div",{style:{...W,overflow:"hidden",...de(u.ink,u.ink2)},children:[c("div",{style:{...W,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(Eb,{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:{...W,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(Eb,{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",...de(u.inkSoft,u.inkSoft2)},children:c(Wo,{size:74,style:{right:-14,top:16}})})]}),productgrid:c(ie,{title:"Best sellers",children:S("div",{style:{flex:1,display:"grid",gridTemplateColumns:"repeat(3,1fr)",gap:5,minHeight:0},children:[c(md,{name:"Ridge 19",price:"$365"}),c(md,{name:"Ridge 29",price:"$410"}),c(md,{name:"Ridge 39",price:"$455"})]})}),collections:c(ie,{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,...de(o,t)},children:c("span",{style:{fontSize:"3.98cqw",fontWeight:700,letterSpacing:"0.04em"},children:e})},e))})}),producthero:S("div",{style:{...W,display:"flex",background:u.card,overflow:"hidden"},children:[c("div",{style:{flex:1.1,position:"relative",...de(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(ie,{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(ie,{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:{...W,background:u.paper,padding:10,display:"flex",flexDirection:"column",gap:7,justifyContent:"center"},children:[c(ns,{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:{...W,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,...de(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:{...W,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))})},Rb={subscribe:S("div",{style:{...W,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(N,{w:8,h:8,r:2,tone:"accent"}),c(N,{w:38,h:7,r:3,tone:"dark"}),c(N,{w:16,h:7,r:3,tone:"accent"})]}),c(N,{w:38,h:4,r:2,tone:"soft"})]}),c("div",{style:{height:1,background:be.line,marginBottom:10}}),S("div",{style:{flex:1,display:"flex",gap:10,border:`1px solid ${be.line}`,borderRadius:7,padding:10},children:[S("div",{style:{flex:1.1,display:"flex",flexDirection:"column",justifyContent:"center",gap:5},children:[c(N,{w:"46%",h:3,r:2,tone:"accent"}),c(N,{w:"84%",h:8,r:4,tone:"dark"}),c(N,{w:"56%",h:8,r:4,tone:"accent"}),c(N,{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 ${be.line}`,background:be.block}}),c(N,{w:34,h:13,r:5,tone:"accent"})]})]}),S("div",{style:{flex:1,background:be.block,borderRadius:6,padding:8,display:"flex",flexDirection:"column",gap:6},children:[c(N,{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 ${be.line}`:"none",paddingTop:o?4:0},children:[c(N,{w:34,h:4,r:2,tone:"dark"}),c(N,{w:16,h:3,r:2,tone:"soft"})]},o))]})]})]}),split:S("div",{style:{...W,display:"flex"},children:[c("div",{style:{width:"44%",background:pd}}),S("div",{style:{flex:1,padding:15,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[c(N,{w:"44%",h:5,r:3,tone:"accent"}),c(N,{w:"88%",h:8,r:4,tone:"dark"}),c(N,{w:"70%",h:8,r:4,tone:"dark"}),c(N,{w:"94%",h:5,r:2,tone:"soft",style:{marginTop:2}}),c(N,{w:"80%",h:5,r:2,tone:"soft"}),c(N,{w:"40%",h:13,r:6,tone:"accent",style:{marginTop:5}})]})]}),sectionheader:S(Ab,{children:[c(N,{w:"18%",h:6,r:3,tone:"accent",style:{position:"absolute",top:15,right:16}}),S("div",{style:{...W,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:10},children:[S("div",{style:{display:"flex",alignItems:"center",gap:9},children:[c(N,{w:16,h:16,r:4,tone:"accent"}),c(N,{w:"20%",h:9,r:4,tone:"dark"})]}),c(N,{w:"62%",h:10,r:5,tone:"dark"}),c(N,{w:"42%",h:6,r:3,tone:"soft"})]})]}),header:c("div",{style:{...W,padding:14,display:"flex",flexDirection:"column",justifyContent:"center"},children:S("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[c(N,{w:"22%",h:12,r:4,tone:"dark"}),S("div",{style:{display:"flex",gap:9,alignItems:"center"},children:[c(N,{w:26,h:6,r:3,tone:"soft"}),c(N,{w:26,h:6,r:3,tone:"soft"}),c(N,{w:26,h:6,r:3,tone:"soft"}),c(N,{w:18,h:14,r:5,tone:"accent"})]})]})}),footer:S("div",{style:{...W,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(N,{w:"60%",h:9,r:4,tone:"dark"}),c(N,{w:"90%",h:5,r:2,tone:"soft"}),c(N,{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(N,{w:"50%",h:6,r:3,tone:"dark"}),c(N,{w:"80%",h:5,r:2,tone:"soft"}),c(N,{w:"66%",h:5,r:2,tone:"soft"})]},e))]}),c("div",{style:{height:1,background:be.line}}),S("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c(N,{w:"30%",h:5,r:2,tone:"soft"}),c(N,{w:"16%",h:5,r:2,tone:"soft"})]})]}),grid:c("div",{style:{...W,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:be.block}},o))}),blanksection:c("div",{style:{...W,padding:14,display:"flex"},children:S("div",{style:{flex:1,border:`1px dashed ${be.line}`,borderRadius:7,display:"flex",alignItems:"center",justifyContent:"center",position:"relative"},children:[c(N,{w:14,h:2,r:1,tone:"tint"}),c(N,{w:2,h:14,r:1,tone:"tint",style:{position:"absolute"}})]})}),spacer:S("div",{style:{...W,padding:14,display:"flex",flexDirection:"column",justifyContent:"space-between"},children:[c(N,{w:"100%",h:6,r:3,tone:"soft"}),c(N,{w:16,h:22,r:3,tone:"block",style:{alignSelf:"center"}}),c(N,{w:"100%",h:6,r:3,tone:"soft"})]}),divider:c("div",{style:{...W,padding:14,display:"flex",alignItems:"center"},children:c(N,{w:"100%",h:3,r:2,tone:"dark"})}),customhtml:S("div",{style:{...W,display:"flex",alignItems:"center",justifyContent:"center",gap:8,background:pd},children:[c(N,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(-14deg)"}}),c(N,{w:16,h:10,r:3,tone:"accent"}),c(N,{w:5,h:16,r:2,tone:"dark",style:{transform:"skewX(14deg)"}})]}),heading:c("div",{style:{...W,padding:14,display:"flex",alignItems:"center"},children:c(N,{w:"64%",h:13,r:4,tone:"dark"})}),text:S("div",{style:{...W,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[c(N,{w:"100%",h:6,r:3,tone:"soft"}),c(N,{w:"96%",h:6,r:3,tone:"soft"}),c(N,{w:"100%",h:6,r:3,tone:"soft"}),c(N,{w:"58%",h:6,r:3,tone:"soft"})]}),image:c("div",{style:{position:"absolute",inset:14,borderRadius:7,background:pd}}),button:c("div",{style:{...W,display:"flex",alignItems:"center",justifyContent:"center"},children:c(N,{w:"34%",h:16,r:8,tone:"accent"})}),menu:S("div",{style:{...W,padding:"14px 22%",display:"flex",flexDirection:"column",justifyContent:"center",gap:7},children:[c(N,{w:"48%",h:7,r:3,tone:"dark"}),c(N,{w:"82%",h:5,r:2,tone:"soft"}),c(N,{w:"66%",h:5,r:2,tone:"soft"}),c(N,{w:"74%",h:5,r:2,tone:"soft"}),c(N,{w:"58%",h:5,r:2,tone:"soft"})]}),emailform:S("div",{style:{...W,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[c(N,{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 ${be.line}`}}),c(N,{w:"30%",h:16,r:5,tone:"accent"})]})]}),sociallogos:c("div",{style:{...W,display:"flex",alignItems:"center",justifyContent:"center",gap:9},children:[0,1,2,3].map(e=>c(N,{w:16,h:16,r:8,tone:"dark"},e))}),search:c("div",{style:{...W,padding:"0 18%",display:"flex",alignItems:"center"},children:S("div",{style:{flex:1,height:22,borderRadius:11,border:`1px solid ${be.line}`,display:"flex",alignItems:"center",gap:7,padding:"0 9px"},children:[c("div",{style:{width:9,height:9,borderRadius:5,border:`2px solid ${be.dark}`}}),c(N,{w:"46%",h:5,r:2,tone:"soft"})]})}),cart:S("div",{style:{...W,display:"flex",alignItems:"center",justifyContent:"center",gap:7},children:[c("div",{style:{width:22,height:18,borderRadius:"3px 3px 6px 6px",border:`2px solid ${be.dark}`}}),c("div",{style:{padding:"2px 6px",borderRadius:6,border:`1.5px solid ${be.dark}`},children:c(N,{w:7,h:7,r:2,tone:"dark"})})]}),countryswitch:S("div",{style:{...W,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 ${be.line}`},children:[c(N,{w:22,h:6,r:2,tone:"dark"}),c(N,{w:6,h:4,r:1,tone:"soft"})]}),S("div",{style:{width:"46%",display:"flex",flexDirection:"column",gap:4,padding:6,border:`1px solid ${be.line}`},children:[c(N,{w:"80%",h:4,r:2,tone:"accent"}),c(N,{w:"64%",h:4,r:2,tone:"soft"}),c(N,{w:"72%",h:4,r:2,tone:"soft"})]})]}),legalline:S("div",{style:{...W,padding:16,display:"flex",flexDirection:"column",justifyContent:"center",gap:9},children:[c("div",{style:{height:1,background:be.line}}),S("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[c(N,{w:"38%",h:5,r:2,tone:"soft"}),S("div",{style:{display:"flex",gap:5},children:[c(N,{w:14,h:5,r:2,tone:"soft"}),c(N,{w:14,h:5,r:2,tone:"soft"}),c(N,{w:14,h:5,r:2,tone:"soft"})]})]})]}),fallback:c("div",{style:{position:"absolute",inset:14,borderRadius:8,background:be.block}})};function Bb({type:e}){let o=FN[e]??"",t=EN[o]??Rb[o]??Rb.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 ks}from"efficient-easel/screen/components/ScreenDocumentContext";import{jsx as Sr,jsxs as ON}from"react/jsx-runtime";import LN from"efficient-easel/screen/components/SidePanelHead";import{StylesIcon as RN}from"efficient-easel/rail";import{Tooltip as AN}from"efficient-shell/ui";function Db({tokenRef:e,siteId:o,onClose:t,onNotify:r,tab:a,onTabChange:n}){let s=ur();return ON("div",{className:"sf-styles",children:[Sr(LN,{icon:Sr(RN,{}),title:l("Styles"),context:Sr(AN,{content:l("{name} \u2014 renamed in the Console: {place}.",{name:s,place:l("Storefront \u25B8 Sites \u25B8 Settings")}),className:"sf-name-tip",children:Sr("span",{className:"sf-name-text",children:s})})}),Sr("div",{className:"sf-insp-body es-insp-body sf-scroll",children:Sr(gl,{tokenRef:e,siteId:o,onNotify:r,tab:a,onTabChange:n})})]})}import{jsx as Se,jsxs as _t,Fragment as HN}from"react/jsx-runtime";import{Fragment as Xb,useEffect as Zb,useRef as Sd}from"react";import{useTreeDrag as Qb}from"efficient-easel/drag";import{GlobeIcon as WN,ImageIcon as zN,LocationIcon as GN,MapIcon as UN,TextLinesIcon as $N,TrashIcon as Jb}from"efficient-easel/icons";import{Subtree as eS,TreeRow as Oa,TreeRowAction as oS,TreeSeam as tS}from"efficient-easel/tree";import{useEaselStrings as qN}from"efficient-easel/strings";import{createPreviewSelectionContext as BN}from"efficient-easel/draw/client";var{Provider:WJ,useSelection:_b}=BN("selectedLocationPartId");function Nb(e,o,t){return`${e}::${o}::${t}`}function Mb(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{isSelectionMode as jN}from"efficient-easel/screen/lib/screen-parts";import{useSyncExternalStore as DN}from"react";var _N={level:"groups"},Wb=_N,Id=new Set;function lo(e){Wb=e;for(let o of Id)o()}function NN(e){return Id.add(e),()=>{Id.delete(e)}}var Hb=()=>Wb;function zb(){return DN(NN,Hb,Hb)}function Gb(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 $J(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??""),hd=new WeakMap,MN=0;function ls(e){let o=hd.get(e);return o||(o=`loc${++MN}`,hd.set(e,o)),o}var Ub=(e,o)=>o||e||"Ungrouped",$b={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 Dt(e){return Gb(e,Ea,o=>String(o?.groupName??"")).map(o=>({key:o.key,name:o.name,cards:o.items.map(t=>t.item)}))}var gd=e=>e.flatMap(o=>o.cards),qb=(e,o,t)=>Math.min(Math.max(e,o),t);function ss(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 yd(e,o,t){let r=Dt(e);if(o<0||o>=r.length)return e;let[a]=r.splice(o,1),n=qb(o<t?t-1:t,0,r.length);return r.splice(n,0,a),gd(r)}function bd(e,o,t,r,a){let n=Dt(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&&hd.set(d,ls(f));let p=qb(s===i&&t<a?a-1:a,0,i.cards.length);return i.cards.splice(p,0,d),gd(n)}function jb(e,o){let t=Dt(e),r=t.find(n=>n.key===o),a={...$b,group:o,groupName:r?.name??""};return r?(r.cards.push(a),gd(t)):[...e,a]}function Kb(e){let o=new Set(Dt(e).map(a=>a.key)),t=o.size+1,r=`Group ${t}`;for(;o.has(r);)r=`Group ${++t}`;return{cards:[...e,{...$b,group:r,groupName:""}],key:r}}function Vb(e,o){return e.filter(t=>Ea(t)!==o)}function Yb(e,o,t){let r=ss(e,o,t);return r<0?e:e.filter((a,n)=>n!==r)}function KJ(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 VJ(e,o,t){return o.flatMap(r=>{let a=e.filter(n=>Ea(n)===r);return a.length?a:t(r)})}var fs="ContactLocations",is=e=>({parentId:`locations-${e}`,slot:"groups"}),Cd=(e,o)=>({parentId:`locations-${e}`,slot:`cities:${o}`});function rS(e,o){let{readOnly:t,selected:r}=o,a=qN().tree,n=o.data?.content??[],s=jN(e),i=Sd(null);Zb(()=>{let y=r?.type===fs?String(r.props.id):null;y&&y!==i.current&&lo({level:"groups"}),i.current=y},[r?.props.id]);let{selectedLocationPartId:f,setSelectedLocationPartId:d,setSelectHandler:p}=_b(),m=zb(),x=(y,h)=>{let E=n[y];E&&o.replace(y,{type:E.type,props:{...E.props,locations:h}})},I=y=>{let h=n[y]?.props?.locations;return Array.isArray(h)?h:[]},b=Qb({keyOf:y=>`group:${y.si}:${y.index}`,readOnly:!!t,canDrop:(y,h)=>h.parentId===is(y.si).parentId&&h.slot==="groups",onDrop:(y,h)=>{x(y.si,yd(I(y.si),y.index,h.index)),m.level==="city"&&lo({level:"groups"})},onStep:(y,h)=>{x(y.si,yd(I(y.si),y.index,h<0?y.index-1:y.index+2)),m.level==="city"&&lo({level:"groups"})}}),w=Qb({keyOf:y=>`city:${y.si}:${y.group}:${y.index}`,readOnly:!!t,canDrop:(y,h)=>h.parentId===is(y.si).parentId&&h.slot.startsWith("cities:"),onDrop:(y,h)=>{let E=h.slot.slice(7);x(y.si,bd(I(y.si),y.group,y.index,E,h.index)),lo({level:"group",key:E})},onStep:(y,h)=>{x(y.si,bd(I(y.si),y.group,y.index,y.group,h<0?y.index-1:y.index+2)),m.level==="city"&&lo({level:"group",key:y.group})}}),k=Sd(n);k.current=n;let T=Sd(()=>{});Zb(()=>{p(y=>{let h=Mb(y);if(!h)return;let E=k.current.findIndex(F=>F.props?.id===h.nodeId);E<0||T.current(E,{level:h.part,index:h.index})})},[p]);let C=(y,h)=>{i.current=n[y]?.props?.id??null,o.select(y),lo(h),e.reveal();let E=n[y]?.props?.id;typeof E=="string"&&(h.level==="image"||h.level==="map")?d(Nb(E,h.index,h.level)):d(null),typeof E=="string"&&o.scrollTo(E)};return T.current=C,{renderLocationTree:(y,h,{rowClick:E,isCollapsed:F,toggleCollapse:R})=>{let P=I(h),D=Dt(P),M=String(y.props.id),v=s&&r?.props.id===M,L=B=>Se(tS,{...t?{}:b.seam({place:{...is(h),index:B}})},`seam:${M}:groups:${B}`),_=(B,$)=>Se(tS,{...t?{}:w.seam({place:{...Cd(h,B),index:$}})},`seam:${M}:cities:${B}:${$}`);return _t(HN,{children:[Se(Oa,{icon:Se($N,{size:13}),name:l("Texts"),words:a,onSelect:()=>C(h,{level:"texts"}),selected:v&&m.level==="texts",rowProps:{onClick:E(()=>C(h,{level:"texts"}))}}),D.map((B,$)=>{let J=`${M}::grp::${B.key}`,oe=F(J),so=v&&m.level==="group"&&m.key===B.key,io=B.name||B.key?Ub(B.key,B.name):l("Ungrouped"),Re={...Cd(h,B.key),index:B.cards.length},fo=w.row({item:{si:h,group:B.key,index:-1},place:Re,into:Re,canDrag:!1},{onClick:E(()=>C(h,{level:"group",key:B.key}))}),Ne=b.row({item:{si:h,index:$},place:{...is(h),index:$}},fo.rowProps);return _t(Xb,{children:[$===0&&L(0),Se(Oa,{icon:Se(WN,{size:13}),name:io,words:a,onSelect:()=>C(h,{level:"group",key:B.key}),selected:so,draggable:Ne.draggable,dragging:Ne.dragging,drop:Ne.drop??fo.drop,fold:{open:!oe,label:l("group"),onToggle:()=>R(J)},actions:Se(oS,{kind:"delete",label:qe("Delete {label} group ({n} city)","Delete {label} group ({n} cities)",B.cards.length,{label:io}),onClick:()=>{x(h,Vb(P,B.key)),lo({level:"groups"})},children:Se(Jb,{size:15})}),rowProps:Ne.rowProps,children:Se("span",{className:"es-group-count",children:B.cards.length})}),!oe&&_t(eS,{children:[B.cards.map((Pe,Ie)=>{let ge=ss(P,B.key,Ie),Me=v&&m.level==="city"&&m.index===ge,Fe=String(Pe?.name??"")||l("City"),co=`${M}::city::${ls(Pe)}`,He=F(co),{rowProps:Ue,...uo}=w.row({item:{si:h,group:B.key,index:Ie},place:{...Cd(h,B.key),index:Ie}},{onClick:E(()=>C(h,{level:"city",index:ge}))});return _t(Xb,{children:[Ie===0&&_(B.key,0),Se(Oa,{icon:Se(GN,{size:13}),name:Fe,words:a,onSelect:()=>C(h,{level:"city",index:ge}),selected:Me,...uo,fold:{open:!He,label:Fe,onToggle:()=>R(co)},actions:Se(oS,{kind:"delete",label:l("Delete {name}",{name:Fe}),onClick:()=>{x(h,Yb(P,B.key,Ie)),lo({level:"group",key:B.key})},children:Se(Jb,{size:15})}),rowProps:Ue}),!He&&_t(eS,{children:[Se(Oa,{icon:Se(zN,{size:13}),name:l("Image"),words:a,onSelect:()=>C(h,{level:"image",index:ge}),selected:v&&m.level==="image"&&m.index===ge,rowProps:{onClick:E(()=>C(h,{level:"image",index:ge}))}}),Se(Oa,{icon:Se(UN,{size:13}),name:l("Map"),words:a,onSelect:()=>C(h,{level:"map",index:ge}),selected:v&&m.level==="map"&&m.index===ge,rowProps:{onClick:E(()=>C(h,{level:"map",index:ge}))}})]}),_(B.key,Ie+1)]},ls(Pe))}),_t("button",{type:"button",className:"sf-add-card",onClick:()=>{let Pe=jb(P,B.key);x(h,Pe);let Ie=Dt(Pe).find(ge=>ge.key===B.key);lo(Ie&&Ie.cards.length?{level:"city",index:ss(Pe,B.key,Ie.cards.length-1)}:{level:"group",key:B.key})},children:[Se("span",{className:"sf-plus sf-plus--sm",children:"+"}),l("Add city")]})]}),L($+1)]},J)}),_t("button",{type:"button",className:"sf-add-card",onClick:()=>{let{cards:B,key:$}=Kb(P);x(h,B),C(h,{level:"group",key:$})},children:[Se("span",{className:"sf-plus sf-plus--sm",children:"+"}),l("Add group")]})]})},sectionPressed:y=>{y?.type===fs&&lo({level:"groups"})}}}import{useEffect as bM,useRef as SM}from"react";import{createNode as Ed,newId as Od}from"efficient-easel/data";import{useEaselApi as CM}from"efficient-easel/easel";import{useScreenDocument as wM}from"efficient-easel/screen/components/ScreenDocumentContext";import{useEaselSession as vM}from"efficient-easel/screen/lib/session-context";import{useEffect as IM,useRef as hM}from"react";import{useEasel as gM}from"efficient-easel/easel";import{ROOT_ZONE as Fd}from"efficient-easel/draw";import{readHidable as iM}from"efficient-easel/draw";var aS=["general","commerce","service"],Cr=[{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:"Divider",label:"Divider",set:"general"},{type:"CustomHTML",label:"Custom HTML",set:"general"}]}];function iee(){return Object.fromEntries(Cr.map(e=>[e.key,{title:e.title,components:e.sections.map(o=>o.type),...e.defaultExpanded?{defaultExpanded:!0}:{}}]))}var KN={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` in the Phone view. 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/document/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/document/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.",Spacer:`Lewis, 2026-10-10 (section-merges.md group 19, approved): one Divider holds space and lines. Style = None (was Spacer) / Line / Stripes; the space above and below as number boxes. Retired by card [MERGE] Spacer Into Divider (2026-10-26).
|
|
7
|
-
|
|
8
|
-
WHAT REPLACES IT: a Divider with Style set to None. It draws no line, only its space, and that space is the Divider's Padding row (top and bottom, each with its phone value): the Spacer's 24 / 48 / 96 / 160 px are None with Padding 12 + 12, 24 + 24, 48 + 48, 80 + 80. \`scripts/test-divider-holds-the-spacer.tsx\` \xA75 holds it.
|
|
9
|
-
|
|
10
|
-
WHAT A MERCHANT LOSES on a NEW space: nothing the Spacer had. Four fixed sizes become any number on the 4px grid, top and bottom apart, and a phone value.
|
|
11
|
-
|
|
12
|
-
NO CONVERTER ROW: 0 Spacer nodes on any page, draft or published, in any schema of the local production clone (read-only count, 2026-10-26), and none in the backend's seed files. It stays in \`scripts/fixtures/section-to-box.baseline.json\` with that reason.
|
|
13
|
-
|
|
14
|
-
THE TYPE KEY STAYS AND SO DOES THE COMPONENT. A Spacer anywhere still renders through it and can still be edited; no document is rewritten.`,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).
|
|
15
|
-
|
|
16
|
-
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.
|
|
17
|
-
|
|
18
|
-
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.
|
|
19
|
-
|
|
20
|
-
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."},fee=["Grid","Spacer"],cee=Array.from(new Set([...Cr.flatMap(e=>e.sections.map(o=>o.type)),...Object.keys(KN)])),dee=Object.fromEntries(Cr.flatMap(e=>e.sections.map(o=>[o.type,o.label]))),VN={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",Spacer:"general",CollectionCard:"commerce",GalleryItem:"commerce",ProductRef:"commerce",CompatibleTyres:"commerce",Header:"commerce",SearchBlock:"commerce",CartBlock:"commerce",CountrySwitchBlock:"commerce",AccountBlock:"commerce",ThemeSwitchBlock:"commerce",ProductGallery:"commerce",EuTyreLabelBlock:"commerce",SubmitBox:"service",BookingBox:"service",SubscribeBlogs:"service",RatingBlock:"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"},cs={...VN,...Object.fromEntries(Cr.flatMap(e=>e.sections.map(o=>[o.type,o.set])))};function nS(e){return Object.prototype.hasOwnProperty.call(cs,e)?cs[e]:void 0}function wd(e){return Object.keys(cs).filter(o=>cs[o]===e).sort()}var uee=wd("general"),pee=wd("commerce"),mee=wd("service"),vd="Flex",lt="Box",xee=`${lt}es`;function YN(e){return e==="section"?"Blank section":lt}function kd(e,o,t){return e===vd?YN(o):t}var st="content",ue="Flex",XN="Text & media",ZN="Layout & structure",QN=[{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:XN})),JN=(Cr.find(e=>e.key==="structure")?.sections??[]).map(e=>({type:e.type,label:e.label,group:ZN})),lS=[...QN,...JN],Td=[{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}],gee=Td.map(e=>e.type),eM=1,oM=Td.filter(e=>e.type!=="HeroGroup");function tM(e){return e<eM?Td:oM}var rM={Flex:{slot:st,choices:()=>lS},Grid:{slot:st,choices:()=>lS},HeroGroup:{slot:st,choices:tM}};function sS(e,o=0){let t=rM[e];return t?{slot:t.slot,choices:t.choices(o)}:null}var it=()=>({tag:"h2",_partStyles:{text:{textStyle:"heading-2"}}}),La=()=>({_partStyles:{text:{textStyle:"body-5",color:"accent",letterSpacing:.3,case:"upper",lineHeight:1.5}}});var aM="inline",nM=[{label:"In this section",value:"inline"},{label:"In its own box",value:"own-box"}];var Eo={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"}},wr="SectionHeader";function iS(e){return e in Eo}function wee(e){return jo(nM,aM,e)}var fS=new Set(["Flex"]);function vee(e){return!!e?.type&&fS.has(e.type)}var lM={not:{context:"parentType",in:[...fS]}};function kee(e,o,t){return Bl(e,t,lM)}var sM={not:{field:"headPlacement",is:"own-box"}};function Tee(e,o,t){return Bl(e,t,sM)}var ds=ue,us=st;function dS(e){let o=Bx(e);return o===null?{}:{cardTheme:o}}function fM(e,o){return o===0?`${e}~box`:`${e}~box-${o+1}`}var cM=new Set(["id"]),ps={};function Bee(e){for(let[o,t]of Object.entries(e)){if(o in ps&&ps[o]!==t)throw new Error(`lib/sections/section-to-box: "${o}" already has a row`);ps[o]=t}}function Dee(e){let o=Eo[e];if(!o)throw new Error(`lib/sections/section-to-box: "${e}" has no head row in SPLITTABLE_SECTIONS`);let t=[{kind:"text",key:o.num,role:"eyebrow"},{kind:"text",key:o.title,role:"heading"}];return o.description&&t.push({kind:"text",key:o.description,role:"body"}),o.headRows.includes("linkText")&&o.headRows.includes("linkHref")&&t.push({kind:"button",key:"linkText",href:"linkHref"}),t}var Pd=e=>iM(e),_ee=e=>Pd(e).text.trim()!=="",dM=e=>e==="heading"?it():e==="eyebrow"?La():{};function uM(e,o,t){let r={...e._partStyles?.text??{},...o??{},...t??{}};return Object.keys(r).length?{_partStyles:{text:r}}:{}}function pM(e,o){if(e===void 0)return{};if(typeof e=="string")return{variant:e};let t=o[e.key];return{variant:typeof t=="string"&&Object.hasOwn(e.map,t)?e.map[t]:e.fallback}}function cS(e,o,t,r){let a={...o};for(let n of e){let[s,i,f]=typeof n=="string"?[n,n,void 0]:n;if(t[s]===void 0)continue;let d=f?f(t[s],t):t[s];d===void 0?delete a[i]:a[i]=d,r(s,i,d===void 0)}return a}function mM(e,o,t={}){let r=e.props,a=o.skip?.(r);if(a!==void 0)return{node:e,nodes:[e],carried:[],dropped:[],siteWrites:[],restyled:[],skipped:a};let n=String(r.id??e.type),s=[],i=[],f=[],d=new Set,p=(h,E)=>{s.push({key:h,home:E}),d.add(h)},m=r._partStyles??{},x=0,I=(h,E)=>({type:h,props:{...E,id:`${n}~${h}-${++x}`}}),b=(h,E,F,R,P,D,M)=>{if(P){for(let L of h??[]){let _=typeof L=="string"?L:L[0];F[_]!==void 0&&M(_,`nothing \u2014 the ${R} has no parts, so it is not drawn`)}return}let v=typeof E=="function"?E(r,t):E??{};return cS(h??[],v,F,(L,_,B)=>M(L,B?`nothing \u2014 the old value draws nothing (${R}: no ${_})`:`${D}${R}: ${_}`))},w=h=>h.map(E=>{let F={...E.props??{}};for(let[R,P]of Object.entries(E.slots??{}))F[R]=w(P);return I(E.type,F)}),k=(h,E,F)=>{let R=Array.isArray(E[h.key])?E[h.key]:[],P=R.map((L,_)=>{let B=L??{},$=h.item?.(B,_,r)??{},J=T($.reverse?[...h.parts].reverse():h.parts,B,!1,`item ${_+1}: `);return h.flat?$.props?J.map(oe=>({...oe,props:{...oe.props,...$.props,id:oe.props.id}})):J:[I(ds,{name:`${h.name} ${_+1}`,...h.props??{},...$.props??{},[us]:J})]}),D=h.perRow?.(r),M=h.perRow?Number.isInteger(D)&&D>=1?D:1:0;if(F(h.key,(R.length?h.flat?`each item's parts (${R.length} items), in order`:`one Box per item (${R.length}), its parts inside`:"nothing \u2014 the list is empty")+(M&&R.length?`, in rows of ${M}`:"")),!M)return P.flat();let v=[];for(let L=0;L*M<P.length;L++)v.push(I(ds,{name:`${h.rowName??`${h.name} row`} ${L+1}`,...h.rowProps??{},[us]:P.slice(L*M,(L+1)*M).flat()}));return v},T=(h,E,F,R)=>{let P=[],D=(v,L)=>F?p(v,L):void 0,M=v=>F?m[v]:void 0;for(let v of h)if(!(v.when&&!v.when(r,F?void 0:E)))switch(v.kind){case"text":{let L=Pd(E[v.key]);if(!L.text.trim()){D(v.key,"nothing \u2014 empty words draw nothing, so no block");break}let _=dM(v.role??"body"),{_partStyles:B,...$}=_,J=uM(_,v.style,M(v.key));if(v.was&&F){let oe=J._partStyles?.text??{};f.push({key:v.key,was:v.was,...typeof oe.textStyle=="string"?{textStyle:oe.textStyle}:{},...ne(oe.size)!==void 0?{size:ne(oe.size)}:{},...ne(oe.sizePhone)!==void 0?{sizePhone:ne(oe.sizePhone)}:{}})}P.push(I("Text",{text:L.text,...$,...v.props??{},...J,...L.hidden?{_hidden:!0}:{}})),D(v.key,`${R}Text block: its words${L.hidden?", hidden":""}`);break}case"button":{let L=Pd(E[v.key]);if(!L.text.trim()){D(v.key,"nothing \u2014 no words, no button"),D(v.href,"nothing \u2014 no button to link"),typeof v.variant=="object"&&D(v.variant.key,"nothing \u2014 no button to style");break}let _=typeof E[v.href]=="string"&&E[v.href]?E[v.href]:"#",B={...v.style??{},...M(v.key)??{}};P.push(I("ButtonBlock",{label:L.text,href:_,...v.props??{},...pM(v.variant,E),...Object.keys(B).length?{_partStyles:{label:B}}:{},...L.hidden?{_hidden:!0}:{}})),D(v.key,`${R}Button block: its words`),D(v.href,`${R}Button block: its link`),typeof v.variant=="object"&&D(v.variant.key,`${R}Button block: its Style`);break}case"image":{let L=E[v.key];if(typeof L!="string"||!L){D(v.key,"nothing \u2014 no picture, no block"),v.alt&&D(v.alt,"nothing \u2014 no picture to describe");break}let _=v.alt&&typeof E[v.alt]=="string"?E[v.alt]:"";P.push(I("ImageBlock",{src:L,alt:_,...v.props??{}})),D(v.key,`${R}Image block: its picture`),v.alt&&D(v.alt,`${R}Image block: its alt text`);break}case"list":{P.push(...k(v,E,D));break}case"group":{let L=T(v.parts,E,F,R),_=b(v.box,v.props,E,`${v.name} Box`,!L.length&&!v.keepEmpty,R,D);_&&P.push(I(ds,{name:v.name,..._,[us]:L}));break}case"block":{let L=v.parts?T(v.parts,E,F,R):[],_=b(v.box,v.props,E,`${v.type} block`,!!v.parts&&!L.length&&!v.keepEmpty,R,D);_&&P.push(I(v.type,{..._,...v.slot?{[v.slot]:L}:{}}));break}case"core":{let L=v.as??e.type,_={headPlacement:"own-box",...v.props??{}};for(let B of v.keep)E[B]!==void 0&&(_[B]=E[B],D(B,`the ${L} block inside the Box`));for(let[B,$]of Object.entries(v.rename??{}))E[B]!==void 0&&(_[$]=E[B],D(B,`the ${L} block inside the Box: ${$}`));for(let[B,$]of Object.entries(v.slots??{}))_[B]=$.flatMap(J=>"kind"in J?k(J,E,D):w([J]));P.push(I(L,_));break}}return P},C=(h,E)=>{let F=E===0?"Box":`${h.name} Box`,R=T(h.parts,r,!0,E===0?"":`${F}: `),P=typeof h.boxProps=="function"?h.boxProps(r,t):h.boxProps??{},D=cS(h.box??[],P,r,(M,v,L)=>p(M,L?`nothing \u2014 the old value draws nothing (${F}: no ${v})`:`${F}: ${v}`));return{type:ds,props:{name:h.name,...D,[us]:R,id:fM(n,E)}}},y=[o,...o.also??[]].map(C);r._partStyles!==void 0&&p("_partStyles","each old part's style moved to its new part");for(let[h,E]of Object.entries(o.drop??{}))h in r&&(i.push({key:h,why:E}),d.add(h));for(let h of Object.keys(r))cM.has(h)||d.has(h)||i.push({key:h,why:"not in the row \u2014 not carried"});return{node:y[0],nodes:y,carried:s,dropped:i,siteWrites:[...o.site?.(e,t)??[]],restyled:f}}var xM=e=>typeof e.cardTheme=="number"?{cardTheme:e.cardTheme}:{};function uS(e,o={}){if(!Array.isArray(e))return[];let t=[];return e.forEach((r,a)=>{let n=r&&typeof r.type=="string"?ps[r.type]:void 0;if(!n?.on)return;let s=mM(r,n,xM(o));s.skipped===void 0&&t.push({index:a,node:s.node,nodes:s.nodes})}),t}function pS(e){let o=gM(a=>a.appState.data.content),t=hM(new Set),{cardThemeIndex:r}=K();IM(()=>{let a=dS(Dn(r));yM(uS(o,a),e,t.current)},[o,e,r])}function yM(e,o,t){for(let{index:r,nodes:a}of[...e].sort((n,s)=>s.index-n.index)){let n=String(a[0].props.id);t.has(n)||(t.add(n),o.replaceComponent(Fd,r,a[0]),a.slice(1).forEach((s,i)=>{o.insertNode(Fd,r+1+i,s),o.replaceComponent(Fd,r+1+i,s)}))}}import{ROOT_ZONE as vr,missingPinnedTypes as kM,pinnedDuplicateIds as Ld}from"efficient-easel/draw";function mS(e){return!e.docId||e.saveStatus==="saving"?!1:e.seededDocId!==e.docId}function xS(e,o){let t=e.some(i=>i?.type===se),r=e[e.length-1],a=!t&&r?.type===fe?r:null,n=e.filter(i=>i?.type===fe&&i!==a).map(i=>String(i.props?.id??"")).filter(Boolean),s=o.hasChromeDoc&&!t&&!a;return{remove:n,seedHeader:!e.some(i=>i?.type===_e),seedFooter:s,seedSiteHeader:s&&!e.some(i=>i?.type===ce)}}async function IS(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!==ce||!e.stillOpen())return!1;let r=e.latest();return r.some(a=>a?.type===ce)?!1:(e.write(Xl(r,t)),!0)}function hS(e,o){let{adapter:t,capabilities:r,currentSlug:a,docId:n,data:s,saveStatus:i,siteId:f,tokenRef:d}=wM(),p=vM(),{hasSiteSettings:m,hasPinnedChrome:x}=r;pS(e);let I=!!r.editsPinnedInPlace&&a!==Zt,b=a===Zt,w=CM().getState,k=SM(null);bM(()=>{if(!mS({docId:n,saveStatus:i,seededDocId:k.current})||(k.current=n,!x))return;let T=w().appState.data,C=T.content,y=s?.content??[],h=(P,D)=>P.some(M=>M?.type===D);if(!m){let P=new Set(Ld(C)),D=P.size?C.filter(v=>!P.has(v.props.id)):C;if(P.size&&e.setDocument({...T,content:D}),b)return;let M=kM(D,y);if(M.includes(fe)){let v=D.length,L=e.insertSection(fe,v);e.replaceComponent(vr,v,{type:fe,props:{id:L,blocks:Yl()}})}M.includes(_e)&&e.insertNode(vr,0,Vl());return}if(b){let P=yr(C);if(P!==C&&e.setDocument({...T,content:[...P]}),!P.find(D=>D.type===fe)&&!h(y,fe)&&!h(P,se)&&!h(y,se)){let D=(v,L)=>Ed(o,v,L),M={type:fe,props:{blocks:Yl()}};e.insertNode(vr,P.length,wa(M,D,Od(se)))}return}if(I){let P=!!t?.pinnedChrome?.state().docId,D=xS(C,{hasChromeDoc:P}),M=new Set([...D.remove,...Ld(C.filter(L=>!D.remove.includes(String(L.props.id))))]),v=M.size?C.filter(L=>!M.has(String(L.props.id))):C;if(v.length!==C.length&&e.setDocument({...T,content:v}),D.seedFooter&&!h(y,fe)&&!h(y,se)){let L=(B,$)=>Ed(o,B,$),_={type:fe,props:{blocks:Yl()}};e.insertNode(vr,v.length,wa(_,L,Od(se)))}if(D.seedHeader&&!h(y,_e)){let L=v[0]?.type===ce?1:0;e.insertNode(vr,L,Vl())}if(D.seedSiteHeader&&!h(y,ce)&&!h(y,fe)&&!h(y,se)){let L=n;IS({blocks:xn(p),make:(_,B)=>Ed(o,_,B),id:Od(ce),siteId:f??null,token:d.current,latest:()=>w().appState.data.content,stillOpen:()=>k.current===L,write:_=>{let B=w().appState.data;e.setDocument({...B,content:[..._]})}})}return}let E=C.filter(P=>P.type!==fe),F=new Set(Ld(E)),R=F.size?E.filter(P=>!F.has(P.props.id)):E;R.length!==C.length&&e.setDocument({...T,content:R}),!h(R,_e)&&!h(y,_e)&&e.insertNode(vr,0,Vl())},[n,i,s,w,e,m,x,b,I,t,p,f,d])}import{useEffect as gS,useMemo as TM,useRef as yS}from"react";import{useEasel as PM}from"efficient-easel/easel";import{useEaselHost as FM}from"efficient-easel/screen/lib/host";var Rd=e=>typeof e.requestId=="string"&&e.requestId?e.requestId:null;function bS(){let e=FM(),{appState:o,selectedItem:t,dispatch:r,history:a,config:n}=PM(x=>x),s=n,i=yS({appState:o,dispatch:r,history:a,blockConfig:s});i.current={appState:o,dispatch:r,history:a,blockConfig:s};let f=yS(new Map),d=t?.props?.id,p=TM(()=>Wx(s,o.data,d),[s,o.data,d]),m=p?JSON.stringify(p):"";gS(()=>{e.connected&&e.send("storefront-editor:selection",{selection:p})},[e,m]),gS(()=>e.subscribe(x=>{let{appState:I,dispatch:b,history:w,blockConfig:k}=i.current;switch(x.type){case"storefront-editor:request-document":{let T=Rd(x);if(!T)return;e.send("storefront-editor:document",{requestId:T,document:I.data,blocks:Ux(k)});return}case"storefront-editor:apply-page-edits":{let T=Rd(x);if(!T)return;let C=Array.isArray(x.ops)?x.ops:[],y=C.length?$x(k,I.data,C,h=>`${h}-${crypto.randomUUID()}`):{ok:!1,reason:"no changes"};y.ok&&(b({type:"setData",data:y.document,recordHistory:!0}),f.current.set(T,JSON.stringify(y.document.content??[]))),e.send("storefront-editor:page-edits-result",{requestId:T,applied:y.ok,reason:y.ok?null:y.reason});return}case"storefront-editor:undo-page-edits":{let T=Rd(x);if(!T)return;let C=f.current.get(T),y=C!==void 0&&C===JSON.stringify(I.data.content??[]);y&&w.hasPast&&(w.back(),f.current.delete(T)),e.send("storefront-editor:page-edits-result",{requestId:T,applied:y&&w.hasPast,reason:y?null:"the page has changed since"});return}case"storefront-editor:set-right-panel":typeof x.shown=="boolean"&&b({type:"setUi",ui:{rightSideBarVisible:x.shown}});return;default:return}}),[e])}import{useEffect as wS,useState as vS}from"react";var ms=new Map;async function EM(e,o){try{return(await Ce().site.get({siteId:o})).slug?.trim()||null}catch(t){return console.warn("[editor-site-slug] could not resolve the site slug",t),null}}function SS(e,o){let t=ms.get(o);return t||(t=EM(e,o),ms.set(o,t),t.catch(()=>{ms.get(o)===t&&ms.delete(o)})),t}var OM=/^(localhost|(?:[a-z0-9-]+\.)+localhost|127(?:\.\d{1,3}){3}|0\.0\.0\.0|\[::1\]|::1)$/i;function Ad(e){return!!e&&OM.test(e)}function CS(e){let{pageSlug:o,siteSlug:t,hostname:r}=e,a=o===an?"/":`/${encodeURIComponent(o)}`;if(!Ad(r))return a;let n=t?.trim();return n?`${a}?site=${encodeURIComponent(n)}`:a}function kS(e){let{pageSlug:o,siteId:t,token:r}=e,[a,n]=vS(null),[s,i]=vS(null),f=Ya();wS(()=>i(f?new URL(f).hostname:window.location.hostname),[f]),wS(()=>{if(!Ad(s)||!t||!r){n(null);return}let p=!1;return SS(r,t).then(m=>{p||n(m)}),()=>{p=!0}},[s,t,r]);let d=CS({pageSlug:o,siteSlug:a,hostname:s});return f?`${f}${d}`:d}import{jsx as Ra}from"react/jsx-runtime";import{ExternalIcon as TS}from"efficient-easel/icons";import{EaselIconButton as LM}from"efficient-easel/chrome";import{Tooltip as RM,iconButtonClasses as AM}from"efficient-shell/ui";function BM({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 PS({liveHref:e,pageId:o,draftLink:t}){return t&&o?Ra(LM,{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:()=>{BM({pageId:o,liveHref:e,draftLink:t})},children:Ra(TS,{})}):Ra(RM,{content:l("Preview the live site (opens in a new tab)"),side:"bottom",children:Ra("a",{className:AM({className:"es-iconbtn"}),href:e,target:"_blank",rel:"noopener noreferrer","aria-label":l("Preview the live site in a new tab"),children:Ra(TS,{})})})}import{createElement as zM,useCallback as GM,useEffect as KS,useRef as VS,useState as UM}from"react";import{ClockIcon as $M}from"efficient-shell/icons/efficient";import{useScreenDocument as qM}from"efficient-easel/screen/components/ScreenDocumentContext";import{useSyncExternalStore as DM}from"react";import{useScreenDocument as _M}from"efficient-easel/screen/components/ScreenDocumentContext";var NM=()=>()=>{},FS=()=>null;function xs(e){return DM(e?e.subscribe:NM,e?e.state:FS,e?e.state:FS)}function Is(){let{adapter:e}=_M();return e?.pinnedChrome}import{useSyncExternalStore as LS}from"react";var Aa=!1,kr=null,Bd=new Set;function Da(){for(let e of Bd)e()}function RS(e){return Bd.add(e),()=>{Bd.delete(e)}}function AS(){Aa||(Aa=!0,Da())}function BS(){Aa&&(Aa=!1,Da())}function ES(){return Aa}function DS(){return LS(RS,ES,ES)}function OS(){return kr}function hs(){kr&&(kr=null,Da())}function _S(){return LS(RS,OS,OS)}var Ba=class extends Error{constructor(){super("The editor's last changes could not be saved, so nothing was restored."),this.name="HeldEditsNotSaved"}};async function NS(e,o,t,{flushSave:r,reload:a}){if(!await r())throw new Ba;let n=await e.restore(o,t);return lm(n.liveState),a(),n}async function MS({access:e,version:o,page:t,...r}){let a=await NS(e,o.id,t?{page:t.id}:{},r);kr={title:MM(o,t??null),undo:a.undo},Da()}async function HS({access:e,...o}){let t=kr?.undo;t&&(await NS(e,t,{},o),kr=null,Da())}function WS(e){return e.name?e.name:e.kind==="draft_before_restore"?l("Draft before restore"):l("Version {n}",{n:e.number})}function MM(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 zS(e){let o=e.changes.filter(r=>r.kind==="page").length,t=[...o?[qe("{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(Ns(),{type:"conjunction"}).format(t)}catch{return t.join(", ")}}function GS(e){return e.change==="take_down"?l("{name} (taken down)",{name:e.name}):e.name}function US(e,o=new Date){let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let r=Ns(),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 HM}from"react";var Tr=new Map,Dd=new Set;function _d(e,o){if(!(Tr.has(e)&&Tr.get(e)===o)){Tr.set(e,o);for(let t of Dd)t()}}function Uoe(e,o){_d(e,o)}function $oe(e,o){let t=Tr.get(e);_d(e,o??(t==="live"?"changed":t))}function qoe(e,o){_d(e,o??"live")}function joe(e){return Tr.get(e)}function WM(e){return Dd.add(e),()=>{Dd.delete(e)}}function $S(e){let o=()=>e?Tr.get(e):void 0;return HM(WM,o,o)}function qS(e,o){return e==="live"&&o?"changed":e}function Nd({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 jS(e){return e.map(o=>o.change==="take_down"?l("{name} (taken down)",{name:o.name}):o.name)}function YS(e){let{docId:o,capabilities:t,hasUnsavedEdits:r,onPublish:a,adapter:n}=qM(),s=qS($S(o??null),r),i=xs(Is()),f=n.siteLiveState;KS(()=>{if(f)return vi(f),gn(0),()=>vi(null)},[f]);let d=yn(),[p,m]=UM(!1),x=VS(e);x.current=e;let I=VS(!0);KS(()=>(I.current=!0,()=>{I.current=!1}),[]);let b=GM(()=>{m(!0),a(x.current).then(()=>{hs()}).finally(()=>{I.current&&m(!1)})},[a]);if(t.canPublish){if(f){let w=d===void 0?void 0:r||d.state==="changed"?"changed":"live",k=Nd({live:w,onPress:b,busy:p,goingLive:jS(d?.changes??[])});return n.siteVersions?{...k,menuItems:jM()}:k}return Nd({live:s,onPress:b,busy:p,pinnedUnpublished:i?.unpublished??!1})}}function jM(){return[{key:"version-history",label:l("Version history"),icon:zM($M),onSelect:AS}]}import{jsx as z,jsxs as Ge,Fragment as Ma}from"react/jsx-runtime";import{useCallback as KM,useEffect as VM,useId as QS,useRef as YM,useState as Ke}from"react";import{Avatar as XM,Banner as _a,Button as Nt,ColoredBadge as Md,Dialog as JS,Drawer as ZM,DropdownMenu as QM,FormField as eC,iconButtonClasses as JM,Inline as Hd,Input as e2,ListRow as o2,Select as t2,SortableList as r2,Stack as Na}from"efficient-shell/ui";import{EditIcon as a2,EyeIcon as XS,MenuIcon as n2,MoreIcon as l2,PageIcon as oC,RevertIcon as ZS,StylesIcon as s2}from"efficient-shell/icons/efficient";import{useScreenDocument as tC}from"efficient-easel/screen/components/ScreenDocumentContext";var i2={page:oC,menu:n2};function f2(e,o){return e.pages.find(t=>t.id===o)??e.pages[0]??null}function c2(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 d2({version:e,page:o,waiting:t,busy:r,error:a,onCancel:n,onConfirm:s,onPage:i}){let f=QS();if(!e)return null;let d=e.kind==="draft_before_restore",p=e.number,m=zS(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}),b=e.deletedPictures??0;return z(JS,{open:!0,onClose:()=>{r||n()},size:"sm",title:x,footer:Ge(Ma,{children:[z(Nt,{variant:"secondary",onClick:n,disabled:r,children:l("Cancel")}),z(Nt,{onClick:s,loading:r,disabled:r,children:l("Restore as draft")})]}),children:Ge(Na,{gap:4,children:[o&&e.pages.length>1?z(eC,{label:l("Page"),htmlFor:f,children:z(t2,{id:f,value:o.id,options:e.pages.map(w=>({value:w.id,label:w.name})),onChange:i,disabled:r})}):null,z("p",{children:I}),z("p",{children:l("Your live website does not change until you press Publish.")}),b>0?z(_a,{tone:"warning",children:qe("{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.",b)}):null,t?z(_a,{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?z(_a,{tone:"danger",children:a}):null]})})}function u2({version:e,onCancel:o,onSave:t}){let r=QS(),[a,n]=Ke(null),[s,i]=Ke(""),[f,d]=Ke(!1),[p,m]=Ke(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 z(JS,{open:!0,onClose:()=>{f||o()},size:"sm",title:l("Name this version"),footer:Ge(Ma,{children:[z(Nt,{variant:"secondary",onClick:o,disabled:f,children:l("Cancel")}),z(Nt,{onClick:()=>{I()},loading:f,disabled:f||x,children:l("Save")})]}),children:z(eC,{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:z(e2,{id:r,value:s,invalid:!!p,onChange:b=>i(b.target.value),onKeyDown:b=>{b.key==="Enter"&&I()}})})})}function p2({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:z(XS,{}),onSelect:r}],...f?[{key:"restore",label:i?l("Put these drafts back"):l("Restore whole website"),icon:z(ZS,{}),onSelect:a}]:[],...f&&!i&&e.pages.length?[{key:"restore-page",label:l("Restore one page only"),icon:z(oC,{}),onSelect:n}]:[],...i?[]:[{type:"divider",key:"divider"},{key:"name",label:l("Name this version"),icon:z(a2,{}),onSelect:s}]];return z(o2,{title:Ge("span",{className:"sf-version-title",children:[z("span",{children:WS(e)}),e.live?z(Md,{tone:"success",size:"xs",children:l("Live")}):null,e.name?z(Md,{tone:"neutral",size:"xs",children:l("Version {n}",{n:e.number})}):null,i?z(Md,{tone:"warning",size:"xs",children:l("Not published")}):null]}),expanded:o,onToggle:t,actions:z(QM,{align:"end","aria-label":l("More"),items:p,triggerClassName:JM({variant:"ghost",size:"sm"}),trigger:z(l2,{})}),below:Ge(Na,{gap:3,children:[Ge(Hd,{gap:2,align:"center",wrap:!0,className:"sf-version-meta",children:[z(XM,{name:e.createdBy,size:"xs"}),z("span",{children:e.createdBy}),z("span",{"aria-hidden":"true",children:"\xB7"}),z("span",{children:US(e.createdAt)}),d?Ge(Ma,{children:[z("span",{"aria-hidden":"true",children:"\xB7"}),z("span",{children:qe("{n} change","{n} changes",d)})]}):null]}),o?Ge(Na,{gap:3,children:[d?z(Na,{gap:2,children:e.changes.map(m=>{let x=i2[m.kind]??s2;return Ge(Hd,{gap:2,align:"center",children:[z(x,{size:16}),z("span",{children:GS(m)})]},`${m.kind}:${m.id}`)})}):null,Ge(Hd,{gap:2,children:[i?null:z(Nt,{variant:"secondary",size:"sm",leftIcon:z(XS,{}),onClick:r,children:l("Preview")}),f?z(Nt,{variant:"secondary",size:"sm",leftIcon:z(ZS,{}),onClick:a,children:l("Restore")}):null]})]}):null]})})}function m2({open:e,onClose:o,access:t,waiting:r}){let{flushSave:a,reloadFromServer:n,docId:s}=tC(),[i,f]=Ke(null),[d,p]=Ke(!1),[m,x]=Ke(null),[I,b]=Ke(null),[w,k]=Ke(!1),[T,C]=Ke(null),[y,h]=Ke(null),[E,F]=Ke(!1),R=YM(0),P=KM(()=>{let v=++R.current;p(!1),t.list().then(L=>{v===R.current&&f(L)},()=>{v===R.current&&p(!0)})},[t]);VM(()=>{e&&P()},[e,P]);let D=v=>{F(!1),c2(t,v.id).catch(()=>F(!0))},M=async()=>{if(!(!I||w)){k(!0),C(null);try{await MS({access:t,version:I.version,page:I.page,flushSave:a,reload:n}),b(null),o()}catch(v){C(v instanceof Ba?l("Your last changes did not save, so nothing was restored. Try again."):l("The version was not restored. Nothing changed. Try again."))}finally{k(!1)}}};return Ge(Ma,{children:[z(ZM,{open:e,onClose:o,side:"right",size:"md",title:l("Version history"),description:Ge(Ma,{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:z("span",{className:"sf-version-foot",children:l("The newest 30 are kept. Named versions are always kept.")}),children:Ge(Na,{gap:3,children:[E?z(_a,{tone:"danger",onDismiss:()=>F(!1),children:l("The preview did not open. Try again.")}):null,d?z(_a,{tone:"danger",action:z(Nt,{variant:"secondary",size:"sm",onClick:P,children:l("Try again")}),children:l("Version history did not load.")}):i===null?z("p",{className:"sf-version-foot",children:l("Loading versions")}):i.length===0?z("p",{className:"sf-version-foot",children:l("No versions yet. Every Publish from now on keeps one.")}):z(r2,{"aria-label":l("Versions"),spacing:"comfortable",children:i.map(v=>z(p2,{version:v,expanded:m===v.id,onToggle:()=>x(L=>L===v.id?null:v.id),onPreview:()=>D(v),onRestore:()=>{C(null),b({version:v,page:null})},onRestorePage:()=>{C(null),b({version:v,page:f2(v,s)})},onName:()=>h(v)},v.id))})]})}),z(d2,{version:I?.version??null,page:I?.page??null,waiting:r,busy:w,error:T,onCancel:()=>b(null),onConfirm:()=>{M()},onPage:v=>b(L=>L&&{...L,page:L.version.pages.find(_=>_.id===v)??L.page})}),z(u2,{version:y,onCancel:()=>h(null),onSave:async v=>{await t.name(y.id,v),h(null),P()}})]})}function rC(){let{adapter:e,hasUnsavedEdits:o}=tC(),t=e.siteVersions,r=DS(),a=yn();return t?z(m2,{open:r,onClose:BS,access:t,waiting:o||a?.state==="changed"}):null}import{useEaselSession as Lw}from"efficient-easel/screen/lib/session-context";import{buildPaletteSections as pte,categoryLabel as mte,paletteWithoutPinned as xte,pinnedSection as Ite}from"efficient-easel/screen/lib/document/palette-sections";var x2={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 aC(e){return x2[e]?.label}var nC=vd;import{currentEaselSession as I2}from"efficient-easel/screen/lib/session";var h2={general:!0,commerce:!0,service:!0};function Wd(e){let o=e?.sets;return o?Object.fromEntries(aS.map(t=>[t,o.includes(t)])):h2}function Ste(e=I2()){return Wd(e.blocks)}import{currentEaselSession as RC}from"efficient-easel/screen/lib/session";function Le(e,o,t,r={}){return{type:e,props:{...o(e),id:t(e),...r}}}function lC(e,o,t){return Le(ue,e,o,{...t,sectionPaddingTop:void 0,sectionPaddingBottom:void 0})}var g2={Manifesto:(e,o)=>({type:ue,props:{...e(ue),id:o(ue),direction:"row",share:"equal",sectionHeightMode:"screen",name:"Brand Text",content:[Le(ue,e,o,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:40,sectionPaddingRight:40,content:[Le("Text",e,o,La()),Le("Text",e,o,it()),Le("Text",e,o),Le("Stats",e,o)]}),lC(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:[Le(ue,e,o,{direction:"column",justify:"center",blockSpacing:"gap",name:"Text",sectionPaddingTop:100,sectionPaddingBottom:100,sectionPaddingLeft:60,sectionPaddingRight:60,content:[Le("Text",e,o,La()),Le("Text",e,o,it()),Le("Text",e,o),Le("ButtonBlock",e,o)]}),lC(e,o,{direction:"column",name:"Image",content:[Le("ImageBlock",e,o)]})]}}),Subscribe:(e,o)=>({type:ue,props:{...e(ue),id:o(ue),direction:"column",name:"Subscribe",content:[Le("Text",e,o,it()),Le("Text",e,o),Le("Form",e,o)]}})};function gs(e){return g2[e]??null}import{blockTypesIn as EC}from"efficient-easel/screen/lib/document/block-types-in";import{jsx as Wa,jsxs as K2}from"react/jsx-runtime";import{createContext as V2,useContext as Y2}from"react";import{jsx as Pr,jsxs as hC}from"react/jsx-runtime";import{useEffect as Gd,useRef as D2,useState as Ha}from"react";import{jsx as sC}from"react/jsx-runtime";import{createContext as y2,lazy as Ote,Suspense as Lte,useContext as b2}from"react";var S2={Link:au,Image:ru},C2=y2(S2);function iC(){return b2(C2)}function Rte(e){let{Link:o}=iC();return sC(o,{...e})}function fC(e){let{Image:o}=iC();return sC(o,{...e})}import{jsx as cC,Fragment as w2,jsxs as v2}from"react/jsx-runtime";import{useEffect as k2,useRef as dC,useState as T2}from"react";var P2="#t=0.001",F2=2;function E2(e,o){if(e.readyState<F2||!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 uC({src:e,objectPosition:o="50% 50%",onError:t}){let r=dC(null),a=dC(null),[n,s]=T2(!1);return k2(()=>{let i=r.current,f=a.current;if(n||!i||!f)return;let d=()=>{E2(i,f)&&s(!0)};return d(),i.addEventListener("loadeddata",d),i.addEventListener("seeked",d),()=>{i.removeEventListener("loadeddata",d),i.removeEventListener("seeked",d)}},[n]),v2(w2,{children:[cC("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&&cC("video",{ref:r,src:`${e}${P2}`,muted:!0,playsInline:!0,preload:"auto",className:"hidden",onError:t})]})}import{imageCopyUrl as mC,imageSrcSet as O2}from"efficient-shell/image-copies";var pC;function zd(){return pC===void 0?{}:{host:pC}}var Mte="(max-width: 800px) 100vw, min(100vw, 1600px)";function xC(e,{fallbackWidth:o=1280,maxWidth:t}={}){let r=O2(e,{...zd(),...t===void 0?{}:{maxWidth:t}});return r?{src:mC(e,o,zd()),srcSet:r}:{src:e}}function Hte(e){let o=mC(e,1920,zd());return o===e?`url(${e})`:`url("${o}")`}import{formatFocal as L2,parseFocal as R2}from"efficient-shell/format";var A2="sf-focus-phone",B2="--sf-focus-phone";function IC(e){if(typeof e!="string"||!/^\s*-?\d+(\.\d+)?%\s+-?\d+(\.\d+)?%\s*$/.test(e))return{className:"",style:{}};let{x:o,y:t}=R2(e);return{className:A2,style:{[B2]:L2(o,t)}}}var _2=.5;function gC({videoSrc:e,posterSrc:o,showVideo:t=!0,playbackRate:r=_2,objectPosition:a="50% 50%",objectPositionPhone:n,quiet:s=!1}){let i=IC(n),f=o||"",d=e||"",[p,m]=Ha(!1),[x,I]=Ha(!1),[b,w]=Ha(!1),[k,T]=Ha(!1),[C,y]=Ha(!1),h=D2(null);Gd(()=>{m(!1),I(!1),w(!1),T(!1)},[e,o]),Gd(()=>{if(typeof window>"u")return;let R=()=>{let P=window;P.requestIdleCallback?P.requestIdleCallback(()=>y(!0),{timeout:2e3}):setTimeout(()=>y(!0),800)};if(document.readyState==="complete"){R();return}return window.addEventListener("load",R,{once:!0}),()=>window.removeEventListener("load",R)},[]),Gd(()=>{let R=h.current;if(!R)return;let P=()=>{R.playbackRate=r};return P(),R.addEventListener("loadedmetadata",P),()=>R.removeEventListener("loadedmetadata",P)},[e,r]);let E=nu(f),F=f&&E&&!x?xC(f):{src:f};return hC("div",{className:"absolute inset-0 z-[1]",children:[Pr("div",{className:"absolute inset-0",style:{background:"var(--site-surface)"}}),f&&(E?Pr("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):Pr(fC,{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&&!b&&hC("video",{ref:h,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:[lu(d)&&Pr("source",{src:d.replace(/\.mp4$/,".av1.mp4"),type:'video/mp4; codecs="av01.0.08M.10"'}),Pr("source",{src:d,type:"video/mp4"})]},d),t&&s&&d&&C&&!k&&(!f||p)&&Pr(uC,{src:d,objectPosition:a,onError:()=>T(!0)},d)]})}var yC=["top","middle","bottom"],bC=["left","center","right"],SC="bottom",CC="left",N2={top:"Top",middle:"Middle",bottom:"Bottom"},M2={left:"Left",center:"Center",right:"Right"},Zte="Up and down",Qte="Sideways",H2={top:"flex-start",middle:"center",bottom:"flex-end"},W2={left:"flex-start",center:"center",right:"flex-end"},z2="--sf-hero-phone-y",G2="--sf-hero-phone-x";function U2(e){return yC.includes(e)?e:SC}function $2(e){return bC.includes(e)?e:CC}function wC(e,o){let t=U2(e),r=$2(o),a={};return t!==SC&&(a[z2]=H2[t]),r!==CC&&(a[G2]=W2[r]),a}function Jte(){return yC.map(e=>({label:N2[e],value:e}))}function ere(){return bC.map(e=>({label:M2[e],value:e}))}var q2="#0A0A0A",j2=[[0,".5"],[30,".1"],[60,".1"],[100,".85"]];function vC(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 kC(e){return e==null?!0:e!==!1}function TC(e){let o=(e?vC(e):null)??vC(q2);return`linear-gradient(180deg, ${j2.map(([t,r])=>`rgba(${o},${r}) ${t}%`).join(", ")})`}var X2=V2({});function cre({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:b="left",textureOpacity:w,textureOn:k,textureColor:T,quietVideo:C,phoneUpDown:y,phoneSideways:h}=Y2(X2),E=t==="video",F=E?Er(r):void 0,R=E?Er(n):Er(r)??Er(n),P=typeof a=="number"?a/100:1;return K2("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:[Wa(gC,{videoSrc:F,posterSrc:R,showVideo:E,playbackRate:P,objectPosition:s,objectPositionPhone:E?void 0:i,quiet:C}),d>0&&Wa("div",{className:"absolute inset-0 z-[2]",style:{background:f,opacity:Math.min(Math.max(d,0),100)/100}}),kC(k)&&Wa("div",{className:"absolute inset-0 z-[2]",style:{background:TC(T),...w!==void 0?{opacity:w/100}:null}}),Wa("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:{...hp,...wC(y,h)},children:p&&Wa(p,{className:"sf-hero-group-zone",minEmptyHeight:160})})]})}var PC=Array.from({length:3},(e,o)=>({name:`Slide ${o+1}`,process:"Category",mediaType:"image",mediaVideo:"",poster:""}));import{newNodeId as FC}from"efficient-easel/draw";var Z2="ImageBlock",Q2=3,ys=(e,o,t={})=>({type:e,props:{...o?.(e)??{},id:FC(e),...t}}),J2=e=>({...e?.(ue)??{},direction:"column",[st]:[ys(Z2,e),ys(ue,e,{direction:"column",[st]:[ys("Text",e,it()),ys("Text",e)]})]}),Oo={Hero:{slot:"slides",childType:"HeroSlide",addLabel:"Add slide",slider:!0,seeds:()=>PC.map(e=>({...e}))},HeroSlide:{slot:"groups",childType:"HeroGroup",addLabel:`Add ${lt.toLowerCase()}`,seeds:()=>[],addBlocked:tn,notice:Vs},HeroSingle:{slot:"boxes",childType:"HeroGroup",addLabel:`Add ${lt.toLowerCase()}`,seeds:()=>[],addBlocked:tn,notice:Vs},ProcessSteps:{slot:"boxes",childType:ue,addLabel:`Add ${lt.toLowerCase()}`,seeds:e=>Array.from({length:Q2},()=>J2(e)),skipSeed:e=>Array.isArray(e.steps)&&e.steps.length>0}};function gre(e){for(let[o,t]of Object.entries(e)){if(o in Oo&&Oo[o]!==t)throw new Error(`lib/document/slot-specs: "${o}" already has a slot spec`);Oo[o]=t}}function yre(e,o){let t=Oo[e];return t?{slot:t.slot,children:t.seeds(o).map(r=>({type:t.childType,props:{id:FC(t.childType),...r}}))}:null}var OC=()=>({}),LC=new Map;function eH(e){let o=LC.get(e);if(o)return o;let t=new Set,r=Oo[e];if(r)for(let s of r.seeds(OC))for(let i of EC({type:r.childType,props:s}))t.add(i);let a=gs(e);if(a){let s=0;for(let i of EC(a(OC,f=>`${f}-${s+=1}`)))t.add(i)}t.delete(e);let n=[...t].sort();return LC.set(e,n),n}function oH(e){if(!e||!e.sets&&!e.allow&&!e.deny?.length)return null;let o=Wd(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=nS(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)&&eH(f).every(i);return s.set(f,p),p};return{sets:o,offers:i}}var tH="block-offer";function Ud(e=RC()){return e.cache(tH,()=>oH(xn(e)))}function AC(e,o=RC()){let t=Ud(o);return t?t.offers(e):!0}function BC(e,o=0){let t=aH(e,o),r=t?Ud():null;return t&&r?rH(t,r):t}function rH(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 aH(e,o){let t=Oo[e];if(t)return{source:"section",slot:t.slot,choices:null,spec:t};let r=sS(e,o);if(r)return{source:"container",slot:r.slot,choices:r.choices,spec:null};let a=Wy(e);return a?{source:"footer",slot:Hy,choices:a,spec:null}:null}function DC(e){return Dc(e.type)?[{slot:Ac,label:l(ay),rung:!0}]:null}import{useSyncExternalStore as nH}from"react";var $d=null,qd=new Set;function _C(e){if($d!==e){$d=e;for(let o of qd)o()}}function lH(e){return qd.add(e),()=>{qd.delete(e)}}function Hre(){return nH(lH,()=>$d,()=>null)}function NC(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 HC=(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 WC="sf-editor-left-view";function zC(){if(typeof window>"u")return"pages";try{let e=window.localStorage.getItem(WC);return e==="sections"||e==="styles"?e:"pages"}catch{return"pages"}}function GC(e){if(!(typeof window>"u"))try{window.localStorage.setItem(WC,e)}catch{}}function UC(e,o){return e==="styles"&&!o?"sections":e}function $C(e,o){return e?"sections":o}var qC="Footer",sH=[ce,qC,se],Fr=e=>{let o=e?.content;return Array.isArray(o)?o:[]},Mt=e=>{let o=e?.zones;return o&&typeof o=="object"&&!Array.isArray(o)?o:null},za=e=>{let o=e?.props?.id;return typeof o=="string"?o:void 0},jC=e=>Br(e)?.ownerId??"";function KC(e){let o=yr(Fr(e)),t=o.some(r=>r?.type===se);return o.filter(r=>r?.type===ce||r?.type===se||r?.type===qC&&!t)}function jd(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=za(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(jC(s))||(n.add(s),r(i),a=!0)}}return t}function Kd(e,o){let t={},r={};for(let[a,n]of Object.entries(e??{}))(o.has(jC(a))?t:r)[a]=n;return{owned:t,rest:r}}function Kre(e,o){if(!o)return e;let t=KC(o);if(!t.length)return e;let r=t.filter(i=>i.type===ce),a=t.filter(i=>i.type!==ce),n={...e,content:[...r,...Fr(e),...a]},{owned:s}=Kd(Mt(o),jd(t,Mt(o)));return Object.keys(s).length&&(n.zones={...Mt(e)??{},...s}),n}function Vre(e,o){if(!o)return{page:e,chrome:null};let t=KC(o),r=new Set(t.map(za).filter(C=>!!C)),a=[],n=[];for(let C of Fr(e)){let y=za(C);y&&r.has(y)||gr(C?.type)?n.push(C):a.push(C)}let s=new Map(n.map(C=>[za(C),C])),i=new Set,f=yr(Fr(o)).flatMap(C=>{let y=za(C);if(!y||!r.has(y))return[C];let h=s.get(y);return h?(i.add(h),[h]):[]});for(let C of n)i.has(C)||f.some(y=>y?.type===C.type)||(f=C.type===ce?[C,...f]:[...f,C]);f=yr(f);let d=f.length===Fr(o).length&&f.every((C,y)=>C===Fr(o)[y]),p=Mt(e),m=jd(f,p),{owned:x,rest:I}=Kd(p,m),b=Kd(Mt(o),jd(t,Mt(o))).owned,w={...o,content:d?o.content:[...f]},k=Mt(o);if(k||Object.keys(x).length){let C={};for(let[y,h]of Object.entries(k??{}))y in b?y in x&&(C[y]=x[y]):C[y]=h;for(let[y,h]of Object.entries(x))y in C||(C[y]=h);w.zones=C,k&&iH(w.zones,k)&&(w.zones=k)}let T={...e,content:a};return p&&(Object.keys(I).length||!Object.keys(b).length?T.zones=I:delete T.zones),{page:T,chrome:w}}function iH(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&&sH.includes(t)&&o()}var bs=null;function Xre(e){bs=e}function YC(){return!!(bs&&bs.state().lockHolder)}function Ht(){return bs!==null}var fH=new Set(["BookingBox","SubmitBox"]);function cH(e){return typeof e=="string"&&fH.has(e)}var XC=VC(cH,YC);import{copyNode as dH}from"efficient-easel/data";var ZC=null;function oae(e){ZC=e}function zo(){return ZC}var QC=null;function Vd(e){QC=e}function Ss(){return QC}function JC(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 ew={usedOn:e=>{let o=zo(),t=o?.sectionOf(e.props.id)??null;return!o||!t?null:o.usedOn(t)??[]},openPage:e=>Ss()?.openPage(e),adopt:(e,o)=>zo()?.adopt(e.props.id,o),nodeOf:e=>zo()?.place(e)??null,detach:e=>{let o=Ss()?.config;return o?dH(e,o):e},removed:()=>Ss()?.reload()};import{sharedSectionsOf as c5}from"efficient-easel/screen/lib/shared-sections";import{scrollPreviewToSection as d5,scrollPreviewToTop as vw}from"efficient-easel/screen/lib/document/preview-dom";import{Fragment as Xd,jsx as Ga,jsxs as MH}from"react/jsx-runtime";import{useMemo as uw,useRef as pw}from"react";import{EaselCanvas as HH,useEaselApi as WH}from"efficient-easel/easel";import{jsx as lw,Fragment as bH,jsxs as SH}from"react/jsx-runtime";import{useEffect as sw,useLayoutEffect as CH}from"react";var ow="var(--es-accent, #2563eb)";var Cs="data-theme",tw="light";function uH(e){return e.getAttribute(Cs)===tw?"light":"dark"}function pH(e,o){return uH(e)===o?!1:(o==="light"?e.setAttribute(Cs,tw):e.removeAttribute(Cs),!0)}function mH(e){return _s(e).getItem(Es)}function cae(e,o){_s(e).setItem(Es,o)}function xH(e,o,t=new Date().getHours()){return iu({mode:o.mode,override:mH(e),switchShown:o.switchShown,hour:t})}function rw(e,o){let t=e.documentElement;if(!t)return()=>{};let r=()=>pH(t,xH(e,o));r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[Cs]}),()=>n.disconnect()}var IH="style";function hH(e,o){let t=Iu(o),r=!1;for(let a of xu){let n=t[a]??"";e.style.getPropertyValue(a)!==n&&(n?e.style.setProperty(a,n):e.style.removeProperty(a),r=!0)}return r}function aw(e,o){let t=e.body;if(!t)return()=>{};let r=()=>hH(t,o);r();let a=e.defaultView?.MutationObserver;if(!a)return()=>{};let n=new a(r);return n.observe(t,{attributes:!0,attributeFilter:[IH]}),()=>n.disconnect()}var gH=String.raw`(function (doc) {
|
|
21
|
-
if (doc.__sfFitWords) return;
|
|
22
|
-
var win = doc.defaultView;
|
|
23
|
-
var SELECTOR = "h1,h2,h3,h4,h5,h6,[class*='font-heading'],[class*='font-display']";
|
|
24
|
-
var MIN_SCALE = 0.3, MIN_PX = 16, SLACK = 1;
|
|
25
|
-
|
|
26
|
-
function measure(el) {
|
|
27
|
-
var widest = 0, current = 0, last = null, split = false, lastBlock = null;
|
|
28
|
-
function blockOf(n) {
|
|
29
|
-
for (var p = n.parentElement; p && p !== el; p = p.parentElement) {
|
|
30
|
-
var d = win.getComputedStyle(p).display;
|
|
31
|
-
if (d.indexOf("inline") !== 0 && d !== "contents") return p;
|
|
32
|
-
}
|
|
33
|
-
return el;
|
|
34
|
-
}
|
|
35
|
-
function close() { if (current > widest) widest = current; current = 0; last = null; }
|
|
36
|
-
var walker = doc.createTreeWalker(el, 5), range = doc.createRange(), node;
|
|
37
|
-
while ((node = walker.nextNode())) {
|
|
38
|
-
if (node.nodeType === 1) {
|
|
39
|
-
if (node.tagName === "BR" || node.tagName === "WBR") close();
|
|
40
|
-
continue;
|
|
41
|
-
}
|
|
42
|
-
var block = blockOf(node);
|
|
43
|
-
if (block !== lastBlock) close();
|
|
44
|
-
lastBlock = block;
|
|
45
|
-
var re = /(\S+)|(\s+)/g, m;
|
|
46
|
-
while ((m = re.exec(node.data))) {
|
|
47
|
-
if (m[2]) { close(); continue; }
|
|
48
|
-
range.setStart(node, m.index);
|
|
49
|
-
range.setEnd(node, m.index + m[0].length);
|
|
50
|
-
var rects = range.getClientRects();
|
|
51
|
-
for (var i = 0; i < rects.length; i++) {
|
|
52
|
-
var r = rects[i];
|
|
53
|
-
if (r.width <= 0) continue;
|
|
54
|
-
current += r.width;
|
|
55
|
-
if (last && r.top > last.top + last.height / 2) split = true;
|
|
56
|
-
last = r;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
close();
|
|
61
|
-
return { widest: widest, split: split };
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
function lineWidth(el) {
|
|
65
|
-
var cs = win.getComputedStyle(el);
|
|
66
|
-
return el.getBoundingClientRect().width - parseFloat(cs.paddingLeft) - parseFloat(cs.paddingRight)
|
|
67
|
-
- parseFloat(cs.borderLeftWidth) - parseFloat(cs.borderRightWidth);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// ⚠️ THE HEADING ELEMENT IS NEVER TOUCHED — no style="", no data-*. This
|
|
71
|
-
// runs before React hydrates, and React 19 in development reports ANY
|
|
72
|
-
// attribute that differs from what it rendered ("a tree hydrated but some
|
|
73
|
-
// attributes didn't match"): first our inline font-size on the hero (which
|
|
74
|
-
// React owns via --heading-size), then, when that moved to a data-sf-fit
|
|
75
|
-
// attribute, the attribute itself. So the fitted size lives only in this
|
|
76
|
-
// script's own stylesheet, in <head>, addressed to each heading by its
|
|
77
|
-
// POSITION (":root>*:nth-child(2)>…"). A position goes stale when the page's
|
|
78
|
-
// structure changes, so the rules are rewritten in the MutationObserver
|
|
79
|
-
// callback, which runs before the next paint. !important so the size also
|
|
80
|
-
// beats a part's own inline size.
|
|
81
|
-
var head = doc.head || doc.documentElement;
|
|
82
|
-
var fitEl = doc.createElement("style");
|
|
83
|
-
fitEl.id = "storefront-fit-words-sizes";
|
|
84
|
-
head.appendChild(fitEl);
|
|
85
|
-
var fitted = new Map(); // heading -> fitted size, e.g. "43.8px"
|
|
86
|
-
|
|
87
|
-
function pathOf(el) {
|
|
88
|
-
var parts = [];
|
|
89
|
-
for (var e = el; e && e.parentElement; e = e.parentElement) {
|
|
90
|
-
var i = 1, s = e;
|
|
91
|
-
while ((s = s.previousElementSibling)) i++;
|
|
92
|
-
parts.unshift("*:nth-child(" + i + ")");
|
|
93
|
-
}
|
|
94
|
-
return ":root>" + parts.join(">");
|
|
95
|
-
}
|
|
96
|
-
function writeRules() {
|
|
97
|
-
var css = "";
|
|
98
|
-
fitted.forEach(function (size, el) {
|
|
99
|
-
if (!el.isConnected) { fitted.delete(el); return; }
|
|
100
|
-
css += pathOf(el) + "{font-size:" + size + " !important}";
|
|
101
|
-
});
|
|
102
|
-
if (fitEl.textContent !== css) fitEl.textContent = css;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
function unfit(el) {
|
|
106
|
-
if (fitted.delete(el)) writeRules();
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
function fits(el) {
|
|
110
|
-
var m = measure(el);
|
|
111
|
-
return !m.split && m.widest <= lineWidth(el) + SLACK;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
function fit(el) {
|
|
115
|
-
unfit(el);
|
|
116
|
-
if (lineWidth(el) <= 0) return; // hidden, or not laid out yet
|
|
117
|
-
if (fits(el)) return;
|
|
118
|
-
var set = parseFloat(win.getComputedStyle(el).fontSize);
|
|
119
|
-
if (!set) return;
|
|
120
|
-
var floor = Math.max(set * MIN_SCALE, MIN_PX);
|
|
121
|
-
if (floor >= set) return;
|
|
122
|
-
function size(px) { return Math.floor(px * 10) / 10 + "px"; }
|
|
123
|
-
// The SEARCH tries sizes on the element's own style and then puts that
|
|
124
|
-
// attribute back byte for byte (or removes it, if it had none), so nothing
|
|
125
|
-
// is left for React to see. A trial in a stylesheet instead restyles the
|
|
126
|
-
// whole page per step: a full pass on the Hartes home took 75–160ms at 4x
|
|
127
|
-
// CPU that way.
|
|
128
|
-
var hadStyle = el.hasAttribute("style"), origStyle = el.getAttribute("style");
|
|
129
|
-
function attempt(px) { el.style.setProperty("font-size", size(px), "important"); }
|
|
130
|
-
function done() { if (hadStyle) el.setAttribute("style", origStyle); else el.removeAttribute("style"); }
|
|
131
|
-
attempt(floor);
|
|
132
|
-
if (!fits(el)) { done(); return; } // even the floor does not fit: leave it as set
|
|
133
|
-
var lo = floor, hi = set;
|
|
134
|
-
for (var i = 0; i < 8; i++) {
|
|
135
|
-
var mid = (lo + hi) / 2;
|
|
136
|
-
attempt(mid);
|
|
137
|
-
if (fits(el)) lo = mid; else hi = mid;
|
|
138
|
-
}
|
|
139
|
-
done();
|
|
140
|
-
fitted.set(el, size(lo));
|
|
141
|
-
writeRules();
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
// What each heading measured right after we last fitted it, so the
|
|
145
|
-
// ResizeObserver below can tell a real change (a font swap, a rotate, a
|
|
146
|
-
// container that moved) from the size change our own write just caused.
|
|
147
|
-
var seen = new WeakMap();
|
|
148
|
-
function remember(el) {
|
|
149
|
-
var b = el.getBoundingClientRect();
|
|
150
|
-
seen.set(el, b.width + "x" + b.height);
|
|
151
|
-
}
|
|
152
|
-
function fitAndRemember(el) { fit(el); remember(el); }
|
|
153
|
-
|
|
154
|
-
// ⚠️ A ResizeObserver, NOT fonts.ready or a resize event, and the reason is
|
|
155
|
-
// WHEN it runs: after layout, BEFORE paint. The web font arriving re-wraps a
|
|
156
|
-
// fitted heading, and fonts.ready resolves only after that frame is painted —
|
|
157
|
-
// measured on the Hartes hero: a 42px jump in 2 of 3 loads. A size change
|
|
158
|
-
// reported here is fitted in the same frame, so the broken state is never
|
|
159
|
-
// drawn. It also covers a container that resizes.
|
|
160
|
-
var ro = new win.ResizeObserver(function (entries) {
|
|
161
|
-
for (var i = 0; i < entries.length; i++) {
|
|
162
|
-
var el = entries[i].target;
|
|
163
|
-
var b = el.getBoundingClientRect();
|
|
164
|
-
if (seen.get(el) === b.width + "x" + b.height) continue; // our own write
|
|
165
|
-
fitAndRemember(el);
|
|
166
|
-
}
|
|
167
|
-
});
|
|
168
|
-
// Its own set, not seen: fitAndRemember has written seen by the
|
|
169
|
-
// time watch runs, so a seen test observed no heading at all, and a
|
|
170
|
-
// heading fitted in the fallback face was never fitted again when the web
|
|
171
|
-
// font arrived (hartesmetal.com.au, "FusionForge." with its "." alone).
|
|
172
|
-
var watched = new WeakSet();
|
|
173
|
-
function watch(el) { if (!watched.has(el)) { watched.add(el); ro.observe(el); } }
|
|
174
|
-
|
|
175
|
-
function fitAll() {
|
|
176
|
-
var els = doc.querySelectorAll(SELECTOR);
|
|
177
|
-
for (var i = 0; i < els.length; i++) { fitAndRemember(els[i]); watch(els[i]); }
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
var queued = 0, all = false, touched = new Set();
|
|
181
|
-
function run() {
|
|
182
|
-
queued = 0;
|
|
183
|
-
if (all) { all = false; touched.clear(); fitAll(); return; }
|
|
184
|
-
var els = Array.from(touched);
|
|
185
|
-
touched.clear();
|
|
186
|
-
for (var i = 0; i < els.length; i++) if (els[i].isConnected) { fitAndRemember(els[i]); watch(els[i]); }
|
|
187
|
-
}
|
|
188
|
-
function schedule() { if (!queued) queued = win.requestAnimationFrame(run); }
|
|
189
|
-
function scheduleAll() { all = true; schedule(); }
|
|
190
|
-
|
|
191
|
-
fitAll();
|
|
192
|
-
// A backstop only: a font that changes widths without changing any
|
|
193
|
-
// heading's box is not seen by the ResizeObserver.
|
|
194
|
-
if (doc.fonts && doc.fonts.ready) doc.fonts.ready.then(scheduleAll, function () {});
|
|
195
|
-
|
|
196
|
-
// …and the viewport WIDTH, which the ResizeObserver cannot stand in for: a
|
|
197
|
-
// heading sized to its own text (fit-content, a flex item) keeps the SAME box
|
|
198
|
-
// when the phone turns to 844, so nothing reports a change and it would stay
|
|
199
|
-
// shrunk. The probe's rotate check caught exactly that.
|
|
200
|
-
var lastWidth = win.innerWidth;
|
|
201
|
-
function onResize() {
|
|
202
|
-
if (win.innerWidth === lastWidth) return; // a phone's toolbar changing HEIGHT is not our business
|
|
203
|
-
lastWidth = win.innerWidth;
|
|
204
|
-
scheduleAll();
|
|
205
|
-
}
|
|
206
|
-
win.addEventListener("resize", onResize);
|
|
207
|
-
|
|
208
|
-
var mo = new win.MutationObserver(function (records) {
|
|
209
|
-
// Positions first: a node added or removed anywhere can shift the
|
|
210
|
-
// nth-child path of a fitted heading, and this callback runs before paint.
|
|
211
|
-
if (fitted.size) {
|
|
212
|
-
for (var q = 0; q < records.length; q++) if (records[q].type === "childList") { writeRules(); break; }
|
|
213
|
-
}
|
|
214
|
-
for (var i = 0; i < records.length; i++) {
|
|
215
|
-
var r = records[i];
|
|
216
|
-
var target = r.target.nodeType === 1 ? r.target : r.target.parentElement;
|
|
217
|
-
var own = target && target.closest(SELECTOR);
|
|
218
|
-
if (own) touched.add(own);
|
|
219
|
-
for (var j = 0; j < r.addedNodes.length; j++) {
|
|
220
|
-
var n = r.addedNodes[j];
|
|
221
|
-
if (n.nodeType !== 1) continue;
|
|
222
|
-
if (n.matches(SELECTOR)) touched.add(n);
|
|
223
|
-
var inner = n.querySelectorAll(SELECTOR);
|
|
224
|
-
for (var k = 0; k < inner.length; k++) touched.add(inner[k]);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
if (touched.size) schedule();
|
|
228
|
-
});
|
|
229
|
-
mo.observe(doc.body, { childList: true, subtree: true, characterData: true });
|
|
230
|
-
|
|
231
|
-
doc.__sfFitWords = function stop() {
|
|
232
|
-
win.removeEventListener("resize", onResize);
|
|
233
|
-
ro.disconnect();
|
|
234
|
-
mo.disconnect();
|
|
235
|
-
if (queued) win.cancelAnimationFrame(queued);
|
|
236
|
-
fitted.clear();
|
|
237
|
-
fitEl.remove();
|
|
238
|
-
delete doc.__sfFitWords;
|
|
239
|
-
};
|
|
240
|
-
// For the probe and for debugging: which headings are fitted, at what size,
|
|
241
|
-
// and the sheet that holds it (disable it to read a heading's set size).
|
|
242
|
-
doc.__sfFitWords.fitted = fitted;
|
|
243
|
-
doc.__sfFitWords.sheet = fitEl;
|
|
244
|
-
})(document);`,yH="storefront-fit-words";function nw(e){let o=e.createElement("script");return o.id=yH,o.textContent=gH,(e.head??e.documentElement).appendChild(o),()=>{e.__sfFitWords?.(),o.remove()}}var wH=`
|
|
245
|
-
[${ao}][${ao}] { cursor: text; }
|
|
246
|
-
[${De}][${De}][${De}] {
|
|
247
|
-
outline: 1px solid ${ow};
|
|
248
|
-
outline-offset: 2px;
|
|
249
|
-
}
|
|
250
|
-
[${De}][${De}]:has([${De}]),
|
|
251
|
-
[data-easel-overlay-portal][data-easel-overlay-portal]:has([${De}]) {
|
|
252
|
-
outline: none;
|
|
253
|
-
}
|
|
254
|
-
[${De}][${De}][${De}][data-es-typing],
|
|
255
|
-
[data-es-typing] [${De}][${De}][${De}] {
|
|
256
|
-
outline: none;
|
|
257
|
-
}
|
|
258
|
-
[data-easel-overlay-portal][data-easel-overlay-portal][data-es-typing],
|
|
259
|
-
[data-es-typing] [data-easel-overlay-portal][data-easel-overlay-portal] {
|
|
260
|
-
outline: none;
|
|
261
|
-
}
|
|
262
|
-
`;function iw({children:e,document:o}){let{theme:t,themeMode:r,themeSwitchShown:a}=K(),n=We(t);return sw(()=>{if(o)return rw(o,{mode:r,switchShown:a})},[o,r,a]),sw(()=>{if(o)return aw(o,n)},[o,n]),CH(()=>{if(o)return nw(o)},[o]),SH(bH,{children:[lw(_u,{}),lw("style",{children:wH}),e]})}import{jsx as Yd}from"react/jsx-runtime";import{useEffect as vH,useState as kH}from"react";import{Banner as TH}from"efficient-shell/ui";var ws={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."},PH={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."},FH=ws.load,EH=ws.lock,OH=ws.conflict,LH=ws.save;function RH(e){if(!e)return null;if(e.loadFailed)return l(FH);if(e.lockHolder)return l(EH,{name:e.lockHolder.name||l("Somebody else")});if(e.conflict)return l(OH);if(e.saveFailed)return l(LH);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(PH[o.problem],{section:t,name:r})}function AH({report:e}){let o=RH(xs(e)),[t,r]=kH(null);return vH(()=>{o||r(null)},[o]),!o||t===o?null:Yd("aside",{className:"sf-canvas-notice",children:Yd(TH,{tone:"warning",onDismiss:()=>r(o),children:o})})}function fw(){return Yd(AH,{report:Is()})}import{jsx as vs}from"react/jsx-runtime";import{useState as cw}from"react";import{Banner as BH,Button as DH}from"efficient-shell/ui";import{UndoIcon as _H}from"efficient-shell/icons/efficient";import{useScreenDocument as NH}from"efficient-easel/screen/components/ScreenDocumentContext";function dw(){let e=_S(),{adapter:o,flushSave:t,reloadFromServer:r}=NH(),a=o.siteVersions,[n,s]=cw(!1),[i,f]=cw(!1);if(!e)return null;let d=async()=>{if(!(!a||n)){s(!0),f(!1);try{await HS({access:a,flushSave:t,reload:r})}catch{f(!0)}finally{s(!1)}}};return vs("aside",{className:"sf-canvas-notice",children:vs(BH,{tone:i?"danger":"info",title:e.title,onDismiss:hs,action:a&&e.undo?vs(DH,{variant:"secondary",size:"sm",leftIcon:vs(_H,{}),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 mw}from"efficient-easel/draw/client";import{useSectionOps as zH}from"efficient-easel/screen/lib/document/use-section-ops";function GH({children:e,componentId:o}){let{selectedPartId:t}=mw();return ph(t,o)?Ga(Xd,{}):Ga(Xd,{children:e})}function xw(e){let{mirrorHostStyles:o}=Hs(),t=Mu(),{sectionBackgroundWidth:r,sectionContentWidth:a,themeFromDocument:n,cardThemeIndex:s}=K(),i=uw(()=>({...e.metadata??t??{},...Lx(n?null:r,n?null:a),...Dn(s)}),[e.metadata,t,r,a,n,s]),f=pw(null),d=UH(f),{onDocument:p}=e,m=x=>{f.current=x,p?.(x)};return MH(Xd,{children:[Ga(dw,{}),Ga(fw,{}),Ga(HH,{...e,onDocument:m,typing:d,metadata:i,height:"fill",mirrorStyles:o,frameWrapper:iw,overlay:GH})]})}function UH(e){let o=WH(),t=zH(),r=mw(),a=pw({ops:t,parts:r});return a.current={ops:t,parts:r},uw(()=>{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=sy(i,n);if(!d)return null;let p=f,m=()=>(p=iy(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?Gl(hy(x)):void 0}}:null};return{at:i=>{let f=i.closest(`[${ao}]`),d=f?.getAttribute(ao);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){Hc(null);return}let f=i.element.closest(`[${ao}]`)?.getAttribute(ao)??null;Hc(f),f&&a.current.parts.selectedPartId!==f&&a.current.parts.select(f)}}},[o,e])}var $H=Tu.mediaFields,qH=/video|poster|focal|phone/i;function Iw(e){return($H[e]??[]).find(o=>!o.includes("[]")&&!qH.test(o))??null}var hw={adds:{kind:"block",type:"ImageBlock"},takes:e=>Iw(e.type)!==null,replace:(e,o)=>{let t=Iw(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 gw={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 jH="Save your page changes first";function yw(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:jH}:{visible:!0,enabled:!0}:{visible:!1,hiddenReason:"no-site"}:{visible:!1,hiddenReason:"not-operator"}:{visible:!1,hiddenReason:"no-console"}}var bw="storefront-editor:save-as-template";var KH="plain",Sw=[{label:"Plain",value:"plain"},{label:"Filled",value:"filled"},{label:"Line",value:"line"}],VH="line",YH={KeyFeatures:"filled"};function Ua(e){return YH[e]??KH}function ane(e,o){return jo(Sw,Ua(o),e)}function nne(e){return jo(Sw,VH,e)}function Cw(e,{nodeDefaults:o,newNodeId:t,sectionLabel:r,blockIsOffered:a}){let n=gs(e);return n?n(o,t):iS(e)&&a(ue)&&a(wr)?{type:ue,props:{...o(ue),id:t(ue),direction:"column",name:`${r(e)} section`,content:[{type:wr,props:{...o(wr),id:t(wr),...Eo[e]?.headStyle?{headStyle:Eo[e].headStyle}:{},...Eo[e]?.headRowGap?{rowGap:Eo[e].headRowGap}:{},...Eo[e]?.headDescriptionSize?{descriptionSize:Eo[e].headDescriptionSize}:{},...Ua(e)!==Ua(wr)?{eyebrowLook:Ua(e)}:{}}},{type:e,props:{...o(e),id:t(e),headPlacement:"own-box"}}]}}:Oo[e]?.fixed===!0?{type:e,props:{...o(e),id:t(e),layout:"boxes"}}:null}import{useEffect as XH,useState as ZH}from"react";import{useEaselSession as QH}from"efficient-easel/screen/lib/session-context";function ww(){let e=QH().chrome?.products?.list,[o,t]=ZH(null);return XH(()=>{if(!e)return;let r=!1;return e().then(a=>{r||t(a)}),()=>{r=!0}},[e]),o}function Rw({mode:e,open:o}){let{setSelectedHeroId:t,setSelectHandler:r}=Pg(),a=Ow().tree,n=e,s=n.kind==="ticker"?n.heroId:null,i=qa(f=>{f&&(o({kind:"ticker",heroId:f}),d5(f))},[o]);return Ve(()=>{t(s)},[s,t]),Ve(()=>{r(i)},[r,i]),{partRows:(f,{rowClick:d})=>{let p=String(f.props.id);return f.type==="Hero"&&xe(Fw,{icon:xe(At,{type:"ticker",size:13}),name:l(sa),onSelect:()=>i(p),selected:s===p,rowProps:{onClick:d(()=>i(p))},words:a})}}}function Aw({mode:e,select:o}){let{setSelectedHeroPart:t,setSelectHandler:r}=Rl(),a=Ow().tree,{appState:n}=Ew(x=>x),s=n.data.content??[],i=JH(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=qa(x=>{let I=Gg(x);if(!I)return;let b=i.current.findIndex(k=>String(k.props.id)===I.nodeId);if(b<0)return;let w={kind:ca[I.part],nodeId:I.nodeId};o({index:b},w)},[o]);return Ve(()=>{t(p)},[p,t]),Ve(()=>{r(m)},[r,m]),{partRows:(x,{rowClick:I})=>{let b=String(x.props.id),w=zg(x);if(w.length===0)return null;let k=y=>{let h=da(b,y.part);return xe(Fw,{icon:xe(At,{type:y.part==="media"?"heroMedia":"heroImage",size:13}),name:l(y.label),onSelect:()=>m(h),selected:p===h,rowProps:{onClick:I(()=>m(h))},words:a},h)},[T,...C]=w;return $a(Pw,{children:[k(T),C.length>0&&xe(i5,{children:C.map(k)})]})}}}function Bw(e,o){return{partRows:(t,r)=>$a(Pw,{children:[e.partRows?.(t,r),o.partRows?.(t,r)]})}}function u5(e){let{adapter:o,capabilities:t,currentSlug:r,siteId:a,docId:n,hasUnsavedEdits:s,bridgeCapabilities:i,notifyParent:f,token:d}=ks(),{hasPreviewLink:p}=t,m=Ce(Lw()).preview?.draftLink,x=YS(e.data),I=yw({hasTrustedConsole:!!d,canCreatePlatformTemplate:i.canCreatePlatformTemplate,capabilities:t,siteId:a,hasUnsavedEdits:s}),b=qa(()=>{!a||!r||f(bw,{siteId:a,slug:r})},[f,a,r]),w=kS({pageSlug:r,siteId:a,token:d}),k=o.previewHref?.(r)??w;return{barLead:()=>I.visible&&xe(t5,{side:"bottom",content:I.enabled?l("Save this website as a platform template"):l(I.disabledReason),children:xe("span",{className:"sf-tip-disabled",tabIndex:I.enabled?void 0:0,children:xe(o5,{variant:"secondary",disabled:!I.enabled,onClick:b,rightIcon:xe(s5,{size:15}),children:l("Save as Template")})})}),barView:()=>p&&r&&xe(PS,{liveHref:k,pageId:n??null,draftLink:m}),mainAction:x}}function p5(e,o){let{capabilities:t,templateId:r,siteId:a,tokenRef:n,navigate:s}=ks(),{hasSiteTheme:i,explainsSiteSettings:f}=t,d=T=>o.setView(T),[p,m]=e5(dr[0].id),{surface:x,setSurface:I}=Tg(),b=()=>{if(i){d("styles"),o.reveal(),vw();return}e.show(ud),e.reveal(),vw()},w={id:"pages",label:l("Pages"),icon:xe(a5,{}),panel:({onHide:T})=>xe(gg,{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:T})},k=[];return!i&&f&&k.push({id:"appearance",label:l("Appearance"),icon:xe(l5,{}),active:e.kind==="website",onSelect:b}),i&&k.push({id:"styles",label:l("Styles"),icon:xe(n5,{}),panel:({onHide:T,notify:C})=>xe(Db,{tokenRef:n,siteId:a??void 0,onClose:T,onNotify:C,tab:p,onTabChange:m})}),{railLead:[w],railTrail:k,resolveLeftView:T=>UC(T,i),openSettings:b,openStyles:()=>{m(Xh),d("styles")}}}function m5(){let{navigate:e,siteId:o,reloadFromServer:t,docId:r}=ks(),a=Ew(s=>s.config),n=Lw();Ve(()=>(Vd({openPage:s=>e({kind:"page",slug:s.slug,siteId:o??void 0}),reload:()=>{t()},config:a}),()=>Vd(null)),[e,o,t,a]),Ve(()=>{let s=zo();if(!s||!r)return;let i=!1;return c5(n).list().then(f=>{i||s.learn(f)}).catch(()=>{}),()=>{i=!0}},[r,n])}function x5(e,o,t,r){let{kind:a,open:n}=e,{selected:s,zoneOf:i}=o;Ve(()=>{_C(s?.type==="BookingBox"&&s.props.region==="confirm"?NC(i(String(s.props.id))):null)},[s?.props.id]);let f=rS(e,o),{capabilities:{hasSiteSettings:d}}=ks();m5();let{setSelected:p,setSelectHandler:m}=K(),{chat:x,setChat:I,setSelected:b,setSelectHandler:w}=Ll(),k=a==="header";Ve(()=>{p(k)},[k,p]),Ve(()=>{m(()=>n(dd))},[m,n]);let T=qa(()=>n(kb),[n]),C=a==="chat";Ve(()=>{b(C)},[C,b]),Ve(()=>{w(T)},[w,T]);let{setOpenHandler:y}=la(),h=qa(()=>n(Tb),[n]);Ve(()=>{y(h)},[y,h]);let E=Bw(Rw(e),Aw(e)),F=u5(o),R=p5(e,r),P=t.device;return{...E,...F,...R,hasOwnRows:D=>D.type===fs,ownRows:f.renderLocationTree,sectionPressed:f.sectionPressed,wrap:D=>xe(Ws.Provider,{value:!0,children:$a(f5.Provider,{value:P,children:[D,xe(rC,{})]})}),addPanelRow:D=>d?$a("div",{className:"sf-addside-sitewide",children:[xe("span",{className:"sf-addside-sitewide-glyph","aria-hidden":"true",children:xe(At,{type:"chat",size:16})}),$a("button",{type:"button",className:"sf-addside-sitewide-name",onClick:()=>{D(),T()},children:[l("Live chat"),xe("span",{className:"sf-addside-sitewide-desc",children:l("A chat bubble on every page")})]}),xe(r5,{checked:x.enabled,onChange:M=>I({enabled:M}),ariaLabel:l("Show the chat bubble on the whole site")})]}):void 0}}var kw=null,Zd=new WeakMap;function I5(e){let o=Bu();if(!e||!o)return e;kw!==o&&(kw=o,Zd=new WeakMap);let t=Zd.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},Zd.set(e,t)),t}var h5={isLockedBlock:(e,o)=>XC(e)||!!(o&&zo()?.heldElsewhere(o.props.id)),duplicateBlocked:Zl,nestDepth:(e,o,t)=>o===rn?tp(e,t):0,newSectionNode:Cw,canAddTo:(e,o)=>I5(BC(e,o)),blockIsOffered:AC,slotsOf:DC},g5=new Proxy(gw,{get:(e,o)=>{let t=Reflect.get(e,o);return typeof t=="string"?l(t):t}}),y5={labelAtLevel:(e,o,t)=>l(kd(e,o,t)),descriptions:g5,categoryLabel:e=>{let o=aC(e);return o===void 0?void 0:l(o)},firstSection:nC,blockRowName:MC,rowName:HC,plainText:gt,Icon:At,Thumbnail:Bb,useProducts:ww},b5={desktop:2e3,tablet:800,mobile:390},Tw="desktop",S5={options:Cg,initial:Tw,fluid:Tw,widths:b5},C5={read:zC,write:e=>GC(e),forSelection:(e,o)=>$C(e,o)},w5={first:_e,last:fe,firstGroup:ce,lastGroup:se,isSectionGroup:gr,sectionGroupZone:zy,panelOf:e=>e===_e?dd:null,get sharedReach(){return Ht()?k5:void 0},get shared(){return zo()?ew:void 0},get groupTab(){return Ht()?jy:void 0},get groupBadge(){return Ht()?Xc({type:se})??void 0:void 0},get changeNotice(){return Ht()?Ky():void 0},get band(){return Ht()?v5:void 0},get groupAccepts(){return Ht()?$y:void 0}},v5={foldable:!0},k5=e=>Xc(e)??JC(e);function T5(e){return{...Bw(Rw(e),Aw(e)),openSettings:()=>e.show(ud)}}function P5(e,o){hS(e,o),bS()}var Tle={useOwnerName:ur,useDocumentLabel:tg,useBridges:x5,useStandaloneBridges:T5,useDocumentPass:P5,blockRules:h5,blockLook:y5,devices:S5,leftView:C5,pinned:w5,Canvas:xw,canvasDrag:{media:hw},Inspector:Fb};export{iee as a,fee as b,cee as c,dee as d,lt as e,Wd as f,Ste as g,Ce as h,xn as i,lS as j,gee as k,Rte as l,fC as m,Mte as n,xC as o,Hte as p,IC as q,gC as r,SC as s,CC as t,Zte as u,Qte as v,Jte as w,ere as x,q2 as y,hp as z,X2 as A,cre as B,$o as C,on as D,bv as E,k3 as F,pt as G,T3 as H,P3 as I,rn as J,tp as K,gre as L,yre as M,oH as N,Qu as O,Iv as P,h3 as Q,en as R,Ju as S,hv as T,gv as U,yv as V,b3 as W,S3 as X,C3 as Y,w3 as Z,sc as _,yA as $,bA as aa,SA as ba,Bl as ca,Dl as da,eK as ea,ce as fa,se as ga,vZ as ha,Gy as ia,Xl as ja,jo as ka,Eo as la,wee as ma,vee as na,kee as oa,Tee as pa,Pf as qa,E4 as ra,O4 as sa,Kt as ta,L4 as ua,R4 as va,Rk as wa,Ak as xa,gt as ya,Mr as za,fl as Aa,cl as Ba,ao as Ca,oq as Da,tq as Ea,rq as Fa,De as Ga,aq as Ha,uO as Ia,pO as Ja,nq as Ka,lr as La,lq as Ma,sq as Na,hO as Oa,pl as Pa,sr as Qa,Th as Ra,Il as Sa,mq as Ta,zf as Ua,ml as Va,xq as Wa,Iq as Xa,hq as Ya,gq as Za,yq as _a,eL as $a,bq as ab,Sq as bb,Cq as cb,wq as db,ha as eb,gy as fb,yy as gb,by as hb,G5 as ib,j5 as jb,K5 as kb,V5 as lb,me as mb,EP as nb,qi as ob,OP as pb,WG as qb,oo as rb,GG as sb,UG as tb,RP as ub,$G as vb,vx as wb,kx as xb,_P as yb,NP as zb,VG as Ab,XG as Bb,ZG as Cb,QG as Db,JG as Eb,Px as Fb,or as Gb,_o as Hb,Yi as Ib,Ex as Jb,GP as Kb,Xi as Lb,Bn as Mb,tU as Nb,Ax as Ob,oT as Pb,w6 as Qb,an as Rb,mt as Sb,Dr as Tb,fp as Ub,D3 as Vb,Zs as Wb,_3 as Xb,ln as Yb,yp as Zb,a4 as _b,n4 as $b,ok as ac,l4 as bc,f4 as cc,Sp as dc,c4 as ec,rk as fc,d4 as gc,eP as hc,kn as ic,lG as jc,Bi as kc,sG as lc,sP as mc,iG as nc,ne as oc,dG as pc,uG as qc,CG as rc,wG as sc,vG as tc,$m as uc,oG as vc,tG as wc,rG as xc,aG as yc,uP as zc,Pn as Ac,mG as Bc,Jm as Cc,F5 as Dc,Z as Ec,l as Fc,qe as Gc,hy as Hc,ZY as Ic,xy as Jc,lm as Kc,gn as Lc,sm as Mc,mW as Nc,QT as Oc,DW as Pc,mm as Qc,d3 as Rc,x3 as Sc,Qs as Tc,Yv as Uc,e4 as Vc,m4 as Wc,ui as Xc,pi as Yc,I6 as Zc,h6 as _c,$p as $c,g6 as ad,y6 as bd,b6 as cd,Xp as dd,Qp as ed,GW as fd,Im as gd,ve as hd,ym as id,JW as jd,f0 as kd,ez as ld,oz as md,Sm as nd,az as od,c0 as pd,nz as qd,lz as rd,u0 as sd,fz as td,p0 as ud,cz as vd,vm as wd,km as xd,Tm as yd,Pm as zd,Fm as Ad,Em as Bd,Zt as Cd,mz as Dd,xz as Ed,Iz as Fd,hz as Gd,Cn as Hd,gz as Id,Ei as Jd,Tz as Kd,Bm as Ld,C0 as Md,Fz as Nd,Oi as Od,Az as Pd,Li as Qd,U0 as Rd,Qz as Sd,Mi as Td,IG as Ud,hG as Vd,gG as Wd,yG as Xd,bG as Yd,dx as Zd,kP as _d,TG as $d,fx as ae,cx as be,PG as ce,En as de,On as ee,EG as fe,er as ge,Rn as he,RG as ie,AG as je,BG as ke,bx as le,_G as me,Jo as ne,vo as oe,sf as pe,ko as qe,g$ as re,y$ as se,b$ as te,S$ as ue,k$ as ve,T$ as we,fE as xe,P$ as ye,F$ as ze,E$ as Ae,O$ as Be,L$ as Ce,R$ as De,A$ as Ee,ke as Fe,B$ as Ge,pE as He,D$ as Ie,_$ as Je,N$ as Ke,M$ as Le,Wn as Me,rr as Ne,H$ as Oe,vI as Pe,Un as Qe,$n as Re,W$ as Se,z$ as Te,G$ as Ue,U$ as Ve,$$ as We,q$ as Xe,j$ as Ye,K$ as Ze,V$ as _e,Y$ as $e,X$ as af,Z$ as bf,qn as cf,Q$ as df,J$ as ef,jn as ff,Kn as gf,pf as hf,Vn as if,e7 as jf,Tt as kf,o7 as lf,t7 as mf,r7 as nf,a7 as of,n7 as pf,l7 as qf,s7 as rf,i7 as sf,Qo as tf,f7 as uf,c7 as vf,Yn as wf,d7 as xf,mf as yf,u7 as zf,p7 as Af,xf as Bf,m7 as Cf,LI as Df,RI as Ef,AI as Ff,x7 as Gf,o1 as Hf,I7 as If,h7 as Jf,q_ as Kf,ab as Lf,ze as Mf,va as Nf,V_ as Of,fb as Pf,fQ as Qf,cQ as Rf,dQ as Sf,uQ as Tf,pQ as Uf,mQ as Vf,xQ as Wf,IQ as Xf,hQ as Yf,gQ as Zf,yQ as _f,ia as $f,nA as ag,zj as bg,Gj as cg,Uj as dg,dA as eg,pA as fg,Og as gg,hA as hg,Vj as ig,Yj as jg,Rg as kg,Xj as lg,Bg as mg,Ag as ng,sK as og,El as pg,yg as qg,bg as rg,Ol as sg,gj as tg,yj as ug,Ll as vg,ZR as wg,Ej as xg,la as yg,Aj as zg,Tg as Ag,Uoe as Bg,$oe as Cg,qoe as Dg,joe as Eg,Kre as Fg,Vre as Gg,oae as Hg,Xre as Ig,_j as Jg,Pg as Kg,Hj as Lg,Rl as Mg,WJ as Ng,_b as Og,Nb as Pg,H5 as Qg,Lh as Rg,Rq as Sg,Aq as Tg,Bq as Ug,Dq as Vg,Qf as Wg,Jf as Xg,Ng as Yg,fK as Zg,Mg as _g,vA as $g,ic as ah,pK as bh,mK as ch,kA as dh,xK as eh,da as fh,Gg as gh,IK as hh,Ug as ih,VV as jh,Xg as kh,oy as lh,Ac as mh,eD as nh,mY as oh,xY as ph,IY as qh,tD as rh,hY as sh,gY as th,ky as uh,iX as vh,LD as wh,RD as xh,ba as yh,AD as zh,BD as Ah,xX as Bh,Oy as Ch,fe as Dh,Yl as Eh,lo as Fh,zb as Gh,Gb as Hh,$J as Ih,Ea as Jh,Ub as Kh,$b as Lh,KJ as Mh,VJ as Nh,Bee as Oh,Dee as Ph,_ee as Qh,SS as Rh,Ad as Sh,CS as Th,BC as Uh,Hre as Vh,ow as Wh,Cs as Xh,uH as Yh,pH as Zh,cae as _h,R5 as $h,_5 as ai,KH as bi,Sw as ci,VH as di,Ua as ei,ane as fi,nne as gi,Tle as hi};
|